Saravanan666/pypi-org huggingface dataset:
Package: python_tsp
python-tspis a library written in pure Python for solving typical Traveling
Salesperson Problems (TSP). It can work with symmetric and asymmetric versions.Installationpipinstallpython-tsppoetryaddpython-tsp# if using Poetry in the projectExamplesGiven a distance matrix as a numpy array, it is easy to compute a Hamiltonian
path with least cost. For instance, to use a Dynamic Programming method:importnumpyasnpfrompython_tsp.exactimportsolve_tsp_dynamic_programmingdistance_matrix=np.array([[0,5,4,10],[5,0,8,5],[4,8,0,3],[10,5,3,0]])permutation,distance=solve_tsp_dynamic_programming(distance_matrix)The solution will be[0, 1, 3, 2], with total distance 17. Notice it is
always a closed path, so after node 2 we go back to 0.To solve the same problem with a metaheuristic method:frompython_tsp.heuristicsimportsolve_tsp_simulated_annealingpermutation,distance=solve_tsp_simulated_annealing(distance_matrix)Keep in mind that, being a metaheuristic, the solution may vary from execution
to execution, and there is no guarantee of optimality. However, it may be a
way faster alternative in larger instances.If you with for an open TSP version (it is not required to go back to the
origin), just set all elements of the first column of the distance matrix to
zero:distance_matrix[:,0]=0permutation,distance=solve_tsp_dynamic_programming(distance_matrix)and in this case we obtain[0, 2, 3, 1], with distance 12. Notice that in
this case the distance matrix is actually asymmetric, and the methods here are
applicable as well.The previous examples assumed you already had a distance matrix. If that is not
the case, thedistancesmodule has prepared some functions to compute an
Euclidean distance matrix or aGreat Circle Distance.For example, if you have an array where each row has the latitude and longitude
of a point,importnumpyasnpfrompython_tsp.distancesimportgreat_circle_distance_matrixsources=np.array([[40.73024833,-73.79440675],[41.47362495,-73.92783272],[41.26591,-73.21026228],[41.3249908,-73.507788]])distance_matrix=great_circle_distance_matrix(sources)See theproject’s repositoryfor more examples and a list of available methods.
Package: python-tty-duplicator
Utility that duplicates a serial port tty.The main reason for using this tool is to log what is going through the tty.Why create a “dummy” tty just to log ?
Well, a tty can only be read by ONE process. If two processes read the tty, each will read partial data from the tty.
Also, you can’t read the data goingintothe tty this way.So this utility reads / writes to the real TTY, bridges it to a dummy tty, and logs everything going via the dummy tty.RequirementsPython >=3.6socatInstallationYou can install “python-tty-duplicator” via pip fromPyPI:$ pip install python-tty-duplicatorUsagefrom tty_duplicator import TTYDuplicatorduplicator = TTYDuplicator(“/dev/ttyUSB0”, “serial_data.log”)
print(duplicator.fake_tty)duplicator.start()# Now you can interact with the “fake tty” and everything will be logged!
# e.g use picocom, tio, or pyserial# Optional: will be called when python exits gracefully
duplicator.stop()LicenseDistributed under the terms of theMITlicense, “python-tty-duplicator” is free and open source software
Package: python-tuio
TUIO for Python3TUIO protokoll implementation  based on OSC protocol. It is implemented with thepython-osclibary.TUIO spezificationhttp://www.tuio.org/?specificationOSC spezificationhttp://opensoundcontrol.org/spec-1_0andhttps://python-osc.readthedocs.io/en/latest/API example of C++https://www.tuio.org/?cppInstallationpip3 install python-tuioUsageServer example with CursorfrompythontuioimportTuioServerfrompythontuioimportCursorserver=TuioServer()cursor=Cursor(123)# sets session_id to 123cursor.velocity=(0.2,0.1)cursor.motion_acceleration=0.1server.cursors.append(cursor)i=0whilei<10:i+=1cursor.position=(0.5+0.01*i,0.5)server.send_bundle()time.sleep(0.1)Client example with class and extendsfrompythontuioimportTuioClientfrompythontuioimportCursorfrompythontuioimportTuioListenerfromthreadingimportThreadclassMyListener(TuioListener):defadd_tuio_cursor(self,cursor:Cursor):print("detect a new Cursor")(...)client=TuioClient(("localhost",3333))t=Thread(target=client.start)listener=MyListener()client.add_listener(listener)t.start()Client example with lamdafrompythontuioimportTuioClientfrompythontuioimportCursorfrompythontuioimportTuioListenerfromthreadingimportThreaddef_add_tuio_cursor(self,cursor:Cursor):print("detect a new Cursor")(...)client=TuioClient(("localhost",3333))t=Thread(target=client.start)listener=TuioListener()listener.add_tuio_cursor=_add_tuio_cursorclient.add_listener(listener)t.start()ContributionFeel free to contribute inputs. Just start a MR with your changes.GitHub
Package: python-tunnelclient
python-tunnelclientTunnel client for OpenStack Vpn ServeringThis is an OpenStack Client (OSC) plugin for Tunnel, an OpenStack
Vpn Servering project.Getting StartedNoteThis is an OpenStack Client plugin. Thepython-openstackclientproject should be installed to use this plugin.Tunnel client can be installed from PyPI using pippipinstallpython-tunnelclientIf you want to make changes to the Tunnel client for testing and contribution,
make any changes and then runpythonsetup.pydeveloporpipinstall-e.
Package: python-tuskarclient
python-tuskarclient is a Python client and a command-line interface
forTuskar.Getting StartedClone the repo:$ git clone https://github.com/openstack/python-tuskarclient.gitThen, usetoxto set up a virtual environment and run tests:$ cd python-tuskarclient
$ toxWhen this is done, activate your virtual environment:$ source .tox/py27/bin/activateFinally, use this script to build the wrapper script in your virtual
environment for the CLI tools:$ python setup.py developUse from PythonFor usingpython-tuskarclientwithin a Python application,this
wiki pageprovides the most complete documentation.Use from the CLIOn the command line,python-tuskarclientimplements thetuskarcommand.First, be sure to run all of the steps in the Getting Started section,
above, and that you have not deactivated your virtual environment.Then, export these two environment variables, customizing them if
necessary:$ export OS_AUTH_TOKEN=nopass
$ export TUSKAR_URL=http://localhost:8585/v2(Note that ‘nopass’ is the correct value in a default setup with no
authentication.)Now you may interact with Tuskar by using thetuskarcommand.tuskar--helpwith list full usage details. You can usetuskarrack-listas an example.
Package: python-tusur
Tusur APIPython library for working with site TUSURInstallationpipinstallpython-tusurUsageHow get timetable by group:fromtusurimportTimetable>>>timetable=Timetable()>>>timetable.get_timetable("571-2",week_id=666)>>>[{"day":"Mon, May 22","lessons":[{"time":"08:50 10:25","discipline":null,"view":null,"teacher":null},{"time":"10:40 12:15","discipline":null,"view":null,"teacher":null},...]}]Dependenciesrequestsbeautifulsoup4ContributingBug reports and/or pull requests are welcomeLicenseMIT
Package: python-tutuka-client
python-tutuka-clientA library for accessing the Tutuka Local API XML-RPC API for python.Tutuka Local API ReferenceInstallationUse the package managerpipenvto install.pipenv install python-tutuka-clientUsageUse your own Tutuka credentials.terminal_id- Tutuka issued terminal ID of the terminal requesting the transactionpassword- Tutuka issued terminal passwordhost- Tutuka Hostpath- Tutuka Local API pathfromtutuka_clientimportLocalApiClientclient=LocalApiClient(terminal_id='terminal_id',password='password',host='https://companion.uat.tutuka.cloud',path='/v2_0/XmlRpc.cfm',)Class MethodsCreateLinkedCardLinkCardOrderCardOrderCardWithPinBlockActivateCardGetActiveLinkedCardsChangePinResetPinUpdateBearerTransferLinkStopCardUnstopCardStatusSet3dSecureCodeUpdateCVVRetireCardToken Lifecycle ManagementTestTested withmamba, install pipenv dev packages and then run tests.pipenv install --dev
pipenv run make testShellThis project has a script to run a shell with a client initialized so you can test run the API.TUTUKA_TERMINAL_ID='0000000000'TUTUKA_PASSWORD=''TUTUKA_HOST='http://api.tutuka.com/'TUTUKA_PATH='companion/v2_0/xmlrpc.cfm'bin/shell# Call a pre-defined method (uuid has been imported to help you generate transaction IDs)client.get_active_linked_cards('00000000-0000-0000-0000-000000000000',str(uuid.uuid4()))# Call any RPC methodclient.execute(method_name='',arguments=[])ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: python-tutuka-client-testing
python-tutuka-clientA library for accessing the Tutuka Local API XML-RPC API for python.Tutuka Local API ReferenceInstallationUse the package managerpipenvto install.pipenv install python-tutuka-clientUsageUse your own Tutuka credentials.terminal_id- Tutuka issued terminal ID of the terminal requesting the transactionpassword- Tutuka issued terminal passwordhost- Tutuka Hostpath- Tutuka Local API pathfromtutuka_clientimportLocalApiClientclient=LocalApiClient(terminal_id='terminal_id',password='password',host='https://companion.uat.tutuka.cloud',path='/v2_0/XmlRpc.cfm',)Class MethodsCreateLinkedCardLinkCardOrderCardOrderCardWithPinBlockActivateCardGetActiveLinkedCardsChangePinResetPinUpdateBearerTransferLinkStopCardUnstopCardStatusSet3dSecureCodeUpdateCVVRetireCardTestTested withmamba, install pipenv dev packages and then run tests.pipenv install --dev
pipenv run make testContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: python-tutum
Python library for Tutum’s API. Full documentation available athttps://docs.tutum.co/v2/api/?pythonInstalling the libraryIn order to install the Tutum Python library, you can usepip install:pipinstallpython-tutumIt will install a Python module calledtutumwhich you can use to interface with the API.AuthorizationIn order to be able to make requests to the API, you should first obtain an ApiKey for your account.
For this, log into Tutum, click on the menu on the upper right corner of the screen, and selectGet Api KeyYou can use your ApiKey with the Python library in any of the following ways (will be used in this order):Manually set it in your Python initialization code:importtutumtutum.user="username"tutum.apikey="apikey"Store it in a configuration file in~/.tutum:[auth]user="username"apikey="apikey"Set the environment variablesTUTUM_USERandTUTUM_APIKEY:exportTUTUM_USER=usernameexportTUTUM_APIKEY=apikeyErrorsErrors in the HTTP API will be returned with status codes in the 4xx and 5xx ranges.The Python library will detect this status codes and raiseTutumApiErrorexceptions with the error message,
which should be handled by the calling application accordingly.Quick examplesServices>>>importtutum>>>tutum.Service.list()[<tutum.api.service.Serviceobjectat0x10701ca90>,<tutum.api.service.Serviceobjectat0x10701ca91>]>>>service=tutum.Service.fetch("fee900c6-97da-46b3-a21c-e2b50ed07015")<tutum.api.service.Serviceobjectat0x106c45c10>>>>service.name"my-python-app">>>service=tutum.Service.create(image="tutum/hello-world",name="my-new-app",target_num_containers=2)>>>service.save()True>>>service.target_num_containers=3>>>service.save()True>>>service.stop()True>>>service.start()True>>>service.delete()TrueContainers>>>importtutum>>>tutum.Container.list()[<tutum.api.container.Containerobjectat0x10701ca90>,<tutum.api.container.Containerobjectat0x10701ca91>]>>>container=tutum.Container.fetch("7d6696b7-fbaf-471d-8e6b-ce7052586c24")<tutum.api.container.Containerobjectat0x10701ca90>>>>container.public_dns="my-web-app.example.com">>>container.save()True>>>container.stop()True>>>container.start()True>>>container.logs"2014-03-24 23:58:08,973 CRIT Supervisor running as root (no user in config file) [...]">>>container.delete()True
Package: python-tuxexchange
# python-tuxechange![python](https://img.shields.io/badge/python-2.7-blue.svg)Inspired by [this](https://github.com/Olliecad1/Tux_Exchange_Python) wrapper written by [Olliecad1](https://github.com/Olliecad1) and following the example of [this](https://github.com/ericsomdahl/python-bittrex) wrapper written by [Eric Somdahl](https://github.com/ericsomdahl)> I ([sneurlax](https://github.com/sneurlax)) am not affiliated with, nor paid by [Tux Exchange](https://tuxexchange.com).  Use at your own risk.**Superceded by [crypto-exchange-apis](https://github.com/init-industries/crypto-exchange-apis)**## InstallationInstall with `pip` using `pip install python-tuxexchange`## UsageSee available methods in the [Tux exchange API docs](https://tuxexchange.com/docs)```pythonfrom tuxexchange import tuxexchangetuxexchange = tuxexchange.Tuxexchange()print tuxexchange.api_query('getcoins'){'PPC': {'website': 'www.peercoin.org', ...print tuxexchange.api_query('getticker'){'BTC_ICN': {'last': '0.00040418', ...```[test_manual.py](https://github.com/init-industries/python-tuxexchange/blob/master/tuxexchange/test_manual.py):```pythonfrom tuxexchange import Tuxexchangetuxexchange = Tuxexchange()print tuxexchange.api_query('getcoins'){'PPC': {'website': 'www.peercoin.org', ...print tuxexchange.api_query('getticker'){'BTC_ICN': {'last': '0.00040418', ...```## TestingRun unit tests in [test.py](https://github.com/init-industries/python-tuxexchange/blob/master/tuxexchange/test.py)
Package: python-tuxexchange-Wrapper
# python-tuxexchange# Developed By Sneurlax# https://github.com/sneurlax# [Original PyPi](https://pypi.python.org/pypi/python-tuxexchange/0.0.1)![python](https://img.shields.io/badge/python-2.7-blue.svg)# [Guides For Installation](https://github.com/Olliecad1/python-tuxexchange-Wrapper/tree/master/Guides)## [PyPi Link](https://pypi.python.org/pypi/python-tuxexchange-Wrapper)```$ sudo apt-get install python-requests```## Use```$ sudo pip install requests ```## If you have pip installed##  On OSX you can also use```sudo easy_install -U requests ```## if you have easy_install installed.## WindowsThis might help: http://stackoverflow.com/questions/17309288/importerror-no-module-named-requests## Dependencies- https://pypi.python.org/pypi/requests## UsageSee available methods in the [Tux exchange API docs](https://tuxexchange.com/docs)[test_manual.py](https://github.com/olliecad1/python-tuxexchange/blob/master/test_manual.py):```pythonfrom tuxexchange import Tuxexchangetuxexchange = Tuxexchange()print tuxexchange.api_query('getcoins'){'PPC': {'website': 'www.peercoin.org', ...print tuxexchange.api_query('getticker'){'BTC_ICN': {'last': '0.00040418', ...```## Get Balance api, NEEDS PRIVATE AND PUBLIC KEY ACCESS```pythonfrom tuxexchange import Tuxexchangetuxexchange = Tuxexchange()print tuxexchange.getBalances()print tuxexchange.getMyWithdrawHistory()print tuxexchange.getMyAddresses()```## TestingRun unit tests in [test.py](https://github.com/olliecad1/python-tuxexchange/blob/master/test.py)
Package: python-tuya-oittm
python-tuya-oittmSupported Python VersionsPython versions 3.5 and up are currently building correctly on Travis CIDescriptionBranch - masterBranch - developmentThis library facilitates communication with Tuya/Oittm devices on your local network. Currently working with the Oittm Wifi Smart Humidifier, 3L.Reason This ExistsI wanted a project to learn Python, and had just bought an Oittm Humidifer(https://www.amazon.com/gp/product/B07C5QL15R) and wanted to integrate it with Home Assistant. This seemed like a good, non-trivial project to work on. All respect due to the forefathers - tuyapi and python-tuya (listed below).Attributionhttps://github.com/codetheweb/tuyapi- The original; responsible for all of the reverse engineeringhttps://github.com/clach04/python-tuya- The original Python implementationGetting StartedThe peoples at codetheweb (https://github.com/codetheweb/tuyapi) have great guides around getting the required credentials/parameters.
Package: pythontwist
Anime downloader forTwist.MoeNOT WORKINGUse old data from this linkJSONInstallation (Setup)gitclonehttps://github.com/phanirithvij/twist.moe.gitcdtwist.moe/
chmod+x*.sh./startp.sh#URL#Here URL is from https://twist.moe#after comlpetion#cd Anime/anime_name_folder/./download.shanimelist.txt will soon contain all the anime_names that you've used in startp.shUsage./startp.sh#argumentsThe above step will make the directory of the anime in ./Anime/Go to that directorycdAnime/#<anime_name>
./download.shExamplesInput:./startp.shOutput:Enterlinkfromhttps://twist.moe/

https://twist.moe/a/one-piece/1/

CreatingAnime/one-piece

Fetchinginfo...

CreatingAnime/one-piece/list.txt

copyingdownload.shtoone-piece

DoneInput:./startp.shhttps://twist.moe/a/gintamaOutput:CreatingAnime/gintama

Fetchinginfo...

CreatingAnime/gintama/list.txt

copyingdownload.shtogintama

DoneInput:./startp.shcorpse-party#Just the anime name which is exactly from the websiteOutput:CreatingAnime/corpse-party

Fetchinginfo...

CreatingAnime/corpse-party/list.txt

copyingdownload.shtocorpse-party

DoneNow go inside Anime/one-piece/Input:phani200-pc:~/twist.moe/Anime/one-piece$./download.shOutput:Totalnoofepisodes:819startat:3(ENTERTHISwhereyouwanttoBEGIN)endat:55(ENTERTHISwhereyouwanttoEND)[HorribleSubs]OnePiece-003[1080p8%[=====>]17.6M2.12MB/seta3m30s
Package: python-twitch
python-twitch is an python module for simple interaction with twitch.github versionpypi versionInstallationpip installpython-twitchUsageHave a look at thetestsdirectory.You can supply your own Client-Id by overwritingtwitch.CLIENT_ID.DevelopmentTo help with backwards compatibilitytoxenvironments are provided
that install all packages needed to run tests. Alternatively install
all development requirements viapip install-rdev_requirements.CreditsThis library was based on thetwitch.tv plugin for xbmc.ChangelogSince v0.4.0 changes are documented in thechangelog.
Package: python-twonms-config
Python 2NMS config managerPython package to manage application configurations. This is a wrapper around the OmegaConf create function.This package makes it easy to define parameters for your application. It's possible to define parameters in different ways (in order of precedence):programmatically defined default valuesenvironment variables/dotenv filesconfiguration files in YAML formatcli argumentsDocumentationCheck out theGithub DocsFeaturesgenerates anOmegaConfdictionary objectsupports environment variablessupports dotenvreads yaml config filessupports cli parametersallows programmatic initialization of parametersCreditsThis package was created withCookiecutterand thezillionare/cookiecutter-pypackageproject template.
Package: python-ubercode-utils
python-ubercode-utilsExtracting common python utilities re-used between all projects.  The intent is to have minimal dependencies
so the library can be used by django settings without circular references.  I also have color logging class for
jupyter notebooks.  I will have a couple of libraries that will extend this functionality.  Scan the test cases in the
tests folder for common use cases.python-utils-core:basic conversion helper utilitiescolor logging without dependenciesmanipulating urls and their parametershelper classes to make working with xml and json data easierminimal helper classes to convert database cursor results to dictionaries or tuples
Package: python-ubersmithclient
Usageimportubersmith_clientapi=ubersmith_client.api.init(url='http://ubersmith.com/api/2.0/',user='username',password='password')api.client.count()>>>u'264'api.client.latest_client()>>>1265APIubersmith_client.api.init(url, user, password, timeout, use_http_get)url:URL of your APIExample:http://ubersmith.example.org/api/2.0/user:API usernamepassword:API Password or tokentimeout:api timeout given to requests (type: float)Default:60use_http_get:UseGETrequests instead ofPOSTDefault:False
Package: python-udemy
A sample python package for teaching purposehttp://udemy.readthedocs.io/en/latest/Quick StartPlease create a virtual environment and usepipinstall this package$virtualenvtmp$sourcetmp/bin/activate$pipinstallpython-udemy$pythonPython2.7.10(default,Feb72017,00:08:15)[GCC4.2.1CompatibleAppleLLVM8.0.0(clang-800.0.34)]ondarwinType"help","copyright","credits"or"license"formoreinformation.>>>importudemy>>>udemy.__version__'0.0.1'>>>helpPlease create a issue.
Package: python-udptrack
##UDPTRACKA Bittorrent udp-tracking protocol Based on the specifications given byhttp://www.rasterbar.com/products/libtorrent/udp_tracker_protocol.html[![Build Status](https://travis-ci.org/plasmashadow/python-udptracker.svg?branch=master)](https://travis-ci.org/plasmashadow/python-udptracker)##Installation```pip install python-udptrack```##UsageIn order to connect to the tracker the tracker url and info_hash is necessary.<b>Note</b>: I assume that you have already decoded torrent file dict.```pythonfrom udptrack import UDPTrackerannounce_url = torrent_info_dict.get("announce")tracker = UDPTracker(announce_url, timeout=2, info_hash="7BC238FD69F5A43C1CD5566870420D63F074BAD8")tracker.connect()print tracker.interpret()```In order to announce you can have announce method.```pythontracker.announce()print tracker.interpret()```In order to scrap the details of torrent```pythontracker.scrape(["7BC238FD69F5A43C1CD5566870420D63F074BAD8"])print tracker.interpret()```###License<b> BSD </b>
Package: python-ufile
title: python-ufilePython sdk for downloading/uploading to ufile.io both as a guest and
with an API keyFree software: MIT licenseDocumentation:https://python-ufile.readthedocs.io.FeaturesUpload files to ufile.io as a guest Download files from ufile.io with an
API_KEY Get file direct link from ufile.io with an API_KEYCreditsThis package was coded in it's entirety by Aria Bagheri. Special thanks to ufile.io for providing the api endpoints. And also to all developers that put their blood, sweat, and tears into python, asyncio, and the requests library.