Saravanan666/pypi-org huggingface dataset:
Package: wsp-tools
wsp_toolsUtilities for TEM data analysis and simulation.Features:Single Image TIELorentz TEM simulationsspatial modesamatplotlib.pyplotwrapperan implementation of the CIELAB colorspaceascipy.constantswrapper that allows arbitrary units (i.e., using nanometers instead of meters)InstallationPipAs of version 1.3.1,wsp_toolsis available on PyPi, and can be installed withpip:python-mpipinstallwsp-toolsGitHubwsp_toolscan also be installed directly from GitHub viapipinstall-egit+https://github.com/McMorranLab/wsp_tools#egg=wsp-toolsInstalling in editable mode-eensures thatpip freezerecords the install url, not just the version.You can specify the commit or tag to install, viapipinstall-egit+https://github.com/McMorranLab/wsp_tools@{commitidortagnumber}#egg=wsp_toolsDocumentationAs of version 1.3.1, documentation is available athttps://mcmorranlab.github.io/wsp_tools/.As of version 1.0.94, wsp_tools includes a helper functiondocs(outdir="."), which usespdoc3to auto-generate html documentation and save it to an outdir of your choice, thus avoiding the need to clone this repository just to see the documentation. For example:importwsp_toolswsp_tools.docs("~/Desktop")# generates docs in the folder ~/Desktop/wsp_toolsTestsTests are split into two subdirectories:testsThese are typical unit tests, that assert that functions return the right shape, beam parameters return the right values, etc. Run withpytest.devtestsThese are tests of the actual functionality, that require a trained eye to evaluate. For example, a functiontest_bessel()will generate a bessel beam usingwsp_tools.bessel(), but rather than asserting a unit test, will just plot the bessel beam so the developer can manually assert whether it looks correct. Run as normal.pyscripts.The rationale fordevtestsis that this package is math-heavy, so it's highly possible for the code to run fine, but be wrong. The easiest way to test for this is to check base cases where the developer knows what to look for.
Package: wspyserial
WSPyserialA WSPyserial é uma biblioteca para possibilitar a comunicação entre dispostivos seriais via rede utilizando o protocolo websocket.Sua arquitetura é baseada no modelo cliente/servidor. Onde o Dispotivo serial é o servidor e qualquer cliente que conheca seu endereço e porta pode se comunicar com ele.Uso/Exemplos# python -m wspyserial -husage:__main__.py[-h][-c][-s][-r][-pPORT][-aADDRESS][-dDEVICE][-bBAUDRATE][-v]wspyserial-WebsockettoSerialBridgeoptions:-h,--helpshowthishelpmessageandexit-c,--clientRunasaclient-s,--serverRunasaserver-r,--rawSendrawdata-pPORT,--portPORTPorttolistenon-aADDRESS,--addressADDRESSAddresstoconnectto(default:localhost)-dDEVICE,--deviceDEVICESerialdevicetoconnectto(default:0)-bBAUDRATE,--baudrateBAUDRATEBaudratetouse(default:115200)Server - [Cmdlt, Instance and Context Manager]# Start a server at 8020 with command linepython-mwspyerial-s-p8020# Server as Instancefromwspyserial.serverimportServerimportasyncioasyncdefmain():awaitServer("0.0.0.0",8010,0,115200).run()asyncio.run(main())# Server as context manager]fromwspyserial.serverimportServerimportasyncioasyncdefmain():asyncwithServer("0.0.0.0",8010,0,115200)asserver:awaitasyncio.sleep(10)asyncio.run(main())Client - [Cmdlt, Instance and Context Manager]# Connect a client on server at 0.0.0.0:8010python-mwspyerial-c-a0.0.0.0-p8010# Client as Instancefromwspyserial.clientimportDeviceasClientfromwspyserial.protocolimportpackageimportasyncioasyncdefmain():awaitclient=Client("ws://0.0.0.0:8010")awaitclient.connect()awaitclient.send(package("M114 R",2))awaitclient.stop()asyncio.run(main())# Client as context managerfromwspyserial.clientimportDeviceasClientfromwspyserial.protocolimportpackageimportasyncioasyncdefmain():asyncwithClient("ws://0.0.0.0:8010")asclient:PACKAGES=[package("G28 X",-1,120,"ok"),package("M114 R",2)]forcommandinPACKAGES:awaitclient.send(command)asyncio.run(main())
Package: wsq
A Python library extending Pillow to support WSQ images.This library is a simple wrapper on the NIST Biometric Image Software
(NBIS)
version 5.0.0
made available by the National Institute of Standards and Technology (NIST).For the convenience of the build, the source code of NBIS (or to be more accurate,
the part related to WSQ) is included in this repository.
Apart from minor changes to make possible the build (like removal of some include directives)
the NBIS source code is not changed.Installationwsqis published on PyPI and can be installed from there:pip install -U wsqTo install from source code:pip install build
python -m buildThe Python development library and C compiler must be available. For instance, for Ubuntu:sudo apt install python3-devQuick StartTo open a WSQ image:fromPILimportImageimportwsqimg=Image.open("my_image.wsq")To save a WSQ images, use one of:image.save(f,'WSQ')# orimage.save('test.wsq')To convert from another format:fromPILimportImageimportwsqimg=Image.open("test.png")# Convert to grayscale image (important)img=img.convert("L")img.save("test.wsq")
Package: wsql
WSQLWSQL is an asynchronous python connector to the popularMySQLdatabase server based onWebScaleSQL.The design goals are:Compatibility with Python3 asyncio packageCompliance with Python database API version 2.0[PEP-0249]Thread-safetyThread-friendliness (threads will not block each other)Support mysql-clusters like:Percona-XtraDB-Cluster,GaleraClusterimportwsql.cluster.connect# master:master(active:active)connection=wsql.cluster.connect("master=localhost:3305#2,localhost:3306#2",database="test")# master:slave(active:passive)connection=wsql.cluster.connect("master=localhost;slave=localhost:3307#4",database="test")# read-onlyconnection=wsql.cluster.connect("slave=localhost:3307#4;database=test;")MySQL-5.5 and newer and Python-3.4 and newer are currently supported.Setup dependenciescmake version 2.8.11 or higheropenssl-devel version 1.0 or higherpython3-develzlib-develgccWSQL isFree Software.Documentation.
Package: wsql_sdk
The chain of tools that make work with SQL procedures easier.Syntax#include “<filename>”- include the specified filename, the absolute and relative urls supported.#define name <value>- specify the value, that can be used as$name#define name(arg1, …, argN)- the function, that can be used as$name(a1,…aN)#undef name- undefine previously defined instruction#if condition expression else alternative- conditional expressionsSELECT … ; – > array- hint, that informs about query returns more that one elementSELECT … ; – > object- hint, that informs about query returns exactly one elementCOMMENT “returns union”- hint, to merge all objects from results sets to oneCOMMENT “<table name> (<colum name column type>,…);”- hint, that allow to pass the list of arguments to procedure via temporary tablewsql-trans:The extensions above native SQL.supports:macros#define table_name "mytable"
select * from $table_name;macro-functions#definequote(a)"a"selectupper(quote(a));conditions#definea1#ifa==1select*fromt1;#elseselect*fromt2;#endifincludes#include"common.sql"wsql-codegen:Generate the native code to work with SQL procedures.
Now supports python3 native and aio.
The C++ under development.
RequiredWSQL.HintsSELECT … ; – > array- hint, that informs about query returns more that one elementSELECT … ; – > object- hint, that informs about query returns exactly one elementCOMMENT “returns union”- hint, to merge all objects from results sets to oneCOMMENT “<table name> (<colum name column type>,…);”- hint, that allow to pass the list of arguments to procedure via temporary tableSQLCREATEPROCEDUREtable1.insert(valueVARCHAR(10))BEGININSERTINTOtable1(value)VALUES(value);SELECTLAST_INSERT_ID()ASid;ENDPython3@coroutinedefinsert(connection,value=None):"""
    insert, table1
    :param value: the value(VARCHAR(10), IN))
    :return (id,)
    """@coroutinedef__query(__connection):__cursor=__connection.cursor()try:yield from__cursor.callproc(b"procedure4",(value,))return(yield from__cursor.fetchall())[0]finally:yield from__cursor.close()try:return(yield fromconnection.execute(__query))exceptErrorase:raisehandle_error(exceptions,e)
Package: wsq-parser
wsq_parser (Scraping python pkg)Example №1:fromwsq_parserimportParserclassExampleParser(Parser):defparse(self):self.log("Getting example soup",0)# Logging events [info]example_page_soup=self.get_page(self.URL)# Got soup for urlif__name__=='__main__':ExampleParser("https://example.com/",1)Another examples:ParserMejor,ParserElite
Package: wsrequests
Copyright (c) 2018 denzowPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.Description: # wsrequeststhin wrapper for requests enable websocket.## how to install```bash$ pip install wsrequests```## how to use```pythonfrom wsrequests import WsRequestswsr = WsRequests()# login djangowsr.get('http://localhost:3000')wsr.post('http://localhost:3000',data={'username': 'your name','password': 'your password','csrfmiddlewaretoken': wsr.cookies['csrftoken'],'next': '/',})# connect websocketwsr.connect('ws://localhost:3000/ws/room')wsr.send_message({'message': 'ping'})wsr.receive_message()wsr.disconnect()```Platform: UNKNOWN
Package: wsrpc
By default this will try to use tornadoTo use gevent, set the environment variable: WSRPC_USE_GEVENTMake a web interface to a pizco served object (possibly many objects?)Browser <-> pizco communication is handled by flask-sockets (websocket)For my purposes I need support for:- setting config (dictionary)- checking when config is updated (signal?)- calling member functions- support for concurrent.futuresAdditional things to add would be:- support for general 'remote objects'- support for non-standard json objectsThis interface should support use of knockout.js observables so that:web ui change <-> javascript variable <-> websocket <-> flask <-> pizcoAn alternative is to 'ajaxify' objects directly. Making the pipeline:web ui <-> js <-> ajax <-> flask <-> objectThis limits connections to web protocols. Pizco is more direct.Data values (numbers, strings, arrays, etc) should be mapped as follows:ko.observable <-> hooks to websocket <-> flask <-> pizcoFunctions should be mapped as follows:wrapped js function <-> websocket <-> flask <-> pizcoObjects should be mapped with ko.mappingobject of ko.observables <-> hooks to websocket <-> flask <-> pizcoAs a starting point, lets handle a simple ionode that supports:1) config setting/getting [this is all through configure]2) configure calling3) function returning future callingthis needs:1) mapped observable and signal handling for config2) remote object for function3) same as #2 and future supportuse json rpc on top of websocket protocolclient     ---- serverstartupconnect     ->inspect     -> example proxy objectjs object   <- return proxy object properties, functions, etcfunctionscall method -> call proxy method in greenletresult      <- return result, join greenletsignalsreg signal  -> register for signal in greenletprocess     <- process changed eventprocess     <- process changed eventmany ...if an object is blocking (say camera) Is it ok to just continue to block?I think so, this makes websocket timeout? (seems to be ok with longer polling)Perhaps futures could be handled differently
Package: wsrpc-tornado
Remote Procedure call through WebSocket between browser and tornado.FeaturesInitiating call client function from server side.Calling the server method from the client.Transferring any exceptions from a client side to the server side and vise versa.The frontend-library are well done for usage without any modification.Fully asynchronous server-side functions.Thread-based websocket handler for writing fully-synchronous code (for synchronous database drivers etc.)Protected server-side methods (starts with underline never will be call from clients-side directly)Asynchronous connection protocol. Server or client can call multiple methods with unpredictable ordering of answers.InstallationInstall via pip:pip install wsrpc-tornadoInstall ujson if you want:pip install ujsonSimple usageAdd the backend sidefromtimeimporttime## If you want write async tornado code import it# from from wsrpc import WebSocketRoute, WebSocket, wsrpc_static## else you should use thread-base handlerfromwsrpcimportWebSocketRoute,WebSocketThreadedasWebSocket,wsrpc_statictornado.web.Application((# js static files will available as "/js/wsrpc.min.js".wsrpc_static(r'/js/(.*)'),# WebSocket handler. Client will connect here.(r"/ws/",WebSocket),# Serve other static files(r'/(.*)',tornado.web.StaticFileHandler,{'path':os.path.join(project_root,'static'),'default_filename':'index.html'}),))# This class should be call by client.# Connection object will be have the instance of this class when will call route-alias.classTestRoute(WebSocketRoute):# This method will be executed when client will call route-alias first time.definit(self,**kwargs):# the python __init__ must be return "self". This method might return anything.returnkwargsdefgetEpoch(self):# this method named by camelCase because the client can call it.returntime()# stateful request# this is the route alias TestRoute as "test1"WebSocket.ROUTES['test1']=TestRoute# stateless requestWebSocket.ROUTES['test2']=lambda*a,**kw:True# initialize ThreadPool. Needed when using WebSocketThreaded.WebSocket.init_pool()Add the frontend side<scripttype="text/javascript"src="/js/q.min.js"></script><scripttype="text/javascript"src="/js/wsrpc.min.js"></script><script>varurl=window.location.protocol==="https:"?"wss://":"ws://"+window.location.host+'/ws/';RPC=WSRPC(url,5000);RPC.addRoute('test',function(data){return"Test called";});RPC.connect();RPC.call('test1.getEpoch').then(function(data){console.log(data);},function(error){alert(error);}).done();RPC.call('test2').then(function(data){console.log(data);}).done();</script>Reverse call from Server to Clientbackend:defdo_notify(self):awesome='Notification for you!'yieldself.socket.call('notify',result=awesome)frontend:<script>varurl=(window.location.protocol==="https:"?"wss://":"ws://")+window.location.host+'/ws/';RPC=WSRPC(url,5000);RPC.addRoute('notify',function(data){returndata.result;});RPC.connect();</script>ExampleExample running theredemo.
Package: ws-sdk
[!Warning]This project utitilizes Mend API 1.4. While 1.4 and this project are still supported, Mend is actively moving toward a RESTful standard for APIs. All new development is encouraged to utilizeMend API 2.0. API 2.0 will transition more easily into API 3.0 when it is released with the Mend Unified Platform[Mend Python SDKSDK written in Python to simplify access to Mend resourcesThe SDK contains the following modules:web- Module for accessing Mend Application (reports, administration, etc...).client- UA wrapper layer (download UA, execute scan, read UA output files...).Supported Operating SystemsLinux (Bash):CentOS, Debian, Ubuntu, RedHatWindows (PowerShell):10, 2012, 2016How to install package from PyPiObtain connection details from WS Application (Home > Admin > Integration).Install package from Pypi:pip install ws-sdk.How to build and install package from source (for developers)Download the code:git clone https://github.com/whitesource-ps/ws-sdk.git.Build wheel packagepython setup.py bdist_wheel.Download wheel from GitHub and install :pip install ws-sdk*.whl.ExecutionWS_URL should be the URL for your environment without https:// e.g. saas.whitesourcesoftware.com.USER_KEY needs to be generated on the Mend UI.Generating a user keyORG_TOKEN can be found under the 'Integrate' tab of your Mend UI as API Key.# Unified (can do both WSApp and WSClient)fromws_sdk.webimportWSws=WS(url="WS_URL",user_key="USER_KEY",token="ORG_TOKEN",ua_path="/UA/WORKING/DIR")# Web (Mend Application)fromws_sdk.appimportWSAppws=WSApp(url="WS_URL",user_key="USER_KEY",token="ORG_TOKEN")# Get alertsall_alerts=ws.get_alerts()# Get vulnerabilities report in XLSX formatvul_report=ws.get_vulnerability(report=True)# Get all projects ()project_list=ws.get_projects()# Create user in the organizationws.create_user(name='USER_TEST1',email="USER_TEST1@EMAIL.COM",inviter_email="INVITER@EMAIL.COM")# Client (Mend Unified Agent)fromws_sdk.clientimportWSClientws_client=WSClient(url="WS_URL",user_key="USER_KEY",token="ORG_TOKEN",ua_path="/UA/WORKING/DIR")# Download latest UA jar and conf filews_client.download_ua()# Execute scan into defined project tokenout=ws_client.scan(scan_dir="/PATH/TO/DIR",project_token="PROJ_TOKEN",product_token="PROD_TOKEN")# Read scan artifact's policy rejection summarypol_rej=ws_client.get_policy_rejection_summary()
Package: wsserver-malbizer
Python Package for Websocket Server LiveWebsocketServer built in python.For active server on command line:- Install package with PIP;
- Run command wsserver-malbizer 'port_value_numerical'
- Send JSON string for serve on model:

    {
        "subject": "subject for your message",
        "sender": "id_sender",
        "topic": [], //List of topics to inscribe message
        "payload": "Value for your message (JSON string)",
        "persist": false //indicate if message is persisted and send for new clients
    }For using on python file:- Import wsservermalbizer with WebsocketServer and use the code:

    WebSocketServer(port=port).start()For use Client (command-line):- Run command (if port_value_numerical is 7135):

    wsclient-malbizer "ws://localhost:7135" "topic"

- watch for messages on server websocket;For use Message Sender (command-line):- Run command (if port_value_numerical is 7135):

    wssend-malbizer "ws://localhost:7135" "payload" "subject" "user" "topics,separed,with,comma"


- await command send for server;For use Client (python file):- Import wsservermalbizer with WebsocketClientReceiver and use the code (if port_value_numerical is 7135):

    WebsocketClientReceiver("ws://localhost:7135","topics,separed,with,comma,for,subscribe").receiver()For use Message Sender (python file):- Import wsservermalbizer with WebsocketClientReceiver and use the code (if port_value_numerical is 7135):

    client = WebsocketClientMessage()
    client.sender = "user"
    client.subject = "subject"
    client.payload = "payload JSON"
    client.topics = ["topics","to","send"]
    client.persist = False //True if you need persistance

    sender = WebsocketClientSender(client, "ws://localhost:7135")

    sender.send()
Package: wsshuttle
wsshuttleTunneling into private networks via WinRMUsagepython3 -m wsshuttle -u <username> -i <target jump box> -b <ip for wsshuttle to listen on> -m 192.168.24.0/24How does it work?First, wsshuttle establishes a session on the WinRM service indicatedIt then opens a tcp server listening locally on port 6000An iptables rule (chainwsshuttlein tablenetstat) is added that redirects all traffic to the indicated subnet (-moption)Upon receiving a redirected connection, the original destination of the connection is retrieved, and a TCP listener is openedMeanwhile, a small C# program is uploaded, compiled an executed via PowerShell. It connects to the target service, as well as connecting back to the newly opened TCP listener, and relays traffic between the socketsSimilarly, the TCP listener is connected to the original connection from the user, and the traffic is relayed over multiple hops to the target serviceUpon exiting wsshuttle, thewsshuttleiptables chain is set to return instantly, to prevent traffic from being redirected to a closed port.Error HandlingWinRM does not seem to be suited to long-running sessions. If an error is detected while running a command, wshuttle will throw away the current shell and open a new one. Ifthisfails, the current WinRM session will be discarded, and a new one will be opened. This will be attempted repeatedly - if this process fails 5 times in a row, the connection will be deemed irrecoverable and wsshuttle will exit.
Package: ws-sim868
ws_sim868Interface module for the Waveshare GSM/GPRS/GNSS Pi HatFeaturesHTTP GET and POST requestsAutomatically start Modem if turned offReceive GNSS LocationInstalationpip install ws-sim868OverviewExamples:HTTP Get Requestfromws_sim868.modemUnitimportModemUnitimporttimeif__name__=="__main__":m=ModemUnit()m.apn_config('super','','')m.network_start()res=m.http_get("http://example.com")print(res)whileTrue:time.sleep(0.5)Get Locationfromws_sim868.modemUnitimportModemUnitimporttimeif__name__=="__main__":m=ModemUnit()m.gnss_start()whileTrue:time.sleep(3)print(m.get_gnss_loc())
Package: wsslack.py
An API wrapper with Slack written in Python.Key featureModern Pythonic API usingasyncandawait.API and interactive components of the platform  by utilizing websockets.Document for slack.pyStartupCore APICommand extentionHow to install:warning: If you haveslack_boltinstalled, you cannot import this package. You may have file conflicts.# stable$pipinstallwsslack.py# latest$pipinstallgit+https://github.com/peco2282/slack.pyExampleEvent Referencesimportslackclient=slack.Client(user_token="...",bot_token="...",token="...")@client.eventasyncdefon_message(message:slack.Message):ifmessage.content.startswith("!"):awaitmessage.channel.send("Hello.")@client.eventasyncdefon_channel_create(channel:slack.Channel):awaitchannel.send("Hello!")client.run()on_messageon_channel_createCommands usage.New style of messaging.
If you use app with commands..fromslackimportcommandsbot=commands.Bot(...,prefix="!")@bot.command(name="msg")asyncdefmessage(ctx:commands.Context,*args):awaitctx.channel.send("message received!")@bot.command()asyncdefping(ctx:commands.Context,*args):awaitctx.channel.send("pong!")