r/Python • • Jul 30 '21

News Texas Instruments’ new calculator incorporates popular Python programming language

Thumbnail
dallasnews.com
1.5k Upvotes

r/Python • • Apr 28 '21

Discussion The most copied comment in Stack Overflow is on how to resize figures in matplotlib

Thumbnail
stackoverflow.blog
1.5k Upvotes

r/Python • • Oct 27 '20

News I wrote a beginner's book about Python. Pay what you like, or nothing.

1.5k Upvotes

I've written programming textbooks for beginners before, about OCaml and Haskell, but this is the first time I've written about an imperative language, and I would love for you to have a look at it. It's available on Amazon as a printed book ($19.99) and Kindle book ($9.99):

https://www.amazon.com/Python-Very-Beginning-exercises-answers/dp/0957671156/

It's also available as a DRM-free PDF, for $9.99:

https://www.pythonfromtheverybeginning.com

If you can't afford $9.99, please contact me using the contact form on the website telling me how much you can afford, or letting me know you can't afford it at all. I will send it to you by email. This process will be manual, not immediate! But I will try to be as quick as I can.


r/Python • • Aug 01 '20

Resource "Automate the Boring Stuff with Python" online course is free to sign up for the next few days with code

1.5k Upvotes

https://inventwithpython.com/automateudemy (This link will automatically redirect you to the latest discount code.)

You can also click this link or manually enter the code: COPSHOTMEINPORTLAND2

https://www.udemy.com/course/automate/?couponCode=COPSHOTMEINPORTLAND2

This promo code works until August 4th (I can't extend it past that). Sometimes it takes an hour or so for the code to become active just after I create it, so if it doesn't work, go ahead and try again a while later. I'll change it to COPSHOTMEINPORTLAND2 on the 4th.

Udemy has changed their coupon policies, and I'm now only allowed to make 3 coupon codes each month with several restrictions. Hence why each code only lasts 3 days. I won't be able to make codes after this period, but I will be making free codes next month. Meanwhile, the first 15 of the course's 50 videos are free on YouTube.

You can also purchase the course at a discount using my code COPSHOTMEINPORTLAND2 or clicking https://inventwithpython.com/automateudemy to redirect to the latest discount code. I have to manually renew this each month (until I get that automation script done). And the cheapest I can offer the course is about $16 to $18. (Meanwhile, this lets Udemy undercut my discount by offering it for $12, and I don't get the credit for those referral signups. Blerg.)

Frequently Asked Questions: (read this before posting questions)

  • This course is for beginners and assumes no previous programming experience, but the second half is useful for experienced programmers who want to learn about various third-party Python modules.

  • If you don't have time to take the course now, that's fine. Signing up gives you lifetime access so you can work on it at your own pace.

  • This Udemy course covers roughly the same content as the 1st edition book (the book has a little bit more, but all the basics are covered in the online course), which you can read for free online at https://inventwithpython.com

  • The 2nd edition of Automate the Boring Stuff with Python is now available online: https://automatetheboringstuff.com/2e/

  • I do plan on updating the Udemy course for the second edition, but it'll take a while because I have other book projects I'm working on. Expect that update to happen in mid- or late-2020. If you sign up for this Udemy course, you'll get the updated content automatically once I finish it. It won't be a separate course.

  • It's totally fine to start on the first edition and then read the second edition later. I'll be writing a blog post to guide first edition readers to the parts of the second edition they should read.

  • I wrote a blog post to cover what's new in the second edition

  • You're not too old to learn to code. You don't need to be "good at math" to be good at coding.

  • Signing up is the first step. Actually finishing the course is the next. :) There are several ways to get/stay motivated. I suggest getting a "gym buddy" to learn with.


r/Python • • Nov 24 '19

I cross-stitched the Python logo!

Post image
1.5k Upvotes

r/Python • • Apr 25 '21

Tutorial Stop hardcoding and start using config files instead, it takes very little effort with configparser

1.5k Upvotes

We all have a tendency to make assumptions and hardcode these assumptions in the code ("it's ok.. I'll get to it later"). What happens later? You move on to the next thing and the hardcode stays there forever. "It's ok, I'll document it.. " - yeah, right!

There's a great package called ConfigParser which you can use which simplifies creating config files (like the windows .ini files) so that it takes as much effort as hardcoding! You can get into the hang of using that instead and it should both help your code more scalable, AND help with making your code a bit more maintainble as well (it'll force you to have better config paramters names)

Here's a post I wrote about how to use configparser:

https://pythonhowtoprogram.com/how-to-use-configparser-for-configuration-files-in-python-3/

If you have other hacks about managing code maintenance, documentation.. please let me know! I'm always trying to learn better ways


r/Python • • Jan 14 '20

Visualisation of different path finding algorithms

1.5k Upvotes

r/Python • • Mar 13 '18

Python surpasses C# in popularity among developers

Thumbnail
insights.stackoverflow.com
1.5k Upvotes

r/Python • • Mar 24 '18

A path finder i recently made in Python PyGame

1.5k Upvotes

r/Python • • Feb 22 '23

Resource Spent Months Writing A Web Dev Course For A Platform, But It Got Canceled Midway. Publishing It Free For The Community.

Thumbnail
leanpub.com
1.5k Upvotes

r/Python • • Mar 25 '21

Tutorial Google Translate, but for Sign Language - I used Python and OpenCV AI Kit to perform Sign Language Detection.

Thumbnail
youtu.be
1.5k Upvotes

r/Python • • May 05 '18

Just finished my graduation cap for tomorrow

Post image
1.5k Upvotes

r/Python • • Feb 09 '21

Resource I wrote a song about everyone's favorite Python Enhancement Proposal

Thumbnail
youtube.com
1.5k Upvotes

r/Python • • Oct 31 '18

My Halloween Facepaint - Scary huh?

Post image
1.5k Upvotes

r/Python • • Jul 21 '19

Physics simulator with rotation and collision I made with Python. If you dropped your phone, and it just kept bouncing!

1.5k Upvotes

r/Python • • Jun 05 '19

Win10 is going to start including Python 3.7

Thumbnail
blog.adafruit.com
1.5k Upvotes

r/Python • • Jun 16 '20

I Made This Developed a 'personal home assistant' whatsapp bot to control an appliance (lamp in this case)

1.5k Upvotes

r/Python • • Mar 14 '20

I Made This I am just a beginner in programming. Today I have created my first ever project (Simple Calculator) with Python GUI Tkinter. Thank you for this great community for inspiring me so much.

Post image
1.5k Upvotes

r/Python • • Jun 07 '20

I Made This Training a neural net on 7 years of text messages became surprisingly self aware

Post image
1.5k Upvotes

r/Python • • Oct 28 '20

Discussion Out of curiosity, how many of you guys started your journey with 'Automate the boring stuff'?

1.5k Upvotes

r/Python • • Jul 04 '21

Intermediate Showcase New search engine made with Python that's anonymous and has no ads or tracking. It tries to fight spam, and gives you control of how you view search results. You can search and read content anonymously with a proxied reader view. The alpha is live and free for anyone to use at lazyweb.ai

1.5k Upvotes

https://lazyweb.ai

We're a little two-person team (Angie and Jem). We're bootstrapping and self-funded. I'm the programmer.

I wanted to share it because it was a fun and interesting project to build, and Python made it possible for us to get a long way as a small team. It uses serverless on the backend (AWS). We're using Spacy and GPT-2, and some PyTorch models. It uses BeautifulSoup for spidering/crawling/content retrieval. The front-end is React.

It has a different type of user interface to any other search engine, as it is chat based. And it lets you choose how you view results, either visually like an Instagram feed or cards, or minimal like Hacker News or the old Google. It tries to fight SEO spam and strips out ads and ad-tech from search results.

We have a project on GitHub with Jupyter notebooks and sample data with experiments and scripts, including examples of querying other search APIs, and to generate example utterances programatically to use for NLP models with sources like Wikipedia, StackOverflow and Wolfram|Alpha:

https://github.com/lazyweb-ai/lazyweb-experiments

We're only a small team but hope to share more of our work as open source as we progress.


r/Python • • Nov 28 '20

Intermediate Showcase "Sillynium" - Auto generate working Python Selenium scripts by drawing coloured rectangles around web elements on a page that you want to automate

1.5k Upvotes

TLDR: 60 sec video here:https://streamable.com/1y17lt

TLDW: When I want to automate actions on a site, such as logins or forms, or scraping pages with JavaScript, I manually inspect each web element I need and begin writing a script.

I'm lazy though and had the idea to automate the creation of these automation/testing scripts. And thus "Sillynium" was born.

Sillynium allows you to draw boxes around the elements you require on a page and automatically gets the element and its properties for you. Different coloured rectangles tell the program you want to do different things. Eg: Red means "Input text", Green means "Click button".

When you've finished drawing boxes, a working python selenium script is generated. If you run that script, it does exactly what you told it to do! All this without you writing any code, and losing time.

Working 60 second video link of program in action: https://streamable.com/1y17lt

I made this project over the course of a day as a quick and dirty proof of concept. Its very flawed in its current iteration (taking a screenshot of webpage), so V2 I'm trying to figure out how to draw directly to the browser. Critique it and rip it to shreds. I'm aware of browser recorders btw so I know those exist, this is my twist on automation

Edit: I was not prepared for the amount of interest in this little proof of concept! So thank you all very much for your time you’ve made my day :)

In the interest of transparency and to answer your questions about the code and my plans:

I originally thought about monetisation (web extension etc) after finishing this POC (**sigh i know I’m a greedy bastard) but now I’m in 2 minds about it!

On the one hand I want to make it free for personal use, on the other hand I’d like to potentially charge for commercial use (once its finished).

Final edit 2 The community has spoken, I WILL BE RELEASING THIS VERSION AS OPEN SOURCE! I did some light refactoring, and have added it to a repo which will be shared in a follow up. It shows the POC and the community is welcome to build on the original idea :)

I will create a follow up post with links to repo once I’ve created it, this will be my first project on GitHub so try be nice ;) pretty nervous about sharing my code :D

Thank you all for your patience, interest, and awesome discussions


r/Python • • Jun 30 '19

A terminal youtube playlist music player - because terminal applications are minimal and running a web browser is an overkill to listen to music

Post image
1.5k Upvotes

r/Python • • Jun 19 '22

Intermediate Showcase Today I’m releasing PyBoy v1.5.0! A Game Boy emulator written in Python, focused on scripting, AI and learning

1.5k Upvotes

Back in 2015, it started as a university project. About 2 years ago, I released v1.0.0 to the public, and it really took off! We ended up trending on GitHub and got picked up by Hackaday!

It's been awesome to see people using the emulator for various projects, like beating the world record in Tetris, Discord and Twitch bots, and something entirely unique.

Since the first release, I've had the privilege that three groups of students at the University of Copenhagen have helped me work on the project. They've implemented a feature to rewind time, emulate Link Cables (not merged on master), and most recently Game Boy Color support.

https://github.com/Baekalfen/PyBoy

What is PyBoy

In short, it’s a Game Boy emulator written from scratch in pure Python, with additional support for scripting through an API. We’ve added type definitions, which allows us to compile the software using Cython to get performance comparable to emulators written in C and C++.

Installation

The instructions are simple, if you already have a functioning Python environment on your machine.

  1. Install PyBoy using pip install pyboy

  2. If your system isn't supported by pysdl2-dll, you'll need to install SDL2 from your package manager.

Features

PyBoy is designed to be accessible from Python, so we support and encourage people who want to make experiments, bots or AI’s to try it out. We are building game-specific wrappers, which at the moment allows programmers to interface with Tetris and Super Mario Land, without any intricate knowledge of the Game Boy. Documentation can be found at: https://docs.pyboy.dk .

Feedback, Contribute, Learn

We’d love to hear your feedback, and see the projects you wish to use PyBoy for! We will do our best to make it happen.

Please give any feedback in the comments below, on our Discord server or create issues/pull-requests on GitHub if you wish.

And a special thanks to the people on Discord, who were a great motivational factor in all of this (in no specific order): krs013, jan0809, Lyfe, kr1tzy, Nico, MLGxPwnentz, mr_seeker, Sky, Travis Scott Burger, Whippersnatch Pumpkinpatch, AutoMathis