Saravanan666/pypi-org huggingface dataset:
Package: run-parallel
run_parallelPass an array or generator of callables andrun_parallelwill run them as fast as possible.Lambdas are not supported yet.ExampleAs computations are often a little bit complex, classes make
sense often. Override the__call__method:classExensiveComputation:def__init__(self,arg):self.arg=argdef__call__(self):res=self._step1(self.arg)res=self._step2(res)returnresdef_step1(self,arg):# expensive stuff herereturnresdef_step2(self,arg):# expensive stuff herereturnrescomputations=[ExensiveComputation(1),ExensiveComputation(2),ExensiveComputation(3)]res1,res2,res3=run_parallel(computations)
Package: runplify
runplifyA Juupyter lab extension to save execution outputRequirementsJupyterLab >= 4.0.0InstallTo install the extension, execute:pipinstallrunplifyUninstallTo remove the extension, execute:pipuninstallrunplifyContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the runplify directory# Install package in development modepipinstall-e"."# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstallpipuninstallrunplifyIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink namedrunplifywithin that folder.Testing the extensionFrontend testsThis extension is usingJestfor JavaScript code testing.To execute them, execute:jlpm
jlpmtestIntegration testsThis extension usesPlaywrightfor the integration tests (aka user level tests).
More precisely, the JupyterLab helperGalatais used to handle testing the extension in JupyterLab.More information are provided within theui-testsREADME.Packaging the extensionSeeRELEASE
Package: runpynb
Run Jupyter notebooks quietly from command-linerunPyNBis a quick and dirty utility to run (and time) Jupyter notebooks from command-line and makefiles.QuickstartInstall from PyPIpipinstallrunpynbGeneral usage:runpynb <notebook(s)> [options](".ipynb" not required)runpynb: Run all notebooks in directory.$ runpynb(back to top)Usagerunpynb <notebook(s)> -q: Run quietly (-q).$ runpynb hello.ipynb -qrunpynb <notebook(s)> -qs: Run quietly (-q) as a sequence of workflow (-s). Errors (eg inerror.ipynb) will break the workflow.$ runpynb error.ipynb hello.ipynb -qsrunpynb <notebook(s)> -o: Save output as separate notebook (-o), instead of overwriting existing notebook(s).$ runpynb hello.ipynb -o(back to top)Optionsusage:runpynb[-h][-tTIMEOUT][-s][-o][-vVERSION][-q][notebooks...]Run(andtime)Jupyternotebookssilentlyincommand-line.

positionalarguments:notebooksListofJupyternotebooks(*.ipynb)toberun(default=allnotebooksinpath).

optionalarguments:-h,--helpshowthishelpmessageandexit-tTIMEOUT,--timeoutTIMEOUTSecondsuntilacellinthenotebooktimesout,whichraisesaTimeouterrorexception(defaultis3000=5mins).-s,--sequenceSequenceimplicitinnotebooklists.Iferroroccurssomewhere,stopentirepipeline.-o,--outputSaveoutputasaseparatenotebookwith"-out"-suffix(e.g.*-out.ipynb)insteadofoverwritingexistingfile.-vVERSION,--versionVERSIONVersionofnotebooktoreturn(Default=Noconversion).Notebookwillbeconvertedifnecessary.-q,--quietBequietanddon'tprintmessages(includingruntime).Caution:Doesnotsuppresserrormessages.(back to top)Status(back to top)More on this packageThis is a lightweight package that wraps around the official Jupyternbformatandnbconvertmodules.My workflow involves usingJupyter notebooksto clean, and analyze data.
I use this utility to run notebooks silently from the command-line andMakefiles(without converting from.ipynbfiles to.pyfiles).Related packages areguoquan/runnbandvinayak-mehta/nbcommandswith a planned enhancementnbtimeto run Jupyter notebooks from command-line.(back to top)Usage with MakefilesA minimal workflow whereget-data.ipynbtakes 5000 seconds to preparedata.csv.
And whereanalyze.ipynbusesdata.csvto produceoutput.png..DEFAULT_GOAL:=output.pngdata.csv:get-data.ipynbrunpynb$^-t5000output.png:analyze.ipynbdata.csvrunpynb$<(back to top)Known IssuesBuild failswith Python 3.6 in Windows OS.Notebooks with long execution time will require thetimeoutoption (egrunpynb notebook.ipynb -t 10000).(back to top)LicenseThis package is licensed under theMIT License.
Package: runregistryclient
CERN CMS Run Registry clientA Python client for thenew RunRegistry.
A Python client for theold RunRegistrycan be foundhere.InstallationpipinstallrunregistryclientPrerequisitesSince mai 2019 the run registry requires authenticaion with a CERN user account.
Therefore you need to setup your CERN Grid User Certificate as instructed in the cernrequests package:See:https://github.com/ptrstn/cernrequests#prerequisitesUsageExampleIf you want a single run, do this:importrunregrunreg.get(run_number=327600)If you prefer a non-nested JSON output, use theflat=Trueparameter.importrunregrunreg.get(run_number=327600,flat=True)runregassumes thetrackerworkspace by default.
If you want to change it, you can do so by specifying theworkspaceattribute:importrunregrunreg.get(run_number=327600,workspace="global")Multiple filters at onceIf you want to use several filters at once, for example, to filter according to a sequence number range with certain criteria, you can do it this way:importrunregrunreg.get(run_number=[(327596,">="),(327744,"lte")],name=("%Cosmics%","like"))Or if you preferDjango likelookup fields:importrunregrunreg.get(run_number__gte=327596,run_number__lte=327744,name__like="%Cosmics%")OperatorsFollowing operators are supported:=oreq(assumed per default)>=orgte>orgt<=orlte<orltlikeThe operators should be specified as the second element of a (value, operator) tuple such as(321123, "<=").AttributesAll available attributes can be found in thedocsfolder underattributes.md.DevelopmentPython version3.5or higher is required.If you want to improve this software, you should follow these steps:gitclonehttps://github.com/ptrstn/runregistryclientcdrunregistryclient
python-mvenvvenv
.venv/bin/activate
pipinstall-e.
pipinstall-rtesting-requirements.txtRunning Testspytest --cov .FAQHow do you filter by subcomponent status?If you want to filter for subcomponent states such asPixelorSiStrip, you must use the attribute names specified in the RunRegistry API.
Unfortunately, they contain "-" and "." characters, so you need to use a little trick.For example, to filter for theTrackStatusin the workspaceTrackerthen you need to do:importrunregrunreg.get(**{"tracker-track.status":"GOOD"})You can still combine this with other attributes and options:importrunregrunreg.get(flat=True,run_number=[(327596,">="),(327744,"lte")],**{"pix.status":"EXCLUDED","strip.status":"GOOD"})Whats the difference between tracker-track and track?trackis used for theglobalworkspace, whiletracker-trackuses thetrackerworkspace.
The same is true fortracker-pix/pixandtracker-strip/strip.Does this work with Python 2.7?No.Referenceshttps://cmsrunregistry.web.cern.ch/
Package: runremote
Run RemoteRun executables remotely through sshRequirementssshserveropen the remote pcssh,scp,sshpasson the local pcInstallationpython -m pip install runremoteQuickstartusage: python -m runremote [-h] --host HOST --user USER [--pass PASS] file

positional arguments:
  file         Executable to launch

options:
  -h, --help   show this help message and exit
  --host HOST  host[:port]
  --user USER  Remote user
  --pass PASS  Remote password
Package: runrex
RunrexLibrary to aid in organizing, running, and debugging regular expressions against large bodies of text.Table of ContentsAbout the ProjectGetting StartedPrerequisitesInstallationUsageRoadmapContributingLicenseContactAcknowledgementsAbout the ProjectThe goal of this library is to simplify the deployment of regular expression on large bodies of text, in a variety of input formats.Getting StartedTo get a local copy up and running follow these simple steps.PrerequisitesPython 3.8+runrex package:https://github.com/kpwhri/runrexInstallationClone the repogitclonehttps://github.com/kpwhri/runrex.gitInstall requirements (requirements-devis for test packages)pipinstall-rrequirements.txt-rrequirements-dev.txtIf you wish to read text from SAS or SQL, you will need to install additional requirements. These additional requirements files may be of use:ODBC-connection:requirements-db.txtPostgres:requirements-psql.txtSAS:requirements-sas.txtRun tests.set/exportPYTHONPATH=src
pytesttestsUsageExample ImplementationsSocial IsolationAcute PancreatitisAnaphylaxisPCOSBuild Customized AlgorithmCreate 4 files:patterns.py: defines regular expressions of interestSeeexamples/example_patterns.pyfor some examplestest_patterns.py: tests for those regular expressionsWhy? Make sure the patterns do what you think they doalgorithm.py: defines algorithm (how to use regular expressions); returns a ResultSeeexamples/example_algorithm.pyfor guidanceconfig.(py|json|yaml): various configurations defined inschema.pySee example inexamples/example_config.pyfor basic configInput DataAccepts a variety of input formats, but will need to at least specify adocument_idanddocument_text. The names are configurable.Sentence SplittingBy default, the input document text is expected to have each sentence on a separate line. If a sentence splitting scheme is desired, it will need to be supplied to the application.Schema/ExamplesFor more details, see theexample configor consult theschemaOutput FormatRecommended output format isjsonlThe data can be extracted using python:importjsonwithopen('output.jsonl')asfh:forlineinfh:data=json.loads(line)# data is dictOutput variables are configurable and can include:id: unique id for linename: document namealgorithm: name of algorithm with findingvaluecategory: name of category (usually the pattern; multiple categories contribute to an algorithm)dateextrasmatches: pattern matchestext: captured textstart: start index/offset of matchend: end index/offset of matchScripts to accomplish useful tasks with the output are included in thescriptsdirectory.VersionsUsesSEMVER.Seehttps://github.com/kpwhri/runrex/releases.RoadmapSee theopen issuesfor a list of proposed features (and known issues).ContributingAny contributions you make aregreatly appreciated.Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestLicenseDistributed under the MIT License.SeeLICENSEorhttps://kpwhri.mit-license.orgfor more information.ContactPlease use theissue tracker.Acknowledgements
Package: runrun
Run RunA typed command line parser for Python.Example# main.pyimportrandomfromrunrunimportCommandfromrunrun.modelsimportArgumentfromrunrun.runnerimportRunnerclassRollCommand(Command):def__init__(self):super().__init__(name='roll',description='Roll a dice',)num_of_dice=Argument[int](name='num',description='Number of dice to roll',value=1,)faces=Argument[int](name='faces',description='how many faces per dice',value=6,)defrun(self):total=0for_inrange(self.num_of_dice.value):total+=random.randint(1,self.faces.value)print(f'🎲{total}')Runner(RollCommand()).run()Run it!python.\main.py--num5--faces20Or check the generated help command.python.\main.pyhelpRoll a dice

 USAGE 
  roll [arguments]

 ARGUMENTS 
  faces             --faces <int>                              | how many faces per dice
  num               --num <int>                                | Number of dice to roll

 COMMANDS 
  Help              help                                       | Show help about this commandThe help command has it's own help docs !?python.\main.pyhelphelpShow help about this command

 USAGE 
  roll help [arguments]

 ARGUMENTS 
  Filter            --filter <str>                             | Filter the help results, this can help to find what you are looking for
  Output Format     --format {STD, JSON}                       | The output format of the command details
  Required Only     --required-only [true|false]               | Only show required arguments

 COMMANDS 
  Help              help                                       | Show help about this commandFinally a help that can be filtered
Package: run-rx
rxis a command-line tool that makes it easy to
create, use, and share development environments. It integrates with whatever
tools you're currently using and gives you a long-running VM in the cloud that
is kept in sync with your local machine.UsageIn the directory containing your project (often your git root), run:rx initThis will prompt you to log in (or create an account) and allocate a machine
in the cloud for you to use. Then it will copy your project from your local
machine to the cloud instance and install any packages that your project needs.It may take several minutes to allocate a machine, copy your source code, and
install packages (depending on your project).Once rx finishes initializing, you can run any command on your remote worker
by prefixing it with "rx":rx python my-script.py
rx ps ax
rx 'echo $PATH > my-path.txt'Check out thegetting-startedsection for more examples.What rx doesWhen you run rx it takes care of a bunch of cloud setup tasks on your behalf:It creates a private hosted environment for your project in the cloud.It copies your source code into that environment.It installs any dependencies your project needs.Then, every time you run a command, it automatically syncs local changes to
your cloud instance and syncs outputs back to your local machine. rx hosts
your environment on our own cloud instances, so you never have to worry about
setup or teardown.Check out thegetting startedguide
to start using rx in less than five minutes.Note: therxbinary is a thin client and does not run commands on your local
machine: it sends them to your cloud instance and runs them there.We'd love to hear what you think of rx and how you're using it! Please let us
know by emailingeng@run-rx.comor filing an issue onGitHub!FeedbackFeel free tofile an issueif you have
any questions or problems.Running testsRun tests with:pip install -r requirements_dev.txt
python run_tests.py
Package: runscript
Runscript packageIt is not a rare case when the project has a few tasks to run periodically or at certain times e.g. deploying the project on the server or initial generation of data for new work place. Runscript package provides simplerunutility that you can use to run your tasks. Theruncommand is nothing more than launcher of themain()function of one of your scripts stored in predefined directory. Alsorunutility slightly simplifies the handling of command line arguments.Real world exampleSuppose you need to save some data from database into text file. For example, you have some web-site with user accounts and you want to dump the ID of each user account and also its email. Also you want to be able to choose the country of accounts to dump. Create "script/" directory in the root of your project and then create the file "script/dump.py" with content:importpymongodefsetup_arg_parser(parser):parser.add_argument('-c','--count')defmain(count,**kwargs):withopen('export/user.csv','w')asout:foruserindb.user.find({'country':country}):out.write('%s:%s\n'%(user['_id'],user['email']))Few words about what is going here. The value ofparseroption that is passed tosetup_arg_parseris the instance ofArgumentParserclass. You can add any option you need or just do not specifysetup_arg_parserin you script. If you define some custom options then their values will be passed in**kwargsarguments to yourmainfunction.OK, now you can run the following command from the console:$rundumpThat's all :) Of course this is not the rocket science, but I found that this simple script launcher saved me a lot of time.
Package: run-scripts
RunInstallpipinstall-Urun-scriptsBasic Usageruninit[--short]# Creates either a runfile.yml or run.yml file in the current directoryrun[script]# Runs the script defined in the runfile.yml or run.yml fileExamplesrunfile.ymlscripts:lint:"poetryrunblack."build:-"runlint"-"dockerbuild-timage."
Package: runstatus
Knowing if a program is already running can be useful in many situations.
For exampleavoid running operations that do not expect to be executed twice or more
simultaneouslyimprove the usability of a software so that the user does not end up having
multiple instances of the same program open at once.All of this in a cross-platform python library .The library is trivial to use:import runstatus

if runstatus.already_running('myAppName'):
    print('do something, e.g. exiting')
    exit(0)The library comes with various functions:already_running(codeName)tells you if this same program is running
in a different processget_system_start_time()will give you the time when the computer
was turned on in unixtimeprocess_exists(pid)will tell you if a process with that id is
runningprocess_kill(pid)will kill the process with that id if existsInstallEither usepip install runstatusor download the sources and runpython setup.py installNo dependencies are required. Run on python 2.7 or 3.xDownloadThe git repository is available athttps://github.com/riquito/runstatusOS supportedCurrently works on Linux, BSD, Windows, Mac OSCopyright and Licenserunstatus was developed by Riccardo Attilio Galli <riccardo@sideralis.org>
and is licensed under the Apache License (see LICENSE file)Websitehttp://www.sideralis.org
Package: runsteps
A controlled sequential command runner.What does that mean? Given a series of commands, perhaps a directory of
shell scripts, and a mechanism for specfying the order of those
commands, runsteps will execute them and monitor them for state and
failure.More specifically, runsteps collects running times, output and return codes of
each executed step and controls the environment variables of the step. A
mechanism for any step to ‘save’ key value pairs for use as environment
variables in following steps is also provided. This allows the steps to ‘share’
small bits of data between themselves as the entire run progresses.
Package: runtest
runtestNumerically tolerant end-to-end test library for research software.Image:Midjourney,CC BY-NC 4.0Installation$ pip install runtestSupported Python versionsThe library is tested with Python 3.7, 3.8, 3.9, 3.10.  If you want to test
runtest itself on your computer, you can follow what we do in theCI
workflow.DocumentationLatest code(main branch)Past versions1.3.z(release-1.3.z branch)CitationFor a recommended citation, please check the at the bottom-right ofhttps://zenodo.org/record/3893712.Projects using runtestDIRACDaltonandLSDaltonGIMICOpenRSPMRChemGRASP (General-purpose Relativistic Atomic Structure Program)eTIf you use runtest, please add a link to your project via a pull
request.Similar projectstestcodeis a python module for
testing for regression errors in numerical (principally scientific)
software.
Package: runthis
runthisTrivial utility to help you arrange experiments like this:Don't want to do that? Thanks for stopping by anyway.Never edit script contentsInstead, infer from the file names:if __name__=='__main__':
        import os
        kwargs = parse_kwargs(__file__.split(os.path.sep)[-1])
        my_experiment(**kwargs)SeeexampleNew experiment? Make a copy of the file and edit the nameonly.Int, float argumentsJust call the experiment filemy_function?n=int:5&d=cat&init=[float:0.2,float:0.2,float:0.2].pyThere's a shortblog posthere but I think you've got the gist.
Package: runthis-sphinxext
runthis-sphinxextThis provides a sphinx extension that adds RunThis code blocks,
which display a highligthed code-block statically, but with a
"RunThis" button above them. When the button is clicked, the code
block is replaced by a terminal session that has executed that
code.InstallationRunThis Sphinx Extention may be installed with either conda or pip:# use the conda-forge channel$condainstall-cconda-forgerunthis-sphinxext# Or you can use Pip, if you must.$pipinstallrunthis-sphinxextConfigurationTo use the RunThis code blocks, you must configure sphinx to know about
RunThis. First, make sure the sphinx extension is registered. In theconf.py, addrunthis.sphinxextsomewhere in the extensions block:extensions=[..."runthis.sphinxext",...]After this, you also need to tell sphinx where the RunThis Server is
located.  This can be set with therunthis_servervariable anywhere
in theconf.py.  For example:# runthis optionsrunthis_server="http://localhost:5000"UsageTo use the RunThis directive is very similar to thecode-blockdirective in rST. In any of your*.rstfiles, you may use
therunthisdirective, followed by the language name on the
same line.  After anycode-blockoptions and one or more blank lines,
the code that you wish to display and run, is in an indented block.
For example:..runthis::python

    import sys
    print(sys.executable)This will be run on the remote server specified in theconf.pyfile.
Package: runtimecheck
RuntimecheckOriginally Forked from theTime-LoggerRuntimecheck is an efficient Python library to help you quickly measure your functions's running time on a jupyter noetbookInstallationOn the terminalpipinstallruntimecheckOn a Jupyter Notebook!pipinstallruntimecheckExample Usageimporttimefromruntimecheck.Timerimportcheck_runtime@check_runtime()defhello_world():time.sleep(2)print("Hello World")say_hi()Result>>HelloWorld
>>hello_worldranin2.0001secondsContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: runtime-client
Runtime ClientTo request inferences.cpruntime_client/test/test_request.py./

pythontest_request_multiprocessing.py\--client_type='kfserving'\--domain='http://localhost:28080'\--model_id='model'\--concurrency=100\--batch_size=1\--data_shape='(224, 224, 3)'\--each_data_num=20