Saravanan666/pypi-org huggingface dataset:
Package: roundface
RoundfaceGenerate profile photos for all faces in a given imageInputOutputGreyedRequirements:Python 3OpenCVNumPyInstallationpip install opencv-python roundfaceProject SetupClone repoCD in projectCreate python virtual environment:python -m venv venvActivate virtual environment:venv/bin/activateorvenv\Scripts\activateInstall requirements with pip:pip install -r requirement.txtUsage:roundface - s <path to image file or folder>python roundface.py - s <path to image file or folder>More Options:-gor--greyInteger. 1 or 0. Specifies whether resulting photos should be greyed out.- szor--sizeInteger. Desired output size in pixels- ror--radiusInteger (Float). e.g 1.2 for 20% more than the default radius.Faces that can't fit a particular radius will be skippedExamplesroundface -s z://home/photos
roundface -s z://home/photos/myself.jpg
roundface -s vacation/photos - sz 400 -g 1
roundface -s vacation/photos - sz 400 -r 1.0python roundface.py -s z://home/photos
python roundface.py -s z://home/photos/myself.jpg
python roundface.py -s vacation/photos - sz 400 -g 1
python roundface.py -s vacation/photos - sz 400 -r 1.0A folder namedroundfacewill in created in the same location as the image source. It will contain the output photos.Credits:PexelsTowards Data Science
Package: roundhouse
Convert many serialization formats to many formatsInstallationInstall CLI bundled with base packageComes with just JSON and Pickle serializers by default, no external dependenciespipinstallroundhouseInstall one or more additional serializers and their dependenciespipinstallroundhouse[yaml]roundhouse[msgpack]...Or install all builtin serializers and dependencies bundled with core packagepipinstallroundhouse[all]Additional serializer plugins can be published and installed via pypi/pip using theroundhousesetuptools entrypoint
pointing to module/package containing additional serializer classesUsageCLITherhCLI command is installed automatically, and defaults to reading from stdin and writing stdoutRunrh --helpfor full usage instructionsecho'{"root": {"nested": {"key": "value"}}}'|rh-ijson-oxml<?xmlversion="1.0"encoding="utf-8"?><root><nested><key>value</key></nested></root>PythonData is serialized/deserialized to and fromdictinstancesOther data types may be supported depending on the serializerUse theroundhouse.serializeandroundhouse.deserializefunctions with target formatfromroundhouseimportserialize,deserializedata=deserialize('{"root": {"nested": {"key": "value"}}}','json')print(serialize(data,'xml'))
Package: rounding
Rounding methodsStandardRoundrounds to the nearest, and in the event of a tie, rounds up.RoundToEvenrounds to the nearest, but in the event of a tie, rounds toward
the nearest even number.StochasticRoundprovides a mechanism to eliminate accumulated
roundoff error in the presence of a distribution where for
individual samples, the roundoff error is skewed. This is typically
caused by small values. This may be a common problem when dealing with applying a
function to many small integer values as the number of discreet inputs is small.One drawback to stochastic rounding is the output is non-deterministic,
but this can be avoided by providing a custom deterministic generator,
or invoking providing the random number generator with a fixed seed.r=random.Random()r.seed(123)sr=StochasticRound(precision=0,random_generator=r)
Package: roundmantissa
pip install -U roundmantissaroundmantissaTiny library :baby_chick: that rounds floating point numbers based on the length of their mantissa.5.0 = 4.0 + 1.0 = (1 + 1/4) * 2**2 = b1.01 * 2**2round_mantissa(5.0, 0) = b1. * 2**2
round_mantissa(5.0, 1) = b1.0 * 2**2
round_mantissa(5.0, 2) = b1.01 * 2**2:hatched_chick: :hatched_chick: :hatched_chick:
Package: round-nutrition
round-nutritionA lightweight Python package to round nutritional values for federal compliance withFDAandNDCguidelines>>>print([total_carb('0.8g'),vitamin_k('125.5 mcg')])['less than 1g', '126mcg']>>>print(total_carb('0.8 g',minimal=True))<1gInstallationInstall the package:pipinstallround-nutritionImport the module:fromround_nutritionimport*# or specific functionsUsageAll subnutrient functions take in anintorstrargument forquantityGeneralVitaminMineralOtheradded_sugars*biotincalciumcholinecaloriesfolatechromiumcholesterol*niacincopperdietary_fiber*pantothenic_acidiodineinsoluble_fiber*riboflavinironmono_fatthiaminemagnesiumother_carb*vitamin_amanganesepoly_fatvitamin_b12molybdenumpotassiumvitamin_b6potassiumprotein*vitamin_cphosphorussat_fatvitamin_dseleniumsodiumvitamin_ezincsoluble_fiber*vitamin_ksugar_alcohol*total_carb*total_fattotal_sugars*trans_fat⚠️ As of1.1.xall functions are global with no need for special imports*Has abooleanparameter ofminimalto opt for a cleaner UISourcesFood and Drug AdministrationNational Dairy CouncilContributingMake a pull request for any idea/fix you have, or make an issue if you're lazyLicenseMIT
Package: round-percentages
Round-PercentagesRound percentages that add up to 100, such that the rounded percentages also add up to 100 using thelargest remainder method.InstallationTo install runpipinstallround-percentagesExample usageimport round_percentages
round_percentages([13.626332, 47.989636, 9.596008, 28.788024])
output: [14, 48, 9, 29]
Package: roundrobin
roundrobinThis is rather small collection of round robin utilites>>>importroundrobin>>>get_roundrobin=roundrobin.basic(["A","B","C"])>>>''.join([get_roundrobin()for_inrange(7)])'ABCABCA'>>># weighted round-robin balancing algorithm as seen in LVS>>>get_weighted=roundrobin.weighted([("A",5),("B",1),("C",1)])>>>''.join([get_weighted()for_inrange(7)])'AAAAABC'>>># smooth weighted round-robin balancing algorithm as seen in Nginx>>>get_weighted_smooth=roundrobin.smooth([("A",5),("B",1),("C",1)])>>>''.join([get_weighted_smooth()for_inrange(7)])'AABACAA'
Package: roundtable
TableThink of this as a list of namedtuples, except the elements of the namedtuples
can be edited.  The table is initialized with a list of column header names.
Appending to the table adds new rows.  Rows are created using a list (positional)
or dict (column names).  Unspecified column cells default toNone.Other list methods (insert,pop,remove,extend,reverse) work as expected.sortallows a string key to indicate a sort-by-column.  Search methods
(index,count,__contains__) accept either a Row object or a list or dict.Additional methods useful for tables:take(indexes_or_func)returns a new table based on passed in indexes
Alternatively, applies a function to every row in the table and builds
a new table out of rows that evaluate to Truecolumn(colname)returns an iterator over values in a columnLookupTableA lookup function or column is added to a basic Table.  The lookup function is similar
to a hash function, taking a Row object and returning a value.  If a column is provided,
the value in that column is thelookupvalue.  A dict keeps track of these “lookup”
values, allowing fast lookups on all seach methods (index,count,__contains__).
These search methods accept either a Row object (which is run through the lookup function)
or thelookupvalue.  Thelookupvalues do not need to be unique.Examplefrom datetime import datetime, date, timedelta
from roundtable import Table
# Create empty table with column headers
tbl = Table(['Timestamp', 'Event', 'Root Cause', 'Due Date'])
# Add rows to the table
tbl.append((datetime(2013,1,2,12,30), 'Error code 129',
            'Short on board', date(2013,1,8)))
tbl.append({'Event': 'Pairwise testing',
            'Due Date': date(2013,1,7)}) # other columns default to None
# Build a sorted list of tasks due in the next week
task_list = tbl.take(lambda row: row['Due Date'] - date.today() < timedelta(days=7))
task_list.sort(col='Due Date', reverse=True)Table access methods:CodeReturn Typemytable[0]Row objectmytable[-1]Row objectmytable[0:10:2]new Table objectmytable[0][0]value in cellmytable[0][-1]value in cellmytable[0, 0]value in cellmytable[0]['acolumn']value in cellmytable[0, 'a column']value in cellmytable[0].Col2value in cell*mytable.column(1)iterator over values in columnmytable.column('acolumn')iterator over values in column* As a special case, if a column name is a valid Python variable name andstarts with a capital letterthen an attribute will be added to the Row
object allowing access.  The requirement to start with a capital letter avoids
conflicts with other attributes and functions of the Row object.Table objects can be transformed into other table-like objects if modules are available:NumPy Array :mytable.as_array()Pandas DataFrame:mytable.as_dataframe()NoteWorks for Python 2.6+, 3.1+No dependencies except when using theas_array()oras_dataframe()methods.
Package: roundtm
RoundTMA Round based Tournament ManagerInstall from PyPI`pip install roundtm`Install from SourceClone the repositorygit clonehttps://github.com/Toilal/roundtm.gitcd roundtmCreate and activate the virtualenvvirtualenv .
Scripts/activateInstall dependenciespip install -r requirements.txtRun unit testspython setup.py testHistory0.2 (unreleased)Work in progress …0.1First versionYAML Files basedRandom team generator
Package: round-to-n-significant-digits
Table of ContentsOverview.Installation via pip:LinksContactsLicenseOverview.round_to_n_significant_digits is a one function PYPI package made only with one
goal to round float numbers in python to asked number of signifacant digitsimportround_to_n_significant_digitsround_to_n_significant_digits.rtnsd(0.23234,2)# 0.23round_to_n_significant_digits.rtnsd(0.235,2)# 0.24round_to_n_significant_digits.rtnsd(105.3,1)# 100round_to_n_significant_digits.rtnsd(125.3,2)# 130Installation via pip:pipinstallround_to_n_significant_digitsLinksPYPIGitHubContactsEmail:stas.prokopiev@gmail.comvk.comFacebookLicenseThis project is licensed under the MIT License.
Package: roundtripini
Round Trip INI ParserFor reading and respectfully modifying INI files when dealing with software that still uses this format.This library aims to be as flexible as possible when it comes to interpretinginifiles.Why roundtripini?There are already a number of existing ini libraries, including python's builtin configparser, but not only do most of these libraries not support round-trip-parsing, most of them also do not support duplicate sections and keys.roundtripini simultaneously supports round trip parsing, handling duplicate keys by treating them as lists, and allowing sections to be defined multiple times (with each section being queried when reading values).Why INI?Lots of software still uses this poorly-specified format. roundtripini is designed to help interface with such software.If you want a library to read configuration files for the software itself, I would recommend instead using a file format which has a specification and consistent implementations in multiple languages and for multiple platforms, likeTOMLorYAML.UsagefromroundtripiniimportINIwithopen("file")asfile:ini=INI(file)# Unlike configparser, ini takes a tuple, rather than returning a section when accessed with []# This is necessary as multiple sections may exist in the file.ini["section","key"]="value"# Multiple values can be included as a list. Each one will be added with a separate keyini["section","key"]=["value 1","value 2"]ini["section","other key"]="other value"# When assigning values, single-element lists are equivalent to stringsini["section","other key"]=["other value"]assertini.dump()=="""[section]key = value 1key = value 2other key = other value"""assertisinstance(ini["section","key"],list)assertisinstance(ini["section","other key"],str)withopen("file","w")asfile:file.write(ini.dump())Restrictionskey/value pairs must be separated by =keys may not begin or end with whitespacevalues will have beginning or ending whitespace stripped when returned.Comments will only be ignored if they are on one line, but not
if they are on the same line as a key/value pair, where they will be treated as part of the valueImplementation NotesValidation of key/value pairs occurs when data is used, not when the file is read.When replacing keys with duplicates, all old keys will be removed from all sections (in the
case of duplicate sections),  and the new elements will be inserted in a single block at the
location of the first old key.Lists returned by the[]operator should not be modified, as the underlying data will not change.
Package: roundtrip-lib
RoundtripAn library for loading and managing Javascript code and visualization in Jupyter notebook cells.This lubrary supports:Loading HTML, CSS, and JavaScript FilesLoading Webpack Generated FilesPassing Jupyter-scoped data into Javascript codeReturnng Javascript generated data back to the calling Jupyter NotebookBinding data between Jupyter-notebook and Javascript visualizationsAutomatic updating of bound visualizations enabling:fluid gui-scripting based workflowslinked views across cellsImportant LinksRoundtrip WikiTry It OutInstallJupyter notebook&Node.jsClone this repository:gitclonehttps://github.com/hdc-arizona/roundtrip.gitRun the automatic installer:cdroundtrip
chmod+xinstall.sh
./install.shStart a jupyter server from theroundtripbase directory:jupyternotebookFrom your web browser navigate to thedocs/examples/folder and open theManual Workflow Examplenotebook.On load, you may need to clean the output by runningRestart & Clear Outputfrom theKernelmenu in Jupyter.Running the cells in the first example will demonstrate:The loading of a real pandas dataset into a javascript visualizationInteraction with the visualizationReturning data back from the visualization to the Jupyter notebookOnce you understand the functionality in this notebook please open theAdvanced Workflow ExampleRunning the cells in this example will demonstrate:The?operator and how it links python data with visualization dataHow the?can provide linked-view functionality between cellsHow the linking of data and automatic updating of cells can be easily turned off by removing the?How cells update when data is update inside the jupyter notebook as well as in the visualizationsLicenseRoundtrip is distributed under the terms of the MIT license.All contributions must be made under the MIT license.  Copyrights in the
Roundtrip project are retained by contributors.  No copyright assignment is
required to contribute to Roundtrip.SeeLICENSEandNOTICEfor details.SPDX-License-Identifier: MIT
Package: roundup-cli
roundup-cli is a simple command line interface for theRoundup Issue Tracker.
It uses the XML-RPC interface to communicate with Roundup.Configurationroundup-cli will look for a configuration file in this orderroundup.cf,~/.roundup.cfg. The format is based onconfigparser.A section describe parameters for a roundup instance.url,usernameandpasswordare required entries like this:[foo]
url = http://localhost:8000/roundup
username = foo
password = barAny other entries will be used to display the corresponding roundup class. It
must be a comma separated list of field names, the first field will be used for
short display:issue = title,priority,status,superseder,nosy,assignedto,keyword
user = username,realname,organisation,address
msg = author,date,contentNutshellHere a simple scenario:$ roundup-cli
None: use foo
demo: get issue1
 title: Add issue creation to roundup-cli
 priority: feature
 status: in-progress
 superseder:
 nosy: admin,demo
 assignedto: admin
 keyword:
issue1@demo: show messages
 messages:
-------------------------------------------------------------------------------
 msg1
 author: demo
 date: <Date 2011-11-25.20:58:30.768>
 content: It will be great to create issue from roundup-cli
-------------------------------------------------------------------------------
 msg2
 author: admin
 date: <Date 2011-11-25.20:59:06.176>
 content: Agree, I start working on it.
-------------------------------------------------------------------------------
issue1@demo: search issue status:in-progress
 issue1: Add issue creation to roundup-cliFor more information please visit theroundup-cli website.
Package: rouse
rouseAn implementation of the Rouse model of polymer dynamics. Forexample usageand the fullAPI referencevisit our documentation atReadTheDocsTo installrouseyou can use the latest stable version fromPyPI$pipinstall--upgraderouseor the very latest updates right from GitHub:$pipinstallgit+https://github.com/OpenTrajectoryAnalysis/rouseDevelopersNote theMakefile, which can be used to build the documentation (using
Sphinx); run unit tests and check code coverage; and build an updated package
for release with GNUmake.When editing the example notebooks,rememberto remove output and empty cells before committing to the git repo.nbstripoutallows to do this
automatically upon commit.
Package: rousepull
rousepullAn implementation of the Rouse model of polymer dynamics. Forexample usageand the fullAPI referencevisit our documentation atReadTheDocsWhen using this code, please cite our original work:Keizer et al., Science 377, 2022; DOI:10.1126/science.abi9810To installrousepullyou can use the latest stable version fromPyPI$pipinstall--upgraderousepullor the very latest updates right from GitHub:$pipinstallgit+https://github.com/OpenTrajectoryAnalysis/rousepullDevelopersNote theMakefile, which can be used to build the documentation (using
Sphinx); run unit tests and check code coverage; and build an updated package
for release with GNUmake.When editing the example notebooks,rememberto remove output and empty cells before committing to the git repo.nbstripoutallows to do this
automatically upon commit.
Package: rousquille-tools
Rousquille's toolsMy personal toolbox 🛠Installationpip install rousquille-toolsPython 🐍Measurement of the time used by a functionimporttimefromrousquille_tools.decoratorsimporttime_def@time_defdeffunc1():time.sleep(5)Result:>>>func1()[time_def]Function:func1Time:5.0sDetect if python is executed in screen session>>>fromrousquille_tools.shellimportis_in_screen_session>>>print(is_in_screen_session())False
Package: route
RouteRoute is a Python library for interacting with the file system in an object oriented manner.
I know you can use os and os.path to do all of these but I find their usage hard to remember
and true to object oriented principles.InstallationYou can use pip to install Route.pipinstallrouteUsageAll files and directories (folders) are consideredPathobjects.
Any path except the root, has a parent: the directory it is in.
Directories have children, some of them are files and some are subdirectories.PathThePathobject points to an existing or non-existing file or directory.fromrouteimportPathpath=Path('C:\\')get_current_directoryUsually we want to start in the current working directory:path=Path.get_current_directory()list,dir,lsAll of the above methods do the same thing;lsis for linux people,diris for windows people, andlistis for literal people.print(path.list())directoriesTo get the sub-directories of a directory use thedirectoriesattribute which returns a list ofPaths:subdirectories=path.directoriesfilesTo get the files inside a directory use thefilesattribute which returns a list ofPaths:files=path.filesparent_directoryThe parent directory is the directory aPath(either file or directory) is inside of.parent_directory=path.parent_directorymake_directoryTo create a new directoryinsideaPaththat is also a directory, usemake_directorywith the name of the new directory as thenameargument:path.make_directory(name='new_directory')You can also create a directory at the location of thePathobject by letting thenameargument take its default value ofNone:path.make_directory()make_parent_directorySometimes you need to create a new file at aPaththat doesn't already exist,i.e.the directory
of the file location doesn't exist. This is whenmake_parent_directorybecomes handy:path.make_parent_directory(ignore_if_exists=True)The default value ofignore_if_existsisTrue.deleteThedeletefunction moves a file or directory to the trash. If thenameargument is provided
the file or directory inside thePathwith that name will be deleted:path.delete(name='new_directory')If thenameargument is not provided the file or directory thePathpoints to will be deleted:path.delete()saveTo save a Python object as aPicklefile using thepickleordilllibrary you can just use thesavefunction of thePathwhich saves the object right at the location ofPath.my_list=[1,2,3]Path('my_list.pickle').save(method='pickle')Path('my_list.dill').save(method='dill')loadTo load an object from aPicklefile located at aPathyou can run theloadfunction of thePath.list_from_pickle=Path('my_list.pickle').load(method='pickle')list_from_dill=Path('my_list.dill').load(method='dill')
Package: route1io-connectors
route1.io Python connectorsAtroute1.iowe've written high level, easy-to-use abstractions in Python for connecting to common APIs used in marketing analytics. This repository contains our official code, documentation, and tutorials to help you on your way accessing what matters most:your data.Table of ContentsSupported API'sInstallationSample usageDocumentationLicenseSupported API'sBelow is a list of API's currently supported by our custom connectorsAWS' S3Google SheetsGoogle AnalyticsGoogle AdsDoubleClick ManagerSearch Ads 360SlackFacebookApple Search AdsTikTokOneDriveInstallationpipEasily install to your environment from PyPI with$pipinstallroute1io-connectorsSample usageAll connectors provided by the package can be imported with Python's standard import syntax. See ourwikifor tutorials regarding specific platform connectors!fromroute1io_connectorsimportaws# Credentials# NOTE: Storing credentials in source isn't secure in practice.#       It's recommended you store them in a more secure place.AWS_ACCESS_KEY_ID="YOUR_AWS_ACCESS_KEY_ID"AWS_SECRET_ACCESS_KEY="YOUR_AWS_SECRET_ACCESS_KEY"REGION_NAME="YOUR_DEFAULT_REGION_NAME"# Connect to S3s3=aws.connect_to_S3(aws_access_key_id=AWS_ACCESS_KEY_ID,aws_secret_access_key=AWS_SECRET_ACCESS_KEY,region_name=REGION_NAME)# Download remote file from S3 bucket to local machineaws.download_from_S3(s3=s3,bucket="your.s3.bucket",key="local_file.csv"local_fpath="tmp/local_file.csv",)DocumentationDocumentation can be found in docs/_build/html or online atRead The DocsLicenseThis library operates under theGNU GPL v3.0license.
Package: route53
Info:A Python 2.7/3.x compatible Route53 module.Author:Greg TaylorThepython-route53Python package is a simple Python 3 compatible API for
Amazon’sRoute 53.Why not boto?botois a wonderful piece of software, one that I continue to contribute to.
However, we needed a Python 3 compatible route53 module, and boto has a long
way to go on this front.I’ve also taken what I feel is a more simple, minimalistic API design. That
is entirely subjective, though, and boto is perfectly viable.Getting startedHead on over and read thedocumentation.Current statusBeta, but generally useful to anyone. Great unit test coverage, gooddocumentation.Licensepython-route53 is licensed under the BSD License.
Package: route53-recordset-converter
Route53 recordset converterThis software is aimed to convert the input CSV file fromroute53-transferto a JSON file which can be then used in a Terraform google_dns_record_setRequirementsPython 3.7.9 or higherInstallationpipinstallroute53-recordset-converterUsageDump AWS Route 53 Hosted Zone records to a CSV usingroute53-transferroute53-transferdumpexample.comexample.com.csvConvert the CSV file to a JSON oneroute53-recordset-converterexample.com.csvexample.com.jsonUse the JSON in Terraformlocals{dns_records=jsondecode(file("example.com.json"))}resource"google_dns_record_set""dns_records"{for_each={forindex,dns_recordinlocal.dns_records:index=>dns_record}name=each.value.namemanaged_zone="dns-zone-name"type=each.value.typettl=each.value.ttlrrdatas=each.value.value}CSV FormatsThe following CSV formats are supported:aws: AWS Route 53 standard format, as outputted byroute53-transferregister.it: Register.it format, as exported bywww.register.itIn PythonYou can convert the CSV without dumping them to a JSON.fromroute53_recordset_converterimportRoute53RecordsetConverterc=Route53RecordsetConverter()converted_results=c.convert("example.com.csv")