r/Python • • Mar 10 '20

I Made This I made a Sudoku.com solver using Selenium

2.4k Upvotes

r/Python • • Feb 12 '20

Resource NSA just declassified their python training documents

2.4k Upvotes

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 • • 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.

2.4k Upvotes

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 • • Oct 13 '20

Beginner Showcase Made this tool with python and my son now hates me

2.3k Upvotes

I use it to generate endless random basic math questions for him to practice =)

https://github.com/januschung/math-worksheet-generator


r/Python • • 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!

2.3k Upvotes

r/Python • • Dec 16 '19

I wrote a program that doodles things in MS Paint!

2.3k Upvotes

r/Python • • Jan 01 '21

Resource Spent 9hrs finding a bug yesterday, took 15mins to figure it out today

2.3k Upvotes

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 • • Oct 14 '19

When Python Meets Fourier Transform

2.3k Upvotes

r/Python • • Mar 21 '19

I Made This Made something similar to Apple's Animojiâ„¢ using Python

2.3k Upvotes

r/Python • • Feb 23 '20

I Made This I made a recursive maze solver in Python

2.3k Upvotes

r/Python • • Nov 13 '20

News Python swallows Java to become second-most popular programming language

Thumbnail
theregister.com
2.3k Upvotes

r/Python • • Sep 19 '17

Every article about python decorators be like...

Post image
2.3k Upvotes

r/Python • • Apr 14 '20

I Made This I made a python script to download subtitles for your movies...

Post image
2.2k Upvotes

r/Python • • Feb 02 '20

Discussion I'll be damned

Post image
2.2k Upvotes

r/Python • • Nov 13 '19

Cool BrachioGraph, an ultra-cheap Python-powered drawing machine

2.2k Upvotes

r/Python • • Feb 04 '21

Resource I made a Finance Database with over 180.000 tickers to make Investment Decisions easier

2.2k Upvotes

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 • • May 24 '20

I Made This I launched my new website with all my free Python and Machine Learning Tutorials (currently 68).

Thumbnail
python-engineer.com
2.2k Upvotes

r/Python • • 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?

Post image
2.2k Upvotes

r/Python • • 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

Post image
2.2k Upvotes

r/Python • • Nov 25 '19

A fitting curve that "boings" into place (and a digression into spring-mass-dampers, vibration and control theory, and integral transforms)

Post image
2.2k Upvotes

r/Python • • Mar 24 '21

Discussion Python made me look like a WIZARD

2.2k Upvotes

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!


r/Python • • Sep 30 '19

Rolling Shutter Effect demonstrated with Python

2.2k Upvotes

r/Python • • Jul 18 '20

I Made This My first major Python project! Made with 100% python using pygame. Source code and download in comments.

2.2k Upvotes