Saravanan666/pypi-org huggingface dataset:
Package: opentracing-decorator
opentracing-decorator- A Python decorator for OpenTracing trace generation.Opentracing Decorator is a small Python library that adds a convenient
decorator for generating OpenTracing traces. It works with any client
implementation that follows the OpenTracing standard.Note:Opentracing Decorator is in early beta. Use in production at your own risk. Although the library is small and quite stable, some bugs arising from edge cases should be expected.Let's get started...# examples/simple.pyimporttimefromjaeger_clientimportConfigfromopentracing_decoratorimportTracing# No sampler host and port specified because the Jaeger client picks localhost:6831 by default.config=Config(config={"sampler":{"type":"const",# Not advised to have constant sampling in production."param":1,},"logging":True,},service_name="example-service",validate=True,)jaeger_tracer=config.initialize_tracer()# Pass in an instance of a tracer implementation.# Here, we're using the Jaeger client.tracing=Tracing(tracer=jaeger_tracer)# Decorate functions with the @tracing.trace decorator and an operation_name.@tracing.trace(operation_name="MyOperationName")defdo_some_work(x,y,z):returnx+y+zif__name__=="__main__":do_some_work(10,20,30)# Give some time to report traces.time.sleep(5)jaeger_tracer.close()FeaturesAutomatic Span tagging of function parameters (Opt-In).Automatic Span logging of function return values (Opt-In).Works with any OpenTracing compatible tracing client.JaegerZipkinInstallationInstall with pip:$pipinstallopentracing-decoratorOpentracing Decorator requires Python 3.6+.DocumentationProject documentation is available athttps://doughepi.github.io/opentracing-decorator/.For a run-through of all the basics, head over to theQuickStart.TheDeveloper Interfaceprovides a comprehensive API reference.To learn more about the OpenTracing standards, check outThe OpenTracing ProjectContributeIf you want to contribute to Opentracing Decorator check out theContributing Guideto learn how to start.DependenciesThe Opentracing Decorator project relies on these excellent libraries:opentracing- The no-op implementation of the OpenTracing standard.flatten-dict- To support some of the parameter tagging and return logging.— ⭐️ —Opentracing Decorator isMIT licensedcode. Designed & built in Minneapolis, MN. Used at General Mills.
Package: opentracing-prometheus
# OpenTracing PrometheusAn integration for opentracing and prometheus.It exposes the same metrics as jaeger and prometheus for golang.This package contains a PrometheusReporter and PrometheusMetricsFactoryThe reporter is used to report on metrics based on span contentsThe factory is used to report on metrics from jaeger itself.There is also a wsgi middleware that combines all the options.## Middleware```pythonfrom flask import Flask, make_responsefrom opentracing_prometheus import TracerMiddlewareimport loggingimport sysapp = Flask('prometheus-tracing')logging.basicConfig(stream=sys.stderr)log_level = logging.DEBUGlogging.getLogger('').handlers = []logging.basicConfig(format='%(asctime)s %(message)s', level=log_level)app.wsgi_app = TracerMiddleware(app)log = logging.getLogger()@app.route('/')def fetch_hello_world():resp = make_response('Hello, World!')resp.headers['Content-Type'] = 'text/plain'return respif __name__ == '__main__':app.run(host='0.0.0.0', port=5000)```You can then make a few requests to localhost:5000 and check the metrics at: http://localhost:5000/metrics
Package: opentracing-pyzipkin
Adapter between opentracing-python and py_zipkin.MotivationCurrently there are no great options for a Python 3 compatible opentracing
client. py_zipkin (https://github.com/Yelp/py_zipkin) is a Python 3 supporting
zipkin client which closely resembles the OpenTracing API. With minimal effort
we can create an adapter between opentracing-python
(https://github.com/opentracing/opentracing-python) and py_zipkin.
Package: opentrain
opentrain🚂 Fine-tune OpenAI models for text classification, question answering, and moreopentrainis a simple Python package to fine-tune OpenAI models for task-specific purposes such as text classification, token classification, or question answering.More information about OpenAI Fine-tuning athttps://platform.openai.com/docs/guides/fine-tuning.💻 Usage📦 Data managementimportopenaifromopentrainimportDatasetopenai.api_key="<ADD_OPENAI_API_KEY_HERE>"dataset=Dataset.from_file("data.jsonl")dataset.infodataset.download(output_path="downloaded-data.jsonl")🦾 Fine-tuneimportopenaifromopentrainimportTrainopenai.api_key="<ADD_OPENAI_API_KEY_HERE>"trainer=Train(model="ada")trainer.train([{"prompt":"I love to play soccer ->","completion":" soccer",},{"prompt":"I love to play basketball ->","completion":" basketball",},],)🤖 PredictimportopenaifromopentrainimportInferenceopenai.api_key="<ADD_OPENAI_API_KEY_HERE>"predict=Inference(model="ada:ft-personal-2021-03-01-00-00-01")predict.predict("I love to play ->")⚠️ WarningFine-tuning OpenAI models via their API may take too long, so please be patient. Also, bear in mind
that in some cases you just won't need to fine-tune an OpenAI model for your task.To keep track of all the models you fine-tuned, you should visithttps://platform.openai.com/account/usage,
and then in the "Daily usage breakdown (UTC)" you'll need to select the date where you triggered the
fine-tuning and click on "Fine-tune training" to see all the fine-tune training requests that you sent.Besides that, in the OpenAI Playground athttps://platform.openai.com/playground, you'll see a dropdown
menu for all the available models, both the default ones and the ones you fine-tuned. Usually, in the
following format<MODEL>:ft-personal-<DATE>, e.g.ada:ft-personal-2021-03-01-00-00-01.
Package: opentranslator
Opentranslator - OpenAI | ChatGPT | Translate with pythonOpentranslator is a simple command that can be used from the terminal to translate text (text plain or from a file). It uses OpenAI API to perform all operations, you can choose which ai engine to use by passing it as a parameter.The following project was born to study OpenAI and how it works.
If you would contribute open a pull request or issue on GitHub.Mantained byFabrizio CafollaUsageRequiredPython >= 3.7OpenAI AccountInput text# You can save your OPENAI_API_KEY permanently in the user's environment
export OPENAI_API_KEY="${YOUR_OPENAI_API_KEY}"

pip install opentranslator

opentranslator --translate english --text "Ciao Mondo!"Text from fileopentranslator --translate english --filepath examples/it.txtOtherArg -vvv: output all info with cost of request (in progress)Dev modeSetup envgit clone https://github.com/FabrizioCafolla/chatgpt-translate-app.git

cd chatgpt-translate-app

echo 'export OPENAI_API_KEY="${YOUR_OPENAI_API_KEY}"' > .env

chmod +x scritps/*.sh

./scripts/setup.sh

source .activateUsagepython opentranslator/app.py --filepath examples/it.txt --translate english

python opentranslator/app.py --filepath examples/en.txt --translate italian

python opentranslator/app.py --text "Ciao Mondo!" --translate englishContributorsLicenseThe project is made available under the GPL-3.0 license. See theLICENSEfile for more information.
Package: opentranslink
The OpenTranslink project aims to provide a simple pythonic interface to public data on translink.co.uk e.g. timetablesFree software: MIT licenseDocumentation:http://github.com/paddycarey/opentranslink.FeaturesRoute/Service listingsBus TimetablesFuture FeaturesA better/nicer API.Train timetablesTrain statusJourney PlannerRoute MapsUsageGetting startedOnce the library’s a bit more mature, it’ll be installable from pypi, but for now, just clone repo repo and runpython setup.py install.The top-level object in opentranslink (for now) is theService, you should initialise the service you need after importing the module:import opentranslink

# initialise a client for each available service
goldline = opentranslink.Service('goldline')
metro = opentranslink.Service('metro')
ulsterbus = opentranslink.Service('ulsterbus')Retrieving route listingsYou can retrieve a full list of routes for a given service using itsroute()method:>>> print metro.routes()
[<opentranslink.Route-1A>, <opentranslink.Route-1B>, <opentranslink.Route-1C>, ...]You can also retrieve a specific route using its code:>>> print metro.route('1A')
<opentranslink.Route-1A>Working with timetablesRoute objects contain atimetableproperty which is used to interact with any available timetable for the route:>>> route = goldline.route('273')
>>> print route.timetable
[
    (u'Mondays to Fridays', <dataset object>),
    (u'Saturdays', <dataset object>),
    (u'Sundays', <dataset object>),
    (u'Mondays to Fridays', <dataset object>),
    (u'Saturdays', <dataset object>),
    (u'Sundays', <dataset object>)
]timetablereturns a list of tuples. Each tuple returned contains a label for the corresponding dataset (better labels will be added soon, including inbound/outbound direction). the dataset objects shown are tablib.Dataset objects, you can read more about these in thetablib documentationInteracting with the dataset objects is simple:>>> dataset = route.timetable[0][1]

>>> # show list of stops on this route
>>> print dataset.headers
[u'Belfast City Centre, Europa Buscentre', u'Lurgan, Loughview Park and Ride Lough Road', ...]

>>> # show the timetable for the fifth bus of the day
>>> print zip(dataset.headers, dataset[4])
[(u'Belfast City Centre, Europa Buscentre', u'0835'), (u'Lurgan, Loughview Park and Ride Lough Road', u'0900'), ...]You can dump the timetable to a whole host of formats using tablib’s export features:>>> print dataset.json
>>> print dataset.csv
>>> print dataset.yaml
>>> print dataset.xlsReporting BugsReport bugs (there are lots, I know) athttps://github.com/paddycarey/opentranslink/issues.If you are reporting a bug, please include:Your operating system name and version.Any details about your local setup that might be helpful in troubleshooting.Detailed steps to reproduce the bug.
Package: opentree
[![Build Status](https://travis-ci.org/OpenTreeOfLife/python-opentree.svg?branch=master)](https://travis-ci.org/OpenTreeOfLife/python-opentree) [![Documentation](https://readthedocs.org/projects/opentree/badge/?version=latest&style=flat)](https://opentree.readthedocs.io/en/latest/) [![codecov](https://codecov.io/gh/OpenTreeOfLife/python-opentree/branch/main/graph/badge.svg)](https://codecov.io/gh/OpenTreeOfLife/python-opentree) [![NSF-1759846](https://img.shields.io/badge/NSF-1759846-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1759846) [![NSF-1759838](https://img.shields.io/badge/NSF-1759838-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1759838)This package is a python library designed to make it easier to work with web services and
data resources associated with the [Open Tree of Life](https://opentreeoflife.github.io)
project.
The git repo is athttps://github.com/OpenTreeOfLife/python-opentree.Please refer to [this markdown document](INSTALL.md) or opentree’s documentation websitehttps://opentree.readthedocs.io/en/latest/install.htmlfor more details on installation instructions, function usage, running tutorials, real life examples, and tools for developers.If you have questions or comments, submit a GitHub issue or email ejmctavish  ucmerced.edu.For examples scripts see:https://opentree.readthedocs.io/en/latest/running_examples.htmlFor example Jupyter notebooks see:https://opentree.readthedocs.io/en/latest/notebooks.htmlSSB 2020 workshop curriculum is posted at:
[Open Tree workshop](https://opentreeoflife.github.io/SSBworkshop)
at the [2020 SSB Meeting](https://systbiol.github.io/ssb2020/) in Gainesville, FL.
Package: opentriviadb
OpenTriviaDBAn asynchronous wrapper for theOpen Trivia DBAPI.This is an unofficial wrapper, and is not affiliated withPIXELTAIL GAMES LLC.InstallationTo install the latest stable version of OpenTriviaDB, use the following command:pipinstallopentriviadbYou can also install the latest development version using the following command:pipinstallgit+https://github.com/parafoxia/opentriviadbYou may need to prefix these commands with a call to the Python interpreter depending on your OS and Python configuration.UsageBefore you can pull questions from the API, you first need to create a client:fromopentriviadbimportClientclient=Client()# You can also use the client via a context manager.asyncwithClient()asclient:...To prevent duplicate questions being pulled, request a session token:awaitclient.request_token()You can now run a round of trivia!
Questions are yielded one at a time when needed, though you can use thelist()built-in function if you need them all available at once.
See theQuestiondocs for more information.asyncforqinclient.round():# Yields `Question` objects....Once you're done, you need to tear the client down:awaitclient.teardown()If you use the client via the context manager, the teardown method is called automatically.ContributingContributions are very much welcome!
To get started:Familiarise yourself with thecode of conductHave a look at thecontributing guideLicenseThe OpenTriviaDB module for Python is licensed under theBSD 3-Clause License.
Package: opentrons
The Opentrons API is a simple framework designed to make it easy to write automated biology lab protocols for Opentrons robots.This package can be used to simulate protocols on your computer without connecting to a robot. Please refer to ourFull API Documentationfor detailed instructions on how to write and simulate your first protocol.This package is now for use with the Opentrons Flex and Opentrons OT-2 only. For the software needed to run an Opentrons OT-One, please seeversions.Simulating ProtocolsTo simulate a protocol using this package, you can use the console scriptopentrons_simulate, which is installed when this package is installed from pip. For detailed information on how to run the script, runopentrons_simulate--help. In general, however, simulating a protocol is as simple as runningopentrons_simulate.exeC:\path\to\protocolon Windows oropentrons_simulate /path/to/protocolon OSX or Linux.The simulation script can also be invoked through python withpython-mopentrons.simulate /path/to/protocol.This also provides an entrypoint to use the Opentrons simulation package from other Python contexts such as an interactive prompt or Jupyter. To simulate a protocol in python, open a file containing a protocol and pass it toopentrons.simulate.simulate:importopentrons.simulateprotocol_file=open('/path/to/protocol.py')opentrons.simulate.simulate(protocol_file)The function will either run and return or raise an  exception if there is a problem with the protocol.ConfigurationThe module has a lot of configuration, some of which is only relevant when running on an actual robot, but some of which could be useful during simulation. When the module is first imported, it will try and write configuration files in~/.opentrons/config.json(C:\Users\%USERNAME%\.opentrons\config.jsonon Windows). This contains mostly paths to other configuration files and directories, most of which will be in that folder. The location can be changed by setting the environment variableOT_API_CONFIG_DIRto another path. Inividual settings in the config file can be overridden by setting environment variables named likeOT_API_${UPPERCASED_VAR_NAME}(for instance, to override theserial_log_fileconfig element you could set the environment variableOT_API_SERIAL_LOG_FILEto a different path).Note On VersionsThis API is for locally simulating protocols for the Flex or OT-2 without connecting to a robot. It no longer controls an OT-One.Version 2.5.2was the final release of this API for the OT-One. If you want to download this API to use the OT-One, you should download it withpipinstallopentrons==2.5.2For APIs between 2.5.2 and 3.7.0, there is no PyPI package available. Those APIs should be installed by cloning this repo and following the instructions inthe Development Setup section of CONTRIBUTING.mdandthe API readme.
Package: opentrons-http-api-client
Opentrons Python APISimple (and currently incomplete) Python wrapper around the Opentrons HTTP API. Likehttps://github.com/Opentrons/opentrons/tree/edge/api-client, but in Python. This API is atomic and interactive.This project is created for use withPyLabRobot, but can be used however you like.Installationfrom pippipinstallopentrons-http-api-clientfrom sourcegit clone http://github.com/rickwierenga/opentrons-python-apiUsageMinimal example for simple liquid handling:importot_apiot_api.set_host("x.x.x.x")# find in OT appot_api.set_port(31950)# default, so not really necessary# Creating a runrun_id=ot_api.runs.create()ot_api.set_run(run_id)# set run globally, alternative to `run_id` parameter for functions# Add pipettes that are detected in hardware to the softwareleft_pipette,right_pipette=ot_api.lh.add_mounted_pipettes()left_pipette_id=left_pipette["pipetteId"]# Defining labwarelabware_def=ot_api.labware.define(labware_definition)# json from opentrons-shared-data# Adding labwarelabware_id=ot_api.labware.add(labware_def,slot=1)# Picking up a tipot_api.lh.pick_up_tip(labware_id=labware_id,well_name="A1",pipette_id=left_pipette_id)# Aspiratingot_api.lh.aspirate(labware_id=labware_id,well_name="A1",pipette_id=left_pipette_id,flow_rate=10,volume=10)# Dispensingot_api.lh.dispense(labware_id=labware_id,well_name="A1",pipette_id=left_pipette_id,flow_rate=10,volume=10)# Tip dropot_api.lh.drop_tip(labware_id=labware_id,well_name="A1",pipette_id=left_pipette_id)Note: the ot_api is blocking!NoticeThis project is not affiliated with Opentrons.This project is created for the Sculpting Evolution group at the MIT Media Lab.SeeLICENSE
Package: opents
PyOpenTSPyOpenTS is a library specifically designed to integrate methods and modules for time series. Its purpose is to allow users of this library to call and modify time series modules in a simpler and more convenient way. By using PyOpenTS, you can simplify the time series code process and reliably provide time series related module functions.Homepage and DocumentationHomepage:https://github.com/PyOpenTS/PyOpenTSDocumentation:https://opents.readthedocs.io/en/latest/Our GoalOur goal is to simplify the process of handling time series code so that users can more easily tackle various time series problems. Whether you are a data scientist, an engineer, a researcher, or someone interested in time series, PyOpenTS will be a powerful tool for you.FeaturesA clean API for quickly calling and modifying time series modulesProvides a range of methods and models for time series analysis, including but not limited to forecasting, clustering, classification, etc.Continuous updates and improvements to meet user needsInstallationUse the following commands below:pip install -u opentsExamplesMethod DemoLinkBaselineGoLogitNormGoOpenMaxGoFuture PlansWe will continue to update and improve PyOpenTS and gradually add some demo usage methods to show how to use this library. Please stay tuned for our updates.How to Get HelpIf you encounter any problems during use, feel free to submit them to Issues. We also welcome your suggestions for improving PyOpenTS. We hope that PyOpenTS can become a powerful assistant for you in dealing with time series problems.
Package: openttd-helpers
openttd-helpersA repository full of small bits of Python code, commonly used in other
projects developed for OpenTTD.To increase maintainability and to decrease code duplication, this repository
was created.Usagepip install openttd-helpersSeeexamples/folder for example use, or look into OpenTTD repositories containing Python code.Modulesasyncio_helperHelpers to make the user ofayncioeasier.task:enable_strong_referenced_tasks()makes returned tasks fromayncio.create_taskstrong, so they are not garbage collected unexpectedly.click_helperHelpers to make the use ofclickeasier.command: by default, add-hto the allowed parameters.extend: allow extending aclick.command()in other functions.import_module: used in combination withChoice, to auto-load modules based on the choice.logging_helperSetup a default logger via aclick.extend()function.sentry_helperSetup Sentry via aclick.extend()function.
Package: openttd-protocol
openttd-protocolThis library implements the OpenTTD network protocol.
It mostly is meant to be used for OpenTTD's backend services, likeBaNaNaS serverandmaster server.Usagepip install openttd-protocolNow in your Python code you can import the protocol.
Example:importasyncioimportloggingfromopenttd_protocol.protocol.coordinatorimportCoordinatorProtocollog=logging.getLogger(__name__)classApplication:asyncdefreceive_PACKET_COORDINATOR_CLIENT_REGISTER(self,source,protocol_version,game_type,server_port):# Your logic goes herepassdefmain():application=Application()loop=asyncio.get_event_loop()server=loop.run_until_complete(loop.create_server(lambda:CoordinatorProtocol(application),host="127.0.0.1",port=12345,reuse_port=True,start_serving=True))try:loop.run_until_complete(server.serve_forever())exceptKeyboardInterrupt:passlog.info("Shutting down game_coordinator ...")server.close()if__name__=="__main__":main()
Package: opentty
OpenTTY 1.6.3 "The Resources Upgrade"This is OpenTTY, a terminal emulatortotally created in python that run a minimalistversion of shell into your system (Windows and Linux)is supported by app.OpenTTY 98This is OpenTTY 98!In this release family the focus is implement somefunctions into OpenTTY and turn the users experience morecool and funny. If you found an issue, please report andhelp development team to turn the OpenTTY better.Release NotesThis release is focused in OpenTTY performance, it removesome unnecessary flags from module kernel and compact manymethods for turn they more fast.NetPy added into Netman PluginTheNetPyis a chat service that create a two-directionalmessage, it's inspired in GNU Utility (netcat).NetPyis only used to create the server, to connect into oneyou need use the classic command of OpenTTYconnectMoved utility dir for lsattrThe python access for the python functiondirto the newcommandlsattrthat not require the parenthesis 'cause it isnot directed on internal runtime but interpreted by Shell.OpenTTY.connect added argumentmakepipeto warp to consoleIn the last release of OpenTTY, a minimal bug in Shell Out-runnerthat the pipes for console wasn't created, and it result in theimpossibility for acess the console.Restricted commandreloadonly for debugmodeBug fix for 'no quit for python console'Contributors: Mr. LimaGitHub Repository:https://github.com/fetuber4095/OpenTTY