Saravanan666/pypi-org huggingface dataset:
Package: trie-nathaniel
Trie ClientThe client CLI for my globally hosted trie through GCPExplore the docs »View on PyPiTable of ContentsBuilt WithGetting StartedPrerequisitesInstallationUsageContributingLicenseBuilt Withinquirer.pyclick.py(back to top)Getting StartedInstall the CLI to get started!. Take a look at theInstallationsection for the command to install.PrerequisitesRequires python>=3.6 and pipsudoapt-getupdate
sudoapt-getinstallpython3.6NOTE: As it currently stands python 3.10 is not supported due to how inquirer's requirements are built in terms of blessed (it is using the wrong version)InstallationRun the following to install:pipinstalltrie-nathaniel(back to top)UsageFor clean user interface use:triecli uiFor direct cli calls use:triecli {option} {arg}where{option}is replaced with the type of operation you would like to perform and{arg}is added if the option you are calling requires an argumentPossible options includeadd,delete,deleteall,search,complete,view, andviewfastForadd,delete,search,completean additionalargparameter is required that includes the value you would like to add to the trieLIMITATIONS:The virtual machine this is running on only has 100GB of disk space and 4GB of memory so if the string is too long or the number of operations is too many there are chances that something will fail on the GCP side. Since this is being hosted using their free tier these are some of the limiations includedFor explanations, please refer to theDocumentation(back to top)LicenseDistributed under the MIT License. SeeLICENSE.txtfor more information.(back to top)AcknowledgmentsBest README(back to top)
Package: trier
trierUtility wrapper class to handle exceptions.Supported Python versionsPython >= 3.8InstallationYou caninstalltrierfrom PyPI, withpip:python-mpipinstalltrierExample usageInstead of usingtry exceptblock you could replace it withtrier.fromtrierimportTryerr,val=Try(lambda:10/0).catch(ZeroDivisionError)iferr:# handle error# do stuff with `val`# Another way to handle could beifnoterr:# do stuff with `val`Supports multiple exceptions.fromtrierimportTryerr,file=Try(open,file="doenot_exist.txt").catch(FileNotFoundError,OSError)iferr:# handle error# do stuff with `file`Supports async error handling as well.importasynciofromhttpximportAsyncClient,HTTPStatusError,ResponsefromtrierimportTrydefraise_on_4xx_5xx(response):response.raise_for_status()asyncdefmain():client=AsyncClient(event_hooks={"response":[raise_on_4xx_5xx]})# The endpoint responds with a 404 errorerr,response=awaitTry(client.get,"https://run.mocky.io/v3/201f1fe6-5a3b-49c1-9df7-312951618405").async_catch(HTTPStatusError)iferr:# Handle error# do stuff with `response`asyncio.run(main())ChangelogRefer to theCHANGELOG.LicenseMIT - See theLICENSEfor more information.
Package: trieres
trieresThis is a python module enabling the remote execution of accelerated functions on thecloudFPGA platform.Workflow to upload a new package at pypigit clone --depth 1 --recursive git@github.com:cloudFPGA/trieres.git
cd trieres  
make env
source venv/bin/activate
make dist 
make uploadNotesOptionally to crate a new package by using the latest cFp_Zoo :git clone --depth 1 --recursive git@github.com:cloudFPGA/trieres.git
cd trieres  
make env
source venv/bin/activate
cd trieres/cFp_Zoo
git pull
make dist 
make upload
Package: trie-search
Trie-search is a package for text pattern search usingmarisa-trie.Installation$ pip install trie-searchUsageCreate trie dictionaryBefore using this package, you need to create trie dictionary, or
prepare a list of patterns.The following example simply creates trie dictionary ofmarisa_trie.Triefrom list of article titles in English version of
Wikipedia, and saves it to./example/triedict.$ cd ./example
$ curl https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-all-titles-in-ns0.gz | gzcat | python create_triedict.pyNOTICE: This script will consume more than 2GB memory.trie_search.TrieSearchCreate an instance, and load dictionary:>>>importtrie_search>>>trie=trie_search.TrieSearch(filepath='./example/triedict')If you havelistortupleobject of patterns, you can create an
instance as follows:>>>patterns=['pattern1','pattern2','pattern3']>>>trie=trie_search.TrieSearch(patterns)TrieSearch.search_all_patternsSearch all patterns in an input text:>>>text=('in computer science , a trie , also called digital tree and '...'sometimes radix tree or prefix tree ( as they can be searched '...'by prefixes ) , is a kind of search tree - an ordered tree data '...'structure that is used to store a dynamic set or associative array '...'where the keys are usually strings .')>>>forpattern,start_idxintrie.search_all_patterns(text):...printpattern,start_idx...in0computer3computerscience3science12,20a22trie24,29also31called36digital43...skipped...array246where252wherethe252the258thekeys258keys262are267usually271strings279The text is the 1st sentence ofhttps://en.wikipedia.org/wiki/Trie.
For normalization, remove capitalizations and add single white space
before/after symbols.search_all_patternsreturns an iterator. Each searched pattern is
represented as a tuple(pattern_string, pattern_start_index). The
results are sorted by the start index. If you want to get the result
as alistobject, uselistfunction as follow:>>>patterns=list(trie.search_all_patterns(text))TrieSearch.search_longest_patternsSearch longest patterns in an input text:>>>forpattern,start_idxinsorted(trie.search_longest_patterns(text),key=lambdax:x[1]):...printpattern,start_idx...in0computerscience3,20a22trie24,29also31called36digitaltree43and56sometimes60radixtree70or81prefixtree84(96as98they101can106be110by122prefixes125)134,136isa138kind143of148searchtree151-163an165orderedtreedatastructure168that196is201usedto204store212a218dynamicset220or232associativearray235wherethe253thekeys259are268usually272strings280search_all_patternsalso returns an iterator. The result sorted
by the length of patterns. In the above example, the result is
re-sorted by the start index.trie_search.RecordTrieSearchtrie_search.RecordTrieSearchis a sub class ofmarisa_trie.RecordTrie, which maps unicode keys to data tuples.The functions,search_all_patternsandsearch_longest_patterns,
are also implemented intrie_search.RecordTrieSearch.
Package: tri.event
Client code for accessing the TriOptima event bus and related APIs.Running testsLicenseBSDDocumentationChangelog2.1.0 (2020-12-14)Make token expiry optional from the authentication server.Added optional token_url parameter for when the AuthenticatedSession is
used for non-Trioptima authentication servers.2.0.0 (2019-12-03)Change import path from tri.event to tri_event to conform to other packages.
(And increase import time performance during test setup)1.0.1 (2019-09-02)Improve documentation1.0.0 (2019-05-10)Make an authentication retry if unauthorized to improve robustnessUpdate status to production ready0.0.7 (2019-03-22)Use configured proxy and timeouts also for authenticationDelay authentication until first request is made0.0.6 (2019-02-18)Change base class of EventSession to request.Session.0.5 (2019-01-22)Fix packagingAdd EventSession.access_token and EventSession.token_expiry attributes0.0.4 (2019-01-21)Cleanup of logging0.0.3 (2019-01-10)Add session renewal on access token expiryImprove exception on failure to log in0.0.2 (2018-12-20)Initial version
Package: trifinger-simulation
TriFinger Robot SimulationWelcome to the official simulation of the TriFinger robots!The TriFinger ProjectTo learn more about the TriFinger robots, check out our officialproject website, and thepreprintof this work.DocumentationFor instructions on how to install and use this package, see thedocumentation.Cite UsIf you are using this package in you academic work, please cite this repository
and also the corresponding paper:@misc{trifinger-simulation,
  author = {Joshi, Shruti and Widmaier, Felix and Agrawal, Vaibhav and Wüthrich, Manuel},
  year = {2020},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/open-dynamic-robot-initiative/trifinger_simulation}},
}@conference{wuethrich2020trifinger,
  title = {TriFinger: An Open-Source Robot for Learning Dexterity},
  author = {W{\"u}thrich, M. and Widmaier, F. and Grimminger, F. and Akpo, J. and Joshi, S. and Agrawal, V. and Hammoud, B. and Khadiv, M. and Bogdanovic, M. and Berenz, V. and Viereck, J. and Naveau, M. and Righetti, L. and Sch{\"o}lkopf, B. and Bauer, S.},
  booktitle = {Proceedings of the 4th Conference on Robot Learning (CoRL)},
  month = nov,
  year = {2020},
  doi = {},
  url = {https://corlconf.github.io/corl2020/paper_421/},
  month_numeric = {11}
}
Package: trifusionviz
trifusionvizInstallation viaPypi.org$pip3installtrifusionvizUtilisation en ligne de commandeL'installation fournit la commandetfv$tfv-husage:tfv[-h][-nb][-al][-ft[FORMAT]][-fo[FONCTIONORDRE]][liste][fichier]Applicationfacilitantl'utilisation de trifusionvizpositionalarguments:listelistePythonavecguillemetsfichiernomdufichierdesortie.Mettre"pipe"pourunesortieconsole.optionalarguments:-h,--helpshowthishelpmessageandexit-nb,--noirblancNoiretBlanc-al,--appelssortiedesappels-ft[FORMAT],--format[FORMAT]formatfichier,pardéfaut:pdf-fo[FONCTIONORDRE],--fonctionordre[FONCTIONORDRE]pardéfaut:lambdax,y:x<yExemples :$ tfv "[1, 4, 3, 2]" test -ft pngcréera un fichiertest.png$ tfv -nb -al "[1, 4, 3, 2]" testcréera deux fichiers en noir et blanc :test.pdfettest_appels.pdf$ tfv "[1, 4, 10, 2]" test -fo "lambda x, y: str(x) < str(y)"créera  un fichier :test.pdfRemarques :Sans argument,tfvproduit une erreur.Avec une liste pour seul argument, par exemple$ tfv "[1, 5, 2]", cela produit dans le répertoire courant un fichierDigraph.gv.pdf.la sortiepipe(en nom de fichier) produira une sortie console
au format souhaité permettant lepipeavec un autre
programme.tfvn'implémente pas pour le moment toutes les fonctionnalités
de la bibliothèque.Utilisation en moduleimporttrifusionvizastfvimportrandomliste=list(range(13))random.shuffle(liste)t=tfv.trifusionviz(liste)# sorties pdf : graphe et appelst.sortie_appels=Truet.sortie("exemple_sortie")u=tfv.trifusionviz(liste)u.fonction_ordre=lambdax,y:str(x)<str(y)u.noirblanc=Trueu.profondeurs_cachees=range(2,2+7)u.forme_diviser,u.forme_arreter,u.forme_combiner=\"invhouse","rectangle","house"# sortie pngu.sortie("exemple_sortie_lexico","png")v=tfv.trifusionviz(range(13))v.style="invis"# sortie pngv.sortie("exemple_invisible","png")Sorties de l'exempleLicenceCC-BY-NC-SA
Package: trig
Trigtrigis a package that provides a variety of common and lesser-known
trigonometric functions.The included functions are:sine (sin)cosine (cos)tangent (tan)secant (sec)cosecant (csc)cotangent (cot)versine (ver)coversine (cvs)vercosine (vcs)covercosine (cvc)haversine (hvs)hacoversine (hcv)havercosine (hvc)hacovercosine (hcc)exsecant (exs)excosecant (exc)chord (crd)each of which also has a hyperbolic (suffixed withh), inverse (prefixed
witha) and inverse hyperbolic variant.
Package: trigdistrs
Probability distributions are elements of measure theory and general statistics,providing standardized formulas to computeodds of events happening.
This package presents new probability distributions produced by skewing regulardistribution using trigonometric functions.
References:
*http://goo.gl/Z6nbJz* CosW:https://cran.r-project.org/web/packages/CosW/index.html* SecKW:https://cran.r-project.org/web/packages/SecKW/index.html* SinIW:https://cran.r-project.org/web/packages/SinIW/index.html* TanB:https://cran.r-project.org/web/packages/TanB/index.html
Package: trigger-chat
Trigger, vous allez aimer vous détesterTrigger est une application permettant de faciliter la rencontre de personnes souhaitant débattre des idées opposées.Equipe : Florent, Marco, Piero, Thomas, Wallid.Trigger est un projet réalisé dans le cadre de la formation Admin Production Cloud dispensée par m2i Formation & Semifir.Pour installer le projetCloner le dépôt :git clone https://github.com/vanoud/Trigger.gitDepuis le répertoire du projet, créer un environnement virtuel :py -3 -m venv venvActiver l'environnement virtuel nouvellement créé :venv\Scripts\activateInstaller Flask et autres dépendances :pip install -r requirements.txtPour lancer le projetSe placer dans le répertoire du projetActiver l'environnement virtuel nouvellement créé :venv\Scripts\activateLancer flask:flask runDepuis un navigateur, se connecter àhttp://127.0.0.1:5000/
Package: triggercmd
TRIGGERcmd Python PackageFor the full TRIGGERcmd agent, visithttps://triggercmd.com.Use this package to listen for triggers sent to a computer in your TRIGGERcmd account.Send triggers with Amazon Alexa, Google Assistant, IFTTT, Zapier, Smart Things, etc.  Seethis pagefor more ways.Usage:import json
from triggercmd import agent

computer_id = (your triggercmd computer id)
token = (your triggercmd token)

def my_function(msg):
    print(msg)
    message = json.loads(msg)
    print("Received this trigger:", message['trigger'])

agent.connect(computer_id, token, my_function)Example output:Connected
{"trigger":"Calculator","id":"13123391234567891acbf123"}
Received this trigger: Calculator
{"trigger":"Notepad","id":"13123391234567891acbf124"}
Received this trigger: Notepad
Package: trigger-informer-scan
Informer.io Scan Trigger LibraryThis library is designed to trigger scans in the Informer.io platform. It supports automated workflows by allowing users to initiate scans programmatically using an API key, an optional test UUID, and a list of assets.
FeaturesAPI Key Authorization: Securely trigger scans using an API key.
Optional Test UUID: Specify a test UUID for targeted scanning.
Asset List Scanning: Initiate scans on a list of specified assets.
Error Logging: Errors and failures are logged for troubleshooting, without halting execution.Setting Up the Environment:To use the library, you need to provide an API key. You can pass this as a command-line argument or set it as an environment variable.export INFORMER_API_KEY=your-api-keyTriggering a ScanUsing Command-Line ArgumentsYou can pass the API key, an optional TEST_UUID, and a list of assets directly as arguments:triggerInformerScan --api_key your-api-key --assets "a.b.com,b.com,example.com"Optionally, you can include a TEST_UUID. Scans will then start on both the assets in the test and the named assets:triggerInformerScan --api_key your-api-key --test_uuid your-test-uuid --assets "a.b.com,b.com,example.com"Using Environment VariablesIf INFORMER_API_KEY is set, you can trigger the scan by just providing the assets:bashtriggerInformerScan --assets "a.b.com,b.com,example.com"And optionally the TEST_UUID:triggerInformerScan --test_uuid your-test-uuid --assets "a.b.com,b.com,example.com"LimitationsFrequency of Scans: Only one "once" scan can be triggered per 24-hour period per asset or test.
Error Reporting: Errors are reported through logs and do not halt the script execution.Finding the Test UUIDIf you have a specific test in Informer.io for which you want to trigger a scan:Navigate to the test detail pane in the Informer.io platform.
Locate the UUID, uniquely identifying each test.
Use this UUID with the library for targeted scanning of related assets.
Package: triglav
Triglav - Feature Selection Using Iterative RefinementOverviewTriglav (named after the Slavic god of divination) attempts to discover
all relevant features using an iterative refinement approach. This
approach is based after the method introduced in Boruta with several
modifications:Features are clustered and the impact of each cluster is assessed as
the average of the Shapley scores of the features associated with
each cluster.Like Boruta, a set of shadow features is created. However, an ensemble
of classifiers is used to measure the Shapley scores of each real feature
and its shadow counterpart, producing a distribution of scores. A Wilcoxon
signed-rank test is used to determine the significance of each cluster
and p-values are adjusted to correct for multiple comparisons across each
round. Clusters with adjusted p-values below 'alpha' are considered a hit.At each iteration at or over 'n_iter_fwer', two beta-binomial distributions
are used to determine if a cluster should be retained or not. The first
distribution models the hit rate while the the second distribution models
the rejection rate. For a cluster to be successfully selected the probability
of a hit must be significant after correcting for multiple comparisons and
applying a Bonferroni correction for each iteration greater than or equal
to the 'n_iter_fwer' parameter. For a cluster to be rejected a similar round
of reasoning applies. Clusters that are not rejected remain tentative.After the iterative refinement stage SAGE scores could be used to select
the best feature from each cluster.While this method may not produce all features important for classification,
it does have some nice properties. First of all, by using an Extremely
Randomized Trees model as the default, dependencies between features can be
accounted for. Further, decision tree models are better able to partition
the sample space. This can result in the selection of both globally optimal
and locally optimal features. Finally, this approach identifies stable clusters of
features since only those which consistently pass the Wilcoxon signed-rank test
are selected. This makes this approach more robust to differences in training
data.InstallWith Conda from BioConda:condainstall-cbiocondatriglavFrom PyPI:pipinstalltriglavFrom source:gitclonehttps://github.com/jrudar/Triglav.gitcdTriglav
pipinstall.# or create a virtual environmentpython-mvenvvenvsourcevenv/bin/activate
pipinstall.InterfaceAn overview of the API can be foundhere.Usage and ExamplesExamples of how to useTriglavcan be foundhere.ContributingTo contribute to the development ofTriglavplease read ourcontributing guideReferencesComing Soon
Package: trigon
TrigonA batteries-included python web framework:rocket: Getting startedAttention: The project is a work in progress and should not be used in production :construction:Installingtrigoncan be done as such:pipinstalltrigonThe project's documentation can be foundhere.fromtypingimportAny,Dictimportuvicornfromtrigon.core.controllerimportController,http,routefromtrigon.core.controller.resultimportOk,Resultfromtrigon.trigonimporttrigonclassItemService:defget_items(self)->list[Dict[str,Any]]:return[{"id":1,"name":"Product 1","description":"This is the description for Product 1.","price":19.99,"category":"Electronics","stock":50,},{"id":2,"name":"Product 2","description":"A sample description for Product 2.","price":29.99,"category":"Clothing","stock":100,},{"id":3,"name":"Product 3","description":"Description for Product 3 goes here.","price":9.99,"category":"Books","stock":25,},]classItemController(Controller):def__init__(self,service:ItemService)->None:self.service=service@route.get("/")@http.status(Ok)asyncdefget_items(self)->Result[list[Dict[str,Any]]]:returnOk(self.service.get_items())if__name__=="__main__":app=(trigon().build_container(lambdabuilder:builder.singleton(ItemService)).register_controllers(ItemController).configure_logging(lambdabuilder:builder.override("uvicorn").register_middleware().add_console_handler().add_file_handler("logs/{time}.log"),).build())uvicorn.run(app,host="0.0.0.0",port=8000)For a more elaborate example (controller discovery, database configuration, Repository-Service Pattern, etc.) check outExample 02.:sparkles: ContributingIf you would like to contribute to the project, please go through theContributing Guidelinesfirst. In order to locally set up the project please follow the instructions below:# Set up the GitHub repositorygitclonehttps://github.com/billsioros/trigon.git# Create a virtual environment using poetry and install the required dependenciespoetryshell
poetryinstall# Install pre-commit hookspre-commitinstall--install-hooksAlternatively, you can support the project byBuying me a ☕.
Package: triko
🤼  TrikoSimplifies the process of encoding/decoding data usingTFRecordframework.Getting StartedI was a bit overwhelmed after using TFRecord framework for the first time. I don't find its interface very appealing, so the idea was to encapsulate all the nitty-gritty in this library.Note: I'm not an expert in TFRecord. I just found my approach very helpful in my workflow.TrikoFeatureFor each feature you want to serialize ( images, numbers, strings, labels ), you should use a separateTrikoFeaturesubclass.  EachTrikoFeaturesubclass must be initialized with a unique key ( seeinitmethod ). Those keys are used to serialize data inTFRecord.TrikoFeatureutilizes generic. Each subclass must provide three types for itself.An abstract example:class DemoFeature(TrikoFeature[RAW_TYPE, ENCODED_TYPE, DECODED_TYPE])RAW_TYPE- an original type of your data that you want to encodeENCODED_TYPE- a type your data will be in after encoding (TFRecord supports only a few types)DECODED_TYPE- a type your data will be in after decodingA specific example:Let's say we want to encode an image. We read it, transform it the way we like, and then it's time to serialize it to aTFRecorddataset.class DemoImageFeature(TrikoFeature[np.ndarray, bytes, np.ndarray])np.ndarray ( RAW_TYPE )- our image data is initially anumpymatrixbytes ( ENCODED_TYPE )- we can't serialize rawnumpyarrays usingTFRecord( it won't be a good idea anyway ), so we will convert them tobytesnp.ndarray ( DECODED_TYPE )- when readingTFRecorddataset,bytesare useless to us, so we will decoded it back tonp.ndarrayHow doesTrikoencode/decode data?You must tell it how by overriding either_encode_rawor_decode_valuemethods.Continuing our example:classDemoImageFeature(TrikoFeature[np.ndarray,bytes,np.ndarray]):def_encode_raw(self,raw_value:np.ndarray)->bytes:# convert numpy array to bytes and returnpassdef_decode_value(self,encoded_value:bytes)->np.ndarray:# read bytes and return numpy arraypassA simple built-in raw data validationBefore encoding raw data, you can validate its value by overriding_validate_raw_value.TrikoFeature in actionEncodingConsider a pseudocode:withTFRecordWriteraswriter:# you read an image and perform transformationsimg_array:np.ndarray=...# label for the imagelabel:str=...# list of your TrikoFeature subclassesfeatures:List[TrikoFeature]=...defraw_value_getter(feature:TrikoFeature)->Any:"""Maps a feature to a raw data"""# 'image' is a key you used for your TrikoFeature subclass# that represents an imageiffeature.key=='image':returnimg_arrayreturnlabelserialized_features=TrikoFeature.encode_features_to_string(features=features,raw_value_getter=raw_value_getter,)writer.write(serialized_features)DecodingConsider a pseudocode:# list of your TrikoFeature subclassesfeatures:List[TrikoFeature]=...dataset=tf.data.TFRecordDataset().map(TrikoFeature.decoder(features=features))The lib is cool, but pseudocode is notSee documented real-world examplehereLimitationsOnlyFixedLenFeatureare now supported.Prerequisites```
python 3.7
tensorflow
numpy
```Installing```
pip install triko
```
Package: trikset-py-typehint
trikset.py-typehintType hint set for TRIKInstallingWindows:py -m pip install trik-py-typehintUnix/Mac OS:python3 -m pip install trik-py-typehintUsageimportsysimporttimeimportrandomimportmathfromtypingimportTYPE_CHECKINGifTYPE_CHECKING:fromtrikimport*classProgram():__interpretation_started_timestamp__=time.time()*1000pi=3.141592653589793defexecMain(self):brick.display().addLabel("Hi from typed TRIK Python!",1,1,20)brick.display().redraw()brick.stop()returndefmain():program=Program()program.execMain()if__name__=='__main__':main()