Saravanan666/pypi-org huggingface dataset:
Package: thinks-dash-components
Thinks Dash ComponentsThinks Dash Components is a Dash component library.Get started with:Install Dash and its dependencies:https://dash.plotly.com/installationRunpython usage.pyVisithttp://localhost:8050in your web browserContributingSeeCONTRIBUTING.mdInstall dependenciesIf you have selected install_dependencies during the prompt, you can skip this part.Install npm packages$ npm installCreate a virtual env and activate.$ virtualenv venv
$ . venv/bin/activateNote: venv\Scripts\activate for windowsInstall python packages required to build components.$ pip install -r requirements.txtInstall the python packages for testing (optional)$ pip install -r tests/requirements.txtWrite your component code insrc/lib/components/ThinksDashComponents.react.js.The demo app is insrc/demoand you will import your example component code into your demo app.Test your code in a Python environment:Build your code$ npm run buildRun and modify theusage.pysample dash app:$ python usage.pyWrite tests for your component.A sample test is available intests/test_usage.py, it will loadusage.pyand you can then automate interactions with selenium.Run the tests with$ pytest tests.The Dash team uses these types of integration tests extensively. Browse the Dash component code on GitHub for more examples of testing (e.g.https://github.com/plotly/dash-core-components)Add custom styles to your component by putting your custom CSS files into your distribution folder (thinks_dash_components).Make sure that they are referenced inMANIFEST.inso that they get properly included when you're ready to publish your component.Make sure the stylesheets are added to the_css_distdict inthinks_dash_components/__init__.pyso dash will serve them automatically when the component suite is requested.Review your codeCreate a production build and publish:Build your code:$ npm run buildCreate a Python distribution$ python setup.py sdist bdist_wheelThis will create source and wheel distribution in the generated thedist/folder.
SeePyPAfor more information.Test your tarball by copying it into a new environment and installing it locally:$ pip install thinks_dash_components-0.0.1.tar.gzIf it works, then you can publish the component to NPM and PyPI:Publish on PyPI$ twine upload dist/*Cleanup the dist folder (optional)$ rm -rf distPublish on NPM (Optional if chosen False inpublish_on_npm)$ npm publishPublishing your component to NPM will make the JavaScript bundles available on the unpkg CDN. By default, Dash serves the component library's CSS and JS locally, but if you choose to publish the package to NPM you can setserve_locallytoFalseand you may see faster load times.Share your component with the community!https://community.plotly.com/c/dashPublish this repository to GitHubTag your GitHub repository with the plotly-dash tag so that it appears here:https://github.com/topics/plotly-dashCreate a post in the Dash community forum:https://community.plotly.com/c/dash
Package: thinkx
# ThinkXThis package contains support code for [books by Allen B. Downey](http://greenteapress.com/wp/).  It provides the following modules:thinkbayes: Code forThink Bayes.thinkstats2: Code forThink Stats, 2nd editionthinkbayes2: Code forThink Bayes, 2nd edition, not yet published.thinkdsp: Code forThink DSPthinkplot: Plotting code used in all of the books, mostly wrapper functions formatplotlib.pyplotthinkstats2andthinkbayes2are actually the same file, so you can import it by either name.[This package is on PyPi](https://pypi.python.org/pypi?name=thinkx&:action=display), so you should be able to install it by running the following on the command line:pip install thinkxAnd then you can import whichever modules you need like this:import thinkplot
import thinkdsp
…These modules are also distributed individually in the repositories for the books, but if you download them that way, you would not normally install them.Tests for these modules are in thetestsdirectory.  If you discover a bug or want a new feature, an excellent way to report it is to add a test (which will presumably fail) and then send me a pull request.  Of course, you are also welcome to submit a solution!  Another good alternative is to create a new issue in this repository.
Package: thin-lens
This python-packag is about the thin-lens-equation:1     1     1
--- = --- + ---
 f     g     bThe focal-length of the imaging-optics:f.
The image-distance an image has from the aperture’s principal plane:b.
The object-distance an object has from the aperture’s principal plane:g.
The screen-distance a screen has from the aperture’s principal plane:d.Note that the screen-distancedis not part of the thin-lens-equation.
In cased != bthe image on the screen is ‘out of focus’, thus blurred.
Only whend == bthe image on the screen is ‘in focus’, thus sharp.Installpipinstallthin_lensUsageimportthin_lensf=1.0b=thin_lens.image_distance_for_object_distance(object_distance=100.0,focal_length=f,)assertb>fprint(b)gives:1.0101010101010102
Package: thin-man
By recording the tree layout,gitremotes and ‘refs’ of the typical~/srcdirectory containing your clonedgitrepos, “Thin Man”
can restore that structure later on, and also sync it to other machines.This can be also part of a backup strategy by only including that small
amount of metadata in a backup set, instead of duplicating all the data
that is available in remote locations anyway.That of course assumes that your repositories are usually clean and
don’t contain days of uncommitted work, and can be easily restored
into working shape by bootstrap scripts and the like. But that’s a
given, right?Copyright ©  2015 Jürgen Hermann <jh@web.de>Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: thinmaxflow
Thin wrapper for MaxflowThin Python wrapper for a modified version of the Maxflow algorithm by Yuri Boykov and Vladimir Kolmogorov. The original source code by Vladimir Kolmogorov availbable athttp://pub.ist.ac.at/~vnk/software.html. This wrapper uses a modified version with support for larger graphs and slightly lower memory usage. Seesubmodule repositoryfor more details.Maxflow vs. QPBOA more advanced alternative to the Maxflow algorithm is (quadratic pseudo-Boolean optimization)QPBO, which also usess-tgraph cut. Unlike Maxflow, it allows for non-submodular energy terms, which Maxflow doesn't (unless you construct the graph in a specific way, which is what QPBO does). Amongst other things, this allows QPBO to solve optimization problems with exclusions terms, which can be very usefull. QPBO uses more memory and is slightly slower than Maxflow.InstallationInstall package usingpip install thinmaxflowor clone this repository (includingsubmodule). Building the package requires Cython.Graph typesCurrently, there are four different types of graphs:GraphInt,GraphShort,GraphFloatandGraphDouble. The only difference is the underlying datatypes used for the edge capacities in the graph. For stability, it is recommended to useGraphIntfor integer capacities andGraphDoublefor floating point capacities. However, in some cases, it maybe be favourable to useGraphShortorGraphFloatto reduce memory consumption.Tiny exampleimportthinmaxflowastf# Create graph object.graph=tf.GraphInt()# Number of nodes to add.nodes_to_add=2# Add two nodes.first_node_id=graph.add_node(nodes_to_add)# Add edges.graph.add_tweights(0,5,0)# s     --5->   n(0)graph.add_tweights(0,0,1)# n(0)  --1->   tgraph.add_tweights(1,0,3)# n(1)  --3->   tgraph.add_edge(0,1,2,1)# n(0)  --2->   n(1)# n(1)  --1->   n(0)# Find maxflow/cut graph.flow=graph.maxflow()forninrange(nodes_to_add):segment=graph.what_segment(n)print('Node%dbelongs to segment%d.'%(n,segment))# Node 0 belongs to segment 0.# Node 1 belongs to segment 1.print('Maximum flow:%s'%flow)# Maximum flow: 3LicenseAs the Maxflow implementation is distributed under the GPLv3 license, so is this package.
Package: thinning
Thinning is the operation that takes a binary image and contracts the foreground until only single-pixel wide lines remain. It is also known as skeletonization.This package implements the thinning algorithm by Guo and Hall[1] for Numpy arrays. It is thus compatible with OpenCV. The algorithm is implemented in C and fairly fast.[1]http://dx.doi.org/10.1145/62065.62074
Package: thinning_py3
Guo and Hall thinning algorithm===============================This is a Python 3 module of Guo and Hall* thinning algorithm implemented in C.Thinning is the operation that takes a binary image and contracts the foreground until only single-pixel wide lines remain. It is also known as skeletonization. This package implements the thinning algorithm by Guo and Hall* for Numpy arrays. It is thus compatible with OpenCV. The algorithm is implemented in C and fairly fast.*[paper](http://dx.doi.org/10.1145/62065.62074)
Package: thin-osm-api-wrapper
ReplacedSeeosm_easy_apiOriginal readmeThis is intended as a minimal wrapper overOSM Editing API, to make easy to understand what is going on.It contains thin wrapper only for parts that I needed so far.Run testspython3 -m unittestUsage examplesObject historyimport thin_osm_api_wrapper
import json

object_type = "way"
object_id = 10101010
data = thin_osm_api_wrapper.api.history_json(object_type, object_id)
print(json.dumps(data, indent=3))List changesetsimport thin_osm_api_wrapper
import json

data = thin_osm_api_wrapper.api.changeset_list_json()
print(json.dumps(data, indent=3))
closed_after = "2021-12-26"
created_before = "2021-12-27"
data = thin_osm_api_wrapper.api.changeset_list_json(closed_after=closed_after, created_before=created_before)
print(json.dumps(data, indent=3))Related projectsSee alsoosm_bot_abstraction_layerandosmapifor other Python wrappers of OSM editing API.Sister oftaginfo equivalent.ContributingPRs are welcome!pypiSeehttps://pypi.org/project/thin-osm-api-wrapper/
Package: thin-plate-spline
tpsImplementation of Thin Plate Spline.
(For a faster implementation in torch, look at tps-torch)InstallPip$pipinstallthin-plate-splineCondaNot yet availableGetting startedimportnumpyfromtpsimportThinPlateSpline# Some dataX_c=np.random.normal(0,1,(800,3))X_t=np.random.normal(0,2,(800,2))X=np.random.normal(0,1,(300,3))# Create the tps objecttps=ThinPlateSpline(alpha=0.0)# 0 Regularization# Fit the control and target pointstps.fit(X_c,X_t)# Transform new pointsY=tps.transform(X)Also have a look atexample.pyBuild and Deploy$python-mbuild
$python-mtwineuploaddist/*
Package: thinqpbo
Thin wrapper for QPBOThin Python wrapper for a modified version of the quadratic pseudo-Boolean optimization (QPBO) algorithm by Vladimir Kolmogorov. The original source code by Vladimir Kolmogorov availbable athttp://pub.ist.ac.at/~vnk/software.html. This wrapper uses a modified version with support for larger graphs and slightly lower memory usage. Seesubmodule repositoryfor more details.QPBO vs. MaxflowWhile the QPBO algorithm performs as-tgraph cut similar toMaxflow, it allows for non-submodular energy terms, which Maxflow doesn't. Amongst other things, this allows QPBO to solve optimization problems with exclusions terms, which can be very usefull. The graph constructed by the QPBO implementation is twice the size of a Maxflow graph for an equivalent problem. Thus, QPBO uses more memory and is slightly slower than Maxflow.InstallationInstall package usingpip install thinqpboor clone this repository (includingsubmodule). Building the package requires Cython.Graph typesCurrently, there are three different types of graphs:QPBOInt,QPBOFloatandQPBODouble. The only difference is the underlying datatypes used for the edge capacities in the graph. For stability, it is recommended to useQPBOIntfor integer capacities andQPBODoublefor floating point capacities. However, in some cases, it maybe be favourable to useQPBOFloatto reduce memory consumption.Advanced features (QPBO-P and QPBO-I)The QPBO implementation has a few advanced extensions known as QPBO-P and QPBO-I. Currently, not all advanced functions have been wrapped. If you need to use features of the QPBO C++ library that are not wrapped bythinqpbo, please let me know by creating an issue on GitHub.Tiny exampleimportthinqpboastq# Create graph object.graph=tq.QPBOInt()# Number of nodes to add.nodes_to_add=2# Add two nodes.first_node_id=graph.add_node(nodes_to_add)# Add edges.graph.add_unary_term(0,0,5)# E1(0) = 5, s     --5->   n(0)graph.add_unary_term(0,1,0)# E0(0) = 1, n(0)  --1->   tgraph.add_unary_term(1,5,0)# E0(1) = 5, n(1)  --5->   tgraph.add_pairwise_term(0,1,0,7,0,4)# E01(0,1) = 7, n(0)  --7->   n(1)# E11(0,1) = 4, Not possible with standard Maxflow# Find maxflow/cut graph.graph.solve()graph.compute_weak_persistencies()twice_energy=graph.compute_twice_energy()forninrange(nodes_to_add):segment=graph.get_label(n)print('Node%dhas label%d.'%(n,segment))# Node 0 has label 0.# Node 1 has label 0.print('Twice energy/flow:%s'%twice_energy)# Twice energy/flow: 12LicenseAs the QPBO implementation is distributed under the GPLv3 license, so is this package.
Package: thinrest
# thinrest#### Very thin layer over Django to implement REST API using [Tastypie library](https://github.com/django-tastypie/django-tastypie).## Technology* Python 2.7* Django 1.5.12* Tastypie 0.12.2## AimTo build a simple interface that can provide for CRUD operations for two types of Database tables:1. Column based e.g. EMPLOYEE(FIRST_NAME, LAST_NAME, ADDRESS, CITY, STATE, ZIP)2. Key Value pairs e.g. SYSTEM_SETTINGS(SETTING_NAME, SETTING_VALUE)## Quick start1. ```pip install thinrest```2. Add `thinrest` to your `INSTALLED_APPS` setting:```pythonINSTALLED_APPS = (...'thinrest',)```3. Include the thinrest URLs```pythonpatterns = ('',...url(r'^thinrest/', include('thinrest.urls')),)```## Usage####Employee TableSample Data:```{"fields": {"first_name": "Anurag","last_name": "Agarwal","address": "Wakad","city": "Pune","state": "Maharashtra","zip_code": "411057"},"model": "thinrest.employee","pk":1}```Employee LIST: GET http://www.example.com/thinrest/api/v1/employee?format=jsonEmployee DETAIL: GET http://www.example.com/thinrest/api/v1/employee/1?format=jsonEmployee CREATE / UPDATE: POST http://www.example.com/thinrest/api/v1/employee/Employee DETELE: DELETE http://www.example.com/thinrest/api/v1/employee/1/####Settings TableSettings table is a key-value pair type table. Passing `id` to REST will not work for this type of table. So little tweaking is done in api of this table to handle column `name` as input param.Sample Data:```{"fields": {"name": "email","value": 1},"model": "thinrest.systemsetting","pk": 1}```Setting LIST: GET http://www.example.com/thinrest/api/v1/setting?format=jsonSetting DETAIL: GET http://www.example.com/thinrest/api/v1/setting/email?format=jsonSetting CREATE / UPDATE: POST http://www.example.com/thinrest/api/v1/setting/Setting DETELE: DELETE http://www.example.com/thinrest/api/v1/employee/setting/email/## Running Test```python manage.py test```## Bugs & ContributionsPlease report bugs by opening an issue
Package: thinrpc
thinrpc: A Lightweight RPC Framework for Python===This library provides a base class and some decorators to make it easy to build distributed applications. RPC endpoints are defined as class methods and decorated with ```RpcModule.Method```, which registers the endpoint with the event-based RPC server dispatching requests to registered methods.The ```RpcRemote``` class is an abstraction allowing applications to invoke methods on remote nodes using method call syntax. See the example below for an illustration!```python'''Simple RPC server responding to invocations of the'hello' method with a pleasant greeting'''import sysfrom thinrpc import RpcModule, RpcRemote, RpcApplication, OKclass FooNode(RpcApplication):def __init__(self, port, name):self.addr = ("localhost", port)self.name = name# Start the RPC serverself.Start()@RpcModule.Methoddef hello(self, sender):return OK, "Hi, %s! It's %s" % (sender, self.name)if __name__ == '__main__':node = FooNode(9090, "Anson")```And now for a simple client script that invokes the ```hello``` method on the server application defined above.```pythonimport thinrpcimport sys# Say hi to the server!server = thinrpc.RpcRemote(("localhost", 9090))print(server.hello())#{'result': "Hi, ('127.0.0.1', 49440)! It's Anson", 'err': False}```
Package: thin-ws-server
Small websocket server implementationYou can use this program for various uses.
For example, communicate with browser's JavaScript, send command request to minecraft ("/connect HOST:PORT" command).exampleremote_minecraftdeveloping...How to installpipinstallthin-ws-serverUsagefromthin_ws_serverimportWebSocketServerws=WebSocketServer(8000)# initialize with port numberws.accept()# accept client connectionws.send(data)# data: str or bytesws.recv()# returns bytes
Package: thipster
THipsterTHipster is a tool dedicated to simplifying the difficulty associated with writing Terraform files.
It allows users to write infrastructure as code in a simplified format, using either YAML (with JINJA) or the dedicated Thipster DSL.Written entirely in Python, it leverages the Python CDK for Terraform to create Terraform files and apply them to the chosen provider.Technology StackWritten in Python 3.11, thipster is designed as a python package, to be used either as a standalone tool, or as a module inside a running process like a CI/CD pipeline.Project StatusTHipster is currently in an active development state. If you want to know more, please check theCHANGELOGfor more details.DependenciesIn order to user THipster, you will need to have the following installed:Python(3.11+)pipenvv2021.5+Terraform CLI(1.2+)Node.jsand npm v16+.InstallationTo use THipster, you can simply install the package with pip:pip install thipsterIf you want to install the google dependencies aswell usepip install thipster[google]The list of available versions can be found onPyPI.UsageYou can use THipster in two ways:By leveraging theTHipster CLIBy directly using theTHipster Python packagein your own codeMain feature:Generate Terraform files from a YAML+JINJA or THIPS file:fromthipsterimportEngineasThipsterEnginefromthipster.authimportGooglefromthipster.parserimportParserFactoryfromthipster.repositoryimportGithubRepofromthipster.terraformimportTerraform# create new THipster engineengine=ThipsterEngine(ParserFactory(),GithubRepo('THipster/models'),Google,Terraform())# generate Terraform files and plan from a YAML+JINJA fileterraform_plan=engine.run('path/to/file/or/directory')print(terraform_plan)How to test the softwareTo run the tests, you can use the following command:pip install -e .[test]pytest testsKnown issuesAll known issues, bugs, and feature requests are tracked in theIssue tracker.Getting helpIf you have questions, concerns, bug reports, etc, please file an issue in this repository'sIssue tracker.Getting involvedTo install the project for development, you can use the following command:pip install -r requirements.txt && pip install -e .[dev,test,doc,google]pre-commit install && pre-commit run --all-filesFor more information on how to help out, please check theCONTRIBUTINGfile.Open source licensing infoLICENSECFPB Source Code PolicyCredits and referencesProjects that inspired youAWS Application ComposerRelated projectsWing Programming Language
Package: thipstercli
THipster CLICLI tool to interact and useTHipster, build withTyper.THipster is a tool dedicated to simplifying the ordeal associated with writing Terraform files.
It allows users to write infrastructure as code in a simplified format, using either YAML (with JINJA) or the dedicated Thipster DSL.Written entirely in Python, it leverages the Python CDK for Terraform to create Terraform files and apply them to the chosen provider.Technology StackWritten in Python 3.11, thipster-cli is build usingTyper.Project StatusTHipster-cli is currently in an active development state. If you want to know more, please check theCHANGELOGfor more details.DependenciesTo use the CLI, you will need to have all the required THipster dependencies installed on your machine. Please refer to theTHipster documentationfor more details.InstallationThe project is designed to be simply installed usingpip.pipinstallthipstercliThe list of available versions can be found onPyPI.ConfigurationThe CLI can be configured using a configuration file. A defaultconfig.jsonfile will be created in the/home/<user>/.config/thipsterclidirectory the first time the CLI is used.Example of a configuration file:{"app_name":"thipstercli","auth_provider":"google","input_dir":".","local_models_repository_path":"models","models_repository":"THipster/models","models_repository_branch":"main","models_repository_provider":"local","output_dir":".","verbose":false}UsageThe cli is composed of 3 main commands:version: display the current version of the packagethipsterversion-tproviders: subcommand group tp handle all tasks related to infrastructure providersthipsterproviders--helprun: main command to execute the thipster toolthipsterrun--helpYou can also check thethipster package documentationfor more details on the main features and purpose of the tool.How to test the softwareTo test the CLI, you can run the following command:pipinstall-e.[test]pytesttestsKnown issuesAll known issues, bugs, improvements, etc. are tracked asGitHub issues.Getting helpIf you have questions, concerns, bug reports, etc, please file an issue in this repository'sIssue Tracker.Getting involvedTo install the project in development mode, run the following command:pipinstall-e.[dev,test]pre-commitinstall&&pre-commitrun--all-filesIf you would like to be involved in the project feel free to check theCONTRIBUTINGfile. We will be happy to have you onboard.Open source licensing infoLICENSECFPB Source Code Policy
Package: third-factor
The Third FactorSometimes you're writing a dev tool script that your team needs, but you'd like everyone to be very careful when they use it, so you add an extra prompt.Sometimes you want them to be REALLY careful when they use it; for these times, there's the Third Factor.  The third factor is designed to eliminate the script user's ability to blindly press Y/Enter and do something dumb.Suggested use cases:Connecting to the production databaseDeploying to prod from your local branchClearing an S3 bucketAnything to do with git history rewritingTwiddling config files directly in prodWhen you just can't get that one person (you know who I mean) to stop and thinkThe possibilities are as endless as your team's capacity for unintentional destruction!InstallationDefinitely install this in your root python installation since you want it to be available everywhere.pip install third-factorUsageJust slap it in your shell script before the part you don't want people to do!Linux shell scripts# Do some safe stuff here...thirdfactor||exit1# NOW DO THE RISKY STUFFDon't omit theexit 1! Otherwise your script will continue even if the user fails third-factor authentication.Windows.batfile (No judgement)Rem Do some safe stuff here...

thirdfactor
if !errorlevel! neq 0 exit /b !errorlevel!

Rem NOW DO THE RISKY STUFFDemo~/projects/third-factor$ python3 -m third_factor "connect to the prod db"
You're about to connect to the prod db, which is risky. Are you sure this is a good idea?
Type YES to continue: YES
--------------------------
Are you sure there isn't a better, safer way to achieve what you're about to do?
Type I AM SURE THERE IS NOT to continue: I AM SURE THERE IS NOT
--------------------------
You're not too sleep deprived, under-caffeinated, too many beers etc.?
Type I AM OF SOUND MIND to continue: I AM OF SOUND MIND
--------------------------
Prove it: type this random string.
Type PZBBEYNIBF to continue: PZBBEYNIBF
--------------------------
Let's cool off for 10 seconds and think...
1..2..3..4..5..6..7..8..9..10..
You're still sure?
Type YES to continue: YES
--------------------------
Be careful, and don't say you weren't warned…