Saravanan666/pypi-org huggingface dataset:
Package: random-geometry-points
random-geometry-pointsThis module provides classes to generate random points on geometry surfaces.
These points can then be used as test data, e.g. to simulate measurements of a measurement device.InstallationYou can install this module using pip globallypipinstallrandom-geometry-pointsor using pipenvcd<yourprojectfolder>
pipenvinstallrandom-geometry-pointsBasic UsageCurrently the geometry typesPlane,Sphereand2D Circleare supported.
You can import the geometry classes by using the following import statements.fromrandom_geometry_points.planeimportPlanefromrandom_geometry_points.sphereimportSpherefromrandom_geometry_points.circle2dimportCircle2DNow you can create an arbitrary number of random points lying on a geometry surface.# create a plane object with n = (1, 0, 0), x0 = (0, 0, 0), d = 0 and radius = 10normal_vec=(1.0,0.0,0.0)ref_point=(0.0,0.0,0.0)plane=Plane(normal_vec,0.0,ref_point,10.0)# create and print 3 random points lying on the planerandom_plane_points=plane.create_random_points(3)print(random_plane_points)# example output: [(0.0, -2.058506783308933, -5.777518695971468), (0.0, 2.501766732323411, 6.740902158795952), (0.0, 7.846400008799242, 5.304670974614023)]# create a sphere object with x = 1.0, y = -4.5, z = 3.3 and radius = 11.35sphere=Sphere(1.0,-4.5,3.3,11.35)# create and print 3 random points lying on the sphererandom_sphere_points=sphere.create_random_points(3)print(random_sphere_points)# example output: [(4.442124959724451, -1.593759345598388, -7.1176792530940025), (-7.102728837759106, -6.022944977793705, -4.500572028791214), (-10.190814503489936, -4.676727604583875, 5.1859846505890115)]# create a circle object with x = 1.0, y = -4.5 and radius = 11.35circle=Circle2D(1.0,-4.5,11.35)# create and print 3 random points lying on the circlerandom_circle_points=circle.create_random_points(3)print(random_circle_points)# example output: [(4.057509245253113, -15.430422554283604), (2.2509595260473114, 6.780851043436018), (9.330996610075898, 3.2082420488010035)]DocumentationPlease take a look at theWikifor a more detailed description. There you get more detailed information on how you can use the geometry classes, the meaning of the geometry parameters and error handling.DeploymentUpdate packagespipenv update --dev setuptools wheel twineUpdatesetup.pyUpdate the content ofsetup.py, especially the version information.Commit and tagCommit and push the changes along with a new version tag. Travis will run the test cases automatically when pushing to the master branch.Build source archive and built distributionpipenv run python setup.py sdist bdist_wheelDeploy to PyPi or TestPyPi to test things firstpipenv run twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*pipenv run twine upload --skip-existing dist/*Useful linksConfiguring pipenv for Visual Studio CodePackaging Python Projects
Package: randomheader
randomheaderGenerates random HTTP headers for requestsinstallpip install randomheaderusagefromrandomheaderimportRandomHeaderrh=RandomHeader()print(rh.header())example header{"Connection":"keep-alive","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-GB,en-US;q=0.9,en;q=0.8","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","X-Forwarded-For":"16.64.120.135","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.1.56 (KHTML, like Gecko) Version/9.0 Safari/601.1.56","Dnt":"0","Upgrade-Insecure-Requests":"1","Referer":"https://bild.de/"}
Package: random-id
Random IDA simple, flexible random ID generator.Installationpip install random_idBasic UsageImportingfromrandom_idimport*Orfromrandom_idimportrandom_idGenerating IDsCall with no arguments for default settings.random_id()# -> 'Y4M460zrRMqRuv'Default IDs are 14 characters long and contain lower/uppercase ascii letters and numbers only (to be URL-safe.)You can also customize the length and the character set used.random_id(length=4)# -> 'Dl3d'random_id(character_set="abc")# -> 'bbacabccaaacab'random_id(length=8,character_set=string.digits)# -> '27244839'LicenseCopyright (C) 2020 AlexiWolfThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, seehttps://www.gnu.org/licenses/.
Package: random_instances
An utility to retrieve or generate random instances of Django models.-------------------------------------This module exports a get_or_create_random function that improves Django'sget_or_create (http://djangoproject.com/documentation/models/get_or_create/)on two aspects:* invoking get_or_create_random with parameters that match MULTIPLE instancesdoes not raise an error, but rather returns one of those instances at random* invoking get_or_create_random with parameters that do not match ANY instancereturns a NEW instance of that model (the same occurs with get_or_create). Theimprovement is that get_or_create_random can be invoked without passing a valuefor all the 'required' fields of the model. If these fields are not passed,they are automatically filled with random values (e.g.: CharFields are filledwith random strings, ImageFields with random images).The goal is to make prototyping faster, as model instances can be obtained andcreated by specifying just the minimum set of desired fields. This is usefulwhen writing tests and can avoid having to write complex fixtures.
Package: random-ip-generator
Random IP GeneratorRandom IP Generator is a Python package that generates a random IP address for a given country code. It uses theIP2LOCATION-LITE-DB1.CSVfile as a source for IP ranges per country.InstallationYou can install the package via pip:pipinstallrandom-ip-generatorUsageAfter installing the package, you can use therandom_ip_for_countryfunction in your Python script to generate a random IP address for a given country.fromrandom_ip_generatorimportrandom_ip_for_countrycountry_code="US"random_ip=random_ip_for_country(country_code)print(f"Random IP for{country_code}:{random_ip}")PrerequisitesThis package requires theipaddresspackage. It will be installed automatically if you installrandom-ip-generatorvia pip.AttributionThis site or product includes IP2Location LITE data available fromhttps://lite.ip2location.com.
Package: random-italian-person
Python package to generate an Italian person randomly.How do I install this package?As usual, just download it using pip:pipinstallrandom_italian_personUsage examplesfromrandom_italian_personimportRandomItalianPersonperson=RandomItalianPerson()print(person.describe())# 'Rodrigo Benedetti è nata/o a Molazzana (LU) il 1972-12-18. Ora vive a Cagliari (CA) in Via Giuseppe Garibaldi 109.'Generate a CSV of random italian personsOne of the most common usages for this library is to render
fake datasets for testing porposes. For instance,
to generate a CSV with 5 random person you can use:importpandasaspdfromrandom_italian_personimportRandomItalianPersondf=pd.DataFrame([RandomItalianPerson().datafor_inrange(5)])The obtained dataframe will look like:regionprovincesurnamenamesexbirth_municipalitybirth_provincebirth_regionbirth_capbirth_province_codebirthdateaddresshouse_numbercapmunicipalityprovince_codecodice_fiscaleMarcheMacerataDi FeliceGiacominaFMosciano Sant’angeloTeramoAbruzzo64023TE1945-09-18Viale De Amicis7662020ColmuranoMCDFLGMN45P58F764BFriuli Venezia GiuliaUdineGalliImenFIsola DovareseCremonaLombardia26031CR1942-03-10Via Udine233020VerzegnisUDGLLMNI42C50E356TAbruzzoPescaraRossoEvaFCellarengoAstiPiemonte14010AT2001-12-31Via G. Fonzi5865010SpoltorePERSSVEA01T71C438UEmilia RomagnaBolognaGrassoEmanueleMCaposeleAvellinoCampania83040AV1942-08-27Via G. Massarenti223/540138BolognaBOGRSMNL42M27B674LSiciliaPalermoPastorinoLenutaFBorzonascaGenovaLiguria16041GE1972-09-05Via Montalbo12490142PalermoPAPSTLNT72P45B067T
Package: randomized-tsp
randomized_tspA python3 package implementing randomized algorithms forTravelling Salesman Problem.
The implementations are based off ofA first course in Artificial Intelligence: Deepak Khemani.The algorithms implemented include:Genetic AlgorithmSimulated AnnealingAnt Colony OptimizationInstallationYou can install this usingpip. Just runpip install randomized_tspUsageSeeexamplehere.If you havencities in your problem then you need to define the distances between cities using a two dimensionaln X nlist.distances[i][j]should give the distance between city i and city j.fromrandomized_tsp.tspimporttsp# If you have 3 cities then you need to define this list# which gives the distances between two citiesdistances=[[0,4,2],[4,0,3],[2,3,0]]tsp_obj=tsp(distances)# To run genetic algorithmtour,cost=tsp_obj.genetic_algorithm()# To run simulated annealingtour,cost=tsp_obj.simulated_annealing()# To run ant colony optimizationtour,cost=tsp_obj.ant_colony()All the three algorithms return that best tour found and the cost of that tour. Tour is represented using path representation.Some optional parameters are also available for the above algorithms.defgenetic_algorithm(self,population_size=50,mutation_prob=0.1,crossover='order'):""":param population_size: Defines the size of the population used in the algorithm:param mutation_prob:   Probability that a offspring will mutate:param crossover:       Defines the crossover operator, currently two options are available`order` and `cycle`.:return:                Returns the best tour found and the cost of that tourA tour is represented using path representation"""defsimulated_annealing(self):""":return: Returns the best tour found and the cost of that tourA tour is represented using path representation"""defant_colony(self,num_of_ants=20,pheromone_evapouration=0.2):""":param num_of_ants:            Number of ants in the colony:param pheromone_evapouration: Evapouration rate of the pheromone deposited by ants:return:                       Returns the best tour found and the cost of that tourA tour is represented using path representation"""ContributingMany of these algorithms need improvements and optimizations. If you want to improve this project or fix a bug then all contributions are welcome.ContactIf you find any bugs then open a issue on this repository. You can also contact me ongitter.
Package: randomizer
RandomizeLiberty for generate random data.DocsRandomizeClass for create custom random list.fromrandomizerimportRandomizer=Randomize(['try','this','class'])r.element()# -> 'class'r.elements(3)#  ['this', 'try', 'try']r.group_elements(2)# -> 'try class'# pop del rundom element and return himr.pop()# -> 'this'# if pass index number, pop will be used as list.pop ()r.pop(0)# -> 'try'random_text_unicodeGenerates random strings with unicode symbol.param size: size of returned textparam random_size: if True, return random size [0*size]return: unicode textfromrandomizerimportrandom_text_unicoderandom_text_unicode(10)# -> 'aT݃пޑ0սYׅarandom_text_unicode(10,random_size=True)# -> 'ɘ0ͯłƏ'random_textGenerates random strings.param size: size of returned textparam random_size: if True, return random size [0:size]return: textfromrandomizerimportrandom_textrandom_text(10)# -> 'v 9е93кт1O'random_text(10,random_size=True)# -> 'RПkF'random_byteGenerates random int with calculation random(2 ** size).param size: size of returned intreturn: int (int range 0 <= int < 2**size)fromrandomizerimportrandom_byterandom_byte(2)# -> 3random_byte(8)# -> '111'random_floatparam a: start digitparam b: end digitreturn: random float with 14 digit after comafromrandomizerimportrandom_floatrandom_float(1.1,2.2)# -> 1.4524252884290065random_datetimeparam a: start datetimeparam b: end datetimereturn: random datetime with timezone of 'a' parameterfromrandomizerimportrandom_datetimefromdatetimeimportdatetimerandom_datetime(datetime(2007,1,2,3,4,5),datetime.now())# -> datetime.datetime(2019, 10, 11, 23, 1, 11, 296813)random_list_elementparam array: list of elementsreturn: random element of arrayfromrandomizerimportrandom_list_elementrandom_list_element([1,2,3,4,5])# -> 4random_boolreturn: return random bool valuefromrandomizerimportrandom_boolrandom_bool()# -> Truerandom_unix_timereturn: a float value from 0 to the current time with 7 digit after comafromrandomizerimportrandom_unix_timerandom_unix_time()# -> 785009993.9438592random_dt_nowreturn: a datetime object from 1.1.1980 to the current datetime without timezonefromrandomizerimportrandom_dt_nowrandom_dt_now()# -> datetime.datetime(1986, 4, 23, 3, 46, 12, 133432)random_positive_floatparam max_value: maximum valuereturn: random positive float with 14 digit after comefromrandomizerimportrandom_positive_floatrandom_positive_float(1.123)# -> 0.6647791533497713INTreturn random digit, from ↓ tableType          Bytes         Minimum               Maximum
__________________________________________________________
TINYINT	        1	    -128		   127
SMALLINT	2	    -32768		   32767
MEDIUMINT	3	    -8388608	           8388607
INT	        4	    -2147483648	           2147483647
BIGINT	        8	    -2*63		   (2*63)-1random_tinyintfromrandomizerimportrandom_tinyintrandom_tinyint()# -> 62random_smallintfromrandomizerimportrandom_smallintrandom_smallint()# -> 17031random_mediumintfromrandomizerimportrandom_mediumintrandom_mediumint()# -> 5518123random_intfromrandomizerimportrandom_intrandom_int()# -> -1572638799random_bigintfromrandomizerimportrandom_bigintrandom_bigint()# -> -475732340272717339
Package: randomjoke
Random JokeDisplay a random joke fromhttps://icanhazdadjoke.comAPIFree software: MIT licenseDocumentation:https://randomjoke.readthedocs.io.InstallationYou can download and install the latest version of this software from the Python package index (PyPI) as follows:pip install –upgrade randomjokeUsageIn your command line simply type:makeajokeFeaturesDisplay a random joke fromhttps://icanhazdadjoke.comAPICreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2019-11-20)First release on PyPI.
Package: randomless
RandomlessA python module which provides a True Random Number Generator (TRNG) based on the electronic noise captured by your webcam. The api is mostly compatible with Python's default random module.RequirementsPython 3opencv-pythonnumpyA webcam with drivers installed.InstallationpipinstallrandomlessUsageImport.fromrandomlessimportRandomCreate a Random class instance.random=Random()Generate a random number just like you would with Python's default random module.random.random()Use any other random method the same way as it is with Python's RNG.print('randrange:',random.randrange(0,5,1))print('randint:',random.randint(0,5))print('choice:',random.choice([1,2,3,4,5]))l=[1,2,3,4,5]random.shuffle(l)print('shuffle:',l)print('sample:',random.sample([1,2,3,4,5],3))print('random:',random.random())print('uniform:',random.uniform(0,5))print('triangular:',random.triangular(0,1,0.5))print('betavariate:',random.betavariate(1,1))print('expovariate:',random.expovariate(5))print('gammavariate:',random.gammavariate(1,1))print('gauss:',random.gauss(1,1))print('lognormvariate:',random.lognormvariate(1,1))print('normalvariate:',random.normalvariate(1,1))print('vonmisesvariate:',random.vonmisesvariate(1,1))print('paretovariate:',random.paretovariate(1))print('weibullvariate:',random.weibullvariate(1,1))Stop the process of collecting noise from your webcam.random.release()
Package: random-letter
RANDOM LETTERWhat is this project ?This project is Python package that allows to get a random letter.InstallationInstall the package using pip:python3-mpipinstallrandom-letterUsageimportrandom_letter# import packageletter1=random_letter.get_random_letter()# get a random lowercase letterletter2=random_letter.get_random_letter(True)# get a random uppercase letterprint(letter1,letter2)# print the two lettersYou want to contribute ?If you want to contribute to this project, you are welcome! For this, there are a few steps:Go to therepository homepage.Create a fork of this project in your GitHub account.Clone this fork on your machine with:# make sure that git is installed before doing thisgitclonehttps://github.com/your-username/random-letter.gitCreate a new branch that describes what you want to do by entering:gitcheckout-bmy-branchMake your changes.Add the files you have modified:gitadd.Make a commit where you say everything you’ve done:gitcommit-m"change... and add..."Please start your commit with a lowercase letter to ensure continuity of commit historyPush your changes to GitHub:gitpush-uoriginmy-branchMake a pull request by going to the project fork page and clicking on "Contribute > Open pull request". A window will open, and you will be able to explain in more detail all the changes you have made.Validate and then wait for validation... 😊💡 You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star!LicenseThis project is under aMIT license.
Package: randomly
RandomlyA Library for Denoising Single-Cell Data with Random Matrix TheoryFree software: MIT licenseDocumentation:https://randomly.readthedocs.io.FeaturesRandomly is not yet published on PYPI. For now install directly from github:pipinstall--upgradegit+https://github.com/RabadanLab/randomly.gitCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-10-29)First release on PyPI.
Package: randomly-change-self
randomly-change-selfChange all instances ofselftothisin one randomly chosen scope per file.Inspired byDavid Beazley's toot.InstallationInstall from PyPi with your favoritepipinvocation:$python3-mpipinstallrandomly-change-selfYou can confirm proper installation via therandomly-change-selfCLI:$ randomly-change-self --help
usage: randomly-change-self [-h] [--replace-with REPLACE_WITH]
                            [--consider-mercury-in-retrograde CONSIDER_MERCURY_IN_RETROGRADE]
                            [filenames ...]

positional arguments:
  filenames

options:
  -h, --help            show this help message and exit
  --replace-with REPLACE_WITH
  --consider-mercury-in-retrograde CONSIDER_MERCURY_IN_RETROGRADEArgumentsfilenamesA collection of filename(s) to process. While this isn't required, you should probably pass some filename(s) if you want something to happen.replace-withSpecify the string to replace"self"with. Defaults to"this"It's assumed that this value is a valid Python identifier. No validation of this is done, we're all adults here.consider-mercury-in-retrogradeSet toTrueif you only want to make changes if Mercury is in retrograde.NOTE:Because it turns out that astrophysics is a little challenging and I haven't done it since college, this is currently implemented as an API call to theMercury Retrograde API. This call should fail gracefully, and if an issue is encountered then your flag will be ignored and your code will get changed anyway.Pre-CommitYou can even use this as apre-commithook. Wow!-repo:https://github.com/sco1/randomly-change-selfrev:v0.2.0hooks:-id:randomly-change-selfargs:[--consider-mercury-in-retrograde=False]
Package: randomlyric
Get a random lyric from a random song, and url to the rest of the lyricsUsageusage: __main__.py [-h] [--letter LETTER] [--artist-href ARTIST_HREF]
                   [--song-href SONG_HREF]

optional arguments:
  -h, --help            show this help message and exit
  --letter LETTER       Specify letter instead of allowing random choice
  --artist-href ARTIST_HREF
                        Specifies the artist you want. No preceding slash.
                        Example: m/mutemath.html
  --song-href SONG_HREF
                        Specifies the song you want. No preceding slash.
                        Example: lyrics/mutemath/typical.htmlInstallationViapip:pip3 install randomlyricAlternatively:Clone the repository,cd randomlyricRunpython3 setup.py installorpip3 install-e
Package: random-mitype
random-mitypeGenerate random word typing tests formitype, a terminal-based typing test
application.Installationpip install mitypeandpip install random-mitypeIfmitypeworks for you, you should be able to runrandom-mitype.Usage: random-mitype [OPTIONS] [WORDS]

  Start a typing test with number of WORDS.

Options:
  -v, --version  Show the version and exit.
  -h, --help     Show this message and exit.LicenseMIT
Package: random-movie-names
random-movie-namesThis is a python package, for generating random movie namesrandom_movie_names = RandomMovieNames()print(random_movie_names.generate())['TheRiver']random_movie_names = RandomMovieNames(5)print(random_movie_names.generate())['Coronavirus', 'NiagaraNiagara', 'Joker', 'Changeling', 'Diadelosmuertos', 'CombatWombat']random_movie_names = RandomMovieNames({'min': 5, 'max': 10})print(random_movie_names.generate())['HustleFlow', 'FullLove', 'Lolita', 'Inframundo', 'ASimplePlan']random_movie_names = RandomMovieNames({'exactly': 2})print(random_movie_names.generate())['ThisIsEngland', 'RidingGiants']random_movie_names = RandomMovieNames({'exactly': 5, 'join': ' '})print(random_movie_names.generate())TheMaoYears TheConjuring ShortTerm OutofReach TakeMetoTarzana GodGrewTiredofUsrandom_movie_names = RandomMovieNames({'exactly': 5, 'maxLength': 4})print(random_movie_names.generate())['Conspiracy', 'OutoftheAshes', 'WhatAboutME', 'MissAmericana', 'Bridegroom', 'Benched']random_movie_names = RandomMovieNames({'exactly': 3, 'namesPerString': 2})print(random_movie_names.generate())['TheBiggestFan DirtyHarry', 'BlueRidge LaSoufriere', 'Stardust TheWheel', 'ChapterVerse TheCreativeBrain']random_movie_names = RandomMovieNames({'exactly': 3, 'namesPerString': 2, 'separator': '-'})print(random_movie_names.generate())['BatmanHush-TyingtheKnot', 'Murder-WomaninMotion', 'Misfits-TheElevenOClock']random_movie_names = RandomMovieNames({'exactly': 2, 'namesPerString': 2, 'formatter': lambda name: name.upper()})print(random_movie_names.generate())['ACHRISTMASCAROL AWARMWIND', 'MARSHALL RADIATOR']random_movie_names = RandomMovieNames({'exactly': 2, 'namesPerString': 2, 'formatter': lambda name: name.capitalize()})print(random_movie_names.generate())['Dosparaelcamino Pentagram', 'Scuzz Theragewithin']
Package: random_name
A simple library for generating random names, similar to the docker random
name generator foundhere.>>>importrandom_name>>>random_name.generate_name()'snazzy-heliotrope-stingray'>>>random_name.generate(1)['skanky-orange-bordeaux']>>>random_name.generate(10)['woolly-saffron-squirrel','slaphappy-black-indri','dorky-smalt-cichlid','crabby-cobalt-bullfrog','lumpy-puce-stoat','snappy-magenta-dormouse','woolly-apricot-okapi','snippy-coral-woodpecker','lanky-cream-foxhound','queasy-alizarin-moth']