Saravanan666/pypi-org huggingface dataset:
Package: tee4py
Tee4Py is a python class which replicates the behaviour of the 'tee' Unix command. The tee command enables output to be written to the standard output (stdout) while simultaneously written to a file.InstallationTee4Py is avalible as a pip package through pypi and as such can be installed with:pipinstalltee4pyTee4Py only uses modules from the standard python library, meaning it has no dependencies.UsageThe Tee4Py package has been desgined to work in the same way that redirect_stdout and redirect_stderr are (from the contextlib module). For example, to print the output to both the standard output and to a file you will need to do the followingfromtee4pyimportteewithopen('output.log','w')asf:withtee(f,True):print('This will be output to terminal and output.log')print('This will be output to terminal only\n')The second argument to the tee class specifies what to do with the standard error (stderr). The default value is True, meaning that stderr will also be piped to output.log. Changing this to False means that stderr will not be piped to the file, and will only be displayed in the terminal.importsysfromtee4pyimportteewithopen('output.log','w')asf:withtee(f,False):print('This will be output to terminal and output.log')print('This will not go to output.log',file=sys.stderr)print('This will be output to terminal only\n')This second argument can also be a file handle to output stderr to its own specific fileimportsysfromtee4pyimportteewithopen('output.log','w')asf,open('output.err','w')asg:withtee(f,g):print('This will be output to stdout and output.log')print('This will be output to stderr and output.err',file=sys.stderr)print('This will be output to terminal only\n')To ensure that tee4py can correctly apply tee to the output of subprocesses, the following approach must be followedimportsubprocessfromtee4pyimporttee,get_stdout,get_stderr,subprocess_handlewithopen('output_subprocess.log','w')asf:withtee(f):print('Doing something in python before subprocess')sp=subprocess.Popen('echo Output from subprocess',shell=True,stdout=get_stdout(),stderr=get_stderr())subprocess_handle(sp)RC=sp.wait()print('Doing something after subprocess')Notice that stdout and stderr in subprocess.Popen are set using the get_stdout and get_stderr functions, while the subprocess is passed to subprocess_handle to ensure that the output is written to the file as well as stdout.The tee class can also be used in the following wayfromtee4pyimportteewithopen('output.log','w')asf:tee_object=tee(f)tee_object.write('This will be output to terminal and output.log')tee_object.close()print('This will be output to terminal only\n')CitationIf you use tee4py in your work, please reference it with the following:@Misc{tee4py,
author = "Rhydian lewis",
title = "tee4py",
howpublished = "\url{https://gitlab.com/RhydianL/tee4py}",
year = "2023"}
<\pre>
Package: tee-cli
tee-cliThis tool is a python implementation of atee.It captures stderr+stdout from acommandand will save it to a file and will print them to a console.It propagatescommandexit code correctly.tee-cli--help
usage:tee-cli[-h][-oOUTPUT]commandpositionalarguments:commandCommandtorun

options:-h,--helpshowthishelpmessageandexit-oOUTPUTPathtooutputlogfilewithstdout+stderrcontent
Package: teed
teedTelco engineering data libraryProbe and transform raw telco files into CSV.A simple BulkCm file parsing(env)joaomg@mypc:~/teed$python-mteedbulkcmparsedata/bulkcm.xmldata
Parsingdata/bulkcm.xml
Createddata/ManagedElement.csv
Createddata/ManagementNode.csv
Createddata/SubNetwork.csv
Time:0:00:00.000856(env)joaomg@mypc:~/teed$Install from sourcegitclonehttps://github.com/joaomg/teed.gitcdteed
pipinstall-e.Probe a filepython-mteedbulkcmprobedata/bulkcm_with_vsdatacontainer.xmlParse a file output it's content to CSV filespython-mteedbulkcmparsedata/bulkcm_empty.xmldata
python-mteedbulkcmparsedata/bulkcm_with_header_footer.xmldata
python-mteedbulkcmparsedata/bulkcm_with_vsdatacontainer.xmldataUsageBeside command-line teed can be used as a library:fromteedimportbulkcm,meas## bulkcmstream=bulkcm.BulkCmParser.stream_to_csv("data")bulkcm.parse("data/bulkcm.xml","data",stream)## measmeas.parse("data/mdc*xml","data")The bulkcm parser extracts content from a single file.While the meas parser, in a single run, can process any number of XML files using wildcards and directory recursion.The bulkcm and meas parsers also differ on CSV file creation:bulkcm deletes previously existing CSV filesmeas appends to existing CSV filesTake notice of these differences when calling the parsers from shell.Or using them in data pipelines.DocumentationProbe, split and extract configuration content frombulkcmXML files.Extract performance data frommeasXML files.How tobuildteed.LicenseThe teed library is licensed under:GNU Affero General Public License v3.0On ETSI references and usage rightshttps://www.etsi.org/intellectual-property-rightshttps://www.etsi.org/images/files/IPR/etsi-ipr-policy.pdfBackgroundThe teed library aims to be a comprehensive parser toolkit for telecommunications engineering data.It's inspired byfrictionless-py. In fact, a production ready data pipeline can naturally glue together teed and frictionless-py.The former extracting content from telco raw files to CSV.And the later validating, cleaning and transforming data into a query ready system (parquet, RDBMS).+---------------+
|Telco raw files|
|               |    
|  .xml  .asn1  |
+---------------+
        |
        |   teed (extract)
        V
+---------------+
| Tabular files |
|               |    
|      .csv     |
+---------------+
        |
        |   frictionless-py (clean, validate, transform, publish)
        V
+---------------+
|    Dataset    |
|    Parquet    |
|     RDBMs     |
+---------------+Much alike to the work done by PUDL, with Frictionless Data itself, inFrictionless Public Utility Data - A Pilot Study.Take a look atPUDLcode.
Package: teedoc
teedoc中文| EnglishOfficial site:teedoc.neucrack.comorteedoc.github.ioMore demo: seehereorheredocumentation generate tool from markdown and jupyter notebook to htmlteedoccan be used in the following scenarios:Build a document website, and it is best to support multiple documents and custom pagesOrganizations' or companies' docs spread in different domains, wish to combine them to one site(domain)Build aWiKiwebsiteBuild personal or corporate knowledge baseBuild personal or corporate websiteFeaturesEasy to use, cross platform, only needPython3Easy to deploy, only copy generated staitc HTML files to your server or other hostEasy to write, markdown supportJupyter notebook supportMultiple docs supportPlugin supportMultiple theme support(support by plugin)Control the style accurate to the page through css (implemented by customizing the id and class of each page)Multi-level directory supportMulti-language support (manual translation) (Internationalization/i18n)Multilingual support (translation plugin)Multiple version supportSearch supportSEO friendlyReal-time preview file changesParallel build, faster build speedBlog supportJinja2 HTML layout template supportGet StartedVisit official site:teedoc.github.ioorteedoc.neucrack.comCreate your website on github pages in minutesSeetemplate repoQuik startInstall python3OnWindowsormacOS, download frompython.orgOnLinux,Ubuntufor example:sudo apt install python3 python3-pipInstall teedocThis command willinstall teedoc programpip3 install -U teedocInitialize documentmkdir my_site
cd my_site
teedoc initorteedoc -d my_site initselect minimal template in promotInstall pluginsThis command willinstall pluginsused by doc(set insite_config.json)cd my_site
teedoc installbuild or serveteedoc servethen visithttp://127.0.0.1:2333in browserIf you only want to generate htmls:teedoc build
Package: teedoc-plugin-assets
teedoc-plugin-assetsAdd css and js items(/files) to pages or other custom items to pagessite_config.json:{"route":{"assets":{"/static/":"static",},},"plugins":{"teedoc-plugin-assets":{"from":"pypi","config":{"header_items":["/static/css/custom.css","<meta name=\"plugin-assets\" content=\"example meta item\">"],"footer_items":["/static/css/custom.js"],"env":{"main_color":"#000000"}}},}}custom.css:a{color:${main_color}}
Package: teedoc-plugin-comments-gitalk
teedoc-plugin-comments-gitalkgitalkcomment support forteedocCreateapplicationsfirst, callback url set page that have gitalk(default doc and blog pages),https://teedoc.github.io/get_started/zh/for example.config example:"teedoc-plugin-comments-gitalk":{"from":"pypi","config":{"classes":["type_doc","type_blog"],"env":{"clientID":"*****","clientSecret":"********","repo":"teedoc.github.io","owner":"teedoc","admin":["Neutree"]}}}admin can directly comment, it will automatically create issue
and you can create issue manually for one page, and then set issue number in markdown metadata:---
title: *****gitalk-number: 2---or create label for issue, needGitalkand one other lable likeDemo, likeofficial issue, and set id for page---
title: *****id: Demo---or---
title: *****gitalk-id: Demo---
Package: teedoc-plugin-google-translate
teedoc-plugin-google-translateGoogle translate support forteedocDevelopThere is a config nameddomainfor this plugin, by default it is/, means use translate resources in local.
But somtime it will be out of date, you can change it tohttps://translate.google.cn/orhttps://translate.google.com/to use google translate online.And mannually update the files, but it is pretty hard, so we default tohttps://translate.google.cn/since update at 2023.8.16.
Package: te-eg-usage
te-eg-usageTelecom Egypt Usage - Selenium simple scraper to get your data usage infoGet your Telecom Egypt account data usage info frommy.te.egwebsite directly fromPython or through the Command-Line Interface entry point. Get what you ownand know why your data is being stolen.InstallationYou will need a webdriver for selenium to run te-eg-usageReadthisfor instructions on how to install
one.Using PyPipip install te-eg-usageManual installationgit clone https://github.com/FaresAhmedb/te-eg-usage.gitcd te-eg-usage && python setup.py install --userUsageCommand-Line InterfaceFirst we will have to set enviroment variables for the entry point to access and use to log-inOS X & Linux:$exportWE_MOBILE_NUMBER=XXXXXXXXXX
$exportWE_PASSWORD=XXXXXXXXWindows:>setWE_MOBILE_NUMBER=XXXXXXXXXX>setWE_PASSWORD=XXXXXXXXNow you can use it!$te-eg-usage{"data_timestamp": 1622923340.4587903,"consumed": 39.1,"remaining": 100.9,"start_date": "2021-06-02","renewal_date": "2021-07-02","remaining_days": 27,"renewal_cost": 120.0}CLI Arguments$ # To use a specific webdriver. firefox-headless is the default
$ te-eg-usage --browser BROWSERNAME
$ # Avillable webdrivers are firefox, firefox-headless, chrome, chrome-headless, edge
$
$ # For debug mode
$ te-eg-usage --debug
$
$ # To get a dict Python object instead of JSON
$ te-eg-usage
$
$ # Everything demo
$ te-eg-usage --debug --dict --browser chromePytohn`This snippet will get you startedfromte_eg_usageimportTeEgUsageusage_data_scraper=TeEgUsage(mobile_number="XXXXXXXXXX",password="XXXXXXXX",browser_name="chrome",)usage_data=usage_data_scraper.run()# .run(data_type="json") for jsonprint("\n".join("{}\t{}".format(k,v)fork,vinusage_data.items()))# output:# data_timestamp  1622923340.4587903# consumed        40.0# remaining       100.0# start_date      YYYY-MM-DD# renewal_date    YYYY-MM-DD# remaining_days  DD# renewal_cost    120.0Release History1.0.0The ReleaseMetafares ahmedfaresahmed@zohomail.comDistributed under the GPLv3 license. SeeLICENSEfor more information.https://github.com/faresahmedb/te-eg-usageContributingFork it (https://github.com/faresahmedb/te-eg-usage/fork)Create your feature branch (git checkout -b feature/fooBar)Commit your changes (git commit -am 'Add some fooBar')Push to the branch (git push origin feature/fooBar)Create a new Pull Request
Package: teelaunch
Python Teelaunch Helper Library----------------------------DESCRIPTIONThe Teelaunch REST SDK simplifies the process of makes calls to the Teelaunch REST.The Teelaunch REST API lets to you initiate outgoing calls, list previous calls,and much more.  See https://github.com/teelaunch/teelaunch-python for more information.LICENSE The Teelaunch Python Helper Library is distributed under the MITLicense
Package: teemup
teemupIf Meetup didn't become a walled garden, the world wouldn't need TeemupPurpose and scopeThis library takes HTML source of a meetup group page on Meetup and returns a list of their upcoming events.Usage>>>importurllib.request>>>fromteemupimportparse>>>withurllib.request.urlopen('https://www.meetup.com/reactgirls/')asf:...html=f.read()...>>>events=parse(html)>>>sorted(events[0].keys())['description','ends_at','starts_at','title','url','venue']>>>sorted(events[0]['venue'])['address','city','country','name','state']The example above istestedand thus doesn't contain any variable data, but should be enough to give you an idea.If something breaksIf the website changes, update the fixture:curl https://www.meetup.com/reactgirls/ > test_fixtures/response_content.htmlThen runpoetry run pytest.
Changeteemup.pyand add unit tests totest_teemup.pyas needed.
Then cut a new release:Make sure the tests really pass:poetry run pytestFormat the code:poetry run black .Raise the version number inpyproject.tomlCommit the changes:git commit -am "release vX.Y.Z"Create a version tag:git tag vX.Y.ZPush the tag:git push --tagsPublish to PyPI:poetry publish --buildNote:If there are no upcoming events, choose a different group page for testing.
Do not remove live testing from the repository!
The whole purpose of the library is to be up-to-date with the current website.
It must be monitored every day and fixed as soon as it breaks.WhyMeetup used to be a nice and friendly platform where to host your events.
It used to have an iCalendar export, RSS export, Atom export.Such exports are useful if one wants to follow certain meetup in their own calendar software, or if one wants to read the event feed by a program and automatically link to upcoming events from a website – effectively sending more people to the events and more potential users to Meetup.In March 2023 they've put these exports behind login, basically rendering them useless.
You can download the files manually, but automatic fetching for future events is impossible.
They do have an API (with horrendous auth flow), but that API is reserved to paying users only.After a long conversation with their support (June 2023), they confirmed the login is intentional, but they couldn't explain why they did such product decision and how it benefits their users.
From that point on, I consider Meetup to be a hostile walled garden, which contributes to harming the free and open internet.All my integrations broke down, andnot only mine.I figured out they leftJSON-DLmeta data on the page.
Such meta data is good for search engines and other tooling and can be read byextruct.
This allowed me to fix everything for a while, but in August 2023, the JSON-DL has also disappeared from the website.All out war then!
I moved the code to this separate library so it's easier to develop, re-use, contribute to, and monitor.LicenseMIT
Package: teena
Teena aims to be a collection of ports of UNIX and Linux syscalls to
pure Python, with an emphasis on performance and correctness. Windows
support is not a primary concern—I’m initially targeting only
POSIX-compliant operating systems. The library usesTornadoto do efficient asynchronous
I/O.The first version of this library will contain implementations ofteeandsplicewhich operate on files, sockets, and file
descriptors. There’s also aCaptureclass which behaves likeStringIO, but it has afileno()and so can be used where a real
file descriptor is needed.ExampleI’ll demonstrate how to capture the result of an HTTP request, whilst
efficiently streaming the response tostderr.Do the necessary imports:>>> from contextlib import closing
>>> import teena
>>> import os
>>> import sys
>>> import urllib2Create ateena.Capture()object to capture the output:>>> capture = teena.Capture()Open a connection usingurllib2.urlopen(). This connection object
has an associated file descriptor, so you can pass it directly intotee():>>> with closing(urllib2.urlopen('http://whatthecommit.com/index.txt')) as conn:
...     teena.tee(conn, (sys.stderr, capture.input))
This really should not take 19 minutes to build.
>>> print repr(capture.getvalue())
'This really should not take 19 minutes to build.\n'Installationpip install teenaLicenseCopyright (C) 2012 Zachary VoasePermission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: teensytoany
Python TeensyToAnyA pythonic way to access the teensytoany boardDocumentation:https://python-teensytoany.readthedocs.io.See:https://github.com/ramonaoptics/teensy-to-anyFeaturesTODOCreditsThis package was created withCookiecutterand thehmaarrfk/cookiecutter-pypackageproject template.History0.2.0 (2023-11-07)Add atimeoutproperty to simplify modifying the command timeout.0.1.0 (2023-09-29)Provide access the newmcucommand that reveals the microcontroller used at
the time of firmware programming.Provide an internal method that can be used by developers to update to the
latest firmware.0.0.34 (2023-08-26)Small fixup in how reading the Teensy's registers is done to ensure better
forward compatibility.0.0.33 (2023-08-26)The following features require teensy-to-any version 0.0.23 or greaterAdd support forgpio_digital_pulse.Add support foranalog_pulse.Add support for newvalueparameter forgpio_pin_mode.Add support to read the data returned fromspi_transfer_bulk.0.0.32 (2023-08-30)Address bugs in reading the values from Teensy's registers.0.0.31 (2023-08-21)Add the ability to read and write to the teensy's registers.0.0.30 (2023-04-03)Increase default timeout to 0.2 seconds from 0.1. This helps receive error
messages from missed I2C communications.Return an error if no response is returned from a standard command indicating
a timeout.0.0.29 (2023-03-06)Try to avoid racy conditions in version readingFlush buffers upon startup to help with crash recovery.0.0.28 (2023-03-04)Make the error message when no device is found more human friendly.0.0.27 (2022-10-16)Use packaging instead of distutils for version identification0.0.26 (2021-09-13)added functionspi_read_byteenabling the user to read SPI register.0.0.25 (2021-07-14)added functionanalog_readenabling the user to read analog signals.0.0.24 (2021-06-03)addedi2c_read_payload andi2c_write_payload functionswhich allows users to read and write a contiguous payload of bytes0.0.23 (2021-02-13)Ensure compatibility with pyserial 3.XPower astart_poweroffparameter toTeensyPowerto start the device
in the on state.Added the ability to close and open the device without deleting the python
object.0.0.22 (2020-06-18)Added the ability to control a power switch that is connected to the
nominally on port.0.0.20 (2019-12-14)Added capabilities for SPI and Analog functions0.0.16 (2019-11-30)TeensyPowerdestructor will not raise an error when the device had failed
to open.0.0.15 (2019-11-29)TeensyPowerdevices will automatically poweroff the output when
closed.0.0.14 (2019-11-29)Added the specializedTeensyPowerdriver.0.0.13 (2019-11-20)Added a few more serial numbers to theteensytoany.known_devices0.0.1 (2019-11-07)First release on PyPI.
Package: tee-subprocess
tee-subprocessA subprocess replacement with tee support for both synchronous and asynchronous contexts.Supports Python 3.8+.ExampleJust import therunfunction and use it as you would usesubprocess.run.fromtee_subprocessimportrunprocess=run(["python","--version"],tee=True,text=True,capture_output=True)# ==> Python 3.11.2print(process.stdout)# ==> Python 3.11.2Changingstdoutandstderrchanges the location to which theteeoccurs. You can supply any of the defined options insubprocessorasyncio.subprocess(STDOUT,DEVNULL, etc), as well as a writable text or binary file object; if providing a text file object, you must specifytext = True.AsyncInternally,tee_subprocessutilizesasyncioto concurrently output and capture the subprocess logs. If an event loop is already running,runwill return an awaitable coroutine. Otherwise, it will callasyncio.runfor you. Practically, this means you can just treatrunas a coroutine if you're in an async content; if you're not, just call it synchronously.asyncdefmain():process=awaitrun(["python","--version"],tee=True,text=True,capture_output=True)# ==> Python 3.11.2print(process.stdout)# ==> Python 3.11.2asyncio.run(main())Alternativessubprocess-tee, the motivation for this library, has the same objective but fails to accommodate asynchronous applications and non-shell invocations. This library supports asynchronous contexts as well as direct, non-shell, program execution ("list-style" vs. "shell-style").LicenseMIT License
Copyright (c) 2023 Elias Gabriel
Package: teetime
AboutAdding tee like functionally tosubprocess.Popen.Installation$python-mpipinstallteetimeDocumentationDocumentation is availablevia GitHub.Basic UsageCommon usage is:importsysimportteetimewithopen('log.txt','wb')asf:process=teetime.popen_call(['python','test.py'],stdout=(sys.stdout.buffered,f),stderr=(sys.stderr.buffered,f),)process.wait()Note:popen_callblocks until IO is complete. If you have no IO,stdout=(), then it will not block. This is why you still needprocess.wait().TestingTo run all tests runnox. No venv is needed; nox makes all of them for us.$python-mpipinstall--usernox$gitclonehttps://peilonrayz.github.io/teetime/$cdteetimeteetime$noxLicenseTeeTime is available under the MIT license.
Package: teev
Teev is an open source asynchronous Python telegram bots module designed for humans mainly inspired byEveand made as a wrapper aroundaiogrammodule.
It allows setting up telegram bot using settings file, making its logic more readable
and easy to upgrade.Teev is SimplefromteevimportTeevapp=Teev()app.run()Bot is now alive and ready to process messages.
You need to provide proper telegram token in settings.py file.TOKEN=""COMMANDS=[["/start","Say Love"]]SCHEME={"/start":{"text":"I love Teev!"}}You can seeexamplesto find out more.Check out the teev Website(Not yet available)FeaturesFull support of all aiogram methods.Keyboard made in one instruction.Text logic made simple in scheme.Statuses logic to handle user answers.To DoNative Mongodb support.Buffer responses.Different message send types.Licenseteev is aStepan Starovoitovopen source project,
distributed under theBSD license.
Package: teeworlds-player-color-value-to-rgb
teeworlds_player_color_value_to_rgb吧teeworlds/ddnet中有关颜色的值转换到RGB(Convert the value of the color in teeworlds/ddnet to RGB)安装(install):pip install teeworlds_player_color_value_to_rgb使用/use:我使用了py自带的math和colorsys库(I used the math and colorsys libraries that come with py)value到rgb(value to rgb)from teeworlds_player_color_value_to_rgb import value_to_rgb
value = 8624384
rgb = value_to_rgb(value)
print(rgb)value到hsl(value to hsl)from teeworlds_player_color_value_to_rgb import value_to_hsl
value = 8624384
hsl = value_to_hsl(value)
print(hsl)有什么问题请新建Issues(If you have any questions, please create a new Issues)PS：Everything in English is generated using Google Translate(一切英文使用谷歌翻译生成)