sub
stringclasses 4
values | title
stringlengths 3
304
| selftext
stringlengths 3
30k
| upvote_ratio
float64 0.07
1
| id
stringlengths 9
9
| created_utc
float64 1.6B
1.65B
|
---|---|---|---|---|---|
Python
|
I made my own Task Deadline Tracker using Python!
|
Hi all, I'm really excited to share this little project I've finally finished! Meet Tasky, a program made using tkinter that will track the deadlines for the task you feed in and show you the time remaining for your tasks (for example 3d 2h 57m left for some task). I use it regularly to track my own tasks and thus plan accordingly. It's been really helpful to me. You can add, delete and edit tasks in it too.
Hope you all like it :)
[Image showing Labelled Parts of Tasky](https://user-images.githubusercontent.com/68178267/160485795-411c9ccb-a133-4eea-a3ac-213c91ae2669.png)
More info and features: [Github Repo](https://github.com/AbhiK002/Tasky/)
​
[It comes in 2 themes as well!](https://preview.redd.it/3dcztj22p5q81.png?width=965&format=png&auto=webp&s=618c3f6e291f9e84a3816a675f6d3bb9dd416379)
| 0.94 |
t3_tqe3tx
| 1,648,487,360 |
Python
|
Python project that swipes for me on Tinder
|
demo link: [https://youtu.be/mRbEcqf1xLw](https://youtu.be/mRbEcqf1xLw)
(the code breakdown link is in the description of the demo)
| 0.6 |
t3_tqdf63
| 1,648,485,556 |
Python
|
In 2 days, running a live 45-minutes session on the fundamentals of observability, OpenTelemetry, and distributed tracing in Python
|
Hi everyone, there's a live OpenTelemetry and observability fundamentals session - in 2 days, Wednesday, March 30 at 11 AM PST.
**You will learn how to instrument your apps to capture traces with OpenTelemetry in Python.**
This session is at no cost and vendor-neutral.
You can expect in this session: 45 minutes of core concepts, how to deploy it yourself hands-on + Q&A.
If you are interested in observability, OpenTelemetry, and tracing - this is the place to be!
Register here [https://www.aspecto.io/get-started-with-opentelemetry/](https://www.aspecto.io/get-started-with-opentelemetry/?utm_source=post&utm_medium=reddit&utm_campaign=r-python-opentelemetry-workshop-pyhon-march-30-2022)
| 0.66 |
t3_tqd44k
| 1,648,484,744 |
Python
|
Solverecaptchas - An async Python library to automate solving ReCAPTCHA v2 using Playwright.
|
[https://github.com/embium/solverecaptchas](https://github.com/embium/solverecaptchas)
Solves audio and image types!
## Compatibility
Linux, macOS, and Windows!
## Installation
$ pip install solverecaptchas
## Usage
import asyncio
import sys
from solverecaptchas.solver import Solver
if len(sys.argv) == 4:
pageurl, sitekey, proxy = sys.argv[1:]
else:
print('Invalid number of arguments (pageurl, sitekey, proxy)')
sys.exit(0)
if proxy.lower() == "none":
proxy = None
client = Solver(pageurl, sitekey, proxy=proxy)
result = asyncio.run(client.start())
if result:
print(result)
| 1 |
t3_tqcsdg
| 1,648,483,853 |
Python
|
I made a Twitter bot that hates you!
|
I've messed around in Python on and off for a couple of years now. Most of what I've made has been exceptionally dumb (poorly written text adventures, a thing that used turtle to draw different colored spirals, a Garfield comic generator) and left unfinished. Until now!
[Insult Ivan](https://twitter.com/InsultIvan) is a twitter bot I've created using Tweepy, and marks the first one of my exceptionally dumb projects to actually be done enough to function. All it does is pull words from four large lists (one with phrases to start the insult, and then three words to make up the insult itself), and then tweets this out once a day. It saves insults to a text file, so it won't repeat itself. It also responds to mentions with an insult that it will then only ever use for that user, reusing it in response to subsequent mentions from the same user.
Anyway, the code is an absolute mess (I'm kind of assuming? I don't really know.), and I'm sure there is so much that I could have done better. But it functions and I love it and I wanted to share this beautifully idiotic thing I made.
Code isn't available anywhere if that's okay (I can maybe mess around and see if I can make that happen if anyone really wants it). I'm happy to answer any questions though!
| 0.67 |
t3_tqc8pe
| 1,648,482,379 |
Python
|
PYTHON CERTIFICATIONS LIST - BEST OF 2022
|
[Python Certification](https://www.sprintzeal.com/blog/python-certifications) is an established general-purpose high-level programming language. It was established by Guido van Rossum in 1991, further developments were done by Python Software Foundation. The primary position in python is given to code readability. Because by using its syntax programmers will be able to create concepts with fewer lines of code.
| 0.17 |
t3_tqbfx0
| 1,648,480,156 |
Python
|
A roadmap of the free CS curriculum on Qvault (JS, Python, Go)
|
nan
| 0.72 |
t3_tqaff4
| 1,648,477,395 |
Python
|
Feedback Requested - First Script that Calls API and Posts to MS Teams
|
Looking for feedback regarding my first script. Overall it calls a API, cleans the data a bit and then makes a post to MS Teams.
https://imgur.com/a/5MkAsGu
Anything I'm doing terrible? Something I could do better? More efficient?
| 0.5 |
t3_tq9d4k
| 1,648,474,241 |
Python
|
The counter-intuitive rise of Python in scientific computing
|
nan
| 0.93 |
t3_tq8jzp
| 1,648,471,730 |
Python
|
X-Cash crypto now has a Python wrapper Library
|
nan
| 0.31 |
t3_tq8csg
| 1,648,471,059 |
Python
|
PYTHON CERTIFICATIONS LIST - BEST OF 2022
|
Benefits of Python Certification
Following are the benefits one would get through python certification,
**Easy to learn**
The key benefit of python certification is the programming language of python is easy to learn. **Python certification** can be used as a channel to a career, where learning other programming languages and frameworks will start to seem interesting.
If one is a complete beginner and wants to learn about programming, python will help to start better. Python is a simple and easy-to-understand programming language. And once the course is completed and you get the python certification, you will be confident enough to explore more about the programming world.
**Expertise in Python**
When it comes to recruiting python programmers, recruiters always expect good skills and what is the unique skill that makes the candidate stand out from the rest of the crowd. **Python certification** will help in such situations, if you are one of the candidates applying for a position and you have a certificate you will have better chances to get selected.
Hence, having [python certification](https://www.sprintzeal.com/blog/python-certifications) will prove that you know better and will help you gain the recruiter's interest.
| 1 |
t3_tq7crh
| 1,648,467,751 |
Python
|
py.quit it
|
nan
| 0.29 |
t3_tq6wo3
| 1,648,465,973 |
Python
|
Scrape all Naver Video Results using pagination in Python
|
Using [`parsel`](https://parsel.readthedocs.io/):
```python
import requests, json
from parsel import Selector
params = {
"start": 0, # page number
"display": "48", # videos to display. Hard limit.
"query": "minecraft", # search query
"where": "video", # Naver videos search engine
"sort": "rel", # sorted as you would see in the browser
"video_more": "1" # required to receive a JSON data
}
headers = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36",
}
video_results = []
html = requests.get("https://s.search.naver.com/p/video/search.naver", params=params, headers=headers, timeout=30)
json_data = json.loads(html.text.replace("( {", "{").replace("]})", "]}"))
html_data = json_data["aData"]
while params["start"] <= int(json_data["maxCount"]):
for result in html_data:
selector = Selector(result)
for video in selector.css(".video_bx"):
title = video.css(".text").xpath("normalize-space()").get().strip()
link = video.css(".info_title::attr(href)").get()
thumbnail = video.css(".thumb_area img::attr(src)").get()
channel = video.css(".channel::text").get()
origin = video.css(".origin::text").get()
video_duration = video.css(".time::text").get()
views = video.css(".desc_group .desc:nth-child(1)::text").get()
date_published = video.css(".desc_group .desc:nth-child(2)::text").get()
video_results.append({
"title": title,
"link": link,
"thumbnail": thumbnail,
"channel": channel,
"origin": origin,
"video_duration": video_duration,
"views": views,
"date_published": date_published
})
params["start"] += 48
html = requests.get("https://s.search.naver.com/p/video/search.naver", params=params, headers=headers, timeout=30)
html_data = json.loads(html.text.replace("( {", "{").replace("]})", "]}"))["aData"]
print(json.dumps(video_results, indent=2, ensure_ascii=False))
Output:
[
{
"title": "Minecraft : ๐ฐ How to build a Survival Castle Tower house",
"link": "https://www.youtube.com/watch?v=iU-xjhgU2vQ",
"thumbnail": "https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiU-xjhgU2vQ%2Fmqdefault.jpg&type=ac612_350",
"channel": "์ํผ Sopypie",
"origin": "Youtube",
"video_duration": "25:27",
"views": "126",
"date_published": "1์ผ ์ "
},
{
"title": "์กฐ๊ธ ํผ๋์ค๋ฌ์ธ ์ ์๋ ๋ง์ธํฌ๋ํํธ [ Minecraft ASMR Tower ]",
"link": "https://www.youtube.com/watch?v=y8x8oDAek_w",
"thumbnail": "https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fy8x8oDAek_w%2Fmqdefault.jpg&type=ac612_350",
"channel": "์ธ๋น XEBIN",
"origin": "Youtube",
"video_duration": "00:58",
"views": "1,262",
"date_published": "2021.11.13."
}
]
```
Using [`playwright`](https://playwright.dev/python/) browser automation:
```python
from playwright.sync_api import sync_playwright
import json
with sync_playwright() as p:
browser = p.chromium.launch(headless=False)
page = browser.new_page()
page.goto("https://search.naver.com/search.naver?where=video&query=minecraft")
video_results = []
not_reached_end = True
while not_reached_end:
page.evaluate("""let scrollingElement = (document.scrollingElement || document.body);
scrollingElement.scrollTop = scrollingElement scrollHeight;""")
if page.locator("#video_max_display").is_visible():
not_reached_end = False
for index, video in enumerate(page.query_selector_all(".video_bx"), start=1):
title = video.query_selector(".text").inner_text()
link = video.query_selector(".info_title").get_attribute("href")
thumbnail = video.query_selector(".thumb_area img").get_attribute("src")
channel = None if video.query_selector(".channel") is None else video.query_selector(".channel").inner_text()
origin = video.query_selector(".origin").inner_text()
video_duration = video.query_selector(".time").inner_text()
views = video.query_selector(".desc_group .desc:nth-child(1)").inner_text()
date_published = None if video.query_selector(".desc_group .desc:nth-child(2)") is None else \
video.query_selector(".desc_group .desc:nth-child(2)").inner_text()
video_results.append({
"position": index,
"title": title,
"link": link,
"thumbnail": thumbnail,
"channel": channel,
"origin": origin,
"video_duration": video_duration,
"views": views,
"date_published": date_published
})
print(json.dumps(video_results, indent=2, ensure_ascii=False))
browser.close()
```
Output:
```json
[
{
"position": 1,
"title": "Minecraft : ๐ฐ How to build a Survival Castle Tower house",
"link": "https://www.youtube.com/watch?v=iU-xjhgU2vQ",
"thumbnail": "https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiU-xjhgU2vQ%2Fmqdefault.jpg&type=ac612_350",
"channel": "์ํผ Sopypie",
"origin": "Youtube",
"video_duration": "25:27",
"views": "์ฌ์์126",
"date_published": "20์๊ฐ ์ "
},
{
"position": 1008,
"title": "Titanic [Minecraft] V3 | ํ์ดํ๋ [๋ง์ธํฌ๋ํํธ] V3",
"link": "https://www.youtube.com/watch?v=K39joThAoC0",
"thumbnail": "https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FK39joThAoC0%2Fmqdefault.jpg&type=ac612_350",
"channel": "๋์ด์Naia",
"origin": "Youtube",
"video_duration": "02:40",
"views": "์ฌ์์22",
"date_published": "2021.11.11."
}
]
```
If you need a more in-depth explanation, you can visit the blog post at SerpApi: https://serpapi.com/blog/scrape-all-naver-video-results-using-pagination-in-python/#full_code
| 0.4 |
t3_tq6vg2
| 1,648,465,829 |
Python
|
Open-source tool to make awesome-looking docs
|
[https://mkdocs-magicspace.alnoda.org/](https://mkdocs-magicspace.alnoda.org/)
This is a free tool I made. It will help to make beautiful docs for any Python project, and host them on GitHub pages.
Based on MkDocs, I extended it with lots of plugins and extensions. And created tutorials.
I hope you find it useful.
| 0.84 |
t3_tq6sgn
| 1,648,465,502 |
Python
|
GitHub - enthought/traits: Observable typed attributes for Python classes
|
nan
| 0.88 |
t3_tq4p5h
| 1,648,456,356 |
Python
|
Top python libraries/ frameworks that you suggest every one
|
Hit your answer I wonder is there any hidden treasure.
| 0.8 |
t3_tq483b
| 1,648,454,163 |
Python
|
Top 5 Python Time Series Libraries
|
nan
| 0.75 |
t3_tq3cjf
| 1,648,450,342 |
Python
|
Master Python Comprehensions
|
Hi folks,
Wrote something down about Python Comprehensions, focusing on simplicity and readability.
You can have a look here [https://towardsdatascience.com/master-python-comprehensions-4ef1c66b452d](https://towardsdatascience.com/master-python-comprehensions-4ef1c66b452d)
Happy to discuss :)
Thanks!
| 0.75 |
t3_tq2ain
| 1,648,445,882 |
Python
|
a lightweight DNS traffic flow monitor
|
Hi, I wrote a lightweight DNS traffic query / response monitor by using Scapy. It will print each transaction per line. Here's the source code link: [https://github.com/meow-watermelon/dns-flow](https://github.com/meow-watermelon/dns-flow) I attached a screenshot to show the output example. Any suggestions are welcome. Thanks!
https://preview.redd.it/8ky0mi6z02q81.png?width=2560&format=png&auto=webp&s=051e9591b484ff58d26eafd43b4ed3188faa7ba1
| 0.67 |
t3_tq1g8u
| 1,648,442,658 |
Python
|
What type of language is Python?
|
I use python in all my classes and got into a discussion with my students about what type of language python is.
Initially, I thought python is a completely "non-typed" language because we are able to suppress types while declaring variables and parameters:
*def func(a, b): ...*
But then I found out that it's possible to type things up explicitly:
*def func(a: int, b: int) -> int: ...*
I ended up categorizing python as an "implicitly typed" language, and the interpreter must fill the types I don't explicitly add to the code. However, one of my students pointed out that, as python admits dynamic typing, it is a "dynamically typed language", which is the official classification (?).
However, I have failed to wrap my mind around the fact that I can explicitly set the types, but the interpreter won't bat an eye in case I recast my variables:
*def func(a: int, b: int) -> int:*
*...c: int = a + b*
*...return c*
*d: int = func(1, 2)*
*print(d)*
*d = "dynamically typed?"*
*print(d)*
Is "weakly-typed dynamic language" a possible way to classify python?
| 0.66 |
t3_tpzl61
| 1,648,435,995 |
Python
|
List comprehension vs multiplying a list differences?
|
Is there any difference between the following code?:
arr = [[]] * 10
arr = [[] for x in range(10)]
I used the first method to initiate a list on a hackerank problem and I kept getting wrong answer. When I googled the answer and saw the person use the second method, so I tried it and got the right answer?? `[[]] * 10 == [[] for x in range(10)]` returns True. Why would the way I initiate this list cause a different result?
If anyone wants to try it themselves.. it's a real head scratcher for me.
[https://programs.programmingoneonone.com/2021/05/hackerrank-dynamic-array-solution.html](https://programs.programmingoneonone.com/2021/05/hackerrank-dynamic-array-solution.html)
def dynamicArray(n, queries):
# Write your code here
arr = [[] for x in range(n)]
#Now try using the code below to initiate arr. This fails it for me.
#arr = [[]] * n
lastAnswer = 0
answers = []
for x in queries:
idx = (x[1]^lastAnswer) % n
if x[0] == 1:
arr[idx].append(x[2])
else:
lastAnswer = arr[idx][x[2] % len(arr[idx])]
answers.append(lastAnswer)
return answers
| 0.56 |
t3_tpz8kn
| 1,648,434,777 |
Python
|
Monday Daily Thread: Project ideas!
|
Comment any project ideas beginner or advanced in this thread for others to give a try! If you complete one make sure to reply to the comment with how you found it and attach some source code! If you're looking for project ideas, you might be interested in checking out Al Sweigart's, ["The Big Book of Small Python Projects"](https://inventwithpython.com/bigbookpython/) which provides a list of projects and the code to make them work.
| 1 |
t3_tpwknx
| 1,648,425,608 |
Python
|
3D Render engine, written in 100% Python, No external libraries. *EPILEPSY WARNING*
|
EDIT: I have fixed the flickering issue! As long as you use the latest version there should be no flickering at all!
Video of it running: [https://youtu.be/7J2Pn8me7m8](https://youtu.be/7J2Pn8me7m8)
Github link: [https://github.com/E-Parker/Terminal-3D-Render/releases](https://github.com/E-Parker/Terminal-3D-Render/releases)
I've been working on this for a little while, it's a simple 3D render engine that uses only the built-in python libraries.
NOTE: If you suffer from any conditions that cause sensitivity to flashing lights do not use PREVIOUS versions of this program. The latest version is safe and free of flickering.Because the print command is very slow sometimes the screen will refresh before python is done drawing the frame, this causes the image to flicker occasionally. The effect worsens the faster your monitor's refresh rate is.
The features of this version are:- BMP decoding
\- OBJ decoding
\- Perspective Texture mapping
\- Depth buffer
\- Simple directional lighting
\- 231 colours!
I don't think there is much to be learned from this other than how not to write a render engine, I spent a lot of time working out how to do things like decoding .bmp files when there are already solutions that are way faster and much less of a pain to work with. This was mostly an exercise to see how far I could go without any tools.
Also, do keep in mind this is the 4th project I've made with python, I'm not super experienced so don't expect the code to be very good-looking.
| 0.93 |
t3_tpv7hs
| 1,648,421,114 |
Python
|
How did your coding style in python change after you learned another language?
|
Different languages make you write different code, but im curious if the way you wrote python changed due to coding in another language!
| 0.96 |
t3_tpu9p2
| 1,648,418,231 |
Python
|
Build signed .aab with Kivy, Buildozer for Google Play Store (Windows & ...
|
nan
| 0.67 |
t3_tppdqx
| 1,648,404,134 |
Python
|
Made a Flask boilerplate using a services oriented structure
|
nan
| 0.89 |
t3_tpp9y4
| 1,648,403,841 |
Python
|
Apilytics open-source middleware available for Flask! Install in 5 minutes and visualize all important metrics from your Flask backend
|
nan
| 0.66 |
t3_tpntm0
| 1,648,399,539 |
Python
|
Actionable Notification with Callback in Python
|
nan
| 0.81 |
t3_tpmfni
| 1,648,395,499 |
Python
|
Django 4 0 with Amazon RDS & Elastic Beanstalk Full Course
|
nan
| 0.74 |
t3_tpky84
| 1,648,390,913 |
Python
|
Improved version of Al Sweigart's swordfish program
|
Yesterday, I worked on improving Al Sweigart's *swordfish* program to limit to three the attempts a user can input their name and password. I'm proud of my work, although I ran into several bugs which left me scratching my head for a while. A big Thank You to Al for writing such a good introduction to Python!
https://preview.redd.it/lldmgux5nxp81.png?width=1494&format=png&auto=webp&s=1a881647b5ffd69fc9b2c921db059c636ca15d2b
| 0.66 |
t3_tpkr49
| 1,648,390,282 |
Python
|
Learn Blockchain Concepts Practically With Python
|
nan
| 0.37 |
t3_tpjodl
| 1,648,386,792 |
Python
|
PYVAULT - PYVAULT is a python program with which you can secure your precious passwords very easily.
|
Hi guys. So, I have made a python script which can store your passwords in a database and you can encrypt it with a secret key which is generated by the script only. Actually, with this , we can store our passwords pretty securely until our key is exposed.
So, I have used -
i. sqlite3 (Used for database)
ii. cryptograhy (To work with encryption and decryption using the key)
These are the libraries.
I used fernet to generate the key and to encrypt and decrypt the passwords and storing it in the database.
The script provides a list of options -
i. Create a database
ii. Work with previous database
iii. Generate key
iv. Load key
v. Retrive passwords
You can see the code here - [https://github.com/Shreejan-35/PYVAULT/](https://github.com/Shreejan-35/PYVAULT/)
All the contribution are welcome.
I have done the project by learning from a video about password manager from a youtube channel - neuralnine. But, I worked with database and tried to take it to some advance steps.
&#x200B;
Edit 1:
Guys I have uploaded this as a package on [pypi.org](https://pypi.org) as vaulter-py.
You can install it by typing -
**pip install vaulter-py**
&#x200B;
Thanks
| 0.33 |
t3_tpic7y
| 1,648,381,816 |
Python
|
python-nbxmpp 2.0.6 out!
|
nan
| 0.6 |
t3_tpi6fh
| 1,648,381,174 |
Python
|
Backtesting A Put Option With An Example Of A Sell Put
|
Here's a simple post for people looking to try to backtest a put option strategy, or even a sell put strategy. I did this up because I was trying to look at a stock with a favorable put premium, and wanted to see based on a historical basis what are the chances of profit if I kept selling puts on these underlying at that premium
[https://medium.com/@derivativestester/backtesting-a-vanilla-put-option-or-warrant-on-python-eec3ebaea5b](https://medium.com/@derivativestester/backtesting-a-vanilla-put-option-or-warrant-on-python-eec3ebaea5b)
Hope that helps.
Thanks.
| 0.63 |
t3_tpggqk
| 1,648,373,495 |
Python
|
I made a Python program that AUTOMATICALLY edits YouTube Videos!
|
https://youtu.be/WYiKb5Ggtjc
| 0.9 |
t3_tpgeiw
| 1,648,373,209 |
Python
|
I've created a extension for the Tornado framework that makes working with the framework easier and code development faster.
|
The extension is located in the [PyPi](https://pypi.org/project/usernado/) and you can easily install and use it. But the documentation and doc strings are not complete. This can be a good starting point if you want to [participate in open source](https://github.com/reganto/Usernado/issues).
Install it via pip: `pip install usernado`
Check it out here: [https://github.com/reganto/usernado](https://github.com/reganto/Usernado)
Thank you for your attention.
| 0.74 |
t3_tpfzq3
| 1,648,371,196 |
Python
|
Using Python and Django, I've built to a GPT-3 powered web application to help myself write better
|
I am good in writing in my native language but when it comes to my second language, sometimes I struggle. So, for this reason, using Python and Django, I've built to a GPT-3 powered web application to help myself write better.
I've been using it for a while and it is working so good!
[https://www.youtube.com/watch?v=mfzW-LDajog](https://www.youtube.com/watch?v=mfzW-LDajog)
Looking forward to your feedback.
Best,
| 0.55 |
t3_tpb1qd
| 1,648,349,987 |
Python
|
I made my first gui program!
|
I finally made a gui using tkinter. Its a super simple program that takes in an image and then makes it into text art using the braille unicode characters. You can specify the final dimensions of the characters. Also you can control how sensitive it is. Seemed like a fun thing to try!
Not many ive told have been interested or understood so I thought I should try here.
[https://imgur.com/gallery/kMth4Cn](https://imgur.com/gallery/kMth4Cn)
For those curious Ill explain my process
I use tkinter to make a menu with all the settings and when you click generate it runs my image algorithm
The algorithm is pretty simple and uses pillow
Using pillow I get an image and convert it to black and white
Then I use two for loops to go through the grid of data. It starts and the 0,0 pixel. It then grabs a 2 wide and 3 tall chunk of values. If the values are above the contrast value they are then set to a 1, else its a 0.
Then I reorganize the list of values of a chunk into a binary number. This is because the unicode counts up in binary. So once i arrange all the numbers to their binary number. I just convert that number to the unicode character. Then i save that chunk to a list. I do this for ever chunk on that layer. It then moves down and repeats until we have a matrix of braille characters.
Finally it just prints those arrays to a txt file
The image kinda depends on how the text is displayed. On windows its inconsistent based on the zoom, certain levels of zoom cause distortions.
Sorry if this didn't make sense I tried my best to explain for those interested. Thank you for reading!
| 0.86 |
t3_tpak0x
| 1,648,348,186 |
Python
|
Tools for designing hardware in Python
|
Any hardware designers here who use Python for designing hardware? There are a bunch of libraries that all seem promising [MyHDL](https://www.myhdl.org/), [PyRTL](https://github.com/UCSBarchlab/PyRTL), [PyVerilog](https://github.com/PyHDI/Pyverilog), [PyLog](https://github.com/hst10/pylog), [PyMTL3](https://github.com/pymtl/pymtl3), ... All seem to work roughly the same. Write code in Python and transpile it to VHDL/Verilog. Which of these are popular and well-maintained? MyHDL looks good but it's last release was 0.10 in 2018 and for hardware design you don't want to rely on 0.x software. Anything like Chisel for Python.
| 0.83 |
t3_tpa4eo
| 1,648,346,641 |
Python
|
Sunday Daily Thread: What's everyone working on this week?
|
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
| 1 |
t3_tp7ye1
| 1,648,339,210 |
Python
|
Live video to ascii
|
Hi!
&#x200B;
First time posting, this is a small passion project which I coded in my free time.
[https://github.com/DSERIOUSGUY/whoami.git](https://github.com/DSERIOUSGUY/whoami.git)
It basically converts Image/live video to ascii art (can save as Image or text) using openCV.
Currently it does not save video and only supports black/white and white/black coloring(my initial goal was to make it look a bit retro - if that makes any sense).
I would love to hear your suggestions on how it could be improved on and what features could be added!
Edit: Attached are samples of all modes (all are captured at different moments)
&#x200B;
[Video](https://preview.redd.it/19cpror02tp81.png?width=602&format=png&auto=webp&s=dd17430640f30d8c886c6ff79b42551a95de7841)
Since I don't really care about latency for an image, higher resolution is used as compared to video.
[Image](https://preview.redd.it/f5ufsr6g2tp81.png?width=1920&format=png&auto=webp&s=c8a52f4e27abdba583f2001d535e16bc19b6c1f5)
&#x200B;
A higher resolution image spreads out too much to be viewed as a picture, so had lower the resolution before writing the file
[Text](https://preview.redd.it/9vb45izl2tp81.png?width=1920&format=png&auto=webp&s=ae36fb691f1ca9734b48cc3bdcc7ea36ae5f7f28)
| 0.8 |
t3_tp684n
| 1,648,333,884 |
Python
|
toolgui: A modular event-driven GUI system for quickly building tools with Python and pyimgui.
|
nan
| 0.91 |
t3_tp50ru
| 1,648,331,504 |
Python
|
Arcade version 2.6.13 has been released
|
Arcade, a 2D graphics library, has released version 2.6.13.
[https://api.arcade.academy/en/latest/development/release\_notes.html](https://api.arcade.academy/en/latest/development/release_notes.html)
&#x200B;
* New Features
* Arcade can now run in headless mode on linux servers **opening more possibilities for users in for example the data science** community ([\#1107](https://github.com/pythonarcade/arcade/issues/1107)). See [Headless Arcade](https://api.arcade.academy/en/latest/advanced/headless.html#headless) for more information.
* Bugfixes
* The random text glitching issue especially affecting users with iGPUs is finally resolved in pyglet. For that reason we have upgraded to the pyglet 2.0a2 release.
* Fixed an issue causing [arcade.draw\_circle\_filled()](https://api.arcade.academy/en/latest/api/drawing_primitives.html#arcade.draw_circle_filled) and [arcade.draw\_circle\_outline()](https://api.arcade.academy/en/latest/api/drawing_primitives.html#arcade.draw_circle_outline) to always render with 3 segments on some iGPUs.
* Fixed an issue causing interactive widgets to unnecessarily re-draw when hovering or pressing them. This could cause performance issues.
* SectionManagerโs on\_show\_view
was never called when showing a view
* Various Improvements
* [arcade.load\_font()](https://api.arcade.academy/en/latest/api/text_pyglet.html#arcade.load_font) now supports resource handles
* [PhysicsEngineSimple](https://api.arcade.academy/en/latest/api/physics_engines.html#arcade.PhysicsEngineSimple) can now take an iterable of wall spritelists
* Sprite creation is now \~6-8% faster.
* Removed warning about missing shapely on startup
* Window titles are now optional. If no window title is specified the title will be the absolute path to the python file it was created in. This was changed because of the new headless mode.
* Removed arcade.quick\_run
. This function had no useful purpose.
* Added clear method to UIManager ([\#1116](https://github.com/pythonarcade/arcade/pull/1116))
* Updated from Pillow 9.0.0 to 9.0.1
* Tilemap
* Rectangle objects which are empty(have no width or height) will now be automatically converted into single points.
* The Tile ID of a sprite can be access with sprite.properties\["tile\_id"\]
. This refers to the local ID of the tile within the Tileset. This value can be used to get the tile info for a given Sprite created from loading a tilemap.
* Docs
* Added python version support info to install instructions ([\#1122](https://github.com/pythonarcade/arcade/pull/1122))
* Fixed typo in [append\_texture()](https://api.arcade.academy/en/latest/api/sprites.html#arcade.Sprite.append_texture) docstring([\#1126](https://github.com/pythonarcade/arcade/pull/1126))
* Improved the raycasting tutorial ([\#1124](https://github.com/pythonarcade/arcade/issues/1124))
* Replace mentions of 3.6 on Linux install page ([\#1129](https://github.com/pythonarcade/arcade/pull/1129))
* Fix broken links in the homepage ([\#1139](https://github.com/pythonarcade/arcade/pull/1130))
* Lots of other improvements to docstrings throughout the code base
* General documentation improvements
* OpenGL
* [arcade.gl.Geometry](https://api.arcade.academy/en/latest/gl/geometry.html#arcade.gl.Geometry) now supports transforming to multiple buffers.
* Added and improved examples in experimental/examples
* Major improvements to API docs
Special thanks to [Mohammad Ibrahim](https://github.com/Ibrahim2750mi), [pushfoo](https://github.com/pushfoo), [Alejandro Casanovas](https://github.com/janscas), [Maic Siemering](https://github.com/eruvanos), [Cleptomania](https://github.com/Cleptomania), [pvcraven](https://github.com/pvcraven) and [einarf](https://github.com/einarf) for their contributions to this release. Also, thanks to everyone on the Pyglet team! We depend heavily on Pygletโs continued development.
| 0.83 |
t3_tp4o3d
| 1,648,330,422 |
Python
|
Why is Python so popular?
|
I am sorry if this is provocative to anyone, but personally I can't stand Python. I hate the indentations, Python is slow, no private keyword in OOP, dynamically typed ...
Obviously I can see that it has its reasons to be popular in certain areas like data science. But why in the world in the backend for production level code? Please actually explain to me why you think Python is great from a software engineering perspective. I am coming from C# and simply cannot see any advantages in Python.
| 0.26 |
t3_tp3od4
| 1,648,327,393 |
Python
|
Space Science with Python - AI 1-9: A Convolutional Approach
|
Hey everyone,
the asteroid reflectance spectra project reaches almost its end. There are 5 more videos to come and then I will focus on another topic (Near-Earth Objects).
Anyway, spectra are still amazing and I show in today's session how to conduct an ML multi-class classification experiment using keras and Conv1D layers.
You may thing: "well... creating a Deep Learning architecture is like magic". You are right. A few blueprints help one to get an idea how an architecture may look like. But improving e.g., the number of filters, layers, activations functions etc. is something that MUST be automatized. To tackle this, the next session will show "Keras Tuner" to automatize exactly this!
Hope you still enjoy the combination of Space - Python - ML and I am looking forward to chat with you either here or on [Twitter](https://twitter.com/MrAstroThomas).
GitHub: [https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/9\_dl\_convnet\_multiclass.ipynb](https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/9_dl_convnet_multiclass.ipynb)
YouTube: [https://www.youtube.com/watch?v=648XF1o0B3c](https://www.youtube.com/watch?v=648XF1o0B3c)
Cheers,
Thomas
| 0.71 |
t3_tp0vo1
| 1,648,322,880 |
Python
|
Show r/python: Sailor - a tiny PaaS to install on your servers/VPS that uses git push to deploy micro-apps, micro-services, sites with SSL, on your own servers or VPS
|
Hey Pythonistas, here's a tool that I would like to share with y'all that allows you deploy multiple apps on servers/VPS. Let me know what you think and some feedback or what you would like to see in it.
Introducing, Sailor. [https://github.com/mardix/sailor](https://github.com/mardix/sailor)
**Sailor** is a tiny **PaaS** to install on your servers/VPS (DigitalOcean, Hetzner, Linode).
It uses git push to deploy micro-apps, micro-services and sites.
It natively supports Python, Nodejs, Static sites, and any other languages that can use the command line.
Sites deployed with **Sailor** automatically have SSL assigned with LetsEncrypt.
**Sailor** can run long-running background workers and cron jobs.
It allows you to deploy multiple sites/apps using a single repository.
It gives you the option of having testing/staging/production environment deployed from the same codebase.
**Sailor** lets you see some stats about your apps, along with scaling them.
**Sailor** makes deploying apps a smooth sailing.
*Ship it like a* ***Sailor!***
[https://github.com/mardix/sailor](https://github.com/mardix/sailor)
| 0.57 |
t3_tozhrt
| 1,648,318,743 |
Python
|
Interview with a Postdoc, Junior Python Developer in 2022
|
nan
| 0.93 |
t3_toy9gu
| 1,648,315,157 |
Python
|
What is the most pythonic way to limit while loop iterations?
|
Hi all
Whenever I write a while loop, I always want to limit the number of iterations it can run to avoid infinite loops while developing the program, what would the most pythonic way of doing that?
theres obviously the basic
n = 0
while condition and n < 100:
n += 1
but the `n+=1` can easily get lost or commented out when you are working on the code
Ive also tried
def count_generator():
n = 0
while True:
yield n
n += 1
counter = count_generator()
while condition and next(counter) < 100:
or
class Counter:
def __init__(self):
self.count = 0
def inc(self):
self.count += 1
return self.count
counter = Counter()
while condition and counter.inc() < 100:
both of these feel like a lot of boiler plate for what should be a simple task, is there anything better?
| 0.79 |
t3_towbf7
| 1,648,311,909 |
Python
|
Image Processing With the Python Pillow Library โ Real Python
|
nan
| 0.84 |
t3_tov052
| 1,648,310,781 |
Python
|
oCrypt0r - AES encryption library
|
Hello everyone!
I have decided to for the first time, try my hand at making an encryption package/library. It uses salted AES encryption.
As of right now, I'm not sure what else to add to it or do as I have everything pretty much covered in terms of what could be encrypted. From just normal messages/strings to files and directories/folders.
I hope you all like it or at least get some use out of it!
Here is my github repo and PyPi link:
- [GitHub - oCrypt0r](https://github.com/therealOri/oCrypt0r)
- [PyPi - oCrypt0r](https://pypi.org/project/oCrypt0r/)
| 0.56 |
t3_tosyou
| 1,648,308,863 |
Python
|
PIPELY - new lightweight pipeline library
|
hey there, just released a new version of `pipely` \- a lightweight pipeline library that can trigger any sequence of classes in any order.
# Simple Example:
create `collect.yaml`
steps:
a1_print:
exec: src/file1.py:firstA
a2_print:
exec: src/file1.py:secondA
final_print:
exec: src/file2.py:printDone
depends_on:
- a1_print
- a2_print
`depends_on` parameter sets the following order for pipely:
1. firstly it parallelly executes `firstA` and `secondA` classes (`a1_print` and `a2_print` steps) from file `src/file1.py`
2. and then executes `printDone` class (step `final_print`) from file `src/file2.py`
It also allows **value transformations** between classes and other cool things.
Check out [https://pypi.org/project/pipely/](https://pypi.org/project/pipely/) for more info, and let me know your feedback!
This is just a pet project I had during my free lunch time :)
| 0.64 |
t3_tosvcq
| 1,648,308,584 |
Python
|
Simple Key Event Sending to an Application Wrapper I made
|
I made a Python library to send inputs to an executable, useful for scenarios such as having a neural network send decisions to a game. Essentially a wrapper around the win32api.
You can send events to a window in just 2 lines:
hwnd = pyinput.get_handle(window_name) # Gets the handle
pyinput.press_key(hwnd, pyinputkeycodes.VK_RETURN) # Sends Return key
I got annoyed at doing boilerplate over and over for this so I made a quick library!
[https://github.com/GaryFrazier/PyInput](https://github.com/GaryFrazier/PyInput)
| 0.75 |
t3_toryjt
| 1,648,305,770 |
Python
|
Encrypto - A simple way of complicating/encrypting data
|
This is a repost I made to fit community guidelines.
*Meet Encrypto, a revolutionary technology that can protect your data from the government **(Joke Intended)** and prevent the Feds from understanding your text.*
The code itself does a simple task. When asked to encrypt data, it will generate two random keys. One till be used for the Caesar Cipher offset and the other defines how many times the symmetric algorithm is run. This will give out a gibberish looking string, which is then converted into a BrainF\*\*k *like* looking code. Wrong keys during decryption will give you the erroneous data.
Note that since each character is encoded with 8-characters, and that the Base64 encryption happens multiple times, file size may skyrocket.
I visualized this concept a long time ago, but spent some months completely understanding Python and the logic required (Encryption types, etc.). This code was designed to mimic the Enigma machine with its separate codes for different encryption types.
Here's the link to the code:
https://github.com/Programmer-X31/Encrypto.git
Please give me your comments and give your ideas for what I should base the *third key* on.
| 0.67 |
t3_tonad8
| 1,648,296,993 |
Python
|
Creating mp4 clips with soccer data and Python
|
Hi Pythonistas! Iโve updated my package to allow users to creat mp4 clips of soccer data. Here is the short tutorial I wrote up on how to use it: https://todofootballclub.com/?p=1056.
Iโve also run into an issue of wanting to use latitude and longitude data in the future but realized there is a learning curve with trans Mercator projections and other things to do it. Iโm curious if anyone has ever started a project and realized โoh wow, thereโs more to this than I thoughtโ?
| 0.9 |
t3_tomsiv
| 1,648,295,093 |
Python
|
NiceScaler update 1.3.0
|
&#x200B;
[GUI](https://preview.redd.it/gogk3hgavop81.png?width=2790&format=png&auto=webp&s=31396204dac0bb003f7ff7920a4c4555bf15109c)
[example upscale](https://preview.redd.it/q9nwpoz8vop81.jpg?width=2486&format=pjpg&auto=webp&s=955eb9817ddc84a6d9392b00cf67d11b35577253)
Itch -> [https://jangystudio.itch.io/nicescaler](https://jangystudio.itch.io/nicescaler)
Github -> [https://github.com/Djdefrag/NiceScaler/releases/tag/1.3.0](https://github.com/Djdefrag/NiceScaler/releases/tag/1.3.0)
&#x200B;
update 1.3.0 (26.03.2022)
OpenCL backend / UX improvement / Speed improvement
New feature
* GPU OpenCL backend (to use GPU horsepower to upscale)
* support for more images and video file types
Improvements
* updated Python (3.7.9 -> 3.9.10)
* bugfix in AI model creation (speed boost \~10% with all models)
* deleted EDSR model (lighter .exe 110Mb -> 70Mb)
* general code cleanup
UX
* deleted EDSR model button
* new colors for left bar
* new button to select OpenCL backend
* removed AI models info under buttons
* removed NiceScaler icon
* added Github button
* drag&drop space cleaning
| 0.93 |
t3_tok71u
| 1,648,283,523 |
Python
|
The Oregon Trail
|
How many have ever played The Oregon Trail? I remember playing it in my later days of High School. Not the video game but the teletype version. I just ported over the original version from Fortran to Python.
If you want to read out the different parts of the port or even get the source here are some links:
[https://keithmfoster.com/the-oregon-trail/](https://keithmfoster.com/the-oregon-trail/)
[Github Repository](https://github.com/KeithMFoster/the-oregon-trail)
Happy Trails.
| 0.93 |
t3_toa6c6
| 1,648,256,653 |
Python
|
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
|
Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?
Use this thread to chat about and share Python resources!
| 0.75 |
t3_to8lbi
| 1,648,252,810 |
Python
|
What's the dumbest, trivial, shoddily-written project you've made that somehow impressed a non-programmer?
|
I wrote a script that grabs an Overwatch screenshot, tries to recognize whatever hero portraits are present on the tab screen, then copies some text making hero suggestions into your clipboard. I'm 90% certain that the one person in the hiring process that sounded impressed when I mentioned it didn't actually look at it, because I got hired to try automating website tests with Selenium.
(Note: I've long since taken this script down as it's in kind of a grey area with Blizzard's TOS)
| 0.93 |
t3_to8jhz
| 1,648,252,736 |
Python
|
AI Project Ideas
|
Hi everyone,
I need to make an AI project with full-fledged programming ... it has to be based on a social issue nd focused mainly on the data science domain. Does anyone have any suggestions for an idea that can be implemented using AI? I'm open to anything as it's a group project and we're mainly putting forth any ideas right now at the start and will start ruling out to a final within a few days
| 0.85 |
t3_to33to
| 1,648,246,367 |
Python
|
pointers.py - segmentation faults in python
|
nan
| 0.69 |
t3_tnz5uw
| 1,648,242,515 |
Python
|
Kids Learn to Code in Python with the Raspberry Pi Foundation
|
nan
| 0.88 |
t3_tnw8zx
| 1,648,234,236 |
Python
|
I've built a wrapper that makes building Telegram Bots a lot easier
|
It's called **MATE** (*Easy Telegram Application Maker*, but reversed lol) and it automatically handles the boring under the hood stuff, letting you focus on the logic of your app.
It comes with (fairly) complete **documentation** & a **PyPI** release.
check it out here: [https://github.com/SudoOmbro/MATE](https://github.com/SudoOmbro/MATE)
Tell me what you think!
Thank you for your time :\^)
| 0.87 |
t3_tnsarp
| 1,648,229,199 |
Python
|
I Made a Hangman Game with Music, Light Artwork, and Sound Effects (GitHub Repo Below)
|
As my first python project, I decided to create a hangman game with music, light artwork, and sound effects.
After completing PY4E on Coursera, I decided to create a program that combined all elements from the course. In all, it uses urllib for web scraping, sqlite3 to create and manage the leaderboard and wordbank, colorama for color, and playsound for sound.
There are also "Classic" and "Hardcore" modes. Classic operates as hangman traditionally works, and hardcore mode gives the user 8 seconds for input before subtracting a life and adding a part to the hangman.
I started python in January, and it feels great to have actually created something!
Here is the Github link: [https://github.com/DaSaltyPancake/Hangman.git](https://github.com/DaSaltyPancake/Hangman.git)
| 0.89 |
t3_tns9go
| 1,648,229,099 |
Python
|
A free and flexible translation library in python
|
Hi y all,
*I'm not making this post only to promote the project. I also want to invite contributors and get feedback.*
Feel free to check the GitHub [repo here](https://github.com/nidhaloff/deep-translator)
deep-translator is a flexible and **free** translation library that supports multiple translators.
I tried to make the API as consistent as possible so that it can be updated easily in the future. We fixed some bugs and added new features in the new releases.
Since I don't have much time, I'm looking for maintainers & contributors, who want to join the project. Feel free to contact me if you are interested. You don't have to be a python professional, I want to help people make their first contribution and join the open-source world.
| 0.81 |
t3_tnp85j
| 1,648,224,421 |
Python
|
GitHub - Rog3rSm1th/Frelatage: The Python Fuzzer that the world deserves
|
nan
| 0.43 |
t3_tnovr2
| 1,648,223,456 |
Python
|
Python Selenium Tutorial #6 - Bypass Detection using plugins, settings & proxies
|
nan
| 0.8 |
t3_tnmxy8
| 1,648,217,926 |
Python
|
Python - LinkedIn Skill Assessments Quizzes with Answers | MeshWorld
|
nan
| 0.3 |
t3_tnljc5
| 1,648,213,623 |
Python
|
Python Pub/Sub
|
Let's see how far this rabbit hole goes. It's late evening. I started reading up on networking. It's 2am. Let's see how Redis implements pub/sub under the hood. Basically, I ended up writing my own pub/sub implementation in Python:
[https://github.com/Salaah01/py-pub-sub/blob/master/server/server.py](https://github.com/Salaah01/py-pub-sub/blob/master/server/server.py)
&#x200B;
https://i.redd.it/u867y09txip81.gif
| 0.6 |
t3_tnkxf3
| 1,648,211,635 |
Python
|
Value objects with Python
|
Hello r/Python
This is my first post here.
I created a blog post about value objects with Python.
[https://blog.szymonmiks.pl/p/value-objects-with-python/](https://blog.szymonmiks.pl/p/value-objects-with-python/)
&#x200B;
Code examples are available on my GitHub [https://github.com/szymon6927/szymonmiks.pl/tree/master/blog/content/post/06-value-objects-with-python/value-object-examples](https://github.com/szymon6927/szymonmiks.pl/tree/master/blog/content/post/06-value-objects-with-python/value-object-examples).
I hope you will enjoy it. I would love to hear your opinion
| 0.6 |
t3_tnk6p3
| 1,648,209,000 |
Python
|
Ethereum Price Email Alerts With Python
|
nan
| 0.13 |
t3_tnjf86
| 1,648,206,202 |
Python
|
Reactivex like operators that can be used directly on async iterables
|
I'm a fan of the [operators](https://rxpy.readthedocs.io/en/latest/reference_operators.html) available in ReactiveX. I'm not a fan of observables, and all the other cruft that comes with using reactivex. I would much rather be writing async generators, and using them in async for loops.
So I've started writing a library that implements the operators typically found in Reactivex libraries, and I'm posting it here for some early feedback.
Source: [https://github.com/garyvdm/aiterx](https://github.com/garyvdm/aiterx)
Example:
>>> from asyncio import run, sleep
>>> from aiterx import debounce
>>>
>>> async def source():
... yield 1
... await sleep(0.2)
... yield 2
... await sleep(0.1)
... yield 3
... await sleep(0.1)
... yield 4
... await sleep(0.2)
... yield 5
...
>>> async def test_debounce():
... async for item in debounce(source(), 0.15):
... print(item)
...
>>> run(test_debounce())
1
4
5
Have I missed some existing library that does what I need? I did looked at these before I started:
* [rxpy](https://rxpy.readthedocs.io/en/latest/)
* [aioreactive](https://github.com/dbrattli/aioreactive)
* [async-rx](https://geronimo-iia.github.io/async-rx/)
Any feedback on the work I have done so far?
| 0.78 |
t3_tnifu4
| 1,648,202,004 |
Python
|
Scrape Google Top Carousel Results in Python
|
Full code:
```python
import requests, lxml, re, json
from parsel import Selector
# https://docs.python-requests.org/en/master/user/quickstart/#custom-headers
headers = {
"User-agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.83 Safari/537.36"
}
params = {
"q": "dune actors", # search query
"gl": "us", # country to search from
}
def parsel_get_top_carousel():
html = requests.get('https://www.google.com/search', headers=headers, params=params)
selector = Selector(text=html.text)
carousel_name = selector.css(".yKMVIe::text").get()
all_script_tags = selector.css("script::text").getall()
data = {f"{carousel_name}": []}
decoded_thumbnails = []
for _id in selector.css("img.d7ENZc::attr(id)").getall():
# https://regex101.com/r/YGtoJn/1
thumbnails = re.findall(r"var\s?s=\'([^']+)\'\;var\s?ii\=\['{_id}'\];".format(_id=_id), str(all_script_tags))
thumbnail = [
bytes(bytes(img, "ascii").decode("unicode-escape"), "ascii").decode("unicode-escape") for img in thumbnails
]
decoded_thumbnails.append("".join(thumbnail))
for result, image in zip(selector.css('.QjXCXd.X8kvh'), decoded_thumbnails):
title = result.css(".JjtOHd::text").get()
link = f"https://www.google.com{result.css('.QjXCXd div a::attr(href)').get()}"
extensions = result.css(".ellip.AqEFvb::text").getall()
if title and link and extensions is not None:
data[carousel_name].append({
"title": title,
"link": link,
"extensions": extensions,
"thumbnail": image
})
print(json.dumps(data, indent=2, ensure_ascii=False))
```
Blog post with more explanation: https://serpapi.com/blog/scrape-google-carousel-results-with-python/
| 1 |
t3_tngota
| 1,648,193,728 |
Python
|
Build a Word Guessing Game in Python [video + source code]
|
Here is the link for the video :
[https://youtu.be/M1t4RJ5XRHE](https://youtu.be/M1t4RJ5XRHE)
Here is the link for the source code :
[Word-Guessing-Game/wordgame.py at main ยท The-Nerdy-Dev/Word-Guessing-Game (github.com)](https://github.com/The-Nerdy-Dev/Word-Guessing-Game/blob/main/wordgame.py)
| 0.72 |
t3_tngfjr
| 1,648,192,532 |
Python
|
Build your own Feature Rich J.A.R.V.I.S in Python - Python Project
|
nan
| 0.67 |
t3_tngd7q
| 1,648,192,249 |
Python
|
Meta donates $300,000 to the Python Software Foundation
|
nan
| 0.91 |
t3_tnfh9l
| 1,648,188,306 |
Python
|
Friday Daily Thread: Free chat Friday! Daily Thread
|
Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted!
| 1 |
t3_tn96gz
| 1,648,166,410 |
Python
|
Python for AWS Lambda Functions: A Beginner's Guide and Tutorial
|
[https://codesolid.com/python-and-aws-lambda-functions](https://codesolid.com/python-and-aws-lambda-functions/)
I just finished this -- it's very much focused on Python developers who may not have written an AWS Lambda function before and are wondering what all the fuss is about. Enjoy!
| 0.87 |
t3_tn7qfv
| 1,648,162,106 |
Python
|
A simple python3 script to keep 2 folders synced
|
Hi r/Python, I'm here today to showcase a project that I've developed to experiment with python, github, ci/cd best practices and pytest.I'm not really a beginner, I've been coding in python for a while now (I'm a junior GCP developer). This post is just a request for feedback and/or suggestion on how to improve from more experienced python developers. Here is the repo : [https://github.com/davideolgiati/raidify](https://github.com/davideolgiati/raidify), feel free to open an issue on bug and suggested enhancements.
| 0.79 |
t3_tn733z
| 1,648,160,259 |
Python
|
Guido van Rossum on Twitter: It's happening! BPO is migrating to GitHub tomorrow.
|
nan
| 0.95 |
t3_tn4lyj
| 1,648,155,805 |
Python
|
Is Spock-Config the only tool that integrates object-oriented config files and command-line interfaces?
|
[Spock-Config](https://github.com/fidelity/spock) allows one to create OO configuration files. That's how I roll. I currently use [PYdantic settings](https://pydantic-docs.helpmanual.io/usage/settings/) and it's great. But it does not offer command-line re-configuration of what you have in the OO config file.
Sure you could manually do all the mappings yourself. But that's why I like spock.
What I dont like about Spock is that [there is already another PyPI package with that same top-level-namespace](https://github.com/fidelity/spock/issues/235) ... why does PyPI even allow that? What would I do if I wanted to use both in the same project???
### So somebody rock my world
Tell me about an alternative. [Plumbum](https://plumbum.readthedocs.io/en/latest/cli.html) kinda-sorta fits the bill.... but it really is just OO CLI development.
| 0.75 |
t3_tmz4yi
| 1,648,150,974 |
Python
|
Performance: SQLAlchemy vs Django vs EdgeDB
|
nan
| 0.64 |
t3_tmqev6
| 1,648,143,624 |
Python
|
IDE-style autocomplete that integrates with Python tools (pip, pyenv, etc)
|
&#x200B;
https://reddit.com/link/tmleui/video/r3kh3f0pycp81/player
| 0.82 |
t3_tmleui
| 1,648,139,283 |
Python
|
Github - Multiplatform (arm7, arm64, amd64) Docker Image for Celery with precompiled gevent
|
nan
| 0.75 |
t3_tmcp8z
| 1,648,131,220 |
Python
|
Animating a Sprite Sheet in Python w/ PyGame
|
nan
| 0.8 |
t3_tmbg9f
| 1,648,129,996 |
Python
|
How to create a digital clock with python easily
|
This tutorial is about creating a project using python language. Iโm going to show you how to create a digital clock with Python. Before reading the article, if you like to know more about Python, you could check out these two important articles:
* [Why should I learn Python?](https://progskillss.com/why-should-i-learn-python)
* [How to learn Python?](https://progskillss.com/how-to-learn-python-programming)
This project is suitable for beginners. To write the code, you need to know how to use modules in Python. Two necessary modules that I use in this project are Tkinter and time. Tkinter is a GUI library that helps you develop a graphical user interface for the digital clock, and using the time module; you could get the current time, date, timezone, etc. Letโs dive deep into these modules.
If you want to read more about this project, you could click on the following link:
[https://progskillss.com/how-to-create-a-digital-clock-with-python](https://progskillss.com/how-to-create-a-digital-clock-with-python)
| 0.57 |
t3_tmabdm
| 1,648,128,741 |
Python
|
OpenTelemetry and Python: A Complete Instrumentation Guide
|
A blog post exploring how to instrument a Python application to emit tracing data (metric and log data interfaces are not stable quite yet). It examines:
* How auto-instrumentation of the same codebase works.
* The differences with manual instrumentation.
* How to mix manual instrumentation with auto-instrumentation.
* How to add information about exceptions.
Here's the link: [https://www.timescale.com/blog/opentelemetry-and-python-a-complete-instrumentation-guide/](https://www.timescale.com/blog/opentelemetry-and-python-a-complete-instrumentation-guide/)
| 0.92 |
t3_tm8jte
| 1,648,127,261 |
Python
|
Web2py Framework in Python
|
nan
| 0.6 |
t3_tm3sxx
| 1,648,121,398 |
Python
|
Tree Traversal Algorithms in Python-InsideAIML
|
nan
| 0.67 |
t3_tm3jvl
| 1,648,120,520 |
Python
|
Scientific computation using NumPy library
|
nan
| 0.43 |
t3_tm30b4
| 1,648,118,458 |
Python
|
Learn Python yield interactively from your browser!
|
nan
| 0.67 |
t3_tm2yyc
| 1,648,118,307 |
Python
|
RaViewer: parsing and displaying binary data straight from camera (made with Dear PyGui)
|
&#x200B;
[RaViewer screenshot](https://preview.redd.it/6e3n26fe7bp81.png?width=1220&format=png&auto=webp&s=9163087922bf30b0038e173e9290d6b56fa9f586)
[RaViewer demo](https://i.redd.it/s4m2bmsa7bp81.gif)
[RaViewer](https://github.com/antmicro/raviewer) is an open-source utility dedicated to parsing and displaying binary data acquired straight from camera. After opening a binary image, you can specify the color format, the image size and append or remove n bytes from the beginning of the image series. The binary image will be processed and shown based on these values. You can control which color channels are displayed and zoom in and out. For detailed information, you can view the hexadecimal pixel values in table format. The resulting image can be exported entirely or just a selected part to more complex formats (JPEG, PNG) or raw data. The source code is available in the project's [GitHub repository](https://github.com/antmicro/raviewer).
You can read more about RaViewer in this [article](https://antmicro.com/blog/2021/11/raviewer-open-source-tool-for-debugging-video-pipelines/) by [antmicro](https://antmicro.com/).
Made with Python and the GUI was created with [Dear PyGui](https://github.com/hoffstadt/DearPyGui/wiki/Dear-PyGui-Showcase).
| 0.87 |
t3_tm2wb6
| 1,648,118,019 |
Python
|
httpx worked fine for me... any reason to consider urllib3?
|
I've found [httpx](https://www.python-httpx.org/) to be very approachable for my API consumption tasks and less wordy than [urllib3](https://urllib3.readthedocs.io/).
Do you have a preference for API consumption (perhaps requests) and why?
| 0.67 |
t3_tm1grs
| 1,648,111,891 |
Python
|
I created a Python Script to find out Broken links by scanning entire WordPress Website
|
I created a Python script to check links in all the WordPress posts to find out broken ones. I tried creating this after learning multi-threading based, I had this idea for so long because other broken link checking software such as SiteBulb and ScreamingFrog take very long time (\`24 hours) to crawl a one of my websites (having around 28000 posts). So, instead of crawling, I used WordPress API and this way it is much faster.
I will modify it later to do the same thing for non-WordPress website, by analyzing the sitemap.
It goes through all the posts one by one from WordPress API, extract all the URLs from <a> tag and then checks their status by making a HEAD request.
404 and other status codes are recorded. If the HEAD request fails, then name of the exception class is recorded.
Finally, save the report in CSV file.
[wpbroken script in action](https://preview.redd.it/30t209zd0ap81.png?width=1366&format=png&auto=webp&s=1ad89fc845ee0e77ee20197b0a887301b46f9748)
GitHub Gist: [wpbroken.py](https://gist.github.com/ilovefreesw/fa763e1f84cd9f7101dc4816e293beda)
| 0.92 |
t3_tlzj7n
| 1,648,103,526 |
Python
|
5 Python Libraries for Automating OSINT Operations
|
nan
| 0.91 |
t3_tlz7q5
| 1,648,102,201 |
Python
|
Tutorial on GPU-based ray-casting with Python
|
If you are interested in doing 'shadows' for a 2D game, here's a tutorial:
[https://api.arcade.academy/en/development/tutorials/raycasting/index.html](https://api.arcade.academy/en/development/tutorials/raycasting/index.html)
https://preview.redd.it/fd1dyzmoi8p81.png?width=1200&format=png&auto=webp&s=92fd25296d83102fd08e5d8f21b59d5d07c2e80f
| 0.94 |
t3_tlsb8q
| 1,648,085,480 |
Python
|
Including packages in project
|
I've been working on project for a raspberry pi, which I've been writing on my PC in Pycharm, and SSHing over to my pi. What's the best way to move the whole project over, including the dependencies? Been just manually adding them on the pi and realized there has to be a better way.
Thanks!
| 0.67 |
t3_tlp1vn
| 1,648,082,311 |
Python
|
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
|
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.**
| 0.67 |
t3_tlmt0a
| 1,648,080,009 |
Python
|
Coin toss probability
|
import random
from collections import Counter
import itertools
##method for coin toss
def cointoss():
rand_i = random.randint(0, 1)
outcomes = ["Heads", "Tails"]
#outcomes = [0,1]
return outcomes[rand_i]
#create list
list=[]
##Number of coin tosses
n=3
##calls method and adds to the list
for i in range(0, n):
t1 = cointoss()
list.append(t1)
print(list)
Counter(list)
print(Counter(list))
##compare previous coin tosses with the last
for index, i in enumerate(list):
for j in list[index+1:]:
print("list item i "+str(i))
print("list item j " + str(j))
if i==j:
print("Same")
else:
print("Not the same")
&#x200B;
I'm trying to edit this code so that it outputs the number of times a certain side occurs in a row.
&#x200B;
So for example, a person makes ten coin toss, how many times does heads occur three times or two times in a row.
&#x200B;
Any suggestions on how to edit it?
| 0.56 |
t3_tlkryn
| 1,648,077,791 |
Python
|
Can we get hired just to do EDAโs in Python ? Exploratory Data Analysis using libraries-
|
Iโve been relatively new to Datascience, spent couple of years with sql, r, python, power BI & tableau.. Iโve specifically loved getting involved with EDAโs - what do you guys think ?
| 0.33 |
t3_tli7e4
| 1,648,073,230 |
Python
|
Where will Python be in the Web3 space?
|
Hi guys, I noticed that there are two prominent libraries for web3 applications: [web3.py](https://web3.py) and web3.js . After doing some searching online, I have found there is some preference for web3.js over [web3.py](https://web3.py). Does this mean that Python might be obsolete in Web3?
| 0.32 |
t3_tlhee1
| 1,648,072,417 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.