TGViewer
Channel Public Channel
Python notes

Python notes

@python_development_notes

Subscribers
514
Photos
0
Videos
0
Links
213

Showing posts older than #139 Β· Back to latest

Older Posts 20 shown
Post #138 6.13K
This Pybites exploration delves into Python generators, explaining how the yield statement enables memory-efficient, on-demand value production crucial for large datasets. It details the mechanics of generator functions, the conciseness of generator expressions, and the advantages of their lazy evaluation and state preservation capabilities.
https://pybit.es/articles/generator-mechanics-expressions-and-efficiency/
pybit.es Optimizing Python: Understanding Generator Mechanics, Expressions, and Efficiency – Pybites
  • πŸ‘ 1
Post #136 5.08K
This demonstration walks through creating a functional Python compiler using Python, explaining the core steps from source code to execution. It breaks down tokenization, Abstract Syntax Tree (AST) generation, bytecode compilation, and interpretation with a simple virtual machine.
https://dev.to/resource_bunk_1077cab07da/how-i-built-a-python-compiler-yes-really-1dgp
DEV Community How I Built a Python Compiler (Yes, Really!) Take this as an GIFT 🎁: Build a Hyper-Simple Website and Charge $500+ And this: Launch Your First...
Post #134 3.76K
This recounting by Max Bernstein details a real-world performance optimization saga from developing a custom Python runtime, where a seemingly innocuous string function bottlenecked Django performance. The analysis reveals how a naive Python implementation of str.rpartition led to excessive, costly UTF-8 indexing operations, emphasizing the need to look beyond surface-level profiler results to find the true cause of slowdowns.
https://bernsteinbear.com/blog/silly-perf/
Max Bernstein Optimizing Django by not being silly I just saw this post and it reminded me of a time when we had a similar situation, but with string operations in our VM. The project is now defunct but the code is open. Let’s go back in time.
Post #131 1.21K
This Talk Python episode features Brett Kennedy, author of Outlier Detection with Python, exploring how to identify significant anomalies in data using various Python tools and techniques. The discussion covers real-world applications from finance to astronomy, key libraries like PyOD and scikit-learn, handling large datasets, and the importance of interpretability when dealing with outliers.
https://talkpython.fm/episodes/show/497/outlier-detection-with-python
talkpython.fm Outlier Detection with Python Have you ever wondered why certain data points stand out so dramatically? They might hold the key to everything from fraud detection to groundbreaking discoveries. This week on Talk Python to Me, we dive into the world of outlier detection with Python with…
  • πŸ‘ 2
Post #127 536
"The Python Debugging Playbook" outlines a systematic approach to fixing Python code, framing effective debugging as a learned skill rather than innate talent. This playbook presents a five-step process covering interpreting errors, using breakpoint(), isolating bugs, searching effectively, and structuring requests for help.
https://dev.to/0x3d_site/the-python-debugging-playbook-fix-your-code-4nbb
  • πŸ‘ 1
Post #125 524
This essay dissects troubleshooting as a fundamental, domain-agnostic skill, defining it as the systematic process of determining and fixing the cause of unwanted system behavior. It outlines a detailed framework for effective troubleshooting, covering aspects like adopting the right mindset, understanding system flows, isolating problems, gathering information, assessing risks, and the importance of patience and detailed observation.
https://www.autodidacts.io/troubleshooting/
The Autodidacts Troubleshooting: The Skill That Never Goes Obsolete Much of what I do, in multiple fields, could be reduced to one skill: troubleshooting. I’ll define troubleshooting as systematically determining the cause of unwanted behaviour in a system, and fixing it. Troubleshooting is often learned tacitly, in…
  • πŸ‘ 1
Post #124 498
This walkthrough, titled "Web Scraping with Python: Learn It Fast!", demonstrates how to automate data collection from websites using Python, focusing on the BeautifulSoup and requests libraries. It covers the essential steps from fetching webpage HTML and extracting specific elements like headlines or prices to saving the data and checking robots.txt for legality.
https://dev.to/0x3d_site/web-scraping-with-python-learn-it-fast-4c6b
Post #122 567
This blog entry by Nick Craux offers practical advice for improving the coding experience with the Cursor AI assistant, drawing from personal use and skepticism. It highlights the importance of configuring .cursorrules files, providing specific code context to the AI, and understanding the tool's limitations and strengths for different coding tasks.
https://www.nickcraux.com/blog/cursor-tips
Post #121 664
This piece examines why certain Python libraries, often used for web scraping and automation, can lead to scripts being blocked or blacklisted by cloud providers and websites due to aggressive activity detection or security policies. It discusses specific libraries like Scrapy and Selenium, explains the reasons for potential bans, and offers strategies such as request throttling, using proxies/VPNs, and randomizing behavior to avoid detection.
https://dev.to/snappytuts/pythons-most-banned-scripts-getting-you-blacklisted-55n4
DEV Community Python’s Most Banned Scripts: Getting You Blacklisted? Take this as an GIFT 🎁: Build a Hyper-Simple Website and Charge $500+ And this: Launch Your First...
Post #120 746
Post #119 833
This tutorial explores the security vulnerabilities associated with Python's pickle module, demonstrating how it can be exploited for remote code execution by crafting malicious serialized objects. It emphasizes the critical warning never to unpickle data from untrusted sources, illustrating the risk with a practical example involving a Flask web application and a reverse shell payload.
https://davidhamann.de/2020/04/05/exploiting-python-pickle/
David Hamann Exploiting Python pickles How unpickling untrusted data can lead to remote code execution.
Older posts β†’
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook β†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 β†’