Saravanan666/pypi-org huggingface dataset:
Package: treg
treg 0.0.3treg utilizes trie structured regex patterns to search texts for a potientially large number of words and phrases.Experimental stateThis project is in an early and experimental state and might be subject substantial changes in the future.DocumentationDocumentation is available athttps://treg.readthedocs.ioGetting startedfromtregimportTreg,Phrase,Match# Initialize a new patterntreg=Treg()# Add some phrasestreg.add_phrases([Phrase(phrase='afternoon tea',meta={'fun':1}),Phrase(phrase='tea party',meta={'fun':3}),# ...])# Compile the patterntreg.compile()# Happy searching!formatchintreg.find_iter("A long collection of afternoon tea party recipes ...",overlapped=True):print(match)# OutputMatch(phrases=[Phrase(phrase='afternoon tea',meta={'fun':1})],start=16,end=29)Match(phrases=[Phrase(phrase='tea party',meta={'fun':3})],start=26,end=35)
Package: treGen
treeGen -  A directory Tree GeneratorSimple Python CLI App to generate a directory tree for a given pathCurrent TaskListAdd support for sorting files and directoriesAdd icons and colors to the tree diagramSet up the application to publish it as an open source projectRun the AppTo runtreGen, you need to download the source code. Then open a terminal or command-line window and run the following steps:Create and activate a Python virtual environment$cdrptree_project/
$python-mvenv./venv
$sourcevenv/bin/activate(venv)$Run the application(venv)$pythontree.py/path/to/directory/Note:The-hor--helpoption provides help on how to use RP Tree.To take a quick test ontreGen, you can use the samplehome/directory provided along with the application's code and run the following command:br(venv) $ python tree.py ../hello/../hello/
â”‚
â”œâ”€â”€ hello/
â”‚   â”œâ”€â”€init.py
â”‚   â””â”€â”€ hello.py
â”‚
â”œâ”€â”€ tests/
â”‚   â””â”€â”€ test_hello.py
â”‚
â”œâ”€â”€ requirements.txt
â”œâ”€â”€ setup.py
â”œâ”€â”€ README.mdThat's it! You've generated a nice directory tree diagram.Current FeaturesIf you run treGen with a directory path as an argument, then you get the full directory tree printed on your screen. The default input directory is your current directory.treGen also provides the following options:-v,--versionshows the application version and exits-h,--helpshow a usage message-d,--dir-onlygenerates a directory-only tree-o,--output-filegenerates a tree and save it to a file in markdown formatRelease History0.1.01.0.02.0.0Serious breaking issues with console scripts3.0.0Finally got the setup.py to work xD4.0.0A work in progressAbout the Author + Original Fork AddressLeodanis Pozo Ramos - Email:leodanis@realpython.comA fork fromhttps://github.com/realpython/materials/tree/master/directory-tree-generator-python
Package: tregex
Efficient keyword extraction with regexThis package contains a function for efficiently representing a set of keywords as regex. This regex can be used to replace keywords in sentences or extract keywords
from sentencesWhy use tregex?Pure Python, no other dependenciestrex is fast, about 300 times faster than a regex union, and about 2.5 times faster than FlashTextPlays well with others, can be integrated easily with pandasInstall trexUse pip,pipinstalltregexUsageimporttregexastxpattern=tx.compile(['baby','bat','bad'])hits=pattern.findall('The baby was scared by the bad bat.')# hits = ['baby', 'bat', 'bad']Why the name?Naming is difficult, but as we had to call it something:trex:trie toregextrex:Tyrannosaurus rex, a large dinosaur species with small arms  (rex meaning "king" in Latin)AcknowledgmentsThis project is based on the following resources:Speed up regexTriegex
Package: tregex-tobiasli
tregextregexis a wrapper around Python regular expressions that makes usage smoother and more user friendly.Installpip install tregex-tobiasliUsageimporttregexastrt=tr.to_tuple(pattern='([^;]+?)@(.+?)\.([^;]+)',string='john.smith@somewhere.co.uk; hackzor@coolface.com')assertt[0][1]=='somewhere'assertt[1][2]=='com'pattern='(?P<name>[^;]+?)@(?P<address>.+?)\.(?P<domain>[^;]+)'t=tr.to_dict(pattern=pattern,string='john.smith@somewhere.co.uk; hackzor@coolface.com')assertt[0]['name']=='john.smith'assertt[1]['address']=='coolface't=tr.to_object(pattern=pattern,string='john.smith@somewhere.co.uk; hackzor@coolface.com')assertt[0].name=='john.smith'assertt[1].address=='coolface'The above methods patterns can be either a string or a compiled regular expression.TregexCompiledis a class for simply
containing the compiled regex to be run on the above methods. If patterns are long, this usage will speed things up
considerably.fromtregeximportTregexCompiledpattern='(?P<name>[^;]+?)@(?P<address>.+?)\.(?P<domain>[^;]+)'trc=TregexCompiled(pattern)t=trc.to_object('john.smith@somewhere.co.uk; hackzor@coolface.com')assertt[0].name=='john.smith'tregex also contains some methods for simply fuzzy text matching usingdifflib.SequenceMatcher:fromtregeximportfind_bestplaces_in_wales=['Llanaber','Llanaelhaearn','Llanbedr','Llandbedrgoch','Llanbedrog','Llanberis','Llandanwg','Llanegryn','Llandegwning','Llandeiniolen','Llandwrog']best=find_best('Llanberris',places_in_wales)assertbest=='Llanberis'The other methods arefind,find_scores(returns the matched scores along with the candidate) andsimilarity(which
returns the score between a single pair of strings).
Package: treibstoff
TreibstoffTreibstoff contains a set of useful javascript tools for writing browser based
applications (or parts of it).Detailed DocumentationThe detailedtreibstoffdocumentation is availablehere.Source CodeThe sources are in a GIT DVCS with its main branches atgithub.CopyrightCopyright (c) 2021-2024 Cone ContributorsContributorsRobert Niederreiter (Author)Leopold Auersperg-CastellChanges0.4.0 (2024-02-12)Use web test runner instead of deprecated karma.
[rnix]Deprecate usage ofts.ajax.request.ts.http_requestshall be used
instead.
[rnix]RenameAjaxSpinnertoLoadingSpinnerand move it tospinnermodule.
[rnix]RenameAjaxRequesttoHTTPRequestand move it torequestmodule.
[rnix]Introduceclockmodule.
[rnix]Events.triggeraccepts arbitrary number of arguments passed to subscribers.
[rnix]0.3.0 (2023-05-18)Fix instant binder function not to be called twice on page load if treibstoff
document ready handler gets called after ajax.register.
[rnix]0.2.0 (2023-05-16)Addobject_by_pathutility function.
[rnix]AddAjax.attach.
[rnix]AddVisibility,CollapsibleandButtonwidgets.
[rnix]Addquery_elem,get_elemandset_visibleutility functions.
[rnix]Addformmodule.
[rnix]Addlistenermodule.
[rnix]Addwebsocketmodule.
[rnix]0.1.0 (2021-12-13)Initial Release.
[rnix]LicenseCopyright (c) 2021-2024, Conestack ContributorsRedistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package: trek
Trek is asimpletool to do migrations of whatever you’d like. It has
terrible documentation because it’s pre-1.0.UsageInstall!pip install trekNow say you have a directory of migrations:migrations
├── 1.sql
├── 2.sql
└── 3.sqlWhere each of these looks a bit like this:-- MIGRATE UP
CREATE TABLE test (
    id INTEGER PRIMARY KEY
);

-- MIGRATE DOWN
DROP TABLE test;(using any comment character, but lines withMIGRATE UPandMIGRATE DOWNwill be excluded and only one of each line is expected. Also note that
to simplify this example the numbers have been used, but you should probably
use timestamps like2014-01-01T00-00-00_human_name.sql)You can then run:trek --runner=postgres up postgres://trek_test@localhost/trek_testAnd the migrations will be run for you. Magic!Writing your own runnerA runner is just a Python object withversion,up, anddownmethods.versionwill be called with no arguments to determine the current
version, whileupanddownwill be called with a name (string) andMigrationobject (which has stringupanddownmembers).upanddownshould be generators, and you can yield as many messages as you need
to so that the user knows what’s going on.After you put your migrator in a file, specify it withpython.path.to.module:MigratorName. For example, the postgres migrator is
expanded by the CLI interface but it’s full path istrek.runners.postgres:PostgresRunnerTODO✓ release on PyPI✓ add Postgres migratoradd other migrators as needed (open an issue on Github, for what you want,
please!)add flask-script manager interface
Package: trekpy
Trek - Optimal Path Simulaion on Geospatial MapTrek is a Python package that provides functionality for optimizing paths and travel times between nodes on a geospatial map, using graph theory algorithms and simulations. This package can be used to identify the best possible route between two or more points, based on factors such as distance, speed, and other constraints.InstallationTo install Trek, you can use pip:$python3pipinstalltrekpyUsageTo use Trek, you must first create an instance of the Trek class, which takes a JSON file as input containing the geospatial map data. Once you have initialized a Trek object, you can use its methods to visualize the graph representation of the map, and to find the optimal path between two points.Data FileTrek uses a JSON file to store the geospatial map data. The file is stored in the same directory as the Python script that uses Trek. The file name is the same as the name of the Python script.The Location/Node Name is the keys, a hash map of latitude and longitude points are the valuesmap.json (earth){"Engineering Buiding":{"latitude":32.214256505009985,"longitude":-98.21779723918512},"Library":{"latitude":32.215730969726785,"longitude":-98.21730569278304},"Nursing Building":{"latitude":32.21664588196621,"longitude":-98.22043371534166},"Centennial":{"latitude":32.217553223855305,"longitude":-98.2217742964382},"Rec":{"latitude":32.21630562642345,"longitude":-98.2224535241938},"Science Building":{"latitude":32.216883861659866,"longitude":-98.21972368519181},}-map.json (canvas){"A":{"x":-0.019863067642025122,"y":-0.943951654391012},"B":{"x":0.8559401394488363,"y":-0.01622570094196981},"C":{"x":0.1397386472898502,"y":0.9999999999999999},"D":{"x":-0.9758157190966613,"y":-0.03982264466701821}}QuickStartenv varies depends on your map data - [earth or canvas]fromtrekpy.TrekimportTrek# Initialize a Trek objectt=Trek(filename='map.json',env='earth')# or t = Trek(filename='map.json',env='canvas')# Get Locationst.locations# list[str]#Estimate time to cover a distance from start to end over a timet.estimate_time(start='A',end='B',speed=3.1)# speed is default 3.1 - average walking speed miles per hour - returns in minutes# Visualize the graph representation of the mapt.graph()# View Data as a Map Visually# Distance between to points on the mapt.distance('A','B')# Plot the map on a line grapht.plot_line_graph()# Plot the map on a dot grapht.plot_dot_graph()# Manually Map out on environmentt.plot_web(port=9949)# Find the optimal path between two pointsplanned=['A','B','C','D','E']# Places you plan to stop or visit, include start and endstart='A'end='E'speed=3.1best_sol=t.find_optimal_path(planned=planned,start=start,end=end,speed=speed)# Visualize the optimal path on the mapt.visualize_optimal_path(best_sol['path'],best_sol['times'])VisualizationGraph - Mapping out DataVisualizing Optimal PathDot Graph
Package: trelawney
trelawneyTrelawney is a general interpretability package that aims at providing a common api to use most of the modern
interpretability methods to shed light on sklearn compatible models (support for Keras and XGBoost are tested).Trelawney will try to provide you with two kind of explanation when possible:global explanation of the model that highlights the most importance features the model uses to make its
predictions globallylocal explanation of the model that will try to shed light on why a specific model made a specific predictionThe Trelawney package is build around:some model specific explainers that use the inner workings of some types of models to explain them:LogRegExplainerthat uses the weights of the your logistic regression to produce global and local explanations of
your modelTreeExplainerthat uses the path of your tree (single tree model only) to produce explanations of the modelSome model agnostic explainers that should work with all models:LimeExplainerthat uses theLimepackage to create local explanations only (the local nature of Lime prohibits
it from generating global explanations of a modelShapExplainerthat uses theSHAPpackage to create local and global explanations of your modelSurrogateExplainerthat creates a general surogate of your model (fitted on the output of your model) using an
explainable model (DecisionTreeClassifier,`LogisticRegression` for now). The explainer will then use the
internals of the surrogate model to explain your black box model as well as informing you on how well the surrogate
model explains the black box oneQuick Tutorial (30s to Trelawney):Here is an example of how to use a Trelawney explainer>>> model = LogisticRegression().fit(X, y)
>>> # creating and fiting the explainer
>>> explainer = ShapExplainer()
>>> explainer.fit(model, X, y)
>>> # explaining observation
>>> explanation =  explainer.explain_local(X_expain)
[
    {'var_1': 0.1, 'var_2': -0.07, ...},
    ...
    {'var_1': 0.23, 'var_2': -0.15, ...} ,
]
>>> explanation =  explainer.graph_local_explanation(X_expain.iloc[:1, :])>>> explanation =  explainer.feature_importance(X_expain)
{'var_1': 0.5, 'var_2': 0.2, ...} ,
>>> explanation =  explainer.graph_feature_importance(X_expain)FAQWhy should I use Trelawney rather thanLimeandSHAPwhile you can definitally use the Lime and SHAP packages directly (they will give you more control over how to use their
packages), they are very specialized packages with different APIs, graphs and vocabulary. Trelawnaey offers you a
unified API, representation and vocabulary for all state of the art explanation methods so that you don’t lose time
adapting to each new method but just change a class and Trelawney will adapt to you.Comming SoonRegressor Support (PR welcome)Image and text Support (PR welcome)CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2019-10-02)First release on PyPI.
Package: trelent
Trelent CLIWelcome to the Trelent CLI (Command Line Interface)! The Trelent CLI let's you offload documentation to us in a much more direct manner - we'll document an entire project all at once on your behalf. No more generating docstrings for individual functions!UsageBefore using the CLI, you have to authenticate it using your Trelent API Key, which can be found on ourDashboard. Please note that use of the Trelent-CLI is a paid feature and is unavailable unless you upgrade your account to a paid tier.Please note that the auth command stores your Trelent API Key locally in plain text. We are working on an improved solution and apologize for any inconvenience.Authenticate to Trelent using the command below, and follow the prompts:trelentauthYou may also passs your Trelent API Key directly into other commands by using the --key (-k for short) option:trelentdocument-ksk_trlnt_...[FOLDER_PATH]Once authenticated, you may generate documentation for all source code files in a given folder:trelentdocument[FOLDER_PATH]By default, docstrings will be added to a .diff file next to source. For example, a file called test.py:defadd_nums(num1,num2):returnnum1+num2We generate test.py.diff:def add_nums(num1, num2):
+     """Docstring here"""
      return num1 + num2If you wish to insert docstrings directly into your source files, use the --insert (-i for short) flag:trelentdocument-i[FOLDER_PATH]We offer verbose output if you want some insight into why functions or files were skipped. Use the --verbose (-v for short) flag:trelentdocument-v[FOLDER_PATH]LicensePlease see the LICENSE file for specific license terms. The summary below is a not legally binding.We use the “Commons Clause” License Condition v1.0 in combination with the MIT License. You may freely view, modify or otherwisse interact with our software but can not sell it.
Package: trellis_dag
TrellisIntroTrellis is an open-source framework for programmatically
orchestrating LLM workflows as Directed Acyclic Graphs (DAGs) in Python.We've intentionally designed it to give
developers as much control as possible, and we've written documentation to make it incredibly easy to
get started. Start building with ourdocs.StructureTrellis is composed of only three abstractions:Node,DAG, andLLM.Node: the atomic unit of Trellis. Nodes are chained together to form a DAG.Nodeis an abstract class with onlyonemethod required to implement.DAG: a directed acyclic graph ofNodes. It is the primary abstraction for orchestrating LLM workflows. When you
  add edges betweenNodes, you can specify a transformation function to reuseNodes and connect any twoNodes.
  Trellis verifies the data flowing betweenNodesin aDAGto ensure the flow of data is validated.LLM: a wrapper around a large language model with simple catches for common OpenAI errors. Currently, the only provider
  that Trellis supports is OpenAI.Environment VariablesIf you're going to use the LLM class, set:OPENAI_API_KEY=YOUR_OPENAI_KEYIf you don't want us to send telemetry data (in theNode._init_(),LLM.execute()(including prompts and responses from OpenAI) andDAG.execute()methods, info about nodes you create or dags you run), to an external server (currently (PostHog)[https://posthog.com/]) for analysis, set:DISABLE_TELEMETRY=1If you want to reduce the amount of information the logger returns, set:[for everything]LOG_LEVEL=DEBUG[for status updates]LOG_LEVEL=INFO[for only warnings]LOG_LEVEL=WARNING[for errors which stop runtime]LOG_LEVEL=ERROR[for only critical errors]LOG_LEVEL=CRITICALInstallYou can install Trellis with any of the following methods:Pippip install trellis-dagPoetrypoetry add trellis-dagCondaconda install trellis-dag
Package: trello
Python Trello API WrapperThis library is a Python wrapper around theTrelloREST API.Requires Python 3.6 or later.If you wish to use this with Python 2 or Python 3.5 or lower, please use version 0.9.4.Getting StartedTo use the Python API, first install it from PyPI usingpip:pip install trelloor from source:python setup.py installOnce you have it installed, get an API key fromhttps://trello.com/app-key.>>> from trello import TrelloApi
>>> trello = TrelloApi(TRELLO_APP_KEY)
>>> trello.boards.get('4d5ea62fd76aa1136000000c')
{
    "closed": false, 
    "desc": "Trello board used by the Trello team to track work on Trello.  How meta!", 
    "id": "4d5ea62fd76aa1136000000c", 
    "idOrganization": "4e1452614e4b8698470000e0", 
    "name": "Trello Development", 
    "pinned": true, 
    "prefs": {
        "comments": "public", 
        "invitations": "members", 
        "permissionLevel": "public", 
        "voting": "public"
    }, 
    "url": "https://trello.com/board/trello-development/4d5ea62fd76aa1136000000c"
}Because the Trello development board is public, we didn't need a user's token, but if we want to access private boards, we'll have to have one. We can get it by calling:>>> trello.get_token_url('My App', expires='30days', write_access=True)
    'https://trello.com/1/authorize?key=TRELLO_APP_KEY&name=My+App&expiration=30days&response_type=token&scope=read,write'If you send your user to the resulting URL, it will ask them to allow your app access to their account, and then it will give them a token (64-digit hex string) that they will pass back to your app.>>> trello.set_token(user_token)(Note: Trello does support OAuth, but the Python API does not have any support for it yet.)Once you have set the user's token, all calls to the API will include that token, as if the user was logged in.
Package: trello2md
trello2mdExport Trello boards and cards to Markdown. Currently tailored to my note-taking workflow.InstallationInstall on your system withpipx:$ pipx install --python python3.8 trello2mdAuthorize use of the Trello API:$ trello2md authExporting a Trello boardRun with the URL for a Trello board as the only argument to write Markdown files to a directory. For example:$ trello2md https://trello.com/b/WODq2cwg/sample-board

$ tree sample-board/
sample-board/
├── another-card-1.md
├── another-card-2.md
├── another-card.md
├── copied-card.md
├── index.md
└── sample-card.md

$ cat sample-board/index.md
# {Sample Board}

## Sample List

- [Sample Card](sample-card.md) 2019-05-07, @bhrutledge, `green`, `Sample Label`
- [Copied Card](copied-card.md) 2019-05-07

## Empty List

## Another List

- [Another Card](another-card.md)
- [Another Card](another-card-1.md)
- [Another Card](another-card-2.md)Exporting a Trello cardRun with the URL for a Trello card as the only argument to print Markdown. For example:$ trello2md https://trello.com/c/HGYGb5iM/2-sample-card
# Sample Card

2019-05-07, @bhrutledge, `green`, `Sample Label`

Sample description

## Checklist

- [x] Completed item
- [ ] Incomplete item

## Attachments

- [Example link](https://example.com)

## Comments

### bhrutledge on 2019-05-06

Sample commentDevelopingInstalltoxon your system, for example usingpipx$ pipx install toxFork and clonethis repositoryRun the tests and generate a coverage report$ tox -e py38,coverageRun the formatters and linters$ tox -e checkTo run development tools individually, create and activate avirtual environment$ tox -e venv

$ source venv/bin/activateThis will install:pytestandcoverage.pyto run the testsmypyto check typesblackto format the codeflake8to identify coding errors and check code style
Package: trello-api-wrapper
Trello_Api_WrapperObject oriented Python wrapper for Trello APIGetting StartedDependenciesYou need Python to useTrello_Api_Wrapper. You can find it atpython.org.You also need setuptools, wheel and twine packages, which is available fromPyPI. If you have pip, just run:pip install trello_api_wrapperInstallationClone this repo to your local machine using:git clone git@github.com:JordyAraujo/Trello_Api_Wrapper.git
```## Features
- Creates Trello Cards;
- This is a first beta version. Future implementations should cover all Trello API functionalities.