sub
stringclasses 1
value | title
stringlengths 7
303
| selftext
stringlengths 0
8.65k
| upvote_ratio
float64 0.08
1
| id
stringlengths 9
9
| created_utc
float64 1.65B
1.65B
|
---|---|---|---|---|---|
Python | I made a game from scratch in 48 hours for the Ludum Dare with Python | I made all of the code, artwork, sfx, etc. solo during the 48 hours of the Ludum Dare as required by the rules.
https://i.redd.it/acex0iv0y1s81.gif
The game (and its source) are available here:
[https://dafluffypotato.itch.io/explont](https://dafluffypotato.itch.io/explont)
I also [livestreamed almost all of the development](https://www.youtube.com/playlist?list=PLX5fBCkxJmm1is3hgaBi037MEGFjtHJex) and created a [timelapse](https://youtu.be/4cgjYlH2g9g).
​
https://preview.redd.it/eat9owgny1s81.png?width=631&format=png&auto=webp&s=5cae8fd8386d01c91135a834685bbaeecb97413a | 0.97 | t3_ty6yvn | 1,649,313,627 |
Python | Dockersh : A shell for docker commands with autocomplete | Hi everyone,
I was learning Docker and felt that it was hard to remember all the commands and various arguments. I also kept forgetting the names of my containers & images so I decided to build a CLI for Docker using Prompt Toolkit. Hopefully it will be useful for those of you learning & working with devops. Let me know how I can improve.
The project can be found at [https://github.com/solamarpreet/dockersh](https://github.com/solamarpreet/dockersh) | 0.67 | t3_ty6f0a | 1,649,311,338 |
Python | Continuous feedback and the 'definition of done' | Hey! I wrote a post about what I see is sometimes the short fallings of 'definition of done'. Wonder whether you guys agree with it and have been dealing with such issues?
[https://betterprogramming.pub/youre-never-done-by-definition-c04ac77c616b](https://betterprogramming.pub/youre-never-done-by-definition-c04ac77c616b) | 0.5 | t3_ty5lnw | 1,649,308,203 |
Python | What is the best Python -> direct executable package / compiler today? (April,2022) | I need to create a few applications that I want to distribute as executables, the options I'm aware of are:
Nuitka
pyinstaller
py2exe
py2app
What else is out there, and what is the BEST?
I'm looking to create a couple of cli's using click, and a couple of GUI's using DearPyGui | 0.93 | t3_ty36vb | 1,649,299,895 |
Python | Pong game in just 14 lines. | import pygame
pygame.init()
win = pygame.display.set_mode((800, 600))
clock = pygame.time.Clock()
rects = [pygame.Rect(0, 0, 20, 60), pygame.Rect(780, 0, 20, 60), pygame.Rect(390, 290, 20, 20)]
ball_vel = [5, 5]
while clock.tick(60) and not pygame.QUIT in [event.type for event in pygame.event.get()]:
keys = pygame.key.get_pressed()
rects = rects[0].move(0, (keys[pygame.K_s] - keys[pygame.K_w]) * 5).clamp(win.get_rect()), rects[1].move(0, (keys[pygame.K_DOWN] - keys[pygame.K_UP]) * 5).clamp(win.get_rect()), rects[2].move(*ball_vel)
rects[2].topleft = (390, 290) if rects[2].x < 0 or rects[2].right > 800 else rects[2].topleft
ball_vel[1], ball_vel[0] = -ball_vel[1] if rects[2].y < 0 or rects[2].bottom > 600 else ball_vel[1], -ball_vel[0] if rects[2].collidelist(rects[:-1]) != -1 else ball_vel[0]
win.fill((0, 0, 0))
[[pygame.draw.rect, pygame.draw.ellipse][1 if rect == rects[2] else 0](win, (255, 255, 255), rect) for rect in rects]
pygame.display.update() | 0.83 | t3_ty15no | 1,649,293,551 |
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_txzwcj | 1,649,289,609 |
Python | I made the game Wordle in Python | This game is somewhat similar to hangman.
You try to guess a random 5 letter word and the game will tell you the if the placement of each letter is correct or not. Example:
```
O - correct place
? - right letter, wrong place
X - letter is present in word
Word we're looking for: hello
Your word (input): house
Output: O?XX?
```
This continues until you guess the word or give up.
You can look at the code here: [https://github.com/Nextross/Wordle-python](https://github.com/Nextross/Wordle-python)
Any feedback is welcomed! | 0.72 | t3_txvx5q | 1,649,278,243 |
Python | The last Python 3.11 alpha (3.11.0a7) is available | 0.95 | t3_txuukh | 1,649,275,361 |
|
Python | Continuous Feedback over code | Hey everyone! We made something! I wanted to get your feedback on our new open-source platform - Digma. Digma provides observability 🔭 over code and makes it relevant to feature development. It gleans code-relevant insights from OpenTelemetry and other sources and provides in-code feedback 💻. [https://github.com/digma-ai/digma](https://github.com/digma-ai/digma) Python is our first supported language. I'm the author of Digma and am really keen to hear your thoughts! | 0.57 | t3_txrs93 | 1,649,267,039 |
Python | Blog API built with FastAPI, MySQL, SQLAlchemy, and Alembic | 0.75 | t3_txrlz4 | 1,649,266,567 |
|
Python | A practical introduction solving differential equations numerically | 0.83 | t3_txq7d2 | 1,649,262,787 |
|
Python | Configpile: a modern, typed argparse replacement | I started documenting astronomy code written by a PhD student, and wanted a command-line parsing library that would be self documenting.
Thus [ConfigPile](https://denisrosset.github.io/configpile/) was born! It's based on dataclasses with annotated types.
Sample code (imports omitted):
@dataclass(frozen=True)
class Calc(Config):
"""
A simple calculator
"""
#: First number to add
x: Annotated[float, Param.store(parsers.float_parser, short_flag_name="-x")]
#: Second number to add
y: Annotated[float, Param.store(parsers.float_parser, short_flag_name="-y")]
c = Calc.from_command_line_()
print(f"{c.x} + {c.y} = {c.x+c.y}")
Running this with "-h", you can a nice usage help automatically generated (through a legacy ArgumentParser). The same can feed the [sphinx-argparse](https://sphinx-argparse.readthedocs.io/en/latest/) extension to include documentation in the project web pages.
Configpile is based on modern Python, is written in mostly functional style, has user-friendly error reporting which accumulates errors instead of bailing out immediately, supports environment variables and INI files.
I'd be super grateful for comments, especially about the documentation and the Python style.
Follow a tutorial here: https://denisrosset.github.io/configpile/tutorial/index.html
Learn about the main concepts here: https://denisrosset.github.io/configpile/concepts/index.html
The package can be easily installed using `pip install configpile`
(Note: many edits for formatting) | 0.83 | t3_txq6ch | 1,649,262,713 |
Python | Show the songs that you are listening to on Telegram. (Like Discord's "Listening to") [Recently updated] | 0.5 | t3_txp8kf | 1,649,260,175 |
|
Python | UNPHAT method for designing apps | I found this to be very useful when thinking about the most important part of writing apps: understanding what to solve and how. It's from https://news.ycombinator.com/item?id=30931831.
Next time you find yourself Googling some cool new technology to (re)build your architecture around, I urge you to stop and follow UNPHAT instead:
Don’t even start considering solutions until you Understand the problem. Your goal should be to “solve” the problem mostly within the problem domain, not the solution domain.
eNumerate multiple candidate solutions. Don’t just start prodding at your favorite!
Consider a candidate solution, then read the Paper if there is one.
Determine the Historical context in which the candidate solution was designed or developed.
Weigh Advantages against disadvantages. Determine what was de-prioritized to achieve what was prioritized.
Think! Soberly and humbly ponder how well this solution fits your problem. What fact would need to be different for you to change your mind? For instance, how much smaller would the data need to be before you’d elect not to use Hadoop? | 0.67 | t3_txoq2p | 1,649,258,798 |
Python | I made a small tool to apply "color palette restriction" on images ! | I got inspired by /r/place and I wanted to exercice my python skills so I tried to make a tool to redraw images with a specific color palette (/r/place color palette)
Here are some examples :
[Reference image](https://preview.redd.it/3p4us69n7xr81.jpg?width=494&format=pjpg&auto=webp&s=0535c1eed010716f053549eec31a88d4453f2f6e)
[Color palette restriction without dithering](https://preview.redd.it/63df44kt7xr81.png?width=494&format=png&auto=webp&s=341497026bb4dd39dc63718cf792ba1e1f3030ef)
[Color palette restriction with Floyd-Steinberg dithering](https://preview.redd.it/xccpwquw7xr81.png?width=494&format=png&auto=webp&s=8156a2f09de8b2a58c92f72ef90a5b017a1df2a7)
It can also work with any color palette provided !
Also, I am using PIL to read and draw on images.
&#x200B;
You can find the source code here : [https://github.com/nrbt25/image-dithering/tree/master](https://github.com/nrbt25/image-dithering/tree/master) | 0.97 | t3_txnuzx | 1,649,256,498 |
Python | YAML: The Missing Battery in Python | 0.88 | t3_txmfli | 1,649,252,420 |
|
Python | Programming projects for Physics in Python | So I am looking for some projects to do in Physics using Python ,when I searched for the same in Quora ,it was too hard to even comprehend .
I am ready to do some reading if it is needed ,I don't like learning Python just through some courses ,I think that learning by creating projects will be a good motivation.
I have knowledge of Calc 1,2,3 a bit of Linear Algebra ,basics of solving diff equations .
I am taking Classical Mechancis and Electromagnetism .
Any suggestion ,I am aiming to score an internship with this project .
Thank you for reading my post .
Have a nice day | 0.79 | t3_txm6zl | 1,649,251,713 |
Python | hello this could be an english vocabulary question, what does comprehension mean from 'List Comprehension'? I already learned that is like set builder notation | 0.61 | t3_txk1nm | 1,649,244,748 |
|
Python | Scrape Naver Related Search Results with Python |
Full DIY code:
```python
import requests, json
from parsel import Selector # https://parsel.readthedocs.io/
# https://docs.python-requests.org/en/master/user/quickstart/#passing-parameters-in-urls
params = {
"query": "minecraft", # search query
"where": "web" # web results. works with nexearch as well
}
# 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/98.0.4758.87 Safari/537.36",
}
html = requests.get("https://search.naver.com/search.naver", params=params, headers=headers, timeout=30)
selector = Selector(html.text)
related_results = []
# https://www.programiz.com/python-programming/methods/built-in/enumerate
for index, related_result in enumerate(selector.css(".related_srch .keyword"), start=1):
keyword = related_result.css(".tit::text").get().strip()
link = f'https://search.naver.com/search.naver{related_result.css("a::attr(href)").get()}'
related_results.append({
"position": index, # 1,2,3..
"title": keyword,
"link": link
})
print(json.dumps(related_results, indent=2, ensure_ascii=False))
```
Outputs:
```json
[
{
"position": 1,
"title": "마인크래프트",
"link": "https://search.naver.com/search.naver?where=nexearch&query=%EB%A7%88%EC%9D%B8%ED%81%AC%EB%9E%98%ED%94%84%ED%8A%B8&ie=utf8&sm=tab_she&qdt=0"
},
{
"position": 2,
"title": "minecraft 뜻",
"link": "https://search.naver.com/search.naver?where=nexearch&query=minecraft+%EB%9C%BB&ie=utf8&sm=tab_she&qdt=0"
},
{
"position": 3,
"title": "craft",
"link": "https://search.naver.com/search.naver?where=nexearch&query=craft&ie=utf8&sm=tab_she&qdt=0"
},
{
"position": 4,
"title": "mine",
"link": "https://search.naver.com/search.naver?where=nexearch&query=mine&ie=utf8&sm=tab_she&qdt=0"
},
{
"position": 5,
"title": "mojang",
"link": "https://search.naver.com/search.naver?where=nexearch&query=mojang&ie=utf8&sm=tab_she&qdt=0"
}
]
```
Alternative solution using [Naver Related results API](https://serpapi.com/naver-related-results) from SerpApi:
```python
from serpapi import NaverSearch
import os, json
params = {
# https://docs.python.org/3/library/os.html#os.getenv
"api_key": os.getenv("API_KEY"), # your serpapi api key
"engine": "naver", # search engine to parse results from
"query": "minecraft", # search query
"where": "web" # web results
}
search = NaverSearch(params) # where data extraction happens
results = search.get_dict() # JSON -> Python dictionary
related_results = []
# iterate over "related_results" and extract position, title and link
for related_result in results["related_results"]:
related_results.append({
"position": related_result["position"],
"title": related_result["title"],
"link": related_result["link"]
})
print(json.dumps(related_results, indent=2, ensure_ascii=False))
```
Outputs:
```json
[
{
"position": 1,
"title": "마인크래프트",
"link": "https://search.naver.com?where=nexearch&query=%EB%A7%88%EC%9D%B8%ED%81%AC%EB%9E%98%ED%94%84%ED%8A%B8&ie=utf8&sm=tab_she&qdt=0"
},
{
"position": 2,
"title": "minecraft 뜻",
"link": "https://search.naver.com?where=nexearch&query=minecraft+%EB%9C%BB&ie=utf8&sm=tab_she&qdt=0"
},
{
"position": 3,
"title": "craft",
"link": "https://search.naver.com?where=nexearch&query=craft&ie=utf8&sm=tab_she&qdt=0"
},
{
"position": 4,
"title": "mine",
"link": "https://search.naver.com?where=nexearch&query=mine&ie=utf8&sm=tab_she&qdt=0"
},
{
"position": 5,
"title": "mojang",
"link": "https://search.naver.com?where=nexearch&query=mojang&ie=utf8&sm=tab_she&qdt=0"
}
]
```
The difference between DIY and API solution is that you don't need to create the parser from scratch, maintain it, or figure out how to bypass blocks from Naver.
Full blog post: https://serpapi.com/blog/scrape-naver-related-search-results-with-python/ | 0.4 | t3_txif8z | 1,649,238,341 |
Python | Extending pylint with plugins | 0.5 | t3_txfsuz | 1,649,226,686 |
|
Python | A Practical Introduction To Web Scraping With Python | 0.96 | t3_txf65f | 1,649,224,130 |
|
Python | Python email sender | Hi everyone, I have created a script that sends an email to whoever I want using data retrieved from an API (I chose News API, and it will send me the top 20 news of the day).
[https://github.com/jrodriigues/news-email-sender](https://github.com/jrodriigues/news-email-sender)
Take a look, let me know what you think, and how to improve it! | 0.56 | t3_txd85l | 1,649,217,069 |
Python | I made my first ever programming assignment into a youtube tutorial | 0.5 | t3_txbulk | 1,649,212,511 |
|
Python | Termtyper - Typing in terminal is fun ! | Termtyper is a TUI (Text User Interface) typing application that provides you a great feel with typing with a lot of options to tweak!
It is highly inspired by [monkeytype](https://monkeytype.com/)
It is built on top of [textual](https://github.com/Textualize/textual) which provides the UI for the application
github: [https://github.com/kraanzu/termtyper](https://github.com/kraanzu/termtyper)
&#x200B;
https://reddit.com/link/txbsdd/video/ojo8k2o3mtr81/player | 0.82 | t3_txbsdd | 1,649,212,316 |
Python | Wednesday Daily Thread: Beginner questions | New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at [https://discord.gg/python](https://discord.gg/python) where you stand a better chance of receiving a response. | 1 | t3_tx8uqj | 1,649,203,209 |
Python | Why and how to use conda? | I'm a data scientist and my main is python. I use quite a lot of libraries picked from github. However, every time I see in the readme that installation should be done with conda, I know I'm in for a bad time. Never works for me.
Even installing conda is stupid. I'm sure there is a reason why there is no "apt install conda"...
Why use conda? In which situation is it the best option? Anyone can help me see the light? | 0.9 | t3_tx73j8 | 1,649,198,092 |
Python | Online coding video tutorials - Opinions | Hello everyone,
I am currently creating some space science + Python [YouTube tutorials](https://youtube.com/c/Astroniz). In these videos I do some coding and provide some explanations on what I am doing, the science behind it etc.
Now I was wondering whether this is a good approach at all. I really like creating some content on YouTube (no I am not a professional one with my few 100 subscribers), and I am eager to improve it steadily. However I thought that "live coding" may take too much time and isn't easy to follow. My idea is to explain e.g., science related Jupyter Notebook cells in the videos to shorten the length. The code is provided on GitHub anyway, so a viewer could follow my tutorial (and thoughts) more easily. The coding would be reduced to a minimum and the focus could move to the "non coding" part.
Any ideas or comments would be appreciated!
Thomas | 0.6 | t3_tx6k1q | 1,649,196,551 |
Python | Rubik's Cube Model in Python using OOP | I've been thinking for a while about developing a model to simulate a Rubik's cube in Python. I wanted to make use of object-oriented programming, and this project was the perfect excuse to get down to work. 💻⌨️🖖
https://carlosgrande.me/rubiks-cube-model/ | 0.78 | t3_tx6gfb | 1,649,196,238 |
Python | What happened between SciPy creater Travis Oliphant and Enthought? | I was listening to his interview on the [Lex Friedman podcast](https://open.spotify.com/episode/2U2AkSSuAzmZi7nmGzJboW?si=28e8c7d915e04f75) and he mentioned that he is no longer friends with the founder of Enthought because he started Anaconda. I can't find any details online, does anyone know the story? | 0.79 | t3_tx67bv | 1,649,195,579 |
Python | My first package to pypi. Connpy: Network connection manager and automation module | Hi!
So a little bit of background, I'm a network engineer (ccie), with 10+ years of experience in networking, and i'm a really lazy guy so usually i try to automate and script everything. long time ago i created my bash connection manager and been using it since. A month ago i decided it was time to upgrade it to python and add the automation function i always wanted, and that is how connpy was born.
I'm not a programmer so it may have some issues! let me know.
[https://github.com/fluzzi/connpy/](https://github.com/fluzzi/connpy/) <- here is the link, it also have some documentation it should be easy to use. It's created for linux as it's what i use everyday but i did some testing on macos and it should work.
## connection manager
First its the connection manager, it adds the commands conn/connpy to shell, and you can add all the devices you manage easily:
- conn --add server1
you can add folders and subfolders to organize your devices. i use to work with a lot of clients so i have like 400+ nodes divided in multiples folders.
- conn --add "@office"
- conn --add "@servers@office"
- conn --add server2@servers@office
- conn --add server3@servers@office
- conn --add router1@office
when you are creating a new node to connect, it allows you to refer profiles, this way you can manage passwords and other information in 1 place and use it in multiple nodes.
- conn profile --add officeuser
then you reference inside the node configuration using "@officeuser".
you can use profiles to send multiple passwords in case you use 1 or more jumphosts.
Once the nodes are created you just connect to them without passwords.
- conn server1
- conn server2@servers@home
- conn server
## automation module
this is the new feature, once you created your nodes you can use them with the automation module
- import connpy
- config = connpy.configfile()
- server1 = config.getitem("server1@office")
- router1 = config.getitem("router@office")
- server = connpy.node("server1",**server1,config = config)
- router = connpy.node("router1",**router1,config = config)
- print(router.run(["term len 0", "show run"]))
- if server.test("ls -la", "folder to find"):
- print("folder found")
- else:
- print("missing folder")
You can also run in multiple devices at the same time using class nodes. (more in the documentation)
Hope someone find it useful!!
thanks! | 0.67 | t3_tx604l | 1,649,195,030 |
Python | "Bicycle or Metro": My first interactive web app using Dash/Flask. | I collected data from the Google Direction API and built an interactive app comparing travel duration times between Bicycle and Public Transportation in Santiago, Chile.
Each specific route to a point in the map can be accessed by clicking on the destination point, and the relevant information will be displayed.
The app is deployed on Heroku (forgive the slow response): [http://biciometro.herokuapp.com](http://biciometro.herokuapp.com) . The website is in Spanish, but its features should be easy to understand.
**Tools:**
* For the GeoJSON grid, I used this [grid creator](https://cityofaustin.github.io/geojson-grid/#). I used Pandas, Dash, Plotly, NumPy and Mapbox. Everything is coded in Python.
* Source code for the app: [https://github.com/mirkosimunovic/biciometro](https://github.com/mirkosimunovic/biciometro)
* Please show support with a Github star if you like the project. Thank you! | 0.81 | t3_tx4xj4 | 1,649,192,222 |
Python | Create a timelapse of any canvas area and any timeframe of r/place | [(Github) Source code and download](https://github.com/gislerro/rplace-cropped-timelapse-creator)
Configuration in the config.yaml file:
* range of images to create timelapse for [(archive of snapshots here)](https://rplace.space/combined/)
* granularity of frames (take every n-th image - determines speed of timelapse)
* top-left coordinates of the canvas timelapse
* width & height of the canvas
* mp4 output dimensions & name
&#x200B;
[Example](https://reddit.com/link/tx3x67/video/vgytvsfpprr81/player) | 0.87 | t3_tx3x67 | 1,649,189,564 |
Python | Applications of Python | Hey! Anyone who is interested in learning about the applications of python in the field of automation should check out [this](https://medium.com/@Nick_27/automation-using-python-66ec75a6b0ba) article.
It really encourages you to learn more about the language! | 0.3 | t3_tx0enu | 1,649,180,149 |
Python | Learning Python | Python just makes so much freaking sense! LOVING IT!! | 0.8 | t3_tx0cns | 1,649,179,997 |
Python | Running a live 45-minutes session on the fundamentals of observability, OpenTelemetry, and distributed tracing with microservices messaging systems (Kafka, RabbitMQ, etc) | Hi everyone, we're running another live OpenTelemetry and observability fundamentals session - Wednesday, April 20 at 11 AM PDT.
You will learn how to instrument your message brokers and apps to capture traces with OpenTelemetry.
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 - join!
Register here [https://www.aspecto.io/opentelemetry-fundamentals/messaging-systems/](https://www.aspecto.io/opentelemetry-fundamentals/messaging-systems/?utm_source=post&utm_medium=reddit&utm_campaign=r-python-opentelemetry-fundamentals-messaging-systems) | 0.4 | t3_tx097t | 1,649,179,745 |
Python | As of today, how well does Anaconda run on M1 MacBook Pro? | Last year, there was an article from the developer that they were working on M1 version of the software suite. However, I don't seem to hear any news after that. Are they still working on it? I recall there were some compatibility issues with some packages last year. How well does it run on M1 MacBook Pro as of today? Are Anaconda and its packages fully compatible with M1 Mac now? | 0.75 | t3_tww564 | 1,649,168,665 |
Python | Attending my first PyCon US 2022 (SLC) - tips? | What recommendations would you have for someone new to this conference?
I am new to programming and a beginner learning python (self-taught). Hoping to network, learn about new ideas to get my excited, and do some running in a new place. | 0.9 | t3_twr5wj | 1,649,151,796 |
Python | Reason to go from Python3.9 to 3.10 ? | I don't find and real advantages and all i have to do works fine on 3.9.
Change my mind. | 0.42 | t3_twq7my | 1,649,147,520 |
Python | I'm presenting live in 6 hours at Microsoft Reactor online about troubleshooting Python applications, especially on Kubernetes. (Part 2 of the Python on Kubernetes series.) Let me know your questions in advance | 0.89 | t3_twpt1m | 1,649,145,681 |
|
Python | Python Firebird-driver 1.4.3 released | 0.71 | t3_twpopx | 1,649,145,186 |
|
Python | How to Execute SQL Queries in Python and R Tutorial | 0.58 | t3_twpo9w | 1,649,145,127 |
|
Python | Community for Python app developers | Hey, I'm curious if there is a dedicated community of Python developers who are making apps with frontend interface. (As opposed to data analysis or training ML models).
For example, developers who are using Streamlit or Anvil. (Are there any other big ones?)
Do you know any such communities? | 0.64 | t3_twpbuw | 1,649,143,631 |
Python | Python and the Truth | Hi folks,
Excited to share some notes on Python's Truth values, their internals, and possible applications.
[https://towardsdatascience.com/python-and-the-truth-90cf08380246](https://towardsdatascience.com/python-and-the-truth-90cf08380246)
Thanks and happy reading! | 0.5 | t3_twoqza | 1,649,141,265 |
Python | Why is Python becoming indispensable in IoT Industry? | IoT Applications are usually pre-built SaaS (software-as-a-service) applications. These can present and analyze captured IoT sensor data to businesses via dashboards. They use machine learning algorithms and analyze huge amounts of connected sensor data in the cloud. Real-time IoT alerts and dashboards provide you visibility into key performance indicators, statistics for the meantime between failures, and other details. | 0.27 | t3_two0m1 | 1,649,138,209 |
Python | I got a little problem with my visualization program. | I find a great code of visualizing the PSO algorithm in 2D. And I tried to change it into 3D.I've done the majority part of it, but now the particles just don't update, they superpose over the old ones.
[Figure shows like this](https://preview.redd.it/fhiagfvecnr81.png?width=1102&format=png&auto=webp&s=6ed3c223f26d9407aecc242b2facc2e23458e16f)
&#x200B;
Here is the code link:
[https://linkode.org/#LsQHmirehTrbP1pqXEI2Q5](https://linkode.org/#LsQHmirehTrbP1pqXEI2Q5) | 0.5 | t3_twm7ke | 1,649,131,590 |
Python | Visualize Differential Equations | [https://www.youtube.com/watch?v=gH47pQHeKDE](https://www.youtube.com/watch?v=gH47pQHeKDE)
Normalize for your highest order derivative and plug in your initial conditions to numerically solve any differential equation | 0.57 | t3_twjqds | 1,649,123,664 |
Python | Use nested GitHub Action Runners to reduce costs by up to 50% for multiple jobs in one workflow | 0.9 | t3_twhorh | 1,649,117,806 |
|
Python | Tuesday Daily Thread: Advanced questions | Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.
**If your question is a beginner question we hold a beginner Daily Thread tomorrow (Wednesday) where you can ask any question! We may remove questions here and ask you to resubmit tomorrow.**
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at [https://discord.gg/python](https://discord.gg/python) where you stand a better chance of receiving a response. | 0.72 | t3_twha21 | 1,649,116,810 |
Python | Predicting the Champions League with Python! (21/22) | 0.67 | t3_twgvyu | 1,649,115,763 |
|
Python | I published my first tutorial on YouTube: Insertion sort explained + Python code | 0.71 | t3_twe9kh | 1,649,109,341 |
|
Python | I made use of Zoho Sheets and used it as a database engine | I started working on this yesterday and have just finished rewriting it into classes and publishing it as a PyPI project :)
This module uses Zoho Sheets (which is completely free to use) as a way to store data.
I'm keen on the development of ZohoDB.py and aiming to keep improving it's performance in order to make it a kinda production-ready module :)
Would love to hear your feedback on this one
https://github.com/oddmario/zohodb.py | 0.86 | t3_tw954f | 1,649,096,725 |
Python | Create python logo on r/place | I in the r/place we can create a python logo on 384,1618 | 0.29 | t3_tw8p3f | 1,649,095,625 |
Python | Voice Controlled Switch Using Arduino & Python | 1 | t3_tw8ace | 1,649,094,644 |
|
Python | Python f-strings Are More Powerful Than You Might Think | 0.93 | t3_tw69i5 | 1,649,089,724 |
|
Python | Book for python network programming | Hey folks, can you please recommend a good book(s) for network programming? Something that would cover subjects from low level TCP/IP, to SMTP/SSH/HTTP/etc libraries? Thanks in advance! | 1 | t3_tw5tru | 1,649,088,639 |
Python | Head-first Kubernetes - A hands-on tutorial for beginners | 0.85 | t3_tw50n4 | 1,649,086,671 |
|
Python | Active Learning in Machine Learning Explained | 0.57 | t3_tw4o2v | 1,649,085,795 |
|
Python | Can my IT department tell (without any sortve deep dive) that I'm using a python script to login? | I have to do timesheets for my crew every morning, and it takes about twenty minutes a day. I've long since thought I could automate this, and write a little proof of concept and it worked.
It would however involve using pyautogui to enter my login information including password into our time management software. Do you think this could get me into shit with the IT department? | 0.95 | t3_tw2ozp | 1,649,080,757 |
Python | StackSocial Discount. Are their courses any good? | I saw that they were offering a 'complete Python certification bundle' for $35 'reduced from $2k' if you can believe that.
I'm beginner to intermediate - written some Flask websites and programmed some automated stuff, so I was wondering if anyone would recommend this sort of thing to get into Python programming professionally? | 0.43 | t3_tw2ihc | 1,649,080,260 |
Python | Rock, Paper, Scissors | LMK what I can do differently. Thanks!
&#x200B;
running = True
while running:
player1 = input(" (Player1) Rock, Paper, or Scissors:\\n >")
player2 = input(" (Player 2) Rock, Paper, or Scissors:\\n >")
if player1.lower() == "rock" and player2.lower() == "scissors":
print("Player 1 Wins!")
if player2.lower() == "rock" and player1.lower() == "scissors":
print("Player 1 Wins!")
if player1.lower() == "paper" and player2.lower() == "scissors":
print("Player 2 Wins!")
if player2.lower() == "paper" and player1.lower() == "scissors":
print("Player 1 Wins!")
if player1.lower() == "rock" and player2.lower() == "paper":
print("Player 2 Wins")
if player2.lower() == "rock" and player1.lower() == "paper":
print("Player 1 Wins")
playing = input("Do you want to keep playing? y/n \\n > ")
if playing.lower() == "n":
break
if playing.lower() == "y":
running = True | 0.6 | t3_tw0wkp | 1,649,075,628 |
Python | Solving and Animating the 3D Double Pendulum in Python: Sympy for algebra, Scipy for numerically solving differential equations, and vpython for 3D animation | 0.81 | t3_tw0eck | 1,649,073,978 |
|
Python | ConfigParser - manage user-editable settings for your Python programs | 0.43 | t3_tvzwqb | 1,649,072,412 |
|
Python | Scraping Naver Videos in Python | Full code:
```python
import requests, os, json
from parsel import Selector
def parsel_scrape_naver_videos():
params = {
"query": "minecraft", # search query
"where": "video" # video results
}
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.87 Safari/537.36",
}
html = requests.get("https://search.naver.com/search.naver", params=params, headers=headers, timeout=30)
selector = Selector(html.text) # very similar to bs4, except parsel supports Xpath
video_results = []
for video in selector.css(".video_bx"):
# https://parsel.readthedocs.io/en/latest/usage.html#using-selectors
title = video.css(".text::text").get()
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
})
print(json.dumps(video_results, indent=2, ensure_ascii=False))
```
Part of the output:
```json
[
{
"title": " : 🌲 How to build Survival Wooden Base (#3)",
"link": "https://www.youtube.com/watch?v=n6crYM0D4DI",
"thumbnail": "https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fn6crYM0D4DI%2Fmqdefault.jpg&type=ac612_350",
"channel": "소피 Sopypie",
"origin": "Youtube",
"video_duration": "24:06",
"views": "671",
"date_published": "4일 전"
},
{
"title": "마인크래프트 무한순환 이론 (",
"link": "https://www.youtube.com/watch?v=kQ7wyG9mShQ",
"thumbnail": "https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FkQ7wyG9mShQ%2Fmqdefault.jpg&type=ac612_350",
"channel": "TV블루위키",
"origin": "Youtube",
"video_duration": "01:44",
"views": "9만",
"date_published": "2022.02.15."
} ... other results
]
```
Blog post link if you need code explanation: https://serpapi.com/blog/scrape-naver-video-results-with-python/ | 0.5 | t3_tvzlgk | 1,649,071,317 |
Python | Creating A Modern Python Development Environment | 0.69 | t3_tvyvov | 1,649,068,761 |
|
Python | Different types of implementation of polymorphism | Hi All,
I am reading about OOP in python and wonder if we implement ` __add__`, `__sub__` etc, it looks to me thst we are doing operator overloding. So my question is, that is it correct to think like that and does this implementation falls under AdHoc polymorphism in python.
Thanks
Pradeep | 0.6 | t3_tvx5ee | 1,649,061,795 |
Python | CaptchaCracker - Deep Learning-based Captcha Recognizer | Hello!
I made a python open source project.
**Github Repository:** [https://github.com/WooilJeong/CaptchaCracker](https://github.com/WooilJeong/CaptchaCracker)
# CaptchaCracker
## Introduction
CaptchaCracker is an open source Python library that provides functions to create and apply deep learning models for Captcha Image recognition. You can create a deep learning model that recognizes numbers in the Captcha Image as shown below and outputs a string of numbers, or you can try the model yourself.
## Input
https://preview.redd.it/qltiatrqxgr81.png?width=250&format=png&auto=webp&s=8e4d370203ff502b4681c8b35a8fee1cff7fd259
## Output
023062
## Installation
pip install CaptchaCracker
## Dependency
pip install numpy==1.19.5 tensorflow==2.5.0
## Examples
## Train and save the model
Before executing model training, training data image files in which the actual value of the Captcha image is indicated in the file name should be prepared as shown below.
* [Download Sample Dataset](https://github.com/WooilJeong/CaptchaCracker/raw/main/sample.zip)
https://preview.redd.it/n451dp4sxgr81.png?width=1009&format=png&auto=webp&s=2c0173b4d685f73642edbfd780ae3fdf4d921bdf
import glob
from CaptchaCracker import CreateModel
train_img_path_list = glob.glob("../data/train_numbers_only/*.png")
CM = CreateModel(train_img_path_list)
model = CM.train_model(epochs=100)
model.save_weights("../model/weights.h5")
## Load a saved model to make predictions
from CaptchaCracker import ApplyModel
weights_path = "../model/weights.h5"
AM = ApplyModel(weights_path)
target_img_path = "../data/target.png"
pred = AM.predict(target_img_path)
print(pred) | 0.56 | t3_tvwizf | 1,649,059,109 |
Python | QualityScaler 1.1.0 - Image/video upscaling & enhancement GUI app based on BRSGAN & RealSR_JPEG | Image/video upscaling GUI app based on BRSGAN & RealSR\_JPEG
[GUI interface](https://preview.redd.it/9rxldsstugr81.png?width=1392&format=png&auto=webp&s=4760f210cb169dc95679b5a5183ed0e142cbbad4)
## Links.
Github -> [https://github.com/Djdefrag/QualityScaler/releases/tag/1.1.0](https://github.com/Djdefrag/QualityScaler/releases/tag/1.1.0)
Itch -> [https://jangystudio.itch.io/qualityscaler](https://jangystudio.itch.io/qualityscaler)
## Credits.
*BSRGAN -* [*https://github.com/cszn/BSRGAN*](https://github.com/cszn/BSRGAN) *|* [*https://arxiv.org/abs/2103.14006*](https://arxiv.org/abs/2103.14006)
*RealSR\_JPEG -* [*https://github.com/jixiaozhong/RealS*](https://github.com/jixiaozhong/RealS)R | [https://arxiv.org/pdf/2005.01996.pdf](https://arxiv.org/pdf/2005.01996.pdf)
## Installation.
QualityScaler is completely portable; just download, unzip and execute the file .exe
## Supported AI Backend.
* Nvidia Cuda \[v10.2\]
* CPU \[works without GPU, but is very slow\]
## Features.
* Easy to use GUI
* Images and video upscale
* Drag&drop files \[image/multiple images/video\]
* Different upscale factors:
* auto - automatic choose best upscale factor for the GPU used (to avoid running out of VRAM)
* x1 - will mantain same resolution but will reconstruct the image (ideal for bigger images)
* x2 - upscale factor 2: 500x500px -> 1000x1000px
* x4 - upscale factor 4: 500x500px -> 2000x2000px
* Cpu and Gpu \[cuda\] backend
* Compatible images - PNG, JPEG, BMP, WEBP, TIF
* Compatible video - MP4, WEBM, GIF, MKV, FLV, AVI, MOV
## Next steps.
1. Use both model for the upscale
2. Include audio for upscaled video
3. Support for other GPUs (AMD, Intel) with new backend
## Example.
Original photo (200x200 px)
https://preview.redd.it/3yb1t6nxugr81.png?width=220&format=png&auto=webp&s=b950ff4af4cfcb5e2fe97cece00f9b4c7c3f1698
BSRGAN (800x800 px)
https://preview.redd.it/wghr3c7yugr81.png?width=880&format=png&auto=webp&s=67360909111338bfb01e111e1fab8cdd6c3531e7
RealSR\_JPEG (800x800 px)
https://preview.redd.it/blh6vmlyugr81.png?width=880&format=png&auto=webp&s=68af9f79d102b2c906f8c54bb84fdef44b6db7d2 | 0.83 | t3_tvwbu7 | 1,649,058,226 |
Python | Machine Learning Sandbox in Python | Hope you are doing well. I was reaching out to share one of my projects with all of you . The idea was to build a sandbox of ML algorithms that people could use to demonstrate classical ML algorithms and also break down the same with simple from-the-scratch implementation in Python. You can simply fork the repo and start running the algorithms. I hope you find it useful. Do let me know your feedback on the same and if I can make any improvements in this.
&#x200B;
Project Link: [https://github.com/devAmoghS/Machine-Learning-with-Python](https://github.com/devAmoghS/Machine-Learning-with-Python) | 0.9 | t3_tvw388 | 1,649,057,193 |
Python | Is List Comprehension The Most Effective Way to Solve Any Tasks? | Python | 0.25 | t3_tvut3j | 1,649,052,016 |
|
Python | Choosing Python over other languages | This is an interesting blog that I read. It's written by Brett Cannon who is a core developer of Python. It essentially explain why you shouldn't automatically ignore Python because it's not as fast as some other programs.
&#x200B;
[Selecting a programming language can be a form of premature optimization (snarky.ca)](https://snarky.ca/programming-language-selection-is-a-form-of-premature-optimization/) | 0.69 | t3_tvubzw | 1,649,050,282 |
Python | Open-Source python package to find relevant images for a sentence | &#x200B;
[Search results for \\"a happy potato\\"](https://preview.redd.it/2cnopvno0gr81.jpg?width=744&format=pjpg&auto=webp&s=eecc9e9948c386fbd959289257c347fa19c35644)
You **don't** need to caption the images for the search to work, and it is **not** just limited to objects in the image but an overall understanding built using a neural network trained on images/text found on internet.
This is what [CLIP-as-service](https://github.com/jina-ai/clip-as-service) enables. It is an open-source library to create embeddings of images and text using CLIP. These embeddings can be used to find the relevant images for any sentence.
**What is CLIP?**
CLIP is a Neural Network trained on variety of images and natural language sentences available on the internet. It enables understanding of concepts in an image as natural language. This can be used for cases such as searching image by text or describing an image in natural language.
The demo screenshot shown in the post is an example showing relevant images for a particular query sentence.
More info on Github readme about how to achieve this
* Source code: [https://github.com/jina-ai/clip-as-service](https://github.com/jina-ai/clip-as-service)
* License: Apache 2.0
What would you use it for? And what next features/improvements should I work on? | 0.86 | t3_tvs0dp | 1,649,042,711 |
Python | If you're bored at work or school. | Try to open Python Idle and Import antigravity module
`import antigravity`
Then laugh. | 0.87 | t3_tvp8uf | 1,649,034,470 |
Python | swagger-gen: the Swagger spec generator you've been waiting for | Hey Python people,
As a .NET developer by day, I've always been bummed by the lack of real Swagger spec generators available for Flask compared to Swashbuckle for ASP.NET. I personally don't want to write some markup or clutter the service with a bunch of code to generate the docs, I wanted something that would generate the spec for you, with no setup required, with optional features to expand the detail of the documentation.
So I built that! If you like Swagger, you'll like this. It's a pretty full-featured library, but I'm sure there's room for improvement and welcome any friends that'd like to contribute.
[https://pypi.org/project/swagger-gen/](https://pypi.org/project/swagger-gen/)
[https://github.com/danleonard-nj/swagger-gen](https://github.com/danleonard-nj/swagger-gen)
Thanks for checking it out :) | 1 | t3_tvp63o | 1,649,034,247 |
Python | Is r/Python participating in r/place? | If so, where can one get involved? | 0.25 | t3_tvom5q | 1,649,032,639 |
Python | iMandelbrot is a tool made out of PyGame that visualizes the nature of a Mandelbrot fractal! | # Mandelbrot: An Interactive Module
**iMandelbrot** is a **learning aid** purely made out of **PyGame** that visualizes the nature of a **Mandelbrot** fractal!
GitHub Link: [https://github.com/wonmor/iMandelbrot-Plotter](https://github.com/wonmor/iMandelbrot-Plotter)
## Public Release 1.2.0
**DEVELOPED** AND **MAINTAINED** BY **JOHN SEONG** • **MIT** LICENSE
[Download for **Intel-based Macs**](https://github.com/wonmor/iMandelbrot-Plotter/raw/main/installer/iMandelbrot_Mac.dmg) → Make sure to turn on the '**Open Using Rosetta**' option on **M1 Macs**!
## Why Our Product Is Sexier Than Others
For the sake of **optimization**, **iMandelbrot** only generates the coordinates above the x-axis — basically duplicating to the corresponding coordinates below the horizontal line.
&#x200B;
https://preview.redd.it/jr48nb5fper81.png?width=3456&format=png&auto=webp&s=3b116ded17242fd28d1f685145f0d283932eb5a5 | 0.67 | t3_tvofnv | 1,649,032,116 |
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. | 0.81 | t3_tvnusp | 1,649,030,411 |
Python | Python libraries for hierarchical or multilevel time series analysis | What are the python libraries best suited for analyzing time series with hierachical or multiple levels like geographic levels between neighborhoods within cities and cities within states. | 0.76 | t3_tvmdfk | 1,649,026,196 |
Python | Python and Blockchains | Why is Python is not used as much in blockchain technology, Specially in the core of blockchains | 0.22 | t3_tvl7m8 | 1,649,023,159 |
Python | Two new articles this week: Beginner tutorial on classes and object-oriented programming with exercises and Python careers research | Hi all,
In the last few days, I had a lot of fun publishing two brand new articles for you:
* [Python Classes Zero to Expert: A Tutorial with Exercises](https://codesolid.com/getting-started-with-python-classes/)
For new programmers just beginning with Python and learning about object orientation, this beginner-focused article covers the basics in some detail, with exercises at the end to reinforce what you've learned.
* [Best Python Careers: New Research Reveals Top Fields](https://codesolid.com/career-paths-for-python-programmers/)
Based on my own experience in the industry as well as job board research, I detail how many jobs there are in different areas of Python programming and what sorts of hoops you might need to jump through to break into the field.
Please upvote if you like them, and enjoy! | 0.85 | t3_tvkqlt | 1,649,021,930 |
Python | we need to make the python logo in r/place | Don't you think? Imo it would be so cool if some of us got together and started to plan it :) | 0.19 | t3_tvjg5x | 1,649,018,716 |
Python | Twitter read and analysis | # Import tweepy to work with the twitter API
import tweepy as tw
# Import numpy and pandas to work with dataframes
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
consumer_key ='mycode'
consumer_secret = 'mycode'
access_token ='mycode'
access_token_secret = 'mycode'
# Authenticate
auth = tw.OAuthHandler(consumer_key, consumer_secret)
# Set Tokens
auth.set_access_token(access_token, access_token_secret)
# Instantiate API
api = tw.API(auth, wait_on_rate_limit=True)
hashtag = "#slap"
query = tw.Cursor(api.search_tweets, q=hashtag).items(1000)
tweets = [{'Tweet':tweet.text, 'Timestamp':tweet.created_at} for tweet in query]
print(tweets)
df = pd.DataFrame.from_dict(tweets)
df.head()
willsmith_handle = ['willsmith', 'will smith', 'will', 'smith', 'slap\'s']
def identify_subject(tweet, refs):
flag = 0
for ref in refs:
if tweet.find(ref) != -1:
flag = 1
return flag
df['will smith'] = df['Tweet'].apply(lambda x: identify_subject(x, willsmith_handle))
df.head(10)
df.to_csv('Twitter_feed.csv', encoding='utf-8')
A working process based on an online tutorial. The code takes in twitter tweets and exports them to csv file.
I'm going to try and expand to read the sentiment and feedback of different tweets. | 0.6 | t3_tvj90z | 1,649,018,223 |
Python | Dice roll Probability | import random
import collections
import time
##Outcome List of Combinations Total
##2 1+1 1
##3 1+2, 2+1 2
##4 1+3, 2+2, 3+1 3
##5 1+4, 2+3, 3+2, 4+1 4
##6 1+5, 2+4, 3+3, 4+2, 5+1 5
##7 1+6, 2+5, 3+4, 4+3, 5+2, 6+1 6
##8 2+6, 3+5, 4+4, 5+3, 6+2 5
##9 3+6, 4+5, 5+4, 6+3 4
##10 4+6, 5+5, 6+4 3
##11 5+6, 6+5 2
##12 6+6 1
#create list
dice_list=[]
for i in range(1,7):
#dice 1
dice1= i
for j in range(1,7):
#dice 2
dice2= j
#dice total
dice_reads=dice1+dice2
##add to list
dice_list.append(dice_reads)
##sort list
dice_list.sort()
##dictionary
probability = {}
##Place a Bet
User_bet = input("Enter a bet between 2 to 12: ")
###using collections.Counter for number frequency
probability=collections.Counter(dice_list)
# printing the probability
#print(probability)
##percentage method
def math_percentage(User_bet):
print("The user bets a "+str(User_bet))
for dice in probability:
prob=probability[dice]
percentage=round(float(((prob)*100)/36))
#print("The percentage of a "+str(dice) +" is "+str(percentage)+ " %")
if dice==int(User_bet):
print("The percentage of a " + str(dice) + " is " + str(percentage) + " %")
##Pause
time.sleep(10)
##call method
math_percentage(User_bet)
##100 dice rolls
for i in range(0,1):
#dice 1
dice1= (random.randint(1,6))
#dice 2
dice2= (random.randint(1,6))
#dice total
dice_reads=dice1+dice2
print("Dice reads: "+str(dice_reads)) | 0.33 | t3_tvinqx | 1,649,016,754 |
Python | Who exactly is a python developer? I know this is a broad term which include many paths. But do we have to cover them all to become one? much like, one term to rule them all? | Hii all
I've seen the term "Python developer" been around online, and the roadmap to become one. As we all know, it does include many paths, web dev, analysis, DS, ML and so on. To be called a python dev, do we actually need to cover all potential paths and then just choose one? or we should be able to do anything under this big umbrella term?
My question is coming from my interest in learning python and DS. That's when I started my journey. I am still in process of learning. But I also want to learn some kills related for backend dev via python. For many reasons, first even though my love goes for DS but there's less opportunities and more competition. (as far as I know). So, probably having extra skills can add value or come in handy for model production. Also, I won't mind working as backend dev, as I'll def use DS in research for later future plans.
When I share this with someone, like my interest in DS and web dev. I got the response of these are totally different and I am heading to the wrong direction (well, maybe I am) but I wanted to cover my interest in more of a broader term like "python dev" but there's the fact that some of the paths under this term I don't have much of interest in.
Should I specify myself as python dev with some specific libraries "Generally speaking". I do understand when it come to job haunting I should be more specific like looking for DS, analysis...etc.
But let's say I want include sth in my linkedin bio. I don't want to throw analysis, DS, ML, web dev all at once. I was considering python dev and then when it's come to job haunting I can pick and choose.
I hope this is not a weird question :) | 0.42 | t3_tvi6ql | 1,649,015,670 |
Python | python logo in r/place | guys let’s make the python logo
discuss coordinates and such in the comments | 0.3 | t3_tvhwuf | 1,649,015,005 |
Python | I am working on some 3D reconstruction using TOMVIZ, does anybody know any tutorial for segmentation in this software? | 0.33 | t3_tvhi0d | 1,649,014,055 |
|
Python | Introducing File Folder Hider! (made with Tkinter Python) | I've been working on this project for a couple of months now, first it was in the from of a terminal where the user had to give certain commands to get the job done, but now, its a fully-fledged GUI with buttons and labels to guide you. It has its two main features, "Hide" and "Unhide", which help you hide and unhide any file and/or folder from the File Explorer (more in the readme.txt). Moreover, you can opt in optionally to enter your email address and in case you ever forget the Master Password used to access the program, you can press the "Forgot Password" button to have a recovery code sent to your email and after verifying, you will be allowed to change the current Master Password, or if you happen to remember it again, simply go back to the main menu (because you've already verified yourself through the recovery procedure, it is safe to assume the user is the correct one). One thing to keep in mind is that all the credentials (the Master Password and your email address specifically) are encoded to ensure minimum security. At least that's better than none at all. Another important thing to note is that some command prompt screens will appear when running the program and hiding/unhiding the files/folders. That is a side-effect of trying to have the program run on the user level in order to get around permission issues and not running as admin, so sorry for that.
Links:
File Folder Hider repository: [File Folder Hider on Github](https://github.com/Mubashir78/File_Folder_Hider_with_dialog_box)
My other repositories (basically to my Github profile): [My Profile on Github (Mubashir78)](https://github.com/Mubashir78)
Please feel free to try it out for your daily routine and let me know your guys' feedback in the comments!
[Dialog box for when creating\/changing Master Password. Email is optional as it says](https://preview.redd.it/if9ff53mqcr81.png?width=502&format=png&auto=webp&s=2b074f0ee02eec7f5e5394fe291a6ebf95432a5e)
[Main Menu Dialog Box \(after successfully creating\/entering the Master Password\)](https://preview.redd.it/63y52tj0scr81.png?width=501&format=png&auto=webp&s=75fb030989360f44e6e922927211b199ce5dfefe)
[Dialog box for after creating the Master Password and entering the email and running the program again. Incase of not adding an email, the \\"Forgot Password\\" is grayed out and an \\"?\\" icon shows up which tells you that you haven't added email in order to use the feature when hovering over it](https://preview.redd.it/rkxmbcp7tcr81.png?width=404&format=png&auto=webp&s=2618f24e11794d151e83000f5ceebe04da14e056) | 0.75 | t3_tvflrx | 1,649,009,385 |
Python | I made a video comparing different data storage formats that python users should consider. Feedback welcome! | 0.75 | t3_tver6p | 1,649,007,270 |
|
Python | Easier Regexps | 0.2 | t3_tveh1e | 1,649,006,548 |
|
Python | A Redux inspired store pattern for asyncio applications - SimpleEventMonitor | So, recently I had to deal with the issue of setting up a solution to monitor a few on-prem deployments for health status. The on-prem clusters were configured to send emails with multiple tables with the status of every node etc.
Well, it is a pretty straightforward solution was writing a python script to check the mailbox for new mail and download recent mail from the cluster, parse the mail and for each table entry verify for failed nodes and create an alert ticket of each node. I stumbled upon a [Github Project](https://github.com/wichmannpas/simple-mail-monitoring) that does something like this.
Considering the job was pretty much done, I was able to quickly use that script to do basic email retrieval and write parsers for my mail and get the job done in a few hours.
However, the code felt very complicated and it was pretty much thrown away, but after giving it a few hours of solace at home, it occurred to me, this kind of problem could be better tackled with queues or pubsub model and it has been a while I have played around with python. I wanted to avoid the hassle of setting up Redis/rabbitmq etc, I was rather looking for something like redux for python applications, which I can use to separate out my data producers and consumers.
I had a few things in my mind for this side project :
\- In memory pubsub
\- Use asyncio
\- Be able to schedule events without cron tasks
\- Unobtrusive pattern to design my python code into producer and consumer model
\- Ability to develop pull-based data sync, which can connect to your real time data feed
Here is the basic hello world program which demonstrates how you can create a publisher function and schedule it with run\_every to execute every 180 seconds after the last execution.
[aioredux hello world](https://preview.redd.it/6vb91s6accr81.png?width=3164&format=png&auto=webp&s=6de8ffdbda5fad9eb22404325887e8873a105c60)
Here is the link to my [fork](https://github.com/aregee/simple-mail-monitoring) of the Simple Mail Monitoring Github project, which utilizes this pattern to run the existing functionality provided by the original source.
I can't share my private repo, but I must say after moving that hackish script to this slightly better hack has made the code so clean and flexible, we have not just accomplished that email report task, but rather we are able to see many more such use cases internally where we can utilize this pattern.
Please feel free to share your thoughts, feedback, or even pull requests on the project. | 0.73 | t3_tve7uh | 1,649,005,890 |
Python | magic-timer: Conveniently get a rough idea of how long things take. (package) | 0.62 | t3_tvcnmr | 1,649,001,856 |
|
Python | Darts in higher dimensions | While browsing YouTube, I came across the following video in which a little puzzle is presented that is solved mathematically. Using maths, an answer was presented that I validated by implementing a simulation.
I thought this was a fun little challenge to program. Maybe others want to give it a go as well?
How would you have approached this?
Video: [https://www.youtube.com/watch?v=6\_yU9eJ0NxA](https://www.youtube.com/watch?v=6_yU9eJ0NxA)
My code: [https://gitlab.com/JeroenStiers/scripts/-/blob/main/darts\_in\_higher\_dimensions.py](https://gitlab.com/JeroenStiers/scripts/-/blob/main/darts_in_higher_dimensions.py) | 0.63 | t3_tvbluw | 1,648,999,132 |
Python | r/Place | Are people interested in putting the 2 snakes in there? | 0.22 | t3_tvakqu | 1,648,996,309 |
Python | Simple and Super Easy-to-use Colabs | [Github](https://github.com/BreezeWhite/interesting-colabs)
Tired of figuring out how to use a research demo colab? Feeling lost in the arrangements of all the messy colab blocks and information?
I want to share my personal collections of colabs that is definitely easy to use. This is not just another “awesome list” series of repo, with just links to the original resources. All the colabs within this collections are refactored and deliberately simplified by me. And I can promise you that they are all super easy to use, even your 6-year-old child would know how to use.
There are at most three code blocks to be executed!! Minimum steps are required to get directly to the expected final results. Example outputs are also provided to have a quick experience. Everything is just simple and clean, no lengthy and confusing intros, nor chaotic arrangements of blocks.
I will continually update the repo, adding more interesting yet hard to get started projects. Feel free to comment and leave feedbacks below. If you know something is really awesome and interesting, but just no way to figure out how to use, I would be very happy adding to the list and wrapping it! | 0.75 | t3_tva26l | 1,648,994,803 |
Python | Instagram bot and Data gathering with GUI | Hi,
InstaMachine is a post-oriented Instagram bot which means it is more focused on gathering data and storing it inside the SQLite database. I made this app solely to put to test my web scraping abilities as a beginner programmer and build up some portfolio, therefore I did not use any python's Instagram library such as instapy.
[https://github.com/theRJorj/Insta-Machine](https://github.com/theRJorj/Insta-Machine)
I would appreciate your feedback on any aspects of this project
[InstaMachine](https://preview.redd.it/8gftzkswibr81.png?width=1500&format=png&auto=webp&s=e5c30426a7429a8c9245914df4c03862d8ac566e) | 0.5 | t3_tv9nz9 | 1,648,993,681 |
Python | Python beginners created these games based on my tutorials! What do you think? | 0.68 | t3_tv9cin | 1,648,992,723 |
|
Python | Python open-source OpenBB Terminal against Bloomberg Terminal | 0.95 | t3_tv7xqp | 1,648,988,114 |
|
Python | How is PyPy Tested? | 0.83 | t3_tv7nyw | 1,648,987,167 |
|
Python | PtPython as default Django shell - my first Django package | Hey there!
I've built a package to use PtPython as default Django shell.
Due to extra functionalities of PtPython, I'm using that rather than Python and maybe many of you using ptpython too so I tried to make it default shell in Django framework.
You can give it a try:
`pip install django-ptpython`
Github repository: [https://github.com/reganto/django-ptpython/](https://github.com/reganto/django-ptpython/)
PyPi: [https://pypi.org/project/django-ptpython/](https://pypi.org/project/django-ptpython/)
&#x200B;
I'd like to get your feedbacks.
Thank you. | 1 | t3_tv7jej | 1,648,986,698 |
Python | Python dictionary implementation | 0.73 | t3_tv4p4i | 1,648,974,980 |
|
Python | Share Python Code Snippets Like A Pro Without Using GitHub | 0.38 | t3_tv33br | 1,648,968,433 |