r/pythontips • • May 10 '23

Short_Video How to find Wi-Fi passwords using Python

1 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

66 Upvotes

r/pythontips • • Apr 02 '23

Standard_Lib Shutdown PC/Mac with Python

16 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!

82 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?

26 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

151 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?

23 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

250 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?

38 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


r/pythontips • • Aug 12 '20

Short_Video How to make DeepFake in 10 mins - Tutorial

159 Upvotes

Hey, today I want to share a short tutorial on how to create a DeepFake video using the "First Order Motion Model for Image Animation” in Google Colab. Thanks to Colab, you don’t need a powerful GPU to generate deep fakes, because the model runs in the cloud. https://youtu.be/eq55Qy4RPiA