et_micc
master

Contents:

  • Micc
  • Installation
  • Usage
  • Applications (CLI)
  • API
  • Development environment
  • Frequently asked questions
  • Tutorials
  • Interesting links on Python programming
    • For Beginners
    • Python as a language
    • Software engineering
    • Python internals
    • Python for HPC
    • Code modernization
    • Profiling
    • Resource monitoring
    • Python idioms and readability
    • Useful packages
    • Exceptions
    • Type checking in Python
    • Design patterns
    • Testing
    • Debugging
    • Logging
    • Profiling
    • Scientific Python
    • Machine learning and datascience
    • CLIs
    • Packaging
    • Graphics
    • Installing packages
    • Tools
    • Development environment, developement workflow
    • Problem solving
    • Documentation
    • Django
    • Fortran/C/C++
    • Compilers
    • Notebooks
    • Containers
    • Windows
    • Linux
    • Programming blogs
  • Authors
  • History
et_micc
  • Docs »
  • Interesting links on Python programming
  • Edit on GitHub

Interesting links on Python programming¶

This page is a compilation of links I found interesting while learning Python and while solving everyday problems. As I keep on learning this list evolves continuously :-)

“the most dangerous thought you can have as a creative person, is that you know what you are doing.” Bret Victor - The Future of Programming.

For Beginners¶

  • De Programmeursleerling - Pieter Spronck (in Dutch)
  • Slither into Python
  • Learn Python by building 5 games

Python as a language¶

  • What makes Python a great language?
  • Python is known for being a language that’s easy to read, quick to develop in, and applicable to a wide range of scenarios
  • Writing your first Python program
  • How long did it take you to learn Python Wait, don’t answer that. It doesn’t matter. Ned Batchelder

Software engineering¶

  • Cognitive Biases In Software Development
  • What scientists must know about hardware to write fast code A simplified view - but not over-simplified - on how hardware affects performance. Written with Julia in mind rather than Python, but the principles remain valid.
  • Clean architecture
  • The Grand Unified Theory of Software Architecture

Python internals¶

  • How to run a python script
  • Cpython source code guide
  • Know thy self - Methods and method binding - PyCon 2017
  • Namespaces and Scope in Python
  • The many ways to pass code to Python from the terminal
  • Unpacking in Python: Beyond Parallel Assignment
  • Pragmatic Unicode - Ned Batchelder - PyCon 2012

Python for HPC¶

Here’s a list of approaches that rely on low-lever programming languages, as C, C++ and Fortran, for speeding up Python (sequential) code. Some of these approaches, e.g. Numba rely on automatic code transformation from Python, so there is no need to write low-level code yourself.

  • Performance Python: Seven Strategies for Optimizing Your Numerical Code
  • High performance Python 1
  • High performance Python 2
  • High performance Python 3
  • Python Bindings: Calling C or C++ From Python

Approaches mimicking or wrapping OpenMP and MPI:

  • Pymp – OpenMP-like Python Programming A really interesting concept, not as efficient as OpenMP itself (which incurs quite a bit of overhead itself), and, of course, limited to a single node. As the number of cores per node keeps increasing, pymp may be a good solution for problems that can do with a single node.
  • High performance Python 4 Mpi4py, doing mpi from Python.

Other parallel processing approaches:

  • Sequential Execution, Multiprocessing, and Multithreading IO-Bound Tasks in Python
  • Common Issues Using Celery (And Other Task Queues)
  • The Parallelism Blues: when faster code is slower
  • Dask

Concepts and ideas:

  • Does it ever make sense to use more concurrent processes than processor cores? You can have as many threads as you want as long as they’re doing nothing.

Code modernization¶

  • Improving performance with SIMD intrinsics in three use cases

Profiling¶

  • Profiling python
  • Python profiling with blackfire
  • Python 3.9 StatsProfile
  • Profiling Python Code
  • Disassemble Your Python Code
  • Counting FLOPS and other CPU counters in Python

Resource monitoring¶

  • Remora
  • REMORA: REsource MOnitoring for Remote Applications

Python idioms and readability¶

  • The Elements of Python Stylez
  • Practical decorators Reuven Lerner
  • Elegant Solutions For Everyday Python Problems - PyCon 2018
  • Yes, It’s Time to Learn Regular Expressions - PyCon 2017
  • Decorators, unwrapped How do they work - PyCon 2017
  • Decorators and descriptors decoded - PyCon 2017
  • The Dictionary Even Mightier - PyCon 2017
  • Looping Like a Pro in Python - PyCon 2017
  • Readable Regular Expressions - PyCon 2017
  • Passing Exceptions 101 Paradigms in Error Handling - PyCon 2017
  • Readability Counts - PyCon 2017
  • Modern Python Dictionaries: A confluence of a dozen great ideas - PyCon 2017
  • Gang of 4 inspired decorators
  • Python module of the week
  • Type hints for busy programmers
  • Exceptions
  • Python Tips and Tricks, You Haven’t Already Seen - part 1
  • Python Tips and Tricks, You Haven’t Already Seen - part 2
  • 30 Python Best Practices, Tips, And Tricks
  • pythonic things
  • 71 Python Code Snippets for Everyday Problems
  • Clean Code Concepts Adapted for Python
  • The place of the ‘is’ syntax in Python
  • 5 Things You’re Doing Wrong When Programming in Python
  • 10 Python Tips and Tricks For Writing Better Code
  • Tour of Python Itertools
  • Getting the most out of Python collections
  • Unpacking in Python: Beyond Parallel Assignment
  • When Python Practices Go Wrong About the use of exec() and eval(). A presentation, so, the logic isn`t always obvious, but definitely an interesting topic. Here’s the corresponding video When Python Practices Go Wrong - Brandon Rhodes - code::dive 2019
  • The Curious Case of Python’s Context Manager
  • Demystifying Python’s Descriptor Protocol
  • Why You Should Use More Enums In Python
  • Regular Expressions: Regexes in Python (Part 1)
  • Regular Expressions: Regexes in Python (Part 2)
  • 10 Awesome Pythonic One-Liners Explained
  • Stop writing classes
  • Generators, Iterables, Iterators in Python: When and Where
  • New Features in Python 3.9 You Should Know About
  • The Curious Case of Python’s Context Manager
  • Demystifying Python’s Descriptor Protocol
  • Python 101 – Working with Strings
  • A Guide to Python Lambda Functions
  • Pythonic code review
  • Python args and kwargs: Demystified
  • Python Dictionary Iteration: Advanced Tips & Tricks
  • Python Code style and pythonic idioms

Useful packages¶

  • safer: a safer file writer
  • sproc: subprocesses for subhumanses
  • The 22 Most-Used Python Packages in the World
  • Five Amazing Python Libraries you should be using!
  • The most underrated python packages
  • No Really, Python’s Pathlib is Great
  • Python 101 – Creating Multiple Processes
  • Python Packages: Five Real Python Favorites
  • Python and PDF: A Review of Existing Tools
  • A cross-platform Python module for copy and paste clipboard functions
  • The Python pickle Module: How to Persist Objects in Python
  • Pickle’s nine flaws
  • Taichi:a programming language designed for high-performance computer graphics
  • rich: rich text and beautiful formatting in the terminal

Exceptions¶

  • Better Python tracebacks with Rich
  • Write Unbreakable Python
  • pretty-errors: Prettifies Python exception output to make it legible
  • Python KeyError Exceptions and How to Handle Them

Type checking in Python¶

  • Type-checked Python in the real world - PyCon 2018 mypy
  • Applying mypy to real world projects
  • Types at the Edges in Python

Design patterns¶

  • Design Patterns in Python for the Untrained Eye - PyCon 2019
  • Python patters
  • Refactoring and Design patterns
  • Pyton anti-patterns
  • Coding problems

Testing¶

  • Getting Started Testing: pytest edition
  • tox nox and invoke Break the Cycle: Three excellent Python tools to automate repetitive tasks
  • Hypothesis
  • Escape from auto-manual testing with Hypothesis!
  • Beyond Unit Tests: Taking Your Testing to the Next Level - PyCon 2018
  • How to mock in Python? – (almost) definitive guide
  • Why your mock doesn’t work
  • Visual Testing with PyCharm and pytest - PyCon 2018
  • “WHAT IS THIS MESS?” - Writing tests for pre-existing code bases - PyCon 2018
  • Python Testing 201 with pytest
  • 8 great pytest plugins
  • Pytest Features, That You Need in Your (Testing) Life
  • An Introduction To Test Driven Development
  • How To Write Tests For Python
  • How I’m testing in 2020
  • Building Good Tests
  • Property-based tests for the Python standard library (and builtins)
  • a pytest plugin designed for analyzing resource usage
  • ward - A modern Python test framework
  • The Clean Architecture in Python - How to write testable and flexible code
  • Effective Python Testing With Pytest
  • Document your tests
  • 15 amazing pytest plugins and more (an episode on an interesting blog).
  • ARRANGE-ACT-ASSERT: A PATTERN FOR WRITING GOOD TESTS
  • There’s no one right way to test your code
  • Why you should document your tests

Debugging¶

  • pdb - The Python debugger
  • Python debugging with pdb
  • Python 101 – Debugging Your Code with pdb
  • tutorial on sys.settrace
  • Liran Haimovitch - Understanding Python’s Debugging Internals - PyCon 2019
  • bdb - debugger framework
  • pudb for Visual Debugging

Logging¶

  • Python logging tutorial
  • Writing custom profilers for Python
  • Do not log

Profiling¶

  • Python timer functions

Scientific Python¶

  • Array Oriented Programming with Python NumPy
  • Numeric and Scientific Python Packages built on Numpy
  • Symbolic Maths in Python
  • How to use HDF5 files in Python

Machine learning and datascience¶

  • Scikit-learn, wrapping your head around machine learning - PyCon 2019
  • Applied Deep Learning for NLP Using PyTorch
  • Data Science Best Practices with pandas - PyCon 2019
  • Thinking like a Panda: Everything you need to know to use pandas the right way
  • Plotnine: Grammar of Graphics for Python
  • Top 10 Python libraries of 2019
  • Top 10 Python Packages for Machine Learning
  • streamz: Build Pipelines to Manage Continuous Streams of Data
  • nfstream - A flexible network data analysis framework

CLIs¶

  • Building a CLI for Firmware Projects using Invoke
  • Click
  • QUICK: A real quick GUI generator for click
  • When laziness is efficient: Make the most of your command line
  • Typer: build CLIs with Python type hints

Packaging¶

  • Inside the Cheeseshop: How Python Packaging Works - PyCon 2018 historical overview with thorough explanation
  • Share Your Code! Python Packaging Without Complication - PyCon 2017
  • A Python alternative to Docker
  • The Python Packaging Ecosystem
  • Python Packaging Is Good Now
  • Conda: Myths and Misconceptions
  • The private PyPI server powered by flexible backends
  • Packaging without setup.py
  • PDM - Python Development Master
  • Python Packaging Made Better: An Intro to Python Wheels
  • Options for packaging your Python code: Wheels, Conda, Docker, and more
  • What the heck is pyproject.toml?

Graphics¶

  • matplotlib
  • “Cyberpunk style” for matplotlib plots
  • Effectively using matplotlib
  • ModernGL : a python wrapper over OpenGL 3.3+
  • Magnum: Lightweight and modular C++11/C++14 graphics middleware for games and data visualization
  • Grammar of graphics for Pyhon (using plotnine and pandas)
  • plotly Express
  • widgets in matplotlib

Installing packages¶

  • A quick-and-dirty guide on how to install packages for Python

Tools¶

  • Software Development Checklist for Python Applications
  • IPython and Jupyter in Depth: High productivity, interactive Python Matthias Bussonier
  • Faster Python Programs - Measure, don’t Guess - PyCon 2019
  • Python Tooling Makes a Project Tick
  • Life Is Better Painted Black, or: How to Stop Worrying and Embrace Auto-Formatting
  • Using GitHub, Travis CI, and Python to Introduce Collaborative Software Development - PyCon 2018
  • What’s in your pip toolbox - PyCon 2017
  • How can I get tox and poetry to work together to support testing multiple versions of a Python dependency?
  • Understanding Best Practice Python Tooling by Comparing Popular Project Templates
  • My unpopular meaning about Black code formatter
  • Python static analysis tools
  • Leverage Sublime project folders to ease your work
  • Deep dive into how pyenv actually works by leveraging the shim design pattern
  • 9 useful tricks of git branch
  • gitutor
  • Things You Want to Do in Git and How to Do Them
  • Helpful git commands for beginners

Development environment, developement workflow¶

  • pyenv+poetry+pipx <https://jacobian.org/2019/nov/11/python-environment-2020/>
  • https://sourcery.ai/blog/python-best-practices/
  • https://pypi.org/project/create-python-package/ a micc ‘light’
  • Managing Python Environments
  • Using Sublime Text for python
  • How to Set Up a Python Project For Automation and Collaboration
  • Hypermodern Python
  • Thoughts on where tools fit into a workflow
  • poetry
  • Blazing fast CI with GitHub Actions, Poetry, Black and Pytest

Problem solving¶

  • The mental game of Python - Raymond Hettinger - pybay 2019

Documentation¶

  • Practical Sphinx - PyCon 2018
  • Write the Docs is a global community of people who care about documentation
  • How documentation works, and how to make it work for your project - PyCon 2017
  • How to document Python code with Sphinx
    interesting section about tox
  • Scott Meyers’ advise on writing

Django¶

  • Understanding django

Fortran/C/C++¶

  • https://www.fortran90.org
  • http://www.cplusplus.com
  • http://cppreference.com

Compilers¶

  • CppCon 2017: Matt Godbolt “What Has My Compiler Done for Me Lately? Unbolting the Compiler’s Lid”

Notebooks¶

  • Jupyter Notebooks in the IDE

Containers¶

  • Building Python Data Science Container using Docker

Windows¶

  • Using WSL to Build a Python Development Environment on Windows This is promising: maybe we finally have a an environment on Windows with a minimal difference from Linux an MacOSX.

Linux¶

  • 2020: The Year of the Linux Desktop - Moving from Macbook to Linux

Programming blogs¶

  • julien danjou
  • Patrick’s software blog
  • Ruslan Spivak
  • https://rhodesmill.org/brandon/
  • testandcode
Next Previous

© Copyright 2019, Engelbert Tijskens Revision 990e4635.

Built with Sphinx using a theme provided by Read the Docs.