Saravanan666/pypi-org huggingface dataset:
Package: ratingcurve
ratingcurveA Python package for fitting hydrologic rating curves.In hydrology, a rating curve is a mathematical relationship between streamflow and water surface elevation (stage).
Because stage is much easier to measure than streamflow, almost all streamflow timeseries are generated from rating curves.
For the most part, those rating curves are still fit manually by drawing a curve to the data,
which can be time consuming and subjective.
To improve that process, the U.S. Geological Survey (USGS), among others, is evaluating methods for automating that fitting.
Several automated methods currently exist, but each parameterizes the rating curve slightly differently,
and because of the nature of the problem, those slight differences can greatly affect performance.
To help the community evaluate different parameterizations,
we created theratingcurvepackage, which implements our best parameterization for others to try.
Furthermore, the implementation usesPyMC, a general purpose library for probabilistic modeling,
which makes it easier for others to modify the model to test different parameterizations or fitting algorithms.
If you can improve upon our parameterization, USGS might use your algorithm to generate streamflow timeseries at thousands of locations around the United States.
The package includes simple demonstrations and test datasets to get you started.Please report any bugs, suggest enhancements, or ask questions by creating anissue.InstallationInstall using pippipinstallratingcurveor condacondainstall-cconda-forgeratingcurveBasic UsageThistutorialdemonstrates basic usage of the package.
Here's a simple example that fits and plots a rating curve.fromratingcurve.ratingsimportPowerLawRatingfromratingcurveimportdata# load tutorial datadf=data.load('green channel')# initialize the modelpowerrating=PowerLawRating(segments=2)# fit the modeltrace=powerrating.fit(q=df['q'],h=df['stage'],q_sigma=df['q_sigma'])powerrating.plot()Once fit, easily generate a rating table that can be imported into other applications.powerrating.table()For more, see thedocumentation.DisclaimerThis software is preliminary or provisional and is subject to revision.
It is being provided to meet the need for timely best science.
The software has not received final approval by the U.S. Geological Survey (USGS).
No warranty, expressed or implied, is made by the USGS or the U.S. Government as to the functionality of the software and related material nor shall the fact of release constitute any such warranty.
The software is provided on the condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from the authorized or unauthorized use of the software.
Package: ratingfish
ratingfishPython wrapper for RatingFish APIInstallpip3 install ratingfishExampleimportosimportratingfishAPI_KEY=os.environ['RATINGFISH_API_KEY']rf=ratingfish.RatingFish(api_key=API_KEY)website=rf.website.get()print(website)Classes and methodsRatingFish.website.get - get website data
RatingFish.agents.get - get agents data
RatingFish.agents.stats - get agents stats
Package: ratio
RatioThe Python web framework for developers who want to get shit done.Ratio is currently being developed and all releases in this phase may introduce breaking changes until further notice.
Please do not use Ratio in production without carefully considering the consequences.What is Ratio?Ratio is an asynchronous Python web framework that was built with developer experience in mind. Quick to learn for those
who just start out with programming and powerful so that senior developers can build high performance web applications
with it. The framework is designed with the Goldilocks principle in mind: just enough. Enough power to run high performance
web applications, enough intuitive design, so that developers can easily pick up on the principles.Ratio borrows ideas from great frameworks, likeDjango,FastAPIandNext.js. It combines those ideas with original concepts to improve the life of
a developer when building web applications for any purpose.Ready out of the boxRatio will be shipped with a custom and extensible command line interface, which can be used to perform actions within a
project.This is what we aim Ratio to do:File based routing:Intuitive routing for each incoming request, based on file system.Integrates with databases:Connect to SQL or SQLite databases from within the application controllers.Write once, use everywhere:Do not repeat yourself, by defining models, routes and actions you can use them throughout the application.Adheres to standards:API views are based onOpenAPIand theJSON schema standard.This list is not complete and will be extended after certain releases in the pre-release phase.Minimal external dependenciesCurrently, Ratio only requires therichpackage from outside the Python standard library, which is used
for rendering beautiful output to the command line. In a future version of Ratio, we might want to remove this direct
dependency for users who really want to have no external dependencies.
Package: ratio-dumper
Ratio iX5M Log DumperPython dumper for the Ratio iX5M (iX3M 2021, square buttons/latest firmware).Example usagefromratio_dumperimportSerialDriver,convert_to_xmlwithSerialDriver('/dev/tty.usbserial-D309VENO')asdc:dive=dc.get_dive(1)print(convert_to_xml(dive))Support NotesThe majority of testing has been done against open circuit dive logs from a iX5M computer,
little support exists for CCR specific data e.g. setpoints, cell calibration etc.Implementation referenceshttps://github.com/subsurface/libdchttp://www.ratio-computers.com/toolbox/Ratio_Toolbox_Mac.ziphttps://github.com/aeruder/slsnif
Package: ratio-genetic-py
Ratio Genetic Python BindingsThe bindings crate is currently just in aproof of conceptstate and will for the
moment just follow the main crate's versioning.This package provides a thin wrapper around the Ratio Genetic crate written in Rust. It
is built with Maturin utilizing PyO3 bindings for convenience.To get up and running quickly, a Poetry section has been added to thepyproject.toml.
This installs a Poetry environment with Maturin and PyTest. After any changes to the
Rust code you should probably runpoetry run maturin developandpoetry run pytestusing your preferred method.
Package: ratio-merge
A small utility function for merging two python lists by some ratioThis function acts as a generator producing elements from the two given
lists by the given<merge_ratio>. The generator would preserve any
internal order within the lists and would produce no more then<desired_length>elements in total.In case the total number of elements within either list is not enough to
maintain the desired ratio throughout, the function would continue to
generate elements from the remaining set until<desired_length>elements were produced.If the<strict>parameter is set to True the function will stop
producing elements once one of the lists has ran out of elements. It
would also bias the produced list to fit closest to the length of the<first_list>.Installpip install ratio_mergeUsage Examples:~$ python
>>> from ratio_merge import ratio_merge
>>>
>>> x=[1,2,3,4,5]
>>> y=['a','b','c','d','e','f','g']
>>>
>>> l = ratio_merge(x,y, 0.7) # <- evaluates on the fly
>>> l
    <generator object ratio_merge at 0x7fd93902d870>
>>> list(l)
    [1, 'a', 2, 3, 'b', 4, 5, 'c', 'd', 'e']
>>>
>>> l = ratio_merge(x,y, 0.7, 5) # <- length limit
>>> list(l)
    [1, 'a', 2, 3, 'b']
>>>
>>> l = ratio_merge(x,y, 0.2) # <- differant ratio
>>> list(l)
    [1, 'a', 'b', 'c', 'd', 2, 'e', 3, 4, 5]
>>>
>>>
>>> l = ratio_merge(x,y, 0.5) # <- replicates zip order on 0.5
>>> list(l)
    [1, 'a', 2, 'b', 3, 'c', 4, 'd', 5, 'e']
>>> zip(x,y)
    [(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e')]
Package: rational-linkages
Rational LinkagesPython-based toolbox for synthesis and rapid-prototyping of rational linkages. The
documentation is hosted on Read the Docs, available here:Rational Linkages Toolbox Documentation.Intallation instuctionsRecommended Python version is3.11, when it provides the smoothest plotting
(but 3.10 or higher are supported). Python 3.11 is also the version used for
development.Install from PyPIUsing pip:pip install rational-linkagesInstall from sourceClone the repository (use preferably your client, or clone with the button on top of this page or using the following line)git clonehttps://git.uibk.ac.at/geometrie-vermessung/rational-linkages.gitNavigate to the repository foldercd rational-linkagesInstall theeditableversion of the pakcage using pip:pip install -e .UsageSee thedocumentation examplesfor more details.AcknowledgementsFunded by the European Union. Views and opinions expressed are however those of
the author(s) only and do not necessarily reflect those of the European Union
or the European Research Executive Agency (REA). Neither the European Union
nor the granting authority can be held responsible for them.
Package: rationalnets
rationalnetsJAX/Flax implementation of rational neural nets.Originalpaper: Nicolas Boullé, Yuji Nakatsukasa, and Alex Townsend,Rational neural networks, arXiv preprint arXiv:2004.01902 (2020).github:https://github.com/NBoulle/RationalNetsInstallationrationalnetscan be installed with pip with the following command:python -m pip install rationalnetsOr you can install the latest version with the following command:python -m pip install git+https://github.com/yonesuke/RationalNets.gitQuickStartRational activation functionimportjax.numpyasjnpfromjaximportrandomfromrationalnetsimportRationalMLPxs=jnp.arange(-2.0,2.0,0.01)act=Rational()params=model.init(random.PRNGKey(0),xs)ys=act.apply(params,xs)# values of rational activation function for -2.0 ~ 2.0Rational MLPimportjax.numpyasjnpfromjaximportrandomfromrationalnetsimportRationalMLPmodel=RationalMLP([12,8,4])batch=jnp.ones((32,10))variables=model.init(random.PRNGKey(0),batch)output=model.apply(variables,batch)
Package: ratlog
:rat: Ratlog.pyApplication Logging for Rats, Humans and MachinesDisclaimer:TheRatlog specificationis
still alpha status and might be subject to breaking changes. Beware,
because of that, this API and format might change significantly. We will
try our best to tag a stable release as soon as possible.Leave feedbackand help us
get there faster!>>>importratlog>>>log=ratlog.Log()>>>log("hello world")helloworld# Add fields>>>log("counting",{"count":1})counting|count:1# Add fields and tag>>>log("counting",{"count":-1},"negative")[negative]counting|count:-1# Create another logger bound to a tag>>>warn=ratlog.Log("warning")>>>warn("disk space low")[warning]diskspacelow# Adding more tags>>>crit=ratlog.Log("warning","critical")>>>crit("shutting down all servers")[warning|critical]shuttingdownallservers
Package: ratom
Supports macOS, FreeBSD (freebsd-update, portsnap, pkg),
Debian and derivatives (apt-get), Red Hat and derivatives (yum),
ClamAV/freshclam, Homebrew, Cask, Perlbrew, CPAN Minus (cpanm),
pyenv, pip, rbenv, gem, npm, Metasploit Framework, Git repositories,
and Microsoft AutoUpdate via a plugin architectureMarkdown-formatted output with all update and informational commands
shown with their output and in pretty terminal colors via theblessingspackage; also
allows subsequent processing by redirecting or pipingDry run mode (-n) processes configuration file and command line
arguments, performs checks and intermediate processing, prints
commands to show what will run given configuration and system
settings, but doesn’t actually update anythingConfiguration via~/.ratom/config.jsonor an argument to-coption; allows switching the ordering of plugins (not recommended),
explicit enabling or disabling of plugins, and specifying a
different path for the log fileLogs intermediate processing commands and other informational and
error messages to the configured log location
(~/.ratom/ratom.logby default) or an argument to-loptionShows full configuration details if--show-configoption is
used; be sure to combine with-nif you don’t want to update
anythingEach plugin provides acheckfunction to determine whether to
run and amainfunction that performs the updateFull documentation in HTML (online,gzipped tar)
and PDF (view,download)
viaSphinx
Package: ratp-api
RatpAPI Python WrapperOverviewRatpAPI is a Python wrapper for interacting with the RATP (Régie Autonome des Transports Parisiens) API. This library provides easy access to real-time traffic information, line-specific traffic details, and affluence data for journeys on the RATP network in Paris.FeaturesFetch global traffic information on the RATP network.Retrieve traffic information for specific lines using theLineIDenum for easy reference.Get affluence data for journeys on particular lines.Utilizes Pydantic models for data validation and parsing.InstallationTo use RatpAPI in your project, you can install it via pip:pipinstallratp-api-pythonUsageaSetting UpFirst, import theRatpAPIclass and initialize it with your API key:fromratp_api.mainimportRatpAPIapi=RatpAPI()Using the LineID EnumTheLineIDenum provides a convenient way to reference specific lines by their IDs:fromratp_api.enumsimportLineID# Example: Using LineID for RER Aline_id=LineID.RER_AFetching Global Traffic InformationTo get global traffic data:global_traffic=api.get_global_traffic()print(global_traffic)Fetching Line-Specific TrafficTo get traffic information for a specific line using theLineIDenum:line_data=api.get_line_traffic(line_id=LineID.METRO_14)forsituationinline_data.situations:print(situation)# Output:# isActive=True isPlanned=True criticity='HIGH' messages=["Jusqu'au 04/02, le week-end, trafic interrompu sur l'ensemble de la ligne en raison de travaux. Bus de remplacement. Plus d'informations sur la page dédiée."]# isActive=False isPlanned=True criticity='HIGH' messages=["Du 01/02 au 08/02, du lundi au jeudi à partir de 22h, trafic interrompu sur l'ensemble de la ligne en raison de travaux. Bus de remplacement. Plus d'informations sur la page dédiée."]# isActive=False isPlanned=True criticity='HIGH' messages=["Jusqu'au 31/01, du lundi au jeudi à partir de 22h, trafic interrompu sur l'ensemble de la ligne en raison de travaux. Bus de remplacement. Plus d'informations sur la page dédiée."]Fetching Affluence for JourneysTo get affluence data for a specific journey on a line:line_id=LineID.RER_A# Using LineID enumaffluence_data=api.get_line_affluence(line_id=line_id)print(affluence_data)Fetching Affluence for All LinesTo get affluence data for all lines:all_lines_affluence=api.get_all_lines_affluence()print(all_lines_affluence)ContributingContributions to the RatpAPI project are welcomed!LicenseThis project is licensed under the MIT License.
Package: ratpmetro
Statistical analysis of incident probability and causes on RATP metro linesTrafic perturbé...again?! This library and thisnotebookprovides a statistical point of view for all these daily incidents occurred on the Paris RATP metro lines.Using tweets coming from official RATP Twitter accounts (@Ligne1_RATPfor line 1 for example), we will seeWhat is the probability of encountering some operational incidents on a particular line?Which lines are more likely to cause everybody unhappy?What are the main causes of these problems?Should I be considered lucky if I never take metros during rush hours?Are there less problems during weekends?Instead of going on vacation, is there any reason to be happy if I still work in August?Some examples in the year 2018The fist two examples below refer to the RATP metro line 2, which I take everyday for work.I should leave work before 17:00 on Wednesday (or after 21:00)In the figure below you can see the probability of catching an operational incident (trafic perturbé,interrompu...) at a given hour (in fact in the next following hour) and a specific weekday. The maximum value (nearly 9%) can be found on Wednesday at the evening rush hours.It's us the main responsible for these incidentsNearly half (48%) of the incidents come from us. Also, 9% is due to unattended bags...Line 13 should be jealous of line 4Every Parisian knows that the line 13 is bad. But in the year 2018 it was beaten by the line 4, which records an average probability of incidents larger than 4%.LicenseThe code is licensed under the terms of the MIT license. The analysis results (text, figures, tables) are licensed under aCreative Commons Attribution 4.0 International License.AuthorTianyi Li(tianyikillua@gmail.com)
Package: ratransformers
RATransformers 🐭RATransformers, short for Relation-Aware Transformers, is a package built on top oftransformers 🤗that enables the training/fine-tuning of models with extra relation-aware input features.Example - Encoding a table in TableQA (Question Answering on Tabular Data)[Notebook Link]In this example we can see that passing the table as text with no additional information to the model is a poor representation.With RATransformers 🐭 you are able to encode the table in a more structured way by passing specific relations within the input.
RATransformers 🐭 also allows you to pass further features related with each input word/token.Check more examples in [here].InstallationInstall directly from PyPI:pip install ratransformersUsagefromratransformersimportRATransformerfromtransformersimportAutoModelForSequenceClassificationratransformer=RATransformer("nielsr/tapex-large-finetuned-tabfact",# define the 🤗 model you want to loadrelation_kinds=['is_value_of_column','is_from_same_row'],# define the relations that you want to model in the inputmodel_cls=AutoModelForSequenceClassification,# define the model classpretrained_tokenizer_name_or_path='facebook/bart-large'# define the tokenizer you want to load (in case it is not the same as the model))model=ratransformer.modeltokenizer=ratransformer.tokenizerWith only these steps your RATransformer 🐭 is ready to be trained.More implementation details inthe examples here.How does it work?We modify the self-attention layers of the transformer model as explained in the section 3 ofthe RAT-SQL paper.Supported ModelsCurrently we support a limited number of transformer models:BARTBERTGPT-2RoBERTaT5LongT5Want another model? Feel free to open anIssueor create aPull Requestand let's get started 🚀
Package: ra-trivial
Alcraft-Williams Trivial DivergenceThere is a google colab to demonstrate this here:https://colab.research.google.com/drive/1NNfjDTaUO6IfAcVu5DDs9UvcEdGY_TDA?usp=sharingAlcraft-Williams AssociationThis implements the Alcraft-Williams Association for finding associations in non-linear multi-dimensional data.
It has a particular advantage in being able to identify associations in sinusoidal data.InstallIt is installed on PyPi and can installed withpip install ra-trivial
Package: rats3g-nota
notanota is a scaffolding tool for developer notes. Out of the box, nota provides sensible defaults for common development scenarios - defects, stories, bugs, and features. nota promotes productive notetaking habits and allows for customization to accommodate unique workflows.InstallInstall nota with:pipinstallrats3g-notaRun nota and list possible arguments using:nota-hConfigurationnota supports configuration using command line parameters and aJSONconfig file. Precedence is:command line -> config file -> internal defaults.OptionCommand LineConfigVariableGenerate bug template-b --bugbug.*$optionSet custom configuration file-c --configGenerate defect template-d --defectdefect.*$optionUse custom list of directories--directories*.directories[]Generate feature template-f --featurefeature.*Set note filename--filename*.filenamePrint help information-h --helpSet note unique ID--identifier$idList available notes-l --listCreate note<NAME>$nameGenerate custom template-o --option$option.*$optionSet root directory for notes-r --rootroot$rootGenerate story template-s --storystory.*$optionUse custom template for note-t --template*.templatePrint version information-v --versionDevelopmentTo get started with nota development, clone theGitrepositorygitclonehttps://github.com/pyscaffold/pyscaffold.gitInstall development dependencies usingpippipinstall-rrequirements.txtFinally, setup nota for development with the usualpythonsetup.pydevelopand you are ready to go. Any changes you make will be reflected when you run nota.
Package: ratschlab-common
ratschlab-commonSmall library of common code used in various projects in theratschlab.FeaturesWriting parquet and HDF5 files with sensible defaultsratschlab_common.io.dataframe_formats.Support for working with 'chunkfiles', i.e. splitting up a large
dataset in smaller chunks which can be processed independently (seeexample notebook):Repartition records (i.e. increase or decrease number of
chunkfiles) while keeping data belonging together in the same
file (e.g. data with the same patient id associated)simple indexing for looking up in which chunk to find data
belonging e.g. to a patientbigmatrix: support for creating and reading large matrices stored in
HDF5 having additional metadata on the axes in form of data frames
(seeexample notebook.)small wrappers for spark and dask (spark
example.)saving sparsepandasdataframes to hdf5, seeexample notebookToolsratschlab-commonalso comes with some command line tools:pq-tool: inspect parquet files on the command linepq-tool head: first recordspq-tool tail: last recordspq-tool cat: all recordspq-tool schema: schema of a parquet fileexport-db-to-files: Tool to dump (postgres) database tables into parquet files. Large tables can be
partitioned on a key and dumped into separate file chunks. This
allows for further processing to be easily done in parallel.bigmatrix-repack: rechunking/packing bigmatrix hdf5 filesInstallation and RequirementsThe library along with all the required dependencies can be installed
with:pip install ratschlab-common[complete]Depending on whether you plan to usesparkordaskor none of them you could installratschlab-commonthrough either of the commandspip install ratschlab-common
pip install ratschlab-common[spark]
pip install ratschlab-common[dask]Note, that if you plan on usingsparkmake sure, you have
Java 8 and either python 3.6 or 3.7 installed (python 3.8 is currently not supported bypyspark).
Package: rattifyapi
rattifyapi-pythonPython plugin forRattifApiView onpypi.python.orgInstallationpipinstallrattifyapiExamplefromrattifyapi.rattifyimportRattifysecret_key="rt_test_4973"rattify=Rattify(secret_key=secret_key)# to use transaction classprint(rattify.user.list())# initiate a genericdata={"first_name":"John","last_name":"Doe","email":"john.doe@email.com","date_of_birth":"2000-12-24","country":"Ghana",}print(rattify.generic.initialize(data))# get userprint(rattify.user.verify(reference="e1b6679c5aad4bd3999953ac78e677a79d28d539085e409ebde1be640ebc27e7"))Static UseTo start using the Rattify Python API, you need to start by setting your secret key.You can set your secret key in your environment by running:exportSECRET_KEY='your_secret_secret_key'After exporting the keys, you can use the api like thisfromrattifyapi.genericimportGenericfromrattifyapi.usersimportUser# list usersprint(User.list())# initiate a genericdata={"first_name":"John","last_name":"Doe","email":"john.doe@email.com","date_of_birth":"2000-12-24","country":"Ghana",}print(Generic.initialize(data))# get userprint(User.verify(reference="reference"))