Saravanan666/pypi-org huggingface dataset:
Package: randimage
randimage - create random images in pythonThis package comes out of frustration: I could not find a simple way to generate random profile pictures for users of my appriffandmatch.Now it's as simple asfrom randimage import get_random_image, show_array
img_size = (128,128)
img = get_random_image(img_size)  #returns numpy array
show_array(img) #shows the imageTo save the image you can usematplotlib:import matplotlib
matplotlib.image.imsave("randimage.png", img)Inexamples.pyyou can find slightly more detailed code showing for example how to manually choose and combine the masks and path finding procedures.Installationpip install randimageHow it worksYou can readthis poston my blog for a full explanation of how the procedure works.The basic idea is to generate a random region-filling path for the image, then pick a colormap frommatplotliband use it to progressively color the pixels in the image as ordered by the path.To generate the path we start from a random gray-valued mask (of which you can find several examples inmasks.py) of the same size of the final image and apply to it either the EPWT (Easy Path Wavelet Transform)[1]path-finding procedure or a novel probabilistic path finding.In both cases the starting point is chosen randomly and for each point a neigborhood is considered, which does not include points that are already part of the path. For the EPWT, each subsequent point in the path is chosen in this neighborhood as the one whose gray value is closest in absolute value to the current point. For the probabilistic path instead, a random point in the neighborhood is chosen using the gray values as probability weights.In the future I would like to try and use the path finding procedure of the RBEPWT (Region Based Easy Path Wavelet Transform)[2]and experiment with rule-basedcellular automatato construct paths with greater self-similarity.[1]Gerlind Plonka.The easy path wavelet transform: A new adaptive wavelet transform for sparse representation of two-dimensional data.Multiscale
Modeling & Simulation, 7(3):1474–1496, 2008.[2]Budinich, R. (2017).A region-based easy-path wavelet transform for sparse image representation.International Journal of Wavelets, Multiresolution and Information Processing,15(05), 1750045.
Package: randiter
randiterranditerrandomly iterates a sequence with buffered shuffling.randiteris suitable for shuffling very long sequences and sequences with an unknown length.UsageShuffle a very long sequence:fromranditerimportranditerforindexinranditer(range(1_000_000_000)):print(index)# random numberShuffle lines in a text file with an unknown length:fromranditerimportranditerwithopen("large.txt","rt")asf:forlineinranditer(f):print(line)# random lineShuffle a sequence with a large buffer size (to perform perfect shuffling, specify a buffer size that is equal to or greater than the length of the given sequence):fromranditerimportranditerforindexinranditer(range(1_000_000_000),buffer_size=1_000_000):print(index)# random numberFAQQ. Shuffled sequences are not completely shuffled.A. This is becauseranditerperformsbufferedshuffling. This problem can be mitigated by specifying a larger buffer size.
Package: randluck
🤞 Random LuckDeep learning is acturally the alchemy.This repo provides a package to automatically select a random seed based on ancient Chinese Xuanxue.Good luck and best wishes!🚀QuickStart# installation$pipinstallgit+https://github.com/Spico197/random-luck.git# usage$python
>>>importrandluck
>>>random_seed=randluck.get_random_seed(strategy="bazi")>>>print(random_seed)1234>>>fromdatetimeimportdatetime# be sure to use the UTC time, and the offset is calculated automatically in the background>>>random_seed=randuck.get_random_seed(utc_datetime=datetime.utcnow(),strategy="bazi")>>>print(random_seed)1234>>>random_seed=randuck.get_random_seed(utc_datetime=datetime.date(year=1997,month=1,day=1),strategy="lucky_num_by_year")>>>print(random_seed)5430📐Strategies & PrinciplesRandom seed is selected by the time that experiments starts.UTC datetime is first converted to Chinese time (UTC+8), and then the datetime is converted to Chinese Lunar calendar to calculate the suitable random seed.Here are different strategies this repo contains.
New strategies may be updated in the future.baziGanzhi number converted from Lunar datetimelucky_num_by_yearCalculate your lucky number by your birth date🤝ContributionsBug reports and patch PRs are welcome, please open an issue directly.New strategies are welcome, please open an issue first providing the strategy details and new ideas, then make a PR.Tarot cards and constellation strategies are welcome, but I'm not familiar with them, please open new issues to discuss if it is OK to make a PR.🔑LicenseThis repo is under the MIT license.
Package: randmac
randmac.pya utility that generates 12-digit mac addresses; either the NIC portion or full 12-digit MAC.the optional-fargument will return a random 12-digit MAC address that can be identified by the locally administrated address (LAA) format. This means you will always seex2,x6,xA, orxEat the beginning of a MAC address generated by randmac.installationto install with pip:pip install randmacrequirementsPython >3.2 required.mac address formatsSupported MAC address formats:MM:MM:MM:SS:SS:SSMM-MM-MM-SS-SS-SSMM.MM.MM.SS.SS.SSMMMM.MMSS.SSSSMMMMMMSSSSSSwhereMstands for the manufacturer or vendor, andSstands for the NIC specific portion.usageyou canfrom randmac import RandMacand use it likeRandMac().if you wish to change the mac address format. provide a sample mac sorandmacknows what the output format should be.you canfrom randmac import RandMacand use it likeRandMac("0000.0000.0000").from a terminal (if the the console scripts entry pointrandmacis in your path and executable) you can userandmacto get a generate a new 12-digit LAA address, orrandmac 00:00:00:00:00:00 -pto generate a MAC with the same OUI, but a different NIC portion.example usage>>> from randmac import RandMac
>>> RandMac()
'a6:9b:6b:8e:b3:42'
>>> RandMac("00:00:00:00:00:00", True)
'00:00:00:3f:8a:06'
>>> RandMac("0000:0000:0000", True)
'0000007ce662'
>>> RandMac("0000:0000:0000")
'06eb4584d1e3'or> randmac
fa:bf:7c:5d:65:3e
> randmac 00-00-00-00-00-00 -p
00-00-00-dd-5f-16licenselicense can be foundhere.
Package: rand-number-gen
Random Number Packagerandom number generatorThis module implement random number from the specified distribution.Real-valued distributionsThe following functions generate specific real-valued distributions. Function parameters are named after the corresponding variables in the distributionâ€™s equation.uniform(size)Return the 'size random floating point numbers in the range [0.0, 1.0).gaussian(size)binomial(trials,probability,size)return samples from a binomial distribution, where each sample is equal to the number of successes over the n trials.chisquare(df,size)return samples from a chi-square distribution.
Parameters:a.  df : int or array_like of ints;Number of degrees of freedom.
b.  size : int or tuple of ints, Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. If size is                  None (default), a single value is returned if df is a scalar. Otherwise, np.array(df).size samples are drawn.weibull(size)
return  samples from a Weibull distribution.
Parameters:
a : float or array_like of floats
Shape of the distribution. Should be greater than zero.
size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. If size is None (default), a single value is returned if a is a scalar. Otherwise, np.array(a).size samples are drawn.exponential(scale,size)
return samples from an exponential distribution.
Parameters:
scale : float or array_like of floats
The scale parameter, \beta = 1/\lambda.
size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. If size is None (default), a single value is returned if scale is a scalar. Otherwise, np.array(scale).size samples are drawn.poisson(lam,size)
return samples from a poisson distribution.
Parameters:
lam : float or array_like of floats
Expectation of interval, should be >= 0. A sequence of expectation intervals must be broadcastable over the requested size.
size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. If size is None (default), a single value is returned if lam is a scalar. Otherwise, np.array(lam).size samples are drawn.
Package: randoalgo-rjay
Rando ALgoA python package that allows users to get random algorithm questions to practice.UsageTo use Rando Algo, user can install it as a pypi package.To install this package go toalt='Link to RandoAlgo package.
You can also run pip install randoalgo-rjay on your command line.To use app on Commandline, enterRandoAlgoUsers must have request and beautifulsoup4 libraries installed to use appUsers have to have login and enter in a password, after this they can now enter a number to practice algorithm questions.User can play as many times as they want to but if they no longer wish to continue, they can exit.
Package: randoalgo-rjm
Rando ALgoA python package that allows users to get random algorithm questions to practice.UsageTo use Rando Algo, user can install it as a pypi package.To install this package go toalt='Link to RandoAlgo package.
You can also run pip install randoalgo-rjm on your command line.To use app on Commandline, enterRandAlgoUsers must have request and beautifulsoup4 libraries installed to use appUsers have to have login and enter in a password, after this they can now enter a number to practice algorithm questions.User can play as many times as they want to but if they no longer wish to continue, they can exit.
Package: randog
randog 0.14.0 — Randomly object generatorrandogis a package which helps to generate data randomly.InstallYou can install from PyPI.pipinstall-UrandogUsageFor example:importuuidimportrandog.factoryfactory=randog.factory.from_example({"uuid":uuid.uuid4,"name":"","age":20})generated=factory.next()assertisinstance(generated,dict)assertisinstance(generated["uuid"],uuid.UUID)assertisinstance(generated["name"],str)assertisinstance(generated["age"],int)See thedocumentationfor more details.Types that can be generatedint, float, str, etc.tuple,list,dictdatetime, date, time, timedelta(Experimental feature)Model instance of SQLAlchemy
Package: random2
CHANGES1.0.2 (2023-12-18)Change support to Python 3.10, 3.11, 3.12, and 3.13 only.1.0.1 (2013-03-15)Fix setup.py so that an install of the package will actually work.1.0.0 (2013-03-06)Initial PyPI release.Random 2This package provides a Python 3 ported version of Python 2.7’srandommodule. It has also been back-ported to work in Python 2.6.In Python 3, the implementation ofrandrange()was changed, so that even
with the same seed you get different sequences in Python 2 and 3. Note that
several high-level functions such asrandint()andchoice()userandrange().In my testing code I heavily rely on stable random generator results and it
makes porting code to Python 3 a lot harder, if all those tests have to be
adjusted. This package fixes that.
Package: random-access-file-reader
This is a small library that allows for reading any given line in a file without having to read all the lines before it
or load the entire file into memory.  Only the line indexes and lengths are held in memory, which enables random
access even on very large files for a very minuscule memory cost.Installationpip installrandom-access-file-readerUsageUsage is very straightforward, and standard csv line endings (newline character), value delimiter (comma), and
quotation character (double quote) are the defaults.  These can be changed in the constructor.Theget_line()andget_line_dicts()methods return a list of rows.Plain text file example:from randomAccessReader import RandomAccessReader

reader = RandomAccessReader('~/myfile.txt')

# single line
line = reader.get_lines(2)[0]
print line

# multiple lines
lines = reader.get_lines(3, 3)
for l in lines:
    print lOptional arguments in the constructor:
-endline_character- self-explanatory (default is endline character\\n)
-ignore_blank_lines- if set toTrue, blank lines in the file will not be read or indexed (default isFalse)Csv example:from randomAccessReader import CsvRandomAccessReader
reader = CsvRandomAccessReader('~/myfile.csv')

# single line
line = reader.get_line_dicts(5)[0]
for x in line:
    print x + " = " line[x]

# multiple lines
lines = reader.get_line_dicts(6, 6)
for l in lines:
    for x in l:
        print x + " = " l[x]Optional arguments in the constructor:
-endline_character- self-explanatory (default is endline character\\n)
-ignore_blank_lines- if set toTrue, blank lines in the file will not be read or indexed (default isTrue)
-values_delimiter- character used by the csv to separate values within a line (default is,)
-quotechar- character used by the csv to surround values that contain the value delimiting character (default is")
-ignore_corrupt- if set toTrue, lines with an invalid length will return blank instead of raising an exception (default isFalse)
Package: random-access-machine
random-access-machineRandom Access Machine implemented in python.RAM is an abstract machine that is turing complete and can compute any partial recursive function. Find out more herehttps://en.wikipedia.org/wiki/Random-access_machineIts more advanced brother is called While Machine and you can find its implementation herehttps://github.com/GabrieleMaurina/while-machineInstallRun inside terminal:python -m pip install random-access-machineUsageTo execute a ram source file:python -m ram <ram source file> <integer input>To import it in your script:fromramimportRAMdata=4program='inc 0'ram=RAM()result=ram.compute(program,data)print(result)# 1How it worksA ram machine has infinite registers numbered from 0, 1, 2..., the input is loaded on register 1 before the execution starts, the output is taken from register 0 when the execution ends.Instructions:A ram machine supports only 3 basic instructions:Increment register k by 1:inc kDecrement register k by 1:dec kJump to instruction i if register k is zero:jz k iExampleAn example program that will double whatever input you give to the machine:jz 1 6
inc 0
inc 0
dec 1
jz 2 1
dec 1Compile WhileIt is possible to compile a While program into a Ram program using the method compile_ram of the class WhileMachine. You can find an implementation of the while machine herehttps://github.com/GabrieleMaurina/while-machine
Package: randomapi
randomapiPython implementation of the RANDOM.org JSON-RPC API:http://api.random.org/json-rpc/2/RANDOM.org generates true random numbers using a seed based on atmospheric radio noise. This is useful for applications where pseudo-random generators are not good enough, such as cryptography.FeaturesImplements all basic methods and signed methodsDownloads random data over a 4096-bit SSL connectionRespects advisory delay requests from the serverHas no external dependenciesOptional: Verifies signed data with RANDOM.org, using SHA-512 hashes to ensure that it's legitimateRequirementsPython 2.6 or higher, or 3.6 or higherAn API key from:http://api.random.orgExample UsagefromrandomapiimportRandomJSONRPC# Returns a list of 5 true random numbers between 0 and 10random_client=RandomJSONRPC(api_key)# Requires a valid API keynums=random_client.generate_integers(n=5,min=0,max=10).parse()
Package: randomart
randomart.pyA script to present BLAKE2b hashes as small ASCII-art pictures, similarly to OpenSSH'srandomart.This allows easier verification by humans but may not be as secure as a bytewise comparison of the
digest!See the paper [Hash Visualization: a New Technique to improve Real-World Security1][^1]
for more information on the concept of random art.The paper [The drunken bishop: An analysis of the OpenSSH fingerprint visualization
algorithm2][^2] analyses the OpenSSH implementation in more detail.It should be explicitly noted that my algorithm issimilarbut notidenticalto the "drunken
bishop" walk of the OpenSSH implementation. The implementation at hand:flips sides at the borders, which turns the field into a torusmoves in all possible directions with distance 1, not only diagonallydoes not mark start (S) and end (E) and uses a different character paletteI have not performed any similar analysis[2][^2] but would expect my implementation to
perform no worse.installationInstall with pip directly from GitHub:pip install git+https://github.com/ansemjo/randomartusageThe script expects a file in the first positional argument or otherwise simply reads from standard
input. It is thus best suitable for usage in a pipe:echo 'Hello, World!' | randomart.pyThere are two flags to control the output:--asciiuse only ASCII characters for the box frame--hash- print the computed digest before the randomart pictureOtherwise userandomart.py --helpfor usage help.as a libraryIf you want to use your own hash you can import fromrandom_art.randomart:fromrandom_art.randomartimportdraw,drunkenwalk...# generate your hash digestdigest=...# generate randomart, HASHNAME must be 10 charactersart=draw(drunkenwalk(digest),HASHNAME)print(art)[^1]:http://www.ece.cmu.edu/~adrian/projects/validation/validation.pdf"Perrig A. and Song D., 1999,
International Workshop on Cryptographic Techniques and E-Commerce (CrypTEC '99)"[^2]:http://www.dirk-loss.de/sshvis/drunken_bishop.pdf"Dirk Loss, Tobias Limmer, Alexander von
Gernler, 2009"
Package: rand-omata
This Project is being made for the sole purpose of generating random data for matrices !
I have tried this as a simple project to boost my moral and give me the little bit of dopemine which i have been waiting from the start of the project !!!
I hope somebody will stumbe upon this liberary and use it for their own project !
I can only hope !Change Log0.3.3 (07/08/2023)-Third Release
-After so many uploads
-I hope it works !
Package: random-audio
random_audioA Python CLI tool to generate a mash-up of audio clips. An excellent use case is when you have potentially embarassing audio clips of your friends and you'd like to embarass them further.InstallationRunpip install random_audio.Usageusage: random_audio [-h] [-s A B] [-n N] [-o O] [-v] directory

Make a randomized mash-up of audio clips.

positional arguments:
  directory   Directory to read audio files from, must contain only the audio
              files.

optional arguments:
  -h, --help  show this help message and exit
  -s A B      Each clip is speeded up X times, where X is A random number
              between A and B. A and B must be greater than 1, and A less than
              B. Omit this option to have all clips play at normal speed.
              (default: None)
  -n N        Number of times a random clip is picked and added to the mash-
              up. (default: 15)
  -o O        Name of output file. (default: output.mp3)
  -v          Enable verbose mode. (default: False)Example UsageAll audio clips are in a folderaudio/in the current directory, we want to output tomasterpiece.mp3and want our clips to be speeded up by a factor in the range 2-3:random_audio -s 2 3 -o masterpiece.mp3 audio/
Package: random-brain
Random-brainAboutRandom brain is the neural network implementation of a random forest. Its purpose is to combine the strengths of multiple nerual networks.Background on random forestsA random forest is a machine learning model that is composed of multiple decision trees. These trees in the forest all predict an outcome and the majority rules.SimilaritiesJust as the random forest is a vote based ML algorithm, the random brain is a vote based algorithm as well, but uses neural networks specified by the user rather than decision forests.Setting up Random brainpip install random-brainAPIInit the brain module and class.from random_brain import random_brain
brain = random_brain.random_brain()import models()Import models will take in a directory or a single .h5 file. Sub directories will be ignored.brain.import_models(model_path = 'path/to/model.h5')
brain.import_models(model_path = 'path/to/directory')show_brain()Shows the keys used in the brain. This should just be the name of each imported modelbrain.show_brain()clear_brain()Clear a single model or more by entering in the model name as a list. Leave blank to clear all models.brain.clear_brain(item_list = ['model to remove'])voteAdd in yTest to cast votes. Vote() will only return the votes as a numpy array and not actual predictions. This is useful if you want to run your own statistics on the votes.brain.vote(yTest = [1, 2, 3, 4, ...])predict (in development)Add in your yTest to make predictions. This will attempt to make a prediction based off of the networks and will return a single answer. This is still in development.In the future prediction and threading options will be added and improved.brain.predict(yTest = [1, 2, 3, 4, ...])
Package: random-cat
# random-catrandom-cat is a amazing modul to get cat images. This Project won't beposible without the great Cat API (http://thecatapi.com).## Big Thanks to the great Cat APIGo and visit [http://thecatapi.com](http://thecatapi.com)![alt text](http://thecatapi.com/api/images/get?type=gif "See? amazing!")**Python 2 and 3 compatible**## InstallationInstall through **pip**.```$ pip install random-cat```or get from source```$ git clone https://github.com/gravmatt/random-cat$ cd random-cat$ python setup.py install```## UsageThe cat module has just one function **getCat()** with three optional arguments.### Arguments**directory** - default is the current directory**filename** - default is a unique id**format** - default is _png_. optional _png_, _jpg_ and _gif_ is available```import cat# cat.getCat(directory=None, filename=None, format='png')cat.getCat(directory='/users/tor', filename='cat', format='gif')# /users/tor/cat.gif```The function return the image name (absolute path if directory is specified) of the image.### Command LineYou can also request an image on the terminal.```$ randomcat [format] [file]# Example:$ randomcat gif /users/tor/cat.gif```The two arguments _format_ and _file_ are optional.You can select the formats _png_, _jpg_ or _gif_.The command return the filename/absolute path of the image to the standard output (stdout).### LicenceThe MIT License (MIT)
Package: randomcatimage
This module is a re-creation ofrandom-cat. It isn't working! It displays HTTP 403 error!DO NOT DOWNLOAD IT!Download this instead. This module same uses Cat API. (https://thecatapi.com)InstallationInstall throughpip.pip install randomcatimageUsageThe module has just one functiongetCat()with one argument.pngis default.mime:pngjpggifDemoimport randomcatimage as cat

cat.getCat('png')The function return the image link.
Package: randomcharactergenerator
Random Character GeneratorAbout the PackageThe random character generator is a library used to generate strings with random letters/numbersCurrent version: 0.0.5InstallationYou can install this module usingPyPIpip install randomcharactergeneratororpython3 -m pip install -U randomcharactergeneratorUsage# For a random string consisting of both numbers and alphabetsimportrandomcharactergeneratorstring=randomcharactergenerator.rand_code()print(string)# For a random string consisting of alphabets onlyimportrandomcharactergeneratorstring=randomcharactergenerator.alphabet_code()print(string)# For a random string consisting of numbers onlyimportrandomcharactergeneratorstring=randomcharactergenerator.number_code()print(string)# You can also choose to specify the number of charactersimportrandomcharactergeneratorstring=randomcharactergenerator.rand_code(7)print(string)# Notes: Default number of characters is 5.# Warning: The 'characters' parameter must be an int only.For more help, use the module_help() functionimportrandomcharactergeneratorrandomcharactergenerator.module_help()GitHubhttps://github.com/SupremeCoder1707/randomcharactergeneratorCreditsAuthor: HighlyIntelligentBeing