Saravanan666/pypi-org huggingface dataset:
Package: pyshelltest
PyShellTestGenerate python test cases for shell commands based on simple configuration. Allows you to seemlessly test commands that need to be run from a shell but within the python testing framework.We all need to write more tests and including outside commands allows for more coverage.
For instance:Add linkchecker to your integ runs for a django projectEnsure tools inbin/have a--helpInstallationpipinstallpyshelltestIntegrationAdd this to you test files where you see fit:generator=PyShellTestGenerator.from_json("sample-config.json")generator=PyShellTestGenerator.from_toml("sample-config.toml")test_class=generator.generate()You can then run your tests like you would normally and PyShellTest will generate tests based on your conifg.jsonpython -m pytest tests/ConfigurationSeesample-config/as well astests/test-config.tomlToml configExample configuration for a command:[[command]]name="the-command-name"# The command to runcommand=["path/to/script.sh"]# How long to wait before timing outtimeout=30# Print the output of the ocmmand to stdoutprint_output=true# Expect this in stdout, fail otherwisestdout_contains="bar"# Expect this in stderr, fail otherwisestderr_contains="bar"# Set this dict if you expect errors from the command[command.error]# Expect an errorexpect=true# Expect an error with this classerror_class="FileNotFoundError"Json configExample configuration for a command:{"command":[{"_comment":"# The command name","name":"the-command-name","_comment":"# The command to run","command":["path/to/script.sh"],"_comment":"# How long to wait before timing out","timeout":30,"_comment":"# Print the output of the command to stdout","print_output":true,"_comment":"# Expect this in stdout, fail otherwise","stdout_contains":"bar","_comment":"# Expect this in stderr, fail otherwise","stderr_contains":"bar","_comment":"# Set this dict if you expect errors from the command","error":{"_comment":"# Expect an error","expect":true,"_comment":"# Expect an error with this class","error_class":"FileNotFoundError"}}]}DevelopmentTestingHow to test this projectpoetryrunpython-mpytest
Package: pyShelly
pyShellyLibrary for Shelly smart home devices. Using CoAP for auto discovery and status updates.This library was created for Shelly Plugins for Home Assistant and Telldus Tellstick Net/zNet v2.FeaturesDiscover devicesMonitor statusMonitor switch statusControl (turn on/off etc)MQTT Server (buildin MQTT server taht devices can connect to directly)MQTT Client (using a MQTT broker)WebsocketRun only locallySupport user name and passwordCoexist with Shelly Cloud and Shelly appSupport static and dynamic ip addressmDns and MQTT discoveryRPC (gen 2 devices)Cloud support (Get names of devices etc)Devices supportedGen 1 devicesShelly 1Shelly 1 PM (bug in firmware)Shelly 1LShelly Addon for 1/1PM, temp and humidityShelly 2 (relay or roller mode)Shelly 4 ProShelly PlugShelly Plug SShelly BULBShelly RGBWWShelly RGBW2Shelly H&TShelly EMShelly 2.5 (relay or roller mode)Shelly 2LEDShelly FloodShelly Door/WindowShelly Door/Window 2Shelly DimmerShelly Dimmer 2Shelly EMShelly 3EMShelly DUOShelly VintageShelly i3Shelly Button 1Shelly GasShelly Air (not tested)Plus devicesShelly Plus 1Shelly Plus 1PMShelly Plus 2Shelly Plus 2PMShelly Plus i3Pro devicesShelly Pro 1Shelly Pro 1PMShelly Pro 2Shelly Pro 2PMShelly Pro 4PMComming soonShelly TRVShelly Plus H&TUsagefrompyShellyimportpyShellydefdevice_added(dev,code):print(dev," ",code)shelly=pyShelly()print("version:",shelly.version())shelly.cb_device_added.append(device_added)shelly.start()shelly.discover()whileTrue:passFeedbackPlease give us feedback oninfo@styrahem.seor Facebook groups:Shelly grupp (Swedish)orShelly support group (English)FounderThis plugin is created by the StyraHem.se, the Swedish distributor of Shelly. In Sweden you can buy Shellies fromStyraHem.seor any of the retailers like NetOnNet, Kjell&Company etc.
Package: pyShellyEx
Modified version ofpyShellyto suppor offset cover feature.pyShellyLibrary for Shelly smart home devices. Using CoAP for auto discovery and status updates.This library was created for Shelly Plugins for Home Assistant and Telldus Tellstick Net/zNet v2.FeaturesDiscover devicesMonitor statusMonitor switch statusControl (turn on/off etc)MQTT Server (buildin MQTT server taht devices can connect to directly)MQTT Client (using a MQTT broker)WebsocketRun only locallySupport user name and passwordCoexist with Shelly Cloud and Shelly appSupport static and dynamic ip addressmDns and MQTT discoveryRPC (gen 2 devices)Cloud support (Get names of devices etc)Devices supportedGen 1 devicesShelly 1Shelly 1 PM (bug in firmware)Shelly 1LShelly Addon for 1/1PM, temp and humidityShelly 2 (relay or roller mode)Shelly 4 ProShelly PlugShelly Plug SShelly BULBShelly RGBWWShelly RGBW2Shelly H&TShelly EMShelly 2.5 (relay or roller mode)Shelly 2LEDShelly FloodShelly Door/WindowShelly Door/Window 2Shelly DimmerShelly Dimmer 2Shelly EMShelly 3EMShelly DUOShelly VintageShelly i3Shelly Button 1Shelly GasShelly Air (not tested)Plus devicesShelly Plus 1Shelly Plus 1PMShelly Plus 2Shelly Plus 2PMShelly Plus i3Pro devicesShelly Pro 1Shelly Pro 1PMShelly Pro 2Shelly Pro 2PMShelly Pro 4PMComming soonShelly TRVShelly Plus H&TUsagefrompyShellyimportpyShellydefdevice_added(dev,code):print(dev," ",code)shelly=pyShelly()print("version:",shelly.version())shelly.cb_device_added.append(device_added)shelly.start()shelly.discover()whileTrue:passFeedbackPlease give us feedback oninfo@styrahem.seor Facebook groups:Shelly grupp (Swedish)orShelly support group (English)FounderThis plugin is created by the StyraHem.se, the Swedish distributor of Shelly. In Sweden you can buy Shellies fromStyraHem.seor any of the retailers like NetOnNet, Kjell&Company etc.
Package: pysherasync
PysherAsyncpysherasyncis a python module for handling Pusher Channels. It is based on @ekulyk'sPythonPusherClientand @nlsdfnbchPysher. This is a re-implementation of the project
to use more efficient asynchronous logic and more efficient websockets. A key difference is the dropped support for pre-3.5 Python versions.This is also currently a very minimalistic implementation and may be missing some components, please submit an issue and let me know if you run into any problems.InstallationSimply clone the project and runpython setup.py install- or install via pippip install pysherasync.This module depends on websockets module available from:https://github.com/aaugustin/websocketsExampleExample of using this pusher client to consume websockets:importpysherasyncasyncdefbitstamp_ob_subscription(loop):globalloop# This is your app key, currently set to https://www.bitstamp.net/websocket/appkey="de504dc5763aeef9ff52"# Create an instance of PusherAsyncClient and pass it the appkeypusherclient=pysherasync.PusherAsyncClient(appkey)# Connect to websocketpushersocket=awaitpusherclient.connect()# Subscribe to channelstatus=awaitpusherclient.subscribe(channel_name='order_book')print("Subscription Status:%s"%(status))whileTrue:## This is because re-connection logic is not implemented yetifnotpushersocket.open:# on disconnections, reconnectprint("Connection reconnecting")# re-connectpushersocket=awaitpusherclient.connect()# re-subscribestatus=awaitpusherclient.subscribe(channel_name='order_book')print("Subscription Status:%s"%(status))try:# wait for msgmsg=awaitasyncio.wait_for(pushersocket.recv(),5)# parse to jsonmsg=json.loads(msg)# print the msgifmsg:print(msg)exceptasyncio.TimeoutError:print("asyncio timeout while waiting for ws msg")exceptExceptionase:print(e)if__name__=="__main__":loop=asyncio.new_event_loop()asyncio.set_event_loop(loop)loop.run_until_complete(bitstamp_ob_subscription(loop))loop.close()PerformancePysherAsync relies on websockets which is one of the most efficient implementations on python.ThanksA big thanks to @ekulyk for developing thePythonPusherClientlibrary.A big thanks to @nlsdfnbch for developing thePysherlibrary.A big thanks to @aaugustin for developing theWebSocketslibrary.CopyrightMTI License - See LICENSE for details.ChangelogVersion 0.2FixBug fix for disconnect, added missing awaitVersion 0.1NewFirst Working Version
Package: pyShicy
Py - Shicy LibraryCore library ofThe shicy, a Pyrogram And Telethon based for your userbot.Installationpip3install-Upy-ShicySee more working plugins onthe offical repository!Made with ✨ by@Carddsamss.Licensesip-Userbot is licensed underGNU General Public Licensev3 or later.CreditsDanforPyrogramLonamiforTelethon
Package: pyshield
PyShield - A Python Obfuscate ToolHard Obfuscate Tool For PythonInstallationpip install pyshieldAnd thats it. So east.Quick StartPrinting The Obfuscate Code :pyshield -f <file_to_obfuscate> -l <level_of_obfuscate>Save A File :pyshield -f <file_to_obfuscate> -l <level_of_obfuscate> -o <output_file>As A ModulePrinting The Obfuscated Code :from pyshield import PyShield
result = PyShield.obfuscate(file_path,level)
print(result)FOR WINDOWSfrom pyshield import PyShield
result = PyShield.obfuscate("example.py",3)
open("obfuscated.py","w",encoding="utf8").write(result)
Package: pyshifu
pyshifu=======|Build Status|pyshifu is a Python module for machine learning build on top of java version shifu, which provided large scalability ofbuild high accuracy models with TB level data set in hours.More details about shifu, visit shifu's wiki page: https://github.com/shifuml/shifu/wiki|Shifu Pipeline|pyshifu provided the basic operations in the pipeline above, such as new, init, stats...Installation------------Dependencies~~~~~~~~~~~~shifu requires:- Python(>=2.7 or >=3.3)- Java(>=7.0)shifu Optional:- HadoopPlatform requirement:- Mac- Linux- Windows(>=10586.1007)As pyshifu currently depended on bash script to set environment, so windows without shell support could not workcorrectly. In the future, we will remove all shell script.User installation~~~~~~~~~~~~~~~~~The easiest way to install pyshifu is using pip::pip install pyshifuor use conda::conda install pyshifuDevelopment-----------We welcome new contributors of all experience levels. The shifucommunity goals are to be helpful, welcoming, and effective. The`Contribute Guide <http: shifu.ml="" project="" about="" #how-to-contribute="">`__has detailed information about contributing code, documentation, tests,and more. We've included some basic information in this README.Important links~~~~~~~~~~~~~~~- Official source code repo: https://github.com/ShifuML/pyshifu- Download releases: https://pypi.python.org/pypi/pyshifu- Issue tracker: https://github.com/ShifuML/pyshifu/issuesSource code~~~~~~~~~~~You can check the latest sources with the command:.. code::git clone https://github.com/ShifuML/pyshifu.gitSetting up a development environment~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`Quick tutorial <doc developers="" guide.md="">`__ on how to go about settingup your environment to contribute to pyshifu.Testing~~~~~~~This project intend to make the python code 100% test coverage. You cantest by tox... code::pip install -r requirements-build.txt# run the python teststox -rSubmitting a Pull Request~~~~~~~~~~~~~~~~~~~~~~~~~Before opening a Pull Request, have a look at the full Contributing pageto make sure your code complies with our `Developguide <doc developers="" guide.md="">`__. ## Project History This project isstarted for help user using shifu in python environment.Help and Support----------------Documentation~~~~~~~~~~~~~- User guide: `User guide <doc users="" guide.md="">`__- Develop document: `Develop guide <doc developers="" guide.md="">`__- FAQ page: https://github.com/ShifuML/pyshifu/wiki/FAQ-pageCommunication~~~~~~~~~~~~~You can leave your message here, `MessageBoard <https: github.com="" shifuml="" pyshifu="" wiki="" message-board="">`__.Citation~~~~~~~~If you use scikit-learn in a scientific publication, we would appreciate`Citations <https: github.com="" shifuml="" pyshifu="" wiki="" citations="">`__.Thanks~~~~~~1, Thanks kyhau for python-repo-template project to create an emptypython module. https://github.com/kyhau/python-repo-template.. |Build Status| image:: https://travis-ci.org/wuhaifengdhu/pyshifu.svg?branch=master :target: https://travis-ci.org/wuhaifengdhu/pyshifu.. |Shifu Pipeline| image:: doc/images/pipline/pipline.png
Package: pyshikiapi
pyshikiapiPython wrapper for shikimori APIInstallpip install pyshikiapiUsagefrompyshikiapiimportAPIapp_name='YOUR_APP_NAME'client_id='YOUR_APP_CLIENT_ID'client_secret='YOUR_APP_SECRET'api=API(app_name,client_id,client_secret)print('Please visit the link and copy authorization code:',api.authorization_url)code=input('The code: ')api.fetch_token(code)# Now you can use the api object to send requestsIf you want to save the token to use it later, pass thetoken_update_callbackargument to API:deftoken_file_saver(token):# A function which accepts 1 dict-like argumentwithopen('token.json','w')asf:json.dump(token,f)api=API(app_name,client_id,client_secret,token_update_callback=token_file_saver)Next time you start, load the token:withopen('token.json')asf:token=json.load(f)api=API(app_name,client_id,client_secret,token)Examplesapi.animes.GET(page=2,limit=10)# will send GET-request animes?page=2&limit=10api.animes(5).roles.GET()# will send GET-request animes/5/rolescomment={'body':'hello','commentable_type':'User','commentable_id':4193}api.comments.POST(comment=comment,broadcast=False)
Package: pyshine
pyshineA collection of simply yet high level utilities for Python.InstallationInstalling dependenciesProvided the below python packages are installed, pyshine is completely pip installable.Installing pyshinepip install pyshineTo upgrade to the newest versionpip install --upgrade pyshinepyshine.putBText()putBText(): Put Background Box with TextInputs:
img: cv2 image img
text_offset_x, text_offset_x: X,Y location of text start
vspace, hspace: Vertical and Horizontal space between text and box boundries
font_scale: Font size
background_RGB: Background R,G,B color
text_RGB: Text R,G,B color
font: Font Style e.g. cv2.FONT_HERSHEY_DUPLEX,cv2.FONT_HERSHEY_SIMPLEX,cv2.FONT_HERSHEY_PLAIN,cv2.FONT_HERSHEY_COMPLEX
      cv2.FONT_HERSHEY_TRIPLEX, etc
thickness: Thickness of the text font
alpha: Opacity 0~1 of the box around text
gamma: 0 by default

Output:
img: CV2 image with text and backgroundusageimportpyshineaspsimportcv2image=cv2.imread('lena.jpg')text='HELLO WORLD!'image=ps.putBText(image,text,text_offset_x=20,text_offset_y=20,vspace=10,hspace=10,font_scale=1.0,background_RGB=(228,225,222),text_RGB=(1,1,1))cv2.imshow('Output',image)cv2.waitKey(0)pyshine.audioCapture()audioCapture(): Send or Get the Audio from pc MicrophoneInputs:
mode: 'send' to send the audio chunk data or 'get' to receive the audio data

Output:
audio: Audio data, which can be accessed using audio.get() or send using audio.put()usageimportpyshineaspsmode='send'audio=audioCapture(mode)pyshine.showPlot()showPlot(): Plots the live dataInputs:
audio: audio data obtained 
name: 'Tile of the plot'
length defult 8 times 1024
xmin: default 0 along the x axis
ymin: default -0.5 along the x axis
xmax: default 8*1024 along the y axis
ymax: default 0.5 along the y axis
color: Color of the plot (0,1,0.29)


Output:
show the plot()usageimportpyshineaspsmode='send'audio,context=ps.audioCapture(mode=mode)name='pyshine.com'ps.showPlot(context,name=name)whileTrue:frame=audio.get()pyshine.RPSNETA CNN model for the Keras library, incorporating Rock, Paper, Scissor learnining Network.importpyshineaspsfromkeras.optimizersimportAdam# WIDTH : width of image about 80 pixels# HEIGHT : height of image about 80 pixels# DEPTH : dimensions of image such as 3# NUM_CLASSES : number of classes to classify as outputmodel=ps.RPSNET.build(width=WIDTH,height=HEIGHT,depth=DEPTH,classes=NUM_CLASSES)INIT_LR=1e-3EPOCHS=1000OPT=Adam(lr=INIT_LR,decay=INIT_LR/EPOCHS)model.compile(optimizer=OPT,loss='categorical_crossentropy',metrics=['accuracy'])# data: numpy image array containing data samples# labels: corresponding labels per datamodel.fit(np.array(data),np.array(labels),epochs=EPOCHS)model.save("RPS-model.h5")pred=model.predict(np.array([image]))pyshine.StreamerLow latency video streamer for webcams and raspberry pi camera.​License© 2020 PyShineThis repository is licensed under the MIT license. See LICENSE for details.
Package: pyship
PyShipEnables shipping a python application to end users.PyShip's Major FeaturesFreeze practically any Python applicationCreates an installerUploads application installer and updates to the cloudAutomatic application updating in the background (no user intervention)OS native application (e.g. .exe for Windows)Run on OS startup optionDocumentation and ExamplesLearn PyShip By ExampleShort video on pyship given at Pyninsula
Package: pyShipping
pyShipping provides connections to interface with shipping companies and to transport shipping related information.package - shipping/cargo related calculations based on a unit of shipping (box, crate, package), includes
a bin packing implementation in pure Pythonsendung - defines an abstract shippment (Sendung), with packages and calculations based on thataddressvalidation - check if an address is validcarriers.dpd - calculation of DPD/Georoutes routing data and labels. Included tables are for shippments from Wuppertal but it should work with all other german routing tables. See thisBlogpostabout updating routing information.fortras - tools for reading and writing Fortras messages. Fortras is a EDI standard for logistics related information somewhat common in Germany. SeeWikipediafor further enlightenmentIt also comes with the only python based3D Bin Packingimplementation I’m aware of. The Algorithm has sufficient performance to be used in everyday shipping and warehousing applications.You can get the whole Package athttp://pypi.python.org/pypi/pyShipping..literal:This contains linked in the binpack module code (c) Copyright 1998, 2003, 2005, 2006 by

David Pisinger                        Silvano Martello, Daniele Vigo
DIKU, University of Copenhagen        DEIS, University of Bologna
Universitetsparken 1                  Viale Risorgimento 2
Copenhagen, Denmark                   Bologna, Italy

This code can be used free of charge for research and academic purposes.The rest of the code is BSD Licensed.
Package: pyShipping-python3
pyShipping provides connections to interface with shipping companies and to transport shipping related information.package - shipping/cargo related calculations based on a unit of shipping (box, crate, package), includes
a bin packing implementation in pure Pythonsendung - defines an abstract shippment (Sendung), with packages and calculations based on thataddressvalidation - check if an address is validcarriers.dpd - calculation of DPD/Georoutes routing data and labels. Included tables are for shippments from Wuppertal but it should work with all other german routing tables. See thisBlogpostabout updating routing information.fortras - tools for reading and writing Fortras messages. Fortras is a EDI standard for logistics related information somewhat common in Germany. SeeWikipediafor further enlightenmentIt also comes with the only python based3D Bin Packingimplementation I’m aware of. The Algorithm has sufficient performance to be used in everyday shipping and warehousing applications.You can get the whole Package athttp://pypi.python.org/pypi/pyShippingThis code is BSD Licensed.
Package: pyshk
Pyshk is a python client for the mlkshk.com api.Documentation is available athttp://pyshk.readthedocs.org/en/latest/InstallationInstall withpip install pyshkIn order to get started, you have to sign up for mlkshk (yay!) and create an application on mlkshk.com. First, you’ll need to sign up for an account here:http://mlkshk.com/create-account.Then, create we’ll create an application so that you can use the API. You should do that athttp://mlkshk.com/developers/new-api-application. Give your application a title and a description. Make sure to fill in the “Redirect URL” cause we’ll use that later. The redirect url has to be exactly the same on mlkshk.com and in your code or the server will return a 500 server error when you try to authenticate.Once you click the big “Create It!” button, you’ll be given a “Key” and a “Secret”. Write those down. We’ll need them later.UsageStart a python interpreter and then import the API:from pyshk.api import ApiIf you don’t have an access token (you won’t if this is the first run), start up the API using the Key and Secret from above:a = Api(consumer_key=[Key], consumer_secret=[Secret])
a.get_auth(redirect_uri=[the redirect url from above])At this point, your web browser will open and you’ll be prompted to allow your application (whatever you named it) to access your account. Allow the app access and you’ll be redirected to whatever redirect URL you specified when creating the app. The URL bar will have something likehttp://[redirect_url]?code=[code]. Copy and paste the[code]portion back into the python interpreter and hit enter. You’ll then be given the access code and the access secret; you should write those down so you don’t have to go through this again.At this point, the API is authenticated and you can start making calls to the mlkshk server. If you went through this before and you already have an acces code & secret, you can pass those to the API when you instantiate it. Itl’ll be something like:api = Api(consumer_key='blah',
                  consumer_secret='blahsecretblah',
                  access_token_key='blah',
                  access_token_secret='blahsupersecretblah')API Coverage & Working resources::GET /api/favoritesGET/api/favorites/after/(afterkey)GET/api/favorites/before/(beforekey)GET /api/friendsGET/api/friends/after/(afterkey)GET/api/friends/before/(beforekey)GET /api/incomingGET/api/incoming/(id)/after/(afterkey)GET/api/incoming/(id)/before/(beforekey)GET /api/magicfilesGET/api/magicfiles/(id)/after/(afterkey)GET/api/magicfiles/(id)/before/(beforekey)GET /api/shakesGET/api/shakes/(id)GET/api/shakes/(id)/after/(afterkey)GET/api/shakes/(id)/before/(beforekey)GET/api/sharedfile/(sharekey)POST/api/sharedfile/(sharekey)GET/api/sharedfile/(sharekey)/commentsPOST/api/sharedfile/(sharekey)/commentsPOST/api/sharedfile/(sharekey)/likePOST/api/sharedfile/(sharekey)/saveGET /api/userGET/api/user_id/(user_id)GET/api/user_name/(username)POST /api/uploadNotesPOST /api/uploadreturns a 200 response, not 201 as stated in mlkshk docs.GET/api/user_id/[x]&GET /api/user_name[x]for user x who does not exist raises a 500 Server Error, not 404 as in the API docs.
Package: pyshlang
Every day we stray further from God’s light.What is this?Pysh is a shell-script like language. Like shell scripts it is good for controling the flow of the execution of
programs.This repo contains the implementation of pysh in python.Why would you do this?The aim of pysh is to create an implementation of the posix shell that can run on many platforms. This way, shell
scripts written against pysh do not need to wory about running on differing shells. These shell scripts will have the
same behaviour on every single platform.With pysh it should also be able to sandbox the commands that can be ran, and common useful commands can be replaced
with pysh-provided replacements that will have consistent behaviour across platforms.Also, compilers are just fun to write :)How does it work?Pysh consists of a lexer, a parser, and a pysh bytecode generator. Pysh bytecode can be ran by a pysh interpreter. This
repo is an implementation of all of those components. Maybe later someone could hook pysh up to llvm to create jit/aot
shell scripts? Wait, stop! don’t actually do that! Forget I even said that.Is it done?NoIs it stable? Can I use this in production?Go away