Saravanan666/pypi-org huggingface dataset:
Package: trollius-fixers
trollius2asyncioA tool based on lib2to3 for converting code using trollius to use
asyncio. After installation, runtrollius2asyncio. It works in the
same way as 2to3.For example, it will transform this:importtrolliusfromtrolliusimportFrom,Return@trollius.coroutinedefdouble_future(future):value=yieldFrom(future)raiseReturn(2*value)intoimportasyncioasyncdefdouble_future(future):value=awaitfuturereturn2*valueUsageAfter installation, runtrollius2asyncioas you would2to3. It takes the
same command-line arguments, including-hfor help.LimitationsIt recognisesFrom,trollius.From,Returnandtrollius.Return, without
taking the imports into consideration. Thus, importing trollius as a different
name will confuse it, andfrom tornado.gen import Returnwill cause the
returns from Tornado to also be rewritten (which should still be a legal
transformation).It recognises@trollius.coroutine, again without taking imports into
consideration. If the decorator is omitted, it won't turn the function into a
coroutine, which will lead to syntax errors if it ends up containingawaitstatements. It also won't apply the transformation if there are additional
decorators inside (i.e., between@trollius.coroutineand the definition)
since that would alter the semantics.The resulting code is not necessarily well-styled e.g., the extra blank line
in the example above. These are limitations of lib2to3 and won't be easy to fix
without risking breaking code in corner cases.Release history0.2Drop Python 3.4 support (output code uses async and await).0.1.1Add licence.0.1Initial release.
Package: trollo
Python Trello API WrapperThis Python API is simply a wrapper around the Trello API.Getting Started:To use the Trello API, install the package either by downloading the source and running$ python setup.py installor by using pip$ pip install trolloDocumentation:You can find documentation for the Python API at:http://pypi.org/project/trollo/And documentation for the Trello API at:https://developers.trello.com/reference/
Package: trollop
Meet TrollopTrollop is a Python library for working with theTrello API.Quick StartA Trello connection is instantiated with yourAPI keyand a user’soauth token:In [1]: from trollop import TrelloConnection

In [2]: conn = TrelloConnection(<your developer key>, <user's oauth token>)The connection object will automatically have a Member object attached,
representing the user whose oauth token was used to connect:In [3]: conn.me
Out[3]: <Member: me>

In [4]: conn.me.username
Out[4]: u'btubbs'In the previous example no HTTP request was made until command 4, the access
to conn.me.username.  Trollop objects are lazy.The connection object has methods for getting objects by their IDs:In [5]: card = conn.get_card('4f2e454cefab2bbd4ea71b02')

In [6]: card.name
Out[6]: u'Build a Python Trello Library'

In [7]: card.desc
Out[7]: u'And call it Trollop.'You can use normal Python introspection techniques to see the available
attributes.  They’ll mostly be named exactly as they are in the JSON returned
from Trello:In [13]: dir(card)
Out[13]:
['__class__',
 '__delattr__',
 '__dict__',
 '__doc__',
 '__format__',
 '__getattr__',
 '__getattribute__',
 '__hash__',
 '__init__',
 '__module__',
 '__new__',
 '__reduce__',
 '__reduce_ex__',
 '__repr__',
 '__setattr__',
 '__sizeof__',
 '__str__',
 '__subclasshook__',
 '__weakref__',
 '_conn',
 '_id',
 '_path',
 '_prefix',
 'badges',
 'board',
 'checkItemStates',
 'close',
 'closed',
 'desc',
 'labels',
 'list',
 'members',
 'name',
 'url']The exact parsed JSON returned from trello.com is available as the _data
attribute on all Trello objects:In [7]: card._data
Out[7]:
{u'badges': {u'attachments': 0,
             u'checkItems': 0,
             u'checkItemsChecked': 0,
             u'comments': 1,
             u'description': True,
             u'due': None,
             u'fogbugz': u'',
             u'votes': 0},
 u'checkItemStates': [],
 u'closed': True,
 u'desc': u'And call it Trollop.',
 u'id': u'4f2e454cefab2bbd4ea71b02',
 u'idBoard': u'4e8df268f14f2517a7a342fa',
 u'idList': u'4f17cb04d5c817032301c179',
 u'idMembers': [],
 u'idShort': 130,
 u'labels': [],
 u'name': u'Build a Python Trello Library',
 u'url': u'https://trello.com/card/build-a-python-trello-library/4e8df268f14f2517a7a342fa/130'}Trello objects have smart fields that automatically look up related objects:In [9]: lst = card.list

In [10]: lst
Out[10]: <List: Icebox>

In [11]: lst.name
Out[11]: u'Icebox'

In [12]: lst._id
Out[12]: u'4f17cb04d5c817032301c179'

In [13]: len(lst.cards)
Out[13]: 20

In [14]: lst.cards[-1].name
Out[14]: u'Build a Python Trello Library'Help WantedCoverage for creating/updating objects is still really thin.  If you’d like to
pitch in to finish covering the whole API, please send a pull request with your
changes.LicenseTrollop is licensed under theMIT License.
Package: trollpy
Python Troll LibraryTrollpy is a library purely for trolling others by overriding some built-in or common functions/classes seen within Python programs.🚀 InstallationUsing pippipinstalltrollpyOr, if you have multiple versions of python installed:pip3installtrollpyUsing gitgitclonehttps://github.com/zahtec/trollpy.git🛠 UsageMake sure to import this at the bottom of any import list in order to confirm that it ovverides any other imported functions.For Example:importnumpyasnpfromcv2importimshowfromPIL.Imageimportopenfrombuiltinimportopen# Overrides Pillow's importAlso, this library is imported using the wordbuiltin, very similar to pythons native modulebuiltins, as to not arouse suspicion from whoever your trolling. It would be much to easy if it was called Trollpy⚠️ DisclaimerPlease use this just as a little bit of trolling, not for malicious intent, thanks!📔 DocumentationRead thewiki📡 Contribution GuideContributing to Trollpy is very welcome, but there are a few guidlines that come with it:Contribute with the main provided template on githubContribute functions and/or classes one at a time (Do not contribute 2 or more functions/classes at once)Keep it in the same file (troll.py). I do not plan on modularizing this libraryAs long as you follow and fill everything out in the template, you should be fineThis way contributing can be much faster and more standardized, you can go slightly off the template, but try to keep most of the fields there with your answers. Thank you for contributing!
Package: troll.storage
Thetroll.storagepackage provides an abstract approach for the
storage problematics. It defines a simple, yet exhaustive, api to deal
with all kind of storage.It provides :A clear API as interfacesA base class adapter that provides a basic implementation.A demonstrative, yet functional, annotation descriptor, to handle
annotation storages.How does it work?The system uses the basic zope3 components system to be flexible and
pluggable. There are 3 main parts :the Handler : the straightforward API to store, retrieve and
delete. It’s implemented as an adapter.the Storage : a storage object that implements IStorage. It can be a
zope container or a layer to write in a relational database.the Stored Item : a very lightly contrained object that is to be
stored in Storage.Learn moreNothing is like code reading to understand how to use it and why to
use it. I recommand you read the tests. They demonstrate all the basic
usecases.
Package: tromegle
Tromegle:  Troll Strangers!========Tromegle started as a project through which to learn about HTTP requests and asynchronous I/O.  The idea wasto learn how to use urllib(2) and later Twisted while having a bit of fun at the expense of a few [Omegle](http://omegle.com) users, or "strangers".It has since evolved into an unofficial API, complete with a simple client class.###Trolling is a Art!The nonstandard functionality of Tromegle is centered around a relatively simple [man-in-the-middle attack](http://en.wikipedia.org/wiki/Man-in-the-middle_attack).The power of Tromegle lies in the Transmogrifier class, which allows for the conditional modification or injection of AJAX eventsand, by extension, user messages.  In plain English, this means **you can modify the message a user sends to another**as well as pass messages that only one user will see!###Trolling gentlySometimes it's just fun to evesdrop; internet users are often funny despite themselves.  Tromegle gives you thetools to either observe or record conversations, or relevant portions thereof.Getting Tromegle========You will need python version 2.7 or later to use Tromegle.  2.6 will not work because Tromegle makes extensive useof dictionary comprehension syntax -- a feature added in python2.7.###Installing through pipAs of right now, the easiest way to obtain Tromegle is through pip.  Make sure pip is installed prior to running:```pip install tromegle --user```### Installing through Git```git clone https://github.com/louist87/tromegle.git```The package can then be installed withe the following commands:```cd tromeglesudo python setup.py install```Dependencies========Tromegle is maintained and tested on the latest version of [Twisted](http://twistedmatrix.com/).  It is very likely tocontinue working with older versions, however.Canonical installation instructions can be found on the above website, but the following installation stepsshould work.###Ubuntu (or other Debian-based distro)```sudo apt-get install python-twisted```###WindowsDownload the installer from [here][download]###Any OS with pip installed (Mac/Win/*nix)```pip install Twisted```###OSXOSX has shipped with Twisted preinstalled since 2007, so Tromegle should work out-of-the-box!  If you have any trouble, you should try [this simple procedure](http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#WhyamIgettingImportErrorsforTwistedsubpackagesonOSX10.5).If that doesn't work, you can try [downloading the tarball][download] and installing it to a different `PYTHONPATH` than the default.[download]: http://twistedmatrix.com/trac/wiki/Downloads[osx]: http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#WhyamIgettingImportErrorsforTwistedsubpackagesonOSX10.5Using Tromegle========Instructions on how to use Tromegle can be found in the [short and sweet introduction to Tromegle](http://github.com/louist87/tromegle/wiki/Short-and-Sweet-Introduction-to-Tromegle) wiki page.
Package: trompace-client
Trompa Contributor Environment Python ClientMusic Technology Group, Universitat Pompeu Fabra, BarcelonaA python library to read from and write to the Trompa Contributor Environment
(Trompa CE).InstallationTo install, runpython setup.py installto install the package and dependenciesUsing the libraryThis library connects to an existing Trompa CE instance. For testing on a local
environment the docker containers fromhttps://github.com/trompamusic/ce-apican be run.Basic example code for using the library to add an artist to the Trompa CE.To use the library an existing Trompa Contributor environmentimporttrompace.connectionfromtrompace.configimportconfigfromtrompace.mutationsimportpersonconfig.load('trompace.ini')mutation_musicbrainz=person.mutation_create_person(creator="https://github.com/trompamusic/trompa-ce-client/tree/v0.1/demo",contributor="https://musicbrainz.org",source="https://musicbrainz.org/artist/8d610e51-64b4-4654-b8df-064b0fb7a9d9",format_="text/html",title="Gustav Mahler - MusicBrainz",name="Gustav Mahler",birth_date="1860-07-07",death_date="1911-05-18",family_name="Mahler",given_name="Gustav",gender="male",language="en")response=trompace.connection.submit_query(mutation_musicbrainz,auth_required=True)print(response)LicenseCopyright 2019 Music Technology Group, Universitat Pompeu Fabra

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 at

    http://www.apache.org/licenses/LICENSE-2.0

Unless 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.DevelopmentThis package is published on pypi, and has documentation on readthedocs:https://pypi.org/project/trompace-client/https://trompace-client.readthedocs.io/en/latest/To build and publish a new version:git tag v0.3
git push --tags
python setup.py sdist bdist_wheel
twine upload dist/*To release a version on github after pushing the tag, go tohttps://github.com/trompamusic/trompa-ce-client/releases/newand choose the tag that you just pushed.To build docs, go tohttps://readthedocs.org/projects/trompace-client/and click
"Build version".
Package: trompy
trompyA collection of tools for plotting and data analysis from McCutcheon Lab based at UiT in Tromsø, Norway (hencetrom-py). We study ingestive behavior and motivation in rodent neuroscience experiments but code may be useful in other settings.Highlights include:GUI for analyzing lick patterns in rodent feeding and drinking experiments[^1]GUI for analyzing fiber photometry data from rodent neuroscience experimentsFunction for plotting bar plots with individual data pointsFunction for reading data files produced by Med Associates behavioral equipmentFunctions for analyzing patterns of licking in rodent experimentsFunctions for performing ROC (receiver-operator characteristic) analysis[^1]: GUIs are now available as separate packages:https://github.com/mccutcheonlab/Lick-Calc-GUIandhttps://github.com/mccutcheonlab/photoguiCode is maintained by James McCutcheon, Dept of Psychology, UiT The Arctic University of Norway.InstallationThe simplest way to install is via the pip package manager. Briefly, from a terminal runpip install trompyDependencies will be automatically downloaded but are also listed in environmentPrevious versionshttps://pypi.org/project/trompy/#historyHow to cite this project?Please emailjmc010@uit.noto get instructions on how to properly cite this project.ContributingYou are welcome to contribute to the code via pull requests.  Please have a
look at theNLeSC
guidefor guidelines about software development.
Package: tron-address-converter
tron-address-converterPackage for converting TRON address <-> EVM address
Based onhttps://tronscan.org/#/tools/code-converter/tron-ethereum-addressandhttps://github.com/wemaketech/tron-format-address/blob/master/lib/crypto.tsInstallationpipinstalltron-address-converterUsageimporttron_address_converterevm_wallet=tron_address_converter.to_hex("TXXmULCEzRo6JfxUP1LYfmzbiKUezUvUNj")# 0xec830e98468d23f54c58174bb9a3671fcc440ff2tron_wallet=tron_address_converter.from_hex("0xec830e98468d23f54c58174bb9a3671fcc440ff2")# TXXmULCEzRo6JfxUP1LYfmzbiKUezUvUNjprint(evm_wallet)# 0xec830e98468d23f54c58174bb9a3671fcc440ff2print(tron_wallet)# TXXmULCEzRo6JfxUP1LYfmzbiKUezUvUNj
Package: tronapi
A Python API for interacting with the Tron (TRX)A Command-Line Interface frameworkYou can install it in a system-wide location via pip:sudopip3installtronapiOr install it locally usingvirtualenv:virtualenv-p/usr/bin/python3~/tronapisource~/tronapi/bin/activatepip3installtronapiUsageSpecify the API endpoints:Smart ContractfromtronapiimportTronfromsolcimportcompile_sourcefull_node='https://api.trongrid.io'solidity_node='https://api.trongrid.io'event_server='https://api.trongrid.io'tron=Tron(full_node=full_node,solidity_node=solidity_node,event_server=event_server)# or default (tron = Tron())# Solidity source codecontract_source_code='''
pragma solidity ^0.4.25;

contract Hello {
    string public message;

    function Hello(string initialMessage) public {
        message = initialMessage;
    }

    function setMessage(string newMessage) public {
        message = newMessage;
    }
}

'''compiled_sol=compile_source(contract_source_code)contract_interface=compiled_sol['<stdin>:Hello']hello=tron.trx.contract(abi=contract_interface['abi'],bytecode=contract_interface['bin'])# Submit the transaction that deploys the contracttx=hello.deploy(fee_limit=10**9,call_value=0,consume_user_resource_percent=1)Base ExamplefromtronapiimportTronlogging.basicConfig(level=logging.DEBUG,format="%(asctime)s-%(levelname)s-%(message)s")logger=logging.getLogger()full_node='https://api.trongrid.io'solidity_node='https://api.trongrid.io'event_server='https://api.trongrid.io'tron=Tron(full_node=full_node,solidity_node=solidity_node,event_server=event_server)account=tron.create_account()is_valid=bool(tron.trx.is_address(account.address.hex))logger.debug('Generated account: ')logger.debug('- Private Key: '+account.private_key)logger.debug('- Public Key: '+account.public_key)logger.debug('- Address: ')logger.debug('-- Base58: '+account.address.base58)logger.debug('-- Hex: '+account.address.hex)logger.debug('-- isValid: '+str(is_valid))logger.debug('-----------')transaction=tron.trx.get_transaction('757a14cef293c69b1cf9b9d3d19c2e40a330c640b05c6ffa4d54609a9628758c')logger.debug('Transaction: ')logger.debug('- Hash: '+transaction['txID'])logger.debug('- Transaction: '+json.dumps(transaction,indent=2))logger.debug('-----------')# Eventsevent_result=tron.trx.get_event_result('TGEJj8eus46QMHPgWQe1FJ2ymBXRm96fn1',0,'Notify')logger.debug('Event result:')logger.debug('Contract Address: TGEJj8eus46QMHPgWQe1FJ2ymBXRm96fn1')logger.debug('Event Name: Notify')logger.debug('Block Number: 32162')logger.debug('- Events: '+json.dumps(event_result,indent=2))More samples and snippets are available atexamples.DocumentationDocumentation is available atdocs.DonationsTRON: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY
Package: tronapi-JCO
A Python API for interacting with the Tron (TRX)A Command-Line Interface frameworkYou can install it in a system-wide location via pip:sudopip3installtronapi-JCOOr install it locally usingvirtualenv:virtualenv-p/usr/bin/python3~/tronapisource~/tronapi/bin/activatepip3installtronapiUsageSpecify the API endpoints:Smart ContractfromtronapiimportTronfromsolcimportcompile_sourcefull_node='https://api.trongrid.io'solidity_node='https://api.trongrid.io'event_server='https://api.trongrid.io'tron=Tron(full_node=full_node,solidity_node=solidity_node,event_server=event_server)# or default (tron = Tron())# Solidity source codecontract_source_code='''
pragma solidity ^0.4.25;

contract Hello {
    string public message;

    function Hello(string initialMessage) public {
        message = initialMessage;
    }

    function setMessage(string newMessage) public {
        message = newMessage;
    }
}

'''compiled_sol=compile_source(contract_source_code)contract_interface=compiled_sol['<stdin>:Hello']hello=tron.trx.contract(abi=contract_interface['abi'],bytecode=contract_interface['bin'])# Submit the transaction that deploys the contracttx=hello.deploy(fee_limit=10**9,call_value=0,consume_user_resource_percent=1)Base ExamplefromtronapiimportTronlogging.basicConfig(level=logging.DEBUG,format="%(asctime)s-%(levelname)s-%(message)s")logger=logging.getLogger()full_node='https://api.trongrid.io'solidity_node='https://api.trongrid.io'event_server='https://api.trongrid.io'tron=Tron(full_node=full_node,solidity_node=solidity_node,event_server=event_server)account=tron.create_accountis_valid=bool(tron.trx.is_address(account.address.hex))logger.debug('Generated account: ')logger.debug('- Private Key: '+account.private_key)logger.debug('- Public Key: '+account.public_key)logger.debug('- Address: ')logger.debug('-- Base58: '+account.address.base58)logger.debug('-- Hex: '+account.address.hex)logger.debug('-- isValid: '+str(is_valid))logger.debug('-----------')transaction=tron.trx.get_transaction('757a14cef293c69b1cf9b9d3d19c2e40a330c640b05c6ffa4d54609a9628758c')logger.debug('Transaction: ')logger.debug('- Hash: '+transaction['txID'])logger.debug('- Transaction: '+json.dumps(transaction,indent=2))logger.debug('-----------')# Eventsevent_result=tron.trx.get_event_result('TGEJj8eus46QMHPgWQe1FJ2ymBXRm96fn1',0,'Notify')logger.debug('Event result:')logger.debug('Contract Address: TGEJj8eus46QMHPgWQe1FJ2ymBXRm96fn1')logger.debug('Event Name: Notify')logger.debug('Block Number: 32162')logger.debug('- Events: '+json.dumps(event_result,indent=2))More samples and snippets are available atexamples.DocumentationDocumentation is available atdocs.DonationsTRON: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY
Package: tron-api-python
Tron Api For PythonTron grpc and http apiDemoimportjsonimportgrpcfromtron_apiimporttron_utilsfromtron_api.grpc.api.api_pb2importEmptyMessage,Returnfromtron_api.grpc.api.api_pb2_grpcimportWalletStubfromtron_api.grpc.core.Tron_pb2importBlock,Transactionfromtron_api.grpc.core.contract.balance_contract_pb2importTransferContractfromtron_api.http.http_api_implimportTronSolidityNodeHttpApi,TronFullNodeHttpApiprivate_key=bytes.fromhex("72015f629b750c4ce520209fa866b056a29d7957a1e29645c28ce72fe44fede1")owner_address=tron_utils.ADDR("TECwVujGXYNTXJ3sWiJJhjRZS3zgptvENe")to_address=tron_utils.ADDR("TECwVujGXYNTXJ3sWiJJhjRZS3zgptvENe")classGrpcDemo:def__init__(self):channel=grpc.insecure_channel("172.18.0.3:50051")self.wallet_stub=WalletStub(channel)defget_demo(self):block:Block=self.wallet_stub.GetNowBlock(EmptyMessage())print(block)deftransfer_demo(self):# grpc demotran:Transaction=self.wallet_stub.CreateTransaction(TransferContract(owner_address=owner_address,to_address=to_address,amount=10))tran.signature.append(tron_utils.sign_message(private_key,tran.raw_data.SerializeToString()))grpc_res:Return=self.wallet_stub.BroadcastTransaction(tran)print(grpc_res)classHttpDemo:def__init__(self):self.http_api=TronFullNodeHttpApi(gateway="http://172.18.0.3:8090")defget_demo(self):status,block=self.http_api.getnowblock()print(block)deftransfer_demo(self):# http demostatus,transaction=self.http_api.createtransaction(json_data={'owner_address':owner_address.hex(),'to_address':to_address.hex(),'amount':2*1_000_000,})transaction=json.loads(transaction)transaction["signature"]=[tron_utils.sign_message(private_key,bytes.fromhex(transaction.get("raw_data_hex"))).hex()]status,res=self.http_api.broadcasttransaction(json_data=transaction)print(status,res)if__name__=='__main__':print(tron_utils.private_key_to_address(private_key=private_key))g,h=GrpcDemo(),HttpDemo()g.get_demo()h.get_demo()# g.transfer_demo()# h.transfer_demo()
Package: tronclass-cli
Tronclass CLITronclass CLI 可以让您使用命令行完成 Tronclass 平台有关的各项工作。支持的平台：学在浙大支持的功能：查看待办事项查看课程列表查看课程内容下载课程资料查看课程作业提交课程作业安装Tronclass CLI 使用 Python 开发，推荐使用pipx安装，pipx 可以自动建立独立的 Python 环境，不会干扰您本地的其它 Python 开发环境。当然，您也可以选择使用pip进行安装。pipx install tronclass-cli安装完成后，可以使用tcc -v进行测试。快速开始首先，您可以添加一个配置文件来指定一些常用信息，如用户名等。配置文件默认位于~/.tronclass/config.json，您可以通过修改环境变量TRONCLASS_CLI_CONFIG_FILE来指定其它地址。一个典型的配置文件为：{"session":{"username":"31xxxxxxxxx","auth_provider":"zju"},"api":{"api_url":"zju"}}随后，您可以尝试使用tcc todo命令查看您的待办事项，第一次使用时需要输入您的密码，密码会被安全地保存至您操作系统的凭据管理器中，后续使用时将不会要求输入密码。您可以使用tcc -h查看可用的命令，使用tcc [command] -h查看命令的使用方法。