sub
stringclasses 1
value | title
stringlengths 7
303
| selftext
stringlengths 0
8.65k
| upvote_ratio
float64 0.08
1
| id
stringlengths 9
9
| created_utc
float64 1.65B
1.65B
|
---|---|---|---|---|---|
Python | Daily dose of Python | I've been creating small posts about slightly more advanced Python topics lately. They are all available in [https://jerry-git.github.io/daily-dose-of-python/](https://jerry-git.github.io/daily-dose-of-python/).
The episodes so far:
1. [Union vs TypeVar](https://jerry-git.github.io/daily-dose-of-python/doses/1/)
2. [contextmanager from contextlib](https://jerry-git.github.io/daily-dose-of-python/doses/2/)
3. [Modern Python web stack](https://jerry-git.github.io/daily-dose-of-python/doses/3/)
4. [Exhaustiveness checking with mypy](https://jerry-git.github.io/daily-dose-of-python/doses/4/)
5. [PEP 673 Self Type](https://jerry-git.github.io/daily-dose-of-python/doses/5/)
6. [Final qualifier](https://jerry-git.github.io/daily-dose-of-python/doses/6/)
7. [apischema](https://jerry-git.github.io/daily-dose-of-python/doses/7/)
8. [Static duck typing via Protocol](https://jerry-git.github.io/daily-dose-of-python/doses/8/)
9. [dirty-equals](https://jerry-git.github.io/daily-dose-of-python/doses/9/)
And countless more to come 😉
The site itself is mkdocs based static website which is hosted as GitHub pages. Here's the [GitHub repo](https://github.com/jerry-git/daily-dose-of-python). | 0.97 | t3_tj9tz1 | 1,647,862,900 |
Python | How to Deploy a TensorFlow Model as a RESTful API Service | 0.79 | t3_tj8uzz | 1,647,859,275 |
|
Python | oneFace: Generating interfaces(CLI, Qt GUI, Dash web app) from a Python function. | oneFace can generate CLI, Qt GUI and Dash web app at the same time from a Python function. Just mark the function parameters with type and range, for example:
from oneface import one, Arg
@one
def bmi(name: Arg(str),
height: Arg(float, [100, 250]) = 160,
weight: Arg(float, [0, 300]) = 50.0):
BMI = weight / (height / 100) ** 2
print(f"Hi {name}. Your BMI is: {BMI}")
return BMI
# run cli
bmi.cli()
# or run qt_gui
bmi.qt_gui()
# or run dash web app
bmi.dash_app()
These code will generate the following interfaces:
[CLI](https://preview.redd.it/nrgkxp68cpo81.png?width=536&format=png&auto=webp&s=58c872f37c513fc5d2dd120e77065795479455a8)
​
[Qt GUI](https://preview.redd.it/c5xrs7lccpo81.png?width=212&format=png&auto=webp&s=5fce4feaa5bec5298e35df574a50b3b72904da64)
​
[Dash web app](https://preview.redd.it/nxylugpdcpo81.png?width=610&format=png&auto=webp&s=8df8d72bc95c151caba500c532257c33dfcd0d4e)
## Other features
* Automatically check the type and range of input parameters and pretty print them.
* Easy extension of parameter types and GUI widgets.
## Application and Limitations
Provides interfaces to programs in a very simple way. For example converting functions directly into a web apps for people who don't know how to use the command line. The limitation is that it is only suitable for creating simple interfaces.
## Links
* Repo: [https://github.com/Nanguage/oneFace](https://github.com/Nanguage/oneFace)
* Documentation: [https://oneface.readthedocs.io/en/latest/](https://oneface.readthedocs.io/en/latest/)
## Similar Projects
* [Fire](https://github.com/google/python-fire): Generate CLI from Python objects.
* [Gooey](https://github.com/chriskiehl/Gooey): Turn (almost) any Python 3 Console Program into a GUI application with one line. | 0.9 | t3_tj7d1w | 1,647,853,109 |
Python | Performance testing FastAPI ML APIs with Locust | Rubik's Code | 0.76 | t3_tj6v1x | 1,647,850,944 |
|
Python | Why venv? | I'm new to Python and haven't worked with virtual environments before. I've seen a lot of folks utilising venv and was confused. I searched the web, but I couldn't comprehend much of it. I have a question that I'd want every one of you to answer.
1. Why venv? | 0.82 | t3_tj32vd | 1,647,835,530 |
Python | Codecat | CodeCat is an open-source tool to help you find/track user input sinks and security bugs using static code analysis. These points follow regex rules. [https://github.com/CoolerVoid/codecat](https://github.com/CoolerVoid/codecat) | 0.76 | t3_tj2g24 | 1,647,833,363 |
Python | LinkedIn Researchers Open-Source ‘FastTreeSHAP’: A Python Package That Enables An Efficient Interpretation of Tree-Based Machine Learning Models | Researchers from LinkedIn open-source the FastTreeSHAP package which is a Python module based on the paper ‘[Fast TreeSHAP: Accelerating SHAP Value Computation for Trees](https://arxiv.org/abs/2109.09847).’ Implementing the widely-used TreeSHAP algorithm in the SHAP package allows for the efficient interpretation of tree-based machine learning models by estimating sample-level feature significance values. Its package includes two new algorithms: FastTreeSHAP v1 and FastTreeSHAP v2, both of which improve TreeSHAP’s computational efficiency by taking a different approach.
The empirical benchmarking tests show that FastTreeSHAP v1 is 1.5x faster than TreeSHAP while keeping memory costs the same, and FastTreeSHAP v2 is 2.5x faster while using slightly more memory. The FastTreeSHAP package fully supports parallel multi-core computing to speed up its computation.
[**Continue Reading The Full Summary Article**](https://www.marktechpost.com/2022/03/20/linkedin-researchers-open-source-fasttreeshap-a-python-package-that-enables-an-efficient-interpretation-of-tree-based-machine-learning-models/)
Paper: https://arxiv.org/pdf/2109.09847.pdf
Github: https://github.com/linkedin/fasttreeshap | 0.76 | t3_tj1koz | 1,647,830,519 |
Python | I created a self-hosted security camera system | I don't like the idea of having to stream my video camera feeds to the cloud, so I created a privacy-focused, self-hosted security camera system using python!
[https://github.com/scottbarnesg/smart-sec-cam](https://github.com/scottbarnesg/smart-sec-cam)
Some key features:
* Multi-camera support w/ minimal configuration. Supports USB cameras and the Raspberry Pi camera module.
* Motion detection that automatically saves videos and lets you view them in the web app.
* Encrypted in transit, both from the cameras to the server and the server to your browser.
* Self-hosted and FOSS | 0.96 | t3_tizhpw | 1,647,823,860 |
Python | Monday Daily Thread: Project ideas! | Comment any project ideas beginner or advanced in this thread for others to give a try! If you complete one make sure to reply to the comment with how you found it and attach some source code! If you're looking for project ideas, you might be interested in checking out Al Sweigart's, ["The Big Book of Small Python Projects"](https://inventwithpython.com/bigbookpython/) which provides a list of projects and the code to make them work. | 0.67 | t3_tiyhw1 | 1,647,820,810 |
Python | Live Python Course from computer science professor on Cyber Insecurity Youtube Channel | If anyone wants to learn Python from a professor who's been teaching computer science for over a decade, jump on the Cyber Insecurity Youtube channel on Tuesday nights at 8PM ET. [https://www.youtube.com/channel/UCL4JGzitDkX5TOwzs9A02Kg](https://www.youtube.com/channel/UCL4JGzitDkX5TOwzs9A02Kg) | 0.8 | t3_tixven | 1,647,818,906 |
Python | The LAST 20 Python Packages you will ever need (Machine Learning, Data S... | 0.13 | t3_tith9h | 1,647,806,495 |
|
Python | EZTV-AutoDownloader / Transmission Manager | Hello! (I don't know if this is for this sub.)
I made Auto Downloader from EZTV and Transmission-Remote Manager written in Python.
Some features:
* Automatic download from EZTV
* Check Episode and Season to see if ep is newer
* Remove torrent from Transmission if Completed
* Email notifications on add and complete.
If you're interested, go to the git repo for more information
https://github.com/xhico/EZTV-AutoDownloader
Thanks! | 0.67 | t3_tiqz2t | 1,647,799,587 |
Python | MD now avaible on Termux | A while ago I made a text based tool to download music in mp3 with tags and artworks. Now it's available on Termux. Cheers!
[https://github.com/eliamazzon/MusicDownloader](https://github.com/eliamazzon/MusicDownloader) | 0.8 | t3_tiqdvp | 1,647,798,001 |
Python | Looking for an official documentation regarding security best practices and how to write secure code | I am looking for resources on how to write secure code with Python, I have been in python.org but there is only a Security reporting section. Before considering Google top results I would like to check if there is an official documentation | 0.94 | t3_tiq3ts | 1,647,797,237 |
Python | tkthread - Easy multithreading with tkinter | 0.8 | t3_tip8va | 1,647,794,947 |
|
Python | I just started python 10 days ago an I am super happy. I just created my first program and would love some feedback | I am a complete programming beginner. I started a course on Udemy 10 days ago and this is my first program. I know it is probably not the most efficient way to do it which is why I would like your feedback.
here is the Github link: [https://github.com/RVP97/TicTacToe/blob/main/Project1](https://github.com/RVP97/TicTacToe/blob/main/Project1)
`f_top= ' | | '`
`f_mid= ' 1 | 2 | 3 '`
`f_low= '_____|_______|____'`
`s_top= ' | | '`
`s_mid= ' 4 | 5 | 6 '`
`s_low= '_____|_______|____'`
`t_top= ' | | '`
`t_mid= ' 7 | 8 | 9 '`
`t_low= ' | | '`
​
`f_top_1= ' | | '`
`f_mid_1= ' | | '`
`f_low_1= '_____|_______|____'`
`s_top_1= ' | | '`
`s_mid_1= ' | | '`
`s_low_1= '_____|_______|____'`
`t_top_1= ' | | '`
`t_mid_1= ' | | '`
`t_low_1= ' | | '`
​
`def print_options():`
`print(f_top)`
`print(f_mid)`
`print(f_low)`
`print(s_top)`
`print(s_mid)`
`print(s_low)`
`print(t_top)`
`print(t_mid)`
`print(t_low)`
`def print_game():`
`print(f_top_1)`
`print(f_mid_1)`
`print(f_low_1)`
`print(s_top_1)`
`print(s_mid_1)`
`print(s_low_1)`
`print(t_top_1)`
`print(t_mid_1)`
`print(t_low_1)`
`def print_every():`
`print('OPTIONS')`
`print_options()`
`print('')`
`print('GAME')`
`print_game()`
`print('Hello players. We are going to play a round of Tic Tac Toe!')`
​
`def player_one_name():`
`player_one=input("What is player one's name?: ")`
`return player_one`
​
`def player_two_name():`
`player_two=input("What is player two's name?: ")`
`return player_two`
​
`player_one=player_one_name()`
​
`player_two=player_two_name()`
​
`print(f"It is time for {player_one} to play against {player_two}")`
​
`import random`
​
`list = [player_one,player_two]`
`rand = random.choice(list)`
`print(f"It is {rand}'s turn")`
`if rand == player_one:`
`other=player_two`
`else:`
`other=player_one`
​
​
`from IPython.display import clear_output`
`print_options()`
`option_list= ['1','2','3','4','5','6','7','8','9']`
`condition=True`
`while condition:`
`while True:`
`if (f_mid_1[2]=='O' and f_mid_1[9]=='O' and f_mid_1[16]=='O') or (s_mid_1[2]=='O' and s_mid_1[9]=='O' and s_mid_1[16]=='O') or (t_mid_1[2]=='O' and t_mid_1[9]=='O' and t_mid_1[16]=='O') or (f_mid_1[2]=='O' and s_mid_1[2]=='O' and t_mid_1[2]=='O') or(f_mid_1[9]=='O' and s_mid_1[9]=='O' and t_mid_1[9]=='O') or (f_mid_1[16]=='O' and s_mid_1[16]=='O' and t_mid_1[16]=='O') or (f_mid_1[2]=='O' and s_mid_1[9]=='O' and t_mid_1[16]=='O') or (f_mid_1[16]=='O' and s_mid_1[9]=='O' and t_mid_1[2]=='O'):`
`print(f'{other} wins')`
`condition=False`
`break`
`if (f_mid_1[2]=='X' and f_mid_1[9]=='X' and f_mid_1[16]=='X') or (s_mid_1[2]=='X' and s_mid_1[9]=='X' and s_mid_1[16]=='X') or (t_mid_1[2]=='X' and t_mid_1[9]=='X' and t_mid_1[16]=='X') or (f_mid_1[2]=='X' and s_mid_1[2]=='X' and t_mid_1[2]=='X') or(f_mid_1[9]=='X' and s_mid_1[9]=='X' and t_mid_1[9]=='X') or (f_mid_1[16]=='X' and s_mid_1[16]=='X' and t_mid_1[16]=='X') or (f_mid_1[2]=='X' and s_mid_1[9]=='X' and t_mid_1[16]=='X') or (f_mid_1[16]=='X' and s_mid_1[9]=='X' and t_mid_1[2]=='X'):`
`print(f'{rand} wins')`
`condition=False`
`break`
`if len(option_list)==0:`
`print("It's a tie")`
`condition=False`
`break`
​
`player_choice=input(f'{rand}, pick a number between 1 and 9: ')`
`if player_choice in option_list:`
`player_choice = int(player_choice)`
`if player_choice == 1:`
`clear_output()`
`f_mid_1 = f_mid_1[:2] + 'X' + f_mid_1[2+1:]`
`option_list.remove('1')`
`print_every()`
`break`
`if player_choice == 2:`
`clear_output()`
`f_mid_1 = f_mid_1[:9] + 'X' + f_mid_1[9+1:]`
`option_list.remove('2')`
`print_every()`
`break`
`if player_choice == 3:`
`clear_output()`
`f_mid_1 = f_mid_1[:16] + 'X' + f_mid_1[16+1:]`
`option_list.remove('3')`
`print_every()`
`break`
​
`if player_choice == 4:`
`clear_output()`
`s_mid_1 = s_mid_1[:2] + 'X' + s_mid_1[2+1:]`
`option_list.remove('4')`
`print_every()`
`break`
​
`if player_choice == 5:`
`clear_output()`
`s_mid_1 = s_mid_1[:9] + 'X' + s_mid_1[9+1:]`
`option_list.remove('5')`
`print_every()`
`break`
​
`if player_choice == 6:`
`clear_output()`
`s_mid_1 = s_mid_1[:16] + 'X' + s_mid_1[16+1:]`
`option_list.remove('6')`
`print_every()`
`break`
​
`if player_choice == 7:`
`clear_output()`
`t_mid_1 = t_mid_1[:2] + 'X' + t_mid_1[2+1:]`
`option_list.remove('7')`
`print_every()`
`break`
​
`if player_choice == 8:`
`clear_output()`
`t_mid_1 = t_mid_1[:9] + 'X' + t_mid_1[9+1:]`
`option_list.remove('8')`
`print_every()`
`break`
​
`if player_choice == 9:`
`clear_output()`
`t_mid_1 = t_mid_1[:16] + 'X' + t_mid_1[16+1:]`
`option_list.remove('9')`
`print_every()`
`break`
`else:`
`clear_output()`
`print('Pick a valid number or a position that has not been picked before')`
`print_every()`
`continue`
`while True:`
`if (f_mid_1[2]=='O' and f_mid_1[9]=='O' and f_mid_1[16]=='O') or (s_mid_1[2]=='O' and s_mid_1[9]=='O' and s_mid_1[16]=='O') or (t_mid_1[2]=='O' and t_mid_1[9]=='O' and t_mid_1[16]=='O') or (f_mid_1[2]=='O' and s_mid_1[2]=='O' and t_mid_1[2]=='O') or(f_mid_1[9]=='O' and s_mid_1[9]=='O' and t_mid_1[9]=='O') or (f_mid_1[16]=='O' and s_mid_1[16]=='O' and t_mid_1[16]=='O') or (f_mid_1[2]=='O' and s_mid_1[9]=='O' and t_mid_1[16]=='O') or (f_mid_1[16]=='O' and s_mid_1[9]=='O' and t_mid_1[2]=='O'):`
`condition=False`
`break`
`if (f_mid_1[2]=='X' and f_mid_1[9]=='X' and f_mid_1[16]=='X') or (s_mid_1[2]=='X' and s_mid_1[9]=='X' and s_mid_1[16]=='X') or (t_mid_1[2]=='X' and t_mid_1[9]=='X' and t_mid_1[16]=='X') or (f_mid_1[2]=='X' and s_mid_1[2]=='X' and t_mid_1[2]=='X') or(f_mid_1[9]=='X' and s_mid_1[9]=='X' and t_mid_1[9]=='X') or (f_mid_1[16]=='X' and s_mid_1[16]=='X' and t_mid_1[16]=='X') or (f_mid_1[2]=='X' and s_mid_1[9]=='X' and t_mid_1[16]=='X') or (f_mid_1[16]=='X' and s_mid_1[9]=='X' and t_mid_1[2]=='X'):`
`print(f'{rand} wins')`
`condition=False`
`break`
`if len(option_list)==0:`
`print("It's a tie")`
`condition=False`
`break`
​
`player_choice=input(f'{other}, pick a number between 1 and 9: ')`
`if player_choice in option_list:`
`player_choice = int(player_choice)`
`if player_choice == 1:`
`clear_output()`
`f_mid_1 = f_mid_1[:2] + 'O' + f_mid_1[2+1:]`
`option_list.remove('1')`
`print_every()`
`break`
`if player_choice == 2:`
`clear_output()`
`f_mid_1 = f_mid_1[:9] + 'O' + f_mid_1[9+1:]`
`option_list.remove('2')`
`print_every()`
`break`
`if player_choice == 3:`
`clear_output()`
`f_mid_1 = f_mid_1[:16] + 'O' + f_mid_1[16+1:]`
`option_list.remove('3')`
`print_every()`
`break`
​
`if player_choice == 4:`
`clear_output()`
`s_mid_1 = s_mid_1[:2] + 'O' + s_mid_1[2+1:]`
`option_list.remove('4')`
`print_every()`
`break`
​
`if player_choice == 5:`
`clear_output()`
`s_mid_1 = s_mid_1[:9] + 'O' + s_mid_1[9+1:]`
`option_list.remove('5')`
`print_every()`
`break`
​
`if player_choice == 6:`
`clear_output()`
`s_mid_1 = s_mid_1[:16] + 'O' + s_mid_1[16+1:]`
`option_list.remove('6')`
`print_every()`
`break`
​
`if player_choice == 7:`
`clear_output()`
`t_mid_1 = t_mid_1[:2] + 'O' + t_mid_1[2+1:]`
`option_list.remove('7')`
`print_every()`
`break`
​
`if player_choice == 8:`
`clear_output()`
`t_mid_1 = t_mid_1[:9] + 'O' + t_mid_1[9+1:]`
`option_list.remove('8')`
`print_every()`
`break`
​
`if player_choice == 9:`
`clear_output()`
`t_mid_1 = t_mid_1[:16] + 'O' + t_mid_1[16+1:]`
`option_list.remove('9')`
`print_every()`
`break`
`else:`
`clear_output()`
`print('Pick a valid number or a position that has not been picked before')`
`print_every()`
`continue` | 0.46 | t3_tiox8d | 1,647,794,055 |
Python | I made a video tutorial on how to work with image data with python. Hope its a helpful introduction for anyone interested in learning about image processing. | 0.9 | t3_tinykr | 1,647,791,398 |
|
Python | Sending Emails With Python | 0.5 | t3_tin22d | 1,647,788,786 |
|
Python | pip install medium-api | Hi Guys, I recently published a python wrapper around [Medium API](https://rapidapi.com/nishujain199719-vgIfuFHZxVZ/api/medium2) which helps you to extract/fetch data from [medium.com](https://medium.com).
To install it, just run:
```
pip install medium-api
```
**What can you extract with it?**
- Medium User information and user-written articles
- Medium Articles information and their textual content
- Medium Publications information
- Medium’s Top Writers
- Medium’s Topfeeds (Trending, Latest, All time best, best of year/month/week)
- Medium’s Latest Posts (distributed articles)
**How to use it?**
```python
from medium_api import Medium
medium = Medium('YOUR_RAPIDAPI_KEY')
user = medium.user(username='nishu-jain')
user.fetch_articles()
for article in user.articles:
print(article.title)
```
**A few references:**
- Github repository: https://github.com/weeping-angel/medium-api
- Website: https://mediumapi.com
- Swagger documentation: https://docs.mediumapi.com
- ReadTheDocs: https://medium-api.readthedocs.io/en/latest/
- PyPI: https://pypi.org/project/medium-api/
Hoping someone will find it useful :) | 0.87 | t3_timph1 | 1,647,787,819 |
Python | Python Collection Classes - Queues, NamedTuples, DefaultDict, the Professor and Mary Ann | [https://codesolid.com/useful-collection-classes-in-python-you-may-not-know/](https://codesolid.com/useful-collection-classes-in-python-you-may-not-know/)
Enjoy! | 1 | t3_tilukh | 1,647,785,280 |
Python | Creating Real-Time Charts with FastAPI | https://github.com/roniemartinez/real-time-charts-with-fastapi
I've made sample application for anyone interested in writing real-time charts with FastAPI + Server-Sent Events. You can check my Github repo above. | 0.82 | t3_tilg4d | 1,647,784,101 |
Python | Create A REST API In Python Flask | 0.38 | t3_tikn0t | 1,647,781,534 |
|
Python | Step by Step Procedure to Deploy A Flask App On Heroku | 0.17 | t3_tikmj3 | 1,647,781,487 |
|
Python | Python Flask, ElasticSearch and docker environment | Hi, the second article devoted to the theme: “How to work with ElasticSearch using Python and Flask framework” is already ready for reading. It is about preparing microservice environment using docker and docker compose. All details are here: "[Python Flask, ElasticSearch and Docker environment](https://sergiiblog.com/python-flask-elasticsearch-and-docker-environment/)". Have a pleasant reading. | 0.81 | t3_tiid1f | 1,647,772,934 |
Python | Gufo Loader | [Gufo Loader](https://github.com/gufolabs/gufo_loader) is the flexible Python plugin infrastructure framework. We'd used this approach in the [NOC](https://getnoc.com/) \- an open-source network management system and finally decided to release this component as the independent package. Very useful tool to build extendable and reliable python applications and services. | 0.75 | t3_tihlqu | 1,647,769,687 |
Python | How to make the most of Pydantic | 0.87 | t3_tih4e7 | 1,647,767,586 |
|
Python | Sudoku Solver Using Python | AI projects | Github: [https://github.com/bhimrazy/Artificial-Intelligence-Projects](https://github.com/bhimrazy/Artificial-Intelligence-Projects)
https://preview.redd.it/xswtp52b3ho81.png?width=1097&format=png&auto=webp&s=8ce31043a6238eb74bddc97ff6dc6b4072f82f38 | 0.87 | t3_tidx7v | 1,647,753,441 |
Python | I Wanted to Make a Game from Scratch (visuals and all) Using Python so I did. | ​
[https:\/\/github.com\/M0pps\/Dinosaur-Game.git](https://reddit.com/link/tid126/video/pvim4rectgo81/player) | 0.97 | t3_tid126 | 1,647,750,072 |
Python | Creating a DCGAN with PyTorch | I wrote a short tutorial on creating a deep convolutional GAN to generate new wild animals images from the wildlife animal faces dataset using PyTorch:
[https://taying-cheng.medium.com/create-new-animals-using-dcgan-with-pytorch-2ce47810ebd4](https://taying-cheng.medium.com/create-new-animals-using-dcgan-with-pytorch-2ce47810ebd4) | 0.67 | t3_ti9u5w | 1,647,738,961 |
Python | Modularizing a Chalice Application | If you're looking to develop Chalice lambda functions and needing to realistically modularize your application and files, here's a pretty good article (I'm not the author) on how to go about that. Chalice is used for AWS lambda function development and deployment and has routing decorators similar to Flask and other APIs framework.
[https://medium.com/tensoriot/modularizing-a-chalice-application-for-teams-f716f496b94b](https://medium.com/tensoriot/modularizing-a-chalice-application-for-teams-f716f496b94b) | 0.5 | t3_ti9ryn | 1,647,738,759 |
Python | Space Science with Python - AI 1-8: A Dense Neural Network | Hey Python coders,
today I would like to show you a new tutorial video within my Space Science with Python series. I am still working on a Machine Learning project, and this time we will use TensorFlow / Keras to create a multi-class classifier for our asteroids reflectance spectra.
Since our spectra data are already perfectly cleaned and processed, even a simple Dense layer architecture provides fair results; you'll see! And for starters, Dense-layer-based networks are easy to "digest".
The next video will consider convolution networks and afterwards you will see some nice Autoencoder architecture and unsupervised classification methods. Hopefully you'll like it!
Anyway. A word of "warning". When I create my tutorials I prepare my code, test it, format it, test it again etc. Also this time. But: I had some functions in the Google Colab cache. My "new" functions were not called correctly and I figured it out in the last minutes! Anyway, I left it in the video for others to learn from my mistake I made there. Please note: reset your runtime when you start something new and be aware of issues when using Notebooks in a productive environment.
GitHub: [https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/8\_dl\_dense\_multiclass.ipynb](https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/8_dl_dense_multiclass.ipynb)
YouTube: [https://youtu.be/O0rQswBZJ7o](https://youtu.be/O0rQswBZJ7o)
Cheers,
Thomas | 0.81 | t3_ti90ps | 1,647,736,289 |
Python | Sunday Daily Thread: What's everyone working on this week? | Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share. | 0.9 | t3_ti8esn | 1,647,734,409 |
Python | I teach python for middle and high schoolers – I made this little trophy for a competition of who could make the best image using Turtle/Python | I will also make some keychains with the best images 3d-printed on them – I hope the students like them!
​
https://i.redd.it/7cyldg3odfo81.gif | 0.97 | t3_ti7uyh | 1,647,732,704 |
Python | Automate Key board and mouse | see a lot of people probably using this for gaming but can be used for your job. I use this type of stuff to auto mate stuff I have to type over and over then click a bunch of bottons. Hope it helps
​
[https://www.youtube.com/watch?v=shi5Ba\_y4HA&t=264s](https://www.youtube.com/watch?v=shi5Ba_y4HA&t=264s)
​
Has anyone used Python to automate other stuff. I want to expand on automating on Python. Or know good modules for stuff like that? | 0.92 | t3_ti5hm4 | 1,647,725,723 |
Python | New Python package for stock market data: YFrake | I've released a new open-source Python package named [YFrake (Github Repository)](https://github.com/aspenforest/yfrake), which returns stock market data from Yahoo Finance and can also serve it to other applications. It has built-in swagger documentation and can run in async and threaded modes. More features are planned for future releases. Package documentation is available at [yfrake.readthedocs.io](http://yfrake.readthedocs.io/) . | 0.89 | t3_ti5geq | 1,647,725,628 |
Python | I broke Math. I generated a quantum random number in Python. Split the decimal part of it into groups of 5 digits. Found every single group in the decimal expansion of PI (just upto a million digits). Somebody tell me I'm wrong or give me a Nobel prize. I won't sleep tonight. | import quantumrandom as qr
with open("piDigits.txt", 'r') as f:
pidecimals = f.read()
f.close()
maxrange = int(input("Enter Maxmimum of Range "))
count = 0
for i in range (0,maxrange):
myx = qr.randint()
print(f"Quantum Number {myx}")
decimalstring = str(myx)
substring1 = decimalstring[2:7]
substring2 = decimalstring[7:12]
substring3 = decimalstring[12:17]
if substring1 in pidecimals:
count += 1
print(f"Quantum digit sequence {substring1} found in Pi")
if substring2 in pidecimals:
count += 1
print(f"Quantum digit sequence {substring2} found in Pi")
if substring3 in pidecimals:
count += 1
print(f"Quantum digit sequence {substring3} found in Pi")
print(f"Quantum digit sequences found in Pi {count} times out of {3*maxrange}")
Sample Output: (Ran the code many times to look for an exception. None found. Yet.)
`Enter Maxmimum of Range 20`
`Quantum Number 4.434424353398947`
`Quantum digit sequence 43442 found in Pi`
`Quantum digit sequence 43533 found in Pi`
`Quantum digit sequence 98947 found in Pi`
`Quantum Number 9.409781033035783`
`Quantum digit sequence 40978 found in Pi`
`Quantum digit sequence 10330 found in Pi`
`Quantum digit sequence 35783 found in Pi`
`Quantum Number 9.769588769359885`
`Quantum digit sequence 76958 found in Pi`
`Quantum digit sequence 87693 found in Pi`
`Quantum digit sequence 59885 found in Pi`
`Quantum Number 7.9896238651102465`
`Quantum digit sequence 98962 found in Pi`
`Quantum digit sequence 38651 found in Pi`
`Quantum digit sequence 10246 found in Pi`
`Quantum Number 1.8486305027847716`
`Quantum digit sequence 84863 found in Pi`
`Quantum digit sequence 05027 found in Pi`
`Quantum digit sequence 84771 found in Pi`
`Quantum Number 5.2133974212253`
`Quantum digit sequence 21339 found in Pi`
`Quantum digit sequence 74212 found in Pi`
`Quantum digit sequence 253 found in Pi`
`Quantum Number 3.3063248645761805`
`Quantum digit sequence 30632 found in Pi`
`Quantum digit sequence 48645 found in Pi`
`Quantum digit sequence 76180 found in Pi`
`Quantum Number 6.982528419928283`
`Quantum digit sequence 98252 found in Pi`
`Quantum digit sequence 84199 found in Pi`
`Quantum digit sequence 28283 found in Pi`
`Quantum Number 4.838788433661402`
`Quantum digit sequence 83878 found in Pi`
`Quantum digit sequence 84336 found in Pi`
`Quantum digit sequence 61402 found in Pi`
`Quantum Number 0.5404745555809872`
`Quantum digit sequence 54047 found in Pi`
`Quantum digit sequence 45555 found in Pi`
`Quantum digit sequence 80987 found in Pi`
`Quantum Number 5.2051575494010835`
`Quantum digit sequence 20515 found in Pi`
`Quantum digit sequence 75494 found in Pi`
`Quantum digit sequence 01083 found in Pi`
`Quantum Number 2.928511482413977`
`Quantum digit sequence 92851 found in Pi`
`Quantum digit sequence 14824 found in Pi`
`Quantum digit sequence 13977 found in Pi`
`Quantum Number 8.577248798352025`
`Quantum digit sequence 57724 found in Pi`
`Quantum digit sequence 87983 found in Pi`
`Quantum digit sequence 52025 found in Pi`
`Quantum Number 0.699015793087663`
`Quantum digit sequence 69901 found in Pi`
`Quantum digit sequence 57930 found in Pi`
`Quantum digit sequence 87663 found in Pi`
`Quantum Number 6.524299992370489`
`Quantum digit sequence 52429 found in Pi`
`Quantum digit sequence 99923 found in Pi`
`Quantum digit sequence 70489 found in Pi`
`Quantum Number 5.860379949645227`
`Quantum digit sequence 86037 found in Pi`
`Quantum digit sequence 99496 found in Pi`
`Quantum digit sequence 45227 found in Pi`
`Quantum Number 6.33020523384451`
`Quantum digit sequence 33020 found in Pi`
`Quantum digit sequence 52338 found in Pi`
`Quantum digit sequence 4451 found in Pi`
`Quantum Number 4.562294956893263`
`Quantum digit sequence 56229 found in Pi`
`Quantum digit sequence 49568 found in Pi`
`Quantum digit sequence 93263 found in Pi`
`Quantum Number 2.0715648126955064`
`Quantum digit sequence 07156 found in Pi`
`Quantum digit sequence 48126 found in Pi`
`Quantum digit sequence 95506 found in Pi`
`Quantum Number 8.903639276722362`
`Quantum digit sequence 90363 found in Pi`
`Quantum digit sequence 92767 found in Pi`
`Quantum digit sequence 22362 found in Pi`
`Quantum digit sequences found in Pi 60 times out of 60` | 0.2 | t3_ti584e | 1,647,724,969 |
Python | PyMacApp: Build, Package, and Code-Sign Python Projects on MacOS in just 10-lines of Python Code! | Hi All:
I recently posted about a project I was working on called PyMacApp. I just released a ton of updates that brings full support for building, packaging, and code-signing in as little as just 10 lines of code (2 import statements, 4 for the app, and 4 for the package; it supports function chaining, so you could even accomplish this in less than 10 lines)!
Get started with ```pip3 install pymacapp```
GH: https://github.com/The-Nicholas-R-Barrow-Company-LLC/PyMacApp
A more-detailed starter is available below.
```
# build.py
from pymacapp import App, Package
from pymacapp.helpers import get_first_application_hash, get_first_installer_hash
# Apple Account Information
# You can get rid of the input(...) functions and instead enter the strings directly so you do not have to enter them each time.
APPLE_DEVELOPER_ACCOUNT_EMAIL = input("Apple Developer ID Email (str): ")
APPLE_DEVELOPER_ACCOUNT_APP_SPECIFIC_PASSWORD = input("Apple Developer ID App-Specific Password (str): ")
app = App("My New App", "com.identifier")
app.setup("./app/main.py", overwrite=True)
app.build()
app.sign(get_first_application_hash())
package = Package(app, "0.0.1", "com.identifier.pkg")
package.build(get_first_installer_hash())
package.sign(get_first_installer_hash())
package.notorize(APPLE_DEVELOPER_ACCOUNT_EMAIL, APPLE_DEVELOPER_ACCOUNT_APP_SPECIFIC_PASSWORD).wait()
``` | 0.68 | t3_ti4ztb | 1,647,724,308 |
Python | Small Line Counter Script | I made a command line tool that lets you specify a file/directory path on the command line and will count the lines of code in a file or all files within a directory or directories recursively. I plan to add more features. I am a systems dev by trade and have worked with python in the past but not very much and that was a couple years ago, so I didn't know if I should flag this as beginner or intermediate but let me know if I should change it. Please feel free to contribute. If you do read the code (its short) I would love feedback.
[https://www.github.com/carterdugan/LineCounter](https://www.github.com/carterdugan/LineCounter) | 0.81 | t3_ti4zcz | 1,647,724,271 |
Python | Is pygame still worth it in 2022?? | 0.85 | t3_thzhqp | 1,647,709,018 |
|
Python | What do you think is the most valuable Python package? | In the spirit of March Madness, we created a tournament to choose the MVP Python package. This is just meant to be fun, but it might jumpstart an interesting discussion about your choices and the kind of work you're doing.
[https://deephaven.io/community/experiments/python-bracket/](https://deephaven.io/community/experiments/python-bracket/) | 0.14 | t3_thw2h9 | 1,647,699,262 |
Python | Build a Hash Table in Python With TDD – Real Python | 0.75 | t3_thvrq5 | 1,647,698,366 |
|
Python | How to Shortlist the Best Python Development Company ? | 0.2 | t3_thvj46 | 1,647,697,596 |
|
Python | DeepForSpeed: A self driving car in Need For Speed Most Wanted built with python + pytorch | [video here](https://youtu.be/t0iqfM36mRc)
[code here](https://github.com/edilgin/DeepForSpeed)
So i built a self driving car with python in need for speed most wanted(2005). I was really impressed when i saw nvidia build their own self driving car with just a single algorithm(cnn) so i decided to try it myself. Basically i record training data while i'm playing the game (i played around 2 hours i think) my key presses associated with every frame are recorded. Later i process this training data and train the algorithm (which is almost the same as the nvidia's). Latest step is just running the algo. Important hings i've used are: numpy, opencv, matplotlib and pytorch.
Please take a look at the code i tried to document everything and i would appreciate any pull requests and advice in general :) | 0.97 | t3_thsp8c | 1,647,686,990 |
Python | Python for beginners from Harvard CS50x. Starting April 1st. Free course, awesome teacher, explains how computer thinks in terms of programming. 11 weeks 3-9 hours per week! Sign up now, highly recommended. | 0.94 | t3_ths5wg | 1,647,684,560 |
|
Python | Red Mail: All you need from an email sender | Hi all,
I have made a couple of posts about Red Mail in the past but I recently received some comments feeling this being underrated compared to how useful it really is. So, I hope you don't mind an update, I also just released a new version.
So what is Red Mail? It's an email library that aims for simplicity without compromising features. You will find a bunch of email senders from Pypi but there is nothing quite like this.
So what can it do?
* [Supports sending HTML, text, attachments](https://red-mail.readthedocs.io/en/latest/tutorials/sending.html)
* [Send to regular receivers, cc (carbon copy) or bcc (blind carbon copy)](https://red-mail.readthedocs.io/en/latest/tutorials/sending.html)
* [Attachments from various types: paths, bytes, Pandas dataframes, etc.](https://red-mail.readthedocs.io/en/latest/tutorials/attachments.html)
* [Emails with embedded images in HTML](https://red-mail.readthedocs.io/en/latest/tutorials/body_content.html#embedding-content)
* [Embedded images from various types: Matplotlib plots or PIL images](https://red-mail.readthedocs.io/en/latest/tutorials/body_content.html#embedding-content)
* [Emails with embedded (prettified) tables from Pandas dataframes](https://red-mail.readthedocs.io/en/latest/tutorials/body_content.html#embedded-tables)
* [Templated emails using Jinja](https://red-mail.readthedocs.io/en/latest/tutorials/jinja_support.html)
* [Gmail and Outlook pre-configured](https://red-mail.readthedocs.io/en/latest/tutorials/config.html)
* [Logging handlers!](https://red-mail.readthedocs.io/en/latest/extensions/logging.html)
* [Flask integration](https://flask-redmail.readthedocs.io/en/stable/index.html)
A minimal example for Gmail users:
from redmail import gmail
gmail.username = "example@gmail.com"
gmail.password = "<MY PASSWORD>"
gmail.send(
sender="example@gmail.com",
receivers=["you@example.com"],
subject="An example email",
html="""
<h1>Hi,</h1>
<p>nice to meet you.</p>
""",
)
More advanced features:
from redmail import EmailSender
email = EmailSender(host="smtp.myhost.com", port=0)
email.send(
sender="me@example.com",
receivers=["you@example.com"],
subject="An example email",
html="""
<h1>Hi {{ friend }},</h1>
<p>look at this image:</p>
{{ nice_image }}
""",
body_params={"friend": "Jack"},
body_images={"nice_image": 'path/to/image.png'},
attachments={"file.csv": pd.DataFrame({"col": [1, 2, 3]})}
)
So it's pretty clean and does everything you wished from an email sender. There are alternatives for email sending but nothing quite like this. It is also well tested and documented.
Resources:
* Source code: [https://github.com/Miksus/red-mail](https://github.com/Miksus/red-mail)
* Documentation: [https://red-mail.readthedocs.io/en/latest/](https://red-mail.readthedocs.io/en/latest/)
* Releases: [https://pypi.org/project/redmail/](https://pypi.org/project/redmail/)
If you need to integrate it to a Flask application:
* Source code: [https://github.com/Miksus/flask-redmail](https://github.com/Miksus/flask-redmail)
* Documentation: [https://flask-redmail.readthedocs.io/en/latest/](https://flask-redmail.readthedocs.io/en/latest/)
* Releases: [https://pypi.org/project/Flask-Redmail/](https://pypi.org/project/Flask-Redmail/)
So what has changed? Now the email structures are more structured and more likely gets rendered across email providers, fixed a bug related to embedded emails and aliases and improved documentation.
If you found it useful, leave it a star on Github. That's the way to get visibility and it lets me know I'm building useful things in my free time. Thanks again for all the support! | 0.88 | t3_thrdr9 | 1,647,681,015 |
Python | I created a super simple customizable desktop clock with python | Have you ever wanted to program a simple clock for your desktop? This [Simple Desktop Clock](https://github.com/underpig1/simplest-desktop-clock) uses python's tkinter to create a desktop clock for cleaner layouts. The best part is, you can customize how it looks and where it appears on your screen really easily, and it will change colors based on your wallpaper colors. I created this program a few weeks back because I was annoyed with the tiny clock in the bottom right of my screen and wanted something like the big clock on the lock screen. I decided to share it when I heard others were encountering a similar problem. The clock functions just as a part of your wallpaper--as in, you can't drag it or click on it, and it by default stays behind your windows. Let me know if you enjoy it or find it useful!
https://preview.redd.it/0thaq2fkzao81.png?width=1674&format=png&auto=webp&s=f00ab6723f9de61dc72fe1fc4adfb36fd814301d | 0.89 | t3_thqxd6 | 1,647,678,891 |
Python | 3 Things You Might Not Know About Numbers in Python | 0.5 | t3_thqu6i | 1,647,678,482 |
|
Python | The Zen Of Python, One-Liners and Being Pythonic | 0.83 | t3_thqfid | 1,647,676,626 |
|
Python | What extension is useful when doing Python in VS code? | Hi! I'm new to using VS code. Before this I was using Spyder and found that VS code to be more complicated (for me). Please do recommend me necessary extension :D | 0.67 | t3_thpx8i | 1,647,674,284 |
Python | Solution to Ramanujan equations | [https://todaymylearn.blogspot.com/2022/03/solution-to-ramanujan-equations.html](https://todaymylearn.blogspot.com/2022/03/solution-to-ramanujan-equations.html)
I made a small program in python to solve Ramanujan equations. | 0.46 | t3_thplm6 | 1,647,672,828 |
Python | PEP 686: Make UTF-8 mode default | 0.97 | t3_thnk4l | 1,647,664,164 |
|
Python | Complete Guide to PyGame Setup in 14 mins! | 0.7 | t3_thmkk7 | 1,647,660,554 |
|
Python | What Python GitHub repos are good examples of best practices? | I've been writing more packages and recently enjoyed looking through Perfect's GitHub. It felt like a good example of code structuring, they implemented their cli well. I even started to look at how they were branching and what they were putting in commit messages.
I very frequently work on islands without the oversight of more senior engineers and wanted to know if there were other GitHub repos you guys recommend looking at to learn how to learn to write good software. | 0.85 | t3_thmbi1 | 1,647,659,670 |
Python | Euporie: a terminal app for working with Jupyter notebooks | 1 | t3_thlcky | 1,647,656,373 |
|
Python | A Happy Success Story and Python! | Hi everyone!
&#x200B;
I just wanted to share some exciting events, as well as a good story for those maybe demotivated learning Python.
&#x200B;
Like many of you, I started learning Python (around 3-4 months ago), and quickly felt overwhelmed by just the huge mass of tutorials, libraries, and posts. However, I pushed through it, and have made some real progress!
&#x200B;
Today I launched v1 of my AI/startup business [https://finned.tech](https://finned.tech) \- selling a (Python) solution for personalized marketing on digital billboards, a solution now patent-pending. In addition to this, I built a licensing solution from the ground up, again using Python, and finally a Python webserver (using FastAPI) to handle auth, license checks, and payments.
&#x200B;
What I learned from all of this (besides that it's hard to start a business), is that if you keep persevering, watching those tutorials, and building those things you think no one will ever use, that, before you know it, you'll be creating things you never thought possible before!
&#x200B;
Hopefully this post has inspired some of you to put a bit more effort into learning and building some projects, as I know many posts here did with me.
&#x200B;
(Ok, now I'm done with my story, go build some cool things and learn more!) | 0.85 | t3_thlata | 1,647,656,210 |
Python | Elden Ring Open Source API | Good night tarnished guys and gals. Do we have some developers among us? I made this open-source API that contains all kinds of data scraped from Elden Ring that can be used for all sorts of student projects. So if you're new to programming/web development, loves Elden Ring, and want to build a cool app, feel free to use and abuse this API.
This is an Open Source project, so feel free to contribute. All the data and media can be found in the GitHub repository. Also, since the game came out not long ago, there are still some missing data and gaps here and there. If you find any issues, feel free to open an issue or open a PR that I will gladly merge into the codebase.
The API is available in both REST and GraphQL formats. Get started at [https://eldenring.fanapis.com/](https://eldenring.fanapis.com/)
&#x200B;
Source code available at: [https://github.com/deliton/eldenring-api](https://github.com/deliton/eldenring-api) | 0.93 | t3_thl39l | 1,647,655,499 |
Python | Saturday Daily Thread: Resource Request and Sharing! Daily Thread | Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?
Use this thread to chat about and share Python resources! | 1 | t3_thiqqa | 1,647,648,010 |
Python | *UPDATED* Random numbers generator list with Mean, Median, Mode and frequency of each number | import random
import numpy
from statistics import mode
import csv
import collections
#create list
list=[]
##random numbers
for i in range (100):
number= (random.randint(0,10))
#add to list
list.append(number)
print("Random numbers: "+(str(list)))
list.sort()
print("Numbers sorted: "+(str(list)))
#Mean, median and mode of list
mean1=numpy.mean(list)
median1=numpy.median(list)
mode1=mode(list)
print("The mean of the numbers is "+(str(mean1)))
print("The median of the numbers is "+(str(median1)))
print("The mode of the numbers is "+(str(mode1)))
##frequency method
##dictionary
frequency = {}
###using collections.Counter for number frequency
frequency=collections.Counter(list)
# printing the frequency
print(frequency)
##Export dictionary to CSV file
with open('numbers.csv', 'w') as f:
for key in frequency.keys():
f.write("%s,%s\n"%(key,frequency[key]))
#df.to_csv("numbers.csv", header=["Number", "Frequency"], index=False) | 0.6 | t3_thgvms | 1,647,642,439 |
Python | Random numbers generator list with Mean, Median, Mode and frequency of each number | import random
import numpy
from statistics import mode
import csv
#create list
list=[]
##random numbers
for i in range (100):
number= (random.randint(0,10))
#add to list
list.append(number)
print("Random numbers: "+(str(list)))
list.sort()
print("Numbers sorted: "+(str(list)))
#Mean, median and mode of list
mean1=numpy.mean(list)
median1=numpy.median(list)
mode1=mode(list)
print("The mean of the numbers is "+(str(mean1)))
print("The median of the numbers is "+(str(median1)))
print("The mode of the numbers is "+(str(mode1)))
##frequency method
##dictionary
frequency = {}
# iterating over the list
for item in list:
# checking the element in dictionary
if item in frequency:
# incrementing the counr
frequency[item] += 1
else:
# initializing the count
frequency[item] = 1
# printing the frequency
print(frequency)
##Export dictionary to CSV file
with open('numbers.csv', 'w') as f:
for key in frequency.keys():
f.write("%s,%s\n"%(key,frequency[key])) | 0.33 | t3_thdm72 | 1,647,633,270 |
Python | I've heard that "if a class is just a constructor and one method, then it should be a function". What is your opinion on this and what are counter examples? | I watched a seminar a few years ago about someone talking about the misuses of OOP in python and talked extensively about the case where people write a class, implement the `__init__()` method and one extra method and that's it.
He provided examples and showed functional code that simplifies the solution to a few lines and he said:
> "If a class is just a constructor and one method, then it shouldn't be a class at all. It should be a function."
I can't find the video anymore, but I was just wondering what reddit thinks about this statement and if you have any counter examples or in what cases it could be useful.
I'm also interested in the cases where if it is true, how would that functional implementation look like when I need some sort of a state to persist.
EDIT: Awesome discussion in the comments. Thanks for everyone's input! | 0.97 | t3_th6ztt | 1,647,623,696 |
Python | Resume Generation With Python | 0.33 | t3_th6lvy | 1,647,623,183 |
|
Python | Latest Python for Debian GNU/Linux | 0.43 | t3_th3oai | 1,647,616,559 |
|
Python | what's sentiment analysis methodology | * Discuss sentimental analysis.
* Describe the Python download and installation process.
* Define polarity and subjectivity.
* Explain the use of textBlobs.
* Contrast lemmatization to tokenization
* Discuss the POS Tag language.
* Explain Bigrams, Trigrams and Ngrams.
* List the various Anaconda applications.
* Summarize capitalizations, pluralizations and singularizations.
* Outline loops in Ngrams.
* Describe TextBlob classification.
* Relate data frame to the classification of sentiments.
[https://alison.com/topic/learn/129326/sentimental-analysis-methodology-learning-outcomes](https://alison.com/topic/learn/129326/sentimental-analysis-methodology-learning-outcomes) | 0.2 | t3_th3fc7 | 1,647,615,880 |
Python | Python Cybersecurity — Build your own python tools (PortScanner, Visual Network Tracker and Anonymous FTP Scanner) | **Python Cybersecurity — PortScanner**
Build a simple Port Scanner using the Python Programming language. Port Scanner is an application designed to probe a server or host for open ports. Such an application may be used by administrators to verify security policies of their networks and by attackers to identify network services running on a host and exploit vulnerabilities.
**YouTube Link**: [https://youtu.be/bH-3PuQC\_n0](https://youtu.be/bH-3PuQC_n0)
**Medium Link:** [https://medium.com/vinsloev-academy/python-cybersecurity-build-a-port-scanner-13b798a1b654](https://medium.com/vinsloev-academy/python-cybersecurity-build-a-port-scanner-13b798a1b654)
**Python Cybersecurity — Visual Network Tracker**
Dive into Network Traffic visualization using the Python programming language, Wireshark and Google Maps. This tutorial covers the implementation steps needed to take a file of network traffic and convert it into a visual presentation using Google Maps.
**YouTube Link**: [https://youtu.be/xuNuy8n8u-Y](https://youtu.be/xuNuy8n8u-Y)
**Medium Link:** [https://medium.com/vinsloev-academy/python-cybersecurity-network-tracking-using-wireshark-and-google-maps-2adf3e497a93](https://medium.com/vinsloev-academy/python-cybersecurity-network-tracking-using-wireshark-and-google-maps-2adf3e497a93)
**Python Cybersecurity — Anonymous FTP Scanner**
Build a simple FTP Scanner using the Python Programming language. Anonymous FTP is a means by which archive sites allow general access to their archives of information. These sites create a special account called “anonymous”
**YouTube Link**: [https://youtu.be/BIZfRodSW9w](https://youtu.be/BIZfRodSW9w)
**Medium Link:** [https://medium.com/vinsloev-academy/python-cybersecurity-for-beginners-build-anonymous-ftp-scanner-a62f0534fcf5](https://medium.com/vinsloev-academy/python-cybersecurity-for-beginners-build-anonymous-ftp-scanner-a62f0534fcf5) | 0.8 | t3_th30u3 | 1,647,614,790 |
Python | Business logic in Django and Django REST Framework applications | 0.69 | t3_th2zll | 1,647,614,691 |
|
Python | Python finally offloads some batteries | 0.57 | t3_th2ezh | 1,647,613,112 |
|
Python | Proposed Addition to Python ASYNC. | I'm a big fan of using Python for distributed computing. I have used the Twisted framework for years and the process level support. I love that we now have Future, Async, and Await as a standard part of the language.
I've been thinking that the next step has to be merging together the threading and process level into a single langauge. This got me thinking with little change why not support the following language syntax/semantics:
&#x200B;
typeOfEnttity := 'process' | 'thread';
func := \[async \[typeOfEntity\]\] def ....
&#x200B;
The idea is that if I say
def foo() ... it is the Python standard.
&#x200B;
If I say
async def foo() or async thread def foo() ...
we have the asyncio stuff we have today.
&#x200B;
If I say
async process def foo() ....
I have it using the multiprocess support of Python. I think this movies python in the "right" direction. I'm wondering what you all think about this proposal? | 0.5 | t3_th04ho | 1,647,606,312 |
Python | Python ETL management framework/tool | Hello,
I am trying to build some ETL scripts; mainly getting data from different sources and loading to my database. Python libraries are great for this and it works perfectly.
My question is related to the way these scripts etc. might be automated, managed.
Is there any framework, tool you could suggest? How do people manage this stuff?
Sorry, I am new to this and I am not sure if my quesiton is clear. | 0.87 | t3_tgyvu2 | 1,647,601,729 |
Python | Finance degree to cs? | So I studied finance and have a little bit of work experience in marketing, which are not related to cs at all.
I've been through a lot ups and downs (mainly just downs, really) and I've set my mind to change my life for the better. I'm not going to elaborate on whatever happened as it is off the topic.
I am just wondering how hard it is for smn with no experience to learn CS? I know many agencies are selling classes, and opinions from my friends are divided. Some said it is my best chance to get the life I want, which I agree; some said that it is too hard and it's not worth the effort as I'll have to go back and do a bachelor degree.
Any advice? | 0.4 | t3_tgy38p | 1,647,598,534 |
Python | Share Jupyter Notebook as web app | 0.86 | t3_tgxz6w | 1,647,598,047 |
|
Python | Building an all-in-one Python Resources Website for Python Developers | Hey there,
I am building a Python Resources Website. Divided into two main Pages (Web Backend and AI/Machine Learning) for these Resources, the goal is to simplify the search for some of the best React resources such as:
**1) For Python/Backend:**
• Django, Flask, FastAPI Articles
• Django, Flask, FastAPI Forums latest Discussions (Reddit)
• Django, Flask, FastAPI YouTube Channels Videos
• Django, Flask, FastAPI Websites
• Django, Flask, FastAPI E-books, Snippets
• *Job Opportunities*
&#x200B;
**2) For Python/AI/ML:**
• AI/ML Articles
• AI/ML Forums latest Discussions (Reddit)
• AI/ML YouTube Channels Videos
• AI/ML Websites
• AI/ML E-books, Snippets
• *Job Opportunities*
&#x200B;
I've done a [Similar App](https://helloreact-beta.vercel.app/) for React Developers, and I'm now building the Python version.
Can you give me some of the best resources out there (blogs, Youtube Channels, Websites, Forums)? I'd like to feature the in the Project.
&#x200B;
Thank You :) | 0.79 | t3_tgxjwm | 1,647,596,261 |
Python | Frontend Vue and Tailwind Setup - Masonite Tutorial | 0.4 | t3_tgxa8s | 1,647,595,077 |
|
Python | A solver, player and cheater for breaklock | I stumbled upon [breaklock](https://www.mathsisfun.com/games/breaklock.html) recently. Since it was a bit too much for me, I set up a program to solve it.
The solving mode works by first finding all possible solutions, then whittling down the options based on feedback from the game, I can explain further if required.
The player mode simply asks the player to make moves until they win.
I love the cheating mode idea, which just popped into my head. Essentially, when the player gets the correct answer, it changes it while ensuring no contradictions happen. Like you do in hangman. On average, it slows down the machine by \~1 turn, and humans by \~5 turns
&#x200B;
Visit it on github [here](https://github.com/deltaqyto/breaklock-solver) | 0.63 | t3_tgw41v | 1,647,589,819 |
Python | Is this a good project? | So I'm making classes out of multiple libraries such as tweepy (Twitter scraping) to make them very user friendly.
I'm adding methods such as "gather_maximum_tweets()" that will work for 2 hours and give you at least 100k tweets instead of the 18k that you'll get from tweepy every 15 minutes of sleep (In other words, made it automatic).
Some methods to clean the text and visualize it.
Is it a good project? Can I make an API out of it? Should I make it open source and put it on github? Is making a video explaining my project will be good for my open source code? Or should I try to sell it?
(Considering it is my first project) | 0.72 | t3_tgv85c | 1,647,585,866 |
Python | 8 Excellent Python Courses on Udemy (2022) | 0.6 | t3_tgu5y6 | 1,647,581,497 |
|
Python | Python Traffic Generator | 0.56 | t3_tgopyd | 1,647,563,538 |
|
Python | Friday Daily Thread: Free chat Friday! Daily Thread | Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted! | 0.6 | t3_tgo1uq | 1,647,561,609 |
Python | How would you compare tortoise ORM vs peewee ORM? | Since they are both similar to the Django ORM, then they can be clasified as active record ORMs right?
Have you used any or both? If so how was your experience and which would you recommend? | 1 | t3_tglp4o | 1,647,554,889 |
Python | #FOSS Fintech In Python: Using GameStonk Terminal To Generate Trade Ideas | 0.81 | t3_tg4328 | 1,647,499,950 |
|
Python | Arcade 2.6.11 has been released | Python Arcade, a library for creating 2D arcade games, has released version 2.6.11.
Website: [https://arcade.academy](https://arcade.academy)
Release notes: [https://api.arcade.academy/en/latest/development/release\_notes.html](https://api.arcade.academy/en/latest/development/release_notes.html)
Demo video: [https://www.youtube.com/watch?v=QClDvEwcxmg](https://www.youtube.com/watch?v=QClDvEwcxmg)
&#x200B;
**Release notes**
* Sections - Add support to divide window into sections. (Thanks [janscas](https://github.com/janscas) for the contribution.)
* Add [arcade.Section](https://api.arcade.academy/en/latest/api/window.html#arcade.Section) to the API.
* Add [arcade.SectionManager](https://api.arcade.academy/en/latest/api/window.html#arcade.SectionManager) to the API.
* Add examples on how to use: [Dividing a View Into Sections](https://api.arcade.academy/en/latest/examples/index.html#section-examples)
* New Example Code:
* Add parallax example: [Parallax](https://api.arcade.academy/en/latest/examples/parallax.html#parallax).
* Add GUI flat button styling example: [Flat Text Button Styled](https://api.arcade.academy/en/latest/examples/gui_flat_button_styled.html#gui-flat-button-styled).
* Add [Perspective](https://api.arcade.academy/en/latest/examples/perspective.html#perspective) example.
* New functionality:
* Add [arcade.get\_angle\_degrees()](https://api.arcade.academy/en/latest/api/geometry.html#arcade.get_angle_degrees) function.
* Add easing functions and example. See [Easing Example 1](https://api.arcade.academy/en/latest/examples/easing_example_1.html#easing-example-1) and [Easing Example 2](https://api.arcade.academy/en/latest/examples/easing_example_2.html#easing-example-2).
* Add arcade.Sprite.facePoint()
to face sprite towards a point.
* Fixes:
* Fixed issue [\#1074](https://github.com/pythonarcade/arcade/issues/1074) to prevent a crash when opening a window.
* Fixed issue [\#978](https://github.com/pythonarcade/arcade/issues/978), copy button in examples moved to the left to prevent it disappearing.
* Fixed issue [\#967](https://github.com/pythonarcade/arcade/issues/967), CRT example now pulls from resources so people don’t have to download image to try it out.
* PyMunk sample map now in resources so people don’t have to download it.
* [arcade.draw\_points()](https://api.arcade.academy/en/latest/api/drawing_primitives.html#arcade.draw_points) no longer draws the points twice, improving performance.
* Documentation:
* Update [Pygame Comparison](https://api.arcade.academy/en/latest/pygame_comparison.html#pygame-comparison).
* Improve Sprite.texture
docs.
* When building Arcade docs, script now lets us know what classes don’t have docstrings.
* Spelling/typo fixes in docs.
* Misc:
* Update arcade.Sprite
to use decorators to declare properties instead of the older method.
* [\#1095](https://github.com/pythonarcade/arcade/issues/1095), Improvements to [arcade.Text](https://api.arcade.academy/en/latest/api/text_pyglet.html#arcade.Text) and its documentation. We can now also get the pixel size of a Text contents though content\_width, content\_height and content\_size.
* Force GDI text on windows until direct write is more mature.
* Optimized text rendering and text rotation
* [arcade.draw\_text()](https://api.arcade.academy/en/latest/api/text_pyglet.html#arcade.draw_text) and [arcade.Text](https://api.arcade.academy/en/latest/api/text_pyglet.html#arcade.Text) objects now accepts any python object as text and converts it into a string internally if needed.
* [SpriteList](https://api.arcade.academy/en/latest/api/sprite_list.html#arcade.SpriteList) now exposes several new members that used to be private. These are lower level members related to the underlying geometry of the spritelist and can be used by custom shaders to do interesting things blazingly fast. SpriteList interaction example with shaders can be found in the experimental directory. Members include [write\_sprite\_buffers\_to\_gpu()](https://api.arcade.academy/en/latest/api/sprite_list.html#arcade.SpriteList.write_sprite_buffers_to_gpu), [geometry](https://api.arcade.academy/en/latest/api/sprite_list.html#arcade.SpriteList.geometry), [buffer\_positions](https://api.arcade.academy/en/latest/api/sprite_list.html#arcade.SpriteList.buffer_positions), [buffer\_sizes](https://api.arcade.academy/en/latest/api/sprite_list.html#arcade.SpriteList.buffer_sizes), [buffer\_textures](https://api.arcade.academy/en/latest/api/sprite_list.html#arcade.SpriteList.buffer_textures), [buffer\_colors](https://api.arcade.academy/en/latest/api/sprite_list.html#arcade.SpriteList.buffer_colors), [buffer\_angles](https://api.arcade.academy/en/latest/api/sprite_list.html#arcade.SpriteList.buffer_angles) and [buffer\_indices](https://api.arcade.academy/en/latest/api/sprite_list.html#arcade.SpriteList.buffer_indices)
* OpenGL:
* Added support for indirect rendering. This is an OpenGL 4.3 feature. It makes us able to render multiple meshes in the the same draw call providing significant speed increases in some use cases. See [arcade.gl.Geometry.render\_indirect()](https://api.arcade.academy/en/latest/gl/geometry.html#arcade.gl.Geometry.render_indirect) and examples in the experimental directory.
* Added support for unsigned integer uniform types
* arcade.gl.Geometry.transform
no longer takes a mode parameter.
Special thanks to [einarf](https://github.com/einarf), [eruvanos](https://github.com/eruvanos), [janscas](https://github.com/janscas), [MrWardKKHS](https://github.com/MrWardKKHS), [DragonMoffon](https://github.com/DragonMoffon), [pvcraven](https://github.com/pvcraven), for their contributions to this release. Also, thanks to everyone on the Pyglet team! We depend heavily on Pyglet’s continued development. | 0.87 | t3_tghjn8 | 1,647,543,660 |
Python | I'm an amateur Python programmer, what's my next step? | I've been coding in Python for years now & I've done a wide range of projects from discord bots to analysing CO2 data but now I'm at a loose end.
Ideally either I'd help open source projects or I'd help specific people, the problem is I've never done open source stuff before & all the active projects I can find are big, complex projects which are daunting by themselves.
Does anyone know any smaller open source projects that need/want help or specifically where to find them or where I can work with a small group of people on a project? | 0.84 | t3_tggmnl | 1,647,541,287 |
Python | Bookmarking Application (sqlite, tkinter, bcrypt) | My largest project so far, pretty happy with what I learned about passwords/account creation, and what felt like a decent intro to databases.
&#x200B;
This program will let you make an account, save bookmarks to a database, and then reference only the bookmarks saved to the logged in account, along with a few other features listed in the github readme.
&#x200B;
Goal of this program was to get some idea of how to use a database, figure out how to create a user account system, and to work on my code readability and structure.
&#x200B;
Please hit me with some feedback! Questions or criticism on anything would be much appreciated.
&#x200B;
&#x200B;
[landing page after login, with access to the other pages of the program.](https://preview.redd.it/d6gbs4qq1zn81.png?width=428&format=png&auto=webp&s=79c59bccb5171aee8742d13e7edb0e183df17ff4)
&#x200B;
the project: [https://github.com/ZG34/Bookmarkus](https://github.com/ZG34/Bookmarkus) | 0.75 | t3_tgedn8 | 1,647,535,199 |
Python | Package for printing text with RGB colors in the console | As a quick introduction:
I'm making my own writing software to write my science fiction story with. As I started out knowing nothing about the language back in August, I made the foolish decision to use as little third party libraries as possible (where sensible). This made me learn quite a lot about the language and how certain things work in the world of programming.
Last week I decided to replace my dependency on Colorama with my own package: **AthenaColor**
The library supports the same structure as Colorama (Fore, Back, Style), but with a much expanded color base. Namely I have chosen to predefine all expanded html colors in the Fore and Back colors.
All ANSI Select Graphic Rendition parameters are also implemented, yet most of them do not work in PyCharm. I've decided to put the ones that don't work in the PyCharm console under Style.Unverfified.
I'm also working on the capabilities to put in blinking text, and other similar methods, but these aren't within the project yet. When they are, I will update this post.
[A limited view of all predefined colors and all the Stylings you can do](https://preview.redd.it/s2is7qs2zyn81.png?width=1007&format=png&auto=webp&s=c36ca104e1a04d41bd89d339d9932b32b2c68301)
&#x200B;
[All predefined colors](https://preview.redd.it/0l2f2moe0zn81.png?width=367&format=png&auto=webp&s=0d118d58c979b3c6065ce3a310964c55a75498bd)
The library also allows you to define custom RGB objects to use within the library, allowing you to print all 16.777.216 possible colors.(I've tried to make a print out in PyCharm of all these colors for fun, to see what would happen, and PyCharm doesn't like it when you try to do this)
&#x200B;
Source code: [https://github.com/DirectiveAthena/VSC-AthenaColor](https://github.com/DirectiveAthena/VSC-AthenaColor)
PyPi link: [https://pypi.org/project/AthenaColor/](https://pypi.org/project/AthenaColor/)
&#x200B;
Small addendum: I'm a hobbyist Developer who only uses PyCharm as my development environment, so if there are any issues with another program, I will happily try to solve them, but cannot promise that these issues will be fixed as soon as possible | 0.71 | t3_tge96v | 1,647,534,851 |
Python | Is programming easy or am I doing things wrong? | I started learning python around 5 months ago, with some breaks and inconsistency but for the last 2 months I have been steadily learning it, 4-10 hours daily. I am in a position where I am being mentored for a business sector that is really technology-based, so I am familiar with 'professional' programming costs and time frames.
One time, the owner talked about hiring a company to make a program/web app, so I took it as an opportunity to attempt to do the project myself, just as a learning opportunity.
The quote was like tens of thousands of $$$, and they say it will take multiple months to do (not because they're booked up).
And this is something simple like following docs of another service to integrate with a very simple front-end and a decent SQL database. I just feel like I must be doing something wrong if it only takes me, a single person, a month and a half to have a complete product that works.
I just don't understand how I can do it so quickly, but professional programmers take way longer and charge so much. Is there a reason? Such as multiple layers of protection from hiccups and bugs, etc.?Could it also be that I understand the software and they would need to delve into it more? Am I some genius programmer? /s but seriously, very curious and confused. (And I understand this can be a question that seems like a brag or something)
The owner even brought up when I showed him the software that it must be programmed wrongly if it could be done so quickly. | 0.76 | t3_tgcpur | 1,647,530,729 |
Python | A template engine I did... | I have been looking for project inspirations, I ended up creating this template engine https://github.com/mauro-balades/yate | 0.67 | t3_tgcopq | 1,647,530,636 |
Python | Frelatage: A fuzzing library to find vulnerabilities and bugs in Python applications | &#x200B;
Frelatage is a coverage-based Python fuzzing library which can be used to fuzz python code. The development of Frelatage was inspired by various other fuzzers, including [AFL](https://github.com/google/AFL)/[AFL++](https://github.com/AFLplusplus/AFLplusplus), [Atheris](https://github.com/google/atheris) and [PyFuzzer](https://github.com/eerimoq/pyfuzzer).The main purpose of the project is to take advantage of the best features of these fuzzers and gather them together into a new tool in order to efficiently fuzz python applications.
Github repo: [https://github.com/Rog3rSm1th/Frelatage](https://github.com/Rog3rSm1th/Frelatage)
PyPi: [https://pypi.org/project/frelatage/](https://pypi.org/project/frelatage/)
Demo:
https://i.redd.it/anvsvnedmyn81.gif | 0.85 | t3_tgce3v | 1,647,529,813 |
Python | Announcing compushady: a Python module for easily running Compute Shaders | 0.67 | t3_tgc6l4 | 1,647,529,248 |
|
Python | Roles and Permissions in Masonite | 0.76 | t3_tg88hq | 1,647,517,257 |
|
Python | Online Python environment for middle school students (Chromebooks) | Hello,
we're looking for an online environment to let students (age 11-13) play with Python. We need an online resource to avoid installing anything on Chromebooks.
Ideally this would work with Google Drive to save projects.
For now I've found this simple tool: [https://www.online-python.com/](https://www.online-python.com/)
Is there anything better you would suggest?
Thanks! | 0.93 | t3_tg86m4 | 1,647,517,062 |
Python | High-level tools to simplify visualization in Python | 0.87 | t3_tg4r7y | 1,647,502,854 |
|
Python | 5 Steps to Master Python Decorator | 0.5 | t3_tg4ho8 | 1,647,501,697 |
|
Python | End to end encrypted pastebin built with Starlette (as the file server.) | Recently when looking to deploy a simple pastebin onto my self hosted server I found it difficult to find any modern docker deploy-able pastebins what were secure by default. This inspired me to create my own.
Paaster is a secure by default end to end encrypted pastebin built with Svelte, Vite, Typescript, Python, Starlette, rclone & Docker.
[Github](https://github.com/WardPearce/paaster) (Any stars or merges appreciated)
[paaster.io](https://paaster.io)
[Example paste](https://paaster.io/NqU-4gSo2SSWXhIBSct9l#hD8y8CEr4JjRpuo2nrdL6xGtBIP17QPbpGv2Ld1jlMA)
# Preview
[Preview](https://i.redd.it/oskt8a6upun81.gif)
# Features
* End to end encryption.
* Rate limiter (with redis).
* Shortcuts.
* Rclone supported.
* Nano IDs.
* Paste history.
* Auto code highlighting.
* Memory efficient file handling .
* Server secrets bcrypt hashing.
# Future plans
* Unit tests
* File uploading | 0.93 | t3_tfzdes | 1,647,482,892 |
Python | _ctypes in pure python code: | I've found the needed components to potentially put \_ctypes.c code into python scripts. I've also found the needed preprocessor to make such work. | 0.29 | t3_tfwzu1 | 1,647,475,485 |
Python | Thursday Daily Thread: Python Careers, Courses, and Furthering Education! | Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.** | 0.72 | t3_tfww6h | 1,647,475,210 |
Python | Python 3.10.3, 3.9.11, 3.8.13, and 3.7.13 are now available with security content | 0.85 | t3_tfuvc8 | 1,647,469,462 |
|
Python | Network Tracking using Wireshark and Google Maps - Python3 | 0.73 | t3_tfu7pd | 1,647,467,653 |
|
Python | First time to work in python | hello guys i’m new here and I have question about python. what exactly you guys doin at work ? i’m bout to apply for a job and I have no idea what to do or what they’re expecting me to do. | 0.4 | t3_tfrqfi | 1,647,460,900 |
Python | First steps into async Python | 0.67 | t3_tfi3nr | 1,647,438,567 |
|
Python | Composer: a new PyTorch library to train models ~2-4x faster with better algorithms | Hey all!
We're excited to release Composer ([https://github.com/mosaicml/composer](https://github.com/mosaicml/composer)), an open-source library to speed up training of deep learning models!
https://preview.redd.it/87if2pufdsn81.png?width=3009&format=png&auto=webp&s=0238e6bf3050be3e4db27ca07dbbea80a16a7f49
Composer lets you train:
* A ResNet-101 to 78.1% accuracy on ImageNet in 1 hour and 30 minutes ($49 on AWS), **3.5x faster and 71% cheaper than the baseline.**
* A ResNet-50 to 76.51% accuracy on ImageNet in 1 hour and 14 minutes ($40 on AWS), **2.9x faster and 65% cheaper than the baseline.**
* A GPT-2 to a perplexity of 24.11 on OpenWebText in 4 hours and 27 minutes ($145 on AWS), **1.7x faster and 43% cheaper than the baseline.**
https://preview.redd.it/hf8u1mk1esn81.png?width=10008&format=png&auto=webp&s=a5606571bf6a23c607d58648e654bdd2184afd83
Composer features a **functional interface** (similar to torch.nn.functional), which you can integrate into your own training loop, and a **trainer,** which handles seamless integration of efficient training algorithms into the training loop for you.
**Industry practitioners:** leverage our 20+ vetted and well-engineered implementations of speed-up algorithms to easily reduce time and costs to train models. Composer's built-in trainer makes it easy to **add multiple efficient training algorithms in a single line of code.** Trying out new methods or combinations of methods is as easy as changing a single list, and [we provide training recipes](https://github.com/mosaicml/composer#resnet-101) that yield the best training efficiency for popular benchmarks such as ResNets and GPTs.
**ML scientists:** use our two-way callback system in the Trainer **to easily prototype algorithms for wall-clock training efficiency.**[ Composer features tuned baselines to use in your research](https://github.com/mosaicml/composer/tree/dev/composer/yamls), and the software infrastructure to help study the impacts of an algorithm on training dynamics. Many of us wish we had this for our previous research projects!
**Feel free check out our GitHub repo:** [https://github.com/mosaicml/composer](https://github.com/mosaicml/composer), and star it ⭐️ to keep up with the latest updates! | 0.78 | t3_tfoebv | 1,647,454,514 |
Python | Tool detection using phone and Machine Learning | &#x200B;
https://reddit.com/link/tfny9g/video/nvbynxiyasn81/player
Making my phone as an Extension of the camera I can detect objects in my laptop by streaming feed into OpenCV sing YOLO
[source](https://github.com/Aaris-Kazi/Tool-Detection-using-YOLO/) | 0.76 | t3_tfny9g | 1,647,453,322 |