Saravanan666/pypi-org huggingface dataset:
Package: relative-mode
Relative ModeThis package contains code for relative mode estimation from audio signal, which refers to the degree of how major or minor does the music sound appears to be in a given time. It is based on key-finding algoritm principles and takes the difference between the strongest major key and the strongest minor key to be the index of relative mode. Relative mode can vary from -1.0 (clearly in minor) to + 1.0 (clearly in major).It is fully documented in a manuscript titled "Major-minorness in Tonal music – Evaluation of Relative Mode Estimation using Expert Ratings and Audio-Based Key-finding Principles" by Tuomas Eerola and Michael Schutz (in review). This manuscript documents the evaluation of the algorithm with expert data and three sets of data.
Package: relativeNeighborhoodGraph
Relative Neighborhood GraphCompute the Relative Neighborhood Graph from a NumPy distance matrix.InstructionsInstall:pip install relativeNeighborhoodGraphCompute the Relative Neighborhood Graph from a NumPy distance matrix.fromrelativeNeighborhoodGraphimportreturnRNGRNG=returnRNG(distance_matrix)The resulting Relative Neighborhood Graph is returned as a Pandas DataFrame.
Package: relative-to-now
Relative To NowConvert date/time into a string relative to now.💾 Installpython-mpipinstallrelative-to-now# orpoetryaddrelative-to-now✨ How to UsePossible input types:time.time()datetime.date.today()datetime.datetime.now()Optional inputs:no_errors(Defaults toFalse, set toTrueto return value when there is an error instead of raising)Output:Examples:importdatetimefromRelativeToNowimportrelative_to_nowprint(relative_to_now(datetime.datetime.now()+datetime.timedelta(days=1)))>>>1dayfromnowPrecision fordatetime.dateis days.importdatetimefromRelativeToNowimportrelative_to_nowprint(relative_to_now(datetime.date.today()-datetime.timedelta(days=2)))>>>2daysagoimporttimefromRelativeToNowimportrelative_to_nowprint(relative_to_now(time.time()))>>>justnow
Package: relativize-imports
relativize-importsAutomatically convert python absolute imports to relative.Inspired and adapted fromMarcoGorelli/absolufy-imports.Installation$pipinstall--upgraderelativize-importsUsage as a pre-commit hookSeepre-commitfor instructionsSample.pre-commit-config.yaml:-repo:https://github.com/reallyliri/relativize-importsrev:v0.0.6hooks:-id:relativize-importsOr with args:-repo:https://github.com/reallyliri/relativize-importsrev:v0.0.6hooks:-id:relativize-importsargs:-svc/src-automation/tests/sourceUsagerelativize-imports[path/to/dir/or/file.py...]Provide zero or more paths to relativize.Files are assumed to be relative to the cwd. Directories are assumed as relativization root and the tool will format all python files under them, in any depth.If no args are provided, the tool will run in the cwd and address it as the relativization root.ConfigThe tool will read any config set intox.iniin a root directory.If you want to exclude any files from relativization (i.e entrypoints), you can add them to config:[relativize-imports]ignore=src/main.py,testCommand-line example$relativize-imports$relativize-importssrc$relativize-importsmypackage/myfile.py- from mypackage import __version__+ from . import __version__Build and Publishrm-rfdist
pythonsetup.pybdist_wheeltwineuploaddist/*
Package: relatorio
RelatorioRelatorio is a templating library which provides a way to easily output several
kinds of files (odt, ods, png, svg, …). Support for more filetypes can
be easily added by creating plugins for them.Relatorio also provides a report repository allowing you to link python objects
and report together, find reports by mimetype/name/python object.DocumenationThe documenation is provided athttp://relatorio.readthedocs.org/
Package: relaxed
Provides differentiable ("relaxed") versions of common operations in high-energy physics.Based onjax. Where possible, function APIs try to mimic their
commonly used counterparts, e.g. fitting and hypothesis testing inpyhf.Currently implemented:basic operations:relaxed.hist: histograms via kernel density estimation (tunable bandwidth).relaxed.cut: approximates a hard cut with a sigmoid function (tunable slope).fitting routines:relaxed.mle.fit: global MLE fit.relaxed.mle.fixed_poi_fit: constrained fit given a value of a parameter of interest.inference:relaxed.infer.hypotest: hypothesis test based on the profile likelihood. Supports test
statistics for both limit setting (q) and discovery (q_0).relaxed.fisher_info: the fisher information matrix (of apyhf-type model).relaxed.cramer_rao_uncert: inverts the fisher information matrix to provide uncertainties
valid through theCramér-Rao bound.metrics:relaxed.metrics.gaussianity: an experimental metric that quantifies the mean-squared
difference of a likelihood function with respect to its gaussian approximation (covariance
calculated using the Cramér-Rao bound above).relaxed.metrics.asimov_sig: easy access to the (single- and multi-bin) stat-only expected
significance.We're maintaining a list of desired differentiable operations inlist_of_operations.md(thanks to@cranmer)
-- feel free to take inspiration or contribute with a PR if there's one you can handle :)InstallIn your virtual environment:python3 -m pip install relaxedExamples<- Click here to start playing with our examples straight away (thanks to Binder)!If you'd rather run the example notebooks locally fromexamples/, you can clone the repository,
then:python3 -m venv venv  # or virtualenv
source venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install relaxed
cd examples
pip install -r requirements.txtThen launch jupyter through your preferred medium (vscode, jupyterlab, etc.), making sure to use
this virtual env as your kernel (e.g. you canpipinstall and run jupyter lab in this env).Sharp bitsFor serious use withpyhf, e.g. in aneos-type workflow, it is
temporarily recommended to installpyhfusing a specific branch that is designed to be
differentiable with respect to model construction:python3 -m pip install git+http://github.com/scikit-hep/pyhf.git@make_difffable_model_ctorWe plan to merge this intopyhfwhen it's stable, and will then drop this instruction :)CiteIf you userelaxed, please cite us! You should be able to do that from the github UI (top-right,
under 'cite this repository'), but if not, see ourZenodo DOIor ourCITATION.cff.AcknowledgmentsBig thanks to all the developers of the main packages we use (jax,pyhf,jaxopt). Thanks also
to@dfmfor the README header inspiration ;)
Package: relaxed-poetry-core
About This ForkThis is a poetry-core fork with some relaxations and additional features
Please seeRelaxed Poetryfor more informationThe rest of this README left as is from the original Poetry Core READMEPoetry CoreAPEP 517build backend implementation developed forPoetry. This project is intended to be a light weight, fully compliant,
self-contained package allowing PEP 517 compatible build frontends to build Poetry managed projects.UsageIn most cases, the usage of this package is transparent to the end-user as it is either made use by Poetry itself
or a PEP 517 frontend (eg:pip).In order to enable the usepoetry-coreas your build backend, the following snippet must be present in your
project'spyproject.tomlfile.[build-system]requires=["poetry-core"]build-backend="poetry.core.masonry.api"Once this is present, a PEP 517 frontend likepipcan build and install your project from source without the need
for Poetry or any of it's dependencies.# install to current environmentpipinstall/path/to/poetry/managed/project# build a wheel packagepipwheel/path/to/poetry/managed/projectWhy is this required?Prior to the release of version1.1.0, Poetry was a build as a project management tool that included a PEP 517
build backend. This was inefficient and time consuming in majority cases a PEP 517 build was required. For example,
bothpipandtox(with isolated builds) would install Poetry and all dependencies it required. Most of these
dependencies are not required when the objective is to simply build either a source or binary distribution of your
project.In order to improve the above situation,poetry-corewas created. Shared functionality pertaining to PEP 517 build
backends, including reading lock file,pyproject.tomland building wheel/sdist, were implemented in this package.  This
makes PEP 517 builds extremely fast for Poetry managed packages.
Package: relaxNMR
relaxNMRA simple package to analyse 1D ^1^H NMR relaxometry experiments in cement paste. It was developed to allow batch analysis of experiments
From the raw signals, the inverse laplace transform (ILT) is computed to obtain the relaxation times.A non-negative least square algorithm with Tikhonov regularization is used for the ILT.Minimal example# preprocessingsignals=read_folder("mydata/",".dps")signals.phase(1,3)signals.remove_first_echo()average_signal=signals.average()Trange=(1e-5,1)# the range of relaxation timesalpha=1e-2# the penalization parameter# fit individual experimentfitted=ILT_fit_collection(signals,Trange,alpha)fitted.normalize()# fit averagefitted_average=ILT_fit(average_signal,Trange,alpha)fitted_average.normalize()AboutDeveloped by Fabien Georget, at theLaboratory of Construction Materials, EPFL, Lausanne, Switzerland
Package: relax-xai
RELAX: Representation Learning ExplainabilityThis repository contains code for RELAX, a framework for representation learning explainability. RELAX is based on perturbation-based explainability and work by measuring the change in the representation space as parts of the input are masked out.When should you use RELAX? If your output is a vector representation and you have no label information.More information can be found in the paper:Representation Learning Explainability(Wickstrøm et al., 2023),(Wickstrøm et al., 2022)You can see RELAX used in practice in medical image retrieval in the paper:A clinically motivated self-supervised approach for content-based image retrieval of CT liver images(Wickstrøm et al., 2023),(Wickstrøm et al., 2022)InstallationRELAX can be installed using pip as follows:pip install relax-xaiCitationIf you find RELAX interesting and use it in your research, use the following Bibtex annotation to cite:@article{wickstrom2023relax,author={Wickstr\o{}m, Kristoffer K. and Trosten, Daniel J. and L\o{}kse, Sigurd and Boubekki, Ahc\`{e}ne and Mikalsen, Karl \o{}yvind and Kampffmeyer, Michael C. and Jenssen, Robert},title={RELAX: Representation Learning Explainability},journal={International Journal of Computer Vision},year={2023},volume={131},number={6},pages={1584–1610},url={https://doi.org/10.1007/s11263-023-01773-2}}
Package: relay
Meta-magical SSH tunnels for remote developers behind firewalls.Ever tried to pair-program with someone who works behind a firewall? You want to SSH into their machine, but you can’t! Relay makes it possible to share your development environemnt with anyone by using another server in the middle to proxy the connection. And it doesn’t just work with SSH–you can tunnel the webserver too!Server setupRelay requires that you have a server running somewhere public which you can use to bounce connections from between your users. We use an EC2 micro in a public security group, but you can use anything you want. You’ll need to make sure whatever ports you map in yourports.jsonare open to the world.InstallRelay can be installed in a virtualenv, but we recommend installing it with sudo so it is always available:$sudopipinstallrelayGeneral setup(nprapps users see the next section)Relay uses a configuration file located at~/.relay.conf. Create this file with contents such as:[relay]# User to connect to the relay server asuser=ubuntu# Hostname or IP of the relay serverserver=relay_server.your_domain.com# Absolute path to the public and private SSH keyspublic_key=/path/to/your/public_key.pubprivate_key=/path/to/your/private_key# Username of the pair programmer account on each developer computerpair_user=relay# Absolute path to the port mapping fileports_json=/path/to/your/ports.json# Absolute path to a file containing bash aliases to be installed when creating the pair programmer user accountbash_profile=/path/to/your/bash_profileports.jsonis a mapping of user’s local ports to remote ports on the server, so that users will never collide when creating SSH tunnels. Create this file with contents such as:{"chris":{"22":"2222","8000":"8000"},"katie":{"22":"2223","8000":"8001"},}bash_profileis totally optional, but could contain aliases or environment variables you want every user to have automatically available.You now need to create arelayuser. This process is automated:$relaysetupIf you’re running OS X, you need to enable remote login for the newly createdrelayuser. Open System Preferences and navigate to the “Sharing” preference pane.Check the box next to “Remote Login.” You can either add therelayuser to the allowed users, or just leave it open to “All users.”NPRApps setupPre-baked configuration files are in our Dropbox folder. You must have Dropbox installed, syncing to~/Dropboxand thenprappsshared folder synced to your local computer. Then run:$ln-s~/Dropbox/nprapps/relay/relay.conf~/.relay.conf$relaysetupSharing SSHTo share your SSH connection (for tmux’ing), open a new terminal (or tab or tmux pane):$relayuser:$USERshare:22Where$USERis your username inports.json.To connect to a shared SSH connection:$relayuser:$USERsshWhere$USERis the username inports.jsonof the user sharing the connection.Sharing development webserverTo share your local development webserver, open a new terminal (or tab or tmux pane):$relayuser:$USERshare:8000Where$USERis your username inports.json.To connect open a shared webserver in your browser:$relayuser:$USERwebWhere$USERis the username inports.jsonof the user sharing the webserver.
Package: relay2slack
relay2slack======relay2slack is a tool for capturing and forwarding incoming Slack webhook events.Installation------------To install relay2slack, simply:.. code-block:: bash$ pip install relay2slackTo run relay2slack in the foreground:.. code-block:: bash$ relay2slackIf you would like to daemonize relay2slack, refer to `docs/ <docs/>`_ for supported methods.Usage-----For whichever service you would like to product webhook events, instead point it to http://localhost:5000/relay with the normal JSON object you expect to send to Slack. For example:.. code-block:: bashcurl -X POST -d 'payload={"channel":"@blaketmiller","username":"My service","icon_emoji":":warning:","text":"Hello world"}' http://localhost:5000/relayrelay2slack receives that request and forwards the posted JSON object onto the actual Slack webhook endpoint that you provide it in `SLACK_TOKEN`.
Package: relay-framework
An irc micro-framework that smells too much like a web framework.Relay is a toy project, its goals were for me to try out framework design,
learn more about the IRC protocol, and to be a replacement for the available
irc python libraries: most of them did not please me.InstallationI suggest you use a virtualenv$pipinstallrelay-frameworkExampleThis is an example of a bot that sends whatever is send after ‘!echo ‘ in a PRIVMSG:fromrelayimportRelay,auto_join,auto_pongfromrelay.constantsimportprivmsgbot=Relay("echobot")@bot.handler(privmsg)defecho(target,message,sender,*args,**kwargs):ifnotmessage.startswith("!echo "):returnsender_nick=sender.split('@')[0].split('!')[0]# We just want the nickmessage=message[6:]# We just want whatever is after '!echo 'iftarget==bot.client['nick']:result="PRIVMSG{sender_nick}:{sender_nick}:{message}"else:result="PRIVMSG {{target}} :{sender_nick}:{message}"yieldresult.format(sender_nick=sender_nick,message=message)if__name__=="__main__":bot.register(auto_pong)bot.register(auto_join(['#tests']))bot.config(from_env=True).run()And to run it:$RELAY_HOST=irc.example.netRELAY_NICK=echobotpythonechobot.pyChangelog0.1.0:Initial version, client accepts handlers, connects and matches data with those.TodoWrite a decent IRC client implementationWrite tests for the Relay classWrite documentationSubclass Relay to allow regexp routes
Package: relaypy-async
RelayRelay is a Python package that allows asynchronus inter-method communication between classes inheriting fromRelayclass, enabling one method to trigger an event or multiple events with same payload that multiple methods can listen to and respond to. Using Relay, you can create complex event emitting and listening configurations without needing to manually bind each method and handle communication logic. This is achieved through the concept of bindings that define the relationship between an event emitter method and a listening method.InstallationYou can install Relay through pip by running:pip install relaypy-asyncFeaturesNot just event listeners and emitters: Relay validates the data emitted with the type hints you provide, and avoids wrong data type errors.Automate event handling: Pass the binding configuration once during the class instantiation and Relay will automatically call the right methods when a particular event is emitted.Flexible and Extendable: Relay supports multiple listeners per emitter and multiple emitters per listener.Async: The methodsRelaysupports must be async and bounded to a class that extendsRelay.How to useHere is a basic example of using Relay:fromrelayimportRelay,Event,Emitter,ListenerclassSampleRelay(Relay):@Relay.listensasyncdefsome_listener(self,event:Event[SomeDataModel]):...@Relay.emitsasyncdefsome_emitter(self)->SomeDataModel:...returnSomeDataModel(...)# or return Relay.NoEmit(SomeDataModel(...))  # if you don't want to emit@Relay.emits@Relay.listensasyncdefunused_emitter_and_listener(self,Event)->SomeDataModel:...ifevent.data>10:returnRelay.Emit(SomeDataModel(...))else:returnSomeDataModel(...)# NOTE: you can have more classes that extend Relay. They can communicate with each other.# Create bindingsemitter_binding=Emitter(method=SampleRelay.some_emitter,channel="channel1",event_type="event1")listener_binding=Listener(method=SampleRelay.some_listener,channel="channel1",event_type="event1")# Use bindings in the Relay initializationrelay=SampleRelay(bindings_config=[emitter_binding,listener_binding])# Emit an event (in an asyncio loop)...awaitrelay.some_emitter()In this example, whensome_emitter()is called, it will emit an event whosechannelandevent_typeare"channel1"and"event1", respectively. When this event is emitted,some_listenerwill be invoked with the corresponding event instance. Awaiting thesome_emitterdoes not block the execution as the event is emitted asynchronously.Error HandlingRelay provides robust error handling features. If the data type of the emitting event does not match with the required data type or type hints are missing/inconsistent, aTypeErrorwill be raised.Full DocumentationPlease note that the Relay package is under development, and the existing functionality may slightly change in future versions.
Package: relayr
Welcome to the relayr Python Library. The repository provides Python
developers with programmatic access points to the relayr platform.These include access to the relayr cloud via the relayrAPIas well as
direct connection to the relayr WunderBar sensors, via Bluetooth Low
Energy (usingBlueZon Linux, still very experimental).InstallationYou can install the library using one of the following methods, with the
help of Pip:You can download the very latest version of the repository from GitHub:pip install git+https://github.com/relayr/python-sdkYou could also use the following to install the package from thePython Package Index:pip install relayrAttention!Receiving data via MQTT will work only for Python 2.7 and above
due to limited suport inpaho-mqttfor TLS in Python 2.6.ExamplesReceive a 10 second data stream, from one of your WunderBar sensors (device). In the
example below the device does not have to be a public one in order to be used.
You can obtain your device IDs from the relayr DashboardMy Devices section:MQTTstyle (new)importtimefromrelayrimportClientfromrelayr.dataconnectionimportMqttStreamc=Client(token='<my_access_token>')dev=c.get_device(id='<my_device_id>')defmqtt_callback(topic,payload):print('%s%s'%(topic,payload))stream=MqttStream(mqtt_callback,[dev])stream.start()time.sleep(10)stream.stop()PubNubstyle (old)importtimefromrelayrimportClientc=Client(token='<my_access_token>')dev=c.get_device(id='<my_device_id>').get_info()user=c.get_user()app=c.get_app()defpubnub_callback(message,channel):print(repr(message),type(message))conn=user.connect_device(app,dev,pubnub_callback)conn.start()time.sleep(10)conn.stop()Switch a device’s LED on/offfromrelayrimportClientc=Client(token='<my_access_token>')d=c.get_device(id='<my_device_id>')d.switch_led_on(True)DocumentationFor references to the full documenation for the Python library please visit
our Developer DashboardPython section!
Package: relay-sdk
This is the Python SDK for use with the internalRelayservice APIs.
The SDK requires Python 3.8.It is intended for use by integration authors who are building containers to run
inside the service. For running workflows and interacting with the user-facing
service APIs, use theRelay CLI.The API documentation is auto-generated from the source code. Here are some
higher-level examples that show the main SDK classes that integration authors
will interact with.InstallationThe SDK is available to install viapip:pip install relay-sdkIf you use therelaysh/core:latest-pythoncontainer image as your base
image, it’ll be pre-installed.UsageThe main purpose of the SDK is to provide helpers for interacting with Relay’s
metadata service. Each container that runs in Relay has access to this service,
which allows the container to read and write key-value data, emit events, and
generate logs.Accessing Data from the step specTheInterface classis the primary way to interact with the service.
Import it and instantiate an object, then call methods on that object to access metadata,
which comes from thespecsection of the step and global Connection information.
TheDynamicclass provides syntactic sugar for getting data like connection credentials,
workflow-specific parameters, and secrets. It represents nested data structures as dot-separated
method accessors.fromrelay_sdkimportInterface,DynamicasDrelay=Interface()azuresecret=relay.get(D.azure.connection.secret)# using Dynamicazureclient=relay.get('azure["connection"]["clientID"]')# same as abovesecret=relay.get(D.mysecret)relay.outputs.set("outputkey","This will be the value of outputkey")Running WorkflowsTheWorkflow classoffers the methodrunto run a workflow.Use the following to run the workflowmy_workflowwith parameterparam_nameand valueparam_value:fromrelay_sdkimportInterfacerelay=Interface()relay.workflows.run('my_workflow',parameters={'param_name':'param_value'})Webhook TriggersTheWebhookServer classprovides a
helper that sets up a webserver to handle incoming requests for Trigger actions.This example, from theDocker Hub integration, makes use of
the Interface class to access theevents.emitmethod, which will cause
the workflow associated with this trigger to be run with the inline mapping
of workflow parameters to values extracted from the webhook payload.The WebhookServer class can run anyWSGIorASGIapplication passed to it. The
integrations the Relay team develops internally use theQuartweb app framework.fromrelay_sdkimportInterface,WebhookServerfromquartimportQuart,request,jsonify,make_responserelay=Interface()app=Quart('image-pushed')@app.route('/',methods=['POST'])asyncdefhandler():event_payload=awaitrequest.get_json()ifevent_payloadisNone:returnawaitmake_response(jsonify(message='not a valid Docker Hub event'),400)pd=event_payload['push_data']rd=event_payload['repository']relay.events.emit({'pushedAt':pd['pushed_at'],'pusher':pd['pusher'],'tag':pd['tag'],'name':rd['repo_name']})returnawaitmake_response(jsonify(message='success'),200)if__name__=='__main__':WebhookServer(app).serve_forever()