Saravanan666/pypi-org huggingface dataset:
Package: trishula
Trishula - The modern parser combinator for Python 3Trishula is a parser combinator library extended PEG syntaxes, inspired by Parsimmon(ES) and boost::spirit::qi(C++).Trishula supports python version >= 3.7.0Examplesgrammar=(Value("aaa")>>(Value("bbb")|Value("ccc"))>>(+Value("eee")>=(lambdax:"modified"))>>-Value("f")>>Value("g")>>Regexp(r"a+")>>Not(Value("hhh")))# This worksprint(vars(Parser().parse(grammar,"aaaccceeeeeeeeeeeefgaaa")))# {#      'status': <Status.SUCCEED: 1>,#      'index': 23,#      'value': [[[[[['aaa', 'ccc'], 'modified'], 'f'], 'g'], 'aaa'], None]# }You can see examples in"example" directory(execute it under example directory).DescriptionGrammers can be defined byValueandRegexpprimitive and operators. Below we describe operators.OperatorsAs mentioned above, Trishula uses many operator overloads to make definition of parsers be easier.operatorresult>>Sequence|OrderedChoise~ZeroOrMore+OneOrMore-Optional>=Map@NamedParserand we have classes namedNotandAnd, which are made for prediction.RecursionTrishula supports recursion withRef. Recursion can be written like this:defgrammar():return((Value("[]")>=(lambdax:[]))|((Value("[")>>Ref(grammar)>>Value("]"))>=(lambdax:[x[0][1]])))defmain():result=Parser().parse(grammar(),"[[[]]]")print(vars(result))# => {'status': <Status.SUCCEED: 1>, 'index': 6, 'value': [[[]]]}Be aware thatRefexecutes function only once so that parser can be memorized.NamespaceNamespace is one of Trishula's powerful features. You can name your parser and retrieve values with map (as dict).Usage is simple. Mark the parser with@operator likeparser @ "name"and surround withNamespace(parser). Then you can grab values withNamespace(parser) => fn. fn is a callable taking dict type and returns new value.importtrishulaasTdefmain():grammar=T.Namespace(T.Value("[")>>(T.Regexp(r"[0-9]+")>=(float))@"value">>T.Value("]"))>=(lambdaa_dict:a_dict["value"])result=T.Parser().parse(grammar,"[12345]")print(vars(result))# ==> {'status': <Status.SUCCEED: 1>, 'index': 7, 'value': 12345.0, 'namespace': {}}main()Note that after mapped function called, internal namespace is cleaned up with empty dict.Conditional parsingYou can do something like this:defmain():defcond(value):d={"(":")","{":"}","[":"]",}returnT.Value(d.get(value[0]))grammar=T.Namespace(T.Value("[")>>+(T.Regexp(r"[a-z]")|T.Value("\n"))@"value">>T.Conditional(cond))result=T.Parser().parse(grammar,"[abcd\n\nefg]")print(result)main()Conditionaltake one argument that receive a value and return parser. It runs dynamically so that you can choose a parser at runtime.UtilsThere aresep_by,sep_by1, andindex.Generatorimport trishula as T


@T.define_parser
def parser():
    yield T.Value("aaa")
    v = yield T.Value("bbb")
    yield T.Value("ccc")
    # Do not forget to return a value
    yield v

print(T.Parser().parse(parser, "aaabbbccc"))
# ==> <Success index='9' value='bbb' namespace='{}'>
Package: trisicell
Trisicell - Scalable intratumor heterogeneity inference and validation
from single-cell dataTrisicell (Triple-toolkit forsingle-cellintratumor
heterogeneity inference), pronounced as “tricycle”, is a new computational
toolkit for scalable intratumor heterogeneity inference and evaluation from
single-cell RNA, as well as single-cell genome or exome, sequencing data.
Trisicell utilizes expressed SNVs and Indels to infer evolutionary
relationships between genomic alterations and the cells that harbor them.SupportFeel free to submit anissue.
Your help to improve Trisicell is highly appreciated.Trisicell was developed in collaboration between theCancer Data Science Laboratory (CDSL)and theLaboratory of Cancer Biology and Genetics (LCBG)at theNational Cancer Institute (NCI).
Package: trisigma
Trisigma$pipinstalltrisigmaTrisigma is an event-driven algo-trading framework. Its object-oriented representation of strategies makes it possible to completely seperate the trading logic from its target market. As a result, strategies can run on any market/brokerage firm,  backtested, and optimized without any additional tweaks.PlatformsBinance.comBinance.usInteractive Brokers (paper and live trade)Main FeaturesBinance.com, Binance.us and Interactive Brokers integrationWebull, Yahoo Finance and Binance historic data scraper.Backtesting and Strategy Optimizer.Google Sheets and Google Cloud Storage integration.Slack Channel Integration.
Package: tristeza
tristezaPython Boilerplate contains all the boilerplate you need to create a Python package.Free software: MIT licenseDocumentation:https://tristeza.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2021-06-19)First release on PyPI.
Package: tri.struct
tri.structtri.struct supplies classes that can be used like dictionaries and as objects with attribute access at the same time. There are two versions:Struct: mutable structFrozenStruct: immutable structSome niceties include:Predictable repr() so it’s easy to write testsmergedfunction call to merge different types of dicts into a new:merged(Struct(a=1), FrozenStruct(b=1), c=1) == Struct(a=1, b=1, c=1))Accelerated implementation in c for improved speed. (With python-only fallback reference implementation)Example>>>fromtri_structimportStruct>>>foo=Struct()>>>foo.a=1>>>foo['a']1>>>foo['a']=2>>>foo.a2Running testsYou need tox installed then justmake test.LicenseBSDDocumentationhttp://tristruct.readthedocs.org.Changelog4.1.0 (2021-02-01)Avoid setting confusing context on AttributeError exceptions (from when not finding __missing__)4.0.0 (2020-12-20)Split c implementation to separateFastStruct. The native python implementation is now always theStruct3.1.0 (2019-08-14)Override __copy__ for Frozen. This is an optimization that was found in big uses of tri.token.3.0.1 (2019-06-12)Problems with pypi, this is the same as 3.0.13.0.0 (2019-06-04)Renamed module fromtri.structtotri_struct. This is a breaking change.Dropped python2 support2.5.7 (2018-11-16)Fixed performance issue withFrozen/FrozenStruct: the hash was recalculated on each use instead of cached.2.5.6 (2018-06-26)Fixed release functionality2.5.5 (2018-02-20)Fixed segfault in repr when running under Python 32.5.4 (2017-06-13)AddedDefaultStructin the spirit of the standard librarydefaultdict.
Also added ato_default_structfor recursively converting dicts recursively.2.5.3 (2017-02-10)Fix use-after-free when repring aStructthat contains
itself more than once.2.5.2 (2016-04-07)Fix make and tox targets for build and release.Fix lint issues.2.5.1 (2015-12-15)Bugfix: Fix compilation of the _cstruct module.2.5.0 (unreleased)Build changes.2.4.0 (2015-12-08)Improvement: If a Struct subclass implements the__missing__method,
it will not be called before GetAttr on attribute access, but will be
called before GetAttr on dict access.2.3.1 (2015-12-07)Bugfix: Clear KeyError in CStruct getattr before trying GetAttr,
otherwise the KeyError may “leak out”. Also, only clear the error
and attempt GetAttr if the original error was a KeyError.2.3.0 (2015-12-02)Add mixin classFrozento make read-only versions of a dict-derived
class (typically a Struct or a subclass there of.)Use theFrozenmixin to implementFrozenStruct2.2.0 (2015-11-12)Add keyword arguments tomergedfunction.2.1.2 (2015-11-11)Redo the C implementation to be a “heaptype”, and remove the hack of
setting__dict__=self. Instead,objectwill control the type
storage, letting us “insert” attributes into the object without
polluting thedict.2.0 (unreleased)slim down interface to again match dictadd tri.struct.merged function to join structsadd optional C implementation to speed up instantiation1.0 (2015-09-29)Struct with attribute & dict interface__add__ and __or__ to combine structs
Package: tritise
tritiseA small python library to handle trivial time series in an SQLite database.Installationpip install tritiseExamplefromtritiseimportTritiset=Tritise('test.sqlite')t.add(1.1)t.add(2)t.add(3.0)print(t.all())print(t.last().value)fromdateutil.parserimportparset.add(-1,tag='historic',timestamp=parse('1.1.2000'))t.add(5,tag='historic',timestamp=parse('15.3.2001'))t.add(200,tag='historic',timestamp=parse('21.9.2002'))t.all('historic')t.range(start_date=parse('1.1.2001'),end_date=parse('31.12.2001'),tag='historic')Command line toolTritise ships a command line tool (tritise) to inspect the created databases.Runtritise --helpfor more information.CLI Exampletritise dump -d test.sqlite
Package: tritium-remote
tritium_remoteA library for interacting with Tritium systems.Hosted docs are here(require login).Connects to a running Tritium system by WebSocketUses GraphQL to send commands and request dataImplemented in Rust with bindings to other languages:PythonThis library is currently only published and tested on Linux. However the rust crate ought to work on other platforms.This is only to be used on a trusted local network.The Tritium system will be accessed over LAN without encryption.APIsSequence playbackStart & stop sequenceScriptingStart & stop scriptsPost messages to named channels to which scripts may subscribeGeneric Queries and MutationsExecute user-supplied GraphQL query or mutation documentsOptional variables, supplied as JSONAny response is returned as a JSON encoded objectRunning ExamplesThe Rust and Python examples use theTRITIUM_AUTH_TOKENenvironment variable to get the JWT access token they need.To generate an access token...Log into theTritium cloud UIConnect to your locally-running systemGo to the "Scripts" pageSelect the API Keys tabClick "CREATE AN API KEY"$exportTRITIUM_AUTH_TOKEN="{paste token here}"$cargorun--examplesystem_infoLicenseThis project is licensed under either ofApache License, Version 2.0, (LICENSE-APACHEorhttp://www.apache.org/licenses/LICENSE-2.0)MIT license (LICENSE-MITorhttp://opensource.org/licenses/MIT)at your option.
Package: tritonclient-futures
tritonclient-futures特性基于标准库concurrent与requests封装.完整复现tritonclient，上手简单.安装pip install tritonclient-futures示例from tritonclient_futures import InferenceServerClient, InferInput, InferRequestedOutput, as_completed# 客户端初始化
## url: tritonserver http url
## concurrency: 线程数
## pool_connections: 连接池个数
## pool_maxsize: 连接池的连接个数
client = InferenceServerClient(url='127.0.0.1:8000', concurrency=100, pool_connections=100, pool_maxsize=200)# 同步调用
client.infer(model_name=model_name, inputs=inputs, outputs=outputs)

# 异步调用
fs = []
for i in iters:
    fs.append(client.async_infer(model_name=i["model_name"], inputs=i["inputs"], outputs=i["outputs"]))

resps = [f.get_result() for f in as_completed(fs)]性能不如grpc，不如gevent/aio
Package: triton-dns-client
Triton DNS clientTriton is a simple DNS client made for better understanding of DNS protocolInstallationFrom PYPIpip3 install triton-dns-clientFrom this repogitclonehttps://git.best-service.online/yurzs/triton.gitcdtritonpython3setup.pyinstallHow to useHere is an example query for A record of this gitlab instance>>>importtriton>>>a=triton.sync_query('8.8.8.8','google.com')>>>print(a.to_json()){"header":{"id":37920,"qr":1,"opcode":0,"aa":0,"tc":0,"rd":1,"ra":1,"z":0,"rcode":0,"qdcount":1,"ancount":6,"nscount":0,"arcount":0},"question":[{"name":"google.com","type":1,"class":1}],"answer":[{"name":"google.com","type":"A","class":1,"ttl":257,"rdata":{"address":"64.233.165.113"}},{"name":"google.com","type":"A","class":1,"ttl":257,"rdata":{"address":"64.233.165.102"}},{"name":"google.com","type":"A","class":1,"ttl":257,"rdata":{"address":"64.233.165.101"}},{"name":"google.com","type":"A","class":1,"ttl":257,"rdata":{"address":"64.233.165.139"}},{"name":"google.com","type":"A","class":1,"ttl":257,"rdata":{"address":"64.233.165.100"}},{"name":"google.com","type":"A","class":1,"ttl":257,"rdata":{"address":"64.233.165.138"}}],"authority":[],"additional":[]}For demonstration purposes sync function is used.Calltriton.queryfor async versionTree resolveAlso there is experimental full DNS tree resolve function>>>importtriton>>>a=triton.sync_full_chain('git.best-service.online',1)>>>print(a.to_json()){"header":{"id":45902,"qr":1,"opcode":0,"aa":1,"tc":0,"rd":1,"ra":0,"z":0,"rcode":0,"qdcount":1,"ancount":1,"nscount":1,"arcount":1},"question":[{"name":"git.best-service.online","type":1,"class":1}],"answer":[{"name":"git.best-service.online","type":"A","class":1,"ttl":1000,"rdata":{"address":"80.211.196.34"}}],"authority":[{"name":"best-service.online","type":"NS","class":1,"ttl":100,"rdata":{"nsdname":"dns-core.best-service.online"}}],"additional":[{"name":"dns-core.best-service.online","type":"A","class":1,"ttl":1000,"rdata":{"address":"163.172.161.149"}}]}For demonstration purposes sync function is used.Calltriton.full_chainfor async versionTODO ListEnable EDNSAdd DNSSEC Resource Record typesList of available resource record typesAAAAANSTXTSOAOPTRRSIGDNSKEYDSNSECNSEC3NSEC3PARAMCurrently supported DNSSEC algorithmsRSASHA1RSASHA256RSASHA512ECCGOSTRSA_NSEC3_SHA1DSADSA_NSEC3_SHA1ECDSAP256SHA256ECDSAP256SHA384ED448ED25519
Package: tritondse
TritonDSETritonDSE is a Python library providing exploration capabilities to Triton
and some refinement easing its usage. This library is primarily designed
to perform pure emulation symbolic execution even though it can also be
applied under different settings. It works by performing an elementary
loading of the program and starts exploring from the entrypoint. The whole
exploration can be instrumented using a hook mechanism enabling to obtain
a handle on various events.At the moment solely ELF and Linux are supported. But further development
can lead to more platform. Furthermore it provides facilities on the C
runtime and it has not been tested on other types of programs.DocumentationTritonDSE goal is to provide higher-level primitives thanTriton.
Triton is a low-level framework where one have to provide manually all instructions to be executed
symbolically. As such, TritonDSE provides the following features:Loader mechanism (based onLIEF,cleor custom ones)Memory segmentationCoverage strategies (block, edge, path)Pointer coverageAutomatic input injection on stdin, argvInput replay with QBDIinput scheduling(customizable)sanitizer mechanismbasic heap allocatorsome libc symbolic stubsQuick startInstallationDocumentationInstallationpipinstalltritondseThe pip package will install all dependencies.DocumentationA complete documentation on how to use TritonDSE is available onGithub pages.External ContributorsJonathan SalwanRichard Abou ChaayaAll contributions*
Package: triton-requests
Python package to interact with Nvidia Triton Serverfromtriton_requestsimportTritonEndPointtep=TritonEndPoint(model_name="emotion-english-distilroberta-base_onnx_inference",url="localhost:9000")tep.encode("Harry is really happy after his present")Will result a numpy arrayarray([[-1.1953125 , -2.4921875 , -2.8964844 ,  4.9921875 ,  0.35498047, 0.70458984,  1.9570312 ]], dtype=float32)
Package: tritonv2
tritonv2A client library for promote triton official clientInstallationpipinstalltritonv2==1.2.9UsageFirst, you need to create a client object.fromtritonv2.client_factoryimportTritonClientFactoryserver_url="localhost:8000"http_client=TritonClientFactory.create_grpc_client(server_url)orasyncwithTritonClientFactory.create_http_aio_client(server_url)ashttp_aio_clientorgrpc_client=TritonClientFactory.create_grpc_client(server_url)orasyncwithTritonClientFactory.create_grpc_aio_client(server_url)asgrpc_aio_clientIn addition, you can set retry for grpc client:client=TritonClientFactory.create_grpc_client(server_url,num_retries=3,max_interval_secs=20,base_interval_secs=0.3)for http client we have default setting:NUMBER_RETRIES=3MAX_INTERVAL_SECS=20BASE_INTERVAL_SECS=0.3Now you can easy use the client to send requests to the server.for server:client.server_live()client.server_ready()client.server_metadata()for model:client.model_metadata(model_name)client.model_config(model_name)client.model_ready(model_name)client.model_statistics(model_name)for infer:client.model_infer(model_name,inputs,model_version,outputs)client.stream_infer(inputs_iterator)for repository:client.repository_index()client.repository_model_load(model_name)client.repository_model_unload(model_name)for system shared memory:client.system_shared_memory_status()client.system_shared_memory_register()client.system_shared_memory_unregister()for cuda shared memory:client.cuda_shared_memory_status()client.cuda_shared_memory_register()client.cuda_shared_memory_unregister()for trace setting:client.trace_setting()client.get_trace_settings()
Package: tritony
tritony - Tiny configuration for Triton Inference ServerWhat is this?If you seethe official example, it is really confusing to use where to start.Use tritony! You will get really short lines of code like example below.importargparseimportosfromglobimportglobimportnumpyasnpfromPILimportImagefromtritonyimportInferenceClientdefpreprocess(img,dtype=np.float32,h=224,w=224,scaling="INCEPTION"):sample_img=img.convert("RGB")resized_img=sample_img.resize((w,h),Image.Resampling.BILINEAR)resized=np.array(resized_img)ifresized.ndim==2:resized=resized[:,:,np.newaxis]scaled=(resized/127.5)-1ordered=np.transpose(scaled,(2,0,1))returnordered.astype(dtype)if__name__=="__main__":parser=argparse.ArgumentParser()parser.add_argument("--image_folder",type=str,help="Input folder.")FLAGS=parser.parse_args()client=InferenceClient.create_with("densenet_onnx","0.0.0.0:8001",input_dims=3,protocol="grpc")client.output_kwargs={"class_count":1}image_data=[]forfilenameinglob(os.path.join(FLAGS.image_folder,"*")):image_data.append(preprocess(Image.open(filename)))result=client(np.asarray(image_data))foroutputinresult:max_value,arg_max,class_name=output[0].decode("utf-8").split(":")print(f"{max_value}({arg_max}) ={class_name}")Release Notes23.08.30 Supportoptionalwith model input,parameterson config.pbtxt23.06.16 Support tritonclient>=2.34.0Loosely modified the requirements related to tritonclientKey FeaturesSimple configuration. Only$host:$portand$model_nameare required.Generating asynchronous requests withasyncio.QueueSimple Model switchingSupport async tritonclientRequirements$ pip install tritonclient[all]Install$ pip install tritonyTestWith Triton./bin/run_triton_tritony_sample.shpytest-s--cov-reportterm-missing--cov=tritonytests/Example with image_client.pyFollow steps
inthe official triton server documentation# Download Images from https://github.com/triton-inference-server/server.gitpython./example/image_client.py--image_folder"./server/qa/images"
Package: triv
TrivA syntax for the web and more...[What]
: Your documents, any documents,
: as you like.

[.Online.]

[..Learn..]
https://triv.co/docs

[..Try..]
https://triv.co/workshop

[.Download.]
: ```
pip install triv
```3v- the command lineThe downloadable3vcommand compiles a Triv document into your choice of markup.The Triv syntax is recommended for HTML and XML applications.PythonPyPI hosts the first-choice way to compile with Triv:pip install triv
3v file.3v > file.xmlOther options include:Web WorkshopAny text editor, with the following lines at the start:<script>"interpretive"</script>
 <script src="https://www.triv.co/3v.js"></script>Then, double-click to open in your browser!(Limitations)In a web page as a linked script(view the source of the Web Workshop for an example)A Node.js translation of the3vcommand available with:npm install triv-3v -g
 3v file.3v > file.htmlPlease note:The Python implementation serves as the reference implementation for the project and is the first to receive updates and bugfixes.License: BSD (3-clause);  Copyright ©2023 Triv Collective
Package: trivail
Tri_VailThis is a console platform that displays random trivia questions and answers that users can use to practice
For interview and quiz to increase their general knowledge and critical thinking abilities.#Usage
How it works:
Login option for user to chose to either log in or Close the app
If the user chooses to login, user is directed to the user login option where username is required and a simple greeting is displayed.The question and answers are now shown to the user.Note: User should have an internet connection to be able to access the questions and answers.
Else an error message will be displayed. The user should already have requests and click.You can run it on your shell/comandline by:
installing it from pip using 'python -m pip install trivail==version', without the quotes.
run on your shell using the command, 'python Trail_Vail.py' without the quotes.
Package: trivector
DescriptionConvert an image into a SVG vector image composed of triangular sectors.Installationtrivector can be installed from PyPI with the following command:pipinstalltrivectorUsageTo get help on using trivector type the following command:trivector--helpExampleBelow is a simple PNG raster image to trivectorize!Runningtrivector meface_before.png meface_after.svg 20yields the
following trivectorized SVG image atmeface_after.svg:
Package: trivial
Tri_VailThis is a console platform that displays random trivia questions and answers that users can use to practice
For interview and quiz to increase their general knowledge and critical thinking abilities.#Usage
How it works:
Login option for user to chose to either log in or Close the app
If the user chooses to login, user is directed to the user login option where username is required and a simple greeting is displayed.The question and answers are now shown to the user.Note: User should have an internet connection to be able to access the questions and answers.
Else an error message will be displayed. The user should already have requests and click.You can run it on your shell/comandline by:
installing it from pip using 'python -m pip install trivial==version', without the quotes.
run on your shell using the command, 'Forward-RandAlgo-Victory-Wekwa', without the quotes.
Package: trivialscan
Validate the security of your TLS connections so that they deserve your
trust.Because, no one wants to write several hundred lines of code for every
project that uses micro-services, internal APIs, zero-trust, etc. where
you probably should be doing more then just the basic built-in OpenSSL
hostname and root trust store checks.Packagetrivialscanprovides a command-line tooltrivialwhich contacts an SSL/TLS server and obtains some information on its
configuration. It aims at providing equal or better functionality of
Internet-based tools likeQualys SSL Server
Testwithout the requirement of
the target server being internet connected.You can also usetrivial scanon your internal network, DevOps pipeline, or local computer,
to test your servers while they are being developed.
Package: trivial-tools
trivial_toolsРќР°Р±РѕСЂ РїСЂРѕСЃС‚С‹С… РёРЅСЃС‚СЂСѓРјРµРЅС‚РѕРІ РґР»СЏ РєР°Р¶РґРѕРґРЅРµРІРЅРѕРіРѕ РёСЃРїРѕР»СЊР·РѕРІР°РЅРёСЏ.