Saravanan666/pypi-org huggingface dataset:
Package: amqpipe
Twisted based pipeline framework for AMQP. It allow you to create fast
asynchronous services which follow ideology:get message from queuedoing something with messagepublish some resultInstallationInstall via pip:pip install amqpipeBasic usageThe minimal module based on AMQPipe is:fromamqpipeimportAMQPipepipe=AMQPipe()pipe.run()It will simply get all messages from one RabbitMQ queue and publish them
to other RabbitMQ exchange.Now we define some action on messages:importhashlibfromamqpipeimportAMQPipedefaction(message):returnhashlib.md5(message).hexdigest()pipe=AMQPipe(action=action)pipe.run()It will publish md5 checksum for every message as result.If messages in input queue are in predefined format then you can define
converter-function:importhashlibfromamqpipeimportAMQPipedefconverter(message):returnmessage['text']defaction(text):returnhashlib.md5(text).hexdigest()pipe=AMQPipe(converter=converter,action=action)pipe.run()You can define service-specific arguments:importhashlibfromamqpipeimportAMQPipeclassProcessor:defset_field(self,field):self.field=fieldprocessor=Processor()definit(args):processor.set_field(args.field)defconverter(message):returnmessage.get(processor.field)defaction(text):returnhashlib.md5(text).hexdigest()pipe=AMQPipe(converter,action,init)pipe.parser.add_argument('--field',default='text',help='Field name for retrieving message value')pipe.run()You can connect to database ininitfunction or do some other things
for initialization.If your action returns Deferred then result would be published to
RabbitMQ when this Deferred will be resolved:importloggingfromtwisted.internetimportdeferfromamqpipeimportAMQPipelogger=logging.getLogger(__name__)classProcessor:defset_field(self,field):self.field=fieldprocessor=Processor()definit(args):connect_to_db()...defconverter(message):returnmessage.get(processor.field)@defer.inlineCallbacksdefaction(text):result=yielddb_query(text)logger.info('Get from db:%s',result)defer.returnValue(result)pipe=AMQPipe(converter,action,init)pipe.parser.add_argument('--field',default='text',help='Field name for retrieving message value')pipe.run()Init function may return Deferred too.
Package: amqp-ko
AMQP KøObject oriented AMQP layer for microservices communication.UsageThe recommended way to use AMQP Kø is to create your own queue object. The simplest way to do this is usingcreateQueuefunction.Create queuefromamqp_koimportcreate_queue,AsyncConnection,Message,MessageGatefromdataclassesimportdataclass@dataclass(frozen=True)classTopicFollow(Message):user_id:inttopic_name:strdefunmarshal_topic_follow(data:dict)->TopicFollow:returnTopicFollow(user_id=data["user_id"],topic_name=data["topic_name"],)message_gates=[MessageGate("topic_follow",TopicFollow,unmarshal_topic_follow),]asyncwithAsyncConnection("localhost",5672,"rabbitmq","rabbitmq")asconnection:queue=awaitcreate_queue(connection,"exchange-name",message_gates)Consume messagesfromamqp_koimportConsumer,JobclassConnectUserWithTopic(Consumer):asyncdefconsume(self,job:Job):# Put here some code to connect user with a topic# using "job.message.userId" and "job.message.topicName"awaitjob.ack()awaitqueue.consume("queue-name",{TopicFollow:ConnectUserWithTopic()},)Produce messagemessage=TopicFollow(120,"entertainment")awaitqueue.produce(message)Installationpipinstallamqp-koAuthor:Michał Budziak
Package: amqp-mqtt-transport
amqp-mqtt-transportПакет враппер для упрощения работы с amqp/mqtt пакетамиОписаниеВ пакете есть классы для создания и поддержания подключения AMQPController/MQTTController, а также классы консюмеры и паблишеры. Классы находятся в подмодулях относящихся к соответвующему протоколу.ИспользованиеДля упрощения установки/запуска был сделан Makefile, подробнее можно узнать запустивmake helpПакет препочтительно устанавливать из репозитория pypi
Package: amqp-py-client
usagesimple rpc amqp python library on pikeconsumers=ServiceCreator('amqps://user:password@host.cloudamqp.com/vhost',"exchangepypy")defcb(msg):print(msg)returnmsgs.consume("py.test","",cb)rpc requests=ServiceCreator('amqps://user:password@host.cloudamqp.com/vhost',"exchangepypy")res,err=s.rpc_request("py.test","sdsdsdsd",0)print(res,err)fire and forgets=ServiceCreator('amqps://user:password@host.cloudamqp.com/vhost',"exchangepypy")s.fire_and_forget("py.test","cvvccvvcv")
Package: amqpstorm-flask
AMQP Service for Flask AppsFeaturesConnection validation and reconnection for AMQP.Sending messages to a specified exchange with retries.Consuming messages from a queue with retries.Customizable parameters for exchanges and queues.Message headers and properties support.Multi-threading support for consumers.PrerequisitesPython 3.xFlaskamqpstormretryInstallationTo install the required dependencies, run:pipinstallamqpstorm-flaskUsageInitializationFirst, create a Flask app and initialize theAmqpService.fromflaskimportFlaskapp=Flask(__name__)app.config["MQ_URL"]="<Your_MQ_URL>"app.config["MQ_EXCHANGE"]="<Your_MQ_Exchange_Name>"amqp_service=AmqpService()amqp_service.init_app(app)Sending MessagesTo send a message to a specified exchange:amqp_service.send(body={"key":"value"},routing_key="route.key",exchange_type="direct",retries=5,)Consuming MessagesTo consume messages from a specified queue:@amqp_service.queue(queue_name="test_queue",routing_key="route.key",)defprocess_message(message):print(message.body)
Package: amqp-workers
🐰amqp-workerEnglish |简体中文amqp-worker is a Python-based multi-threaded RabbitMQ consumer framework. It allows you to consume messages more efficiently and stably.FeaturesBatch consumption: process messages in batches, improve consumption efficiency.Automatic reconnection: when RabbitMQ service disconnects, amqp-worker will automatically reconnect, ensuring uninterrupted consumption.Customizable consumption mode: freely decide to use multi-threading and coroutines in the consumption function.Configurable message acknowledgment mode: support automatic acknowledgment and manual acknowledgment modes, configure according to your consumption needs.Configurable exception handling: support global configuration of message exception consumption mode, re-enter queue, re-insert, consume message.InstallationYou can use pip tool to install amqp-worker:pip install amqp-workersUsageFirst, you need to import the amqp_worker module in your Python code:fromamqpworker.appimportAppThen, you need to instantiate an App object, and the App object depends on the AMQPConnection object:fromamqpworker.connectionsimportAMQPConnectionamqp_conn=AMQPConnection(hostname='127.0.0.1',username='guest',password='guest',port=5672)app=App(connections=[amqp_conn])Next, you need to define the consumption function:@app.amqp.consume(['test'],options=AMQPRouteOptions(bulk_size=1024*8,bulk_flush_interval=2))def_handler(msgs:List[RabbitMQMessage]):print(f"Recv{len(msgs)}{datetime.now().isoformat()}")In the above code we give the consumption function a decorator, giving the consumption queue, the number of consumption per batch, it is worth noting that the parameter type of the consumption function isList[RabbitMQMessage]Finally, just call therunmethod to start consuming:app.run()Example codeBelow is a simple example code that will consume messages from a queue namedtest:fromdatetimeimportdatetimefromtypingimportListfromamqpworker.appimportAppfromamqpworker.connectionsimportAMQPConnectionfromamqpworker.rabbitmqimportRabbitMQMessagefromamqpworker.routesimportAMQPRouteOptionsamqp_conn=AMQPConnection(hostname='127.0.0.1',username='guest',password='guest',port=5672)app=App(connections=[amqp_conn])@app.amqp.consume(['test'],options=AMQPRouteOptions(bulk_size=1024*8,bulk_flush_interval=2))def_handler(msgs:List[RabbitMQMessage]):print(f"Recv{len(msgs)}{datetime.now().isoformat()}")app.run()Contributors@JimZhangLicenseamqp-worker uses MIT license. Please refer to LICENSE file for details.
Package: amqpy
Python 2 & 3 AMQP 0.9.1 client library==================================|Version| |PyPI|:Web: http://amqpy.readthedocs.org/:Source: http://github.com/veegee/amqpy:Keywords: amqp, rabbitmq, qpidAbout=====amqpy is a pure-Python AMQP 0.9.1 client library for Python 2 >= 2.7.0 andPython 3 >= 3.2.0 (including PyPy and PyPy3) with a focus on:- stability and reliability- well-tested and thoroughly documented code- clean, correct design- 100% compliance with the AMQP 0.9.1 protocol specificationIt has very good performance, as AMQP 0.9.1 is a very efficient binary protocol,but does not sacrifice clean design and testability to save a few extra CPUcycles.This library is actively maintained and has a zero bug policy. Please submitissues and pull requests, and bugs will be fixed immediately.Guarantees----------This library makes the following guarantees:- `Semantic versioning`_ is strictly followed- Compatible with Python >= 2.7.0 and PyPy- Compatible with Python >= 3.2.0 and PyPy3 >= 2.3.1 (Python 3.2.5)- AMQP 0.9.1 compliantFeatures========- Draining events from multiple channels: ``Connection.drain_events()``- SSL is fully supported, it is highly recommended to use SSL when connecting toservers over the Internet.- Support for timeouts- Support for manual and automatic heartbeats- Fully thread-safe. Use one global connection and open one channel per thread.Supports RabbitMQ extensions:- Publisher confirms: enable with ``Channel.confirm_select()``, then use``Channel.basic_publish_confirm()``- Exchange to exchange bindings: ``Channel.exchange_bind()`` and``Channel.exchange_unbind()``- Consumer Cancel Notifications: by default a cancel results in ``ChannelError``being raised, but not if a ``on_cancel`` callback is passed to``basic_consume``.. _Semantic versioning: http://semver.org.. |Version| image:: https://img.shields.io/github/tag/veegee/amqpy.svg.. |PyPI| image:: https://img.shields.io/pypi/v/amqpy.svg:target: https://pypi.python.org/pypi/amqpy/:alt: Latest Version
Package: amqtt-db
amqtt_dbDB persistence for amqtt.Objectiveamqtt_db will persist payloads received by theamqtt brokerinto performant relational databases.
SQLAlchemy as well as timescaleBD are the target RMDB-Systems.amqtt_db will do four steps to persist the amqtt data:decoding the payload (e.G. from binary, JSON or which ever encoding)deserializing the payload to typed Python entitiesstructure the session, topic, property, value information into a relational model of your choicegenerate the necessary tables, columns to store the dataAll of this steps can be configured via the amqtt yaml config. And you can even replace any these steps for each topic
by your code in terms of Python plugins.
amqtt is designed to be enhanced and extended.PerformanceFlexibility comes with a penalty on performance. The more layers of classes and filters we
implement the higher the performance penalty.So we optimize the data flow by an optimistic approach.amqtt_db expects that the decoding, deserializing, transformations, target DB, target tables, table colums
etc. are all well in place if it deals with a single incoming packet.
If the handling of that package fails, exceptions will be raised, and the error handling rushes in to deal with the problem.Since the change rate on the decoding, deserializing, database model is quite low this optimistic approach will be quite performant.DocumentationPlease have a look at thedocumentation.
Package: amr2h5
AMR Block data to H5 converterThis python package can be used to convert AMR block data files to the H5 format with covered grid arrays at the maximum refinement level.Right now only 2D AMR files are supported, support for 3D dataset will likely be for the creation of slices as creating a 3D covered grid array would not be practical in terms of file size.This python package relies heavily on theytpackage to read AMR plotfiles.Installationpipinstallamr2h5UsageTheAMR2H5Converterclass creates a single.h5file from a AMR plotfile directory. All the fields are keept and the AMR Level is added to the dataset. Thexandycoordinates at the highest refinement level are added as 1D arrays. Thereturn_openedoption can be used to dynamically read plotfiles into 2D arrays.TheH5Readerclass reads all the data from a converted AMR plotfile into a dictionnary with all the fields as keys and 2D arrays for all the dataset. Thefast_fieldoption can be used to read a single field (faster), this is usefull when analyzing time series data for a single field.Examplefromamr2h5importAMR2H5Converterfromamr2h5importH5Reader# Convert a single plotfileAMR2H5Converter('plt02000')# New file plt02000.h5 is created# Convert and read a single plotfile# New file plt02000.h5 is created and readdataset=AMR2H5Converter('plt02000',return_opened=True)# Read a converted filedataset=H5Reader('plt02000.h5')# dataset is a dict with the whole dataset# Reader a single field from file (faster)# dataset_temp contains only coordinates and 'temp' fielddataset_temp=H5Reader('plt02000.h5',fast_field='temp')
Package: amrnet
AmrNet: Deep Learning LibraryAmrNet is a lightweight deep learning library designed for simplicity and ease of use. It provides a set of basic tools to help you quickly build and train neural networks.Installationpipinstallamrnet==0.1.0Implemented FeaturesTensorsLayers:LinearReLUTanhLeakyReLUNeural NetworksLoss Functions:MSETSEMAELogCoshOptimizers:SGDData UtilitiesTraining UtilitiesUsageCreating a Modelfromamrnet.nnimportNeuralNetfromamrnet.layersimportLinear,Tanh,ReLUnet=NeuralNet([Linear(input_size,hidden_size),Tanh(),Linear(hidden_size,output_size)])Training the Modelfromamrnet.trainimporttraintrain(net,inputs,targets,num_epochs,data_iterator,loss,optimizer)Predictingpredicted=net.forward(x)ExamplesCheck out theexamplesdirectory for a variety of different projects using AmrNet.LicenseMITTODOAdd more layersAdd more optimizersAdd more loss functionsAdd more data utilitiesAdd more training utilitiesAdd more examplesAdd more testsAdd more documentation
Package: amr-um
# AMR-UM
Unified Messaging for AMR and MDM systems. A way to enable and simplify multi utility operations.ChangelogThe format is based onKeep a Changelog: https://keepachangelog.com/en/1.0.0/,
and this project adheres toSemantic Versioning: https://semver.org/spec/v2.0.0.htmlUnreleasedAddedChangedDeprecatedRemovedFixedSecurity
Package: amsaf
amsafThe HART Lab’s tools for registration-based segmentationFree software: MIT licenseDocumentation:https://amsaf.readthedocs.io.FeaturesEasy interface segmentation, registration, and parameter map tuningA passionate team of university researchers <3TODOGood tests with Travis CI integrationWeb frontend for common jobs?History0.1.0 (2018-02-03)First release on PyPI.
Package: ams-dig-proc
AMS-DIG-PROC python libraryAMS-DIG-PROC boardis an digital extension board to AMS family ofinfrared detection modules.This board provides 7Msamples/s 16-bit data aquisition and 32-bit real time processing capabilities. Onboard processing reduces data rate on the
communication link, therefore simple 1Mbit UART is sufficient in most applications. There is alsoUSB adapteravailable, providing power supply and communication interface over a single micro-USB connector.This repository contains python libraries and C source files to handle communication with the board.Python or C? Which should I use?For Windows/Linux - Python API is recommended. It provides ctypes structs and methods to cast and calculate CRC. Also serial port management and separate reader thread is provided to prevent from blocking the main thread.For other operating systems or bare metal embedded aplications - C is recommended since it does not introduce any dependencies or specific requirements.
It is designed to be portable and as simple as possible.Python installationpipinstallams-dig-procC installationThere is no special requirements or installation procedure for C.There is a header file available (C/Inc/protocol.h).
It contains definitions of all structs (messages) and constants required to work with AMS-DIG-PROC board.C/Src/ams_dig_proc_crc.ccontains function that can be used for CRC calculations.Examples and documentationThere are many C and Python examples available in thedocumentationFor more informations about the board and the protocol please check theAMS-DIG-PROC product page
Package: amseg
Amharic Segmenter and tokenizerThis is a simple script that split an Amharic document into different
sentences and tokenes. If you find an issue, please let us know in the
GitHubIssuesThe Segmenter is part of theSemantic Models for AmharicProjectUsageInstall the segmenter:pip install amsegTokenization and SegmentationUse the following code for sentence segmentation and word tokenizationfrom amseg.amharicSegmenter import AmharicSegmenter
sent_punct = []
word_punct = []
segmenter = AmharicSegmenter(sent_punct,word_punct)
words = segmenter.amharic_tokenizer("እአበበ በሶ በላ።")
sentences = segmenter.tokenize_sentence("እአበበ በሶ በላ። ከበደ ጆንያ፤ ተሸከመ፡!ለምን?")Outputswords = [‘እአበበ’, ‘በሶ’, ‘በላ’, ‘።’]sentences = [‘እአበበ በሶ በላ።’, ‘ከበደ ጆንያ፤ ተሸከመ፡!’, ‘ለምን?’]Romanization and NormalizationThe following code show cases how to normalize and romanize a given Amharic textfrom amseg.amharicNormalizer import AmharicNormalizer as normalizer
from amseg.amharicRomanizer import AmharicRomanizer as romanizer
normalized = normalizer.normalize('ሑለት ሦስት')
romanized = romanizer.romanize('ሑለት ሦስት')Outputs> normalized = ‘ሁለት ሶስት’
> romanized = ‘ḥulat śosət’Transliteration to Amharic FidelThe following code show cases how to transliterate a given latin script text to Amahric Fidel script textfrom amseg.amharicTranslitrator import AmharicTranslitrator as  transliterator
transliterated = transliterator.transliterate('misa belah')Outputs> transliterated = ‘ሚሳ በላህ’PublicationsTo cite the Amharic segmenter/tokenizer tool, use the followingpaper@Article{fi13110275,
AUTHOR = {Yimam, Seid Muhie and Ayele, Abinew Ali and Venkatesh, Gopalakrishnan and Gashaw, Ibrahim and Biemann, Chris},
TITLE = {Introducing Various Semantic Models for Amharic: Experimentation and Evaluation with Multiple Tasks and Datasets},
JOURNAL = {Future Internet},
VOLUME = {13},
YEAR = {2021},
NUMBER = {11},
ARTICLE-NUMBER = {275},
URL = {https://www.mdpi.com/1999-5903/13/11/275},
ISSN = {1999-5903},
DOI = {10.3390/fi13110275}
}
Package: amselpy
AmselPyUsageInstall package from pip:pipinstallamselpyUse it in your project:# import libraryfromamselpyimportAmsel# create instanceamsel=Amsel()# set adressamsel.use("<YOUR-AMSELS-IP>")# control movementsamsel.forward()amsel.sleep(5)amsel.stop()DocumentationFor further information read thedocumentation.LicenseMIT License| Copyright © 2019 Moritz Gut (moritzgvt)
Package: amset
AMSET is a package for calculating electronic transport properties from
first-principles calculations.Website (including documentation):https://hackingmaterials.lbl.gov/amset/Help/Support:https://discuss.matsci.org/c/amsetSource:https://github.com/hackingmaterials/amsetIf you find AMSET useful, please consider citingour paper:Ganose, A. M., Park, J., Faghaninia, A., Woods-Robinson, R., Persson, K. A., Jain, A.
Efficient calculation of carrier scattering rates from first principles.
Nat. Commun. 12, 2222 (2021)Interested in contributing? See ourcontribution guidelines
Package: amsimp
AMSIMP - Numerical Weather Prediction using Machine LearningAMSIMP is an open-source solution that leverages machine learning to improve numerical weather prediction. Read thepaper.Features:Fast and accurate, AMSIMP's neural networks provide high quality weather forecasts and predictions.AMSIMP offers a pretrained operational AMSIMP Global Forecast Model (AMSIMP GFM) architecture. It is trained on a dataset from the past decade, ranging from the year 2009 to the year 2016. Over time, a future model will be trained on a larger dataset.The core of AMSIMP is well-optimized Python code. A performance increase of 6.18 times can be expected in comparison against a physics-based model of a similar resolution.AMSIMP's high level and intuitive syntax makes it accessible for programmers and atmospheric scientists of any experience level.Distributed under theGNU General Public License v3.0, AMSIMP is developedpublicly on GitHub.InstallationThis package is available onAnaconda Cloud, and can be installed using conda:$condainstall-camsimpamsimpFor more information, pleaseread the documentationon the website.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 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, seethis webpage.Call for ContributionsAMSIMP appreciates help from a wide range of different backgrounds. Work such as high level documentation or website improvements are extremely valuable. Small improvements or fixes are always appreciated.
Package: amsthm
Date:January 25, 2022ContentsIntroductionUsageSyntaxTipsSupported pandoc versionsIntroductionamsthm provide a syntax to use amsthm environments in pandoc, with output in LaTeX and HTML.UsageFrommakefile:tests/model-target.md:tests/model-source.mdpandoc-Famsthm$<-o$@tests/model-latex.tex:tests/model-source.mdpandoc-Famsthm$<-o$@--top-level-division=chapter--toc-Ntests/model-latex.pdf:tests/model-source.mdpandoc-Famsthm$<-o$@--top-level-division=chapter--toc-Ntests/model-html.html:tests/model-source.mdpandoc-Famsthm$<-o$@--toc-N-sSyntaxSeetests/model-source.md(or next page in documentation site) for an example.TipsUse-N,--number-sectionsto enable numbering in pandoc. This is mandatory for LaTeX output.To match LaTeX and non-LaTeX output numbering scheme, match these 2 settings manuallyLaTeX output: pandoc’s cli flag--top-level-division=[section|chapter|part]and the use ofparent_counterin pandoc-amsthmnon-LaTeX output:counter_depthin pandoc-amsthmSupported pandoc versionspandoc versioning semantics isMAJOR.MAJOR.MINOR.PATCHand panflute’s is MAJOR.MINOR.PATCH. Below we shows matching versions of pandoc that panflute supports, in descending order. Only major version is shown as long as the minor versions doesn’t matter.Version Matching[1]pandoc-amsthmpanflute versionsupported pandoc versionssupported pandoc API versions2.0.02.1.32.14.0.3–2.17.x1.22–1.22.1[1]For pandoc API verion, checkhttps://hackage.haskell.org/package/pandocfor pandoc-types, which is the same thing.
Package: amtFMC
amtFMC:  Amtery python library for FMC5030amtFMC is a Python library provided to remotely control FMC5030. The program is executed in an external host computer. With this method, python programs can control the tuner and AD9364 simultaneously.To Startup, run the lines below. For more details, please refer to the examples (seeDocumentationor visit theHomepage.importamtFMCasfmc# Reset and initialize FMC5030 through SSH.fmc.amtFmcRfReset(ip,port,username,password)DependenciesLibIIO <= 0.25PyADI-IIO <= 0.0.16ParamikoNumPyInstalling from pippipinstallamtFMCInstalling from sourceDownload the file on the Homepage.# unzip the file to a specific path7zx"amtFMC.zip"-o"C:\Program Files\"cdC:\ProgramFiles\amtFMCpipinstallamtFMC-0.0.1-py3-none-any.whl
Package: amtFMC5030
amtFMC5030:  Amtery python library for FMC5030amtFMC5030 is a Python library provided to remotely control FMC5030. The program is executed in an external host computer. With this method, python programs can control the tuner and AD9364 simultaneously.To Startup, run the lines below. For more details, please refer to the examples in .../amtFMC5030/examples/ (Or download fromDocumentationor visit theHomepage. )importamtFMC5030asfmc# Reset and initialize FMC5030 through SSH.fmc.amtFmcRfReset(ip,port,username,password)DependenciesLibIIO <= 0.25PyADI-IIO <= 0.0.16ParamikoNumPyInstalling from pippipinstallamtFMC5030Installing from sourceDownload the file on the Homepage.# unzip the file to a specific path7zx"amtFMC5030.zip"-o"C:\Program Files\"cdC:\ProgramFiles\amtFMC5030pipinstallamtFMC5030-1.0.0-py3-none-any.whl