Utility library. IO, maths, randomizations, misc.
Project description
File handling, maths, randomization, miscellaneous.
INCLUDING:
* general maths (most functions support both scalars and list/array-likes)
** factorials
** fast sum of series 1,2,3,4,5 ... N
** number of sequences of N size taken from a set of K size
** number of places a sequence of length N can be subdivided
** round N to nearest power of B
** convert a power of B, N, to an exponent of B, such that B**E == N
** find common denominator
** find all integers that divide evenly into N
** linear/spline interpolation of a 1d series of values
** binary representation of a number
* spatial maths
** subclassable Grid type
** grid snapping and 'is-in-cell'
** polar/cartesian transform
** polar distance
** calculate triple of weights based on position in triangle
* randomization
** return true P% of the time
** weighted sampling from a set of items
** fill weighted boxes in a roughly even way
** randomly dispense contents of a box
** convert nested percentage weights to flat 0..1 weights
** dice roll (single, and iterative/infinite)
** chain iterator, which yields values while percentage chance of success
rolls succeed, and stops as soon as they fail.
Like OHRRPGCE 'chain attack/ chain %' option
* misc
** find numeric limits of data types (builtin types or simple numpy types)
** sort sequence according to template
** reverse of zip (flat sequence a,b,c,a,b,c,a,b,c -> a,b,c tuples)
** easily read every line or every byte of a file
** calculate minimum number of bits required to store a given integer.
** quickly set multiple attributes on an object
** Metadata class for easy management of metadata,
with yaml serialization support.
also available through git. run 'git clone git://repo.or.cz/pyion.git' to grab a copy :)
INCLUDING:
* general maths (most functions support both scalars and list/array-likes)
** factorials
** fast sum of series 1,2,3,4,5 ... N
** number of sequences of N size taken from a set of K size
** number of places a sequence of length N can be subdivided
** round N to nearest power of B
** convert a power of B, N, to an exponent of B, such that B**E == N
** find common denominator
** find all integers that divide evenly into N
** linear/spline interpolation of a 1d series of values
** binary representation of a number
* spatial maths
** subclassable Grid type
** grid snapping and 'is-in-cell'
** polar/cartesian transform
** polar distance
** calculate triple of weights based on position in triangle
* randomization
** return true P% of the time
** weighted sampling from a set of items
** fill weighted boxes in a roughly even way
** randomly dispense contents of a box
** convert nested percentage weights to flat 0..1 weights
** dice roll (single, and iterative/infinite)
** chain iterator, which yields values while percentage chance of success
rolls succeed, and stops as soon as they fail.
Like OHRRPGCE 'chain attack/ chain %' option
* misc
** find numeric limits of data types (builtin types or simple numpy types)
** sort sequence according to template
** reverse of zip (flat sequence a,b,c,a,b,c,a,b,c -> a,b,c tuples)
** easily read every line or every byte of a file
** calculate minimum number of bits required to store a given integer.
** quickly set multiple attributes on an object
** Metadata class for easy management of metadata,
with yaml serialization support.
also available through git. run 'git clone git://repo.or.cz/pyion.git' to grab a copy :)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyion-0.02dev.tar.gz
(171.5 kB
view details)
File details
Details for the file pyion-0.02dev.tar.gz.
File metadata
- Download URL: pyion-0.02dev.tar.gz
- Upload date:
- Size: 171.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f0b85d47927e9fdc5aab342eec832a1e1b30ce643621de6de3bac568bee5fc4
|
|
| MD5 |
6e6e9ff9571ef6ca22279d0f54f7bcaa
|
|
| BLAKE2b-256 |
4c6267329aa09d05acb2859a55d011878f198476a6f9f97274181d1108a20b81
|