r/Python • u/Itwist101 • Mar 10 '20
r/Python • u/Freddykruugs • Feb 12 '20
Resource NSA just declassified their python training documents
https://nsa.sfo2.digitaloceanspaces.com/comp3321.pdf
One of the best all-in-one resources I've ever found. It starts from basics and goes all the way up to an advanced level. I would check this out, even if you're not a beginner.
r/Python • u/Far-Simple189 • Dec 06 '22
Discussion at 44, I am struggling on Python for two months now but I keep at it. 2 hours a night, after the kids sleep, I work on it and will eventually be able to use it to get a better job, a better life for them.
you got to accept to be bad at something to be good at it, right?
Right? OK, I'll confess... I am posting here anonymously to ...IDK... find support, I guess. .. I can't give up.. for my kids, I need to succeed.
I've done this and I am a bit proud. Very small step for you but for me, it is a big step.
def blackjackbis(n1:int, n2:int, n3:int) -> int:
if sum((n1,n2,n3)) <= 21:
return sum((n1,n2,n3))
elif sum((n1,n2,n3))-10 <= 21 and 11 in (n1,n2,n3):
return sum((n1,n2,n3)) - 10
else:
return "Bust"
thanks
r/Python • u/janusc17 • Oct 13 '20
Beginner Showcase Made this tool with python and my son now hates me
I use it to generate endless random basic math questions for him to practice =)
r/Python • u/lambda5x5 • May 19 '20
I Made This After having this idea a while back and seeing yesterday's post with arduino controlled auto ambient lighting, I creating my own version with python!
r/Python • u/RavenHustlerX • Jan 01 '21
Resource Spent 9hrs finding a bug yesterday, took 15mins to figure it out today
I spent the whole day finding a bug yesterday, couldn't find it at the end of the day and got a headache due to stress. Woke up today and found the bug 15 mins after.
Worrying about the delay in the project fogged my mind and I couldn't think logically, blind to different possibilities.
Taking a break and having a clear mind is very important. This has happened to me a couple of times so decided to post this here today to remember not to repeat this ever lol.
Edit: Thanks for the award kind stranger. I thought this was more of a personal problem, reading all the comments I'm happy to know I'm not alone. I feel more normal now 🙂.
r/Python • u/opensourcecolumbus • Jun 01 '21
Discussion It takes a village to build an open-source project and a single a**hole to demotivate everyone NSFW
I am a contributor to Open-Source software(Jina - an AI search framework) and I am annoyed with how some people make fun of the sheer hard work of open-source developers.
For the last 1 yr, we had made our contributors team meetings public(everyone could listen and participate during the meeting). And this is what happened in our last meeting - While we were sharing news about upcoming Jina 2.0 release in the zoom meeting, some loud racist music starts playing automatically and someone starts drawing a d*ck on the screen.
Warning: This video is not suitable to watch for kids or at work
It was demotivating to say the least.
Building open-source project is challenging at multiple fronts other than the core technical challenges
Understand what needs to be built
Improve that continuously
Help people understand the project
Educate people about the domain
Reach out people who might benefit from your project
Collaborate with other contributors
Deal with issues/PRs
Deal with outdated versions/docs
Deal with different opinions
Sometimes deal with jerks like the ones who zoombombed us
The list is long! Open-source is hard!
Open-source exists because of some good people out there like you/me who care about the open-source so deeply to invest their time and energy for a little good for everyone else. It exists because of communities like r/python where we can find the support and the motivation. e.g. via this community, I came to know of many use cases of my project, problems and solutions in my project, and even people who supported me build it.
I wanted to vent out my negative experiences and wanted to say a big **Thank you** to you all open-source people, thanks to many(1.6k) contributors who made it possible for us to release [Jina 2.0](https://github.com/jina-ai/jina/) 🤗.
I'd want to know your opinion, how do you deal with such unexpected events and how do you keep yourself motivated as an open-source developer?
r/Python • u/the_neptunian • Mar 21 '19
I Made This Made something similar to Apple's Animojiâ„¢ using Python
r/Python • u/[deleted] • Feb 23 '20
I Made This I made a recursive maze solver in Python
r/Python • u/[deleted] • Nov 13 '20
News Python swallows Java to become second-most popular programming language
r/Python • u/marmaladeontoast • Sep 19 '17
Every article about python decorators be like...
r/Python • u/[deleted] • Apr 14 '20
I Made This I made a python script to download subtitles for your movies...
r/Python • u/EvilDMP • Nov 13 '19
Cool BrachioGraph, an ultra-cheap Python-powered drawing machine
r/Python • u/Traditional_Yogurt • Feb 04 '21
Resource I made a Finance Database with over 180.000 tickers to make Investment Decisions easier
In my spare time I like to go through financial data to understand what kind of companies exist, how sectors and industries evolve and to test theoretical frameworks. However, I found that it required a lot of effort to figure out which companies belong to which industry and I often ran into paywalls that blocked me from accessing the exact data I was looking for. Platforms like Bloomberg offer such services but at ridiculous prices (up to $24.000 a year). This can make investment decisions for the retail investor rather difficult especially if you don't want to follow 'the herd'. I wanted to change that.
Insert the FinanceDatabase. A database of over 180.000 symbols (80k+ companies, 15k+ ETFs, 30k+ Funds, 3k+ Cryptocurrencies and more) that is fully categorised per country, industry, sector, category and more. It features a 'Searcher' package (pip install FinanceDatabase) that has a user-friendly way of collecting the exact data you want (downloaded straight from the repository). For example, the following code returns all (listed) airlines in the United States (check Examples for more info) :
import FinanceDatabase as fd
airlines_us = fd.select_equities(country='United States', industry='Airlines')And the following gives insights in ETFs that have anything to do with 'semiconductor':
import FinanceDatabase as fd
all_etfs = fd.select_etfs()
semiconductor_etfs = fd.search_products(all_etfs, 'semiconductor')What I explicitly am not trying to do is re-invent the wheel (again) of Fundamental Data gathering as there are tons of packages out there that do that already (i.e. FundamentalAnalysis, yfinance, sec-edgar) but instead allow you to capture sector, industries, specific types of ETFs or cryptocurrencies that would have otherwise resulted in a lot of manual work. Then, when you have this sub-selection you can make use of the earlier mentioned packages.
If you want to know what is available inside the Database, please have a look here. Alternatively, you can do the following (an example):
import FinanceDatabase as fd
equities_countries = fd.show_options('equities','countries') # or sector/industry
etfs_categories = fd.show_options('etfs')
cryptocurrencies = fd.show_options('cryptocurrencies')I hope this can help some of you out making (better) investment decisions and all feedback (positive and negative) and contribution is much appreciated.
EDIT: Thanks for the rewards and kind words everyone!
r/Python • u/python_engineer • May 24 '20
I Made This I launched my new website with all my free Python and Machine Learning Tutorials (currently 68).
r/Python • u/sanidhya69 • Mar 24 '20
Help I made my handwriting a font on Inkscape and used custom made python script to add random movment (in y axis) for each character. Looks fine or too suspicious?
r/Python • u/jackpick15 • Apr 24 '20
I Made This I wrote a program on python to show how the number of swearwords differs across each breaking bad episode to see if there was any kind of correlation - turns out there isn't and this was a complete flop
r/Python • u/Chemomechanics • Nov 25 '19
A fitting curve that "boings" into place (and a digression into spring-mass-dampers, vibration and control theory, and integral transforms)
r/Python • u/[deleted] • Mar 24 '21
Discussion Python made me look like a WIZARD
Today in work a request comes in for 745 headshots that need to be processed to fit 150x150px for an external platform. One team says it'll take them at least a week to do, the other team says they don't want it as it'll take even longer.
"They need them all black and white! It'll take some time to convert them! They're not even all the same size! UGH this just can't be done in the 2 days they've requested this!!!"
12 lines of code, the Pillow library and exactly 8.856 seconds of running said code... It was done. Panic over. Client happy.
I work in a design team but I'm a job coordinator (so I sort the jobs and make sure the right designers get them). They were amazed it was done so quickly without using Photoshop.
They asked how. I gave them the answer.
Python baby 😎
EDIT
For those wanting to know the code, here it is:
from PIL import Image
import os
for f in os.listdir('Input'):
if f.endswith('.jpg'):
im = Image.new('RGB', (150, 150), (255,255,255))
im2 = Image.open('Input/{}'.format(f))
im2 = im2.convert("L")
width, height = im2.size
im.paste(im2, (int((150 - width) / 2), 0))
fn, fext = os.path.splitext(f)
im.save('Output/{}.jpg'.format(fn))The images given were either 150x150 already (but in colour) or 120x150. So had to cover all bases with this. If it could be made more efficient, let me know!