diff --git "a/train.jsonl" "b/train.jsonl" new file mode 100644--- /dev/null +++ "b/train.jsonl" @@ -0,0 +1,933 @@ +{"sub": "Python", "title": "Flask -> FastAPI", "selftext": "I'm happy with Flask and do not see the need to switch to FastAPI. Change my mind & (ideally) point me to a nice tutorial that does just that in a demo project.", "upvote_ratio": 0.25, "id": "t3_ubiv0a", "created_utc": 1650885862.0} +{"sub": "Python", "title": "Ping Sweeper In Python", "selftext": "", "upvote_ratio": 0.84, "id": "t3_ubhkg4", "created_utc": 1650880947.0} +{"sub": "Python", "title": "Text Summarization with Huggingface Transformers and Python", "selftext": "", "upvote_ratio": 0.81, "id": "t3_ubgv0x", "created_utc": 1650877984.0} +{"sub": "Python", "title": "GitHub - helblazer811/ManimML: ManimML is a project focused on providing animations and visualizations of common machine learning concepts with the Manim Community Library.", "selftext": "", "upvote_ratio": 1.0, "id": "t3_ubfsl4", "created_utc": 1650873375.0} +{"sub": "Python", "title": "How do you write iOS apps in Python?", "selftext": "?", "upvote_ratio": 0.44, "id": "t3_ubehfi", "created_utc": 1650867723.0} +{"sub": "Python", "title": "Making a list of advanced topics in Python", "selftext": "I'm preparing for a technical interview. I failed the first one a week ago. I noticed the excercises were tagged as (advanced python). 2 coding questions, one from decorators and the other from SQL.\n\nI'm taking a month to prepare for my second chance at it. And I'm making a list of advanced topics/concepts in python. I don't want to be taken by surprise again.\n\nList comprehension\n\nAnonymous function\n\nDecorators\n\nGenerators\n\nException handling\n\nInheritance\n\nEncapsulation\n\nUnit testing\n\nRegex\n\nI need suggestions just in case I'm missing anything. I do practice coding excercises on hackerank.", "upvote_ratio": 0.6, "id": "t3_ubd7xt", "created_utc": 1650862809.0} +{"sub": "Python", "title": "Port scanning with Python", "selftext": "Lately I've been learning a bit about communicating over a network with Python and thought it might be fun to create a simple TCP port scanner. Had a lot of fun playing around with this on my home network. \n\nThe full project write up and code can be found [here](https://sheldonbarry.com/2022/04/24/port-scanning-with-python/).", "upvote_ratio": 0.63, "id": "t3_ubakvn", "created_utc": 1650853507.0} +{"sub": "Python", "title": "Python 3.11 Preview: Task and Exception Groups \u2013 Real Python", "selftext": "", "upvote_ratio": 0.98, "id": "t3_ub9elz", "created_utc": 1650849707.0} +{"sub": "Python", "title": "Monday Daily Thread: Project ideas!", "selftext": "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.", "upvote_ratio": 0.73, "id": "t3_ub7ugb", "created_utc": 1650844811.0} +{"sub": "Python", "title": "2-Button UI engine in MicroPython with \"Apps\" on a TTGO T-Display", "selftext": "https://youtu.be/wR3AkhD0nEg\n\nMore of a demo than anything at this point, but I've got working text entry, menus, loadable apps(any file named app_AppName.py is detected as an app).\n\nI also have sleep modes, and wakelock-like functionality(Including modem sleep), and the ability for one app to launch another, with arguments and return values.\n\nIn screen-off sleep mode, it uses 6mA without Wi-Fi(The USB chip and charge led takes some power, probably more like 0.5mA on battery). With Wi-Fi it's around 7mA with spikes every few seconds.\n\nWith the screen on, you get 45mA with spikes up to 65mA. Probably room to improve that. But I'm impressed by the low power capabilities of MP(Once you add some assorted pull requests from the internet).\n\nThe Calculator app actually just launches the text entry app, and evals the text you enter.\n\nThere's a stopwatch and a tally counter, and a settings menu where you can customize things like the colors, and set an app to auto-load as soon as it boots up.\n\nIn the future, I'll add password protection to prevent exiting the default app, and I'd like to eventually have some kind of mobile \"App store\" Android app for uploading new content, and maybe the ability to configure WiFi/MDNS/MQTT from the settings menu.\n\n\nThe original idea for this was to be a replacement for Logitech's Harmony remotes. I think it would be awesome to have an open source home automation remote, that used an app-capable OS, that could also be a replacement for smart wall switches.\n\nAnother fun thing I'd like to do is some kind of programming feature, so you could edit the logic for a little robot just with a 2 or 3 button menu.\n\nIf MicroPython ever gets BLE bonding, making a wireless keyboard emulator for media or presentations might be another fun app.", "upvote_ratio": 0.76, "id": "t3_ub6l4g", "created_utc": 1650840886.0} +{"sub": "Python", "title": "In-Depth Analysis of Moonbirds NFTs using Python and Alchemy", "selftext": "", "upvote_ratio": 0.25, "id": "t3_ub5plk", "created_utc": 1650838236.0} +{"sub": "Python", "title": "Anyone know the history of why strings are iterable?", "selftext": "I think every intermediate Python programmer has had to learn the gotcha that you can't really duck-type iterables, because if you accidentally iterate over a string, Python will chug along perfectly fine despite it almost certainly not being the intended behavior. Even worse, because of the way collections ABCs are defined, a typing check like `isinstance(\"a string\", collections.abc.Collection)` will still return True despite it almost certainly not being what is intended.\n\nMy question is whether anyone knows *the history* of why this is the case. Given the direction that the language was moving in, I would've thought it'd be a prime candidate for removal in the 2-to-3 transition. Obviously, there are use cases for iterating along elements of a string, but with Python 3 strings being unicode-by-default, the rich standard library, and the general high-level nature of the language, I don't see much of a use case at all. Certainly, I don't think it's contentious to say the drawbacks of making it the default behavior outweigh the benefits, with any real use cases easily accommodated by more specific `str.characters` or `str.bytes` methods.\n\nSo, what gives? Has this issue ever been actively discussed in the development of the language? Is it just a case of a holdover from earlier languages that was never really a big enough deal to get challenged? And why was it made even more formal with the introduction of `collections.abc`? Google-ing hasn't really provided any strong answers, so any stories or nuggets of info greatly appreciated!\n\n**edit:** Maybe should have made it more clear that the question is really why strings are *still* iterable by default. I understand the history of strings as character arrays, and don't have a hard time imagining how that naturally made it into the language. But why that is still the case in Python 3 given that:\n\n* It is a gotcha new users frequently run into (just search for people asking how to properly handle a `str` vs a `[str]` in a function argument)\n* It doesn't *really* fit with how we think about the datatypes in Python (I doubt many Python programmers day-to-day think of a `str` as \"an ordered collection of `str` objects\")\n* The uses for iterable-by-default seem limited given the wide builtin and standard library functionality available for `str` objects.", "upvote_ratio": 0.31, "id": "t3_ub53ge", "created_utc": 1650836526.0} +{"sub": "Python", "title": "Breaking Anti-Cheat With Electronics & Python", "selftext": "", "upvote_ratio": 0.4, "id": "t3_ub4yc3", "created_utc": 1650836115.0} +{"sub": "Python", "title": "James Bond film details", "selftext": " import random\n import numpy\n from statistics import mode\n import matplotlib.pyplot as plt\n import csv\n import collections\n \n ##dictionary of films\n from numpy import ndarray\n \n films_info_dic = {\n 'Films':[\n {\n \"Name\": \"Dr. No\",\n \"Actor\":\"Sean Connery\",\n \"Running Time\": 109,\n \"Year\": \"1962\"\n },\n \n {\n \"Name\": \"From Russia with Love\",\n \"Actor\":\"Sean Connery\",\n \"Running Time\": 115,\n \"Year\": \"1963\"\n },\n \n {\n \"Name\": \"Goldfinger\",\n \"Actor\": \"Sean Connery\",\n \"Running Time\": 110,\n \"Year\": \"1964\"\n },\n \n {\n \"Name\": \"Thunderball\",\n \"Actor\": \"Sean Connery\",\n \"Running Time\": 130,\n \"Year\": \"1965\"\n },\n \n {\n \"Name\": \"You Only Live Twice\",\n \"Actor\": \"Sean Connery\",\n \"Running Time\": 117,\n \"Year\": \"1967\"\n },\n \n {\n \"Name\": \"On Her Majesty's Secret Service\",\n \"Actor\": \"George Lazenby\",\n \"Running Time\": 140,\n \"Year\": \"1969\"\n },\n \n {\n \"Name\": \"Diamonds Are Forever\",\n \"Actor\": \"Sean Connery\",\n \"Running Time\": 120,\n \"Year\": \"1971\"\n },\n \n {\n \"Name\": \"Live and Let Die\",\n \"Actor\": \"Roger Moore\",\n \"Running Time\": 121,\n \"Year\": \"1973\"\n },\n \n {\n \"Name\": \"The Man with the Golden Gun\",\n \"Actor\": \"Roger Moore\",\n \"Running Time\": 125,\n \"Year\": \"1974\"\n },\n \n {\n \"Name\": \"The Spy Who Loved Me\",\n \"Actor\": \"Roger Moore\",\n \"Running Time\": 125,\n \"Year\": \"1977\"\n },\n \n {\n \"Name\": \"Moonraker\",\n \"Actor\": \"Roger Moore\",\n \"Running Time\": 126,\n \"Year\": \"1979\"\n },\n \n {\n \"Name\": \"For Your Eyes Only\",\n \"Actor\": \"Roger Moore\",\n \"Running Time\": 127,\n \"Year\": \"1981\"\n },\n \n {\n \"Name\": \"Octopussy\",\n \"Actor\": \"Roger Moore\",\n \"Running Time\": 131,\n \"Year\": \"1983\"\n },\n \n {\n \"Name\": \"A View to a Kill\",\n \"Actor\": \"Roger Moore\",\n \"Running Time\": 131,\n \"Year\": \"1985\"\n },\n \n {\n \"Name\": \"The Living Daylights\",\n \"Actor\": \"Timothy Dalton\",\n \"Running Time\": 130,\n \"Year\": \"1987\"\n },\n \n {\n \"Name\": \"Licence to Kill\",\n \"Actor\": \"Timothy Dalton\",\n \"Running Time\": 133,\n \"Year\": \"1989\"\n },\n \n {\n \"Name\": \"GoldenEye\",\n \"Actor\": \"Pierce Brosnan\",\n \"Running Time\": 128,\n \"Year\": \"1995\"\n },\n \n {\n \"Name\": \"Tomorrow Never Dies\",\n \"Actor\": \"Pierce Brosnan\",\n \"Running Time\": 119,\n \"Year\": \"1997\"\n },\n \n {\n \"Name\": \"The World Is Not Enough\",\n \"Actor\": \"Pierce Brosnan\",\n \"Running Time\": 128,\n \"Year\": \"1999\"\n },\n \n {\n \"Name\": \"Die Another Day\",\n \"Actor\": \"Pierce Brosnan\",\n \"Running Time\": 133,\n \"Year\": \"2002\"\n },\n \n {\n \"Name\": \"Casino Royale\",\n \"Actor\": \"Daniel Craig\",\n \"Running Time\": 144,\n \"Year\": \"2006\"\n },\n \n {\n \"Name\": \"Quantum of Solace\",\n \"Actor\": \"Daniel Craig\",\n \"Running Time\": 106,\n \"Year\": \"2008\"\n },\n \n {\n \"Name\": \"Skyfall\",\n \"Actor\": \"Daniel Craig\",\n \"Running Time\": 143,\n \"Year\": \"2012\"\n },\n \n {\n \"Name\": \"Spectre\",\n \"Actor\": \"Daniel Craig\",\n \"Running Time\": 148,\n \"Year\": \"2015\"\n },\n \n {\n \"Name\": \"No Time to Die\",\n \"Actor\": \"Daniel Craig\",\n \"Running Time\": 163,\n \"Year\": \"2021\"\n },\n \n ]\n \n }\n \n \n ##print values of running time\n times_list = []\n \n \n ##Running Time list\n for item in films_info_dic[\"Films\"]:\n times=item[\"Running Time\"]\n times_list.append(times)\n \n ##List of Actors\n actor_list = []\n for item in films_info_dic[\"Films\"]:\n Actors=item[\"Actor\"]\n actor_list.append(Actors)\n \n ##Remove duplicates\n actor_list = list(dict.fromkeys(actor_list))\n \n def get_film_details(actor_name,decade):\n films_actor_counter=0\n films_decade_counter = 0\n ##actors\n for item in films_info_dic[\"Films\"]:\n if item[\"Actor\"] == actor_name:\n times = item[\"Running Time\"]\n times_list.append(times)\n \n # Mean, median and mode of runnint times list\n mean_time = numpy.mean(times_list)\n median_time = numpy.median(times_list)\n mode_time = mode(times_list)\n \n films_actor_counter=films_actor_counter+1\n \n ##write to notepad\n with open((actor_name)+\".txt\", 'w') as f:\n f.write(f\"The mean running time for {actor_name} is {mean_time}\\n\")\n f.write(f\"The median running time for {actor_name} is {median_time}\\n\")\n f.write(f\"The mode running time for {actor_name} is {mode_time}\\n\")\n f.write(f\"{actor_name} starred in {films_actor_counter} number of films.\\n\")\n ##decades\n Film_Year=item[\"Year\"]\n Film_decade=Film_Year[2]\n Test_film=decade[2]\n \n if Film_decade == Test_film:\n times = item[\"Running Time\"]\n times_list.append(times)\n \n # Mean, median and mode of runnint times list\n mean_time = numpy.mean(times_list)\n median_time = numpy.median(times_list)\n mode_time = mode(times_list)\n \n films_decade_counter=films_decade_counter+1\n \n ##write to notepad\n with open((decade)+\"s.txt\", 'w') as f:\n f.write(f\"The mean running time for {decade}s is {mean_time}\\n\")\n f.write(f\"The median running time for {decade}s is {median_time}\\n\")\n f.write(f\"The mode running time for {decade}s is {mode_time}\\n\")\n f.write(f\"{decade}s had {films_decade_counter} number of films.\\n\")\n \n \n ##call method for each actor\n decade_list =[\"1960\", \"1970\", \"1980\", \"1990\", \"2000\", \"2010\", \"2020\"]\n for actor,decade in zip(actor_list, decade_list):\n get_film_details(actor,decade)\n \n \n print(times_list)\n print(actor_list)\n \n \n \n \n #Mean, median and mode of runnint times list\n mean_time=numpy.mean(times_list)\n median_time=numpy.median(times_list)\n mode_time=mode(times_list)\n \n print(f\"The mean running time is {mean_time}\")\n print(f\"The median running is {median_time}\")\n print(f\"The mode running is {mode_time}\")", "upvote_ratio": 0.43, "id": "t3_ub2fqt", "created_utc": 1650829006.0} +{"sub": "Python", "title": "Development of Desktop apps with Python", "selftext": "If you are developing desktop apps and are familiar with environment variables and shortcuts, did you realized that there are no packages that would make it easy for cross compatible and easy management of this stuff ?\n\nAfter searching and making my own package i decided to make it public so it can potentially help somebody with the same stuff i was struggling before, feel free to check it out:Github: [https://github.com/jiri-otoupal/pycrosskit](https://github.com/jiri-otoupal/pycrosskit)\n\nIf you would star my repo for the work I do, it would make my day much better :) \nI will be glad if it will make your life easier, Cheers !", "upvote_ratio": 0.76, "id": "t3_ub2c8w", "created_utc": 1650828730.0} +{"sub": "Python", "title": "Weekly Code - Week 4: Digit Subtraction!", "selftext": "This week I decided to use OEIS entry A185107: difference of digits of the nth prime. This one is pretty exciting, and I think I may make a library featuring this Digit Subtraction and what not. It's fairly compelling. I don't know what I'd use it for, but I'm sure there'd be some kind of use out there. \n\n\nThis week is documented here:\n\n[https://youtu.be/pHip9F5H8Zc](https://youtu.be/pHip9F5H8Zc)\n\n[https://github.com/F35H/WeeklyCode](https://github.com/F35H/WeeklyCode) \n\n\nHere's the OEIS entry: \n[https://oeis.org/A185107](https://oeis.org/A185107)", "upvote_ratio": 0.67, "id": "t3_ub1ppc", "created_utc": 1650826915.0} +{"sub": "Python", "title": "I made a game that let's you play any MIDI file with arrow keys!", "selftext": "Video Preview: [https://streamable.com/zhc909](https://streamable.com/zhc909)\n\nIt's like dance dance revolution but you can play any song you want, all you need is a midi file. You can specify which instruments you want to play on each difficulty in JSON files.\n\nSource code: [https://github.com/ravenkls/Midi-Arrow-Rush](https://github.com/ravenkls/Midi-Arrow-Rush)", "upvote_ratio": 1.0, "id": "t3_ub1p3g", "created_utc": 1650826868.0} +{"sub": "Python", "title": "Possible career in Python as a Bilingual", "selftext": "Hi! I am working right now as a bilingual for Spanish and English in a tech company. I don't have skills in tech such as programming etc. But just recently I decided to study Python to upskill myself and have greater opportunities. But I am not sure if there's a career such as a software developer where I could still use my skill as a Bilingual.\n\nHoping for your insight.\n\nThanks", "upvote_ratio": 0.5, "id": "t3_uazva3", "created_utc": 1650821777.0} +{"sub": "Python", "title": "I am intermediate, how to take python (programming skills) to next level?", "selftext": "About me: I know basic programming and problem solving. I already made 2 websites (basic todo-app) using python (Django) as backend and free web templates for frontend. I also made some basic projects with MySQL and python. Made some spammer bots with [selenium](https://selenium-python.readthedocs.io/). I worked with file creation and manipulation. Most of the times I use functions (I'm not comfy with classes)\n\nBut, at this stage, it feels `something's` off.. I don't know what.. but it feels like I'm stuck at this level.\n\n(*I don't have a job*)", "upvote_ratio": 0.82, "id": "t3_uazm1g", "created_utc": 1650821027.0} +{"sub": "Python", "title": "Set Types in Python \u2014 set, frozenset [Documentation - made easy to read]", "selftext": "", "upvote_ratio": 0.67, "id": "t3_uaz839", "created_utc": 1650819918.0} +{"sub": "Python", "title": "Game of life", "selftext": "Hi,\n\nI've build a small \"Game of Life\" project, using pygame for display, based first on Conway's rules, and then many other rules (\\~20 for now).\n\nIt's available on PyPI:\n\n[https://pypi.org/project/conway-pygame/](https://pypi.org/project/conway-pygame/)\n\nand on gitlab.com:\n\n[https://gitlab.com/frague59/conway](https://gitlab.com/frague59/conway)\n\nEnjoy !", "upvote_ratio": 0.79, "id": "t3_uaxzr5", "created_utc": 1650816367.0} +{"sub": "Python", "title": "The Python Graph Gallery", "selftext": "", "upvote_ratio": 0.97, "id": "t3_uaxm35", "created_utc": 1650815307.0} +{"sub": "Python", "title": "Useful tricks with pip install URL and GitHub", "selftext": "", "upvote_ratio": 0.75, "id": "t3_uawxuo", "created_utc": 1650813388.0} +{"sub": "Python", "title": "How to use MicroPython on Docker!", "selftext": "", "upvote_ratio": 0.79, "id": "t3_uawlsz", "created_utc": 1650812439.0} +{"sub": "Python", "title": "Speeding up python CLI's!", "selftext": "so yesterday I was trying to make a python CLI that needed to be fast.\n\nno matter what I did (`python -S`, pyinstaller, cx_freeze, bytecode compiling) it wouldnt be as fast as I needed it and some even made it slower like cx_freeze.\n\nwell I found a way to make running it much much faster (nearly instantaneous).\n\nby using an asynchronous socket server and using netcat as input, you can give input to the server and recieve output immediately, since the script is already running\n\nit works for windows and linux, but you may need cygwin on windows unless there is a built in timeout and netcat command I do not know about\n\nhow it works (on linux) is you define a bash function with this:\n`hithere(){ printf \"$@\" | timeout 0.1 nc 127.0.0.1 50200; }`\n\nand run the script: \n`python pyspeedtest.py`\n\nto send input you run `hithere Mum` and you get `hi, Mum`\n\npyspeedtest.py\n```\nimport pyspeed\n\nclass myhandler(pyspeed.pyspeed_handler):\n def handle_request(self, *argv):\n return f\"hi, {argv[1]}\"\n\nhandle = myhandler()\nhandle.run()\n```\n\npyspeed.py\n```python\nimport asyncio, socket\n\nclass pyspeed_handler:\n async def run_server(self, address, port, handle):\n server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n server.bind((address, port))\n server.listen(8)\n server.setblocking(False)\n loop = asyncio.get_event_loop()\n while True:\n client, _ = await loop.sock_accept(server)\n loop.create_task(handle(client))\n async def handle_client(self, client):\n loop = asyncio.get_event_loop()\n request = None\n try:\n while request != 'quit':\n request = (await loop.sock_recv(client, 255)).decode('utf8')\n response = self.handle_request(*([''] + str(request).split(' '))) + '\\n'\n await loop.sock_sendall(client, response.encode('utf8'))\n client.close()\n except BrokenPipeError:\n pass\n def handle_request(self, *argv):\n return ''.join(argv)\n def run(self, address=\"localhost\", port=50200):\n asyncio.run(self.run_server(address, port, self.handle_client))\n```\n```", "upvote_ratio": 0.5, "id": "t3_uavrnn", "created_utc": 1650809995.0} +{"sub": "Python", "title": "ga-extractor - CLI tool for extracting Google Analytics data", "selftext": "Hi /r/Python,\n\nI've created a simple CLI tool in Python for extracting Google Analytics data. It can be handy if you want to retrieve some analytics data without dealing with Google's APIs.\n\nThe tool can also transform the data into more readable CSV output.\n\nPyPI package: https://pypi.org/project/ga-extractor/\n\nGitHub repository: https://github.com/MartinHeinz/ga-extractor\n\nFeedback is very much appreciated!", "upvote_ratio": 0.76, "id": "t3_uau4ci", "created_utc": 1650804648.0} +{"sub": "Python", "title": "Get total time spent watching movies logged on to Letterboxd", "selftext": "[Github Link \\[Letterboxd Movie Runtimes\\]](https://github.com/HighnessAtharva/Letterboxd-Movie-Runtimes)\n\nYou can now get the total time you have spent watching all the movies that you have logged on your Letterboxd Profile and export it to a CSV using this simple Python Script.\n\nCould not find a tool on the internet that did this for me so I built it myself. Enjoy :)", "upvote_ratio": 0.8, "id": "t3_uau2nl", "created_utc": 1650804488.0} +{"sub": "Python", "title": "Logging facility for Python - Documentation, made easy to read", "selftext": "", "upvote_ratio": 0.43, "id": "t3_uatomd", "created_utc": 1650803132.0} +{"sub": "Python", "title": "Building a Soccer Shot Map for Spain", "selftext": "Salve Jason and the Pythonauts!\n\nI've created a tutorial on building a shot map for soccer games. It uses data from Statsbompy and my own library of todofcpy. You can view it here:\n\n[https://www.youtube.com/watch?v=99FVmANPNXI](https://www.youtube.com/watch?v=99FVmANPNXI)", "upvote_ratio": 0.86, "id": "t3_uatfhp", "created_utc": 1650802234.0} +{"sub": "Python", "title": "borb vs fpdf2 - comparing 2 PDF generation libs: features & benchmark", "selftext": "", "upvote_ratio": 0.78, "id": "t3_uasf5r", "created_utc": 1650798393.0} +{"sub": "Python", "title": "I made my first Discord Bot with Python!", "selftext": "Hello everyone! Over the past 2 weeks I have been working on Discord Bot using [discord.py](https://discord.py) and Python! Inspired by r/place I decided to make a simple bot where users and place pixels on a large canvas. Commands include:\n\n$add\\_pixel: Add a pixel to the grid at a specified coordinate and rgb color value\n\n$playback: Create a video showing the full canvas history\n\n$ban: Bans a user from placing new pixels (Admin only)\n\n$unban: Unbans a user allowing them to place pixels again (Admin only)\n\nOne of the reasons I started with project was to learn how to use the MongoDB database as well as learn discord.py Here is a small example of the bot being used on my server\n\nhttps://i.redd.it/m1ure9744gv81.gif\n\nIf you are interested feel free to add the bot to your server with this link: [https://discord.com/api/oauth2/authorize?client\\_id=964251008115019847&permissions=116736&scope=bot](https://discord.com/api/oauth2/authorize?client_id=964251008115019847&permissions=116736&scope=bot) Also DM me (ScriptLine Studios#8597) if you need help or run into issues!\n\nThanks everyone!", "upvote_ratio": 0.9, "id": "t3_uar1v9", "created_utc": 1650792599.0} +{"sub": "Python", "title": "Open source daily Capybara Website built with Python", "selftext": "Ever wondered \"If a random Capybara was assigned to Today, what Capybara would it be?\" Well wonder no more, [Capy.life](https://capy.life/) has your back!\n\n[Capy.life](https://Capy.life) is a free & open source website built with Svelte & Python, what also has a Discord, Matrix & Twitter bot written in Python.\n\nThe Capybara submitting process uses perceptual hash to ensure two Capybara images aren't too much alike.\n\n# Source code\n\n* [Website](https://github.com/capylife/capyend) (Any PRs or Stars are appreciated)\n* [Twitter bot](https://github.com/capylife/flappycapy)\n* [Discord bot](https://github.com/capylife/capycord)\n* [Matrix bot](https://github.com/capylife/neocapy)\n\n# Previews\n\n[Home page](https://preview.redd.it/yuq91y504gv81.png?width=1668&format=png&auto=webp&s=f7245094ddacf37ac8e0047f7854979cb35e40d8)\n\n[Admin Page](https://preview.redd.it/9bnjcl614gv81.png?width=1668&format=png&auto=webp&s=fd72626f13a76e3bc8e2c6b450c9ff5c9975d26d)", "upvote_ratio": 0.67, "id": "t3_uar10e", "created_utc": 1650792493.0} +{"sub": "Python", "title": "GitHub - roniemartinez/browsers: Python library for detecting and launching browsers", "selftext": "", "upvote_ratio": 0.61, "id": "t3_uaqavx", "created_utc": 1650789380.0} +{"sub": "Python", "title": "What's your favorite GUI library and why? I'll start, mine is TKinter because its the first one I learned and I found it easy for basic display", "selftext": "", "upvote_ratio": 0.93, "id": "t3_uapobr", "created_utc": 1650786701.0} +{"sub": "Python", "title": "Python Selenium Tutorial #10 - Scrape Websites with Infinite Scrolling", "selftext": "", "upvote_ratio": 0.83, "id": "t3_uapb3n", "created_utc": 1650785148.0} +{"sub": "Python", "title": "Extracting WhatsApp messages from an iOS backup", "selftext": "", "upvote_ratio": 0.95, "id": "t3_ualvg6", "created_utc": 1650771297.0} +{"sub": "Python", "title": "What to do next after learning basic python grammar", "selftext": "Hello everyone, I am from China. My daily job is to do sales. I am interested in programming, but I will not apply for programmers. I just want to make programming as a hobby. I have just finished learning the basics of python. What should I learn or what can I do next? I mainly think about using python or programming to do some fun things or interesting things in life. I hope friends who have the same interest, thank you", "upvote_ratio": 0.72, "id": "t3_ualp72", "created_utc": 1650770659.0} +{"sub": "Python", "title": "Program to document code snippets and control under-development projects", "selftext": "Hey there,\n\nI wrote a **Tkinter** program specifically for developers based on two concepts:\n\n* Giving the developer the ability to document (their/others) knowledge and important **code snippets** in an easy, readable, and organized manner.\n* Grouping the under-development **projects in one place** for easy access and control, provided the directory path.\n\nPlease, feel free to have a look at the [Source Code](https://github.com/shehab-fekry/Developer-WorkSpace) and tell me what you think :)\n\nThere will be further features to be added.\n\n&#x200B;\n\nhttps://preview.redd.it/p94e69l4xdv81.png?width=899&format=png&auto=webp&s=26e1359e3f2ac793765cfed2b05b9a3fa55c9c5a\n\nhttps://preview.redd.it/llglv803xdv81.png?width=899&format=png&auto=webp&s=9bfc8a963025fdc9ecd7bc41829babdc6631ebac", "upvote_ratio": 0.78, "id": "t3_uaknmh", "created_utc": 1650766926.0} +{"sub": "Python", "title": "just want to bury", "selftext": " I do not speak English so well so I will write with the help of google translator, I started studying programming for now and I'm having difficulty understanding the makes something object-oriented and something variable I hope not to be talking wrong i realized that often the staff talks about symbols and numbers as whole and letters as variable is right if I think that way ?", "upvote_ratio": 0.4, "id": "t3_uak5ot", "created_utc": 1650765192.0} +{"sub": "Python", "title": "Pons, an async Ethereum RPC client library", "selftext": "I've been waiting a long time for async support in `web3`, and now that it started to appear, it only supports `asyncio` (while I use `trio` in my application), and is in general not quite finished. So I decided to write an RPC client of my own with convenient contract calls, simple structure (instead of a hundred levels of indirection in `web3`) and strictly typed. Still a lot of possible enhancements possible, but it is already useful (well, I use it, at least :).\n\nRepo: https://github.com/fjarri/pons\n\nA simple example:\n\n import trio\n\n from eth_account import Account\n from pons import Client, HTTPProvider, AccountSigner, Address, Amount\n\n async def main():\n\n provider = HTTPProvider(\"<your provider's https endpoint>\")\n client = Client(provider)\n\n acc = Account.from_key(\"0x<your secret key>\")\n signer = AccountSigner(acc)\n\n async with client.session() as session:\n my_balance = await session.eth_get_balance(signer.address)\n print(my_balance)\n\n another_address = Address.from_hex(\"0x<some address>\")\n await session.transfer(signer, another_address, Amount.ether(1.5))\n\n my_balance = await session.eth_get_balance(signer.address)\n print(my_balance)\n\n\n trio.run(main)\n\n\nMore in the [Tutorial](https://pons.readthedocs.io/en/latest/tutorial.html#tutorial) (not very extensive for now, but hopefully gives an idea of how to use it), and of course there's always the [API reference](https://pons.readthedocs.io/en/latest/api.html).\n\nI am sure there are a lot of usage scenarios I haven't even considered, so I would be especially grateful for complaints about this or that method/parameters/naming being inconvenient, counterintuitive, confusing, or out of place.", "upvote_ratio": 0.33, "id": "t3_uaj86y", "created_utc": 1650761986.0} +{"sub": "Python", "title": "Sunday Daily Thread: What's everyone working on this week?", "selftext": "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.", "upvote_ratio": 0.78, "id": "t3_uai5y5", "created_utc": 1650758410.0} +{"sub": "Python", "title": "Deciding what to use among Cython / Pypy / Numba", "selftext": "So I want to experiment and speed up my code. I have studied the basics of Cython and Numba but Pypy only has 10 year onld videos.\n\nWhat I have found:\n- Cython converts Python into C and makes the code useable in both Python and C\n- Numba directly converts Python into Machine code and is useful for Math operations (numpy)\n- Numba is JIT compiler\n- Both Cython and Numba don't support 3rd party libraries like Pandas and spacy..\n- Pypy is an implementation of Python. Normally the Python we use when we write python abc.exe in cmd is Cpython(not Cython).\n- Numba and Cython speed up the code a lot if the code is compatible... things like list don't work with Numba...\n\n\nWould be super helpful if someone can please explain the difference between Numba, Cython and Pypy and when to use which.\n\nEven pointing me to the resources would be great!\n\nThanks in advance.", "upvote_ratio": 0.84, "id": "t3_uafu40", "created_utc": 1650751007.0} +{"sub": "Python", "title": "Discussion: What is the most pythonic way to print an extra line break?", "selftext": "Which of these four equivalent methods do you prefer and why?\n\n print('Beginning processing ...\\n')\n\nor\n\n print('Beginning processing ...', '\\n')\n\nor\n\n print('Beginning processing ...', end='\\n\\n')\n\nor\n\n print('Beginning processing ...')\n print()\n\nIs any of them more or less pythonic than another?", "upvote_ratio": 0.92, "id": "t3_uadbi3", "created_utc": 1650743421.0} +{"sub": "Python", "title": "A simple python library that can be used to run large Web3 queries on Ethereum blockchain concurrently as per Ethereum JSON-RPC specification.", "selftext": "A simple python library that can be used to run large Web3 queries on Ethereum blockchain concurrently as per Ethereum JSON-RPC specification.\n\nThe library provides a bare minimal framework for expressing raw JSON-RPC queries as described in the Ethereum Specification and execute them together either concurrently (off-chain on the client side) or together as a batch (JSON-RPC batch specification on-chain). This method greatly reduces the time required to run large queries sequentially and thus can be used for use-cases where we need to index large number of transactions happening on ethereum blockchain in a local database for faster Web2 queries.\n\nSource code: [GitHub](https://github.com/Narasimha1997/aio-eth)\n\nPyPi: [aio-eth](https://pypi.org/project/aio-eth/)", "upvote_ratio": 0.27, "id": "t3_uad9mx", "created_utc": 1650743270.0} +{"sub": "Python", "title": "Face detection algorithms comparison", "selftext": "I selected 5 ready-made algorithms for face detection and compared them with each other by such metrics as Precision, Recall, IOU and time on the dataset I marked up. I am ready to accept your Pull Request with your solutions(algorithms) and results!\n\nBlog post: [https://habr.com/ru/post/661671/](https://habr.com/ru/post/661671/)\n\nGitHub: [https://github.com/wb-08/face-detection-algorithms-comparison](https://github.com/wb-08/face-detection-algorithms-comparison)", "upvote_ratio": 0.67, "id": "t3_uacer5", "created_utc": 1650740697.0} +{"sub": "Python", "title": "GitHub - plasma-umass/slipcover: Near Zero-Overhead Python Code Coverage", "selftext": "", "upvote_ratio": 0.87, "id": "t3_ua8sgx", "created_utc": 1650730255.0} +{"sub": "Python", "title": "deferred-import: Lazy import and install on demand Python packages", "selftext": "\nLazy import and install on demand Python packages.\n\n1. Package will be loaded only when you use it in the first time. Deferring it makes module loading much faster.\n1. If module is missed, the package will be automatically installed. It allows to make some project dependencies optional and install them on demand.\n\nhttps://github.com/orsinium-labs/deferred-import", "upvote_ratio": 0.59, "id": "t3_ua7bsz", "created_utc": 1650726123.0} +{"sub": "Python", "title": "Parking space counter created using OpenCV and Python", "selftext": "Hello!\n\nI created a simple two-step parking space counter:\n\n\\- first, you mark the positions of all parking spaces you are interested in using \"parking\\_space\\_picker.py\";\n\n\\- second, you run \"parking\\_space\\_counter.py\" to check if the parking space is vacant or not and count them.\n\n[RESULT](https://youtu.be/LERHWFmSSdM)\n\n[CODE](https://github.com/codegiovanni/Parking_space_counter)\n\n&#x200B;\n\nVideo used in the code:\n\nTom Berrigan [https://www.youtube.com/watch?v=yojapmOkIfg&list=LL&index=10](https://www.youtube.com/watch?v=yojapmOkIfg&list=LL&index=10)\n\n&#x200B;\n\nThe code is inspired by:\n\nMurtaza's Workshop - Robotics and AI [https://www.youtube.com/watch?v=caKnQlCMIYI](https://www.youtube.com/watch?v=caKnQlCMIYI)", "upvote_ratio": 0.94, "id": "t3_ua6xh2", "created_utc": 1650724972.0} +{"sub": "Python", "title": "Step by step explanation of Insertion Sort in Python", "selftext": "", "upvote_ratio": 0.54, "id": "t3_ua6x8j", "created_utc": 1650724949.0} +{"sub": "Python", "title": "Space Science: Autoencoder latent space visualization of asteroid spectra", "selftext": "Hey Everyone,\n\nLast time, I introduced Autoencoders (using Keras) to develop a deep learning architecture that learns a low-dimensional representation of asteroid reflectance spectra.\n\nAlthough I compressed the 49-dimensional spectra to only 2 dimensions, the results were quite fair. So... why did I compress it so ridiculously high? Well, a 2-D space can easily be visualized!\n\nAnd this visualization is being done today. In today's tutorial, we'll use Matplotlib for a static display of the data, and ipwidgets, to create an interactive widget within our notebook on Google Colab! Let's see whether our 25-fold compression leads to some proper latent space, where the asteroid classes can be distinguished:\n\nGitHub Link: [https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/12\\_dl\\_autoencoder\\_latent\\_space.ipynb](https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/12_dl_autoencoder_latent_space.ipynb) \nYouTube Link: [https://www.youtube.com/watch?v=h26O2qbc5DA](https://www.youtube.com/watch?v=h26O2qbc5DA)\n\nThe next session will be the final one of the asteroid science project. There, we will create a higher dimensional latent space and apply some clustering algorithm to determine the number of asteroid classes from a data-scientific perspective. Stay tuned!\n\nThomas", "upvote_ratio": 0.78, "id": "t3_ua6sq9", "created_utc": 1650724581.0} +{"sub": "Python", "title": "What makes a good programmer?", "selftext": "I recently started a python course and I'm currently just focused on it but I feel like this is wrong and I'm missing something", "upvote_ratio": 0.53, "id": "t3_ua64gc", "created_utc": 1650722585.0} +{"sub": "Python", "title": "Python matplotlib and numpy New Playlist", "selftext": "", "upvote_ratio": 0.25, "id": "t3_ua2fpl", "created_utc": 1650709546.0} +{"sub": "Python", "title": "How do you manage conflicting packages in your requirements.txt ?", "selftext": "Hi,\n\nLet's say you have in your requirements.txt :\n\n package_A\n package_B\n package_C\n package_D\n\nbut `package_A` requires `some_dependency<=1.5` and `package_B` requires `some_dependency>=2.2` . How do you handle that (knowing that I might have tens of conflicting packages)?\n\nI don't think virtualenvs would be a good solution here since the project has one entry point and packages are imported in the same code ...\n\nThank you !:)", "upvote_ratio": 0.96, "id": "t3_ua2a7k", "created_utc": 1650708904.0} +{"sub": "Python", "title": "\"Community is essential to programmers\" - Eric Matthes", "selftext": "I've just started working my way through Eric Matthes' Python Crash Course. In his introduction he states, \" Community is essential to programers because programming isn't a solitary pursuit.... Having a well connected community is critical in helping you solve problems, and the Python community is fully supportive of people like you who are learning python as your first programming language.\" \n\n&#x200B;\n\nI've dabbled a bit in the basic front end languages and I'm currently playing around with Vue so I wouldn't say it's my first language. However, I did feel compelled to reach out to this community after reading that. \n\n\nIf you have any advice for someone starting to pick up python, I'm happy to listen and learn.", "upvote_ratio": 0.84, "id": "t3_ua1z3n", "created_utc": 1650707604.0} +{"sub": "Python", "title": "10 examples of using Python for big data analysis", "selftext": "", "upvote_ratio": 0.8, "id": "t3_ua1kfl", "created_utc": 1650705802.0} +{"sub": "Python", "title": "MNE \u2014 Open-source Python package for exploring, visualizing, and analyzing human neurophysiological data: MEG, EEG, sEEG, ECoG, NIRS, and more", "selftext": "", "upvote_ratio": 0.97, "id": "t3_ua0faz", "created_utc": 1650700833.0} +{"sub": "Python", "title": "Python Tips and Tricks \u2014 Write Better Python Code", "selftext": "", "upvote_ratio": 0.64, "id": "t3_u9ziwb", "created_utc": 1650697016.0} +{"sub": "Python", "title": "freeCodeCamp: Gradio Course - Create User Interfaces for Machine Learning Models in Python", "selftext": "", "upvote_ratio": 0.87, "id": "t3_u9y93f", "created_utc": 1650691784.0} +{"sub": "Python", "title": "PCEP Certification exam - Python", "selftext": "Hi All,\n\nDid anybody take PCEP certification exam? If it took you more than one try, did you have to pay $59 every time you attempt? Or one time was enough?\n\nI am making this post because couldn't find the answer on google.", "upvote_ratio": 0.6, "id": "t3_u9x1e4", "created_utc": 1650687186.0} +{"sub": "Python", "title": "Call me naive, but would it not be possible to create a tool for python the auto adds type hints at run time?", "selftext": "I\u2019m going to learn python over the summer, but coming from Java & c# in IDE\u2019s where casting etc can auto completed within the problem pane when making newb mistakes, and also knowing the pain of PHP runtime errors, I\u2019m hoping the dynamic experience will be smoother with python.\n\nI\u2019m ranting.. would this be feasible ? Just a thought.", "upvote_ratio": 0.33, "id": "t3_u9sdwa", "created_utc": 1650672030.0} +{"sub": "Python", "title": "Saturday Daily Thread: Resource Request and Sharing! Daily Thread", "selftext": "Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?\n\nUse this thread to chat about and share Python resources!", "upvote_ratio": 1.0, "id": "t3_u9sdh3", "created_utc": 1650672009.0} +{"sub": "Python", "title": "I have multiple interdependent Python services & modules for my work. I use conventional commits (changetype: scope: \u2026) allowing automated changelogs. I think I need to go monorepo and add the changed service to the commit structure (service: changetype: scope). Does this look like a good strategy?", "selftext": "", "upvote_ratio": 0.8, "id": "t3_u9rgzf", "created_utc": 1650669201.0} +{"sub": "Python", "title": "What is a good, pure Python alternative to lxml's objectify?", "selftext": "Reference: https://lxml.de/objectify.html\n\n> Accessing the children of an XML element deploys object attribute access. If there are multiple children with the same name, slicing and indexing can be used. Python data types are extracted from XML content automatically and made available to the normal Python operators.", "upvote_ratio": 1.0, "id": "t3_u9qp2k", "created_utc": 1650666983.0} +{"sub": "Python", "title": "Proper launch of python packages", "selftext": "", "upvote_ratio": 0.75, "id": "t3_u9q8tx", "created_utc": 1650665684.0} +{"sub": "Python", "title": "Coding an Intelligent Battleship Agent", "selftext": "", "upvote_ratio": 0.5, "id": "t3_u9pn6u", "created_utc": 1650664027.0} +{"sub": "Python", "title": "rashell (Relational Algebra Shell)", "selftext": "Hi all.\n\nI've uploaded my project on Pypi. It is called **rashell** which stands for **R**elational **A**lgebra **S**hell. It provides a command line interface and a DSL to define, fill and query a relational model. This tool is intended for educational use only, to illustrate the underlying concepts of relational databases in a more interactive way. It can be installed via pip :\n\n $ pip install rashell\n\nPlease refer to Readme on gitlab to know how to use it.\n\n[https://gitlab.com/skebir/rashell](https://gitlab.com/skebir/rashell)\n\n[https://pypi.org/project/rashell/](https://pypi.org/project/rashell/)\n\nI would like to have your opinion on it. Thank you in advance.", "upvote_ratio": 0.84, "id": "t3_u9p9g6", "created_utc": 1650662976.0} +{"sub": "Python", "title": "Does anyone know what editor this is or what sorts of editors have this feature?", "selftext": "[The editor is linked here](https://i.imgur.com/9HcadwR.gif) \n \nBasically allowing you to similar parts to multiple lines of code by clicking and then hitting backspace?", "upvote_ratio": 0.5, "id": "t3_u9obb5", "created_utc": 1650660405.0} +{"sub": "Python", "title": "A screenful of advice about writing command-line tools in Python", "selftext": "", "upvote_ratio": 0.81, "id": "t3_u9m149", "created_utc": 1650654132.0} +{"sub": "Python", "title": "I've made a pure Python implementation of the QOI image format", "selftext": "[link to the code](https://github.com/SudoOmbro/qoi_converter)\n\nas said in the title, it's a pure python implementation of the [qoi format](https://qoiformat.org/), a lossless image compression methd that manages be 50x faster while encoding and 3x-4x while faster decoding than PNG.\n\nPython isn't known to be fast though, but this implementation is not too bad speed wise to be fair.\n\nMore info on how it was implemented in the README :)", "upvote_ratio": 1.0, "id": "t3_u9k3i3", "created_utc": 1650648791.0} +{"sub": "Python", "title": "Cache in asynchronous Python applications", "selftext": "", "upvote_ratio": 0.84, "id": "t3_u9ihvl", "created_utc": 1650644486.0} +{"sub": "Python", "title": "Car Wash Pattern: Parallelizing Non-Thread Safe and/or CPU-intensive Processes with Future Based Queue Centric Approach in Python", "selftext": "This article can be a useful guide for parallelizing non-thread-safe and CPU-bound processes, such as some machine learning models, for purposes such as model to web service conversion. While developing the solution, I tried to pay particular attention to the advantages, disadvantages and pitfalls of python. Maybe there is nothing new for the masters, but I think it is a neat resource for the enthusiasts.\n\n[https://medium.com/vlmedia-tech/parallelizing-non-thread-safe-and-or-cpu-intensive-processes-with-future-based-queue-centric-b2247bbcf231](https://medium.com/vlmedia-tech/parallelizing-non-thread-safe-and-or-cpu-intensive-processes-with-future-based-queue-centric-b2247bbcf231)", "upvote_ratio": 0.9, "id": "t3_u9hhmv", "created_utc": 1650641812.0} +{"sub": "Python", "title": "Searching a student apartment in Z\u00fcrich was too boring so I made a Telegram bot.", "selftext": "[GitHub link](https://github.com/bskdany/WokoWGZScraperBot)\n\nBasically anyone I know checks every day [woko.ch](https://woko.ch) and [wgzimmer.ch](https://wgzimmer.ch) for rooms and apartments that are being rented for students in Switzerland , the first to contact the seller usually gets the room. I don't have the time and will to do that.\n\nSo I made a bot that scrapes both those websites with requests and BeautifulSoup. The bot collects the urls of the rented rooms and saves them in a txt, then it checks the website every minute for changes. If a new url is found then the room data is sent to me with the Telegram API. \n\nBoth those websites don't have a policy against scraping, but they do have some little bot protection.\n\nYeah that's it, I made this in two days and I'm hosting the bot on heroku.\n\nSuggestions are welcome (especially in security).", "upvote_ratio": 0.88, "id": "t3_u9g6jb", "created_utc": 1650638272.0} +{"sub": "Python", "title": "Common Python Anti-Patterns to watch out for", "selftext": "", "upvote_ratio": 0.81, "id": "t3_u9g5r7", "created_utc": 1650638203.0} +{"sub": "Python", "title": "How to Write a Python Script to Create and Update a Changelog", "selftext": "", "upvote_ratio": 0.5, "id": "t3_u9dy34", "created_utc": 1650631951.0} +{"sub": "Python", "title": "copilot getting creepy", "selftext": "hey, yesterday I was making an auto reply bot with telethon (+ copilot)\n\nI got a phone number as a suggestion in **plain text** , meaning that copilot does not have a 'personal info filter' or whatever.\n\nSomeone said that GitHub also used private repos to train copilot, well, let's hope that nobody gets a suggestion with my bybit api keys\n\nhttps://preview.redd.it/i8mw9t26s2v81.jpg?width=384&format=pjpg&auto=webp&s=55d082b6ff58f8c9b1e527f424a72de9a88c3504\n\nhttps://preview.redd.it/q3mhee6ir2v81.jpg?width=1354&format=pjpg&auto=webp&s=f2325cb1e6f144a9e6d571c3c86bae178e2ecfbd", "upvote_ratio": 0.88, "id": "t3_u9dobe", "created_utc": 1650631103.0} +{"sub": "Python", "title": "Python 3.11 Preview: Task and Exception Groups \u2013 Real Python", "selftext": "", "upvote_ratio": 0.94, "id": "t3_u9dhsy", "created_utc": 1650630515.0} +{"sub": "Python", "title": "Boihut bookstore(Ecommerce ) website made in Django", "selftext": "This was built as my first year university project. \n\n&#x200B;\n\nhttps://preview.redd.it/7ar5lrkw72v81.png?width=1920&format=png&auto=webp&s=fa8428c4ff54ca6ac149b89915153657b1aabe71\n\n&#x200B;\n\nLive link : [https://boihut.biz](https://boihut.biz)\n\nGithub: [https://github.com/shaongitt/boihut](https://github.com/shaongitt/boihut)", "upvote_ratio": 0.9, "id": "t3_u9bpmd", "created_utc": 1650624350.0} +{"sub": "Python", "title": "Login and logout functionality in django framework", "selftext": "", "upvote_ratio": 0.56, "id": "t3_u97qgl", "created_utc": 1650607754.0} +{"sub": "Python", "title": "Friday Daily Thread: Free chat Friday! Daily Thread", "selftext": "Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted!", "upvote_ratio": 0.8, "id": "t3_u915sx", "created_utc": 1650585609.0} +{"sub": "Python", "title": "Step by step explanation of Bubble sort with python implementation", "selftext": "", "upvote_ratio": 0.85, "id": "t3_u90cgx", "created_utc": 1650583086.0} +{"sub": "Python", "title": "Intel 8051 microcontroller emulator", "selftext": "I made this app as a BE thesis. It's using Brython to make Python work in Chromium (Electron) and React with Material-UI for the front-end. It's supposed to be rendered in a fixed-sized Electron window, so it may not look the best in a browser.\n\n[https://github.com/estarq/i8051emu](https://github.com/estarq/i8051emu)", "upvote_ratio": 0.75, "id": "t3_u8xutf", "created_utc": 1650575884.0} +{"sub": "Python", "title": "dc_schema, a tiny library to generate JSON schema from python dataclasses", "selftext": "I wrote a small library for generating JSON schema from python dataclasses. I'm using pydantic a lot in my daily work, but wanted to understand JSON schema better myself and create a lightweight, focused solution for schema generation. \n\nPosting here incase some of you are interested to try it out, maybe someone has some constructive feedback/review.\n\nhttps://github.com/Peter554/dc_schema", "upvote_ratio": 0.75, "id": "t3_u8x9pw", "created_utc": 1650574245.0} +{"sub": "Python", "title": "Cache in asynchronous Python applications", "selftext": "", "upvote_ratio": 0.67, "id": "t3_u8v01p", "created_utc": 1650567983.0} +{"sub": "Python", "title": "Is it bad practice to start with Jupyter Notebooks?", "selftext": "Nowadays whenever I start a new Python project I always start with a jupyter notebook to test snippets of code, to later add to my main script. \n\nShould I avoid doing this? Is this bad practice?", "upvote_ratio": 0.91, "id": "t3_u8tsd6", "created_utc": 1650564637.0} +{"sub": "Python", "title": "Python\u2019s Match-Case Is Too Slow (If You Don\u2019t Understand It)", "selftext": "", "upvote_ratio": 0.44, "id": "t3_u8t99e", "created_utc": 1650563193.0} +{"sub": "Python", "title": "Any suggestions for simple predictive modeling for class project using nba game data", "selftext": "Any suggestions for simple predictive modeling for class project using nba game data", "upvote_ratio": 0.6, "id": "t3_u8sby9", "created_utc": 1650560623.0} +{"sub": "Python", "title": "A magic hand using DXL and servo motors", "selftext": "I recorded this quick demo to show how topology detection can work with DXLs or servo motors. I developed a few lines of code, if you want to see, I can share them with you!", "upvote_ratio": 0.8, "id": "t3_u8qjgg", "created_utc": 1650555851.0} +{"sub": "Python", "title": "co-author.py - Creates \"Co-authored-by\" lines from usernames and issue/PR urls using GitHub REST API", "selftext": "I needed a quick way to credit the original PR authors while patching [my Alabaster fork](https://github.com/introt/alabester/releases/tag/0.7.22), so I wrote this little script to assist in the task.\n\nThe combination of using the REST API along with the no-reply email addresses seems novel in the co-authoring space, so I decided to share it - I hope someone finds it useful!\n\nFeel to fork and/or put it up on PyPi etc, the code's released under the MIT license.\n\nhttps://gist.github.com/introt/ad30bcbdf789aed5bba43082741c7769", "upvote_ratio": 0.6, "id": "t3_u8ol71", "created_utc": 1650550389.0} +{"sub": "Python", "title": "Just started making a Pok\u00e9mon wordle type game. Wish me luck, should be done by the end of two weeks", "selftext": "It's my first ever big project so I'm pretty excited :)", "upvote_ratio": 0.58, "id": "t3_u8of7m", "created_utc": 1650549900.0} +{"sub": "Python", "title": "100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| - TQDM is a simple library for adding progress bars to your python code. I made a tutorial about it.", "selftext": "", "upvote_ratio": 0.69, "id": "t3_u8nzzr", "created_utc": 1650548669.0} +{"sub": "Python", "title": "Is everything worth solving?", "selftext": "When a bug takes ages to fix should I still keep trying or move on since I\u2019m a beginner should I not try to move on to learn something else and then maybe come back at some point? Thanks", "upvote_ratio": 0.6, "id": "t3_u8nfcq", "created_utc": 1650546950.0} +{"sub": "Python", "title": "Manage Encryption Key", "selftext": "I created a public Github repo for Creating, Encrypting, and Decrypting files called: [Manage Encryption Key](https://github.com/Moreless91/Manage-Encryption-Key)\n\n[Main Menu](https://preview.redd.it/bgde2ghlkvu81.png?width=306&format=png&auto=webp&s=32be688c1e436dae386d3b3301745c4789afba18)\n\nIt's a CLI tool that I've needed for quite awhile for quickly creating a key for a new app or decrypting some older data from older projects.\n\nHere's some screenshots:\n\nEncrypting: \n\n[Encrypting](https://preview.redd.it/lacxuedllvu81.png?width=325&format=png&auto=webp&s=3a2b8e0eb3c39648619ec2bd38aba2aa83873a78)\n\nDecrypting:\n\n&#x200B;\n\n[Decrypting](https://preview.redd.it/vqsewmbslvu81.png?width=333&format=png&auto=webp&s=802a9c3e0b7041ce4830a5831517698b864981ee)\n\nYou can stay organized by adjusting the Settings option for storing your files quickly:\n\n[Settings](https://preview.redd.it/8jgd4ckulvu81.png?width=321&format=png&auto=webp&s=48faf595e791bd713c78c390666150f83e79db02)\n\nTo setup, view the README on [https://github.com/Moreless91/Manage-Encryption-Key](https://github.com/Moreless91/Manage-Encryption-Key)\n\nI'm still new to python and programming in general. No formal education. Tear my code apart, please!!", "upvote_ratio": 0.78, "id": "t3_u8mozm", "created_utc": 1650544746.0} +{"sub": "Python", "title": "Know How to Create and Visualize a Decision Tree with Python", "selftext": "", "upvote_ratio": 0.57, "id": "t3_u8k0am", "created_utc": 1650535185.0} +{"sub": "Python", "title": "2022 Update: Understanding Best Practice Python Tooling by Comparing Popular Project Templates", "selftext": "I have just posted a 2022 update to my old blog post from 2020 -> [https://medium.com/@jonas.r.kemper/2022-update-understanding-best-practice-python-tooling-by-comparing-popular-project-templates-5872602fe617?sk=a7ed50c63851d81093697c62b740396a](https://medium.com/@jonas.r.kemper/2022-update-understanding-best-practice-python-tooling-by-comparing-popular-project-templates-5872602fe617?sk=a7ed50c63851d81093697c62b740396a) \n\n\nHope you like it! :)", "upvote_ratio": 0.88, "id": "t3_u8jfcb", "created_utc": 1650532690.0} +{"sub": "Python", "title": "Unpopular opinion: Matplotlib is a bad library", "selftext": "I work with data using Python a lot. Sometimes, I need to do some visualizations. Sadly, matplotlib is the de-facto standard for visualization. The API of this library is a pain in the ass to work with. I know there are things like Seaborn which make the experience less shitty, but that's only a partial solution and isn't always easily available. Historically, it was built to imitate then-popular Matlab. But I don't like Matlab either and consider it's API and plotting capabilities very inferior to e.g. Wolfram Mathematica. Plus trying to port the already awkward Matlab API to Python made the whole thing double awkward, the whole library overall does not feel very Pythonic.\n\nPlease give a me better plotting libary that works seemlessly with Jupyter!", "upvote_ratio": 0.92, "id": "t3_u8j6fn", "created_utc": 1650531638.0} +{"sub": "Python", "title": "GitHub - aGIToz/PyInpaint: A lightweight image inpainting tool in python.", "selftext": "", "upvote_ratio": 1.0, "id": "t3_u8hao9", "created_utc": 1650523323.0} +{"sub": "Python", "title": "Data Operations Using Python Mitosheets", "selftext": "", "upvote_ratio": 0.84, "id": "t3_u8fj6a", "created_utc": 1650516403.0} +{"sub": "Python", "title": "Urwid wrapper for nvidia-smi", "selftext": "Hello. I wanted to share a simple urwid-based wrapper I wrote for nvidia-smi. I find that nvidia-smi takes up too much space in my terminal and I prefer graphical/bar based displays. These are not my GPUs - I am not that rich. Check it out here:\n\n[https://github.com/nec4/gpu-array](https://github.com/nec4/gpu-array) \n\n\nhttps://i.redd.it/7af8spadasu81.gif\n\nIt's written entirely in Python, and was my first departure from using ncurses directly. After diving in, I have to save urwid is very slick.", "upvote_ratio": 0.74, "id": "t3_u8bx7e", "created_utc": 1650504587.0} +{"sub": "Python", "title": "Creating and API from scratch...", "selftext": "Hey guys, I just learned Django and React, I know my few things about python amd javascript. Ive done small projects using \"Django Rest Framework\".\n\nMy question is, can I build an API from scratch without using Django or DjangoRest Framework? \n\nIm curious how its done. All the google searches Ive done they give back answers usimg Django or flask.\n\nIf I had only python, postgres, javascript, html and css to work on...how can I build an API without frameworks? \n\nThe idea of creating one from scratch confuses me since Ive only built one using Django Rest Framework. \n\n\n\nAny guidance will help.", "upvote_ratio": 0.62, "id": "t3_u8ajpp", "created_utc": 1650500352.0} +{"sub": "Python", "title": "Thursday Daily Thread: Python Careers, Courses, and Furthering Education!", "selftext": "Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!\n\n**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.**", "upvote_ratio": 0.67, "id": "t3_u8a5pq", "created_utc": 1650499209.0} +{"sub": "Python", "title": "Python Tutorial - How to create a Car Processor and Detector using Python?", "selftext": "Hey Everyone! I created a short Python Tutorial explaining how I created a Car Processor and Detector using Python. \n[https://www.youtube.com/watch?v=ZXFS-uUNTcg](https://www.youtube.com/watch?v=ZXFS-uUNTcg)\n\nhttps://preview.redd.it/gjbek5zoqru81.png?width=2880&format=png&auto=webp&s=149cf6b3e18c77d190c806686d588862ebcab56e", "upvote_ratio": 0.75, "id": "t3_u89kvw", "created_utc": 1650497426.0} +{"sub": "Python", "title": "Flask vs FastAPI for a microservice", "selftext": "Hello,\n\n&#x200B;\n\nI'm going to build a microservice that processes images and does OMR on them, and I'm torn between using Flask or FastAPI.\n\n&#x200B;\n\nI 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.\n\n&#x200B;\n\nWhich one do you think is more suitable in my case?", "upvote_ratio": 0.78, "id": "t3_u86ra7", "created_utc": 1650489404.0} +{"sub": "Python", "title": "Type hints immediately giving payoffs", "selftext": "[https://imgur.com/a/0NaPfxQ](https://imgur.com/a/0NaPfxQ)\n\nSo, I 'FORCED' myself to use typehints. Flask seems to already priovide some motivation, so I went ahead and carried on.\n\nLOOK! WOW! PyCHARM!\n\nImmediately, 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!\n\nTypehints.... 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.\n\nIt'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.", "upvote_ratio": 0.58, "id": "t3_u86q6j", "created_utc": 1650489316.0} +{"sub": "Python", "title": "Bloomberg just Open sourced Memray a memory profiler for Python", "selftext": "", "upvote_ratio": 0.98, "id": "t3_u84tjr", "created_utc": 1650484108.0} +{"sub": "Python", "title": "Python learning group?", "selftext": "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.\n\nI'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. \n\nDoes anyone want to form a study group, via discord or know of any??", "upvote_ratio": 0.74, "id": "t3_u81o93", "created_utc": 1650475476.0} +{"sub": "Python", "title": "Python's stability", "selftext": "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?", "upvote_ratio": 0.33, "id": "t3_u7zog4", "created_utc": 1650470137.0} +{"sub": "Python", "title": "I wrote an article on \"Packaging and Publishing Packages on PyPI\"", "selftext": "", "upvote_ratio": 1.0, "id": "t3_u7lr6r", "created_utc": 1650420710.0} +{"sub": "Python", "title": "How to write a Python3 wrapper library/module for a JSON REST API in 15 simple steps", "selftext": "", "upvote_ratio": 0.96, "id": "t3_u7vquv", "created_utc": 1650458946.0} +{"sub": "Python", "title": "37 Sixty Second Python Tutorials", "selftext": "Python 60 Second Videos: https://www.youtube.com/playlist?list=PL6lxxT7IdTxG5li13TmP0fvHaFRZaHi4d", "upvote_ratio": 0.78, "id": "t3_u7uhit", "created_utc": 1650454737.0} +{"sub": "Python", "title": "Gaming oriented Turtle fork", "selftext": "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.\n\nPlease check it out and give feedback!\n\n[https://github.com/alannxq/Burtle](https://github.com/alannxq/Burtle)", "upvote_ratio": 0.7, "id": "t3_u7s0vo", "created_utc": 1650444648.0} +{"sub": "Python", "title": "Java Vs Python Comparison: Which Programming Language is Right for My Business?", "selftext": "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.\n\nThe 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. \n\n&#x200B;", "upvote_ratio": 0.36, "id": "t3_u7rvi0", "created_utc": 1650443966.0} +{"sub": "Python", "title": "Making the switch from academia to industry? R to Python?", "selftext": "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?", "upvote_ratio": 0.89, "id": "t3_u7qtvf", "created_utc": 1650439255.0} +{"sub": "Python", "title": "Compiling Python programs with Pyinstaller", "selftext": "", "upvote_ratio": 0.74, "id": "t3_u7pu7w", "created_utc": 1650435048.0} +{"sub": "Python", "title": "Visualization of the 3x+1 problem using turtle graphics", "selftext": "&#x200B;\n\n[My new screen saver](https://preview.redd.it/8zfb0b1p4mu81.png?width=3814&format=png&auto=webp&s=a726b12997a7c6d3fad9a784e56550c878d192bd)\n\n[Source code](https://github.com/Spovis/collatz)\n\nThis 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.\n\nAny code critiques are welcome.", "upvote_ratio": 0.86, "id": "t3_u7ogas", "created_utc": 1650429653.0} +{"sub": "Python", "title": "Novel and small python projects and code snippets", "selftext": "Share your answers to these tasks in the comments. Feel free to ask for help.\n\n# Task 1 (Beginner) #\nCreate a class \u201cNumberSet\u201d that:\n- Inherits from the built in set class\n- That overrides __setitem__ to only allow numbers\n\nYou will learn about inheritance, \u201csuper\u201d, and sets\n\n# Task 2 (Intermediate) # \nCreate an NxN matrix where N is any odd number, where each cells value is the distance of that cell from the centre. \n- For examples 3x3 matrix, the \u201cmiddle\u201d cells value will be 0, but any outer cells value will be 1\n\nYou will learn about basic algorithmic logic, nested loops (or arrays ;) ) and a bit of basic math\n\n# Task 3 (Intermediate) #\nCreate a 100x100 pixel \u201cblue\u201d colour bitmap image from scratch (with no third party image libraries):\n- You will use this to understand the file format required https://en.wikipedia.org/wiki/BMP_file_format?wprov=sfti1\n- You will be working with binary data only\n\nYou will learn about file headers and formats, binary data, and image creation\n\n# Task 4 (Intermediate) #\nCreate a function decorator that runs the decorated function twice.\n\nYou will learn about nested functions, higher order functions, and decorators", "upvote_ratio": 0.75, "id": "t3_u7ls2t", "created_utc": 1650420783.0} +{"sub": "Python", "title": "How Python Enriched the Use of AI in Several Industries", "selftext": "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.\u00a0\n\nThe 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.\n\nForming Future Technologies\n\nThe 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.\u00a0\n\nUsing artificial intelligence mainly enhances three aspects of any organization. They are:\n\n* Accuracy in predictions and insight production increases business efficiency.\n* It is a very low-cost venture instead of hiring many individuals at high salaries.\n* Finally, it increases the productivity of the organization.\n\nThis 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.\u00a0\n\nThe Use of Python\n\n[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.\u00a0\n\nSome industries that extensively use Python in expanding their businesses are:\n\n* Healthcare\n* Travel and transportation\n* Finance technology\n\nHealth Care\n\nHealth 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.\n\nTravel and Transportation\n\nPython 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.\u00a0\n\nFinance Technology\n\nAI 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.\u00a0\n\nTake\u00a0[**data science course**](https://360digitmg.com/data-science)\u00a0today and get your dream job.\u00a0 \u00a0\u00a0\n\n\ud83d\udcf7", "upvote_ratio": 0.2, "id": "t3_u7l4rv", "created_utc": 1650418780.0} +{"sub": "Python", "title": "Looks like I'm going to prom thanks to Python!", "selftext": "[https://github.com/Jah-On/prom-decider](https://github.com/Jah-On/prom-decider)", "upvote_ratio": 0.5, "id": "t3_u7l0ce", "created_utc": 1650418382.0} +{"sub": "Python", "title": "Learn how to Scraping Google and optimize search using google search operators", "selftext": "", "upvote_ratio": 0.33, "id": "t3_u7kzgt", "created_utc": 1650418303.0} +{"sub": "Python", "title": "Wednesday Daily Thread: Beginner questions", "selftext": "New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!\n\nThis 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.", "upvote_ratio": 0.86, "id": "t3_u7j74e", "created_utc": 1650412810.0} +{"sub": "Python", "title": "PyMailer: A small utility I wrote in Python3 to automate sending server notifications via an SMTP service", "selftext": "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.\n\nSo 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\n\n cat /some/log/file/or/something | pymailer\n\nto the end of a script. Configuration is accomplished by editing a JSON-esque config file - I tried to keep it as simple as possible.\n\nHonestly 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.", "upvote_ratio": 0.5, "id": "t3_u7hk4i", "created_utc": 1650407953.0} +{"sub": "Python", "title": "I wrote a python script that you can copy into your projects for quickly logging information between your Terminal and Files", "selftext": "I\u2019ve been working on a bunch of different python scripts recently and I found myself constantly referring back to Python\u2019s 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\u2019s a short 200-ish .py file that you can just copy over into your project and instantly start using.\n\nSource can be found here: [https://github.com/henryriveraCS/logger](https://github.com/henryriveraCS/logger)\n\nLet me know what you think :\\^)", "upvote_ratio": 0.75, "id": "t3_u7gw5z", "created_utc": 1650406071.0} +{"sub": "Python", "title": "Is anyone taking the CS50p (for Python) currently in progress from Harvard?", "selftext": "Just wondering what your thoughts are on it, how it compares to the original CS50, etc?", "upvote_ratio": 0.84, "id": "t3_u7g0ix", "created_utc": 1650403719.0} +{"sub": "Python", "title": "Keylogger In Just 10 Lines Of Python", "selftext": "", "upvote_ratio": 0.67, "id": "t3_u7fczz", "created_utc": 1650401947.0} +{"sub": "Python", "title": "Dash is Deeper than Dashboards", "selftext": "", "upvote_ratio": 0.88, "id": "t3_u7emja", "created_utc": 1650399953.0} +{"sub": "Python", "title": "Program that counts lines of code", "selftext": "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 :)\n\n[https://github.com/carterdugan/LineCounter](https://github.com/carterdugan/LineCounter)", "upvote_ratio": 0.5, "id": "t3_u7e96y", "created_utc": 1650398975.0} +{"sub": "Python", "title": "Just A Todo App", "selftext": "* **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.**\n\nhttps://preview.redd.it/u3yovjldbju81.png?width=1366&format=png&auto=webp&s=d39ecebde42df6e3dfa2d30ae47ce2e4690639d8\n\n* **Github :** [SecretsX - JustATodoApp](https://github.com/SecretsX/JustATodoApp)", "upvote_ratio": 0.6, "id": "t3_u7cwkw", "created_utc": 1650395385.0} +{"sub": "Python", "title": "Created Python Jobs (Backend and AI/ML) Website", "selftext": "Hey, Guys!\n\nI'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!\n\nHere is the link to keep in touch \u27a1 [pyhunt.com](https://www.pyhunt.com/) \n\nFeedbacks and Questions are welcome,\n\nThanks :)", "upvote_ratio": 0.78, "id": "t3_u7ccs4", "created_utc": 1650393952.0} +{"sub": "Python", "title": "UFC analysis with Python", "selftext": "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)", "upvote_ratio": 0.57, "id": "t3_u7c0jv", "created_utc": 1650393068.0} +{"sub": "Python", "title": "How to Build Countable Classes in Python", "selftext": "", "upvote_ratio": 0.63, "id": "t3_u7bdds", "created_utc": 1650391390.0} +{"sub": "Python", "title": "Snake Code", "selftext": "Snake Code:\n\n&#x200B;\n\n&#x200B;\n\nimport time \n\n\nimport pygame \nfrom enum import Enum \nimport random \n\n\nclass Direction(Enum): \nUP = 1 \n DOWN = 2 \n RIGHT = 3 \n LEFT = 4 \nwindow\\_width = 720 \nwindow\\_height = 720 \npygame.init() \npygame.display.set\\_caption(\"Snake Game 1\") \nwindow = pygame.display.set\\_mode((window\\_width, window\\_height)) \n\n\nrefresh\\_controller = pygame.time.Clock() \n\n\nsnake\\_position = \\[250, 250\\] \nsnake\\_body = \\[\\[250, 250\\], \n \\[240, 240\\], \n \\[230, 250\\]\\] \n\n\nfood\\_position = \\[250, 250\\] \n\n\nscale = 20 \nglobal score \nscore = 0 \nglobal speed \nspeed = 1 \ndef handle\\_keys(direction): \nnew\\_direction = direction \n for event in \\[e for e in pygame.event.get() if e.type == pygame.KEYDOWN\\]: \n if event.key == pygame.K\\_UP and direction != Direction.DOWN: \nnew\\_direction = Direction.UP \n if event.key == pygame.K\\_DOWN and direction != Direction.UP: \nnew\\_direction = Direction.DOWN \n if event.key == pygame.K\\_RIGHT and direction != Direction.LEFT: \nnew\\_direction = Direction.RIGHT \n if event.key == pygame.K\\_LEFT and direction != Direction.RIGHT: \nnew\\_direction = Direction.LEFT \n return new\\_direction \n\n\ndef move\\_snake(direction): \n\n\nif direction == Direction.UP: \nsnake\\_position\\[1\\] -= scale \n if direction == Direction.DOWN: \nsnake\\_position\\[1\\] += scale \n if direction == Direction.LEFT: \nsnake\\_position\\[0\\] -= scale \n if direction == Direction.RIGHT: \nsnake\\_position\\[0\\] += scale \nsnake\\_body.insert(0, list(snake\\_position)) \n\n\ndef generate\\_new\\_food(): \nfood\\_position\\[0\\] = random.randint(5, ((window\\_height - 2) // scale)) \\* scale \nfood\\_position\\[1\\] = random.randint(5, ((window\\_height - 2) // scale)) \\* scale \n\n\ndef get\\_food(): \n global score \n global speed \n if abs(snake\\_position\\[0\\] - food\\_position\\[0\\]) < 20 and abs(snake\\_position\\[1\\] - food\\_position\\[1\\]) < 20: \nscore += 1 \n speed += 2 \n generate\\_new\\_food() \n else: \nsnake\\_body.pop() \n\n\ndef paint\\_hud(): \nfont = pygame.font.SysFont(\"Arial\", scale\\*2) \nrender = font.render(f\"Score: {score}\", True, pygame.Color(255, 255, 255)) \nrect = render.get\\_rect() \nwindow.blit(render, rect) \npygame.display.flip() \n\n\ndef repaint(): \nwindow.fill(pygame.Color(5, 0, 5)) \n for body in snake\\_body: \npygame.draw.circle(window, pygame.Color(0, 255, 0), (body\\[0\\], body\\[1\\]), scale/2) \npygame.draw.rect(window, pygame.Color(255, 0, 0), pygame.Rect(food\\_position\\[0\\]-scale/2, food\\_position\\[1\\]-scale/2, scale, scale/2)) \n\n\ndef game\\_over\\_message(): \nfont = pygame.font.SysFont('Arial', scale\\*3) \nrender = font.render(f\"Score: {score}\", True, pygame.Color(255,255,255)) \nrect = render.get\\_rect() \nrect.midtop = (window\\_width / 2, window\\_height / 2) \nwindow.blit(render, rect) \npygame.display.flip() \ntime.sleep(2.5) \npygame.quit() \n exit(0) \n\n\ndef game\\_over(): \n if snake\\_position\\[0\\] < 0 or snake\\_position\\[0\\] > window\\_width - 10: \ngame\\_over\\_message() \n if snake\\_position\\[0\\] < 0 or snake\\_position\\[1\\] > window\\_height - 10: \ngame\\_over\\_message() \n for blob in snake\\_body\\[1:\\]: \n if snake\\_position\\[0\\] == blob\\[0\\] and snake\\_position\\[1\\] == blob\\[1\\]: \ngame\\_over\\_message() \n\n\ndef game\\_loop(): \ndirection = Direction.RIGHT \n while True: \ndirection = handle\\_keys(direction) \nmove\\_snake(direction) \nget\\_food() \nrepaint() \ngame\\_over() \npaint\\_hud() \npygame.display.update() \nrefresh\\_controller.tick(speed) \n\n\nif \\_\\_name\\_\\_ == \"\\_\\_main\\_\\_\": \ngame\\_loop()", "upvote_ratio": 0.3, "id": "t3_u79ohy", "created_utc": 1650387027.0} +{"sub": "Python", "title": "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", "selftext": "", "upvote_ratio": 0.5, "id": "t3_u79f99", "created_utc": 1650386342.0} +{"sub": "Python", "title": "Download Outlook Email Attachments Using Microsoft Graph API In Python[", "selftext": "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. \n\n\nVideo Link: [https://youtu.be/UF-hc2nZV\\_A](https://youtu.be/UF-hc2nZV_A)", "upvote_ratio": 1.0, "id": "t3_u77n4y", "created_utc": 1650381620.0} +{"sub": "Python", "title": "78 Python data science practice problems in a single github repo including numpy, pandas, matplotlib, scipy, regex, pytorch", "selftext": "", "upvote_ratio": 0.98, "id": "t3_u77fce", "created_utc": 1650381050.0} +{"sub": "Python", "title": "QualityScaler 1.3.0 - Image/video upscaling & enhancement Windows app", "selftext": "&#x200B;\n\n[GUI](https://preview.redd.it/vtj3a827yhu81.png?width=1357&format=png&auto=webp&s=9321b61c88261595c31d3512cef93af4cc0bcf39)\n\n[EXAMPLE](https://preview.redd.it/lbfejx48yhu81.png?width=2232&format=png&auto=webp&s=13067052d8ed6364eff09d716746e37986cff7d1)\n\nItch -> [https://jangystudio.itch.io/qualityscaler](https://jangystudio.itch.io/qualityscaler)\n\nGithub -> [https://github.com/Djdefrag/QualityScaler/releases/tag/1.3.0](https://github.com/Djdefrag/QualityScaler/releases/tag/1.3.0)\n\n&#x200B;\n\n**Update 1.3.0 - Auto tile-merge / speed and UI improv. (1.3.0)**\n\nNew\n\n* Automatic tiles and merge images and video frames to avoid Gpu VRam limitation\n* Gaussian filtering after upscale to avoid tiles and merging defects in images\n* New upscale factor x3\n\nUI\n\n* A new vertical left bar, now is much cleaner and uniform\n* All buttons now have same dimension\n* App title changed color and the background has been removed\n* Upscale/Stop buttons are bigger\n* Other general improvements\n\nBugfix/improvement\n\n* Removed unused functions\n* General code cleaning and improvements", "upvote_ratio": 1.0, "id": "t3_u76rf5", "created_utc": 1650379305.0} +{"sub": "Python", "title": "I made a football simulation/game entirely using Python Turtle Graphics", "selftext": "# Overview:\n\nAbout 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:\n\n&#x200B;\n\n[Working Of Simulation\\/Game](https://reddit.com/link/u75ydj/video/awyg0ye3thu81/player)\n\n[Python Football Simulation In Turtle](https://www.youtube.com/watch?v=7rRYpX5-9RI) (Alternative Link Youtube)\n\nYou 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.\n\n# Source Code:\n\n[Project Source Code Here](https://github.com/JackhammerYT/Football-Simulation)\n\n# Controls:\n\nw(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)\n\n# Challenges:\n\nEven 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", "upvote_ratio": 0.79, "id": "t3_u75ydj", "created_utc": 1650377093.0} +{"sub": "Python", "title": "I was today years old when I found out that Python supports else clauses in try/excepts.", "selftext": "Their functionality is brilliant, too! I always used to use guard values and flags to find out if an exception happened.\n\nTotally surprised (and embarrassed), but IMO this is one of the reasons why writing in Python feels so nice.\n\nContext: 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.", "upvote_ratio": 0.94, "id": "t3_u75y3m", "created_utc": 1650377073.0} +{"sub": "Python", "title": "I wrote a Spotify alternative in Python", "selftext": "[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.\n\n\nYou don't need an account to use Myuzi, and there are no payments or ads.\n\n\nThis is a prototype, so things will break a lot.\n\n\n[AUR](https://aur.archlinux.org/packages/myuzi) | [Source](https://gitlab.com/zehkira/myuzi) | [Donations](https://www.patreon.com/bePatron?u=65739770)", "upvote_ratio": 0.87, "id": "t3_u7446h", "created_utc": 1650371709.0} +{"sub": "Python", "title": "What are some of the main reasons I should switch to pytest from unittest?", "selftext": "", "upvote_ratio": 0.92, "id": "t3_u73xv2", "created_utc": 1650371161.0} +{"sub": "Python", "title": "Build a Web App with Pandas", "selftext": "", "upvote_ratio": 0.71, "id": "t3_u725g8", "created_utc": 1650364948.0} +{"sub": "Python", "title": "How To Install Kivy On macOS Monterey", "selftext": "", "upvote_ratio": 0.25, "id": "t3_u71x6r", "created_utc": 1650364046.0} +{"sub": "Python", "title": "Auto ML in Python \u2014 An Overview of the MLBox Package", "selftext": "", "upvote_ratio": 0.5, "id": "t3_u70gk9", "created_utc": 1650358000.0} +{"sub": "Python", "title": "Dynamic Logging for logging.Logger", "selftext": "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.\n\n ```\n import dynamic_logger\n import logging\n logging.setLoggerClass(dynamic_logger.Logger)\n \n # Set-up log formatter with user-definied attributes\n fmt = '[%(asctime)s] <%(app)s> [%(levelname)s] <%(id)s> <%(customer_id)s> --- %(message)s' # Note: format attributes in <> are user-definited\n \n # Load config\n logging.basicConfig(format=fmt, datefmt='%d-%b-%y %H:%M:%S', level='INFO')\n \n applogger = logging.getLogger(__name__)\n \n @applogger.log_extras('id',int=0,customer_id='obj.customer_id') # Log value of 'id' and 'obj.customer_id'\n def example_1(id=0,id2=0,obj=None):\n applogger.info('This example shows how to log values from function arguments')\n \n if __name__ = \"__main__\":\n example_1(id=123456,obj={\"customer_id\":777})\n ```\n\nWill give below log entry\n\n [2022-04-19 12:53:51,658] [INFO] <123456> <customer_id:777> --- This example shows how to log values from function arguments\n\nMore examples and code can be found [here](https://github.com/ajatkj/dynamic_logger).\n\nI hope this is useful for someone.", "upvote_ratio": 0.71, "id": "t3_u70a80", "created_utc": 1650357206.0} +{"sub": "Python", "title": "I developed a template for starting new Python projects! Features: Poetry, GitHub CI/CD, MkDocs, publishing to PyPi/Artifactory, Pytest, Tox, black and isort.", "selftext": "", "upvote_ratio": 0.94, "id": "t3_u7081n", "created_utc": 1650356962.0} +{"sub": "Python", "title": "Python Lambda Function in Simple Words", "selftext": "How to Use Lambda Function? \nDifference Between Lambda and Def Function? \nWhat are the benefits of the Lambda Function? \n\n\nThe most important things you should know about the Lambda/Anonymous Function in Python by many examples. \n\n\nTake a look at [my story](https://medium.com/p/e05171925c98) and leave comments!", "upvote_ratio": 0.58, "id": "t3_u6zh3e", "created_utc": 1650353719.0} +{"sub": "Python", "title": "Beginning a brand new set of ML foundations series starting with Pandas", "selftext": "Beginning a Hey all, \n\nI 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. \n\nPandas is the first topic, promise to post one video every weekday. Please view and let me know your suggestions.\n\nLink : [Pandas for Data Science](https://www.youtube.com/watch?v=t4yBm9agYWo&list=PLFAYD0dt5xCxdKfIR3ZX3k07qrqEjUZSO&index=2&t=1s)", "upvote_ratio": 0.8, "id": "t3_u6yugv", "created_utc": 1650351107.0} +{"sub": "Python", "title": "Python Selenium Tutorial #9 - How to bypass/solve hCaptcha using 2captcha API", "selftext": "", "upvote_ratio": 0.75, "id": "t3_u6yo7z", "created_utc": 1650350404.0} +{"sub": "Python", "title": "Are you a person who loves reinventing a wheel ?", "selftext": "Just wondering, are you a person who loves remaking the most popular python library ?\n\nWhen 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.\" .", "upvote_ratio": 0.73, "id": "t3_u6u7i6", "created_utc": 1650334907.0} +{"sub": "Python", "title": "From 30 to 11 Lines of Code: Revisiting Rock Paper Scissors in Python", "selftext": "", "upvote_ratio": 0.56, "id": "t3_u6t9yb", "created_utc": 1650332091.0} +{"sub": "Python", "title": "Is your company still letting you use Pycharm?", "selftext": "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?", "upvote_ratio": 0.77, "id": "t3_u6t4hn", "created_utc": 1650331639.0} +{"sub": "Python", "title": "Tuesday Daily Thread: Advanced questions", "selftext": "Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.\n\n**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.**\n\nThis 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.", "upvote_ratio": 0.86, "id": "t3_u6rcpp", "created_utc": 1650326409.0} +{"sub": "Python", "title": "Indeed Job Scraper", "selftext": "What's happening in the job market?\n\nI published a new python script that pulls new jobs from an indeed advanced query and stores to a datasource. \n\nThe attributes for each job include the posting title, description, pay, and url.\n\nI 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!\n\nhttps://github.com/hazondata/webscraping", "upvote_ratio": 0.63, "id": "t3_u6r6xy", "created_utc": 1650325935.0} +{"sub": "Python", "title": "DRF application for Authentication Using metamask", "selftext": "Hey Guys, \nSo 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.\n\nI 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. \nAlso 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)", "upvote_ratio": 0.68, "id": "t3_u6nv18", "created_utc": 1650316814.0} +{"sub": "Python", "title": "Build a Twitter Bot with Python, Tweepy and the Twitter API", "selftext": "", "upvote_ratio": 0.5, "id": "t3_u6mmt6", "created_utc": 1650313555.0} +{"sub": "Python", "title": "Program Raspberry Pi Pico with Python https://medium.com/@needablackcoffee/program-raspberry-pi-pico-with-python-6a410192dd07", "selftext": "", "upvote_ratio": 0.3, "id": "t3_u6lo7q", "created_utc": 1650311084.0} +{"sub": "Python", "title": "Masonite Permission - Masonite Framework.", "selftext": "To all the Masonite Framework developers/engineers, the ACL package that I created is now production ready. Give it a try, and feedback.\n\n[https://github.com/yubarajshrestha/masonite-permission](https://github.com/yubarajshrestha/masonite-permission)", "upvote_ratio": 0.5, "id": "t3_u6kxwt", "created_utc": 1650309124.0} +{"sub": "Python", "title": "Python implementation of recursive insertion sort.", "selftext": "", "upvote_ratio": 0.76, "id": "t3_u6khdk", "created_utc": 1650307932.0} +{"sub": "Python", "title": "Top down Minecraft.. clone? Written in python and pygame.", "selftext": "[https://youtu.be/-riH-R-1EfY](https://youtu.be/-riH-R-1EfY)\n\nIgnore my terrible voice.\n\nGithub: [https://github.com/Electro-Corp/top-down-minecraft-ripoff](https://github.com/Electro-Corp/top-down-minecraft-ripoff)", "upvote_ratio": 0.33, "id": "t3_u6ib28", "created_utc": 1650302268.0} +{"sub": "Python", "title": "User login system with JWT and FastAPI", "selftext": "In this series so far, we have set up our environment and created a user. \n\nNow 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. \n\nRead 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/)", "upvote_ratio": 0.68, "id": "t3_u6gvm7", "created_utc": 1650298419.0} +{"sub": "Python", "title": "Are there any task queue libraries with the ergonomics of FastAPI", "selftext": "## django is to FastAPI as celery is to `???`\n\nWe 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.\n\nOh and I know about background tasks, this needs to be a distributed task queue with separate agents.\n\nIs there a task queue library out there with:\n\n- static types, full coverage ideally\n- Depends() style dependency injection, or similar\n- async native\n\nI've looked at RQ/ARQ and they are close to what I want but not quite.\n\nAlternatively, 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.\n\nThanks!", "upvote_ratio": 0.64, "id": "t3_u6g9bf", "created_utc": 1650296839.0} +{"sub": "Python", "title": "Which IDE do you use?", "selftext": "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.", "upvote_ratio": 0.64, "id": "t3_u6g4jk", "created_utc": 1650296486.0} +{"sub": "Python", "title": "Python Tips and Tricks \u2014 Write Better Python Code", "selftext": "", "upvote_ratio": 0.5, "id": "t3_u6fzb2", "created_utc": 1650296100.0} +{"sub": "Python", "title": "PyQt hello world", "selftext": "", "upvote_ratio": 0.43, "id": "t3_u6fiqo", "created_utc": 1650294880.0} +{"sub": "Python", "title": "What is the usual tech stacks paths for Python developers going into the world?", "selftext": "I have a year left in Uni and I really like Python so I'd like to be prepared properly.", "upvote_ratio": 0.6, "id": "t3_u6egcg", "created_utc": 1650292090.0} +{"sub": "Python", "title": "If you could start your Python journey over with what you know know what practices would you force your past self to implement?", "selftext": "This could also apply to programming in general or even best practices for communicating code to non technical team members/management.", "upvote_ratio": 0.85, "id": "t3_u6c6p8", "created_utc": 1650285569.0} +{"sub": "Python", "title": "Why do people still pay and use matlab having python numpy and matplotlib?", "selftext": "", "upvote_ratio": 0.94, "id": "t3_u6bcgc", "created_utc": 1650282874.0} +{"sub": "Python", "title": "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.", "selftext": "", "upvote_ratio": 0.67, "id": "t3_u6adlb", "created_utc": 1650279439.0} +{"sub": "Python", "title": "Ping With Python", "selftext": "", "upvote_ratio": 0.55, "id": "t3_u68m93", "created_utc": 1650272377.0} +{"sub": "Python", "title": "3d Game Engine in Python", "selftext": "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", "upvote_ratio": 0.92, "id": "t3_u6695b", "created_utc": 1650262365.0} +{"sub": "Python", "title": "Why are some static type-checking functionalities implemented as identity functions?", "selftext": "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\u2019t this override/cast be in a comment of some sort?", "upvote_ratio": 0.76, "id": "t3_u64dfw", "created_utc": 1650255058.0} +{"sub": "Python", "title": "Monday Daily Thread: Project ideas!", "selftext": "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.", "upvote_ratio": 0.87, "id": "t3_u5zpzh", "created_utc": 1650240011.0} +{"sub": "Python", "title": "I wrote a program to play Minecraft in your Windows command line / Linux console", "selftext": "Video demonstration: https://youtu.be/P1d04is-wQQ\nSource code: https://github.com/louis-e/cli-screenview", "upvote_ratio": 0.93, "id": "t3_u5ykrh", "created_utc": 1650236464.0} +{"sub": "Python", "title": "Type safe Django app, Part 3", "selftext": "", "upvote_ratio": 0.7, "id": "t3_u5xql9", "created_utc": 1650233988.0} +{"sub": "Python", "title": "r/Place Data Visualization w/ Python + Blender (open source project)", "selftext": "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).\n\n[Python Logo \\(r\\/Place 2022\\)](https://preview.redd.it/bm0m1c1vv5u81.jpg?width=1920&format=pjpg&auto=webp&s=c813de013e50fe3fa91cd954478cc3fdff25cb66)\n\n[Blender Logo \\(r\\/Place 2022\\)](https://preview.redd.it/l7w8d9wet5u81.jpg?width=800&format=pjpg&auto=webp&s=45fc8f698e489d0c2b2b8bd8f9c1cf3d8d1420a9)\n\n[Whatever this is \\(r\\/Place 2022\\)...](https://preview.redd.it/fmbxz1xms5u81.png?width=3840&format=png&auto=webp&s=f721632bb9e10af682fdbb01b8ca2f64403afa30)\n\n[Start of r\\/Place 2022](https://preview.redd.it/f7ckdpshs5u81.png?width=3840&format=png&auto=webp&s=9654241197449ccb064a01d32a4d69d93aba53bb)\n\n[\\\\\"Darth Plagueis the Wise \\(r\\/Place 2017\\)\\\\\"](https://preview.redd.it/ete7b05vr5u81.png?width=1920&format=png&auto=webp&s=6fc618bf43ce3cb1476a58620c7bcb92063a38c4)\n\n[Rainbows \\(r\\/Place 2017\\)](https://preview.redd.it/tiz5v32ts5u81.png?width=1920&format=png&auto=webp&s=b07375a5843038d3bed97040688aaa9e52003599)\n\n[Green Lattice \\(r\\/Place 2017\\)](https://preview.redd.it/9jrmj6c6t5u81.png?width=1920&format=png&auto=webp&s=282051e36bd9bbddc2d83dc97656100cdc4c2743)\n\n[r-place.blend open in Blender](https://preview.redd.it/101fu8vzv5u81.jpg?width=1921&format=pjpg&auto=webp&s=c3bfd90fc93d3a69ca88de3ffbf5d2080a9ed607)\n\nI'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.\n\nI 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.\n\nLet me know if you need help or notice any mistakes. I'm super excited to see what other people can do with this!", "upvote_ratio": 0.82, "id": "t3_u5xfgt", "created_utc": 1650233080.0} +{"sub": "Python", "title": "Quickly create online forms for your python scripts", "selftext": "", "upvote_ratio": 0.63, "id": "t3_u5x46b", "created_utc": 1650232184.0} +{"sub": "Python", "title": "Relational Algebra interpreter powered by Python", "selftext": "I made a RA interpreter in Python, [Pireal](https://github.com/centaurialpha/pireal).\n\nSmall 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.\n\nToday 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.", "upvote_ratio": 0.64, "id": "t3_u5w63g", "created_utc": 1650229365.0} +{"sub": "Python", "title": "Mean population of US States with graph", "selftext": " import random\n import numpy\n from statistics import mode\n import matplotlib.pyplot as plt\n import csv\n import collections\n \n ##dictionary of States and populations\n from numpy import ndarray\n \n #states_info_dic = {\n # \"California\": 39538223,\n # \"Texas\": 29145505,\n # \"Florida\": 21538187,\n # \"New York\": 20201249,\n # \"Pennsylvania\": 13002700,\n # \"Illinois\": 12812508,\n # \"Ohio\":\t11799448,\n # \"Georgia\": 10711908,\n # \"North Carolina\": 10439388,\n ## \"Michigan\": 10077331,\n # \"New Jersey\":8882190,\n # \"Virginia\":\t8535519,\n # \"Washington\":7614893,\n # \"Arizona\":\t7278717,\n # \"Massachusetts\":6949503,\n # \"Tennessee\":6833174,\n # \"Indiana\":\t6732219,\n # \"Missouri\":\t6137428,\n # \"Maryland\":\t6045680,\n # \"Wisconsin\":5822434\n #}\n \n states_info_dic = {\n \"Cal\": 39538223,\n \"Tex\": 29145505,\n \"Flo\": 21538187,\n \"NY\": 20201249,\n \"Pen\": 13002700,\n \"Ill\": 12812508,\n \"Ohio\":\t11799448,\n \"Geo\": 10711908,\n \"NC\": 10439388,\n \"Mich\": 10077331,\n \"NJ\":8882190,\n \"Vir\":\t8535519,\n \"Was\":7614893,\n \"Ari\":\t7278717,\n \"Mass\":6949503,\n \"Ten\":6833174,\n \"Ind\":\t6732219,\n \"Miss\":\t6137428,\n \"Mary\":\t6045680,\n \"Wis\":5822434\n }\n \n \n ##print values of states\n population = list(states_info_dic.values())\n \n print(population)\n \n ##round population\n round_up_list =[]\n for num in population:\n round_up_int=num/1000000\n round_up_list.append(round(round_up_int))\n \n #Mean, median and mode of list\n mean1=numpy.mean(population)\n median1=numpy.median(population)\n mode1=mode(round_up_list)\n \n print(f\"The mean of the population is {mean1}\")\n print(f\"The median of the population is {median1}\")\n print(f\"The mode of the population is {mode1}\")\n \n \n \n \n \n \n print(round_up_list)\n \n ##Grpah population information\n # x-coordinates of left sides of bars\n left = states_info_dic.keys()\n \n # heights of bars\n height = states_info_dic.values()\n \n \n # plotting a bar chart\n plt.bar(left, height, width=0.8, color=['green'])\n \n # naming the x-axis\n plt.xlabel('States')\n # naming the y-axis\n plt.ylabel('Populations')\n # plot title\n plt.title('U.S States populations')\n \n # function to show the plot\n plt.show()", "upvote_ratio": 0.33, "id": "t3_u5v91y", "created_utc": 1650226634.0} +{"sub": "Python", "title": "Weekly Algorithm Project: Middle Square Method", "selftext": "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. \n\n\nTesting 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. \n\n\nFull documentation can be found here if anyone is interested. For GitHub, it is under KNOWNALGO/W03. \n\n\n[https://youtu.be/O53ihWtoEGk](https://youtu.be/O53ihWtoEGk) \n\n\n[https://github.com/F35H/WeeklyCode](https://github.com/F35H/WeeklyCode) \n\n\nAny 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. \n\n\nMight as well link it here, here are the two papers: \n\n\n[https://arxiv.org/pdf/1704.00358.pdf](https://arxiv.org/pdf/1704.00358.pdf) \n\n\n[https://arxiv.org/pdf/2004.06278.pdf](https://arxiv.org/pdf/2004.06278.pdf)", "upvote_ratio": 0.61, "id": "t3_u5twnz", "created_utc": 1650222631.0} +{"sub": "Python", "title": "Simple android game with online functionality", "selftext": "Hi everyone!\n\nTopics covered in this project are:\n\n* game made using the Kivy Python module\n* compiling with buildozer (and spec file) to get an .aab file\n* using the 'kv' language\n* using Kivy to switch between screens, display graphs, etc.\n* online functionality (e.g. leaderboard) using firebase\n* firebase rules\n* app splash screen\n\n&#x200B;\n\nshowcase video: [https://youtu.be/PFNS4bGSocQ](https://youtu.be/PFNS4bGSocQ)\n\ngithub: [https://github.com/Contraposite/PrimeFactorization](https://github.com/Contraposite/PrimeFactorization)\n\nbuildozer method I followed: [Creating an AAB for python apps using Buildozer (github.com)](https://gist.github.com/Guhan-SenSam/35c5ed7da254a7c0141e6a8b6101eb33)\n\nplay store listing: [Prime Factorizer Game - Apps on Google Play](https://play.google.com/store/apps/details?id=com.jf.primefactorizer)\n\nThis 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.\n\nThere 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.\n\nThe 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.\n\nMost 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.\n\nThere are two glitches that I ran into with Kivy:\n\n* 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).\n* 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.\n\nI 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.", "upvote_ratio": 0.76, "id": "t3_u5tqje", "created_utc": 1650222127.0} +{"sub": "Python", "title": "Use python to optimize the rebar lost in construction.", "selftext": "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. \n[https://drive.google.com/file/d/1vxJXX8jmEoumwA08x8UtVyBCjSDpyldu/view?usp=sharing](https://drive.google.com/file/d/1vxJXX8jmEoumwA08x8UtVyBCjSDpyldu/view?usp=sharing)\n\nhttps://preview.redd.it/tm23n32zp4u81.png?width=450&format=png&auto=webp&s=252b11688408922e06d0192bc52f2a415319124f", "upvote_ratio": 0.93, "id": "t3_u5sisg", "created_utc": 1650218540.0} +{"sub": "Python", "title": "Gupshup - Chat in the terminal", "selftext": "Gupshup is a terminal-based application inspired by discord!\n\ngithub: [https://github.com/kraanzu/gupshup/](https://github.com/kraanzu/gupshup/)", "upvote_ratio": 0.81, "id": "t3_u5q6jl", "created_utc": 1650211690.0} +{"sub": "Python", "title": "Funny bot I made", "selftext": "[https://youtu.be/XrYadm3y\\_e4](https://youtu.be/XrYadm3y_e4)", "upvote_ratio": 0.36, "id": "t3_u5pjy6", "created_utc": 1650209914.0} +{"sub": "Python", "title": "Writing Better Django Queries", "selftext": "A blog that explains how to write better Django Queries by both performance and Memory wise.\n\n[https://delliganesh.dev/tech/the-one-with-better-django-queries/](https://delliganesh.dev/tech/the-one-with-better-django-queries/)", "upvote_ratio": 0.47, "id": "t3_u5o1aq", "created_utc": 1650205312.0} +{"sub": "Python", "title": "PySGI, the library for creating web servers", "selftext": "Still under development, the PySGI library can manage HTTP routes, requests and responses simply and quickly. Help me by giving this repository a star!\n\n[PySGI GitHub ](https://github.com/jaedsonpys/pysgi)", "upvote_ratio": 0.6, "id": "t3_u5npcy", "created_utc": 1650204250.0} +{"sub": "Python", "title": "How to create an image out of text using Python and Glide OpenAI library ? [tutorial]", "selftext": " \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&#x200B;\n\n\\#python #opencv #Glide #OpenAI", "upvote_ratio": 0.77, "id": "t3_u5n88a", "created_utc": 1650202661.0} +{"sub": "Python", "title": "Python Script EXE detected as virus in VT", "selftext": "Hey Everybody, \n\n\nI'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. \n\n\nI have tried to solve it with nukita, several guides I found but nothing worked. \n\n\nAnyone has any advice?", "upvote_ratio": 0.75, "id": "t3_u5m3x5", "created_utc": 1650198722.0} +{"sub": "Python", "title": "Toolchain recommendations for a production-quality monorepo?", "selftext": "Hi,\n\nI\u2019m not exactly a newcomer to Python, but I\u2019ve 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.\n\nBuild 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?\n\nTypechecker: Which do people use? A balance of speed, thoroughness of warnings and integration into editors/build systems seems like the driving factors here.\n\nDependency 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?\n\nDocumentation: 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?\n\nAny other tools that make a big difference in refactoring and shifting errors to the left?\n\nThanks!", "upvote_ratio": 0.84, "id": "t3_u5kkxh", "created_utc": 1650192403.0} +{"sub": "Python", "title": "Stack Game made in pygame", "selftext": "GitHub - [https://github.com/Vaibhav521/Pygame/tree/main/stack](https://github.com/Vaibhav521/Pygame/tree/main/stack)\n\nin-game footage \n\n&#x200B;\n\n[stack game](https://reddit.com/link/u5ilqk/video/fzhstiy6t1u81/player)", "upvote_ratio": 0.57, "id": "t3_u5ilqk", "created_utc": 1650183508.0} +{"sub": "Python", "title": "Python Cybersecurity\u2014 Network Tracking using Wireshark and Google Maps", "selftext": "", "upvote_ratio": 0.6, "id": "t3_u5ibzu", "created_utc": 1650182335.0} +{"sub": "Python", "title": "Windows 11 design on Python", "selftext": "Hello. This is my project to styling Win32 applications on Python. I try to make the application look in Fluent design with Mica.\n\nIf someone is interested, you can join or just look. \ud83d\ude0a\n\n[witalihirsch/QTWin11: QT Theme for Win32 apps on Windows 11 (github.com)](https://github.com/witalihirsch/QTWin11)\n\n[Example](https://preview.redd.it/q9tcxjjgz0u81.jpg?width=1078&format=pjpg&auto=webp&s=060b7e0390e85cf641b6b4c8141eb61dbf4f3d15)\n\nhttps://preview.redd.it/qgd7ykywc1u81.jpg?width=346&format=pjpg&auto=webp&s=0057bb4e4d4da836fdfe1384894b7f039bef5e89\n\nhttps://preview.redd.it/cw3qmuywc1u81.jpg?width=344&format=pjpg&auto=webp&s=1e324ad9ac28484d38be37a154e8ae997a685f69\n\nhttps://preview.redd.it/z8rkcwywc1u81.jpg?width=345&format=pjpg&auto=webp&s=84f73edc619d65c26998b44051bcfd0e0b630889\n\nhttps://preview.redd.it/1hwt01zwc1u81.jpg?width=345&format=pjpg&auto=webp&s=2a0e0dcbf7ece6a400eb6d784fc5e11cba0b98b5\n\nhttps://preview.redd.it/fldjh6zwc1u81.jpg?width=186&format=pjpg&auto=webp&s=35ffbee447fb622c0d3a75e22872bdf6a34c6232", "upvote_ratio": 0.97, "id": "t3_u5gcj7", "created_utc": 1650173660.0} +{"sub": "Python", "title": "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 ?", "selftext": "", "upvote_ratio": 0.41, "id": "t3_u5fqtp", "created_utc": 1650171251.0} +{"sub": "Python", "title": "Edge detection project", "selftext": "I'm in grade 12 and planning on doing a project on something edge detection related. What can I do somewhat unique?", "upvote_ratio": 0.75, "id": "t3_u5dr4w", "created_utc": 1650164059.0} +{"sub": "Python", "title": "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++?", "selftext": "", "upvote_ratio": 0.94, "id": "t3_u5c9et", "created_utc": 1650158940.0} +{"sub": "Python", "title": "Sunday Daily Thread: What's everyone working on this week?", "selftext": "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.", "upvote_ratio": 0.92, "id": "t3_u5amsg", "created_utc": 1650153610.0} +{"sub": "Python", "title": "Arrowdantic 0.1.0 released", "selftext": "Hi,\n\nI am announcing the release of [arrowdantic](https://pypi.org/project/arrowdantic/):\n\nArrowdantic is a small Python library backed by a\n[mature Rust implementation](https://github.com/jorgecarleitao/arrow2) of Apache Arrow that can interoperate with\n* [Parquet](https://parquet.apache.org/)\n* [Apache Arrow](https://arrow.apache.org/) and \n* [ODBC](https://en.wikipedia.org/wiki/Open_Database_Connectivity) (databases).\n\nIt has a similar performance and higher safety (e.g. no segfaults) than pyarrow.\n\nIt supports reading from and writing to ODBC compliant databases at\nlikely similar performance as [`turbodbc`](https://turbodbc.readthedocs.io/en/latest/) and it does not require conda to install.\n\nThis package is particularly suitable for environments such as AWS Lambda - it takes 13M of disk space, compared to 82M taken by pyarrow.\n\n## Features\n\n* declare and access Arrow-backed arrays (integers, floats, boolean, string, binary)\n* read from and write to Apache Arrow IPC file\n* read from and write to Apache Parquet\n* read from and write to ODBC-compliant databases (e.g. postgres, mongoDB)\n\nIt is not intended for OLAP type of queries (Pandas, Polars and many others serve this purpose better).\n\nThere 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.\n\nLooking forward for feedback!", "upvote_ratio": 0.84, "id": "t3_u58xni", "created_utc": 1650148309.0} +{"sub": "Python", "title": "Slowpoke: A tool to convert Spotify and Youtube songs to slow and reverb", "selftext": "[https://github.com/newpolygons/SlowPoke](https://github.com/newpolygons/SlowPoke)\n\nLittle tool I worked on this weekend. Hope you guys like it. Currently setup to allow you to control the speed of the song.", "upvote_ratio": 0.78, "id": "t3_u58rf6", "created_utc": 1650147774.0} +{"sub": "Python", "title": "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\u2019m looking at this too soon and something else suppose to go along with it?", "selftext": "", "upvote_ratio": 0.62, "id": "t3_u57opq", "created_utc": 1650144578.0} +{"sub": "Python", "title": "Space Science: Asteroid spectra meet Autoencoders", "selftext": "Hey Pythonistas,\n\nIn 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, ...).\n\nClassifying 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).\n\nBut 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.\n\nSo... 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:\n\n\\- Creating an Autoencoder to reconstruct asteroid spectra\n\n\\- Displaying and inspecting the latent space of these spectra\n\n\\- Applying some clustering algorithm on the latent space to determine a data science based number of potential asteroid classes\n\nStarting with the Autoencoder part I'd like to share my most recent tutorial:\n\n[YouTube Link](https://www.youtube.com/watch?v=UsiY28qjBK8&list=PLNvIBWkEdZ2gagAcgm44cplgSvQ_Cmvbv&index=13)\n\n[GitHub Link](https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/11_dl_autoencoder_reconstruction.ipynb)\n\nI 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 :).\n\nCheers,\n\nThomas", "upvote_ratio": 0.73, "id": "t3_u57cdr", "created_utc": 1650143542.0} +{"sub": "Python", "title": "What are your useful packages to help scraping (besides requests, beautifulsoup etc)?", "selftext": "What are your go-to packages to include in python scraping scripts?\n\nBesides the basics (requests/urlib(2), beautifulsoup/lxml, selenium, scrapy). What are the packages you include in your scripts?\n\nFor me it's:\n\n* click\n* requests-cache\n* retry/backoff\n* fake-useragent", "upvote_ratio": 0.8, "id": "t3_u578lt", "created_utc": 1650143213.0} +{"sub": "Python", "title": "Shipping command line programs with a python package", "selftext": "I already know this inherently sounds like a bad idea, but I'd love some genuine, constructive technical advice on the following scenario.\n\nI 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.\n\nThe 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.\n\n**Can I get feedback on this approach:**\n\n\\-pip install the python package\n\n\\-the python package already has a command line entry point so the user would type something like\n\n <package_name> setup externals\n\nWhich 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.\n\n\\-Then python would use it via subprocess.\n\n**For me the negatives I see are:**\n\n\\-Having to write handling code for the setup script to fail gracefully.\n\n\\-Possibly having to host the already installed binaries on a fileshare somewhere so URL changes and version changes don't break the installer\n\n\\-Having an extra step if someone else clones the repo, pip installs the requirements, they have one more step before they can recreate.\n\n**Positives are:**\n\n\\-AzCopy is way faster than the python sdk and doesn't have to upload objects one at a time.\n\n\\-I can extend this to use RClone eventually to make it cloud storage agnostic, and have it work with S3 as well\n\n&#x200B;\n\nHas anyone ever done anything like this? Am I being oblivious to any major issues here?", "upvote_ratio": 0.5, "id": "t3_u53wpo", "created_utc": 1650133545.0} +{"sub": "Python", "title": "Do you think AI/machine learning is a very important field to get into for future relevance?", "selftext": "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?\n\nPerhaps 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.\n\nSo, good to get onboard now.\n\nI 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.\n\nNot only yes but interested to hear what fields it will be relevant in? All?\n\nEDIT: 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.", "upvote_ratio": 0.69, "id": "t3_u51zk3", "created_utc": 1650128123.0} +{"sub": "Python", "title": "CLI macro for Windows", "selftext": "Hey everyone, I built a cli program for windows that can open files,websites, create temporary python enviroments. This is kind of my first full scale project that really eases my workflow.I would love to get suggestions on this program. :)\n\n[https://github.com/Sidharth-S/do](https://github.com/Sidharth-S/do)", "upvote_ratio": 0.7, "id": "t3_u51ud3", "created_utc": 1650127715.0} +{"sub": "Python", "title": "Python Virtual Environments: A Primer", "selftext": "", "upvote_ratio": 0.96, "id": "t3_u51l5b", "created_utc": 1650126979.0} +{"sub": "Python", "title": "A lightweight way to profile Python Code non-intrusively", "selftext": "Latency:\n\n[https://github.com/oracle-samples/hiq/blob/henry\\_dev/hiq/examples/paddle/demo.ipynb](https://github.com/oracle-samples/hiq/blob/henry_dev/hiq/examples/paddle/demo.ipynb)\n\nMemory:\n\n[https://github.com/oracle-samples/hiq/blob/main/hiq/examples/paddle/demo\\_memory.ipynb](https://github.com/oracle-samples/hiq/blob/main/hiq/examples/paddle/demo_memory.ipynb)\n\n&#x200B;\n\n[Latency Graph](https://preview.redd.it/qgc7upex3xt81.png?width=512&format=png&auto=webp&s=87a0a0cbf34e2ee4fd560d5c0768179ec5d95d76)\n\n&#x200B;\n\nMore details at: [https://github.com/oracle-samples/hiq](https://github.com/oracle-samples/hiq)", "upvote_ratio": 0.59, "id": "t3_u51h29", "created_utc": 1650126645.0} +{"sub": "Python", "title": "How to make annoy any interviewer with the fizzbuzz challenge", "selftext": "I was bored so I decided to solve the fizzbuzz in an obnoxious way. Hope you enjoy (:\n\n`output = [\"fizzbuzz\", \"buzz\", \"fizz\"]` \n`iterList = lambda x: [x%i for i in [15, 5, 3]]` \n`fizzBuzz = [output[iterList(x).index(0)] if 0 in iterList(x) else x for x in range(1, 101)]` \n`print(fizzBuzz)`\n\n`[1, 2, 'fizz', 4, 'buzz', 'fizz', 7, 8, 'fizz', 'buzz', 11, 'fizz', 13, 14, 'fizzbuzz', 16, 17, 'fizz', 19, 'buzz', 'fizz', 22, 23, 'fizz', 'buzz', 26, 'fizz', 28, 29, 'fizzbuzz', 31, 32, 'fizz', 34, 'buzz', 'fizz', 37, 38, 'fizz', 'buzz', 41, 'fizz', 43, 44, 'fizzbuzz', 46, 47, 'fizz', 49, 'buzz', 'fizz', 52, 53, 'fizz', 'buzz', 56, 'fizz', 58, 59, 'fizzbuzz', 61, 62, 'fizz', 64, 'buzz', 'fizz', 67, 68, 'fizz', 'buzz', 71, 'fizz', 73, 74, 'fizzbuzz', 76, 77, 'fizz', 79, 'buzz', 'fizz', 82, 83, 'fizz', 'buzz', 86, 'fizz', 88, 89, 'fizzbuzz', 91, 92, 'fizz', 94, 'buzz', 'fizz', 97, 98, 'fizz', 'buzz']`\n\nEdit: yes I know the title is messed", "upvote_ratio": 0.64, "id": "t3_u4zs3s", "created_utc": 1650121763.0} +{"sub": "Python", "title": "Live flame graph rendering in the terminal", "selftext": "Austin TUI 1.2.0 has just been released, with the new live flame graph mode.\n\n[https://github.com/P403n1x87/austin-tui](https://github.com/P403n1x87/austin-tui)\n\nThis is what it looks like in VS Code. The graph can be paused and files opened directly in the editor with a Ctrl + Click on the path for further inspection. The VS Code extension is also available for more insight into performance\n\n[https://marketplace.visualstudio.com/items?itemName=p403n1x87.austin-vscode](https://marketplace.visualstudio.com/items?itemName=p403n1x87.austin-vscode)\n\nhttps://i.redd.it/5kh8pn811wt81.gif", "upvote_ratio": 0.72, "id": "t3_u4x741", "created_utc": 1650113643.0} +{"sub": "Python", "title": "\"Safe\" way to install Python 3 on MBA M1", "selftext": "Hi. I just want to ask if there's something like a \"safe\" way to install Python 3 on Macbook Air m1. I'm learning Python right now, and MBA has Python 2.7 something version.", "upvote_ratio": 0.82, "id": "t3_u4uji2", "created_utc": 1650103050.0} +{"sub": "Python", "title": "Recover deleted and overwritten files with RecoverPy 1.5.0", "selftext": "&#x200B;\n\nhttps://i.redd.it/qg7rwesb1vt81.gif\n\nHi! I recently release RecoverPy v1.5.0 and I think I might give you some news.\n\n**-> Repo:** [https://github.com/PabloLec/RecoverPy](https://github.com/PabloLec/RecoverPy) \n\n\n# What is it?\n\nRecoverPy is a 100% Python tool to not only recover deleted but also overwritten files. \nI got the idea when I was quite new to some programming best practices, especially version control... \n\n\nLong story short, I accidentally piped my output into my precious script... Just spent the day working on something and instead of typing myscript > log, I typed log > myscript, oh boy what a feeling.\n\nI knew some tools to recover deleted files, but my problem was quite different, I didn't deleted the file (in system words, marked the file blocks as deleted/available), I just replaced it's content. Talk about an impostor syndrome.\n\nAfter a long ride in the abysses of unix stackexchange, I found some dark combination of grep and dd command to search directly in your raw system partitions blocks and eventually recovered my file! But as the process was really slow and painful, I thought it might be a good idea to make a tool out of it. That's how RecoverPy was born. \n\n\n# 1.5.0\n\nSince then, the tool has had quite some success. Especially in the hacker community (wasn't the initial intent but still). It even appeared in hakin9 magazine.\n\nLast releases have been quite stable, lastly I mostly added QoL updates and better binary file search handling.\n\nFeel free to have a look and tell me what you think of it! It's my biggest personal project and I'm beginning to be quite proud of my baby :)", "upvote_ratio": 0.93, "id": "t3_u4u8mb", "created_utc": 1650101676.0} +{"sub": "Python", "title": "Python Web Frameworks", "selftext": "", "upvote_ratio": 0.29, "id": "t3_u4u85t", "created_utc": 1650101619.0} +{"sub": "Python", "title": "Python for complete begginers Medium", "selftext": "I wrote this cool article about python for complete begginers about 2 months ago and I thought I'd share it. In this article you will learn about:\n1) what coding is , what python is\n2) The advantages of python\n3) How to download and install python\n4) What an ide is\n5) Maths in python\n6) Variables\n\nHere is the link : https://4rkal.medium.com/python-for-beginners-f1df170bcc08", "upvote_ratio": 0.33, "id": "t3_u4tsp2", "created_utc": 1650099636.0} +{"sub": "Python", "title": "GitHub - AlexEidt/ASCII-Video: Blazing fast ASCII Image/Video Renderer.", "selftext": "", "upvote_ratio": 0.95, "id": "t3_u4rpyc", "created_utc": 1650090494.0} +{"sub": "Python", "title": "Run python (and sql) with dbt", "selftext": "", "upvote_ratio": 0.84, "id": "t3_u4mwco", "created_utc": 1650072702.0} +{"sub": "Python", "title": "Saturday Daily Thread: Resource Request and Sharing! Daily Thread", "selftext": "Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?\n\nUse this thread to chat about and share Python resources!", "upvote_ratio": 0.79, "id": "t3_u4l9am", "created_utc": 1650067210.0} +{"sub": "Python", "title": "i created my own music player in Python3", "selftext": "i always wanted an offline music player that was low on ram, and functioned properly, and for the love of god i could not find one so i created mine.\n\ni would be glad if you tested it, here's the github link:\n\n[https://github.com/AvivHamagniv69/music-player](https://github.com/AvivHamagniv69/music-player)", "upvote_ratio": 0.83, "id": "t3_u4l7re", "created_utc": 1650067079.0} +{"sub": "Python", "title": "How to build a disease prediction service", "selftext": "", "upvote_ratio": 0.86, "id": "t3_u4jf15", "created_utc": 1650061429.0} +{"sub": "Python", "title": "TL;DR: Dictionary Comprehension + Early\\Late Binding of Lambdas in Python is Mental", "selftext": "Hello,\n\nI found a behaviour I couldn't explain when using lambdas in a dictionary comprehension so I decided to post a little Intermediate Showcase to inform you about my struggles and give you a solution, in the end (no spoilers)\n\nI like to minify python code in my spare time to relax and it often takes some iterations for each different function or class, alongside those iterations I was golfing a function in a progress bar script I wrote a very long time ago, this is the brief description of what the function should have done: `The function has to take a list of n elements and color them green, yellow or red according to a given condition.`\n\nThis was the last *functioning* function in the process of being golfed:\n\n def paint(total, done, elements):\n \n color_str = lambda x, y: f'{x}{y}\\033[00m'\n \n colors = {'r' : lambda x: color_str('\\033[91m',x),\n 'g' : lambda x: color_str('\\033[92m',x),\n 'y': lambda x: color_str('\\033[93m',x)\n }['g' if total == done else 'y' if total/2 <= done else 'r']\n \n return [*map(colors,elements)]\n\nI thought, that's easy, this has to be equivalent to this golfed function:\n\n def paint(total, done, elements):\n return [*map({'rgy'[i]:lambda x:f'\\033[9{i+1}m{x}\\033[00m' for i in range(len('rgy'))\n }['g' if total == done else 'y' if done <= total/2 else 'r'],elements)]\n\n*Until it's not*, in fact, while the first function outputs a correct response, the last one is **somehow** stuck on the color yellow, so I thought the dictionary comprehension wasn't working properly and thus I tried:\n\n dict_comp = {'rgy'[i]:lambda x:f'\\033[9{i+1}m{x}\\033[00m' for i in range(len('rgy'))}\n print(dict_comp)\n\nThis prompted what I thought it would prompt, a dictionary with `r`,`g` and `y` as keys and a list of lambdas in different memory locations `{'r': <function <dictcomp>.<lambda> at 0x0000018D3E986200>, 'g': <function <dictcomp>.<lambda> at 0x0000018D3E9860E0>, 'y': <function <dictcomp>.<lambda> at 0x0000018D3E986050>}` so I tried to print all the key and lambda pairs with a test for each lambda:\n\n for key, lmbd in dict_comp.items():\n print(key, lmbd(f'Testing {key}'))\n\nThis was the output:\n\n[Horrific Minion-Colored Results](https://preview.redd.it/o216rv5pjrt81.png?width=139&format=png&auto=webp&s=eb4882d1c3114792c06656ac59204a08f297a790)\n\nI decided to remove the slash to check the text value of the lambda and the correct progression of `i` and this why I noticed the problem: each lambda stored the last value of `i`!\n\n dict_comp = {'rgy'[i]:lambda x:f'033[9{i+1}m{x}\\033[00m' for i in range(len('rgy'))}\n for key, lmbd in dict_comp.items():\n print(key, lmbd(f'Testing {key}'))\n \n >> r 033[93mTesting r # the value after the square bracket is 93 (it's supposed to be 91)\n >> g 033[93mTesting g # the value after the square bracket is 93 (it's supposed to be 92)\n >> y 033[93mTesting y # the value after the square bracket is 93\n\nHere's the whole code in order to try both functions:\n\n from time import sleep\n \n def paint(total, done, elements):\n \n color_str = lambda x, y: f'{x}{y}\\033[00m'\n \n colors = {'r' : lambda x: color_str('\\033[91m',x),\n 'g' : lambda x: color_str('\\033[92m',x),\n 'y': lambda x: color_str('\\033[93m',x)\n }['g' if total == done else 'y' if total/2 <= done else 'r']\n \n return [*map(colors,elements)]\n \n \n # UNCOMMENT THIS IN ORDER TO TEST THE FUNCTION DOWN BELOW\n \"\"\"\n def paint(total, done, elements):\n return [*map({'rgy'[i]:lambda x:f'\\033[9{i+1}m{x}\\033[00m' for i in range(len('rgy'))\n }['g' if total == done else 'y' if done <= total/2 else 'r'],elements)]\n \"\"\"\n \n def CustomProgressBar(task, completeness) -> None:\n size = 100 // 5\n empty = size - completeness//5\n fill = size - empty\n \n percent = f'{completeness:>3}% '\n \n filler = f'{\"\u2550\"*fill}'\n isComplete = fill==size\n \n progress_bar, percent = paint(size,fill, [filler, percent])\n progress_bar+=f'{\"\u2500\"*empty}'\n \n print(f'\\r{task:<25}{percent}{progress_bar}',\n end='\\n' if isComplete else '')\n \n \n \n for i in range(101):\n sleep(0.05)\n CustomProgressBar('Range 0-100', i)\n\nI then asked myself:\n\n>Why does this happen? Isn't each anonymous function different?\n\nAfter some scavenger hunt in StackOverFlow (thanks you Stack for the duplicate question tootip) I found out that the issue might be in [late binding in functions and lambdas in particular](https://stackoverflow.com/questions/3431676/creating-functions-in-a-loop), so the answer, apparently, is that even if the functions are stored in a different memory location as part of the dictionary, the lambda function captures the ***NAME*** of the variable, not the ***VALUE*** of the variable and assigns the value after the dict comprehension is called, so each value becomes the last value in the loop, as the friendliest guy on StackOverFlow explains [here](https://stackoverflow.com/questions/70862614/how-does-python-dict-comprehension-work-with-lambda-functions-inside).\n\nAnd so, the solution was there, after several hours of head scratches and articles about early and late bind and (anonymous) functions in loop variables inside loops, I had to tie (or late-bind, if you will) the value name of the variable in the lambda function to the value of the variable in the loop.\n\nThis means I had to create another value in the lambda and that the value HAS to be the last in the lambda function because it will be created as a keyword argument and lambdas respect the rule of \\*args first, \\*\\*kwargs last.\n\nSo, the solution was finally here:\n\n def paint(total, done, elements):\n return [*map({'rgy'[i]:lambda x, y=i+1:f'\\033[9{y}m{x}\\033[00m'for i in range(len('rgy'))}['g' if total == done else 'y' if done >= total/2 else 'r'],elements)]\n\nIf you have any question, you find this interesting, you have any feedback, you want to talk about Python or you just want to send me death threats because I wrote a long-ass post about lambdas and how they work in loops, HMU or comment down below.\n\nHave fun, and happy easter:\n\n[Easter Bunny](https://preview.redd.it/c2qo8krnmrt81.png?width=564&format=png&auto=webp&s=354dfac6c9adada4c4e5a57d531b073aa4967968)", "upvote_ratio": 0.73, "id": "t3_u4j0jn", "created_utc": 1650060242.0} +{"sub": "Python", "title": "Learn Python from Scratch to Advance with Detailed Hands-on", "selftext": "", "upvote_ratio": 0.38, "id": "t3_u4hgpj", "created_utc": 1650055769.0} +{"sub": "Python", "title": "Archimedes Spiral: Converting old-school BASIC to Python", "selftext": "A little bit retro, a little bit Python. This is pretty much a direct conversion of the BASIC code to Python. Perhaps you can make it even better!\n\nhttps://goto10.substack.com/p/archimedes-spiral\n\nhttps://i.imgur.com/eHdCPrK.jpg", "upvote_ratio": 0.87, "id": "t3_u4h485", "created_utc": 1650054739.0} +{"sub": "Python", "title": "Creating an HTTPS Lambda Endpoint without API Gateway", "selftext": "", "upvote_ratio": 0.57, "id": "t3_u4gkfx", "created_utc": 1650053153.0} +{"sub": "Python", "title": "Python module for Notion", "selftext": " \n\nNotionpy is a python module that helps you integrate notion with your programme\\\\workflow utilizing notion's API, the module helps you create, retrieve and update pages or databases with ease\n\nSomeone will ask \"what is the difference between this module and the other plenty of modules out there !?\", as far as I have seen searching the web, this is the most versatile, user-friendly one\n\nyou can start using it by typing in your terminal :\n\n pip install auto-py-notion \n\nGithub repo :\n\n[https://github.com/kareemmahlees/NotionPy.git](https://github.com/kareemmahlees/NotionPy.git)\n\nNote :\n\nthis module is still basic stage with fairly simple functionality, so all your suggestions, issues, and contributions are very welcome", "upvote_ratio": 0.6, "id": "t3_u4da5o", "created_utc": 1650044005.0} +{"sub": "Python", "title": "How to build a RSS from scraping using Python", "selftext": "", "upvote_ratio": 0.94, "id": "t3_u4d17u", "created_utc": 1650043321.0} +{"sub": "Python", "title": "Python, Flask, Elasticsearch - front controller and API documentation - Part 3 Tutorial", "selftext": "Hi, the 3d article devoted to the theme: \u201cHow to work with ElasticSearch, Python and Flask\u201d already ready for reading. Here will speak about package dependencies we are going to use, some project structure aspects, controller, REST API, flask\\_apispec package and response/request models. All details are here: [\"Symfony, elasticsearch - front controller and api documentation\"](https://sergiiblog.com/python-flask-elasticsearch-front-controller-and-api-documentation/). Have a pleasant reading.", "upvote_ratio": 0.4, "id": "t3_u4aplz", "created_utc": 1650036900.0} +{"sub": "Python", "title": "Geometry Calculation", "selftext": "", "upvote_ratio": 0.25, "id": "t3_u4a3sa", "created_utc": 1650035177.0} +{"sub": "Python", "title": "How To Build Your Own Crypto News Aggregator [Streamlit]", "selftext": "", "upvote_ratio": 0.23, "id": "t3_u49yxj", "created_utc": 1650034812.0} +{"sub": "Python", "title": "A simple email app", "selftext": "I made a simple email app in python\n\n [gocrazygh/emailapp: A simple email app in python (github.com)](https://github.com/gocrazygh/emailapp)", "upvote_ratio": 0.6, "id": "t3_u48ux2", "created_utc": 1650031662.0} +{"sub": "Python", "title": "Fun project to notify my boss if I\u2019m at my desk or not each morning.", "selftext": "I made a script that utilizes opencv to help me identify if I\u2019m at my desk or not and then let my boss know. Made a fun video on how it turned out. \n\n[Video](https://youtu.be/AV7qLsYnOWY)", "upvote_ratio": 0.92, "id": "t3_u48iqw", "created_utc": 1650030683.0} +{"sub": "Python", "title": "Running Python in the Browser with WebAssembly", "selftext": "", "upvote_ratio": 0.72, "id": "t3_u47p54", "created_utc": 1650028107.0} +{"sub": "Python", "title": "2 Use Cases of Python Pre-commit Hooks to Tidy Up Your Git Repositories", "selftext": "", "upvote_ratio": 0.64, "id": "t3_u47kk6", "created_utc": 1650027739.0} +{"sub": "Python", "title": "Like httpie? Might need to like it again...", "selftext": "A great Python project, [HTTPie](https://github.com/httpie/httpie) recently lost all of its Github stars due to an easy-to-make mistake. [Read more at their blog](https://httpie.io/blog/stardust).\n\nI enjoy [HTTPie](https://github.com/httpie/httpie) as a cURL-like command line tool for interacting with APIs and other web resources. A very clever UI, and a good example of using [rich](https://rich.readthedocs.io/) and [requests](https://docs.python-requests.org/).\n\nYou may want to consider helping them restore or even increase their online community, sadly lost due to this error. You can star and/or watch the repo at https://github.com/httpie/httpie", "upvote_ratio": 0.96, "id": "t3_u46vhe", "created_utc": 1650025435.0} +{"sub": "Python", "title": "Firedm repos no longer exist.", "selftext": "FireDM is a python open source (Internet Download Manager) with multi-connections, high speed engine, it downloads general files and videos from youtube and tons of other streaming websites .\n\nYesterday I tried to go to the GitHub page to download the latest release but the repo returns a 404 which means it does not exist. The pypi package still exists and here's the link:\n\nhttps://pypi.org/project/FireDM/\n\nThe project page clearly shows that the repository is inaccessible.No forks of it even exist on Github. I can't seem to find any news or complaints anywhere on the internet about this so I was wondering is there some announcement I missed?\nAnd to my last question, is there a way we can save the project through pypi and create forks of it?\n\nEdit : my package manager still has a copy(Manjaro and AUR)", "upvote_ratio": 0.92, "id": "t3_u44t8y", "created_utc": 1650017535.0} +{"sub": "Python", "title": "Vitrix - An open source FPS video game coded in Python!", "selftext": "Vitrix is a fully open source video game coded in Python! It makes use of Ursina Engine and TKinter for its GUIs and has with prebuilt releases that come bundled with a Python binary and all necessary libraries preinstalled!\n\nEven though Vitrix is still in the early stages of its development, it is still perfectly playable and has actively maintained code and a wiki. Me being the developer, I'm not very good with any of the arts, so anybody who can contribute textures, models or sounds is much appreciated. Vitrix still has much development to go, so anybody who helps will be welcomed.\n\n&#x200B;\n\nWant to see one of your ideas in Vitrix someday?\n\nRecommend me ideas: [https://github.com/ShadityZ/Vitrix/discussions/24](https://github.com/ShadityZ/Vitrix/discussions/24)\n\nApply to become a developer: [https://github.com/ShadityZ/Vitrix/discussions/26](https://github.com/ShadityZ/Vitrix/discussions/26)\n\n&#x200B;\n\nYou can find the Vitrix github repository here: [https://github.com/ShadityZ/Vitrix](https://github.com/ShadityZ/Vitrix)\n\nHere at some images:\n\n[https://user-images.githubusercontent.com/543577/163570397-c4736068-199e-4527-a998-e18309e9c49c.png](https://user-images.githubusercontent.com/543577/163570397-c4736068-199e-4527-a998-e18309e9c49c.png)\n\n[https://imgur.com/a/PLKDG4L](https://imgur.com/a/PLKDG4L)\n\n&#x200B;\n\nContributions open, ShadityZ", "upvote_ratio": 0.9, "id": "t3_u43oxi", "created_utc": 1650012550.0} +{"sub": "Python", "title": "Python custom formatting", "selftext": "", "upvote_ratio": 0.83, "id": "t3_u43mf5", "created_utc": 1650012218.0} +{"sub": "Python", "title": "Good GUI builder for Python similar to Java\u2019s Eclipse Windowbuilder", "selftext": "Hi guys! I\u2019m a Java developer migrating to Python, and I\u2019m trying to find a good GUI builder that is similar to Java\u2019s Eclipse windowbuilder. I have tried PyQy5 and it\u2019s Qt Designer which is very good and very close to windowbuilder in terms of interface, but the only problem is that the Qt Designer doesn\u2019t work dynamically with the IDE like the windowbuilder: all Qt Designer\u2019s ui file need to be translated manually to py file and then modified. This is really bad for efficiency since everything added and modified in the Qt Designer need to be saved and translated again and manually copied from the new py file to the main py file, and all objects\u2019 code\u2019s locations need to be manually located (Unlike in windowbuider where you double click the object in the builder and you will be automatically redirected to the related code) \nSince Python is such a popular language and so many people use it to develop complicated GUI softwares, I guess there has to be a GUI builder that is more efficient and similar to Java\u2019s windowbuilder", "upvote_ratio": 0.78, "id": "t3_u40lpu", "created_utc": 1649999500.0} +{"sub": "Python", "title": "Airflow 2.3.0 - Dynamic Tasks", "selftext": "Coming Soon in Airflow 2.3.0 - First-class support for \"Dynamic Tasks\". This is feature is called \"Dynamic Task Mapping\"\n\nThe wait for the most requested feature of Apache Airflow is almost over !! \n\nNo longer hacking over creating dynamic tasks, with Dynamic Task Mapping, Airflow will allow users to create a number of tasks at runtime based upon current data, rather than having to know in advance how many tasks would be needed.\n\nhttps://twitter.com/kaxil/status/1514745136680419335?s=21&t=suoW11Re4Ew2cooN4FbhEw", "upvote_ratio": 0.73, "id": "t3_u3vzb1", "created_utc": 1649983938.0} +{"sub": "Python", "title": "Collection(s) of counter-intuitive Python behaviour", "selftext": "This is kind of a shot in the blue: Some time ago I found a (GitHub?) repo that collected unexpected/surprising Python behaviour. Ofc this depends on ones knowledge but it is stuff that is counter-intuitive if you don't know it or the internals.\n\nThe first example was [internal caching of -5...256](https://www.reddit.com/r/Python/comments/18leav/python_integer_range_5_256_and_identity_comparison/) and all the consequences of that (ids, is), \u2026\n\nIf you don't know that particular repo, do you know similar behaviour? I found this [Python oddities talk](https://treyhunner.com/python-oddities/) but that wasn't it.\n\nSecondary question: What would be a good source for this (edit: finding oddities/inconsistencies)? I enjoyed to learn what's new by reading the release notes <3. I found looking/searching through [bugs.python.org](https://bugs.python.org/) quite interesting, because you can follow a discussion about aspectes of the language properties/behaviour, same idea why I skimmed PEPs and their discussion.\n\nHowever, there is always something one does not know and I want to learn all of that. For that reason I am keeping a file in which I document parts of the language that I am not that used to, and then I mostly play around with `ptpython` and try stuff which I try to use later on if it seems like a good fit.\n\nI guess well fitting flairs are discussion, help, resource, \u2026 but since I can't really decide I am choosing help. after all I want help to find a resource which could provide material for a discussion.", "upvote_ratio": 0.77, "id": "t3_u3vd2g", "created_utc": 1649981969.0} +{"sub": "Python", "title": "Friday Daily Thread: Free chat Friday! Daily Thread", "selftext": "Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted!", "upvote_ratio": 0.57, "id": "t3_u3uzei", "created_utc": 1649980810.0} +{"sub": "Python", "title": "Non developer code review", "selftext": " Hello, I am not a developer and barely work with software for my job but have been self taught ever since reading \"Automate the boring stuff with python\" four years ago. One of the biggest issues that I run into by being self taught and not working with software is I am never really certain if I am doing things correctly or if there are better ways. I have found a bunch of people on fiver to do code reviews but as I don't have a complete project, I'm not sure if that is the best path to take for a code review. For the most part I believe I am past the point of having to following tutorials, but not far enough to really make a full project from start to finish. To summaries my questions:\n\n1. What are the best places/communities for non developer code review?\n2. What are the best places/ways to learn how to construct a project from start to finish?\n\nHere is my github to assess my level of knowledge (FYI not much lol)\n\n[https://github.com/daedalus23/Configuration](https://github.com/daedalus23/Configuration)", "upvote_ratio": 0.67, "id": "t3_u3u8om", "created_utc": 1649978547.0} +{"sub": "Python", "title": "For those familiar with SpeechRecognition module, does it collect user data?", "selftext": "I have a question, and it may be dumb but I haven't been able to find an answer online, but does the SpeechRecognition module, specifically CMU Sphinx or Google Speech Recognition collect user data? \n\n\nI am a fan of having privacy and try to leave as minimal of a digital footprint when possible and have been wondering since I started using SpeechRecognition about the data collection. I'd like to avoid having to deploy my own NLP, TTS, and STT models if I can to achieve privacy for the project I am working on that involves this stuff.", "upvote_ratio": 0.6, "id": "t3_u3tp8v", "created_utc": 1649976942.0} +{"sub": "Python", "title": "Version 2.1.1 of YFrake library just released!", "selftext": "I'm happy to let you guys know that the YFrake library now implements caching, speeding up consecutive identical requests to the same endpoints even more! If you are into fintech and use stock market data from Yahoo Finance, give YFrake a try! \nIt's easy to use, it's way faster than yfinance, has more data endpoints, is thoroughly tested, is fully documented and can even run as a server to forward data to other applications!\n\nYou can check it out on GitHub at: [https://github.com/aspenforest/yfrake](https://github.com/aspenforest/yfrake) \nThe docs are available on: [https://yfrake.readthedocs.io/](https://yfrake.readthedocs.io/)", "upvote_ratio": 0.6, "id": "t3_u3taxa", "created_utc": 1649975777.0} +{"sub": "Python", "title": "Ready-Made Mobile App UI for Serverless Python", "selftext": "I made a tool for myself to wrap Python code in a mobile app (chat interface) so that I can let my non-technical friends try any programs I write. Curious if you guys would be interested too. \n\nI like coding in Python, but I didn't like how my non-technical friends and family couldn't try my python apps. So I made a lightweight frontend for iOS and Android using Flutter and a lightweight web app to fill in a serverless Python function. \n\nThis is how it works:\n\n1. User uses the mobile app to send a message. Optionally with an attachment, like an image. This message is sent to serverless function as a JSON object. \n2. Serverless function starter code is just print(msg) and return empty\\_message. But when I want to write an app, I do some operations on msg, and return a JSON in a certain schema. \n3. Mobile app gets the JSON back from serverless, and I render it to user according to the JSON schema. \n\nI thought I'd try a bunch of consumer app ideas, but I actually ended up mostly making a bunch of other tools for myself. Like when I send a hard-coded message like \"redis flushall\", I make the backend flush redis cache for another app that I made. \n\nI'm not really utilizing my own tool well, so I'm curious whether anyone here would be interested in using it to make some consumer tools. I can't publicly open it, cuz I made it for myself and there's no robust authentication to prevent people from running spam code on the serverless infra. But I'd love to send link and placeholder auth to some people if you are interested and leave a comment! (Would love to know what kind of apps you'd build!). \n\nIf a lot of people are interested, I'll work on protecting it behind some auth, or let people pay for their own compute cost (for example, log in to their AWS; and automatically set up a VM to run the python code you write using my web IDE)!", "upvote_ratio": 0.5, "id": "t3_u3s8ji", "created_utc": 1649972674.0} +{"sub": "Python", "title": "Run Multiple Functions in Parallel in Python3", "selftext": "", "upvote_ratio": 0.3, "id": "t3_u3rxoa", "created_utc": 1649971834.0} +{"sub": "Python", "title": "I'm organizing a hackathon!", "selftext": "Someone interested in build something next weekend?\n\n\\-> workby.io/hackathon", "upvote_ratio": 0.29, "id": "t3_u3r7bu", "created_utc": 1649969801.0} +{"sub": "Python", "title": "Financial portfolio optimization for scikit-learn enthusiasts", "selftext": "Scikit-portfolio is a Python package designed to introduce **data scientists and machine learning engineers** to the problem of **optimal portfolio allocation in finance**. The main idea of scikit-portfolio is to provide many well-known portfolio optimization methods with an easily accessible **scikit-learn inspired** set of API.\n\nYou can optimize your portfolio starting from a pandas Dataframe with the prices or returns and simply compute the MinVol vanilla portfolio to get the optimal weights as:\n\n`MinimumVolatility().fit(prices).weights_`\n\nWhen your portfolio optimization method depends on a number of hyperparameters you can simply perform a `GridSearchCV` as in machine-learning algorithms, and present the grid of hyperparameters, which for most methods are already encoded in the class.\n\n```\nprices_train, prices_test = train_test_split(prices, test_size=0.3, shuffle=False)\nptf_model = MaxSharpe()\nbest_model = GridSearchCV(\n estimator=ptf_model,\n param_grid=ptf_model.grid_parameters(),\n cv=KFold(5),\n scoring=sharpe_ratio_scorer\n).fit(prices_train)\n```\n\nIt implements Omega Ratio and MAD efficient frontier as well as a number of portfolio hyperparameters search methods for the optimization in backtesting settings, using the same methods as in classical machine-learning model selection method.\n\nAdditionally, I've implemented ensemble portfolios, like the **Michaud Resampled Efficient Frontier** that builds an optimal portfolio based on the average of many efficient frontiers based on random perturbations of the expected returns.\nWe not only support the classical MeanVariance efficient frontier, but many kind of efficient frontiers, with different definitions of risk and satisfaction.\n\nThis is for example how you build an ensemble of estimators of the maximum Sharpe ratio portfolio:\n```\nprices = load_tech_stock_prices()\n# create a Maximum sharpe ratio portfolio estimator to be fed to resampled frontier meta-estimator\nptf = MaxSharpe(\n returns_data=False,\n risk_free_rate=0.0,\n frequency=252,\n rets_estimator=MeanHistoricalLinearReturns()\n)\nensemble = MichaudResampledFrontier(\n ptf_estimator=ptf,\n rets_estimator=MeanHistoricalLinearReturns(), \n risk_estimator=SampleCovariance(),\n n_iter=512,\n n_jobs=-1\n).fit(prices)\n```\n\n**Documentation**\n[https://scikit-portfolio.github.io/scikit-portfolio/](https://scikit-portfolio.github.io/scikit-portfolio/)\n\n**Source code**\n[https://github.com/scikit-portfolio/scikit-portfolio](https://github.com/scikit-portfolio/scikit-portfolio)\n\nThe project requires some help in the documentation, while it is already pretty stable in the API and bugfix.\n\n\n![mad_frontier](https://scikit-portfolio.github.io/scikit-portfolio/imgs/mad_efficient_frontier.svg)", "upvote_ratio": 0.67, "id": "t3_u3qq2x", "created_utc": 1649968463.0} +{"sub": "Python", "title": "Parts of the Standard Library that are considered to be bad practice / un-Pythonic ?", "selftext": "I had an argument today about the using the `_empty` object from the `inspect` module to denote an item not found in a lookup, rather than just returning None (as None could well be a value in our data), or erroring (as too many try/excepts make code more difficult to read, and failing to find something in our system is not actually an error anyway). \n\nAside from the idea of using a private attribute of another module, the other person says it's \"not Pythonic\" to use smaller custom types like this, as it's too close to something like `typedef` in c++ (never mind that Python has `namedtuple` for almost the exact same purpose anyway, but I digress).\n\nI argued that it's a ready-made and easily legible solution to the problem, and regardless, if it's good enough for the standard library then it should be good enough for us. \n\nWhile I think I'm right in this case, I know the last point is a very dogmatic way of looking at things.\n\nIt got me thinking - are there any notable parts of the language's standard modules, that would be considered a poor or incorrect use of the language if you were to use them in production?", "upvote_ratio": 0.92, "id": "t3_u3p62s", "created_utc": 1649964161.0} +{"sub": "Python", "title": "GUI, CLI and library for remote controlling Philips Android TVs", "selftext": "Some time ago I was trying to find out if there's a way to programmatically control my TV's Ambilight feature. It turns out Philips Android-powered TVs have a pretty extensive API and there's no decent library or program to make use of it! I found this state of affairs unacceptable and decided to be the change I want to see in the world. Then I proceeded to create a library, CLI, and finally GUI utilizing this API:\n\n* [PhilipsTV GUI](https://github.com/bcyran/philipstv-gui) \\- a GUI, obviously\n* [philipstv](https://github.com/bcyran/philipstv) \\- CLI and a lib\n\nThe features include emulating pressing TV remote keys, listing and changing channels and applications, and of course controlling Ambilight.\n\n[All of PhilipsTV GUI functionality in one image](https://preview.redd.it/vkp8gfnkzit81.png?width=1241&format=png&auto=webp&s=14a40b658da14951ad22c1e59e07ec98074547b4)\n\nIt would be pretty cool if someone found that useful because I spent quite a lot of time on this and actually... I don't even need this.", "upvote_ratio": 0.94, "id": "t3_u3m6ar", "created_utc": 1649955769.0} +{"sub": "Python", "title": "I used a new dataframe library (polars) to wrangle the one of the largest housing price databases. Code in post", "selftext": "", "upvote_ratio": 0.94, "id": "t3_u3m0qp", "created_utc": 1649955374.0} +{"sub": "Python", "title": "A live 45-minutes session on the fundamentals of observability, OpenTelemetry, and distributed tracing with microservices' messaging systems (Kafka, RabbitMQ, etc)", "selftext": "Hi everyone, we're running another live OpenTelemetry and observability fundamentals session - Wednesday, April 20 at 11 AM PDT.\n\nYou will learn how to instrument your message brokers and apps to capture traces with OpenTelemetry.\n\nThis session is at no cost and vendor-neutral.\n\nYou can expect in this session: 45 minutes of core concepts, how to deploy it yourself hands-on + Q&A.\n\nIf you are interested in observability, OpenTelemetry, and tracing - join!\n\nRegister here [https://www.aspecto.io/opentelemetry-fundamentals/messaging-systems/](https://www.aspecto.io/opentelemetry-fundamentals/messaging-systems/?utm_source=post&utm_medium=reddit&utm_campaign=r-python-opentelemetry-fundamentals-messaging-systems)", "upvote_ratio": 0.71, "id": "t3_u3kzsh", "created_utc": 1649952550.0} +{"sub": "Python", "title": "Using Python how to connect to multiple Bluetooth LE devices and transfer data between them.", "selftext": "", "upvote_ratio": 0.59, "id": "t3_u3j2d6", "created_utc": 1649947229.0} +{"sub": "Python", "title": "Running Rich's Inspect in bashrc", "selftext": "I really like [Rich's Inspect method](https://rich.readthedocs.io/en/stable/introduction.html#rich-inspect) such that I want to create a shortcut in my bashrc. I tried thiese and it didn't work.\n\n alias rinspect='python -c \"from rich import inspect; import '$1'; inspect('$1')\"'\n \n alias r2inspect='python -c 'import sys; from rich import inspect; import sys.argv[1]; inspect(sys.argv[1])'\n\nBasically, I want to run it like this:\n\n $ rinspect datetime\n\nWhat am I missing here?", "upvote_ratio": 0.81, "id": "t3_u3imay", "created_utc": 1649945996.0} +{"sub": "Python", "title": "how to handle huge amount of data for a web app ?", "selftext": " \n\nhey guys, i'm working on a project where i'm importing data from google sheets using sheets API weekly, so that each week a new sheet is added to the spreadsheet and then the data is automatically collected in one new sheet to be used as input for my dashboard that i used streamlit to build, i'm planning now to deploy it on heroku, but i came to ci/cd part which i didnt get tbh, and i,m wondering how my app would perform when the data would be larger maybe after 1 year, whaat to do then , is there any solution to handle that big data from the start ?", "upvote_ratio": 0.7, "id": "t3_u3gs01", "created_utc": 1649940505.0} +{"sub": "Python", "title": "mdiff - generating diff with block move detection", "selftext": "[mdiff](https://github.com/m-matelski/mdiff) is a package for comparing and generating diff for input sequences. It can detect sequence elements displacements (i.e. line in text have been moved up or down).\n\n# Sequence Matcher\n\nExample:\n\n from mdiff import HeckelSequenceMatcher\n \n a = ['line1', 'line2', 'line3', 'line4', 'line5']\n b = ['line1', 'line3', 'line2', 'line4', 'line6']\n sm = HeckelSequenceMatcher(a, b)\n opcodes = sm.get_opcodes()\n \n for tag, i1, i2, j1, j2 in opcodes:\n print('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format(tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2]))\n\nOutput:\n\n equal a[0:1] --> b[0:1] ['line1'] --> ['line1']\n move a[1:2] --> b[2:2] ['line2'] --> []\n equal a[2:3] --> b[1:2] ['line3'] --> ['line3']\n moved a[1:1] --> b[2:3] [] --> ['line2']\n equal a[3:4] --> b[3:4] ['line4'] --> ['line4']\n replace a[4:5] --> b[4:5] ['line5'] --> ['line6']\n\n# Text Diff\n\nGenerating diff for input texts with (optional) similar lines changes detection.\n\n from mdiff import diff_lines_with_similarities, CompositeOpCode\n \n a = 'line1\\nline2\\nline3\\nline4\\nline5'\n b = 'line1\\nline3\\nline2\\nline4\\nline6'\n a_lines, b_lines, opcodes = diff_lines_with_similarities(a, b, cutoff=0.75)\n \n # Just printing diff on a line level, and nested diff on a character level for similar lines\n for opcode in opcodes:\n tag, i1, i2, j1, j2 = opcode\n print('{:7} a_lines[{}:{}] --> b_lines[{}:{}] {!r:>10} --> {!r}'.\n format(tag, i1, i2, j1, j2, a_lines[i1:i2], b_lines[j1:j2]))\n if isinstance(opcode, CompositeOpCode) and opcode.children_opcodes:\n for ltag, li1, li2, lj1, lj2 in opcode.children_opcodes:\n print('\\t{:7} a_lines[{}][{}:{}] --> b_lines[{}][{}:{}] {!r:>10} --> {!r}'\n .format(ltag, i1, li1, li2, j1, lj1, lj2, a_lines[i1][li1:li2], b_lines[j1][lj1:lj2]))\n\nOutput:\n\n equal a_lines[0:1] --> b_lines[0:1] ['line1'] --> ['line1']\n move a_lines[1:2] --> b_lines[2:2] ['line2'] --> []\n equal a_lines[2:3] --> b_lines[1:2] ['line3'] --> ['line3']\n moved a_lines[1:1] --> b_lines[2:3] [] --> ['line2']\n equal a_lines[3:4] --> b_lines[3:4] ['line4'] --> ['line4']\n replace a_lines[4:5] --> b_lines[4:5] ['line5'] --> ['line6']\n \tequal a_lines[4][0:4] --> b_lines[4][0:4] 'line' --> 'line'\n \treplace a_lines[4][4:5] --> b_lines[4][4:5] '5' --> '6'\n\n# App\n\n**mdiff** provides simple [CLI tool](https://github.com/m-matelski/mdiff#cli-tool) and [GUI app](https://github.com/m-matelski/mdiff#standalone-gui-application) for comparing files and texts. It can be used for visualising and testing different diff algorithms (also Python built-in difflib.SequenceMatcher).\n\nhttps://preview.redd.it/tu88e3lhrgt81.png?width=1211&format=png&auto=webp&s=45b602c8fed5b89d0dfc1228f889c44a1bca397f", "upvote_ratio": 0.87, "id": "t3_u3glpx", "created_utc": 1649939930.0} +{"sub": "Python", "title": "HackerRank or Leetcode?", "selftext": "In which one do you guys prefer to practice, and why?", "upvote_ratio": 0.85, "id": "t3_u3ghm3", "created_utc": 1649939555.0} +{"sub": "Python", "title": "Running your scheduled Python tasks on Heroku? You can now natively monitor them! \ud83d\udc7e\ud83d\udc7e\ud83d\udc7e", "selftext": "Hi devs!\n\nDo you, like so many others, use one-off dynos to run your scheduled tasks on Heroku?\n\nDo you feel like one-off dynos running in the background are kind of invisible?\n\nHave a look at the [One-off Dyno Metrics Heroku add-on](https://elements.heroku.com/addons/one-off-metrics)!\n\nThis Heroku add-on plots the execution times, throughput, concurrency, and dyno events of your one-off dynos. It also provides threshold alerting, allowing you to monitor important stuff. You will know exactly how your one-off dynos behave, and what is going wrong.\n\nThe add-on is about to become generally available. Last chance to install during the beta and get full access for a month after launch!", "upvote_ratio": 0.8, "id": "t3_u3gaab", "created_utc": 1649938900.0} +{"sub": "Python", "title": "DataSpell 2022.1 Released", "selftext": "", "upvote_ratio": 0.66, "id": "t3_u3d9w5", "created_utc": 1649928154.0} +{"sub": "Python", "title": "Using Python to create large scale SEM campaigns in minutes.", "selftext": " Join our next webinar on Wednesday 20/04/2022 at 12 PM CET. \nOur next guest will be Elias Dabbas, the creator of advertools. He'll share how he's using Python to create large scale SEM campaigns in minutes using advertools.\n\nTopics covered: \n\\- Generating Keywords for SEM Campaigns \n\\- Creating Ads Using Long Descriptive Text \n\\- Creating Ads on a Large Scale\n\n Register here: [https://www.linkedin.com/events/usingpythontocreatelargescalese6918192144046338048/about/](https://www.linkedin.com/events/usingpythontocreatelargescalese6918192144046338048/about/) \n\n[https://github.com/eliasdabbas/advertools](https://github.com/eliasdabbas/advertools)", "upvote_ratio": 0.4, "id": "t3_u39d7x", "created_utc": 1649911596.0} +{"sub": "Python", "title": "Python as a career", "selftext": "I am an Engineer and have a little background in coding using R. \n\nIs it possible I can learn Python to make it a side hustle? \n\nI welcome your advice. Thanks", "upvote_ratio": 0.82, "id": "t3_u379ba", "created_utc": 1649904315.0} +{"sub": "Python", "title": "Thursday Daily Thread: Python Careers, Courses, and Furthering Education!", "selftext": "Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!\n\n**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.**", "upvote_ratio": 0.67, "id": "t3_u343wx", "created_utc": 1649894414.0} +{"sub": "Python", "title": "Learn how to write clean Python code with this free ebook", "selftext": "Hi!\n\nI wrote [Cleaner Python](https://ezzeddin.gumroad.com/l/cleaner-python) with the intention to help developers who are getting started in writing clean code in Python.\n\nI'd love to hear your feedback and please let me know if you have any questions.", "upvote_ratio": 0.58, "id": "t3_u32r51", "created_utc": 1649890439.0} +{"sub": "Python", "title": "Chances of getting a job for smb. learned python at home", "selftext": "Hey folks! I hope it\u2019s the place that I can post this question. Let me give you a brief info about my background. \n\nI\u2019ve studied economics and worked in international sales. After my gf got a job from a Swedish company we decided to move there. We will be there by August if everything went as we want. So I was thinking of learning software to change my career path. \n\nDuring pandemic I learnt SQL but than didn\u2019t develop myself. So now I started with python which I think easier than many languages. But what I am wondering is if I can get a job or not. I know that it depends on what and how much I learnt and etc. but what you guys think or recommend? \n\nHonestly speaking, I think I can get a job as an intern or a junior. Especially after Covid the demand for developers increased rapidly. So I am not pessimistic about this idea. After python I am planning to learn JavaScript too. \n\nAnyway. I am waiting for your answers and valuable feedbacks!", "upvote_ratio": 0.6, "id": "t3_u32l5z", "created_utc": 1649889953.0} +{"sub": "Python", "title": "What are your most wanted quality indicators for Python code?", "selftext": "Dear,\n\nI'm trying to list the good and bad practices regarding Python code to write a document to help the teams to assess progress points.\n\nFor example in good practices:\n\n* Comments\n* Typing\n* Docstrings\n* Sphinx documentation\n* Readable variable names\n* Git\n* CI/CD\n* Unit Tests\n* ...\n\nFor pollutions:\n\n* Deprecated code with no warning\n* Commented code everywhere\n* Full paths\n* ...\n\nI would like to know what are your own pain points and what you like, or hate, when you inherit from someone else code.\n\nThanks", "upvote_ratio": 0.71, "id": "t3_u31bkw", "created_utc": 1649886437.0} +{"sub": "Python", "title": "Alarm-Clock made with Python and Kivy", "selftext": "Hi! I'm here to share with you a little project I developed as a hobby last year: an alarm-clock made with Python and Kivy! I'd appreciate feedbacks :3\n\n[https://github.com/v0di/alarm-clock](https://github.com/v0di/alarm-clock)", "upvote_ratio": 0.84, "id": "t3_u2zz5r", "created_utc": 1649882880.0} +{"sub": "Python", "title": "PyCharm 2022.1 released", "selftext": "", "upvote_ratio": 0.96, "id": "t3_u2vp01", "created_utc": 1649871165.0} +{"sub": "Python", "title": "The fastest tool for querying large JSON files is written in Python! (benchmark)", "selftext": "[spyql](https://github.com/dcmoura/spyql) is a tool (and python lib) for querying and transforming data. It is fully written in Python.\n\nIn the [latest benchmark](https://colab.research.google.com/github/dcmoura/spyql/blob/master/notebooks/json_benchmark.ipynb), spyql outperformed all other tools, including jq, one of the most popular tools written in C.\n\nHere is one example extracted from the benchmark that shows spyql achieving the lowest processing time while keeping memory requirements low when the dataset size is >= 100MB.\n\n&#x200B;\n\n[Processing time and memory requirements vs size of input JSON data](https://preview.redd.it/ejgy2k0gwbt81.png?width=1315&format=png&auto=webp&s=782958571e0a5a7309484011fbc0d7c1c9da5015)\n\nIMO, these results might questions some preconceived opinions about Python\u2019s performance and interpreted languages in general.\n\nThe benchmark is very easy to reproduce without installing any software since it runs on a [google colab notebook](https://colab.research.google.com/github/dcmoura/spyql/blob/master/notebooks/json_benchmark.ipynb).\n\nHappy to hear your thoughts!\n\n**UPDATE 2022/04/22**\n\nThank you all for your feedback. The benchmark was updated and the fastest tool is **NOT** written in Python. Here are the highlights:\n\n* Added ClickHouse (written in C++) to the benchmark: I was unaware that the clickhouse-local tool would handle these tasks. ClickHouse is now the fastest (together with OctoSQL);\n* OctoSQL (written in Go) was updated as a response to the benchmark: updates included switching to fastjson, short-circuiting LIMIT, and eagerly printing when outputting JSON and CSV. Now, OctoSQL is one of the fastest and memory is stable;\n* SPyQL (written in Python) is now third: SPyQL leverages orjson (Rust) to parse JSONs, while the query engine is written in Python. When processing 1GB of input data, SPyQL takes 4x-5x more time than the best, while still achieving up to 2x higher performance than jq (written in C);\n* I removed Pandas from the benchmark and focused on command-line tools. I am planning a separate benchmark on Python libs where Pandas, Polars and Modin (and eventually others) will be included.\n\nThis benchmark is a living document. If you are interested in receiving updates, please subscribe to the following issue: [https://github.com/dcmoura/spyql/issues/72](https://github.com/dcmoura/spyql/issues/72)\n\nThank you!", "upvote_ratio": 0.92, "id": "t3_u2v858", "created_utc": 1649869896.0} +{"sub": "Python", "title": "Ohio State University Researchers Develop SAT2LoD2: An Open-Source Python Tool For 3D Landscape Modelling Using Satelite Imagery", "selftext": "3D landscape modeling has seen a rise in its popularity and applications in recent years. It has countless applications in the fields of civil engineering, earth sciences, military applications, and many others. Geometric 3D models are typically developed using the city geography markup language (CityGML), and the Level-of-Detail (LoD) building model is the preferred model for building 3D models using CityGML.\u00a0\n\nThe use of Satellite imagery for landscape modeling provides the advantage of covering a wide area and is low cost. However, developing LoD2 models using satellite imagery remains a big challenge. Building models in such a way involves complex steps demanding heuristics-based approaches and ML-based detection paradigms.\n\nIn a recent paper, researchers at the Ohio State University propose a [SAT2LoD2 ](https://arxiv.org/pdf/2204.04139v1.pdf)to facilitate the development of 3D landscape models. SAT2LoD2 is an open-source, python-based GUI-enabled software that takes the satellite images as inputs and returns LoD2 building models as outputs. The software also has the feature of taking road networks and custom maps as additional inputs for better results.\n\n[Continue Reading](https://www.marktechpost.com/2022/04/13/ohio-state-university-researchers-develop-sat2lod2-an-open-source-python-tool-for-3d-landscape-modelling-using-satelite-imagery/)\n\nPaper: https://arxiv.org/pdf/2204.04139v1.pdf\n\nGithub: https://github.com/gdaosu/lod2buildingmodel", "upvote_ratio": 1.0, "id": "t3_u2v7m9", "created_utc": 1649869856.0} +{"sub": "Python", "title": "typeforce: Make mypy more effective", "selftext": "\n**Typeforce** is a CLI tool that enriches your Python environment with type annotations, empowering [mypy](https://mypy.readthedocs.io/en/stable/).\n\nIn particular:\n\n+ Generates `py.typed` for annotated packages.\n+ Installs missed stub files and plugins.\n\nhttps://github.com/orsinium-labs/typeforce", "upvote_ratio": 0.81, "id": "t3_u2sbgj", "created_utc": 1649862123.0} +{"sub": "Python", "title": "`nme` - package to simplify data persistence when upgrading data structures", "selftext": "I would like to share my python package `nme`. This package is for simplifying loading data from the older versions of code. It was initially created for [napari](https://napari.org/) plugins for improving science reproducibility, but I think that it may be useful for other projects. \n\nCode is here: https://github.com/Czaki/nme \nDocumentation: https://nme.readthedocs.io/en/latest/?badge=latest\n\nCurrently, it supports `json` and `cbor2` as backends for serialization. \n\nI'm open to any improvement suggestions.", "upvote_ratio": 0.5, "id": "t3_u2s3uy", "created_utc": 1649861576.0} +{"sub": "Python", "title": "Why does the Development Company use the Python web framework?", "selftext": "", "upvote_ratio": 0.11, "id": "t3_u2rvxb", "created_utc": 1649860950.0} +{"sub": "Python", "title": "Minimalist dependency injection in Python", "selftext": "", "upvote_ratio": 1.0, "id": "t3_u2pow9", "created_utc": 1649854549.0} +{"sub": "Python", "title": "I made a video about Cross Validation using python's sklearn package. An extremely important yet often overlooked topic in machine learning.", "selftext": "", "upvote_ratio": 0.38, "id": "t3_u2pmet", "created_utc": 1649854324.0} +{"sub": "Python", "title": "Python 3.11 is Coming! Here\u2019s How It Fares Against Python 3.10", "selftext": "", "upvote_ratio": 0.78, "id": "t3_u2orpk", "created_utc": 1649851479.0} +{"sub": "Python", "title": "Do you have hundreds of old and embarrassing tweets? Here's a script to delete them all.", "selftext": "I made a Python script to delete old tweets. Given a date, it'll delete all the tweets before that date. Personally, I had hundreds of tweets between my friends talking about hot boys in high school that I had forgotten all about but were all so public \ud83e\udd26\ud83c\udffb\u200d\u2640\ufe0f.\n\nGive it a try: [https://github.com/yaylinda/delete-tweets](https://github.com/yaylinda/delete-tweets)\n\nFeel free to make suggestions or improvements!", "upvote_ratio": 0.91, "id": "t3_u2o1al", "created_utc": 1649848859.0} +{"sub": "Python", "title": "Here is a script that turns your pc off when a download is finished", "selftext": "Here is a script that turns off your computer when a game on steam has finished downloading.\n\n import os\n import time\n \n while os.listdir('*insert your own steam downloading folder here*') != []:\n print('Download in progress..')\n time.sleep(5)\n \n print('Folder empty. Downloads complete.')\n os.system(\"shutdown /s /t 1\")", "upvote_ratio": 0.86, "id": "t3_u2ln8f", "created_utc": 1649838771.0} +{"sub": "Python", "title": "Gotchas of early-bound function argument defaults in Python", "selftext": "", "upvote_ratio": 0.72, "id": "t3_u2iknk", "created_utc": 1649825890.0} +{"sub": "Python", "title": "Why do some functions have the arguments outside and some inside? e.g: len(example) vs example.upper() ?", "selftext": "This is the case too in other languages right?", "upvote_ratio": 0.8, "id": "t3_u2gg0a", "created_utc": 1649818670.0} +{"sub": "Python", "title": "A python framework for unstructured data processing", "selftext": "Unstructured data is information that is not arranged according to a predefined schema or data model. Image, text, video, and nested JSON are the most common types of unstructured data we collected in real-world applications.\n\nWe have just released [Towhee 0.6](https://github.com/towhee-io/towhee), a framework for doing ML jobs over unstructured data. Our latest release includes [`DataCollection`](https://towhee.readthedocs.io/en/branch0.6/data_collection/get_started.html), a new user-centric method-chaining API that enables rapid development and prototyping of unstructured data applications.\n\n`DataCollection` is designed to behave as a python list or generator, with some enhancement features such as `method-chaining coding style`, `parallel execution`, and `exception handling`. Here is a short example of image animation:\n\n```python\nimport towhee\n\ntowhee.glob['path']('./test.png') \\\n .image_decode['path', 'origin']() \\\n .img2img_translation.animegan['origin', 'facepaintv2'](model_name = 'facepaintv2') \\\n .img2img_translation.animegan['origin', 'hayao'](model_name = 'hayao') \\\n .img2img_translation.animegan['origin', 'paprika'](model_name = 'paprika') \\\n .img2img_translation.animegan['origin', 'shinkai'](model_name = 'shinkai') \\\n .select['origin', 'facepaintv2', 'hayao', 'paprika', 'shinkai']() \\\n .show()\n```\n\n[`image_decode`](https://towhee.io/image-decode/cv2) and [`img2img_translation.animegan`](https://towhee.io/img2img-translation/animegan) are predefined `operator`s from [towhee hub](https://towhee.io). We already have nearly a hundred operators, officially maintained or contributed by our users.\n\nYou can check the result from [the tutorial](https://github.com/towhee-io/towhee/blob/main/tutorials/anime_style_transformer.ipynb). \n\nDocumentation for DataCollection is available [here](https://towhee.readthedocs.io/en/branch0.6/data_collection/get_started.html). We will be releasing code examples and tutorials using the new API in the upcoming weeks.\n\nWould appreciate some feedback and contribution :)", "upvote_ratio": 0.67, "id": "t3_u2g5ha", "created_utc": 1649817729.0} +{"sub": "Python", "title": "Do people generally write Sphinx API documentation using autoapi or manually?", "selftext": "(this might not be the best subreddit, but I didn't see a Sphinx subreddit, if there's a better place, let me know)\n\nI'm working on writing my first distributable python package and I'm trying to be very meticulous about the documentation, making a readthedocs page for it. I'm very new to using Sphinx, and I'm confused on the landscape of projects that have autogenerated API documentation vs. those that involve manually written documentation. \n\n\nI have been able to get the `autoapi` extension to work, but the documentation it generates feels very boilerplate, and I want to go in and reformat some of the stuff it does, which I think it's possible to essentially \"convert\" a project from auto to manual. So maybe I should autogenerate it at first and then convert it for later changes. I have some concerns about that approach though.\n\n\n1. What if I add more stuff to the API later, or update the way certain functions work? Would I just need to do those small changes by hand? I feel like if I reverted to the autogeneration it would overwrite my manual changes (maybe I'm wrong though).\n\n2. I actually prefer to code at the same time that I am documenting, so that the documentation is not an afterthought, but in that case I would want to do the manual changes at the same time as when I code, so maybe autogeneration is a bad idea for me. But this particular project is collaborative and I think I'm probably the only one in my group who *enjoys* the documentation, so I want to be sure it's super easy for future collaborators.\n\nAny thoughts at all would be greatly appreciated! I seem to be unable to find answers to a general best practices question like this", "upvote_ratio": 0.81, "id": "t3_u2dfzz", "created_utc": 1649809416.0} +{"sub": "Python", "title": "Wednesday Daily Thread: Beginner questions", "selftext": "New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!\n\nThis 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.", "upvote_ratio": 1.0, "id": "t3_u2cz7f", "created_utc": 1649808018.0} +{"sub": "Python", "title": "My first working code piece!", "selftext": "print ('What is the temperature today?')\n\nimport random\n\nTemperature = random.randint(10,40)\n\nprint(Temperature) \n\nprint ('Degrees')\n\n&#x200B;\n\nif Temperature > 24:\n\nprint ('Its a hot day,')\n\nprint ('Make sure to drink some water!')\n\n&#x200B;\n\nif Temperature <24:\n\nprint ('Its not to hot today!')\n\n&#x200B;\n\nif Temperature == 24:\n\nprint ('Its a hot day,')\n\nprint ('Make sure to drink some water!') \n\n\n&#x200B;\n\n&#x200B;\n\nI am happy that it works!", "upvote_ratio": 0.55, "id": "t3_u2ccc8", "created_utc": 1649806110.0} +{"sub": "Python", "title": "Name a better learning resource than Schafer Corey, I'll wait", "selftext": "I am really amazed by Schafer Corey on [YouTube](https://www.youtube.com/c/Coreyms/videos) especially since I am not the the type of guy that enjoys watching videos to learn, I am honestly in awe with his teaching skills and it inspires me to write blogs. I will be very curious to see if you guys have other high quality content.\nI am well aware that you won't become proficient just by watching his videos but his tutorials get straight to the point and you understand the concept and you can build new things!", "upvote_ratio": 0.87, "id": "t3_u2b3r9", "created_utc": 1649802620.0} +{"sub": "Python", "title": "5 months of python, Beginning an AlgoBot, TEAR MY CODE to Shred to make me better.", "selftext": "", "upvote_ratio": 0.87, "id": "t3_u27epy", "created_utc": 1649792143.0} +{"sub": "Python", "title": "python programming quick look", "selftext": "", "upvote_ratio": 0.17, "id": "t3_u25pul", "created_utc": 1649787655.0} +{"sub": "Python", "title": "TIL Dropbox started, client and server, with Python and even hired the creator of Python", "selftext": "", "upvote_ratio": 0.42, "id": "t3_u255tq", "created_utc": 1649786229.0} +{"sub": "Python", "title": "2 Level Security system (Arduino Keypad + Face recognition ) using Python", "selftext": "", "upvote_ratio": 0.91, "id": "t3_u24o2f", "created_utc": 1649784906.0} +{"sub": "Python", "title": "fstring.help: Python f-string guide", "selftext": "", "upvote_ratio": 0.5, "id": "t3_u21wcl", "created_utc": 1649777711.0} +{"sub": "Python", "title": "20 Python Interview Questions To Challenge Your Knowledge", "selftext": "", "upvote_ratio": 0.44, "id": "t3_u218g8", "created_utc": 1649775942.0} +{"sub": "Python", "title": "Announcing Quart-DB", "selftext": "[Quart-DB](https://github.com/pgjones/quart-db) is a Quart extension that provides managed connection(s) to postgresql database(s).\n\nOnce initialised it will, by default, add a connection on `g` for every request usable via `g.connection`. Alternatively connections (and transactions) can be managed directly and explicitly.\n\nThe queries can be constructed using named `:name` parameters or `$1` positional parameters.\n\nQuart-DB uses [asyncpg](https://github.com/MagicStack/asyncpg) to manage the connections and [buildpg](https://github.com/samuelcolvin/buildpg) to parse the named parameter bindings.\n\n from quart import g, Quart, websocket\n from quart_db import QuartDB\n \n app = Quart(__name__)\n db = QuartDB(app, url=\"postgresql://user:pass@localhost:5432/db_name\")\n \n @app.get(\"/<int:id>\")\n async def get_count(id: int):\n result = await g.connection.fetch_val(\n \"SELECT COUNT(*) FROM tbl WHERE id = :id\",\n {\"id\": id},\n )\n return {\"count\": result}\n \n @app.post(\"/\")\n async def set_with_transaction():\n async with g.connection.transaction():\n await db.execute(\"UPDATE tbl SET done = $1\", [True])\n ...\n return {}\n \n @app.get(\"/explicit\")\n async def explicit_usage():\n async with db.connection() as connection:\n ...", "upvote_ratio": 0.85, "id": "t3_u20nde", "created_utc": 1649774365.0} +{"sub": "Python", "title": "I wrote a tutorial on how to use pytest to write good Python code. I hope somebody finds it useful!", "selftext": "[https://github.com/rhayes777/workshop](https://github.com/rhayes777/workshop)", "upvote_ratio": 0.97, "id": "t3_u206vp", "created_utc": 1649773093.0} +{"sub": "Python", "title": "Shades: a module to make art with python", "selftext": "Over the last year or so, I've been developing a python library to make it easier for me to make maths-ey generative art in python.\n\nI shared stuff a while back while I was still developing, and finally got stuff in a state where I'm pretty happy with things, so thought I'd share here just in case any other python fans might like it.\n\n[Here's a link if you're interested!](https://github.com/benrutter/Shades) \n\n\nhttps://preview.redd.it/a9obpj02v3t81.png?width=2000&format=png&auto=webp&s=4cd73bba9cab4e875772a32091c3ef49057372bb", "upvote_ratio": 0.98, "id": "t3_u1zzlq", "created_utc": 1649772545.0} +{"sub": "Python", "title": "Minesweeper but without any play-ability", "selftext": "This is the basic layout of a minesweeper field fished\n\n&#x200B;\n\n import curses\n from curses import wrapper\n from random import randint\n \n \n \n \n field = [\n [\"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\"],\n [\"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\"],\n [\"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\"],\n [\"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\"],\n [\"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\"],\n [\"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\"],\n [\"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\"],\n [\"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\"],\n [\"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\"]\n ]\n \n \n def print_maze(maze, stdscr,):\n BLUE = curses.color_pair(1)\n RED = curses.color_pair(2)\n \n bomb_Location = bomb_location()\n \n for i, row in enumerate(maze):\n for j, value in enumerate(row):\n \n if (i,j) in bomb_Location:\n stdscr.addstr(i,j*2, 'x', RED)\n else:\n \n amount = find_amount_bomb(field,i,j,bomb_Location)\n \n stdscr.addstr(i,j * 2, amount, BLUE)\n \n \n def bomb_location():\n bombLocation = []\n \n for x in range(25):\n bomb_loc = bomb()\n bombLocation.append(bomb_loc)\n return bombLocation\n \n \n def find_amount_bomb(field, row, col, bomb_loc=[]):\n \n \n bombs_nearby = 0\n \n neighbours = find_neigbours(field,row,col)\n \n for neighbour in neighbours:\n if neighbour in bomb_loc:\n bombs_nearby += 1\n \n return str(bombs_nearby)\n \n \n \n def find_neigbours(field,row,col):\n neighbors = []\n \n if row > 0 and col < len(field[0]):\n neighbors.append((row -1, col +1))\n \n if row > 0 and col > 0:\n neighbors.append((row -1, col -1))\n \n if row < len(field) and col < len(field[0]):\n neighbors.append((row +1, col +1))\n \n if row < len(field) and col > 0:\n neighbors.append((row +1, col -1)) \n \n if row > 0: # up\n neighbors.append((row -1, col))\n \n if row < len(field): # down\n neighbors.append((row + 1, col))\n \n if col > 0: # left\n neighbors.append((row, col - 1))\n \n if col < len(field[0]): # right \n neighbors.append((row, col + 1))\n \n return neighbors \n \n \n def bomb():\n i = randint(0,8)\n j = randint(0,8) \n return i,j\n \n \n def main(stdscr):\n curses.init_pair(1, curses.COLOR_CYAN, curses.COLOR_BLACK)\n curses.init_pair(2, curses.COLOR_RED, curses.COLOR_BLACK)\n \n stdscr.clear()\n print_maze(field,stdscr) \n stdscr.refresh() \n \n stdscr.getch()\n \n wrapper(main) \n\nidk if this is intermediate or beginner sorry if it is beginner", "upvote_ratio": 0.5, "id": "t3_u1zxp1", "created_utc": 1649772396.0} +{"sub": "Python", "title": "Python News: What's New From March 2022? \u2013 Real Python", "selftext": "", "upvote_ratio": 0.75, "id": "t3_u1yevy", "created_utc": 1649768051.0} +{"sub": "Python", "title": "Python code guidelines for unified, streamlined development", "selftext": "In Python programming, there are many things that developers have to consider and keep in mind when writing code. Those issues and practices differ from company to company and from team to team. At Evrone, we created our own collection of guidelines for Python, in order to build a common denominator for writing code within the company.\n\n[Read the guidelines here!](https://evrone.com/python-guidelines)", "upvote_ratio": 0.6, "id": "t3_u1xzt3", "created_utc": 1649766739.0} +{"sub": "Python", "title": "In addition to a properly formatted and stylish data presentation, we will also apply other helpful functionality, such as adding data to the database.", "selftext": "[https://medium.com/codex/how-to-add-new-rows-into-relational-tables-effortlessly-f6685a60eef2](https://medium.com/codex/how-to-add-new-rows-into-relational-tables-effortlessly-f6685a60eef2)\n\n&#x200B;\n\nhttps://preview.redd.it/7c47g2x903t81.png?width=875&format=png&auto=webp&s=26f50b234e17feb3a3a269582a59e174016461b3", "upvote_ratio": 0.5, "id": "t3_u1wky9", "created_utc": 1649762014.0} +{"sub": "Python", "title": "Scraping Google Finance Ticker in Python", "selftext": "While programming is kinda easier than a stock market, you can do things programmatically, for example scraping Google Finance Ticker data in Python. \n\nHere's a working example to do exactly that, plus basic usage of Nasdaq API which Google is using, among [other data providers which Google Finance uses that you can find under Google's Disclaimer](https://www.google.com/intl/en_UA/googlefinance/disclaimer/). \n\nA gist to the same code below: https://gist.github.com/dimitryzub/a5e30389e13142b9262f52154cd56092\n\nFull code and [example in the online IDE](https://replit.com/@DimitryZub1/Scrape-Google-Finance-Ticker-Quote-in-Python#main.py):\n\n```python\nimport nasdaqdatalink\nimport requests, json, re\nfrom parsel import Selector\nfrom itertools import zip_longest\n\ndef scrape_google_finance(ticker: str):\n params = {\n \"hl\": \"en\" # language\n }\n\n headers = {\n \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36\",\n }\n\n html = requests.get(f\"https://www.google.com/finance/quote/{ticker}\", params=params, headers=headers, timeout=30)\n selector = Selector(text=html.text)\n \n # where all extracted data will be temporary located\n ticker_data = {\n \"ticker_data\": {},\n \"about_panel\": {},\n \"news\": {\"items\": []},\n \"finance_perfomance\": {\"table\": []}, \n \"people_also_search_for\": {\"items\": []},\n \"interested_in\": {\"items\": []}\n }\n \n # current price, quote, title extraction\n ticker_data[\"ticker_data\"][\"current_price\"] = selector.css(\".AHmHk .fxKbKc::text\").get()\n ticker_data[\"ticker_data\"][\"quote\"] = selector.css(\".PdOqHc::text\").get().replace(\" \u2022 \",\":\")\n ticker_data[\"ticker_data\"][\"title\"] = selector.css(\".zzDege::text\").get()\n \n # about panel extraction\n about_panel_keys = selector.css(\".gyFHrc .mfs7Fc::text\").getall()\n about_panel_values = selector.css(\".gyFHrc .P6K39c\").xpath(\"normalize-space()\").getall()\n \n for key, value in zip_longest(about_panel_keys, about_panel_values):\n key_value = key.lower().replace(\" \", \"_\")\n ticker_data[\"about_panel\"][key_value] = value\n \n # description \"about\" extraction\n ticker_data[\"about_panel\"][\"description\"] = selector.css(\".bLLb2d::text\").get()\n ticker_data[\"about_panel\"][\"extensions\"] = selector.css(\".w2tnNd::text\").getall()\n \n # news extraction\n if selector.css(\".yY3Lee\").get():\n for index, news in enumerate(selector.css(\".yY3Lee\"), start=1):\n ticker_data[\"news\"][\"items\"].append({\n \"position\": index,\n \"title\": news.css(\".Yfwt5::text\").get(),\n \"link\": news.css(\".z4rs2b a::attr(href)\").get(),\n \"source\": news.css(\".sfyJob::text\").get(),\n \"published\": news.css(\".Adak::text\").get(),\n \"thumbnail\": news.css(\"img.Z4idke::attr(src)\").get()\n })\n else: \n ticker_data[\"news\"][\"error\"] = f\"No news result from a {ticker}.\"\n\n # finance perfomance table\n if selector.css(\".slpEwd .roXhBd\").get():\n fin_perf_col_2 = selector.css(\".PFjsMe+ .yNnsfe::text\").get() # e.g. Dec 2021\n fin_perf_col_3 = selector.css(\".PFjsMe~ .yNnsfe+ .yNnsfe::text\").get() # e.g. Year/year change\n \n for fin_perf in selector.css(\".slpEwd .roXhBd\"):\n if fin_perf.css(\".J9Jhg::text , .jU4VAc::text\").get():\n perf_key = fin_perf.css(\".J9Jhg::text , .jU4VAc::text\").get() # e.g. Revenue, Net Income, Operating Income..\n perf_value_col_1 = fin_perf.css(\".QXDnM::text\").get() # 60.3B, 26.40%.. \n perf_value_col_2 = fin_perf.css(\".gEUVJe .JwB6zf::text\").get() # 2.39%, -21.22%..\n \n ticker_data[\"finance_perfomance\"][\"table\"].append({\n perf_key: {\n fin_perf_col_2: perf_value_col_1,\n fin_perf_col_3: perf_value_col_2\n }\n })\n else:\n ticker_data[\"finance_perfomance\"][\"error\"] = f\"No 'finence perfomance table' for {ticker}.\"\n \n # \"you may be interested in\" results\n if selector.css(\".HDXgAf .tOzDHb\").get():\n for index, other_interests in enumerate(selector.css(\".HDXgAf .tOzDHb\"), start=1):\n ticker_data[\"interested_in\"][\"items\"].append(discover_more_tickers(index, other_interests))\n else:\n ticker_data[\"interested_in\"][\"error\"] = f\"No 'you may be interested in` results for {ticker}\"\n \n \n # \"people also search for\" results\n if selector.css(\".HDXgAf+ div .tOzDHb\").get():\n for index, other_tickers in enumerate(selector.css(\".HDXgAf+ div .tOzDHb\"), start=1):\n ticker_data[\"people_also_search_for\"][\"items\"].append(discover_more_tickers(index, other_tickers))\n else:\n ticker_data[\"people_also_search_for\"][\"error\"] = f\"No 'people_also_search_for` in results for {ticker}\"\n \n\n return ticker_data\n\n\ndef discover_more_tickers(index: int, other_data: str):\n \"\"\"\n if price_change_formatted will start complaining,\n check beforehand for None values with try/except and set it to 0, in this function.\n \n however, re.search(r\"\\d{1}%|\\d{1,10}\\.\\d{1,2}%\" should make the job done.\n \"\"\"\n return {\n \"position\": index,\n \"ticker\": other_data.css(\".COaKTb::text\").get(),\n \"ticker_link\": f'https://www.google.com/finance{other_data.attrib[\"href\"].replace(\"./\", \"/\")}',\n \"title\": other_data.css(\".RwFyvf::text\").get(),\n \"price\": other_data.css(\".YMlKec::text\").get(),\n \"price_change\": other_data.css(\"[jsname=Fe7oBc]::attr(aria-label)\").get(),\n # https://regex101.com/r/BOFBlt/1\n # Up by 100.99% -> 100.99%\n \"price_change_formatted\": re.search(r\"\\d{1}%|\\d{1,10}\\.\\d{1,2}%\", other_data.css(\"[jsname=Fe7oBc]::attr(aria-label)\").get()).group()\n }\n\n\nscrape_google_finance(ticker=\"GOOGL:NASDAQ\")\n\n# outputs a JSON string\n```\n\n\nA basic example of retrieving time-series data using Nasdaq API:\n\n```python\nimport nasdaqdatalink\n\ndef nasdaq_get_timeseries_data():\n nasdaqdatalink.read_key(filename=\".nasdaq_api_key\")\n # print(nasdaqdatalink.ApiConfig.api_key) # prints api key from the .nasdaq_api_key file\n\n timeseries_data = nasdaqdatalink.get(\"WIKI/GOOGL\", collapse=\"monthly\") # not sure what \"WIKI\" stands for\n print(timeseries_data)\n\nnasdaq_get_timeseries_data()\n```\n\nOutputs a `pandas` `DataFrame`:\n\n```lang-none\n Open High Low Close Volume Ex-Dividend Split Ratio Adj. Open Adj. High Adj. Low Adj. Close Adj. Volume\nDate \n2004-08-31 102.320 103.71 102.16 102.37 4917800.0 0.0 1.0 51.318415 52.015567 51.238167 51.343492 4917800.0\n2004-09-30 129.899 132.30 129.00 129.60 13758000.0 0.0 1.0 65.150614 66.354831 64.699722 65.000651 13758000.0\n2004-10-31 198.870 199.95 190.60 190.64 42282600.0 0.0 1.0 99.742897 100.284569 95.595093 95.615155 42282600.0\n2004-11-30 180.700 183.00 180.25 181.98 15384600.0 0.0 1.0 90.629765 91.783326 90.404069 91.271747 15384600.0\n2004-12-31 199.230 199.88 192.56 192.79 15321600.0 0.0 1.0 99.923454 100.249460 96.578127 96.693484 15321600.0\n... ... ... ... ... ... ... ... ... ... ... ... ...\n2017-11-30 1039.940 1044.14 1030.07 1036.17 2190379.0 0.0 1.0 1039.940000 1044.140000 1030.070000 1036.170000 2190379.0\n2017-12-31 1055.490 1058.05 1052.70 1053.40 1156357.0 0.0 1.0 1055.490000 1058.050000 1052.700000 1053.400000 1156357.0\n2018-01-31 1183.810 1186.32 1172.10 1182.22 1643877.0 0.0 1.0 1183.810000 1186.320000 1172.100000 1182.220000 1643877.0\n2018-02-28 1122.000 1127.65 1103.00 1103.92 2431023.0 0.0 1.0 1122.000000 1127.650000 1103.000000 1103.920000 2431023.0\n2018-03-31 1063.900 1064.54 997.62 1006.94 2940957.0 0.0 1.0 1063.900000 1064.540000 997.620000 1006.940000 2940957.0\n\n[164 rows x 12 columns]\n```\n\nA line-by-line tutorial: https://serpapi.com/blog/scrape-google-finance-ticker-quote-data-in-python/", "upvote_ratio": 0.85, "id": "t3_u1vwze", "created_utc": 1649759567.0} +{"sub": "Python", "title": "Gufo Ping - The Python asyncio Ping library", "selftext": "[Gufo Ping](https://pypi.org/project/gufo-ping/) is the Python asyncio Ping library. Besides the clean and simple interface is the highly-efficient raw sockets manipulation library implemented in the [Rust](https://rust-lang.org/) language with [PyO3](https://pyo3.rs/) wrapper.\n\nPinging is simple:\n\nSend one echo request and await for reply:\n\n ping = Ping()\n rtt = await ping.ping(\"127.0.0.1\")\n\nSend a series of requests and await replies:\n\n ping = Ping()\n async for rtt in ping.iter_rtt(\"127.0.0.1\", count=5):\n print(rtt)\n\nGufo Ping is fast, allowing to monitor 100 000+ hosts at once.\n\nGufo Ping is the part of the [Gufo Stack](https://gufolabs.com/products/gufo-stack/) - the battle-proven technologies which drive the [NOC](https://getnoc.com/)", "upvote_ratio": 0.84, "id": "t3_u1vbxb", "created_utc": 1649757278.0} +{"sub": "Python", "title": "Create a Bluetooth LE repeater using Python to overcome the range limitation when transferring data", "selftext": "", "upvote_ratio": 0.84, "id": "t3_u1u01z", "created_utc": 1649751499.0} +{"sub": "Python", "title": "Natural syntax for units in Python", "selftext": "", "upvote_ratio": 0.88, "id": "t3_u1tgt0", "created_utc": 1649749144.0} +{"sub": "Python", "title": "What the Decorators in Plain Words | Python", "selftext": "What is a decorator in Python? \nWhy and how should I use it? \nHow can I simplify the debugging of decorators? \nHow can I decorate functions with parameters? \nHow can I pass arguments to a decorator? \n\n\n[This article](https://medium.com/@vlad.bashtannyk/what-the-decorators-in-plain-words-python-b600623ea497) will provide you answers to all these questions in plain words with lots of examples! Check it out now!", "upvote_ratio": 0.7, "id": "t3_u1tglr", "created_utc": 1649749121.0} +{"sub": "Python", "title": "Instagram likes predi tor using decision tree", "selftext": "", "upvote_ratio": 0.45, "id": "t3_u1qkkd", "created_utc": 1649738057.0} +{"sub": "Python", "title": "'Python is like a toy programming language compared to C++'", "selftext": "", "upvote_ratio": 0.14, "id": "t3_u1qbdq", "created_utc": 1649736750.0} +{"sub": "Python", "title": "Porting from Windows to Linux: Python vs. Powershell?", "selftext": "From a search, it looks like this question comes up every couple of months and, like everything else in IT, the answer is \"It depends.\" So, here are my depends...\n\nTL;DR - My shop is running database servers on Windows with maintenance and health check scripts written in DOS .BAT files. The company plans to migrate to cloud servers running Linux using the same database software (DB2 LUW). I want to update our scripts to a new scripting language prior to migrating and port to the new platforms when the time comes. In terms of porting between platforms, and getting a team of DBAs used to a new scripting language, would you go with Python or Powershell? Python seems easier to learn and implement, but I think PS might port better. Your thoughts?\n\n---\n\nMy shop is running database servers on Windows (not SQL Server) with the intent to migrate to cloud servers running Linux at some point in the future yet to be determined. Our database maintenance scripts are DOS .BAT files. That alone is reason enough to rewrite in a better language and, while we're at, we'll build in intelligence, restartability, health checks, logging. Not a lot of activity from the scripts themselves as they mostly run utilities and not many will run in a day or at once.\n\nMy plan is to convert the DOS .BAT files to PS now and port to Linux when/if we migrate. However, I'm seeing a lot about Python and looked over some code. The pros I see for it is it seems easy to pick up and not too fussy. I also see comments on its speed and low resource consumption. Those same comments also note that speed and resources aren't an issue as long as concurrency is low, as it is in my case.\n\nHow is Python in porting between OSes? In Powershell, you have to code path names using the .net objects in order to get OS-independent code. Is there a similar mechanism in Python or will things like drive names and path separator characters cause issues?\n\nAnother example in PS is 'sort'. If you use the 'sort' command, it will invoke the command for that OS which may behave differently. To get OS-independence, you have to use the actual Powershell command Sort-Object.\n\nAre there similar work-arounds in Python for path names? Does Python have issues with system commands that are named the same in both OSes? Are there any other porting gotchas?\n\nEDIT to answer common questions: The DB software is DB2 from IBM. There's a mainframe version, which we run on z/OS, and an LUW version, where LUW stands for Linux/Unix/Windows. Although it runs on Windows, industry standard for DB2 LUW is to run on Linux or AIX. We're currently running DB2 LUW on Windows Servers. Job scheduling is handled on the mainframe with remote triggers to the servers to run the scripts. The scripts are running utilities like reorgs, backups, restoring backups to other servers and then sending completion or failed status back to the mainframe scheduler.", "upvote_ratio": 0.89, "id": "t3_u1ogz1", "created_utc": 1649730644.0} +{"sub": "Python", "title": "Tuesday Daily Thread: Advanced questions", "selftext": "Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.\n\n**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.**\n\nThis 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.", "upvote_ratio": 0.6, "id": "t3_u1lfq8", "created_utc": 1649721611.0} +{"sub": "Python", "title": "SQLite Database with Python", "selftext": "", "upvote_ratio": 0.55, "id": "t3_u1k58n", "created_utc": 1649717865.0} +{"sub": "Python", "title": "AI Aimbot Python Tutorial", "selftext": "Been working on this for a while. Hope this helps inspire, motivate, & educate my fellow programmers. https://youtu.be/ilsn-TvryyA", "upvote_ratio": 0.65, "id": "t3_u1ibo5", "created_utc": 1649712969.0} +{"sub": "Python", "title": "The Python on Microcontrollers Newsletter - free, open source, no spam ever", "selftext": "# Interested in Python? Especially on small devices?\n\nWith the **Python on Microcontrollers newsletter**, you get all the latest information in one place!\n\nThe Python on Microcontrollers newsletter is the place for the latest news involving Python on hardware. It arrives Tuesday morning with all the week\u2019s happenings.\n\n**Catch all the\u00a0weekly news on** [**Python for Microcontrollers**](https://www.adafruitdaily.com/)\u00a0with\u00a0[adafruitdaily.com](https://www.adafruitdaily.com/).\n\n>This\u00a0*ad-free, spam-free*\u00a0weekly email is filled with\u00a0**CircuitPython**,\u00a0**MicroPython**, and\u00a0**Python**\u00a0information that you may have missed, all in one place! \nYou get a summary of all the software, events, projects, and the latest hardware worldwide once a week, no ads!\n\nEnsure you catch the weekly Python on Hardware roundup\u2013 you can cancel anytime\u00a0**\u2013** [**try our spam-free newsletter today**](https://www.adafruitdaily.com/)**!**\n\n[**https://www.adafruitdaily.com/**](https://www.adafruitdaily.com/)", "upvote_ratio": 0.57, "id": "t3_u1hqnr", "created_utc": 1649711457.0} +{"sub": "Python", "title": "Introduction to Streamlit and Streamlit Components", "selftext": "Streamlit is an open-source app framework for Machine Learning and Data Science teams.\n\nIn this article we will show you how to build Streamlit apps and custom **Streamlit** Components, with the end goal of implementing Auth0 **authentication**.\n\n[Read more\u2026](https://auth0.com/blog/introduction-to-streamlit-and-streamlit-components/?utm_source=reddit&utm_medium=sc&utm_campaign=streamlit)", "upvote_ratio": 0.25, "id": "t3_u1f4tt", "created_utc": 1649704784.0} +{"sub": "Python", "title": "Free Python 3 Course", "selftext": "Updated Link...(not sure what went wrong with old link)\n\n[https://www.udemy.com/course/python-three-from-beginner-to-pro/?couponCode=E74A9ED7BF27445AE778](https://www.udemy.com/course/python-three-from-beginner-to-pro/?couponCode=E74A9ED7BF27445AE778)\n\n&#x200B;\n\nI created a Python course for beginners. The part that I really worked a lot on was functions, scope, closures and decorators. I always found these topics a bit hard for beginners.The other section that has a lot of material is OOP: classes, instances, properties, instance methods, class methods, inheritance and the MRO(method resolution order).Applications include web development using a backend SQL DB and of course numpy and pandas.", "upvote_ratio": 0.67, "id": "t3_u1f1se", "created_utc": 1649704559.0} +{"sub": "Python", "title": "Python Tutorial Snippet - How to create a Stock Trading News Alert Application?", "selftext": "Python Tutorial Snippet - How to create a Stock Trading News Alert Application? \n[https://www.youtube.com/watch?v=60Z7Fl0Ddag](https://www.youtube.com/watch?v=60Z7Fl0Ddag)\n\nhttps://preview.redd.it/6xw1gq36yxs81.png?width=2880&format=png&auto=webp&s=6b312526559942d33fc91ac5737151e949a8b442", "upvote_ratio": 0.67, "id": "t3_u1e1vm", "created_utc": 1649700883.0} +{"sub": "Python", "title": "Crypto toolkit I wrote", "selftext": "Crypto toolkit I'm working on. Features are:\n\n* Convert crypto currencies into fiat or other currencies\n* Check current prices\n* List some top decentralized exchanges\n* Get ***today's*** info on coins\n* And more\n\nhttps://github.com/Waxxx333/cryptkit", "upvote_ratio": 0.33, "id": "t3_u1ddpi", "created_utc": 1649699112.0} +{"sub": "Python", "title": "Basic how to load/read and show images in Python (OpenCV)", "selftext": "", "upvote_ratio": 0.25, "id": "t3_u1daza", "created_utc": 1649698916.0} +{"sub": "Python", "title": "Open-source library that takes an AI model as input and produces an optimized version that runs much faster in inference", "selftext": "", "upvote_ratio": 0.79, "id": "t3_u1bbjw", "created_utc": 1649693636.0} +{"sub": "Python", "title": "python code for snake game | How to make snake game in Python", "selftext": "", "upvote_ratio": 0.33, "id": "t3_u1ap07", "created_utc": 1649691916.0} +{"sub": "Python", "title": "My first PIP package based on subprocesses", "selftext": "I never thought that one day I will release a pip package, last summer I was just learning the basics, and now I write public packages and serverless applications for AWS Lambda. Python is so great, friendly to learn, and the opportunities to develop with Python are countless. \n\nHere is the project: [https://pypi.org/project/cmagick/](https://pypi.org/project/cmagick/)\n\n&#x200B;\n\nhttps://preview.redd.it/2cgh9kqn3xs81.png?width=1364&format=png&auto=webp&s=6383f2111fee0be5d2bc0cbefea4a19bf86f7c20", "upvote_ratio": 0.94, "id": "t3_u1a9ob", "created_utc": 1649690654.0} +{"sub": "Python", "title": "Is there any platform to share scripts, import and run them easily?", "selftext": "", "upvote_ratio": 0.37, "id": "t3_u19ok4", "created_utc": 1649689110.0} +{"sub": "Python", "title": "Question on heapq design - why no maxheap implementation?", "selftext": "I am working through grokking the coding interview and decided to use python due to it's readability and overall simplicity in its syntax. \n\nThis morning I started working on the 'two heaps' algorithms. It struck me as a bit odd that python or the writers of the heapq library decided to make all implementations of heap minheaps rather than adding some additional APIs for maxheaps. \n\nMaybe it's just me, but I find it a bit hard to reason through programs that make use of maxheaps. Having to remember to push a value multiplied by -1 and then do the same for retrieval feels a bit un-intuitive, but maybe it's just me. \n\nDoes anyone know of the reasoning behind not implementing them separately and adding a thin layer to the maxheaps to avoid having to do this? I'm mostly just curious if there was any discussion around it when heapq was created but haven't been able to find anything yet.", "upvote_ratio": 0.81, "id": "t3_u1858d", "created_utc": 1649684785.0} +{"sub": "Python", "title": "This Week Two Intermediate Articles - On Dunder Methods and Python with Docker / Docker-Compose", "selftext": "* [Dunder Methods in Python: The Ugliest Awesome Sauce](https://codesolid.com/dunder-methods-in-python-the-ugliest-awesome-sauce/) \nImplementing several dunder methods, along with design considerations for when they make sense or not. Includes a tool for enumerating the existing dunder methods on an object with their help strings.\n* [How to Use Docker and Docker Compose with Python](https://codesolid.com/how-to-use-docker-with-python/) \nIncludes a simple docker container for Flask and a full Django plus Postgres starter stack using Docker Compose.", "upvote_ratio": 0.79, "id": "t3_u16r3b", "created_utc": 1649680593.0} +{"sub": "Python", "title": "Monitor your Cluster Stack with Telegraf, InfluxDB and Grafana", "selftext": "We recently worked on monitoring our HPC stack which runs SLURM workload where we utilized telegraf, influxdb, and grafana. The idea is to ssh into the node which provides some status of the entire cluster, take collect data, parse that collected raw data and write to influxdb. For visualization of the collected data grafana is utilized. I think this would be a good read for anyone looking for data collection, data analysis, and engineering on the infrastructure.\n\nPlease give us a star if the repository has helped you learn something. \n\n\nRepo: [https://github.com/bethgelab/slurm-monitoring-public](https://github.com/bethgelab/slurm-monitoring-public)\n\nThanks", "upvote_ratio": 0.78, "id": "t3_u15q0w", "created_utc": 1649677179.0} +{"sub": "Python", "title": "Microservices in 10 minutes - Minos tutorial", "selftext": "Hello everyone! We wanted to share the last tutorial that we have created to show how to create a project with a microservice architecture (with an API, event broker, discovery...) and its first microservice, in \\~10 minutes.\n\nThis is a very quick overview, but we hope that it will help you understand how to create much more complex projects.\n\nIf you have any doubts, don't hesitate to contact us at [Gitter](https://gitter.im/minos-framework/community) or at [Github](https://github.com/minos-framework/minos-python)!\n\n[https://www.youtube.com/watch?v=ZYair128ITg](https://www.youtube.com/watch?v=ZYair128ITg)", "upvote_ratio": 0.89, "id": "t3_u15nc9", "created_utc": 1649676917.0} +{"sub": "Python", "title": "Low Code Python has Arrived", "selftext": "", "upvote_ratio": 0.45, "id": "t3_u15h0k", "created_utc": 1649676263.0} +{"sub": "Python", "title": "QualityScaler 1.2.0 - Image/video upscaling & enhancement app", "selftext": "&#x200B;\n\n[GUI](https://preview.redd.it/1vms35d5ivs81.jpg?width=1372&format=pjpg&auto=webp&s=13bb87852a28d95fea0a111cdd8f1f7da3e8c670)\n\nItch -> [https://jangystudio.itch.io/qualityscaler](https://jangystudio.itch.io/qualityscaler)\n\nGithub -> [https://github.com/Djdefrag/QualityScaler/releases/tag/1.2.0](https://github.com/Djdefrag/QualityScaler/releases/tag/1.2.0)\n\n&#x200B;\n\n**Update 1.2.0**\n\n Bugfix / perf. improvement / UI changes\n\nNew\n\n* A new wonderful handmade icon :D\n\nBugfix/improvement\n\n* Fixed the problem of displaying error messages correctly\n* Library import improvements\n* Other bugfix & code cleaning\n\nUI changes\n\n* Changed \"QualityScaler\" title position and background - to make space for new features ;) -\n* Other little changes", "upvote_ratio": 0.88, "id": "t3_u146jl", "created_utc": 1649671292.0} +{"sub": "Python", "title": "Rmse-Mse-Linear regression mpdel-What is RMSE and MSE in linear regression models?-InsideAIML", "selftext": "", "upvote_ratio": 0.57, "id": "t3_u12cxr", "created_utc": 1649663520.0} +{"sub": "Python", "title": "Ideal Coding Bootcamp", "selftext": "Hi everyone \ud83d\udc4b\n\nWhat would your ideal coding bootcamp experience look like? \n\nLet\u2019s say you were a beginner and had zero experience in programming. You find an affordable 6 week python course. What would you expect to walk away with and what do you think your next steps would be?", "upvote_ratio": 0.6, "id": "t3_u10b4g", "created_utc": 1649654868.0} +{"sub": "Python", "title": "Selenium with Python for Beginners + Sample website you can probe without violating our Terms of Service", "selftext": "- [Selenium With Python](https://www.practiceprobs.com/problemsets/selenium-with-python/)\n- [Selenium Playground](https://seleniumplayground.practiceprobs.com/)", "upvote_ratio": 0.96, "id": "t3_u0uwsq", "created_utc": 1649636354.0} +{"sub": "Python", "title": "Monday Daily Thread: Project ideas!", "selftext": "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.", "upvote_ratio": 0.78, "id": "t3_u0ujvk", "created_utc": 1649635212.0} +{"sub": "Python", "title": "Learning GUI for Git", "selftext": "", "upvote_ratio": 0.5, "id": "t3_u0sygl", "created_utc": 1649630335.0} +{"sub": "Python", "title": "Discord log bot", "selftext": "", "upvote_ratio": 0.5, "id": "t3_u04kxn", "created_utc": 1649545363.0} +{"sub": "Python", "title": "How To Make A Good Github Repository For Your Python Projects", "selftext": "", "upvote_ratio": 0.77, "id": "t3_u05eqn", "created_utc": 1649548116.0} +{"sub": "Python", "title": "Can someone recommend me ball python names pls", "selftext": "I'm getting a ball python and I want its name to be a pun related to the programming language, but I'm coming up mostly empty.\n\n&#x200B;\n\nI was thinking of naming it pip, but I feel like there are better names I can't think of.", "upvote_ratio": 0.82, "id": "t3_u04y52", "created_utc": 1649546544.0} +{"sub": "Python", "title": "IndicatorManagement v0.4.0 - Management of mathematical/financial indicators", "selftext": "Hello. I am a Python developer and I am making my first Python PyPI module project.\n\nThe library's name is \"indicator-management\"; It's about management of mathematical/financial indicators.\n\nThe benefit of this library is that you can handle very large amount of data because this library does not store the whole data at once, instead it loads the data whenever the calculation is needed.\n\nThe source code and details are available at [here](https://github.com/McDic/IndicatorManagement).\n\nThis library is still under pre-alpha development. Your feedback and interest is appreciated!\n\n[Example usage with matplotlib](https://i.redd.it/r1vdpr865rs81.gif)", "upvote_ratio": 0.82, "id": "t3_u0opx3", "created_utc": 1649618139.0} +{"sub": "Python", "title": "What is the best practice for injecting configuration into a python application", "selftext": "I am working on a Flask App. I have a configuration class defined which has configs for Dev, Qa, Prod and Test. I followed the common practice of reading the config file only once and initialising the app with the config data\n\napp.config.from\\_object(config object)\n\nNow I need to access urls defined in the config class in other places. I tried accessing these configs using the current app proxy. But I realised that I also have to access these class outside the request/ app context as I have celery tasks which access them.\n\nOne approach is to pass this config as a variable to every class it is required, which I dont prefer. Another option is to annotate the config class as singleton and create the config object at every place where I need them. I also came across this library called Dependency\\_Injector. [https://python-dependency-injector.ets-labs.org/](https://python-dependency-injector.ets-labs.org/) This seems a bit heavy weight for my use case though. I am looking forward to know how other solve this problem\n\nEdit: I should add that I am already using environment variables. I create. the config object based on the value of the env vars.", "upvote_ratio": 0.74, "id": "t3_u0j5rn", "created_utc": 1649602241.0} +{"sub": "Python", "title": "Exploring data in CockroachDB with Python and Pandas in DataStation", "selftext": "", "upvote_ratio": 0.5, "id": "t3_u0i6he", "created_utc": 1649599224.0} +{"sub": "Python", "title": "Space Science with Python - Autoencoders (concept)", "selftext": "Coders!\n\nI keep up my weekly tutorial sessions (some asked, whether I could increase it to 2 videos or more per week... But I have too many things to do... let's see how it continues in the long run!).\n\nAnyway, what did we do in the last couple of weeks? Using Python on Google Colab we:\n\n- Downloaded asteroid spectra + their corresponding class (whether it is e.g. a stony or iron obejct)\n- Parsed, cleaned and enriched the data\n- Created an interactive spectrum visualization tool in Colab\n- Conducted a Machine Learning experiment using scikit-learn and their SVM implementation\n- Created a neural network with Keras and optimized its architecture with Keras-Tuner to classify our data\n\nSo are we done?\n\nTheoretically yes. But I would like to conclude the asteroid part with an unsupervised ML algorithm: Autoencoders! Using this neural network architecture + some clustering algorithms I'd like to show how one can create an unsupervised classification method.\n\nBut what are Autoencoders exactly, and how do they work?\n\nWell to split up theory and coding a little bit, I created a small \"concept\" video on Autoencoders, so that we can start coding next time (knowing what we want to do and what to expect).\n\nI am not a CGI expert or big YouTuber. It's more \"seminar-like\" and I'd like to know your opinion on this, whether it's useful, or not.\n\nLink: https://youtu.be/ET441nffKjU\n\nSo what will we do next with Python, Keras and the asteroid data?\n\n- Next tutorial: creating an Autoencoder using Keras (we won't use Keras-Tuner, to keep things simple). We'll also check the \"reconstruction\" power of the Autoencoder that compresses the 49-dimensional spectra into 2 dimensions\n\n- Afterwards: how does the latent space look like? We'll create an interactive Jupyter Viewer to visualise the latent space and color the spectrum class corresponding latent values to determine whether we have a \"class separation\" or not\n\n- Last video of the entire project: Rebuild an Autoencoder with a larger latent space, and applying Gaussian Mixture Models (GMMs) to determine the number of possible classes using the Bayesian Information Criterion (BIC)\n\nWell... Afterwards a new Space + Python project will start :)\n\nHope you guys like it. I am looking forward to suggestions and ideas!\n\nSee you next week!\n\nThomas", "upvote_ratio": 0.92, "id": "t3_u0hr50", "created_utc": 1649597837.0} +{"sub": "Python", "title": "How do you pronounce libraries with `py` in the name?", "selftext": "[this comment](https://reddit.com/r/Python/comments/u04y52/_/i454o57/?context=1) got me thinking about how each developer likes to pronounce package names\n\nI have always pronounced `numpy` as \u201cnum-pie\u201d, but some people I\u2019ve worked with have been adamant it is \u201cnum-pee\u201d\n\nhow do you pronounce \u201cpy\u201d in names? (even if it\u2019s solely in your head)", "upvote_ratio": 0.92, "id": "t3_u0g45w", "created_utc": 1649591920.0} +{"sub": "Python", "title": "A Brief Introduction to PyQt", "selftext": "", "upvote_ratio": 0.69, "id": "t3_u0f053", "created_utc": 1649587047.0} +{"sub": "Python", "title": "YouTube version in case you missed it live: troubleshooting Python applications on Kubernetes (hunting down memory leaks, running cpu profilers, and using non-breaking debuggers)", "selftext": "", "upvote_ratio": 0.8, "id": "t3_u0etrg", "created_utc": 1649586186.0} +{"sub": "Python", "title": "Python Selenium Tutorial #8 - Read, Block & Mock Requests using Selenium Wire", "selftext": "", "upvote_ratio": 0.81, "id": "t3_u0c8yx", "created_utc": 1649574107.0} +{"sub": "Python", "title": "Desktop stereo system made with Python", "selftext": "&#x200B;\n\nhttps://reddit.com/link/u0c60e/video/fawvxu65gns81/player\n\nI absolutely love music, especially when coding. For a while now, I've been wanting to have a stound graphical analyzer to make y coding sessions more fun, so I decided to make my own. Here's the [code](https://github.com/BrickSigma/Desktop-stereo). I haven't documented the code yet or added any README file to it, but I will soon.\n\nThis was a lot of fun to make because I learnt a lot of new things about digital audio processing, like their format, and Fourier transformations, which I'm in love with now. This was also my first attempt at editing a video for public presentation, so I hope I've done justice to it.\n\nThanks for reading and have an amazing day!", "upvote_ratio": 0.91, "id": "t3_u0c60e", "created_utc": 1649573774.0} +{"sub": "Python", "title": "Short Rock, Paper, Scissors game.", "selftext": "What do you thin about it, can it get any shorter?\n\n[https://github.com/sat1ss/The-shortest-Rock-Paper-Scissors-game](https://github.com/sat1ss/The-shortest-Rock-Paper-Scissors-game)", "upvote_ratio": 0.71, "id": "t3_u0byeh", "created_utc": 1649572827.0} +{"sub": "Python", "title": "r/AskScience flair classifier using Praw and Fasttext", "selftext": "I wanted to learn how to use get data from reddit and came across the praw library, so I decided to create a fasttext nlp model which classifies what flair a post should be on r/AskScience (because they have purely text posts and each question is flaired). Currently it works with the top 10 flairs, but I plan to add some improvements to it later on to include all flairs and perhaps other subreddits too. \n\nlink: [https://github.com/arnavkartikeya/RedditFlairClassifier](https://github.com/arnavkartikeya/RedditFlairClassifier)", "upvote_ratio": 0.62, "id": "t3_u085ro", "created_utc": 1649557796.0} +{"sub": "Python", "title": "Analytics Dashboard with Plotly Dash Library", "selftext": "I created this dashboard with the Plotly Dash library. Thought it might be of use to anyone on here looking to get started with Dash. \n\n[https://www.youtube.com/playlist?list=PLUnjnS8VMCPpxCAjVp2Y-OjcuAxSQPBk6](https://www.youtube.com/playlist?list=PLUnjnS8VMCPpxCAjVp2Y-OjcuAxSQPBk6)", "upvote_ratio": 0.87, "id": "t3_u07h4i", "created_utc": 1649555368.0} +{"sub": "Python", "title": "HiQ - A Modern Observability System", "selftext": "HiQ([https://github.com/oracle-samples/hiq](https://github.com/oracle-samples/hiq)) is a declarative, non-intrusive, dynamic and transparent tracking system for both monolithic application and distributed system. It brings the runtime information tracking and optimization to a new level without compromising with speed and system performance, or hiding any tracking overhead information. HiQ applies for both I/O bound and CPU bound applications.\n\nTo explain the four features, declarative means you can declare the things you want to track in a text file, which could be a JSON, YAML or even CSV, and no need to change program code. Non-intrusive means HiQ doesn\u2019t requires to modify original python code. Dynamic means HiQ supports tracing metrics featuring at run time, which can be used for adaptive tracing. Transparent means HiQ provides the tracing overhead and doesn\u2019t hide it no matter it is huge or tiny.\n\nIn addition to latency tracking, HiQ provides memory, disk I/O and Network I/O tracking out of the box. The output can be saved in form of normal line by line log file, or HiQ tree, or span graph.\n\n## Installation\n\npip install hiq-python\n\n## Documentation\n\n**HTML**: \ud83d\udcf7[ HiQ Online Documents](https://hiq.readthedocs.io/en/latest/index.html) \n**PDF**: Please check \ud83d\udcf7[ HiQ User Guide](https://github.com/oracle-samples/hiq/blob/main/hiq/docs/hiq.pdf).\n\n## Jupyter NoteBook\n\n### Add Observability to PaddleOCR\n\n* [Latency](https://github.com/oracle-samples/hiq/blob/henry_dev/hiq/examples/paddle/demo.ipynb)\n* [Memory](https://github.com/oracle-samples/hiq/blob/main/hiq/examples/paddle/demo_memory.ipynb)\n\n### Add Observability to AlexNet\n\n* [Latency](https://github.com/oracle-samples/hiq/blob/main/hiq/examples/onnxruntime/demo.ipynb)\n* [Intrusive](https://github.com/oracle-samples/hiq/blob/main/hiq/examples/onnxruntime/demo_intrusive.ipynb)\n\n## Examples\n\nPlease check \ud83d\udcf7[ examples](https://github.com/oracle-samples/hiq/blob/main/hiq/examples) for usage examples.", "upvote_ratio": 0.57, "id": "t3_u07er0", "created_utc": 1649555126.0} +{"sub": "Python", "title": "Have/do any of you make a side hustle web scraping/procuring data with Python? Everyone that talks about it online in tandem with \u201cmake $ with Python\u201d never says how much they made made doing this.", "selftext": "", "upvote_ratio": 0.79, "id": "t3_u06k0b", "created_utc": 1649552099.0} +{"sub": "Python", "title": "Sunday Daily Thread: What's everyone working on this week?", "selftext": "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.", "upvote_ratio": 0.85, "id": "t3_u05lzc", "created_utc": 1649548811.0} +{"sub": "Python", "title": "What nontechnical piece of advice have you received that has changed how you work as a developer?", "selftext": "For example, Ive heard before automating something, you shouldn\u2019t ask yourself if it can be done but should it be done. \n\nIt\u2019s an intuitive, slap your forehead concept but one that was eye opening", "upvote_ratio": 0.92, "id": "t3_u0431h", "created_utc": 1649543792.0} +{"sub": "Python", "title": "Tips for Python debugging in Vim", "selftext": "What is your workflow and which plugins do you use, if any ?", "upvote_ratio": 0.63, "id": "t3_u03d4y", "created_utc": 1649541591.0} +{"sub": "Python", "title": "An easy to use PGP tool", "selftext": "Good morning to everyone, after my unsuccessful attempts at using PGP software, I decided to create my own one in python, as simple as I possibly could, to make it easier on myself should I ever need to use again this PGP process or should someone decide to use it.\n\nI'm a student, an amateur python programmer and I love challenges, so I took upon the challenge of creating my first tool with a GUI, it's my first time using any of these python libraries and posting anything publicly....\n\nI give you [EZPZ-PGP](https://github.com/HandImpersonator/EZPZ-PGP) (name could do some work, I know):\n\n[Tool menu](https://preview.redd.it/equy9g1wjks81.png?width=322&format=png&auto=webp&s=ef57c2ce60e7c20edb4fb4f7a65dc2ee6993b4c4)\n\n[Folders created](https://preview.redd.it/nxec6ovyjks81.png?width=887&format=png&auto=webp&s=27d55d3a47f937a9a2c18f26567293e16cb2c0ec)\n\n[Key location](https://preview.redd.it/4ywhr3n0kks81.png?width=885&format=png&auto=webp&s=6979992268aa7458c90f4ac08abbc948387d54da)\n\n[Message encryption test](https://preview.redd.it/x2pe8gb2kks81.png?width=479&format=png&auto=webp&s=74224b5cc3766fa1444e7e2d831279bda143de9d)\n\n[Message decryption test](https://preview.redd.it/364ye2n5kks81.png?width=479&format=png&auto=webp&s=71385a74a8eee2463031ace4c578f3b6b7d83a15)\n\nI really have no idea how much simpler to make this tool, I have included some [mildly straightforward instructions](https://github.com/HandImpersonator/EZPZ-PGP#what-the-tool-can-do) for ease of use. It can create PGP keypairs (PGPY), encrypt, decrypt, sign and verify signatures on messages and files (PGPY).\n\nCompletely open source, I want to share my personal tool with the world with the hope of getting some feedback on it and see if people like it a bit.\n\nI'd like to work on translating the tool to other languages with latin alphabet, I'll upload soon to github a file with all the text needed to be translated to other languages. PM me if you decided to help translate the tool to your language so I can update the tool and include your name/account in the github credits!\n\n&#x200B;\n\nThank you, looking forward to your feedback.", "upvote_ratio": 0.83, "id": "t3_u02g7d", "created_utc": 1649538795.0} +{"sub": "Python", "title": "I released a game made with Pygame!", "selftext": "Over the past week I challenged myself to make a game in Pygame and this was the result. Everything was made by me except the music!\n\nhttps://i.redd.it/kp5kik7kdks81.gif\n\nDownload the game here - [https://scriptline-studios.itch.io/planyt](https://scriptline-studios.itch.io/planyt)", "upvote_ratio": 0.96, "id": "t3_u01qvx", "created_utc": 1649536656.0} +{"sub": "Python", "title": "[Challenge] print \"Hello World\" without using W and numbers in your code", "selftext": "To be more accurate: without using w/W, **'** (apostrophe) and numbers. \nEdit: try to avoid \"ord\", there are other cool tricks \n\n[https://platform.interway.ai/#/get/play\\_/ch/hello\\_\\[w09\\]orld](https://platform.interway.ai/#/get/play_/ch/hello_[w09]orld)\n\nDisclaimer: I built it, and I plan to write a post with the most creative python solutions", "upvote_ratio": 0.9, "id": "t3_u01kmr", "created_utc": 1649536115.0} +{"sub": "Python", "title": "Threading in Python: The Complete Guide", "selftext": "", "upvote_ratio": 0.82, "id": "t3_u01bcj", "created_utc": 1649535326.0} +{"sub": "Python", "title": "Has anyone applied to a job that requires a bachelors degree but doesn\u2019t have one themselves and got the job??", "selftext": "I\u2019m 22 years old and have an associates right now, I\u2019m working on by bachelors but I HATE SCHOOL. \n\nI have been learning python for a couple of months now an have a general understanding of it. I was just looking at entry level job and most of these require a bachelors degree, I really want to know if anyone has gotten any of those jobs without a bachelors??", "upvote_ratio": 0.79, "id": "t3_u00pmy", "created_utc": 1649533491.0} +{"sub": "Python", "title": "How to correctly install Python applications & libraries from PyPI", "selftext": "", "upvote_ratio": 0.5, "id": "t3_tzyv6j", "created_utc": 1649527919.0} +{"sub": "Python", "title": "Using Nuitka to Speed Python Code", "selftext": "I am playing with Nuitka and following this [link](https://ao.ms/how-to-package-a-python-app-using-nuitka/). I was under the impression that compiled program should run faster but that is not the case here?\n\nRunning the Python code,\n\n $ time python test1.py\n h<z`3C337E|$Oe2@\n \n real\t0m0.095s\n user\t0m0.024s\n sys\t0m0.013s \n\nThen running the standalone code compiled via Nuitka,\n\n $ time ./test1.bin\n +>PAGZ$OHlVK/.5\n \n real\t0m0.191s\n user\t0m0.031s\n sys\t0m0.014s\n\nThe standalone code runs slower but shouldn't it have run faster since it is a complied?", "upvote_ratio": 0.6, "id": "t3_tzy00o", "created_utc": 1649525369.0} +{"sub": "Python", "title": "Open Source Rhythmic Midi Generator for all Major Keys in Python", "selftext": "This program uses some relatively simple python logic to generate random chord progressions in every major key! The progressions are then broken up into rhythmic subunits, which are also semi-random.\n\nThe midi files need a specified directory to be outputted to. Where to do this can be found within the code.\n\nAny and all feedback is appreciated!\n\nLink to the code: [https://github.com/prod-emdub/midirhythm/tree/main](https://github.com/prod-emdub/midirhythm/tree/main)\n\n&#x200B;\n\nHere is an example of a randomly generated progression in F major:\n\n&#x200B;\n\nhttps://preview.redd.it/usbt91cd5js81.png?width=3541&format=png&auto=webp&s=eb5513343eb5bccf4bdda2ad40eac07ba1355af6", "upvote_ratio": 0.83, "id": "t3_tzwra2", "created_utc": 1649521697.0} +{"sub": "Python", "title": "Build a Site Connectivity Checker in Python \u2013 Real Python", "selftext": "", "upvote_ratio": 1.0, "id": "t3_tzwhkh", "created_utc": 1649520902.0} +{"sub": "Python", "title": "I made an R6 Strat Roulette discord bot in python!", "selftext": "Hey I'm fairly new to python this is one of my first actual projects! If you want to talk to me about it or give me some suggestions add me on discord: Axkkzy#7992 :) \n\n\n[https://github.com/Axkkzy/R6-Strat-Roulette-Bot](https://github.com/Axkkzy/R6-Strat-Roulette-Bot)", "upvote_ratio": 0.67, "id": "t3_tzulmw", "created_utc": 1649515365.0} +{"sub": "Python", "title": "Free Python Course Inquiry", "selftext": " I had a quick question regarding a coursera class I am currently taking for simple\u00a0python programming (it's offered for free and it looks like the course is laid out fairly well).\n\nHowever, after week 1 (so a few hours I've invested), it appears to be a course that may have been recycled/offered to newbies from original posting date of several years ago and not within the past 2 years (I found comments from students reviewing the\u00a0course from 2016). \n\nThe teaching style is a little inflexible at times (jumping around functions, assignments a bit), but I want to get through the course because of the value of learning to work with Python\n\nIs there value in this particular program based on the age of the course or do I need to restart a similar\u00a0course not older than a certain amount of years? They are working with python 3.4 btw\n\n&#x200B;\n\nThanks for any feedback/recommendations!", "upvote_ratio": 0.33, "id": "t3_tzra4g", "created_utc": 1649503690.0} +{"sub": "Python", "title": "Python client for Crunchbase's REST API", "selftext": "Hi, I recently needed to use [Crunchbase](https://www.crunchbase.com/)'s REST API in a project but couldn't find a well-maintained python client for it. I started writing one and decided to open-source it. This is my first open-sourced project. Your feedback, improvements, and suggestions will be appreciated.\n\n[https://pypi.org/project/py-crunchbase-api/](https://pypi.org/project/py-crunchbase-api/)\n\nThanks.", "upvote_ratio": 1.0, "id": "t3_tzq3q7", "created_utc": 1649498486.0} +{"sub": "Python", "title": "What do you guys think of this book?", "selftext": "", "upvote_ratio": 0.87, "id": "t3_tzpk9y", "created_utc": 1649496037.0} +{"sub": "Python", "title": "custom-literals A module implementing custom literal suffixes using pure Python", "selftext": "", "upvote_ratio": 1.0, "id": "t3_tzp8qe", "created_utc": 1649494611.0} +{"sub": "Python", "title": "Python \u2014 Network Tracking using Wireshark and Google Maps", "selftext": "", "upvote_ratio": 0.83, "id": "t3_tzp4n9", "created_utc": 1649494069.0} +{"sub": "Python", "title": "A Hitomezashi pattern generator I made in python!", "selftext": "I made a Hitomezashi stitch pattern generator fully in python after watching the Numberphile video a long time ago. I used the pygame module to do it.\n\nSource Code- [https://github.com/Topkinsme/Hitomezashi-Stitch-Pattern-Generator/blob/main/main.py](https://github.com/Topkinsme/Hitomezashi-Stitch-Pattern-Generator/blob/main/main.py) \n\n\nhttps://reddit.com/link/tzp0f4/video/sorpps5wsgs81/player", "upvote_ratio": 0.97, "id": "t3_tzp0f4", "created_utc": 1649493503.0} +{"sub": "Python", "title": "When default __new__ function should be overwritten?", "selftext": "I recently learnt about diffrence beetween __new__ and __init__ functions, but I cannot find usecase of writing my own __new__ method.", "upvote_ratio": 0.82, "id": "t3_tzmyvu", "created_utc": 1649484444.0} +{"sub": "Python", "title": "Pygame Tutorial - Menus and Buttons!", "selftext": "", "upvote_ratio": 0.4, "id": "t3_tzjdxt", "created_utc": 1649471029.0} +{"sub": "Python", "title": "Internship skills:", "selftext": "I\u2019m pretty new to python. All i\u2019ve done is take a dual enrollment class at gt for it and the farthest we covered in the course is project oriented learning. I understand how to do the basic problems in the class like given an array of movies and their gross profit, sort them from greatest profit to least profit. Simple things like that. What can i do to learn how to actually apply this stuff to the point that i would be useful in an internship??", "upvote_ratio": 0.75, "id": "t3_tzh04s", "created_utc": 1649462928.0} +{"sub": "Python", "title": "Saturday Daily Thread: Resource Request and Sharing! Daily Thread", "selftext": "Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?\n\nUse this thread to chat about and share Python resources!", "upvote_ratio": 0.75, "id": "t3_tzgu3e", "created_utc": 1649462409.0} +{"sub": "Python", "title": "Shortening common parts of code", "selftext": "Title.\n\nIn JavaScript there are things like the ternary operator to reduce code size and \"improve\" code quality, I'm wondering if there is much in python aside from the obvious which is lambda", "upvote_ratio": 0.5, "id": "t3_tze4s6", "created_utc": 1649454239.0} +{"sub": "Python", "title": "I created a library for teacher task automation", "selftext": "I created a library of utilities I've used as a teacher to automate various tasks (mail merges, interacting with google classroom, generating rubrics). I hope that it might lower the barrier of entry for teachers with some python knowledge to get started with using programming to ease the repetitive aspects of our work.\n\nComments, criticism, and code review are much appreciated!\n\nhttps://pypi.org/project/teacherhelper/\n\nhttps://teacherhelper.jackdevries.com/\n\nhttps://github.com/jdevries3133/teacher_helper", "upvote_ratio": 0.94, "id": "t3_tzb9yc", "created_utc": 1649446042.0} +{"sub": "Python", "title": "Using Github to host local images permenently on the web.", "selftext": "When you create an issue or add an image on github, you can actually upload images to the github server without any external apis. We can use this feature to mimic Github's behavior when uploading an image and upload any local image to the web. Because github has to store all images permenently (or images on READMEs or issues could change), we also do not have to worry about uploaded images expiring.\n\nI have been using this feature (although not automatically) for a long time to host images for my own website, and finally managed to automate this process.\n\nHonestly, as a beginner in programming, hosting images for websites for free is a pain in the ass and I hope this will help people learn more about websites.\n\n[Github link](https://github.com/0ev/github-issue-image-upload)", "upvote_ratio": 0.38, "id": "t3_tzb541", "created_utc": 1649445662.0} +{"sub": "Python", "title": "Wordle in command line", "selftext": "you can wide the dictionary if you want \ud83d\ude09 \n\n\n from os import system, name\n import re\n import random\n \n # define our clear function\n def clear():\n \n if name == 'nt': # for windows\n system('cls')\n else: # for mac and linux(here, os.name is 'posix')\n system('clear')\n \n #show the rules of the game and descripcion\n def menu():\n \n print(\"\"\"\n __ __ _ _ ____\n \\ \\ / /__ _ __ __| | | ___ / ___| __ _ _ __ ___ ___\n \\ \\ /\\ / / _ \\| '__/ _` | |/ _ \\ | | _ / _` | '_ ` _ \\ / _ \\\\\n \\ V V / (_) | | | (_| | | __/ | |_| | (_| | | | | | | __/\n \\_/\\_/ \\___/|_| \\__,_|_|\\___| \\____|\\__,_|_| |_| |_|\\___|\n Try to guess the word, we lend you some clues when you assert.\n After each guess, the color of the tiles will change to show how close your guess was to the word \n \"\"\")\n \n def show_words(array_words,guessword):\n \n for word in array_words:\n list_blocks = \"\"\n for i,letter in enumerate(word):\n if letter in guessword:\n if word[i] == guessword[i]:\n block = \"\ud83d\udfe9\"\n else:\n block = \"\ud83d\udfe8\" \n else:\n block = \"\ud83d\udd32\" \n \n list_blocks += block\n \n print(word.replace(\"\", \" \")[1: -1])\n print(list_blocks)\n \n \n if __name__ == \"__main__\":\n dictionary = [\"ninja\",\"great\",\"witch\",\"grown\",\"space\",\"stone\",\"earth\",\"extra\",\"entry\",\"slice\",\"shine\",\"sharp\",\"eager\",\"ebony\",\"penny\"]\n guessword = random.choice(dictionary)\n lenword = len(guessword)\n word_guessed = False\n array_words = []\n \n \n while word_guessed == False:\n clear()\n menu()\n show_words(array_words,guessword) \n try:\n word = input(f\"Hit some word of {lenword} length here:\")\n \n if len(word) != lenword:\n raise ValueError(f\"it must be {lenword} length word!\") \n elif not re.search(r\"[a-zA-Z]{\"+str(lenword)+\"}\",word):\n raise ValueError(f\"it must be only alfabetical characters!\") \n elif word == guessword:\n print(word.replace(\"\", \" \")[1: -1])\n print(\"\ud83d\udfe9\ud83d\udfe9\ud83d\udfe9\ud83d\udfe9\ud83d\udfe9\")\n print(\"Awesome! \ud83c\udf89\ud83c\udf89\ud83c\udf89\")\n word_guessed = True\n else:\n array_words.append(word)\n \n except ValueError as e:\n print(e)\n a = input(\"Press 'enter' to continue\")", "upvote_ratio": 0.54, "id": "t3_tz8uhj", "created_utc": 1649439253.0} +{"sub": "Python", "title": "so im 30 switching careers from automotive to computers started college for computer science learning python 3 but i feel its going kinda slow learning so much though so i figured I would ask the more knowledgeable people on what i can do in my free time to grow my knowledge more", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tz7tcm", "created_utc": 1649436416.0} +{"sub": "Python", "title": "Preferred way to connect to a database", "selftext": "Is it a particular ORM, do you use a particular ODBC library, embracing the bleeding edge of speed with Apache Arrow? \n\nWhat satisfies your data source access needs and why?", "upvote_ratio": 0.78, "id": "t3_tz7aj5", "created_utc": 1649434965.0} +{"sub": "Python", "title": "Unix Command Cheat Sheet for Busy Developers", "selftext": "", "upvote_ratio": 0.69, "id": "t3_tz62m7", "created_utc": 1649431679.0} +{"sub": "Python", "title": "Scrape Google Play Search Apps in Python", "selftext": "Hey guys, just in case anyone wants to scrape Google Play Store App Search \ud83d\udc40\n\nFull code: \n\n```python\nfrom bs4 import BeautifulSoup\nfrom serpapi import GoogleSearch\nimport requests, json, lxml, re, os\n\n\ndef bs4_scrape_all_google_play_store_search_apps(\n query: str, \n filter_by: str = \"apps\",\n country: str = \"US\"):\n # https://docs.python-requests.org/en/master/user/quickstart/#passing-parameters-in-urls\n params = {\n \"q\": query, # search query\n \"gl\": country, # country of the search. Different country display different apps.\n \"c\": filter_by # filter to display list of apps. Other filters: apps, books, movies\n }\n\n # https://docs.python-requests.org/en/master/user/quickstart/#custom-headers\n headers = {\n \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.79 Safari/537.36\",\n }\n\n html = requests.get(\"https://play.google.com/store/search\", params=params, headers=headers, timeout=30)\n soup = BeautifulSoup(html.text, \"lxml\")\n\n apps_data = []\n\n for app in soup.select(\".mpg5gc\"):\n title = app.select_one(\".nnK0zc\").text\n company = app.select_one(\".b8cIId.KoLSrc\").text\n description = app.select_one(\".b8cIId.f5NCO a\").text\n app_link = f'https://play.google.com{app.select_one(\".b8cIId.Q9MA7b a\")[\"href\"]}'\n developer_link = f'https://play.google.com{app.select_one(\".b8cIId.KoLSrc a\")[\"href\"]}'\n app_id = app.select_one(\".b8cIId a\")[\"href\"].split(\"id=\")[1]\n developer_id = app.select_one(\".b8cIId.KoLSrc a\")[\"href\"].split(\"id=\")[1]\n \n try:\n # https://regex101.com/r/SZLPRp/1\n rating = re.search(r\"\\d{1}\\.\\d{1}\", app.select_one(\".pf5lIe div[role=img]\")[\"aria-label\"]).group()\n except:\n rating = None\n \n thumbnail = app.select_one(\".yNWQ8e img\")[\"data-src\"]\n \n apps_data.append({\n \"title\": title,\n \"company\": company,\n \"description\": description,\n \"rating\": float(rating) if rating else rating, # float if rating is not None else rating or None\n \"app_link\": app_link,\n \"developer_link\": developer_link,\n \"app_id\": app_id,\n \"developer_id\": developer_id,\n \"thumbnail\": thumbnail\n }) \n\n print(json.dumps(apps_data, indent=2, ensure_ascii=False))\n \nbs4_scrape_all_google_play_store_search_apps(query=\"maps\", filter_by=\"apps\", country=\"US\")\n\n\n\n\ndef serpapi_scrape_all_google_play_store_apps():\n params = {\n \"api_key\": os.getenv(\"API_KEY\"), # your serpapi api key\n \"engine\": \"google_play\", # search engine\n \"hl\": \"en\", # language\n \"store\": \"apps\", # apps search\n \"gl\": \"us\", # contry to search from. Different country displays different.\n \"q\": \"maps\" # search qeury\n }\n\n search = GoogleSearch(params) # where data extracts\n results = search.get_dict() # JSON -> Python dictionary\n\n apps_data = []\n\n for apps in results[\"organic_results\"]:\n for app in apps[\"items\"]:\n apps_data.append({\n \"title\": app.get(\"title\"),\n \"link\": app.get(\"link\"),\n \"description\": app.get(\"description\"),\n \"product_id\": app.get(\"product_id\"),\n \"rating\": app.get(\"rating\"),\n \"thumbnail\": app.get(\"thumbnail\"),\n })\n\n print(json.dumps(apps_data, indent=2, ensure_ascii=False))\n```\n\nOutput from DIY solution:\n\n```json\n[\n {\n \"title\": \"Google Maps\",\n \"company\": \"Google LLC\",\n \"description\": \"Real-time GPS navigation & local suggestions for food, events, & activities\",\n \"rating\": 3.9,\n \"app_link\": \"https://play.google.com/store/apps/details?id=com.google.android.apps.maps\",\n \"developer_link\": \"https://play.google.com/store/apps/dev?id=5700313618786177705\",\n \"app_id\": \"com.google.android.apps.maps\",\n \"developer_id\": \"5700313618786177705\",\n \"thumbnail\": \"https://play-lh.googleusercontent.com/Kf8WTct65hFJxBUDm5E-EpYsiDoLQiGGbnuyP6HBNax43YShXti9THPon1YKB6zPYpA=s128-rw\"\n },\n {\n \"title\": \"Google Maps Go\",\n \"company\": \"Google LLC\",\n \"description\": \"Get real-time traffic, directions, search and find places\",\n \"rating\": 4.3,\n \"app_link\": \"https://play.google.com/store/apps/details?id=com.google.android.apps.mapslite\",\n \"developer_link\": \"https://play.google.com/store/apps/dev?id=5700313618786177705\",\n \"app_id\": \"com.google.android.apps.mapslite\",\n \"developer_id\": \"5700313618786177705\",\n \"thumbnail\": \"https://play-lh.googleusercontent.com/0uRNRSe4iS6nhvfbBcoScHcBTx1PMmxkCx8rrEsI2UQcQeZ5ByKz8fkhwRqR3vttOg=s128-rw\"\n },\n {\n \"title\": \"Waze - GPS, Maps, Traffic Alerts & Live Navigation\",\n \"company\": \"Waze\",\n \"description\": \"Save time on every drive. Waze tells you about traffic, police, crashes & more\",\n \"rating\": 4.4,\n \"app_link\": \"https://play.google.com/store/apps/details?id=com.waze\",\n \"developer_link\": \"https://play.google.com/store/apps/developer?id=Waze\",\n \"app_id\": \"com.waze\",\n \"developer_id\": \"Waze\",\n \"thumbnail\": \"https://play-lh.googleusercontent.com/muSOyE55_Ra26XXx2IiGYqXduq7RchMhosFlWGc7wCS4I1iQXb7BAnnjEYzqcUYa5oo=s128-rw\"\n }, ... other results\n]\n```\n\nFull blog post with step-by-step explanation: https://serpapi.com/blog/scrape-google-play-search-apps-in-python/", "upvote_ratio": 0.78, "id": "t3_tz621l", "created_utc": 1649431634.0} +{"sub": "Python", "title": "Rock-Paper-Scissors-Lizard-Spock Game", "selftext": " from random import randint\n # create a list of play options\n options = [\"Rock\", \"Paper\", \"Scissors\", \"Lizard\", \"Spock\"]\n \n play = True\n \n while play == True:\n \n computer = options[randint(0, 4)]\n user_input = input(\"Please select; Rock, Paper, Scissors, Lizard or Spock\\n\")\n u = user_input.lower()\n \n player = u.capitalize()\n \n print(\"Player: \", player)\n print(\"Computer: \", computer)\n \n ##Tie\n if player == computer:\n print(\"Tie!\")\n \n ##Rock\n elif player ==\"Rock\":\n if computer == \"Paper\":\n print(\"You lose!\", computer, \"covers\", player)\n elif computer == \"Scissors\":\n print(\"You win!\", player, \"smashes\", computer)\n elif computer == \"Lizard\":\n print(\"You win!\", player, \"crushes\", computer)\n elif computer == \"Spock\":\n print(\"You lose!\", computer, \"vaporizes\", player)\n \n \n ##Paper\n elif player ==\"Paper\":\n if computer == \"Scissors\":\n print(\"You lose!\", computer, \"cuts\", player)\n elif computer ==\"Rock\":\n print(\"You win!\", player, \"covers\", computer)\n elif computer == \"Lizard\":\n print(\"You lose!\", computer , \"eats\", player)\n elif computer == \"Spock\":\n print(\"You win!\", player, \"disproves\", computer)\n \n ##Scissors\n elif player == \"Scissors\":\n if computer == \"Paper\":\n print(\"You win!\", player, \"cuts\", computer)\n elif computer == \"Rock\":\n print(\"You lose!\", computer, \"crushes\", player)\n elif computer ==\"Lizard\":\n print(\"You win!\", player, \"decapitates\", computer)\n elif computer == \"Spock\":\n print(\"You lose!\", computer, \"smashes\", player)\n \n ##Lizard\n elif player == \"Lizard\":\n if computer ==\"Rock\":\n print(\"You lose!\", computer, \"crushes\", player)\n elif computer ==\"Paper\":\n print(\"You win!\", player, \"eats\", computer)\n elif computer == \"Scissors\":\n print(\"You lose!\", computer, \"decapitates\", player)\n elif computer == \"Spock\":\n print(\"You win!\", player, \"\", computer)\n \n ##Spock\n elif player == \"Spock\":\n if computer == \"Rock\":\n print(\"You win!\", player, \"vaporizes\", computer)\n elif computer == \"Paper\":\n print(\"You lose!\", computer, \"disproves\", player)\n elif computer == \"Scissors\":\n print(\"You win!\", player, \"smashes\", computer)\n elif computer == \"Lizard\":\n print(\"You lose!\", computer, \"poisons\", player)\n \n \n print(\"Would you like to play again? \\n\")\n answer =input()\n \n if answer.lower() ==\"y\" or answer.lower() ==\"yes\":\n play == True\n else:\n break\n\n&#x200B;\n\n&#x200B;\n\nThis is a game I made a while back, link; [https://github.com/WillPhillipsCVdemo/Rock-Paper-Scissors-Lizard-Spock/blob/master/Game.py](https://github.com/WillPhillipsCVdemo/Rock-Paper-Scissors-Lizard-Spock/blob/master/Game.py)", "upvote_ratio": 0.74, "id": "t3_tz41db", "created_utc": 1649425971.0} +{"sub": "Python", "title": "MicroPython pro-tip: Use WebREPL within your IDE", "selftext": "The repetitive process of editing your code in Thonny IDE, switching over to the WebREPL window, re-selecting your edited code file, re-sending it to your ESP32, and going back to Thonny to fix any bugs can get cumbersome and slow.\n\nHere's a visual tutorial on how to use WebREPL within Thonny. Hope it helps you!\n\n[https://bhave.sh/micropython-webrepl-thonny/](https://bhave.sh/micropython-webrepl-thonny/)", "upvote_ratio": 0.5, "id": "t3_tz3knl", "created_utc": 1649424548.0} +{"sub": "Python", "title": "br4nch 2.0 - Currently in development!", "selftext": "After recieving alot of helpful feedback and feature requests, I have decided to start the development of version 2.0 for br4nch!\n\n*Please visit:* [*https://br4nch.com*](https://br4nch.com) *for helpful links.*\n\n&#x200B;\n\n**Here are some of the upcoming features:**\n\n* Renewing alot of arguments and crucial functions. \u26a0\ufe0f\n* Adding a new 'load.json' function that imports a complete json data file.\n* Adding a new 'export.json' function that exports a branch to a json data file.\n* Adding a new 'list.branches' function.\n* Adding a new 'list.nodes' function.\n* Adding an improved algorithm to search for new updates for br4nch.\n* Adding support for more python versions.\n* Updating documentation.\n* Rewritting alot of other functions.\n\n# \ud83d\udc99\ud83d\udc9b", "upvote_ratio": 0.6, "id": "t3_tz38cy", "created_utc": 1649423481.0} +{"sub": "Python", "title": "Favorite Python Web Framework", "selftext": "Django\nFastAPI\nFlask\nMasonite\nBottle\n\u2026other?\n\nAlso discuss why", "upvote_ratio": 0.93, "id": "t3_tz2v7b", "created_utc": 1649422377.0} +{"sub": "Python", "title": "Does clean code equal \"Workplace\" code", "selftext": "I am a beginner at python and have been following Angela Yu's 100 days of python. I commented on a post regarding my Coffee Machine code been some 400 lines while hers was around 150 lines with the same functionilty.\n\n&#x200B;\n\nThis led me to ask this question of, if code works does it matter if it's clean and pythonic.\n\n&#x200B;\n\nI will reference these two tic toe games below:\n\n&#x200B;\n\n18000 lines (no adherence to DRY but simple to understand)\n\n[https://github.com/asweigart/my\\_first\\_tic\\_tac\\_toe/blob/9f38b04e857426c5a5b80919ad0b5fce0947c022/tictactoe.py](https://github.com/asweigart/my_first_tic_tac_toe/blob/9f38b04e857426c5a5b80919ad0b5fce0947c022/tictactoe.py)\n\n&#x200B;\n\n1 line (I was shocked that such a thing was even possible, considering my tic tac toe code was around 500 lines with no AI. This code is in my opinion way way to complex and one would probably be working in the realm of datasciences/ML to understand such a thing)\n\n[https://www.reddit.com/r/Python/comments/9ozfeq/tictactoe\\_in\\_one\\_line\\_python35/](https://www.reddit.com/r/Python/comments/9ozfeq/tictactoe_in_one_line_python35/)\n\n&#x200B;\n\nBoth programs work, but if one was given only the option of picking from the two, which would be preffered in the workplace? In my opinion, the 18000 line code would be acceptable as it allows all team members, novice or not to atleast have some understanding.\n\n&#x200B;\n\nEDIT: Better late than never, but I realised I have been referencing my tic tac toe code of 500 lines vs the 1 and 18000 liners but havent posted it for comparison.\n\nSo here it is (I do acknowledge that a tic tac toe game has no relevance to the workplace, but is the code structure I used somewhere along the lines of \"hirable\".):\n\n[https://pastebin.com/GBCRiGWe](https://pastebin.com/GBCRiGWe)", "upvote_ratio": 0.5, "id": "t3_tyztcm", "created_utc": 1649410916.0} +{"sub": "Python", "title": "Creating 3D Maps with Python (feat.Mapbox)", "selftext": "**Creating 3D Maps with Python (feat.Mapbox)** \n[https://wooiljeong.github.io/python/mapboxgl\\_map/](https://wooiljeong.github.io/python/mapboxgl_map/)\n\nUsing WGL provided by Mapbox with Python, I visualized apartment prices in Seoul, Korea on a 3D map. The description of the implementation method is in Korean, but the code is also recorded, so there is no difficulty in understanding it. \n\n\nhttps://preview.redd.it/qcnyr389t9s81.png?width=919&format=png&auto=webp&s=d9e1997e4f95119926a04aaa09492a11a3c2be60", "upvote_ratio": 0.57, "id": "t3_tyzbab", "created_utc": 1649408660.0} +{"sub": "Python", "title": "Backgammon Game", "selftext": "A game of backgammon. Written with Python and Cython. I'm interested in artificial intelligence so this program has an ai and can play against itself. It uses the monte-carlo tree search algorithm.\n\nhttps://preview.redd.it/xhkqm66ej8s81.png?width=802&format=png&auto=webp&s=60007f6b59c5471f70b98234be65aa6a9201a551\n\n[https://github.com/Tracing/python-backgammon](https://github.com/Tracing/python-backgammon)", "upvote_ratio": 0.67, "id": "t3_tyvodx", "created_utc": 1649393370.0} +{"sub": "Python", "title": "Best 20 Python Program only for Beginners", "selftext": "The Python programming language is one of the most used languages in the world, especially in data analytics. There are many different types of Python projects that you can do. Some of the most common Python project ideas are listed in this blog.\n\nSource Code: [https://www.myguideinfo.com/search/label/python-projects](https://www.myguideinfo.com/search/label/python-projects)\n\n**The 20 Best Python Projects only for Beginners**\n\n1. Finding Mean, Median, Mode in Python without libraries\n2. Program to Find LCM of two numbers in Python\n3. Find Duplicate Values using Python\n4. Python Program to Check Prime Number\n5. Find Greater Number Using If Function In Python\n6. Taking Multiple User's Input Using While Loop in Python\n7. Create a Digital Clock In Python With Source Code\n8. Create To-Do List Using Python with Source Code\n9. Python Program to Display Calendar with Source Code\n10. Create a Password Generator In Python with Source Code\n11. Python Program to Print all Prime Numbers in an Interval\n12. Python Program to Find the Sum of Natural Numbers\n13. Python Program to Find the Factorial of a Number\n14. Calculate the Area of a Triangle in Python\n15. Python Program to Create a Countdown Timer\n16. Python Program to add two Matrices, Transpose, and Multiply\n17. Contact Management Project In Python With Source Code\n18. Billing System Project In Python With Source Code\n19. Vehicle Inventory System In Python With Source Code\n20. Library Management System In Python with Source Code\n\nSource Code: [https://www.myguideinfo.com/search/label/python-projects](https://www.myguideinfo.com/search/label/python-projects)", "upvote_ratio": 0.45, "id": "t3_tyvlpg", "created_utc": 1649393079.0} +{"sub": "Python", "title": "I'm 13, trying to learn Python.", "selftext": "Where/what do you think I should start, learn first, or do you just have any tips?\n\nAlso, make sure what ever you're suggesting is free. Please.", "upvote_ratio": 0.79, "id": "t3_tyu7kl", "created_utc": 1649388175.0} +{"sub": "Python", "title": "Friday Daily Thread: Free chat Friday! Daily Thread", "selftext": "Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted!", "upvote_ratio": 0.88, "id": "t3_tyqfk8", "created_utc": 1649376010.0} +{"sub": "Python", "title": "With the very little Python experience I have, I coded this little \u201cgame\u201d of uno.", "selftext": "[link to the python code](https://www.onlinegdb.com/Z0no-dI4B)", "upvote_ratio": 0.79, "id": "t3_tymxkf", "created_utc": 1649365805.0} +{"sub": "Python", "title": "Automate Investopedia stock simulator with Investopedia-bot", "selftext": "I made this [program](https://github.com/bassel27/Investopedia-Bot) which allows you to automate Investopedia and compare the stocks you're interested in to take better decisions. What do you think?", "upvote_ratio": 0.6, "id": "t3_tymrnf", "created_utc": 1649365341.0} +{"sub": "Python", "title": "Abandoned Docker Library?", "selftext": "Apologies if this isn't the right forum to raise this. I'm hoping folks here might have some insight or can point me in the right direction. I have a build tool that relies on the official Docker library for Python:\n\n[https://github.com/docker/docker-py](https://github.com/docker/docker-py)\n\nIt seems like this library has been mostly abandoned by Docker. There hasn't been any new commits for almost 6 months, there are a large number of issues and pull requests that appear to be languishing, and the code owners seem to have sparse activity on GitHub.\n\nAnyone know what gives? Is Docker abandoning the Python library since docker compose is being refactored into GoLang?", "upvote_ratio": 0.84, "id": "t3_tylcez", "created_utc": 1649361461.0} +{"sub": "Python", "title": "Getting started with Python - programming in Python 3.", "selftext": "", "upvote_ratio": 0.44, "id": "t3_tyl0o2", "created_utc": 1649360548.0} +{"sub": "Python", "title": "I built an all-in-one Python Web and AI/ML Resources Website", "selftext": "Hey there,\n\nI just built 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:\n\n**1) For Python/Backend:**\n\n\u2022 Django, Flask, FastAPI Articles\n\n\u2022 Django, Flask, FastAPI Forums latest Discussions (Reddit)\n\n\u2022 Django, Flask, FastAPI YouTube Channels Videos\n\n\u2022 Django, Flask, FastAPI Websites\n\n\u2022 Django, Flask, FastAPI E-books, Snippets\n\n\u2022 *Job Opportunities (soon)*\n\n&#x200B;\n\n**2) For Python/AI/ML:**\n\n\u2022 AI/ML Articles\n\n\u2022 AI/ML Forums latest Discussions (Reddit)\n\n\u2022 AI/ML YouTube Channels Videos\n\n\u2022 AI/ML Websites\n\n\u2022 AI/ML E-books, Snippets\n\n\u2022 *Job Opportunities (soon)*\n\n&#x200B;\n\n**Here is the Link \ud83d\udc49** [**helloPython**](https://hellopython.vercel.app/)\n\n&#x200B;\n\nFeel free to give some feedback, I'd like to keep pon working on this project because I love the Python Industry ;) \n\nThank You!", "upvote_ratio": 0.58, "id": "t3_tyi792", "created_utc": 1649352775.0} +{"sub": "Python", "title": "Send me suggestions", "selftext": "Hello, I am 18 and I have started to code last year. I want to check my code (if it is good or not, send me suggestions ;) ) with this example of the ticktacktoe game in the terminal.\n\nAvailable here : [https://github.com/FortisCodis/PyTicTacToe](https://github.com/FortisCodis/PyTicTacToe)\n\nSorry for my bad english I am french...\n\nThanks", "upvote_ratio": 0.17, "id": "t3_tyhe6o", "created_utc": 1649350514.0} +{"sub": "Python", "title": "Build a simple bank management system in python with MySQL", "selftext": "", "upvote_ratio": 0.33, "id": "t3_tyh72s", "created_utc": 1649349924.0} +{"sub": "Python", "title": "Video Introduction to pandas Library in Python", "selftext": "", "upvote_ratio": 0.33, "id": "t3_tygobz", "created_utc": 1649348450.0} +{"sub": "Python", "title": "Documentation is highly valued, but often overlooked", "selftext": "Hi all, In 2017, Github (opensourcesurveyorg) conducted a survey on open source projects, and we believe that in 2022, some issues are still relevant.\n\n&#x200B;\n\nhttps://preview.redd.it/p3nop6uhq4s81.png?width=914&format=png&auto=webp&s=6093f8b9dd8d814002c2b01bff334ecc55f85758\n\nIt shows the importance of documentation in an Open source project and how frustrating it can be if it\u2019s not a priority. Some important things, in my opinion:\n\n1. When you encounter documentation problems, help a maintainer and open a change request to improve them.\n2. Licenses are by far the most important type of documentation for users and contributors.\n3. Documentation helps build engaged communities.\n4. When communicating about a project, use language that is clear and accessible to people who are not born English or do not read English fluently.\n\nI work for an open-source project; please feel free to comment if you have any tips for improving documentation.", "upvote_ratio": 0.62, "id": "t3_tygibq", "created_utc": 1649347990.0} +{"sub": "Python", "title": "Maze Creator", "selftext": "I created a website to create and play with mazes.\n\nWebsite Link: https://desolate-mountain-91027.herokuapp.com/home/\n\nGitHub Link: https://github.com/ShouvikGhosh2048/MazeCreator\n\nI would like feedback on the website and code.", "upvote_ratio": 0.5, "id": "t3_tyg1cd", "created_utc": 1649346669.0} +{"sub": "Python", "title": "Add machine learning to your apps easily with Google's MediaPipe and Python (Beginner's Guide)", "selftext": "Hey everyone!\n\n**I just released** [**this beginner's guide**](https://www.assemblyai.com/blog/mediapipe-for-dummies/) **to using MediaPipe in Python**. MediaPipe provides really easy-to-use APIs for common ML tasks like hand recognition, face tracking, object detection, and more! You can use it to add ML to apps for things like sign language recognition!\n\nHere's a video of how it performs extracting 3D pose data from a video:\n\n&#x200B;\n\nhttps://reddit.com/link/tyftwn/video/w02ochs5n4s81/player\n\nLet me know what you think!", "upvote_ratio": 0.8, "id": "t3_tyftwn", "created_utc": 1649346097.0} +{"sub": "Python", "title": "Friends and I are tired of online tutorials so we\u2019re running a cohort for learning Python with competitive team games", "selftext": "Hi, we\u2019re a group of 4 friends who are working on something we think is cool but want to hear what you think! We\u2019re super early in working on this - if you want this to exist, register interest on [https://delta-academy.xyz](https://delta-academy.xyz/) :)\n\nThe best experiences we had when learning Python were working on projects and hackathons. We also benefited from being in cohorts of learners (e.g. at University) - the friends we made have often lasted.\n\nWe want to combine these two elements - live competitive coding games with a cohort of fellow Python learners. The cohort will be \\~20 people. It\u2019s the format we wanted but couldn\u2019t find online - so we\u2019re creating it!\n\nWe would have to charge for running cohorts (not least to cover the prizes!), but haven\u2019t figured out how much yet - just want to know first if this is something anyone wants!\n\nWe made a short video that hopefully explains everything in 1 min.\n\nhttps://reddit.com/link/tye97u/video/hbsy8qs594s81/player\n\nReally keen to hear feedback. :)", "upvote_ratio": 0.9, "id": "t3_tye97u", "created_utc": 1649341649.0} +{"sub": "Python", "title": "Palmette JS | Python and other language template generator.", "selftext": "Hi everyone,\n\nI recently made this CLI app that can generate a lot of templates (many in python) of different programming language. Can I ask for a review? Is this a good idea or nah?\n\n(You can install it with \"npm install -g palmette-js\")\n\n[https://github.com/PalmetteJS/Palmette-js](https://github.com/PalmetteJS/Palmette-js)", "upvote_ratio": 0.67, "id": "t3_tycthh", "created_utc": 1649337218.0} +{"sub": "Python", "title": "Making a face-controlled keyboard (Python OpenCV + MediaPipe)", "selftext": "", "upvote_ratio": 0.33, "id": "t3_tycls0", "created_utc": 1649336539.0} +{"sub": "Python", "title": "Rtree 1.0 released", "selftext": "", "upvote_ratio": 0.77, "id": "t3_tyb398", "created_utc": 1649331385.0} +{"sub": "Python", "title": "How to summarize text with Python and machine learning", "selftext": "Summarization is a very common task that many developers would like to automate. For example wouldn't it be nice to automatically create a summary of each blog article you're writing? Or automatically summarize documents for your employees? Tons of good applications exist.\n\nIn this article I'm showing how easy it is to perform advanced text summarization in Python thanks to Transformers and Bart Large CNN:\n\n[https://nlpcloud.io/how-to-summarize-text-with-python-and-machine-learning.html](https://nlpcloud.io/how-to-summarize-text-with-python-and-machine-learning.html?utm_source=reddit&utm_campaign=la5u8885-fd8e-21eb-ca80-5242ac13d5ja)\n\nPlease don't hesitate to ask questions if you have any!", "upvote_ratio": 0.85, "id": "t3_tyazf7", "created_utc": 1649330969.0} +{"sub": "Python", "title": "extreqs: parsing package extras from a requirements.txt", "selftext": "I found myself writing the same logic in a couple of `setup.py` scripts so wrote a package to do it: https://pypi.org/project/extreqs/\n\nBroadly, it parses your `extras_require` dict from your `requirements.txt` file using special comments rather than having to define the same thing twice.\n\nAs noted in the documentation, there are situations where you wouldn't want to use this, most commonly for libraries. requirements.txt and package dependencies have different purposes in that case: requirements.txt provides a full, (somewhat) reproducible environment for CI and other developers to get an environment with hard versions and all of your linters etc., where package dependencies provide a minimal, permissive environment to allow as many people to use your library as possible. extreqs is primarily designed for applications (web backends, CLIs etc) which have optional extra functionality.\n\n(N.B. not a beginner but it's not a complicated enough codebase to merit anything else...)", "upvote_ratio": 0.67, "id": "t3_tyapmu", "created_utc": 1649329932.0} +{"sub": "Python", "title": "GitHub - corpnewt/ProperTree: Cross platform GUI plist editor written in python.", "selftext": "", "upvote_ratio": 0.5, "id": "t3_ty8hba", "created_utc": 1649320332.0} +{"sub": "Python", "title": "How To Learn Python", "selftext": "", "upvote_ratio": 0.33, "id": "t3_ty8fp5", "created_utc": 1649320121.0} +{"sub": "Python", "title": "I made a game from scratch in 48 hours for the Ludum Dare with Python", "selftext": "I made all of the code, artwork, sfx, etc. solo during the 48 hours of the Ludum Dare as required by the rules.\n\nhttps://i.redd.it/acex0iv0y1s81.gif\n\nThe game (and its source) are available here:\n\n[https://dafluffypotato.itch.io/explont](https://dafluffypotato.itch.io/explont)\n\nI also [livestreamed almost all of the development](https://www.youtube.com/playlist?list=PLX5fBCkxJmm1is3hgaBi037MEGFjtHJex) and created a [timelapse](https://youtu.be/4cgjYlH2g9g).\n\n&#x200B;\n\nhttps://preview.redd.it/eat9owgny1s81.png?width=631&format=png&auto=webp&s=5cae8fd8386d01c91135a834685bbaeecb97413a", "upvote_ratio": 0.97, "id": "t3_ty6yvn", "created_utc": 1649313627.0} +{"sub": "Python", "title": "Dockersh : A shell for docker commands with autocomplete", "selftext": "Hi everyone,\n\nI was learning Docker and felt that it was hard to remember all the commands and various arguments. I also kept forgetting the names of my containers & images so I decided to build a CLI for Docker using Prompt Toolkit. Hopefully it will be useful for those of you learning & working with devops. Let me know how I can improve. \n\nThe project can be found at [https://github.com/solamarpreet/dockersh](https://github.com/solamarpreet/dockersh)", "upvote_ratio": 0.67, "id": "t3_ty6f0a", "created_utc": 1649311338.0} +{"sub": "Python", "title": "Continuous feedback and the 'definition of done'", "selftext": "Hey! I wrote a post about what I see is sometimes the short fallings of 'definition of done'. Wonder whether you guys agree with it and have been dealing with such issues?\n\n[https://betterprogramming.pub/youre-never-done-by-definition-c04ac77c616b](https://betterprogramming.pub/youre-never-done-by-definition-c04ac77c616b)", "upvote_ratio": 0.5, "id": "t3_ty5lnw", "created_utc": 1649308203.0} +{"sub": "Python", "title": "What is the best Python -> direct executable package / compiler today? (April,2022)", "selftext": "I need to create a few applications that I want to distribute as executables, the options I'm aware of are:\n\nNuitka\n\npyinstaller\n\npy2exe\n\npy2app\n\nWhat else is out there, and what is the BEST?\n\nI'm looking to create a couple of cli's using click, and a couple of GUI's using DearPyGui", "upvote_ratio": 0.93, "id": "t3_ty36vb", "created_utc": 1649299895.0} +{"sub": "Python", "title": "Pong game in just 14 lines.", "selftext": " import pygame \n pygame.init()\n win = pygame.display.set_mode((800, 600))\n clock = pygame.time.Clock()\n rects = [pygame.Rect(0, 0, 20, 60), pygame.Rect(780, 0, 20, 60), pygame.Rect(390, 290, 20, 20)]\n ball_vel = [5, 5]\n while clock.tick(60) and not pygame.QUIT in [event.type for event in pygame.event.get()]:\n keys = pygame.key.get_pressed()\n rects = rects[0].move(0, (keys[pygame.K_s] - keys[pygame.K_w]) * 5).clamp(win.get_rect()), rects[1].move(0, (keys[pygame.K_DOWN] - keys[pygame.K_UP]) * 5).clamp(win.get_rect()), rects[2].move(*ball_vel)\n rects[2].topleft = (390, 290) if rects[2].x < 0 or rects[2].right > 800 else rects[2].topleft\n ball_vel[1], ball_vel[0] = -ball_vel[1] if rects[2].y < 0 or rects[2].bottom > 600 else ball_vel[1], -ball_vel[0] if rects[2].collidelist(rects[:-1]) != -1 else ball_vel[0]\n win.fill((0, 0, 0)) \n [[pygame.draw.rect, pygame.draw.ellipse][1 if rect == rects[2] else 0](win, (255, 255, 255), rect) for rect in rects]\n pygame.display.update()", "upvote_ratio": 0.83, "id": "t3_ty15no", "created_utc": 1649293551.0} +{"sub": "Python", "title": "Thursday Daily Thread: Python Careers, Courses, and Furthering Education!", "selftext": "Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!\n\n**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.**", "upvote_ratio": 0.67, "id": "t3_txzwcj", "created_utc": 1649289609.0} +{"sub": "Python", "title": "I made the game Wordle in Python", "selftext": "This game is somewhat similar to hangman.\n\nYou try to guess a random 5 letter word and the game will tell you the if the placement of each letter is correct or not. Example:\n\n```\nO - correct place\n? - right letter, wrong place\nX - letter is present in word\n\nWord we're looking for: hello\nYour word (input): house\n\nOutput: O?XX?\n```\nThis continues until you guess the word or give up. \n\nYou can look at the code here: [https://github.com/Nextross/Wordle-python](https://github.com/Nextross/Wordle-python)\n\nAny feedback is welcomed!", "upvote_ratio": 0.72, "id": "t3_txvx5q", "created_utc": 1649278243.0} +{"sub": "Python", "title": "The last Python 3.11 alpha (3.11.0a7) is available", "selftext": "", "upvote_ratio": 0.95, "id": "t3_txuukh", "created_utc": 1649275361.0} +{"sub": "Python", "title": "Continuous Feedback over code", "selftext": "Hey everyone! We made something! I wanted to get your feedback on our new open-source platform - Digma. Digma provides observability \ud83d\udd2d over code and makes it relevant to feature development. It gleans code-relevant insights from OpenTelemetry and other sources and provides in-code feedback \ud83d\udcbb. [https://github.com/digma-ai/digma](https://github.com/digma-ai/digma) Python is our first supported language. I'm the author of Digma and am really keen to hear your thoughts!", "upvote_ratio": 0.57, "id": "t3_txrs93", "created_utc": 1649267039.0} +{"sub": "Python", "title": "Blog API built with FastAPI, MySQL, SQLAlchemy, and Alembic", "selftext": "", "upvote_ratio": 0.75, "id": "t3_txrlz4", "created_utc": 1649266567.0} +{"sub": "Python", "title": "A practical introduction solving differential equations numerically", "selftext": "", "upvote_ratio": 0.83, "id": "t3_txq7d2", "created_utc": 1649262787.0} +{"sub": "Python", "title": "Configpile: a modern, typed argparse replacement", "selftext": "I started documenting astronomy code written by a PhD student, and wanted a command-line parsing library that would be self documenting.\n\nThus [ConfigPile](https://denisrosset.github.io/configpile/) was born! It's based on dataclasses with annotated types.\n\nSample code (imports omitted):\n\n @dataclass(frozen=True)\n class Calc(Config):\n \"\"\"\n A simple calculator\n \"\"\"\n\n #: First number to add\n x: Annotated[float, Param.store(parsers.float_parser, short_flag_name=\"-x\")]\n\n #: Second number to add\n y: Annotated[float, Param.store(parsers.float_parser, short_flag_name=\"-y\")]\n\n c = Calc.from_command_line_()\n print(f\"{c.x} + {c.y} = {c.x+c.y}\")\n\nRunning this with \"-h\", you can a nice usage help automatically generated (through a legacy ArgumentParser). The same can feed the [sphinx-argparse](https://sphinx-argparse.readthedocs.io/en/latest/) extension to include documentation in the project web pages.\n\nConfigpile is based on modern Python, is written in mostly functional style, has user-friendly error reporting which accumulates errors instead of bailing out immediately, supports environment variables and INI files.\n\nI'd be super grateful for comments, especially about the documentation and the Python style.\n\nFollow a tutorial here: https://denisrosset.github.io/configpile/tutorial/index.html\n\nLearn about the main concepts here: https://denisrosset.github.io/configpile/concepts/index.html\n\nThe package can be easily installed using `pip install configpile`\n\n(Note: many edits for formatting)", "upvote_ratio": 0.83, "id": "t3_txq6ch", "created_utc": 1649262713.0} +{"sub": "Python", "title": "Show the songs that you are listening to on Telegram. (Like Discord's \"Listening to\") [Recently updated]", "selftext": "", "upvote_ratio": 0.5, "id": "t3_txp8kf", "created_utc": 1649260175.0} +{"sub": "Python", "title": "UNPHAT method for designing apps", "selftext": "I found this to be very useful when thinking about the most important part of writing apps: understanding what to solve and how. It's from https://news.ycombinator.com/item?id=30931831. \n\nNext time you find yourself Googling some cool new technology to (re)build your architecture around, I urge you to stop and follow\u00a0UNPHAT\u00a0instead:\n\nDon\u2019t even start considering solutions until you\u00a0Understand\u00a0the problem. Your goal should be to \u201csolve\u201d the problem mostly within the\u00a0problem\u00a0domain, not the solution domain.\n\neNumerate\u00a0multiple candidate solutions. Don\u2019t just start prodding at your favorite!\n\nConsider a candidate solution, then\u00a0read the\u00a0Paper\u00a0if there is one.\n\nDetermine the\u00a0Historical context\u00a0in which the candidate solution was designed or developed.\n\nWeigh\u00a0Advantages\u00a0against disadvantages.\u00a0Determine what was de-prioritized\u00a0to achieve what\u00a0was\u00a0prioritized.\n\nThink!\u00a0Soberly and humbly ponder how well this solution fits your problem.\u00a0What fact would need to be different for you to change your mind?\u00a0For instance, how much smaller would the data need to be before you\u2019d elect\u00a0not\u00a0to use Hadoop?", "upvote_ratio": 0.67, "id": "t3_txoq2p", "created_utc": 1649258798.0} +{"sub": "Python", "title": "I made a small tool to apply \"color palette restriction\" on images !", "selftext": "I got inspired by /r/place and I wanted to exercice my python skills so I tried to make a tool to redraw images with a specific color palette (/r/place color palette)\n\nHere are some examples :\n\n[Reference image](https://preview.redd.it/3p4us69n7xr81.jpg?width=494&format=pjpg&auto=webp&s=0535c1eed010716f053549eec31a88d4453f2f6e)\n\n[Color palette restriction without dithering](https://preview.redd.it/63df44kt7xr81.png?width=494&format=png&auto=webp&s=341497026bb4dd39dc63718cf792ba1e1f3030ef)\n\n[Color palette restriction with Floyd-Steinberg dithering](https://preview.redd.it/xccpwquw7xr81.png?width=494&format=png&auto=webp&s=8156a2f09de8b2a58c92f72ef90a5b017a1df2a7)\n\nIt can also work with any color palette provided !\n\nAlso, I am using PIL to read and draw on images.\n\n&#x200B;\n\nYou can find the source code here : [https://github.com/nrbt25/image-dithering/tree/master](https://github.com/nrbt25/image-dithering/tree/master) ", "upvote_ratio": 0.97, "id": "t3_txnuzx", "created_utc": 1649256498.0} +{"sub": "Python", "title": "YAML: The Missing Battery in Python", "selftext": "", "upvote_ratio": 0.88, "id": "t3_txmfli", "created_utc": 1649252420.0} +{"sub": "Python", "title": "Programming projects for Physics in Python", "selftext": "So I am looking for some projects to do in Physics using Python ,when I searched for the same in Quora ,it was too hard to even comprehend .\n\nI am ready to do some reading if it is needed ,I don't like learning Python just through some courses ,I think that learning by creating projects will be a good motivation.\n\nI have knowledge of Calc 1,2,3 a bit of Linear Algebra ,basics of solving diff equations .\n\nI am taking Classical Mechancis and Electromagnetism .\n\nAny suggestion ,I am aiming to score an internship with this project .\n\nThank you for reading my post .\n\nHave a nice day", "upvote_ratio": 0.79, "id": "t3_txm6zl", "created_utc": 1649251713.0} +{"sub": "Python", "title": "hello this could be an english vocabulary question, what does comprehension mean from 'List Comprehension'? I already learned that is like set builder notation", "selftext": "", "upvote_ratio": 0.61, "id": "t3_txk1nm", "created_utc": 1649244748.0} +{"sub": "Python", "title": "Scrape Naver Related Search Results with Python", "selftext": "\nFull DIY code:\n\n```python\nimport requests, json\nfrom parsel import Selector # https://parsel.readthedocs.io/\n\n# https://docs.python-requests.org/en/master/user/quickstart/#passing-parameters-in-urls\nparams = {\n \"query\": \"minecraft\", # search query\n \"where\": \"web\" # web results. works with nexearch as well\n}\n\n# https://docs.python-requests.org/en/master/user/quickstart/#custom-headers\nheaders = {\n \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.87 Safari/537.36\",\n}\n\nhtml = requests.get(\"https://search.naver.com/search.naver\", params=params, headers=headers, timeout=30)\nselector = Selector(html.text)\n\nrelated_results = []\n\n# https://www.programiz.com/python-programming/methods/built-in/enumerate\nfor index, related_result in enumerate(selector.css(\".related_srch .keyword\"), start=1):\n keyword = related_result.css(\".tit::text\").get().strip()\n link = f'https://search.naver.com/search.naver{related_result.css(\"a::attr(href)\").get()}'\n\n related_results.append({\n \"position\": index, # 1,2,3..\n \"title\": keyword,\n \"link\": link\n })\n\n\nprint(json.dumps(related_results, indent=2, ensure_ascii=False))\n```\n\nOutputs:\n\n```json\n[\n {\n \"position\": 1,\n \"title\": \"\ub9c8\uc778\ud06c\ub798\ud504\ud2b8\",\n \"link\": \"https://search.naver.com/search.naver?where=nexearch&query=%EB%A7%88%EC%9D%B8%ED%81%AC%EB%9E%98%ED%94%84%ED%8A%B8&ie=utf8&sm=tab_she&qdt=0\"\n },\n {\n \"position\": 2,\n \"title\": \"minecraft \ub73b\",\n \"link\": \"https://search.naver.com/search.naver?where=nexearch&query=minecraft+%EB%9C%BB&ie=utf8&sm=tab_she&qdt=0\"\n },\n {\n \"position\": 3,\n \"title\": \"craft\",\n \"link\": \"https://search.naver.com/search.naver?where=nexearch&query=craft&ie=utf8&sm=tab_she&qdt=0\"\n },\n {\n \"position\": 4,\n \"title\": \"mine\",\n \"link\": \"https://search.naver.com/search.naver?where=nexearch&query=mine&ie=utf8&sm=tab_she&qdt=0\"\n },\n {\n \"position\": 5,\n \"title\": \"mojang\",\n \"link\": \"https://search.naver.com/search.naver?where=nexearch&query=mojang&ie=utf8&sm=tab_she&qdt=0\"\n }\n]\n```\n\nAlternative solution using [Naver Related results API](https://serpapi.com/naver-related-results) from SerpApi:\n\n```python\nfrom serpapi import NaverSearch\nimport os, json\n\nparams = {\n # https://docs.python.org/3/library/os.html#os.getenv\n \"api_key\": os.getenv(\"API_KEY\"), # your serpapi api key\n \"engine\": \"naver\", # search engine to parse results from\n \"query\": \"minecraft\", # search query\n \"where\": \"web\" # web results\n}\n\nsearch = NaverSearch(params) # where data extraction happens\nresults = search.get_dict() # JSON -> Python dictionary\n\nrelated_results = []\n\n# iterate over \"related_results\" and extract position, title and link\nfor related_result in results[\"related_results\"]:\n related_results.append({\n \"position\": related_result[\"position\"],\n \"title\": related_result[\"title\"],\n \"link\": related_result[\"link\"]\n })\n\nprint(json.dumps(related_results, indent=2, ensure_ascii=False))\n```\n\nOutputs:\n\n```json\n[\n {\n \"position\": 1,\n \"title\": \"\ub9c8\uc778\ud06c\ub798\ud504\ud2b8\",\n \"link\": \"https://search.naver.com?where=nexearch&query=%EB%A7%88%EC%9D%B8%ED%81%AC%EB%9E%98%ED%94%84%ED%8A%B8&ie=utf8&sm=tab_she&qdt=0\"\n },\n {\n \"position\": 2,\n \"title\": \"minecraft \ub73b\",\n \"link\": \"https://search.naver.com?where=nexearch&query=minecraft+%EB%9C%BB&ie=utf8&sm=tab_she&qdt=0\"\n },\n {\n \"position\": 3,\n \"title\": \"craft\",\n \"link\": \"https://search.naver.com?where=nexearch&query=craft&ie=utf8&sm=tab_she&qdt=0\"\n },\n {\n \"position\": 4,\n \"title\": \"mine\",\n \"link\": \"https://search.naver.com?where=nexearch&query=mine&ie=utf8&sm=tab_she&qdt=0\"\n },\n {\n \"position\": 5,\n \"title\": \"mojang\",\n \"link\": \"https://search.naver.com?where=nexearch&query=mojang&ie=utf8&sm=tab_she&qdt=0\"\n }\n]\n```\n\nThe difference between DIY and API solution is that you don't need to create the parser from scratch, maintain it, or figure out how to bypass blocks from Naver.\n\nFull blog post: https://serpapi.com/blog/scrape-naver-related-search-results-with-python/", "upvote_ratio": 0.4, "id": "t3_txif8z", "created_utc": 1649238341.0} +{"sub": "Python", "title": "Extending pylint with plugins", "selftext": "", "upvote_ratio": 0.5, "id": "t3_txfsuz", "created_utc": 1649226686.0} +{"sub": "Python", "title": "A Practical Introduction To Web Scraping With Python", "selftext": "", "upvote_ratio": 0.96, "id": "t3_txf65f", "created_utc": 1649224130.0} +{"sub": "Python", "title": "Python email sender", "selftext": " Hi everyone, I have created a script that sends an email to whoever I want using data retrieved from an API (I chose News API, and it will send me the top 20 news of the day).\n\n[https://github.com/jrodriigues/news-email-sender](https://github.com/jrodriigues/news-email-sender)\n\nTake a look, let me know what you think, and how to improve it!", "upvote_ratio": 0.56, "id": "t3_txd85l", "created_utc": 1649217069.0} +{"sub": "Python", "title": "I made my first ever programming assignment into a youtube tutorial", "selftext": "", "upvote_ratio": 0.5, "id": "t3_txbulk", "created_utc": 1649212511.0} +{"sub": "Python", "title": "Termtyper - Typing in terminal is fun !", "selftext": "Termtyper is a TUI (Text User Interface) typing application that provides you a great feel with typing with a lot of options to tweak!\n\nIt is highly inspired by [monkeytype](https://monkeytype.com/)\n\nIt is built on top of [textual](https://github.com/Textualize/textual) which provides the UI for the application\n\ngithub: [https://github.com/kraanzu/termtyper](https://github.com/kraanzu/termtyper)\n\n&#x200B;\n\nhttps://reddit.com/link/txbsdd/video/ojo8k2o3mtr81/player", "upvote_ratio": 0.82, "id": "t3_txbsdd", "created_utc": 1649212316.0} +{"sub": "Python", "title": "Wednesday Daily Thread: Beginner questions", "selftext": "New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!\n\nThis 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.", "upvote_ratio": 1.0, "id": "t3_tx8uqj", "created_utc": 1649203209.0} +{"sub": "Python", "title": "Why and how to use conda?", "selftext": "I'm a data scientist and my main is python. I use quite a lot of libraries picked from github. However, every time I see in the readme that installation should be done with conda, I know I'm in for a bad time. Never works for me. \n\nEven installing conda is stupid. I'm sure there is a reason why there is no \"apt install conda\"... \n\nWhy use conda? In which situation is it the best option? Anyone can help me see the light?", "upvote_ratio": 0.9, "id": "t3_tx73j8", "created_utc": 1649198092.0} +{"sub": "Python", "title": "Online coding video tutorials - Opinions", "selftext": "Hello everyone,\n\nI am currently creating some space science + Python [YouTube tutorials](https://youtube.com/c/Astroniz). In these videos I do some coding and provide some explanations on what I am doing, the science behind it etc.\n\nNow I was wondering whether this is a good approach at all. I really like creating some content on YouTube (no I am not a professional one with my few 100 subscribers), and I am eager to improve it steadily. However I thought that \"live coding\" may take too much time and isn't easy to follow. My idea is to explain e.g., science related Jupyter Notebook cells in the videos to shorten the length. The code is provided on GitHub anyway, so a viewer could follow my tutorial (and thoughts) more easily. The coding would be reduced to a minimum and the focus could move to the \"non coding\" part.\n\nAny ideas or comments would be appreciated!\n\nThomas", "upvote_ratio": 0.6, "id": "t3_tx6k1q", "created_utc": 1649196551.0} +{"sub": "Python", "title": "Rubik's Cube Model in Python using OOP", "selftext": "I've been thinking for a while about developing a model to simulate a Rubik's cube in Python. I wanted to make use of object-oriented programming, and this project was the perfect excuse to get down to work. \ud83d\udcbb\u2328\ufe0f\ud83d\udd96\n\nhttps://carlosgrande.me/rubiks-cube-model/", "upvote_ratio": 0.78, "id": "t3_tx6gfb", "created_utc": 1649196238.0} +{"sub": "Python", "title": "What happened between SciPy creater Travis Oliphant and Enthought?", "selftext": "I was listening to his interview on the [Lex Friedman podcast](https://open.spotify.com/episode/2U2AkSSuAzmZi7nmGzJboW?si=28e8c7d915e04f75) and he mentioned that he is no longer friends with the founder of Enthought because he started Anaconda. I can't find any details online, does anyone know the story?", "upvote_ratio": 0.79, "id": "t3_tx67bv", "created_utc": 1649195579.0} +{"sub": "Python", "title": "My first package to pypi. Connpy: Network connection manager and automation module", "selftext": "Hi!\n\nSo a little bit of background, I'm a network engineer (ccie), with 10+ years of experience in networking, and i'm a really lazy guy so usually i try to automate and script everything. long time ago i created my bash connection manager and been using it since. A month ago i decided it was time to upgrade it to python and add the automation function i always wanted, and that is how connpy was born.\n\nI'm not a programmer so it may have some issues! let me know.\n\n[https://github.com/fluzzi/connpy/](https://github.com/fluzzi/connpy/) <- here is the link, it also have some documentation it should be easy to use. It's created for linux as it's what i use everyday but i did some testing on macos and it should work.\n\n## connection manager\n\nFirst its the connection manager, it adds the commands conn/connpy to shell, and you can add all the devices you manage easily:\n\n- conn --add server1\n\nyou can add folders and subfolders to organize your devices. i use to work with a lot of clients so i have like 400+ nodes divided in multiples folders.\n\n- conn --add \"@office\" \n- conn --add \"@servers@office\"\n- conn --add server2@servers@office\n- conn --add server3@servers@office\n- conn --add router1@office\n\nwhen you are creating a new node to connect, it allows you to refer profiles, this way you can manage passwords and other information in 1 place and use it in multiple nodes.\n\n- conn profile --add officeuser\n\nthen you reference inside the node configuration using \"@officeuser\". \n\nyou can use profiles to send multiple passwords in case you use 1 or more jumphosts.\n\nOnce the nodes are created you just connect to them without passwords.\n- conn server1\n- conn server2@servers@home\n- conn server\n\n## automation module\n\nthis is the new feature, once you created your nodes you can use them with the automation module\n\n- import connpy\n- config = connpy.configfile()\n- server1 = config.getitem(\"server1@office\")\n- router1 = config.getitem(\"router@office\")\n- server = connpy.node(\"server1\",**server1,config = config)\n- router = connpy.node(\"router1\",**router1,config = config)\n- print(router.run([\"term len 0\", \"show run\"]))\n- if server.test(\"ls -la\", \"folder to find\"):\n- print(\"folder found\")\n- else:\n- print(\"missing folder\")\n\nYou can also run in multiple devices at the same time using class nodes. (more in the documentation)\n\nHope someone find it useful!!\nthanks!", "upvote_ratio": 0.67, "id": "t3_tx604l", "created_utc": 1649195030.0} +{"sub": "Python", "title": "\"Bicycle or Metro\": My first interactive web app using Dash/Flask.", "selftext": "I collected data from the Google Direction API and built an interactive app comparing travel duration times between Bicycle and Public Transportation in Santiago, Chile.\n\nEach specific route to a point in the map can be accessed by clicking on the destination point, and the relevant information will be displayed.\n\nThe app is deployed on Heroku (forgive the slow response): [http://biciometro.herokuapp.com](http://biciometro.herokuapp.com) . The website is in Spanish, but its features should be easy to understand.\n\n**Tools:**\n\n* For the GeoJSON grid, I used this [grid creator](https://cityofaustin.github.io/geojson-grid/#). I used Pandas, Dash, Plotly, NumPy and Mapbox. Everything is coded in Python.\n* Source code for the app: [https://github.com/mirkosimunovic/biciometro](https://github.com/mirkosimunovic/biciometro)\n* Please show support with a Github star if you like the project. Thank you!", "upvote_ratio": 0.81, "id": "t3_tx4xj4", "created_utc": 1649192222.0} +{"sub": "Python", "title": "Create a timelapse of any canvas area and any timeframe of r/place", "selftext": "[(Github) Source code and download](https://github.com/gislerro/rplace-cropped-timelapse-creator)\n\nConfiguration in the config.yaml file:\n\n* range of images to create timelapse for [(archive of snapshots here)](https://rplace.space/combined/)\n* granularity of frames (take every n-th image - determines speed of timelapse)\n* top-left coordinates of the canvas timelapse\n* width & height of the canvas\n* mp4 output dimensions & name\n\n&#x200B;\n\n[Example](https://reddit.com/link/tx3x67/video/vgytvsfpprr81/player)", "upvote_ratio": 0.87, "id": "t3_tx3x67", "created_utc": 1649189564.0} +{"sub": "Python", "title": "Applications of Python", "selftext": "Hey! Anyone who is interested in learning about the applications of python in the field of automation should check out [this](https://medium.com/@Nick_27/automation-using-python-66ec75a6b0ba) article. \n\nIt really encourages you to learn more about the language!", "upvote_ratio": 0.3, "id": "t3_tx0enu", "created_utc": 1649180149.0} +{"sub": "Python", "title": "Learning Python", "selftext": "Python just makes so much freaking sense! LOVING IT!!", "upvote_ratio": 0.8, "id": "t3_tx0cns", "created_utc": 1649179997.0} +{"sub": "Python", "title": "Running a live 45-minutes session on the fundamentals of observability, OpenTelemetry, and distributed tracing with microservices messaging systems (Kafka, RabbitMQ, etc)", "selftext": "Hi everyone, we're running another live OpenTelemetry and observability fundamentals session - Wednesday, April 20 at 11 AM PDT.\n\nYou will learn how to instrument your message brokers and apps to capture traces with OpenTelemetry.\n\nThis session is at no cost and vendor-neutral.\n\nYou can expect in this session: 45 minutes of core concepts, how to deploy it yourself hands-on + Q&A.\n\nIf you are interested in observability, OpenTelemetry, and tracing - join!\n\nRegister here [https://www.aspecto.io/opentelemetry-fundamentals/messaging-systems/](https://www.aspecto.io/opentelemetry-fundamentals/messaging-systems/?utm_source=post&utm_medium=reddit&utm_campaign=r-python-opentelemetry-fundamentals-messaging-systems)", "upvote_ratio": 0.4, "id": "t3_tx097t", "created_utc": 1649179745.0} +{"sub": "Python", "title": "As of today, how well does Anaconda run on M1 MacBook Pro?", "selftext": "Last year, there was an article from the developer that they were working on M1 version of the software suite. However, I don't seem to hear any news after that. Are they still working on it? I recall there were some compatibility issues with some packages last year. How well does it run on M1 MacBook Pro as of today? Are Anaconda and its packages fully compatible with M1 Mac now? ", "upvote_ratio": 0.75, "id": "t3_tww564", "created_utc": 1649168665.0} +{"sub": "Python", "title": "Attending my first PyCon US 2022 (SLC) - tips?", "selftext": "What recommendations would you have for someone new to this conference?\n\nI am new to programming and a beginner learning python (self-taught). Hoping to network, learn about new ideas to get my excited, and do some running in a new place.", "upvote_ratio": 0.9, "id": "t3_twr5wj", "created_utc": 1649151796.0} +{"sub": "Python", "title": "Reason to go from Python3.9 to 3.10 ?", "selftext": "I don't find and real advantages and all i have to do works fine on 3.9.\n\nChange my mind.", "upvote_ratio": 0.42, "id": "t3_twq7my", "created_utc": 1649147520.0} +{"sub": "Python", "title": "I'm presenting live in 6 hours at Microsoft Reactor online about troubleshooting Python applications, especially on Kubernetes. (Part 2 of the Python on Kubernetes series.) Let me know your questions in advance", "selftext": "", "upvote_ratio": 0.89, "id": "t3_twpt1m", "created_utc": 1649145681.0} +{"sub": "Python", "title": "Python Firebird-driver 1.4.3 released", "selftext": "", "upvote_ratio": 0.71, "id": "t3_twpopx", "created_utc": 1649145186.0} +{"sub": "Python", "title": "How to Execute SQL Queries in Python and R Tutorial", "selftext": "", "upvote_ratio": 0.58, "id": "t3_twpo9w", "created_utc": 1649145127.0} +{"sub": "Python", "title": "Community for Python app developers", "selftext": "Hey, I'm curious if there is a dedicated community of Python developers who are making apps with frontend interface. (As opposed to data analysis or training ML models). \n\nFor example, developers who are using Streamlit or Anvil. (Are there any other big ones?)\n\nDo you know any such communities?", "upvote_ratio": 0.64, "id": "t3_twpbuw", "created_utc": 1649143631.0} +{"sub": "Python", "title": "Python and the Truth", "selftext": "Hi folks,\n\nExcited to share some notes on Python's Truth values, their internals, and possible applications.\n\n[https://towardsdatascience.com/python-and-the-truth-90cf08380246](https://towardsdatascience.com/python-and-the-truth-90cf08380246)\n\nThanks and happy reading!", "upvote_ratio": 0.5, "id": "t3_twoqza", "created_utc": 1649141265.0} +{"sub": "Python", "title": "Why is Python becoming indispensable in IoT Industry?", "selftext": " IoT Applications are usually pre-built SaaS (software-as-a-service) applications. These can present and analyze captured IoT sensor data to businesses via dashboards. They use machine learning algorithms and analyze huge amounts of connected sensor data in the cloud. Real-time IoT alerts and dashboards provide you visibility into key performance indicators, statistics for the meantime between failures, and other details.", "upvote_ratio": 0.27, "id": "t3_two0m1", "created_utc": 1649138209.0} +{"sub": "Python", "title": "I got a little problem with my visualization program.", "selftext": "I find a great code of visualizing the PSO algorithm in 2D. And I tried to change it into 3D.I've done the majority part of it, but now the particles just don't update, they superpose over the old ones.\n\n[Figure shows like this](https://preview.redd.it/fhiagfvecnr81.png?width=1102&format=png&auto=webp&s=6ed3c223f26d9407aecc242b2facc2e23458e16f)\n\n&#x200B;\n\nHere is the code link\uff1a\n\n[https://linkode.org/#LsQHmirehTrbP1pqXEI2Q5](https://linkode.org/#LsQHmirehTrbP1pqXEI2Q5)", "upvote_ratio": 0.5, "id": "t3_twm7ke", "created_utc": 1649131590.0} +{"sub": "Python", "title": "Visualize Differential Equations", "selftext": "[https://www.youtube.com/watch?v=gH47pQHeKDE](https://www.youtube.com/watch?v=gH47pQHeKDE)\n\nNormalize for your highest order derivative and plug in your initial conditions to numerically solve any differential equation", "upvote_ratio": 0.57, "id": "t3_twjqds", "created_utc": 1649123664.0} +{"sub": "Python", "title": "Use nested GitHub Action Runners to reduce costs by up to 50% for multiple jobs in one workflow", "selftext": "", "upvote_ratio": 0.9, "id": "t3_twhorh", "created_utc": 1649117806.0} +{"sub": "Python", "title": "Tuesday Daily Thread: Advanced questions", "selftext": "Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.\n\n**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.**\n\nThis 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.", "upvote_ratio": 0.72, "id": "t3_twha21", "created_utc": 1649116810.0} +{"sub": "Python", "title": "Predicting the Champions League with Python! (21/22)", "selftext": "", "upvote_ratio": 0.67, "id": "t3_twgvyu", "created_utc": 1649115763.0} +{"sub": "Python", "title": "I published my first tutorial on YouTube: Insertion sort explained + Python code", "selftext": "", "upvote_ratio": 0.71, "id": "t3_twe9kh", "created_utc": 1649109341.0} +{"sub": "Python", "title": "I made use of Zoho Sheets and used it as a database engine", "selftext": "I started working on this yesterday and have just finished rewriting it into classes and publishing it as a PyPI project :)\n\nThis module uses Zoho Sheets (which is completely free to use) as a way to store data.\nI'm keen on the development of ZohoDB.py and aiming to keep improving it's performance in order to make it a kinda production-ready module :)\n\nWould love to hear your feedback on this one\nhttps://github.com/oddmario/zohodb.py", "upvote_ratio": 0.86, "id": "t3_tw954f", "created_utc": 1649096725.0} +{"sub": "Python", "title": "Create python logo on r/place", "selftext": "I in the r/place we can create a python logo on 384,1618", "upvote_ratio": 0.29, "id": "t3_tw8p3f", "created_utc": 1649095625.0} +{"sub": "Python", "title": "Voice Controlled Switch Using Arduino & Python", "selftext": "", "upvote_ratio": 1.0, "id": "t3_tw8ace", "created_utc": 1649094644.0} +{"sub": "Python", "title": "Python f-strings Are More Powerful Than You Might Think", "selftext": "", "upvote_ratio": 0.93, "id": "t3_tw69i5", "created_utc": 1649089724.0} +{"sub": "Python", "title": "Book for python network programming", "selftext": "Hey folks, can you please recommend a good book(s) for network programming? Something that would cover subjects from low level TCP/IP, to SMTP/SSH/HTTP/etc libraries? Thanks in advance!", "upvote_ratio": 1.0, "id": "t3_tw5tru", "created_utc": 1649088639.0} +{"sub": "Python", "title": "Head-first Kubernetes - A hands-on tutorial for beginners", "selftext": "", "upvote_ratio": 0.85, "id": "t3_tw50n4", "created_utc": 1649086671.0} +{"sub": "Python", "title": "Active Learning in Machine Learning Explained", "selftext": "", "upvote_ratio": 0.57, "id": "t3_tw4o2v", "created_utc": 1649085795.0} +{"sub": "Python", "title": "Can my IT department tell (without any sortve deep dive) that I'm using a python script to login?", "selftext": "I have to do timesheets for my crew every morning, and it takes about twenty minutes a day. I've long since thought I could automate this, and write a little proof of concept and it worked. \n\nIt would however involve using pyautogui to enter my login information including password into our time management software. Do you think this could get me into shit with the IT department?", "upvote_ratio": 0.95, "id": "t3_tw2ozp", "created_utc": 1649080757.0} +{"sub": "Python", "title": "StackSocial Discount. Are their courses any good?", "selftext": "I saw that they were offering a 'complete Python certification bundle' for $35 'reduced from $2k' if you can believe that. \n\nI'm beginner to intermediate - written some Flask websites and programmed some automated stuff, so I was wondering if anyone would recommend this sort of thing to get into Python programming professionally?", "upvote_ratio": 0.43, "id": "t3_tw2ihc", "created_utc": 1649080260.0} +{"sub": "Python", "title": "Rock, Paper, Scissors", "selftext": "LMK what I can do differently. Thanks!\n\n&#x200B;\n\nrunning = True \nwhile running: \n player1 = input(\" (Player1) Rock, Paper, or Scissors:\\\\n >\") \n player2 = input(\" (Player 2) Rock, Paper, or Scissors:\\\\n >\") \n \n if player1.lower() == \"rock\" and player2.lower() == \"scissors\": \n print(\"Player 1 Wins!\") \n if player2.lower() == \"rock\" and player1.lower() == \"scissors\": \n print(\"Player 1 Wins!\") \n if player1.lower() == \"paper\" and player2.lower() == \"scissors\": \n print(\"Player 2 Wins!\") \n if player2.lower() == \"paper\" and player1.lower() == \"scissors\": \n print(\"Player 1 Wins!\") \n if player1.lower() == \"rock\" and player2.lower() == \"paper\": \n print(\"Player 2 Wins\") \n if player2.lower() == \"rock\" and player1.lower() == \"paper\": \n print(\"Player 1 Wins\") \n playing = input(\"Do you want to keep playing? y/n \\\\n > \") \n if playing.lower() == \"n\": \n break \n if playing.lower() == \"y\": \n running = True", "upvote_ratio": 0.6, "id": "t3_tw0wkp", "created_utc": 1649075628.0} +{"sub": "Python", "title": "Solving and Animating the 3D Double Pendulum in Python: Sympy for algebra, Scipy for numerically solving differential equations, and vpython for 3D animation", "selftext": "", "upvote_ratio": 0.81, "id": "t3_tw0eck", "created_utc": 1649073978.0} +{"sub": "Python", "title": "ConfigParser - manage user-editable settings for your Python programs", "selftext": "", "upvote_ratio": 0.43, "id": "t3_tvzwqb", "created_utc": 1649072412.0} +{"sub": "Python", "title": "Scraping Naver Videos in Python", "selftext": "Full code: \n\n```python\nimport requests, os, json\nfrom parsel import Selector\n\n\ndef parsel_scrape_naver_videos():\n params = {\n \"query\": \"minecraft\", # search query\n \"where\": \"video\" # video results\n }\n\n headers = {\n \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.87 Safari/537.36\",\n }\n\n html = requests.get(\"https://search.naver.com/search.naver\", params=params, headers=headers, timeout=30)\n selector = Selector(html.text) # very similar to bs4, except parsel supports Xpath \n\n video_results = []\n\n for video in selector.css(\".video_bx\"):\n # https://parsel.readthedocs.io/en/latest/usage.html#using-selectors\n title = video.css(\".text::text\").get()\n link = video.css(\".info_title::attr(href)\").get()\n thumbnail = video.css(\".thumb_area img::attr(src)\").get()\n channel = video.css(\".channel::text\").get()\n origin = video.css(\".origin::text\").get()\n video_duration = video.css(\".time::text\").get()\n views = video.css(\".desc_group .desc:nth-child(1)::text\").get()\n date_published = video.css(\".desc_group .desc:nth-child(2)::text\").get()\n\n video_results.append({\n \"title\": title,\n \"link\": link,\n \"thumbnail\": thumbnail,\n \"channel\": channel,\n \"origin\": origin,\n \"video_duration\": video_duration,\n \"views\": views,\n \"date_published\": date_published\n })\n \n print(json.dumps(video_results, indent=2, ensure_ascii=False))\n```\n\nPart of the output:\n\n```json\n[\n {\n \"title\": \" : \ud83c\udf32 How to build Survival Wooden Base (#3)\",\n \"link\": \"https://www.youtube.com/watch?v=n6crYM0D4DI\",\n \"thumbnail\": \"https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fn6crYM0D4DI%2Fmqdefault.jpg&type=ac612_350\",\n \"channel\": \"\uc18c\ud53c Sopypie\",\n \"origin\": \"Youtube\",\n \"video_duration\": \"24:06\",\n \"views\": \"671\",\n \"date_published\": \"4\uc77c \uc804\"\n },\n {\n \"title\": \"\ub9c8\uc778\ud06c\ub798\ud504\ud2b8 \ubb34\ud55c\uc21c\ud658 \uc774\ub860 (\",\n \"link\": \"https://www.youtube.com/watch?v=kQ7wyG9mShQ\",\n \"thumbnail\": \"https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FkQ7wyG9mShQ%2Fmqdefault.jpg&type=ac612_350\",\n \"channel\": \"TV\ube14\ub8e8\uc704\ud0a4\",\n \"origin\": \"Youtube\",\n \"video_duration\": \"01:44\",\n \"views\": \"9\ub9cc\",\n \"date_published\": \"2022.02.15.\"\n } ... other results\n]\n```\n\nBlog post link if you need code explanation: https://serpapi.com/blog/scrape-naver-video-results-with-python/", "upvote_ratio": 0.5, "id": "t3_tvzlgk", "created_utc": 1649071317.0} +{"sub": "Python", "title": "Creating A Modern Python Development Environment", "selftext": "", "upvote_ratio": 0.69, "id": "t3_tvyvov", "created_utc": 1649068761.0} +{"sub": "Python", "title": "Different types of implementation of polymorphism", "selftext": "Hi All,\n\nI am reading about OOP in python and wonder if we implement ` __add__`, `__sub__` etc, it looks to me thst we are doing operator overloding. So my question is, that is it correct to think like that and does this implementation falls under AdHoc polymorphism in python.\n\nThanks\nPradeep", "upvote_ratio": 0.6, "id": "t3_tvx5ee", "created_utc": 1649061795.0} +{"sub": "Python", "title": "CaptchaCracker - Deep Learning-based Captcha Recognizer", "selftext": "Hello!\n\nI made a python open source project.\n\n**Github Repository:** [https://github.com/WooilJeong/CaptchaCracker](https://github.com/WooilJeong/CaptchaCracker)\n\n# CaptchaCracker\n\n## Introduction\n\nCaptchaCracker is an open source Python library that provides functions to create and apply deep learning models for Captcha Image recognition. You can create a deep learning model that recognizes numbers in the Captcha Image as shown below and outputs a string of numbers, or you can try the model yourself.\n\n## Input\n\nhttps://preview.redd.it/qltiatrqxgr81.png?width=250&format=png&auto=webp&s=8e4d370203ff502b4681c8b35a8fee1cff7fd259\n\n## Output\n\n 023062\n\n## Installation\n\n pip install CaptchaCracker\n\n## Dependency\n\n pip install numpy==1.19.5 tensorflow==2.5.0\n\n## Examples\n\n## Train and save the model\n\nBefore executing model training, training data image files in which the actual value of the Captcha image is indicated in the file name should be prepared as shown below.\n\n* [Download Sample Dataset](https://github.com/WooilJeong/CaptchaCracker/raw/main/sample.zip)\n\nhttps://preview.redd.it/n451dp4sxgr81.png?width=1009&format=png&auto=webp&s=2c0173b4d685f73642edbfd780ae3fdf4d921bdf\n\n import glob\n from CaptchaCracker import CreateModel\n \n train_img_path_list = glob.glob(\"../data/train_numbers_only/*.png\")\n \n CM = CreateModel(train_img_path_list)\n model = CM.train_model(epochs=100)\n model.save_weights(\"../model/weights.h5\")\n\n## Load a saved model to make predictions\n\n from CaptchaCracker import ApplyModel\n \n weights_path = \"../model/weights.h5\"\n AM = ApplyModel(weights_path)\n \n target_img_path = \"../data/target.png\"\n pred = AM.predict(target_img_path)\n print(pred)", "upvote_ratio": 0.56, "id": "t3_tvwizf", "created_utc": 1649059109.0} +{"sub": "Python", "title": "QualityScaler 1.1.0 - Image/video upscaling & enhancement GUI app based on BRSGAN & RealSR_JPEG", "selftext": "Image/video upscaling GUI app based on BRSGAN & RealSR\\_JPEG\n\n[GUI interface](https://preview.redd.it/9rxldsstugr81.png?width=1392&format=png&auto=webp&s=4760f210cb169dc95679b5a5183ed0e142cbbad4)\n\n## Links.\n\nGithub -> [https://github.com/Djdefrag/QualityScaler/releases/tag/1.1.0](https://github.com/Djdefrag/QualityScaler/releases/tag/1.1.0)\n\nItch -> [https://jangystudio.itch.io/qualityscaler](https://jangystudio.itch.io/qualityscaler)\n\n## Credits.\n\n*BSRGAN -* [*https://github.com/cszn/BSRGAN*](https://github.com/cszn/BSRGAN) *|* [*https://arxiv.org/abs/2103.14006*](https://arxiv.org/abs/2103.14006)\n\n*RealSR\\_JPEG -* [*https://github.com/jixiaozhong/RealS*](https://github.com/jixiaozhong/RealS)R | [https://arxiv.org/pdf/2005.01996.pdf](https://arxiv.org/pdf/2005.01996.pdf)\n\n## Installation.\n\nQualityScaler is completely portable; just download, unzip and execute the file .exe\n\n## Supported AI Backend.\n\n* Nvidia Cuda \\[v10.2\\]\n* CPU \\[works without GPU, but is very slow\\]\n\n## Features.\n\n* Easy to use GUI\n* Images and video upscale\n* Drag&drop files \\[image/multiple images/video\\]\n* Different upscale factors:\n * auto - automatic choose best upscale factor for the GPU used (to avoid running out of VRAM)\n * x1\u00a0 \u00a0- will mantain same resolution but will reconstruct the image (ideal for bigger images)\u00a0\n * x2\u00a0 \u00a0- upscale factor 2: 500x500px -> 1000x1000px\n * x4\u00a0 \u00a0- upscale factor 4: 500x500px -> 2000x2000px\n* Cpu and Gpu \\[cuda\\] backend\n* Compatible images - PNG, JPEG, BMP, WEBP, TIF\u00a0\u00a0\n* Compatible video\u00a0 - MP4, WEBM, GIF, MKV, FLV, AVI, MOV\u00a0\n\n## Next steps.\n\n1. Use both model for the upscale\n2. Include audio for upscaled video\n3. Support for other GPUs (AMD, Intel) with new backend\n\n## Example.\n\nOriginal photo (200x200 px)\n\nhttps://preview.redd.it/3yb1t6nxugr81.png?width=220&format=png&auto=webp&s=b950ff4af4cfcb5e2fe97cece00f9b4c7c3f1698\n\nBSRGAN (800x800 px)\n\nhttps://preview.redd.it/wghr3c7yugr81.png?width=880&format=png&auto=webp&s=67360909111338bfb01e111e1fab8cdd6c3531e7\n\nRealSR\\_JPEG (800x800 px)\n\nhttps://preview.redd.it/blh6vmlyugr81.png?width=880&format=png&auto=webp&s=68af9f79d102b2c906f8c54bb84fdef44b6db7d2", "upvote_ratio": 0.83, "id": "t3_tvwbu7", "created_utc": 1649058226.0} +{"sub": "Python", "title": "Machine Learning Sandbox in Python", "selftext": "Hope you are doing well. I was reaching out to share one of my projects with all of you . The idea was to build a sandbox of ML algorithms that people could use to demonstrate classical ML algorithms and also break down the same with simple from-the-scratch implementation in Python. You can simply fork the repo and start running the algorithms. I hope you find it useful. Do let me know your feedback on the same and if I can make any improvements in this.\n\n&#x200B;\n\nProject Link: [https://github.com/devAmoghS/Machine-Learning-with-Python](https://github.com/devAmoghS/Machine-Learning-with-Python)", "upvote_ratio": 0.9, "id": "t3_tvw388", "created_utc": 1649057193.0} +{"sub": "Python", "title": "Is List Comprehension The Most Effective Way to Solve Any Tasks? | Python", "selftext": "", "upvote_ratio": 0.25, "id": "t3_tvut3j", "created_utc": 1649052016.0} +{"sub": "Python", "title": "Choosing Python over other languages", "selftext": "This is an interesting blog that I read. It's written by Brett Cannon who is a core developer of Python. It essentially explain why you shouldn't automatically ignore Python because it's not as fast as some other programs.\n\n&#x200B;\n\n [Selecting a programming language can be a form of premature optimization (snarky.ca)](https://snarky.ca/programming-language-selection-is-a-form-of-premature-optimization/)", "upvote_ratio": 0.69, "id": "t3_tvubzw", "created_utc": 1649050282.0} +{"sub": "Python", "title": "Open-Source python package to find relevant images for a sentence", "selftext": "&#x200B;\n\n[Search results for \\\\\"a happy potato\\\\\"](https://preview.redd.it/2cnopvno0gr81.jpg?width=744&format=pjpg&auto=webp&s=eecc9e9948c386fbd959289257c347fa19c35644)\n\nYou **don't** need to caption the images for the search to work, and it is **not** just limited to objects in the image but an overall understanding built using a neural network trained on images/text found on internet.\n\nThis is what [CLIP-as-service](https://github.com/jina-ai/clip-as-service) enables. It is an open-source library to create embeddings of images and text using CLIP. These embeddings can be used to find the relevant images for any sentence.\n\n**What is CLIP?**\n\nCLIP is a Neural Network trained on variety of images and natural language sentences available on the internet. It enables understanding of concepts in an image as natural language. This can be used for cases such as searching image by text or describing an image in natural language.\n\nThe demo screenshot shown in the post is an example showing relevant images for a particular query sentence.\n\nMore info on Github readme about how to achieve this\n\n* Source code: [https://github.com/jina-ai/clip-as-service](https://github.com/jina-ai/clip-as-service)\n* License: Apache 2.0\n\nWhat would you use it for? And what next features/improvements should I work on?", "upvote_ratio": 0.86, "id": "t3_tvs0dp", "created_utc": 1649042711.0} +{"sub": "Python", "title": "If you're bored at work or school.", "selftext": "Try to open Python Idle and Import antigravity module\n\n`import antigravity`\n\nThen laugh.", "upvote_ratio": 0.87, "id": "t3_tvp8uf", "created_utc": 1649034470.0} +{"sub": "Python", "title": "swagger-gen: the Swagger spec generator you've been waiting for", "selftext": "Hey Python people,\n\nAs a .NET developer by day, I've always been bummed by the lack of real Swagger spec generators available for Flask compared to Swashbuckle for ASP.NET. I personally don't want to write some markup or clutter the service with a bunch of code to generate the docs, I wanted something that would generate the spec for you, with no setup required, with optional features to expand the detail of the documentation.\n\nSo I built that! If you like Swagger, you'll like this. It's a pretty full-featured library, but I'm sure there's room for improvement and welcome any friends that'd like to contribute.\n\n[https://pypi.org/project/swagger-gen/](https://pypi.org/project/swagger-gen/)\n\n[https://github.com/danleonard-nj/swagger-gen](https://github.com/danleonard-nj/swagger-gen)\n\nThanks for checking it out :)", "upvote_ratio": 1.0, "id": "t3_tvp63o", "created_utc": 1649034247.0} +{"sub": "Python", "title": "Is r/Python participating in r/place?", "selftext": "If so, where can one get involved?", "upvote_ratio": 0.25, "id": "t3_tvom5q", "created_utc": 1649032639.0} +{"sub": "Python", "title": "iMandelbrot is a tool made out of PyGame that visualizes the nature of a Mandelbrot fractal!", "selftext": "# Mandelbrot: An Interactive Module\n\n**iMandelbrot** is a **learning aid** purely made out of **PyGame** that visualizes the nature of a **Mandelbrot** fractal!\n\nGitHub Link: [https://github.com/wonmor/iMandelbrot-Plotter](https://github.com/wonmor/iMandelbrot-Plotter)\n\n## Public Release 1.2.0\n\n**DEVELOPED** AND **MAINTAINED** BY **JOHN SEONG** \u2022 **MIT** LICENSE\n\n[Download for **Intel-based Macs**](https://github.com/wonmor/iMandelbrot-Plotter/raw/main/installer/iMandelbrot_Mac.dmg) \u2192 Make sure to turn on the '**Open Using Rosetta**' option on **M1 Macs**!\n\n## Why Our Product Is Sexier Than Others\n\nFor the sake of **optimization**, **iMandelbrot** only generates the coordinates above the x-axis \u2014 basically duplicating to the corresponding coordinates below the horizontal line.\n\n&#x200B;\n\nhttps://preview.redd.it/jr48nb5fper81.png?width=3456&format=png&auto=webp&s=3b116ded17242fd28d1f685145f0d283932eb5a5", "upvote_ratio": 0.67, "id": "t3_tvofnv", "created_utc": 1649032116.0} +{"sub": "Python", "title": "Monday Daily Thread: Project ideas!", "selftext": "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.", "upvote_ratio": 0.81, "id": "t3_tvnusp", "created_utc": 1649030411.0} +{"sub": "Python", "title": "Python libraries for hierarchical or multilevel time series analysis", "selftext": "What are the python libraries best suited for analyzing time series with hierachical or multiple levels like geographic levels between neighborhoods within cities and cities within states.", "upvote_ratio": 0.76, "id": "t3_tvmdfk", "created_utc": 1649026196.0} +{"sub": "Python", "title": "Python and Blockchains", "selftext": "Why is Python is not used as much in blockchain technology, Specially in the core of blockchains", "upvote_ratio": 0.22, "id": "t3_tvl7m8", "created_utc": 1649023159.0} +{"sub": "Python", "title": "Two new articles this week: Beginner tutorial on classes and object-oriented programming with exercises and Python careers research", "selftext": "Hi all,\n\nIn the last few days, I had a lot of fun publishing two brand new articles for you: \n\n\n* [Python Classes Zero to Expert: A Tutorial with Exercises](https://codesolid.com/getting-started-with-python-classes/) \nFor new programmers just beginning with Python and learning about object orientation, this beginner-focused article covers the basics in some detail, with exercises at the end to reinforce what you've learned. \n\n* [Best Python Careers: New Research Reveals Top Fields](https://codesolid.com/career-paths-for-python-programmers/) \nBased on my own experience in the industry as well as job board research, I detail how many jobs there are in different areas of Python programming and what sorts of hoops you might need to jump through to break into the field.\n\nPlease upvote if you like them, and enjoy!", "upvote_ratio": 0.85, "id": "t3_tvkqlt", "created_utc": 1649021930.0} +{"sub": "Python", "title": "we need to make the python logo in r/place", "selftext": "Don't you think? Imo it would be so cool if some of us got together and started to plan it :)", "upvote_ratio": 0.19, "id": "t3_tvjg5x", "created_utc": 1649018716.0} +{"sub": "Python", "title": "Twitter read and analysis", "selftext": " # Import tweepy to work with the twitter API\n import tweepy as tw\n \n # Import numpy and pandas to work with dataframes\n import numpy as np\n import pandas as pd\n \n from matplotlib import pyplot as plt\n \n consumer_key ='mycode'\n consumer_secret = 'mycode'\n \n access_token ='mycode'\n access_token_secret = 'mycode'\n \n # Authenticate\n auth = tw.OAuthHandler(consumer_key, consumer_secret)\n # Set Tokens\n auth.set_access_token(access_token, access_token_secret)\n # Instantiate API\n api = tw.API(auth, wait_on_rate_limit=True)\n \n hashtag = \"#slap\"\n query = tw.Cursor(api.search_tweets, q=hashtag).items(1000)\n tweets = [{'Tweet':tweet.text, 'Timestamp':tweet.created_at} for tweet in query]\n print(tweets)\n \n df = pd.DataFrame.from_dict(tweets)\n df.head()\n \n willsmith_handle = ['willsmith', 'will smith', 'will', 'smith', 'slap\\'s']\n \n def identify_subject(tweet, refs):\n flag = 0\n for ref in refs:\n if tweet.find(ref) != -1:\n flag = 1\n return flag\n \n df['will smith'] = df['Tweet'].apply(lambda x: identify_subject(x, willsmith_handle))\n df.head(10)\n \n df.to_csv('Twitter_feed.csv', encoding='utf-8')\n\n \n\nA working process based on an online tutorial. The code takes in twitter tweets and exports them to csv file.\n\nI'm going to try and expand to read the sentiment and feedback of different tweets.", "upvote_ratio": 0.6, "id": "t3_tvj90z", "created_utc": 1649018223.0} +{"sub": "Python", "title": "Dice roll Probability", "selftext": " import random\n import collections\n import time\n \n ##Outcome\tList of Combinations\tTotal\n ##2\t1+1\t1\n ##3\t1+2, 2+1\t2\n ##4\t1+3, 2+2, 3+1\t3\n ##5\t1+4, 2+3, 3+2, 4+1\t4\n ##6\t1+5, 2+4, 3+3, 4+2, 5+1\t5\n ##7\t1+6, 2+5, 3+4, 4+3, 5+2, 6+1\t6\n ##8\t2+6, 3+5, 4+4, 5+3, 6+2\t5\n ##9\t3+6, 4+5, 5+4, 6+3\t4\n ##10\t4+6, 5+5, 6+4\t3\n ##11\t5+6, 6+5\t2\n ##12\t6+6\t1\n \n \n \n #create list\n dice_list=[]\n \n for i in range(1,7):\n #dice 1\n dice1= i\n \n for j in range(1,7):\n #dice 2\n dice2= j\n #dice total\n dice_reads=dice1+dice2\n \n ##add to list\n dice_list.append(dice_reads)\n \n ##sort list\n dice_list.sort()\n \n ##dictionary\n probability = {}\n \n ##Place a Bet\n User_bet = input(\"Enter a bet between 2 to 12: \")\n \n \n ###using collections.Counter for number frequency\n probability=collections.Counter(dice_list)\n \n # printing the probability\n #print(probability)\n \n ##percentage method\n def math_percentage(User_bet):\n print(\"The user bets a \"+str(User_bet))\n for dice in probability:\n prob=probability[dice]\n percentage=round(float(((prob)*100)/36))\n #print(\"The percentage of a \"+str(dice) +\" is \"+str(percentage)+ \" %\")\n if dice==int(User_bet):\n print(\"The percentage of a \" + str(dice) + \" is \" + str(percentage) + \" %\")\n \n ##Pause\n time.sleep(10)\n \n ##call method\n math_percentage(User_bet)\n \n ##100 dice rolls\n for i in range(0,1):\n #dice 1\n dice1= (random.randint(1,6))\n #dice 2\n dice2= (random.randint(1,6))\n #dice total\n dice_reads=dice1+dice2\n \n print(\"Dice reads: \"+str(dice_reads))", "upvote_ratio": 0.33, "id": "t3_tvinqx", "created_utc": 1649016754.0} +{"sub": "Python", "title": "Who exactly is a python developer? I know this is a broad term which include many paths. But do we have to cover them all to become one? much like, one term to rule them all?", "selftext": "Hii all \n\nI've seen the term \"Python developer\" been around online, and the roadmap to become one. As we all know, it does include many paths, web dev, analysis, DS, ML and so on. To be called a python dev, do we actually need to cover all potential paths and then just choose one? or we should be able to do anything under this big umbrella term? \n\nMy question is coming from my interest in learning python and DS. That's when I started my journey. I am still in process of learning. But I also want to learn some kills related for backend dev via python. For many reasons, first even though my love goes for DS but there's less opportunities and more competition. (as far as I know). So, probably having extra skills can add value or come in handy for model production. Also, I won't mind working as backend dev, as I'll def use DS in research for later future plans. \n\nWhen I share this with someone, like my interest in DS and web dev. I got the response of these are totally different and I am heading to the wrong direction (well, maybe I am) but I wanted to cover my interest in more of a broader term like \"python dev\" but there's the fact that some of the paths under this term I don't have much of interest in.\n\nShould I specify myself as python dev with some specific libraries \"Generally speaking\". I do understand when it come to job haunting I should be more specific like looking for DS, analysis...etc. \n\nBut let's say I want include sth in my linkedin bio. I don't want to throw analysis, DS, ML, web dev all at once. I was considering python dev and then when it's come to job haunting I can pick and choose. \n\nI hope this is not a weird question :)", "upvote_ratio": 0.42, "id": "t3_tvi6ql", "created_utc": 1649015670.0} +{"sub": "Python", "title": "python logo in r/place", "selftext": "guys let\u2019s make the python logo\ndiscuss coordinates and such in the comments", "upvote_ratio": 0.3, "id": "t3_tvhwuf", "created_utc": 1649015005.0} +{"sub": "Python", "title": "I am working on some 3D reconstruction using TOMVIZ, does anybody know any tutorial for segmentation in this software?", "selftext": "", "upvote_ratio": 0.33, "id": "t3_tvhi0d", "created_utc": 1649014055.0} +{"sub": "Python", "title": "Introducing File Folder Hider! (made with Tkinter Python)", "selftext": "I've been working on this project for a couple of months now, first it was in the from of a terminal where the user had to give certain commands to get the job done, but now, its a fully-fledged GUI with buttons and labels to guide you. It has its two main features, \"Hide\" and \"Unhide\", which help you hide and unhide any file and/or folder from the File Explorer (more in the readme.txt). Moreover, you can opt in optionally to enter your email address and in case you ever forget the Master Password used to access the program, you can press the \"Forgot Password\" button to have a recovery code sent to your email and after verifying, you will be allowed to change the current Master Password, or if you happen to remember it again, simply go back to the main menu (because you've already verified yourself through the recovery procedure, it is safe to assume the user is the correct one). One thing to keep in mind is that all the credentials (the Master Password and your email address specifically) are encoded to ensure minimum security. At least that's better than none at all. Another important thing to note is that some command prompt screens will appear when running the program and hiding/unhiding the files/folders. That is a side-effect of trying to have the program run on the user level in order to get around permission issues and not running as admin, so sorry for that.\n\nLinks:\n\nFile Folder Hider repository: [File Folder Hider on Github](https://github.com/Mubashir78/File_Folder_Hider_with_dialog_box)\n\nMy other repositories (basically to my Github profile): [My Profile on Github (Mubashir78)](https://github.com/Mubashir78)\n\nPlease feel free to try it out for your daily routine and let me know your guys' feedback in the comments!\n\n[Dialog box for when creating\\/changing Master Password. Email is optional as it says](https://preview.redd.it/if9ff53mqcr81.png?width=502&format=png&auto=webp&s=2b074f0ee02eec7f5e5394fe291a6ebf95432a5e)\n\n[Main Menu Dialog Box \\(after successfully creating\\/entering the Master Password\\)](https://preview.redd.it/63y52tj0scr81.png?width=501&format=png&auto=webp&s=75fb030989360f44e6e922927211b199ce5dfefe)\n\n[Dialog box for after creating the Master Password and entering the email and running the program again. Incase of not adding an email, the \\\\\"Forgot Password\\\\\" is grayed out and an \\\\\"?\\\\\" icon shows up which tells you that you haven't added email in order to use the feature when hovering over it](https://preview.redd.it/rkxmbcp7tcr81.png?width=404&format=png&auto=webp&s=2618f24e11794d151e83000f5ceebe04da14e056)", "upvote_ratio": 0.75, "id": "t3_tvflrx", "created_utc": 1649009385.0} +{"sub": "Python", "title": "I made a video comparing different data storage formats that python users should consider. Feedback welcome!", "selftext": "", "upvote_ratio": 0.75, "id": "t3_tver6p", "created_utc": 1649007270.0} +{"sub": "Python", "title": "Easier Regexps", "selftext": "", "upvote_ratio": 0.2, "id": "t3_tveh1e", "created_utc": 1649006548.0} +{"sub": "Python", "title": "A Redux inspired store pattern for asyncio applications - SimpleEventMonitor", "selftext": "So, recently I had to deal with the issue of setting up a solution to monitor a few on-prem deployments for health status. The on-prem clusters were configured to send emails with multiple tables with the status of every node etc.\n\nWell, it is a pretty straightforward solution was writing a python script to check the mailbox for new mail and download recent mail from the cluster, parse the mail and for each table entry verify for failed nodes and create an alert ticket of each node. I stumbled upon a [Github Project](https://github.com/wichmannpas/simple-mail-monitoring) that does something like this.\n\nConsidering the job was pretty much done, I was able to quickly use that script to do basic email retrieval and write parsers for my mail and get the job done in a few hours.\n\nHowever, the code felt very complicated and it was pretty much thrown away, but after giving it a few hours of solace at home, it occurred to me, this kind of problem could be better tackled with queues or pubsub model and it has been a while I have played around with python. I wanted to avoid the hassle of setting up Redis/rabbitmq etc, I was rather looking for something like redux for python applications, which I can use to separate out my data producers and consumers.\n\nI had a few things in my mind for this side project :\n\n\\- In memory pubsub\n\n\\- Use asyncio\n\n\\- Be able to schedule events without cron tasks\n\n\\- Unobtrusive pattern to design my python code into producer and consumer model\n\n\\- Ability to develop pull-based data sync, which can connect to your real time data feed\n\nHere is the basic hello world program which demonstrates how you can create a publisher function and schedule it with run\\_every to execute every 180 seconds after the last execution.\n\n[aioredux hello world](https://preview.redd.it/6vb91s6accr81.png?width=3164&format=png&auto=webp&s=6de8ffdbda5fad9eb22404325887e8873a105c60)\n\nHere is the link to my [fork](https://github.com/aregee/simple-mail-monitoring) of the Simple Mail Monitoring Github project, which utilizes this pattern to run the existing functionality provided by the original source.\n\nI can't share my private repo, but I must say after moving that hackish script to this slightly better hack has made the code so clean and flexible, we have not just accomplished that email report task, but rather we are able to see many more such use cases internally where we can utilize this pattern.\n\nPlease feel free to share your thoughts, feedback, or even pull requests on the project.", "upvote_ratio": 0.73, "id": "t3_tve7uh", "created_utc": 1649005890.0} +{"sub": "Python", "title": "magic-timer: Conveniently get a rough idea of how long things take. (package)", "selftext": "", "upvote_ratio": 0.62, "id": "t3_tvcnmr", "created_utc": 1649001856.0} +{"sub": "Python", "title": "Darts in higher dimensions", "selftext": "While browsing YouTube, I came across the following video in which a little puzzle is presented that is solved mathematically. Using maths, an answer was presented that I validated by implementing a simulation. \n\nI thought this was a fun little challenge to program. Maybe others want to give it a go as well? \nHow would you have approached this? \n\n\nVideo: [https://www.youtube.com/watch?v=6\\_yU9eJ0NxA](https://www.youtube.com/watch?v=6_yU9eJ0NxA) \nMy code: [https://gitlab.com/JeroenStiers/scripts/-/blob/main/darts\\_in\\_higher\\_dimensions.py](https://gitlab.com/JeroenStiers/scripts/-/blob/main/darts_in_higher_dimensions.py)", "upvote_ratio": 0.63, "id": "t3_tvbluw", "created_utc": 1648999132.0} +{"sub": "Python", "title": "r/Place", "selftext": "Are people interested in putting the 2 snakes in there?", "upvote_ratio": 0.22, "id": "t3_tvakqu", "created_utc": 1648996309.0} +{"sub": "Python", "title": "Simple and Super Easy-to-use Colabs", "selftext": "[Github](https://github.com/BreezeWhite/interesting-colabs)\n\nTired of figuring out how to use a research demo colab? Feeling lost in the arrangements of all the messy colab blocks and information?\n\nI want to share my personal collections of colabs that is definitely easy to use. This is not just another \u201cawesome list\u201d series of repo, with just links to the original resources. All the colabs within this collections are refactored and deliberately simplified by me. And I can promise you that they are all super easy to use, even your 6-year-old child would know how to use. \n\nThere are at most three code blocks to be executed!! Minimum steps are required to get directly to the expected final results. Example outputs are also provided to have a quick experience. Everything is just simple and clean, no lengthy and confusing intros, nor chaotic arrangements of blocks.\n\nI will continually update the repo, adding more interesting yet hard to get started projects. Feel free to comment and leave feedbacks below. If you know something is really awesome and interesting, but just no way to figure out how to use, I would be very happy adding to the list and wrapping it!", "upvote_ratio": 0.75, "id": "t3_tva26l", "created_utc": 1648994803.0} +{"sub": "Python", "title": "Instagram bot and Data gathering with GUI", "selftext": "Hi,\n\nInstaMachine is a post-oriented Instagram bot which means it is more focused on gathering data and storing it inside the SQLite database. I made this app solely to put to test my web scraping abilities as a beginner programmer and build up some portfolio, therefore I did not use any python's Instagram library such as instapy.\n\n[https://github.com/theRJorj/Insta-Machine](https://github.com/theRJorj/Insta-Machine)\n\nI would appreciate your feedback on any aspects of this project\n\n[InstaMachine](https://preview.redd.it/8gftzkswibr81.png?width=1500&format=png&auto=webp&s=e5c30426a7429a8c9245914df4c03862d8ac566e)", "upvote_ratio": 0.5, "id": "t3_tv9nz9", "created_utc": 1648993681.0} +{"sub": "Python", "title": "Python beginners created these games based on my tutorials! What do you think?", "selftext": "", "upvote_ratio": 0.68, "id": "t3_tv9cin", "created_utc": 1648992723.0} +{"sub": "Python", "title": "Python open-source OpenBB Terminal against Bloomberg Terminal", "selftext": "", "upvote_ratio": 0.95, "id": "t3_tv7xqp", "created_utc": 1648988114.0} +{"sub": "Python", "title": "How is PyPy Tested?", "selftext": "", "upvote_ratio": 0.83, "id": "t3_tv7nyw", "created_utc": 1648987167.0} +{"sub": "Python", "title": "PtPython as default Django shell - my first Django package", "selftext": "Hey there!\n\nI've built a package to use PtPython as default Django shell.\n\nDue to extra functionalities of PtPython, I'm using that rather than Python and maybe many of you using ptpython too so I tried to make it default shell in Django framework.\n\nYou can give it a try:\n\n`pip install django-ptpython`\n\nGithub repository: [https://github.com/reganto/django-ptpython/](https://github.com/reganto/django-ptpython/)\n\nPyPi: [https://pypi.org/project/django-ptpython/](https://pypi.org/project/django-ptpython/)\n\n&#x200B;\n\nI'd like to get your feedbacks.\n\nThank you.", "upvote_ratio": 1.0, "id": "t3_tv7jej", "created_utc": 1648986698.0} +{"sub": "Python", "title": "Python dictionary implementation", "selftext": "", "upvote_ratio": 0.73, "id": "t3_tv4p4i", "created_utc": 1648974980.0} +{"sub": "Python", "title": "Share Python Code Snippets Like A Pro Without Using GitHub", "selftext": "", "upvote_ratio": 0.38, "id": "t3_tv33br", "created_utc": 1648968433.0} +{"sub": "Python", "title": "Python Selenium Tutorial #7 - Save & Reuse Cookies", "selftext": "", "upvote_ratio": 0.91, "id": "t3_tv2rby", "created_utc": 1648967078.0} +{"sub": "Python", "title": "What Lies Between the Fibonacci Numbers?", "selftext": "Enjoy this brief video, where we examine the Fibonacci numbers by using a Jupyter Notebook. It is this easy, and you can get started today!\n\n[https://www.youtube.com/watch?v=Ge0k4kS9wE8](https://www.youtube.com/watch?v=Ge0k4kS9wE8)\n\nIn this little python video, we have a look at Fibonacci numbers. First, we try a few functions to generate the normal numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, ... Then we look at what happens between these numbers. If Fx is the xth Fibonacci number, then F7 = 8 and F8 = 13, but then what is F7.5? Join me and find out!\n\nThe notebook used in this video is available at:\n\n[https://colab.research.google.com/drive/1K6jWQSXzhCz9sOy5SyEHA-k4samWhWhr](https://colab.research.google.com/drive/1K6jWQSXzhCz9sOy5SyEHA-k4samWhWhr)", "upvote_ratio": 0.6, "id": "t3_tv1yd2", "created_utc": 1648963949.0} +{"sub": "Python", "title": "Data Visualization and simple Regression using Dash", "selftext": "Hi guys, I created my first application with Dash and am excited to share it.\n\nIt's a simple tool for analyzing already cleaned datasets. You can upload any dataset but generally it caps out at 100MB. Eventually, i'm hoping to allow for bigger datasets.\n\nsite: [https://www.regress.me/](https://www.regress.me/)\n\nsource: [https://github.com/SuljicAmar/Regress.me](https://github.com/SuljicAmar/Regress.me)\n\nI have a ton more planned for this (logistic/ mixed effects etc) but would love to hear any thoughts from others!\n\nhttps://reddit.com/link/tv1tq9/video/nnintgojxcr81/player\n\nEDIT: Added 3D plots, to initial visualizations and to fit\n\n&#x200B;\n\nhttps://reddit.com/link/tv1tq9/video/a17qsfy5hdr81/player", "upvote_ratio": 0.97, "id": "t3_tv1tq9", "created_utc": 1648963469.0} +{"sub": "Python", "title": "Python App", "selftext": "Hello, I did a simple app on Python. This app is making a common shortcut from several. You can test it right here: [https://github.com/naelxd/Nepo](https://github.com/naelxd/Nepo)\n\nI will be very glad to read your opinions and advices. Thanks!\n\nhttps://i.redd.it/m7ytbr2i18r81.gif", "upvote_ratio": 0.17, "id": "t3_tuy9d5", "created_utc": 1648951431.0} +{"sub": "Python", "title": "Sunday Daily Thread: What's everyone working on this week?", "selftext": "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.", "upvote_ratio": 0.92, "id": "t3_tuwz6h", "created_utc": 1648944010.0} +{"sub": "Python", "title": "Naming convention for type aliases", "selftext": "I recently did a remote technical challenge/interview through a company that does assessments for other companys.\n\nI scored very well, but they made a comment that they didn't like my naming convention, and marked me down in one category. The part they didn't like was:\n\n SimpleTable = Dict[str, Dict[str, str]]\n\nThey're saying `SimpleTable` should be `simple_table`. I cased it the way I did because it's used as a type for hinting.\n\nWhat are people's thoughts here? I can't find anything official.", "upvote_ratio": 0.9, "id": "t3_tuvz80", "created_utc": 1648941052.0} +{"sub": "Python", "title": "A commit from my lead dev: \"Improve readability\".", "selftext": "I don't get it. Help!\n\nhttps://preview.redd.it/emb8jxjrv6r81.png?width=607&format=png&auto=webp&s=871eae5047ac3c13dcba968fa2b49dd707469287", "upvote_ratio": 0.83, "id": "t3_tuuq5l", "created_utc": 1648937544.0} +{"sub": "Python", "title": "Space Science with Python - Asteroids meet Deep Learning #10", "selftext": "Hey everyone,\n\ntoday I'd like to show you how to optimize a Conv1D network using [Keras-Tuner](https://keras.io/keras_tuner/). It enables one to automatically test some pre-defined networks; or it applies Bayesian or Hyperband optimization to find the best model!\n\nIn our case, we'll use it to find a good convolutional neural network for asteroid spectra to distinguish between 4 classes.\n\nLink to video: [https://youtu.be/vhr48KgL-Ys](https://youtu.be/vhr48KgL-Ys)\n\nCorresponding Code: [https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/10\\_dl\\_hyperparameter\\_search.ipynb](https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/10_dl_hyperparameter_search.ipynb)\n\nPlease note that this is tutorial #10 in a long series of space science related videos. Feel free to take a look in the corresponding [playlist](https://www.youtube.com/playlist?list=PLNvIBWkEdZ2gagAcgm44cplgSvQ_Cmvbv) or on [my channel](https://www.youtube.com/c/Astroniz).\n\nTutorial #10 concludes the classification task. In the next 3 videos we'll take a look at Autoencoders and how to classify or identify different asteroid spectra in a low-dimensional latent space.\n\nStay tuned!\n\nThomas", "upvote_ratio": 0.8, "id": "t3_tuuc31", "created_utc": 1648936504.0} +{"sub": "Python", "title": "Cloud server", "selftext": "I made an API to managing files remotely, it's protected from directory traversal, shells and more!\n\n[https://github.com/ZSendokame/ViCl](https://github.com/ZSendokame/ViCl)\n\nI wan't to improve it, so if you have any ideas or feedback please leave it on comments", "upvote_ratio": 0.73, "id": "t3_tuszb4", "created_utc": 1648932845.0} +{"sub": "Python", "title": "Beautiful circos plots in Python", "selftext": "Circos is one of the most popular software packages for displaying the inter-relationships between data in a matrix. For example, in the bioinformatics field, circos style plots are often used for visualizing genomic similarities and features. However, the original package is implemented in Perl, and the other derived packages were also developed based on R or d3.js. Thus, there are no practical tools for drawing circos plots in matplotlib. \n\nHere, I made [pyCircos](https://github.com/ponnhide/pyCircos) that allow drawing circos plots with matplotlib. By using this package, not only circos plots but also complex polar plots can be quickly drawn.\n\nI hope the package help users visualize a beautiful polar plot. \n\n\n[Example plots of pyCircos](https://preview.redd.it/v3g1huqtt5r81.png?width=2952&format=png&auto=webp&s=f8d8bf0f876d9facb27a12974793d70f9570e84b)\n\nAdditionally, example code can be executed on [Google colab.](https://colab.research.google.com/drive/1xmAnv7AHWUTA2HWfjqV1lFWkFMSLJHG0?usp=sharing)", "upvote_ratio": 0.78, "id": "t3_tupzwe", "created_utc": 1648924973.0} +{"sub": "Python", "title": "GitHub - minimaxir/imgbeddings: Python package to generate image embeddings with CLIP without PyTorch/TensorFlow", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tuokyp", "created_utc": 1648921291.0} +{"sub": "Python", "title": "Free and reliable language translation API for developers", "selftext": "Hi Pythons,\n\nFor years now, I have been developing and maintaining the [deep-translator](https://github.com/nidhaloff/deep-translator) package.\n\nRecently, I started working on an API based on it and I want to show it to you. The API is based on fastapi and deep-translator. I deployed a \"basic\" version on azure, you can [try it out here](https://deep-translator-api.azurewebsites.net/)\n\nIf you want to check the API code, you can [find it here](https://github.com/nidhaloff/deep-translator-api)\n\nI built the API as an extension to deep-translator to make it easier for other developers/enthusiasts to build apps/websites in their preferred languages and make use of deep-translator through the API. \n\nIn [this issue](https://github.com/nidhaloff/deep-translator/issues/144), I suggested building a translation website or desktop app based on deep-translator. Maybe there are people here, who will find this interesting.\n\n&#x200B;\n\n&#x200B;\n\n# TL:DR\n\nI built a free translation API based on deep-translator and fastapi.\n\nAPI repo: [https://github.com/nidhaloff/deep-translator-api](https://github.com/nidhaloff/deep-translator-api)\n\ndeep-translator repo: [https://github.com/nidhaloff/deep-translator](https://github.com/nidhaloff/deep-translator)\n\nSwagger UI: [https://deep-translator-api.azurewebsites.net/](https://deep-translator-api.azurewebsites.net/)", "upvote_ratio": 0.8, "id": "t3_tunvta", "created_utc": 1648919507.0} +{"sub": "Python", "title": "Help building a Python logo in r/place!", "selftext": "we are currently working at 1270 x 888 near the belgium flag\n\n[https://www.reddit.com/r/placepython/comments/ttxp46/rplacepython\\_lounge/](https://www.reddit.com/r/placepython/comments/ttxp46/rplacepython_lounge/)\n\n[https://www.reddit.com/r/placepython/comments/tungzi/starting\\_again\\_at\\_1270\\_x\\_888\\_near\\_the\\_belgium\\_flag/](https://www.reddit.com/r/placepython/comments/tungzi/starting_again_at_1270_x_888_near_the_belgium_flag/)", "upvote_ratio": 0.68, "id": "t3_tuno8s", "created_utc": 1648918996.0} +{"sub": "Python", "title": "Python GUI Programming With Tkinter \u2013 Real Python", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tulmi2", "created_utc": 1648913791.0} +{"sub": "Python", "title": "ORM by dataclass with type hints\u2728\u2728\u2728", "selftext": "&#x200B;\n\nhttps://preview.redd.it/vvsaiq7yl4r81.png?width=754&format=png&auto=webp&s=b71bdbfcaabf44d9d52cf1743d1caa26c1efd92f\n\nhttps://preview.redd.it/v6qf97zcl4r81.png?width=1118&format=png&auto=webp&s=281417df407d2cc011e3e02ed61da5791bcc3c3a\n\nsee more at [https://strongbugman.github.io/danio/](https://strongbugman.github.io/danio/), thanks for any suggestion", "upvote_ratio": 0.64, "id": "t3_tukdgh", "created_utc": 1648910416.0} +{"sub": "Python", "title": "we need a python logo in r/place", "selftext": "let's choose a good pixel art logo and draw it somewhere.", "upvote_ratio": 0.48, "id": "t3_tuizod", "created_utc": 1648906468.0} +{"sub": "Python", "title": "py-terraform: Python binding for Terraform", "selftext": "Hi, I wrote a Python binding for Terraform which called [**py-libterraform**](https://github.com/Prodesire/py-libterraform).\n\nTerraform is a great tool for deploying resources. If you need to call the Terraform command in the Python program for deployment, a new process needs to be created to execute the Terraform command on the system. A typical example of this is the [python-terraform](https://github.com/beelit94/python-terraform) library. Doing so has the following problems:\n\n* Requires Terraform commands on the system.\n* The overhead of starting a new process is relatively high.\n\nThis library compiles Terraform as a **dynamic link library** in advance, and then loads it for calling. So there is no need to install Terraform, nor to start a new process.\n\nIn addition, since the Terraform dynamic link library is loaded, this library can further call Terraform's **internal capabilities**, such as parsing Terraform config files.\n\nFeel free to use it and look forward to your feedback!", "upvote_ratio": 0.92, "id": "t3_tuiv20", "created_utc": 1648906072.0} +{"sub": "Python", "title": "An Example of Automated Hacking with Python", "selftext": "", "upvote_ratio": 0.94, "id": "t3_tuhe59", "created_utc": 1648901266.0} +{"sub": "Python", "title": "Gradually Migrating Python Code to asyncio", "selftext": "", "upvote_ratio": 0.81, "id": "t3_tuhb11", "created_utc": 1648900968.0} +{"sub": "Python", "title": "PyTermGUI now lets you export your terminal contents as an SVG screenshot!", "selftext": "https://preview.redd.it/qg9lyct0s3r81.png?width=1487&format=png&auto=webp&s=7659c8f8280d642bbf36ca4caf512a6377eb1202\n\n**Note**: None of the images in this post are actual, OS-side screenshots, rather images exported by the module.\n\nHey there!\n\nInspired by Rich's upcoming offering, the newest version of my TUI project, [PyTermGUI](https://github.com/bczsalba/pytermgui) supports exporting terminal content as a window-mimicking screenshot! Unlike the aforementioned module, PTG also supports exporting positionally-printed items accurately.\n\nWe also support exporting as a plain, static HTML file which could be very useful for documentation purposes.\n\nhttps://preview.redd.it/1cbazpc6s3r81.png?width=1562&format=png&auto=webp&s=2cbfee8e95bd081bb239a0ab1c21fecc2ec2eea6\n\nhttps://preview.redd.it/4hxei7jot3r81.png?width=1422&format=png&auto=webp&s=e3be4313cebeb8f8f3f081ed6357a97aef1f3041\n\nIf any of this sounds interesting, feel free to check out the [release notes](https://github.com/bczsalba/pytermgui/releases/tag/v4.3.0), or join us at r/PyTermGUI!", "upvote_ratio": 0.84, "id": "t3_tuh5ej", "created_utc": 1648900443.0} +{"sub": "Python", "title": "I made a simple access-code protected webpage. Any suggestions on how I can improve?", "selftext": "So for fun, I am making a webpage that can be only access through a 4 digit access code. Nothing fancy. No Username or password. I hardcoded a 4 digit pin in the flask app and am \"authenticating\" (not sure if I can call it this) in the way below. \n\n&#x200B;\n\nRight now, I am also trying to \"re-auth\" after 100 seconds. \n\n&#x200B;\n\nPS: Not sure if this belongs in learnpython. \n\nHow good/bad is my code and the way I am solving the problem? What are the flaws in this? Thanks for the help!\n\n # This is placed in the utils file that i will be importing in the app.\n @dataclass\n class Authanticate:\n PIN: str = \"1111\"\n \n verified: bool = False\n verified_at = dt.now()\n \n def session_valid(self):\n delta = dt.now() - self.verified_at\n # print(f\"delta - {delta.seconds} seconds || {delta.days} days\")\n if(delta.seconds >= 0 and delta.seconds <= 100):\n self.verified = False\n return True\n \n else:\n return False\n \n def validate_pin(self, entered_pin):\n if(entered_pin == self.PIN):\n self.verified = True\n self.verified_at = dt.now()\n # print(f\"Verified {self.verified} {self.verified_at}\")\n return True\n else:\n self.verified = False\n return False\n \n\nMy actual routing code:\n\n \n #Placed at the top\n # This is a global var. Any better way?\n auth_obj = utils.Authanticate()\n \n @app.route('/handledata', methods=['GET', 'POST'])\n def handledata():\n if(request.method == 'POST'):\n input_1 = request.form['digit-1']\n input_2 = request.form['digit-2']\n input_3 = request.form['digit-3']\n input_4 = request.form['digit-4']\n \n entered_pin = f\"{input_1}{input_2}{input_3}{input_4}\"\n \n print(f\"entered pin - {auth_obj.validate_pin(entered_pin)}\")\n \n \n return redirect(url_for('showdata'))\n \n @app.route('/showdata')\n def showdata():\n # print(verified)\n if(auth_obj.session_valid()):\n data = {\"Yes\": \"Lord\"}\n else:\n data={\"Lol\": \"You wrong\"}\n return data\n # return render_template('data.html', show='dir', dir_data = data)", "upvote_ratio": 1.0, "id": "t3_tugf5s", "created_utc": 1648897756.0} +{"sub": "Python", "title": "XRP Blockchain Wrapper", "selftext": "Hi\n\nI made a simple wrapper based on \"xrpl-py\" package which makes it easier to interact with xrp blockchain.\n\nIt's still a work in progress. I hadn't had enough time to write a sphinx doc for it, but the library is very easy to understand\n\nIn other words, it's a more simplified version of the \"xrpl-py\" package.\n\n \nGithub: [https://github.com/amiwrpremium/xrpy](https://github.com/amiwrpremium/xrpy) \nPyPi: [https://pypi.org/project/xrpy/](https://pypi.org/project/xrpy/) \n\n\nFeel free to contribute and use it. \nAny feedback will be appreciated. \nIf you bump into any bugs or issues please submit them on Github.\n\n \nThanks.", "upvote_ratio": 0.33, "id": "t3_tue6z7", "created_utc": 1648888626.0} +{"sub": "Python", "title": "Handle Exception and Close Resource Using Python Context Manager With-Statement", "selftext": "", "upvote_ratio": 0.6, "id": "t3_tudfqc", "created_utc": 1648885400.0} +{"sub": "Python", "title": "Best OOP Tutorial", "selftext": "Wanted a primer on Python OOP and came across this course from FreeCodeCamp. The instructor does a great job explaining all the concepts related to OOP. \n\nIf anyone is looking to get more info on OOP, I highly recommend you go and check this course out: https://youtu.be/Ej_02ICOIgs\n\nCheers.", "upvote_ratio": 0.85, "id": "t3_tucz71", "created_utc": 1648883543.0} +{"sub": "Python", "title": "Every 15 Minutes, Random YouTube Comment Gets Featured on the Thumbnail - Dynamic YouTube with Python", "selftext": "I wanted to explore dynamic video making, which are YouTube videos where the title or thumbnail changes during the video's lifetime. You may have seen Tom Scott's changing title video or Mr. Beast's changing thumbnail.\n\nFor this Python project, I made a Python script using the YouTube API hosted on AWS Lambda where every 15 minutes, a random comment from my comment section is put onto the thumbnail. This is a cool way to interact with an audience!\n\nMost of the used code and information can be found on [GitHub](https://github.com/techtribeyt/random_comment_on_thumbnail).\n\nMost importantly, [**here is the video where this is all running live**](https://www.youtube.com/watch?v=RXN1d_UpaAY)! Please leave some comments so that the thumbnail stays active and keep changing!\n\nBasically, the thumbnail below keeps changing every 15 minutes. The top gets updated to the username of the commenter and the body changes to the content of the comment.\n\nhttps://preview.redd.it/ovxjod5he1r81.jpg?width=1280&format=pjpg&auto=webp&s=7ba2c84f11d57ecaa70114fd3835924ad22297fb", "upvote_ratio": 0.71, "id": "t3_tu9lyd", "created_utc": 1648870971.0} +{"sub": "Python", "title": "Saturday Daily Thread: Resource Request and Sharing! Daily Thread", "selftext": "Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?\n\nUse this thread to chat about and share Python resources!", "upvote_ratio": 0.75, "id": "t3_tu5ckr", "created_utc": 1648857610.0} +{"sub": "Python", "title": "Pokete: A terminal based Pokemon like game", "selftext": "&#x200B;\n\nhttps://reddit.com/link/tu1zat/video/u3812q8qkzq81/player\n\nI wrote a Pokemon clone, called [Pokete](https://github.com/lxgr-linux/pokete), for the terminal supporting:\n\n* Different Pokete types\n* Effectiveness of those types against each other\n* Attack effects\n* A map\n* NPCs to talk to (partly with complex interaction choices)\n* Trainers to fight against\n* Weather that effects the effectiveness of some attacks\n* Achievements\n* A Dex to see all caught Poketes in\n* Special abilities (like flying)\n* A self written [ASCII game engine](https://github.com/lxgr-linux/scrap_engine) and much more\n* Pipenv", "upvote_ratio": 0.95, "id": "t3_tu1zat", "created_utc": 1648848316.0} +{"sub": "Python", "title": "largestinteriorrectangle - my first PyPI published package", "selftext": "I implemented the in 2019 described [Algorithm for finding the largest inscribed rectangle in polygon](https://journals.ut.ac.ir/article_71280_2a21de484e568a9e396458a5930ca06a.pdf). Today I published the package on [PyPI](https://pypi.org/project/largestinteriorrectangle/). I developed it to solve the [problem of black borders around a stitched image](https://stackoverflow.com/questions/33497928/crop-image-after-stitching).\n\nSince it's my first contribution on PyPI I would love to get feedback from experienced developers!", "upvote_ratio": 0.91, "id": "t3_tu0tfu", "created_utc": 1648845350.0} +{"sub": "Python", "title": "bundling python virtualenv AND interpreter?", "selftext": "I can use pex to bundle a archive of a virtualenv, that I can run with a specific version of a python interpreter on a host.\n\nIs there a project that will let me bundle the virtualenv AND the python interpreter?", "upvote_ratio": 0.85, "id": "t3_ttyskq", "created_utc": 1648840116.0} +{"sub": "Python", "title": "I've made a \"Falling sand\" Sandbox with Python (using pygame)", "selftext": "It's extremely slow and incefficient but it does work :)\n\nIt implements:\n\n \\- Sand & Water Physics \n\n\\- Buoyancy \n\n\\- Heath transfer \n\n\\- Status changes (ice -> water -> vapor)\n\nHere's a demo for how it looks like in action: [https://www.youtube.com/watch?v=7cgfJqnVVTg](https://www.youtube.com/watch?v=7cgfJqnVVTg)\n\nAnd here's a link to the code: [https://github.com/SudoOmbro/OmbroBox](https://github.com/SudoOmbro/OmbroBox)\n\nThanks for reading :)", "upvote_ratio": 0.96, "id": "t3_ttxxxq", "created_utc": 1648837926.0} +{"sub": "Python", "title": "How are python threads different from other languages? I understand GIL limits code exec to one thread but how does \"usual\" threading is like without GIL.", "selftext": "I have used many other languages but I've only touched concurrency in python. I have learnt about threading, asyncio and multiprocessing. \n\nI was reading about GIL and can easily understand \"it limits code exec to one thread\", that's plain definition. Its a mutex and all that.\n\nBut how exactly does it limits and what? So in languages without GIL like Java and C++ can each thread execute code without taking turns as in python? So if there are say 20 threads, all of those are executing code simultaneously?\n\nSo effectively in python threading CAN ONLY HELP I/O BOUND programs but in Java/C++ threading CAN HELP BOTH CPU BOUND AND I/O BOUND PROGRAMS?", "upvote_ratio": 0.77, "id": "t3_ttx3k4", "created_utc": 1648835841.0} +{"sub": "Python", "title": "Are we all joining r/placetux for the Linux community or can we build a python on r/place?", "selftext": "Where else are y'all dedicating your tiles? And who else is using selenium to automate their process?", "upvote_ratio": 0.57, "id": "t3_ttwg06", "created_utc": 1648834226.0} +{"sub": "Python", "title": "A Vigen\u00e8re (de)ciphering program with frequency analysis attack.", "selftext": "The project can be found here: https://github.com/Nathan-Furnal/frequency-analysis\n\nHi everyone, this is a project about ciphers, entirely in Python. The goal is to provide a way to cipher plain text files based on a key and then automatically find the key back to decipher the text.\n\nSome trade-offs were made for simplicity: only the basic 26 letters alphabet was allowed and any spaces or punctuation was removed as well.\n\nIn that sense, it's a good introduction to implement ciphering but not a real-world tool! \n\nMore information about what a cipher is and how they're implemented can be found in the README and in the documentation of the code. \n\nWe can start with the most simple example, a *Caesar* cipher which is a one letter shift. \n\nFor example, the sentence `Hello World!`, shifted by the letter `K` (\"a\" is 0 and \"k\" is 10), will become : \n\n | H | E | L | L | O | | W | O | R | L | D | plain text\n | K | K | K | K | K | | K | K | K | K | K | key \n | R | O | V | V | Y | | G | Y | B | V | N | ciphered text\n\nThis kind of cipher is very susceptible to be cracked because the letters are all shifted by the same key (a unique letter). Since that's the case, one can try to count the frequencies of each letter, plug back in the usual letter frequencies for each letter and it's done. \n\nA Vigen\u00e8re cipher is more elaborate, the key is a word or a sentence and not one letter. Because of this, the same letters can be shifted by a different amount and the resulting ciphered text is not susceptible to the deciphering explained above. \n\nFor example, The sentence `Hello World!`, encrypted with the word `key` (with letters indexed from 0 to 25), becomes: \n\n | H | E | L | L | O | | W | O | R | L | D | plain text\n | K | E | Y | K | E | | Y | K | E | Y | K | key \n | R | I | J | V | S | | U | Y | V | J | N | ciphered text\n\nYou'll find that where the key from this cipher matches the key from the previous one, the ciphered text matches! This is one of the basic building blocks used to attack this ciphering scheme, it's a bit more elaborate but you can find the references and examples in the documentation of the code.\n\nI hope it's clear =)", "upvote_ratio": 0.88, "id": "t3_ttqlac", "created_utc": 1648819457.0} +{"sub": "Python", "title": "Sierpi\u0144ski Triangle With Python Turtle", "selftext": "", "upvote_ratio": 0.81, "id": "t3_ttqer3", "created_utc": 1648818933.0} +{"sub": "Python", "title": "I'm creating a tool to enrich your datasets with relevant external data", "selftext": " Hey all,\n\nI love doing market research and all kinds of exploratory analyses, but getting the data is a major pain point, as it is in many places (data dumps, apis, marketplaces, web data) and in all kinds of formats\n\nI'm trying a different approach, where instead of searching for data sources, and then integrating manually, you just upload your dataset. My service has a large index with datasets and api providers, and finds relevant ones for your dataset which you can add easily.\n\n&#x200B;\n\n[Example](https://i.redd.it/7ou7f2egowq81.gif)\n\nDoes this seem useful to you? Would love to hear your thoughts", "upvote_ratio": 0.91, "id": "t3_ttosfb", "created_utc": 1648813824.0} +{"sub": "Python", "title": "jupino: Annotate data in Jupyter notebooks", "selftext": "Often times I need a quick way to annotate data for my experiments and since I use Jupyter notebook quite a lot, overtime I developed a simple way to annotate data using Jupyter widgets and recently published it to Github([https://github.com/jangedoo/jupino](https://github.com/jangedoo/jupino)) and pypi to share it with others.\n\nI hope you find it useful. The README file contains code samples for common data annotation scenarios. I would love to get your feedbacks!\n\nhttps://preview.redd.it/3moyq5fqhwq81.png?width=734&format=png&auto=webp&s=74309c310d96acd056726f354f5de2c24e981878", "upvote_ratio": 0.86, "id": "t3_tto7z2", "created_utc": 1648811835.0} +{"sub": "Python", "title": "Python Data Persistence - DBM Package", "selftext": "", "upvote_ratio": 0.67, "id": "t3_ttmu0f", "created_utc": 1648806221.0} +{"sub": "Python", "title": "Old Project Showcase [ThoughtLogger]", "selftext": "## Backstory\n\nI made this application a long time ago. And really didn't think about showcasing this off in this subreddit. It was a big mistake. But now, I think this project might help somebody, so here it is,\n\n# ThoughtLogger.\n\nYour Personal Thought Logging application that you can use anytime without losing any focus. **Made using tkinter in Python.**\n\nYou can write down your thoughts, make a list, use it as a diary, your choice. You get two profiles to write into. This might be useful with people with CBT (Cognitive Behavioral Disorder) \n\nThe text is then saved as a '.log' file.\n\nImage of [Main Window](https://user-images.githubusercontent.com/68242099/137069866-9de85060-c0cf-4907-9e3d-3931f614e35f.png)\n\n## You can also customize stuff\n\nYou can use the '.ini' file to customize the application to your liking. \\[still in beta stages\\]\n\n[ini file](https://user-images.githubusercontent.com/68242099/135040471-4d9fd50b-72d3-4696-baac-9490145b5b62.png)\n\n## You can try it out from this [Github Repo](https://github.com/moiSentineL/ThoughtLogger).\n\nIt was just a beginner project. Didn't know many things.\n\n## Also hoping that you guys would help improve the code.\n\n## Thank you.", "upvote_ratio": 0.75, "id": "t3_ttmrs1", "created_utc": 1648805960.0} +{"sub": "Python", "title": "Removal of supported types in the sample function of the random-library. Why would this be done?", "selftext": "When reading the [documentation of the random module](https://docs.python.org/3/library/random.html) I noded the following:\n\n> Deprecated since version 3.9: In the future, the *population* must be a sequence. Instances of [set](https://docs.python.org/3/library/stdtypes.html#set) are no longer supported. The set must first be converted to a [list](https://docs.python.org/3/library/stdtypes.html#list) or [tuple](https://docs.python.org/3/library/stdtypes.html#tuple), preferably in a deterministic order so that the sample is reproducible. \n\nAnd my question is why would you do something like this, rather than further supporting all iterables and then casting them to sequences if needed. Maybe make a keyword only argument that has tuple as default parameter so that a user can pass in a custom function to convert non-sequence iterables and raise an error if and only if the convert function fails? Why would we want reproducible results for the random module anyway? I know it is more for games than security purposes but still doesn't this defeat the purpose.", "upvote_ratio": 0.66, "id": "t3_ttlu6q", "created_utc": 1648801881.0} +{"sub": "Python", "title": "Object Counting by Color. Learn how to count selected color objects using OpenCV and Python.", "selftext": "", "upvote_ratio": 0.78, "id": "t3_ttlipp", "created_utc": 1648800408.0} +{"sub": "Python", "title": "Transfer file wirelessly between two computer over the Bluetooth Low Energy protocol Using Python", "selftext": "", "upvote_ratio": 0.75, "id": "t3_ttl4ra", "created_utc": 1648798697.0} +{"sub": "Python", "title": "GitHub - brenw0rth/pync: arbitrary TCP and UDP connections and listens (Netcat for Python).", "selftext": "", "upvote_ratio": 0.63, "id": "t3_ttkpio", "created_utc": 1648796851.0} +{"sub": "Python", "title": "Why does it seem that python pays more than Java (from what little googling I\u2019ve done)? I would assume that since Java runs faster and more efficient (and since it\u2019s harder to learn, thus, making it a more scarce skill) that Java would be the higher paying language.", "selftext": "", "upvote_ratio": 0.31, "id": "t3_ttjbrc", "created_utc": 1648791346.0} +{"sub": "Python", "title": "Automated WiFi Hacking Script In Python - Tutorial", "selftext": "", "upvote_ratio": 0.91, "id": "t3_tticqk", "created_utc": 1648787748.0} +{"sub": "Python", "title": "simple and fast reverse port forwarding tool by python", "selftext": "I write a port forwarding tool using pyhton. Please have a try, thanks !\n\n [xitongsys/moonlight: moonlight is a reverse port forwarding tool written by python (github.com)](https://github.com/xitongsys/moonlight)", "upvote_ratio": 0.67, "id": "t3_ttht7k", "created_utc": 1648785809.0} +{"sub": "Python", "title": "my Hacker News interface, displays thumbnails and details about the linked page. written in Python 3.8, with Playwright for scraping, requests for API querying, Wand for thumbnail generation, and pickle for caching link data so I don't poll the Hacker News API too often", "selftext": "I'd like to share with you [my interface for reading the Hacker News feed](https://www.thnr.net/top/1/). It started as a Django app, but several iterations in I realized I was basically just creating static pages (for speed of UX) so I pivoted to using Python for just a backend of querying the Hacker News API to get the link info and generate the page html and the thumbnails and other details. Web serving is just nginx serving the generated static html pages.\n\nI'm happy to answer technical or design/architecture questions. My plan is to make the code public once it's in a less embarrassing state, but I'm happy to share source code as illustrations if anyone is curious about specific points.\n\nOddly, the thumbnails have consumed the majority of my dev time. I use Playwright to get the [og:image](https://duckduckgo.com/?q=og%3Aimage) link (if it's present) and then I use good ole `requests` to download the og:image itself. I use Wand (an ImageMagick binding) to trim away large blocks of solid color and then I pad the image to make it either squarish or a 3:1 width to height aspect ratio. Finally I use Wand to save the file as webp since it's small but still good looking. Currently I also create thumbnails if the linked item (not og:image but the actual link) is to a PDF. I'm using Wand to do the conversion with Inkscape as the backend delegate for rasterizing. But sometimes the quality is kinda meh, so I'd like to experiment with using good old ghostscript for rasterizing PDFs, either through a binding (any suggestions?) or by calling a process from Python to the shell.\n\nFor the curious:\n[Hacker News default interface](https://news.ycombinator.com/), [their public API](https://github.com/HackerNews/API)", "upvote_ratio": 0.75, "id": "t3_tthmk7", "created_utc": 1648785205.0} +{"sub": "Python", "title": "Is taking hand-write note on Python Library courses good? In your opinion?", "selftext": "", "upvote_ratio": 0.38, "id": "t3_ttfj0z", "created_utc": 1648778283.0} +{"sub": "Python", "title": "PEP 2241: Back to the Past", "selftext": "", "upvote_ratio": 0.81, "id": "t3_ttdl90", "created_utc": 1648772073.0} +{"sub": "Python", "title": "PEP 9001", "selftext": "&#x200B;\n\n[The Best, and Only, Code Autoformatter You'll Ever Need](https://preview.redd.it/t15arr245tq81.png?width=758&format=png&auto=webp&s=b1accb0f300af6253cff6c14a458601abc5d0ebe)\n\n&#x200B;\n\n[PEP 9001](https://peps.pythondiscord.com/pep-9001/)\n\nOur friends over at the [Python Discord](https://discord.gg/python) have been asked to draft and submit a PEP based on their experiences on Discord based on how to make Python development better for all. \n\nAs the Python Discord Server, they are in a unique position to see how Python programmers grow along side the Python programming language. With that experience, they've noticed how much developer time and energy is expended on python formatting and how the guidelines of PEP8 even influence how people learn.\n\nIn an effort to ensure Python continues to be the dominant and best programming language to ever exist, the Python Discord is submitting [PEP 9001](https://peps.pythondiscord.com/pep-9001/)\u2014the New Ultimate Final Python Formatting Guide! \n\nThis PEP is the final, ultimate, complete Python Formatting Guide that also includes proposed changes to the Python's syntax to encourage better coding practices. We encourage you all to begin porting your code to this new and final coding style.\n\nTo help with this drastic but very necessary change, they\u2019ve started drafting a new autoformatter for it, Blurple, so everyone can experience what their code looks like in it's ultimate form.\n\nThis PEP is still in a draft state, so please suggest and make contributions in the #pep-9001 channel over in the [Python Discord](https://discord.gg/python). Play around with the autoformatter in #blurple-code-formatter and experience what it\u2019s like for your code to be expertly styled.", "upvote_ratio": 0.93, "id": "t3_ttdjl6", "created_utc": 1648771923.0} +{"sub": "Python", "title": "Friday Daily Thread: Free chat Friday! Daily Thread", "selftext": "Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted!", "upvote_ratio": 0.67, "id": "t3_ttdb2f", "created_utc": 1648771207.0} +{"sub": "Python", "title": "5 Powerful Python one-liners \ud83e\udd2f", "selftext": "[https://medium.com/@needablackcoffee/5-powerful-python-one-liners-260dd61c4d09](https://medium.com/@needablackcoffee/5-powerful-python-one-liners-260dd61c4d09)", "upvote_ratio": 0.12, "id": "t3_ttbviw", "created_utc": 1648766763.0} +{"sub": "Python", "title": "Django Boilerplate: new open source project, asking for feedback", "selftext": "I just finished the first iteration on my new open source side project, a Django boilerplate. \n\n\nWhat do you think about it? I won't explain much here since I'd like the [readme.md](https://readme.md) to be self-explanatory. \n\n\ninteresting in feedback about: \n\n\n\\- it is useful? \n\\- it is properly done? \n\\- it is something you don't like? \n\\- there is something \"not django-ish\"? \n\\- and, of course, any other feedback you may want to leave me! I'd appreciate even the small bit of time you'd dedicate to my project. \n\n\nhere's the link: [https://github.com/carloocchiena/django\\_boilerplate](https://github.com/carloocchiena/django_boilerplate)", "upvote_ratio": 0.57, "id": "t3_tt8dpi", "created_utc": 1648757067.0} +{"sub": "Python", "title": "I made a random class generator for Elden Ring", "selftext": "`import random`\n\n`classes=['Hero', 'Bandit', 'Astrologer', 'Warrior', 'Prophet' 'Vagabond', 'Confessor', 'Wretch', 'Prisoner', 'Samurai' ]`\n\n`class_selection = random.choice(classes)`\n\n`print(class_selection)`\n\nPlease give me any feedback on how to improve this, it's one of my first projects", "upvote_ratio": 0.55, "id": "t3_tt753s", "created_utc": 1648753658.0} +{"sub": "Python", "title": "Files and Dictionary practice", "selftext": "I had already posted but i did not read the rules all the way so I had to remove it, but I am back. \n\nThis project came on a whim and I thought it would be fun. The code in my opinion is a tad bit messy but readable. Most of the code came from me with some help from Stack-overflow\n\n[Guthub Link](github.com/Gamelift/File-and-Dictionary-Practice/tree/main)", "upvote_ratio": 0.4, "id": "t3_tt53sn", "created_utc": 1648748158.0} +{"sub": "Python", "title": "Create a progression of recommendations with any recommender", "selftext": "Hi! For work I made a [recommendation progression package](https://github.com/askarthur/graph-progression) which we've open sourced! Let me explain.\n\n# Reason\n\nWe are an ArtTech company and have created a few recommendation engines around artists and artworks. For the artwork one in particular, we thought it'd be cool to see a progression of artworks given a \"seed\" work. During that process, we discovered a solution like this doesn't exist when all the recommendations aren't calculated before hand and stored (like a graph database) ... so we built this.\n\n# Summary\n\nThe main idea behind the package is to allow users to create a series of recommendations in a sort of \"progression\" from one another using a *context-based* recommender. So you supply the recommendation engine (or client to it), the starter item (seed), and the progression length. It will then try to create a progression of recommendations from the start (seed -> rec 1 -> rec 2 -> etc.).\n\nSome cool features it has are memoization (it won't call the recommender again if it hits the item again), backtracking (if an item has no valid recommendations), and post-selection filters (if you want to filter out certain recommendations).\n\n## Sample\n\nCheckout out a [sample](https://github.com/askarthur/graph-progression/blob/main/docs/samples/README.md) (for artworks) starting with a VanGogh painting!\n\n&#x200B;\n\nWould love to hear any feedback and/or questions people have! Thanks for reading!", "upvote_ratio": 0.55, "id": "t3_tt4k17", "created_utc": 1648746668.0} +{"sub": "Python", "title": "Interceptor algorithm (no relevance to current world events)", "selftext": "[https://www.youtube.com/watch?v=RoIsWAdIqos](https://www.youtube.com/watch?v=RoIsWAdIqos)\n\nI made a bot that uses a few altered kinematic equations. It's designed to be an aiming algorithm, but it also works as an unjukable bot. I made the control physics work like starships in SWBF just for fun. Change the speed and acceleration values to see some interesting results. Turn off the constant unit vector speeds and watch it intercept extremely well.", "upvote_ratio": 0.73, "id": "t3_tt4i7h", "created_utc": 1648746529.0} +{"sub": "Python", "title": "Asynchronous Web Scraping With Python AIOHTTP", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tt2qi2", "created_utc": 1648741724.0} +{"sub": "Python", "title": "Bulk file rename app", "selftext": " \n\n[Tr.Rename](https://preview.redd.it/oubod92w2qq81.jpg?width=150&format=pjpg&auto=webp&s=3a86f3ee1bbace7e43757a38b9dcb0ad1575d74a)\n\n&#x200B;\n\nthis app is my first project on Github. it is a bulk file rename/translator. it is based on python. only tested on windows 10 64bit. the GUI is based on qt.\n\nthe app name is Translate.Rename and it is capable of:\n\n1. translates all the files into a folder and renames. (uses Built-in google translate API).\n2. adds any characters and dates to every file inside the selected folder. (both before or after original filename).\n3. completely renames all files in a folder by user-given characters and adds \\_1,\\_2,...\n4. change the suffixes of given files.\n5. filters affected files by text, date, size, and type.\n\n[https://github.com/theRJorj/Translate.Rename](https://github.com/theRJorj/Translate.Rename)\n\nEXE: [https://sourceforge.net/projects/trans-rename/](https://sourceforge.net/projects/trans-rename/)\n\nwould be glad to have your feedback.", "upvote_ratio": 0.76, "id": "t3_tt007r", "created_utc": 1648734034.0} +{"sub": "Python", "title": "A feature complete W-TinyLFU cache implementation in Python", "selftext": "While learning Python I tried to implement the cache architecture proposed in the paper [A Highly Efficient Cache Admission Policy](https://arxiv.org/pdf/1512.00727.pdf). I have seen that Python only propose LRU cache as a decorator so I thought a more efficient cache was something meaningful and funny to code. \nNot an expert, tried my best.\n\nBrief description of the cache structure:\n\n>W-TinyLFU uses a small admission LRU that evicts to a large Segmented LRU if accepted by the TinyLfu admission policy. TinyLfu relies on a frequency sketch to probabilistically estimate the historic usage of an entry. The window allows the policy to have a high hit rate when entries exhibit recency bursts which would otherwise be rejected. The size of the window vs main space is adaptively determined using a hill climbing optimization. This configuration enables the cache to estimate the frequency and recency of an entry with low overhead.\n\nHere's the github link: [https://github.com/vanika/TinyPyCache](https://github.com/vanika/TinyPyCache)", "upvote_ratio": 0.75, "id": "t3_tszssv", "created_utc": 1648733396.0} +{"sub": "Python", "title": "I wrote okjson - A fast, simple, and pythonic JSON Schema Validator", "selftext": "I had a requirement to process and validate large payloads of JSON concurrently for a web service, initially I implemented it using [jsonschema](https://github.com/python-jsonschema/jsonschema) and [fastjsonschema](https://github.com/horejsek/python-fastjsonschema) but I found the whole [JSON Schema Specification](https://json-schema.org/) to be confusing at times and on top of that wanted better performance. Albeit there are ways to compile/cache the schema, I wanted to move away from the schema specification so I wrote a validation library inspired by the design of [tiangolo/sqlmodel](https://github.com/tiangolo/sqlmodel) (type hints) to solve this problem easier.\n\n**Here is a simple example:**\n\n```py\nfrom okjson import JSONValidator\n\nschema = { 'name': str, 'age': int }\n\njson_string = '{ \"name\": \"Charly Gordon\", \"age\": 32 }'\n\nassert JSONValidator().is_valid(instance=json_string, schema=schema)\n```\n\nThere is an [example covering all the features](https://github.com/mufeedvh/okjson#every-feature-in-a-single-example) in the README.\n\nIt also has well defined exceptions for each error case when you want to get the reason for the validation failure. (Helpful when you want to show user facing error messages)\n\n**GitHub:** https://github.com/mufeedvh/okjson\n\nThis is my first time publishing a Python library, please share your feedback/suggestions. :)", "upvote_ratio": 0.71, "id": "t3_tsz0i3", "created_utc": 1648730942.0} +{"sub": "Python", "title": "Current situation of library support for M1", "selftext": "I am planing to swap my old MacBook with a M1 Pro MacBook. I would like know if anyone has experience with the current situation of supported library support/ general usability of python on M1. \n\nI need support for most of the common data science libraries. I can sacrifice some performance problems since I am mostly just doing DevOps for a Data Science project. But I need to be able to execute it. \n\nFurthermore, I am doing a lot of Docker stuff, but as far as I know this is mostly supported. \n\nSo, any knowledge or experience is welcomed :)", "upvote_ratio": 0.93, "id": "t3_tsyuig", "created_utc": 1648730378.0} +{"sub": "Python", "title": "Flame graph rendering in the terminal", "selftext": "", "upvote_ratio": 0.63, "id": "t3_tsya02", "created_utc": 1648728441.0} +{"sub": "Python", "title": "Concurrent Web Scraping with Selenium Grid and Docker Swarm - updated!", "selftext": "", "upvote_ratio": 0.5, "id": "t3_tsy5pb", "created_utc": 1648728034.0} +{"sub": "Python", "title": "Project idea for Python lovers in the Linux world", "selftext": "I'm just throwing this somewhere cuz it'd truly be a blessing if it was made, but I don't get my hopes too high.\n\nI'm very bad at Linux, but I basically spent a week on and off trying to find an easy to use and configure fan control program for CPU and GPU.\n\nThere's plenty that need you to write config files yourself, or that require 15 steps configuration process where it's always failed me somewhere.\n\nSo, having a software with a gui that doesn't require you to jump into the Terminal times and times again would be a blessing to me, and I bet to many other inexperienced Linux users as well.\n\nI find open-source OS so attractive for many reasons, but at the same time I can't do much because I don't have the technical knowledge for it. Life's really hard as a new user who can't deep dive and learn all the technicalities. (the love-hate relationship is very real - > \\^ 3 \\^ // = --O)\n\nMaybe, if you can relate in some ways and have more knowledge and free time... the door's open for you to contribute.", "upvote_ratio": 0.57, "id": "t3_tsxyc3", "created_utc": 1648727281.0} +{"sub": "Python", "title": "Python in Visual Studio Code \u2013 April 2022 Release", "selftext": "", "upvote_ratio": 0.9, "id": "t3_tsxkgp", "created_utc": 1648725776.0} +{"sub": "Python", "title": "^fassert$: Fuzzy assert only data that matters", "selftext": "Hello,\n\nIn almost every project I worked on I had a need to fuzzy match (assert) recursively nested structures such as combinations of lists/dicts/tuples/sets etc... If you need to assert some data deep within the nested structures, especially if the position within the list is not known, the complexity can raise quickly with several nested for loops. I always wrote more-or-less the same test fixture to do this kind of thing but figured I am not the only one having this problem so I decided to made this into a small library with emphasis of having 0 dependencies.\n\nThe whole library is also implemented in a single file (I would like to keep it that way if possible) so if you don't feel like installing something from pypi you can just copy paste the content into your pytest fixtures and start using it straight away.\n\nSource code: [https://github.com/SourceCode-AI/fassert](https://github.com/SourceCode-AI/fassert)", "upvote_ratio": 0.61, "id": "t3_tswigu", "created_utc": 1648721347.0} +{"sub": "Python", "title": "An A Markov-Chain Twitter bot trained on Elon Musk Tweets and Childrens Books", "selftext": "Ever wondered what would happen if Elon Musk started quoting childrens books halfway through his Tweets? Wonder no longer!\n\nGithub: [https://github.com/FlynnOwen/elon-markov-chain-twitter-bot](https://github.com/FlynnOwen/elon-markov-chain-twitter-bot)\n\nTwitter: [https://twitter.com/elonstorybot](https://twitter.com/elonstorybot)", "upvote_ratio": 0.82, "id": "t3_tsvexj", "created_utc": 1648716375.0} +{"sub": "Python", "title": "If an exception is raised but not handled would the process definitely stop/crash? I have seen some programs that keep printing stack trace to cli but don't crash and keep trying.", "selftext": "EDIT: thanks i think i got my answer. \n\n```py\nwhile True:\n try:\n something_that_raises_exception()\n except as e:\n logger.error(e)\n```", "upvote_ratio": 0.87, "id": "t3_tsux1z", "created_utc": 1648714032.0} +{"sub": "Python", "title": "Print Emoji's using Python.", "selftext": "", "upvote_ratio": 0.38, "id": "t3_tsusc7", "created_utc": 1648713463.0} +{"sub": "Python", "title": "Real Time Speech Recognition", "selftext": "", "upvote_ratio": 0.83, "id": "t3_tst6rj", "created_utc": 1648706438.0} +{"sub": "Python", "title": "Demo for game made with Pygame", "selftext": "https://preview.redd.it/nxsoj0p5lqq81.png?width=1366&format=png&auto=webp&s=1fe7736ff3cbc42750ad4b38307e0c908968fa20\n\nI had fun making it! If anyone ends up looking at the code, it may be pretty messy because I started it when I was first learning Python. I recently added an A.I. chatbot as an NPC, which I thought was neat. I still have to write more dialogue for him.\n\nFeatures\n\n\\-Play minigames\n\n\\-Talk to A.I. NPC\n\n\\-Explore dream areas\u00a0\n\n\\-Look at A.I. Generated art\n\n[https://borderow.itch.io/liminal-harbor](https://borderow.itch.io/liminal-harbor)\n\n&#x200B;\n\nIf anyone downloads it, please let me know if the executable worked for you. Thanks!", "upvote_ratio": 0.91, "id": "t3_tssu7d", "created_utc": 1648705022.0} +{"sub": "Python", "title": "First Python Application - Blackjack Strategy Trainer - Seeking Feedback", "selftext": "Hi everyone! I just finished my initial beta for a blackjack training simulator. The application helps the user practice basic blackjack strategy. If you check it out and have some feedback for improvement, I would love to hear it! Thanks and enjoy!\n\n&#x200B;\n\n[https://github.com/lrassbach/blackjack-training-simulator/releases](https://github.com/lrassbach/blackjack-training-simulator/releases)", "upvote_ratio": 0.78, "id": "t3_tsrmiu", "created_utc": 1648700446.0} +{"sub": "Python", "title": "I made a utility library for downloading Wikimedia Data Dumps for analysis", "selftext": "I created a small utility library that exposes the directory structure of Wikimedia\u2019s data dump site (and its mirrors).\n\nIt includes a method to easily download and decompress data dumps using Python\u2019s built in libraries - this proved to be an especially difficult problem because the data dumps are sometimes several times larger than the system\u2019s memory. \n\n[Source code here.](https://github.com/jon-edward/wiki_dump)", "upvote_ratio": 0.83, "id": "t3_tsq2c8", "created_utc": 1648695137.0} +{"sub": "Python", "title": "Tuple Reuse Quirks", "selftext": "I was testing tuple reuse today and noticed some strange behavior. If you run all the code below together as a script, 1) a and b have different IDs, as do c and d; but when you enter them in the interpreter line by line: 2) a and b have the same IDs, 3)c and d have the same IDs.\n\nOf the 3 observations, only 2) matches my expectation based on my understanding of tuple reuse, which is that Python moves tuples with fewer than 20 items to a \"free list\" after their reference count reach 0, (to make them available for potential reassignment later)\n\nCould someone explain why 1) and 3) happen? Thank you!\n\n`a = (1,2,3)`\n\n`print(id(a))`\n\n`del a`\n\n`b = (1,2,3)`\n\n`print(id(b))`\n\n&#x200B;\n\n`c = (4,5,6)`\n\n`print(id(c))`\n\n`del c`\n\n`d = (7,8,9)`\n\n`print(id(d))`", "upvote_ratio": 0.75, "id": "t3_tso711", "created_utc": 1648689060.0} +{"sub": "Python", "title": "Thursday Daily Thread: Python Careers, Courses, and Furthering Education!", "selftext": "Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!\n\n**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.**", "upvote_ratio": 0.84, "id": "t3_tsmv9p", "created_utc": 1648684810.0} +{"sub": "Python", "title": "Python or R?", "selftext": "I searched some differences but not found definite answer. So, I ask you. Which one is better for business?\n\nMy company has over 3 million customer and tons of data expectedly. I will study in a different department after 3 or 2 years later and it will be about data analysis of costumers. Which one should I start with? Python or R?", "upvote_ratio": 0.3, "id": "t3_tsjvib", "created_utc": 1648676061.0} +{"sub": "Python", "title": "Pollen Robotics' Reachy VR Digital Twin in Python (proof of concept)", "selftext": "Demonstration of a **\"Reachy\"** **digital twin** in **virtual reality**, based on **Python** and **HARFANG**.\n\nThe goal of this P.O.C is to demonstrate that a simple digital twin of an existing robot can be implemented in less than 500 lines of **Python**. This digital twin shows a **VR** experience that could serve to bootstrap a **tele-operation** project : \n \\- the user can see what the robot sees, using the 3D simulation in **virtual reality** \n \\- the user can move his hands around, the **arms** of the **robot** will follow \n \\- it helps to test the **challenge** of a tele-operation process\n\nThe robot in this demonstration is a **Reachy, developped by the French company Pollen Robotics**. \nThe physics & inverse kinematic solver is handled by PyBullet. \nThe VR is simulated by HARFANG 3D.\n\n[https://www.youtube.com/watch?v=TBAjNGPpMfc](https://www.youtube.com/watch?v=TBAjNGPpMfc)", "upvote_ratio": 0.84, "id": "t3_tsjsaf", "created_utc": 1648675816.0} +{"sub": "Python", "title": "pymac: Install and manage macOS Python.org installers from the command line", "selftext": "", "upvote_ratio": 0.99, "id": "t3_tsjhe7", "created_utc": 1648675001.0} +{"sub": "Python", "title": "A simple Snooker 3D game in Python", "selftext": "Hi there,\n\nI would like to share a tiny **game** project all made in **Python** : a **Snooker simulator.** \nThe gameplay is rather limited, as the aim of this project is to focus on the simulation aspect : how to produce a realistic snooker physics, with a visual rich enough to be on part with nowadays standards ? \nTo reach this goal, this project relies on 2 major **features** : \n \\- a **physics** engine, running at high frequency to handle the friction of the balls \n \\- a **3D rendering** engine, with 2 quality modes, the highest quality mode including realtime reflections and radiosity (doesn't require a RTX GPU).\n\nI hope you folks will enjoy the project, can **learn** from it and maybe be turn it into something bigger!\n\n[https://github.com/harfang3d/snooker-python-hg2](https://github.com/harfang3d/snooker-python-hg2)", "upvote_ratio": 0.89, "id": "t3_tsixth", "created_utc": 1648673568.0} +{"sub": "Python", "title": "Introducing Slap: A CLI to assist in the Python development process", "selftext": "I would like to share a project with you that I have been working on and actively using for over 1.5 years to streamline my day-to-day tasks developing Python projects. I use Slap tens to hundreds of times a day and would not want to miss it anymore.\n\n**Slap streamlines Python development tasks**\n\n>[Slap](https://niklasrosenstein.github.io/slap/) is a command-line tool to assist in the development of Python projects independent of the [PEP 517](https://peps.python.org/pep-0517/) build backend being used, capable of managing single- and multi-project repositories.\n\nAmong the things that Slap can do, here is a short selection:\n\n* Perform development installs of your project (even for Poetry projects)\n* Manage local & global virtual environments\n* Bump version numbers (not just in `pyproject.toml`)\n* Publish to PyPI\n* Manage structured changelogs in TOML format\n* All while capable of handling mono-repositories that consist of more than one Python project\n\n*--- Check out the* [*Getting started*](https://niklasrosenstein.github.io/slap/getting-started/) *page in the documentation to get a more in-depth look into what Slap can do for you. ---*\n\n**Slap seems similar to the Poetry CLI, what's different?**\n\nSome people might find this similar to tools like Poetry, and while there is some overlap in functionality, Slap is **not a build backend** and is more targeted towards library development. Most of my projects use Poetry as the build backend but I never even once interact with the Poetry CLI throughout the lifetime of the project.\n\nThe most notable differences to Poetry are\n\n* Slap supports mono-repositories (i.e. multiple related Python projects in the same repository), to the extent that it bumps version numbers of project inter-dependencies and installs your projects in topological order\n* Slap supports development installs independent of the build backend (yes; this means you can install Poetry packages in editable mode even though the Poetry backend right now does not support editable installs)\n* Slap's version bump command (`slap release`) updates the version not just in your `pyproject.toml` but also the `__version__` in your source code as well as in related projects (see mono-repositories above) and any additional references you can configure via Regex patterns\n* Slap does not automagically create a virtual environment for you when installing your project(s); instead, it errors when you try to install into a non-virtual Python environment and gives you an easy-to-use tool to create and activate virtual environments (and allowing multiple environments per project as well as global environments)\n* Slap uses Pip to install your project(s), unlike Poetry which comes with its own dependency resolver and package installer (which I have been having a lot of issues with in the past).\n* Slap does not have a concept of lock files\n\n**Ideas / Suggestions / Contributions**\n\nSlap is currently very opinionated by the fact alone that I built it as my personal workflow tool, but I welcome suggestions and contributions, and I am hopeful it will be useful to a wider audience than myself.\n\n**Links**\n\n* Documentation: [https://niklasrosenstein.github.io/slap/](https://niklasrosenstein.github.io/slap/)\n* GitHub: [https://github.com/NiklasRosenstein/slap](https://github.com/NiklasRosenstein/slap)\n* PyPI: [https://pypi.org/project/slap-cli/](https://pypi.org/project/slap-cli/)\n\n**Edit**: I've added an in-depth [Getting started](https://niklasrosenstein.github.io/slap/getting-started/) guide to the documentation.", "upvote_ratio": 0.84, "id": "t3_tsgavg", "created_utc": 1648669463.0} +{"sub": "Python", "title": "Python Tutorial - How to create a Screen Recorder using Python?", "selftext": "Hey Everyone! I created a short Python Tutorial explaining how I created a Screen Recorder using Python. \n[https://www.youtube.com/watch?v=449c5lsGKKw](https://www.youtube.com/watch?v=449c5lsGKKw)\n\nhttps://preview.redd.it/ro2g0wc5hkq81.png?width=2880&format=png&auto=webp&s=649c062e96554d29b4348c07eb076a767b3d929b", "upvote_ratio": 0.74, "id": "t3_tsdftv", "created_utc": 1648666101.0} +{"sub": "Python", "title": "[GUI] DyCall - Run exported functions from dynamic libraries", "selftext": "", "upvote_ratio": 0.75, "id": "t3_tsdcn8", "created_utc": 1648665866.0} +{"sub": "Python", "title": "I Created a Simple Pushup Counter Using Mediapipe Python", "selftext": "", "upvote_ratio": 0.77, "id": "t3_tsb1mf", "created_utc": 1648659632.0} +{"sub": "Python", "title": "Any good Machine learning udemy courses ?", "selftext": "I recently took python course and I\u2019m learning python I want to get into machine learning and ai is there any good udemy courses for this? I see an A-Z machine learning course but is it good ? If anyone has taken it can you tell me what it exactly teaches you or does it just skip important points thanks", "upvote_ratio": 0.71, "id": "t3_ts9m9n", "created_utc": 1648655819.0} +{"sub": "Python", "title": "Scrape Google Scholar Metrics Results to CSV with Python", "selftext": "Full code:\n\n```python\nimport requests, lxml\nfrom bs4 import BeautifulSoup\nimport pandas as pd\n\n\ndef scrape_all_metrics_top_publications():\n\n params = {\n \"view_op\": \"top_venues\", # top publications results\n \"hl\": \"en\" # or other lang: pt, sp, de, ru, fr, ja, ko, pl, uk, id\n }\n\n # https://docs.python-requests.org/en/master/user/quickstart/#custom-headers\n # whatismybrowser.com/detect/what-is-my-user-agent\n headers = {\n \"user-agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.88 Safari/537.36\"\n }\n\n html = requests.get(\"https://scholar.google.com/citations\", params=params, headers=headers, timeout=30)\n soup = BeautifulSoup(html.text, \"lxml\").find(\"table\")\n\n df = pd.DataFrame(pd.read_html(str(soup))[0])\n df.drop(df.columns[0], axis=1, inplace=True)\n df.insert(loc=2,\n column=\"h5-index link\",\n value=[f'https://scholar.google.com/{link.a[\"href\"]}' for link in soup.select(\".gsc_mvt_t+ td\")])\n\n df.to_csv(\"google_scholar_metrics_top_publications.csv\", index=False)\n\n # save to csv for specific language\n # df.to_csv(f\"google_scholar_metrics_top_publications_lang_{params['hl']}.csv\", index=False)\n\n\ndef scrape_all_metrics_public_mandates():\n params = {\n \"view_op\": \"mandates_leaderboard\", # public access mandates results\n \"hl\": \"en\" # or other lang: pt, sp, de, ru, fr, ja, ko, pl, uk, id\n }\n\n # https://docs.python-requests.org/en/master/user/quickstart/#custom-headers\n # whatismybrowser.com/detect/what-is-my-user-agent\n headers = {\n \"user-agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.88 Safari/537.36\"\n }\n\n html = requests.get(\"https://scholar.google.com/citations\", params=params, headers=headers, timeout=30)\n soup = BeautifulSoup(html.text, \"lxml\").find(\"table\")\n\n df = pd.DataFrame(pd.read_html(str(soup))[0])\n df.drop(df.columns[[0, 2]], axis=1, inplace=True)\n df.insert(loc=1, column=\"Funder Link\", value=[link.a[\"href\"] for link in soup.select(\"td.gsc_mlt_t\")])\n\n df.to_csv(\"google_scholar_metrics_public_access_mandates.csv\", index=False)\n\n # save to csv for specific language\n # df.to_csv(f\"google_scholar_metrics_public_access_mandates_lang_{params['hl']}.csv\", index=False)\n```\n\nIf you need an in-depth explanation, have a look at [Scrape Google Scholar Metrics Results to CSV with Python](https://serpapi.com/blog/scrape-google-scholar-metrics-results-to-csv-with-python/) blog post at SerpApi.", "upvote_ratio": 0.4, "id": "t3_ts9lzb", "created_utc": 1648655795.0} +{"sub": "Python", "title": "Building a Full Stack Flask HTMx Application", "selftext": "", "upvote_ratio": 0.75, "id": "t3_ts8x51", "created_utc": 1648653894.0} +{"sub": "Python", "title": "I created 80 Python and Pandas Challenges with Video Solutions", "selftext": "", "upvote_ratio": 0.84, "id": "t3_ts8hpw", "created_utc": 1648652727.0} +{"sub": "Python", "title": "Transcribe Speech to Text with Python for Free", "selftext": "", "upvote_ratio": 0.67, "id": "t3_ts6whh", "created_utc": 1648648258.0} +{"sub": "Python", "title": "What to expect from Python 3.11?", "selftext": "", "upvote_ratio": 0.95, "id": "t3_ts6idv", "created_utc": 1648647068.0} +{"sub": "Python", "title": "GitLab Webhooks [Python and Google Chat Example]", "selftext": "", "upvote_ratio": 1.0, "id": "t3_ts66bz", "created_utc": 1648646050.0} +{"sub": "Python", "title": "I made a video about efficient memory use in pandas dataframes!", "selftext": "", "upvote_ratio": 0.96, "id": "t3_ts5mmf", "created_utc": 1648644350.0} +{"sub": "Python", "title": "Create a google account in Python", "selftext": " \n\nI would like to be able to create google account with a python script. I've try with Mechanize but nothing conclusive. Do you have any idea to how to do that ?\n\nI tried with the library Mechanize. I get the first form with:\n\n* FirstName\n* LastName\n* UserName\n* Password\n\nI submit it, but impossible to get the second form...", "upvote_ratio": 0.5, "id": "t3_ts5l04", "created_utc": 1648644210.0} +{"sub": "Python", "title": "Python program to find day of any date.(Yes any! from 1000 AD - 9999 AD)", "selftext": "&#x200B;\n\n[Program in action!](https://preview.redd.it/5eorq0mfniq81.png?width=1484&format=png&auto=webp&s=426f40c1b36cd85844c3f1565b8906da58c404f2)", "upvote_ratio": 0.65, "id": "t3_ts5ij2", "created_utc": 1648643992.0} +{"sub": "Python", "title": "ABCMeta library to limit derived classes their methods to follow the same signature as the parent", "selftext": "Python metaclass and abstract method library with restrictions.\n\nThis library provides a restricted way to validate abstract methods. The Python's default abstract method library only validates the methods that exist in the derived classes and nothing else. What this library provides is apart from that validation it provides validations over the method's signature. All you need is to import ABCMeta and abstractmethod from this library.\n\n[https://github.com/mortymacs/abcmeta](https://github.com/mortymacs/abcmeta)", "upvote_ratio": 1.0, "id": "t3_ts4ooj", "created_utc": 1648641121.0} +{"sub": "Python", "title": "Authoring Opportunity: Developing a Python book with Packt Publishing", "selftext": "Hi all, \n\nI am a Product Manager at Packt Publishing.\n\nPackt is a publishing company helping the world put software to work in new ways, through the delivery of effective learning and information services to IT professionals.\u00a0\n\nWe are planning to publish a book on\u00a0Python\u00a0to address the challenges and requirements of the\u00a0Python\u00a0community.\n\nWe are looking for an expert experienced Python developer who could share their valuable insights on the topic and collaborate with us in developing content for a book that we are planning to publish. \n\nIf you feel you might be interested in this opportunity please send me a direct message on or before 7th April 2022. \n\nPS: Content development experience in terms of writing a blog or anything else is appreciated but not required.", "upvote_ratio": 0.33, "id": "t3_ts4caw", "created_utc": 1648639896.0} +{"sub": "Python", "title": "br4nch 1.2.1 - Data Structure Tree Builder for Python.", "selftext": "***New patch released (1.2.1) that improves alot of features!***\n\n&#x200B;\n\n`br4nch` is created to provide an efficient implementation of tree data structure in ***Python***.\n\n&#x200B;\n\nThe **libary** is built on pure python so you don't need **ANY** other libaries.\n\nThe amount of features are endless such as: **adding**, **deleting**, **renaming**, **moving**, **copying**, **painting**, **sizing**, **change symbols**, **importing folder structure**, **exporting to txt and br4nch file**, etc..\n\n&#x200B;\n\n*PyPi*: [https://pypi.org/project/br4nch/](https://pypi.org/project/br4nch/)\n\n*Documentation*: [https://docs.br4nch.com/](https://docs.br4nch.com/)\n\n*Github*: [https://github.com/TRSTN4/br4nch](https://github.com/TRSTN4/br4nch)", "upvote_ratio": 0.75, "id": "t3_ts4avc", "created_utc": 1648639752.0} +{"sub": "Python", "title": "python dictionary comprehension", "selftext": "", "upvote_ratio": 0.67, "id": "t3_ts3lg7", "created_utc": 1648637091.0} +{"sub": "Python", "title": "Do you have experience with stocks prices analysis?", "selftext": "I am about to start a hobby project, mainly for learning and curiosity. I want to analyze stocks data and try to learn some basic concepts about investing and machine learning. The flow should be following: \n\n\n\\- Use some free API to get historic stocks data. \n\\- Store data in the database (probably PostgreSQL hosted on Heroku). \n\\- Train neural network to predict stocks prices (here, I have the biggest knowledge gap). \n\\- Use some free API to get real-time stocks data. \n\\- Store real-time data in the database. \n\\- Compare predicted stocks prices with actual stock prices in BI tools like GoodData, or Looker. \n\n\nI know it is not rocket science, but as I said, my motivation is to learn something new. Before I start, I would like to ask you if you have experience with such a similar project and if there is something you might recommend to me.", "upvote_ratio": 0.71, "id": "t3_ts2ujz", "created_utc": 1648633956.0} +{"sub": "Python", "title": "How to document python functions?", "selftext": "Link: [https://www.youtube.com/watch?v=fU6qB06rkz0](https://www.youtube.com/watch?v=fU6qB06rkz0)", "upvote_ratio": 0.33, "id": "t3_ts2t1f", "created_utc": 1648633755.0} +{"sub": "Python", "title": "Froyo: A Python GUI utility for downloading works from Archive Of Our Own/AO3 (made in Python with Dear PyGui): a fast, responsive graphical user interface results in a user-friendly tool", "selftext": "&#x200B;\n\n[Froyo: A Python GUI utility for downloading works from Archive Of Our Own\\/AO3 \\(made in Python with Dear PyGui\\): a fast, responsive and user-friendly tool](https://i.redd.it/xyrdfo9zahq81.gif)\n\nFroyo is a small graphical application for downloading works from Archive Of Our Own (AO3). It supports batch downloading of works to supported formats (AZW3, EPUB, HTML, MOBI, PDF). The app is small, fast and functional, a perfect fit for Dear PyGui. Not every app has to be complex. Sometimes a tool just needs to get the job done.", "upvote_ratio": 0.89, "id": "t3_ts1iat", "created_utc": 1648627758.0} +{"sub": "Python", "title": "Programming languages: Python just got a boost from Facebook's Meta", "selftext": "", "upvote_ratio": 0.4, "id": "t3_ts1al4", "created_utc": 1648626768.0} +{"sub": "Python", "title": "Understanding __init__ Method in Python", "selftext": "", "upvote_ratio": 0.73, "id": "t3_ts0cgt", "created_utc": 1648622580.0} +{"sub": "Python", "title": "How do you define beginner, intermediate, and advanced?", "selftext": "\nThese terms are used frequently, but many seem to often disagree on them. Could be used to describe a persons knowledge, competence, or the qualiry od code/codebase etc.\n\nI would say a beginner is just someone who is learning the actual language, syntax, just learning to code. Maybe touching on the common built-in libraries, learning classes, and basic OOP.\n\nIntermediate is past the syntax and basic concepts and is using libraries. Intermediate is a lot longer phase, I think. Intermediate is learning about programming concepts, practices, patterns, design, libraries, ... \n\nAdvanced (again, in my perspective) is not a wizard who knows Python internals and corners of the python object model. It's someone who can create useful, well-structured programs from the ground up properly, using the right tools and libraries. Not just doing practice projects, but a larger product properly. Able to pretty much learn any technology needed for a project.\n\n\nWhat do you think? What do you disagree with?", "upvote_ratio": 0.92, "id": "t3_try32l", "created_utc": 1648613843.0} +{"sub": "Python", "title": "ipyvizzu - create animated charts in Jupyter Notebook using Python with this open-source tool", "selftext": "Hey,\n\nWe've built and released a new integration of our open-source charting library Vizzu. We hope this will help data scientists and analysts share their insights easier by utilizing animation for storytelling with data. We'd love to know what you think about it.\n\nMore info, tutorial & examples: [https://github.com/vizzuhq/ipyvizzu](https://github.com/vizzuhq/ipyvizzu)\n\nHere's a short video illustrating how ipyvizzu works.\n\nhttps://reddit.com/link/trxyg5/video/j6rd94q6mcq81/player", "upvote_ratio": 0.77, "id": "t3_trxyg5", "created_utc": 1648613371.0} +{"sub": "Python", "title": "Wednesday Daily Thread: Beginner questions", "selftext": "New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!\n\nThis 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.", "upvote_ratio": 1.0, "id": "t3_trtfcd", "created_utc": 1648598410.0} +{"sub": "Python", "title": "Looking for tips", "selftext": "I made a program to try and simplify square root radicals with python. I would like to get some feedback and tips on how to write some better code.\n\n[https://github.com/Falt-b/simpliify-radicals](https://github.com/Falt-b/simpliify-radicals)", "upvote_ratio": 0.8, "id": "t3_trlofs", "created_utc": 1648587916.0} +{"sub": "Python", "title": "I made a web-based Instagram bot that scrapes people's usernames and follows/unfollow them", "selftext": "&#x200B;\n\nhttps://reddit.com/link/tre7to/video/nf7rtqni9dq81/player", "upvote_ratio": 0.86, "id": "t3_tre7to", "created_utc": 1648579177.0} +{"sub": "Python", "title": "Multi-threaded Omegle bot with proxy support and other neat features, like content spinning and typo generator.", "selftext": "[https://github.com/embium/Omeglebot](https://github.com/embium/Omeglebot)\n\n# Omeglebot\n\nMulti-threaded Omegle bot with proxy support and other neat features, like content spinning and typo generator.\n\nI'm not even sure it's possible to run without proxies.\n\nI could sell this but I rather release it publicly.\n\nThis supported me financially for a few years. Enjoy.", "upvote_ratio": 0.76, "id": "t3_tre8z9", "created_utc": 1648579265.0} +{"sub": "Python", "title": "pync - Netcat for Python", "selftext": "Hi, I've been reading Black Hat Python and decided to try and make a Netcat library for Python developers.\n\nIt's not fully there yet (there's a few things I still need to do), but I thought I'd share it anyway in hopes that someone might find it useful.\n\nAnyway, here's the [GitHub repo](https://github.com/brenw0rth/pync) for the project if you're interested.\n\nAny feedback or criticism is welcome, thank you. \ud83d\ude0a", "upvote_ratio": 0.84, "id": "t3_tre60y", "created_utc": 1648579046.0} +{"sub": "Python", "title": "Any idea when Spyder Notebook will be stable and running for Spyder 5?", "selftext": "I would like to use it", "upvote_ratio": 0.33, "id": "t3_trbyzk", "created_utc": 1648577411.0} +{"sub": "Python", "title": "Tomorrow: a live 45-minutes session on the fundamentals of observability, OpenTelemetry, and distributed tracing in Python", "selftext": "Hi everyone, a quick reminder about the live OpenTelemetry and observability fundamentals session - in 2 days, Wednesday, March 30 at 11 AM PST.\n\nYou will learn how to instrument your apps to capture traces with OpenTelemetry in Python.\n\nThis session is at no cost and vendor-neutral.\n\nYou can expect in this session: 45 minutes of core concepts, how to deploy it yourself hands-on + Q&A.\n\nIf you are interested in observability, OpenTelemetry, and tracing - join!\n\nRegister here [https://www.aspecto.io/get-started-with-opentelemetry/](https://www.aspecto.io/get-started-with-opentelemetry/?utm_source=post&utm_medium=reddit&utm_campaign=r-python-opentelemetry-workshop-pyhon-march-30-2022)", "upvote_ratio": 0.87, "id": "t3_tra9f1", "created_utc": 1648574859.0} +{"sub": "Python", "title": "I built a real-time stock tracker using Python + Fast API, Alpaca, Next.js, and Redis Stack. Check it out!", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tra4u1", "created_utc": 1648574515.0} +{"sub": "Python", "title": "I love type annotations, so I made a quick tutorial on how to add types to Flask SQLAlchemy", "selftext": "", "upvote_ratio": 1.0, "id": "t3_tr9r9n", "created_utc": 1648573518.0} +{"sub": "Python", "title": "IndiePython.com - content about indie projects using Python (specially gamedev)", "selftext": "Hello, I'd like to present a website ([indiepython.com](http://indiepython.com)) I created to publish content about my indie Python projects including apps and games. It is still a work in progress, but it already has a lot of content about projects I'll be releasing, including, for instance, a node editor to be released on June 2022 like you can see below. My apps and their source code are free of charge and will be released to the public domain, both on github and pypi (can be installed via \"pip install\" command).\n\n[Nodezator \\(node editor to be released on June 2022 to the public domain\\)](https://reddit.com/link/tr5l1q/video/qfelxkvcicq81/player)\n\nIt should feature other content like tutorials/articles as well in the future. Thanks for your time.", "upvote_ratio": 0.6, "id": "t3_tr5l1q", "created_utc": 1648569821.0} +{"sub": "Python", "title": "If a person posts Python code to Amazon Web Services can it run all the normal Python libraries? I was thinking to a greater extent about moviepy.editor.", "selftext": "If a person posts Python code to Amazon Web Services can it run all the normal Python libraries? I was thinking to a greater extent about moviepy.editor.", "upvote_ratio": 0.55, "id": "t3_tr43cm", "created_utc": 1648566871.0} +{"sub": "Python", "title": "Boss told me to learn python.", "selftext": "Got told I need to learn python from my boss, where should I start? Codeacademy? Like how they are teaching you there. But how good is it? Better places to learn?\n\n*Edit* \nMy boss wants me to learn to program for robots and different task for automation of tasks. He told me I should learn the basics and then more about that field. Thinking something like making bots should be a good project? \n\nCurrent knowledge is Visual Basic some years ago.", "upvote_ratio": 0.83, "id": "t3_tr31rs", "created_utc": 1648566271.0} +{"sub": "Python", "title": "Garmin Connect File Manager", "selftext": "Hey everyone,\n\nI put together [this project](https://github.com/lucas-nelson-uiuc/garmin-connect-file-manager/tree/main) to help me store (and, in the future, analyze) activities recorded on my Garmin to my local computer. It builds off the popular [gcexport](https://github.com/kjkjava/garmin-connect-export) repo with additional functionality including summary/geographical data extraction as well as activity-based sorting.\n\nFeel free to look things over if you're looking to critique someone's code today and/or implement this in your Garmin data backup routine.", "upvote_ratio": 0.6, "id": "t3_tr2oml", "created_utc": 1648566073.0} +{"sub": "Python", "title": "Pagination for a User-Friendly Django App \u2013 Real Python", "selftext": "", "upvote_ratio": 1.0, "id": "t3_tr1m2y", "created_utc": 1648564625.0} +{"sub": "Python", "title": "Loading config from the environment in Quart & Flask", "selftext": "", "upvote_ratio": 1.0, "id": "t3_tqz50j", "created_utc": 1648558577.0} +{"sub": "Python", "title": "What is a Lambda function and its applications in Python", "selftext": "In this short article, I'm gonna explain Python's lambda functions in detail. A lambda function is a small anonymous function that can take any number of arguments but can only have one expression. Here is its syntax:\n\n**lambda arguments : expression**\n\nThe expression is executed and the result is returned.\n\n## Example:\n\nAdd 10 to argument a, and return the result:\n\n x = lambda a : a + 10\n print(x(5))\n\nThe result would be 15. (You could try this in a python IDE such as vs code)\n\n=========================================================================\n\nLambda functions can take any number of arguments:\n\n## Example:\n\nMultiply argument a with argument b and return the result:\n\n x = lambda a, b : a * b\n print(x(5, 6))\n\nThe result would be 30.\n\n=========================================================================\n\n**Why Use Lambda Functions?**\n\nThe power of lambda is better shown when you use them as an anonymous function inside another function. Say you have a function definition that takes one argument, and that argument will be multiplied by an unknown number:\n\n def myfunc(n):\n return lambda a : a * n\n\nUse that function definition to make a function that always doubles the number you send in:\n\n## Example:\n\n def myfunc(n):\n return lambda a : a * n\n \n mydoubler = myfunc(2)\n print(mydoubler(11))\n\nThe result would be 22.\n\n=========================================================================\n\nUse lambda functions when an anonymous function is required for a short period of time.\n\nIf you would like to watch the video version of this tutorial, you could click on the following link:\n\n[https://www.youtube.com/watch?v=DGUl5Uwz3g8](https://www.youtube.com/watch?v=DGUl5Uwz3g8)\n\n**#python** **#pythonlambda** **#lambdafunction**", "upvote_ratio": 0.44, "id": "t3_tqyil5", "created_utc": 1648556436.0} +{"sub": "Python", "title": "My first coding project: Twitter Plays Wordle", "selftext": "After starting my coding journey 3 months ago, I've finally made something that isn't a terminal calculator app :0\n\nSo I made [Twitter Plays Wordle](https://twitter.com/WordleGame_Bot) ([github](https://github.com/afnzmn/twitter-plays-wordle)), a twitter bot that uses replies to its tweet as guesses for a Wordle game.\n\nThe bot first checks if it's a fresh game. If yes, it tweets a blank Wordle grid. If it isn't, then it searches for the replies to its newest tweet, and checks to see if it has a guess in it. This can either be a reply with just a five letter word, or a five letter \\[guess\\] contained in square brackets. It adds this to a replies.csv. Then, it sorts the guesses by the likes, and uses the most liked valid reply as the guess. It then plugs the guess into a Wordle function, which just runs an algorithm for detecting what coloured square goes where, and adding it to a list. The list then gets joined and pushed out with other Wordle things for the Twitter bot to tweet. Finally, it adds the Wordle grid into a text file, and updates a csv on the current row position, the word number, and the win state to be used for the next tweet.\n\nIf you want to play it, here's the most [recent tweet](https://twitter.com/WordleGame_Bot/status/1508769809550434309)\n\nCurrently, I'm just running this on my old laptop since I can't really buy a hosting service, and iirc Heroku wouldn't run for the entire month with its free plan. If someone has an alternative, please let me know! (also if you wanna roast my code, you're welcome to do so)", "upvote_ratio": 0.6, "id": "t3_tqxx94", "created_utc": 1648554369.0} +{"sub": "Python", "title": "The history of performing functions in Django", "selftext": "A question from a beginner.\n\nThe [article](https://russianblogs.com/article/45611627794/) discusses what happens after the command is called *manage.p**y runserver*\n\nIs there any way to see this in the form of a \"log\" or similar functionality, not only after calling this particular command, but also after any actions, for example, in the admin panel, etc.?", "upvote_ratio": 1.0, "id": "t3_tqxkg9", "created_utc": 1648553092.0} +{"sub": "Python", "title": "Sourcepy: source python files straight from the shell", "selftext": "Hey folks, sharing a project I built just for fun, Sourcepy: [https://github.com/dchevell/sourcepy](https://github.com/dchevell/sourcepy)\n\nI was writing some increasingly messy shell functions and thought it would be nice if I could just write Python functions/variables/etc. instead and source them from the shell. So \u2026 that's what this is. It uses a mix of importlib and inspect machinery to \"source\" files (in reality, generating shell stubs that hook back into a bridging interface, and aliasing \\`source\\` so it works just like you\u2019d expect).\n\nAlong the way I ended up deep diving into type annotations and turning plain python functions into dynamic command line apps that can coerce to native values, handle stdin, work with a large variety of types & objects and do a number of other interesting things - all without your code having to know a thing about Sourcepy. You write plain old python functions, add typehints to the parameters for the best results, and in most cases it should \"just work\".\\*\n\nThis is still a work in progress - its use case is largely for folks like me who like excuses to mess around in Python and customise their environment and toolset to an unnecessary degree. \n\nTry it out, share any suggestions (or bugs, or criticism). I've poked around looking for similar projects and the only similar thing I could find required running a daemon which wasn't an approach I liked, so hopefully you'll find some novelty here.\n\n^(\\*not a guarantee)", "upvote_ratio": 0.95, "id": "t3_tqwyrh", "created_utc": 1648550680.0} +{"sub": "Python", "title": "Actual unique fun project ideas: Beginner | Intermediate | Advanced", "selftext": "Beginner: \n- Write a python function that creates 10 folders numbered 1-10 (hint: use context managers) \n- Using PILLOW, generate simple white noise images by randomly toggling individual pixel Colours between black and white in an MxN image (hint: use nested for loops) \n- Write a script that prints \u201cHello World\u201d in red coloured text in the terminal. (hint: look up ANSI escape codes and run this script in the terminal)\n- Create a virtual environment with the built in venv library. Activate this environment. pip install pandas. Confirm the install with pip ls. pip uninstall pandas. (hint: you\u2019ll learn about environments)\n\nIntermediate: \n- Using PILLOW, again generate simple white noise images, but this time by randomly toggling individual pixel Colours between any possible RGB value in an MxN image (hint: use nested for loops) \n- Create a python decorator to run any function you define in an infinite loop (hint: @) \n- Write a script that can simply parse large json files (1GB+) (hint: you\u2019ll learn about memory management and memory allocation errors) \n- Create a bare minimum Flask app to convert temperatures (F to C) - no CSS. (You\u2019ll learn a bit about packages and HTML)\n- Create a Bash Makefile.sh that automates the creation and activation of a virtual environment, and also pip installs pandas. Run this bash file. (hint: assumes Linux)\n\nAdvanced: \n- Using PILLOW and any coloured image as INPUT, write an algorithm that gradually decreases the brightness of an image radially towards the centre pixel \n- Create a bare minimum python based inverted index (like Elasticsearch) (hint: you\u2019ll learn about Classes, NLP, and basic algorithms) \n- Create a Selenium bot to enter random characters into any <input> HTML element on any website (hint: learn about \u201cinspect element\u201d in the browser)", "upvote_ratio": 0.9, "id": "t3_tqvytp", "created_utc": 1648546376.0} +{"sub": "Python", "title": "EXPENSE-TRACKER -> An application to keep your expenses organized", "selftext": "Hey all, few days ago, I have made a post of making an expense tracker - [here](https://www.reddit.com/r/Python/comments/slbhbi/expensetracker_an_application_to_keep_your/).\nAnd you all have helped me improving it. Thanks to all.\n\n# MODIFICATION\nSO, I thought to change the entire project into a package which can be used by installing it through pip.\nFirst of all, I change the code structure to classes and objects.\nthen add one decent functionality - \nCurrency converter\nPreviously, to show the expenses more clearly I use graphs.\nNow, I made another option of changing the currency of your expenses and compare it from the previous. Here, I have used tan API.\n\n# INSTALLATION AND CODE\nYou can see the code as usual on github - [here](https://github.com/Shreejan-35/EXPENSE-TRACKER). Here you can get all information.\n\nYou can install it using pip by the following ways - \n```\npip install expense-tracker\n```\nOR\n```\npip3 install exprense-tracker\n```\n\nThen run,\n```\nexpense-tracker\n```\n\nI was lucky that no one has till now taken **expense-tracker** as a name.\nThat's all to say.\n\nYou can follow me on instagram - [@star_cyber_warrior](https://www.instagram.com/star_cyber_warrior/)", "upvote_ratio": 0.57, "id": "t3_tqvrl9", "created_utc": 1648545457.0} +{"sub": "Python", "title": "How To Hire a Python Web Development Company for Your Project?", "selftext": "", "upvote_ratio": 0.25, "id": "t3_tqv3v9", "created_utc": 1648542428.0} +{"sub": "Python", "title": "Top 10 Python Data Science Projects with Source Code", "selftext": "", "upvote_ratio": 0.71, "id": "t3_tqu35m", "created_utc": 1648537849.0} +{"sub": "Python", "title": "I'm presenting live in 9 hours at Microsoft Reactor online about Python and Kubernetes. Let me know your questions in advance", "selftext": "", "upvote_ratio": 0.85, "id": "t3_tqta40", "created_utc": 1648534367.0} +{"sub": "Python", "title": "My python git binding", "selftext": "hi, i know there are already great python library for git. but i need simple library and working with all git & python 3 version, so i made this binding [https://github.com/guangrei/Gitpybinding](https://github.com/guangrei/Gitpybinding)\n\nglad to hear your thoughts \ud83d\ude4f", "upvote_ratio": 0.88, "id": "t3_tqolbm", "created_utc": 1648517515.0} +{"sub": "Python", "title": "First Full Stack, Mobile Friendly App (Flask)", "selftext": "Yet To Be Named Poll Based Matching App: [http://54.198.186.121:8080/](http://54.198.186.121:8080/)\n\nI was listening to a podcast at a company I want to work for and the host was talking about this idea for an app. I ended up building it to get my foot in the door and build out my project portfolio.\n\nThis is my first production deployment ever. I'd like to get a little foot-traffic and feedback which is what brings me here.\n\nCurrently, signup is required to view anything, however, user authentication is by the book using various flask based modules so all sensitive user data is encrypted.\n\nI think it's a tremendous example of what python is capable of. The whole app is 500ish python lines coupled with a few HTML pages, SQL queries, and a CSS stylesheet.\n\nWith that said, I encourage you to sign up, and either make or take a poll.\n\nAll feedback is welcome in the comments!", "upvote_ratio": 1.0, "id": "t3_tqn48r", "created_utc": 1648512727.0} +{"sub": "Python", "title": "Tuesday Daily Thread: Advanced questions", "selftext": "Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.\n\n**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.**\n\nThis 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.", "upvote_ratio": 0.85, "id": "t3_tqmvv4", "created_utc": 1648512009.0} +{"sub": "Python", "title": "Question: best ways to build Python command line utilities", "selftext": "I have two medium size (less than 1000 lines each) code bases that I would like to make into two command line utilities. Two obvious approaches are:\n\n1. Add a \\_\\_main\\_\\_.py file and a [setup.py](https://setup.py) to a module, and do a python [setup.ps](https://setup.ps) install\n2. Copy all source files into a single Python source file that starts with *#!/usr/bin/env python, and put script in PATH.*\n\nTo complicate matters, I use several different condo environments that I switch between. Is there an accepted best practice for this?", "upvote_ratio": 0.85, "id": "t3_tqgwm3", "created_utc": 1648494868.0} +{"sub": "Python", "title": "ONNX to PyTorch", "selftext": "We have released our Python Open Source tool for conversion ONNX models to PyTorch. Almost all Computer Vision neural networks architectures are supported. Please try it.\n\n[https://github.com/ENOT-AutoDL/onnx2torch](https://github.com/ENOT-AutoDL/onnx2torch?fbclid=IwAR1HpWxialVy-ILdHUYR8CJ_EsUyxbjhrMkZbWPWkQ0DuNuwvYDEpNVuhqc)\n\nI ask the Data Science community to support the project with a star on GitHub.", "upvote_ratio": 0.88, "id": "t3_tqgjsk", "created_utc": 1648493932.0} +{"sub": "Python", "title": "Software Engineering Tools and Best Practices for Data Science", "selftext": "", "upvote_ratio": 0.5, "id": "t3_tqfr47", "created_utc": 1648491771.0} +{"sub": "Python", "title": "A zoo for decorators", "selftext": "Hello there! First time posting here :)\n\nLast week I worked on a small python library and wanted to share it! \n\nReason for the library is that I found myself copy-pasting some python decorators over and over across multiple projects.\n\nLibrary is called deczoo (a zoo for decorators) and it's pip-installable.\n\ndocs: [https://fbruzzesi.github.io/deczoo/](https://fbruzzesi.github.io/deczoo/) \nrepo: [https://github.com/FBruzzesi/deczoo](https://github.com/FBruzzesi/deczoo)", "upvote_ratio": 0.5, "id": "t3_tqefp4", "created_utc": 1648488239.0} +{"sub": "Python", "title": "I made my own Task Deadline Tracker using Python!", "selftext": "Hi all, I'm really excited to share this little project I've finally finished! Meet Tasky, a program made using tkinter that will track the deadlines for the task you feed in and show you the time remaining for your tasks (for example 3d 2h 57m left for some task). I use it regularly to track my own tasks and thus plan accordingly. It's been really helpful to me. You can add, delete and edit tasks in it too.\n\nHope you all like it :)\n\n[Image showing Labelled Parts of Tasky](https://user-images.githubusercontent.com/68178267/160485795-411c9ccb-a133-4eea-a3ac-213c91ae2669.png) \nMore info and features: [Github Repo](https://github.com/AbhiK002/Tasky/)\n\n&#x200B;\n\n[It comes in 2 themes as well!](https://preview.redd.it/3dcztj22p5q81.png?width=965&format=png&auto=webp&s=618c3f6e291f9e84a3816a675f6d3bb9dd416379)", "upvote_ratio": 0.94, "id": "t3_tqe3tx", "created_utc": 1648487360.0} +{"sub": "Python", "title": "Python project that swipes for me on Tinder", "selftext": "demo link: [https://youtu.be/mRbEcqf1xLw](https://youtu.be/mRbEcqf1xLw)\n\n(the code breakdown link is in the description of the demo)", "upvote_ratio": 0.6, "id": "t3_tqdf63", "created_utc": 1648485556.0} +{"sub": "Python", "title": "In 2 days, running a live 45-minutes session on the fundamentals of observability, OpenTelemetry, and distributed tracing in Python", "selftext": "Hi everyone, there's a live OpenTelemetry and observability fundamentals session - in 2 days, Wednesday, March 30 at 11 AM PST.\n\n**You will learn how to instrument your apps to capture traces with OpenTelemetry in Python.**\n\nThis session is at no cost and vendor-neutral.\n\nYou can expect in this session: 45 minutes of core concepts, how to deploy it yourself hands-on + Q&A.\n\nIf you are interested in observability, OpenTelemetry, and tracing - this is the place to be!\n\nRegister here [https://www.aspecto.io/get-started-with-opentelemetry/](https://www.aspecto.io/get-started-with-opentelemetry/?utm_source=post&utm_medium=reddit&utm_campaign=r-python-opentelemetry-workshop-pyhon-march-30-2022)", "upvote_ratio": 0.66, "id": "t3_tqd44k", "created_utc": 1648484744.0} +{"sub": "Python", "title": "Solverecaptchas - An async Python library to automate solving ReCAPTCHA v2 using Playwright.", "selftext": "[https://github.com/embium/solverecaptchas](https://github.com/embium/solverecaptchas)\n\nSolves audio and image types!\n\n## Compatibility\n\nLinux, macOS, and Windows!\n\n## Installation\n\n$ pip install solverecaptchas\n\n## Usage\n\n import asyncio\n import sys\n \n from solverecaptchas.solver import Solver\n \n if len(sys.argv) == 4:\n pageurl, sitekey, proxy = sys.argv[1:]\n else:\n print('Invalid number of arguments (pageurl, sitekey, proxy)')\n sys.exit(0)\n \n if proxy.lower() == \"none\":\n proxy = None\n \n client = Solver(pageurl, sitekey, proxy=proxy)\n result = asyncio.run(client.start())\n if result:\n print(result)", "upvote_ratio": 1.0, "id": "t3_tqcsdg", "created_utc": 1648483853.0} +{"sub": "Python", "title": "I made a Twitter bot that hates you!", "selftext": "I've messed around in Python on and off for a couple of years now. Most of what I've made has been exceptionally dumb (poorly written text adventures, a thing that used turtle to draw different colored spirals, a Garfield comic generator) and left unfinished. Until now!\n\n[Insult Ivan](https://twitter.com/InsultIvan) is a twitter bot I've created using Tweepy, and marks the first one of my exceptionally dumb projects to actually be done enough to function. All it does is pull words from four large lists (one with phrases to start the insult, and then three words to make up the insult itself), and then tweets this out once a day. It saves insults to a text file, so it won't repeat itself. It also responds to mentions with an insult that it will then only ever use for that user, reusing it in response to subsequent mentions from the same user.\n\nAnyway, the code is an absolute mess (I'm kind of assuming? I don't really know.), and I'm sure there is so much that I could have done better. But it functions and I love it and I wanted to share this beautifully idiotic thing I made. \n\nCode isn't available anywhere if that's okay (I can maybe mess around and see if I can make that happen if anyone really wants it). I'm happy to answer any questions though!", "upvote_ratio": 0.67, "id": "t3_tqc8pe", "created_utc": 1648482379.0} +{"sub": "Python", "title": "PYTHON CERTIFICATIONS LIST - BEST OF 2022", "selftext": "[Python Certification](https://www.sprintzeal.com/blog/python-certifications) is an established general-purpose high-level programming language. It was established by Guido van Rossum in 1991, further developments were done by Python Software Foundation. The primary position in python is given to code readability. Because by using its syntax programmers will be able to create concepts with fewer lines of code.", "upvote_ratio": 0.17, "id": "t3_tqbfx0", "created_utc": 1648480156.0} +{"sub": "Python", "title": "A roadmap of the free CS curriculum on Qvault (JS, Python, Go)", "selftext": "", "upvote_ratio": 0.82, "id": "t3_tqaff4", "created_utc": 1648477395.0} +{"sub": "Python", "title": "Feedback Requested - First Script that Calls API and Posts to MS Teams", "selftext": "Looking for feedback regarding my first script. Overall it calls a API, cleans the data a bit and then makes a post to MS Teams.\n\nhttps://imgur.com/a/5MkAsGu\n\nAnything I'm doing terrible? Something I could do better? More efficient?", "upvote_ratio": 0.5, "id": "t3_tq9d4k", "created_utc": 1648474241.0} +{"sub": "Python", "title": "The counter-intuitive rise of Python in scientific computing", "selftext": "", "upvote_ratio": 0.93, "id": "t3_tq8jzp", "created_utc": 1648471730.0} +{"sub": "Python", "title": "X-Cash crypto now has a Python wrapper Library", "selftext": "", "upvote_ratio": 0.23, "id": "t3_tq8csg", "created_utc": 1648471059.0} +{"sub": "Python", "title": "PYTHON CERTIFICATIONS LIST - BEST OF 2022", "selftext": "Benefits of Python Certification\n\nFollowing are the benefits one would get through python certification,\n\n**Easy to learn**\n\nThe key benefit of python certification is the programming language of python is easy to learn. **Python certification** can be used as a channel to a career, where learning other programming languages and frameworks will start to seem interesting.\n\nIf one is a complete beginner and wants to learn about programming, python will help to start better. Python is a simple and easy-to-understand programming language. And once the course is completed and you get the python certification, you will be confident enough to explore more about the programming world.\n\n**Expertise in Python**\n\nWhen it comes to recruiting python programmers, recruiters always expect good skills and what is the unique skill that makes the candidate stand out from the rest of the crowd. **Python certification** will help in such situations, if you are one of the candidates applying for a position and you have a certificate you will have better chances to get selected.\n\nHence, having [python certification](https://www.sprintzeal.com/blog/python-certifications) will prove that you know better and will help you gain the recruiter's interest.", "upvote_ratio": 1.0, "id": "t3_tq7crh", "created_utc": 1648467751.0} +{"sub": "Python", "title": "py.quit it", "selftext": "", "upvote_ratio": 0.35, "id": "t3_tq6wo3", "created_utc": 1648465973.0} +{"sub": "Python", "title": "Scrape all Naver Video Results using pagination in Python", "selftext": "Using [`parsel`](https://parsel.readthedocs.io/):\n\n```python\nimport requests, json \nfrom parsel import Selector \n \nparams = { \n \"start\": 0, # page number \n \"display\": \"48\", # videos to display. Hard limit. \n \"query\": \"minecraft\", # search query \n \"where\": \"video\", # Naver videos search engine \n \"sort\": \"rel\", # sorted as you would see in the browser \n \"video_more\": \"1\" # required to receive a JSON data \n} \n \nheaders = { \n \"user-agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36\", \n} \n \nvideo_results = [] \n \nhtml = requests.get(\"https://s.search.naver.com/p/video/search.naver\", params=params, headers=headers, timeout=30) \njson_data = json.loads(html.text.replace(\"( {\", \"{\").replace(\"]})\", \"]}\")) \nhtml_data = json_data[\"aData\"] \n \nwhile params[\"start\"] <= int(json_data[\"maxCount\"]): \n for result in html_data: \n selector = Selector(result) \n \n for video in selector.css(\".video_bx\"): \n title = video.css(\".text\").xpath(\"normalize-space()\").get().strip() \n link = video.css(\".info_title::attr(href)\").get() \n thumbnail = video.css(\".thumb_area img::attr(src)\").get() \n channel = video.css(\".channel::text\").get() \n origin = video.css(\".origin::text\").get() \n video_duration = video.css(\".time::text\").get() \n views = video.css(\".desc_group .desc:nth-child(1)::text\").get() \n date_published = video.css(\".desc_group .desc:nth-child(2)::text\").get() \n \n video_results.append({ \n \"title\": title, \n \"link\": link, \n \"thumbnail\": thumbnail, \n \"channel\": channel, \n \"origin\": origin, \n \"video_duration\": video_duration, \n \"views\": views, \n \"date_published\": date_published \n }) \n \n params[\"start\"] += 48 \n html = requests.get(\"https://s.search.naver.com/p/video/search.naver\", params=params, headers=headers, timeout=30) \n html_data = json.loads(html.text.replace(\"( {\", \"{\").replace(\"]})\", \"]}\"))[\"aData\"] \n \nprint(json.dumps(video_results, indent=2, ensure_ascii=False)) \nOutput:\n\n[ \n { \n \"title\": \"Minecraft : \ud83c\udff0 How to build a Survival Castle Tower house\", \n \"link\": \"https://www.youtube.com/watch?v=iU-xjhgU2vQ\", \n \"thumbnail\": \"https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiU-xjhgU2vQ%2Fmqdefault.jpg&type=ac612_350\", \n \"channel\": \"\uc18c\ud53c Sopypie\", \n \"origin\": \"Youtube\", \n \"video_duration\": \"25:27\", \n \"views\": \"126\", \n \"date_published\": \"1\uc77c \uc804\" \n }, \n { \n \"title\": \"\uc870\uae08 \ud63c\ub780\uc2a4\ub7ec\uc6b8 \uc218 \uc788\ub294 \ub9c8\uc778\ud06c\ub798\ud504\ud2b8 [ Minecraft ASMR Tower ]\", \n \"link\": \"https://www.youtube.com/watch?v=y8x8oDAek_w\", \n \"thumbnail\": \"https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fy8x8oDAek_w%2Fmqdefault.jpg&type=ac612_350\", \n \"channel\": \"\uc138\ube48 XEBIN\", \n \"origin\": \"Youtube\", \n \"video_duration\": \"00:58\", \n \"views\": \"1,262\", \n \"date_published\": \"2021.11.13.\" \n } \n] \n```\n\nUsing [`playwright`](https://playwright.dev/python/) browser automation:\n\n```python\nfrom playwright.sync_api import sync_playwright \nimport json \n \nwith sync_playwright() as p: \n browser = p.chromium.launch(headless=False) \n page = browser.new_page() \n page.goto(\"https://search.naver.com/search.naver?where=video&query=minecraft\") \n \n video_results = [] \n \n not_reached_end = True \n while not_reached_end: \n page.evaluate(\"\"\"let scrollingElement = (document.scrollingElement || document.body); \n scrollingElement.scrollTop = scrollingElement scrollHeight;\"\"\") \n \n if page.locator(\"#video_max_display\").is_visible(): \n not_reached_end = False \n \n for index, video in enumerate(page.query_selector_all(\".video_bx\"), start=1): \n title = video.query_selector(\".text\").inner_text() \n link = video.query_selector(\".info_title\").get_attribute(\"href\") \n thumbnail = video.query_selector(\".thumb_area img\").get_attribute(\"src\") \n channel = None if video.query_selector(\".channel\") is None else video.query_selector(\".channel\").inner_text() \n origin = video.query_selector(\".origin\").inner_text() \n video_duration = video.query_selector(\".time\").inner_text() \n views = video.query_selector(\".desc_group .desc:nth-child(1)\").inner_text() \n date_published = None if video.query_selector(\".desc_group .desc:nth-child(2)\") is None else \\ \n video.query_selector(\".desc_group .desc:nth-child(2)\").inner_text() \n \n video_results.append({ \n \"position\": index, \n \"title\": title, \n \"link\": link, \n \"thumbnail\": thumbnail, \n \"channel\": channel, \n \"origin\": origin, \n \"video_duration\": video_duration, \n \"views\": views, \n \"date_published\": date_published \n }) \n \n print(json.dumps(video_results, indent=2, ensure_ascii=False)) \n \n browser.close() \n```\n\nOutput:\n\n```json\n[ \n { \n \"position\": 1, \n \"title\": \"Minecraft : \ud83c\udff0 How to build a Survival Castle Tower house\", \n \"link\": \"https://www.youtube.com/watch?v=iU-xjhgU2vQ\", \n \"thumbnail\": \"https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiU-xjhgU2vQ%2Fmqdefault.jpg&type=ac612_350\", \n \"channel\": \"\uc18c\ud53c Sopypie\", \n \"origin\": \"Youtube\", \n \"video_duration\": \"25:27\", \n \"views\": \"\uc7ac\uc0dd\uc218126\", \n \"date_published\": \"20\uc2dc\uac04 \uc804\" \n }, \n { \n \"position\": 1008, \n \"title\": \"Titanic [Minecraft] V3 | \ud0c0\uc774\ud0c0\ub2c9 [\ub9c8\uc778\ud06c\ub798\ud504\ud2b8] V3\", \n \"link\": \"https://www.youtube.com/watch?v=K39joThAoC0\", \n \"thumbnail\": \"https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FK39joThAoC0%2Fmqdefault.jpg&type=ac612_350\", \n \"channel\": \"\ub098\uc774\uc544Naia\", \n \"origin\": \"Youtube\", \n \"video_duration\": \"02:40\", \n \"views\": \"\uc7ac\uc0dd\uc21822\", \n \"date_published\": \"2021.11.11.\" \n } \n] \n```\n\nIf you need a more in-depth explanation, you can visit the blog post at SerpApi: https://serpapi.com/blog/scrape-all-naver-video-results-using-pagination-in-python/#full_code", "upvote_ratio": 0.4, "id": "t3_tq6vg2", "created_utc": 1648465829.0} +{"sub": "Python", "title": "Open-source tool to make awesome-looking docs", "selftext": "[https://mkdocs-magicspace.alnoda.org/](https://mkdocs-magicspace.alnoda.org/)\n\nThis is a free tool I made. It will help to make beautiful docs for any Python project, and host them on GitHub pages.\n\nBased on MkDocs, I extended it with lots of plugins and extensions. And created tutorials.\n\nI hope you find it useful.", "upvote_ratio": 0.82, "id": "t3_tq6sgn", "created_utc": 1648465502.0} +{"sub": "Python", "title": "GitHub - enthought/traits: Observable typed attributes for Python classes", "selftext": "", "upvote_ratio": 0.78, "id": "t3_tq4p5h", "created_utc": 1648456356.0} +{"sub": "Python", "title": "Top python libraries/ frameworks that you suggest every one", "selftext": "Hit your answer I wonder is there any hidden treasure.", "upvote_ratio": 0.81, "id": "t3_tq483b", "created_utc": 1648454163.0} +{"sub": "Python", "title": "Top 5 Python Time Series Libraries", "selftext": "", "upvote_ratio": 0.75, "id": "t3_tq3cjf", "created_utc": 1648450342.0} +{"sub": "Python", "title": "Master Python Comprehensions", "selftext": "Hi folks,\n\nWrote something down about Python Comprehensions, focusing on simplicity and readability.\n\nYou can have a look here [https://towardsdatascience.com/master-python-comprehensions-4ef1c66b452d](https://towardsdatascience.com/master-python-comprehensions-4ef1c66b452d)\n\nHappy to discuss :)\n\nThanks!", "upvote_ratio": 0.75, "id": "t3_tq2ain", "created_utc": 1648445882.0} +{"sub": "Python", "title": "a lightweight DNS traffic flow monitor", "selftext": "Hi, I wrote a lightweight DNS traffic query / response monitor by using Scapy. It will print each transaction per line. Here's the source code link: [https://github.com/meow-watermelon/dns-flow](https://github.com/meow-watermelon/dns-flow) I attached a screenshot to show the output example. Any suggestions are welcome. Thanks!\n\nhttps://preview.redd.it/8ky0mi6z02q81.png?width=2560&format=png&auto=webp&s=051e9591b484ff58d26eafd43b4ed3188faa7ba1", "upvote_ratio": 0.67, "id": "t3_tq1g8u", "created_utc": 1648442658.0} +{"sub": "Python", "title": "What type of language is Python?", "selftext": "I use python in all my classes and got into a discussion with my students about what type of language python is.\n\nInitially, I thought python is a completely \"non-typed\" language because we are able to suppress types while declaring variables and parameters:\n\n*def func(a, b): ...*\n\nBut then I found out that it's possible to type things up explicitly:\n\n*def func(a: int, b: int) -> int: ...*\n\nI ended up categorizing python as an \"implicitly typed\" language, and the interpreter must fill the types I don't explicitly add to the code. However, one of my students pointed out that, as python admits dynamic typing, it is a \"dynamically typed language\", which is the official classification (?).\n\nHowever, I have failed to wrap my mind around the fact that I can explicitly set the types, but the interpreter won't bat an eye in case I recast my variables:\n\n*def func(a: int, b: int) -> int:*\n\n*...c: int = a + b*\n\n*...return c*\n\n*d: int = func(1, 2)*\n\n*print(d)*\n\n*d = \"dynamically typed?\"*\n\n*print(d)*\n\nIs \"weakly-typed dynamic language\" a possible way to classify python?", "upvote_ratio": 0.63, "id": "t3_tpzl61", "created_utc": 1648435995.0} +{"sub": "Python", "title": "List comprehension vs multiplying a list differences?", "selftext": "Is there any difference between the following code?:\n\n arr = [[]] * 10\n arr = [[] for x in range(10)]\n\nI used the first method to initiate a list on a hackerank problem and I kept getting wrong answer. When I googled the answer and saw the person use the second method, so I tried it and got the right answer?? `[[]] * 10 == [[] for x in range(10)]` returns True. Why would the way I initiate this list cause a different result?\n\nIf anyone wants to try it themselves.. it's a real head scratcher for me.\n\n[https://programs.programmingoneonone.com/2021/05/hackerrank-dynamic-array-solution.html](https://programs.programmingoneonone.com/2021/05/hackerrank-dynamic-array-solution.html) \n\n\n def dynamicArray(n, queries):\n # Write your code here\n arr = [[] for x in range(n)]\n #Now try using the code below to initiate arr. This fails it for me.\n #arr = [[]] * n\n lastAnswer = 0\n answers = []\n for x in queries:\n idx = (x[1]^lastAnswer) % n\n if x[0] == 1:\n arr[idx].append(x[2])\n else:\n lastAnswer = arr[idx][x[2] % len(arr[idx])]\n answers.append(lastAnswer)\n return answers", "upvote_ratio": 0.59, "id": "t3_tpz8kn", "created_utc": 1648434777.0} +{"sub": "Python", "title": "Monday Daily Thread: Project ideas!", "selftext": "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.", "upvote_ratio": 1.0, "id": "t3_tpwknx", "created_utc": 1648425608.0} +{"sub": "Python", "title": "3D Render engine, written in 100% Python, No external libraries. *EPILEPSY WARNING*", "selftext": "EDIT: I have fixed the flickering issue! As long as you use the latest version there should be no flickering at all!\n\nVideo of it running: [https://youtu.be/7J2Pn8me7m8](https://youtu.be/7J2Pn8me7m8)\n\nGithub link: [https://github.com/E-Parker/Terminal-3D-Render/releases](https://github.com/E-Parker/Terminal-3D-Render/releases)\n\nI've been working on this for a little while, it's a simple 3D render engine that uses only the built-in python libraries.\n\nNOTE: If you suffer from any conditions that cause sensitivity to flashing lights do not use PREVIOUS versions of this program. The latest version is safe and free of flickering.Because the print command is very slow sometimes the screen will refresh before python is done drawing the frame, this causes the image to flicker occasionally. The effect worsens the faster your monitor's refresh rate is.\n\nThe features of this version are:- BMP decoding\n\n\\- OBJ decoding\n\n\\- Perspective Texture mapping\n\n\\- Depth buffer\n\n\\- Simple directional lighting\n\n\\- 231 colours!\n\nI don't think there is much to be learned from this other than how not to write a render engine, I spent a lot of time working out how to do things like decoding .bmp files when there are already solutions that are way faster and much less of a pain to work with. This was mostly an exercise to see how far I could go without any tools.\n\nAlso, do keep in mind this is the 4th project I've made with python, I'm not super experienced so don't expect the code to be very good-looking.", "upvote_ratio": 0.93, "id": "t3_tpv7hs", "created_utc": 1648421114.0} +{"sub": "Python", "title": "How did your coding style in python change after you learned another language?", "selftext": "Different languages make you write different code, but im curious if the way you wrote python changed due to coding in another language!", "upvote_ratio": 0.96, "id": "t3_tpu9p2", "created_utc": 1648418231.0} +{"sub": "Python", "title": "Build signed .aab with Kivy, Buildozer for Google Play Store (Windows & ...", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tppdqx", "created_utc": 1648404134.0} +{"sub": "Python", "title": "Made a Flask boilerplate using a services oriented structure", "selftext": "", "upvote_ratio": 0.88, "id": "t3_tpp9y4", "created_utc": 1648403841.0} +{"sub": "Python", "title": "Apilytics open-source middleware available for Flask! Install in 5 minutes and visualize all important metrics from your Flask backend", "selftext": "", "upvote_ratio": 0.72, "id": "t3_tpntm0", "created_utc": 1648399539.0} +{"sub": "Python", "title": "Actionable Notification with Callback in Python", "selftext": "", "upvote_ratio": 0.81, "id": "t3_tpmfni", "created_utc": 1648395499.0} +{"sub": "Python", "title": "Django 4 0 with Amazon RDS & Elastic Beanstalk Full Course", "selftext": "", "upvote_ratio": 0.79, "id": "t3_tpky84", "created_utc": 1648390913.0} +{"sub": "Python", "title": "Improved version of Al Sweigart's swordfish program", "selftext": "Yesterday, I worked on improving Al Sweigart's *swordfish* program to limit to three the attempts a user can input their name and password. I'm proud of my work, although I ran into several bugs which left me scratching my head for a while. A big Thank You to Al for writing such a good introduction to Python!\n\nhttps://preview.redd.it/lldmgux5nxp81.png?width=1494&format=png&auto=webp&s=1a881647b5ffd69fc9b2c921db059c636ca15d2b", "upvote_ratio": 0.64, "id": "t3_tpkr49", "created_utc": 1648390282.0} +{"sub": "Python", "title": "Learn Blockchain Concepts Practically With Python", "selftext": "", "upvote_ratio": 0.41, "id": "t3_tpjodl", "created_utc": 1648386792.0} +{"sub": "Python", "title": "PYVAULT - PYVAULT is a python program with which you can secure your precious passwords very easily.", "selftext": "Hi guys. So, I have made a python script which can store your passwords in a database and you can encrypt it with a secret key which is generated by the script only. Actually, with this , we can store our passwords pretty securely until our key is exposed.\n\nSo, I have used -\n\ni. sqlite3 (Used for database)\n\nii. cryptograhy (To work with encryption and decryption using the key)\n\nThese are the libraries.\n\nI used fernet to generate the key and to encrypt and decrypt the passwords and storing it in the database.\n\nThe script provides a list of options -\n\ni. Create a database\n\nii. Work with previous database\n\niii. Generate key\n\niv. Load key\n\nv. Retrive passwords\n\nYou can see the code here - [https://github.com/Shreejan-35/PYVAULT/](https://github.com/Shreejan-35/PYVAULT/)\n\nAll the contribution are welcome.\n\nI have done the project by learning from a video about password manager from a youtube channel - neuralnine. But, I worked with database and tried to take it to some advance steps.\n\n&#x200B;\n\nEdit 1:\n\nGuys I have uploaded this as a package on [pypi.org](https://pypi.org) as vaulter-py.\n\nYou can install it by typing -\n\n **pip install vaulter-py** \n\n&#x200B;\n\nThanks", "upvote_ratio": 0.4, "id": "t3_tpic7y", "created_utc": 1648381816.0} +{"sub": "Python", "title": "python-nbxmpp 2.0.6 out!", "selftext": "", "upvote_ratio": 0.6, "id": "t3_tpi6fh", "created_utc": 1648381174.0} +{"sub": "Python", "title": "Backtesting A Put Option With An Example Of A Sell Put", "selftext": "Here's a simple post for people looking to try to backtest a put option strategy, or even a sell put strategy. I did this up because I was trying to look at a stock with a favorable put premium, and wanted to see based on a historical basis what are the chances of profit if I kept selling puts on these underlying at that premium\n\n[https://medium.com/@derivativestester/backtesting-a-vanilla-put-option-or-warrant-on-python-eec3ebaea5b](https://medium.com/@derivativestester/backtesting-a-vanilla-put-option-or-warrant-on-python-eec3ebaea5b)\n\nHope that helps.\n\nThanks.", "upvote_ratio": 0.87, "id": "t3_tpggqk", "created_utc": 1648373495.0} +{"sub": "Python", "title": "I made a Python program that AUTOMATICALLY edits YouTube Videos!", "selftext": "https://youtu.be/WYiKb5Ggtjc", "upvote_ratio": 0.9, "id": "t3_tpgeiw", "created_utc": 1648373209.0} +{"sub": "Python", "title": "I've created a extension for the Tornado framework that makes working with the framework easier and code development faster.", "selftext": "The extension is located in the [PyPi](https://pypi.org/project/usernado/) and you can easily install and use it. But the documentation and doc strings are not complete. This can be a good starting point if you want to [participate in open source](https://github.com/reganto/Usernado/issues).\n\nInstall it via pip: `pip install usernado`\n\nCheck it out here: [https://github.com/reganto/usernado](https://github.com/reganto/Usernado)\n\nThank you for your attention.", "upvote_ratio": 0.74, "id": "t3_tpfzq3", "created_utc": 1648371196.0} +{"sub": "Python", "title": "Using Python and Django, I've built to a GPT-3 powered web application to help myself write better", "selftext": "I am good in writing in my native language but when it comes to my second language, sometimes I struggle. So, for this reason, using Python and Django, I've built to a GPT-3 powered web application to help myself write better. \n\nI've been using it for a while and it is working so good! \n\n[https://www.youtube.com/watch?v=mfzW-LDajog](https://www.youtube.com/watch?v=mfzW-LDajog)\n\nLooking forward to your feedback.\n\nBest,", "upvote_ratio": 0.5, "id": "t3_tpb1qd", "created_utc": 1648349987.0} +{"sub": "Python", "title": "I made my first gui program!", "selftext": "I finally made a gui using tkinter. Its a super simple program that takes in an image and then makes it into text art using the braille unicode characters. You can specify the final dimensions of the characters. Also you can control how sensitive it is. Seemed like a fun thing to try!\n\nNot many ive told have been interested or understood so I thought I should try here. \n[https://imgur.com/gallery/kMth4Cn](https://imgur.com/gallery/kMth4Cn) \n\n\nFor those curious Ill explain my process \nI use tkinter to make a menu with all the settings and when you click generate it runs my image algorithm \n\n\nThe algorithm is pretty simple and uses pillow \nUsing pillow I get an image and convert it to black and white \n\n\nThen I use two for loops to go through the grid of data. It starts and the 0,0 pixel. It then grabs a 2 wide and 3 tall chunk of values. If the values are above the contrast value they are then set to a 1, else its a 0. \n\n\nThen I reorganize the list of values of a chunk into a binary number. This is because the unicode counts up in binary. So once i arrange all the numbers to their binary number. I just convert that number to the unicode character. Then i save that chunk to a list. I do this for ever chunk on that layer. It then moves down and repeats until we have a matrix of braille characters. \n\n\nFinally it just prints those arrays to a txt file \n\n\nThe image kinda depends on how the text is displayed. On windows its inconsistent based on the zoom, certain levels of zoom cause distortions. \n\n\nSorry if this didn't make sense I tried my best to explain for those interested. Thank you for reading!", "upvote_ratio": 0.84, "id": "t3_tpak0x", "created_utc": 1648348186.0} +{"sub": "Python", "title": "Tools for designing hardware in Python", "selftext": "Any hardware designers here who use Python for designing hardware? There are a bunch of libraries that all seem promising [MyHDL](https://www.myhdl.org/), [PyRTL](https://github.com/UCSBarchlab/PyRTL), [PyVerilog](https://github.com/PyHDI/Pyverilog), [PyLog](https://github.com/hst10/pylog), [PyMTL3](https://github.com/pymtl/pymtl3), ... All seem to work roughly the same. Write code in Python and transpile it to VHDL/Verilog. Which of these are popular and well-maintained? MyHDL looks good but it's last release was 0.10 in 2018 and for hardware design you don't want to rely on 0.x software. Anything like Chisel for Python.", "upvote_ratio": 0.72, "id": "t3_tpa4eo", "created_utc": 1648346641.0} +{"sub": "Python", "title": "Sunday Daily Thread: What's everyone working on this week?", "selftext": "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.", "upvote_ratio": 1.0, "id": "t3_tp7ye1", "created_utc": 1648339210.0} +{"sub": "Python", "title": "Live video to ascii", "selftext": "Hi!\n\n&#x200B;\n\nFirst time posting, this is a small passion project which I coded in my free time.\n\n[https://github.com/DSERIOUSGUY/whoami.git](https://github.com/DSERIOUSGUY/whoami.git)\n\nIt basically converts Image/live video to ascii art (can save as Image or text) using openCV.\n\nCurrently it does not save video and only supports black/white and white/black coloring(my initial goal was to make it look a bit retro - if that makes any sense).\n\nI would love to hear your suggestions on how it could be improved on and what features could be added!\n\nEdit: Attached are samples of all modes (all are captured at different moments)\n\n&#x200B;\n\n[Video](https://preview.redd.it/19cpror02tp81.png?width=602&format=png&auto=webp&s=dd17430640f30d8c886c6ff79b42551a95de7841)\n\nSince I don't really care about latency for an image, higher resolution is used as compared to video.\n\n[Image](https://preview.redd.it/f5ufsr6g2tp81.png?width=1920&format=png&auto=webp&s=c8a52f4e27abdba583f2001d535e16bc19b6c1f5)\n\n&#x200B;\n\nA higher resolution image spreads out too much to be viewed as a picture, so had lower the resolution before writing the file\n\n[Text](https://preview.redd.it/9vb45izl2tp81.png?width=1920&format=png&auto=webp&s=ae36fb691f1ca9734b48cc3bdcc7ea36ae5f7f28)", "upvote_ratio": 0.78, "id": "t3_tp684n", "created_utc": 1648333884.0} +{"sub": "Python", "title": "toolgui: A modular event-driven GUI system for quickly building tools with Python and pyimgui.", "selftext": "", "upvote_ratio": 0.86, "id": "t3_tp50ru", "created_utc": 1648331504.0} +{"sub": "Python", "title": "Arcade version 2.6.13 has been released", "selftext": "Arcade, a 2D graphics library, has released version 2.6.13.\n\n[https://api.arcade.academy/en/latest/development/release\\_notes.html](https://api.arcade.academy/en/latest/development/release_notes.html)\n\n&#x200B;\n\n* New Features \n * Arcade can now run in headless mode on linux servers **opening more possibilities for users in for example the data science** community ([\\#1107](https://github.com/pythonarcade/arcade/issues/1107)). See [Headless Arcade](https://api.arcade.academy/en/latest/advanced/headless.html#headless) for more information.\n* Bugfixes\n * The random text glitching issue especially affecting users with iGPUs is finally resolved in pyglet. For that reason we have upgraded to the pyglet 2.0a2 release.\n * Fixed an issue causing [arcade.draw\\_circle\\_filled()](https://api.arcade.academy/en/latest/api/drawing_primitives.html#arcade.draw_circle_filled) and [arcade.draw\\_circle\\_outline()](https://api.arcade.academy/en/latest/api/drawing_primitives.html#arcade.draw_circle_outline) to always render with 3 segments on some iGPUs.\n * Fixed an issue causing interactive widgets to unnecessarily re-draw when hovering or pressing them. This could cause performance issues.\n * SectionManager\u2019s on\\_show\\_view \n was never called when showing a view\n* Various Improvements\n * [arcade.load\\_font()](https://api.arcade.academy/en/latest/api/text_pyglet.html#arcade.load_font) now supports resource handles\n * [PhysicsEngineSimple](https://api.arcade.academy/en/latest/api/physics_engines.html#arcade.PhysicsEngineSimple) can now take an iterable of wall spritelists\n * Sprite creation is now \\~6-8% faster.\n * Removed warning about missing shapely on startup\n * Window titles are now optional. If no window title is specified the title will be the absolute path to the python file it was created in. This was changed because of the new headless mode.\n * Removed arcade.quick\\_run \n. This function had no useful purpose.\n * Added clear method to UIManager ([\\#1116](https://github.com/pythonarcade/arcade/pull/1116))\n * Updated from Pillow 9.0.0 to 9.0.1\n* Tilemap\n * Rectangle objects which are empty(have no width or height) will now be automatically converted into single points.\n * The Tile ID of a sprite can be access with sprite.properties\\[\"tile\\_id\"\\] \n. This refers to the local ID of the tile within the Tileset. This value can be used to get the tile info for a given Sprite created from loading a tilemap.\n* Docs\n * Added python version support info to install instructions ([\\#1122](https://github.com/pythonarcade/arcade/pull/1122))\n * Fixed typo in [append\\_texture()](https://api.arcade.academy/en/latest/api/sprites.html#arcade.Sprite.append_texture) docstring([\\#1126](https://github.com/pythonarcade/arcade/pull/1126))\n * Improved the raycasting tutorial ([\\#1124](https://github.com/pythonarcade/arcade/issues/1124))\n * Replace mentions of 3.6 on Linux install page ([\\#1129](https://github.com/pythonarcade/arcade/pull/1129))\n * Fix broken links in the homepage ([\\#1139](https://github.com/pythonarcade/arcade/pull/1130))\n * Lots of other improvements to docstrings throughout the code base\n * General documentation improvements\n* OpenGL\n * [arcade.gl.Geometry](https://api.arcade.academy/en/latest/gl/geometry.html#arcade.gl.Geometry) now supports transforming to multiple buffers.\n * Added and improved examples in experimental/examples\n * Major improvements to API docs\n\nSpecial thanks to [Mohammad Ibrahim](https://github.com/Ibrahim2750mi), [pushfoo](https://github.com/pushfoo), [Alejandro Casanovas](https://github.com/janscas), [Maic Siemering](https://github.com/eruvanos), [Cleptomania](https://github.com/Cleptomania), [pvcraven](https://github.com/pvcraven) and [einarf](https://github.com/einarf) for their contributions to this release. Also, thanks to everyone on the Pyglet team! We depend heavily on Pyglet\u2019s continued development.", "upvote_ratio": 0.88, "id": "t3_tp4o3d", "created_utc": 1648330422.0} +{"sub": "Python", "title": "Why is Python so popular?", "selftext": "I am sorry if this is provocative to anyone, but personally I can't stand Python. I hate the indentations, Python is slow, no private keyword in OOP, dynamically typed ... \n\nObviously I can see that it has its reasons to be popular in certain areas like data science. But why in the world in the backend for production level code? Please actually explain to me why you think Python is great from a software engineering perspective. I am coming from C# and simply cannot see any advantages in Python.", "upvote_ratio": 0.28, "id": "t3_tp3od4", "created_utc": 1648327393.0} +{"sub": "Python", "title": "Space Science with Python - AI 1-9: A Convolutional Approach", "selftext": "Hey everyone,\n\nthe asteroid reflectance spectra project reaches almost its end. There are 5 more videos to come and then I will focus on another topic (Near-Earth Objects).\n\nAnyway, spectra are still amazing and I show in today's session how to conduct an ML multi-class classification experiment using keras and Conv1D layers.\n\nYou may thing: \"well... creating a Deep Learning architecture is like magic\". You are right. A few blueprints help one to get an idea how an architecture may look like. But improving e.g., the number of filters, layers, activations functions etc. is something that MUST be automatized. To tackle this, the next session will show \"Keras Tuner\" to automatize exactly this! \nHope you still enjoy the combination of Space - Python - ML and I am looking forward to chat with you either here or on [Twitter](https://twitter.com/MrAstroThomas).\n\nGitHub: [https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/9\\_dl\\_convnet\\_multiclass.ipynb](https://github.com/ThomasAlbin/Astroniz-YT-Tutorials/blob/main/%5BML1%5D-Asteroid-Spectra/9_dl_convnet_multiclass.ipynb)\n\nYouTube: [https://www.youtube.com/watch?v=648XF1o0B3c](https://www.youtube.com/watch?v=648XF1o0B3c)\n\nCheers, \nThomas", "upvote_ratio": 0.67, "id": "t3_tp0vo1", "created_utc": 1648322880.0} +{"sub": "Python", "title": "Show r/python: Sailor - a tiny PaaS to install on your servers/VPS that uses git push to deploy micro-apps, micro-services, sites with SSL, on your own servers or VPS", "selftext": "Hey Pythonistas, here's a tool that I would like to share with y'all that allows you deploy multiple apps on servers/VPS. Let me know what you think and some feedback or what you would like to see in it.\n\nIntroducing, Sailor. [https://github.com/mardix/sailor](https://github.com/mardix/sailor)\n\n**Sailor** is a tiny **PaaS** to install on your servers/VPS (DigitalOcean, Hetzner, Linode).\n\nIt uses git push to deploy micro-apps, micro-services and sites.\n\nIt natively supports Python, Nodejs, Static sites, and any other languages that can use the command line.\n\nSites deployed with **Sailor** automatically have SSL assigned with LetsEncrypt.\n\n**Sailor** can run long-running background workers and cron jobs.\n\nIt allows you to deploy multiple sites/apps using a single repository.\n\nIt gives you the option of having testing/staging/production environment deployed from the same codebase.\n\n**Sailor** lets you see some stats about your apps, along with scaling them.\n\n**Sailor** makes deploying apps a smooth sailing.\n\n*Ship it like a* ***Sailor!***\n\n[https://github.com/mardix/sailor](https://github.com/mardix/sailor)", "upvote_ratio": 0.67, "id": "t3_tozhrt", "created_utc": 1648318743.0} +{"sub": "Python", "title": "Interview with a Postdoc, Junior Python Developer in 2022", "selftext": "", "upvote_ratio": 0.93, "id": "t3_toy9gu", "created_utc": 1648315157.0} +{"sub": "Python", "title": "What is the most pythonic way to limit while loop iterations?", "selftext": "Hi all\n\nWhenever I write a while loop, I always want to limit the number of iterations it can run to avoid infinite loops while developing the program, what would the most pythonic way of doing that?\n\ntheres obviously the basic \n\n n = 0\n while condition and n < 100:\n n += 1\n\nbut the `n+=1` can easily get lost or commented out when you are working on the code \n\n\nIve also tried \n\n def count_generator():\n n = 0\n while True:\n yield n\n n += 1\n \n counter = count_generator()\n \n while condition and next(counter) < 100:\n\nor \n\n class Counter:\n def __init__(self):\n self.count = 0\n \n def inc(self):\n self.count += 1\n return self.count\n \n counter = Counter()\n \n while condition and counter.inc() < 100:\n\nboth of these feel like a lot of boiler plate for what should be a simple task, is there anything better?", "upvote_ratio": 0.8, "id": "t3_towbf7", "created_utc": 1648311909.0} +{"sub": "Python", "title": "Image Processing With the Python Pillow Library \u2013 Real Python", "selftext": "", "upvote_ratio": 0.82, "id": "t3_tov052", "created_utc": 1648310781.0} +{"sub": "Python", "title": "oCrypt0r - AES encryption library", "selftext": "Hello everyone! \n\n\nI have decided to for the first time, try my hand at making an encryption package/library. It uses salted AES encryption.\n\nAs of right now, I'm not sure what else to add to it or do as I have everything pretty much covered in terms of what could be encrypted. From just normal messages/strings to files and directories/folders.\n\nI hope you all like it or at least get some use out of it! \n\n\n\nHere is my github repo and PyPi link:\n- [GitHub - oCrypt0r](https://github.com/therealOri/oCrypt0r)\n- [PyPi - oCrypt0r](https://pypi.org/project/oCrypt0r/)", "upvote_ratio": 0.6, "id": "t3_tosyou", "created_utc": 1648308863.0} +{"sub": "Python", "title": "PIPELY - new lightweight pipeline library", "selftext": "hey there, just released a new version of `pipely` \\- a lightweight pipeline library that can trigger any sequence of classes in any order.\n\n# Simple Example:\n\ncreate `collect.yaml` \n\n steps:\n a1_print:\n exec: src/file1.py:firstA\n a2_print:\n exec: src/file1.py:secondA\n final_print:\n exec: src/file2.py:printDone\n depends_on:\n - a1_print\n - a2_print\n\n`depends_on` parameter sets the following order for pipely:\n\n1. firstly it parallelly executes `firstA` and `secondA` classes (`a1_print` and `a2_print` steps) from file `src/file1.py` \n2. and then executes `printDone` class (step `final_print`) from file `src/file2.py`\n\nIt also allows **value transformations** between classes and other cool things. \n\nCheck out [https://pypi.org/project/pipely/](https://pypi.org/project/pipely/) for more info, and let me know your feedback! \n\nThis is just a pet project I had during my free lunch time :)", "upvote_ratio": 0.73, "id": "t3_tosvcq", "created_utc": 1648308584.0} +{"sub": "Python", "title": "Simple Key Event Sending to an Application Wrapper I made", "selftext": "I made a Python library to send inputs to an executable, useful for scenarios such as having a neural network send decisions to a game. Essentially a wrapper around the win32api. \nYou can send events to a window in just 2 lines: \n\n\n hwnd = pyinput.get_handle(window_name) # Gets the handle\n pyinput.press_key(hwnd, pyinputkeycodes.VK_RETURN) # Sends Return key\n\nI got annoyed at doing boilerplate over and over for this so I made a quick library! \n[https://github.com/GaryFrazier/PyInput](https://github.com/GaryFrazier/PyInput)", "upvote_ratio": 0.71, "id": "t3_toryjt", "created_utc": 1648305770.0} +{"sub": "Python", "title": "Encrypto - A simple way of complicating/encrypting data", "selftext": "This is a repost I made to fit community guidelines.\n\n*Meet Encrypto, a revolutionary technology that can protect your data from the government **(Joke Intended)** and prevent the Feds from understanding your text.*\n\nThe code itself does a simple task. When asked to encrypt data, it will generate two random keys. One till be used for the Caesar Cipher offset and the other defines how many times the symmetric algorithm is run. This will give out a gibberish looking string, which is then converted into a BrainF\\*\\*k *like* looking code. Wrong keys during decryption will give you the erroneous data.\n\nNote that since each character is encoded with 8-characters, and that the Base64 encryption happens multiple times, file size may skyrocket. \n\nI visualized this concept a long time ago, but spent some months completely understanding Python and the logic required (Encryption types, etc.). This code was designed to mimic the Enigma machine with its separate codes for different encryption types.\n\nHere's the link to the code:\nhttps://github.com/Programmer-X31/Encrypto.git\n\nPlease give me your comments and give your ideas for what I should base the *third key* on.", "upvote_ratio": 0.68, "id": "t3_tonad8", "created_utc": 1648296993.0} +{"sub": "Python", "title": "Creating mp4 clips with soccer data and Python", "selftext": "Hi Pythonistas! I\u2019ve updated my package to allow users to creat mp4 clips of soccer data. Here is the short tutorial I wrote up on how to use it: https://todofootballclub.com/?p=1056. \nI\u2019ve also run into an issue of wanting to use latitude and longitude data in the future but realized there is a learning curve with trans Mercator projections and other things to do it. I\u2019m curious if anyone has ever started a project and realized \u2018oh wow, there\u2019s more to this than I thought\u2019?", "upvote_ratio": 0.9, "id": "t3_tomsiv", "created_utc": 1648295093.0} +{"sub": "Python", "title": "NiceScaler update 1.3.0", "selftext": "&#x200B;\n\n[GUI](https://preview.redd.it/gogk3hgavop81.png?width=2790&format=png&auto=webp&s=31396204dac0bb003f7ff7920a4c4555bf15109c)\n\n[example upscale](https://preview.redd.it/q9nwpoz8vop81.jpg?width=2486&format=pjpg&auto=webp&s=955eb9817ddc84a6d9392b00cf67d11b35577253)\n\nItch -> [https://jangystudio.itch.io/nicescaler](https://jangystudio.itch.io/nicescaler)\n\nGithub -> [https://github.com/Djdefrag/NiceScaler/releases/tag/1.3.0](https://github.com/Djdefrag/NiceScaler/releases/tag/1.3.0)\n\n&#x200B;\n\nupdate 1.3.0 (26.03.2022)\n\nOpenCL backend / UX improvement / Speed improvement\n\nNew feature\n\n* GPU OpenCL backend (to use GPU horsepower to upscale)\n* support for more images and video file types\n\nImprovements\n\n* updated Python (3.7.9 -> 3.9.10)\n* bugfix in AI model creation (speed boost \\~10% with all models)\n* deleted EDSR model (lighter .exe 110Mb -> 70Mb)\n* general code cleanup\n\nUX\n\n* deleted EDSR model button\n* new colors for left bar\n* new button to select OpenCL backend\n* removed AI models info under buttons\n* removed NiceScaler icon\n* added Github button\n* drag&drop space cleaning", "upvote_ratio": 0.94, "id": "t3_tok71u", "created_utc": 1648283523.0} +{"sub": "Python", "title": "The Oregon Trail", "selftext": "How many have ever played The Oregon Trail? I remember playing it in my later days of High School. Not the video game but the teletype version. I just ported over the original version from Fortran to Python.\n\nIf you want to read out the different parts of the port or even get the source here are some links:\n\n[https://keithmfoster.com/the-oregon-trail/](https://keithmfoster.com/the-oregon-trail/)\n\n[Github Repository](https://github.com/KeithMFoster/the-oregon-trail)\n\nHappy Trails.", "upvote_ratio": 0.93, "id": "t3_toa6c6", "created_utc": 1648256653.0} +{"sub": "Python", "title": "Saturday Daily Thread: Resource Request and Sharing! Daily Thread", "selftext": "Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?\n\nUse this thread to chat about and share Python resources!", "upvote_ratio": 0.75, "id": "t3_to8lbi", "created_utc": 1648252810.0} +{"sub": "Python", "title": "What's the dumbest, trivial, shoddily-written project you've made that somehow impressed a non-programmer?", "selftext": "I wrote a script that grabs an Overwatch screenshot, tries to recognize whatever hero portraits are present on the tab screen, then copies some text making hero suggestions into your clipboard. I'm 90% certain that the one person in the hiring process that sounded impressed when I mentioned it didn't actually look at it, because I got hired to try automating website tests with Selenium.\n\n(Note: I've long since taken this script down as it's in kind of a grey area with Blizzard's TOS)", "upvote_ratio": 0.93, "id": "t3_to8jhz", "created_utc": 1648252736.0} +{"sub": "Python", "title": "AI Project Ideas", "selftext": "Hi everyone, \nI need to make an AI project with full-fledged programming ... it has to be based on a social issue nd focused mainly on the data science domain. Does anyone have any suggestions for an idea that can be implemented using AI? I'm open to anything as it's a group project and we're mainly putting forth any ideas right now at the start and will start ruling out to a final within a few days", "upvote_ratio": 0.82, "id": "t3_to33to", "created_utc": 1648246367.0} +{"sub": "Python", "title": "pointers.py - segmentation faults in python", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tnz5uw", "created_utc": 1648242515.0} +{"sub": "Python", "title": "Kids Learn to Code in Python with the Raspberry Pi Foundation", "selftext": "", "upvote_ratio": 0.85, "id": "t3_tnw8zx", "created_utc": 1648234236.0} +{"sub": "Python", "title": "I've built a wrapper that makes building Telegram Bots a lot easier", "selftext": "It's called **MATE** (*Easy Telegram Application Maker*, but reversed lol) and it automatically handles the boring under the hood stuff, letting you focus on the logic of your app.\n\nIt comes with (fairly) complete **documentation** & a **PyPI** release.\n\ncheck it out here: [https://github.com/SudoOmbro/MATE](https://github.com/SudoOmbro/MATE)\n\nTell me what you think! \n\nThank you for your time :\\^)", "upvote_ratio": 0.81, "id": "t3_tnsarp", "created_utc": 1648229199.0} +{"sub": "Python", "title": "I Made a Hangman Game with Music, Light Artwork, and Sound Effects (GitHub Repo Below)", "selftext": "As my first python project, I decided to create a hangman game with music, light artwork, and sound effects. \n\nAfter completing PY4E on Coursera, I decided to create a program that combined all elements from the course. In all, it uses urllib for web scraping, sqlite3 to create and manage the leaderboard and wordbank, colorama for color, and playsound for sound. \n\nThere are also \"Classic\" and \"Hardcore\" modes. Classic operates as hangman traditionally works, and hardcore mode gives the user 8 seconds for input before subtracting a life and adding a part to the hangman. \n\nI started python in January, and it feels great to have actually created something!\n\nHere is the Github link: [https://github.com/DaSaltyPancake/Hangman.git](https://github.com/DaSaltyPancake/Hangman.git)", "upvote_ratio": 0.89, "id": "t3_tns9go", "created_utc": 1648229099.0} +{"sub": "Python", "title": "A free and flexible translation library in python", "selftext": "Hi y all,\n\n*I'm not making this post only to promote the project. I also want to invite contributors and get feedback.*\n\nFeel free to check the GitHub [repo here](https://github.com/nidhaloff/deep-translator)\n\ndeep-translator is a flexible and **free** translation library that supports multiple translators. \n\nI tried to make the API as consistent as possible so that it can be updated easily in the future. We fixed some bugs and added new features in the new releases.\n\nSince I don't have much time, I'm looking for maintainers & contributors, who want to join the project. Feel free to contact me if you are interested. You don't have to be a python professional, I want to help people make their first contribution and join the open-source world.", "upvote_ratio": 0.83, "id": "t3_tnp85j", "created_utc": 1648224421.0} +{"sub": "Python", "title": "GitHub - Rog3rSm1th/Frelatage: The Python Fuzzer that the world deserves", "selftext": "", "upvote_ratio": 0.43, "id": "t3_tnovr2", "created_utc": 1648223456.0} +{"sub": "Python", "title": "Python Selenium Tutorial #6 - Bypass Detection using plugins, settings & proxies", "selftext": "", "upvote_ratio": 0.83, "id": "t3_tnmxy8", "created_utc": 1648217926.0} +{"sub": "Python", "title": "Python - LinkedIn Skill Assessments Quizzes with Answers | MeshWorld", "selftext": "", "upvote_ratio": 0.36, "id": "t3_tnljc5", "created_utc": 1648213623.0} +{"sub": "Python", "title": "Python Pub/Sub", "selftext": "Let's see how far this rabbit hole goes. It's late evening. I started reading up on networking. It's 2am. Let's see how Redis implements pub/sub under the hood. Basically, I ended up writing my own pub/sub implementation in Python:\n\n[https://github.com/Salaah01/py-pub-sub/blob/master/server/server.py](https://github.com/Salaah01/py-pub-sub/blob/master/server/server.py)\n\n&#x200B;\n\nhttps://i.redd.it/u867y09txip81.gif", "upvote_ratio": 0.6, "id": "t3_tnkxf3", "created_utc": 1648211635.0} +{"sub": "Python", "title": "Value objects with Python", "selftext": "Hello r/Python\n\nThis is my first post here.\n\nI created a blog post about value objects with Python.\n\n[https://blog.szymonmiks.pl/p/value-objects-with-python/](https://blog.szymonmiks.pl/p/value-objects-with-python/)\n\n&#x200B;\n\nCode examples are available on my GitHub [https://github.com/szymon6927/szymonmiks.pl/tree/master/blog/content/post/06-value-objects-with-python/value-object-examples](https://github.com/szymon6927/szymonmiks.pl/tree/master/blog/content/post/06-value-objects-with-python/value-object-examples).\n\n I hope you will enjoy it. I would love to hear your opinion", "upvote_ratio": 0.6, "id": "t3_tnk6p3", "created_utc": 1648209000.0} +{"sub": "Python", "title": "Ethereum Price Email Alerts With Python", "selftext": "", "upvote_ratio": 0.11, "id": "t3_tnjf86", "created_utc": 1648206202.0} +{"sub": "Python", "title": "Reactivex like operators that can be used directly on async iterables", "selftext": "I'm a fan of the [operators](https://rxpy.readthedocs.io/en/latest/reference_operators.html) available in ReactiveX. I'm not a fan of observables, and all the other cruft that comes with using reactivex. I would much rather be writing async generators, and using them in async for loops.\n\nSo I've started writing a library that implements the operators typically found in Reactivex libraries, and I'm posting it here for some early feedback. \nSource: [https://github.com/garyvdm/aiterx](https://github.com/garyvdm/aiterx) \nExample:\n\n >>> from asyncio import run, sleep\n >>> from aiterx import debounce\n >>> \n >>> async def source():\n ... yield 1\n ... await sleep(0.2)\n ... yield 2\n ... await sleep(0.1)\n ... yield 3\n ... await sleep(0.1)\n ... yield 4\n ... await sleep(0.2)\n ... yield 5\n ... \n >>> async def test_debounce():\n ... async for item in debounce(source(), 0.15):\n ... print(item)\n ... \n >>> run(test_debounce())\n 1\n 4\n 5\n\nHave I missed some existing library that does what I need? I did looked at these before I started:\n\n* [rxpy](https://rxpy.readthedocs.io/en/latest/)\n* [aioreactive](https://github.com/dbrattli/aioreactive)\n* [async-rx](https://geronimo-iia.github.io/async-rx/)\n\nAny feedback on the work I have done so far?", "upvote_ratio": 0.88, "id": "t3_tnifu4", "created_utc": 1648202004.0} +{"sub": "Python", "title": "Scrape Google Top Carousel Results in Python", "selftext": "Full code:\n\n```python\nimport requests, lxml, re, json\nfrom parsel import Selector\n\n# https://docs.python-requests.org/en/master/user/quickstart/#custom-headers\nheaders = {\n \"User-agent\":\n \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.83 Safari/537.36\"\n }\n\nparams = {\n \"q\": \"dune actors\", # search query\n \"gl\": \"us\", # country to search from\n }\n\n\ndef parsel_get_top_carousel():\n html = requests.get('https://www.google.com/search', headers=headers, params=params)\n selector = Selector(text=html.text)\n\n carousel_name = selector.css(\".yKMVIe::text\").get()\n all_script_tags = selector.css(\"script::text\").getall()\n\n data = {f\"{carousel_name}\": []}\n\n decoded_thumbnails = []\n\n for _id in selector.css(\"img.d7ENZc::attr(id)\").getall():\n # https://regex101.com/r/YGtoJn/1\n thumbnails = re.findall(r\"var\\s?s=\\'([^']+)\\'\\;var\\s?ii\\=\\['{_id}'\\];\".format(_id=_id), str(all_script_tags))\n thumbnail = [\n bytes(bytes(img, \"ascii\").decode(\"unicode-escape\"), \"ascii\").decode(\"unicode-escape\") for img in thumbnails\n ]\n decoded_thumbnails.append(\"\".join(thumbnail))\n\n for result, image in zip(selector.css('.QjXCXd.X8kvh'), decoded_thumbnails):\n\n title = result.css(\".JjtOHd::text\").get()\n link = f\"https://www.google.com{result.css('.QjXCXd div a::attr(href)').get()}\"\n extensions = result.css(\".ellip.AqEFvb::text\").getall()\n\n if title and link and extensions is not None:\n data[carousel_name].append({\n \"title\": title,\n \"link\": link,\n \"extensions\": extensions,\n \"thumbnail\": image\n })\n\n print(json.dumps(data, indent=2, ensure_ascii=False))\n```\n\nBlog post with more explanation: https://serpapi.com/blog/scrape-google-carousel-results-with-python/", "upvote_ratio": 0.81, "id": "t3_tngota", "created_utc": 1648193728.0} +{"sub": "Python", "title": "Build a Word Guessing Game in Python [video + source code]", "selftext": "Here is the link for the video : \n\n[https://youtu.be/M1t4RJ5XRHE](https://youtu.be/M1t4RJ5XRHE)\n\nHere is the link for the source code : \n\n [Word-Guessing-Game/wordgame.py at main \u00b7 The-Nerdy-Dev/Word-Guessing-Game (github.com)](https://github.com/The-Nerdy-Dev/Word-Guessing-Game/blob/main/wordgame.py)", "upvote_ratio": 0.8, "id": "t3_tngfjr", "created_utc": 1648192532.0} +{"sub": "Python", "title": "Build your own Feature Rich J.A.R.V.I.S in Python - Python Project", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tngd7q", "created_utc": 1648192249.0} +{"sub": "Python", "title": "Meta donates $300,000 to the Python Software Foundation", "selftext": "", "upvote_ratio": 0.91, "id": "t3_tnfh9l", "created_utc": 1648188306.0} +{"sub": "Python", "title": "Friday Daily Thread: Free chat Friday! Daily Thread", "selftext": "Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted!", "upvote_ratio": 1.0, "id": "t3_tn96gz", "created_utc": 1648166410.0} +{"sub": "Python", "title": "Python for AWS Lambda Functions: A Beginner's Guide and Tutorial", "selftext": "[https://codesolid.com/python-and-aws-lambda-functions](https://codesolid.com/python-and-aws-lambda-functions/)\n\nI just finished this -- it's very much focused on Python developers who may not have written an AWS Lambda function before and are wondering what all the fuss is about. Enjoy!", "upvote_ratio": 0.83, "id": "t3_tn7qfv", "created_utc": 1648162106.0} +{"sub": "Python", "title": "A simple python3 script to keep 2 folders synced", "selftext": "Hi r/Python, I'm here today to showcase a project that I've developed to experiment with python, github, ci/cd best practices and pytest.I'm not really a beginner, I've been coding in python for a while now (I'm a junior GCP developer). This post is just a request for feedback and/or suggestion on how to improve from more experienced python developers. Here is the repo : [https://github.com/davideolgiati/raidify](https://github.com/davideolgiati/raidify), feel free to open an issue on bug and suggested enhancements.", "upvote_ratio": 0.8, "id": "t3_tn733z", "created_utc": 1648160259.0} +{"sub": "Python", "title": "Guido van Rossum on Twitter: It's happening! BPO is migrating to GitHub tomorrow.", "selftext": "", "upvote_ratio": 0.95, "id": "t3_tn4lyj", "created_utc": 1648155805.0} +{"sub": "Python", "title": "Is Spock-Config the only tool that integrates object-oriented config files and command-line interfaces?", "selftext": "[Spock-Config](https://github.com/fidelity/spock) allows one to create OO configuration files. That's how I roll. I currently use [PYdantic settings](https://pydantic-docs.helpmanual.io/usage/settings/) and it's great. But it does not offer command-line re-configuration of what you have in the OO config file. \n\nSure you could manually do all the mappings yourself. But that's why I like spock.\n\nWhat I dont like about Spock is that [there is already another PyPI package with that same top-level-namespace](https://github.com/fidelity/spock/issues/235) ... why does PyPI even allow that? What would I do if I wanted to use both in the same project???\n\n### So somebody rock my world\n\nTell me about an alternative. [Plumbum](https://plumbum.readthedocs.io/en/latest/cli.html) kinda-sorta fits the bill.... but it really is just OO CLI development.", "upvote_ratio": 0.67, "id": "t3_tmz4yi", "created_utc": 1648150974.0} +{"sub": "Python", "title": "Performance: SQLAlchemy vs Django vs EdgeDB", "selftext": "", "upvote_ratio": 0.66, "id": "t3_tmqev6", "created_utc": 1648143624.0} +{"sub": "Python", "title": "IDE-style autocomplete that integrates with Python tools (pip, pyenv, etc)", "selftext": "&#x200B;\n\nhttps://reddit.com/link/tmleui/video/r3kh3f0pycp81/player", "upvote_ratio": 0.82, "id": "t3_tmleui", "created_utc": 1648139283.0} +{"sub": "Python", "title": "Github - Multiplatform (arm7, arm64, amd64) Docker Image for Celery with precompiled gevent", "selftext": "", "upvote_ratio": 0.75, "id": "t3_tmcp8z", "created_utc": 1648131220.0} +{"sub": "Python", "title": "Animating a Sprite Sheet in Python w/ PyGame", "selftext": "", "upvote_ratio": 0.8, "id": "t3_tmbg9f", "created_utc": 1648129996.0} +{"sub": "Python", "title": "How to create a digital clock with python easily", "selftext": " This tutorial is about creating a project using python language. I\u2019m going to show you how to create a digital clock with Python. Before reading the article, if you like to know more about Python, you could check out these two important articles:\n\n* [Why should I learn Python?](https://progskillss.com/why-should-i-learn-python)\n* [How to learn Python?](https://progskillss.com/how-to-learn-python-programming)\n\nThis project is suitable for beginners. To write the code, you need to know how to use modules in Python. Two necessary modules that I use in this project are Tkinter and time. Tkinter is a GUI library that helps you develop a graphical user interface for the digital clock, and using the time module; you could get the current time, date, timezone, etc. Let\u2019s dive deep into these modules.\n\nIf you want to read more about this project, you could click on the following link:\n\n[https://progskillss.com/how-to-create-a-digital-clock-with-python](https://progskillss.com/how-to-create-a-digital-clock-with-python)", "upvote_ratio": 0.54, "id": "t3_tmabdm", "created_utc": 1648128741.0} +{"sub": "Python", "title": "OpenTelemetry and Python: A Complete Instrumentation Guide", "selftext": "A blog post exploring how to instrument a Python application to emit tracing data (metric and log data interfaces are not stable quite yet). It examines:\n\n* How auto-instrumentation of the same codebase works.\n* The differences with manual instrumentation.\n* How to mix manual instrumentation with auto-instrumentation.\n* How to add information about exceptions.\n\nHere's the link: [https://www.timescale.com/blog/opentelemetry-and-python-a-complete-instrumentation-guide/](https://www.timescale.com/blog/opentelemetry-and-python-a-complete-instrumentation-guide/)", "upvote_ratio": 0.92, "id": "t3_tm8jte", "created_utc": 1648127261.0} +{"sub": "Python", "title": "Web2py Framework in Python", "selftext": "", "upvote_ratio": 0.6, "id": "t3_tm3sxx", "created_utc": 1648121398.0} +{"sub": "Python", "title": "Tree Traversal Algorithms in Python-InsideAIML", "selftext": "", "upvote_ratio": 0.85, "id": "t3_tm3jvl", "created_utc": 1648120520.0} +{"sub": "Python", "title": "Scientific computation using NumPy library", "selftext": "", "upvote_ratio": 0.43, "id": "t3_tm30b4", "created_utc": 1648118458.0} +{"sub": "Python", "title": "Learn Python yield interactively from your browser!", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tm2yyc", "created_utc": 1648118307.0} +{"sub": "Python", "title": "RaViewer: parsing and displaying binary data straight from camera (made with Dear PyGui)", "selftext": "&#x200B;\n\n[RaViewer screenshot](https://preview.redd.it/6e3n26fe7bp81.png?width=1220&format=png&auto=webp&s=9163087922bf30b0038e173e9290d6b56fa9f586)\n\n[RaViewer demo](https://i.redd.it/s4m2bmsa7bp81.gif)\n\n[RaViewer](https://github.com/antmicro/raviewer) is an open-source utility dedicated to parsing and displaying binary data acquired straight from camera. After opening a binary image, you can specify the color format, the image size and append or remove n bytes from the beginning of the image series. The binary image will be processed and shown based on these values. You can control which color channels are displayed and zoom in and out. For detailed information, you can view the hexadecimal pixel values in table format. The resulting image can be exported entirely or just a selected part to more complex formats (JPEG, PNG) or raw data. The source code is available in the project's [GitHub repository](https://github.com/antmicro/raviewer).\n\nYou can read more about RaViewer in this [article](https://antmicro.com/blog/2021/11/raviewer-open-source-tool-for-debugging-video-pipelines/) by [antmicro](https://antmicro.com/).\n\nMade with Python and the GUI was created with [Dear PyGui](https://github.com/hoffstadt/DearPyGui/wiki/Dear-PyGui-Showcase).", "upvote_ratio": 0.92, "id": "t3_tm2wb6", "created_utc": 1648118019.0} +{"sub": "Python", "title": "httpx worked fine for me... any reason to consider urllib3?", "selftext": "I've found [httpx](https://www.python-httpx.org/) to be very approachable for my API consumption tasks and less wordy than [urllib3](https://urllib3.readthedocs.io/).\n\nDo you have a preference for API consumption (perhaps requests) and why?", "upvote_ratio": 0.73, "id": "t3_tm1grs", "created_utc": 1648111891.0} +{"sub": "Python", "title": "I created a Python Script to find out Broken links by scanning entire WordPress Website", "selftext": "I created a Python script to check links in all the WordPress posts to find out broken ones. I tried creating this after learning multi-threading based, I had this idea for so long because other broken link checking software such as SiteBulb and ScreamingFrog take very long time (\\`24 hours) to crawl a one of my websites (having around 28000 posts). So, instead of crawling, I used WordPress API and this way it is much faster.\n\nI will modify it later to do the same thing for non-WordPress website, by analyzing the sitemap.\n\nIt goes through all the posts one by one from WordPress API, extract all the URLs from <a> tag and then checks their status by making a HEAD request.\n\n404 and other status codes are recorded. If the HEAD request fails, then name of the exception class is recorded.\n\nFinally, save the report in CSV file.\n\n[wpbroken script in action](https://preview.redd.it/30t209zd0ap81.png?width=1366&format=png&auto=webp&s=1ad89fc845ee0e77ee20197b0a887301b46f9748)\n\nGitHub Gist: [wpbroken.py](https://gist.github.com/ilovefreesw/fa763e1f84cd9f7101dc4816e293beda)", "upvote_ratio": 0.92, "id": "t3_tlzj7n", "created_utc": 1648103526.0} +{"sub": "Python", "title": "5 Python Libraries for Automating OSINT Operations", "selftext": "", "upvote_ratio": 0.91, "id": "t3_tlz7q5", "created_utc": 1648102201.0} +{"sub": "Python", "title": "Tutorial on GPU-based ray-casting with Python", "selftext": " \n\nIf you are interested in doing 'shadows' for a 2D game, here's a tutorial:\n\n[https://api.arcade.academy/en/development/tutorials/raycasting/index.html](https://api.arcade.academy/en/development/tutorials/raycasting/index.html)\n\nhttps://preview.redd.it/fd1dyzmoi8p81.png?width=1200&format=png&auto=webp&s=92fd25296d83102fd08e5d8f21b59d5d07c2e80f", "upvote_ratio": 0.94, "id": "t3_tlsb8q", "created_utc": 1648085480.0} +{"sub": "Python", "title": "Including packages in project", "selftext": "I've been working on project for a raspberry pi, which I've been writing on my PC in Pycharm, and SSHing over to my pi. What's the best way to move the whole project over, including the dependencies? Been just manually adding them on the pi and realized there has to be a better way.\nThanks!", "upvote_ratio": 0.67, "id": "t3_tlp1vn", "created_utc": 1648082311.0} +{"sub": "Python", "title": "Thursday Daily Thread: Python Careers, Courses, and Furthering Education!", "selftext": "Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!\n\n**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.**", "upvote_ratio": 0.67, "id": "t3_tlmt0a", "created_utc": 1648080009.0} +{"sub": "Python", "title": "Coin toss probability", "selftext": " import random\n from collections import Counter\n import itertools\n \n ##method for coin toss\n def cointoss():\n rand_i = random.randint(0, 1)\n outcomes = [\"Heads\", \"Tails\"]\n #outcomes = [0,1]\n return outcomes[rand_i]\n \n #create list\n list=[]\n \n ##Number of coin tosses\n n=3\n \n ##calls method and adds to the list\n for i in range(0, n):\n t1 = cointoss()\n list.append(t1)\n \n print(list)\n Counter(list)\n print(Counter(list))\n \n ##compare previous coin tosses with the last\n for index, i in enumerate(list):\n for j in list[index+1:]:\n print(\"list item i \"+str(i))\n print(\"list item j \" + str(j))\n \n if i==j:\n print(\"Same\")\n else:\n print(\"Not the same\")\n\n&#x200B;\n\nI'm trying to edit this code so that it outputs the number of times a certain side occurs in a row.\n\n&#x200B;\n\nSo for example, a person makes ten coin toss, how many times does heads occur three times or two times in a row.\n\n&#x200B;\n\nAny suggestions on how to edit it?", "upvote_ratio": 0.44, "id": "t3_tlkryn", "created_utc": 1648077791.0} +{"sub": "Python", "title": "Can we get hired just to do EDA\u2019s in Python ? Exploratory Data Analysis using libraries-", "selftext": "I\u2019ve been relatively new to Datascience, spent couple of years with sql, r, python, power BI & tableau.. I\u2019ve specifically loved getting involved with EDA\u2019s - what do you guys think ?", "upvote_ratio": 0.33, "id": "t3_tli7e4", "created_utc": 1648073230.0} +{"sub": "Python", "title": "Where will Python be in the Web3 space?", "selftext": "Hi guys, I noticed that there are two prominent libraries for web3 applications: [web3.py](https://web3.py) and web3.js . After doing some searching online, I have found there is some preference for web3.js over [web3.py](https://web3.py). Does this mean that Python might be obsolete in Web3?", "upvote_ratio": 0.32, "id": "t3_tlhee1", "created_utc": 1648072417.0} +{"sub": "Python", "title": "Pants 2.10: Multiple Python lockfile support, PyOxidizer, Thrift codegen, and better linter parallelization", "selftext": "", "upvote_ratio": 0.8, "id": "t3_tlgwka", "created_utc": 1648071777.0} +{"sub": "Python", "title": "Programming community for freetime team projects", "selftext": "The problem:\n\nI started learning programming 3 year ago, partly in university, partly at home, and built a few larger projects since then. I have a lot of new ideas for projects, which are fun, but could also be profitable if done right. The problem is the scale of these imagined projects is too large to handle them all by myself. Hiring developers doesn't feel like a solution for me. I would love to build projects together with other \"advanced\" programmers and exchange ideas, learn from each other, inspire each other. But how do I find people who are interested aswell?\n\nThe Solution:\n\nA more private, trustbased community of developers, who have time and energy to contribute unpaid work to programming projects. People could share and discuss ideas, group together in teams and start projects. Also if there is an intention to turn projects profitable teams could determine at the beginning how profits will be shared. I imagine this community as a discord server right now, but could be something else of cause.\n\n&#x200B;\n\n\\-Does anyone know if a community like this exists somewhere?\n\n\\-If no are there people here interested in starting a discord server to fill this purpose?\n\n&#x200B;\n\nThanks for reading and greetings from Hamburg, Maxim", "upvote_ratio": 0.67, "id": "t3_tlg6u2", "created_utc": 1648070961.0} +{"sub": "Python", "title": "Custom BurpSuite extensions in Python: recreating Cloud2Butt", "selftext": "", "upvote_ratio": 0.72, "id": "t3_tlg281", "created_utc": 1648070801.0} +{"sub": "Python", "title": "Text Similarity w/ Levenshtein Distance in Python", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tldsug", "created_utc": 1648068506.0} +{"sub": "Python", "title": "Mail merge in python", "selftext": "I have a excel/CSV data where in a single customer has multiple orders in different lines. Can I generate a list of text files in which each customer's multiple orders are present. Much like a invoice copy. Any clues on how to do this is highly appreciated ...\n\nPS ... I am learning python", "upvote_ratio": 0.8, "id": "t3_tl9dbz", "created_utc": 1648063812.0} +{"sub": "Python", "title": "i created a game controller using Arduino touch sensor and python", "selftext": "", "upvote_ratio": 0.5, "id": "t3_tl3raq", "created_utc": 1648057722.0} +{"sub": "Python", "title": "Creating a Python CLI with Go(lang)-comparable startup times", "selftext": "Hi Folks.\n\nI recently put some effort into creating a command line interface (CLI) made with Python.\n\nBackground: I started a new project called Gefyra, a tool for local application development directly with Kubernetes. Check it out the website [https://gefyra.dev](https://gefyra.dev) or have a glance at the code [https://github.com/gefyrahq/gefyra/tree/main/client](https://github.com/gefyrahq/gefyra/tree/main/client)\n\nI'd like to have an executable with (almost) the startup performance of `kubectl` (the executable to control a Kubernetes cluster). That means, I need fast startup times (which is crucial for a CLI) and ideally just one file (which is statically-linked) for easy distribution. In addition, I\u2019d like to provide executables for Windows, MacOS and Linux. For those requirements people would usually go for Go (needless to say it's awesome), however I started out with a prototype written in Python and it evolved over time. So I tried to find a way to make this work with Python.\n\nI went the following way:\n\n1. PyInstaller: [https://pyinstaller.readthedocs.io/en/stable/](https://pyinstaller.readthedocs.io/en/stable/)\n2. Nuitka: [https://nuitka.net/](https://nuitka.net/)\n3. PyOxidizer: [https://pyoxidizer.readthedocs.io/en/stable/](https://pyoxidizer.readthedocs.io/en/stable/)\n\n**PyInstaller**\n\nPyInstaller was quite easy to set up. However, the resulting executable was complained about by Virustotal (see: [https://www.virustotal.com/gui/home/upload](https://www.virustotal.com/gui/home/upload)) because of PyInstaller's bootloader. Somehow the code signature was also found in viruses (lol). To workaround this I compiled a bootloader myself which at least removed the virus issues. \n\nOn MacOS I faced startup times of more than 10 s with internet connection and about 3 s without internet connection. Interestingly, the former docker-compose command was also created from PyInstaller and Mac users complained about the startup performance, too: [https://github.com/docker/compose/issues/6956](https://github.com/docker/compose/issues/6956) :)\n\nI didn\u2019t find much to improve. The concept of PyInstaller will potentially always be a problem for fast startup times (which IMHO makes it unsuitable for CLI applications).\n\n**Nuitka**\n\nWith Nuitka, I generated very large binaries of about 150 Mb. The startup performance was already much better than PyInstaller for Mac and Linux. However, I was not completely satisfied and very long compile times bothered me a little bit (about 10 min).\n\n**PyOxidizer**\n\nI ended up using PyOxidizer. This well-crafted toolkit compiles Python to Rust code and also includes all dependencies into one handy binary executable. With no special optimizations I saw startup times of about 700 ms. That is almost acceptable, though I wanted to go a little further.\n\nI started to examine the output of `python -X importtime -m gefyra 2> import.log` just to check the imports. There is an awesome tool to analyze the Python imports: tuna (see: [https://github.com/nschloe/tuna](https://github.com/nschloe/tuna)). `tuna` allows analyzing the import times from the log. Run it like so `tuna import.log`. It opens a browser window and visualizes the import times. With that I was able to manually move all imports to the functions in which they are needed (and bring in some other optimizations). This greatly violates PEP 8 ([https://peps.python.org/pep-0008/#imports](https://peps.python.org/pep-0008/#imports)) but leads to very fast startup times.\n\nThese are the startup values I finally reached with `gefyra` under average modern Ubuntu:\n\n > python -m timeit \"__import__('os').system(gefyra)\" \n 10 loops, best of 5: 33.5 msec per loop \n\nPretty neat, isn\u2019t it? \nIn comparison the `kubectl` executable:\n\n > python -m timeit \"__import__('os').system('kubectl')\" \n 10 loops, best of 5: 24.9 msec per loop \n\nIn addition, I created GitHub actions to run the PyOxidizer builds once a new version is released (see: [https://github.com/gefyrahq/gefyra/blob/main/.github/workflows/dist-build-linux.yaml](https://github.com/gefyrahq/gefyra/blob/main/.github/workflows/dist-build-linux.yaml)). Only Windows is missing at the moment.\n\nAlthough, PyInstaller and Nuitka did not deliver the best startup times, I would not say it's bad software. They probably shine at other aspects.\n\nI hope these insights can be useful for someone else, too.", "upvote_ratio": 0.82, "id": "t3_tl3jwz", "created_utc": 1648057171.0} +{"sub": "Python", "title": "\u201cLike it or not, it\u2019s going to be primarily up to Python devs to crush the business side\u2019s dreams AI can magically make their company better.\u201d The CTO of an AI company explains why AI can be a waste of time and resources at most companies primarily because it\u2019s retrofitted onto existing products.", "selftext": "", "upvote_ratio": 0.91, "id": "t3_tkyuz8", "created_utc": 1648052349.0} +{"sub": "Python", "title": "Minos Demo - Stocks Index Wallet with Microservices", "selftext": "", "upvote_ratio": 1.0, "id": "t3_tkv9ax", "created_utc": 1648045935.0} +{"sub": "Python", "title": "Python Timer Functions: Three Ways to Monitor Your Code \u2013 Real Python", "selftext": "", "upvote_ratio": 0.8, "id": "t3_tkv08a", "created_utc": 1648045223.0} +{"sub": "Python", "title": "The top 5 advanced Python highly rated free courses On Udemy with real-world projects.", "selftext": "Hello,\n\n&#x200B;\n\n[Top 5 Python free courses](https://preview.redd.it/9p3qq8gacbp81.png?width=1024&format=png&auto=webp&s=b225e18de619f201c4aa711d229a72b5a7704aa2)\n\n**The top 5 Python highly rated free courses On Udemy with real-world projects.**\n\n[Course1: Applied Deep Learning Build a Chatbot Theory And Application.](https://www.udemy.com/course/applied-deep-learning-build-a-chatbot-theory-application/)\n\n[Course2: Master Data Analysis with Python Intro to Pandas.](https://www.udemy.com/course/master-data-analysis-with-python-intro-to-pandas/)\n\n[Course3: Machine Learning Crash Course for Beginners.](https://www.udemy.com/course/easy-machine-learning/)\n\n[Course4: The Art of Doing Video Game Basics with Python and Pygame](https://www.udemy.com/course/the-art-of-doing-video-game-basics-with-python-and-pygame/).\n\n[Course5: Master Data Analysis with Python \u2013 Selecting Subsets of Data.](https://www.udemy.com/course/master-data-analysis-with-python-selecting-subsets-of-data/)\n\nThe Courses List:\n\n[https://netslovers.com/2022/03/17/advanced-python-free-courses-udemy/?feed\\_id=277&\\_unique\\_id=623390a11ddad](https://netslovers.com/2022/03/17/advanced-python-free-courses-udemy/?feed_id=277&_unique_id=623390a11ddad)\n\nI hope you found this post helpful.", "upvote_ratio": 0.87, "id": "t3_tkuqsi", "created_utc": 1648044502.0} +{"sub": "Python", "title": "(I think) I stress tested matplotlib for real-time graping.", "selftext": "&#x200B;\n\n[Matplotlib Stress Test](https://i.redd.it/x3xvfvmeq4p81.gif)\n\nIt can run at 60 FPS if you push it to its limits, which is more than I need.\n\nThere are occasional hiccups, but I think it's fine.\n\nI am developing a simple GUI for an open-source DAQ module called [PlainDAQ](https://www.crowdsupply.com/kuncu-teknoloji/plaindaq). Before I start, I decided to stress test it to see if it can handle fast changing waveforms.\n\nI think this is pretty enough for my application\n\nHere is the [code](https://github.com/AlperenAkkuncu/PlainDAQ/blob/main/Development/GUI/sinewave_stress_test.py)\n\n**What more can I do to make it smoother? One guy in eevblog suggested me to look into garbage collection. What are your opinions?**", "upvote_ratio": 0.79, "id": "t3_tkt5v8", "created_utc": 1648039696.0} +{"sub": "Python", "title": "Python Generators", "selftext": "", "upvote_ratio": 0.72, "id": "t3_tksmex", "created_utc": 1648037852.0} +{"sub": "Python", "title": "Bloxs: display your data in an attractive way in your notebook", "selftext": "Hi, I would like to share with you a small python package that I've created to display data in a notebook in an attractive way. The package is called `bloxs` and is available on GitHub https://github.com/mljar/bloxs \n\nThe package can display as a block following data:\n\n- number with the title\n\n- progress bar \n\n- chart (can be a line, stepped line, bar)\n\nWhat is more, there can be several blocks displayed in one row.\n\n\nThe implementation is very simple, there is only one class, called `B`. It displays a single block or row of blocks. Each object of the `B` class has the `_repr_html_()` method that returns the HTML with a block.\n\nA very basic example:\n\n from bloxs import B\n B(1234, \"Bloxs in a notebook!)\n\n\nThe package works with Jupyter Notebook, Google Colab, Deepnote, and Kaggle.\n\nI hope you find it useful and it will help you to create beautiful dashboards, reports, and apps directly from the notebook.", "upvote_ratio": 0.74, "id": "t3_tkrlom", "created_utc": 1648034233.0} +{"sub": "Python", "title": "How To Automate Your Statistical Data Analysis", "selftext": "", "upvote_ratio": 0.75, "id": "t3_tkpe69", "created_utc": 1648024528.0} +{"sub": "Python", "title": "The Right Way to Compare Floats in Python", "selftext": "", "upvote_ratio": 0.78, "id": "t3_tkp7wz", "created_utc": 1648023709.0} +{"sub": "Python", "title": "Spotify LED Matrix", "selftext": "I created an LED matrix that takes your currently playing spotify song and displays it to an led panel. It uses a raspi 0w to create one thread to get data from the spotify api, and another to update the board. The code is rough around the edges, but I hope y'all enjoy it! \n\nDemo: \n\nhttps://reddit.com/link/tkp0xt/video/56ihrzuzb3p81/player\n\nRepo: [https://github.com/Evan-Nishi/spotify-panel-client](https://github.com/Evan-Nishi/spotify-panel-client) (stars would be appreciated :D)", "upvote_ratio": 0.9, "id": "t3_tkp0xt", "created_utc": 1648022796.0} +{"sub": "Python", "title": "Yet another simple wordle searcher", "selftext": "It is a script that will help narrow down the list of possible solutions to a wordle puzzle. In the end, you still have to use your grey matter, and, depend on luck. It scrapes data from Lou Hevly's website (which provides a regex search functionality). And then it applies some simple filtering algorithms on the results.\n\nScript & docs: [https://gist.github.com/deostroll/6014bd0cf3cc4b0a22894d0981cacddc#file-wordle\\_search-py](https://gist.github.com/deostroll/6014bd0cf3cc4b0a22894d0981cacddc#file-wordle_search-py)\n\n[2 minute video](https://www.youtube.com/watch?v=Js2DNbNynw4), where I am thinking a lot, but eventually defer to the script for help...But in the video I had used selenium/msedge. Later decided to use python requests and beautifulsoup...that is whats shared above...", "upvote_ratio": 0.57, "id": "t3_tkoi7q", "created_utc": 1648020431.0} +{"sub": "Python", "title": "Wednesday Daily Thread: Beginner questions", "selftext": "New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!\n\nThis 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.", "upvote_ratio": 0.67, "id": "t3_tkgwne", "created_utc": 1647993608.0} +{"sub": "Python", "title": "Flask web blog", "selftext": "Some days ago i made a Blog based-on Flask, it lets you add a custom password, username, upload small comments with HTML and it has a basic user authentication system!\n\nI called it \"comments\" (because of it's feature, it let's you to post small text with custom HTML) [https://github.com/ZSendokame/comments](https://github.com/ZSendokame/comments)\n\n&#x200B;\n\nI wan't ideas and/or feedback about how to improve it!\n\nBye", "upvote_ratio": 0.87, "id": "t3_tkgecq", "created_utc": 1647992128.0} +{"sub": "Python", "title": "I Created a Visualization Package for Soccer", "selftext": "I\u2019ve put my package on PyPi. The world of sports analytics, at least for soccer, is restricted. I wanted to learn how to analyze a game but found a large lack of data. Even worse, a lack of applications. I decided to creat my own Python package and help educate the public through my website. I\u2019ve made a YouTube tutorial to help others get started as well.\n\nhttps://youtu.be/tZlrULiN26E\n\nThe PyPi package is todofcpy", "upvote_ratio": 0.57, "id": "t3_tkgccb", "created_utc": 1647991972.0} +{"sub": "Python", "title": "Meta deepens its investment in the Python ecosystem", "selftext": "", "upvote_ratio": 0.95, "id": "t3_tkedpx", "created_utc": 1647986506.0} +{"sub": "Python", "title": "I made bubble slort. I dont think it looks clean but it works. Comments both in Polish and English", "selftext": "Here is image and link\n\n[https://github.com/bibi100101/Bubble-Sort](https://github.com/bibi100101/Bubble-Sort)\n\nhttps://preview.redd.it/t1oni4fc60p81.png?width=1920&format=png&auto=webp&s=76703d2816371f63a113f7d32130aa0cfaae37de\n\nShowcase\n\nTranslation:\n\n\\-Lista Wcze\u015bniej = list before\n\n\\-Lista Pozniej = list after\n\nhttps://preview.redd.it/cnqeybzq60p81.png?width=1359&format=png&auto=webp&s=e7f108267104423cdcc723689deb5d4b2c4953e9", "upvote_ratio": 0.5, "id": "t3_tkdp7o", "created_utc": 1647984659.0} +{"sub": "Python", "title": "Declarative command line parser library [Heated Arguments]", "selftext": "I was trying out a bunch of different command line parser libraries recently and wanted to see if I could take a different approach. I have a proof of concept for a command line parser that let's you define parameters and sub-commands in a declarative way.\n\nI have a repository with a couple demo scripts to show what the interface looks like and I was hoping to get some feedback if it looks interesting enough that I should keep developing it. Thanks!\n\nhttps://github.com/mjcaley/heated", "upvote_ratio": 0.72, "id": "t3_tkcfmu", "created_utc": 1647981274.0} +{"sub": "Python", "title": "Today i released a small package called geoiter. Used for web scraping", "selftext": "# geoiter\n\niterates the planet.\n\n**edit**\n\nA simple tool to iterate coordinates within given boundaries. \nThe usage is mostly for querying/searching by location. \nGeoiter provides many locations within a boundary, like a country. \nLet's say Germany has in sum 5000 houses to sell. Then most platforms will only allow you to visit the first 200 houses. \nNow to get the others, you need to dissect the big boundary area into smaller ones. \nAnd this is where geoiter provides you with coordinates\n\nyou can find the source on\n\n[https://github.com/cloasdata/geoiter](https://github.com/cloasdata/geoiter)\n\n**/ edit**\n\n&#x200B;\n\nhttps://preview.redd.it/vlzva9z6rzo81.png?width=665&format=png&auto=webp&s=72c8ebf635d7ae8ec3bfcbf1f74217fd53065daf\n\n**geoiter** can be used for web scraping to utilize geo/location queries:\n\n&#x200B;\n\n&#x200B;\n\nhttps://preview.redd.it/kdypecx8rzo81.png?width=1590&format=png&auto=webp&s=930cb8c7837bb1b1d9a80718b12538c713f229b0\n\nIn many cases the web page restrict the result items to a fixed number. With geoiter you can now dissect this one query to a many location queries to relax the result density under the restriction limit.\n\ngeoiter has only one additional dependency called [haversine](https://pypi.org/project/haversine/).\n\n## install\n\n pip install geoiter\n\n## usage\n\n import pickle\n \n from geoiter.util.ressource_example import germany\n from geoiter import GeoIter\n \n # get you boundary for example\n with open(germany, \"rb\") as file:\n germany = pickle.load(file)\n \n # prepare\n gi = GeoIter(\n boundary=germany,\n radius=100,\n comp_rate=20\n )\n \n if __name__ == \"__main__\":\n # plot them as example\n for coordinate in gi:\n print(coordinate)\n\n## speed\n\none may consider that geo data have mb of coordinates. Which may make the this iteration very slow, because it needs to look up coordinates in the boundary often. To accelerate the **geoiter** provides a very simple compressor and uses bisect instead of list iteration. However, it still can be slow.\n\n## extensions\n\nThere two extensions which give additional help\n\n pip install geoiter[\"gpx]\n\nprovides you with an gpx exporter.\n\n pip install geoiter[\"plot\"]\n\nprovides a plotting function to visualize the grid.\n\n## data\n\nget boundaries from osm or others sources like\n\n* [https://www.geoboundaries.org/](https://www.geoboundaries.org/)\n* [https://osm-boundaries.com/](https://osm-boundaries.com/)\n* ...", "upvote_ratio": 0.94, "id": "t3_tkbqms", "created_utc": 1647979432.0} +{"sub": "Python", "title": "Directories in Python", "selftext": " \n\nDirectories in Python\n\nhttps://youtu.be/Qip7MToDr18\n\n\\#python #python3 #directories #os #PythonProgramming #tutorial #PythonForResearchers", "upvote_ratio": 0.1, "id": "t3_tkb40y", "created_utc": 1647977755.0} +{"sub": "Python", "title": "Top 5 Benefits of Python Web Development That You Need to Know", "selftext": "", "upvote_ratio": 0.29, "id": "t3_tk9o0p", "created_utc": 1647973886.0} +{"sub": "Python", "title": "I made a tutorial on How to convert Images to ASCII using pygame", "selftext": "Hi everyone! I have been looking at various image filtering libraries, and some of them have image to ASCII filters. So I thought, why not make it using pygame?\n\nTutorial can be found [here](https://www.youtube.com/watch?v=oEacnqQgE4A)\n\nSource code can be found [here](https://github.com/tank-king/Tutorials/tree/main/Python%20Pygame/image_to_ASCII)\n\n&#x200B;\n\n[Image to ASCII](https://i.redd.it/7zvoo287azo81.gif)", "upvote_ratio": 0.89, "id": "t3_tk9jqo", "created_utc": 1647973579.0} +{"sub": "Python", "title": "Scrape Google Scholar Profiles from a certain University in Python", "selftext": "", "upvote_ratio": 0.75, "id": "t3_tk8itk", "created_utc": 1647970895.0} +{"sub": "Python", "title": "Text editors are stupid, change my mind", "selftext": "WHAT is the point of text editors for Python? Sure, they make you code faster but why not choose the standard IDLE? I mean, PyCharm never helped me. It always made a simple project too complicated to save. SO WHY CHOOSE TEXT EDITORS?", "upvote_ratio": 0.08, "id": "t3_tk7umy", "created_utc": 1647969075.0} +{"sub": "Python", "title": "Running a live 45-minutes session on the fundamentals of observability, OpenTelemetry, and distributed tracing in Python", "selftext": "Hi everyone, there's a live OpenTelemetry and observability fundamentals session - Wednesday, March 30 at 11 AM PST.\n\n**You will learn how to instrument your apps to capture traces with OpenTelemetry in Python.**\n\nThis session is at no cost and vendor-neutral.\n\nYou can expect in this session: 45 minutes of core concepts, how to deploy it yourself hands-on + Q&A.\n\nIf you are interested in observability, OpenTelemetry, and tracing - this is the place to be!\n\nRegister here [https://www.aspecto.io/get-started-with-opentelemetry/](https://www.aspecto.io/get-started-with-opentelemetry/?utm_source=post&utm_medium=reddit&utm_campaign=r-python-opentelemetry-workshop-pyhon-march-30-2022)", "upvote_ratio": 0.72, "id": "t3_tk71j6", "created_utc": 1647966912.0} +{"sub": "Python", "title": "We developed a Python tool to generate a map of your embedded or edge distributed system", "selftext": "Hi guys, we recently developed a Python tool that allows you to generate and visualize a map of your embedded or edge distributed system. With the open-source project r/Luos, we are trying to code and make accessible CI/CD for these systems. \n\nIs this feature useful for your needs?\n\n&#x200B;\n\n[Routing Table Luos](https://preview.redd.it/r66ib7hniyo81.png?width=570&format=png&auto=webp&s=d0d8c32b52d368c8d92a2e62e3dca49c77aced25)", "upvote_ratio": 0.77, "id": "t3_tk69zo", "created_utc": 1647964904.0} +{"sub": "Python", "title": "I've released a cache backend that uses dynamodb which is compatible with Django's cache framework.", "selftext": "Hello Pythonistas!\n\nI've released a cache backend that uses dynamodb which is compatible with Django's cache framework!\n\nplease enjoy :) \n\nhttps://github.com/xncbf/django-dynamodb-cache", "upvote_ratio": 0.8, "id": "t3_tk54q8", "created_utc": 1647961771.0} +{"sub": "Python", "title": "Unraveling the Mystery Behind Background Filters in Video Calling Apps", "selftext": "Ever wondered how video calling apps apply background filters during meetings and replace the background in the video with a background of your choice. This article explains this concept in detail and guides in step by step to implement one in Python.\n\n&#x200B;\n\n[https://medium.com/geekculture/unraveling-the-mystery-behind-background-filters-in-video-calling-apps-6802507f88a0](https://medium.com/geekculture/unraveling-the-mystery-behind-background-filters-in-video-calling-apps-6802507f88a0)", "upvote_ratio": 0.5, "id": "t3_tk40cc", "created_utc": 1647958616.0} +{"sub": "Python", "title": "GitHub - gretelai/gretel-python-client: The Gretel Python Client allows you to interact with the Gretel REST API.", "selftext": "", "upvote_ratio": 0.5, "id": "t3_tk3uqx", "created_utc": 1647958170.0} +{"sub": "Python", "title": "Python Project Workflow", "selftext": "", "upvote_ratio": 0.74, "id": "t3_tk1o33", "created_utc": 1647951494.0} +{"sub": "Python", "title": "I've been a bit confused on which data class library to use. I wrote this article as part of my own investigation into protobuf, pydantic, etc..", "selftext": "", "upvote_ratio": 0.75, "id": "t3_tk0i4d", "created_utc": 1647947327.0} +{"sub": "Python", "title": "Launching Open Source python library, VevestaX: track your Machine Learning experiments and features in an excel using 5 lines of code", "selftext": " \n\nHi everyone! We have launched an awesome open source python project that we have developed.\n\nWe have created a Python module named **VevestaX:** Easiest library in to track Machine learning experiments and features in an excel file with 5 lines of code !\n\nYou can check out the source code at our **GitHub page**: [https://github.com/Vevesta/VevestaX](https://github.com/Vevesta/VevestaX)\n\nPlease find a sample output file [https://docs.google.com/spreadsheets/d/1iOL3jiiQ834\\_vep5E4fPpxj7QDGVxOBJ/edit](https://docs.google.com/spreadsheets/d/1iOL3jiiQ834_vep5E4fPpxj7QDGVxOBJ/edit)\n\n**Please register** [https://forms.gle/samkZ1gDR53xDvPg7](https://forms.gle/samkZ1gDR53xDvPg7) **as beta testers**. Eager to hear from you.\n\nWe are also reachable on [vevestaX@vevesta.com](mailto:vevestaX@vevesta.com).\n\n**Please star our repository if you want to see it grow !**", "upvote_ratio": 0.57, "id": "t3_tjz9fx", "created_utc": 1647942213.0} +{"sub": "Python", "title": "Gufo Err: Python error handling framework", "selftext": "[Gufo Err](https://pypi.org/project/gufo-err/) is the flexible Python error handling framework. We'd used the same approach in the [NOC](https://getnoc.com/) for a long time. Now we reworked it as an independent component.\n\nBesides the extended tracebacks and *Sentry* integration it offers\na middleware-based approach for error handling, reporting, analysis, and mitigation. Fail-fast behavior allows detecting unrecoverable errors and quick termination of the application.\n\nError handling done right is a good foundation for all ranges of python applications, from simple automation scripts to high-load services.", "upvote_ratio": 0.6, "id": "t3_tjykut", "created_utc": 1647939172.0} +{"sub": "Python", "title": "Asynchronous Web Scraping With Python GRequests", "selftext": "", "upvote_ratio": 0.77, "id": "t3_tjy5ed", "created_utc": 1647937217.0} +{"sub": "Python", "title": "python syntax", "selftext": "does anyone feel like changing languages because of how anyone can understand python syntax?\n\ni feel like its cooler writing code that no one can ynderstand.. maybe its just me", "upvote_ratio": 0.28, "id": "t3_tjxth4", "created_utc": 1647935730.0} +{"sub": "Python", "title": "PEP 675 titled \"Arbitrary Literal String Type\" just got accepted.", "selftext": "", "upvote_ratio": 0.91, "id": "t3_tjx689", "created_utc": 1647932830.0} +{"sub": "Python", "title": "How to be a Successful Python developer: Tips to help your hiring prospects", "selftext": "", "upvote_ratio": 0.11, "id": "t3_tjwwnn", "created_utc": 1647931691.0} +{"sub": "Python", "title": "Just learned implementing decorators", "selftext": "Hi, I just learned how to make my own decorators and want to know some examples to use them. Some are using a `timer` decorator or a `log` decorator. Would like to get more examples to start thinking about the possibilities. Thanks in advance!\n\nEDIT:\nThank you everyone \ud83d\ude4f\ud83d\ude4f\ud83d\ude4f", "upvote_ratio": 0.75, "id": "t3_tjv4c3", "created_utc": 1647924427.0} +{"sub": "Python", "title": "The code for `import this` is amazing", "selftext": "Maybe this has been shared here before, but I recently took a peek at the code for the `this` module (the famous `import this` Easter egg that displays Tim Peters' \"Zen of Python\"). I think it might be the greatest \"do as I say not as I do\" code example that I've ever seen.\n\n s = \"\"\"Gur Mra bs Clguba, ol Gvz Crgref\n Ornhgvshy vf orggre guna htyl.\n Rkcyvpvg vf orggre guna vzcyvpvg.\n Fvzcyr vf orggre guna pbzcyrk.\n Pbzcyrk vf orggre guna pbzcyvpngrq.\n Syng vf orggre guna arfgrq.\n Fcnefr vf orggre guna qrafr.\n Ernqnovyvgl pbhagf.\n Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf.\n Nygubhtu cenpgvpnyvgl orngf chevgl.\n Reebef fubhyq arire cnff fvyragyl.\n Hayrff rkcyvpvgyl fvyraprq.\n Va gur snpr bs nzovthvgl, ershfr gur grzcgngvba gb thrff.\n Gurer fubhyq or bar-- naq cersrenoyl bayl bar --boivbhf jnl gb qb vg.\n Nygubhtu gung jnl znl abg or boivbhf ng svefg hayrff lbh'er Qhgpu.\n Abj vf orggre guna arire.\n Nygubhtu arire vf bsgra orggre guna *evtug* abj.\n Vs gur vzcyrzragngvba vf uneq gb rkcynva, vg'f n onq vqrn.\n Vs gur vzcyrzragngvba vf rnfl gb rkcynva, vg znl or n tbbq vqrn.\n Anzrfcnprf ner bar ubaxvat terng vqrn -- yrg'f qb zber bs gubfr!\"\"\"\n \n d = {}\n for c in (65, 97):\n for i in range(26):\n d[chr(i+c)] = chr((i+13) % 26 + c)\n \n print(\"\".join([d.get(c, c) for c in s]))\n\nSeriously! You can see it [here](https://github.com/python/cpython/blob/main/Lib/this.py).\n\nBeautiful is better than ugly unless you're Tim Peters and can make something that is both beautiful AND ugly!", "upvote_ratio": 0.67, "id": "t3_tjskz4", "created_utc": 1647915671.0} +{"sub": "Python", "title": "would it be more human readable if we had a \"the\" and \"where\" keywords that turned this: [item for item in items < 0] into: [the item in items where item < 0]", "selftext": "The reason I ask is because I was wondering if list comprehension always starts with item for item in items?\n\nif so, it's so inefficient and clumsy to always write thing for thing in things if... rather than just the thing in things where...\n\nPlease be kind if this is the stupidest idea ever. It was just a thought.", "upvote_ratio": 0.24, "id": "t3_tjr17p", "created_utc": 1647910929.0} +{"sub": "Python", "title": "Useful Tools and Programs list for Python", "selftext": "Useful Tools and Programs list for Python including learning resources, development tools , and frameworks. [https://github.com/mikeroyal/Python-Guide](https://github.com/mikeroyal/Python-Guide)", "upvote_ratio": 1.0, "id": "t3_tjqlra", "created_utc": 1647909621.0} +{"sub": "Python", "title": "Tuesday Daily Thread: Advanced questions", "selftext": "Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.\n\n**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.**\n\nThis 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.", "upvote_ratio": 1.0, "id": "t3_tjpsnz", "created_utc": 1647907211.0} +{"sub": "Python", "title": "LPT: Pandas DataFrames have a \"to_clipboard\" method", "selftext": "For those that don't know, Pandas has very useful to_clipboard and read_clipboard methods that make it easy to drop a DataFrame into an Excel sheet or to move it across python sessions without having to read and write CSV files. This is really useful for me and I hope it will help you too!", "upvote_ratio": 0.97, "id": "t3_tjodin", "created_utc": 1647903155.0} +{"sub": "Python", "title": "My TUI now automatically downgrades RGB colors to the richest palette available in your terminal!", "selftext": "&#x200B;\n\nhttps://preview.redd.it/56i77k4h6to81.png?width=1150&format=png&auto=webp&s=8b1cbeb3f7d719c0c47d5c9c11dc08cfa806e138\n\n[PyTermGUI](https://github.com/bczsalba/pytermgui), my terminal user interface library has now gained the ability to determine the highest-grade color that can be displayed in the terminal emulator it is running in, so that it can convert anything you would normally not be able to see into a color supported. This calculation is done with human perception of colors and brightness factored in, so it looks surprisingly accurate, even with only 16 colors.\n\nIt also gained extensive [https://no-color.org](https://no-color.org) support, turning all the colors that would normally be displayed into an xterm-256 greyscale based on their luminance & brightness, once again using human-based formulae.\n\n&#x200B;\n\nhttps://preview.redd.it/4m0otk4h6to81.png?width=1150&format=png&auto=webp&s=a912b1f662ea7b3653805ffacaa4ab04974cd4b3\n\nIf this interests you, check out the [release notes](https://github.com/bczsalba/pytermgui/releases/tag/v4.2.0), see our [subreddit](https://reddit.com/r/pytermgui) or simply install the module with [PIP](https://pypi.org/projects/pytermgui)!", "upvote_ratio": 0.77, "id": "t3_tjnd4p", "created_utc": 1647900398.0} +{"sub": "Python", "title": "I'm making my own 3D engine ! (I'm trying my best to improve the projection system but it's still garbage for now)", "selftext": "Source code: https://github.com/uItimatech/Python-3D-engine\n\nDemo: https://youtu.be/W-oaCeMkQkw", "upvote_ratio": 0.81, "id": "t3_tjlv0x", "created_utc": 1647896295.0} +{"sub": "Python", "title": "What is the difference between PyInstaller and PyOxydizer?", "selftext": "", "upvote_ratio": 0.14, "id": "t3_tjla5f", "created_utc": 1647894759.0} +{"sub": "Python", "title": "We created a tool to enrich your datasets", "selftext": "Hi everyone!\n\nI\u2019m Nathan, working on [subsets.io](https://subsets.io/), a platform where you can upload datasets, and get matched with relevant external data which you can add with one click.\n\nI've created a prototype to access our platform via sdk:\n\n&#x200B;\n\nhttps://i.redd.it/wp7qu2xy8so81.gif\n\nOur goal is to make it easier to pull in relevant external data. No more dealing with APIs and their rate limits, pagination, etc.\n\n Do you think this is be useful? Would love to hear your thoughts", "upvote_ratio": 0.67, "id": "t3_tjjdcf", "created_utc": 1647889658.0} +{"sub": "Python", "title": "Programmable HTTP CLI Tool", "selftext": "Instead of rewriting the same requests or sending a few data one by one while testing the api, I wrote a programmable http tool that can make many requests at once.\n\n[https://github.com/SinanKanidagli/httpy](https://github.com/SinanKanidagli/httpy)\n\nSome key features:\n\n* Expressive and intuitive syntax\n* Formatted and colorized terminal output\n* Programmable requests\n * Multiple requests one line\n * Value incremented each time\n * Random number per request\n * Read each value from the lines in the file\n * Value per each request as a list of multiple values\n* Built-in JSON support\n* Arbitrary request data\n* Custom headers", "upvote_ratio": 1.0, "id": "t3_tjhae1", "created_utc": 1647884233.0} +{"sub": "Python", "title": "I wrote a short article about the advantages and disadvantages of python with an example of how to use Python for working with data.", "selftext": "[https://dev.to/patrikbraborec/why-you-should-use-python-for-your-next-project-1lin](https://dev.to/patrikbraborec/why-you-should-use-python-for-your-next-project-1lin)", "upvote_ratio": 0.63, "id": "t3_tjcr91", "created_utc": 1647871996.0} +{"sub": "Python", "title": "Python Interpreter API? but a little bit better (Coding 101)", "selftext": " Coding 101 is a API that you can use in making an application similar to leetcode, codewars and other platforms that helps you practice technical interviews. Example calls are getting an easy question this API GET call will return the following\n\n \n\n{\"Id\": 23\n\n\"Description\":\n\n\"Create a Function and Name it Add and it will take 2 arguments and will return the sum of these 2 arguments\"\n\nFunctionName\":\"Add(a,b)\"\n\n\"Level\":1 }\n\n&#x200B;\n\n[API GET QUESTION CALL](https://preview.redd.it/xahvguwrgro81.png?width=940&format=png&auto=webp&s=6c016a3e5d9e867b71187439125bca510f5e7987)\n\n&#x200B;\n\n \n\nAfter receiving your first Api request call you can now call the PostCode api call which is a POST request you will send a json object that will contain your answer to the question and the Question ID.\n\nSee example below\n\n&#x200B;\n\n \n\n{Code: 'def Add(a , b) : return len(a)', Id: 23}\n\n&#x200B;\n\n&#x200B;\n\n[Tests return](https://preview.redd.it/s0laomztgro81.png?width=940&format=png&auto=webp&s=f1bd860da8e91927516271ff82ef35349c6c8341)\n\n&#x200B;\n\n \n\nIt will return the output of your answer respectively above picture is an example if your code gets accepted on all 3 testcases. If you get it wrong see below picture for the incorrect output\n\n&#x200B;\n\n[Incorrect Output](https://preview.redd.it/fnl46dbwgro81.png?width=940&format=png&auto=webp&s=4e141aec346b6c1bbf4c291dbb04863c8ad1ccbf)\n\n&#x200B;\n\n \n\n \n\nAnd That\u2019s It! Now you can create your own Website like leetcode , codewars if you have any creative ideas go ahead :D api link \n\n[https://rapidapi.com/pacejhayict--7\\_la6-gv3/api/coding101](https://rapidapi.com/pacejhayict--7_la6-gv3/api/coding101)", "upvote_ratio": 1.0, "id": "t3_tjffhc", "created_utc": 1647879245.0} +{"sub": "Python", "title": "Tetris in Pygame", "selftext": "Just my casual project\n[Demo](https://youtu.be/DjAszPLisic)|[Source Code(GitHub(Fixed))](https://github.com/Jatan-Bhatt-21/Tetris)\n\n:P", "upvote_ratio": 0.63, "id": "t3_tjeoz6", "created_utc": 1647877303.0} +{"sub": "Python", "title": "Video: Build a Speech Recognition System on a Raspberry Pi", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tjenh3", "created_utc": 1647877197.0} +{"sub": "Python", "title": "I Use Python for Soccer Analytics", "selftext": "Hello Pythonauts!\n\nI use python for Data Analytics; specifically for soccer. I am a Software Developer but this is a passion project for me. On my website, [TodoFootballClub](https://todofootballclub.com/), I write about soccer and the burgeoning use of data in the game. All of my studies are done in python as it is my favorite language to use.\n\nI've done a case study on fatigue in soccer in this article: [https://todofootballclub.com/?p=620](https://todofootballclub.com/?p=620)\n\nI provide the full code in the article as well. I'd love to hear what you think!\n\nhttps://preview.redd.it/qn7xlb186ro81.png?width=984&format=png&auto=webp&s=86156733e61b2baa55d1be441caf47a44c31b614\n\n&#x200B;\n\nhttps://preview.redd.it/ls08atns5ro81.png?width=982&format=png&auto=webp&s=cfeb2be3ad82bcff75b23b35fb8572030366f7c3", "upvote_ratio": 0.72, "id": "t3_tje08f", "created_utc": 1647875451.0} +{"sub": "Python", "title": "When do you use generators?", "selftext": "I know what they are, but I never write code and come to a point where I go \"ah yeah, perfect place to use a generator\"\nHow do you guys recognize that right case or what's the common pattern where you use it and why?", "upvote_ratio": 0.95, "id": "t3_tjd9l1", "created_utc": 1647873449.0} +{"sub": "Python", "title": "Async web server on ESP32 using Microdot | Micropython tutorial", "selftext": "Comprehensive written (and video!!) guide on how to use Microdot for your Micropython projects.\n\nIncludes how to deal with more advanced async coding, i.e. running web server while making pretty neopixel animations.\n\n[https://bhave.sh/micropython-microdot](https://bhave.sh/micropython-microdot)\n\nIf you have questions or comments, please let me know below!", "upvote_ratio": 0.7, "id": "t3_tjd7b8", "created_utc": 1647873272.0} +{"sub": "Python", "title": "I created a sorting algorithm, it is a schrobogosort. Basically it bogosorts and if it isn't sorted there is a 50% chance to shut down your PC every time it fails to sort", "selftext": "[https://replit.com/@KieranMcevoy/SchrodingerSort?v=1](https://replit.com/@KieranMcevoy/SchrodingerSort?v=1)\n\nWARNING: THIS WILL SHUTDOWN YOUR PC IF RAN OFF AN IDE NOT REPL", "upvote_ratio": 0.63, "id": "t3_tjcn6j", "created_utc": 1647871678.0} +{"sub": "Python", "title": "Aproches to planning a project", "selftext": "Tldr:\nAre there any tools/tips/tricks you guys use when starting out/ mapping a new project? Or rewriting an existing one?\n\nI mainly use python to analyze data from experiments i run in as part of my phd.\nSo for the past few years it's been very sufficient to simply create scripts per job/project i work on.\nBut I'm getting to a point where I'm trying to rework things so it's easier to understand - and for that i want to kind of map out what different steps i do overall.\n\nI guess the most basic way to represent this would be to say i have:\n input data -> parsed and combined to a csv -> different calculation -> different plots\nIt's obviously more complex but that is where i get lost - i can't think of a way to represent all the things i do. And it got me wandering since i guess this is a widely spread issue - how to layout a big project.\nSo again - any resources/tools/tips/tricks would be appreciated", "upvote_ratio": 1.0, "id": "t3_tjcfcy", "created_utc": 1647871105.0} +{"sub": "Python", "title": "All-in-One Python book bundle by Packt", "selftext": "", "upvote_ratio": 0.89, "id": "t3_tjbbj6", "created_utc": 1647867698.0} +{"sub": "Python", "title": "I have my own database that I wanna check plagiarism against, how difficult is it making a plagiarism checker?", "selftext": "", "upvote_ratio": 0.4, "id": "t3_tjb86q", "created_utc": 1647867437.0} +{"sub": "Python", "title": "Daily dose of Python", "selftext": "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/).\n\nThe episodes so far:\n\n1. [Union vs TypeVar](https://jerry-git.github.io/daily-dose-of-python/doses/1/)\n2. [contextmanager from contextlib](https://jerry-git.github.io/daily-dose-of-python/doses/2/)\n3. [Modern Python web stack](https://jerry-git.github.io/daily-dose-of-python/doses/3/)\n4. [Exhaustiveness checking with mypy](https://jerry-git.github.io/daily-dose-of-python/doses/4/)\n5. [PEP 673 Self Type](https://jerry-git.github.io/daily-dose-of-python/doses/5/)\n6. [Final qualifier](https://jerry-git.github.io/daily-dose-of-python/doses/6/)\n7. [apischema](https://jerry-git.github.io/daily-dose-of-python/doses/7/)\n8. [Static duck typing via Protocol](https://jerry-git.github.io/daily-dose-of-python/doses/8/)\n9. [dirty-equals](https://jerry-git.github.io/daily-dose-of-python/doses/9/)\n\nAnd countless more to come \ud83d\ude09\n\nThe 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).", "upvote_ratio": 0.97, "id": "t3_tj9tz1", "created_utc": 1647862900.0} +{"sub": "Python", "title": "How to Deploy a TensorFlow Model as a RESTful API Service", "selftext": "", "upvote_ratio": 0.79, "id": "t3_tj8uzz", "created_utc": 1647859275.0} +{"sub": "Python", "title": "oneFace: Generating interfaces(CLI, Qt GUI, Dash web app) from a Python function.", "selftext": "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:\n\n from oneface import one, Arg\n \n @one\n def bmi(name: Arg(str),\n height: Arg(float, [100, 250]) = 160,\n weight: Arg(float, [0, 300]) = 50.0):\n BMI = weight / (height / 100) ** 2\n print(f\"Hi {name}. Your BMI is: {BMI}\")\n return BMI\n \n \n # run cli\n bmi.cli()\n # or run qt_gui\n bmi.qt_gui()\n # or run dash web app\n bmi.dash_app()\n\nThese code will generate the following interfaces:\n\n[CLI](https://preview.redd.it/nrgkxp68cpo81.png?width=536&format=png&auto=webp&s=58c872f37c513fc5d2dd120e77065795479455a8)\n\n&#x200B;\n\n[Qt GUI](https://preview.redd.it/c5xrs7lccpo81.png?width=212&format=png&auto=webp&s=5fce4feaa5bec5298e35df574a50b3b72904da64)\n\n&#x200B;\n\n[Dash web app](https://preview.redd.it/nxylugpdcpo81.png?width=610&format=png&auto=webp&s=8df8d72bc95c151caba500c532257c33dfcd0d4e)\n\n## Other features\n\n* Automatically check the type and range of input parameters and pretty print them.\n* Easy extension of parameter types and GUI widgets.\n\n## Application and Limitations\n\nProvides 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.\n\n## Links\n\n* Repo: [https://github.com/Nanguage/oneFace](https://github.com/Nanguage/oneFace)\n* Documentation: [https://oneface.readthedocs.io/en/latest/](https://oneface.readthedocs.io/en/latest/)\n\n## Similar Projects\n\n* [Fire](https://github.com/google/python-fire): Generate CLI from Python objects.\n* [Gooey](https://github.com/chriskiehl/Gooey): Turn (almost) any Python 3 Console Program into a GUI application with one line.", "upvote_ratio": 0.9, "id": "t3_tj7d1w", "created_utc": 1647853109.0} +{"sub": "Python", "title": "Performance testing FastAPI ML APIs with Locust | Rubik's Code", "selftext": "", "upvote_ratio": 0.76, "id": "t3_tj6v1x", "created_utc": 1647850944.0} +{"sub": "Python", "title": "Why venv?", "selftext": "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.\n\n1. Why venv?", "upvote_ratio": 0.82, "id": "t3_tj32vd", "created_utc": 1647835530.0} +{"sub": "Python", "title": "Codecat", "selftext": " 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)", "upvote_ratio": 0.76, "id": "t3_tj2g24", "created_utc": 1647833363.0} +{"sub": "Python", "title": "LinkedIn Researchers Open-Source \u2018FastTreeSHAP\u2019: A Python Package That Enables An Efficient Interpretation of Tree-Based Machine Learning Models", "selftext": "Researchers from LinkedIn open-source the FastTreeSHAP package which is a Python module based on the paper \u2018[Fast TreeSHAP: Accelerating SHAP Value Computation for Trees](https://arxiv.org/abs/2109.09847).\u2019 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\u2019s computational efficiency by taking a different approach.\u00a0\n\nThe 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.\n\n[**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/)\n\nPaper: https://arxiv.org/pdf/2109.09847.pdf\n\nGithub: https://github.com/linkedin/fasttreeshap", "upvote_ratio": 0.76, "id": "t3_tj1koz", "created_utc": 1647830519.0} +{"sub": "Python", "title": "I created a self-hosted security camera system", "selftext": "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!\n\n[https://github.com/scottbarnesg/smart-sec-cam](https://github.com/scottbarnesg/smart-sec-cam)\n\n Some key features:\n\n* Multi-camera support w/ minimal configuration. Supports USB cameras and the Raspberry Pi camera module.\n* Motion detection that automatically saves videos and lets you view them in the web app.\n* Encrypted in transit, both from the cameras to the server and the server to your browser.\n* Self-hosted and FOSS", "upvote_ratio": 0.96, "id": "t3_tizhpw", "created_utc": 1647823860.0} +{"sub": "Python", "title": "Monday Daily Thread: Project ideas!", "selftext": "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.", "upvote_ratio": 0.67, "id": "t3_tiyhw1", "created_utc": 1647820810.0} +{"sub": "Python", "title": "Live Python Course from computer science professor on Cyber Insecurity Youtube Channel", "selftext": "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)", "upvote_ratio": 0.8, "id": "t3_tixven", "created_utc": 1647818906.0} +{"sub": "Python", "title": "The LAST 20 Python Packages you will ever need (Machine Learning, Data S...", "selftext": "", "upvote_ratio": 0.13, "id": "t3_tith9h", "created_utc": 1647806495.0} +{"sub": "Python", "title": "EZTV-AutoDownloader / Transmission Manager", "selftext": " Hello! (I don't know if this is for this sub.) \nI made Auto Downloader from EZTV and Transmission-Remote Manager written in Python. \n\n\nSome features:\n\n* Automatic download from EZTV\n* Check Episode and Season to see if ep is newer\n* Remove torrent from Transmission if Completed\n* Email notifications on add and complete.\n\nIf you're interested, go to the git repo for more information\n\nhttps://github.com/xhico/EZTV-AutoDownloader \nThanks!", "upvote_ratio": 0.67, "id": "t3_tiqz2t", "created_utc": 1647799587.0} +{"sub": "Python", "title": "MD now avaible on Termux", "selftext": "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! \n\n\n[https://github.com/eliamazzon/MusicDownloader](https://github.com/eliamazzon/MusicDownloader)", "upvote_ratio": 0.8, "id": "t3_tiqdvp", "created_utc": 1647798001.0} +{"sub": "Python", "title": "Looking for an official documentation regarding security best practices and how to write secure code", "selftext": "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", "upvote_ratio": 0.94, "id": "t3_tiq3ts", "created_utc": 1647797237.0} +{"sub": "Python", "title": "tkthread - Easy multithreading with tkinter", "selftext": "", "upvote_ratio": 0.8, "id": "t3_tip8va", "created_utc": 1647794947.0} +{"sub": "Python", "title": "I just started python 10 days ago an I am super happy. I just created my first program and would love some feedback", "selftext": "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.\n\nhere is the Github link: [https://github.com/RVP97/TicTacToe/blob/main/Project1](https://github.com/RVP97/TicTacToe/blob/main/Project1)\n\n`f_top= ' | | '`\n\n`f_mid= ' 1 | 2 | 3 '`\n\n`f_low= '_____|_______|____'`\n\n`s_top= ' | | '`\n\n`s_mid= ' 4 | 5 | 6 '`\n\n`s_low= '_____|_______|____'`\n\n`t_top= ' | | '`\n\n`t_mid= ' 7 | 8 | 9 '`\n\n`t_low= ' | | '`\n\n&#x200B;\n\n`f_top_1= ' | | '`\n\n`f_mid_1= ' | | '`\n\n`f_low_1= '_____|_______|____'`\n\n`s_top_1= ' | | '`\n\n`s_mid_1= ' | | '`\n\n`s_low_1= '_____|_______|____'`\n\n`t_top_1= ' | | '`\n\n`t_mid_1= ' | | '`\n\n`t_low_1= ' | | '`\n\n&#x200B;\n\n`def print_options():`\n\n`print(f_top)`\n\n`print(f_mid)`\n\n`print(f_low)`\n\n`print(s_top)`\n\n`print(s_mid)`\n\n`print(s_low)`\n\n`print(t_top)`\n\n`print(t_mid)`\n\n`print(t_low)`\n\n\n\n`def print_game():`\n\n`print(f_top_1)`\n\n`print(f_mid_1)`\n\n`print(f_low_1)`\n\n`print(s_top_1)`\n\n`print(s_mid_1)`\n\n`print(s_low_1)`\n\n`print(t_top_1)`\n\n`print(t_mid_1)`\n\n`print(t_low_1)`\n\n\n\n`def print_every():`\n\n`print('OPTIONS')` \n\n`print_options()`\n\n`print('')`\n\n`print('GAME')`\n\n`print_game()`\n\n\n\n`print('Hello players. We are going to play a round of Tic Tac Toe!')`\n\n&#x200B;\n\n`def player_one_name():`\n\n`player_one=input(\"What is player one's name?: \")`\n\n\n\n`return player_one`\n\n&#x200B;\n\n`def player_two_name():`\n\n`player_two=input(\"What is player two's name?: \")`\n\n\n\n`return player_two`\n\n&#x200B;\n\n`player_one=player_one_name()`\n\n&#x200B;\n\n`player_two=player_two_name()`\n\n&#x200B;\n\n`print(f\"It is time for {player_one} to play against {player_two}\")`\n\n&#x200B;\n\n`import random`\n\n&#x200B;\n\n`list = [player_one,player_two]`\n\n`rand = random.choice(list)`\n\n`print(f\"It is {rand}'s turn\")`\n\n`if rand == player_one:`\n\n`other=player_two`\n\n`else:`\n\n`other=player_one`\n\n&#x200B;\n\n&#x200B;\n\n`from IPython.display import clear_output`\n\n`print_options()`\n\n`option_list= ['1','2','3','4','5','6','7','8','9']`\n\n`condition=True`\n\n`while condition:`\n\n\n\n`while True:`\n\n`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'):`\n\n`print(f'{other} wins')`\n\n`condition=False`\n\n`break`\n\n`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'):`\n\n`print(f'{rand} wins')`\n\n`condition=False`\n\n`break`\n\n`if len(option_list)==0:`\n\n`print(\"It's a tie\")`\n\n`condition=False`\n\n`break`\n\n\n\n\n\n&#x200B;\n\n`player_choice=input(f'{rand}, pick a number between 1 and 9: ')`\n\n`if player_choice in option_list:`\n\n`player_choice = int(player_choice)`\n\n`if player_choice == 1:`\n\n`clear_output()`\n\n`f_mid_1 = f_mid_1[:2] + 'X' + f_mid_1[2+1:]`\n\n`option_list.remove('1')`\n\n`print_every()`\n\n`break`\n\n`if player_choice == 2:`\n\n`clear_output()`\n\n`f_mid_1 = f_mid_1[:9] + 'X' + f_mid_1[9+1:]`\n\n`option_list.remove('2')`\n\n`print_every()`\n\n`break`\n\n`if player_choice == 3:`\n\n`clear_output()`\n\n`f_mid_1 = f_mid_1[:16] + 'X' + f_mid_1[16+1:]`\n\n`option_list.remove('3')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 4:`\n\n`clear_output()`\n\n`s_mid_1 = s_mid_1[:2] + 'X' + s_mid_1[2+1:]`\n\n`option_list.remove('4')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 5:`\n\n`clear_output()`\n\n`s_mid_1 = s_mid_1[:9] + 'X' + s_mid_1[9+1:]`\n\n`option_list.remove('5')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 6:`\n\n`clear_output()`\n\n`s_mid_1 = s_mid_1[:16] + 'X' + s_mid_1[16+1:]`\n\n`option_list.remove('6')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 7:`\n\n`clear_output()`\n\n`t_mid_1 = t_mid_1[:2] + 'X' + t_mid_1[2+1:]`\n\n`option_list.remove('7')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 8:`\n\n`clear_output()`\n\n`t_mid_1 = t_mid_1[:9] + 'X' + t_mid_1[9+1:]`\n\n`option_list.remove('8')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 9:`\n\n`clear_output()`\n\n`t_mid_1 = t_mid_1[:16] + 'X' + t_mid_1[16+1:]`\n\n`option_list.remove('9')`\n\n`print_every()`\n\n`break`\n\n\n\n`else:`\n\n`clear_output()`\n\n`print('Pick a valid number or a position that has not been picked before')`\n\n`print_every()`\n\n`continue`\n\n\n\n`while True:`\n\n`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'):`\n\n`condition=False`\n\n`break`\n\n`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'):`\n\n`print(f'{rand} wins')`\n\n`condition=False`\n\n`break`\n\n`if len(option_list)==0:`\n\n`print(\"It's a tie\")`\n\n`condition=False`\n\n`break`\n\n\n\n&#x200B;\n\n`player_choice=input(f'{other}, pick a number between 1 and 9: ')`\n\n`if player_choice in option_list:`\n\n`player_choice = int(player_choice)`\n\n`if player_choice == 1:`\n\n`clear_output()`\n\n`f_mid_1 = f_mid_1[:2] + 'O' + f_mid_1[2+1:]`\n\n`option_list.remove('1')`\n\n`print_every()`\n\n`break`\n\n`if player_choice == 2:`\n\n`clear_output()`\n\n`f_mid_1 = f_mid_1[:9] + 'O' + f_mid_1[9+1:]`\n\n`option_list.remove('2')`\n\n`print_every()`\n\n`break`\n\n`if player_choice == 3:`\n\n`clear_output()`\n\n`f_mid_1 = f_mid_1[:16] + 'O' + f_mid_1[16+1:]`\n\n`option_list.remove('3')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 4:`\n\n`clear_output()`\n\n`s_mid_1 = s_mid_1[:2] + 'O' + s_mid_1[2+1:]`\n\n`option_list.remove('4')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 5:`\n\n`clear_output()`\n\n`s_mid_1 = s_mid_1[:9] + 'O' + s_mid_1[9+1:]`\n\n`option_list.remove('5')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 6:`\n\n`clear_output()`\n\n`s_mid_1 = s_mid_1[:16] + 'O' + s_mid_1[16+1:]`\n\n`option_list.remove('6')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 7:`\n\n`clear_output()`\n\n`t_mid_1 = t_mid_1[:2] + 'O' + t_mid_1[2+1:]`\n\n`option_list.remove('7')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 8:`\n\n`clear_output()`\n\n`t_mid_1 = t_mid_1[:9] + 'O' + t_mid_1[9+1:]`\n\n`option_list.remove('8')`\n\n`print_every()`\n\n`break`\n\n&#x200B;\n\n`if player_choice == 9:`\n\n`clear_output()`\n\n`t_mid_1 = t_mid_1[:16] + 'O' + t_mid_1[16+1:]`\n\n`option_list.remove('9')`\n\n`print_every()`\n\n`break`\n\n\n\n`else:`\n\n`clear_output()`\n\n`print('Pick a valid number or a position that has not been picked before')`\n\n`print_every()`\n\n`continue`", "upvote_ratio": 0.46, "id": "t3_tiox8d", "created_utc": 1647794055.0} +{"sub": "Python", "title": "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.", "selftext": "", "upvote_ratio": 0.9, "id": "t3_tinykr", "created_utc": 1647791398.0} +{"sub": "Python", "title": "Sending Emails With Python", "selftext": "", "upvote_ratio": 0.5, "id": "t3_tin22d", "created_utc": 1647788786.0} +{"sub": "Python", "title": "pip install medium-api", "selftext": "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). \n\nTo install it, just run:\n\n```\npip install medium-api\n```\n\n**What can you extract with it?**\n\n- Medium User information and user-written articles\n- Medium Articles information and their textual content\n- Medium Publications information\n- Medium\u2019s Top Writers\n- Medium\u2019s Topfeeds (Trending, Latest, All time best, best of year/month/week)\n- Medium\u2019s Latest Posts (distributed articles)\n\n**How to use it?**\n\n```python\nfrom medium_api import Medium\n\nmedium = Medium('YOUR_RAPIDAPI_KEY')\nuser = medium.user(username='nishu-jain')\n\nuser.fetch_articles()\n\nfor article in user.articles:\n print(article.title)\n```\n\n**A few references:**\n\n- Github repository: https://github.com/weeping-angel/medium-api\n- Website: https://mediumapi.com\n- Swagger documentation: https://docs.mediumapi.com\n- ReadTheDocs: https://medium-api.readthedocs.io/en/latest/\n- PyPI: https://pypi.org/project/medium-api/\n\nHoping someone will find it useful :)", "upvote_ratio": 0.87, "id": "t3_timph1", "created_utc": 1647787819.0} +{"sub": "Python", "title": "Python Collection Classes - Queues, NamedTuples, DefaultDict, the Professor and Mary Ann", "selftext": "[https://codesolid.com/useful-collection-classes-in-python-you-may-not-know/](https://codesolid.com/useful-collection-classes-in-python-you-may-not-know/)\n\nEnjoy!", "upvote_ratio": 1.0, "id": "t3_tilukh", "created_utc": 1647785280.0} +{"sub": "Python", "title": "Creating Real-Time Charts with FastAPI", "selftext": "https://github.com/roniemartinez/real-time-charts-with-fastapi\n\nI've made sample application for anyone interested in writing real-time charts with FastAPI + Server-Sent Events. You can check my Github repo above.", "upvote_ratio": 0.82, "id": "t3_tilg4d", "created_utc": 1647784101.0} +{"sub": "Python", "title": "Create A REST API In Python Flask", "selftext": "", "upvote_ratio": 0.38, "id": "t3_tikn0t", "created_utc": 1647781534.0} +{"sub": "Python", "title": "Step by Step Procedure to Deploy A Flask App On Heroku", "selftext": "", "upvote_ratio": 0.17, "id": "t3_tikmj3", "created_utc": 1647781487.0} +{"sub": "Python", "title": "Python Flask, ElasticSearch and docker environment", "selftext": "Hi, the second article devoted to the theme: \u201cHow to work with ElasticSearch using Python and Flask framework\u201d 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.", "upvote_ratio": 0.81, "id": "t3_tiid1f", "created_utc": 1647772934.0} +{"sub": "Python", "title": "Gufo Loader", "selftext": "[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.", "upvote_ratio": 0.75, "id": "t3_tihlqu", "created_utc": 1647769687.0} +{"sub": "Python", "title": "How to make the most of Pydantic", "selftext": "", "upvote_ratio": 0.87, "id": "t3_tih4e7", "created_utc": 1647767586.0} +{"sub": "Python", "title": "Sudoku Solver Using Python | AI projects", "selftext": "Github: [https://github.com/bhimrazy/Artificial-Intelligence-Projects](https://github.com/bhimrazy/Artificial-Intelligence-Projects)\n\nhttps://preview.redd.it/xswtp52b3ho81.png?width=1097&format=png&auto=webp&s=8ce31043a6238eb74bddc97ff6dc6b4072f82f38", "upvote_ratio": 0.87, "id": "t3_tidx7v", "created_utc": 1647753441.0} +{"sub": "Python", "title": "I Wanted to Make a Game from Scratch (visuals and all) Using Python so I did.", "selftext": "&#x200B;\n\n[https:\\/\\/github.com\\/M0pps\\/Dinosaur-Game.git](https://reddit.com/link/tid126/video/pvim4rectgo81/player)", "upvote_ratio": 0.97, "id": "t3_tid126", "created_utc": 1647750072.0} +{"sub": "Python", "title": "Creating a DCGAN with PyTorch", "selftext": "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:\n\n[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)", "upvote_ratio": 0.67, "id": "t3_ti9u5w", "created_utc": 1647738961.0} +{"sub": "Python", "title": "Modularizing a Chalice Application", "selftext": "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.\n\n[https://medium.com/tensoriot/modularizing-a-chalice-application-for-teams-f716f496b94b](https://medium.com/tensoriot/modularizing-a-chalice-application-for-teams-f716f496b94b)", "upvote_ratio": 0.5, "id": "t3_ti9ryn", "created_utc": 1647738759.0} +{"sub": "Python", "title": "Space Science with Python - AI 1-8: A Dense Neural Network", "selftext": "Hey Python coders,\n\ntoday 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.\n\nSince 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\".\n\nThe next video will consider convolution networks and afterwards you will see some nice Autoencoder architecture and unsupervised classification methods. Hopefully you'll like it!\n\nAnyway. 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.\n\nGitHub: [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)\n\nYouTube: [https://youtu.be/O0rQswBZJ7o](https://youtu.be/O0rQswBZJ7o)\n\nCheers, \nThomas", "upvote_ratio": 0.81, "id": "t3_ti90ps", "created_utc": 1647736289.0} +{"sub": "Python", "title": "Sunday Daily Thread: What's everyone working on this week?", "selftext": "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.", "upvote_ratio": 0.9, "id": "t3_ti8esn", "created_utc": 1647734409.0} +{"sub": "Python", "title": "I teach python for middle and high schoolers \u2013 I made this little trophy for a competition of who could make the best image using Turtle/Python", "selftext": "I will also make some keychains with the best images 3d-printed on them \u2013 I hope the students like them!\n\n&#x200B;\n\nhttps://i.redd.it/7cyldg3odfo81.gif", "upvote_ratio": 0.97, "id": "t3_ti7uyh", "created_utc": 1647732704.0} +{"sub": "Python", "title": "Automate Key board and mouse", "selftext": "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\n\n&#x200B;\n\n[https://www.youtube.com/watch?v=shi5Ba\\_y4HA&t=264s](https://www.youtube.com/watch?v=shi5Ba_y4HA&t=264s)\n\n&#x200B;\n\nHas anyone used Python to automate other stuff. I want to expand on automating on Python. Or know good modules for stuff like that?", "upvote_ratio": 0.92, "id": "t3_ti5hm4", "created_utc": 1647725723.0} +{"sub": "Python", "title": "New Python package for stock market data: YFrake", "selftext": " 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/) .", "upvote_ratio": 0.89, "id": "t3_ti5geq", "created_utc": 1647725628.0} +{"sub": "Python", "title": "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.", "selftext": " import quantumrandom as qr\n \n with open(\"piDigits.txt\", 'r') as f:\n pidecimals = f.read()\n f.close()\n \n maxrange = int(input(\"Enter Maxmimum of Range \"))\n count = 0\n \n for i in range (0,maxrange):\n myx = qr.randint()\n print(f\"Quantum Number {myx}\")\n decimalstring = str(myx)\n substring1 = decimalstring[2:7]\n substring2 = decimalstring[7:12]\n substring3 = decimalstring[12:17]\n if substring1 in pidecimals:\n count += 1\n print(f\"Quantum digit sequence {substring1} found in Pi\")\n if substring2 in pidecimals:\n count += 1\n print(f\"Quantum digit sequence {substring2} found in Pi\")\n if substring3 in pidecimals:\n count += 1\n print(f\"Quantum digit sequence {substring3} found in Pi\")\n print(f\"Quantum digit sequences found in Pi {count} times out of {3*maxrange}\")\n\nSample Output: (Ran the code many times to look for an exception. None found. Yet.)\n\n`Enter Maxmimum of Range 20`\n\n`Quantum Number 4.434424353398947`\n\n`Quantum digit sequence 43442 found in Pi`\n\n`Quantum digit sequence 43533 found in Pi`\n\n`Quantum digit sequence 98947 found in Pi`\n\n`Quantum Number 9.409781033035783`\n\n`Quantum digit sequence 40978 found in Pi`\n\n`Quantum digit sequence 10330 found in Pi`\n\n`Quantum digit sequence 35783 found in Pi`\n\n`Quantum Number 9.769588769359885`\n\n`Quantum digit sequence 76958 found in Pi`\n\n`Quantum digit sequence 87693 found in Pi`\n\n`Quantum digit sequence 59885 found in Pi`\n\n`Quantum Number 7.9896238651102465`\n\n`Quantum digit sequence 98962 found in Pi`\n\n`Quantum digit sequence 38651 found in Pi`\n\n`Quantum digit sequence 10246 found in Pi`\n\n`Quantum Number 1.8486305027847716`\n\n`Quantum digit sequence 84863 found in Pi`\n\n`Quantum digit sequence 05027 found in Pi`\n\n`Quantum digit sequence 84771 found in Pi`\n\n`Quantum Number 5.2133974212253`\n\n`Quantum digit sequence 21339 found in Pi`\n\n`Quantum digit sequence 74212 found in Pi`\n\n`Quantum digit sequence 253 found in Pi`\n\n`Quantum Number 3.3063248645761805`\n\n`Quantum digit sequence 30632 found in Pi`\n\n`Quantum digit sequence 48645 found in Pi`\n\n`Quantum digit sequence 76180 found in Pi`\n\n`Quantum Number 6.982528419928283`\n\n`Quantum digit sequence 98252 found in Pi`\n\n`Quantum digit sequence 84199 found in Pi`\n\n`Quantum digit sequence 28283 found in Pi`\n\n`Quantum Number 4.838788433661402`\n\n`Quantum digit sequence 83878 found in Pi`\n\n`Quantum digit sequence 84336 found in Pi`\n\n`Quantum digit sequence 61402 found in Pi`\n\n`Quantum Number 0.5404745555809872`\n\n`Quantum digit sequence 54047 found in Pi`\n\n`Quantum digit sequence 45555 found in Pi`\n\n`Quantum digit sequence 80987 found in Pi`\n\n`Quantum Number 5.2051575494010835`\n\n`Quantum digit sequence 20515 found in Pi`\n\n`Quantum digit sequence 75494 found in Pi`\n\n`Quantum digit sequence 01083 found in Pi`\n\n`Quantum Number 2.928511482413977`\n\n`Quantum digit sequence 92851 found in Pi`\n\n`Quantum digit sequence 14824 found in Pi`\n\n`Quantum digit sequence 13977 found in Pi`\n\n`Quantum Number 8.577248798352025`\n\n`Quantum digit sequence 57724 found in Pi`\n\n`Quantum digit sequence 87983 found in Pi`\n\n`Quantum digit sequence 52025 found in Pi`\n\n`Quantum Number 0.699015793087663`\n\n`Quantum digit sequence 69901 found in Pi`\n\n`Quantum digit sequence 57930 found in Pi`\n\n`Quantum digit sequence 87663 found in Pi`\n\n`Quantum Number 6.524299992370489`\n\n`Quantum digit sequence 52429 found in Pi`\n\n`Quantum digit sequence 99923 found in Pi`\n\n`Quantum digit sequence 70489 found in Pi`\n\n`Quantum Number 5.860379949645227`\n\n`Quantum digit sequence 86037 found in Pi`\n\n`Quantum digit sequence 99496 found in Pi`\n\n`Quantum digit sequence 45227 found in Pi`\n\n`Quantum Number 6.33020523384451`\n\n`Quantum digit sequence 33020 found in Pi`\n\n`Quantum digit sequence 52338 found in Pi`\n\n`Quantum digit sequence 4451 found in Pi`\n\n`Quantum Number 4.562294956893263`\n\n`Quantum digit sequence 56229 found in Pi`\n\n`Quantum digit sequence 49568 found in Pi`\n\n`Quantum digit sequence 93263 found in Pi`\n\n`Quantum Number 2.0715648126955064`\n\n`Quantum digit sequence 07156 found in Pi`\n\n`Quantum digit sequence 48126 found in Pi`\n\n`Quantum digit sequence 95506 found in Pi`\n\n`Quantum Number 8.903639276722362`\n\n`Quantum digit sequence 90363 found in Pi`\n\n`Quantum digit sequence 92767 found in Pi`\n\n`Quantum digit sequence 22362 found in Pi`\n\n`Quantum digit sequences found in Pi 60 times out of 60`", "upvote_ratio": 0.2, "id": "t3_ti584e", "created_utc": 1647724969.0} +{"sub": "Python", "title": "PyMacApp: Build, Package, and Code-Sign Python Projects on MacOS in just 10-lines of Python Code!", "selftext": "Hi All:\n\nI 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)!\n\nGet started with ```pip3 install pymacapp```\nGH: https://github.com/The-Nicholas-R-Barrow-Company-LLC/PyMacApp\n\nA more-detailed starter is available below. \n\n```\n# build.py\nfrom pymacapp import App, Package\nfrom pymacapp.helpers import get_first_application_hash, get_first_installer_hash\n\n# Apple Account Information\n# You can get rid of the input(...) functions and instead enter the strings directly so you do not have to enter them each time.\nAPPLE_DEVELOPER_ACCOUNT_EMAIL = input(\"Apple Developer ID Email (str): \")\nAPPLE_DEVELOPER_ACCOUNT_APP_SPECIFIC_PASSWORD = input(\"Apple Developer ID App-Specific Password (str): \")\n\napp = App(\"My New App\", \"com.identifier\")\napp.setup(\"./app/main.py\", overwrite=True)\napp.build()\napp.sign(get_first_application_hash())\n\npackage = Package(app, \"0.0.1\", \"com.identifier.pkg\")\npackage.build(get_first_installer_hash())\npackage.sign(get_first_installer_hash())\npackage.notorize(APPLE_DEVELOPER_ACCOUNT_EMAIL, APPLE_DEVELOPER_ACCOUNT_APP_SPECIFIC_PASSWORD).wait()\n```", "upvote_ratio": 0.68, "id": "t3_ti4ztb", "created_utc": 1647724308.0} +{"sub": "Python", "title": "Small Line Counter Script", "selftext": "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.\n\n[https://www.github.com/carterdugan/LineCounter](https://www.github.com/carterdugan/LineCounter)", "upvote_ratio": 0.81, "id": "t3_ti4zcz", "created_utc": 1647724271.0} +{"sub": "Python", "title": "Is pygame still worth it in 2022??", "selftext": "", "upvote_ratio": 0.85, "id": "t3_thzhqp", "created_utc": 1647709018.0} +{"sub": "Python", "title": "What do you think is the most valuable Python package?", "selftext": "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. \n\n[https://deephaven.io/community/experiments/python-bracket/](https://deephaven.io/community/experiments/python-bracket/)", "upvote_ratio": 0.14, "id": "t3_thw2h9", "created_utc": 1647699262.0} +{"sub": "Python", "title": "Build a Hash Table in Python With TDD \u2013 Real Python", "selftext": "", "upvote_ratio": 0.75, "id": "t3_thvrq5", "created_utc": 1647698366.0} +{"sub": "Python", "title": "How to Shortlist the Best Python Development Company ?", "selftext": "", "upvote_ratio": 0.2, "id": "t3_thvj46", "created_utc": 1647697596.0} +{"sub": "Python", "title": "DeepForSpeed: A self driving car in Need For Speed Most Wanted built with python + pytorch", "selftext": "[video here](https://youtu.be/t0iqfM36mRc)\n\n[code here](https://github.com/edilgin/DeepForSpeed)\n\nSo 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. \n\nPlease take a look at the code i tried to document everything and i would appreciate any pull requests and advice in general :)", "upvote_ratio": 0.97, "id": "t3_thsp8c", "created_utc": 1647686990.0} +{"sub": "Python", "title": "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.", "selftext": "", "upvote_ratio": 0.94, "id": "t3_ths5wg", "created_utc": 1647684560.0} +{"sub": "Python", "title": "Red Mail: All you need from an email sender", "selftext": "Hi all,\n\nI 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.\n\nSo 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.\n\nSo what can it do?\n\n* [Supports sending HTML, text, attachments](https://red-mail.readthedocs.io/en/latest/tutorials/sending.html)\n* [Send to regular receivers, cc (carbon copy) or bcc (blind carbon copy)](https://red-mail.readthedocs.io/en/latest/tutorials/sending.html)\n* [Attachments from various types: paths, bytes, Pandas dataframes, etc.](https://red-mail.readthedocs.io/en/latest/tutorials/attachments.html)\n* [Emails with embedded images in HTML](https://red-mail.readthedocs.io/en/latest/tutorials/body_content.html#embedding-content)\n* [Embedded images from various types: Matplotlib plots or PIL images](https://red-mail.readthedocs.io/en/latest/tutorials/body_content.html#embedding-content)\n* [Emails with embedded (prettified) tables from Pandas dataframes](https://red-mail.readthedocs.io/en/latest/tutorials/body_content.html#embedded-tables)\n* [Templated emails using Jinja](https://red-mail.readthedocs.io/en/latest/tutorials/jinja_support.html)\n* [Gmail and Outlook pre-configured](https://red-mail.readthedocs.io/en/latest/tutorials/config.html)\n* [Logging handlers!](https://red-mail.readthedocs.io/en/latest/extensions/logging.html)\n* [Flask integration](https://flask-redmail.readthedocs.io/en/stable/index.html)\n\nA minimal example for Gmail users:\n\n from redmail import gmail\n \n gmail.username = \"example@gmail.com\"\n gmail.password = \"<MY PASSWORD>\"\n \n gmail.send(\n sender=\"example@gmail.com\",\n receivers=[\"you@example.com\"],\n subject=\"An example email\",\n html=\"\"\"\n <h1>Hi,</h1>\n <p>nice to meet you.</p>\n \"\"\",\n )\n\nMore advanced features:\n\n from redmail import EmailSender\n \n email = EmailSender(host=\"smtp.myhost.com\", port=0)\n \n email.send(\n sender=\"me@example.com\",\n receivers=[\"you@example.com\"],\n subject=\"An example email\",\n html=\"\"\"\n <h1>Hi {{ friend }},</h1> \n <p>look at this image:</p>\n {{ nice_image }}\n \"\"\",\n body_params={\"friend\": \"Jack\"},\n body_images={\"nice_image\": 'path/to/image.png'},\n attachments={\"file.csv\": pd.DataFrame({\"col\": [1, 2, 3]})}\n )\n\nSo 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.\n\nResources:\n\n* Source code: [https://github.com/Miksus/red-mail](https://github.com/Miksus/red-mail)\n* Documentation: [https://red-mail.readthedocs.io/en/latest/](https://red-mail.readthedocs.io/en/latest/)\n* Releases: [https://pypi.org/project/redmail/](https://pypi.org/project/redmail/)\n\nIf you need to integrate it to a Flask application:\n\n* Source code: [https://github.com/Miksus/flask-redmail](https://github.com/Miksus/flask-redmail)\n* Documentation: [https://flask-redmail.readthedocs.io/en/latest/](https://flask-redmail.readthedocs.io/en/latest/)\n* Releases: [https://pypi.org/project/Flask-Redmail/](https://pypi.org/project/Flask-Redmail/)\n\nSo 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.\n\nIf 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!", "upvote_ratio": 0.88, "id": "t3_thrdr9", "created_utc": 1647681015.0} +{"sub": "Python", "title": "I created a super simple customizable desktop clock with python", "selftext": "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!\n\nhttps://preview.redd.it/0thaq2fkzao81.png?width=1674&format=png&auto=webp&s=f00ab6723f9de61dc72fe1fc4adfb36fd814301d", "upvote_ratio": 0.89, "id": "t3_thqxd6", "created_utc": 1647678891.0} +{"sub": "Python", "title": "3 Things You Might Not Know About Numbers in Python", "selftext": "", "upvote_ratio": 0.5, "id": "t3_thqu6i", "created_utc": 1647678482.0} +{"sub": "Python", "title": "The Zen Of Python, One-Liners and Being Pythonic", "selftext": "", "upvote_ratio": 0.83, "id": "t3_thqfid", "created_utc": 1647676626.0} +{"sub": "Python", "title": "What extension is useful when doing Python in VS code?", "selftext": "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", "upvote_ratio": 0.67, "id": "t3_thpx8i", "created_utc": 1647674284.0} +{"sub": "Python", "title": "Solution to Ramanujan equations", "selftext": "[https://todaymylearn.blogspot.com/2022/03/solution-to-ramanujan-equations.html](https://todaymylearn.blogspot.com/2022/03/solution-to-ramanujan-equations.html)\n\nI made a small program in python to solve Ramanujan equations.", "upvote_ratio": 0.46, "id": "t3_thplm6", "created_utc": 1647672828.0} +{"sub": "Python", "title": "PEP 686: Make UTF-8 mode default", "selftext": "", "upvote_ratio": 0.97, "id": "t3_thnk4l", "created_utc": 1647664164.0} +{"sub": "Python", "title": "Complete Guide to PyGame Setup in 14 mins!", "selftext": "", "upvote_ratio": 0.7, "id": "t3_thmkk7", "created_utc": 1647660554.0} +{"sub": "Python", "title": "What Python GitHub repos are good examples of best practices?", "selftext": "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. \n\nI 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.", "upvote_ratio": 0.85, "id": "t3_thmbi1", "created_utc": 1647659670.0} +{"sub": "Python", "title": "Euporie: a terminal app for working with Jupyter notebooks", "selftext": "", "upvote_ratio": 1.0, "id": "t3_thlcky", "created_utc": 1647656373.0} +{"sub": "Python", "title": "A Happy Success Story and Python!", "selftext": "Hi everyone!\n\n&#x200B;\n\nI just wanted to share some exciting events, as well as a good story for those maybe demotivated learning Python.\n\n&#x200B;\n\nLike 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!\n\n&#x200B;\n\nToday 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.\n\n&#x200B;\n\nWhat 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!\n\n&#x200B;\n\nHopefully 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.\n\n&#x200B;\n\n(Ok, now I'm done with my story, go build some cool things and learn more!)", "upvote_ratio": 0.85, "id": "t3_thlata", "created_utc": 1647656210.0} +{"sub": "Python", "title": "Elden Ring Open Source API", "selftext": "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.\n\nThis 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.\n\nThe API is available in both REST and GraphQL formats. Get started at [https://eldenring.fanapis.com/](https://eldenring.fanapis.com/)\n\n&#x200B;\n\nSource code available at: [https://github.com/deliton/eldenring-api](https://github.com/deliton/eldenring-api)", "upvote_ratio": 0.93, "id": "t3_thl39l", "created_utc": 1647655499.0} +{"sub": "Python", "title": "Saturday Daily Thread: Resource Request and Sharing! Daily Thread", "selftext": "Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?\n\nUse this thread to chat about and share Python resources!", "upvote_ratio": 1.0, "id": "t3_thiqqa", "created_utc": 1647648010.0} +{"sub": "Python", "title": "*UPDATED* Random numbers generator list with Mean, Median, Mode and frequency of each number", "selftext": " import random\n import numpy\n from statistics import mode\n import csv\n import collections\n \n \n #create list\n list=[]\n \n ##random numbers\n for i in range (100):\n number= (random.randint(0,10))\n #add to list\n list.append(number)\n \n print(\"Random numbers: \"+(str(list)))\n list.sort()\n print(\"Numbers sorted: \"+(str(list)))\n \n #Mean, median and mode of list\n mean1=numpy.mean(list)\n median1=numpy.median(list)\n mode1=mode(list)\n \n print(\"The mean of the numbers is \"+(str(mean1)))\n print(\"The median of the numbers is \"+(str(median1)))\n print(\"The mode of the numbers is \"+(str(mode1)))\n \n ##frequency method\n \n ##dictionary\n frequency = {}\n \n \n ###using collections.Counter for number frequency\n frequency=collections.Counter(list)\n \n # printing the frequency\n print(frequency)\n \n \n ##Export dictionary to CSV file\n with open('numbers.csv', 'w') as f:\n for key in frequency.keys():\n f.write(\"%s,%s\\n\"%(key,frequency[key]))\n \n \n #df.to_csv(\"numbers.csv\", header=[\"Number\", \"Frequency\"], index=False)", "upvote_ratio": 0.6, "id": "t3_thgvms", "created_utc": 1647642439.0} +{"sub": "Python", "title": "Random numbers generator list with Mean, Median, Mode and frequency of each number", "selftext": " import random\n import numpy\n from statistics import mode\n import csv\n \n #create list\n list=[]\n \n ##random numbers\n for i in range (100):\n number= (random.randint(0,10))\n #add to list\n list.append(number)\n \n print(\"Random numbers: \"+(str(list)))\n list.sort()\n print(\"Numbers sorted: \"+(str(list)))\n \n #Mean, median and mode of list\n mean1=numpy.mean(list)\n median1=numpy.median(list)\n mode1=mode(list)\n \n print(\"The mean of the numbers is \"+(str(mean1)))\n print(\"The median of the numbers is \"+(str(median1)))\n print(\"The mode of the numbers is \"+(str(mode1)))\n \n ##frequency method\n \n ##dictionary\n frequency = {}\n \n # iterating over the list\n for item in list:\n # checking the element in dictionary\n if item in frequency:\n # incrementing the counr\n frequency[item] += 1\n else:\n # initializing the count\n frequency[item] = 1\n \n # printing the frequency\n print(frequency)\n \n ##Export dictionary to CSV file\n with open('numbers.csv', 'w') as f:\n for key in frequency.keys():\n f.write(\"%s,%s\\n\"%(key,frequency[key]))", "upvote_ratio": 0.33, "id": "t3_thdm72", "created_utc": 1647633270.0} +{"sub": "Python", "title": "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?", "selftext": "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.\n\nHe provided examples and showed functional code that simplifies the solution to a few lines and he said:\n\n> \"If a class is just a constructor and one method, then it shouldn't be a class at all. It should be a function.\"\n\nI 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.\n\nI'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.\n\n\nEDIT: Awesome discussion in the comments. Thanks for everyone's input!", "upvote_ratio": 0.97, "id": "t3_th6ztt", "created_utc": 1647623696.0} +{"sub": "Python", "title": "Resume Generation With Python", "selftext": "", "upvote_ratio": 0.33, "id": "t3_th6lvy", "created_utc": 1647623183.0} +{"sub": "Python", "title": "Latest Python for Debian GNU/Linux", "selftext": "", "upvote_ratio": 0.43, "id": "t3_th3oai", "created_utc": 1647616559.0} +{"sub": "Python", "title": "what's sentiment analysis methodology", "selftext": "* Discuss sentimental analysis.\n* Describe the Python download and installation process.\n* Define polarity and subjectivity.\n* Explain the use of textBlobs.\n* Contrast lemmatization to tokenization\n* Discuss the POS Tag language.\n* Explain Bigrams, Trigrams and Ngrams.\n* List the various Anaconda applications.\n* Summarize capitalizations, pluralizations and singularizations.\n* Outline loops in Ngrams.\n* Describe TextBlob classification.\n* Relate data frame to the classification of sentiments.\n\n[https://alison.com/topic/learn/129326/sentimental-analysis-methodology-learning-outcomes](https://alison.com/topic/learn/129326/sentimental-analysis-methodology-learning-outcomes)", "upvote_ratio": 0.2, "id": "t3_th3fc7", "created_utc": 1647615880.0} +{"sub": "Python", "title": "Python Cybersecurity \u2014 Build your own python tools (PortScanner, Visual Network Tracker and Anonymous FTP Scanner)", "selftext": "**Python Cybersecurity \u2014 PortScanner**\n\nBuild 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.\n\n**YouTube Link**: [https://youtu.be/bH-3PuQC\\_n0](https://youtu.be/bH-3PuQC_n0)\n\n**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)\n\n**Python Cybersecurity \u2014 Visual Network Tracker**\n\nDive 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.\n\n**YouTube Link**: [https://youtu.be/xuNuy8n8u-Y](https://youtu.be/xuNuy8n8u-Y)\n\n**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)\n\n**Python Cybersecurity \u2014 Anonymous FTP Scanner**\n\nBuild 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 \u201canonymous\u201d\n\n**YouTube Link**: [https://youtu.be/BIZfRodSW9w](https://youtu.be/BIZfRodSW9w)\n\n**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)", "upvote_ratio": 0.8, "id": "t3_th30u3", "created_utc": 1647614790.0} +{"sub": "Python", "title": "Business logic in Django and Django REST Framework applications", "selftext": "", "upvote_ratio": 0.69, "id": "t3_th2zll", "created_utc": 1647614691.0} +{"sub": "Python", "title": "Python finally offloads some batteries", "selftext": "", "upvote_ratio": 0.57, "id": "t3_th2ezh", "created_utc": 1647613112.0} +{"sub": "Python", "title": "Proposed Addition to Python ASYNC.", "selftext": "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.\n\nI'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:\n\n&#x200B;\n\ntypeOfEnttity := 'process' | 'thread';\n\nfunc := \\[async \\[typeOfEntity\\]\\] def ....\n\n&#x200B;\n\nThe idea is that if I say \n\ndef foo() ... it is the Python standard.\n\n&#x200B;\n\nIf I say\n\nasync def foo() or async thread def foo() ... \n\n we have the asyncio stuff we have today.\n\n&#x200B;\n\nIf I say\n\nasync process def foo() ....\n\nI 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?", "upvote_ratio": 0.5, "id": "t3_th04ho", "created_utc": 1647606312.0} +{"sub": "Python", "title": "Python ETL management framework/tool", "selftext": "Hello,\n\nI 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. \n\nMy question is related to the way these scripts etc. might be automated, managed. \n\nIs there any framework, tool you could suggest? How do people manage this stuff? \n\nSorry, I am new to this and I am not sure if my quesiton is clear.", "upvote_ratio": 0.87, "id": "t3_tgyvu2", "created_utc": 1647601729.0} +{"sub": "Python", "title": "Finance degree to cs?", "selftext": "So I studied finance and have a little bit of work experience in marketing, which are not related to cs at all.\n\nI'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.\n\nI 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.\n\nAny advice?", "upvote_ratio": 0.4, "id": "t3_tgy38p", "created_utc": 1647598534.0} +{"sub": "Python", "title": "Share Jupyter Notebook as web app", "selftext": "", "upvote_ratio": 0.86, "id": "t3_tgxz6w", "created_utc": 1647598047.0} +{"sub": "Python", "title": "Building an all-in-one Python Resources Website for Python Developers", "selftext": "Hey there,\n\nI 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:\n\n**1) For Python/Backend:**\n\n\u2022 Django, Flask, FastAPI Articles\n\n\u2022 Django, Flask, FastAPI Forums latest Discussions (Reddit)\n\n\u2022 Django, Flask, FastAPI YouTube Channels Videos\n\n\u2022 Django, Flask, FastAPI Websites\n\n\u2022 Django, Flask, FastAPI E-books, Snippets\n\n\u2022 *Job Opportunities*\n\n&#x200B;\n\n**2) For Python/AI/ML:**\n\n\u2022 AI/ML Articles\n\n\u2022 AI/ML Forums latest Discussions (Reddit)\n\n\u2022 AI/ML YouTube Channels Videos\n\n\u2022 AI/ML Websites\n\n\u2022 AI/ML E-books, Snippets\n\n\u2022 *Job Opportunities*\n\n&#x200B;\n\nI've done a [Similar App](https://helloreact-beta.vercel.app/) for React Developers, and I'm now building the Python version.\n\nCan you give me some of the best resources out there (blogs, Youtube Channels, Websites, Forums)? I'd like to feature the in the Project.\n\n&#x200B;\n\nThank You :)", "upvote_ratio": 0.79, "id": "t3_tgxjwm", "created_utc": 1647596261.0} +{"sub": "Python", "title": "Frontend Vue and Tailwind Setup - Masonite Tutorial", "selftext": "", "upvote_ratio": 0.4, "id": "t3_tgxa8s", "created_utc": 1647595077.0} +{"sub": "Python", "title": "A solver, player and cheater for breaklock", "selftext": "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.\n\nThe 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.\n\nThe player mode simply asks the player to make moves until they win.\n\nI 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\n\n&#x200B;\n\nVisit it on github [here](https://github.com/deltaqyto/breaklock-solver)", "upvote_ratio": 0.63, "id": "t3_tgw41v", "created_utc": 1647589819.0} +{"sub": "Python", "title": "Is this a good project?", "selftext": "So I'm making classes out of multiple libraries such as tweepy (Twitter scraping) to make them very user friendly.\n\nI'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).\n\nSome methods to clean the text and visualize it.\n\nIs 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?\n\n(Considering it is my first project)", "upvote_ratio": 0.72, "id": "t3_tgv85c", "created_utc": 1647585866.0} +{"sub": "Python", "title": "8 Excellent Python Courses on Udemy (2022)", "selftext": "", "upvote_ratio": 0.6, "id": "t3_tgu5y6", "created_utc": 1647581497.0} +{"sub": "Python", "title": "Python Traffic Generator", "selftext": "", "upvote_ratio": 0.56, "id": "t3_tgopyd", "created_utc": 1647563538.0} +{"sub": "Python", "title": "Friday Daily Thread: Free chat Friday! Daily Thread", "selftext": "Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted!", "upvote_ratio": 0.6, "id": "t3_tgo1uq", "created_utc": 1647561609.0} +{"sub": "Python", "title": "How would you compare tortoise ORM vs peewee ORM?", "selftext": "Since they are both similar to the Django ORM, then they can be clasified as active record ORMs right?\n\nHave you used any or both? If so how was your experience and which would you recommend?", "upvote_ratio": 1.0, "id": "t3_tglp4o", "created_utc": 1647554889.0} +{"sub": "Python", "title": "#FOSS Fintech In Python: Using GameStonk Terminal To Generate Trade Ideas", "selftext": "", "upvote_ratio": 0.81, "id": "t3_tg4328", "created_utc": 1647499950.0} +{"sub": "Python", "title": "Arcade 2.6.11 has been released", "selftext": "Python Arcade, a library for creating 2D arcade games, has released version 2.6.11.\n\nWebsite: [https://arcade.academy](https://arcade.academy)\n\nRelease notes: [https://api.arcade.academy/en/latest/development/release\\_notes.html](https://api.arcade.academy/en/latest/development/release_notes.html)\n\nDemo video: [https://www.youtube.com/watch?v=QClDvEwcxmg](https://www.youtube.com/watch?v=QClDvEwcxmg)\n\n&#x200B;\n\n**Release notes**\n\n* Sections - Add support to divide window into sections. (Thanks [janscas](https://github.com/janscas) for the contribution.) \n * Add [arcade.Section](https://api.arcade.academy/en/latest/api/window.html#arcade.Section) to the API.\n * Add [arcade.SectionManager](https://api.arcade.academy/en/latest/api/window.html#arcade.SectionManager) to the API.\n * Add examples on how to use: [Dividing a View Into Sections](https://api.arcade.academy/en/latest/examples/index.html#section-examples)\n* New Example Code: \n * Add parallax example: [Parallax](https://api.arcade.academy/en/latest/examples/parallax.html#parallax).\n * 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).\n * Add [Perspective](https://api.arcade.academy/en/latest/examples/perspective.html#perspective) example.\n* New functionality: \n * Add [arcade.get\\_angle\\_degrees()](https://api.arcade.academy/en/latest/api/geometry.html#arcade.get_angle_degrees) function.\n * 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).\n * Add arcade.Sprite.facePoint() \n to face sprite towards a point.\n* Fixes: \n * Fixed issue [\\#1074](https://github.com/pythonarcade/arcade/issues/1074) to prevent a crash when opening a window.\n * Fixed issue [\\#978](https://github.com/pythonarcade/arcade/issues/978), copy button in examples moved to the left to prevent it disappearing.\n * Fixed issue [\\#967](https://github.com/pythonarcade/arcade/issues/967), CRT example now pulls from resources so people don\u2019t have to download image to try it out.\n * PyMunk sample map now in resources so people don\u2019t have to download it.\n * [arcade.draw\\_points()](https://api.arcade.academy/en/latest/api/drawing_primitives.html#arcade.draw_points) no longer draws the points twice, improving performance.\n* Documentation: \n * Update [Pygame Comparison](https://api.arcade.academy/en/latest/pygame_comparison.html#pygame-comparison).\n * Improve Sprite.texture \n docs.\n * When building Arcade docs, script now lets us know what classes don\u2019t have docstrings.\n * Spelling/typo fixes in docs.\n* Misc: \n * Update arcade.Sprite \n to use decorators to declare properties instead of the older method.\n * [\\#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.\n * Force GDI text on windows until direct write is more mature.\n * Optimized text rendering and text rotation\n * [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.\n * [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)\n* OpenGL: \n * 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.\n * Added support for unsigned integer uniform types\n * arcade.gl.Geometry.transform \n no longer takes a mode parameter.\n\nSpecial 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\u2019s continued development.", "upvote_ratio": 0.87, "id": "t3_tghjn8", "created_utc": 1647543660.0} +{"sub": "Python", "title": "I'm an amateur Python programmer, what's my next step?", "selftext": "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.\n\nIdeally 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.\n\nDoes 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?", "upvote_ratio": 0.84, "id": "t3_tggmnl", "created_utc": 1647541287.0} +{"sub": "Python", "title": "Bookmarking Application (sqlite, tkinter, bcrypt)", "selftext": "My largest project so far, pretty happy with what I learned about passwords/account creation, and what felt like a decent intro to databases. \n\n&#x200B;\n\nThis 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.\n\n&#x200B;\n\nGoal 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.\n\n&#x200B;\n\nPlease hit me with some feedback! Questions or criticism on anything would be much appreciated.\n\n&#x200B;\n\n&#x200B;\n\n[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)\n\n&#x200B;\n\nthe project: [https://github.com/ZG34/Bookmarkus](https://github.com/ZG34/Bookmarkus)", "upvote_ratio": 0.75, "id": "t3_tgedn8", "created_utc": 1647535199.0} +{"sub": "Python", "title": "Package for printing text with RGB colors in the console", "selftext": "As a quick introduction:\n\nI'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.\n\nLast week I decided to replace my dependency on Colorama with my own package: **AthenaColor**\n\nThe 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.\n\nAll 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.\n\nI'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.\n\n[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)\n\n&#x200B;\n\n[All predefined colors](https://preview.redd.it/0l2f2moe0zn81.png?width=367&format=png&auto=webp&s=0d118d58c979b3c6065ce3a310964c55a75498bd)\n\nThe 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)\n\n&#x200B;\n\nSource code: [https://github.com/DirectiveAthena/VSC-AthenaColor](https://github.com/DirectiveAthena/VSC-AthenaColor) \nPyPi link: [https://pypi.org/project/AthenaColor/](https://pypi.org/project/AthenaColor/)\n\n&#x200B;\n\nSmall 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", "upvote_ratio": 0.71, "id": "t3_tge96v", "created_utc": 1647534851.0} +{"sub": "Python", "title": "Is programming easy or am I doing things wrong?", "selftext": "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.\n\nOne 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. \n\nThe quote was like tens of thousands of $$$, and they say it will take multiple months to do (not because they're booked up).\n\nAnd 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. \n\nI 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)\n\nThe owner even brought up when I showed him the software that it must be programmed wrongly if it could be done so quickly.", "upvote_ratio": 0.76, "id": "t3_tgcpur", "created_utc": 1647530729.0} +{"sub": "Python", "title": "A template engine I did...", "selftext": "I have been looking for project inspirations, I ended up creating this template engine https://github.com/mauro-balades/yate", "upvote_ratio": 0.67, "id": "t3_tgcopq", "created_utc": 1647530636.0} +{"sub": "Python", "title": "Frelatage: A fuzzing library to find vulnerabilities and bugs in Python applications", "selftext": "&#x200B;\n\nFrelatage 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.\n\nGithub repo: [https://github.com/Rog3rSm1th/Frelatage](https://github.com/Rog3rSm1th/Frelatage)\n\nPyPi: [https://pypi.org/project/frelatage/](https://pypi.org/project/frelatage/)\n\nDemo: \n\nhttps://i.redd.it/anvsvnedmyn81.gif", "upvote_ratio": 0.85, "id": "t3_tgce3v", "created_utc": 1647529813.0} +{"sub": "Python", "title": "Announcing compushady: a Python module for easily running Compute Shaders", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tgc6l4", "created_utc": 1647529248.0} +{"sub": "Python", "title": "Roles and Permissions in Masonite", "selftext": "", "upvote_ratio": 0.76, "id": "t3_tg88hq", "created_utc": 1647517257.0} +{"sub": "Python", "title": "Online Python environment for middle school students (Chromebooks)", "selftext": "Hello,\n\nwe'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.\n\nIdeally this would work with Google Drive to save projects.\n\nFor now I've found this simple tool: [https://www.online-python.com/](https://www.online-python.com/)\n\nIs there anything better you would suggest?\n\nThanks!", "upvote_ratio": 0.93, "id": "t3_tg86m4", "created_utc": 1647517062.0} +{"sub": "Python", "title": "High-level tools to simplify visualization in Python", "selftext": "", "upvote_ratio": 0.87, "id": "t3_tg4r7y", "created_utc": 1647502854.0} +{"sub": "Python", "title": "5 Steps to Master Python Decorator", "selftext": "", "upvote_ratio": 0.5, "id": "t3_tg4ho8", "created_utc": 1647501697.0} +{"sub": "Python", "title": "End to end encrypted pastebin built with Starlette (as the file server.)", "selftext": "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.\n\nPaaster is a secure by default end to end encrypted pastebin built with Svelte, Vite, Typescript, Python, Starlette, rclone & Docker.\n\n[Github](https://github.com/WardPearce/paaster) (Any stars or merges appreciated)\n\n[paaster.io](https://paaster.io)\n\n[Example paste](https://paaster.io/NqU-4gSo2SSWXhIBSct9l#hD8y8CEr4JjRpuo2nrdL6xGtBIP17QPbpGv2Ld1jlMA)\n\n# Preview\n\n[Preview](https://i.redd.it/oskt8a6upun81.gif)\n\n# Features\n\n* End to end encryption.\n* Rate limiter (with redis).\n* Shortcuts.\n* Rclone supported.\n* Nano IDs.\n* Paste history.\n* Auto code highlighting.\n* Memory efficient file handling .\n* Server secrets bcrypt hashing.\n\n# Future plans\n\n* Unit tests\n* File uploading", "upvote_ratio": 0.93, "id": "t3_tfzdes", "created_utc": 1647482892.0} +{"sub": "Python", "title": "_ctypes in pure python code:", "selftext": "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.", "upvote_ratio": 0.29, "id": "t3_tfwzu1", "created_utc": 1647475485.0} +{"sub": "Python", "title": "Thursday Daily Thread: Python Careers, Courses, and Furthering Education!", "selftext": "Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!\n\n**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.**", "upvote_ratio": 0.72, "id": "t3_tfww6h", "created_utc": 1647475210.0} +{"sub": "Python", "title": "Python 3.10.3, 3.9.11, 3.8.13, and 3.7.13 are now available with security content", "selftext": "", "upvote_ratio": 0.85, "id": "t3_tfuvc8", "created_utc": 1647469462.0} +{"sub": "Python", "title": "Network Tracking using Wireshark and Google Maps - Python3", "selftext": "", "upvote_ratio": 0.73, "id": "t3_tfu7pd", "created_utc": 1647467653.0} +{"sub": "Python", "title": "First time to work in python", "selftext": "hello guys i\u2019m new here and I have question about python. what exactly you guys doin at work ? i\u2019m bout to apply for a job and I have no idea what to do or what they\u2019re expecting me to do.", "upvote_ratio": 0.4, "id": "t3_tfrqfi", "created_utc": 1647460900.0} +{"sub": "Python", "title": "First steps into async Python", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tfi3nr", "created_utc": 1647438567.0} +{"sub": "Python", "title": "Composer: a new PyTorch library to train models ~2-4x faster with better algorithms", "selftext": "Hey all!\n\nWe'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!\n\nhttps://preview.redd.it/87if2pufdsn81.png?width=3009&format=png&auto=webp&s=0238e6bf3050be3e4db27ca07dbbea80a16a7f49\n\nComposer lets you train:\n\n* 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.**\n* 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.**\n* 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.**\n\nhttps://preview.redd.it/hf8u1mk1esn81.png?width=10008&format=png&auto=webp&s=a5606571bf6a23c607d58648e654bdd2184afd83\n\nComposer 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.\n\n**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.\n\n**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!\n\n**Feel free check out our GitHub repo:** [https://github.com/mosaicml/composer](https://github.com/mosaicml/composer), and star it \u2b50\ufe0f to keep up with the latest updates!", "upvote_ratio": 0.78, "id": "t3_tfoebv", "created_utc": 1647454514.0} +{"sub": "Python", "title": "Tool detection using phone and Machine Learning", "selftext": "&#x200B;\n\nhttps://reddit.com/link/tfny9g/video/nvbynxiyasn81/player\n\nMaking my phone as an Extension of the camera I can detect objects in my laptop by streaming feed into OpenCV sing YOLO\n\n[source](https://github.com/Aaris-Kazi/Tool-Detection-using-YOLO/)", "upvote_ratio": 0.76, "id": "t3_tfny9g", "created_utc": 1647453322.0} +{"sub": "Python", "title": "I fixed python traceback real quick", "selftext": "&#x200B;\n\nhttps://preview.redd.it/yqvg54ml9sn81.png?width=2000&format=png&auto=webp&s=575484421b18464c240d3f384d3a1c7e3f4e3a34\n\n yourprog = \"whatever.py\"\n \n from subprocess import check_output, STDOUT\n \n def abrT(r):\n return r\n o = \"\"\n # I don't care about unreadable code I am writing this during lunch break\n for line in r.split(\"\\n\"):\n if \"Traceback\" in line:\n o += \"Traceback:\\n\\n\"\n elif \"File\" in line:\n a = line[line.find(\", \")+2:] + \"\\n\"\n a = a.replace(\", in <module>\", \"\")\n o += \" \" + a\n elif \":\" in line:\n o += \"\\n \" + line.split(\": \")[0] + \":\\n \" + line.split(\": \")[1] + \"\\n\"\n else:\n o += line + \"\\n\"\n return o[:-1]\n \n result = str(check_output(f\"python3 {yourprog}; echo -n\", shell=1, stderr=STDOUT), 'utf-8')\n print(abrT(result))", "upvote_ratio": 0.69, "id": "t3_tfnswk", "created_utc": 1647452918.0} +{"sub": "Python", "title": "Scrape Google Books in Python", "selftext": "This blog post uses [`parsel`](https://parsel.readthedocs.io/) as an HTML/XML parser that supports full XPath, instead of [`bs4`](https://www.crummy.com/software/BeautifulSoup/bs4/doc/).\n\nShows how to scrape:\n- title\n- link\n- displayed link\n- snippet\n- author\n- publication date\n- thumbnail\n- preview, and more editions.\n\nIf you need a step-by-step explanation, you can visit [Scrape Google Books in Python](https://serpapi.com/blog/scrape-google-books-in-python/) blog post at SerpApi, otherwise:\n\n```python\nfrom parsel import Selector\nimport requests, json, re\n\nparams = {\n \"q\": \"richard branson\",\n \"tbm\": \"bks\",\n \"gl\": \"us\",\n \"hl\": \"en\"\n}\n\nheaders = {\n \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.87 Safari/537.36\",\n}\n\nhtml = requests.get(\"https://www.google.com/search\", params=params, headers=headers, timeout=30)\nselector = Selector(text=html.text)\n\nbooks_results = []\n\n# https://regex101.com/r/mapBs4/1\nbook_thumbnails = re.findall(r\"s=\\\\'data:image/jpg;base64,(.*?)\\\\'\", str(selector.css(\"script\").getall()), re.DOTALL)\n\nfor book_thumbnail, book_result in zip(book_thumbnails, selector.css(\".Yr5TG\")):\n title = book_result.css(\".DKV0Md::text\").get()\n link = book_result.css(\".bHexk a::attr(href)\").get()\n displayed_link = book_result.css(\".tjvcx::text\").get()\n snippet = book_result.css(\".cmlJmd span::text\").get()\n author = book_result.css(\".fl span::text\").get()\n author_link = f'https://www.google.com/search{book_result.css(\".N96wpd .fl::attr(href)\").get()}'\n date_published = book_result.css(\".fl+ span::text\").get()\n preview_link = book_result.css(\".R1n8Q a.yKioRe:nth-child(1)::attr(href)\").get()\n more_editions_link = book_result.css(\".R1n8Q a.yKioRe:nth-child(2)::attr(href)\").get()\n\n books_results.append({\n \"title\": title,\n \"link\": link,\n \"displayed_link\": displayed_link,\n \"snippet\": snippet,\n \"author\": author,\n \"author_link\": author_link,\n \"date_published\": date_published,\n \"preview_link\": preview_link,\n \"more_editions_link\": f\"https://www.google.com{more_editions_link}\" if more_editions_link is not None else None,\n \"thumbnail\": bytes(bytes(book_thumbnail, \"ascii\").decode(\"unicode-escape\"), \"ascii\").decode(\"unicode-escape\")\n })\n```", "upvote_ratio": 0.5, "id": "t3_tfm16q", "created_utc": 1647448203.0} +{"sub": "Python", "title": "OpenTelemetry and Distributed Tracing in Python - Introduction", "selftext": "", "upvote_ratio": 0.33, "id": "t3_tflm99", "created_utc": 1647447107.0} +{"sub": "Python", "title": "Add jemalloc to your Python Docker images", "selftext": "", "upvote_ratio": 1.0, "id": "t3_tflf1p", "created_utc": 1647446556.0} +{"sub": "Python", "title": "What's your favorite module/library/package?", "selftext": "Just wondering what's your favorite module and package which you like to use them? Mine is re.\n\nYou can tell multiple, by the way.", "upvote_ratio": 0.5, "id": "t3_tfkh8z", "created_utc": 1647445189.0} +{"sub": "Python", "title": "Writing production grade pandas with hamilton!", "selftext": "While Pandas is incredibly flexible and easy to get started with, it doesn't lend itself to writing good quality, extensible code. This is usually fine. Lots of it is thrown away -- written in notebooks and never seen again. However, a lot amount of it ends up making it into production ETLs, services, etc..\n\nAt Stitch Fix, we had a *lot* of monolithic, messy pandas scripts. We built [hamilton](https://github.com/stitchfix/hamilton/) to solve this problem. A programmer represents transforms on dataframes as a series of python functions. The parameter names are used to specify upstream dependencies, and the whole thing gets wired into a dependency graph.\n\nIn short -- instead of writing:\n\n df['a'] = df['b'] + df['c']\n\nYou'd write:\n\n def a(b: pd.Series, c: pd.Series) -> pd.Series:\n return b+c\n\nThen you use a *driver* to customize execution, pass in paraemeters, etc... Note that its not at all limited to pandas -- while that was the initial use-case, it can handle any sort of python datatype!\n\nWe've opened up this internal tool we're excited about to the outside world -- we'd love feedback, contribution, and use-cases!\n\n[https://github.com/stitchfix/hamilton/](https://github.com/stitchfix/hamilton/)", "upvote_ratio": 0.8, "id": "t3_tfkahz", "created_utc": 1647444723.0} +{"sub": "Python", "title": "First time I used python", "selftext": "I'm coding with python for half a month now, in the beginning I was a bit sceptical what I would use it for but today I used it for the first time. \n\nTo cure boredom, me and my friends are doing typeraces where we have to type as fast as possible. I'm pretty good at that but there is someone in my class that is just a little better. Its just because I type upper cases with shiftlock and she types with shift. \n\nSo I wanted to learn to type with shift so I could type faster. But because I never did it that way I had to practice it so I wrote a little python program that generates a letter and then you have to type that letter. \n\nI was very happy how it turned out and I now I understand python can and will be very useful .", "upvote_ratio": 0.84, "id": "t3_tfiry5", "created_utc": 1647440485.0} +{"sub": "Python", "title": "OPToggles - a feature flag Open Source project", "selftext": "Hey r/Python! Just wanted to share our open source project launching today. Thought some of you might find it useful, and we would love to hear your feedback.\n\nAs devs, we often want our frontend to reflect the permissions enforced by the backend - i.e. if a user is not allowed to run the action behind a button - don't show the button.\n\n[OPToggles](https://github.com/permitio/OPToggles) uses[ Open Policy Agent](https://github.com/open-policy-agent/opa) to automatically enhance feature flag solutions by creating user-targeted feature flags. It already supports LaunchDarkly and a generic REST API.", "upvote_ratio": 0.76, "id": "t3_tfil3b", "created_utc": 1647439946.0} +{"sub": "Python", "title": "How do you really share constants across your project in a Pythonic way?", "selftext": "Assuming i have a package i created who get input text, and return a huge dictionary with 50+ keys.\n\nSince *all other packages* in the program are using this dictionary and play with those keys, I don't want to hard code the keys, but keep them as global **constants**.\n\nSo here are my options and i feel uncomfortable with both of them:\n\n1. Put all constants vars in a separate folder/package in root folder, and *import them to each package* that use them. To my eyes it makes the code **hairy and uncapsulated.** I love the SW engineering where you have a package that depend on nothing outside.\n2. Pass all arguments in this config package to *each* package who need it - which also make things ugly hairy and confusing, and require putting all constants in a class(there are no structures.)\n\n&#x200B;\n\nI know that most people go with **1**, but my code has like 10+ packages i wrote, each package has multiple files, ***each*** depend on these constants(50+), and if i import the constants (even with **absolute import**) to each, it makes me feel uncomfortable.\n\nWhat if i want to give my package to another developer ? i need to gather all these dependencies?\n\n**How is this done in huge multi developers programs ?**", "upvote_ratio": 0.57, "id": "t3_tfhvue", "created_utc": 1647437921.0} +{"sub": "Python", "title": "Import of modules is slowing down executable. Can it be imported locally or what can be done differently ?", "selftext": "I am importing the following modules/libraries which is causing the exe to take a few minutes to start. How can I store them locally or what can I do differently so that the exe starts quickly? When I run this from the Notebook it the application runs without any delay. I wonder if there is a way to speed up the exe.\n\nimport time \nimport openpyxl \nfrom os import path \nfrom selenium import webdriver \nfrom openpyxl.styles import Alignment \nfrom webdriver\\_manager.chrome import ChromeDriverManager \nfrom openpyxl.styles.borders import Border, Side \nfrom selenium.webdriver.support.ui import Select \nimport os \nimport math \nimport win32com.client as client \nfrom PIL import ImageGrab\n\n&#x200B;\n\nThank you in advance.", "upvote_ratio": 1.0, "id": "t3_tfh1l5", "created_utc": 1647435382.0} +{"sub": "Python", "title": "Stylistic choice of validation functions", "selftext": "Hey all! Got a question. I\u2019m working on a validation script for work verifying some supplied input against required values. I\u2019m wondering, stylistically, if there\u2019s a \u201cpreferred way\u201d to write these functions. \n\nAn example function\u2026 \n\n \n\n Def name_max_length(name): \n if 1 < len(name) <= 128:\n return None\n else: \n raise ValidationError(\u201cNames length fell outside of max range.\u201d) \n\n\n\nApologies if Reddit mobile mangled that code but it\u2019s short enough that I think everyone can still grok it. \n\nIf you were working on a project would you want to see the above? Or would you rather read a single if statement, without an else, checking to see if it fell outside of the valid range and if so raise the exception. \n\nI thought PEP-8 had a stylistic recommendation about positive vs negative checking for if statements but I gave it a quick scan and didn\u2019t see anything. I\u2019m going to be writing a lot of these, so I\u2019d like to get a solid stylistic choice under me. \n\nI\u2019m also curious, would you rather see these ranges hard coded in the if statement, or see two local variables (min/max) and have \u201cif\u201dcompare against those?", "upvote_ratio": 1.0, "id": "t3_tfgida", "created_utc": 1647433601.0} +{"sub": "Python", "title": "what to do after practice python. org?", "selftext": "Helo I'm a beginner and I've finished the exercises from practice python org and I m clueless as to what my next step should be. What do you recommend, I tried advent of code but a lot of the exercises are way too hard for me. thanks very much", "upvote_ratio": 0.79, "id": "t3_tfflsy", "created_utc": 1647430590.0} +{"sub": "Python", "title": "Create a hello world app using django", "selftext": "", "upvote_ratio": 0.75, "id": "t3_tffh4r", "created_utc": 1647430119.0} +{"sub": "Python", "title": "My first ever Python Project!! I named it tagSearch", "selftext": "I saw a twitter post the other day \"Is there a tool that I can get meta tags off of a web site? I couldn't find any\". \n\n\nI thought to myself, there probably is, but I should do one too for at least practice. \n\n\nSo I made this small script called tagsearch, basically it collects wanted tags off a site. It can also scrape certain tags that have a wanted attribute, like span tags but only if they have class attr. \n\n\nI also added regex support meaning one can make regex search on the scraped tags. My GitHub repo:\n\n[https://github.com/teooman/tagsearch](https://github.com/teooman/tagsearch)\n\nExample image\n\nhttps://preview.redd.it/5ic7krt7aqn81.png?width=1419&format=png&auto=webp&s=afabf3817e73dc2075bbf2be6017c2bc76d36298\n\nAny feedback would be highly appreciated!!", "upvote_ratio": 0.67, "id": "t3_tff544", "created_utc": 1647428851.0} +{"sub": "Python", "title": "created a small utility to automatically activate Poetry virtualenvs when changing directories", "selftext": "[https://github.com/tvaintrob/auto-poetry-env](https://github.com/tvaintrob/auto-poetry-env)\n\ntested only on MacOS with zsh, heavily inspired by pyenv-venv's auto activation, please share any thoughts and suggestions!", "upvote_ratio": 0.75, "id": "t3_tfdemi", "created_utc": 1647421875.0} +{"sub": "Python", "title": "GitHub - jamalex/notion-py: Unofficial Python API client for Notion.so", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tfcksk", "created_utc": 1647418317.0} +{"sub": "Python", "title": "Which logic for if-else inside a function is better or more pythonic?", "selftext": "The logic between f1 and f2 is exactly the same, but the syntax is slightly different. This type of function shows up everywhere. Is one easier to read, or preferred in some way?\n\nSide note: I thought it was interesting that f2 is slightly faster than f1.\n\n import numpy as np\n \n arr = np.random.choice(['a','b','c'],100)\n \n def f1(cond):\n if cond == 'a':\n return 'a' \n if cond == 'b':\n return 'b' \n return 'c'\n \n def f2(cond):\n if cond == 'a':\n return 'a' \n elif cond == 'b': \n return 'b' \n else:\n return 'c'\n\nf1 timeit:\n\n In [1]: %%timeit\n ...: for i in arr:\n ...: f1(i)\n ...: \n 40.6 \u00b5s \u00b1 804 ns per loop (mean \u00b1 std. dev. of 7 runs, 10000 loops each)\n\nf2 timeit:\n\n In [2]: %%timeit\n ...: for i in arr:\n ...: f2(i)\n ...: \n 40.2 \u00b5s \u00b1 729 ns per loop (mean \u00b1 std. dev. of 7 runs, 10000 loops each)\n\nedit: u/hai_wim pointed out that the speeds are fully equal (difference is within stdev tolerance), as the byte code is exactly the same. So the question really comes down to readability and standardization.", "upvote_ratio": 0.53, "id": "t3_tfbvh6", "created_utc": 1647415266.0} +{"sub": "Python", "title": "Approach H2kinfosys to Learn Python Course Effectively", "selftext": " This [**python certification online**](https://www.h2kinfosys.com/courses/python-online-training) course is created for complete beginners, so you don't need any prior programming experience to complete it. The outline is designed to cover the basics of the programming language as well as some advanced topics.", "upvote_ratio": 0.67, "id": "t3_tfbsr5", "created_utc": 1647414945.0} +{"sub": "Python", "title": "macOS 12.3 finally deletes its own Python 2, which even die-hard Python fans applaud", "selftext": "", "upvote_ratio": 0.96, "id": "t3_tfbgoe", "created_utc": 1647413504.0} +{"sub": "Python", "title": "Tool to get path to JSON in python format", "selftext": "I found a tool that you can paste JSON into, provide the key to look for, and the value expected for the key (partial values works too). The result is the path to the value.\n\nWanted to share as I found this useful.\n\nhttps://xenosoftwaresolutions.com/json\n\nsample JSON:\n \n {\n \"test\": [\n {\n \"item\": true,\n \"checked\": false,\n \"info\": {\n \"hello\": \"world\"\n },\n \"products\": []\n }\n ]\n } \n\nresult when looking for hello as key and world as value:\n \n [\"test\"][0][\"info\"][\"hello\"]", "upvote_ratio": 0.78, "id": "t3_tf6b85", "created_utc": 1647395272.0} +{"sub": "Python", "title": "Wednesday Daily Thread: Beginner questions", "selftext": "New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!\n\nThis 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.", "upvote_ratio": 0.67, "id": "t3_tf45nb", "created_utc": 1647388810.0} +{"sub": "Python", "title": "Approximate Pi with 7 lines of code (arctangent series)", "selftext": "[https://www.youtube.com/watch?v=h63eSCNtJLg](https://www.youtube.com/watch?v=h63eSCNtJLg)", "upvote_ratio": 0.58, "id": "t3_tf2yrl", "created_utc": 1647385408.0} +{"sub": "Python", "title": "Article: Build a webhook in Python to interact with GitLab.", "selftext": "", "upvote_ratio": 0.79, "id": "t3_tf1c39", "created_utc": 1647380997.0} +{"sub": "Python", "title": "Which is more Pythonic?", "selftext": " if event_region in match regions:\n return True\n else:\n return False`\nOr...\n\n`Return True if event_region in match_regions else False`\n\nOr...\n\n`return event_region in match_regions`\n\nWhere \"event_region\" is a string and \"match_regions\" is a list of strings", "upvote_ratio": 0.87, "id": "t3_tezqe5", "created_utc": 1647376725.0} +{"sub": "Python", "title": "Django Email Signals - Django App that Actually Solves a Business Problem", "selftext": "In my workplace we make a lot of Django apps and for a number of these Django apps, we configure a lots of emails to be sent.\n\nWhenever something changes in the database that meets some condition we send an email. The emails have their own context and each email can be a time consuming to setup.\n\nThere has to be a better way I thought. And so, I built [django-email-signals](https://github.com/Salaah01/django-email-signals).\n\nI build this app to be as plug-and-play as possible with minimal configuration. This Django app allows you to setup email signals right from the admin page\n\nHere is a breakdown of what the app currently lets you do:\n\n* Configure emails to be sent when some data in some model is changed.\n* Set some constraints to determine if indeed an email can be sent.\n* Either write up your email content when setting up a new email signal, or provide a path to a template.\n* Be able to reference objects and attributes such `instance.user.first_name` right from where you would set your constraints or the email HTML itself.", "upvote_ratio": 1.0, "id": "t3_teyws8", "created_utc": 1647374670.0} +{"sub": "Python", "title": "Introducing Typesplainer: a python type-hint explainer", "selftext": "## What\n\nTypesplainer is a Python type hint explainer that explains python type hints in plain English. It is very fast, accurate, and easy to use and understand. Available as a CLI, on the web, and as a Visual Studio Code extension\n\n## Where\n\nWebsite: https://typesplainer.herokuapp.com/\\\nCLI: https://pypi.org/project/typesplainer/\\\nVisual Studio Code extension (Alpha): https://marketplace.visualstudio.com/items?itemName=WasiMaster.typesplainer\n\n## Why\n\nWondering WTF is an `Callable[[List[int]], Dict[int, List[Union[str, None]]]]`? typesplainer has got you covered. It's a callable that accepts a list of integers and returns a dictionary that maps integers onto a list of optional strings. Understanding type hints can be hard and time-consuming, especially if they are very big like the example above. This tool helps you understand things like that more easily and faster.\n\n## How\n\nJust use the cli if you want to use it anytime and anywhere. Use the website to test the tool before installing or if you want a graphical interface. And since the vscode extension is still in development, I won't recommend that at the moment.", "upvote_ratio": 0.84, "id": "t3_tevyc4", "created_utc": 1647368487.0} +{"sub": "Python", "title": "Demystifying Apache Arrow: what is it and when should you use it?", "selftext": "", "upvote_ratio": 0.91, "id": "t3_tettmu", "created_utc": 1647363875.0} +{"sub": "Python", "title": "Python Web Frameworks", "selftext": "", "upvote_ratio": 0.67, "id": "t3_tehw7k", "created_utc": 1647322911.0} +{"sub": "Python", "title": "The Boilerplate for Logging in Python", "selftext": "## Use this logging template in your next big project\n\nFinding bugs is a common problem in any programming project. To make it easier to find bugs, you probably want to write some print statements to help you debug.\n\nIs it helpful? yes. Is it the right way to track events in your code, especially in a big project? no.\n\nPython has a built-in logging module that you can use to log messages. Logging not only helps you debug the issues in your code. It also helps you understand the flow of your code especially when you ship to production.\n\nIt is a very useful tool to identify how your code is behaving whether it is working as expected or not. If not, it can show you different hierarchies of how severe the issue is whether it is an error, a warning, or a debug mode.\n\nWithout having logging, it's difficult to keep your code maintainable for a long time. Especially when this code is mature.\n\nIn this tutorial, I'll show you a boilerplate for logging that you can use in your next project. Instead of looking at the documentation every time.\n\n## Division Example\nLet's take this division example especially when we divide by zero:\n```python\ndef divide(dividend, divisor):\n try:\n return dividend / divisor\n except ZeroDivisionError:\n return \"Zero Division error.\"\n\nprint(divide(6, 0))\n```\nIn this case, when we divided 6 by 0 we returned a message string. This message shows that a zero division error during the `ZeroDivisionError` exception occurred.\n\nWhat's the problem with that? The issue here is that we don't know when that happened and how severe the issue is. Is it a warning? an error? or just a piece of information you're printing to the console?\n\nThe built-in Python's `logging` module helps you better log your code with its features. Let's see how we can use it in this context:\n```python\nimport logging\n\n# Define a logger instance\nlogger = logging.getLogger(__name__)\n# Define a stream handler for the console output\nhandler = logging.StreamHandler()\n\n# Customize the formatter on the console\nformatter = logging.Formatter(\n \"%(asctime)s - %(name)s: %(levelname)s - %(message)s\",\n datefmt=\"%Y-%m-%d %H:%M:%S\"\n )\n# Add the formatter to the handler\nhandler.setFormatter(formatter)\n\n# Add the stream handler to the logger that we will use\nlogger.addHandler(handler)\n# Set the level of logging to be INFO instead of the default WARNING\nlogger.setLevel(logging.INFO)\n\ndef divide(dividend, divisor):\n try:\n logger.info(f\"Dividing {dividend} by {divisor}\")\n return dividend / divisor\n except ZeroDivisionError:\n logger.info(\"Zero Division error.\")\n\nprint(divide(6, 0))\n```\nwhich would return helpful information like this:\n```\n2022-02-23 13:24:41 - __main__: INFO - Dividing 6 by 0\n2022-02-23 13:24:41 - __main__: INFO - Zero Division error.\n```\n## Wrap Up\nIn this boilerplate, you've seen how to log messages to the console. You've formatted the logs to start with a date and time followed by the name of the module, level of logging, and the log message itself.\n\nCheck out the [logger module here](https://gist.github.com/EzzEddin/0e8c517a47e678da6a60cc21fdbc5788) and let me know if you have any feedback, thanks!", "upvote_ratio": 1.0, "id": "t3_terbh0", "created_utc": 1647357423.0} +{"sub": "Python", "title": "Python vs SQL for Data Analysis: comparing performance, functionality and dev XP", "selftext": "The clean division of data analysis labor between Python and SQL seems to be fading with tools like dbt, Snowpark and dask-sql. The article shared below compares the two languages in terms of performance, functionality and developer XP. \n\nQuick summary:\n\n**Performance** \nRunning SQL code on data warehouses is generally faster than Python for querying data and doing basic aggregations. This is because SQL queries move code to data instead of data to code. That said, parallel computing solutions like Dask and others that scale Python code to larger-than-memory datasets can significantly lower processing times compared to traditional libraries like pandas.\n\n**Functionality** \nSQL\u2019s greatest strength is also its weakness: simplicity. For example, writing SQL code to perform iterative exploratory data analysis, data science or machine learning tasks can quickly get lengthy and hard to read. Python lets you write free-form experimental data analysis code and complex mathematical and/or ML code. The absence of a vibrant and reliable third-party library community for SQL is also a problem compared to Python.\n\n**Developer XP** \nPython makes debugging and unit-testing a lot easier and more reliable. While dbt has added code versioning by forcing the use of Git, SQL diffs are still harder to read and manipulate than diffs in Python IMO.\n\n**Conclusion** \nWhile it's tempting to frame the debate between SQL and Python as a stand-off, the two languages in fact excel at different parts of the data-processing pipeline. One potential rule of thumb to take from this is to **use SQL for simple queries that need to run fast** on a data warehouse, **dbt for organizing more complex SQL models**, and **Python with distributed computing libraries like Dask for free-form exploratory analysis and machine learning code** and/or code that needs to be reliably unit tested.\u00a0 \n\n\nFull article: \n[https://airbyte.com/blog/sql-vs-python-data-analysis](https://airbyte.com/blog/sql-vs-python-data-analysis)", "upvote_ratio": 0.69, "id": "t3_tequ97", "created_utc": 1647356144.0} +{"sub": "Python", "title": "Use Python to Transcribe an Audio File in an S3 Bucket in 3 Steps", "selftext": "Hey guys! I wrote a [mini-article](https://www.assemblyai.com/blog/transcribing-audio-files-in-an-s3-bucket-with-assemblyai/) on **how to transcribe an audio file in an S3 bucket in 3 simple steps**.\n\nFigured it might be helpful for people learning to use Python, JSON, AWS, etc.!", "upvote_ratio": 0.95, "id": "t3_teqkc2", "created_utc": 1647355373.0} +{"sub": "Python", "title": "Processing large JSON files in Python without running out memory", "selftext": "nan", "upvote_ratio": 0.95, "id": "t3_tepn58", "created_utc": 1647352799.0} +{"sub": "Python", "title": "Python Class Constructors: Control Your Object Instantiation \u2013 Real Python", "selftext": "nan", "upvote_ratio": 0.67, "id": "t3_teozl2", "created_utc": 1647350835.0}