pyguymer3¶
A Python module containing a bunch of random functions that I have written over
the years. If you want to use some of these functions directly from the command
line then you can run python3.12 -m pyguymer3 --help to see what is
available.
Notes
Copyright 2017 Thomas Guymer [1]
References
Modules
|
Check a Sudoku board is valid |
|
Convert a value of bytes to a pretty value of bytes with some units |
|
Convert a pretty string of a bytes with some units to a value of bytes |
|
Convert a value of seconds to a pretty value of time |
|
Convert an Excel spreadsheet date to a timezone-aware |
|
Convert an Excel spreadsheet date to an UNIX timestamp |
|
Call a URL and return the response |
|
GET a URL and save the content in a file |
|
HEAD a URL and return the headers |
|
GET a URL and return the binary stream |
|
GET a URL and return the text |
|
Convert a XML element into a Python dictionary |
A Python sub-module containing a bunch of random functions that I have written over the years in FORTRAN to be called from Python using f2py. |
|
|
Return a recursive list of file names in a directory that match a basename. |
|
|
|
|
A Python sub-module containing a bunch of random geo-related functions that I have written over the years. |
|
|
Get the access time of a file as a timezone-aware |
|
Get the creation time of a file as a timezone-aware datetime object. |
|
Get the modification time of a file as a timezone-aware datetime object. |
|
|
|
|
|
|
|
Compress a file using "gzip". |
|
|
A Python sub-module containing a bunch of random image-related functions that I have written over the years. |
|
|
This function extrapolates/interpolates a line segment (defined by two points). |
|
This function finds the intersection of two line segments (defined by four points). |
|
Make a path safe for using on a filesystem. |
|
Find the arithmetic mean of an array. |
A Python sub-module containing a bunch of random media-related functions that I have written over the years. |
|
|
|
|
Get the current date and time as a timezone-aware |
A Python sub-module containing functions relating to`OpenStreetMap [2]_. |
|
A Python sub-module containing functions relating to the OS Terrain 50 dataset [2]_. |
|
|
Set permissions within a path. |
|
Remove directories which are almost empty. |
|
Return a recursive list of file names in a directory. |
|
Return a recursive list of folder names in a directory. |
|
Return the total size of all files in a directory. |
|
Return a recursive list of link names in a directory. |
|
Save a file. |
|
Serialize an object into an intrinsic type |
|
Find the SHA-256 hash of a file |
|
Find the SHA-256 hash of a GZ file |
|
Find the SHA-256 hash of a MP4 file |
|
Find the SHA-512 hash of a file |
|
Find the SHA-512 hash of a GZ file |
|
Find the SHA-512 hash of a MP4 file |
|
This function aims to mimic os.stat() but instead of returning a stat_result object with attributes it returns a dictionary with keys (for more user- friendly serialization to JSON). |
|
Find the standard deviation of an array. |
|
Find the standard error of an array. |
|
Create a PAX formatted TAR file (without any frills or size limits). |
|
Find the variance of an array. |
|
Compress a file using "xz" (with SHA-256 integrity checks). |