Saravanan666/pypi-org huggingface dataset:
Package: zeroless-tools
Most people used to networking programming are aware that NetCat is a very useful tool
to establish and test TCP/UDP connections on the fly. The ZeroMQ community, however, do
not provide an equivalent application. So that, in order to test your ZMQ sockets, you
would have to code your own solution. For tackling that issue, the Zeroless Command
Line Interface (CLI) was created.So that you can test your 0MQ connections in a language agnostic fashion, despite the
used messaging pattern.Installation$pipinstallzeroless-toolsUsage$zeroserver-husage:ZerolessServerCli[-h][-namountofparts][aportbetween1024and65535]{rep,push,sub,pair,req,pub,pull}...TheZerolessServerClishallcreateanendpointforacceptingconnectionsandbindittothechosenØMQmessagingpatternpositionalarguments:[aportbetween1024and65535]theopenporttobind/connecttooptionalarguments:-h,--helpshowthishelpmessageandexit-namountofparts,--numPartsamountofpartstheamountofparts(i.e.frames)permessage(default=1)messagingpattern:TheØMQAPIimplementsseveralmessagingpatterns,eachonedefiningaparticularnetworktopology{rep,push,sub,pair,req,pub,pull}ChooseamongPublish/Subscribe(Pub/Sub),Request/Reply(Req/Rep),Pipeline(Push/Pull)andExclusivePair(Pair)Thisprogramisfreesoftware:youcanredistributeitand/ormodifyitunderthetermsoftheGNUGeneralPublicLicenseaspublishedbytheFreeSoftwareFoundation,eitherversion3oftheLicense,or(atyouroption)anylaterversion$zeroclient-husage:ZerolessClientCli[-h][-iIP][-namountofparts][aportbetween1024and65535]{sub,push,pair,pull,req,rep,pub}...TheZerolessClientClishallconnecttothespecifiedendpointusingthechosenØMQmessagingpatternpositionalarguments:[aportbetween1024and65535]theopenporttobind/connecttooptionalarguments:-h,--helpshowthishelpmessageandexit-iIP,--ipIPtheIPoftheendpointtoconnectto(default=127.0.0.1)-namountofparts,--numPartsamountofpartstheamountofparts(i.e.frames)permessage(default=1)messagingpattern:TheØMQAPIimplementsseveralmessagingpatterns,eachonedefiningaparticularnetworktopology{rep,push,sub,pair,req,pub,pull}ChooseamongPublish/Subscribe(Pub/Sub),Request/Reply(Req/Rep),Pipeline(Push/Pull)andExclusivePair(Pair)Thisprogramisfreesoftware:youcanredistributeitand/ormodifyitunderthetermsoftheGNUGeneralPublicLicenseaspublishedbytheFreeSoftwareFoundation,eitherversion3oftheLicense,or(atyouroption)anylaterversionTestingTo run individual tests:$py.testtests/test_desired_module.pyTo run all the tests:$pythonsetup.pytestAlternatively, you can use tox:$toxLicenseCopyright 2014 Lucas Lira Gomesx8lucas8x@gmail.comThis 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, see <http://www.gnu.org/licenses/>.
Package: zeroloader.py
ZeroLoaderZeroLoader is a part of0archive project. Its purpose is to read 0archive's public data fromgoogle driveinto csv format.SetupGet google api credentialsFollow Step 1 fromthis tutorial.Installation
It's recommended to use avirtualenvorconda env.$pipinstall-Uzeroloader.pyCreate environment filetouch.envechoGDRIVE_PUBLIC_FILE_MAPPING_ID=1OwAGYg7dJob_VMW8vt2FP4fO5Ie7B3EW>.envLoad dataYou need the producer_id to successfully load. The id of each producer could be found from google drive folder name or from thiscsv.importzeroloaderaszldf=zl.load_data(:producer_id,:yyyy-mm,:path-to-gdrive-api-credentials)# e.g. Load 2020 June's data of storm.mg into a csvdf=zl.load_data("5030bba7-81fe-11ea-8627-f23c92e71bad","2020-06","service.json")
Package: zeromessage
Zero MessageZero Messageis a lightweight ROS-like pub-sub tool for Python 3.4+.Provides a wrapper aroundZeroMQsocket.Communicate between any Python program using publisher-subscriber protocolInstallationpip install zeromessageQuick startRefer to the/examples:# listener.pyimportasynciofromzeromessageimportEnvelopSocketsocket=EnvelopSocket.as_subscriber()defdoSomething(msg):print(msg)subscribe_coroutine=socket.subscribe('test',doSomething)asyncio.get_event_loop().run_until_complete(subscribe_coroutine())# talker.pyimporttimefromzeromessageimportEnvelopSocketsocket=EnvelopSocket.as_publisher()whileTrue:socket.publish('test',{'data':[1,2,3]})time.sleep(1)Command Line toolsArostopiclike tool is provided.zerotopic echo -- --helpAPI Documentzero-message.readthedocs.io
Package: zero-motorcycles
Zero MotorcyclesTable of ContentsInstallationUsageLicenseInstallationpip install zero-motorcyclesUsagefromzero_motorcyclesimportZerozero_client=Zero(username="email",password="password")# Get unitszero_client.get_units()# Get last transmit data for a specific unitzero_client.get_last_transmit(123456)# Get subscription expiration for a specific unitzero_client.get_expiration_date(123456)Licensezero-motorcyclesis distributed under the terms of theBSD 3-Clauselicense.
Package: zeroncy
ZeroncyA simple python tool to make your projet more decoupled.Just put your project variables on a config file instead store in encironment variable. You can use a .env for json file...Installingpip install zeroncyHow to UseUsing .env filecreate a .env file in project root and set variables...DATABASE_URL=postgres://user:pwd@localhost:5432/psql
ALLOWED_HOSTS=localhost, 127.0.0.0.1
PORT=5000Then you could use your variables on your settings module...>>>importzeroncy>>>zeroncy.config()>>>zeroncy.get("DATABASE_URL")'postgres://user:pwd@localhost:5432/psql'# If you want a diferent type you can pass the cast parameter>>>zeroncy.get("PORT",cast=int)5000# If your var has more than one value, you must set the many parameter to true...>>>zeroncy.get("ALLOWED_HOSTS",many=True)['localhost','127.0.0.0.1']Using .env.json fileCreate a .env.json file on project root:{"DATABASE_URL":"postgres://user:pwd@localhost:5432/psql","ALLOWED_HOSTS":"localhost, 127.0.0.0.1","PORT":5000}Then you could use on a similar way as the previous>>>importzeroncy>>>zeroncy.config(dict)# passes dict as parameter>>>zeroncy.get("DATABASE_URL")'postgres://user:pwd@localhost:5432/psql'>>>zeroncy.get("PORT")5000>>>zeroncy.get("ALLOWED_HOSTS",many=True)['localhost','127.0.0.0.1']# Note that on Json config you don't need to passes cast parameter for other types (Integer in this example)ReferencesThis project was inpired bypython-decouplelib, it's a simpler adaptionPython DocsLICENSEGNU GENERAL PUBLIC LICENSE
                   Version 3, 29 June 2007Copyright (C) 2007 Free Software Foundation, Inc.https://fsf.org/Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Package: zeronimo
A distributed RPC solution based onØMQandgevent.  Follow the features:A worker can return, yield, raise any picklable object to the remote
customer.A customer can invoke to any remote worker in the worker cluster.A customer can invoke to all remote workers in the worker cluster.ExampleServer-sideThe address is 192.168.0.41. The worker will listen at 24600.importzmq.greenaszmqimportzeronimoclassApplication(object):defrycbar123(self):forwordin'run, you clever boy; and remember.'.split():yieldwordctx=zmq.Context()# make workerworker_sock=ctx.socket(zmq.PULL)worker_sock.bind('tcp://*:24600')worker=zeronimo.Worker(Application(),[worker_sock])# run worker foreverworker.run()Client-sideThe address is 192.168.0.42. The reply collector will listen at 24601.importzmq.greenaszmqimportzeronimoctx=zmq.Context()# make remote result collectorcollector_sock=ctx.socket(zmq.PULL)collector_sock.bind('tcp://*:24601)collector=zeronimo.Collector(collector_sock,'tcp://192.168.0.42:24601')# make customercustomer_sock=ctx.socket(zmq.PUSH)customer_sock.connect('tcp://192.168.0.41:24600')customer=zeronimo.Customer(customer_sock,collector)# rpcremote_result=customer.emit('rycbar123')forlineinremote_result.get():printline
Package: zeroone-ai
School research projectI created this package for my school research project.
I want to create an AI that can predict if a human where to get a heart failure.
For this I created a very long python file but I wanted to make this easier to understand.
So, I created this package to get a shorter file and make it easier to understand.How to useThis package uses the scikit-learn package and therefore some classes like the MLPRegressor are the same.Import the package: “import zeroone_ai”Choose wich class you are going to use: “from zeroone_ai import MLPRegressor(More comming in the future)Licensescikit-learn (new BSD)https://pypi.org/project/scikit-learn/pandas (BSD 3-Clause License)https://github.com/pandas-dev/pandas/blob/master/LICENSEmatplotlib (Python Software Foundation License (PSF))https://pypi.org/project/matplotlib/3.4.3/numpy (BSD License (BSD))https://github.com/numpy/numpy/blob/main/LICENSE.txtChange Log0.0.11 (18-11-2021)You can now predict unknown data when using the new mapping feature0.0.10 (27-10-2021)The LogisticRegressor bug has been fixedPlots will now always show0.0.9 (27-10-2021)The AI now predicts a zero or an oneAdded MLPClassifier and LogisticRegressor0.0.8 (21-10-2021)Added epoch training0.0.7 (20-10-2021)Fixed a bug where the library couldn’t be imported0.0.4 (19-10-2021)Fixed some bugs and provided a better README file0.0.3 (19-10-2021)Fixed some bugs and provided a better README file0.0.2 (19-10-2021)Test if updating works… It does0.0.1 (19-10-2021)First Release
Package: zero-play
Zero PlayTeach a computer to play any gameThe zero play library is based on the ideas in theAlphaGo Zero paperand the
example Python code in thealpha-zero-general project. The goal of this
project is to make a reusable Python library that other projects can build on
to make powerful computer opponents for many different board games. An example
project that uses this library isShibumi Games.It includes a graphical display that you can use to play against the computer
opponent or another human.Installing Zero PlayEven though Zero Play has a graphical display, it is a regular Python package,
so you can install it withpip install zero-play. If you haven't installed
Python packages before, read Brett Cannon'squick-and-dirty guide.Then run it with thezero_playcommand.The default installation generates some errors aboutbdist_wheelthat don't
seem to actually cause any problems. You can either ignore them, or installwheelbefore installing Zero Play.pip install wheel
pip install zero-play
zero_playKnown bug on Ubuntu 20.04:qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though
it was found.This is aPySide2 bugthat is missing some dependencies. You can work around
it by installing those dependencies like this:sudo apt install libxcb-xinerama0More InformationIf you'd like to help out with the project, or add your own games, see theCONTRIBUTING.mdfile in the source code. For all the details, look through the
designjournalfor the project.Related ProjectsHere are some similar projects for inspiration or collaboration:I already mentioned thealpha-zero-general project. It was a big inspiration, but I'm trying to build something
that's easier to add new games to, or use as a library within another project.Galvaniselooks interesting. It's a mix of Python and C++, using Tensorflow. As of 2020, it looks like a single
developer, without much documentation. The games are defined with GDL, not Python code.
Package: zeropos
A zeroconf based POS printing daemonWhat is Zero POSZero POS was designed to solve a very specific problem we faced at
Openlabs, but we thought could be generic enough for others to use. Here
is the use case:The Tryton iPad based POS should be able to print to the commonly found
POS printer - a thermal printer like the Epson TM-T81. The printer only
talks over USB and does not have wireless printing capabilities!With zeropos, you could bundle the printer with a low cost computer like
the Raspberry Pi and connect the printer to it and run zeropos daemon on
the raspberry pi. The printing service can be discovered over zero conf
from the iPad application and your application could send a POST request
to the service to print ZPL to the printer.InstallationThe quickest way to install this software is using pippip install zeroposAdministrationThe daemon can be adminisered by opening the service URL from a browser.TODOImplement secutiry for the admin interface.Write API documentation for the admin HTTP API.
Package: zeropy
zeropyBlockchain's api bind, python3.5+RequirementsracryptcrcPy(now part, but it will be changed)TestsDefault tests:shtests.shTesting Api:cdtests
vimnode.ini
changeip,port
python3-munittesttest_client.pyStartimportzeropyclient=zeropy.apiClient()client.connect('127.0.0.1',5000)tmp_key=b'any 64 symbols'#Blockchain should know with whom he worksclient.send_info(tmp_key)counters=client.get_counters()print('blocks\n',counters.blocks,'transactions\n',counters.transactions,'binary data\n',counters)
Package: zero-python-sdk
Zero Python SDKPython SDK forZero. Provides a clear and simple interface for the secrets manager GraphQL API.Installationpoetryaddzero-python-sdkUsageFetch your vendor secrets by passing yourzerotoken:importosfromzero_python_sdkimportzeroZERO_TOKEN=os.getenv("ZERO_TOKEN")# {'aws': {'secret': 'value', 'secret2': 'value2'}, 'googleCloud': {...}}print(zero(token=ZERO_TOKEN,pick=["aws","googleCloud"],caller_name="stagingcluster").fetch())
Package: zerorm
Zerorm is a simple wrapper for three amazing packages. This repository is the
place whereTinyDB,SchematicsandLiftertogether look like Django ORM.It’s still work in progress and not everything looks like Django ORM, but it will.InstallationpipinstallzerormUsageFirst create a file with models and database instance attached to every model:fromzerormimportdb,modelsdatabase=db('db.json')classMessage(models.Model):author=models.StringType(required=True)author_email=models.EmailType()text=models.StringType()views=models.IntType(min_value=0)classMeta:database=databaseNow create some objects:>>>frommodelsimportMessage>>>>>>bob_message=Message(author='Bob',...author_email='bob@example.com',...text='Hello, everyone!')>>>bob_message<Message: Message object>>>>bob_message.save()# Save object1>>>>>>bob_message.views=3>>>bob_message.save()# Update object>>>>>>alice_message=Message.objects.create(author='Alice',...text='Hi, Bob!',...views=0)>>>alice_message<Message: Message object>And try to retrieve them viaobjects>>>Message.objects.all()<QuerySet, len() = 2>>>>list(Message.objects.all())[<Message: Message object>, <Message: Message object>]>>>>>>second_message=Message.objects.get(eid=2)>>>second_message.author'Alice'>>>>>>Message.objects.filter(views__gte=3)# Only Bob's message has 3 views<QuerySet, len() = 1>>>>list(Message.objects.filter(views__gte=3))[<Message: Message object>]You can also redefine model’s__str__method for better repr just like in Django.classMessage(models.Model):...def__str__(self):return'by{}'.format(self.author)>>>list(Message.objects.all())[<Message: by Bob>, <Message: by Alice>]LicenseMIT. See LICENSE for details.
Package: zeroros
Zero-dependency ROS-like middleware for PythonThis library is intended to be used for small projects that require a simple middleware
for communication between processes. It is not intended to be a replacement for ROS.Why ZeroROS?See these discussions inROS Discourseand this one inreddit/ROS.InstallationUse pip to install the library:pipinstallzerorosUsageThe library is composed of three main classes:Publisher,SubscriberandMessageBroker.MessageBrokerTheMessageBrokerclass is used to create a message broker that can be used by
publishers and subscribers to communicate with each other.fromzerorosimportMessageBrokerbroker=MessageBroker()PublisherThePublisherclass is used to publish messages to a topic. The constructor takes two
arguments: the topic name and the message type. The topic name is a string, while the
message type is a Python class. The message type is used to serialize and deserialize
messages.fromzerorosimportPublisherpub=Publisher("topic_name",String)pub.publish("Hello world!")SubscriberTheSubscriberclass is used to subscribe to a topic and receive messages. The constructor
takes two arguments: the topic name and the message type. The topic name is a string, while
the message type is a Python class. The message type is used to serialize and deserialize
messages.importtimefromzerorosimportSubscriberdefcallback(msg):print(msg)sub=Subscriber("topic_name",String,callback)whileTrue:# Do something elsetime.sleep(1)# Stop the subscribersub.stop()MessagesThe library comes with a few built-in messages that can be used out of the box. The
following messages are available:std_msgs.Stringstd_msgs.Intstd_msgs.Floatstd_msgs.Boolstd_msgs.Headergeometry_msgs.Vector3geometry_msgs.Vector3Stampedgeometry_msgs.Twistgeometry_msgs.Quaterniongeometry_msgs.Posegeometry_msgs.PoseStampedgeometry_msgs.PoseWithCovariancegeometry_msgs.TwistWithCovariancenav_msgs.Odometrynav_msgs.Pathsensors_msgs.LaserScanMore to come...LoggingThis library implements a class calledDataLoggerthat can be used to log data in JSON format.
To use the logger, simply create an instance of the class and call thelogmethod with the
data to be logged. The data can be any Python object that can be serialized to JSON.fromzerorosimportDataLoggerfromzeroros.messagesimportStringlogger=DataLogger("log_file.json")msg=String()msg.data="Hello world!"logger.log(msg,topic_name="/topic_name")The content of the log file will be:[{"class":"String","topic_name":"/topic_name","timestamp":1622126400.0,"message":{"data":"Hello world!"}}]In the examples folder you will find a python script to convert JSON logs into CSV files.
Package: zeroscratches
Zero ScratchesOld Photo RestorationThis is a lightweight implementation ofMicrosoft Bringing Old Photos Back to LifeInstallpipinstallzeroscatchesBasic usageimportPIL.ImagefromzeroscratchesimportEraseScratchesimage_path="/path/to/image-scratched.jpg"eraser=EraseScratches()image=PIL.Image.open(image_path)new_img=eraser.erase(image)new_img=PIL.Image.fromarray(new_img)new_img.show()Get the pretrained models atHugging Face Zero ScratchesSome Apps using the library:Face ShineFace Shine Is a backend server for photo enhancement and restoration.Super FaceSuper Face is a Python QT frontend for Face Shine server.
Package: zeroshot
Zeroshot (Python)Image classification for the massesInstallationInstall via pip:pip install zeroshotFor GPU support,pip install zeroshot[torch]N.B. In theory ONNX supports GPU, but the restrictions on CUDA version are iffy at best, and so for easiest results just use PyTorch. If you're brave, insteadpip install onnxruntime-gpu.UsageFirst, go to app.usezeroshot.com and create a classifier. Check out the video on thelanding pagefor an example.Then, in Python (imageshould be an RGB numpy array with channels last):importzeroshot# Create the classifier and preprocessing function.classifier=zeroshot.Classifier("model-uuid-goes-here")preprocess_fn=zeroshot.create_preprocess_fn()# Run the model!prediction=classifier.predict(preprocess_fn(image))print(f"The image is class{prediction}")You can also download the classifier and save it somewhere locally so you don't need to hit the server each time. Hit "download model" in the web-app and save the json file somewhere. You can then instead do:classifier=zeroshot.Classifier("/home/user/path/to/model.json")Additional TipsTo use a GPU, install the torch backend withpip install zeroshot[torch]If you are hitting issues with torch trying to run on CPU, try disabling XFormers by setting XFORMERS_DISABLED=1 in your ENV varaibles.Read the docsSee thedocsfolder for some details on how things work under the hood.Get helpIf you need help or just want to chat, join theMoonshine Labs Slack serverand come hang out in the #zeroshot channel.
Package: zero-shot-re
IntroductionThis is a zero-shot relation extractor based on the paperExploring the zero-shot limit of FewRel.Installation$pipinstallzero-shot-reRun the ExtractorfromtransformersimportAutoTokenizerfromzero_shot_reimportRelTaggerModel,RelationExtractormodel=RelTaggerModel.from_pretrained("fractalego/fewrel-zero-shot")tokenizer=AutoTokenizer.from_pretrained("fractalego/fewrel-zero-shot")relations=['noble title','founding date','occupation of a person']extractor=RelationExtractor(model,tokenizer,relations)ranked_rels=extractor.rank(text='John Smith received an OBE',head='John Smith',tail='OBE')print(ranked_rels)with results[('noble title',0.9690611883997917),('occupation of a person',0.0012609362602233887),('founding date',0.00024014711380004883)]AccuracyThe results as in the paper areModel0-shot 5-ways0-shot 10-ways(1) Distillbert70.1±0.555.9±0.6(2) Bert Large80.8±0.469.6±0.5(3) Distillbert + SQUAD81.3±0.470.0±0.2(4) Bert Large + SQUAD86.0±0.676.2±0.4This version uses the (4) Bert Large + SQUAD modelCite as@inproceedings{cetoli-2020-exploring,title="Exploring the zero-shot limit of {F}ew{R}el",author="Cetoli, Alberto",booktitle="Proceedings of the 28th International Conference on Computational Linguistics",month=dec,year="2020",address="Barcelona, Spain (Online)",publisher="International Committee on Computational Linguistics",url="https://www.aclweb.org/anthology/2020.coling-main.124",doi="10.18653/v1/2020.coling-main.124",pages="1447--1451",abstract="This paper proposes a general purpose relation extractor that uses Wikidata descriptions to represent the relation{'}s surface form. The results are tested on the FewRel 1.0 dataset, which provides an excellent framework for training and evaluating the proposed zero-shot learning system in English. This relation extractor architecture exploits the implicit knowledge of a language model through a question-answering approach.",}
Package: zerosms
zerosms==============Send a text message via Way2SMS to your friends and family in India. Enter your India mobile number and sms text message as parameters. Your Free SMS sending to India will be delivered instantly----Description: zerosms==============It is python package to Send a text message via "Way2SMS"Send a text message to your friends and family in India. Enter your India mobile number and sms text message as parameters. Your Free SMS sending to India will be delivered instantlyRequirements============================BeautifulSoup4requestsurllib3 1.22NOTE============================use Way2Sms site credentials to send sms and future message----Example Code------------Open Python Interpreter::>>> import zerosms>>> zerosms.sms(phno=phonenum,passwd=password,message='helloworld!!',receivernum=receiver mobile number)>>> zerosms.futuresms(phno=phno,passwd=password,set_time='17:47',set_date='15/12/2017',receivernum=receiver mobile num,message='helloworld!!')
Package: zerospeech-tde
Term Discovery EvaluationToolbox to evaluate  Term Discovery systems.Complete Documentation and metrics description ar
available athttps://docs.cognitive-ml.fr/tde/This toolbox transcribed phonetical each discovered interval, then applies
NLP evaluation to judge the quality of the discovery.
The metrics are:NED : mean of the edit distance between all the discovered pairscoverage: percentage of the corpus coveredtoken/type: measure how good the system was at finding gold tokens and gold typesboundary: measure how good the system was at finding gold boundariesgrouping: judge the purity of the clusters formed by the system