Saravanan666/pypi-org huggingface dataset:
Package: tplink-wr-api
tplink-wr-apiPython API to some budget TP-Link routers.Supported devicesThis library designed for budget models with firmware without API. Library interacts with router management interface like user (scrape HTML UI) so it may not work with others versions of firmware.Tested with TL-WR840N v2 with firmware version 3.16.9.FeaturesCurrently only read operations are available:general status infoWLAN clientsDHCP leasesUsage>>>fromtplink_wrimportRouterSession,fetchers>>>>>>rt=RouterSession("192.168.0.1","admin","admin")>>>>>>general=fetchers.status.GeneralStatus.fetch(rt)>>>print(general.lan)LANStatus(mac='12-34-56-78-90-AB',ip='192.168.0.1',mask='255.255.255.0')>>>stats=fetchers.wlan.WLANStats.fetch(rt)>>>leases=fetchers.dhcp.DHCPLeases.fetch(rt)>>>>>>importpprint>>>pp=pprint.PrettyPrinter(indent=2)>>>pp.pprint(general.dict()){'device_type':<RouterType.WAN:1>,'firmware':'3.16.9 Build 150929 Rel.37860n ','hardware':'WR840N v2 00000000','lan':{'ip':'192.168.0.1','mac':'12-34-56-78-90-AB','mask':'255.255.255.0'},'mode_3g':False,'rx_bytes':3330853277,'rx_packets':8909427,'tx_bytes':550131568,'tx_packets':2593047,'uptime':99788,'wan':[{'dns':'1.2.3.0 , 1.2.3.1','gateway':'1.2.10.1','ip':'1.2.10.15','link_status':<WANLinkStatus.LINK_UP:4>,'mac':'12-34-56-78-90-AC','mask':'255.255.224.0','type':<WANType.DYNAMIC:1>}],'wireless':True,'wlan':{'channel_auto':6,'channel_manual':None,'channel_width':<WLANChannelWidth.AUTO:2>,'enabled':True,'ip':'192.168.0.1','mac':'12-34-56-78-90-AB','name':'TP-LINK_90AB','type':<WLANType.BGN_MIXED:6>,'wds_status':<WDSStatus.DISABLE:6>}}>>>pp.pprint(stats.dict()){'clients':[{'mac':'81-69-01-93-77-49','rx':341,'tx':217},{'mac':'C4-49-F0-84-00-52','rx':179,'tx':90}],'mac_filter_enabled':False,'mac_filter_whitelist':False,'ssid':['TP-LINK_90AB']}>>>pp.pprint(leases.dict()){'leases':[{'expire':6701,'ip':'192.168.0.110','mac':'65-CD-44-29-F2-0A','name':'DESKTOP-ABCDEFG'},{'expire':6973,'ip':'192.168.0.100','mac':'81-69-01-93-77-49','name':'OnePlus-9R'},{'expire':7186,'ip':'192.168.0.102','mac':'C4-49-F0-84-00-52','name':'arch'}]}
Package: tpljson
tpljsonA Templating Json package that implements the officialPythonjsoninterface.tpljsonworks by referencing placeholder template strings into your json file... like{$.mykey}These template values will be filled with other values that appear in the document.Featurestemplate json, referencing other fields in the current document via{$.key}commentscolorized and context on errorsbuilt-injsonmodule compatible, all json errors raisejson.JSONDecodeErrorandTypeError-
identical to the built-injsonmodule.Installationpip3install tpljsonUsage Example 1Definecontact.jsonas// this is another comment, multi-line comments are not supported.{"first_name":"Peter",// first_name - comments can appear at the end of a line"last_name":"Henderson","phone":"3338675309","email":"{$.first_name}.{$.last_name}@example.org",// construct email address from"contact":"{$.first_name} {$.last_name}\nCell: {$.phone}\nEmail: {$.email}"}Loadcontact.jsonusingtpljsonimporttpljsonasjsond=json.load(open('contact.json'))print(json.dumps(d,indent=4))Output{"first_name":"Peter","last_name":"Henderson","phone":"3338675309","email":"Peter.Henderson@example.org","contact":"Peter Henderson\nCell: 3338675309\nEmail: Peter.Henderson@example.org"}Usage Example 2A moreDefinepermissions.jsonas:{"user_id":"u381815","cluster":"hive-cluster","groups":["finance","accounting"],"description":"Permissions for user Nicholas","create_role":[{"role":"{$.user_id}"}],"grant_role":[{"group":"{$.user_id}","role":"{$.user_id}"}],"grant_privilege":[{"privilege":"select","object":"database","patterns":"{$.groups}","role":"{$.user_id}"},{"privilege":"all","object":"database","name":"{$.user_id}","role":"{$.user_id}"},{"privilege":"all","object":"uri","name":"'hdfs://{$.cluster}/user/{$.user_id}'","role":"{$.user_id}"}],"create_database":[{"name":"{$.user_id}","owner":"{$.user_id}"}],"sql":["SHOW GRANT ROLE {$.user_id}","SHOW ROLE GRANT GROUP {$.user_id}"]}Loadpermissions.jsonusingtpljsonimporttpljsonasjsond=json.load(open('permissions.json'))print(json.dumps(d,indent=4))Output:{"user_id":"u381815","cluster":"hive-cluster","groups":["finance","accounting"],"description":"Permissions for user Nicholas","create_role":[{"role":"u381815"}],"grant_role":[{"group":"u381815","role":"u381815"}],"grant_privilege":[{"privilege":"select","object":"database","patterns":["finance","accounting"],"role":"u381815"},{"privilege":"all","object":"database","name":"u381815","role":"u381815"},{"privilege":"all","object":"uri","name":"'hdfs://hive-cluster/user/u381815'","role":"u381815"}],"create_database":[{"name":"u381815","owner":"u381815"}],"sql":["SHOW GRANT ROLE u381815","SHOW ROLE GRANT GROUP u381815"]}ImplementationNote that the order of values matters in thejson, if one value depends on another.commentjsonis used internally to render comments, can be disabled viacomments=falseinloadandloads.errors are colorized by default viacolorama
Package: tplot
tplottplotis a Python package for creating text-based graphs. Useful for visualizing data to the terminal or log files.FeaturesScatter plots, line plots, horizontal/vertical bar plots, and image plotsSupports numerical and categorical dataLegendUnicode characters (with automatic ascii fallback)ColorsFew dependenciesFast and lightweightDoesn't take over your terminal (only prints strings)Installationtplotis available onPyPi:pipinstalltplotDocumentationDocumentation is available onreadthedocs.ExamplesBasic usageimporttplotfig=tplot.Figure()fig.scatter([0,1,2,3,4,5,6,7,8,9,10])fig.show()A more advanced exampleimporttplotimportnumpyasnpx=np.linspace(start=0,stop=np.pi*3,num=80)fig=tplot.Figure(xlabel="Phase",ylabel="Amplitude",title="Trigonometric functions",legendloc="bottomleft",width=60,height=15,)fig.line(x,y=np.sin(x),color="red",label="sin(x)")fig.line(x,y=np.cos(x),color="blue",label="cos(x)")fig.show()See more examples in thedocumentation.ContributingContributions are welcome. Bug fixes, feature suggestions, documentation improvements etc. can be contributed viaissuesand/orpull requests.
Package: tpm2-pytss
tpm2-pytssTPM2 TSS Python bindings for Enhanced System API (ESYS), Feature API (FAPI), Marshaling (MU), TCTI
Loader (TCTILdr), TCTIs, policy, and RC Decoding (rcdecode) libraries. It allows for custom TCTIs
written in Python as well. It also contains utility methods for wrapping keys to TPM 2.0 data
structures for importation into the TPM, unwrapping keys and exporting them from the TPM, TPM-less
makecredential command and name calculations, TSS2 PEM Key format support, importing Keys from PEM,
DER and SSH formats, conversion from tpm2-tools based command line strings and loading tpm2-tools
context files.DocumentationDocumentation for the latest release is hosted athttps://tpm2-pytss.readthedocs.io/en/latest/index.htmlInstallingTo install the master branch:python3-mpipinstallgit+https://github.com/tpm2-software/tpm2-pytss.gitTo install latest stable from PyPi:python3-mpipinstalltpm2-pytssNOTE: You may need option--useror sitewide permissions through something likesudo.This is known to work with versions 2.4.0 of tpm2-tss or higher.HelpAsk a question via anissueSend an email to the tpm2 list:https://lists.linuxfoundation.org/mailman/listinfo/tpm2File a Security Bug by following the instructions indocs/SECURITY.mdLicensetpm2-pytss is distributed under theBSD 2 Clause License.
Package: tpmayalib
Maya implementation for tpDccLib and tpQtLib packages.Also, this module contains a lot of utilities functions and classes to work with Maya Python APIs (cmds and OpenMaya)InstallationManual1. Clone/Download tpMayaLib anywhere in your PC (If you download the repo, you will need to extract
the contents of the .zip file).CopytpMayaLibfolder located insidesourcefolder in a path added tosys.pathAutomaticAutomatic installation for tpMayaLib is not finished yet.UsageInitialization Code1. If tpDccLib or tpQtLib packages are being used, tpMayaLib will be automatic imported during the initialization
of those packages.
2. If tpDccLib and tpQtLib are not found in your sys.path, you will need to initialize manually tpMayaLib.importtpMayaLibtpMayaLib.init()ReloadingFor development purposes, you can enable reloading system, so
you can reload tpMayaLib sources without the necessity of restarting
your Python session. Useful when working with DCCs.If tpDccLib and tpQtLib packages are being used, tpMayaLib will be automatic reload by tpDccLib and tpQtLib reload systems.If tpDccLib and tpQtLib are not found, you will need to reload tpMayaLib manually.importtpMayaLibreload(tpMayaLib)tpMayaLib.init(True)Enabling debug logBy default, tpMayaLib logger only logs warning messages. To enable all log messages
you can set TPMAYALIB_DEV environment variables to ‘True’importosos.environ['TPMAYALIB_DEV']='True'importtpMayaLibtpMayaLib.init()
Package: tpmmld
tpmmldtpmmldis theThinkPad Mute-Mic Light Daemon. If you have a certain
ThinkPad where you have a mute-mic indicator led on theF4button, this
daemon will control it, based on the current PulseAudio mute state of all
input sources (So all input sources mute, all input sources unmute).You can directlymute,unmuteortogglethe mute states of all sources
by using the-m,-uor-targuments. This mode is essentially a one-shot
where the process exits after doing the requested state change.When no options are specified (run as daemon in foreground) or when passing-dto run in background (daemonized),tpmmldwill monitor theThinkPad
Extra Buttonsinput device to keypresses (specifically, key event248, themicmutebutton).PrerequisitesTo read input from the micmute key, you need to be a member of theinputgroup, or specifically, whichever group owns the device files under the/dev/inputdirectory.To enable/disable the led, thesudoandteecommands are used.
You have to configuresudoin such a way that you can runecho 1 | sudo tee /sys/class/leds/platform\:\:micmute/brightnessnon-interactively
(i.e., without a password prompt).Installtpmmldis published inpypi, so you can
simply install usingpip:pipinstalltpmmldHowever, If it's not available there for whatever reason, or if you would like
to run it from source, you can also get it going yourself, directly from the
git repository:gitclonehttps://github.com/rubin55/tpmmldcdtpmmld
python-mvenv.venv
pipinstal-rrequirements.txt
bin/tpmmld.sh-s# shows available input source devices, with index numberbin/tpmmld.sh-t# toggle mute state on/offbin/tpmmld.sh-m# explicitly mute all sourcesbin/tpmmld.sh-u# explicitly unmute all sourcesbin/tpmmld.sh# run tpmmld in foregroundbin/tpmmld.sh-d# run tpmmld in backgroundUsage$ tpmmld -h
usage: tpmmld [-h] [-d] [-s] [-t] [-m] [-u] [-l {INFO,ERROR,WARNING,DEBUG}]
              [-v]

options:
  -h, --help            show this help message and exit
  -d, --daemonize       run in background (daemonized mode). If not specified,
                        the process will run in the foreground output to stdin
  -s, --sources         show list of sources, with index numbers
  -t, --toggle          toggle mute/unmute of all sources directly and exit
  -m, --mute            mute all sources directly and exit
  -u, --unmute          unmute all sources directly and exit
  -l {INFO,ERROR,WARNING,DEBUG}, --loglevel {INFO,ERROR,WARNING,DEBUG}
                        specify the loglevel to use, defaults to 'INFO'
  -v, --version         show program's version number and exitBuildSince this is a python package, you don't really need to build, but if you
would like to build the pip packages, you can do that as follows:python-mbuildYou will then find the pip package binaries indist/. You can install
them usingpip.DeployI usetwineto publishtpmmldon pypi. To
deploy, make sure you first run the build stage. After that you can deploy the
artifacts in thedistdirectory as follows:twineuploaddist/*Note that you need valid for this project pypi credentials to do so .
Package: tpmstream
tpmstreamA tool to help you understand TPM commands and responses. You can either use theconvertcommand if you want to decode TPM commands/responses or theexamplecommand to find examples.Installpip install .For development, it is recommended to use a virtual environment and install with the--editableswitch.Decode TPM Commands/Responses:Theconvertcommand reads binary (or pcapng) data from a file:❯tpmstreamconvertcreate_primary.binOr you can read data from stdin. Just pass-:❯printf"80020000007700000131400000010000003d0200000000145536c0a5ba338e58abfe729f76ccca61ebaf821f01002082fc712f21e4c7e47bbf84dfa0fb15ddfc7013eb61ed3eb2edaf0286e88ba20c000400000000001a0023000b0004007200000010001a000b00000003001000000000000000000000"|xxd-r-p|tpmstreamconvert-Find Examples for TPM Commands/Responses:You want to see an exemplary TPM command? Easy, try:❯tpmstreamexNV_WriteDon't worry, the tool helps you out if you do not know how to spell a given command:❯tpmstreamexNVDefine
UnknowncommandCode:NVDefine.

Didyoumean:tpmstreamexNV_DefineSpacePython APIMarshallingMarshalling functions convert a particular data stream (binary, pcapng, ...)
into a canonical format: a sequence ofMarshalEvents. These events can be
converted to a python representation of the respective datatype (e.g. aTPMS_SIG_SCHEME_ECDSAobject).fromtpmstream.common.eventimportevents_to_objfromtpmstream.io.binaryimportBinaryfromtpmstream.spec.commands.commandsimportCommandfromtpmstream.spec.structures.constantsimportTPM_SUevents=Binary.marshal(tpm_type=Command,buffer=b"\x80\x01\x00\x00\x00\x0c\x00\x00\x01\x44\x00\x00")command=events_to_obj(Command,events)print(command.parameters.startupType)# prints TPM_SU.CLEARLikewise, these python objects can be turned into a sequence of events, again.fromtpmstream.common.eventimportobj_to_events# ...events=obj_to_events(command)# Note that `events` is a generator. You can obtain a list by via `list(events)`UnmarshallingUnmarshalling functions convert a given set ofMarshalEventsinto a custom
format (binary, pretty print, ...).fromtpmstream.io.binaryimportBinaryfromtpmstream.io.prettyimportPrettyfromtpmstream.spec.commands.commandsimportCommandevents=Binary.marshal(tpm_type=Command,buffer=b"\x80\x01\x00\x00\x00\x0c\x00\x00\x01\x44\x00\x00")pretty=Pretty.unmarshal(events=events)forlineinpretty:print(line)Example flowMarshalling (e.g. binary to events) and unmarshalling (e.g. events to pretty
print) is decoupled. Events can be turnt into python objects (likeTPMS_SIG_SCHEME_ECDSA) and vice versa.+---------------------+                                                         +----------------------+
---[binary]--> | binary marshalling  | ---[events]---+-------------------------+---[events]--> | binary unmarshalling | ---[pretty print]-->
               +---------------------+               |                         |               +----------------------+
                                                     |    +---------------+    |
                                                     +--> | python object | ---+
                                                          +---------------+
Package: tpnameit
Python module that manages the nomenclature of your pipelines:Nomenclature is based on rules and tokens. Those can be setup in a per-project basis.DCC agnostic way, the library works in any DCC supported by tpDccLibDependenciestpPyUtils:https://github.com/tpoveda/tpPyUtilstpDccLib:https://github.com/tpoveda/tpDccLibtpQtLib:https://github.com/tpoveda/tpQtLibDepending on the DCC you are going to use you will need to download and install one of the following repositories:3ds Max:https://github.com/tpoveda/tpMaxLibMaya:https://github.com/tpoveda/tpMayaLibHoudini:Work in ProgressNuke:Work in ProgressBlender:Work in ProgressInstallationManualClone/Download tpNameIt dependencies Python packages and follow instructions to install them.Clone/Download tpNameIt anywhere in your PC (If you download the repo, you will need to extract the contents of the .zip file).CopytpNameItfolder located insidesourcefolder in a path added tosys.pathAutomaticAutomatic installation for tpNameIt is not finished yet.UsageInitialization CodeIf you only want to use tpNameIt libraries functionalityimporttpPyUtilstpPyUtils.init()importtpDccLibtpDccLib.init()importtpQtLibtpQtLib.init()importtpNameIttpNameIt.init()If you want to launch tpNameIt UIimporttpPyUtilstpPyUtils.init()importtpDccLibtpDccLib.init()importtpQtLibtpQtLib.init()importtpNameIttpNameIt.run()
Package: tpng.py
tpng.pyDescriptionThe library has the ability to convertimagetostringforrich.TPNG- is a library for converting images into a colour-coded string. Mapping is implemented via therichlibrary.More information...Installationpip install --upgrade tpng.pyExamplesimporttpngfromrich.consoleimportConsolec=Console()t=tpng.TPNG("image.png")string=t.get_rich_string()c.print(string)AuthorRoman SlabickyVkontakteGitHub
Package: tpow
porvidesMinimal 1-wire protocols for USB9097.Basic rom search algorithm (use recursion).has dependencies and limitations100% pure python, requirespyserialto control UART.support external power mode only. parasite power mode is not supported.tested on Windows10 PC + USB9097 (1-wire adapter).Adapters/Sensors/DevicesUSB9097 (1-wire adater with Vcc supply, PCsensor.com ShenZhen/China)DS18B20, DS2438 (Dallas/Maxim)Humidity Sensor HIH-5030 + DS2438Z+ (TaaraLabs Estonia)UsageCheckexamples/folder which contains some tests.pip tpowwill install it underLib/site-packages/tpow.
If you can not findexamples/, download source package*.tar.gzand check it.Get a ROMID (one 1-wire device on the bus)import tpow.usb9097

bus = tpow.usb9097.USB9097('COM3')
bus.cmd_reset()        # 0xE3, 0xC1
bus.dat_write([0x33])  # read-rom
ans = bus.dat_read(8) # little-endian (family + SN[6] + CRC)
print(['%02X'%ord(a) for a in reversed(ans)]) # big-endianGet all ROMID’s (search all ROM’s on the bus)import tpow.usb9097

bus = tpow.usb9097.USB9097('COM3')
xx = tpow.usb9097.search_roms(bus)
for x in xx:
    print(x)Get temperature / ds18b20import tpow.usb9097
import tpow.device
import tpow.sensor

bus = tpow.usb9097.USB9097('COM3')

# do temperature conversion and get scratch-pad
spad = tpow.device.ds18b20_skip_rom(bus)

# decode temperature
t = tpow.sensor.ds18b20_temp(spad)

print("SPAD : " + " ".join(['%02X' % ord(a) for a in spad]))
print("%8.3f [degC]" % t)Todocheck temperature conversion completed status.
(currently, wait 1 sec for each temperature conversion)check operation finished status bit.check CRC.refine data type of parameters (bytes, string, list of single bytes…)LicenseCopyright (c) 2018 Kenich SHIRAKAWA
This is licensed under MIT license.
See Licence.txt for more information.Links1-wire adapter USB9097 (PCsensor)Humidity Senosr (TaaraLabs)
Package: tpp7
tpp7Un package python pour les TP de Physique de l'Université de Paris-Diderot, maintenant Université de Paris.Ce package regroupe 2 outils disctints linfitxy et OscilloInstallationCe paquet repose sur une installation python > 3.6Il a en particulier été testé à partir de (miniconda)[https://docs.conda.io/en/latest/miniconda.html]Il nécessite les paquets suivants :numpy, scipy, matplotlib, python-usbtmc, pandas, pyusbL'application d'utilisation de la librairie Oscillo requière également l'installation depyqtqu'il est vraisemblablement préférable d'installer avec le gestionnaire natif de votre installation python (python-usbtmc n'est pas disponible via conda):conda update -c conda-forge numpy scipy matplotlib pandas pyusb pyqt
pip install --upgrade python-usbtmc tpp7linfitxy n'est plus distribué via ce paquet...(https://pypi.org/project/fitutils/)[https://pypi.org/project/fitutils/](https://github.com/M-A-Verdier/Fitutils)[https://github.com/M-A-Verdier/Fitutils]Il est cependant installé comme une dépendance.OscilloOscillo est destiné à récupérer les données des oscilloscopes utilisés dans les salles de TP.
Il permet également de faire une copie d'écran.
Il est constitué d'une librairie permet d'utiliser facilement les fonctions de base par exemple dans un environnement comme Jupyter.
Il donne également accès à une application (en QT5) qui permet également facilement d'importer les données et de faire une copie d'écran.Les oscilloscopes pris en charge pour le moment sont :TektronixTDS"1001B": (0x0699, 0x0362),"1001C-EDU": (0x0699, 0x03aa),"2004B": (0x0699, 0x0365),"2024B": (0x0699, 0x036a), # Non testéTBS"1064": (0x0699, 0x03b3),"1052B-EDU": {0x0699, 0x0368},KeyseightDSO-X"1102A": (0x2a8d, 0x1787),Agilent__"DSO1024A": (0x0957, 0x0588),Il est sans doute assez facile d'utiliser d'autres modèles d'oscilloscopes.InstallaionAuteur : Olivier CardosoEmail :Olivier.Cardoso@u-paris.fr
Package: tpp-guille-santi-commons
commonsBuild guideMake sure you have upgraded version of pipWindowspy -m pip install --upgrade pipLinux/MAC OSpython3 -m pip install --upgrade pipMake sure your build tool is up to dateWindowspy -m pip install --upgrade buildLinux/MAC OSpython3 -m pip install --upgrade buildCreate the buildWindowspy -m buildLinux/MAC OSpython3 -m buildUploading the distribution archivesWindowspy -m pip install --upgrade twineLinux/MAC OSpython3 -m pip install --upgrade twineOnce installed, run Twine to upload all of the archives under dist:Windowspy -m twine upload --repository testpypi dist/*Linux/MAC OSpython3 -m twine upload --repository testpypi dist/*Referenceshttps://packaging.python.org/tutorials/packaging-projects/
Package: tppyutils
Collection of Python modules to make your life easier when working with Python, specially for DCC tool development.InstallationManualClone/Download tpPyUtils anywhere in your PC (If you download the repo, you will need to extract the contents of the .zip file).CopytpPyUtilsfolder located insidesourcefolder in a path added tosys.pathAutomaticAutomatic installation for tpPyUtils is not finished yet.UsageInitialization CodetpPyUtils must be initialized before being used.importtpPyUtilstpPyUtils.init()ReloadingFor development purposes, you can enable reloading system, so  you can reload tpPyUtils sources without the necessity of restarting your Python session. Useful when working with DCCsimporttpPyUtilsreload(tpPyUtils)tpPyUtils.init(True)Enabling debug logBy default, tpPyUtils logger only logs warning messages. To enable all log messages you can set TPPYUTILS_DEV environment variables to ‘True’importosos.environ['TPPYUTILS_DEV']='True'importtpPyUtilstpPyUtils.init()Deploying new version (only for devs)Update versionMake suresetup.cfgfile version field is updatedInstalling librariesMake sure that you have installed the following packages:wheelpip install wheeltwinepip install twinesetuptoolspip install setuptoolsMake sure to update setuptools to latest available version:pip install setuptools --upgradeGenerate wheelpython setup.py sdist bdist_wheelValidate wheel package generationtwine check dist/*Upload package to PyPitwine upload dist/*