Saravanan666/pypi-org huggingface dataset:
Package: trVAE
trVAEIntroductionA Keras (tensorflow < 2.0) implementation of trVAE (transfer Variational Autoencoder) .trVAE can be used for style transfer in images, predicting perturbations responses and batch-removal for single-cell RNA-seq.For pytorch implementation checkHereGetting StartedInstallationBefore installing trVAE package, we suggest you to create a new Python 3.6 (or 3.7)
virtual env (or conda env) with the following steps:1.  Installing virtualenvpipinstallvirtualenv2. Create a virtual with Python 3.6virtualenvtrvae-env--python=python3.63. trVAE package installationTo install the latest version from PyPI, simply use the following bash script:pipinstalltrvaeor install the development version via pip:pipinstallgit+https://github.com/theislab/trvae.gitor you can first install flit and clone this repository:gitclonehttps://github.com/theislab/trVAEcdtrVAE
pipinstall-rrequirements
pythonsetup.pyinstallExamplesFor perturbation prediction and batch-removal check thisexamplefrom Haber et al.Reproducing paper results:In order to reproduce paper results visithere.
Package: trvaep
trvaepIntroductionA pytorch  implementation of trVAE (transfer Variational Autoencoder). trVAE is a deep generative model which learns mapping between multiple different styles (conditions). trVAE can be used for style transfer on images, predicting single-cell perturbations responses and batch removal.Getting StartedInstallationInstallation with pipTo install the latest version from PyPI, simply use the following bash script:pipinstalltrvaepor install the development version via pip:pipinstallgit+https://github.com/theislab/trvaep.gitor you can first install flit and clone this repository:pipinstallflit
gitclonehttps://github.com/theislab/trvaepcdtrvaep
flitinstallExamplesFor simple perturbation prediction and batch-removal check thisexamplewith interferon (IFN)-β stimulation fromKang et al..For multi condition perturbation prediction and batch-removal check thisexamplewith multiple infections fromHaber et al..Reproducing paper results:In order to reproduce paper results visithere.
Package: trviz
_______ _______      _______ ______
 |__   __|  __ \ \    / /_   _|___  /
    | |  | |__) \ \  / /  | |    / / 
    | |  |  _  / \ \/ /   | |   / /  
    | |  | | \ \  \  /   _| |_ / /__ 
    |_|  |_|  \_\  \/   |_____/_____|TRviz is a python library for analyzing tandem repeat sequences. TRviz includes modules for
decomposing, encoding, aligning, and visualizing tandem repeat sequences.Full documentation is available atreadthedocsOverview of TRvizGetting StartedPrerequisiteNoteTRviz requiresMAFFT. Tested with MAFFT v7.505.Install the library with pip or from source.with pippip install trvizfrom sourcegit clone https://github.com/Jong-hun-Park/trviz.git
cd trviz/
pip install .InputTandem repeat sequences (alleles)A set of motifs for decompositionOutputA plot showing the motif composition of the input sequencesA plot mapping color to motifAligned and labeled motifsMotif map, a set of motifs detected in the samples and their labels and frequenciesCode samples and examplesNotePlease see thejupyter notebookfor code examples.TRviz has four modules:DecompositionEncodingAlignmentVisualizationSee full documentation atreadthedocsGenerating a plotfromtrviz.mainimportTandemRepeatVizWorkerfromtrviz.utilsimportget_sample_and_sequence_from_fastatr_visualizer=TandemRepeatVizWorker()sample_ids,tr_sequences=get_sample_and_sequence_from_fasta(fasta_file_path)tr_id="CACNA1C"motifs=['GACCCTGACCTGACTAGTTTACAATCACAC']tr_visualizer.generate_trplot(tr_id,sample_ids,tr_sequences,motifs)Motif decompositionfromtrviz.decomposerimportDecomposertr_decomposer=Decomposer()tr_sequence="ACCTTGACCTTGACCTTGACCTTG"motifs=["ACCTTG"]tr_decomposer.decompose(tr_sequence,motifs)# >>> ["ACCTTG", "ACCTTG", "ACCTTG", "ACCTTG"]Citation:Jonghun Park, Eli Kaufman, Paul N Valdmanis, Vineet Bafna,TRviz: a Python library for decomposing and visualizing tandem repeat sequences, Bioinformatics Advances, Volume 3, Issue 1, 2023, vbad058Contact UsPlease submit an issue on theTRviz github
Package: trw
PurposeThe aim of this library is to simplify the process of building, optimizing, testing and debugging
deep learning models using PyTorch as well as providing implementations of some of the latest
research papers. Extensibility is kept in mind so that it is easy to customize the framework for
your particular needs.Some key features of the framework:Easy to use, flexible and extensible API to build simple & complex modelsModel debugging (e.g., activation statistics of each layer, gradient norm for each layer, embedding visualization)Model understanding and result analysis (e.g., attention maps, confusion matrix, ROC curves, model comparisons, errors)Support hyper-parameter optimization (random search, hyperband) and analysisArchitecture learning (DARTS & evolutionary algorithms)Keep track of the results for retrospective analysis and model selectionRequirementsLinux/WindowsPython >= 3.6PyTorch >= 1.0Installation / UsageTo install use pip:$ pip install trwOr clone the repo:$ git clonehttps://github.com/civodlu/trw.git$ python setup.py installDocumentationThe documentation can be found atReadTheDocs.
Package: trw_text_string
##### Module for returning word pairs from text strings##### Example:```python>>> from trw_text_string import WordPairCounter>>> string_example = """Hello, I like nuts. Do you like nuts? No? Are you sure?Why don't you like nuts? Are you nuts? I like you""">>> text_string_object = WordPairCounter(string_example)>>> text_string_object.get_word_pairs()are you: 2like nuts: 3you like: 3i like: 2```##### Installation:<p> In order to install trw_text_string: </p>```pythonpip install trw_text_string```
Package: trxhosts-sdk
TrxHosts payment page SDKThis is a set of libraries in the Python language to ease integration of your service
with the TrxHosts Payment Page.Please note that for correct SDK operating you must have at least Python 3.5.Payment flowInstallationInstall with pippipinstalltrxhosts-sdkGet URL for paymentfrompayment_page_sdk.gateimportGatefrompayment_page_sdk.paymentimportPaymentgate=Gate('secret')payment=Payment('402')payment.payment_id='some payment id'payment.payment_amount=1001payment.payment_currency='USD'payment_url=gate.get_purchase_payment_page_url(payment)payment_urlhere is the signed URL.Handle callback from TrxHostsYou'll need to autoload this code in order to handle notifications:frompayment_page_sdk.gateimportGategate=Gate('secret')callback=gate.handle_callback(data)datais the JSON data received from payment system;callbackis the Callback object describing properties received from payment system;callbackimplements these methods:callback.get_payment_status()Get payment status.callback.get_payment()Get all payment data.callback.get_payment_id()Get payment ID in your system.
Package: trx-python
trx-pythonThis is a Python implementation of the trx file-format for tractography data.For details, please visit the documentation web-page athttps://tee-ar-ex.github.io/trx-python/.To install this, you can run:pip install trx-pythonOr, to install from source:git clone https://github.com/tee-ar-ex/trx-python.git
cd trx-python
pip install .Temporary DirectoryThe TRX file format uses memmaps to limit RAM usage. When dealing with large files this means several gigabytes could be required on disk (instead of RAM).By default, the temporary directory on Linux and MacOS is/tmpand on Windows it should beC:\WINDOWS\Temp.If you wish to change the directory add the following variable to your script or to your .bashrc or .bash_profile:export TRX_TMPDIR=/WHERE/I/WANT/MY/TMP/DATA(a)
ORexport TRX_TMPDIR=use_working_dir(b)The provided folder must already exists (a).use_working_dirwill be the directory where the code is being executed from (b).The temporary folders should be automatically cleaned. But, if the code crash unexpectedly, make sure the folders are deleted.
Package: trx-reader-demo
Trx_readerDownload docker container from DockerHub:https://hub.docker.com/repository/docker/romibareiro/stori01OrClone repository and install:pip3 install -r requirements.txtLoad env variables:Create an .env file with this content:CSV_PATH=CSV_PATH
SENDER_EMAIL=SENDER_EMAIL
DEST_EMAIL=DEST_EMAIL
EMAIL_PWD=EMAIL_PWD
USER_NAME=USER_NAME
MONGODB_CONNSTRING=MONGODB_CONNSTRINGAnd then run:python3  main.pyNote: if your email sender is a gmal account, you must get app password from gmail settings.
If you want to build the docker image, you need to change the flags values in .env ( PATH_TO_CSV, EMAIL_SENDER, EMAIL_DESTINATION,EMAIL_SENDER_PWD,USER_NAME)You will receive an email like this:
Package: tryalgo
Algorithmic Problem SolvingAlgorithms and data structures for preparing programming competitions (e.g. ICPC,see more) and coding interviews.By Christoph Dürr and Jill-Jênn Vie.Our bookis available in French, English, Simplified and Traditional Chinese.Installpip install tryalgoDocumentationDocumentationof tryalgo 1.4Blog tryalgo.orgin French and EnglishDemo:TryAlgo in ParisShortest paths on the graph of Paris.To run it yourself:pip install -r examples/requirements.txt
jupyter notebook  # Then go to examples folderUsageDynamic programmingsome example with coin change:fromtryalgoimportcoin_changeprint(coin_change([3,5,11],29))# True because 29 = 6 x 3 + 0 x 5 + 1 x 11Des chiffres et des lettres(that inspiredCountdown)fromtryalgo.arithm_expr_targetimportarithm_expr_targetarithm_expr_target([25,50,75,100,3,6],952)Returns'((((75*3)*(100+6))-50)/25)=952'.TestsAll algorithms are thoroughly tested. These tests can be used topractice your programming skills!python-munittestMost snippets from the book are within 76 columns (French version) or 75 columns (English version).Our code is checked. Using optional requirements, you can check it too:pip install pycodestyle pylint
make pycodestyle  # PEP8
make pylintFound a bug?Pleasedrop an issue.Authors© 2016–2023, Christoph Dürr and Jill-Jênn Vie (vie@jill-jenn.net).Released under the MIT License.ContributorsThanks!Louis AbrahamLilian BessonXavier CarcelleStéphane HenriotRyan LahfaOlivier MartySamuel Tardieu
Package: tryangle
Tryangle: Machine Learning Techniques for Chainladder MethodsTryangleis an automatic chainladder reserving framework. It provides
scoring and optimisation methods based on machine learning techniques to
automatically select optimal parameters to minimise reserve prediction
error. Tryangle is built on top of thechainladderreserving package.Key FeaturesTryangle is flexible and modular in how it can be applied:Optimising loss development factorsUsesklearn'sGridSearchCVorRandomizedSearchCVto find the optimal
method to calculate loss development factorsChoosing between multiple reserving methodsNot sure if you should go with a basic chainladder,
Bornhuetter-Ferguson, or Cape-Cod method? Let Tryangle decide.Finding the optimal blend of reserving methodsOr why not combine all three, and let Tryangle find the optimal
blend.Using advanced optimisation methodsNot satisfied with an exhaustive grid search? Tryangle can be
used with any optimisation framework, but we recommendOptunaBasic Examplefromsklearn.model_selectionimportGridSearchCVfromsklearn.pipelineimportPipelinefromtryangleimportDevelopment,CapeCodfromtryangle.metricsimportneg_cdr_scorerfromtryangle.model_selectionimportTriangleSplitfromtryangle.utils.datasetsimportload_sampleX=load_sample("swiss")tscv=TriangleSplit(n_splits=5)param_grid={"dev__n_periods":range(15,20),"dev__drop_high":[True,False],"dev__drop_low":[True,False],"cc__decay":[0.25,0.5,0.75,0.95],}pipe=Pipeline([("dev",Development()),("cc",CapeCod())])model=GridSearchCV(pipe,param_grid=param_grid,scoring=neg_cdr_scorer,cv=tscv,verbose=1,n_jobs=-1)model.fit(X,X)InstallationTryangle is available atthe Python Package
Index.pip install tryangleTryangle supports Python 3.9.ReferenceCaesar Balona, Ronald Richman. 2021. The Actuary and IBNR Techniques: A
Machine Learning Approach
(SSRN).
Package: tryceratops
Prevent Exception Handling AntiPatterns in PythonInspired bythis blog post. I describedthe building process of this tool here.“For those who like dinosaurs 🦖 and clean try/except ✨ blocks.”SummaryInstallation and usageInstallationUsageflake8PluginViolationsAutofix supportIgnoring violationsConfigurationPre-commitShow your styleExtra ResourcesContributingChange logLicenseCreditsInstallation and usageInstallationpip install tryceratopsORpoetry add -D tryceratopsUsagetryceratops [filename or dir...]You can enable experimental analyzers by running:tryceratops --experimental [filename or dir...]You can ignore specific violations by using:--ignore TRYXXXrepeatedly:tryceratops --ignore TRY201 --ignore TRY202 [filename or dir...]You can exclude dirs by using:--exclude dir/pathrepeatedly:tryceratops --exclude tests --exclude .venv [filename or dir...]You can also autofix some violations:tryceratops --autofix [filename or dir...]flake8Plugin🦖 Tryceratops is also a plugin forflake8, so you can:❯ flake8 --select TRY src/tests/samples/violations/call_raise_vanilla.py
src/tests/samples/violations/call_raise_vanilla.py:13:9: TRY002 Create your own exception
src/tests/samples/violations/call_raise_vanilla.py:13:9: TRY003 Avoid specifying long messages outside the exception class
src/tests/samples/violations/call_raise_vanilla.py:21:9: TRY201 Simply use 'raise' without specifying exception object againViolationsAll violations and its descriptions can be found indocs.Autofix supportSo far, autofix only supports violations:TRY200,TRY201, andTRY400.Ignoring violationsIf you want to ignore a violation in a specific file, you can either:Add a comment withnoqato the top of the file you want to ignoreAdd a comment withnoqato the line you want to ignoreAdd a comment withnoqa: CODEto the line you want to ignore a specific violationExample:defverbose_reraise_1():try:a=1exceptExceptionasex:raiseex# noqa: TRY202ConfigurationYou can set up apyproject.tomlfile to set rules.
This is useful to avoid reusing the same CLI flags over and over again and helps to define the structure of your project.Example:[tool.tryceratops]exclude=["samples"]ignore=["TRY002","TRY200","TRY300"]experimental=falsecheck_pickable=falseallowed_base_exceptions=["MyAppBase"]CLI flags always overwrite the config file.Pre-commitIf you wish to use pre-commit, add this:-repo:https://github.com/guilatrova/tryceratopsrev:v2.3.2hooks:-id:tryceratopsShow your styleAdd this fancy badge to your project'sREADME.md:[![try/except style: tryceratops](https://img.shields.io/badge/try%2Fexcept%20style-tryceratops%20%F0%9F%A6%96%E2%9C%A8-black)](https://github.com/guilatrova/tryceratops)Extra ResourcesIf you want to read more about:How to structure exceptions in Python 🐍 🏗️ 💣How to log in Python 🐍🌴Book: Effective PythonContributingThank you for considering making Tryceratops better for everyone!Refer toContributing docs.Change logSeeCHANGELOG.LicenseMITCreditsThanks to God for the inspiration 🙌 ☁️ ☀️Theblackproject for insights.
Package: try-default
A microlibrary for handling exceptions.Example:fromtry_defaultimporttry_defaultfoo=[]result=try_default(lambda:foo[0],{IndexError:'n/a'})# result: 'n/a'foo=['spam']result=try_default(lambda:foo[0],{IndexError:'n/a'})# result: 'spam'bar={'egg':foo[0]}result=try_default(lambda:bar['spam'],{IndexError:'n/a'})# Raises KeyError
Package: trydoc
http://packages.python.org/trydocASphinxextension providing Tryton-specific markup.InstallationThis extension can be installed from the Python Package Index:pip install trydocAlternatively, you can clone the trydoc repository from BitBucket,
and install the extension directly from the repository:hg clone https://bitbucket.org/nantic/trydoc
cd trydoc
python setup.py installUsagePlease refer to thedocumentationfor further information.
Package: try-except-ai
TryExceptAIA Python package to handle exceptions and suggest resolutions using OpenAI.InstallationInstall the package usingPoetry:poetryaddtry-except-aiUsageAddexport OPENAI_API_KEY={your openai api key here}to your .zshrc or .bash_profile file.Then test it with the followingfromtry_except_aiimportTryExceptAIdeftest_function():try:# Code that might raise an exceptionresult=1/0print(result)exceptExceptionase:TryExceptAI().handle_exception(e)if__name__=="__main__":test_function()LicenseThis project is licensed under the MIT License. See the LICENSE file for details.
Package: tryexcept-decorator
TryExcept DecoratorThe TryExcept Decorator is a configurable Python decorator that wraps a function around a try-except statement.
It allows you to write cleaner code in your functions where an exception may happen and you want to handle it even in complex ways.Installationpip install tryexcept-decoratorUsageTo use the tryexcept decorator, simply apply it to any function that may raise an exception.importjsonimportrequestsfromrequestsimportHTTPErrorfromtryexcept_decoratorimporttryexceptdefmy_custom_exception_handling_function(f_exc:Exception,f_locals:dict,f_name:str,message:str):print(f"Custom exception handler error message:{message}")print(f"Custom exception handler was called by the '{f_name}' function.")print(f"Available local variables in the callee namespace at the moment of exception:\n{json.dumps(obj=f_locals,indent=1,default=str)}")print(f"The exception raised was of type{type(f_exc)}")return{"exc":f_exc,**f_locals,"message":message}mytryexc=tryexcept(exception_type=HTTPError,except_handler=my_custom_exception_handling_function,except_handler_kwargs={"message":"There was an error!"})@mytryexcdefget_data(url):response=requests.get(url)response.raise_for_status()returnresponse.json()defmain():result=get_data(url="http://example.com/nonexistentpage.html")print(result)Output:Available local variables in the callee namespace at the moment of exception: 
 {
 "url": "http://example.com/nonexistentpage.html",
 "response": "<Response [404]>"
}
The exception raised was of type <class 'requests.exceptions.HTTPError'>
Custom exception handler error message: An error occurred! See exception below.
{'exc': HTTPError('404 Client Error: Not Found for url: http://example.com/nonexistentpage.html'), 'url': 'http://example.com/nonexistentpage.html', 'response': <Response [404]>, 'message': 'An error occurred! See exception below.'}In this example, the get_data() function uses the requests library to fetch data from a hypothetical API. The handle_exceptions decorator is applied to the get_data() function to handle any exceptions that might occur during the API request.If an exception is raised, the decorator catches it and returns an error message to the user in a dictionary format. If no exception is raised, the decorator simply returns the response data in JSON format. This allows the application to gracefully handle any exceptions that might occur during the API request, without crashing or disrupting the user experience.ContributingContributions are welcome! Please create a pull request with your changes.
Package: tryhackme.py
Maintained Python wrapper for TryHackMe public APIThis fork is unofficial and not associated with TryHackMe, but i would love to.Installationpip3installtryhackme.pyExampleimporttryhackmeclient=tryhackme.Client(session="<tryHackMe cookie: `connect.sid`>")# Logging in is optionalclient.get_stats()# {'publicRooms': 203, 'totalUsers': 88017, 'cloneableRooms': 967}For more info over getting theconnect.sidvisit#1API documentationFor the API documentation please visit theTryHackMe-API-DocContributingYou're welcome to create Issues/Pull Requests with features you'd want to seeLicenseMIT LICENSE
Package: try-match
try_matchPattern matchingIt supports Python 2.7 and 3+InstallationUsing pip to installpipinstalltry-matchUsagefromtry_matchimportCase,match,DefaultCase### match valuetry:match(1)exceptCase(2):raiseexceptCase(1):print(1)# => 1### match classtry:match(1)exceptCase(str):raiseexceptCase(int):print('int')# => 'int'### match rangetry:match(10)exceptCase(range(1,5)):raiseexceptCase(range(9,20)):print(range(9,20))# => range(9, 20)### match lambdatry:match(2)exceptCase(lambdax>5):raiseexceptCase(lambdax<5):print("x < 5")# => "x < 5"### default casetry:match(1)exceptCase(2):raiseexceptCase(3):raiseexceptDefaultCase:print("default")# => "default"✨🍰✨ enjoy it
Package: try-parse
What's the good of that?Cast the string representation of simple objects to the desired type.Safe type casting. The exception will not be thrown. The function returns status and result.installpip install try-parseimportfromtry_parse.utilsimportParseUtilstry_parse_dateParse object to datestatus,target=ParseUtils.try_parse_date('2018-11-23')self.assertTrue(status)self.assertIsInstance(target,date)self.assertEqual(target,date(2018,11,23))# See format https://docs.python.org/3/library/datetime.html#strftime-strptime-behaviorstatus,target=ParseUtils.try_parse_date('23.11.2018',format='%d.%m.%Y')self.assertTrue(status)self.assertIsInstance(target,date)self.assertEqual(target,date(2018,11,23))status,target=ParseUtils.try_parse_date('Invalid')self.assertFalse(status)self.assertIsNone(target)try_parse_datetimeParse object to datetimestatus,target=ParseUtils.try_parse_datetime('2018-11-23 01:45:59')self.assertTrue(status)self.assertIsInstance(target,datetime)self.assertEqual(target,datetime(2018,11,23,1,45,59))# See format https://docs.python.org/3/library/datetime.html#strftime-strptime-behaviorstatus,target=ParseUtils.try_parse_datetime('23.11.2018T01:45:59',format='%d.%m.%YT%H:%M:%S')self.assertTrue(status)self.assertIsInstance(target,datetime)self.assertEqual(target,datetime(2018,11,23,1,45,59))status,target=ParseUtils.try_parse_datetime('Invalid')self.assertFalse(status)self.assertIsNone(target)try_parse_intParse object to intstatus,target=ParseUtils.try_parse_int('19')self.assertTrue(status)self.assertIsInstance(target,int)self.assertEqual(target,19)status,target=ParseUtils.try_parse_int('Invalid')self.assertFalse(status)self.assertIsNone(target)try_parse_floatParse object to floatstatus,target=ParseUtils.try_parse_float('19.00')self.assertTrue(status)self.assertIsInstance(target,float)self.assertEqual(target,19.00)status,target=ParseUtils.try_parse_float('Invalid')self.assertFalse(status)self.assertIsNone(target)try_parse_decimalParse object to decimalstatus,target=ParseUtils.try_parse_decimal('19.00')self.assertTrue(status)self.assertIsInstance(target,Decimal)self.assertEqual(target,Decimal(19))status,target=ParseUtils.try_parse_decimal('Invalid')self.assertFalse(status)self.assertIsNone(target)try_parse_boolParse object to boolforpin["yes","true","t","1",1]:status,target=ParseUtils.try_parse_bool(p)self.assertTrue(status)self.assertIsInstance(target,bool)self.assertTrue(target)status,target=ParseUtils.try_parse_bool('Invalid')self.assertFalse(status)self.assertIsNone(target)MypyMypy can be installed using pip:pip install -U mypyTestingmypy ./try_parse/utils.pyRun unittest from consolepython -m unittest discover -p "*_tests.py"
Package: trysail
trysailInstallationpipinstalltrysailUsagetrysail-hExample# create a new radio projecttrysailinit-pradio# enter projectcdradio-000001
trysailstart# write contents-001.txt, then parsetrysailparse# prepare video at main-001.mp4, write main-001.ass, then finalizetrysailfinalizeDevelopment# install dev dependenciespipinstall-rdeveloper_requirements.txt# local publishcdpublish
./publish_local.sh# remote publish (first update version)cdpublish
./publish_remote.sh