Skip to content

Python_index_3

Pete Garcin edited this page Dec 12, 2017 · 5 revisions

Halley's Method for Solving Equations
Hamming distance
Hamming Error Correction Code
Hamming Neighbors
Handle exit context manager
handler stack
handling a zip inside a string
Handling ANSI Terminal.
Handling Deeply Nested/Recursive Data
handling embedded email images in python
handling embedded email images in python
Handling International Text with Unicode
Handling of command line arguments: options, arguments, file(s) content iterator
Handling ties for top largest/smallest elements
Handling URLs within a CGI script
Hangman
Hangman Game (Demo)
HANGMAN!
Hanoi Towers solver wxPython
Hartree Fock SCF
has_colors(stream): Does an output stream support colors?
HasFriends
hash a string (preferably your name) to an alter ego description
Hash collision probability / Birthday problem
Hashed object cache with FIFO pruning strategy.
Hashing Nonhashable / Mutable Objects
Heap (Priority Queue) extension type in Python 2.2
heap class
heap sort
heap sort
Heap, a heapq wrapper class
Heap-based priority queue
Heise mp3 downloader
helement
help in debugging memory problems
Helper subclass for win32pdhquery
helpful 5-liner version of os.makedirs
HelpMaker: builds help message from comments in the code
Henderson and Tilton's formula
Hex Dump
Hex Dump
Hex Dump 2
Hex dumper
Hex Dumper
Hex-dump port-forwarding network proxy server
hex_dump.py
Hexadecimal Conversion Tool
hexify
Hidden Scanner functionality in re module
Hierarchical Clustering Heatmap Python
Hierarchical Clustering Heatmap Python
Hierarchical data objects
Hierarchical Split
hierarchical.py
High level inotify wrapper
high precision FPS
high-performance currying with instancemethod
Highly branched Trees
Hill Climbing Template Method
History and completion for the python shell
Hivemind
Hofstadter Butterfly Fractal
Holiday Leave
Holiday Tree
Homogeneous list
Hopcroft-Karp bipartite matching
How slots are implemented
How a Python function can find the name of its caller
How long this thread is already running?
How to add cookies/headers to SOAPpy calls
How to build dobble as a Mixed Integer program.
How to Connect to an Already Running Instance of Internet Explorer
How to Create a PDF with a Caustic Drawing
How to create a simple PDF Pie Chart using fitz / PyMuPDF
how to create a windows service in python
How to create linked OptionMenus (or other lists) in Tkinter
How to debug (deadlocked) multi threaded programs
HOW TO DEBUG PYTHON EXTENSIONS ON WINDOWS WITH OPEN SOURCE TOOLS
How to define multiple initializers for a class, with different arguments
How to delete pages in a PDF using fitz / MuPDF / PyMuPDF
How to disablе debug logging in release version
How to execute x86 64-bit assembly code directly from Python on Linux (requires Nasm)
How to freeze Python classes
How to handle PDF embedded files with PyMuPDF
how to implement kbhit() on Linux
How to implement lfu cache in python using threads?
How to implement state-dependent behavior - State-Pattern
How to Maintain PDF Links with fitz / PyMuPDF
How to Mutate a Float
How to parse a table in a PDF document
How to read an input from .txt file in python and the output in .xml
How to read millions of hexadecimal numbers into a numpy array quickly
How to serve files from a directory (and/or testing CGI scripts)
How to Set Environment Variables
How to stream an mp3 file using vlc.py, with a simple TKinter GUI.
How to take the "cross product" of two infinite sequences
How to tell if it's currently Daylight Savings Time
How to Use Custom Dictionaries to Modify Attribute Lookup
How to use Cyrillic fonts in ReportLab PDF library
How to use Python to convert a web page to PDF with a POST request to SelectPdf Online API and save it on the disk
How to use string.Template from python 2.4
How to use String.Template from python 2.4
How to use super() effectively
How to use super() effectively -- Python 2.7 version
How to use super() effectively -- Python 2.7 version
How to use super() effectively -- Python 3.2 version
How to use twisted pb FilePager
How to use twisted pb pager
Howto add a method to an instance at runtime for debugging
Howto change the implementation of a method at runtime
HTML colors to/from RGB tuples
HTML Help
HTML Page Scraping (of the Quick and Dirty Variety)
HTML Scraper
HTML template animation built on PyQuery
HTML Templates
HTML/CSS to PDF converter
HTMLTags - generate HTML in Python
htmltotext converter w/ tty support for bold/underline
http - Exploring Headers and Cookies from Servers
HTTP Based Network Check for Windows boxes.
HTTP basic authentication
Http client to POST using multipart/form-data
httpExists - find out whether an http reference is valid
HTTPS httplib Client Connection with Certificate Validation
Huffman coding, Encoder/Deconder
Human Population Simulator
Human readable file/memory sizes
Human readable file/memory sizes v2
Human readable format for a given time delta
Human readable output for bytes and seconds
Human verification test (captcha)
Humanize decorator
Humanized representation of a number of bytes
I download all the Python Cookbook recipes
I will download all of the recipes from the Python Cookbook, new contest
icmplib
icmplib: library for creating and reading ICMP packets
Identifying network name (CIDR) for IPv4Address
IFS fractal dimension calculation
IFS fractal dimension calculation using box counting method
IFS fractals
IFS fractals using automatic probability distribution
IFS fractals using iteration method
ilines -- universal newlines from any data source
Illustration: Writing a TappedIn.com calendar item from FeedDemon to Google Calendar
Image background for tkinter
Image Converter
Image Downloader
Image extractor
Image File Extractor
Image Projection Onto Sphere
Image Resizer
Image to ASCII Art Converter
Image Web Visor
IMAP mail server attachment handler
IMAP mailwatcher program using Tkinter
imapmethod and friends
Immutable class decorator
Immutable object(subclass)
Immutable Type Hierarchies
Implement a CORBA client and server
Implementation of sets using sorted lists
Implementation of the token bucket algorithm
Implementing "Future"s with decorators
Implementing a circular data structure using lists
Implementing an Immutable Dictionary
Implementing C function callbacks using Python
Implementing class-based callbacks in Python
Implementing function-based callbacks in Python
Implementing Java inner classes using descriptors
Implementing the make statement by hacking bytecodes
Implementing the observer pattern yet again: this time with coroutines and the with statement
import ElementTree from everywhere
import foldernames from a txt file , and take ownership over these folders and subfolder , and delete them - Windows
Import modules from a remote server.
Import modules in lambda functions
Import Modules/Discover methods from a directory name
Import of subpackages from different physical locations
import Outlook contacts using win32com
Import package modules at runtime
import_once
Importer-specific module initialization
Importing a dynamically generated module
Importing a name from a module with a computed name
Importing any file without modifying sys.path
Improve dictionary lookup performance
Improved Gray Scale Quantization
Improved range function
Improved ReportLab recipe for "page x of y"
Improved Signals/Slots implementation in Python
Improved TemporaryFile
Improvements of the urllib.URLopen.retrieve() method
In-line anonymous list comprehension functions
include function name and line number automatically in debug statements
Include python script
Inclusive regular sequences or fully closed ranges
Increment numbers in a string
Incremental PCA
Incrementing strings
indefinite currying decorator with greedy call and up front args checking
Indent a string
Indent text like email clients do
Indentable rlcompleter
Indentable rlcompleter
Index of Mc. Kynney
Indexable Generator
Indexing into XML
Indexing text files with Python
Indirect insertion of value to a list
Infinite Character Password Generator
Infinite list of primes! Yay!
Infinite Stream Divisor
Infix Expression Evaluation
Infix operators
Infix operators
Infix operators for numpy arrays
Infix~Postfix
Inherit Method Docstrings Using Only Function Decorators
Inherit method docstrings without breaking decorators or violating DRY
INI file generator
Initializing attributes to a constant value
InitReplacement
Inline GIF's with Tkinter
inline java code into jython
InMemoryZip class
Inner Join
input_demo.py
Insert a Text Box in a PDF page (fitz / PyMuPDF)
Inserting Images on PDF Pages
Inserting pages into a PDF with PyMuPDF
Inspect a PYC File
Install bound methods in an instance
installing source distributions on windows
Instant GUI compiler for testing purpose
Instantiating pickled instances transparently
Integer set type
Integer square root function
Integrating Twisted reactor with IPython
Interactive POP3 Mailbox Inspector
Interfaces
interleave bits (aka morton-ize aka z-order curve)
Interleaving file lines using iterators
Interleaving Sequences
Interpret Unicode escape escape sequences written to stdout and stderr
Interrogating linux /dev/usb/hiddev0 in python
Interruptible Queue
Intersection and union of varied form tuples/lists.
Interval
Interval Execute a function
Interval Test Case
Introspect RPM module in Python so we can work out how to use the headers
Introspecting call arguments
Inverse modulo p
InverseExtend
InverseExtendGenerators
Invert a dictionary (one-liner)
Invert a dictionary where values are lists (one-liner)
Invert CSS Hex colors
Invert the well ids from a 96-well plate
IOPS calculator
IP Address
IP address and CIDR mask conversion to network and broadcast
IP address conversion functions
IP address conversion functions with the builtin socket module
IP and MAC addresses
IPv4 address set type
IPv4Address/Network class
IPv6 Multicast
IPy Notify
IronPython fade-in window
ironpython script to Monitor Servers internal CPU temprature using WMI MSAcpi_ThermalZoneTemperature with e-mail alerting capability
IRR_Versus_NPV 2.6
Is scraping easiest with Internet Explorer on Windows?
ISBN-13 converter
IsChangedMixin - have the contents of an instance been modified?
ISIN Validator
isMoney
Item Properties
iter_except -- a useful variant of builtin.iter()
Iterate over .MP4 atoms
Iterate Over Regions in a 2D Range
Iterating Over Dates
Iterating over fixed size blocks
Iterator Algebra Implementations of Relational Join Algorithms
Iterator Merge
Iterator merge 2
Iterator Offsetter
Iterator to return items N-at-a-time
Iterator Utilities
iterator with context
iterator wrapper, allowing 'pushback' and 'nonzero' test
iTunes Alarm clock (wakeup with iTunes)
jardiff
JasperServer.cgi. It works
Java-Style Inner Classes
JavaScript code compression
JMS Topic Listener using pyactivemq
Joe Strout's chat_server.py converted into a python tutorial assignment.
Josephus problem
Journal Dictionary and Mixin for Transactions
JPG files redater by EXIF data
jpg2pdf
JSON Formatted Logging
JSON instead of pickle for memcached
JSON pretty printer
JSON RPC Server and client
Julia fractals
Just Another Password Generator
Just For Fun: Quicksort in 3 Lines
Just in time instantiation
K fold cross validation partition
K-means
Kaos Rain (MKv3)
KB Neural Data Mining - Python sources
kd-tree for nearest neighbor search in a k-dimensional space
Keep a process up and running
kexec the newest linux kernel
Key press detection for Windows text only console applications.
Keyed Dictionary -- strict key values in a dictionary
Keyword-only arguments in Python 2.x
Kids Level Analogue Data Logger, (Transient Recorder), Program.
KIndex for SOM neural networks (Python)
Knight's Tour Map using Warnsdorff's Algorithm
Knight's Tour using Warnsdorff Algorithm
Knuth-Morris-Pratt string matching
Koch Snowflake and Sierpinski Triangle Combination Fractal
Komodo Python Macro - select the current word under the cursor
KR(MKv3) - install.py
KR(MKv3) - opt.py
KR(MKv3) - uninstall.py
kth compsite number
KYSU (Keep Your Stuff Updated)
L-System Fractals
lace
lambda program
Lambert W Function
Lancos Gamma Approximation
language decorator
Language detection using character trigrams
Large File Sizes on 32 bit Windows
Last Login Record Extraction
late-binding properties: allowing subclasses to override getters and setters
LaTeX codec
Latin1 to ASCII -- The UNICODE Hammer
Latitude/longitude/map web-fetcher
Lattice Multiplication
Launch a program based on file extension
Launch virtualbox with emulated USB microphones
Launching a subprocess without a console window
lazy attributes
lazy DSU
Lazy Dynamic Binding on Classes (You'll Never Go Back)
Lazy Lists
Lazy Lists for python 2.5
Lazy Load Object Proxying
Lazy module imports
lazy ordered unique elements from an iterator
lazy property
Lazy property evaluation
Lazy sorting
Lazy streams using generators
Lazy Traversal of Directed Graphs
Lazy, recursive generator function
LazyDB
LazyGettext
lcm.py
LD50 and LD90 Calculation
Learning to calculate (mental arithmetic)
least square fitting
Lecture 1: Applications of Python in Bioinformatics: Visualizing Protein
Left-handed password generator
Lego Mindstorms Bluetooth interface
Length-limited O(1) LRU Cache implementation
Levenshtein, my love
Levenshtein-Distance
lexical variables in with-statement
Libgen Epub Upload using Tor
Libreenect (OpenKinect) Minimum Value Joystick With Display - Kinect Demo Using OpenKinect SDK
Lightweight Unittester
Lightweight Unittester
Lightweight XML constructor and reader
lin2win.py (version 2)
Line Of Code Counter
Line Oriented State Machine
Line-based side-by-side diff
Line-oriented processing in Python from command line (like AWK)
Linear equations solver in 3 lines
Linear equations solver in 3 lines
linecount.py
linecount.py
linenum.py
Lines Of Code (LOC)
Linux cat command backward
Linux ioctl numbers in Python
Linux Terminal Color Setter
Linux to Windows
list all locale
List all Type 1 Cyrillic fonts to one PDF file
List and dictionary observer
List classes, methods and functions in a module
List comparison, difference and more using set & frozenset
List comprehensions for database requests
List information about installed Python packages and modules
List iterator with advance() and regress().
List mixin
List MySql databases in a Gtk.TreeView
list of all combination from multiple lists
List of datasets in SPSS
list permutation order indices
List System Process and Process Information on win32
List Tools
List Tools
list type operations on strings-tuple
List with fast membership test (contains)
List wrapper for generators (indexable, subscriptable)
List/Generator Monad Combinators
Listenable Sets
Lister
Listing the package/patches dependencies of a binary on Solaris
Listparse
ListPopulatedFeatures&Tables.py
Liturgical Calendar Year class
Live Object Browser
ljopml.py
lndir.py (short python version of the BSD/X11 lndir utility)
Load data in a web browser without using temp files
Load Runner for the Console
Loading c extensions from a repository build area
Locate and import Python's standard regression tests
Locate and see the biggest cross in a random matrix
Locate thumbnail file
Locating files throughout a directory tree
Lock NT via screensaver
lockfile and directory module
locust_fetchmail draft
locust_fetchmail draft
locust_fetchmail draft
Log watcher (tail -F *.log)
Logfile.py - A Singleton log file creator
Logging asserts
Logging only new messages while keeping user aware of progress
Logging SimpleXMLRPCServer
logging support for python daemon
Logging to a Jabber account
Logging to console .. without surprises
LoggingWebMonitor - a central logging server and monitor.
Login Logger
Logistic Map Fractal
Logpyl - basic logfile objects for Python
Long period random number generator
Long processing computation in Tkinter or long-running task
Longest common subsequence of 3+ strings
Longest common subsequence problem solver
longest common substring
look ahead one item during iteration
Loop over and descend into sequences in a recursion-proof way
Looping through multiple lists
Loose Coupling
Lorenz Attractor
Low level inotify wrapper
Low resource Win32 splashscreen
Low-impact script timing
Lowering the first word in a CamelCase Word
lpr-based printer module for *nix
lreplace() and rreplace(): Replace the beginning and ends of a strings
LRU and LFU cache decorators
LRU dictionary
LRU dictionary
lru_timestamp - cache entry aging for functools.lru_cache
LRUCache - A cache of the last recently used items
Luhn test for credit card numbers
LXML Etree XML Object to basic Python {dict+lists}
LZ77 compression
M2Crypto-compatible root certificate list generator
mac address from ip address
Maclaurin's_series_binomial_series
Maclaurin's_series_cos
Maclaurin's_series_cos(2x)
Maclaurin's_series_cosh
Maclaurin's_series_cosh-1(x)
Maclaurin's_series_cos² (x)
Maclaurin's_series_exponential(x)
Maclaurin's_series_function(1/1-x)
Maclaurin's_series_function(1/1-x²)
Maclaurin's_series_ln(1+x)
Maclaurin's_series_ln(x)
Maclaurin's_series_ln(x)_decimal_module_version
Maclaurin's_series_sin
Maclaurin's_series_sinh
Maclaurin's_series_sinh-1(x)
Maclaurin's_series_tan-1
Maclaurin's_series_tanh-1(x)
mad debugging using builtin
Maintenance free Factory design pattern
Make a Class Available in its Own Definition Body!
Make a Class's Name Available in its Definition Body
Make an XML-RPC method call
make dictproxy object via ctypes.pythonapi and type()
make ranges of contiguous numbers from a list of integers
make some file named year+month+day
Make the New Class Available During the Execution of its Body
Make unique file name
makeExe.py
Makes html with javascript to animate a sequence of images
Making self implicit in objects
Making telephone calls from your python program using Voicent Gateway
Manage environment variables on Windows
Manage hashes in database files.
Manage hashes in database files.
Managing thread lifetime
Managment command to deploy a Django project
Mandelbrot Fractal image output to ppm file
Mandelbrot fractal using PIL
Mandelbrot Fractal using Tkinter
Mandelbrot Set made simple
Mandelbrot trajectories
Mandelbrot/Frame Binary Fractal Trees
Mandelbulb Fractal
Manga Downloader
Manipulate Mac OS clipboard
Manipulate simple polynomials in Python
Manipulating infinite lists implemented as generators
Manipulating Windows Services
Map
map_longest and map_strict
MAPI Send
Mapping arbitrary objects to a PostgreSQL database with psycopg2
Mark's Game
Markov Encryption Demonstration 1
Markov Encryption Demonstration 2
Markov Encryption Module
Markov Encryption Module (for Python 2.5)
MarkupString
Marshal unicode strings with PyXML
Marshalling Complex Data Types
Marshalling Python Data into Javascript
Martin Gardner's "The Monkey and the Coconuts" Problem
Mass image resizing (with progress bar and details in console)
Mastermind-style code-breaking
Mathematica with a GNU readline input
Matlab code for displaying 'struct' details
Matlab-like 'spy' and 'pcolor' functions
Matrix vector multiplication
Maximum cardinality matching in general graphs
Maybe pattern
Maze generator
Mazovia encoding for Polish text from MS-DOS era
mbsa2txt
McCarthy's amb operator in Python
MD5 Hash Cracker/Solver
md5diff - md5 files diff'ing
md5sum
Media File Renamer
Media Renamer
Memento Closure
Memento design pattern in python
Memoization with cache cleared on return of last function call
Memoize decorator function with cache size limit
Memoize decorator with O(1) length-limited LRU cache, supports mutable types
Memoize Decorator with Timeout
Memoize Generator
Memoizing (cacheing) function return values
Memory compacted list of bits
Memory usage.
Merge join for N iterators
Merge multiple (potentially infinite) sorted inputs into a single sorted output
merge multiple list into a single list eliminating the duplicates
Merge sorted sequences
Merge unique items from multiple lists into a new list
mergeable_dict
Merging sorted sequences
Merging two sorted iterators into a single iterator
Merging XBEL Bookmark files
Mersenne twister
Message Passing With Socket Datagrams
Meta programming for generating combination (anagram) of a string
METACLASS AND DEEPCOPY
Metaclass Class Policies
Metaclass for Interface Checking
Method access counter proxy
Method Caching
Method chaining or cascading
Method Enhancement
Method for constructing a dictionary without excessive quoting
Method signature checking decorators
Method signature type checking decorator for Python 3
Method signature type checking decorator for Python 3.0
Method-based URL dispatcher for the Tornado web server
Metric Prefix Symbol and Decimal Quiz
Metro Accordion for Tkinter
Metro Checkbuttons and Radiobuttons
Metro Dialog for Tkinter
Metro Listbox
Metro Spinner for Tkinter
Metro UI Tkinter
Metronome For Beginner Musicians...
Metropolis-Hastings Sampler
MicroXml: Stand-alone library for basic XML features
Midpoint of two GPS points
Migrate your Windows login scripts to Python
Miller-Rabin Primality Test
min and max with key= argument
min/max "peaks" with Numeric
MineSweep
Mini Fake DNS server
Mini-commands using subprocess
Minimal console python
Minimal Dependency Injection Container
Minimal http upload cgi
Minimalistic Memoization
Minimalistic PostgreSQL console shell
Minimalistic Word Wrap using Regex
Minimum Cut Solver
Misspell words to avoid detection
Mix'n'matching
Mixin and Overlay
Mixin for pickling objects with slots
Mixing features of "tree" and of "md5sum" : tree_md5 :)
Mixins by Inheritance vs. by Decorator...Let's Try Decorators
Mixins for equality, rich comparisons and hashing
mixins for proxy construction...
modal wxPython with Twisted for XML-RPC
model teste
Modfying a local dict
Modified os.walk which return current directory depth
Modify class method in-place
Modifying (upgrading) pickles without instantiating real app objects
Module For Running Simple Proxies
module mixins
Module to allow Asynchronous subprocess use on Windows and Posix platforms
Monday of first week per year (not first Monday)
Money Game
MongoDB Pool for gevent and pymongo packages
Monitor Progress of File Descriptors of Another Process
Monkey-patch execnet with more ssh settings, port, identity file, non-interactive
Monotonic local time. And sandwich.
Monte Carlo Engine : How to find the optimised wager for next bet, following a recent loss.
Monte Carlo Engine : Simple Head Tail Model
Monte Carlo Engine : Stochastic Interest Rate Predictor
monty hall problem
More accurate sum
More strict unittests using a validator
Morse Code
Morse Code Generator in Python
mouse click to crop many large photos quickly [Python, PIL, pygame]
Mousewheel binding to scrolling area Tkinter (multiplatform)
Move files with rename if required
Move Firefly/Trac wiki pages
Mr
MS Explorer Favorites to HTML
MS SQL Server Database Mover
MS SQL Server log monitor
MSCS Microsoft Cluster Services Detection
msoffice2ps - a Microsoft Office to Postscript converter
mthread.py
mthread.py (version 2)
Multi threaded SMTP proxy
Multi-line string block formatting
Multi-Regex: Single pass replace of multiple regexes
multi-replace
Multi-segment Fast File Downloader
Multi-threaded Mandelbrot Fractal
multi_cmp
Multicasting on objects
Multicontext (e.g. asynchronous) inline execution framework using coroutines
Multidimensional list
Multidimensional Pareto front
MultiListbox Tkinter widget
MultiListbox Tkinter widget
Multimap: Associating multiple values to a key.
Multiplatform compability
Multiple handlers for xml.sax parser
Multiple replace in a string
Multiple unique class instances - a tentative design pattern
Multiple-reader-one-writer (MROW) resource locking
Multiplication Table
Multiplication table
Multiprocess-safe logging file-handler + interprocess RLock
Multiprocessing import wrapper
MultiSided Dice Roller DSL
MultiThread support for SQLite access.
Multithreaded FIFO Gate
Multithreaded Multiplexer/Demultiplexer to allow multiple transactions to be performed in parallel on a single channel
Multithreading Downloader Class
Music Downloader
Music Downloader with Wx GUI!
music module
My first application server
My First Poem Written in Python
my homework
myspace profile parser
MySQL and accessing database results by field
MySQL-based forum functions

Clone this wiki locally