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
|
Did you know you can pull and analyze almost 1M time series economic indicators directly in python using the FRED api and pandas?
|
nan
| 1 |
t3_udydh5
| 1,651,161,687 |
Python
|
Can i call myself a junior? What to do next?
|
my github - [https://github.com/leirons](https://github.com/leirons)
Firstly i would like to say sorry for my English, still learning and dont want to use translator. I am major of computer science from Ukraine on 2nd course
Can you rate my github and tell me if can consider myself as a junior developer and look for a job?
My stack: Everything with Python/FastAPI/Selenium/Aiogram, also used Django, Docker(just for packaging app, it's very simple and helpful),AWS(A litter knowledge) for simple deployment on EC2 or docker containers, Javascript/HTML/CSS/React - learning and thinking about a pet project but dont know what to do.
I'm stuck in place, I have a desire to do something difficult to raise my knowledge as a programmer, but I have no idea what exactly, I don't want to do something that has already been done hundreds of times by others
Thanks for reading and answers.
Interesting thing in Python(just found out, idk why i added it) ( does not matter to the text above )
some_dict = {}
some_dict[5.5] = "JavaScript"
some_dict[5.0] = "Ruby"
some_dict[5] = "Python"
print(some_dict[5.0]) # == Python Not Ruby
| 0.67 |
t3_udxxrj
| 1,651,160,510 |
Python
|
When Python canβt thread: a deep-dive into the GILβs impact
|
nan
| 0.75 |
t3_udwq9a
| 1,651,157,307 |
Python
|
Book Club: Kubeflow for machine learning with Holden Karau & Adi Polak
|
nan
| 1 |
t3_udvp7y
| 1,651,154,478 |
Python
|
Project sigstore (free software signing service) just released a library to sign and verify python packages
|
nan
| 0.74 |
t3_udvn1q
| 1,651,154,333 |
Python
|
I would like to increase my python kills.
|
Hello. I enjoy coding in python and i know the basics and a bit of working with apis and stuff but i would like to further my knowledge but i do not know how to start and from where what do you all recommend. i mean skills not kills :( xd
​
Thank you everyone for the help it means a lot
| 0.79 |
t3_udujsc
| 1,651,151,135 |
Python
|
Riemann sums animations with Python
|
​
[Left, midpoint, and right Riemann sums](https://i.redd.it/08w2yr2qc9w81.gif)
[https://github.com/chicolucio/integrals](https://github.com/chicolucio/integrals)
I've made this project to show how Riemann sums provide an easy way to approximate a definite integral.
| 1 |
t3_udt7f3
| 1,651,146,765 |
Python
|
Announcement: Embed Interactive Jupyter Notebooks in Static Websites (Jekyll) for Free
|
Hi there,
I'm Juergen, a web developer. Currently, I'm working on integrating Jupyter Notebooks in (static) webpages to make Notebooks live/interactive available using the Binder service. I've integrated the (Python/JS) package/library ***nbinteract*** with my Jekyll-based static website at [https://jekyll.one](https://jekyll.one).
You'll find in the menubar a dropdown **Live Examples**. Go for one of these sites. On these sites, use the menu Learn/Experimental/Textbooks" and open one of the pages in that dropdown. The pages integrate some nice Jupyter Notebooks using interactive widgets.
It would be very helpful if some of you had a look. I'm very thankful to hear your opinion!
BTW: You can create a personal website in minutes if you're already on **Github** or **Netlify,** go for the **Rocketstart** button on [https://jekyll.one](https://jekyll.one) to create your web!
​
Happy Jekylling,
Juergen
| 0.81 |
t3_udt0qs
| 1,651,146,093 |
Python
|
How to Edit a bunch of json ?
|
​
i have a question :
How to edit a bunch of json files and delete "eg. "type": "png" " / replace the value of "name" to be "goodies" not "#5"
​
{
"name": "#5",
"image": "dope deep",
"type": "png",
"attributes": \[
{
"trait\_type": "Eyes",
"value": "Side-eye"
},
\],
}
​
i think the function / code will work like that :
1- import /read and *parse* all json files
2- make a loop to make edits (delete specific lines / replace values) to all files
3- export json files with their same names
| 0.62 |
t3_udrusf
| 1,651,141,584 |
Python
|
Hatch 1.0.0 - Modern, extensible Python project management
|
nan
| 0.94 |
t3_udpzri
| 1,651,133,163 |
Python
|
2013 'Lost connection to MySQK server during server during query'
|
Hello,
I have the problem 2013 'Lost connection to MySQK server during server during query' which comes when I come to write a data to my remote DB located on pythonanywhere . has anyone already solved this problem ? Thank you.
| 0.5 |
t3_udpd99
| 1,651,130,424 |
Python
|
Is it possible on Python?
|
Guys, i' m working on diploma work about french language in magrheb countries and I have a task to solve. I am nobody in programming and I don't know is it possible to solve with Python. The task: i need a tool that gatheres transformed french words from different forums, like Reddit, compares them with actual french words and sends these words to excel table.
| 0.57 |
t3_udp9w8
| 1,651,130,018 |
Python
|
The SymPy/HackerRank DMCA Incident
|
nan
| 1 |
t3_udp1d8
| 1,651,129,050 |
Python
|
HTML Processing Tools in Python [Documentation - made easy to read]
|
nan
| 1 |
t3_udomcp
| 1,651,127,331 |
Python
|
Web Automation With Selenium And Python (making a court reservation bot)
|
nan
| 0.83 |
t3_udoa0e
| 1,651,125,906 |
Python
|
A tool to seed your dev database with real data
|
A bunch of developers and myself have created [RepliByte](https://github.com/qovery/replibyte) - an open-source tool to seed a development database from a production database.
## Features β‘
- Support data backup and restore for PostgreSQL, MySQL and MongoDB
- Replace sensitive data with fake data
- Works on large database (> 10GB) (read Design)
- Database Subsetting: Scale down a production database to a more reasonable size
- Start a local database with the prod data in a single command
- On-the-fly data (de)compression (Zlib)
- On-the-fly data de/encryption (AES-256)
- Fully stateless (no server, no daemon) and lightweight binary
- Use custom transformers
## My motivation
As a developer, creating a fake dataset for running tests is tedious. Plus, it does not reflect the real-world data and painful to keep updated. If you prefer to run your app tests with production data. Then RepliByte is for you as well.
Available for MacOSX, Linux and Windows.
https://github.com/qovery/replibyte give a β if you like it.
| 0.77 |
t3_udnnag
| 1,651,123,414 |
Python
|
I made an ASCII jumpscare for anyone who wants to use it
|
it's not very good, but I hope you like :)
`print("....................................................................................................\n........................................................................................................................................................................................................\n....................................................................................................\n....................................................................................................\n....................................................................................................\n....................................................................................................\n....................................................................................................\n....................................................................................................\n....................................................................................................\n....................................................................................................\n....................................................................................................\n..............................................................:::^^::::..........:..................\n.............................::::::........................::^lGJJG7!~::....::::::..................\n...........................::^~~!!~^^::..................::^lYBEEEBPJ7~:::::^^^^~^..................\n..........................:^~DKAWJJDH~^:................::^~JBEEEE&E53~^^^^/7/~^::..................\n.........................::^RJPV&GGGGJ!::...............::^~JGEXXXXE57~^~J7JJ!!~:...................\n..................:::::::::^LJGEEEEEEY!^:................::^~JBEEBPJ!~^~/YPPJ7~^:...................\n..................:~^~7!^:::^~LPBEEEG7^:..................:::^YY!~~^^^^~JP5Y!~^.....................\n...................:~l7YYG!:::^^~!!!~::......................::::::::^~V5YJ~~:......................\n....................:^l7JY!~::::::...............................:::^lJ5YG~:........................\n.....................:^~GY5J!^:..............:::.................::~Y55YG^^.........................\n......................:~lYP557~:..........:::::::::::::::.......:^YJYY5G!:..........................\n......................:::lGYP5YG~::.......::::::::::::::.....:^~GJPPPY7~::..........................\n.........................:^l7YYP5J7~!^^~^.::::::^~^^^^::::^ll7BPEEBG5Y!^............................\n..........................::^lG55YYP5JYE5YJGGPYGGE5YBBG7G5GEB5BG5G5Y7^:.............................\n............................:^^l7JGGGBEE&EEEG&EGGGBGGG5YGG55EEGGP57~^:..............................\n...............................:l7YPGEEEGPG5GGGEGG5PGG5YEEGPYEBYJG!.................................\n.................................:^lGPG55EGYGBEPBBJJBGYYPYYBYPP!:::.................................\n....................................~G77PB5BYBGGGEY5EGYPE5Y5Y77^....................................\n....................................::^l7GGYYE5GE&GG&EY5EG57!~^:....................................\n......................................::::~~lYll5EP5EGJGY7~^:::.....................................\n..........................................::::::VFF-FFF-^:..........................................\n..........................................::.....::.::!^............................................\n..........................................::..........^:............................................\n..........................................::..........::............................................\n..........................................::........................................................\n..........................................::........................................................\n..........................................:.........................................................\n..........................................:.........................................................\n....................................................................................................\n....................................................................................................\n....................................................................................................\n....................................................................................................")`
| 0.36 |
t3_udk3yw
| 1,651,111,726 |
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.72 |
t3_udhlpf
| 1,651,104,010 |
Python
|
A package with a bunch of tools to work with JSON data more easily. - T4Json
|
Python's standard json package is pretty good and all... but it only serializes/deserializes JSON data. That's why I created T4Json - (tools 4 json). It can open up json data from a file path, URL/Endpoint or JSON String... and then do many different operations on it like flattening, changing values, changing keys, reading values, adding data, moving/copying pairs or values around, searching for keys within nested data... and much much more. To get a better idea of what it can do take a quick look at the [docs](https://cybergeek1943.github.io/t4json/). Hint: there are whole lot of things you can do with the `flatten()` method. Also you can use relative/absolute paths to navigate nested JSON data... just like in the file system.
**Outline:**
* Open up JSON data with the T4Json class.
* Use methods to make changes.
* Save changes.
Example:
>>> data = T4Json('test.json')
>>> data.delete(r'scores\\names\\test')
>>> data.add({'geek': 99}, to_path=r'scores\\names')
>>> data.save() # or save_as()
Search Example from this [URL](https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json):
>>> data = T4Json('https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json')
>>> data.search('powers')
["Radiation resistance", "Turning tiny", "Radiation blast", "Million tonnepunch", "Damage resistance", "Superhuman reflexes", "Immortality", "Heat Immunity", "Inferno", "Teleportation", "Interdimensional travel"]
These example are only a little window into what t4json can do.
I created it for myself because I wanted an easier way to work with JSON data. I was not planning to make a tool with so many feature but they just kind of came along as I worked on it... and then I thought about releasing to the public. So here it is. Hopefully someone can find it helpful.
Happy coding to everyone! π©π½βπ»π¨π½βπ»π§π½βπ»π
| 0.76 |
t3_udg1q9
| 1,651,099,427 |
Python
|
Lambda Functions + Map() Reduce() Filter()
|
nan
| 0.29 |
t3_ude784
| 1,651,094,355 |
Python
|
Lots of modules aka files is this trouble in some manner I dont get ?
|
Hi, opinions based on direct experience might help me. Thanks in advance.
Im new to Python but very experienced with SW development. Having no problems whatsoever.
I want to be sure others who inherit my project can change it and make it do things they want..
So I have carved it up into 'modules' each a .py file I never seem to see python stuff done liek this. I mean if you want to change somebody else program and you see a perfectly named files, its pretty smallish, its very enabling, huh ?
All modules have this 'on top'
import os as os
import sys as sys
import tkinter as tk
import datetime as dt
from tkinter import ttk
from tkinter import font
from PIL import Image as pl
from PIL import ImageTk as ii
from tkinter import filedialog as fd
from tkinter.messagebox import showinfo
from tokenize import maybe
\# Imports. parts of this program
import avMedia as av
import forFun as ff
import globalIdeas as gi
import modalSimple as ms
import screenBuilder1 as sb
import windowLookie as wl
import fileIo as io
import flatEdit as fe
import pickle as pk
import sequenceContainer as sc
import fractionScreens as fs
import transformations as xf
import configSetting as cs
Is this cool or am I missing something ? There must be a way a import and be nested, probably. This as above though is kind of clear. XX. is each moduie. I use it even if the method calls a method in its same file so it can be cut and pasted if its apparent its in the wrong spot.
Regs
Your Turn
my ref 27 Apr 2021 23:00 Z Python advice getting on reddit
| 0.17 |
t3_uddgw4
| 1,651,092,446 |
Python
|
Python Coding Intermediate: Python Classes, Methods and OOPs
|
nan
| 0.33 |
t3_udd6e9
| 1,651,091,692 |
Python
|
Learn Python: Python Baby Steps
|
nan
| 0.33 |
t3_udd58y
| 1,651,091,604 |
Python
|
Ideas for a new project?
|
Hello, my girlfriend and I want to do some Python project, since we never did anything together related to programming. She's so close to finish his degree on Data Science Engineering, and I'm on my third year of Computer Science. We both have done some big projects, so I would like to hear from you some cool ideas.
Thanks :)
| 0.74 |
t3_udcq5p
| 1,651,090,489 |
Python
|
question about importing python file
|
hello,
​
i am in a class where i need to import three files (they are python files). my teacher has posted the python files on canvas for us to have, but I am having trouble actually importing the files. i have dowloaded anaconda so i have all the base files, and i am coding in spyder. whenever i attempt to import, i am met with a 'ModuleNotFoundError'. how can i fix this problem?
| 0.33 |
t3_udc5um
| 1,651,089,035 |
Python
|
Mypy 0.950 Released
|
nan
| 0.88 |
t3_udbbnm
| 1,651,086,759 |
Python
|
Python Inline Source Syntax Highlighting Using Type Annotations
|
nan
| 0.84 |
t3_udaqbu
| 1,651,085,223 |
Python
|
Job search automation with Python
|
I just finished up a project that uses Python for job search automation on Indeed and blogged about it here: [https://coreybowndatascience.blog/2022/04/27/using-python-for-job-search-automation/](https://coreybowndatascience.blog/2022/04/27/using-python-for-job-search-automation/)
| 0.69 |
t3_uda3lb
| 1,651,083,524 |
Python
|
Underscoring (or dunder-scoring) the importance of native type methods in Python
|
nan
| 0.4 |
t3_ud8sb3
| 1,651,079,996 |
Python
|
How common is poorly organized python code in industry?
|
I've always loved python, tend to gravitate towards it with IoT projects or really anything that I don't want to work on for a super long time. It just works everywhere and is easy to manage for small -> medium size projects.
Because of this I have been *dying* to use it in a professional setting and my call was finally answered. I was given a project that I needed to interface with. This project however is fucking awful. 8000+ lines of python 2.7. That's just in the main program, not even all the utility classes it uses. There's not a consistent spacing between functions/classes etc. I've dealt with this before in other languages like C# which is way easier to decipher since it has brackets for everything and Visual Studio has more tools. It takes me forever to understand what a function is doing because it's nested with 10+ if/else and try/except statements.
How common is this around industries and companies..? This isn't the first time I've been presented a file this big in my industry nor will it be the last.
| 0.94 |
t3_ud8cec
| 1,651,078,836 |
Python
|
Python Is Now Top Programming Language β But Shouldn't Be
|
nan
| 0.21 |
t3_ud7nbo
| 1,651,077,044 |
Python
|
Hackerforms - create interfaces for scripts straight from your Python code
|
nan
| 0.33 |
t3_ud6wuv
| 1,651,075,137 |
Python
|
Python Cybersecurity β Build your own python tools (PortScanner, Visual Network Tracker and Anonymous FTP Scanner)
|
**Python Cybersecurity β PortScanner**
Build a simple Port Scanner using the Python Programming language. Port Scanner is an application designed to probe a server or host for open ports. Such an application may be used by administrators to verify security policies of their networks and by attackers to identify network services running on a host and exploit vulnerabilities.
**Link**: [https://youtu.be/bH-3PuQC\_n0](https://youtu.be/bH-3PuQC_n0)
**Python Cybersecurity β Visual Network Tracker**
Dive into Network Traffic visualization using the Python programming language, Wireshark and Google Maps. This tutorial covers the implementation steps needed to take a file of network traffic and convert it into a visual presentation using Google Maps.
**Link**: [https://youtu.be/xuNuy8n8u-Y](https://youtu.be/xuNuy8n8u-Y)
**Python Cybersecurity β Anonymous FTP Scanner**
Build a simple FTP Scanner using the Python Programming language. Anonymous FTP is a means by which archive sites allow general access to their archives of information. These sites create a special account called βanonymousβ.
**Link**: [https://youtu.be/BIZfRodSW9w](https://youtu.be/BIZfRodSW9w)
| 0.54 |
t3_ud6c1o
| 1,651,073,616 |
Python
|
Ways to unpack a tuple with 1 element
|
Some functions always return a tuple, even when only returning a single value.
Ways I'm debating of assigning the element value to a variable:
1. `hist = conn.query(hist_query).fetchone()[0]`
2. `hist, *_ = conn.query(hist_query).fetchone()`
3. `hist, = conn.query(hist_query).fetchone()`
4. /u/LardPi `(hist, ) = conn.query(hist_query).fetchone()`
5. /u/redditusername58 `[hist] = conn.query(hist_query).fetchone()`
Which would make the most sense to you when you came back and read it?
I'm partial to 2, but I think 1 is more common in Python.
Any other methods that are even more obvious?
​
**EDIT:** Thanks for the discussion on the explicitness of the result and new techniques!
| 0.8 |
t3_ud67zr
| 1,651,073,314 |
Python
|
Create a Bluetooth LE repeater using Python on Raspberry pi to overcome the range limitation
|
nan
| 0.75 |
t3_ud66s4
| 1,651,073,221 |
Python
|
How to Version Control your Django Project
|
Hey All,
I wrote a small guide for how I Version Control my Django Projects. If you are interested I would love to get your feedback. [https://builtwithdjango.com/blog/django-version-control](https://builtwithdjango.com/blog/django-version-control)
It is aimed at the people who are just starting out.
TL;DR of the post is to use a good .gitignore π
| 0.5 |
t3_ud4xau
| 1,651,069,818 |
Python
|
How ASCII video are made
|
nan
| 0.77 |
t3_ud4oj6
| 1,651,069,142 |
Python
|
GitHub - dflook/python-minifier: Transform Python source code into it's most compact representation
|
nan
| 0.67 |
t3_ud2xcd
| 1,651,064,166 |
Python
|
How to Make Pass Maps in Python
|
Howdy,
Beginner: What project should I do?
Not beginner: do what you are passionate about?
This is me finally finding a passion project:
https://youtu.be/o1ZHIocdTEk
| 0.5 |
t3_ud29il
| 1,651,062,042 |
Python
|
I have written a blog building Neural Network from scratch with Python and trained it on image data.
|
nan
| 0.93 |
t3_ud0cqi
| 1,651,055,155 |
Python
|
Python Implementation of Gnome Sort, Child of Insertion sort and Bubble sort
|
nan
| 0.56 |
t3_ucyywi
| 1,651,049,129 |
Python
|
Switch to Python Development from DBA
|
Hi All,
I am working as DBA from last 8 years, but want to switch my career into Python & Django Development.
I have made several projects in Python & Django from last 3 years for work and as well as my hobby and passive income projects. I am very good at scripting, use REST APIs, cloud functions, CI/CD tools like Jenkins, GitHub-Actions, Ansible etc. for automations.
I have also made my personal Tech blog showcasing my work.
I started applying for Python/Django roles, but I don't get even shortlisted anywhere.
Everyone is hesitant to hire a DBA for development roles.
How do I get a job in development? Thanks for helping in advance.
​
https://preview.redd.it/77y4sxie51w81.png?width=992&format=png&auto=webp&s=5741608caf23b77c8129e13b0dd1e6bce0e1264a
| 0.96 |
t3_ucykyo
| 1,651,047,290 |
Python
|
Good ways to send and recieve REST request objects when ID of object is only sometimes sent or received?
|
Bit of a mouthful, but I have a flask restful server that I am using to serve data and do certain operations to a local computer.
Whenever this REST server returns something from a the database, it returns the object with its ID (integer). When its a computed response, it does not send the ID.
Likewise, when I request to get an individual resource, I ask by ID. When I request to create a resource, I need to not send the ID of itself and any nested objects.
At the moment I am using Marshmallow to serialise and deserialise, and the best I can do is set ID: Optional[int]. But doing this just sends ID over as None which does t really work nicely.
I guess the question is, is there a good way to achieve what I am trying to do here? Seems like every single thing that has ever used a REST API will have faced this issue. What are your solutions?
E:
quick solution for those using marshmallow. Set load_only=True on the schema definition. This will make Marshmallow ignore the field when you dump it, but still pick it up on load. For the opposite use dump_only. Handy and quite clean in my opinion
| 0.77 |
t3_ucx5qc
| 1,651,041,127 |
Python
|
We built the "Netlify for Backend" that runs on your AWS account!
|
nan
| 0.3 |
t3_ucwrpv
| 1,651,039,598 |
Python
|
GitHub - GeeTransit/sphinx-better-subsection: Better your Sphinx section IDs
|
Hey all.
I created a (imo) pretty cool Sphinx extension to make header permalinks use the label just before them. You can [see it in action here](https://geetransit.github.io/soundit/_generated/CHANGELOG/) (click on the "#" beside the headers).
A label is the `.. _name` [syntax for to linking specific sections](https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#ref-role). As a quick example, the permalink on "1.2.3 - 2022-04-26" in the rST below would be `#v1-2-3` instead of `#id1` or whatever:
.. _v1.2.3
1.2.3 - 2022-04-26
------------------
- Made things cooler.
To use it, simply `pip install sphinx-better-subsection` and add `extensions += ["sphinx_better_subsection"]` to your `conf.py` file.
Any feedback / feature requests are welcome :D
[https://github.com/GeeTransit/sphinx-better-subsection](https://github.com/GeeTransit/sphinx-better-subsection)
| 0.78 |
t3_ucv4vl
| 1,651,033,286 |
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.
| 0.63 |
t3_ucqd0q
| 1,651,017,610 |
Python
|
Python Tips And Tricks β Using Built-In Database
|
nan
| 0.53 |
t3_ucnftn
| 1,651,009,071 |
Python
|
AutoTwitchDrops. A minimalist bot that gets Twitch drops for you written in pure Python.
|
This is a very simple app that I went above and beyond to make as clean and properly structured/formatted as possible. The goal was to write and structure the code in the most pythonic, beautiful, eloquent way possible. Also overwatch 2 drops are tomorrow and I wanted to nab a beta key. It also works for all other twitch drops. All possible details and instructions are available in the repo thanks to a really nice readme template I just started using, but I'll add the basics here as well to save some people clicks :)
repo: [https://github.com/trevtravtrev/AutoTwitchDrops](https://github.com/trevtravtrev/AutoTwitchDrops)
I'll start with the basics of how it works:
1) read a list of streamers from a text file
2) open a unique browser tab for each twitch streamer's stream
3) refresh each tab every x amount of seconds to start any streams that weren't yet started last refresh
And how simple it is to use:
1) fill a text file with streamer twitch names (streamers.txt)
2) input a couple settings (settings.py)
3) run main.py
Libraries/tools used:
- python 3.10
- selenium
- poetry
- mypy
- Pylint
- isort
- black
Now the fun part. The time taken to write the core features took about **20 minutes**. The time taken correctly formatting the code (black), proper package/structure management (poetry), type hints (mypy), sorting imports (isort), errors/code smells (pylint), and a beautiful readme took about **6 hours.**
It works very well and I'm sharing for anyone that would like to use it and more importantly for feedback/critique.
1) how could the code/code structure be further improved?
2) are there any other magical tools/libraries I'm missing that I can add to my arsenal above?
3) any other tips/feedback is greatly appreciate
I'm an experienced python dev and available to answer any questions as well :)
repo: [https://github.com/trevtravtrev/AutoTwitchDrops](https://github.com/trevtravtrev/AutoTwitchDrops)
| 0.83 |
t3_ucl9mz
| 1,651,003,133 |
Python
|
FastAPI with SQLModel, Alembic and Authentication. Full course
|
nan
| 0.72 |
t3_uck9s7
| 1,651,000,434 |
Python
|
Mocha - A simple open-source Continuous Profiling tool for Python!
|
nan
| 0.88 |
t3_uci6jw
| 1,650,994,883 |
Python
|
Recover deleted/overwritten files with RecoverPy 1.5.0
|
​
https://i.redd.it/6zy0hh7d8wv81.gif
Hi! I recently release RecoverPy v1.5.0 and I think I might give you some news.
\-> Repo: [https://github.com/PabloLec/RecoverPy](https://github.com/PabloLec/RecoverPy)
\-> What is it?
RecoverPy is a 100% Python tool to not only recover deleted but also overwritten files. I got the idea when I was quite new to some programming best practices, especially version control...
Long story short, I accidentally piped my output into my precious script... Just spent the day working on something and instead of typing myscript > log, I typed log > myscript, oh boy what a feeling.
I knew some tools to recover deleted files, but my problem was quite different, I didn't deleted the file (in system words, marked the file blocks as deleted/available), I just replaced it's content. Talk about an impostor syndrome.
After a long ride in the abysses of unix stackexchange, I found some dark combination of grep and dd command to search directly in your raw system partitions blocks and eventually recovered my file! But as the process was really slow and painful, I thought it might be a good idea to make a tool out of it. That's how RecoverPy was born.
\-> 1.5.0
Since then, the tool has had quite some success. Especially in the hacker community (wasn't the initial intent but still). It even appeared in hakin9 magazine.
Last releases have been quite stable, lastly I mostly added QoL updates and better binary file search handling.
Feel free to have a look and tell me what you think of it! It's my biggest personal project and I'm beginning to be quite proud of my baby :)
| 0.95 |
t3_ucfids
| 1,650,987,787 |
Python
|
Reloadium - Hot Reloading aka Edit and Continue for Python
|
​
https://i.redd.it/fyscm8r8fvv81.gif
More details here: [https://github.com/reloadware/reloadium](https://github.com/reloadware/reloadium)
Using is very simple. Just edit your file and hit save (Ctrl-S).
If you guys use PyCharm then you can try out the plugin:
[https://plugins.jetbrains.com/plugin/18509-reloadium](https://plugins.jetbrains.com/plugin/18509-reloadium)
It enables hot reloading capabilities in Python like changing code during debugging, fixing errors after exceptions occur, restarting current functions etc.
| 0.99 |
t3_ucbzry
| 1,650,977,925 |
Python
|
Robyn - A Python web framework with a Rust runtime - crossed 200k installs on PyPi
|
Hi Everyone! π
I wrote this blog to celebrate 200k install of Robyn. This blog documents the journey of Robyn so far and sheds some light on the future plans of Robyn.
I hope you all enjoy the read and share any feedback with me.
Blog Link: [https://www.sanskar.me/hello\_robyn.html](https://www.sanskar.me/hello_robyn.html)
| 0.96 |
t3_ucazjl
| 1,650,974,662 |
Python
|
GitHub - LukasZahradnik/PyNeuraLogic: PyNeuraLogic lets you use Python to create Differentiable Logic Programs
|
nan
| 0.8 |
t3_uc9wc1
| 1,650,970,850 |
Python
|
Broadcast dictionary: operate on all values of a dictionary without loops or dict comprehension
|
For a client, I had to do the same analysis for several datasets.
The existing codebase was full of things like this:
raw_data = {
"apples": load_data("apples"),
"pears": load_data("pears"),
...
}
clean_data = {k: clean(df) for k, df in raw_data.items()}
models = {}
for k, df in clean_data.items():
model = train_model(df)
models[k] = model
To make things easier, I have created the [Broadcast Dictionary](https://github.com/mariushelf/bcdict) package.
It allows to perform operations on all values of a dictionary like this:
pip install bcdict
from bcdict import BCDict
import bcdict
keys = ["apples", "pears", "bananas"]
raw_data = bcdict.bootstrap(keys, load_data)
clean_data = raw_data.pipe(clean)
models = clean_data.pipe(train_model)
You can also access attributes of all values:
>>> clean_data.shape
BCDict({'apples': (16, 5), 'pears': (18, 5), 'bananas': (12, 5)})
Or call functions:
>>> clean_data.head()
{'apples': A B C D target
0 0.81 0.19 0.79 0.61 0.46
1 0.11 0.47 0.34 0.15 0.66
2 0.07 0.73 0.95 0.01 1.00,
'bananas': A B C D target
0 0.72 0.82 0.36 0.11 0.95
1 0.41 0.53 0.85 0.69 0.75
2 0.22 0.55 0.71 0.24 0.18,
'pears': A B C D target
0 0.63 0.34 0.07 0.32 0.34
1 0.74 0.65 0.90 0.48 0.13
2 0.72 0.77 0.57 0.78 0.50}
So if you work a lot with dictionaries the `bcdict` package could be useful for you.
You can check out the full documentation, [more examples](https://bcdict.readthedocs.io/en/stable/examples/examples.html) and even a full [`sklearn` pipeline](https://bcdict.readthedocs.io/en/stable/examples/train_test_evaluate.html) on [https://bcdict.readthedocs.io](https://bcdict.readthedocs.io).
| 0.79 |
t3_uc9efg
| 1,650,968,849 |
Python
|
Would be nice to run a python module function with "python -m mymod:func"
|
Just saying, would be very nice to run a python module function with the same syntax used to define module scripts, directly from the command line. Is there any proposal of the kind?
| 0.77 |
t3_uc8k1r
| 1,650,965,309 |
Python
|
OS Signal Handling in Python 3.x.x
|
nan
| 0.69 |
t3_uc67ax
| 1,650,954,660 |
Python
|
Build your own Data Acquisition System (.csv file) using Python and Arduino
|
nan
| 0.79 |
t3_uc66x3
| 1,650,954,613 |
Python
|
Top Checklist to Hire Python Developers
|
nan
| 0.25 |
t3_uc5rj2
| 1,650,952,860 |
Python
|
Rate my game: Lightshift!
|
​
https://preview.redd.it/htro0gk1wsv81.png?width=1085&format=png&auto=webp&s=c149383c94b5abbc6dbffa3e1155b87aefd87854
Last time, I made a post for my game, [AGILE](https://skysurfer-kon.itch.io/agile) and people said the controls were too hard. Most people couldn't even pass level 2 (there are 18 levels). To make this game user friendly with easy controls and good game feel, I need some people to playtest my game (you) because my friends keep postponing it.
​
**PLEASE NOTE:**
My game is not done and some parts of this game might not be in the final version. There are glitches and weird things I need to fix, so if you see terrible backface culling on some blocks or red blocks that serve no purpose, please do not give feedback about those as this game is the alpha build currently. The sounds are also not final and some are nonexistent. Also, P**lease do not take any assets or code**, because I spent many hours on everything (apart from sounds). The graphics are also the best possible, so if you are on battery mode it might lag a bit, unless you have a good pc.
​
**AFTER YOU PLAYED THE GAME:**
After you played the game, please give me feedback on the vfx, controls, general difficulty of the game, and other things I could improve.
​
**CONTROLS:**
moving left & right: left and right arrow keys
jump: Z
dash: C
​
**DOWNLOAD:**
[https://www.mediafire.com/file/gx1bmudwe6zsm1u/Lightshift.zip/file](https://www.mediafire.com/file/gx1bmudwe6zsm1u/Lightshift.zip/file)
| 0.6 |
t3_uc4gr1
| 1,650,947,761 |
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.5 |
t3_ubz9be
| 1,650,931,209 |
Python
|
Anubis - Python Obfuscator
|
Project on Github [here](https://github.com/0sir1ss/Anubis)
So, I was looking around online and github when I realised that there were little python obfuscators. Now this makes sense since it's an interpreted language which isn't meant to be obfuscated. However, obfuscators still exist. First there's [pyarmor](https://pypi.org/project/pyarmor/) however that has been shown to be deobfuscated (still quite good). Then there's tools and github repositories like [pyminifier](https://pypi.org/project/pyminifier/) but sadly they don't do much to obfuscate the code ~~replace exec with print.~~ The best solution that does a solid job at obfuscating your code is [here](https://pyob.oxyry.com/), but if you want to purchase the offline CLI version it will cost you USD $1998.
So instead, I decided to create my own obfuscator. This includes a plethora of features such as junk code and custom encryption for one liners. It even includes the obfuscation you find at oxyry.
You can see the difference it makes from this source [here](https://github.com/0sir1ss/Anubis/blob/main/example/script.py) to this obfuscated one liner [here](https://github.com/0sir1ss/Anubis/blob/main/example/script-obf.py).
Also, I have added an option to instead compile to an exe with [Nuitka](https://pypi.org/project/Nuitka/) incase you don't want to use the one line mode and distribute the .pyd file along with it.
As of now, Anubis contains:
* Anti VM
* Anti Debugger
* Junk Code
* Custom Encryption
* Compile to exe with Nuitka
| 0.7 |
t3_ubxqt3
| 1,650,926,818 |
Python
|
I used the speech_recognition library for many of my projects, but needed an offline capability so I switched to Vosk. Here's a quick video on how to install and use it. Before I invest too much time with it, is there a better offline speech recognition library?
|
nan
| 0.75 |
t3_ubwvez
| 1,650,924,418 |
Python
|
Wyngman helps you better understand your AWS Cognito users
|
Every wished to subset users based on their creation date? The AWS Documentation for Cognito says you can only search users based on their standard attributes. Wyngman is a CLI Tool written in Python that helps you for the use-case like, **How many users did I gain in a given date range!**
Feel free to contribute and provide feedback
Source Code: [https://github.com/Razin-Tailor/wyngman](https://github.com/Razin-Tailor/wyngman)
Pypi: [https://pypi.org/project/wyngman/](https://pypi.org/project/wyngman/)
Medium: [https://medium.com/@r42intailor/wyngman-helps-you-better-understand-your-aws-cognito-users-7e48c895c486](https://medium.com/@r42intailor/wyngman-helps-you-better-understand-your-aws-cognito-users-7e48c895c486)
| 0.67 |
t3_ubvzi8
| 1,650,922,030 |
Python
|
Learning Python
|
This is my second day working on python. I'm 15 years old and I've always been good at maths and used to program a bit with "blocks" a couple years ago. Now I've been trying to familiarise myself with variables data structures and will soon move on more to functions. I've seen some suggestions but what resources do you guys recommend, (I prefer hands on learning).
Heres a script i wrote today, if anyone has any ideas how i could add stuff and make this script more advanced, let me know! Thanks for the help in advance.
\#fruits
banana = 10
orange = 20
apple = 40
\#money
money\_ownership = int(input("How much money do you have? :"))
\#Buy fruits
apple\_ammount = int(input("How many apples would you like? : "))
orange\_ammount = int(input("How many oranges would you like? : "))
banana\_ammount = int(input("How many bananas would you like? : "))
\#total cost
total\_cost = (apple\_ammount \* apple + orange\_ammount \* orange + banana\_ammount \* banana )
print("Your total cost is", + total\_cost)
\#how much money will be left
money\_left = money\_ownership-total\_cost
print("Youll have", + money\_left, "left.")
if money\_left < 0:
print("sorry you do not have enough money")
else:
print("Your balance is enough")
| 0.65 |
t3_ubucj0
| 1,650,917,752 |
Python
|
Succinct callable type hints
|
Sadly, [PEP 677](https://peps.python.org/pep-0677/) was [rejected](https://mail.python.org/archives/list/[email protected]/message/NHCLHCU2XCWTBGF732WESMN42YYVKOXB/), so we get to continue suffering with `Callable` and `Protocol`.
Look at this mess for typing a method that returns a method. It's to type hint part of Alembic's setup code.
class type_include_object(Protocol):
def __call__(self, object: Table, name: str, type_: str, reflected: Any, compare_to: Any) -> bool: ...
class type_include_schemas(Protocol):
def __call__(self, names: List[str]) -> type_include_object: ...
@dataclass
class type_metadata:
include_schemas: type_include_schemas
This is _crap_. I strongly dislike this code I've written. Please tell me there's a better, more succinct way to:
1. Type hint a method or function
2. Include parameter names and types
| 0.84 |
t3_ubrjze
| 1,650,910,467 |
Python
|
Choosing a Python library
|
When you need to do something tricky, and you don't want to reinvent the wheel - [how do you choose a Python library](https://blog.rareschool.com/2022/04/choosing-python-library.html)
| 0.36 |
t3_ubqn2k
| 1,650,908,028 |
Python
|
10% of the 666 most popular Python GitHub repos have f-string bugs (so 68 pull requests were made in 24 hours to fix them all)
|
nan
| 0.64 |
t3_ubkvrd
| 1,650,892,429 |
Python
|
Introduction Pythonβs Moto Library- Easily Mock out AWS Services
|
nan
| 0.54 |
t3_ubon6t
| 1,650,902,810 |
Python
|
Image Processing Camera Suggestions?
|
Not sure if this is the right place but I've been playing around with ML and image processing in Python and I want to try and use a camera to stream a live feed that is easy to process. Does anyone have any good suggestions for a camera brand that is easy to interface with and receive images? I am trying to find something without a subscription or anything like that to use. Thanks.
| 0.75 |
t3_ubo3za
| 1,650,901,458 |
Python
|
Giving the Python environment management ecosystem the old-fashioned Gordian Knot treatment. Plus: conda best practices and a fictional history of python env+dep management tools.
|
nan
| 0.82 |
t3_ubn40k
| 1,650,898,826 |
Python
|
merge5audio - A simple GUI app that merges audio files
|
[https://github.com/arthtyagi/merge5audio](https://github.com/arthtyagi/merge5audio)
I made this in an hour as a predecessor to my other audio-processing app called TRILLAUDIO (open-source and will be working on it this summer).
Oh, and it merges a folder of audio files in batches of 5. (helps with merging multiple stems of my projects if I want to. I'm referring to a music-production project here btw)
Lmk if it's acting up and I'll help you with it.
| 0.81 |
t3_ublodl
| 1,650,894,791 |
Python
|
Learn Python in 3 Hours [DE]
|
nan
| 0.53 |
t3_ubl5x7
| 1,650,893,290 |
Python
|
Flask -> FastAPI
|
I'm happy with Flask and do not see the need to switch to FastAPI. Change my mind & (ideally) point me to a nice tutorial that does just that in a demo project.
| 0.32 |
t3_ubiv0a
| 1,650,885,862 |
Python
|
Text Summarization with Huggingface Transformers and Python
|
nan
| 0.63 |
t3_ubgv0x
| 1,650,877,984 |
Python
|
GitHub - helblazer811/ManimML: ManimML is a project focused on providing animations and visualizations of common machine learning concepts with the Manim Community Library.
|
nan
| 0.71 |
t3_ubfsl4
| 1,650,873,375 |
Python
|
Making a list of advanced topics in Python
|
I'm preparing for a technical interview. I failed the first one a week ago. I noticed the excercises were tagged as (advanced python). 2 coding questions, one from decorators and the other from SQL.
I'm taking a month to prepare for my second chance at it. And I'm making a list of advanced topics/concepts in python. I don't want to be taken by surprise again.
List comprehension
Anonymous function
Decorators
Generators
Exception handling
Inheritance
Encapsulation
Unit testing
Regex
I need suggestions just in case I'm missing anything. I do practice coding excercises on hackerank.
| 0.75 |
t3_ubd7xt
| 1,650,862,809 |
Python
|
Port scanning with Python
|
Lately I've been learning a bit about communicating over a network with Python and thought it might be fun to create a simple TCP port scanner. Had a lot of fun playing around with this on my home network.
The full project write up and code can be found [here](https://sheldonbarry.com/2022/04/24/port-scanning-with-python/).
| 0.69 |
t3_ubakvn
| 1,650,853,507 |
Python
|
Python 3.11 Preview: Task and Exception Groups β Real Python
|
nan
| 0.96 |
t3_ub9elz
| 1,650,849,707 |
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.74 |
t3_ub7ugb
| 1,650,844,811 |
Python
|
2-Button UI engine in MicroPython with "Apps" on a TTGO T-Display
|
https://youtu.be/wR3AkhD0nEg
More of a demo than anything at this point, but I've got working text entry, menus, loadable apps(any file named app_AppName.py is detected as an app).
I also have sleep modes, and wakelock-like functionality(Including modem sleep), and the ability for one app to launch another, with arguments and return values.
In screen-off sleep mode, it uses 6mA without Wi-Fi(The USB chip and charge led takes some power, probably more like 0.5mA on battery). With Wi-Fi it's around 7mA with spikes every few seconds.
With the screen on, you get 45mA with spikes up to 65mA. Probably room to improve that. But I'm impressed by the low power capabilities of MP(Once you add some assorted pull requests from the internet).
The Calculator app actually just launches the text entry app, and evals the text you enter.
There's a stopwatch and a tally counter, and a settings menu where you can customize things like the colors, and set an app to auto-load as soon as it boots up.
In the future, I'll add password protection to prevent exiting the default app, and I'd like to eventually have some kind of mobile "App store" Android app for uploading new content, and maybe the ability to configure WiFi/MDNS/MQTT from the settings menu.
The original idea for this was to be a replacement for Logitech's Harmony remotes. I think it would be awesome to have an open source home automation remote, that used an app-capable OS, that could also be a replacement for smart wall switches.
Another fun thing I'd like to do is some kind of programming feature, so you could edit the logic for a little robot just with a 2 or 3 button menu.
If MicroPython ever gets BLE bonding, making a wireless keyboard emulator for media or presentations might be another fun app.
| 0.92 |
t3_ub6l4g
| 1,650,840,886 |
Python
|
In-Depth Analysis of Moonbirds NFTs using Python and Alchemy
|
nan
| 0.17 |
t3_ub5plk
| 1,650,838,236 |
Python
|
Breaking Anti-Cheat With Electronics & Python
|
nan
| 0.4 |
t3_ub4yc3
| 1,650,836,115 |
Python
|
James Bond film details
|
import random
import numpy
from statistics import mode
import matplotlib.pyplot as plt
import csv
import collections
##dictionary of films
from numpy import ndarray
films_info_dic = {
'Films':[
{
"Name": "Dr. No",
"Actor":"Sean Connery",
"Running Time": 109,
"Year": "1962"
},
{
"Name": "From Russia with Love",
"Actor":"Sean Connery",
"Running Time": 115,
"Year": "1963"
},
{
"Name": "Goldfinger",
"Actor": "Sean Connery",
"Running Time": 110,
"Year": "1964"
},
{
"Name": "Thunderball",
"Actor": "Sean Connery",
"Running Time": 130,
"Year": "1965"
},
{
"Name": "You Only Live Twice",
"Actor": "Sean Connery",
"Running Time": 117,
"Year": "1967"
},
{
"Name": "On Her Majesty's Secret Service",
"Actor": "George Lazenby",
"Running Time": 140,
"Year": "1969"
},
{
"Name": "Diamonds Are Forever",
"Actor": "Sean Connery",
"Running Time": 120,
"Year": "1971"
},
{
"Name": "Live and Let Die",
"Actor": "Roger Moore",
"Running Time": 121,
"Year": "1973"
},
{
"Name": "The Man with the Golden Gun",
"Actor": "Roger Moore",
"Running Time": 125,
"Year": "1974"
},
{
"Name": "The Spy Who Loved Me",
"Actor": "Roger Moore",
"Running Time": 125,
"Year": "1977"
},
{
"Name": "Moonraker",
"Actor": "Roger Moore",
"Running Time": 126,
"Year": "1979"
},
{
"Name": "For Your Eyes Only",
"Actor": "Roger Moore",
"Running Time": 127,
"Year": "1981"
},
{
"Name": "Octopussy",
"Actor": "Roger Moore",
"Running Time": 131,
"Year": "1983"
},
{
"Name": "A View to a Kill",
"Actor": "Roger Moore",
"Running Time": 131,
"Year": "1985"
},
{
"Name": "The Living Daylights",
"Actor": "Timothy Dalton",
"Running Time": 130,
"Year": "1987"
},
{
"Name": "Licence to Kill",
"Actor": "Timothy Dalton",
"Running Time": 133,
"Year": "1989"
},
{
"Name": "GoldenEye",
"Actor": "Pierce Brosnan",
"Running Time": 128,
"Year": "1995"
},
{
"Name": "Tomorrow Never Dies",
"Actor": "Pierce Brosnan",
"Running Time": 119,
"Year": "1997"
},
{
"Name": "The World Is Not Enough",
"Actor": "Pierce Brosnan",
"Running Time": 128,
"Year": "1999"
},
{
"Name": "Die Another Day",
"Actor": "Pierce Brosnan",
"Running Time": 133,
"Year": "2002"
},
{
"Name": "Casino Royale",
"Actor": "Daniel Craig",
"Running Time": 144,
"Year": "2006"
},
{
"Name": "Quantum of Solace",
"Actor": "Daniel Craig",
"Running Time": 106,
"Year": "2008"
},
{
"Name": "Skyfall",
"Actor": "Daniel Craig",
"Running Time": 143,
"Year": "2012"
},
{
"Name": "Spectre",
"Actor": "Daniel Craig",
"Running Time": 148,
"Year": "2015"
},
{
"Name": "No Time to Die",
"Actor": "Daniel Craig",
"Running Time": 163,
"Year": "2021"
},
]
}
##print values of running time
times_list = []
##Running Time list
for item in films_info_dic["Films"]:
times=item["Running Time"]
times_list.append(times)
##List of Actors
actor_list = []
for item in films_info_dic["Films"]:
Actors=item["Actor"]
actor_list.append(Actors)
##Remove duplicates
actor_list = list(dict.fromkeys(actor_list))
def get_film_details(actor_name,decade):
films_actor_counter=0
films_decade_counter = 0
##actors
for item in films_info_dic["Films"]:
if item["Actor"] == actor_name:
times = item["Running Time"]
times_list.append(times)
# Mean, median and mode of runnint times list
mean_time = numpy.mean(times_list)
median_time = numpy.median(times_list)
mode_time = mode(times_list)
films_actor_counter=films_actor_counter+1
##write to notepad
with open((actor_name)+".txt", 'w') as f:
f.write(f"The mean running time for {actor_name} is {mean_time}\n")
f.write(f"The median running time for {actor_name} is {median_time}\n")
f.write(f"The mode running time for {actor_name} is {mode_time}\n")
f.write(f"{actor_name} starred in {films_actor_counter} number of films.\n")
##decades
Film_Year=item["Year"]
Film_decade=Film_Year[2]
Test_film=decade[2]
if Film_decade == Test_film:
times = item["Running Time"]
times_list.append(times)
# Mean, median and mode of runnint times list
mean_time = numpy.mean(times_list)
median_time = numpy.median(times_list)
mode_time = mode(times_list)
films_decade_counter=films_decade_counter+1
##write to notepad
with open((decade)+"s.txt", 'w') as f:
f.write(f"The mean running time for {decade}s is {mean_time}\n")
f.write(f"The median running time for {decade}s is {median_time}\n")
f.write(f"The mode running time for {decade}s is {mode_time}\n")
f.write(f"{decade}s had {films_decade_counter} number of films.\n")
##call method for each actor
decade_list =["1960", "1970", "1980", "1990", "2000", "2010", "2020"]
for actor,decade in zip(actor_list, decade_list):
get_film_details(actor,decade)
print(times_list)
print(actor_list)
#Mean, median and mode of runnint times list
mean_time=numpy.mean(times_list)
median_time=numpy.median(times_list)
mode_time=mode(times_list)
print(f"The mean running time is {mean_time}")
print(f"The median running is {median_time}")
print(f"The mode running is {mode_time}")
| 0.43 |
t3_ub2fqt
| 1,650,829,006 |
Python
|
Development of Desktop apps with Python
|
If you are developing desktop apps and are familiar with environment variables and shortcuts, did you realized that there are no packages that would make it easy for cross compatible and easy management of this stuff ?
After searching and making my own package i decided to make it public so it can potentially help somebody with the same stuff i was struggling before, feel free to check it out:Github: [https://github.com/jiri-otoupal/pycrosskit](https://github.com/jiri-otoupal/pycrosskit)
If you would star my repo for the work I do, it would make my day much better :)
I will be glad if it will make your life easier, Cheers !
| 0.75 |
t3_ub2c8w
| 1,650,828,730 |
Python
|
Weekly Code - Week 4: Digit Subtraction!
|
This week I decided to use OEIS entry A185107: difference of digits of the nth prime. This one is pretty exciting, and I think I may make a library featuring this Digit Subtraction and what not. It's fairly compelling. I don't know what I'd use it for, but I'm sure there'd be some kind of use out there.
This week is documented here:
[https://youtu.be/pHip9F5H8Zc](https://youtu.be/pHip9F5H8Zc)
[https://github.com/F35H/WeeklyCode](https://github.com/F35H/WeeklyCode)
Here's the OEIS entry:
[https://oeis.org/A185107](https://oeis.org/A185107)
| 0.67 |
t3_ub1ppc
| 1,650,826,915 |
Python
|
I made a game that let's you play any MIDI file with arrow keys!
|
Video Preview: [https://streamable.com/zhc909](https://streamable.com/zhc909)
It's like dance dance revolution but you can play any song you want, all you need is a midi file. You can specify which instruments you want to play on each difficulty in JSON files.
Source code: [https://github.com/ravenkls/Midi-Arrow-Rush](https://github.com/ravenkls/Midi-Arrow-Rush)
| 1 |
t3_ub1p3g
| 1,650,826,868 |
Python
|
Possible career in Python as a Bilingual
|
Hi! I am working right now as a bilingual for Spanish and English in a tech company. I don't have skills in tech such as programming etc. But just recently I decided to study Python to upskill myself and have greater opportunities. But I am not sure if there's a career such as a software developer where I could still use my skill as a Bilingual.
Hoping for your insight.
Thanks
| 0.44 |
t3_uazva3
| 1,650,821,777 |
Python
|
I am intermediate, how to take python (programming skills) to next level?
|
About me: I know basic programming and problem solving. I already made 2 websites (basic todo-app) using python (Django) as backend and free web templates for frontend. I also made some basic projects with MySQL and python. Made some spammer bots with [selenium](https://selenium-python.readthedocs.io/). I worked with file creation and manipulation. Most of the times I use functions (I'm not comfy with classes)
But, at this stage, it feels `something's` off.. I don't know what.. but it feels like I'm stuck at this level.
(*I don't have a job*)
| 0.83 |
t3_uazm1g
| 1,650,821,027 |
Python
|
Set Types in Python β set, frozenset [Documentation - made easy to read]
|
nan
| 0.75 |
t3_uaz839
| 1,650,819,918 |
Python
|
Game of life
|
Hi,
I've build a small "Game of Life" project, using pygame for display, based first on Conway's rules, and then many other rules (\~20 for now).
It's available on PyPI:
[https://pypi.org/project/conway-pygame/](https://pypi.org/project/conway-pygame/)
and on gitlab.com:
[https://gitlab.com/frague59/conway](https://gitlab.com/frague59/conway)
Enjoy !
| 0.8 |
t3_uaxzr5
| 1,650,816,367 |
Python
|
The Python Graph Gallery
|
nan
| 0.97 |
t3_uaxm35
| 1,650,815,307 |
Python
|
Useful tricks with pip install URL and GitHub
|
nan
| 0.57 |
t3_uawxuo
| 1,650,813,388 |
Python
|
How to use MicroPython on Docker!
|
nan
| 0.84 |
t3_uawlsz
| 1,650,812,439 |
Python
|
Speeding up python CLI's!
|
so yesterday I was trying to make a python CLI that needed to be fast.
no matter what I did (`python -S`, pyinstaller, cx_freeze, bytecode compiling) it wouldnt be as fast as I needed it and some even made it slower like cx_freeze.
well I found a way to make running it much much faster (nearly instantaneous).
by using an asynchronous socket server and using netcat as input, you can give input to the server and recieve output immediately, since the script is already running
it works for windows and linux, but you may need cygwin on windows unless there is a built in timeout and netcat command I do not know about
how it works (on linux) is you define a bash function with this:
`hithere(){ printf "$@" | timeout 0.1 nc 127.0.0.1 50200; }`
and run the script:
`python pyspeedtest.py`
to send input you run `hithere Mum` and you get `hi, Mum`
pyspeedtest.py
```
import pyspeed
class myhandler(pyspeed.pyspeed_handler):
def handle_request(self, *argv):
return f"hi, {argv[1]}"
handle = myhandler()
handle.run()
```
pyspeed.py
```python
import asyncio, socket
class pyspeed_handler:
async def run_server(self, address, port, handle):
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind((address, port))
server.listen(8)
server.setblocking(False)
loop = asyncio.get_event_loop()
while True:
client, _ = await loop.sock_accept(server)
loop.create_task(handle(client))
async def handle_client(self, client):
loop = asyncio.get_event_loop()
request = None
try:
while request != 'quit':
request = (await loop.sock_recv(client, 255)).decode('utf8')
response = self.handle_request(*([''] + str(request).split(' '))) + '\n'
await loop.sock_sendall(client, response.encode('utf8'))
client.close()
except BrokenPipeError:
pass
def handle_request(self, *argv):
return ''.join(argv)
def run(self, address="localhost", port=50200):
asyncio.run(self.run_server(address, port, self.handle_client))
```
```
| 0.6 |
t3_uavrnn
| 1,650,809,995 |
Python
|
ga-extractor - CLI tool for extracting Google Analytics data
|
Hi /r/Python,
I've created a simple CLI tool in Python for extracting Google Analytics data. It can be handy if you want to retrieve some analytics data without dealing with Google's APIs.
The tool can also transform the data into more readable CSV output.
PyPI package: https://pypi.org/project/ga-extractor/
GitHub repository: https://github.com/MartinHeinz/ga-extractor
Feedback is very much appreciated!
| 0.92 |
t3_uau4ci
| 1,650,804,648 |
Python
|
Get total time spent watching movies logged on to Letterboxd
|
[Github Link \[Letterboxd Movie Runtimes\]](https://github.com/HighnessAtharva/Letterboxd-Movie-Runtimes)
You can now get the total time you have spent watching all the movies that you have logged on your Letterboxd Profile and export it to a CSV using this simple Python Script.
Could not find a tool on the internet that did this for me so I built it myself. Enjoy :)
| 0.83 |
t3_uau2nl
| 1,650,804,488 |
Python
|
Logging facility for Python - Documentation, made easy to read
|
nan
| 0.38 |
t3_uatomd
| 1,650,803,132 |
Python
|
Building a Soccer Shot Map for Spain
|
Salve Jason and the Pythonauts!
I've created a tutorial on building a shot map for soccer games. It uses data from Statsbompy and my own library of todofcpy. You can view it here:
[https://www.youtube.com/watch?v=99FVmANPNXI](https://www.youtube.com/watch?v=99FVmANPNXI)
| 0.88 |
t3_uatfhp
| 1,650,802,234 |
Python
|
borb vs fpdf2 - comparing 2 PDF generation libs: features & benchmark
|
nan
| 0.81 |
t3_uasf5r
| 1,650,798,393 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.