Saravanan666/pypi-org huggingface dataset:
Package: treestructure
Tree StructureTree Structure is a module that implements some common trees in data structure.Quick StartThere are two basic components in each type of tree structure:NodeandTree.Each node has two basic attributes:orderandvalue.Order is the key to construct the tree structure. Default order is current timestamp.Value can be anything you want to store. Default value is None.>>>importtreestructure>>>node=treestructure.BinaryNode(35,'Stevie Wonder')# Create node>>>node.order35>>>node.value'Stevie Wonder'Insert node into tree to build the tree structure.Use package() to check the tree structure.
It's better using package() withpprintmodule.>>>importpprint>>>tree=treestructure.BinarySearchTree(node)# Create tree>>>tree.insertNode(treestructure.BinaryNode(45,'Ray Charles'))# Insert node>>>tree.insertNode(treestructure.BinaryNode(25,'Lionel Richie'))# Insert node>>>pprint.pprint(tree.package(),sort_dicts=False)# Display tree{'order':35,'value':'Stevie Wonder','leftChildNode':{'order':25,'value':'Lionel Richie','leftChildNode':None,'rightChildNode':None},'rightChildNode':{'order':45,'value':'Ray Charles','leftChildNode':None,'rightChildNode':None}}Delete node by specific order.>>>delNode=tree.deleteNode(35)# Delete node>>>pprint.pprint(delNode.package(),sort_dicts=False)# Display node{'order':35,'value':'Stevie Wonder','leftChildNode':{},'rightChildNode':{},'parentNode':{}}>>>pprint.pprint(tree.package(),sort_dicts=False)# Display tree{'order':25,'value':'Lionel Richie','leftChildNode':None,'rightChildNode':{'order':45,'value':'Ray Charles','leftChildNode':None,'rightChildNode':None}}ContentsBinary NodeBinary Search TreeBinary Heap
Package: treesum
Parsimonious Tree SummaryDo you like looking at trees, but hate scrolling?treesumtakes a complex tree, and tries to show the most information without printing too many lines.The tree is expected to consist of nodes, each of which has a weight.treesumwill expand branches with highest weight and collapse those with lowest. The weights are a measure of how much you care about different nodes of the tree: They can be file sizes, diff deltas, how much you like each item, whatever you want. If you don't provide weights, all nodes will be assumed to have a weight of 1.UsageSummarize list of paths:find.|treesumpathsSummarizersyncchangelist:rsync-raihP--dry-run/source/dir/dest/dir>rsync.txt
treesumrsync<rsync.txtYou can, of course, also usetreesumas a library. The basic method istreesum.summarize.summarize_treewhich takes a tree constructed fromtreesum.summarize.Nodeinstances. If you don't want to do this by hand,treesum.convertcontains methods for constructing a tree from various text representations. Try looking at the implementation oftreesum.clifor an example of how to do this.InstallRun:pip install treesum
Package: treetaggerwrapper
Author:Laurent Pointal <laurent.pointal@limsi.fr> <laurent.pointal@laposte.net>Organization:CNRS - LIMSICopyright:CNRS - 2004-2019license:GNU-GPL Version 3 or greaterVersion:2.3Module documentation(on Read The Docs).Subversion repository & bug tracking(on french academic SourceSup site).Developer pageWhat is it?This module wrap the Helmut Schmid language independent part-of-speech
statistical tagger into a Python class allowing to tag
several texts one after the other, maintaining connexions with the tagger
process to speed-up processing (remove external Perl scripts dependency
for chunking).Using objects, you can start multiple taggers simultaneously, eventually using
different languages.Support chunking for:englishfrenchgermanspanishSupport tagging for languages supported by TreeTagger, but you have to
do chunking by your own, if necessary you have to specify parameter
files via options.This version has been reworked to run with Python2 and Python3 (thanks so six)
and globally reworked, bugs fixed.InstallationUnless someone built a package for your OS distro, the simplest procedure
is to usepipto install the module:pip install treetaggerwrapperIf you have no admin access to install things on you computer, you may install
a virtualenv and run pip inside this virtual env, or you can do a local user
installation:pip install –user treetaggerwrapperMay usepip3to go with your Python3 installation.You also need to install TreeTagger…TreeTaggerTreetagger itself is is freely available for research, education and evaluation.
SeeTreeTagger page.There is an installation procedure based on a script, where you download needed files
into the directory where you want to install TreeTagger, including the installation
script, and then launch the script to unzip and install right files in right
directories with right names.ForWindowsusers, there is a downloadable Windows binary, but no install script.
You have to download TreeTagger parameter files (since TreeTagger goes utf-8 they
are same on Linux and Windows), unzip them and install them in the right
place (lib/), with the right names (you can see these files names intreetaggerwrapper.pyglobal dictionnaryg_langsupport,
in keystagparfileandabbrevfile.If you install TreeTagger in a common place, there is normally a working autodetection
withintreetaggerwrapper.
But if you install it in a special place or with a special name, you will have
to provide this installation directory to the module (seeTAGDIRin the doc).
Package: treetagger-xml
treetagger-xmlThis is a simple script (process.py) that reads in a .xml-file in theOPUS format, usesTreeTaggerto parse/lemmatize each sentence, an appends this information to the word elements in the original .xml-file.
The script also facilitates tagging a .txt-file and then converting the tab-separated output from TreeTagger to the OPUS format.RequirementsTreeTaggerSeethe TreeTagger websitefor installation instructions. Note that you'll have to download a paramater file for each language you would want to tag/lemmatize. This script has been tested on version 3.2.1 of TreeTagger.PythonThis script runs in Python 3 and requires two external packages to run:lxmlandtreetaggerwrapper. The latter requiressixto be installed as well. You can install these packages either locally (in avirtualenv) or globally via running:pip install -r requirements.txtRunning the scriptBefore running the script, it's best to set an environment variable with the location of TreeTagger. The treetaggerwrapper tries to detect the installation automatically, but this is not fool-proof. You can set the environment variable (under Linux) with:export TAGDIR=/opt/treetagger/Alternatively, you can modifyprocess.pyand hard-code your installation path in the TreeTagger instantation.Then, you can run theprocess.pyscript. It requires three parameters: your input format (xml or txt), your language of choice for parsing and lemmatizing, and your input file(s). In theexamples/directory you can find some example .xml-files. Runpython process.py xml en examples/en.xmlto process the English example. The resulting file will be namedexamples/en-out.xml.Processing plain textProcessing plain text requires you to set the first argument totxtrather thanxml. For example:python process.py txt en examples/en.txtThis script will output a tab-separated file (examples/en.tab) as well as an .xml-file in the OPUS format (examples/en.xml).
Package: treetl
treetl: Running ETL tasks with tree-like dependenciesPipelines of batch jobs don’t need to be linear. Sometimes there are shared intermediate transformations that can feed
future steps in the process.treetlmanages and runs collections of dependent ETL jobs by storing and registering
them as apolytree.This package was put together withSparkjobs in mind, so caching intermediate and
carrying results forward is top of mind. Due to this, one of the main benefits oftreetlis that partial
job results can be shared in memory.ExampleThe following set of jobs will all run exactly once and pass their transformed data (or some reference to it) to the
jobs dependent upon them.fromtreetlimport(Job,JobRunner,JOB_STATUS)classJobA(Job):deftransform(self,**kwargs):self.transformed_data=1returnself# JobB.transform can take a kwarg named# a_param that corresponds to JobA().transformed_data@Job.dependency(a_param=JobA)classJobB(Job):deftransform(self,a_param=None,**kwargs):self.transformed_data=a_param+1returnselfdefload(self,**kwargs):# could save intermediate result self.transformed_data herepass@Job.dependency(some_b_param=JobB)classJobC(Job):pass@Job.dependency(input_param=JobA)classJobD(Job):deftransform(self,input_param=None,**kwargs):self.transformed_data=input_param+1returnself@Job.dependency(in_one=JobB,in_two=JobD)classJobE(Job):deftransform(self,in_one=None,in_two=None,**kwargs):# do stuff with in_one.transformed_data and in_two.transformed_dataself.transformed_data=in_one+in_two# order submitted doesn't matterjobs=[JobD(),JobC(),JobA(),JobB(),JobE()]job_runner=JobRunner(jobs)ifjob_runner.run().status==JOB_STATUS.FAILED:# to see this section in action add the following to# def transform(self): raise ValueError()# to the definition of JobDprint('Jobs failed')print('Root jobs that caused the failure :{}'.format(job_runner.failed_job_roots()))print('Paths to sources of failure       :{}'.format(job_runner.failed_job_root_paths()))else:print('Success!')print('JobE transformed data:{}'.format(jobs[4].transformed_data))TODOSet parameters common to multiple jobs via the top level JobRunnerSet/pass state parameters to job methodsSupport submitting aJobRunneras a job for nested job dependency graphs.Run from a specific point in the tree. Allow for parents of starting point to retrieve last loaded data instead of recomputing the whole set of dependencies.Ability to pass job attributes to component functions used in the decorator based definition of a job
Package: treeutils
treeutilsFor developers who have to fit real world data into tree structures like the D3 tree.Separate records into different trees.  Build child trees from a parent relationship.  Order does not matter.  Having more than one tree present does not matter.  Broken branches do not matter.Download:http://pypi.python.org/pypi/treeutils/Source:http://github.com/Charles-Kaminski/treeutilsLicense:BSD 3-Clause LicenseUsageCommands:>> clusters = [x for x in Clusters(records)]
>> clusters = list(Clusters(records))
>> trees = [x for x in Trees(records)]
>> trees = list(Trees(records))Use Clusters when you don’t want to build trees but instead you want to return the records grouped by tree membership.  Clusters takes an unordered list of dictionary objects with an ID and a Parent ID. Clusters will separate them into separate lists based on tree membership.Use Trees when you want to build out trees and you have an unordered list of records with parent relationships instead of child relationships and you may have more than one tree present.  Clusters takes an unordered list of dictionary objects with an ID and a Parent ID. Trees will build out the trees by embedding child nodes into each parent’s children key.  Trees will return the root node of each separate tree.Installing treeutilsYou can installtreeutilseither via the Python Package Index (PyPI) or from source.To install usingpip(recommended):$ pip install treeutilsTo install usingeasy_install:$ easy_install treeutilsTo install from source, download the source from github (https://github.com/Charles-Kaminski/treeutils/archive/master.zip).  Decompress it and put it in the folder with your python project as another python module.
Package: treevis
treevisA library for displaying binary trees in plain text.FeaturesNo tree implementation is provided. The library accepts any object that conforms to the node interface.Automatically calculates marginsCan display multiple trees side-by-side like this:_____7_______                            _____7_______
        /             \                          /             \
     __3_          ___17______                __3_          ___19___
    /    \        /           \              /    \        /        \
   1      5      11          _25            1      5      11       _25
  / \    / \    /  \        /   \          / \    / \    /  \     /   \
 0   2  4   6  9   15     _20   27        0   2  4   6  9   15   20   27
                         /
                        19Supports node coloring.UsageImplement a tree node and construct a tree in any way you prefer.
A tree node must havevalue,left,rightas its properties.Optionally you may use acolorproperty to assign a color to a node. Should be useful when working with Red-Black trees, and in general when it is needed to mark certain nodes with colors. Color must be an integer in range 0 - 255. For convenience there are pre-defined colors in the library.class Node:
    def __init__(self, value, left, right, color=None):
        self.value = value
        self.left = left
        self.right = right
        self.color = colorCall draw function on the root node.from treevis import draw, Colors
from node import Node # your node implementation

root = Node(5, Node(2, color=Colors.Red), Node(7, color=Colors.Gray), color=Colors.Blue)

draw(root)Observe the result in terminal.5
   / \
  4   3drawfunction accepts any number of root nodes.
If multiple tree nodes are passed todrawfunction, the trees will be displayed side-by-side:draw(root, root, root)would result in:5      5      5
   / \    / \    / \
  4   3  4   3  4   3
Package: treeviz
treevizVisualize tree structure in bash manner using pythoninstallpipinstalltreevizStructure.
├──MANIFEST
├──MANIFEST.in
├──README.md
├──setup.py
├──test.py
└──treeviz├──__init__.py└──treeviz.py# showcases of usagepythontest.pyUsageCreate Your tree structurefromtreeviz.treevizimportNoderoot=Node("Jason")child1=Node("Mary")child2=Node("John")grandson1=Node("Kevin")grandson2=Node("Doris")grandson3=Node("James")grandson4=Node("Momo")grandgrandson1=Node("Baby")root.add_child(child1)root.add_child(child2)child1.add_child(grandson1)child1.add_child(grandson2)child2.add_child(grandson3)child2.add_child(grandson4)grandson1.add_child(grandgrandson1)root.visualize()Jason
├──Mary
│├──Kevin
││└──Baby
│└──Doris
└──John├──James└──MomoYou can also print the sub-tree structurechild1.visualize()Mary
├──Kevin
│└──Baby
└──DorisTwo options are provided, to print in terminal or print to file# print to file# Giving path as the first parameterroot.visualize(".")# If path is empty, then print to terminalroot.visualize()# Default name is treeviz.txt, if the filename already exists, a number will be appended to it.New Features(2019.11.1) Addingmax_lenparameter tovisualize(), which splits the message into multiple lines.fromtreeviz.treevizimportNoderoot=Node("Jason is our grandfather")child1=Node("Mary is Kevin's mother")child2=Node("John is James and Momo's father")grandson1=Node("Kevin")grandson2=Node("Doris")grandson3=Node("James")grandson4=Node("Momo")grandgrandson1=Node("Baby")root.add_child(child1)root.add_child(child2)child1.add_child(grandson1)child1.add_child(grandson2)child2.add_child(grandson3)child2.add_child(grandson4)grandson1.add_child(grandgrandson1)root.visualize(max_len=10)Jasonisourgrandfather
├──MaryisKe
│vin's moth│   er│   ├── Kevin│   │   └── Baby│   └── Doris└── John is James and Momo'sfather├──James└──Momo(2019.11.2) Addingline_spaceparameter tovisualize(), which enables to set space between each branchroot.visualize(line_space=2)Jasonisourgrandfather
├──MaryisKevin's mother│   ││   ││   ├── Kevin│   │   ││   │   ││   │   └── Baby│   ││   ││   └── Doris││└── John is James and Momo'sfather││├──James││└──Momo(2019.11.4) Adding 'filename' parameter tovisualize, which enables users to defince own filename
Package: treewalker
TreewalkerA simple package to walk a directory tree and collect files and sizes into a SQLite DB.UsageFor simple (and most) use cases, simply install the package from PyPI:pip install treewalkerAnd run it from the command line:treewalker --help
treewalker --db test.sqlite --walk C:/tempThis is the preferred and recommended way to run Treewalker.Usage and developmentGet started (change directory to where you want the project first):pip install treewalkerRun the script with your own .json configuration:python treewalker.py --cfg my_config.json{
    "database": "test.sqlite",
    "walk": "c:/temp"
}Or run the script entirely from the command line:python treewalker.py --db test.sqlite --walk c:\tempOr build a single file executable if you need this to run on Windows systems that won't have Python pre-installed:scripts/build_pyinstaller.bat c:/target/folder
scripts/build_pyinstaller_xp.bat c:/target/folderThis creates atreewalker.exe, which can be run 'anywhere':.\treewalker.exe --db test.sqlite --walk c:\tempNote that the executable will be limited to running on systems that support the version of Python you're using to build it. I.e. for Windows XP (32-bit or 64-bit), the very latest version of Python you can use is 3.4.4.Getting at the dataYou can easily access the contents of any of the sqlite files:fromsqlite3importconnectconn=connect('test.sqlite')c=conn.cursor()# show all the root directoriesprint(c.execute('SELECT * FROM dirs WHERE parent_dir<0').fetchall())# show all files that have "test" in their name (case-insensitive)print(c.execute('SELECT * FROM files WHERE name LIKE "%test%"').fetchall())Look at the documentation of the Python standard sqlite3 library for more examples.https://docs.python.org/3/library/sqlite3.htmland at the documentation of Treewalker athttps://treewalker.readthedocs.io
Package: treff7es-datahub-airflow-plugin
Datahub Airflow PluginCapabilitiesDataHub supports integration ofAirflow Pipeline (DAG) metadataDAG and Task run informationLineage information when presentInstallationYou need to install the required dependency in your airflow.pipinstallacryl-datahub-airflow-pluginDisable lazy plugin load in your airflow.cfgcore.lazy_load_plugins:FalseYou must configure an Airflow hook for Datahub. We support both a Datahub REST hook and a Kafka-based hook, but you only need one.# For REST-based:airflowconnectionsadd--conn-type'datahub_rest''datahub_rest_default'--conn-host'http://localhost:8080'# For Kafka-based (standard Kafka sink config can be passed via extras):airflowconnectionsadd--conn-type'datahub_kafka''datahub_kafka_default'--conn-host'broker:9092'--conn-extra'{}'Add yourdatahub_conn_idand/orclusterto yourairflow.cfgfile if it is not align with the default values. See configuration parameters belowConfiguration options:NameDefault valueDescriptiondatahub.datahub_conn_iddatahub_rest_deafaultThe name of the datahub connection you set in step 1.datahub.clusterprodname of the airflow clusterdatahub.capture_ownership_infotrueIf true, the owners field of the DAG will be capture as a DataHub corpuser.datahub.capture_tags_infotrueIf true, the tags field of the DAG will be captured as DataHub tags.datahub.graceful_exceptionstrueIf set to true, most runtime errors in the lineage backend will be suppressed and will not cause the overall task to fail. Note that configuration issues will still throw exceptions.Configureinletsandoutletsfor your Airflow operators. For reference, look at the sample DAG inlineage_backend_demo.py, or referencelineage_backend_taskflow_demo.pyif you're using theTaskFlow API.[optional] Learn more aboutAirflow lineage, including shorthand notation and some automation.How to validate installationGo and check in Airflow at Admin -> Plugins menu if you can see the Datahub pluginRun an Airflow DAG and you should see in the task logs Datahub releated log messages like:Emitting Datahub ...Additional referencesRelated Datahub videos:Airflow LineageAirflow Run History in DataHub
Package: trefleapi
Trefle-ApiTrefle-APIis a simple python API wrapper for thetreflebotanic data API>>>fromtrefle_apiimportTrefleAPI>>>Client=TrefleAPI(token="trefle_api_token")>>>Query=Client.search("rose").in_("plants").filter(family="Rosaceae").sort_by(slug="asc")>>>Query.get_json()"{'data': [{'id': 265580, 'common_name': 'Field rose', 'slug': 'rosa-arvensis', 'scientific_name': 'Rosa arvensis'...">>>New_Query=Query.range(year=[2000,2010]).exclude(common_name="null")>>>New_Query.get_models()"[[Plant(id=345576, name='', slug='physaria-purpurea', common_name='Rose bladderpod', scientific_name='Physaria purpurea', year=2002,..."This package allows you to build simple to more complex queries to fetch data from the thetrefleRESTAPIQuery tags :search()description : search a queryargs :q#the string to use as queryreturns : a copy of theQueryclass to allow chainingretrieve()description : retrieve an item based on it's slug or idargs :slugorid# a string representing the slug of a vegetable or it's id in the trefle api recordsreturns : a copy of theQueryclass to allow chainingin_()description : select a category in which to search or retrieveargscategory# available categories are :kingdomssubkingdomsdivisionsdivisionclassesdivision_ordersfamiliesgenusplantsspecies
Package: trefoil
Trefoil  (formerly Clover)Because today might be your lucky day.**(note: this was renamed fromcloveron 4/20/2018 due to name conflicts onpypi)Geospatial operations with NetCDF files and numpy arrays.Why?We needed a library to consolidate a series of utility scripts and general
geospatial operations on NetCDF and numpy arrays.  We found we were creating
a lot of purpose built scripts for other projects involving lots of processing
of NetCDF climate and model outputs.  Where possible, we have been pulling out
general patterns and placing them here.  When we looked for existing work, we
didn't find anything that quite met our needs, with a clean API and no strong
assertions about data model or compliance with CF-conventions
(we aspire to conventions, but not all data meet them).Specifically, we want to provide:simple and fast API for rendering numpy arrays to imagessimple API to provide utility functions that make working with NetCDF data
easiersimple command line interface to make common operations easy and portableanalysis operations to simplify using geometries alongside raster dataanalysis operations to summarize across various dimensions of spatial and
temporal-spatial datasets (anything more than 3 dimensions makes our heads hurt!)We are trying to avoid reimplementing anything well-handled elsewhere.  Where
possible, we contribute functionality to other libraries (e.g.,rasterio)
where we think that the functionality is general enough not to depend on
living within trefoil.Where is it being used?This is a core dependency forncdjango, our
Django-based NetCDF map server.We are using this on a variety of internal projects within the Conservation
Biology Institute.Installationpipenvis used for managing dependencies in this project.pipenv install trefoilNo longer directly maintained / supported:On Windows, install the ones that require compiling fromPython Windows Packages.
Then install the remainder usingpipCommand line interfaceThis is currently undergoing heavy development.SeeCLI docsfor more information.Work in progressThis is still under active development, as we have time and need.  All APIs are
subject to change until we hit version 1.0.Specifically, we need to work on:standardizing API patternsdocumentationtest coverage and correctnessroadmapContributors:Brendan C. WardNik Stevenson-MolnarWith inspiration fromTim SheehanandKen Ferschweiler.See Also:rasterio: Geospatial I/O and operations on rasters, done right.OCGIS: Geoprocessing on CF compatible climate datasets.scikit-image: Python image processingpython-rasterstats: Summary statistics of rasters using geometries
Package: treform
Welcome to the package of pyTextMiner. The current version of pyTextMiner is 1.1.116.
For those who are interested in contributing to the development of pyTextMiner, please contact atmin.song.njit@gmail.com.pyTextMiner was originally designed with the architecture of pipeline.
Each of text representation and processing task is treated as a pipe. Thus, a pipeline consists of a set of text representation/preprocessing tasksThe current version of pyTextMiner supports Korean and English text.