Skip to main content

A pseudo-random data sampler

Project description


Inplementation of pseudo-random sampling from a


pip3 install prsample


pip3 install --user prsample

Example usage

The minimum required to

class Example():
    def __init__(self, ... ):
    	# State to describe an example

    def __hash__(self): 
        return super.__hash__((self.class_a, self.a, self.class_b, self.b))

    def __str__(self): 
        return str(self.class_a)  + '(' + str(self.a) + ') ' + str(self.class_b) + '(' +str(self.b) + ')'

    def is_valid(self, class_list):
    	# Optional checks go here
        return True

    def get(self):
        return (self.class_a, self.a, self.class_b, self.b)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for prsample, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size prsample-0.0.5-py3-none-any.whl (7.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size prsample-0.0.5.tar.gz (6.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page