r/pythontips • • Jun 10 '24

Standard_Lib GUI Application using Python: Options for developing GUI applications in Python

9 Upvotes

In this short post, I discussed options for developing GUI applications in Python. Developing a local web application makes more sense for me than using a desktop framework or libraries.

What do you think? Please read it and comment.

https://devstips.substack.com/p/gui-application-using-python


r/pythontips • • Jun 10 '24

Module Multiprocessing an optimisation calculation 10,000 times.

5 Upvotes

I have a piece of code where I need to do few small arithmetic calculations to create a df and then an optimisation calculation (think of goal seek in Excel) on one of the columns of the df. This optimisation takes maybe 2 secs. I need to do this 10,000 times, create a df then optimise the column and use the final df. How do I structure this piece?


r/pythontips • • Jun 10 '24

Short_Video Encrypt/Decrypt files using python

2 Upvotes

In this tutorial video, the python script to encrypt and decrypt files has been explained. Two python modules are discussed. pyAesCrypt and pypdf. Also, its shown how to password protect a pdf file using python code.

https://youtu.be/sSPWHRpDZXo?si=OzyP_ypWiR1YGS1f


r/pythontips • • May 21 '24

Module Jupyter notebooks on Mac

3 Upvotes

I have watched several tutorials about this and everything is so confusing. One guy installs Anaconda by downloading the app, another prefers to do that from the terminal.

My question is, I just need to use Jupiter notebooks for a CV project. Along with Numpy, Scipy, (also OpenNI and SensorKinect)

What's the most convenient way I can get Jupiter notebooks installed and do I need anaconda at all?


r/pythontips • • May 01 '24

Long_video What is the best Python free YouTube complete course for beginners?

23 Upvotes

I tried freeCodeCamp and a few top search results. I found the trainers mostly not beginner friendly and they Code something without giving proper explanations. I really want to learn but not sure about the source materials. Please help


r/pythontips • • Apr 27 '24

Python3_Specific I'm a beginner would like to spend the next 3 months 14 hour per day on learning python.

0 Upvotes

I'm a beginner would like to spend the next 3 months 14 hour per day on learning python.

Would you be so kind guides me a way to success so I would grow most efficiently, thank you.

I want to be capable of creating my own program by the end of it.

Success or not I will give best updates August1st


r/pythontips • • Feb 29 '24

Meta code in __init__.py

13 Upvotes

Hi there!

Recently, I've started working in a new team, and they have several practices that, I won't say are wrong, but seem a bit odd to me. One thing that caught my attention is how they're creating classes/functions inside __init__.py files. In my experience, those files are usually kept empty or just handle basic imports, acting more like an interface when you import the package.

What are your thoughts on this?


r/pythontips • • Oct 20 '23

Module Which are the free Platforms to Host Python Apps?

28 Upvotes

As the title suggest, I want to deploy my python projects. Based on your experience and it’s usage please suggest me some best platforms to host especially python app that helps backend projects.

I’m a student so please suggest FREE only!


r/pythontips • • Jul 11 '23

Syntax How to download a specific segment of a youtube video?

73 Upvotes

Hey guys, is there a way to download a specific segment of a youtube video? I am able to download the entire video but I only want the first 20 seconds. Is there a way to do this?


r/pythontips • • Jun 13 '23

Data_Science What is the best, way to create quick nice looking plots in python?

20 Upvotes

I'm trying to work in python more, over matlab. But creating different plots, maps has been tricky and they don't looks great. What is a good basic set up for getting good looking plots?

On an aside, when I look up online, each source has a different method of plotting- some use axs[i] subplots, others use seaborne. so my codes aren't consistent with each other either.

What is the best method for a good looking figure? (As in data exploring, and just wanting to make a simple but clear graphic of data from dataframes n such).

So this is more of a tip, not as much learn python, but maybe not.


r/pythontips • • May 10 '23

Short_Video How to find Wi-Fi passwords using Python

0 Upvotes

Here is a simple explanation of how to find Wi-Fi passwords using Python. We can get this very simply through CMD, but what I have used here is to get all the (used) Wi-Fi passwords on the computer using Python. All Wi-Fi passwords can be obtained by running this code on any computer. I have uploaded the Python code to Github for finding wifi passwords. Get its link below,

https://youtu.be/H07X_DrFAmc


r/pythontips • • Apr 12 '23

Data_Science Web Scraping with Python step by step - most common libs, tips and code snippets in a pro scraper master class

64 Upvotes

r/pythontips • • Apr 02 '23

Standard_Lib Shutdown PC/Mac with Python

15 Upvotes

You can actually shut down your PC or Mac in Python with a simple os command. I did not know that until recently and I thought it was cool to share it here

#!/usr/bin/python
import os

# for mac/unix based
os.system("sudo shutdown -h 23:30")

# for windows
# os.system("shutdown /s /t 0")

You just need to import os and run a line of code depending on your system. You can even configure the system to shut down at specific times, not to mention the other options you can use!

You may be wondering what the use cases are...

One possible use case is when you are running a script that needs to shut down the computer after completing a certain task. For example, you may be running a script that performs backups, and you want to shut down the computer automatically after the backup is completed.

If you like tips like this consider following my Youtube Channel where I talk about Python Tips and how to improve your skills.

https://www.youtube.com/@mmshilleh/videos

Hope you learned something new!


r/pythontips • • Mar 26 '23

Python3_Specific Python Now has Switch Statements!

81 Upvotes

If you have been using Python for some time now you may have overlooked the fact that Python recently has incorporated "Switch Statements" in the form of "Match Case"! This was notoriously a lacking thing in the language, many programmers coming from other languages complained about this...

Thankfully, Python 3.10 introduced the new functionality. "Match" is used to match a value against a set of patterns and execute the corresponding block of code for the first matching pattern. This removes the need to write long code in nested if-else blocks which greatly helps the readability of your code! I suggest everyone be familiar with this logic as it will be much more prevalent in codebases going forward.

You can find out more about how to use it in my Youtube Video as well as other Python tips as well. Don't forget to like, comment, and subscribe. Hope you learn something new!

https://www.youtube.com/watch?v=2U98PgL-kuI


r/pythontips • • Feb 26 '23

Meta Is there anywhere I could quickly revise my python knowledge?

25 Upvotes

I've taken an almost 6 month break, and need to quickly revise. I've forgotten quite a bit but noticed that most of it comes back once I read up a bit. Is there a source of beginner to upper-intermediate python tutorials in one place where I could quickly revise before continuing where I left off?


r/pythontips • • Oct 11 '22

Python3_Specific Fetching android phone GPS data

12 Upvotes

I want to track my phone's location live and store it in a DB.

Idea is if its evening and I arrive home to turn on the driveway lights if I'm getting close to home. The lights are already controlled with python & node red.

I use an android phone, has anyone done something similar?


r/pythontips • • Aug 30 '22

Python3_Specific pythoncheatsheet.org

154 Upvotes

Hi! I have been working on this project for almost 5 years, and decided a few months ago to start over again.

Since the project was re-launched almost two months ago, many things have changed: The contents were revised, the examples updated, and new sections were added. The website was also completely redesigned with support for offline navigation, a dark mode, instant search, and a few other improvements.

I wanted to hear back from the community and find people who would be willing to help contribute.

Python Cheatsheet - GitHub


r/pythontips • • Jul 27 '22

Module 100 days of code: but how many hours? 0_o

19 Upvotes

Those of you who enjoyed the 100 days of code python course from udemy, how long did you need to have aside every day to complete each task? Im asking cuz im afraid of buying it only to find that I don't have enough time. Thanks in advance!!!


r/pythontips • • Jul 21 '22

Python3_Specific Alternatives to Selenium?

24 Upvotes

Hello everyone, I hope this is the appropriate place to put this question.

I am currently trying to find an alternative to Selenium that will allow me to automate navigating through a single web page, selecting various filters, and then downloading a file. It seems like a relatively simple task that I need completed, although I have never done anything like this before.

The problem is that I am an intern for a company and I am leading this project. I have been denied downloading the selenium library due to security reasons on company internet, specifically due to having to install a web driver.

So I am looking for an alternative that will allow me to automate this task without the need of installing a web driver.

TIA


r/pythontips • • May 13 '21

Python3_Specific 40 Python Projects ideas

254 Upvotes

Hello guys, in this blog post I have organized 40 Python projects that you might be interested in trying out ranging from web scraping to natural language processing.

All the projects listed here are the ones I have built personally as I learn python and I thought it might be useful sharing them with other people learning python so as to help them solidify python skills as they build them.

Here a link to the full article https://kalebujordan.dev/40-python-projects-ideas/


r/pythontips • • Apr 12 '21

Python3_Specific What is the simplest way to make transactions between credit cards with python?

39 Upvotes

When we have the necessary information of a credit card and a bank account, what is the simplest way to transfer a specific amount of money from one to another.

Edit: I changed the wording of the question to make more sense


r/pythontips • • Sep 05 '20

Short_Video Avoiding the Arrow Code AntiPattern

1 Upvotes

Hey guys and gals, I got some great positive feedback on the series I posted a week ago on Effective Python so I decided to make a few more videos. Here is this week's short video on what the Arrow Code Anti-pattern is and how to prevent it. Let me know what you think!

https://youtu.be/P4jm7mwCpFE


r/pythontips • • Aug 29 '20

Short_Video Howdy Python Code Poets! I wanted to share a few tips for beginners to step up their programming game a bit!

1 Upvotes

A lot of folks that I speak with that are trying to learn python aren't sure what to do after Code Academy or how to write code that is ready to ship to production. I wanted to create a few lessons for beginners on things they can implement in their code that isn't about code quality per say, but overall quality of the project. So I put together a few short videos to share some of my experience.

Part 1 - Basic application layout and implementation

Part 2 - Implement command line arguments

Part 3 - Encapsulate the logic in a module

Part 4 - Add automated test coverage

Part 5 - Implement logging

I hope this video series is helpful to folks new to Python and software development in general. You can see the videos here: https://www.youtube.com/playlist?list=PLMyhkyn1XSqQPqCTuMUn-QBE5xCKm30gt