Saravanan666/pypi-org huggingface dataset:
Package: treniformis
Global Fishing Watch vessel lists.  Very alpha.Exampleimporttreniformistreniformis.get_annual_list_path('GFW/WKV/FISHING/KNOWN/2016')Developing$gitclonehttps://github.com/GlobalFishingWatch/treniformis$cdtreniformis$pipinstall-e.\[all\]$py.test--covtreniformis--cov-reportterm-missingListsLikely FishingGenerated from a query of vessels identifying themselves as fishing in theshiptype_textfield in the vessel identity messages in the type 5 and type
24 AIS messages. Details of the query can be found in Benthos #397. In the next
round we will filter out some additional “unknown” vessel types and probably
drop the threshold to include some vessels that almost always identify
themselves as fishing.Known FishingBased onpublic fishing registry records.Combined FishingProduced by combining likely and known fishing lists and then removing sets of
known non-fishing vessels (fish carriers, fishspotting helicopters, research
vessels) along with short mmsi’s (less than 5 digits)  and mmsi’s that will
likely have a large number of spoofing vessels (111111111). See Benthos #397.Vessel ClassesLonglinerPots and trapsPurse seinerSquid vesselTrawlerCargo/TankerMotorized Yacht/Pleasure CraftResearch/SurveySeismic vesselPassenger vessel: ferriesSail boatWork vessel: tug, pilot, supply, dredgers, military, patrolLicenseSeeLICENSE.txt
Package: trenzalore
ContentsPyCompressInstallationDevelopmentPyCompressPycompressoris a tool for compressing text files into smaller ones, as
well as extracting compressed files back into the original content.It can be used as a program or imported as a package module,
and use the functions defined on it.For example, in order to compress one file:$pycompress-c/usr/share/dict/words-d/tmp/compressed.zfThe original file, in this example has a size of~4.8M, and the tool left
the resulting file at/tmp/compressed.zf, with a size of~2.7M.In order to extract it:$pycompress-x/tmp/compressed.zf-d/tmp/originalYou can specify the name of the resulting file with the-dflag. If you
don’t indicate a name for the resulting file, the default will be<original-file>.comp.For the full options, run:$pycompress-hInstallationpipinstalltrenzaloreWill install the package and leave an application namedpycompressfor
using the command line utility.DevelopmentTo install the package in development mode, run:make devAnd run the tests with:make testTests have dependencies that can be installed by runningmake testdeps.Before submitting a pull request, run the checklist to make sure all
dependencies are met (code style/linting, tests, pass, etc.). This is automated
with:makechecklistThis will run the checks for the code style (make lint), as well as the
tests (make test).In order to check that the project runs with the supported Python versions,
run:maketox
Package: treq
treqis an HTTP library inspired byrequestsbut written on top ofTwisted’sAgents.It provides a simple, higher level API for making HTTP requests when
using Twisted.>>>importtreq>>>defdone(response):...print(response.code)...reactor.stop()>>>treq.get("https://github.com").addCallback(done)>>>fromtwisted.internetimportreactor>>>reactor.run()200For more inforead the docs.Contributingtreqdevelopment is hosted onGitHub.We welcome contributions: feel to fork and send contributions over.
SeeCONTRIBUTING.rstfor more info.Code of ConductRefer to theTwisted code of conduct.Copyright and Licensetreqis made available under the MIT license.
SeeLICENSEfor legal details and copyright notices.
Package: treq-kerberos
Kerberos authentication with Twisted’s treqtreq-kerberos adds Kerberos (SPNEGO/HTTP Negotiate) authentication for treq.treqis a requests-like library for
making HTTP requests asynchronously (non-blocking) using the Twisted framework.treq-kerberos is inspired byrequests-kerberos.Simple Example: making a requestGET a URL that requires Kerberos authentication:fromtreq_kerberosimportTreqKerberosAuthimporttreq_kerberosfromtwisted.internetimportdefer,reactor@defer.inlineCallbacksdefexample():url='https://errata.devel.redhat.com/'auth=TreqKerberosAuth()try:response=yieldtreq_kerberos.get(url,auth=auth)content=yieldresponse.content()print(content)exceptExceptionase:print(e)if__name__=='__main__':example().addCallback(lambdaign:reactor.stop())reactor.run()(See the full script atexamples/get.py.)Other HTTP methodstreq-kerberos implements the same basic API as treq, so you can call the
methods for each of the HTTP verbs:@defer.inlineCallbacksdefexample():url='https://example.com/'auth=TreqKerberosAuth()data={'my':'parameter'}# HTTP GETresponse=yieldtreq_kerberos.get(url,auth=auth)# HTTP PUTresponse=yieldtreq_kerberos.put(url,data=data,auth=auth)# HTTP POSTresponse=yieldtreq_kerberos.post(url,data=data,auth=auth)# HTTP PATCHresponse=yieldtreq_kerberos.patch(url,data=data,auth=auth)# HTTP HEAD (note that content() will always be blank)response=yieldtreq_kerberos.head(url,auth=auth)# HTTP DELETEresponse=yieldtreq_kerberos.delete(url,auth=auth)Alternatively you may also call the generalrequest()method:# HTTP GETresponse=yieldtreq_kerberos.request('GET',url,auth=auth)Preemptive authenticationOrdinarily, web clients attempt HTTP Negotiate authentication only after
receiving a HTTP401response from the web server. The client then retries
with the properAuthentication: Negotiate ...header.If you know your web server will always prompt for HTTP Negotiate
authentication, you can skip the first round-trip by setting theforce_preemptive=Truekeyword argument when instantiatingTreqKerberosAuth. (This behavior is identical to request-kerberos’sforce_preemptivekwarg forHTTPKerberosAuth.)@defer.inlineCallbacksdefexample():url='https://errata.devel.redhat.com/'auth=TreqKerberosAuth(force_preemptive=True)response=yieldtreq_kerberos.get(url,auth=auth)# ...Integration with treq upstreamAt the time of this writing, treq supports HTTP Basic authentication by passing
a(username, password)tuple via anauthkwarg.This module borrows that sameauthconcept. You pass in aTreqNegotiateAuthobject instead of the username and password tuple.Eventually treq may allow more flexible authentication designs that could be
suitable to third parties. When this is available in treq upstream, I want
treq-kerberos module to support it, ideally minimizing the API changes to
support such a future transition.TODO:Rewrite to use python-gssapi instead of python-kerberos (similar torequests-gssapi).Packages that use this packagetxkoji
Package: trequests
A Tornado async HTTP/HTTPS client adapter for python-requests.The problemYou enjoy usingTornadoto build fast non-blocking web applications, and you want to use a library from PyPI that makes a few HTTP requests, but pretty much every dev and their dog usesRequeststo make HTTP requests (rightly so, because it’sawesome), but requests has no knowledge of the event loop nor can it yield when a socket blocks, which means any time you try to use a library like that it begins to block your request handling and grud-knows what other worlds of pain.The solutionLuckily there are solutions, one such is to use thegreenletmodule to wrap blocking operations and swap Tornado coroutines at the right time, there is even the handytornaletmodule which handles this for you.To make life even easier, you lucky lucky people, I’ve createdtrequests, an async Requests adapter which uses greenlets (via tornalet) and the inbuilt non-blocking HTTP client methos in Tornado, to make any call to a library (utilizing Requests) non-blocking.Installation$pipinstalltrequestsUsage# Assume bobs_big_data uses python-requests for HTTP requestsimportbobs_big_datafromtornado.webimportRequestHandlerfromtrequestsimportsetup_sessionfromtornaletimporttornalet# Tell requests to use our AsyncHTTPadapter for the default# session instance, you can also pass you own throughsetup_session()classWebHandler(RequestHandler):@tornaletdefget(self):data={'foo':'bar'}# This will now unblock the current coroutine, like magicresponse=bobs_big_data.BigData(data).post()returnself.write(response)Caveatstrequestshas been used in production in a large scale metrics application, and is a very small and quite simple module.HoweverI’ve released it as0.9.xmainly because it’s missing 100% compatibility with the Requests adapter API, most noticeablycookie jarandsessionsupport, which I will improve (or please send me a pull request if you fancy adding support), and release as a1.xbranch when I have the time.Also at the moment thesetup_sessionutility actually monkey patches thesessionutility functions in Requests, as this was the only way I could see to override the mounts on “default” session instances (e.g. those created for every call when a session isn’t provided). I’m hoping to change this in the future.
Package: trequests_xsren
A Tornado async HTTP/HTTPS client adapter for python-requests.The problemYou enjoy usingTornadoto build fast non-blocking web applications, and you want to use a library from PyPI that makes a few HTTP requests, but pretty much every dev and their dog usesRequeststo make HTTP requests (rightly so, because it’sawesome), but requests has no knowledge of the event loop nor can it yield when a socket blocks, which means any time you try to use a library like that it begins to block your request handling and grud-knows what other worlds of pain.The solutionLuckily there are solutions, one such is to use thegreenletmodule to wrap blocking operations and swap Tornado coroutines at the right time, there is even the handytornaletmodule which handles this for you.To make life even easier, you lucky lucky people, I’ve createdtrequests, an async Requests adapter which uses greenlets (via tornalet) and the inbuilt non-blocking HTTP client methos in Tornado, to make any call to a library (utilizing Requests) non-blocking.Installation$pipinstalltrequestsUsage# Assume bobs_big_data uses python-requests for HTTP requestsimportbobs_big_datafromtornado.webimportRequestHandlerfromtrequestsimportsetup_sessionfromtornaletimporttornalet# Tell requests to use our AsyncHTTPadapter for the default# session instance, you can also pass you own throughsetup_session()classWebHandler(RequestHandler):@tornaletdefget(self):data={'foo':'bar'}# This will now unblock the current coroutine, like magicresponse=bobs_big_data.BigData(data).post()returnself.write(response)TestsTo run the basic testsuite hit uppython setup.py test.Caveatstrequestshas been used in production in a large scale metrics application, and is a very small and quite simple module.HoweverI’ve released it as0.9.xmainly because it’s missing 100% compatibility with the Requests adapter API, most noticeablycookie jarandsessionsupport, which I will improve (or please send me a pull request if you fancy adding support), and release as a1.xbranch when I have the time.Also at the moment thesetup_sessionutility actually monkey patches thesessionutility functions in Requests, as this was the only way I could see to override the mounts on “default” session instances (e.g. those created for every call when a session isn’t provided). I’m hoping to change this in the future.
Package: tres
tresTyped resolver (dependency container) for PythonIt provides a dependency container for you to use in typed dependency resolution.That's all. Very type resolution. Much wow.Inspired by the dependency container intsyringe, but more Pythonic.Usage:fromtresimportcontainer,InjectionTokendefa(n:int)->str:returnstr(n)defb(a:int,b:int)->int:returna+ba_token=InjectionToken[Callable[[int],str]]()b_token=InjectionToken[Callable[[int,int],int]]()container.register(a_token,a)container.register(b_token,b)container.register(b_token,a)# type errordefc(f:Callable[[int],str]):print(f(1))c(container[a_token])c(container[b_token])# type errorA longer example registering a Protocol# application logicfromtypingimportProtocol,IterableclassOrdersProtocol(Protocol):defbyId(self,id)->Order:...defgetLines(self,id)->Iterable[OrderLine]:...OrdersStoreToken=tres.InjectionToken[OrdersProtocol]()defcalculate_total(orders_store:OrdersProtocol,order_id):order=orders_store.byId(order_id)lines=orders_store.getLines(order_id)returnsum(line.priceforlineinlines)+order.shipping# implementationfromconfigimportURLfromdomainimportOrder,OrderLinefromapplicationimportOrdersProtocol,OrdersStoreTokenclassOrdersStore(OrdersProtocol):def__init__(self,url):self.url=urldefbyId(self,id):returnmap(Order,requests.get(f'{self.url}/order/{id}').json())defgetLines(self,id):returnmap(OrderLine,requests.get(f'{self.url}/order/{id}/lines').json())tres.container.register(OrdersStoreToken,OrdersStore(URL))# consumerfromapplicationimportcalculate_total,OrdersStoreTokendeforder_view(order_id):orders_store=tres.container[OrdersStoreToken]order=orders_store.byId(order_id)total=calculate_total(orders_store,order_id)returnf'{order.id}-{order.date}:{total}'
Package: tresbackup
ES backup toolCLI for easy ES backup and restore with simple tracking of non-modified indexesusage: tresbackup [-h] {backup,restore} ...

Makes a backup/restore of all (or specified) indices

positional arguments:
  {backup,restore}  sub-command help
    backup          backup help
    restore         restore help

optional arguments:
  -h, --help        show this help message and exitBackupusage: tresbackup backup [-h] -e es_url [--insecure] [-b batch_size] [-s scroll_time] [-t request_timeout] [-i [indexes ...]] [-x exclude] [-m meta_file] [-f force] [-o output_path]

optional arguments:
  -h, --help            show this help message and exit
  -e es_url, --es-url es_url
                        Elasticsearch url with url-encoded credentials (if required)
  --insecure            Disables HTTPS certificate verification
  -b batch_size, --batch-size batch_size
                        Elasticsearch batch size (size) parameter to fetch documents
  -s scroll_time, --scroll-time scroll_time
                        Elasticsearch scroll time parameter to fetch documents
  -t request_timeout, --timeout request_timeout
                        Elasticsearch request timeout in seconds
  -i [indexes ...], --index [indexes ...]
                        Index(es) to backup. If not specified, all indexes are backed up. ES regexes are supported
  -x exclude, --exclude exclude
                        Regular expression to exclude indexes. By default skips all indexes start with '.'
  -m meta_file, --meta-file meta_file
                        Path to metadata file to track indexes changes
  -f force, --force force
                        Ignores exising metadata file and creates backup of all specified indexes
  -o output_path, --output-path output_path
                        Path where backup archives will be storedRestoreusage: tresbackup restore [-h] -e es_url [--insecure] [-b batch_size] [-p threads] [-t request_timeout] -i [indexes ...]

optional arguments:
  -h, --help            show this help message and exit
  -e es_url, --es-url es_url
                        Elasticsearch url with url-encoded credentials (if required)
  --insecure            Disables HTTPS certificate verification
  -b batch_size, --batch-size batch_size
                        Elasticsearch batch size (size) parameter to index documents
  -p threads, --parallel-threads threads
                        Parallel threads to index data
  -t request_timeout, --timeout request_timeout
                        Elasticsearch request timeout in seconds
  -i [indexes ...], --index [indexes ...]
                        Paths to index(es) ZIPs to restore. If not specified, all indexes in current directory are restored.
Package: trest
TREST clientDescriptionBasic REST client with extended logging.FeaturesEvery request provide allure report step with all request and response data.Report data organised in a way convenient for testing API and repeating issues in Postman.Dataclass objects provided byjtolibrary can be used as request body.Useful for project organization.Client configuration usingConfigmodule.Print full request and response data to stdout. Useful for fast debugging.Provide oneline representation of request and response. Useful for mor accurate logging.ExamplesBasic usage:fromtrest.rest_requestimportRESTRequestrequest=RESTRequest(method='GET',url='https://api.ipify.org')response=request.send()Client configuration:fromtrest.configuration.configimportConfigConfig.one_line_response=TrueConfig.print_response_to_std_out=True
Package: trevorfrench
trevorfrenchtrevorfrench does not currently have any dependencies.:writing_hand: AuthorTrevor Frenchhttps://trevorfrench.com:arrow_double_down: Installation!pipinstalltrevorfrench--upgradeFunctions:stats.one_way_anovastats.one_way_anova(*args)*args: lists containing samples to analyzefromtrevorfrenchimportstatsasstatslist_1=[6.9,5.4,5.8,4.6,4.0]list_2=[8.3,6.8,7.8,9.2,6.5]list_3=[8.0,10.5,8.1,6.9,9.3]anova_table=stats.one_way_anova(list_1,list_2,list_3)print(anova_table)#RETURNS:# {#     'SST': 45.349333333333306#     , 'SSE': 17.452000000000005#     , 'SSR': 27.897333333333304#     , 'df_treatment': 2#     , 'df_error': 12#     , 'df_total': 14#     , 'MST': 13.948666666666652#     , 'MSE': 1.4543333333333337#     , 'F': 9.591107036442802# }ACTION LISTContinue adding statistical methods
Package: trevorproxy-serverless
TREVORproxy_serverlessSets up an autoscaling fargate cluster of SOCKS proxies to use along withTREVORproxy.trevorproxy_serverlessputs aproxy-intentmessage in an sqs queue which causes the proxy cluster to scale up if it is not already up.when stoppedtrevorproxy_serverlessdeletes theproxy-intentmessage to signal that it does not need the proxies anymore.the sqs queue has a message retention limit which acts as a hard timeout to prevent proxies from running too long.the message retention & proxy count can be adjusted troughterraform variables.Dependencies for infra.shaws cli (configured with enough permissions)terraformdockerjqtrevorproxy_serverless Installation$pipinstalltrevorproxy_serverlessNotesCost of one proxy instance running for an hour is 0,012$.PS: Fargate bills per minute spent so if you spin up 100 servers for 30 minutes it will cost 0,012 * 100 / 2 = 0,60$PS: Spin up time can take a few minutes because SQS pushes metrics to cloudwatch on an interval of 1 or 5 minues, the following aws regions support1 minute metrics, so they are recommended:
US East (Ohio),
EU (Ireland),
EU (Stockholm),
Asia Pacific (Tokyo)
Package: trex
Templatosaurus Rex: Create and manage project templates in your terminal 🦖🦖 What is trex?trex is a template manager in the form of a CLI app. You can create, organize, and clone-from template directories. It doesn’t matter if the template is a directory on your machine or a GitHub repository: with trex you only need a few seconds to actually get to coding. Not only that, but trex is really easy to use.🚧 Features and RoadmapOrganise templates (create, remove, list)Make project from local directory templateMake project from GitHub templateCreate git repository on creationRun scripts automatically on creationCreate virtualenv automatically and import requirements on creation→ Do you have any feature requests?Submit them here.☁️ Install trexMake sure you have Python 3.9 or above installed on your system.trex is available on PyPi and can be installed via pip with the following command:pip install trexCheck if the installation was successful:trex version📘 DocumentationRead more here →https://berrysauce.me/trex📜 Licensetrex: A modern and intuitive templating CLI
Copyright (C) 2022 berrysauce (Paul Haedrich)This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, seehttps://www.gnu.org/licenses/.For legal questions, contact legal[at]berrysauce[dot]me.
Package: t-rex
# T-Rex: Terminal Redis Explorer## Getting Started### Installation:`bash pip install t_rex `### Running` t_rex `C-dwill quit.Shiftkey will change focus to the different windows.### Development:Make sure you’re in a virtualenv that uses Python 3.7.Install the contents of the repo using pip in editable mode.`bash pip install-e. `Install the development dependencies:`bash pip install-rrequirements_dev.txt `Install the pre-commit hook:`bashpre-commitinstall `This will make sure the Python code formatterblackis run before you commit your file changes.Run your test usingpytest.`bash pytest `
Package: trex2champ
trex2champtrex2champ is a tool which allows to read output files of quantum
chemistry codes (GAMESS and trexio files) and write input files for
CHAMP in V3.0 format.InstallationYou can installtrex2champfrom PyPI:pip install trex2champUsageYou can use trex2champ by running the following command:trex2champ\--trex"filename.trexio"\--backend"HDF5"\--basis_prefix"BFD-aug-cc-pVDZ"\--lcao\--ecp\--sym\--geom\--basis\--detYou may also use the--helpflag to get more information about the available options:trex2champ--helpLicensetrex2champ is distributed under the terms of the MIT license.IssuesIf you encounter any problems, please report them on the Github issue tracker.AuthorDr. Ravindra Shinder.l.shinde@utwente.nl
Package: trex-api
# T-Rex API Python## InstallationYou can easily install the module with:`bash pip installtrex-api`## Usagereplace and act normally :DRemove:`python import trex_root_path `Add:`python import trex `now read trex-api document: [Document](http://trex-tgn.cisco.com/trex/doc/cp_docs/index.html).
Package: trexio-tools
TREXIO toolsSet of tools for TREXIO files.Requirementspython3 (>=3.6)trexio (>=1.0.0) [Python API]numpy (>=1.17.3)resultsFile [for GAMESS/GAU$$IAN conversion]docopt [for CLI]pyscf [only if you use the pyscf->trexio converter]InstallationInstallation via PyPI, periodically updatedpip install trexio-toolsInstallation from source codeClone the repositorygit clone https://github.com/TREX-CoE/trexio_tools.gitCreate an isolated virtual environment, for example usingpython3 -m venv trexio_toolsActivate the previously created environment, for example usingsource trexio_tools/bin/activateInstall the Python packages that are required fortrexio-toolsto workpip install -r requirements.txtInstalltrexio-toolsviapip(also works in--editablemode)pip install .Instructions for usersAfter installation,trexio-toolsprovides an entry point, which can be accessed via CLI:trexio --helpThis will list all currently supported command line arguments. For example,trexio convert-from -t gamess -i data/GAMESS_CAS.log -b hdf5 trexio_cas.hdf5converts data from theGAMESS_CAS.logoutput file of the GAMESS code
(note also-t gamessargument) into the TREXIO file calledtrexio_cas.hdf5using-b hdf5back end of TREXIO.and,trexio convert-from -t orca -i data/h2o.json -b hdf5 trexio_orca.hdf5Note that since ORCA AOs and MOs are in spherical coordinates, one needs to convert
these to cartesian to be able to usetrexiofunctions.trexio convert-to -t cartesian -o trexio_orca_cart.hdf5 trexio_orca.hdf5converts data from theh2o.jsonoutput file of the ORCA code
into the TREXIO file calledtrexio_orca.hdf5using-b hdf5back end of TREXIO
followed by converting the spherical AOs and MOs to cartesian coordinates.