Python
Python Course
- The Programming Bootcamp for Scientists covers the whole Basic Python programming course and subjects such as Numpy, Pandas and other scientific programming libraries.
Articles about Python
- Listing a directory using Python
- How to insert a dictionary in another dictionary in Python (How to merge two dictionaries)
- range vs. xrange in Python
- List Comprehension vs Generator Expressions in Python
- Plain function or Callback - An example in Python
- Callback or Iterator in Python
- Function vs Generator in Python
- urllib vs urllib2 in Python - fetch the content of 404 or raise exception?
- Print HTML links using Python HTML Parser
- Extract HTML links using Python HTML Parser
- Creating an Iterator in Python
- Python Weekly statistics (using urllib2, HTMLParser and pickle)
- Solution: Number guessing game in Python
- Show Emoji in Python code
- for-else in Python indicating "value not found"
- Create your own interactive shell with cmd in Python
- Traversing directory tree using walk in Python - skipping .git directory
- Python: avoid importing everything using a star: *
- Type checking of Python code using mypy
- Python package dependency management - pip freeze - requirements.txt and constraints.txt
PIL, Pillow
This list contains articles on how to create and manipulate images using PIL, Pillow in Python.
- Create images with Python PIL and Pillow and write text on them
- Get size of image using PIL or Pillow
- Write text on existing image using Python PIL - Pillow
- Crop images using Python PIL - Pillow
- Resize images using Python PIL Pillow
Other
- Showing speed improvement using a GPU with CUDA and Python with numpy on Nvidia Quadro 2000D
- Send HTTP Requests in Python
- Command-line counter in Python
- Never use input() in Python 2
- Parallel processing in Python using fork
- Static web server in Python
- How to serialize a datetime object as JSON using Python?
- Using the Open Weather Map API with Python
- Skeleton: A minimal example generating HTML with Python Jinja
- Simple logging in Python
- Logging in Python
- Python argparse to process command line arguments
- How to commafy a number? (How to print number with commas as thousands separators using Python?)
- seek, tell
- Capture standard output, standard error, and the exit code of a subprocess (subprocess)
- Iterate over list of tuples
- Print version number of Python module
- Repeat the same random numbers using seed
- split command line into pieces as the shell does - shlex.split()
- Python context tools - cwd, tmpdir
- Python and PostgreSQL
- RPC with Python using RPyC
- Fermat primality test
- Python UUID - Universally unique identifier
- Time left in process (progress bar) in Python
- Python counter with MongoDB
- qx in Python execute external code and capture STDOUT
- Calling Java from Python
- Python and ElasticSearch
- Python daemon (background service)
- Python: print stack trace after catching exception
- Python: logging in a library even before enabling logging
- Python atexit exit handle - like the END block of Perl
- Traversing dependency tree
- Creating PDF files using Python and reportlab
Algrithms and data structures in Python
This is going to be a series of articles show various common algorithms and data structures implemented and explained in Python. I am basing a lot of my ideas on the excellent book Mastering Algorithms with Perl.
- Queues FIFO
- Stacks LIFO
- Dequese (Double ended queue)
- Binary search
- Hashing
- Arrays
- Linked Lists
- ...
Python Testing
- Introduction to Python unittest
- Doctest in Python
- Testing Python: Getting started with Pytest
- Python testing with Pytest: Order of test functions - fixtures
- Python Pytest assertion error reporting
- Python: Temporary files and directory for Pytest
- Mocking input and output for Python testing
- Testing random numbers in Python using mocks
- Fixing random numbers for testing
- Python: PyTest fixtures - temporary directory - tmpdir
- Python unittest fails, but return exit code 0 - how to fix
- Testing with PyTest (presentation recorded at PyConIL 2017)
- Parsing test results from JUnit XML files with Python
- Combine pytest reports
Find additional Python-related articels in the Flask series.
Published on 2015-06-03