Saravanan666/pypi-org huggingface dataset:
Package: trove-newspaper-harvester
trove-newspaper-harvesterView the full
documentationThe Trove Newspaper (& Gazette) Harvester makes it easy to download
large quantities of digitised articles fromTrove’s newspapers and
gazettes. Just give it a search
from the Trove web interface, and the harvester will save the metadata
of all the articles in a CSV (spreadsheet) file for further analysis.
You can also save the full text of every article, as well as copies of
the articles as JPG images, and even PDFs. While the web interface will
only show you the first 2,000 results matching your search, the
Newspaper Harvester will get everything.No installation required!If you want to use the harvester without installing anything, just head
over to theTrove Newspaper
Harvestersection in
my GLAM Workbench.Installationpipinstalltrove-newspaper-harvesterBefore you do any harvesting you need to get yourself aTrove API
key.Use as a libraryfromtrove_newspaper_harvester.coreimportprepare_query,HarvesterGenerate a set of query parameters usingprepare_query.my_query="https://trove.nla.gov.au/search/category/newspapers?keyword=wragge"my_api_key="mYSecREtkEy"my_query_params=prepare_query(query=my_query)Initialise theHarvesterwith your query parameters and api key.harvester=Harvester(query_params=my_query_params,key=my_api_key)Start the harvest!harvester.harvest()If the harvest fails just runHarvester.harvestagain.See the core module
documentationfor more options and examples.Use as a command-line toolThere are three basic commands:start– start a new harvestrestart– restart a stalled harvestreport– view harvest detailsStart a harvestTo start a new harvest you can just do:troveharvesterstart"[Trove query]"[TroveAPIkey]The Trove query can either be a url copied and pasted from a search in
theTrove web interface, or a
Trove API query url constructed using something like theTrove API
Console. Enclose the url in double
quotes.See the CLI module
documentationfor more details.Created byTim Sherrattfor theGLAM
Workbench. Support this project by
becoming aGitHub sponsor.
Package: trove-newspaper-images
trove-newspaper-imagesBackground and alternativesThere’s no reliable way of downloading an image of a Trove newspaper
article from the web interface. The image download option produces an
HTML page with embedded images, and the article is often sliced into
pieces to fit the page.This package includes tools to download articles as complete JPEG
images. If an article is printed across multiple newspaper pages,
multiple images will be downloaded – one for each page. It’s intended
for integration into other tools and processing workflows, or for people
who like working on the command line.If you just want to quickly download an article as an image without
installing anything, you canuse this web
appin the GLAM Workbench. To download images of all articles returned by a
search in Trove, you can also use theTrove Newspaper and Gazette
Harvester.See thedocumentationfor
more information.Installpip install trove-newspaper-imagesDownload articles as imagesUse as a libraryfromtrove_newspaper_images.articlesimportdownload_imagesimages=download_images('107024751')images['nla.news-article107024751-11565831.jpg']Use from the command lineJust calltrove_newspaper_images.downloadfrom the command line with
an article identifier. You can use the--output_dirparameter to
specify a directory for the downloaded images. For example:trove_newspaper_images.download107024751--output_dirimagesCreated byTim Sherratt(@wragge) for theGLAM
Workbench.
Package: trove-query-parser
Trove query parserConvert a query from the Trove web interface into a set of parameters that can be used with the Trove API.Installationpip install trove-query-parserHow to useConstruct a search in the Trove 'Newspapers and Gazettes' category.Copy the search url.Feed the url to theparse_queryfunctionThe second parameter toparse_queryis the Trove API version number. The default is2for backwards compatibility.fromtrove_query_parser.parserimportparse_queryparse_query('https://trove.nla.gov.au/search/category/newspapers?keyword=wragge&l-artType=newspapers&l-state=Queensland&l-category=Article&l-illustrationType=Cartoon',3){'q': 'wragge',
 'l-artType': 'newspapers',
 'l-state': ['Queensland'],
 'l-category': ['Article'],
 'l-illustrated': 'true',
 'l-illustrationType': ['Cartoon'],
 'category': 'newspaper'}See thedocumentationfor a more detailed example.LimitationsCurrently this only works with the 'Newspapers & Gazettes' category. Other categories may be added in time.Created byTim Sherratt(@wragge) for theGLAM Workbench.
Package: trovotutto
TrovotuttoTrovotutto(Italian for"I find everything) is a small naivepython 3.xsearch engine using k-grams. It was conceived as afindreplacement that would be tolerant to typos and that would take paths into consideration when searching.At the time of writing it supports recursively searching for files in a directory (according to various criteria) and in PGPgrams databases. Anyway, it is so small that can be easily extended to work on other data structures.InstallationTrovotuttois available through thePython Package Index (PyPI). Pip is already installed if you are using Python 3 >=3.4 downloaded frompython.org; if you're using a GNU/Linux distribution, you can find how to install it on thispage.
After setting up pip, you can installtrovotuttoby simply typing in your terminalpip3 install trovotuttoUsageTrovotutto install a command line utility with the same name that can be used to search and open search results. Application selection is handled throughxdg-open, so be sure to have it installed if you want to use it this way. The command line is not recommended for performance when searching in large directories because by defaults it rebuilds the database at each run.More proficient usage is obtained in IPython console for repeated usage, as the index is kept in memory:AboutThis program is licensed underGNU General Public License v3 or laterbyPellegrino Prevete. If you find this program useful, consider offering me abeer, a newcomputeror a part time remotejobto help me pay the bills.
Package: troyalab
InstallationThe easiest way to install troyalab is to download it fromPyPI. It's going to install the library itself and its prerequisites as well.$pipinstalltroyalabSecondly, you can install troyalab from its source code.$gitclonehttps://github.com/troyalab-fatih/BG96_RASPBERY_PI
$cdtroyalab
$pipinstall-e.ImportThen you will be able to import the library and use its functionalities.importtroyalab.RPi_ShieldYou can connect to the card by typing which port your Troyalab RPi Shield is connected to.troyalab=troyalab.RPi_Shield.BG96("/dev/ttyS0")Then you need to adjust the GPIO settings to get your card up.
And you are ready.troyalab.setupGPIO()troyalab.powerUp()troyalab.getHardwareInfo()Verison DescriptionsVersion0.1.6AuthorFatih FurkanDate13.08.2023Raspi4 - Model BPython3.9.2Verison DescriptionsGit and PyPI pulled to the same version.
Package: troykahat
TroykaHatPythonRaspberry Pi library for interaction with a Amperka TroykaHAT.Enabled I²C InterfaceIf you haven’t enabled I²C support in your Raspbian Linux yet, open the terminal and run the
following commands:Runsudo raspi-config.Use the down arrow to selectInterfacing Options.Arrow down toI²C.Select<Yes>when it asks you to enable I²C.Press<Ok>when it tells you that I²C is enabled.Use the right arrow to select the<Finish>button.Reboot your Raspberry Pi to make the I²C interface appear.After the reboot, log in and enter the following command:$ls/dev/i2c*The Pi should respond with:/dev/i2c-1This means that the I²C is on.Testing I²C Device ConnectionFor testing connection Troyka HAT board to Raspberry Pi, useful package I²C scanner.Install the I²C scanner.sudoapt-getinstalli2c-toolsTurn it on.sudoi2cdetect-y1In response, Raspberry Pi will show the addresses of all connected I²C devices. Check if the0x2Aaddress is present.Installation LibraryUsepipto install the library:pip3installtroykahatQuickstart exampleimporttroykahatfromtimeimportsleep# Constant for Pin 7 of Wiring PI IO.# Connect an LED to this pin.PIN_WP_LED=7# Constant for Pin 7 of Analog PI IO.# Connect an LED to this pin.PIN_AP_LED=7# Gives access to all the functions of GPIO, that are labeled "Wiring PI IO" on the HAT.# Check WiringPI library API (https://github.com/WiringPi/WiringPi-Python)# for the functions reference.wp=troykahat.wiringpi_io()# Gives access to all the functions of GPIO, that are labeled "Analog IO" on the HAT.# Check API.md for the functions reference.ap=troykahat.analog_io()# Configures the LED pin of Wiring PI IO to an output mode.wp.pinMode(PIN_WP_LED,wp.OUTPUT)# Configures the LED pin of Analog IO to an output mode.ap.pinMode(PIN_AP_LED,ap.OUTPUT)whileTrue:# Sets HIGH voltage level for the LED pin of Wiring PI IO.wp.digitalWrite(PIN_WP_LED,True)# Sets HIGH voltage level for the LED pin of Analog IO.ap.digitalWrite(PIN_AP_LED,True)# Wait 500 ms.sleep(0.5)# Sets HIGH voltage level for the LED pin of Wiring PI IO.wp.digitalWrite(PIN_WP_LED,False)# Sets HIGH voltage level for the LED pin of Analog IO.ap.digitalWrite(PIN_AP_LED,False)# Wait 500 ms.sleep(0.5)See fullAPI reference in API.md
Package: trpc-core
trpc-coreToolkit for implementing tRPC servers in pythontrpc-coreis currently in prototype stage. You are welcome to play with the code or drop feedback in issues, just don't expect anything usable or functional yet.Example tRPC API with Flask:importtrpcfromflaskimportFlask,jsonify,requestclassRouter(trpc.Router):@trpc.query(name="helloWorld")defhello_world(context)->str:return"Hello world"@trpc.mutation(name="sum")defsum(context,*,a:int,b:int)->int:returna+bserver=trpc.Server(Router)app=Flask(__name__)@app.route("/trpc/<path:path>",methods=["GET"])deftrpc_query(path):result=server.query(path)returnjsonify(result)@app.route("/trpc/<path:path>",methods=["POST"])deftrpc_mutation(path):result=server.mutation(path)returnjsonify(result)
Package: trphysx
Transformer PhysXTransformer PhysX is a Python packaged modeled after theHugging Face repositorydesigned for the use of transformers for modeling physical systems. Transformers have seen recent success in both natural language processing and vision fields but have yet to fully permute other machine learning areas. Originally proposed inTransformers for Modeling Physical Systems, this projects goal is to make these deep learning advances including self-attention and Koopman embeddings more accessible for the scientific machine learning community.Website|Documentation|Getting Started|DataAssociated PapersTransformers for Modeling Physical Systems [ArXiV]Colab Quick StartEmbedding ModelTransformerLorenzCylinder FlowGray-Scott--RosslerRoad MapThis is an on going project, hence many parts are not fully developed and will be added in the near future. If you have any particular questions or features you are interested in, please make a issue request so it can be prioritized!
Thanks for understanding.Tutorials/ blog post to help with introductionInfo on each example system in docsAdditional Unit Testing for Better Code CoverageParallel Data training for transformerUnsupervised pretraining physicsAdditional ResourcesHuggingface RepositoryTransformer illustrated blog postDeep learning Koopman dynamics blog postContactOpen an issue on the Github repository if you have any questions/concerns.CitationFind this useful or like this work? Cite us with:@article{geneva2020transformers,
    title={Transformers for Modeling Physical Systems},
    author={Geneva, Nicholas and Zabaras, Nicholas},
    journal={arXiv preprint arXiv:2010.03957},
    year={2020}}
Package: trprimes
Truncatable primesA Python library that generates that generates sequences of truncatable
prime numbers and derivatives of the sequences in the form of a package
that can be installed and imported.A truncatable prime is still prime when number is truncated.  For example,
317 is a left truncatable prime because 17 and 7 are prime.  It is also a
right truncatable prime because 31 and 3 are prime.The intention of this library is to provide code that is reasonably efficient
and readable.  It is not difficult to track down cryptic one-liner code
that produces identical results.Getting StartedPython 3 is assumed.InstallingUsing the source code from githubgit clone https://github.com/harry-zuzan/trprimes.git
cd trprimes
python setup.py installUsing pippip install trprimesExamplesfrom trprimes import trunc

# the number of left truncatable primes
trunc.count_ltrunc()

# the largest of left truncatable prime
trunc.largest_ltrunc()

# iterate through left truncatable primes in ascending order
ltp = trunc.ordered_ltrunc()
next(ltp)
Package: trrex
Efficient keyword mining with regular expressionsThis package includes a pure Python function that enables you to represent a set of keywords (strings) as an efficient regular expression.
With this regular expression, you can perform various operations, such as replacing and extracting keywords.
The name of the package comes from the internal trie used to build the regular expression (trie toregex)Install trrexUse pip,pipinstalltrrexUsageimporttrrexastximportrepattern=tx.make(['baby','bat','bad'])hits=re.findall(pattern,'The baby was scared by the bad bat.')# hits = ['baby', 'bat', 'bad']pandasimporttrrexastximportpandasaspdframe=pd.DataFrame({"txt":["The baby","The bat"]})pattern=tx.make(['baby','bat','bad'],prefix=r"\b(",suffix=r")\b")# need to specify capturing groupsframe["match"]=frame["txt"].str.extract(pattern)hits=frame["match"].tolist()print(hits)# hits = ['baby', 'bad']Why use trrex?trrex builds abetterregex pattern, than the simple regex union, therefore searching (and replacing) keywords is
about 300 times faster than a regex union pattern, and about 2.5 times faster than FlashText algorithm. See below for a performance
comparison:Plays well with others, can be integrated easily with pandas, spacy and any other regex engine. See thedocumentationfor examples.Pure Python, no other dependenciesIssuesIf you have any issues with this repository, please don't hesitate toraise them.
It is actively maintained, and we will do our best to help you.AcknowledgmentsThis project is based on the following resources:Speed up regexTriegexLiked the work?If you've found this repository helpful, why not give it a star? It's an easy way to show your appreciation and support for the project.
Plus, it helps others discover it too!
Package: trrsheadset
Headset Controls为 PC 提供 3.5mm 耳机线控支持。Python >= 3.6项目目前严重缺乏测试，不同设备、不同耳机很可能有不同表现。目录介绍安装使用可选参数按键注意哦抓取日志捐赠许可介绍TRRS 接口的有线耳机的麦克风与按钮并联，按钮按下时麦克风被短接，安卓设备通过检测电压差可以知道按下的按钮。多数 PC 设备无法获知电压差，但短接对麦克风两个声道产生的影响有些不同。这里使用Soundcard Oscilloscope的 x-y graph 功能对比最近 1s 内两个声道的信号幅度进行演示。为了更明显，我们只检视 0.1 范围内的 x 轴和 y 轴：这是普通声音在极端情况下的声道对比图：这是 A 按钮（暂停开始键）的声道对比图：其他情况的声道对比有兴趣的同志可以自己尝试。本项目正是在不同情况的不同声道对比中找不同，来尝试辨别不同按钮的点击、长按事件。因此，运行时需要使用麦克风。安装以下两种方式都需要联网，会自动安装依赖包keyboard，numpy和sounddevice。PyPI通过 PyPI 安装：pip install trrsheadsetClone或者， 从这里下载本仓库的压缩包，解压到一个记得住位置的地方，作为安装文件夹。在安装文件夹中运行：pip install .使用插入耳机后，在命令行中使用 Python 启动trrsheadset即可:python -m trrsheadset [参数]关闭可以使用两种方式，一种是直接关闭命令行，一种是按下ctrl+break快捷键强制退出。选用pythonw启动可在命令行关闭后保持运行，可在任务管理器种找到Python 3.x (Windowed)关闭。重插耳机需要重新启动。可选参数-lor--log将运行日志保存至文件--use-hotkey开启键盘快捷键-hor--help输出此列表后退出按键耳机按键映射 & 键盘快捷键响应。基于 Python 库keyboard。耳机按键短按长按双击A继续 / 暂停继续 / 暂停静音B音量+下一首/C音量-上一首/D///双击操作处于开发早期阶段键盘需在启动时使用--use-hotkey参数。基础快捷键ctrl+shift+h，在基础快捷键触发后1s内按下以下按键可以触发相应操作：p暂停或继续e退出！ 部分设备在开启上述快捷键后，检测不到右 shift、右 ctrl 的释放动作，此时可以按击键盘左边对应按键恢复。注意哦不要按得太快，招架不住。技术问题欢迎提 issue，其他问题请进入讨论区（Discussions）进行交流。如果放久后按钮辨别老错，可能是太久不放音乐了电压不高（？存疑，欢迎讨论）灵感源于：roligheten/AndroidMediaControlsWindows👍抓取日志添加参数-l或--log启动可将运行时日志保存到运行时文件夹的debug.log.1和debug.log日志文件中。日志文件对定位 BUG 非常有帮助。python run.py -l捐赠如果你足够开心 🌹许可GPL-3.0 License
Package: trs80tag
Classic text adventure games for TRS80 and CoCoThese games are the original ROMs played through an emulator for their
original platforms. They play on your computer's command line.Installpip3 install trs80tag
Windows: py -m pip install trs80tagPlaySee the list of games and options:python3 -m trs80tag
Windows: py -m trs80tagFor example, to play RaakaTu for the CoCo:python3 -m trs80tag coco_raaka_tu
Windows: py -m trs80tag coco_raaka_tuInstructions and InfoComplete instructions on these old games can be found on Sean Murphgy's awesome site:figmentfly.comSee the codeDisassembly of the ROMS on my site:computerarcheology.comList of GamesMany more coming soon.coco_raaka_tuRaaka-Tu - 1982 for the TRS-80 Color ComputerEverything you need to know:http://www.figmentfly.com/raakatu/raakatu.htmlSee the disassembly:http://computerarcheology.com/CoCo/RaakaTu/
Package: trs-interface
Python library to communicate with the TRSpectrometer interface device.SupportDocumentation can be found online athttps://trs-interface.readthedocs.io/en/latest/.Source code available athttps://gitlab.com/ptapping/trs-interface.Bug reports, feature requests and suggestions can be submitted to theissue tracker.LicenseAll original code is free and open source, licensed under the GNU Public License.
See theLICENSEfor details.The hardware design files are licensed under the TAPR Open Hardware License.
See theLICENSEfor details.Documentation is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).
Package: trsp
Triton Server Support for building Model repositoryThis package help building model repository of Triton Server with more easy.yamlfile.⚠️TO USE THIS LIBRARY, UNDERSTAND TRITON INFERENCE SERVER FIRST.TRITON INFERENCE SERVER TUTORIAL HERE.👋 InstallationInstalltrsppackage in Python.pipinstalltrsp⚡ Quick commandBuild model repository with config file.trsp-build-f/path/to/config.yamlLaunch Triton Server with Docker.trsp-run📃 Configuration file with.yamlor.ymlTo start, let's create aconfig.yamlfile.ONNX Model.Suppose we have an onnx model namedmymodel.onnx. Here is folder structure:config.yaml
mymodel.onnxDefine model config toconfig.yaml.model_repository:name_of_repositorymodels:my_model:# Write your own model nameengine:onnxmax_batch_size:0versions:-version:1path:mymodel.onnxThis config will create a model repository formated as Triton Inference Server requirements. It's look-like:build/
  name_of_repository/
    my_model/
      1/
        model.onnx
      config.pbtxtPython Model.To create a python model, create a python filemy_logic.pyto define core logic as bellow:config.yaml
my_logic.pyimportnumpydefmy_initialize(args:dict):# The args here is a dictionary contains config provided by Triton....return{}defmy_logic(args,inputs:list[np.ndarray]):# The args here is any that you return from the above function.# The inputs here is a list of numpy array that contain your input data....return(processed_data,)# Return a tuple of processed things.Write a configuration.model_repository:name_of_repositorymodels:my_python_model:engine:pythonmax_batch_size:0versions:version:1module:path:my_logic.pyinitialize:my_initializeexecute:my_logic# You must define input and output shape and data type of the python model.tensor:input:-dims:[1,2,3,4]dtype:float32output:-dims:[1,2,3,4]dtype:float32# List out the library that you use for your logic for trsp install it when run.requirements:-numpyEnsemble Model.Create ensemble model in Triton Server. Define in configuration as below:model_repository:name_of_repositorymodels:my_ensemble_model:engine:ensemblemax_batch_size:0steps:-model:my_modelversion:latest-model:my_python_modelversion:latest😊 ContributorsQuang-Minh Doan -Ming-doan
Package: trspectrometer
TRSpectrometer is a platform for time-resolved spectroscopy, encompassing both software and hardware
designs. It can be used for both data acquisition, as well as viewing data and basic analysis.Features:Completely open source hardware and software designs. Don’t get stuck with inflexible and buggy
proprietary software!Plugin architecture to ease modifications and integration of new hardware devices or experimental methods.Supports the latest rapid-acquisition techniques.Cross platform python - Linux, Windows, MacOS.The aim of the software is to be as open and flexible as possible, using a plugin system for the
addition and customisation of features and functionality. For example, the same software that runs
on a Windows machine acquiring data can be installed on a Linux or Mac OS computer and used for data
viewing and analysis without restriction. The majority of the code base is written in Python, making
development and modifications (hopefully!) more accessible to students and researchers who lack
specific programming backgrounds.The initial 1.0 version includes a reference hardware design for a transient absorption
(pump–probe) spectrometer and a cross-platform software application for data acquisition and basic
data exploration and analysis. In time, it is hoped that the platform will support a wider variety
of hardware and additional time-resolved experimental techniques, as well as adding more advanced
data exploration, analysis, and plotting tools. This will only truly be possible through
contributions by users and other interested parties. See the Contributing page in the documentation
for more information.InstallationThe latest release can be downloaded and installed using the Package Installer for Python (pip):pipinstall--upgradetrspectrometerOn Linux, a launcher icon should be installed in your menus (this feature is not yet implemented on Windows or MacOS).
On all operating systems, the application can be launched from the command line:trspectrometerFurther details can be found in theGetting Startedsection of the documentation.SupportDocumentation can be read online athttps://ptapping.gitlab.io/trspectrometer.Bug reports, feature requests and suggestions can be submitted to theissue tracker.LicenseAll original work is free and open source, licensed under the GNU Public License.
See theLICENSE.txtfor details.
Package: trstemmer
trstemmer is a simple Turkish word stemmer which is still in development (for now, it can only stem verbs and may not be accurate.). You should download Turkish NLP model (pip install https://huggingface.co/turkish-nlp-suite/tr_core_news_lg/resolve/main/tr_core_news_lg-any-py3-none-any.whl) before using the library. You can use the library as following:from trstemmer import turkish
stemmer = turkish.stemmer()
result = stemmer.stem("seviyorum, yapmÄ±ÅŸÄ±m, koÅŸarlar, yemiÅŸsin")
print(f"Result: {result}")
>>> Result: sev yap koÅŸ ye
Package: trStr
Solves the problem of string methods to uppercase/lowercase of ‘i, I’ characters in Turkish; for upper, lower, capitalize, title methods.Normal string methods is problematic for Turkish strings as follows:“aliler bize geldi”.upper() -> “ALILER BIZE GELDI” // this module adresses to this problemUsage:trStr(your_str).lower() // .upper(), .title(), .capitalize() methods also can be used.
Package: trt2onnx
TensorRT2ONNXA tool convert TensorRT engine/plan to a fake onnxBuild an engine from onnx using trtexec toolstrtexec--verbose\--nvtxMode=verbose\--buildOnly\--workspace=8192\--onnx=your_onnx.onnx\--saveEngine=your_engine.engine\--timingCacheFile=timing.cache\--fp16# use fp16You will get ayour_engine.engineand atiming.cacheParser network from engine using trtexec toolstrtexec--verbose\--noDataTransfers\--useCudaGraph\--separateProfileRun\--useSpinWait\--nvtxMode=verbose\--loadEngine=your_engine.engine\--exportLayerInfo=graph.json\--timingCacheFile=timing.cacheYou will parseryour_engine.enginenetwork information intograph.jsonInstall TensorRT2ONNXpip3installtrt2onnx-ihttps://pypi.org/simpleBuild a fake onnx from graph jsonimportonnxfromtrt2onnximportbuild_onnx# build a fake onnx from jsononnx_graph=build_onnx('graph.json')# save the fake onnx as `fake.onnx`onnx.save(onnx_graph,'fake.onnx')Build a fake onnx from engineimportonnxfromtrt2onnximportbuild_onnx# build a fake onnx from engineonnx_graph=build_onnx('your_engine.engine')# save the fake onnx as `fake.onnx`onnx.save(onnx_graph,'fake.onnx')NOTICE !!If you build engine use your own plugin,
please load the*.sobeforebuild_onnxfunction.importctypes# load your plugin firstctypes.cdll.LoadLibrary('your_plugin_0.so')ctypes.cdll.LoadLibrary('your_plugin_1.so')...UseNetronto view your fake onnx