Saravanan666/pypi-org huggingface dataset:
Package: treap
A set of python modules implementing treaps in pure python is provided.See also my pyx_treap module, which implements treaps in Cython.Treaps perform most operations in O(log2(n)) time, and are innately sorted.
They’re very nice for keeping a collection of values that needs to
always be sorted, or for optimization problems in which you need to find
the p best values out of q, when p is much smaller than q.A module is provided for treaps that enforce uniqueness.Example use:
.. code-block:: python>>> import treap
>>> t = treap.treap()
>>> for i in range(6):
...     t[i] = 2**i
...
>>> list(t)
[0, 1, 2, 3, 4, 5]
>>> print(t)
0                                                         5/319487918/32_
1                         2/861020069/4__                                                 _______________
2         1/1135044777/2_                 3/1142319761/8_                 _______________                 _______________
3 0/1473918015/1_ _______________ _______________ 4/2019165697/16 _______________ _______________ _______________ _______________
>>> list(t.items())
[(0, 1), (1, 2), (2, 4), (3, 8), (4, 16), (5, 32)]
>>>Another example:
.. code-block:: python>>> import treap
>>> t = treap.treap()
>>> import random
>>> for i in range(20):
...    t[random.random()] = i
...
>>> list(t)
[0.011795687154763312, 0.0695864396266509, 0.15741892655439682, 0.18718082546304682, 0.1910965922423038, 0.22849105220538402, 0.276078590851345, 0.3166512089228003, 0.3456516881327997, 0.3543869818366584, 0.4022879538597536, 0.4519316126668157, 0.46329639459896466, 0.4873225275394878, 0.5866856381825849, 0.6403758625610735, 0.6936888466959068, 0.7843975080768091, 0.8888622013819216, 0.9047894146828958]
>>> t.find_min()
0.011795687154763312
>>> t.find_max()
0.9047894146828958
Package: treap-python
A set of python modules implementing treaps is provided.Treaps perform most operations in O(log2(n)) time, and are innately sorted.
They’re very nice for keeping a collection of values that needs to
always be sorted, or for optimization problems in which you need to find
the p best values out of q, when p is much smaller than q.A module is provided for treaps that enforce uniqueness.A pure python version is included, as is a Cython-enhanced version for performance.Release 1.39 is pylint’d and is known to run on at least CPython 2.x, CPython 3.x
and Pypy, Pypy3 (beta) and Jython.
Package: treasmo
TREASMOTREASMOis a Transcription regulation analysis toolkit for single-cell multi-omics data. It quantifies the single-cell level gene-peak correlation strength, based on which a series of analysis and visualization functions are built to help researchers understand their multi-omics data.InstallationTREASMO is written in Python and is available from PyPI. Note that Python version should be 3.x.Install from PyPIPlease run the following command. Creating new environment using conda is recommended.pip3 install treasmo

# For all the functions, please also install leidenalg and minisom
pip3 install leidenalg
pip3 install minisomIf the above method failed, please try create a new environment using conda first then re-install the three packages above.If things still doesn't work, try the method below.Use the package locallyIf there is conflicts with other packages or something unexpected happened, try download the package and use it locally in a new conda environment.# Create a new conda environment
conda create -n treasmo numpy=1.22
conda activate treasmo

# Setting up kernels for Jupyter Notebook if needed
conda install ipykernel
ipython kernel install --user --name=treasmo

# Install dependencies
conda install -c conda-forge scanpy python-igraph leidenalg
conda install -c conda-forge libpysal
conda install -c conda-forge hdf5plugin
conda install -c conda-forge muon
conda install -c conda-forge fa2
conda install -c conda-forge louvain

# Option 1 to install minisom
git clone https://github.com/JustGlowing/minisom.git
cd minisom
python setup.py install

# Option 2 to install minisom
pip3 install minisom

# install Homer if neededQuick startTo test whether the package is working without error and go through important functions in TREASMO:Download the toy example data viaGoogle DriveFollow thisJupyter Notebook tutorialto get familiar with the packageTo prepare your own single-cell multiome data for TREASMO, see refer to Notebookhere.Manuscript-related informationFor supplementary materials, please check theSupplementary_MaterialsfolderFor manuscript results replication, please check thereplicationfolder
Package: treasurecx
treasurecxAdvanced Python wrapper for "treasure.cx".Synchronous Usageimporttreasurecxaccount_types=treasurecx.account_types()# Get account typesprint(account_types)account=treasurecx.generate(type=1)# Generate a Minecraft accountprint(account)# {'status': '...', 'message': '...'}Asynchronous Usageimporttreasurecx.asynchronousaccount_types=awaittreasurecx.asynchronous.account_types()# Get account typesprint(account_types)account=awaittreasurecx.treasure_async.generate(type=1)# Generate a Minecraft accountprint(account)# {'status': '...', 'message': '...'}Synchronous Commandsaccount_typestreasurecx.account_types(source="API")Return a list of account types.Arguments:[source]: The app/website from which the user generated a link (e.g. Discord)||"API" by defaultgeneratetreasurecx.generate(type_=1, source="API")Generate an account with the provided type.Arguments:[type_]: Type of account you want to generate (int) || 1 (Minecraft) by default[source]: The app/website from which the user generated a link (e.g. Discord)||"API" by defaultAccount types can be fetched usingtreasurecx.treasurecx.account_types().Asynchronous Commandsaccount_typesawait treasurecx.account_types(source="API")Return a list of account types.Arguments:[source]: The app/website from which the user generated a link (e.g. Discord)||"API" by defaultgenerateawait treasurecx.generate(type_=1, source="API")Generate an account with the provided type.Arguments:[type_]: Type of account you want to generate (int) || 1 (Minecraft) by default[source]: The app/website from which the user generated a link (e.g. Discord)||"API" by defaultAccount types can be fetched usingtreasurecx.treasurecx.account_types().
Package: treasure-guarder
treasure-guarderA python script for backup repositories to custom git serverLicense: Apache-2.0Documentation:https://treasure-guarder.readthedocs.io.UsagePrepare your working directory, for example/opt/tg-workspacetreasure-guarder will create a cache directory.tgworkunder/opt/tg-workspaceCreate a configure filetreasure-guarder.ymlunder/opt/tg-workspacejust like:repos:
  treasure-guarder:
    from: https://github.com/starofrainnight/treasure-guarder.git
    to: ssh://git@localhost/github/starofrainnight/treasure-guarder.git
  abhealer:
    from: https://github.com/starofrainnight/abhealer.git
    to: ssh://git@localhost/github/starofrainnight/abhealer.gitThen run this command in your console under directiry/opt/tg-workspacetreasure-guarder ./treasure-guarder.ymlNOTICE:Ensure latest git command exists in your shell environmentEnsure you have rights to access to the source repository and the destination repositoryEnsure there won’t prompt password when pushing to destination repositoryNormally, the cache directory.tgworkwill created under current working directoryCreditsThis package was created withCookiecutterand thePyPackageTemplateproject template.History0.0.1 (2019-08-03)First release on PyPI.
Package: treasureisland
TreasureIslandTreasureIsland python package is a machine learning-based Genomic Island prediction software, that uses an unsupervised representation of DNA for its prediction.TreasureIsland is constructed from theBenbow dataset.Dependencies :Python >= 3.7Installation:Option1 - Use pip:python -m pip install treasureislandif treasureisland is already installed :python -m pip install treasureisland --upgradeOption2 - Locally install package:git clone https://github.com/priyamayur/GenomicIslandPrediction.git
python -m pip install -e GenomicIslandPredictionUsage:Option1 - Run TreasureIsland directly from commandline  :Run TreasureIsland from commandline on your DNA fasta file (example DNA files providedhere), output is given in csv format:treasureisland mypath/<DNA file>.fasta [-o <output_file_path>] [-ut <upper threshold value>]Option2 - Run TreasureIsland from python :The TreasureIsland package is used to find genomic island predictions which can be downloaded in csv, xlsx, txt file formats demonstrated inTreasureIsland packageInput file:DNA sequence files in fasta format with a sequenceID.example: >NC_002620.2 Chlamydia muridarum str. Nigg, complete sequence
CACATAGCAAAACACTCAAAGTTTTTCAGCAAAAAAGCTTGTTGAAAAAATTGTTGACCGCCTGTTCACA....Performance:TreasureIsland takes 2-5 mins to run depending on the size of the input.Output :The results are shown in the following format for each genomic island:example : NC_002620.2 1.0 130000.0 0.95597Upper Threshold:User also has the ability to change the upper threshold value to change the precision and recall tradeoff.
upper threshold is set to 0.80 by default.Example :treasureisland ecoli.fasta -o gei_output -ut 0.95
Setting the upper threshold to 0.95 would increase the precision and decrease the recall performance.Testing:A repository containing somesample DNA filesthat can be downloaded to test TreasureIsland.
Note : github downloads fasta file in txt format (filename.fasta.txt).example :treasureisland ecoli.fasta -o gei_output -ut 0.95Running TreasureIsland package from python:import the Predictor class from treasureisland package:from treasureisland.Predictor import PredictorInstantiate the sequence with the DNA sequence file path as the argument.
The DNA file used can be a fasta file.seq = Predictor("<Path to DNA fasta file>/ecoli.fasta", "<output_file_path>")Optionally, change the upper threshold value.seq.change_upper_threshold(0.9)Get prediction data frame from sequence by running the predict method.pred = seq.predict()The predictions can be downloaded in text, csv, excel formats.seq.predictions_to_csv(pred)
seq.predictions_to_excel(pred)
seq.predictions_to_text(pred)Contact:Feel free to contact atbanerjee.p1104@gmail.com
Package: treasures-calc
<b>OPTIONS CALC</b><section><b>AGGREGATE PC RATIOS</b><p>CALCULATE THE SUMS AND RATIOS OF:THE ASK VALUE OF EVERY CALL : THE ASK VALUE OF EVERY PUTTHE BID VALUE OF EVERY CALL : THE BID VALUE OF EVERY PUTTHE LAST VALUE OF EVERY CALL : THE LAST VALUE OF EVERY PUT</p><code>import OPTIONS_CALC.STATS.AGGREGATE_PC_RATIO as AGGREGATE_PC_RATIOEVALUATION = AGGREGATE_PC_RATIO.CALC (EXAMPLE_1)import jsonprint ("EVALUATION:", json.dumps (EVALUATION, indent = 4))</code></section>
Package: treasury
treasurya simple api client for interacting with sfcc using waddle as its secrets
manager.  named after a group of goldfinches.  pax avium.key config elementsclient_idpasswordorganization_idshort_codebase_urlsite_idwebdav_prefixscopesscopes:we need to add respective scope in sfcc administrative console
in order to be able to pull data elements such as orders, products, categories etc.
ex:sfcc.products for productssfcc.catalogs for catalogssfcc.orders for orderscallable api methods and usage guidelines:products_last_modifiedtheCommerceApi.products_last_modifiedmethod can be used to retrieve all products
by last modified date range. a preconfigured test fixture has been used to send the
api object to pytest methods. the max limit of number of products can be retrieved in a
single call is 200. this method takes the following input params:from_dateto_dateproduct_variationstheCommerceApi.product_variationsis used for variant information of a given product.
input param isproductid.orders_by_creation_dateorders information can be retrieved using the methodCommerceApi.product_variationsfor a given date range.
input params arestart_dateandend_dateget_orders_by_modified_date_pageCommerceApi.get_orders_by_modified_date_pagemethod can be used for retrieving
orders information by last modified date.
input params arestart_date,end_dateoptional params arepageandlimitexample test method usagetest fixture definition:@pytest.fixture(scope='session')defapi(sfcc_config):fromtreasury.apiimportCommerceApireturnCommerceApi(sfcc_config)writing a test# this would retrieve all products between given date range by last modified datedeftest_search_modified_products(api):"""can we get all products between date range"""# get product infoa=api.products_last_modified('2023-01-04T00:00:00.000Z','2023-01-05T00:00:00.000Z')project test, build and publish to pypi.orgmake test-- for running the test casesmake build-- build the project to identify potential errors within the codemake publish-- deploy the project in pypi.org undertreasuryproject
Package: treasurycurves
Access and chart US Treasury Curve dataFull documentation can be found attreasury-curves.readthedocs.ioSelecting and plotting dataUsing the Developer API found attreasury.gov,
one can find yield curves dating back to the 90's.Access data for a particular date usingcurves("2022-08-08").
curves will find the nearest valid date (weekday) and returns a pandas dataframes of all curves
available on that date or nearest to it. callingcurves()will use the current date.
Optionally specifycurves(allow_missing=True)to keep years with missing data.Alternatively, you can retrieve all data by callingdownload().Once you have the data, it is possible to plot out the yield curves withplot(curves_data, start="2022-01-01", end="2022-05-03", num_years=1).
Specify the number of years, or pick a start and end date to sample from, as the chart would otherwise
become inundated with yield curve data.Save your data in a spreadsheet usingexport(curves_data, file_extension="csv")and specify
"csv" or "xlsx" to determine the file type.Using treasurycurves from the Command LineInstall through pip:pip install treasury-curvesOnce installing, you can run the entrypoint:treasury --helpUse the module directly:import treasuryWorking inside the repositorypython treasury.py --helpusage: treasury.py [-h] [-a] [-s START] [-e END] [-d DATE] [-y YEARS] [-p] [-o OUTPUT]

treasurycurves - query and analyze US Treasury yield data

optional arguments:
  -h, --help            show this help message and exit
  -a, --allowna         Allow NaN values
  -s START, --start START
                        Year to start analysis
  -e END, --end END     Year to end analysis. If equal to start, analyze curves for the year
  -d DATE, --date DATE  Date in YYYY-MM-DD to analyze
  -y YEARS, --years YEARS
                        Num years before end to analyze
  -p, --plot            Plot yield curves
  -o OUTPUT, --output OUTPUT
                        File extension to save data (csv or xlsx), leave empty to avoid saving file
Package: treasuryio
pytreasuryio======Access .. _treasury.io: http://treasury.io from Python.This is a package consisting of a single, simple function for submitting ``SQL`` queries to .. _treasury.io: http://treasury.io from ``python``. While you could simply copy-and-paste the function from script-to-script, this makes it quicker and easier to get up and running!It also has some helpers to make a Twitter bot from the treasury.io data.Installation--------Install with pip.::pip install treasuryioExample---------Basic query~~~~~~~~~Send an SQL query and receive a pandas data frame.::# Operating cash balances for May 22, 2013import treasuryiosql = 'SELECT * FROM "t1" WHERE "date" = \'2013-05-22\';'treasuryio.query(sql)Twitter bot~~~~~~~~~Write a ``~/.twitter.yml`` file.::consumer_key: oeshaoduhsaousaoeuhtsconsumer_secret: b233tsao-enuhsaoehsunoesudtuhoelaouhs2uoaccess_token: 2349081293-astoehusatoehusaoeustahoeuhh2AOEUTAouhcaccess_token_secret: 9023uonshesuaHONETuoeuoeouo0eOHNEuhOuoeuDefine a function that produces the text of the tweet, and decorate it with the``@treasurio.tweet`` decorator.::import treasuryioimport humanizeimport mathMIL = 1e6# Helpers to humanize numbers / datesdef human_number(num):return humanize.intword(int(math.ceil(num))).lower()def human_date(date):return humanize.naturalday(date).title()@treasuryio.tweetdef total_debt_tweet():df = treasuryio.query('SELECT date, close_today FROM t3c WHERE (item LIKE \'%subject to limit%\' AND year = 2013 AND month >=1) ORDER BY date DESC')# determine length of DataFrameend = len(df)-1# extract current amount and amount at the beginning of the yearcurrent_amt = df['close_today'][0]*MILprevious_amt = df['close_today'][end]*MIL# calculate changedelta = abs(current_amt - previous_amt)# generate word to represnet the direction of changeif current_amt > previous_amt:change = "increased"elif current_amt < previous_amt:change = "decreased"# humanize values# Notice the included ``human_date`` and ``human_number`` functions which simplify these values for youcurrent_date = human_date(df['date'][0])amt = human_number(current_amt)delta = human_number(delta)previous_date = human_date(df['date'][end])# generate tweetvals = (current_date, amt, change, previous_date, 'http://treasury.io')return "As of %s, the US Gov is $%s in debt. This amount has %s since %s - %s" % valsThen just run it.::total_debt_tweet()You can get fancy by switching the functions that you use.::import treasuryioimport random@treasurio.tweetdef tweet_a():# ...@treasurio.tweetdef tweet_b():# ...@treasurio.tweetdef tweet_c():# ...random.choice([tweet_a, tweet_b, tweet_c])()
Package: treat-sim
An open treatment centre simulation model.This work occompanies Monks et al (2022).The repo contains an free and open implementation of the Treatment Centre Model from Nelson (2013).  It is published under a permissive MIT license.ReferencesMonks.T, Harper.A, Anagnoustou. A, Allen.M, Taylor.S. (2022) Open Science for Computer SimulationNelson. B.L. (2013).Foundations and methods of stochastic simulation. Springer.
Package: treblle
Treblle for DjangoTreblle makes it super easy to understand what’s going on with your APIs and the apps that use them. Just by adding Treblle to your API out of the box you get:Real-time API monitoring and loggingAuto-generated API docs with OAS supportAPI analyticsQuality scoringOne-click testingAPI management on the goand more...RequirementsrequestsInstallationYou can install Treblle for django viaPYPi. Simply run the following command:$pipinstalltreblleDon't forget to load the required python modules in your settings.py like so:INSTALLED_APPS = [ 
...
'treblle',
]MIDDLEWARE_CLASSES = [
...
'treblle.middleware.TreblleMiddleware',
]Getting startedNext, create a FREE account onTreblleto get an API key and Project ID. After you have those simply initialize Treblle in yoursettinsg.pyfile like so for django:TREBLLE_INFO = {
'api_key': os.environ.get('TREBLLE_API_KEY'),
'project_id': os.environ.get('TREBLLE_PROJECT_ID')
}That's it. Your API requests and responses are now being sent to your Treblle project. Just by adding these lines of code you get features like: auto-documentation, real-time request/response monitoring, error tracking and so much more.Need to hide additional fields?If you want to expand the list of fields you want to hide, you can pass property names you want to hide by using theTREBLLE_HIDDEN_KEYSsetting like in the example below.TREBLLE_HIDDEN_KEYS = ["id", "email"]TREBLLE_INFO = {
'api_key': os.environ.get('TREBLLE_API_KEY'),
'project_id': os.environ.get('TREBLLE_PROJECT_ID'),
'hidden_keys' : TREBLLE_HIDDEN_KEYS
}releases0.9 - stable0.10, 0.11 - send application errors to treblle0.13 - solve bug of hidden field being too long0.14 - fixesSupportIf you have problems of any kind feel free to reach out viahttps://treblle.comor emailvedran@treblle.comand we'll do our best to help you out.LicenseCopyright 2022, Treblle Limited. Licensed under the MIT license:http://www.opensource.org/licenses/mit-license.php
Package: trecrun
TRECRunTRECRunis a library for working with TREC run files, with an API heavily inspired by PyTerrier's pipeline operators.APIOperatorDescriptionTRECRun(results)Create aTRECRunobject from a dictionary of results or a path to a run file in TREC format.add(self, other),subtract,multiply,divide+,-,*,/Perform the given operation between self's document scores andother, which can be aTRECRunor a scalar.topk(self, k)%Retain only the top-k documents for each qid after sorting by score.intersect(self, other)&Retain only the queries and documents that appear in bothselfandother.concat(self, other)Concat the documents inotherandself, with those inotherappearing at the end. Their scores will be modified to accomplish this.normalize(self, method='rr')Normalize scores in self using RRF (rr), sklearn's min-max scaling (minmax), or sklearn's scaling (standard).write_trec_run(self, outf)Writeselftooutfnin TREC format.evaluate(self, qrels, metrics, return_average=True)Computemetricsforselfusingqrelsand return either the average metric or a dict mapping metric names to their values for each QID.
Package: trecs
A library for using agent-based modeling to perform simulation studies of sociotechnical systems.InstallationSystem requirementsCurrently, the simulator has only been tested extensively on MacOS 10.15 and Ubuntu 20.04.
This simulator supports Python 3.7+ and it has not been tested with older versions of Python 3. If you have not configured a Python environment locally, please follow Scipy’sinstructions for installing a scientific Python distribution.If you do not have Python 3.7+ installed, you can create a new environment with Python 3.7 by running the following command in terminal:condacreate--namepy37python=3.7To ensure the example Jupyter notebooks run in your Python 3.7 environment, followthe instructions from this blog post.Note: you will also needpandasto run the example notebooks. As of December 2020, we recommend installingpandas v1.0.5using the command:pip install'pandas==1.0.5'. This will help avoid package conflicts betweenpandasandpylintif you also plan on contributing totrecsand running tests.For usersTo install the simulator, you will need the Python package manager,pip. After activating your virtual environment, run the following command in a terminal:pipinstalltrecsFor developersIf you’d like to install the latest version oftrecsbased on what is currently in the main branch of the repository, run the following commands after activating your virtual environment:gitclonehttps://github.com/elucherini/t-recs.gitcdt-recspipinstall-e.Additionally, you may runpip install-rrequirements-dev.txtto install a few additional dependencies that will be useful for linting, testing, etc.DocumentationIf you would like to edit the documentation, see thedocs/folder. To build the documentation on your local folder, you will need to installsphinxand thesphinx-rtd-themeviapip. Next,cdinto thedocsfolder and runmake html. The output of the command should tell you where the compiled HTML documentation is located.TutorialsExamples of how to use the simulator can be found in the notebooks below:Quick start: start here for a brief introduction.Complete guide: an overview of the main concepts of the system.Advanced guide -building a model: an introduction to adding your own models on top of the system.Advanced guide -adding metrics: an example of how to add new metrics to a model.Please check theexamplesdirectory for more notebooks.Example usageimporttrecsrecsys=trecs.models.ContentFiltering()recsys.run(timesteps=10)measurements=recsys.get_measurements()DocumentationA first draft of the documentation is availablehere. In its current version, the documentation can be used as a supplement to exploring details in the code. Currently, the tutorials inexamplesmight be a more useful and centralized resource to learn how to use the system.ContributingThanks for your interest in contributing! Check out the guidelines for contributors inCONTRIBUTING.md.