Saravanan666/pypi-org huggingface dataset:
Package: tred
tred----tred implements a range of order-3 tensor decompositions. Mathematically,they rely on a novel tensor algebra introduced in [1]. Within this framework,natural tensor analogues of SVD and PCA were recently formulated; thesedecomposition techniques also have analytically proven optimality propertiesthat mirror those of their matrix counterparts.The only top-level dependency, for an end user, is scikit-learn. We inherit fromtheir base classes, so tred's class API's should be natural to any pastscikit-learn users. tred's function API's also mirror scipy counterparts as muchas possible.For the underlying tensor-product framework and tensor t-SVDM, see [1].For the explicit rank truncation, and the TCAM algorithm, see [2].Use---[MORE USER-FRIENDLY EXAMPLES WILL BE UP SOON]tred is on PyPI, simply runpip install --upgrade tredTo use the package.tred is in active development. But, most of the existing implementations arecovered by unit tests, and we aim to keep the API relatively stable.Users are highly encouraged to visit the GitHub site, and open issues.Literature----------[1] Kilmer, M.E., Horesh, L., Avron, H. and Newman, E., 2021. Tensor-tensoralgebra for optimal representation and compression of multiway data. Proceedingsof the National Academy of Sciences, 118(28), p.e2015851118.[2] Mor, U., Cohen, Y., Valdés-Mas, R., Kviatcovsky, D., Elinav, E. and Avron,H., 2022. Dimensionality reduction of longitudinal’omics data using moderntensor factorizations. PLoS Computational Biology, 18(7), p.e1010212.NOTE: In literature, the authors use m, p, n as the dimensions of the tensors,whereas throughout this package one will see we prefer n, p, t instead. We willalso use k = min(n, p), where from an `omics analysis perspective, typicallymeans k = n, as p >> n typically.Development-----------For anyone who is interested in contributing to / modifying the package:For development dependencies, invoke:pip install -r requirements.txtIn the root to install all of the required packages for development.To test any changes, invoke:pytest .In the root to run the tests in the test folder.If opening pull requests, invoke:black .In the root to autoformat code.To build an updated version of the docs, invoke:pdoc --html --output-dir docs tredIn the root to generate the docs in html under a `docs` directory.Much of the implementation and code practice mirrors that of scikit-learn. Weadopt their utilities and general coding guidelines whenever we can.For any interested contributors, please be very liberal in adding tests, bothfor new and existing features.Credit------Our implementation was inspired by analogues athttps://github.com/scikit-learn/scikit-learnAnd also byhttps://github.com/UriaMorP/mprod_packageFuture------New experimental methods may be added to tred.
Package: tredge
tredgeThis is tiny yet fast module to get set of explicitly defined transitive edges from a directed acyclic graph. Given a DAG with edgeschild<--parentrepresented as dictionary (keys are children, values are iterables with parents), or as iterable of iterables representing edges ((child,parent)), or as file object pointing to tab-delimited file with 2 columns (child,parent), it returns set of transitive edges found there. Original intent of this package was to use it for removing redundant edges from tree structures.If a given graph is cyclic,transitive_edgesfunction will not return edges that include vertices participating in loops. To find such vertices beforehand or make sure there are none, there is a functioncycles(g).Usage:importtredgeg={'b':{'a'},'c':{'a'},'d':{'b','c','a'},'e':{'d','a'}}result=tredge.transitive_edges(g)print(result)# {('d', 'a'), ('e', 'a')}orimporttredgeg=[('b','a'),('c','a'),('d','b'),('d','c'),('e','d'),('e','a'),('d','a')]result=tredge.transitive_edges(g)print(result)# {('d', 'a'), ('e', 'a')}or"""input_file.tab:b	ac	ad	bd	ce	de	ad	a"""importtredgewithopen('input_file.tab',mode='r',encoding='utf8')asg:result=tredge.transitive_edges(g)print(result)# {('d', 'a'), ('e', 'a')}To check if a graph has cycles:importtredgeg={'b':{'a'},'c':{'a'},'d':{'b','c','a'},'e':{'d','a'}}result=tredge.cycles(g)print(result)# {'e', 'c', 'd'}
Package: tredis
An asynchronous Redis client for TornadoDocumentation is available attredis.readthedocs.io.Commands ImplementedTRedis is a work in progress and not all commands are implemented. The following
list details each command category and the number of commands implemented in each.If you need functionality that is not yet implemented, follow the patterns for
the category mixins that are complete and submit a PR!CategoryCountCluster2 of 20Connection5 of 5Geo0 of 6Hashes13 of 15HyperLogLog3 of 3Keys22 of 22Lists9 of 17Pub/Sub0 of 6Scripting6 of 6Server7 of 30Sets15 of 15Sorted Sets8 of 21Strings23 of 23Transactions0 of 5For information on local development or contributing, seeCONTRIBUTING.rstExampleimportloggingimportpprintfromtornadoimportgen,ioloopimporttredis@gen.enginedefrun():client=tredis.Client([{"host":"127.0.0.1","port":6379,"db":0}],auto_connect=False)yieldclient.connect()value=yieldclient.info()pprint.pprint(value)ioloop.IOLoop.current().stop()if__name__=='__main__':logging.basicConfig(level=logging.DEBUG)io_loop=ioloop.IOLoop.current()io_loop.add_callback(run)io_loop.start()
Package: tredparse
TREDPARSE: HLI Short Tandem Repeat (STR) callerAuthorHaibao Tang (tanghaibao)Smriti Ramakrishnan (smr18)Emailhtang@humanlongevity.comLicenseSee included LICENSEDescriptionProcess a list of TRED (trinucleotide repeats disease) loci, and infer
the most likely genotype.InstallationMake sure your Python version ≥ 3.6 (tested in ubuntu, Python 2 no longer
supported):pipinstall--user-Ugit+git://github.com/humanlongevity/tredparse.gitFor accessing BAMs that are located on S3, please refer todocker/tredparse.dockerfilefor installation of SAMTOOLS/pysam with S3
support.Or, you can simply build and use the docker image:dockerpullhumanlongevity/tredparse
dockerrun-v`pwd`:`pwd`-w`pwd`humanlongevity/tredparse\tred.py--tredHDtest.bamExampleFirst specify the input bam paths and sample keys in a CSV file, liketests/samples.csv. This file is comma separated:#SampleKey,BAM,TRED
t001,tests/t001.bam,HD
t002,tests/t002.bam,DM1If third column is omitted, then all 30 TREDs are scanned. For example:#SampleKey,BAM
t001,tests/t001.bam
t002,tests/t002.bamPlease also note that the BAM path can start withhttp://ors3://, provided
that the corresponding BAM index can be found.Runtred.pyon sample CSV file and generate TSV file with the
genotype:tred.pytests/samples.csv--workdirworkHighlight the potential risk individuals:tredreport.pywork/*.json--tsvwork.tsvThe inferred "at-risk" individuals show up in results:[DM1]-Myotonicdystrophy1rep=CAGinherit=ADcutoff=50n_risk=1n_carrier=0loc=chr19:45770205-45770264
SampleKeyinferredGenderCallsDM1.FRDM1.PRDM1.RRDM1.PPt002Unknown5|625|24...|1;39|1;40|1;42|1;43|1;46|249|3;50|81[HD]-Huntingtondiseaserep=CAGinherit=ADcutoff=40n_risk=1n_carrier=0loc=chr4:3074877-3074933
SampleKeyinferredGenderCallsHD.FRHD.PRHD.RRHD.PPt001Unknown15|4115|4...|1;21|1;24|2;29|1;34|1;41|11One particular individualt001appears to have15/41call (one allele at15CAGs
and the other at41CAGs) at Huntington disease locus (HD). Since the risk cutoff
is40, we have inferred it to be at-risk.A.report.txtfile will also be generated that contains a summary of
number of people affected by over-expanded TREDs as well as population allele
frequency.To better understand the uncertainties in the prediction, we can plot the
likelihood surface based on the model. Using the same example as above at the
Huntington disease case, we can run a command on the JSON output, with option--tred HDto specify the locus.tredplot.pylikelihoodwork/t001.json--tredHDThis generates the following plot:Server demoThe server/client allowstredparseto be run as a service, also showing the
detailed debug information for the detailed computation.Installmeteorif you don't have it yet.curlhttps://install.meteor.com/|shThen build the docker image to run the command, then run the server.cddocker
makebuildcd../server
meteornpminstall
meteor
Package: tree2ogg
A script that allows recursively transcode directories/playlists of FLAC files
to Ogg.When encountering existing files in the target directory,tree2oggby
default will skip them if the target’s modification time is newer than the
source. This can be changed by using the--forceand--skipflags.InstallationTo installtree2ogg, use pip:pip install tree2oggYou can also install the latest development version from github:pip install git+https://github.com/guyru/tree2ogg.git#egg=tree2oggSynopsisusage: tree2ogg [-h] [-j JOBS] [--force | --skip] [-v] [--version]
                src dst_dir ...

Convert a directory tree of FLAC files to Ogg.

positional arguments:
  src                   source directory/playlist
  dst_dir               destination directory
  oggenc_args           additional arguments to pass to oggenc

optional arguments:
  -h, --help            show this help message and exit
  -j JOBS, --jobs JOBS  number of simultaneous encoding process to spawn
  --force               force overwrite existing files
  --skip                always skip existing files
  -v, --verbose         increase output verbosity
  --version             show program's version number and exitCreditsAuthor:Guy Rutenberg
Package: tree2tax
tree2tax========[![Build Status](https://img.shields.io/travis/wwood/tree2tax.svg)](https://travis-ci.org/wwood/tree2tax)Automatic taxonomy through consistent application of tree-based thresholding.Phylogenetic tree insertion methods (such as [GraftM](https://github.com/geronimp/graftM) and[pplacer](http://matsen.fhcrc.org/pplacer/)) can place sequences into parts of the tree where taxonomists have notyet come to agreed upon names. Here, 7 different granularities of operational taxonomic units (OTUs) are automatically assigned based on tree distance thresholds, and thennodes corresponding to these thresholds are given names taken from the usual taxonomy so they are meaningful to humansand their formidable pattern finding skillz.Tree2tax is inspired by, but not related to, the [tax2tree](https://github.com/biocore/tax2tree) software, which doesn't suggest new taxonomic clades.Pre-requisites:* A taxonomically annotated tree, tested on greengenes 99_otus.tree* some standard Unix toolsHow:```shpip install tree2taxtree2tax -h```Auto-taxonomy Naming Convention-----The output OTU file names lineages according to the following naming convention. It is somewhat involved, and requires some explanation.After a clade is defined, to name that clade tree2tax searches up the tree to find the closest named ancestral node (unless the node itself is already named). Some examples:```O__gHalococcus```An (approximately) order level grouping, where lowest ancestral named node is the genus Halococcus. The initial 'O' is capitalised to indicatethat this is not a true taxonomic level (a suggestion by Dr Donovan Parks (github @dparks1134)).```S__gHalobacteriaceae.1```An (approximately) species level grouping, where the lowest ancestral node is the genus Halobacteriaceae. The `.1` at the end indicates that >1 species level grouping has this same name, but the grouping above has the largest amount of tips (sequences) included: a `.2` would indicate the clade with the second largest number of tips, and so on.```C__cHalobacteria.oHalobacteriales```An approximately class level grouping where the ancestral named node has been annotated as both the class Halobacteria and the order Halobacteriales```P__kArchaea.pEuryarchaeota|cMethanomicrobia```An approximately phylum level grouping where the ancestral named node is Methanomicrobia. The `kArchaea.pEuryarchaeota` is included because the higher level parent kingdom grouping is `K__Root`, so the Archaea and Euryarchaeota labels would otherwise be missing.History-------0.1.0 (2015-01-11)---------------------* First cookiecutter.
Package: treeage
/’trēˌāj/1.n.a process in which things are ranked in terms of importance or priority.2.n.software that lists contents of directories in a tree-like format with age metric indicated for each filetreeageis typically used to shed some light on antiquated parts[1]of a codebase and identify candidates for a refactoring.Installtreeageis written for Python 3.5+, install with pip viapip3 install treeagecommand.UsageUsage: treeage.py [OPTIONS] DIRECTORY

  Lists contents of directories in a tree-like format with age metric
  indicated for each file.

Options:
  --maxdepth LEVELS    Descend at most LEVELS (a non-negative integer) levels
                       of directories below the seed DIRECTORY
  -i, --include GLOB   List only files whose base name matches GLOB (using
                       wildcard matching)
  -e, --exclude GLOB   Exclude files whose base name matches GLOB (using
                       wildcard matching)
  --before DATE        List only files whose age is older than DATE
  --after DATE         List only files whose age is lower than DATE
  -v, --verbosity LVL  Either CRITICAL, ERROR, WARNING, INFO or DEBUG
  --version            Show the version and exit.
  -h, --help           Show this message and exit.

  Examples:
  treeage --maxdepth 2 --before "01 jan 2018"../qifqif
  treeage --include "*.py" --after "3 month ago" .ScreenshotFootnotes[1]file age is computed by averaging last modification date of its lines
Package: tree-aid
ReadmeTree Aid UtilitiesSimply call:'''
python3 -m tree_aid.placettes
'''In the directory with the tree and plot data (.json), will output a CSV with processed data.Alternativly, use in a script / jupyter notebook..'''
from tree_aid.placettes import add_data_to_df, get_clean_tree_df, get_dictionary_from_json
#from tree_aid.placettes import add_data_to_df, get_clean_tree_df, get_dictionary_from_json
%load_ext autoreload
%autoreload 2config = {
'name_scientific': 'name_scientific',
'small_trees': 'small_circle/repeat_small_tree_circle',
'large_trees': 'group_large_tree/repeat_large_tree',
'geolocation': '_geolocation',
'large_tree_stems' : 'group_large_tree/repeat_large_tree/grp_tree_stand_shoots/repeat_circumference_stem',
'large_tree_circumfrence': 'group_large_tree/repeat_large_tree/grp_tree_stand_shoots/repeat_circumference_stem/grp_circumference_stem/circumference_measure'
}tree_data_loc = './test/Mali_PMP_TREE_Survey_FINAL-2021-10-11-15-15-46.json'
plot_data_loc = './test/Mali_PMP_PLOT_Survey_FINAL-2021-10-11-15-16-08.json'
output_data_loc = './output.csv'tree_data = get_dictionary_from_json(tree_data_loc)
plot_data = get_dictionary_from_json(plot_data_loc)tree_plot_df = get_clean_tree_df(tree_data,plot_data, config)
output_df = add_data_to_df(tree_plot_df, config)
#output_df.to_csv(output_data_loc)
'''
Package: treeart
TreeartTreeart lets you draw ASCII trees easily. These can contain nodes that span multiple lines, they will be correctly combined.Examples>>> from treeart import *
>>> print(binary_edge(1, 2, 3))
╭─1─╮
2   3

>>> print(binary_edge(1, 2, binary_edge(3, 4, 5)))
╭──1──╮
2   ╭─3─╮
    4   5

>>> x, y = 'x', 'y'
for i in range(5):
    x, y = binary_edge(i, x, y), x
print(x)
                  ╭───────────4───────────╮
          ╭───────3──────╮           ╭────2───╮  
     ╭────2───╮       ╭──1──╮     ╭──1──╮   ╭─0─╮
  ╭──1──╮   ╭─0─╮   ╭─0─╮   x   ╭─0─╮   x   x   y
╭─0─╮   x   x   y   x   y       x   y            
x   y

>>> print(binary_edge('aa\nbb', 'c', 'eee\nfff'))
  aa
╭─bb─╮
c   eee
    fffCustomizationYou can specify three kinds of edges, which use more or less space, and might work better for different applications:>>> print(binary_edge(111, 222, 333, align='upper'))
 ╭─111─╮
222   333

>>> print(binary_edge(111, 222, 333, align='center'))
   111
 ╭──┴──╮
222   333

>>> print(binary_edge(111, 222, 333, align='lower'))
   111
222─┴─333You can also specify a gap on either side of the abutting edges:>>> print(binary_edge(111, 222, 333, align='upper', gap=True))
 ╭─ 111 ─╮
222     333
Package: treebeard
Development Installpipenv installDevelopment against BackendTo run against local servicesexport TREEBEARD_ENVIRONMENT=developmentTo run against prod services but with Sentry suppressedexport TREEBEARD_ENVIRONMENT=stagingCode Quality ChecksClone typeshed into therepo rootgit clone https://github.com/python/typeshed.gitpyright && python3.7 -m black --check .isort -m 3 -tc -y
Package: treeboost_autograd
treeboost_autogradEasy Custom Losses for Tree Boosters using PytorchWhy calculate first and second derivatives for your objective when you can let PyTorch do it for you?This packages includes an easy to use custom PyTorch objective implementation for tree boosters (just add loss).Supported boosting packages:CatBoost, XGBoost, LightGBM.Supported tasks:regression, binary classification.Check out the post in Towards Data Science:https://towardsdatascience.com/easy-custom-losses-for-tree-boosters-using-pytorch-57ffaa0b2eb3UsageUsage is very similar for all boosting libraries:from treeboost_autograd import CatboostObjective, LightGbmObjective, XgboostObjectiveReady-to-run examples are available at the Git repo:https://github.com/TomerRonen34/treeboost_autograd/tree/main/examplespip install treeboost_autograddefabsolute_error_loss(preds:torch.Tensor,targets:torch.Tensor)->torch.Tensor:returntorch.abs(preds-targets).sum()custom_objective=CatboostObjective(loss_function=absolute_error_loss)model=CatBoostRegressor(loss_function=custom_objective,eval_metric="MAE")model.fit(X_train,y_train)
Package: treecker
TreeckerWhat does it mean?The name "Treecker" comes from the contraction of "tree" and "tracker".What is it for?Treecker is a Python package to control the integrity of a directory.Is it hard to use?Just type one of the available commands in a terminal.BackgroundHave you ever wondered if you had accidentally destroyed or altered a part of the data contained in your favorite directory without realizing it?
Do you want to be able to stamp a part of your data and to control at any time that they are still in the state where you had left them?
Do you think that one of your files has been corrupted, but you don't know which one?
If so, this package is for you.FeaturesThis Python package is for inspecting and tracking the organization of files in a directory.
A snapshot of the tree structure is saved in a file placed at the root of the tracked directory.
At any time it is possible to compare the current state of the directory with the latest snapshot, and to save the new state.
The program can also check that the file and folder names match a regular expression.
This allows to detect errors in the naming of files.
These features are accessible via the following commands:init: To create the first snapshot of a directory.status: To display the changes since last snapshot.commit: To save the change in a new snapshot.issues: To display misnamed or unreadable files.InstallationYou can find how to install the package in theinstallation sectionof the documentation.UsageYou can find how to use the package in theexamples sectionof the documentation.CreditsDunstan BechtLicenseThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with this program. If not, seehttps://www.gnu.org/licenses/.
Package: treecomp
treecompOverviewA CLI and Python API to recursively compare directory trees and output a unified diff.
Supports ignoring and targeting file and folder patterns with.gitignore-style syntax.
Plays well with other tools: pipe output todunkfor pretty diffs and use-f jsonto output to JSON for use withjqand other tools.Getting StartedThe recommended way to installtreecompis withpipx,
though it can also be installed withpip.pipx install flexlateOr, if you don't have/don't want to installpipx:pip install flexlateThe unidiff output from this tool is best viewed usingdunk,
which can also be installed viapipx/pip.pipxinstalldunkCompare two file trees recursively and output unified diffs.treecompmy_folder_1my_folder_2|dunkIt supports ignoring and targeting patterns with.gitignore-style syntax.It also has a strongly-typed Python API.Seeexamples in the documentation.Development StatusThis project is currently in early-stage development. There may be
breaking changes often. While the major version is 0, minor version
upgrades will often have breaking changes.DevelopingFirst ensure that you havepipxinstalled, if not, install it withpip install pipx.Then clone the repo and runnpm installandpipenv sync. Runpipenv shellto use the virtual environment. Make your changes and then runnoxto run formatting,
linting, and tests.Develop documentation by runningnox -s docsto start up a dev server.To run tests only, runnox -s test. You can pass additional arguments to pytest
by adding them after--, e.g.nox -s test -- -k test_something.AuthorCreated by Nick DeRobertis. MIT License.LinksSee thedocumentation here.
Package: treeconfigparser
treeconfigparserCustom configuration parser based on a tree.DocumentationInstallationInstall using pip:$ pip install treeconfigparseror using conda:$ conda install -c alfarchi treeconfigparserMain usage>>> import treeconfigparser as tcp
>>> config = tcp.TreeConfigParser()
>>> config.read_file(file_name)
>>> config.get(['sec1', 'subsec11', 'opt1'])
'val1'FeaturesArbitrary configuration tree are possible.Can read and parse configuration file. Two different
and intuitive file formats are supported.Configuration files can include comments and
cross-references between options.Alternatively, the configuration can be manipulated
using the class methods.The access to options is simple and supports customised
type conversions.The configuration can also be written to a file to be
re-used later on.More details can be found in thedocumentation.
Package: treecontainers
Tree ContainersAsymptotically-efficient tree-based containers in pure Python. Licensed under theApache License Version 2.0.Priority MapA combination between a heap and a map that stores key:priority mappings.OperationsOperationDescriptionRuntime Complexity__getitem__(key)Get priority of keyO(1)__setitem__(key, priority)Set priority of keyO(log n)__delitem__(key)Remove a keyO(log n)__contains__(key)Check whether a key is containedO(1)__len__()Return the number of keys containedO(1)peek()Get lowest-priority key and its priorityO(1)pop()Get and remove lowest-priority key and its priorityO(log n)Example Console Output>>>fromprioritymapimportPriorityMap>>>pm=PriorityMap()>>>pm["first"]=1>>>pm["second"]=2>>>pm["underdog"]=5>>>pm.peek()('first',1)>>>pm["underdog"]=0>>>len(pm)3>>>pm.pop()('underdog',0)>>>pm.pop()('first',1)>>>pm.pop()('second',2)>>>len(pm)0PrioritySetTo be implemented.TreeMapTo be implemented.