Saravanan666/pypi-org huggingface dataset:
Package: esmerald-timing
Esmerald Datadog🚀 ASGI integration with TimingASGIMiddleware for Esmerald . 🚀Esmerald Documentation:https://esmerald.dymmond.com📚Esmerald Source Code:https://github.com/dymmond/esmeraldMotivationThis is an Esmerald integration to use theTimingMiddleware.TimingMiddlewarefor ASGI is useful for automatic
instrumentation of ASGI endpoints.This package is an extension allowing the integration with Esmerald.RequirementsPython 3.7 +EsmeraldUsageimportuvicornfromesmerald_timing.integrationsimportEsmeraldScopeToNamefromtiming_asgiimportTimingClient,TimingMiddlewarefromesmeraldimportGateway,Request,getfromesmerald.applicationsimportEsmeraldfromesmerald.responsesimportPlainTextResponseclassPrintTimings(TimingClient):deftiming(self,metric_name,timing,tags):print(metric_name,timing,tags)@get("/")defhomepage(request:Request)->PlainTextResponse:returnPlainTextResponse("Welcome to Esmerald!")app=Esmerald(routes=[Gateway(handler=homepage)])app.add_middleware(TimingMiddleware,client=PrintTimings(),metric_namer=EsmeraldScopeToName(prefix="myapp",esmerald_app=app),)if__name__=="__main__":uvicorn.run(app)Running this example and sending some requests:$pythonapp.py
INFO:Startedserverprocess[18769]INFO:Waitingforapplicationstartup.
INFO:Applicationstartupcomplete.
INFO:Uvicornrunningonhttp://127.0.0.1:8000(PressCTRL+Ctoquit)INFO:127.0.0.1:58132-"GET / HTTP/1.1"200OK
myapp.__main__.homepage0.0009038448333740234['http_status:200','http_method:GET','time:wall']myapp.__main__.homepage0.0008970000000000367['http_status:200','http_method:GET','time:cpu']myapp.favicon.ico0.0006134510040283203['http_status:404','http_method:GET','time:wall']myapp.favicon.ico0.0006120000000000569['http_status:404','http_method:GET','time:cpu']INFO:127.0.0.1:58132-"GET / HTTP/1.1"200OK
myapp.__main__.homepage0.000881195068359375['http_status:200','http_method:GET','time:wall']myapp.__main__.homepage0.0008829999999999671['http_status:200','http_method:GET','time:cpu']INFO:127.0.0.1:58132-"GET / HTTP/1.1"200OK
myapp.__main__.homepage0.0014600753784179688['http_status:200','http_method:GET','time:wall']myapp.__main__.homepage0.0014729999999998356['http_status:200','http_method:GET','time:cpu']
Package: esmf-aspect-model-loader
The Aspect Model Loader as part of the Python SDK provided by theEclipse Semantic Modeling Framework.An Aspect of the Meta ModelTheesmf-aspect-model-loaderpackage provides the Python implementation for the SAMM Aspect Meta Model, or SAMM.
Each Meta Model element and each Characteristic class is represented by an interface with a corresponding
implementation.UsageAn Aspect of the Meta Model can be created as follows using the providedAspectInstantiator.aspect_loader = AspectLoader()
aspect = aspect_loader.load_aspect_model("absolute/path/to/turtle.ttl");oraspect_loader = AspectLoader()
aspect = aspect_loader.load_aspect_model_from_multiple_files(["list/of/absolute/paths/to/turtles.ttl"], "aspect_urn");Automatic DeploymentAGitHub action called 'Release'has been set up for theesmf-aspect-model-loader. This action checks the code quality by running tests, thestatic type checker MyPyand
thecode formatter 'Black'.Set Up SAMM Aspect Meta Model for developmentIn order to download the SAMM sources, it is required to runpoetry installonce in theesmf-aspect-model-loadermodule. There are two possibilities to download the SAMM files and extract the Turtle sources for the Meta Model.Possibility 1 (downloading a release)Thedownload_samm_releasescript may be executed withpoetry run download-samm-releaseIt downloads a release JAR-file from GitHub and extracts the SAMM Files.
The version is specified in the python script.Link to all Releases:https://github.com/eclipse-esmf/esmf-semantic-aspect-meta-model/releasesPossibility 2 (downloading from the repository)It may happen that there is no .jar file that is up to date with the changes of the SAMM.
This script is an alternative to thedownload_samm_release.pyand extracts the files from the repository
directly instead of using the newest release.The script uses the GitHub API and downloads the files from themainbranch. If the script is run in a
pipeline, it uses a GitHub token to authorize. If the script is run locally, the API is called without a token.
This may cause problems because unauthorized API calls are limited.This script can be executed withpoetry run download-samm-branchto download and start working with the Aspect Model Loader.
Package: esmf-regrid
iris-esmf-regridOverviewThis project aims to provide a bridge betweenIrisandESMF. This takes the form of regridder classes
which take Iris cubes as their arguments and use ESMF to perform regridding
calculations. These classes are designed to perform well on cubes which have multiple
non-horizontal dimensions and lazy (Dask) data.
Both rectilinear and curvilinear grids as well as UGRID meshes have been supported.Further documentation can be foundhere.
Package: esmre
esmre - Efficient String Matching Regular Expressionsesmre is a Python module that can be used to speed up the execution of a large
collection of regular expressions. It works by building a index of compulsory
substrings from a collection of regular expressions, which it uses to quickly
exclude those expressions which trivially do not match each input.Here is some example code that uses esmre:>>>importesmre>>>index=esmre.Index()>>>index.enter(r"Major-General\W*$","savoy opera")>>>index.enter(r"\bway\W+haye?\b","sea shanty")>>>index.query("I am the very model of a modern Major-General.")['savoy opera']>>>index.query("Way, hay up she rises,")['sea shanty']>>>The esmre module builds on the simpler string matching facilities of the esm
module, which wraps a C implementation some of the algorithms described in
Aho's and Corasick's paper on efficient string matching [Aho, A.V, and
Corasick, M. J. Efficient String Matching: An Aid to Bibliographic Search.
Comm. ACM 18:6 (June 1975), 333-340]. Some minor modifications have been made
to the algorithms in the paper and one algorithm is missing (for now), but
there is enough to implement a quick string matching index.Here is some example code that uses esm directly:>>>importesm>>>index=esm.Index()>>>index.enter("he")>>>index.enter("she")>>>index.enter("his")>>>index.enter("hers")>>>index.fix()>>>index.query("this here is history")[((1, 4), 'his'), ((5, 7), 'he'), ((13, 16), 'his')]>>>index.query("Those are his sheep!")[((10, 13), 'his'), ((14, 17), 'she'), ((15, 17), 'he')]>>>You can see more usage examples in the tests.
Package: esmtools
a toolbox for Earth System Model analysisInstallationYou can install the latest release ofesmtoolsusingpiporconda:pipinstallesmtoolscondainstall-cconda-forgeesmtoolsYou can also install the bleeding edge (pre-release versions) by cloning this
repository and runningpip install .--upgradein the main directory.DocumentationDocumentation is in development and can be found onreadthedocs.
Package: esm-tools
ESM ToolsFor our complete documentation, please checkhttps://esm-tools.readthedocs.io/en/latest/index.html.Before you continueYou will need python 3 (possibly version 3.6 or newer), a version of git that is not ancient (everything newer than 2.10 should be good), and up-to-date pip (pip install-Upip) to install theesm_tools. That means that on the supported machines, you could for example use the following settings:ollie.awi.de:$ module load git
$ module load python3levante.dkrz.de:$ module load git
$ module load python3glogin.hlrn.de / blogin.hlrn.de:$ module load git
$ module load anaconda3juwels.fz-juelich.de:$ module load git
$ module load Python-3.6.8aleph:$ module load git
$ module load pythonNote that some machines might raise an errorconflict netcdf_cwhen loadinganaconda3. In that case you will need to swapnetcdf_cwithanaconda3:$ module unload netcdf_c
$ module load anaconda3InstallingFirst, make sure you add the following lines to one of your login or profile files, i.e.~/.bash_profile,~/.bashrc,~/.profile, etc.:$ export PATH=$PATH:~/.local/bin
$ export LC_ALL=en_US.UTF-8
$ export LANG=en_US.UTF-8Inside the same login or profile file, add also themodulecommands necessary for the HPC system you are using (find the lines in the section above).You can choose to source now your login or profile file, so that themoduleandexportcommands are run (e.g.$ source~/.bash_profile).To use the new version of the ESM-Tools, now rewritten in Python, clone this repository:$ git clone https://github.com/esm-tools/esm_tools.gitThen, run theinstall.sh:$ ./install.shYou should now have the command line toolsesm_masterandesm_runscripts, which replace the old version.History0.1.0 (2020-02-17)First release on gitlab.awi.de.
Package: esm-viz
esm-vizESM Vizis a command line tool to schedule automatic monitoring of Earth System Model simulations.Free software: GNU General Public License v3Documentation:https://esm-viz.readthedocs.io.First StepsThe easiest way to get started is:$esm_viz--helpThis will display a series of options you can use. In order to set up automatic monitoring for an experiment, you can useesm_viz templateInstallationFor AWI UsersOnpaleosrv1.awi.de; the software is already installed.For Other UsersThere are several external packages that need to be installed in order for everything to work correctly. The easiest way to get everything in one go is:$pipinstallesm_vizYou can then type$esm_vizconfigureThis will ask open up a configuration file for you to edit.Usage DemonstrationInteractively setting up a new monitoring job:$esm_vizSetting up a monitoring job from a YAML file:$esm_viz</PATH/TO/EXPERIMENT.yaml>Setting up a monitoring job from a YAML file already stored in${HOME}/.config/monitoring$esm_vizEXPERIMENTNoteThe.yamlextension is appended automatically!Performing only certain parts of a job:$# Only schedule a job to run every 2 hours:$esm_vizscheduleEXPERIMENT$# Schedule a job to run every 6 hours:$esm_vizschedule--frequency6EXPERIMENT$# Deploying monitoring scripts and running them on the supercomputer$# Note that the scripts actually run depend on the configuration file$esm_vizdeployEXPERIMENT$# Combining results into a webpage$esm_vizcombineEXPERIMENTIn the next section, the command line interface and python modules are explained in more detail. Then, we show an explanation about how to customize what is shown in the plots.
- - - -FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.HistoryUpcoming 0.9.6Py2/Py3 agnosticFileNotFoundErrorSSH Key generationInstalling withpip-vgives you a message about PATH and PYTHONPATH.
However, the-visrequiredfor this to show up. See here:https://github.com/pypa/pip/issues/29330.9.5 (2019-09-16)Install seems to work for Chris. Dependencies still need to be more tightly controlled.0.9.4 (2019-09-14)Lots of changes since the last update.Missing history, sorry. Version0.10.0planned onces Christopher can monitor a job.0.3.0 (2019-04-12)Monitoring update to include ECHAM Global Timeseries0.1.1 (2019-04-08)Happy birthday to Paul!Most of general analysis works for SLURM; only tested by Paul. PBS Queues are
in principle possible, but untested. This should be expanded.0.1.0 (2019-03-23)Start of project in this repository. It has other history; but that is
undocumented. See the proxy records…
Package: esncli
openpaas-esncliUsage:esncli[--config-fileCONFIG_FILE][-v][--version][-h][-d]-lLOGIN-pPASSWORD--urlURL[--hostHOST][--no-verify]{password,core-login,core-features,core-dav,core-email,core-web,core-webserver,core-session,core-openid-connect,inbox,contact,calendar,lemonldap,james,linshare,general,core-ldap,autoconf,whoami,domain-create}...Description of program init.esn.config.py.Positional arguments:{password,core-login,core-features,core-dav,core-email,core-web,core-webserver,core-session,core-openid-connect,inbox,contact,calendar,lemonldap,james,linshare,general,core-ldap,autoconf,whoami,domain-create}
    password            Description of password
    core-login          Description of core-login
    core-features       Description of core-features
    core-dav            Description of core-dav
    core-email          Description of core-email
    core-web            Description of core-web
    core-webserver      Description of core-webserver
    core-session        Description of core-session
    core-openid-connect Description of core-openid-connect
    inbox               Description of inbox
    contact             Description of contact
    calendar            Description of calendar
    lemonldap           Description of lemonldap
    james               Description of james
    linshare            Description of linshare
    general             Description of general
    core-ldap           Description of core-ldap
    autoconf            Description of autoconf
    whoami              Description of whoami
    domain-create       Create a domain in ESNOptional arguments:--config-file CONFIG_FILE
                        Other configuration file.
  -v, --verbose
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -d                    debug level : default : 0.
  -l LOGIN, --login LOGIN
                        Email of an administrator. You can set an env variable
                        ESN_CLI_LOGIN instead of this parameter.
  -p PASSWORD, --password PASSWORD
                        Password of the administrator. You can set an env
                        variable ESN_CLI_PASSWORD instead of this parameter.
  --url URL             Base url of esn like https://192.168.1.1. You can set
                        an env variable ESN_CLI_URL instead of this parameter.
  --host HOST           Vhost name to override IP if needed. ex 'op-
                        admin.openpaas.org'. You can set an env variable
                        ESN_CLI_HOST instead of this parameter.
  --no-verify           Do not verify SSL certificate
Package: esntorch
EsnTorch (version 1.0.6)Echo state networks (ESNs) for natural language processing (NLP).EsnTorchis a user-friendly python library designed for the implementation ofecho state networks (ESNs)in the context ofnatural language processing (NLP), and more specifically,
in the context oftext classification.EsnTorchis written inPyTorchand requires Python 3.7 or higher.InstallationThis library is distributed onPyPiand
can be installed withpip, as shown below:$ pip install esntorchThis command will automatically install the dependencies listed inrequirements.txttogether with the library itself.Please visit theinstallation pagefor more details.GitHubThe source code of the library is available onGitHub.
It can be cloned with the following command:$ git clone https://github.com/PlaytikaResearch/EsnTorch.gitOnce cloned, you can install the library by running one of the following commands
from the root directoryesntorch/:$ pip install .                        # install library + dependencies
$ pip install -r requirements.txt      # install dependenciesDocumentationThedocumentation pageprovides a detailed documentation of the library as well as tutorials covering
its main functionalities.More InfoTo create the HTML documentation run the following commands:$ cd docs
$ sphinx-apidoc -o source/ ../esntorch
$ make clean
$ make htmlTo make the library pip instalable, create and.whlfile and deploy it onPyPi.
Make sure thattwineis installed and run the following commands:$ python setup.py bdist_wheel
$ twine upload -r pypi dist/*LicenseMIT License.
Package: esoc-events
esoc_eventsDocumentation:https://r-andres.github.io/esoc_eventsSource Code:https://github.com/r-andres/esoc_eventsPyPI:https://pypi.org/project/esoc_events/Querying events comming from ESOC sourcesInstallationpipinstallesoc_eventsDevelopmentClone this repositoryRequirements:PoetryPython 3.7+Create a virtual environment and install the dependenciespoetryinstallActivate the virtual environmentpoetryshellTestingpytestDocumentationThe documentation is automatically generated from the content of thedocs directoryand from the docstrings
of the public signatures of the source code. The documentation is updated and published as aGithub project pageautomatically as part each release.ReleasingTrigger theDraft release workflow(pressRun workflow). This will update the changelog & version and create a GitHub release which is inDraftstate.Find the draft release from theGitHub releasesand publish it. When
a release is published, it'll triggerreleaseworkflow which creates PyPI
release and deploys updated documentation.Pre-commitPre-commit hooks run all the auto-formatters (e.g.black,isort), linters (e.g.mypy,flake8), and other quality
checks to make sure the changeset is in good shape before a commit/push happens.You can install the hooks with (runs for each commit):pre-commitinstallOr if you want them to run only for each push:pre-commitinstall-tpre-pushOr if you want e.g. want to run all checks manually for all files:pre-commitrun--all-filesThis project was generated using thewolt-python-package-cookiecuttertemplate.
Package: es-odm
es_odmODM (Object Document Mapper) for Elasticsearch based on Elasticsearch_dsl and Pydantic.
It's also a bridge connecting Mysql and Elasticsearch when using Sqlmodel, which also based on Pydantic.InstallationInstall usingpip install -U es_odm.A Simple Exampleimporttypingfromes_odmimportInnerESModel,ESModel,Field,ObjectFieldclassUserProfileODM(InnerESModel):"""user profile document"""user_id:int=Field(None,description="user id")nickname:str=Field(None,description="user nickname",keyword=True)avatar_url:str=Field(None,description="user avatar url",keyword=True)gender:int=Field(None,description="gender")address:str=Field(None,description="address",keyword=True)classUserODM(ESModel):"""user document"""id:int=Field(None,primary_key=True,description="ID")username:str=Field(None,description="login name",keyword=True)profile:typing.Union[ObjectField[UserProfileODM],dict]=Field(None,description="user profile",)classConfig:"""pydantic BaseModel Config"""arbitrary_types_allowed=TrueclassIndex:"""elasticsearch_dsl Document Index config"""name='test-index-name'settings={"number_of_shards":1,}deftest_odm_doc():doc_example={"id":1,"username":"test_username","profile":{"user_id":100,"nickname":"test_nickname","gender":1,"address":"test address"}}doc=UserODM(**doc_example)assertdoc_example==doc.to_dict()deftest_odm_mapping():cls=UserODMcls_mapping=cls._index.to_dict()es_mapping={"settings":{"number_of_shards":1},"mappings":{"properties":{"id":{"type":"integer"},"username":{"fields":{"keyword":{"type":"keyword"}},"type":"text"},"last_login":{"type":"date"},"profile":{"properties":{"user_id":{"type":"integer"},"nickname":{"fields":{"keyword":{"type":"keyword"}},"type":"text"},"avatar_url":{"fields":{"keyword":{"type":"keyword"}},"type":"text"},"gender":{"type":"integer"},"address":{"fields":{"keyword":{"type":"keyword"}},"type":"text"}},"type":"object"}}}}assertes_mapping==cls_mapping
Package: eso-downloader
A python package which provides an easy way to download data for a given ESO
observational program ID.Getting startedTo run eso-downloader, you will need to add your ESO portal username and
password to the system keyring (the secure place to store login details), and
create a config file detailing where to put the data.Storing passwords/credentialsThis package uses the keyring package (https://pypi.org/project/keyring) to
store passwords and other credentials. If keyring is unable to find a place to
store and read secrets from, see how to configure keyring athttps://keyring.readthedocs.io/en/stable/#configuring.To add your password to the keyring on your system, run:keyring set eso-downloader <your ESO portal username>and enter your ESO portal password (in the future, we hope that there will be
long-lasting tokens so that we do not need to store the portal password
directly).
To confirm that the password is saved, run:keyring get eso-downloader <your ESO portal username>Creating a config fileAn initial starter config file (in.iniformat) would be:[DEFAULT]
username = <your ESO portal username>
base_dir = <where you want to save the downloaded data>If you need to use different paths or different usernames for particular
programs, you can add sections for specific programs e.g.:[103.20AX.101]
username = <some other username>or:[98.13BA.215]
base_dir = <some other directory>Running the scriptThe script will use the config file and the list of program IDs passed to it to
download in parallel all the files needed for the reduction of the found science
files, skipping those already downloaded (see algorithm below).Doing:eso-downloader --config <path_to_config_file> <program_id> <program_id> ...will start the download. If sentSIGTERM, the script will stop requesting new
files, and finish downloading the files it was working on.
Package: esok
esokA CLI for Elasticsearch.esokmakes it easier to work with deployments of Elasticsearch across regions/sites, by allowing you to forward
the same command to multiple clusters. It's also just more human-friendly than finding old HTTP-requests in your shell
history.Note:This tool is still in pre-release stage. Expect breaking changes and bugs until version 1.0.0.Installpipxis the recommended tool for installingesok. This will make
sure you won't have any issues with conflicting dependencies.pipxinstallesok
esokconfig# View your config fileesok--help# Print helpNote: on Linux/Ubuntu systems, you might have to add~/.local/binto your path if your shell cannot find theesokcommand. See theinstallation instructions forpipx.Good oldpipalso works:pip3install-uesokOr, in a virtualenv:python3-mvenv.venvsource.venv/bin/activate
pip3installesokDevelopmentSetupRequirements (usually found in your package manager):Python 3.6toxTox helps you set up the virtualenv you need for development. Run the following commands in your cloned repo:tox-edevsource.venv/bin/activatepipinstall--editable.Now you should have theesokcommand available in your CLI. You can edit code without having to reinstall with pip.IntelliJ/PyCharm users: set thesrcfolder as the "Sources root" to get imports working correctly.
Mark generated folders as "Excluded" (such as.tox,.venv, etc.) to not confuse the IDE.
Package: eson
Extended JSON(ESON)JSON is great for sharing data in a human readable format but sometimes it lacks in object types support.
ESON does not re-invent the wheel, it just provides a base for you to implement extended JSON objects allowing you to
share data between services, apps and languages as objects.ESON comes with built in extensions for date and datetime. You can write your own extensions to manage
custom data.This is the python version of ESON. See other languageshereGetting StartedInstallRunpip install esonUsageBelow is a summary of various operations using eson.Click hereto open a live test environment.Encoding:fromdatetimeimportdatetime,dateimportesonuser={"name":"Jane Doe","date_of_birth":date.today(),"registered":datetime.now()}# Encoding the dataeson_data=eson.encode(user,pretty=True)# Sample output"""{"name": "Jane Doe","EsonDate~date_of_birth": {"year": 2020, "month": 04, "day": 10},"EsonDatetime~registered": {...}}"""Decodingimporteson# A timezone aware date objecteson_data='{"EsonDatetime~eatime": {"timestamp": 1588822240000400, "timezone": {"offset": 10800, "name": "EAT"}}}'data=eson.decode(eson_data)print(data.get("eatime"))# Expected output '2020-05-07 06:30:40.000400+03:00'Extending ESONYou can extend ESON to achieve various purposes, e.g loading a database entity when you recieve it's IDBelow is the sample code used to extend Date objects in ESONfromdatetimeimportdatefromesonimportEsonExtensionclassEsonDate(EsonExtension):# Extend this method, use it to check whether you should encode this valuedefshould_encode(self,value)->bool:returntype(value)==datedefencode(self,value):# Encode your value to valid JSON objectreturndict(year=value.year,month=value.month,day=value.day)defdecode(self,encoded_value):# Decode your object to an object relevant to your applicationreturndate(**encoded_value)Once an extension is created, at the entry of your application add the extension to ESONimportesoneson.add_extension(EsonDate)That's it, your extension is ready to encode objects.