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
Python Tutorial - How to create a Car Processor and Detector using Python?
Hey Everyone! I created a short Python Tutorial explaining how I created a Car Processor and Detector using Python. [https://www.youtube.com/watch?v=ZXFS-uUNTcg](https://www.youtube.com/watch?v=ZXFS-uUNTcg) https://preview.redd.it/gjbek5zoqru81.png?width=2880&format=png&auto=webp&s=149cf6b3e18c77d190c806686d588862ebcab56e
0.75
t3_u89kvw
1,650,497,426
Python
Flask vs FastAPI for a microservice
Hello, ​ I'm going to build a microservice that processes images and does OMR on them, and I'm torn between using Flask or FastAPI. ​ I have used Flask in the past, but recently I have been using Nodejs, so the async nature of FastAPI will make it similar to Nodejs, plus I have read that it's better for making APIs. ​ Which one do you think is more suitable in my case?
0.78
t3_u86ra7
1,650,489,404
Python
Type hints immediately giving payoffs
[https://imgur.com/a/0NaPfxQ](https://imgur.com/a/0NaPfxQ) So, I 'FORCED' myself to use typehints. Flask seems to already priovide some motivation, so I went ahead and carried on. LOOK! WOW! PyCHARM! Immediately, I know that I'm not 'properly' creating a file path. I can go back and fix this later, but look, joining a bunch of strings with '/' doesn't make an 'os.path'. Nice warning! Typehints.... I'm becoming a fan. It's slowing me down a little developing, but this is an obvious place a bug can happen, and I didn't really think about it. It's not ready, but this is a custom-built hls/dash packager. [https://github.com/flipmcf/CasterPak](https://github.com/flipmcf/CasterPak) It's only like 2 days old, so be nice.
0.58
t3_u86q6j
1,650,489,316
Python
Bloomberg just Open sourced Memray a memory profiler for Python
0.98
t3_u84tjr
1,650,484,108
Python
Python learning group?
Hello! I recently graduated college with a psychology degree but figuring out it may not be something I want to do with my life, I recently started learning programing languages, specificly Python. I'm currently doing okay. I'm understanding things so far but as it gets more advanced in the long run, I believe that learning with like minded people would increase the possibility of us seeing it through. Does anyone want to form a study group, via discord or know of any??
0.74
t3_u81o93
1,650,475,476
Python
Python's stability
My production code has been running for a while. For the first 24 hours, every metric, errors, logging, etc.. happened as expected. But the last 6 hours was a disaster. Even though the state was unchanged, some logs were not shown, some services were not called, etc... Have you guys faced this kind of instability before?
0.33
t3_u7zog4
1,650,470,137
Python
I wrote an article on "Packaging and Publishing Packages on PyPI"
1
t3_u7lr6r
1,650,420,710
Python
How to write a Python3 wrapper library/module for a JSON REST API in 15 simple steps
0.96
t3_u7vquv
1,650,458,946
Python
37 Sixty Second Python Tutorials
Python 60 Second Videos: https://www.youtube.com/playlist?list=PL6lxxT7IdTxG5li13TmP0fvHaFRZaHi4d
0.78
t3_u7uhit
1,650,454,737
Python
Gaming oriented Turtle fork
I've been learning python for around 6 months and I've made a fork of the turtle module called "burtle", its meant to make games with, but i added other cool stuff like a text box and click detection. Please check it out and give feedback! [https://github.com/alannxq/Burtle](https://github.com/alannxq/Burtle)
0.7
t3_u7s0vo
1,650,444,648
Python
Java Vs Python Comparison: Which Programming Language is Right for My Business?
Entrepreneurs are presently facing a challenge in establishing their enterprise app since they must make a difficult decision: which language to employ for their app development. Both Java and Python have advantages and disadvantages and certain commonalities. However, there are some distinctions between Java and Python. The most difficult decision for entrepreneurs who wish to automate their businesses is to choose between the two master languages. You may have read about the differences between these two options, depending on your project's technical requirements. This blog provides eye-opening insights into the [Java vs Python](https://www.bacancytechnology.com/blog/java-vs-python) difference in enterprise applications which you can check out. ​
0.36
t3_u7rvi0
1,650,443,966
Python
Making the switch from academia to industry? R to Python?
I'm 32F and finally deciding to make the switch. The only snag is my experience in coding is all in R. I know there are lots of online Python courses but I'm looking for an intensive (couple of weeks maybe?) course that would be accredited and sit well on my CV. I've done well for myself in academia, in terms of reputation in data viz, but I have no connections in industry and I'm not sure how to get in the door. Anyone else made the switcheroo?
0.89
t3_u7qtvf
1,650,439,255
Python
Compiling Python programs with Pyinstaller
0.74
t3_u7pu7w
1,650,435,048
Python
Visualization of the 3x+1 problem using turtle graphics
​ [My new screen saver](https://preview.redd.it/8zfb0b1p4mu81.png?width=3814&format=png&auto=webp&s=a726b12997a7c6d3fad9a784e56550c878d192bd) [Source code](https://github.com/Spovis/collatz) This is a visualization of the sequence generated by the Collatz conjecture. It generates some beautifully intricate graphs from some very simple logic. I had a lot of fun making this, maybe it will give some ideas to someone else. Any code critiques are welcome.
0.86
t3_u7ogas
1,650,429,653
Python
Novel and small python projects and code snippets
Share your answers to these tasks in the comments. Feel free to ask for help. # Task 1 (Beginner) # Create a class “NumberSet” that: - Inherits from the built in set class - That overrides __setitem__ to only allow numbers You will learn about inheritance, “super”, and sets # Task 2 (Intermediate) # Create an NxN matrix where N is any odd number, where each cells value is the distance of that cell from the centre. - For examples 3x3 matrix, the “middle” cells value will be 0, but any outer cells value will be 1 You will learn about basic algorithmic logic, nested loops (or arrays ;) ) and a bit of basic math # Task 3 (Intermediate) # Create a 100x100 pixel “blue” colour bitmap image from scratch (with no third party image libraries): - You will use this to understand the file format required https://en.wikipedia.org/wiki/BMP_file_format?wprov=sfti1 - You will be working with binary data only You will learn about file headers and formats, binary data, and image creation # Task 4 (Intermediate) # Create a function decorator that runs the decorated function twice. You will learn about nested functions, higher order functions, and decorators
0.75
t3_u7ls2t
1,650,420,783
Python
How Python Enriched the Use of AI in Several Industries
Artificial intelligence and machine learning can be considered as the new backbones of the IT industry. While discussion over developing newer technologies to provide maximum safety continues, people innovate expanded abilities and capacities of artificial intelligence. [Artificial intelligence](https://en.wikipedia.org/wiki/Artificial_intelligence) went from being a part of science fiction to a daily need of people worldwide. AI's added abilities have successfully reduced manual labor to a great extent and almost perfected the accuracy level.  The amount of data produced increases its volume day by day, and the size has now become impossible to handle manually. AI helps analyze the data of many organizations to predict their future outcome and plan growth strategies accordingly. For example, many online websites have now launched the feature of chatbots that utilizes AI. This helps to enhance the customer experience. This shows how AI and machine learning efficiently and accurately process huge volumes of data for drawing in more customers. Forming Future Technologies The rising volume of data is increasing the complexity of data proportionately. As data becomes more complex, analyzing it manually becomes tougher. This machine intelligence is utilized to analyze and process the data for accurate results, and there is no limit to data.  Using artificial intelligence mainly enhances three aspects of any organization. They are: * Accuracy in predictions and insight production increases business efficiency. * It is a very low-cost venture instead of hiring many individuals at high salaries. * Finally, it increases the productivity of the organization. This gives a precise reason why many companies use AI and machine learning to propel product development and improve the overall performance. Research has also discovered that using AI-laded technologies is the new trend in industrial transformation, particularly for enhancing the company. It has also concluded that within a few years, the companies that utilized AI in producing innovative products and processes are most likely to expand their grounds. To sum up, AI and machine learning produce better results while giving much smaller efforts.  The Use of Python [Python](https://www.python.org/) checks off many boxes that result in being useful for AI and machine learning. Many features are present in Python, which makes it one of the best languages for these purposes. Thus, the knowledge of Python is important in the data science field as many industries use it to predict and analyze data. Python is open-source in nature, so AI development companies' achievements can be shared with the community.  Some industries that extensively use Python in expanding their businesses are: * Healthcare * Travel and transportation * Finance technology Health Care Health centers use data to scrutinize and diagnose their patients properly. The growing popularity of AI involvement in decrypting data leads to the rise in Python programmers' demand as it is the most popularly used program in the data science industry. Travel and Transportation Python and machine learning algorithms enable travel giants to predict airplane routes and behaviors easily. Therefore, implementing AI in the travel industry helps with customer efficiency, creating cost-effective budget plans, and setting the price details of new routes.  Finance Technology AI has also used its way in finance sectors to save from risks and frauds. Programming languages can detect any anomaly behavior and also helps in analyzing market behavior effectively.  Take [**data science course**](https://360digitmg.com/data-science) today and get your dream job.     📷
0.2
t3_u7l4rv
1,650,418,780
Python
Looks like I'm going to prom thanks to Python!
[https://github.com/Jah-On/prom-decider](https://github.com/Jah-On/prom-decider)
0.5
t3_u7l0ce
1,650,418,382
Python
Learn how to Scraping Google and optimize search using google search operators
0.33
t3_u7kzgt
1,650,418,303
Python
Wednesday Daily Thread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions! This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at [https://discord.gg/python](https://discord.gg/python) where you stand a better chance of receiving a response.
0.86
t3_u7j74e
1,650,412,810
Python
PyMailer: A small utility I wrote in Python3 to automate sending server notifications via an SMTP service
I do a lot of self-hosting and homelabbing, and I often found myself wishing that my various services and cron jobs had a simple way to send me notifications through a regular Gmail account. I know tools already exist to do this but I just wanted a dirt-simple utility that I could say pipe the output of a script in to and it would just automatically send it to me in an email. So over the weekend I wrote [PyMailer](https://github.com/UltraChip/PyMailer) \- a basic command-line utility written in Python3 that does exactly that. Now getting my server to notify me is as simple as adding cat /some/log/file/or/something | pymailer to the end of a script. Configuration is accomplished by editing a JSON-esque config file - I tried to keep it as simple as possible. Honestly it's nothing all that special - I banged it out in a couple hours - but it was a fun excuse to learn how to use argparse (especially figuring out how to read in data from stdin) as well as getting to play with Python's MIME and SMTP modules. And even though this is one of the simplest projects I've done the past few years it's likely going to end up being one I actually use a lot, so I'm glad I made it.
0.5
t3_u7hk4i
1,650,407,953
Python
I wrote a python script that you can copy into your projects for quickly logging information between your Terminal and Files
I’ve been working on a bunch of different python scripts recently and I found myself constantly referring back to Python’s built-in logging library for some basic debugging/logging setup. After doing this a few times I decided to sit down and write this script that you can quickly import into any existing python environment and quickly start logging information to either your terminal or a file. It’s a short 200-ish .py file that you can just copy over into your project and instantly start using. Source can be found here: [https://github.com/henryriveraCS/logger](https://github.com/henryriveraCS/logger) Let me know what you think :\^)
0.75
t3_u7gw5z
1,650,406,071
Python
Is anyone taking the CS50p (for Python) currently in progress from Harvard?
Just wondering what your thoughts are on it, how it compares to the original CS50, etc?
0.84
t3_u7g0ix
1,650,403,719
Python
Keylogger In Just 10 Lines Of Python
0.67
t3_u7fczz
1,650,401,947
Python
Dash is Deeper than Dashboards
0.88
t3_u7emja
1,650,399,953
Python
Program that counts lines of code
Posted this while back but its been changed quite a bit. At the time many of you had very constructive criticisms of my code that were incredibly helpful. Please do so again! This script runs on the command line and counts lines of code in a specified file or directory for files with a specified extension. Feel free to tear it apart :) [https://github.com/carterdugan/LineCounter](https://github.com/carterdugan/LineCounter)
0.5
t3_u7e96y
1,650,398,975
Python
Just A Todo App
* **It's a Todo App that I wrote, and it's my first time developing a full-stack application with Flask. It's possible that it has multiple bugs, since I didn't thoroughly test it. Limiters or rate limitations are built into the routes and endpoints to avoid abuse. You can create or add additional Todos, but I haven't implemented** [**CRUD**](https://developer.mozilla.org/en-US/docs/Glossary/CRUD) **entirely yet, but I may do so in the future since I'm still learning fullstack development.** https://preview.redd.it/u3yovjldbju81.png?width=1366&format=png&auto=webp&s=d39ecebde42df6e3dfa2d30ae47ce2e4690639d8 * **Github :** [SecretsX - JustATodoApp](https://github.com/SecretsX/JustATodoApp)
0.6
t3_u7cwkw
1,650,395,385
Python
Created Python Jobs (Backend and AI/ML) Website
Hey, Guys! I'm building a Job board that connects Python Developers (Backend and AI/ML Engineers) with Startups and Companies hiring for Python roles. Launching in 2 Weeks! Here is the link to keep in touch ➡ [pyhunt.com](https://www.pyhunt.com/) Feedbacks and Questions are welcome, Thanks :)
0.78
t3_u7ccs4
1,650,393,952
Python
UFC analysis with Python
I made the code in Python to get rankings of UFC fighters in Lightweight for period 2013-2022 from site [mma-stats.com](https://mma-stats.com), process them, and create bar chart race of these rankings. Code for my project is available on [https://github.com/SergeyZago/ufc\_analysis/blob/main/UFC%20Lightweight.py](https://github.com/SergeyZago/ufc_analysis/blob/main/UFC%20Lightweight.py). Visual representation of result is available on [https://youtu.be/cenZedT-B8o](https://youtu.be/cenZedT-B8o)
0.57
t3_u7c0jv
1,650,393,068
Python
How to Build Countable Classes in Python
0.63
t3_u7bdds
1,650,391,390
Python
Snake Code
Snake Code: ​ ​ import time import pygame from enum import Enum import random class Direction(Enum): UP = 1 DOWN = 2 RIGHT = 3 LEFT = 4 window\_width = 720 window\_height = 720 pygame.init() pygame.display.set\_caption("Snake Game 1") window = pygame.display.set\_mode((window\_width, window\_height)) refresh\_controller = pygame.time.Clock() snake\_position = \[250, 250\] snake\_body = \[\[250, 250\], \[240, 240\], \[230, 250\]\] food\_position = \[250, 250\] scale = 20 global score score = 0 global speed speed = 1 def handle\_keys(direction): new\_direction = direction for event in \[e for e in pygame.event.get() if e.type == pygame.KEYDOWN\]: if event.key == pygame.K\_UP and direction != Direction.DOWN: new\_direction = Direction.UP if event.key == pygame.K\_DOWN and direction != Direction.UP: new\_direction = Direction.DOWN if event.key == pygame.K\_RIGHT and direction != Direction.LEFT: new\_direction = Direction.RIGHT if event.key == pygame.K\_LEFT and direction != Direction.RIGHT: new\_direction = Direction.LEFT return new\_direction def move\_snake(direction): if direction == Direction.UP: snake\_position\[1\] -= scale if direction == Direction.DOWN: snake\_position\[1\] += scale if direction == Direction.LEFT: snake\_position\[0\] -= scale if direction == Direction.RIGHT: snake\_position\[0\] += scale snake\_body.insert(0, list(snake\_position)) def generate\_new\_food(): food\_position\[0\] = random.randint(5, ((window\_height - 2) // scale)) \* scale food\_position\[1\] = random.randint(5, ((window\_height - 2) // scale)) \* scale def get\_food(): global score global speed if abs(snake\_position\[0\] - food\_position\[0\]) < 20 and abs(snake\_position\[1\] - food\_position\[1\]) < 20: score += 1 speed += 2 generate\_new\_food() else: snake\_body.pop() def paint\_hud(): font = pygame.font.SysFont("Arial", scale\*2) render = font.render(f"Score: {score}", True, pygame.Color(255, 255, 255)) rect = render.get\_rect() window.blit(render, rect) pygame.display.flip() def repaint(): window.fill(pygame.Color(5, 0, 5)) for body in snake\_body: pygame.draw.circle(window, pygame.Color(0, 255, 0), (body\[0\], body\[1\]), scale/2) pygame.draw.rect(window, pygame.Color(255, 0, 0), pygame.Rect(food\_position\[0\]-scale/2, food\_position\[1\]-scale/2, scale, scale/2)) def game\_over\_message(): font = pygame.font.SysFont('Arial', scale\*3) render = font.render(f"Score: {score}", True, pygame.Color(255,255,255)) rect = render.get\_rect() rect.midtop = (window\_width / 2, window\_height / 2) window.blit(render, rect) pygame.display.flip() time.sleep(2.5) pygame.quit() exit(0) def game\_over(): if snake\_position\[0\] < 0 or snake\_position\[0\] > window\_width - 10: game\_over\_message() if snake\_position\[0\] < 0 or snake\_position\[1\] > window\_height - 10: game\_over\_message() for blob in snake\_body\[1:\]: if snake\_position\[0\] == blob\[0\] and snake\_position\[1\] == blob\[1\]: game\_over\_message() def game\_loop(): direction = Direction.RIGHT while True: direction = handle\_keys(direction) move\_snake(direction) get\_food() repaint() game\_over() paint\_hud() pygame.display.update() refresh\_controller.tick(speed) if \_\_name\_\_ == "\_\_main\_\_": game\_loop()
0.3
t3_u79ohy
1,650,387,027
Python
Hello everyone I have been creating a boilerplate/template for FastAPI and PostgreSQL. Please have a look and give me a star if you like. #Python #FastAPI #PostgreSQL #Pytest
0.5
t3_u79f99
1,650,386,342
Python
Download Outlook Email Attachments Using Microsoft Graph API In Python[
Recently published a video covering how to download emails from your Outlook account with Microsoft Graph API using Python, and thought some of you might find the tutorial useful. Video Link: [https://youtu.be/UF-hc2nZV\_A](https://youtu.be/UF-hc2nZV_A)
1
t3_u77n4y
1,650,381,620
Python
78 Python data science practice problems in a single github repo including numpy, pandas, matplotlib, scipy, regex, pytorch
0.98
t3_u77fce
1,650,381,050
Python
QualityScaler 1.3.0 - Image/video upscaling & enhancement Windows app
​ [GUI](https://preview.redd.it/vtj3a827yhu81.png?width=1357&format=png&auto=webp&s=9321b61c88261595c31d3512cef93af4cc0bcf39) [EXAMPLE](https://preview.redd.it/lbfejx48yhu81.png?width=2232&format=png&auto=webp&s=13067052d8ed6364eff09d716746e37986cff7d1) Itch -> [https://jangystudio.itch.io/qualityscaler](https://jangystudio.itch.io/qualityscaler) Github -> [https://github.com/Djdefrag/QualityScaler/releases/tag/1.3.0](https://github.com/Djdefrag/QualityScaler/releases/tag/1.3.0) ​ **Update 1.3.0 - Auto tile-merge / speed and UI improv. (1.3.0)** New * Automatic tiles and merge images and video frames to avoid Gpu VRam limitation * Gaussian filtering after upscale to avoid tiles and merging defects in images * New upscale factor x3 UI * A new vertical left bar, now is much cleaner and uniform * All buttons now have same dimension * App title changed color and the background has been removed * Upscale/Stop buttons are bigger * Other general improvements Bugfix/improvement * Removed unused functions * General code cleaning and improvements
1
t3_u76rf5
1,650,379,305
Python
I made a football simulation/game entirely using Python Turtle Graphics
# Overview: About a year ago i made a project called as "Python Football Game" which was just a Pong game on green background and goal posts it felt like cheating so this time i made an entire football game with 11 players and other rules etc in python turtle with about *629 lines of code* you can have a look at it here: ​ [Working Of Simulation\/Game](https://reddit.com/link/u75ydj/video/awyg0ye3thu81/player) [Python Football Simulation In Turtle](https://www.youtube.com/watch?v=7rRYpX5-9RI) (Alternative Link Youtube) You can do all sorts of things from passing ball to other teammates to scoring goals to switching players (inspired by fifa like mechanics) with throwing ball to a teammate if it goes outside etc. The team that scores 3 goals first wins you play against CPU with enemy having its own Logical AI it's a fun experience. # Source Code: [Project Source Code Here](https://github.com/JackhammerYT/Football-Simulation) # Controls: w(up) , a(left) , d(right) , s(down) , q(north west) , e(north east) , z(south west) , x(south east) Space Bar (Change Player) , Mouse Click (Pass the ball onto clicked position) # Challenges: Even though with how simple it's design was there were few challenges i learned to overcome, the biggest one being Calling a function after a delay without using threads. This was a rather hard challenge to overcome because turtle is not a thread safe framework that is all the GUI operations need to run on main thread and it so happened that i required to call a GUI operation with delay i solved it by making my own FunctionInvoker class based on time module that invokes a function after a delay you can see it's structure in "[FunctionInvoker.py](https://FunctionInvoker.py)" file on github repo
0.79
t3_u75ydj
1,650,377,093
Python
I was today years old when I found out that Python supports else clauses in try/excepts.
Their functionality is brilliant, too! I always used to use guard values and flags to find out if an exception happened. Totally surprised (and embarrassed), but IMO this is one of the reasons why writing in Python feels so nice. Context: I have been using python for 7 years (from 2nd year of college up to mid-PhD), and using it almost exclusively in the last 4. I did know about the `finally` clause, but I hardly ever use it.
0.94
t3_u75y3m
1,650,377,073
Python
I wrote a Spotify alternative in Python
[Myuzi](https://gitlab.com/zehkira/myuzi) is a Spotify alternative for Linux. It's built entirely using Python. The interface uses GTK, and the streaming is handled by `youtube-dl` and Gstreamer. You don't need an account to use Myuzi, and there are no payments or ads. This is a prototype, so things will break a lot. [AUR](https://aur.archlinux.org/packages/myuzi) | [Source](https://gitlab.com/zehkira/myuzi) | [Donations](https://www.patreon.com/bePatron?u=65739770)
0.87
t3_u7446h
1,650,371,709
Python
What are some of the main reasons I should switch to pytest from unittest?
0.92
t3_u73xv2
1,650,371,161
Python
Build a Web App with Pandas
0.71
t3_u725g8
1,650,364,948
Python
How To Install Kivy On macOS Monterey
0.25
t3_u71x6r
1,650,364,046
Python
Auto ML in Python — An Overview of the MLBox Package
0.5
t3_u70gk9
1,650,358,000
Python
Dynamic Logging for logging.Logger
I have created an extension of `logging.Logger` class to be able to easily & dynamically log "extra" values. This module provides 2 main APIs - `log_extras()` decorator to log values from the decorated function arguments and `set_extras()` method to log static values. ``` import dynamic_logger import logging logging.setLoggerClass(dynamic_logger.Logger) # Set-up log formatter with user-definied attributes fmt = '[%(asctime)s] <%(app)s> [%(levelname)s] <%(id)s> <%(customer_id)s> --- %(message)s' # Note: format attributes in <> are user-definited # Load config logging.basicConfig(format=fmt, datefmt='%d-%b-%y %H:%M:%S', level='INFO') applogger = logging.getLogger(__name__) @applogger.log_extras('id',int=0,customer_id='obj.customer_id') # Log value of 'id' and 'obj.customer_id' def example_1(id=0,id2=0,obj=None): applogger.info('This example shows how to log values from function arguments') if __name__ = "__main__": example_1(id=123456,obj={"customer_id":777}) ``` Will give below log entry [2022-04-19 12:53:51,658] [INFO] <123456> <customer_id:777> --- This example shows how to log values from function arguments More examples and code can be found [here](https://github.com/ajatkj/dynamic_logger). I hope this is useful for someone.
0.71
t3_u70a80
1,650,357,206
Python
I developed a template for starting new Python projects! Features: Poetry, GitHub CI/CD, MkDocs, publishing to PyPi/Artifactory, Pytest, Tox, black and isort.
0.94
t3_u7081n
1,650,356,962
Python
Python Lambda Function in Simple Words
How to Use Lambda Function? Difference Between Lambda and Def Function? What are the benefits of the Lambda Function? The most important things you should know about the Lambda/Anonymous Function in Python by many examples. Take a look at [my story](https://medium.com/p/e05171925c98) and leave comments!
0.58
t3_u6zh3e
1,650,353,719
Python
Beginning a brand new set of ML foundations series starting with Pandas
Beginning a Hey all, I am starting a new set of ML video series on Youtube. I will be covering the topics very deep, the way I wish someone taught me. Pandas is the first topic, promise to post one video every weekday. Please view and let me know your suggestions. Link : [Pandas for Data Science](https://www.youtube.com/watch?v=t4yBm9agYWo&list=PLFAYD0dt5xCxdKfIR3ZX3k07qrqEjUZSO&index=2&t=1s)
0.8
t3_u6yugv
1,650,351,107
Python
Python Selenium Tutorial #9 - How to bypass/solve hCaptcha using 2captcha API
0.75
t3_u6yo7z
1,650,350,404
Python
Are you a person who loves reinventing a wheel ?
Just wondering, are you a person who loves remaking the most popular python library ? When people are learning how to create a Python web app using Flask, you are thinking "I am going to make the library by myself." . When people are learning how to use Django + Gunicorn, you are thinking "I am going to make all of the components by myself." .
0.73
t3_u6u7i6
1,650,334,907
Python
From 30 to 11 Lines of Code: Revisiting Rock Paper Scissors in Python
0.56
t3_u6t9yb
1,650,332,091
Python
Is your company still letting you use Pycharm?
I really hate programming without Pycharm. Actually, I hate programming without Jetbrains as I use several of their applications for personal use and pay for the All-Products Pack. I noticed today that CORP does not have it in their approved software list any more. I still have it installed on my work machine and still use their stuff everyday at home. Is all okay with Jetbrains given the current thing?
0.77
t3_u6t4hn
1,650,331,639
Python
Tuesday Daily Thread: Advanced questions
Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python. **If your question is a beginner question we hold a beginner Daily Thread tomorrow (Wednesday) where you can ask any question! We may remove questions here and ask you to resubmit tomorrow.** This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at [https://discord.gg/python](https://discord.gg/python) where you stand a better chance of receiving a response.
0.86
t3_u6rcpp
1,650,326,409
Python
Indeed Job Scraper
What's happening in the job market? I published a new python script that pulls new jobs from an indeed advanced query and stores to a datasource. The attributes for each job include the posting title, description, pay, and url. I have another project I am working on where I am training an NLP model on a large dataset with Prodigy. If there is interest I can share that as well. Tune in! https://github.com/hazondata/webscraping
0.63
t3_u6r6xy
1,650,325,935
Python
DRF application for Authentication Using metamask
Hey Guys, So recently I wrote a drf application for authentication using metamask extension for a one click login. This app uses simple-JWT for managing and creating tokens and so is compatible with djoser as well. I am planning to create a more detailed documentation, add more testing and create a sample-app for demonstrations. I would really appreciate it if you test it out and tear it apart if you want. Feel free to contribute in any way possible. Also followed this tutorial for the basics [https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial](https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial)
0.68
t3_u6nv18
1,650,316,814
Python
Build a Twitter Bot with Python, Tweepy and the Twitter API
0.5
t3_u6mmt6
1,650,313,555
Python
Program Raspberry Pi Pico with Python https://medium.com/@needablackcoffee/program-raspberry-pi-pico-with-python-6a410192dd07
0.3
t3_u6lo7q
1,650,311,084
Python
Masonite Permission - Masonite Framework.
To all the Masonite Framework developers/engineers, the ACL package that I created is now production ready. Give it a try, and feedback. [https://github.com/yubarajshrestha/masonite-permission](https://github.com/yubarajshrestha/masonite-permission)
0.5
t3_u6kxwt
1,650,309,124
Python
Python implementation of recursive insertion sort.
0.76
t3_u6khdk
1,650,307,932
Python
Top down Minecraft.. clone? Written in python and pygame.
[https://youtu.be/-riH-R-1EfY](https://youtu.be/-riH-R-1EfY) Ignore my terrible voice. Github: [https://github.com/Electro-Corp/top-down-minecraft-ripoff](https://github.com/Electro-Corp/top-down-minecraft-ripoff)
0.33
t3_u6ib28
1,650,302,268
Python
User login system with JWT and FastAPI
In this series so far, we have set up our environment and created a user. Now we are going to let them login, we do so by sending them a JWT token which is then required in subsequent requests to access protected resources. Read this 4th post in this series to know how: [https://santoshk.dev/posts/2022/tdd-approach-to-create-an-authentication-system-with-fastapi-part-4/](https://santoshk.dev/posts/2022/tdd-approach-to-create-an-authentication-system-with-fastapi-part-4/)
0.68
t3_u6gvm7
1,650,298,419
Python
Are there any task queue libraries with the ergonomics of FastAPI
## django is to FastAPI as celery is to `???` We currently use FastAPI as our backend and Celery as our task/job queue. But I find it really clunky. Not that there's anything *wrong* with the Django/Celery way of doing things, but it doesn't jive with me. Everything is that old school loosey-goosey python style with kwargs and dynamic magic everywhere. It's sync so I need separate helper functions for all my IO work in the API, then another set for those in tasks. And I'm stuck with pass-by-import of all my IO, rather than DI, so I have to monkeypatch everything to unit test. Oh and I know about background tasks, this needs to be a distributed task queue with separate agents. Is there a task queue library out there with: - static types, full coverage ideally - Depends() style dependency injection, or similar - async native I've looked at RQ/ARQ and they are close to what I want but not quite. Alternatively, are there any tips to get a better experience with Celery in the way of async, typing, and DI? I think it's getting better with the typing, but the lack of DI frustrates my unit test writing and makes it more convoluted. Thanks!
0.64
t3_u6g9bf
1,650,296,839
Python
Which IDE do you use?
I'm new to CS in general, and our intro class used Wing Personal. Is there something about a basic IDE that holds me back? I'm not very educated on IDE's and have no idea if they're all the same. I've had no problems with Wing so far, I really like the tab structure.
0.64
t3_u6g4jk
1,650,296,486
Python
Python Tips and Tricks — Write Better Python Code
0.5
t3_u6fzb2
1,650,296,100
Python
PyQt hello world
0.43
t3_u6fiqo
1,650,294,880
Python
What is the usual tech stacks paths for Python developers going into the world?
I have a year left in Uni and I really like Python so I'd like to be prepared properly.
0.6
t3_u6egcg
1,650,292,090
Python
If you could start your Python journey over with what you know know what practices would you force your past self to implement?
This could also apply to programming in general or even best practices for communicating code to non technical team members/management.
0.85
t3_u6c6p8
1,650,285,569
Python
Why do people still pay and use matlab having python numpy and matplotlib?
0.94
t3_u6bcgc
1,650,282,874
Python
I have written a blog to create a Perceptron(Single Neuron) and then trained it on Cat and Dog image data. All from scratch in python.
0.67
t3_u6adlb
1,650,279,439
Python
Ping With Python
0.55
t3_u68m93
1,650,272,377
Python
3d Game Engine in Python
Have any of you guys experimented with 3d game engines in python like ursina, Panda3d etc... I want to prototype some ideas but I'm worried about running into platform specific issues after completing most of the development. I can obviously learn Unity or Unreal but I would like to know if viable options are there in python
0.92
t3_u6695b
1,650,262,365
Python
Why are some static type-checking functionalities implemented as identity functions?
For example, `typing.cast` returns the argument unchanged. Obviously, this has no effect on the program at runtime. If this is the case, why can we not just tell the static type checker (mypy) that we want the argument to be treated as some type *without* having to add a function call? Why can’t this override/cast be in a comment of some sort?
0.76
t3_u64dfw
1,650,255,058
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.87
t3_u5zpzh
1,650,240,011
Python
I wrote a program to play Minecraft in your Windows command line / Linux console
Video demonstration: https://youtu.be/P1d04is-wQQ Source code: https://github.com/louis-e/cli-screenview
0.93
t3_u5ykrh
1,650,236,464
Python
Type safe Django app, Part 3
0.7
t3_u5xql9
1,650,233,988
Python
r/Place Data Visualization w/ Python + Blender (open source project)
I've created a [GitHub repository](https://github.com/ChrisCrossCrash/r-place-blender) containing everything you need to create beautiful 3D renders of the [r/Place](https://www.reddit.com/r/Place/) 2022 canvas (scroll down for more info). [Python Logo \(r\/Place 2022\)](https://preview.redd.it/bm0m1c1vv5u81.jpg?width=1920&format=pjpg&auto=webp&s=c813de013e50fe3fa91cd954478cc3fdff25cb66) [Blender Logo \(r\/Place 2022\)](https://preview.redd.it/l7w8d9wet5u81.jpg?width=800&format=pjpg&auto=webp&s=45fc8f698e489d0c2b2b8bd8f9c1cf3d8d1420a9) [Whatever this is \(r\/Place 2022\)...](https://preview.redd.it/fmbxz1xms5u81.png?width=3840&format=png&auto=webp&s=f721632bb9e10af682fdbb01b8ca2f64403afa30) [Start of r\/Place 2022](https://preview.redd.it/f7ckdpshs5u81.png?width=3840&format=png&auto=webp&s=9654241197449ccb064a01d32a4d69d93aba53bb) [\\"Darth Plagueis the Wise \(r\/Place 2017\)\\"](https://preview.redd.it/ete7b05vr5u81.png?width=1920&format=png&auto=webp&s=6fc618bf43ce3cb1476a58620c7bcb92063a38c4) [Rainbows \(r\/Place 2017\)](https://preview.redd.it/tiz5v32ts5u81.png?width=1920&format=png&auto=webp&s=b07375a5843038d3bed97040688aaa9e52003599) [Green Lattice \(r\/Place 2017\)](https://preview.redd.it/9jrmj6c6t5u81.png?width=1920&format=png&auto=webp&s=282051e36bd9bbddc2d83dc97656100cdc4c2743) [r-place.blend open in Blender](https://preview.redd.it/101fu8vzv5u81.jpg?width=1921&format=pjpg&auto=webp&s=c3bfd90fc93d3a69ca88de3ffbf5d2080a9ed607) I've prepared a [GitHub repository](https://github.com/ChrisCrossCrash/r-place-blender) with everything you need to create beautiful 3D renders of the r/Place 2022 canvas. It's an open source project with an MIT license. I recently posted a [Star Wars timelapse I created earlier](https://www.reddit.com/r/blender/comments/u0gtvs/a_long_time_ago_in_a_subreddit_far_far_away/). I also created one for the [Michigun memorial](https://www.reddit.com/r/blender/comments/u178pc/michigun_memorial_request/) artwork, which somebody requested. The linked GitHub repository contains an improved version of the code and `.blend` file used to generate those renders. Let me know if you need help or notice any mistakes. I'm super excited to see what other people can do with this!
0.82
t3_u5xfgt
1,650,233,080
Python
Quickly create online forms for your python scripts
0.63
t3_u5x46b
1,650,232,184
Python
Relational Algebra interpreter powered by Python
I made a RA interpreter in Python, [Pireal](https://github.com/centaurialpha/pireal). Small story: In my database class (back in 2015), I could not use a software made for Windows (WinRDBI), so I set out to make a free and cross-platform alternative. Taking advantage of what I wanted to understand how the compilers and interpreters work, I wrote an interpreter for Pireal. Today the project is used at my university, but I had never been promoted. I hope it serves more people. And of course, any can collaborate to improve it.
0.64
t3_u5w63g
1,650,229,365
Python
Mean population of US States with graph
import random import numpy from statistics import mode import matplotlib.pyplot as plt import csv import collections ##dictionary of States and populations from numpy import ndarray #states_info_dic = { # "California": 39538223, # "Texas": 29145505, # "Florida": 21538187, # "New York": 20201249, # "Pennsylvania": 13002700, # "Illinois": 12812508, # "Ohio": 11799448, # "Georgia": 10711908, # "North Carolina": 10439388, ## "Michigan": 10077331, # "New Jersey":8882190, # "Virginia": 8535519, # "Washington":7614893, # "Arizona": 7278717, # "Massachusetts":6949503, # "Tennessee":6833174, # "Indiana": 6732219, # "Missouri": 6137428, # "Maryland": 6045680, # "Wisconsin":5822434 #} states_info_dic = { "Cal": 39538223, "Tex": 29145505, "Flo": 21538187, "NY": 20201249, "Pen": 13002700, "Ill": 12812508, "Ohio": 11799448, "Geo": 10711908, "NC": 10439388, "Mich": 10077331, "NJ":8882190, "Vir": 8535519, "Was":7614893, "Ari": 7278717, "Mass":6949503, "Ten":6833174, "Ind": 6732219, "Miss": 6137428, "Mary": 6045680, "Wis":5822434 } ##print values of states population = list(states_info_dic.values()) print(population) ##round population round_up_list =[] for num in population: round_up_int=num/1000000 round_up_list.append(round(round_up_int)) #Mean, median and mode of list mean1=numpy.mean(population) median1=numpy.median(population) mode1=mode(round_up_list) print(f"The mean of the population is {mean1}") print(f"The median of the population is {median1}") print(f"The mode of the population is {mode1}") print(round_up_list) ##Grpah population information # x-coordinates of left sides of bars left = states_info_dic.keys() # heights of bars height = states_info_dic.values() # plotting a bar chart plt.bar(left, height, width=0.8, color=['green']) # naming the x-axis plt.xlabel('States') # naming the y-axis plt.ylabel('Populations') # plot title plt.title('U.S States populations') # function to show the plot plt.show()
0.33
t3_u5v91y
1,650,226,634
Python
Weekly Algorithm Project: Middle Square Method
Recently I started a weekly algorithm project just to help me study new algorithms with a flair of good practice. This week I decided to focus on Python and the "Middle Square Method" a PRNG produced by John von Neuman in 1949. I further reiterated two attempted improvements to the algorithm that come from a couple of papers just last month: one using a Weyl Sequence and another using the Weyl Sequence with a Counter - both were by Bernard Widynski. Testing them was interesting as there appeared to be barely a difference between the two new iterations, however, both were much more stable than the original work by von Neuman. Typically with the newer algorithms I'd gather a standard deviation roaming around 4-8 x 10\^15-18. Obviously that's fairly in line with modern standards. The original method had a lower deviation, however, I found that one harder to test perhaps because I should have a used a different algorithm. Full documentation can be found here if anyone is interested. For GitHub, it is under KNOWNALGO/W03. [https://youtu.be/O53ihWtoEGk](https://youtu.be/O53ihWtoEGk) [https://github.com/F35H/WeeklyCode](https://github.com/F35H/WeeklyCode) Any word on improvements \[don't get me with "four space only"\] would be appreciated. Although, I'm fairly certain I could have done much better with the original method probably implementing the "bit-shift" way of doing it Bernard used at the very least. Might as well link it here, here are the two papers: [https://arxiv.org/pdf/1704.00358.pdf](https://arxiv.org/pdf/1704.00358.pdf) [https://arxiv.org/pdf/2004.06278.pdf](https://arxiv.org/pdf/2004.06278.pdf)
0.61
t3_u5twnz
1,650,222,631
Python
Simple android game with online functionality
Hi everyone! Topics covered in this project are: * game made using the Kivy Python module * compiling with buildozer (and spec file) to get an .aab file * using the 'kv' language * using Kivy to switch between screens, display graphs, etc. * online functionality (e.g. leaderboard) using firebase * firebase rules * app splash screen ​ showcase video: [https://youtu.be/PFNS4bGSocQ](https://youtu.be/PFNS4bGSocQ) github: [https://github.com/Contraposite/PrimeFactorization](https://github.com/Contraposite/PrimeFactorization) buildozer method I followed: [Creating an AAB for python apps using Buildozer (github.com)](https://gist.github.com/Guhan-SenSam/35c5ed7da254a7c0141e6a8b6101eb33) play store listing: [Prime Factorizer Game - Apps on Google Play](https://play.google.com/store/apps/details?id=com.jf.primefactorizer) This is my first app, which I wrote in Python and the 'kv' language, using Kivy, compiled to create an android app bundle using buildozer, and successfully uploaded to the Google Play Store. There is a reasonable amount of support for Kivy but not too much for using it with firebase, so I hope this helps some people trying to make something similar. My github link includes my buildozer spec file and a text file of my firebase rules. The premise of my game is simple: you're shown a target number, and you need to use the on-screen buttons to input the prime factors of that number, in order of smallest to largest (e.g. for target number 66, the prime factors are 2, 3, and 11, so you would press '2 3 1 1'. You are timed, and each time you complete a target, you get a new one. Target numbers get larger with time so that there is some difficulty progression. Most of the functionality is shown in the linked video above, but some notable things are that you can create an online profile or play fully offline, the game shows you a variety of stats and graphs of your past play data, there are search functions to find points shown on the graphs, there is an online scoreboard, with a graph showing the leaderboard entries overlapped. You can also view the stats and graphs of other online players. There are two glitches that I ran into with Kivy: * kivy-garden scatterplot graphs sometimes have a graphical issue where the data points disappear and are not redrawn. The workaround was to redraw the graph with a slightly different size (I added a numpy random number times a negligibly small number to the size I actually needed). * in the kivy textboxes, if the user types an '@' sign while the font size is large, it can crash the app. Definitely one of the most bizarre glitches I've ever encountered, but I just kept the font size small to avoid it. I tried to add sounds for button feedback, but there was too much of a delay and it wasn't very good, so I've taken it out and plan to add sounds sometime in the future with another method to avoid the delay.
0.76
t3_u5tqje
1,650,222,127
Python
Use python to optimize the rebar lost in construction.
Hello everyone, I'm a python beginner. I want to improve my coding skill so I try to use python to help my work.The following problem is bar cut list. It use in construction business. The rebar length is 10 meter each and We have to cut to length follow the order.We have to find the sequence of each Rebar Mark.I.E. We should cut bar No. 439(7350mm) then use it's scrap as rebar No.410 (2650mm) or We might cut bar no.443(6950mm) then no.410(2650mm) this would left the scrap 400mm.The less scrap on rebar the less rebar We have to order.The goal is to minimize rebar scrap on bar cut list.How should I create a logic follow this Idea?I have attached the link to csv file in case you want to try it.Thanks in advance. [https://drive.google.com/file/d/1vxJXX8jmEoumwA08x8UtVyBCjSDpyldu/view?usp=sharing](https://drive.google.com/file/d/1vxJXX8jmEoumwA08x8UtVyBCjSDpyldu/view?usp=sharing) https://preview.redd.it/tm23n32zp4u81.png?width=450&format=png&auto=webp&s=252b11688408922e06d0192bc52f2a415319124f
0.93
t3_u5sisg
1,650,218,540
Python
Gupshup - Chat in the terminal
Gupshup is a terminal-based application inspired by discord! github: [https://github.com/kraanzu/gupshup/](https://github.com/kraanzu/gupshup/)
0.81
t3_u5q6jl
1,650,211,690
Python
Funny bot I made
[https://youtu.be/XrYadm3y\_e4](https://youtu.be/XrYadm3y_e4)
0.36
t3_u5pjy6
1,650,209,914
Python
Writing Better Django Queries
A blog that explains how to write better Django Queries by both performance and Memory wise. [https://delliganesh.dev/tech/the-one-with-better-django-queries/](https://delliganesh.dev/tech/the-one-with-better-django-queries/)
0.47
t3_u5o1aq
1,650,205,312
Python
PySGI, the library for creating web servers
Still under development, the PySGI library can manage HTTP routes, requests and responses simply and quickly. Help me by giving this repository a star! [PySGI GitHub ](https://github.com/jaedsonpys/pysgi)
0.6
t3_u5npcy
1,650,204,250
Python
How to create an image out of text using Python and Glide OpenAI library ? [tutorial]
ERROR: type should be string, got " \n\nhttps://preview.redd.it/2q5yox16e3u81.png?width=1280&format=png&auto=webp&s=0e06a88407034c5e567443a881a43e59684fb1ef\n\nHi,\n\nThis is a nice and fun Python tutorial that enables to produce an image out of a simple text \n\nThis is effect is based on Python and the amazing Glide library (based on OpenAI's )\n\nThe outcome is impressive. \n\nYou can find the link for the video tutorial here: https://youtu.be/DKEOmRBgPe8\n\nYou can find Python instructions file here : [https://github.com/feitgemel/Python-Code-Cool-Stuff/blob/master/Glide/glide-Install-instructions.txt](https://github.com/feitgemel/Python-Code-Cool-Stuff/blob/master/Glide/glide-Install-instructions.txt) \n\n\nEnjoy\n\nEran\n\n​\n\n\\#python #opencv #Glide #OpenAI"
0.77
t3_u5n88a
1,650,202,661
Python
Python Script EXE detected as virus in VT
Hey Everybody, I'm creating from a python script, with Pyinstaller ,an exe file, but when I insert it to Virus total for testing it detects it as a virus in many viruse detections softwares. I have tried to solve it with nukita, several guides I found but nothing worked. Anyone has any advice?
0.75
t3_u5m3x5
1,650,198,722
Python
Toolchain recommendations for a production-quality monorepo?
Hi, I’m not exactly a newcomer to Python, but I’ve been using C++ pretty much exclusively for all of my professional projects. I am starting a new project in Python where we are going to be using a monorepo and I am looking for some recommendations on what people use for tooling. Build system: I would like something to help orchestrate tests, generate coverage reports, handle running a typechecker in CI, do dependency analysis to figure out what changed in a commit, build Docker images and package cloud functions. It looks like the leading candidates are Bazel and Pants? Which does the community prefer? Typechecker: Which do people use? A balance of speed, thoroughness of warnings and integration into editors/build systems seems like the driving factors here. Dependency management: I am familiar with virtual environments, but to me this seems at odds with a monorepo where the virtual environment will grow boundlessly. Is there any tooling to help here? Documentation: one of the main points of a monorepo is to ease the reuse of code, so docs are important. I am familiar enough with sphinx to know it is a pain in the butt. Are there any easy-to-use alternatives that can produce comparable quality? Any other tools that make a big difference in refactoring and shifting errors to the left? Thanks!
0.84
t3_u5kkxh
1,650,192,403
Python
Stack Game made in pygame
GitHub - [https://github.com/Vaibhav521/Pygame/tree/main/stack](https://github.com/Vaibhav521/Pygame/tree/main/stack) in-game footage ​ [stack game](https://reddit.com/link/u5ilqk/video/fzhstiy6t1u81/player)
0.57
t3_u5ilqk
1,650,183,508
Python
Python Cybersecurity— Network Tracking using Wireshark and Google Maps
0.6
t3_u5ibzu
1,650,182,335
Python
Windows 11 design on Python
Hello. This is my project to styling Win32 applications on Python. I try to make the application look in Fluent design with Mica. If someone is interested, you can join or just look. 😊 [witalihirsch/QTWin11: QT Theme for Win32 apps on Windows 11 (github.com)](https://github.com/witalihirsch/QTWin11) [Example](https://preview.redd.it/q9tcxjjgz0u81.jpg?width=1078&format=pjpg&auto=webp&s=060b7e0390e85cf641b6b4c8141eb61dbf4f3d15) https://preview.redd.it/qgd7ykywc1u81.jpg?width=346&format=pjpg&auto=webp&s=0057bb4e4d4da836fdfe1384894b7f039bef5e89 https://preview.redd.it/cw3qmuywc1u81.jpg?width=344&format=pjpg&auto=webp&s=1e324ad9ac28484d38be37a154e8ae997a685f69 https://preview.redd.it/z8rkcwywc1u81.jpg?width=345&format=pjpg&auto=webp&s=84f73edc619d65c26998b44051bcfd0e0b630889 https://preview.redd.it/1hwt01zwc1u81.jpg?width=345&format=pjpg&auto=webp&s=2a0e0dcbf7ece6a400eb6d784fc5e11cba0b98b5 https://preview.redd.it/fldjh6zwc1u81.jpg?width=186&format=pjpg&auto=webp&s=35ffbee447fb622c0d3a75e22872bdf6a34c6232
0.97
t3_u5gcj7
1,650,173,660
Python
I watched programmer who said for every beginners don't learn python because only jobs you can use python with are data science and machine learning etc.. and these jobs are not for beginners, so you will not work and get money with python as beginner. is it true ?
0.41
t3_u5fqtp
1,650,171,251
Python
Edge detection project
I'm in grade 12 and planning on doing a project on something edge detection related. What can I do somewhat unique?
0.75
t3_u5dr4w
1,650,164,059
Python
They say Python is the easiest language to learn, that being said, how much did it help you learn other languages? Did any of you for instance try C++ but quit, learn Python, and then back to C++?
0.94
t3_u5c9et
1,650,158,940
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.92
t3_u5amsg
1,650,153,610
Python
Arrowdantic 0.1.0 released
Hi, I am announcing the release of [arrowdantic](https://pypi.org/project/arrowdantic/): Arrowdantic is a small Python library backed by a [mature Rust implementation](https://github.com/jorgecarleitao/arrow2) of Apache Arrow that can interoperate with * [Parquet](https://parquet.apache.org/) * [Apache Arrow](https://arrow.apache.org/) and * [ODBC](https://en.wikipedia.org/wiki/Open_Database_Connectivity) (databases). It has a similar performance and higher safety (e.g. no segfaults) than pyarrow. It supports reading from and writing to ODBC compliant databases at likely similar performance as [`turbodbc`](https://turbodbc.readthedocs.io/en/latest/) and it does not require conda to install. This package is particularly suitable for environments such as AWS Lambda - it takes 13M of disk space, compared to 82M taken by pyarrow. ## Features * declare and access Arrow-backed arrays (integers, floats, boolean, string, binary) * read from and write to Apache Arrow IPC file * read from and write to Apache Parquet * read from and write to ODBC-compliant databases (e.g. postgres, mongoDB) It is not intended for OLAP type of queries (Pandas, Polars and many others serve this purpose better). There is still work to support more types (e.g. datetimes, python dictionaries), etc, but the gist is there - a small utility to lower the barrier to interoperate the Arrow format with Parquet, Arrow and ODBC. Looking forward for feedback!
0.84
t3_u58xni
1,650,148,309
Python
Slowpoke: A tool to convert Spotify and Youtube songs to slow and reverb
[https://github.com/newpolygons/SlowPoke](https://github.com/newpolygons/SlowPoke) Little tool I worked on this weekend. Hope you guys like it. Currently setup to allow you to control the speed of the song.
0.78
t3_u58rf6
1,650,147,774
Python
Is it me learning python that there are many different ways to write it? I learn one way to write variable then next lesson shows me functions to show the same outcome. Or am I’m looking at this too soon and something else suppose to go along with it?
0.62
t3_u57opq
1,650,144,578
Python
Space Science: Asteroid spectra meet Autoencoders
Hey Pythonistas, In my [previous videos](https://www.youtube.com/playlist?list=PLNvIBWkEdZ2gagAcgm44cplgSvQ_Cmvbv) I explained and showed the "nature" of asteroid spectra. Based on their major 4 classes, I created a Support-Vector-Machine classifier as well as a Keras-based neural network to distinguish between these classes ([GitHub repo](https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/tree/main/%5BML1%5D-Asteroid-Spectra); yes... I should have numbered my scripts starting at 01, 02, 03, ...). Classifying imbalanced data is really interesting, and it is also somehow exciting to write Conv1D networks, since it is rarely seen (most use Conv2D in their tutorials, since most use images to classify data). But what would be more interesting than writing a neural network classifier? Well, data classes can be artificial constructs. Especially "space spectra" (asteroid, mass spectra of dust particles in space, or spectra of so-called active galactic nuclei), are not always 100% distinguishable and have transitional classes between major classes. So... can we classify our asteroid spectra in a data-driven way? Well, that's the goal of my last 3 video sessions, starting today with the very first one. The idea: \- Creating an Autoencoder to reconstruct asteroid spectra \- Displaying and inspecting the latent space of these spectra \- Applying some clustering algorithm on the latent space to determine a data science based number of potential asteroid classes Starting with the Autoencoder part I'd like to share my most recent tutorial: [YouTube Link](https://www.youtube.com/watch?v=UsiY28qjBK8&list=PLNvIBWkEdZ2gagAcgm44cplgSvQ_Cmvbv&index=13) [GitHub Link](https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/11_dl_autoencoder_reconstruction.ipynb) I hope you'll like the final steps of this *Space Science with Python* project. I am honestly thinking to put everything in a small scientific paper :). Cheers, Thomas
0.73
t3_u57cdr
1,650,143,542
Python
What are your useful packages to help scraping (besides requests, beautifulsoup etc)?
What are your go-to packages to include in python scraping scripts? Besides the basics (requests/urlib(2), beautifulsoup/lxml, selenium, scrapy). What are the packages you include in your scripts? For me it's: * click * requests-cache * retry/backoff * fake-useragent
0.8
t3_u578lt
1,650,143,213
Python
Shipping command line programs with a python package
I already know this inherently sounds like a bad idea, but I'd love some genuine, constructive technical advice on the following scenario. I have a python package that is used by others at work, and one of the features I need to add is the ability to upload binary files (\~1GB) from local to a cloud object storage, in this case Azure Data Lake. The Azure Data Lake python client does have the ability to upload data, but it is significantly slower than their recommended command line bulk copy tool AzCopy. **Can I get feedback on this approach:** \-pip install the python package \-the python package already has a command line entry point so the user would type something like <package_name> setup externals Which would then run a setup script which would install azcopy to the users $HOME path and create a symlink to their PATH for the binary to run. \-Then python would use it via subprocess. **For me the negatives I see are:** \-Having to write handling code for the setup script to fail gracefully. \-Possibly having to host the already installed binaries on a fileshare somewhere so URL changes and version changes don't break the installer \-Having an extra step if someone else clones the repo, pip installs the requirements, they have one more step before they can recreate. **Positives are:** \-AzCopy is way faster than the python sdk and doesn't have to upload objects one at a time. \-I can extend this to use RClone eventually to make it cloud storage agnostic, and have it work with S3 as well ​ Has anyone ever done anything like this? Am I being oblivious to any major issues here?
0.5
t3_u53wpo
1,650,133,545
Python
Do you think AI/machine learning is a very important field to get into for future relevance?
I am just starting to learn about it this week and thinking it is really going to be integral in the years to come right? Perhaps as important if not more than the information age we are in now. More probably when skynet goes online and the war between humans/ai begins. So, good to get onboard now. I think my last great decision was learning coding around 2016 and this is going to be another great one in terms of time management and where to focus your efforts. Not only yes but interested to hear what fields it will be relevant in? All? EDIT: seems this is going off what I intended. I am not actually looking for a new career path. I am more just interested in knowing what future implementations will/might be as it becomes more ubiquitous, just speculating what that might be.
0.69
t3_u51zk3
1,650,128,123