Saravanan666/pypi-org huggingface dataset:
Package: ledger
Pre-requisitesPython 3.8/3.9PipHow to run the codeWe have provided scripts to execute the code.Userun.shif you are Linux/Unix/macOS Operating systems andrun.batif you are on Windows.  Both the files run the commands silently and prints only output from the input filesample_input/input1.txt. You are supposed to add the input commands in the file from the appropriate problem statement.Internally both the scripts run the following commandspip install -r requirements.txt- This will install the dependencies mentioned in the requirement.filepython -m geektrust sample_input/input1.txt- This will run the solution passing in the sample input file as the command line argumentIf you are providing a solution without using the build file, we want you to name your Main file as geektrust.py. This is the file that will contain your main method.We expect your program to take the location to the text file as parameter. Input needs to be read from a text file, and output should be printed to the console. The text file will contain only commands in the format prescribed by the respective problem.Running the code for multiple test casesPlease fillinput1.txtandinput2.txtwith the input commands and use those files inrun.batorrun.sh. Replacepython -m geektrust sample_input/input1.txtwithpython -m geektrust sample_input/input2.txtto run the test case from the second file.How to execute the unit testspython -m unittest discoverwill execute the unit test cases.The unit test coverage is found by the command :coverage run -m unittest discoverHelpYou can refer our help documentshereYou can read build instructionshere
Package: ledger-app-clients.ethereum
Python client for the Ledger Ethereum applicationThis package allows to communicate with the Ledger Ethereum application, either on a
real device, or emulated on Speculos.Installation from pypi.orgYou can install the client frompypi.org:pipinstallledger_app_clients.ethereumInstallation from sourcesYou can also install the client from this repo:pipinstall.
Package: ledgerblue
Python tools for Ledger Blue, Nano S and Nano XThis package contains Python tools to communicate with Ledger Blue, Nano S and Nano X and manage applications life cycle.InstallationIt is recommended to install this package in aVirtual Environmentin your native environment (not a Docker image) to avoid hidapi issues.python3 -m venv ledger
source ledger/bin/activate
pip install ledgerblueSupported devicesAt the moment these tools work for all Nano S, Nano S+, and Blue devices, but only for special Nano X developer units which are not available to the general public.
The Recover scripts, will work with Nano X starting from a specific version.Please checkLedger Developer Portalto see how to debug your application on a Nano X simulator usingSpeculosInstallation pre-requisiteslibudev-devlibusb-1.0-0-devpython-dev (python >= 3.6)This package can optionally work withlibsecp256k1Python bindings compiled with ECDH support. If you wish to enable libsecp256k1 bindings, make sure to install libsecp256k1 as follows:SECP_BUNDLED_EXPERIMENTAL=1 pip --no-cache-dir install --no-binary secp256k1 secp256k1To install the custom secp256k1 package on MacOS, you previously need to run:brew install libtoolWhich would end up installing glibtool and glibtoolize utilities required for the build process.Giving permissions on udevWhen running on Linux, make sure the following rules have been added to/etc/udev/rules.d/:SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000", MODE="0660", TAG+="uaccess", TAG+="udev-acl" OWNER="<UNIX username>"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", TAG+="uaccess", TAG+="udev-acl" OWNER="<UNIX username>"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0004", MODE="0660", TAG+="uaccess", TAG+="udev-acl" OWNER="<UNIX username>"Target IDUse the following Target IDs (--targetId option) when running commands directly:Device nameFirmware VersionTarget IDNano S Plusall0x33100004Nano X< 2.2.1 (developer units only)0x33000004Nano X>=  2.2.10x33000004Nano S<= 1.3.10x31100002Nano S1.4.x0x31100003Nano S>= 1.5.x0x31100004Ledger Blue<= 2.00x31000002Ledger Blue2.1.x0x31000004Ledger Blue v22.1.x0x31010004
Package: ledger-cli
ledger-cliFeaturesledger-cli strives to achieve two goals regarding your personal finance:Providing you with an easy format for fine-tuning your transactions.Serving a local dashboard for easy analysis and interpration.InstallationYou can installledger-cliviapipfromPyPI:$pipinstallledger-cliUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,ledger-cliis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: ledger-coda-app
Coda signature app for Ledger Blue & Ledger Nano S/XBig disclaimer : This is a work in progress. Don't use it on a Ledger device
that is handling or has ever handled private keys associated with any accounts
of value.This app grew loosely from the Ledger samplesign app, but all of the python in/clihas been updated to use python3. So if you're here from another project and curious,
it seems it is possible!Runmaketo check the build, andmake loadto build and load the application
onto the device. Errors try to be helpful and the most common reason for failure
is the device autolocking, so if something isn't working that might just be the
reason.make deletedeletes the app.SeeLedger's documentationfor further information.To get the app version:python3 cli/sign.py --request='version'To generate and return the public key generated with nonce 11:python3 cli/sign.py --request=publickey --nonce=11To sign a transaction, with pk 1234 ("nonce":37in the JSON gives the signature/account nonce,--nonce=1234gives the nonce with which the Ledger device will generate the sender private/public keypair):python3 cli/sign.py --request=transaction --nonce=1234 --transaction='{"sendPayment": {"is_delegation": "False","nonce": 37,"from": 123,"to": "tNci9iZe1p3KK4MCcqDa52mpxBTveEm3kqZMm7vwJF9uKzGGt1pCHVNa2oMevDb1HDAs4bNdMQLNbD8N3tkCtKNGM53obE9qFkkhmqMnKRLNLiSfPJuLGsSwqnL3HxSqciJoqJJJmq5Cfb","amount": 1000,"fee": 8,"valid_until": 1600,"memo": "2pmu64f2x97tNiDXMycnLwBSECDKbX77MTXVWVsG8hcRFsedhXDWWq"}}'
Package: ledgercomm
LedgerCOMMOverviewPython library to send and receiveAPDUthrough HID or TCP socket.
It can be used with a Ledger Nano S/X or with theSpeculosemulator.InstallIf you just want to communicate through TCP socket, there is no dependency$pipinstallledgercommotherwise,hidapimust be installed as an extra dependency like this$pipinstallledgercomm[hid]Getting startedLibraryfromledgercommimportTransport# Nano S/X using HID interfacetransport=Transport(interface="hid",debug=True)# or Speculos through TCP sockettransport=Transport(interface="tcp",server="127.0.0.1",port=9999,debug=True)## send/recv APDUs## send method for structured APDUstransport.send(cla=0xe0,ins=0x03,p1=0,p2=0,cdata=b"")# send b"\xe0\x03\x00\x00\x00"# or send_raw method for hexadecimal stringtransport.send_raw("E003000000")# send b"\xe0\x03\x00\x00\x00"# or with bytes typetransport.send_raw(b"\xe0\x03\x00\x00\x00")# Waiting for a response (blocking IO)sw,response=transport.recv()# type: int, bytes## exchange APDUs (one time send/recv)## exchange method for structured APDUssw,response=transport.exchange(cla=0xe0,ins=0x03,p1=0,p2=0,cdata=b"")# send b"\xe0\x03\x00\x00\x00"# or exchange_raw method for hexadecimal stringsw,reponse=transport.exchange_raw("E003000000")# send b"\xe0\x03\x00\x00\x00"# or with bytes typesw,response=transport.exchange_raw(b"\xe0\x03\x00\x00\x00")CLIUsageWhen installed,ledgercommprovides a CLI tool namedledgercomm-send$ledgercomm-send--help
usage:ledgercomm-send[-h][--hid][--serverSERVER][--portPORT][--startswithSTARTSWITH]{file,stdin,log}...

positionalarguments:{file,stdin,log}sub-commandhelpfilesendAPDUsfromfilestdinsendAPDUsfromstdinlogsendAPDUsfromLedgerLivelogfile

optionalarguments:-h,--helpshowthishelpmessageandexit--hidUseHIDinsteadofTCPclient--serverSERVERIPserveroftheTCPclient(default:127.0.0.1)--portPORTPortoftheTCPclient(default:9999)--startswithSTARTSWITHOnlysendAPDUsstartingwithSTARTSWITH(default:None)ExampleIf Speculos is launched with default parameters or your Nano S/X is plugged with correct udev rules, you can send APDUs from stdin$echo"E003000000"|ledgercomm-sendstdin# Speculos$echo"E003000000"|ledgercomm-send--hidstdin# Nano S/XOr you can replay APDUs using the following text file namedapdus.txtwith some condition# this line won't be send if you've the right STARTSWITH condition
=> E003000000
# another APDU to send
=> E004000000then$ledgercomm-send--startswith"=>"fileapdus.txt
Package: ledgereth
ledgerethThis library is beta.  Pleasereport any bugsyou find.This is a library to interact withapp-ethereum, the Ethereum app for theLedger hardware wallets.  It's goal is to make interfacing with the Ledger easy.QuickstartHere’s the quickest way to get started.pip install ledgerethPlease seethe ledgereth documentationfor more detailed information.CompatabilityLedger DevicesThis lib has been tested to work on Ledger Nano S and Nano X.  It will probalby work with Ledger Blue and any devices theledgerbluelibraryandapp-ethereumsupports.Ledger Account DerivationsThe Ledger-provided desktop apps have changed the way accounts are derived with the release of Ledger Live.  If you created your Ledger account(s) with the older Chrome app and want to use those account(s) with this library, you will need to set theLEDGER_LEGACY_ACCOUNTSenv var. You can only use one or the other at a time.  Seethe notes in source for more information.
Package: ledger-fx-rates
# ledger-fx-ratesRender [current foreign exchange rates](https://www.ecb.europa.eu/stats/exchange/eurofxref/html/index.en.html) from the European Central Bank as [ledger market values](www.ledger-cli.org/3.0/doc/ledger3.html#Commodities-and-Currencies).ledger-fx-ratesoutput is compatible with any software that uses the ledger journal format, including [hledger](http://hledger.org/).## Installledger-fx-ratesrequires Python 2.7 or later and only depends on the standard library.Download the [latest release](https://github.com/benwebber/ledger-fx-rates/releases/latest) or install with pip:` pip installledger-fx-rates`## UsageOutput rates for the Euro (EUR):` $ledger-fx-ratesP2017-02-09AUD EUR 0.71608 P2017-02-09BGN EUR 0.51130 P2017-02-09BRL EUR 0.30004 P2017-02-09CAD EUR 0.71347 P2017-02-09CHF EUR 0.93703 P2017-02-09CNY EUR 0.13622 P2017-02-09CZK EUR 0.03701 P2017-02-09DKK EUR 0.13450 P2017-02-09GBP EUR 1.17523 P2017-02-09HKD EUR 0.12055 P2017-02-09HRK EUR 0.13388 P2017-02-09HUF EUR 0.00324 P2017-02-09IDR EUR 0.00007 P2017-02-09ILS EUR 0.24952 P2017-02-09INR EUR 0.01401 P2017-02-09JPY EUR 0.00833 P2017-02-09KRW EUR 0.00082 P2017-02-09MXN EUR 0.04575 P2017-02-09MYR EUR 0.21069 P2017-02-09NOK EUR 0.11254 P2017-02-09NZD EUR 0.67554 P2017-02-09PHP EUR 0.01874 P2017-02-09PLN EUR 0.23204 P2017-02-09RON EUR 0.22249 P2017-02-09RUB EUR 0.01591 P2017-02-09SEK EUR 0.10545 P2017-02-09SGD EUR 0.66116 P2017-02-09THB EUR 0.02671 P2017-02-09TRY EUR 0.25325 P2017-02-09USD EUR 0.93528 P2017-02-09ZAR EUR 0.06974 `Output rates for a different currency:` $ledger-fx-ratesCAD P2017-02-09AUD CAD 1.00365 P2017-02-09BGN CAD 0.71664 P2017-02-09BRL CAD 0.42053 P2017-02-09CHF CAD 1.31334 P2017-02-09CNY CAD 0.19092 P2017-02-09CZK CAD 0.05187 P2017-02-09DKK CAD 0.18852 P2017-02-09EUR CAD 1.40160 P2017-02-09GBP CAD 1.64720 P2017-02-09HKD CAD 0.16897 P2017-02-09HRK CAD 0.18764 P2017-02-09HUF CAD 0.00454 P2017-02-09IDR CAD 0.00010 P2017-02-09ILS CAD 0.34973 P2017-02-09INR CAD 0.01964 P2017-02-09JPY CAD 0.01168 P2017-02-09KRW CAD 0.00115 P2017-02-09MXN CAD 0.06412 P2017-02-09MYR CAD 0.29531 P2017-02-09NOK CAD 0.15773 P2017-02-09NZD CAD 0.94684 P2017-02-09PHP CAD 0.02626 P2017-02-09PLN CAD 0.32523 P2017-02-09RON CAD 0.31185 P2017-02-09RUB CAD 0.02229 P2017-02-09SEK CAD 0.14779 P2017-02-09SGD CAD 0.92668 P2017-02-09THB CAD 0.03744 P2017-02-09TRY CAD 0.35496 P2017-02-09USD CAD 1.31089 P2017-02-09ZAR CAD 0.09775 `## Tips### Usingincludeto organize your ledgerAppend the daily rates to a separate file:` $ledger-fx-rates>>~/.ledger-fx-rates.dat`In your main ledger file, include the file above:` include.ledger-fx-rates.dat`### Scheduling updatesThe ECB updates these rates around 16:00 CET (15:00 UTC) on trading days.## LicenseMIT
Package: ledgerhelpers
Ledger helpers (ledgerhelpers)This is a collection of small single-purpose programs to aid your accounting
withLedger(ledger-cli).  Think of it
as the batteries that were never included with Ledger.Why should you use them?  Because:All the ledgerhelpers have been designed with fast data entry in mind,
and they will remember or evoke existing data as needed, to help you minimize
typing and other drudgery.They all have launcher icons in your desktop environment -- this makes it
very easy to add icons or shortcuts for them, so you can run them on the spot.This package also contains a library with common functions that you can use
in your project to make it easier to develop software compatible with Ledger.What can you do with these programsEnter transactions easily withaddtrans.Update your price quotes withupdateprices.Record multi-currency ATM withdrawals withwithdraw-cli.Record FIFO stock or commodity sales withsellstock-cli.Interactively clear transactions withcleartrans-cli.Keep your ledger chronologically sorted withsorttrans-cli.Usage and manualsHow to add transactions withaddtransSee also individualmanual pagesin NROFF format.How to download and installHere are instructions to install the very latest iteration of ledgerhelpers:If you are on a Linux system and want to install it as an RPM package:Obtain the package withgit clone https://github.com/Rudd-O/ledgerhelpersChange to the directorycd ledgerhelpersCreate a source package withpython3 -m build --sdistCreate a source RPM withrpmbuild --define "_srcrpmdir ./" --define "_sourcedir dist/" -bs *.specYou may need to install some dependencies at this point.  The process will tell you.Create an installable RPM withrpmbuild --rebuild --nodeps --define "_rpmdir ./" *.src.rpmYou may need to install some dependencies at this point.  The process will tell you.Install the package withsudo rpm -Uvh noarch/*.noarch.rpmIn other circumstances or Linux systems:Obtain the package withgit clone https://github.com/Rudd-O/ledgerhelpersChange to the directorycd ledgerhelpersCreate the source package directly withpython3 -m build --sdistInstall the package (to your user directory~/.local) withpip3 install dist/*.tar.gzThis will install a number of dependencies for you.  Your system should already
have the GTK+ 3 library and the Python GObject introspection library.The programs inbin/can generally run from the source directory, provided
that the PYTHONPATH points to thesrc/folder inside the source directory,
but you still need to install the right dependencies, such as GTK+ 3 or later,
and the Python GObject introspection library.LicenseThis program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.Seefull license terms.
Package: ledger-reader
Ledger ReaderA simple parser for hledger journal files. It's always fun to play with rply and use a simple grammar. PR's welcome :).Installpip install ledger-readerExample usageRead a journalfromledger_readerimportLedgerReaderreader=LedgerReader()journal=reader.parse_file('bank.journal')forentryinjournal:print(entry.date,entry.description)fortransactioninentry.transactions:print(f'{transaction.account}{transaction.currency}{transaction.amount}')print()Append to a journalfromdatetimeimportdatefromledger_readerimportEntry,Transactionentry=Entry(date(2022,3,5),'Cash Transfer',transactions=[Transaction('assets:bank:boa:checking','$',-5000),Transaction('assets:bank:boa:savings')])withopen('bank.journal','a')asfp:fp.write(f'\n{entry}')
Package: ledgertools
ledgertools is a collection of utility programs for working with and
visualising data in theLedgeraccounting system.lt-stmtprocConvert a bank statement into transactions in a Ledger database.lt-transactCommand line program for entering transactions.lt-chartVisualise income or expenditure as a multi-level pie chart.
RequiresLedger,PyGTK(2.12 or higher) andgtkchartlib.Installationpip install ledgertoolsLicenseledgertools is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.ContributingThe ledgertools source code is available fromhttps://github.com/frasertweedale/ledgertools.Bug reports, patches, feature requests, code review and
documentation are welcomed.To submit a patch, please usegitsend-emailor generate a pull
request.  Write awell formed commit message.  If your patch is
nontrivial, update the copyright notice at the top of each changed
file.
Package: ledgerx
WARNINGThis codebase is still in analpha stateand could have bugs that result in financial losses. Use at your own risk.LedgerX Python ClientexampleOne of the many examples in theexamplesdirectory.from ledgerx import Trades

data = Trades.list()

print(f"Number of trades = {len(data['data'])}")
print(f"Example trade = {data['data'][0]}")dev envCurrently managed via miniconda. To create the env and install dependencies,make env.createmake env.updateconda activate ledgerxtestingRun tests viamake testlicenseSee LICENSE file
Package: ledgrid
The ledgrid module contains a single LEDGrid class which aims to be as
identical as possible to the public interface of the Raspberry PiSense HAT library, such that it is useful in mocking up software for
it and other such devices.Many existing Sense HAT LED demos and software will work using the
following import statement:from ledgrid import LEDGrid as SenseHatHowever, the internal implementation is rather simplified and uses
pygame instead of the hardware HAT.It requirespygameto be installed (not currently available through
pypi), an additional optional dependency is PIL (i.e. Pillow) which is
required by some features (notably scrolling text with the
show_message method).It supports every Python version since 2.7.  It is contained in only
one Python file, so it can be easily copied into your project if you
don’t want to use pypi. (The copyright and license notice must be
retained.)At the bottom of the ledgrid.py file are some examples of usage. You
can run these examples using:python3 -m ledgridOr if you have the file locally:python3 ledgrid.pyMany thanks to Richard Hayler. The LED class, graphics, etc are based
on his8x8GridDraw.
Package: led-list
led-listTeach Python lists with aBlinkStick Flex! Each LED represents a list index which can change color and turn off.ExamplesTurn on all LEDsfromled_listimportLEDList# initialize list with all lights (32) colored whitel=LEDList(["white"]*32)Change specific indexfromled_listimportLEDList# initialize list with all lights (32) colored whitel=LEDList(["white"]*32)# change first light to redl[0]="red"# change second light to custom RGB valuel[1]=(255,50,50)Turn off lightsfromled_listimportLEDList# initialize list with all lights (32) colored whitel=LEDList(["white"]*32)# turn off every light sequentiallyforxinrange(len(l)):l[x]="black"
Package: ledmx
Multi-controller supervisor libraryМодуль для контроля сети H802RA узлов.Протокол управления -Art-Net (pdf)Контроллер -H802RA (pdf)Лента -WS2813 (pdf)Как это работаетНа основе конфига строится экземпляр класса мультивселенная, объединяющего
данные всех вселенных в сети, карту пикселей (словарь по глобальному номеру пикселя и его данным) и
методы для модификации данных по номеру пикселя и формирования и отправки ArtDMX пакетов.При изменении значения байт конкретного пикселя, данные по ссылке меняются в глобальной матрице
вселенных.
При публикации данных (методmultiverse.pub()), данные вселенных преобразуются в ArtDMX пакеты и
отправляются по указанному адресу.КонфигурацияКонфиг - в форматеyaml.Корневой объектnodesсодержит список узлов, каждый узел описан:адресом хоста (куда слать ArtDMX пакет)именемсловарём выходовключ: номер выхода на узле (с нуля)значение: строка с указанием диапазонов номеров пикселейПиксели нумеруются глобально с нуля.Пример:nodes:# узел "box"-host:10.0.0.10# адрес хоста (IP или DNS имя)name:box# имя узлаouts:# разметка пикселей по выходам0:0-300# в 0-м выходе - пиксели с 0-го по 300-й (искл.)1:300-600# в 1-м выходе - пиксели с 300-го по 600-й-host:10.0.0.11name:node-1outs:0:901, 1001-10101:600 - 725# пустые выходы можно пропустить3:725- 800,1015# диапазоны можно разделять запятой, можно указывать одиночные пиксели-host:10.0.0.12name:j-50outs:2:800-850-host:10.0.0.13name:tailouts:1:1016-10283:10627:850-900, 910, 911# число выходов может быть разным на разныз узлах (тут - 8-портовый узел)Подробнее - в комментариях к коду.Тестыflake8.--show-source--statistics--max-line-length=127python-mpytest.ИспользованиеБиблиотека доступна черезPyPipipinstallledmxконфигурация:---nodes:-host:10.0.0.10name:boxouts:0:0-3001:300-600скрипт:# импорт класса мультивселеннойfromledmx.multiverseimportMultiverse# импорт функции парсинга конфигаfromledmx.layoutimportparse_fileif__name__=='__main__':# загружаем конфигlayout=parse_file('layout.yaml')# формируем мультивселеннуюm_verse=Multiverse(layout)# задаём значения цвета (GBR) для пикселей по их глобальным idm_verse[245]=100,10,10m_verse[308]=5,100,40# формируем из матрицы пакеты и рассылаем ихm_verse.pub()
Package: ledshim
LED SHIMhttps://shop.pimoroni.com/products/led-shim28 tiny RGB LED pixels in a single row that just slip right onto your Pi's pins, no soldering required! LED SHIM is ideal for status updates, notifications, a VU meter, or as a bar graph for sensor readings.InstallingFull install (recommended):We've created an easy installation script that will install all pre-requisites and get your LED SHIM
up and running with minimal efforts. To run it, fire up Terminal which you'll find in Menu -> Accessories -> Terminal
on your Raspberry Pi desktop, as illustrated below:In the new terminal window type the command exactly as it appears below (check for typos) and follow the on-screen instructions:curlhttps://get.pimoroni.com/ledshim|bashManual install:python3-mpipinstallledshimDevelopment:If you want to contribute, or like living on the edge of your seat by having the latest code, you should clone this repository,cdto the library directory, and run:python3setup.pyinstallIn all cases you will have to enable the i2c bus.Documentation & SupportGuides and tutorials -https://learn.pimoroni.com/led-shimFunction reference -http://docs.pimoroni.com/ledshim/GPIO Pinout -https://pinout.xyz/pinout/led_shimGet help -http://forums.pimoroni.com/c/supportChangelog0.0.2Addset_multiple_pixelsUpdated packagingLinting & minor improvements to docstrings0.0.1Initial release
Package: ledtable
# ledtableThis Python library can be used to accompany the development of LEDTable software on the Arduino.You can runpip install ledtablepython -m ledtable.SerialLEDTable <ArduinoSerialPort> <baudrate>Which opens the window that shows you LEDTable:![](example.png)It works under Python 2 and Python 3.On the Arduino, the methodsLEDTable::printToSerial()LEDTable::printPixelOrderToSerial()can be used to update the LEDTable.