Saravanan666/pypi-org huggingface dataset:
Package: pysflow
A simple sFlow parser library for Python.RequirementsThis project is built and tested against Python 3.6 and 3.7. Older versions
might or might not work. Tests for this are planned to be included in later
releases. The library has no external dependencies and only uses the built-inxdrlibandipaddressfunctions.InstallationTo install the library, run:pip install pysflowor if you have cloned this Git repository, run:python setup.py installUsageA very simple program that uses the library can be found inexample.py.
There is one high-level entry point,sflow.decode(), which takes a byte
array as the argument. It will decode a raw sFlow datagram into a Python dict.
Each component (flow record, data type, etc.) can be used in a stand-alone way
by calling the static.decode()function on the class. This function takes
anxdrlib.Unpackeras an argument.
Package: pysform
Introductionpysform is a library designed to facilitate the rendering/processing/validating
of HTML forms.Featuresvalidation based on FormEncodeattempting to have complete HTML spec coverageextensible rendering system() (don’t have to use it)will work with multiple WSGI frameworks (Werkzeug currently supported)extensiveunit testsfew dependencies: FormEncode, pysutils, WebHelpersCode SampleUsing it might look like this:class MyForm(Form):
    def __init__(self):
        Form.__init__(self, 'myform')

        el = self.add_header('input-els', 'Optional Elements')
        el = self.add_button('button', 'Button', defaultval='PushMe')
        el = self.add_checkbox('checkbox', 'Checkbox')
        el = self.add_file('file', 'File')
        el = self.add_hidden('hidden', defaultval='my hidden val')
        el = self.add_image('image', 'Image', defaultval='my image val', src='images/icons/b_edit.png')
        el = self.add_text('text', 'Text')
        el.add_note('a note')
        el.add_note('an <strong>HTML</strong> note', False)
        el = self.add_text('nolabel', defaultval='No Label')
        el.add_note('a note')
        el = self.add_password('password', 'Password')
        el = self.add_confirm('confirm', 'Confirm Password', match='password')
        el.add_note('confirm characters for password field are automatically masked')
        el = self.add_date('date', 'Date', defaultval=datetime.date(2009, 12, 3))
        el.add_note('note the automatic conversion from datetime object')
        emel = self.add_email('email', 'Email')
        el = self.add_confirm('confirmeml', 'Confirm Email', match=emel)
        el.add_note('note you can confirm with the name of the field or the element object')
        el.add_note('when not confirming password field, characters are not masked')
        el = self.add_time('time', 'Time')
        el = self.add_url('url', 'URL')
        options = [('1', 'one'), ('2','two')]
        el = self.add_select('select', options, 'Select')
        el = self.add_mselect('mselect', options, 'Multi Select')
        el = self.add_textarea('textarea', 'Text Area')
        el = self.add_fixed('fixed', 'Fixed', 'fixed val')
        el = self.add_fixed('fixed-no-label', defaultval = 'fixed no label')
        el = self.add_static('static', 'Static', 'static val')
        el = self.add_static('static-no-label', defaultval='static val no label')and the view/controller code might look something like:class FormTest(HtmlTemplatePage):
    def prep(self):
        self.form = MyForm()

    def post(self):
        if self.form.is_cancel():
            self.assign('cancel', True)
        elif self.form.is_valid():
            self.assign('values', self.form.get_values())
        elif self.form.is_submitted():
            # form was submitted, but invalid
            self.form.assign_user_errors()
        self.default()

    def default(self):
        self.assign('form', self.form)Questions & CommentsPlease visit:http://groups.google.com/group/pyslibsCurrent StatusThe code stays pretty stable, but the API is likely to change in the future.Thepysform tipis installable viaeasy_installwitheasy_installpysform==dev
Package: pysfst
Python bindings for SFST, the Stuttgart Finite State Transducer Tools.SFST is a toolbox for the implementation of morphological analysers and
other tools which are based on finite state transducer technology.
The SFST implementation language is flexible, powerful, and easy to learn.
SFST was written by Helmut Schmid and is available underhttp://www.ims.uni-stuttgart.de/projekte/gramotron/SOFTWARE/SFST.htmlTo learn how to use it in python, you might want to look in the
tests/index.html file for doctest examples.
Package: pysftp-extension
pysftp ExensionThis package extends pysftp by providing the disabled_algorithms option at connection. It solves the problem in this posthttps://stackoverflow.com/questions/70812056/pysftp-fails-with-authentication-failed-and-server-did-not-send-a-server-sig.pysftp is a simple interface to SFTP.  The module offers high level abstractions and
task based routines to handle your SFTP needs.  Checkout the Cook Book, in the
docs, to see what pysftp can do for you.Exampleimport pysftp_extension

with pysftp_extension.Connection('hostname', username='me', password='secret', disabled_algorithms=dict(pubkeys=["rsa-sha2-512", "rsa-sha2-256"])) as sftp:
    with sftp.cd('public'):             # temporarily chdir to public  
        sftp.put('/my/local/filename')  # upload file to public/ on remote
        sftp.get('remote_file')         # get a remote fileSupportsTested on Python 2.7, 3.2, 3.3, 3.4.. image::https://drone.io/bitbucket.org/dundeemt/pysftp/status.png:target:https://drone.io/bitbucket.org/dundeemt/pysftp/latest:alt: Build StatusProject:https://github.com/achillis2/pysftp_extensionDownload:https://github.com/achillis2/pysftp_extensionDocumentation:http://pysftp.rtfd.org/
Package: pysftptail
/  ___|  ___|_   _| ___ \ |      (_) |
 _ __  _   _\ `--.| |_    | | | |_/ / |_ __ _ _| |
| '_ \| | | |`--. \  _|   | | |  __/| __/ _` | | |
| |_) | |_| /\__/ / |     | | | |   | || (_| | | |
| .__/ \__, \____/\_|     \_/ \_|    \__\__,_|_|_|
| |     __/ |                                     
|_|    |___/pysftp-tailpySFTPtail is a Python3 implementaion of the tail command over a sftp connectionUsage# pysftptail script

python3 pysftptail.py -h host -u username -p password -n 5

Usage: pysftptail.py [OPTIONS] FILE_PATH

Options:
  -h, --host TEXT      SFTP host server, prompted if omitted.
  -u, --username TEXT  SFTP username, prompted if omitted.
  -p, --password TEXT  SFTP password, prompted if omitted.
  -n, --lines INTEGER  Output the last n lines.  [default: 5]
  -f, --follow         Output data as the file grows.
  --version            Show the version and exit.
  --help               Show this message and exit.

# Execute tests
pytest
Package: pysg
pysgSimple and lightweight 3D render scene graph for python 3.InstallationInstall the latest version of pysg via pip:pipinstallpysgDocumentationLink documentation.ExamplesCheckout theexamples folder.DependenciesModernGL- OpenGL related stuff.pyrr- Math operations in 3D like matrix multiplication etc.. Fast due to the heavy use ofnumpy.Built WithSPHINX- Used to generate DocumentationLicenseThis project is licensed under the MIT License - see theLICENSEfile for detailsAcknowledgmentsMany thanks to theModernGLandpyrrteams.Also many thanks to thethree.jsdevelopers where I got a lot of inspiration from.TODOImprove render performance (use multi instance rendering)Allow more light sources and add different light types
Package: py_sg
This is a small Python extension which sends arbitrary commands to SCSI devices, via the Linux SCSI Generic driver, which provides the SG_IO ioctl for this purpose.Basically, the module includes two methods, read and write, which
allow you to issue commands to SCSI devices and read and write
accompanying data. If an OS error occurs, the OSError exception will
be raised, while if a SCSI error occurs, the py_sg.SCSIError exception
will be raised.
Package: pysga
pysgaA python adaptation for matlab Search Group Algorithm code.The Search Group Algorithm (SGA) is a metaheuristic optimization method
for nonlinear, nonconvex, nonsmooth, multimodal, bounded optimization
problems. You may also find a tutorial in a pdf file, which is a step by
step explanation about how to use the SGA code. The sections and
equations cited in this file refer to the paper that presented the SGA:M.S. Gonçalves, R.H. Lopez, L.F.F. Miguel, Search group algorithm: A new
metaheuristic method for the optimization of truss structures, Computers
& Structures, 153:165-184, 2015. DOI: 0.1016/j.compstruc.2015.03.003This paper may also be download at Research Gate:https://www.researchgate.net/publication/274253521_Search_group_algorithm_A_new_metaheuristic_method_for_the_optimization_of_truss_structuresor from science direct at:http://www.sciencedirect.com/science/article/pii/S0045794915000851The m-files original codes is provide from:https://www.mathworks.com/matlabcentral/fileexchange/50598-search-group-algorithm-matlab-codeInstallation:Actually is working in python 3.x. The following modules are necessary:* numpy (all)
* kivy (for app only)Use pip to install. For only the function without GUI App:pipinstallpysgaThis will install numpy if necessary.For GUI App:pipinstallpysga[full]This will install the kivy module and dependencies. For any error,
consult de kivy documentation.App example:frompysga.sgaAppimportSearchGroupAlgorithmAppfromkivy.configimportConfigConfig.set('graphics','width','500')Config.set('graphics','height','600')app=SearchGroupAlgorithmApp()app.run()Put a fobj_function.py file in current directory and define your
objective function as fobj function.When run the app, choose the from file option and run the optimizer.Call SGA in python code:See the github website.
Package: pysge
pysge      +     +
    /\         /\     \   O \
   / \\  /\   /\\\     \_/|\_\
  /   \\/ \\ /  \\\       \\
       /   \/    \\\     \/'
      /    /      \\\     \\_
     /    /        \\\     -Call python functions on (IC) SGE batch cluster - with tqdm progress bars.
Designed to work inside a jupyter notebook.How to useDocs.High-level interface use:import pysge

def myfunc(a, b):
    return a + b

tasks = [
    {"task": myfunc, "args": (1, 2), "kwargs": {}},
    {"task": myfunc, "args": (3, 4), "kwargs": {}},
    {"task": myfunc, "args": (5, 6), "kwargs": {}},
]

results = pysge.local_submit(tasks) # single process for loop over tasks - tasks stored in memory
results = pysge.mp_submit(tasks, ncores=3) # multiple processes with a queue for the tasks - tasks stored in memory
results = pysge.sge_submit(tasks, "name", "/tmp/pysge-temporaries", options="-q hep.q") # SGE batch pool queue for the tasks - tasks stored on disk
# WIP: results = pysge.condor_submit(tasks, "name", "/tmp/pysge-temporaries") # Condor batch pool queue for the tasks - tasks stored on disk
print(results) # [3, 7, 11]The return value is a list of results for each task, in order of tasks.How it worksFor SGE batch system a working area is created and the functions + args + kwargs are dilled. A submitter then submits each dilled file to the batch using subprocess. A monitor checks the status of these jobs, waits until all are finished and returns the results.For multiprocessing no working area is needed and the submitter uses multiprocessing.For local no submitter is needed. It just loops over the tasks.
Package: pysgpp
Welcome to SG⁺⁺SG⁺⁺ is a library and framework for sparse grids in different flavors.
SG⁺⁺ supports both hierarchical spatially-adaptive sparse grids and the
dimensionally-adaptive sparse grid combination technique.You are invited to use, contribute, discuss, …The library is free to use, provided proper credit is given.For more details and the API documentation, please visithttp://sgpp.sparsegrids.org.You can find binaries for Linux (deb) and MATLAB support in theSG++ releases.
Package: pysgs
PYSGSThis is a small tool designed as part of learning, allows sending SendGrid messages via SMTPTable of ContentsInstallationSetupHeadersSenderUsagePlain textHTML ContentAttachmentExampleInstallationpip install pysgsSetupimportpysgsservice=pysgs.mailer('SENDGRID_API_KEY')Headerssender="user@example.com"recipient="anotheruser@example.com"subject="This is a Subject!!"service.headers(sender,recipient,subject)SenderThere are different ways to set recipent emails.user@example.comuser@example.com,anotheruser@example.comUseruser@example.comUseruser@example.com, Another Useranotheruser@example.comYou can also send a list of recipientsrecipients=["User <user@example.com>","Another User <anotheruser@example.com>"]UsagePlain textservice.content('Message from sendgrid')service.send()HTML Contentservice.content('<h1>Hello World!</h1>','html')service.send()Attachmentservice.content('/path/to/file/audio.mp3',is_attach=True)service.send()Exampleimportpysgsfrompysgs.exceptionsimportSGSErrortry:"""Start connection"""service=pysgs.mailer("SENDGRID_API_KEY")"""Set message headers"""sender="user@example.com"recipient="anotheruser@example.com"subject="This is a Subject!!"service.headers(sender,recipient,subject)"""Set content"""service.content('Message from sendgrid')service.content('<h1>Hello World!</h1>','html')service.content('/path/to/file/audio.mp3',is_attach=True)"""Send message"""service.send()"""Finish service"""service.close()exceptSGSErrorase:print('There was an error: '+str(e))
Package: pysh
pyshA library of small functions that simplify scripting in pythonInstallationpipinstallpyshUsageshRun a shell command and display the output:sh("git status")Capture the output of a shell command:res=sh("git status",capture=True)print(res.stdout)cdChange the current working directory:cd("path/to/dir")Change the current working directory temporarily:withcd("path/to/dir"):sh("git status")envSet an environment variable:env(var="value")Set an environment variable temporarily:withenv(PGPASSWORD="MyPassword",PGUSER="postgres"):sh("createdb -h localhost -p 5432 -O postgres mydb")whichChecks whether an executable/script/builtin is available:git_is_installed=which("git")
Package: pyshadowserver
PyshadowserverPython library to interact with theShadow ServerReport API.So far it only implements the ASN, malware, Trusted Programs and report queries.APISee thedocumentationand the source code for more information.Unauthenticated queriesfrompyshadowserverimportShadowServer,ShadowServerExceptionss=ShadowServer()ss.asn(origin="8.8.8.8")ss.trusted_program("7fe2248de77813ce850053ed0ce8a474")Querying reportsfrompyshadowserverimportShadowServer,ShadowServerExceptionss=ShadowServer(APIKEY,APISECRET)# Find all reports and save themreports=ss.reports_list()forrinreports:data=ss.reports_download_raw(r["id"])withopen(r["file"],"w+")asf:f.write(data)LicenseThis code is published under MIT license: do whatever you want with it, but don't blame me if it fails (and open a PR)
Package: pyshadoz
Overviewpyshadoz is a pure Python package to read and writeNASA Southern
Hemisphere ADditional
OZonesondes(SHADOZ) data.InstallationThe easiest way to install pyshadoz is via the Pythonpiputility:pipinstallpyshadozRequirementsPython 3. Works with Python 2.7virtualenvDependenciesDependencies are listed inrequirements.txt.
Dependencies are automatically installed during pyshadoz installation.Installing pyshadoz# setup virtualenvvirtualenv--system-site-packages-ppython3pyshadozcdpyshadozsourcebin/activate# clone codebase and installgitclonehttps://github.com/WMO-ET-WDC/pyshadoz.gitcdpyshadozpythonsetup.pybuildpythonsetup.pyinstallRunning# helppyshadoz--help# get versionpyshadoz--version# parse a single shadoz filepyshadoz-f</path/to/shadoz_file># add verbose modepyshadoz-v-f</path/to/shadoz_file># parse a directory of shadoz filespyshadoz-d</path/to/directory># parse a directory of shadoz files recursivelypyshadoz-r-d</path/to/directory>Using the APIfrompyshadozimportSHADOZ# read SHADOZ datawithopen('/path/to/directory')asff:s=SHADOZ(ff)forkey,valueins.metadata:print(key,value)print(s.data_fields)print(s.data_fields_units)print(len(s.data))# get index of a data fieldindex=s.get_data_index('W Dir')# get index of a data field and data field unitindex=s.get_data_index('W Dir','deg')# get all datadata=s.get_data()# get data by indexdata=s.get_data(by_index=index)# get all data by fielddata=s.get_data('W Spd')# get all data by field and unitdata=s.get_data('O3','ppmv')# read SHADOZ data using convenience functions# parse files=load('/path/to/shadoz_file.dat')# returns SHADOZ object# parse stringwithopen('/path/to/shadoz_file.dat')asff:shadoz_string=ff.read()s=loads(shadoz_string)# returns SHADOZ object# write SHADOZ datas=SHADOZ()# build metadata dicts.metadata['NASA/GSFC/SHADOZ Archive']='http://croc.gsfc.nasa.gov/shadoz'....# build data fieldss.data_fields=['Time','Press','Alt','Temp','RH','O3','O3','O3','W Dir','W Spd','T Pump','I O3','GPSLon','GPSLat','GPSAlt']# build data field unitss.data_fields_units=['sec','hPa','km','C','%','mPa','ppmv','du','deg','m/s','C','uA','deg','deg','km']# build datas.data=[[0,1013.85,0.01,24.22,71.0,32.91,32.91,0.0,32.91,5.29,32.91,9000.0,-155.049,19.717,0.041],[0,1013.66,0.012,23.89,70.0,32.79,32.79,0.049,32.79,5.01,32.79,9000.0,-155.049,19.717,0.045]]# serialize data to fileshadoz_data=s.write()withopen('new_shadoz_file.dat','w')asff:ff.write(shadoz_data)DevelopmentRunning Tests# install dev requirementspipinstall-rrequirements-dev.txt# run tests like this:pythonpyshadoz/tests/run_tests.py# or this:pythonsetup.pytest# measure code coveragecoveragerun--source=pyshadoz-munittestpyshadoz.tests.run_testscoveragereport-mReleasingpythonsetup.pysdistbdist_wheel--universaltwineuploaddist/*Code ConventionsPEP8Bugs and IssuesAll bugs, enhancements and issues are managed onGitHub.ContactTom Kralidis
Package: pyshaker
The distributed data-plane testing tool built for OpenStack.Shaker wraps around popular system network testing tools likeiperf,iperf3and netperf (with help offlent).
Shaker is able to deploy OpenStack instances and networks in different
topologies. Shaker scenario specifies the deployment and list of tests
to execute. Additionally tests may be tuned dynamically in command-line.FeaturesUser-defined topology via Heat templatesSimultaneously test execution on multiple instancesInteractive report with stats and chartsBuilt-in SLA verificationDeployment RequirementsShaker server routable from OpenStack cloudAdmin-user access to OpenStack API is preferableRun in Python Environment$pipinstallpyshaker$.openrc$shaker-image-builder$shaker--server-endpoint<host:port>--scenario<scenario>--report<report.html>``where:hostandport- host and port of machine where Shaker is deployedscenario- the scenario to execute, e.g.openstack/perf_l2(catalog)<report.html>- file to store the final reportFull list of parameters is available indocumentation.Shaker in ContainerShaker is available as container at Docker Hub atperforma/shaker$dockerrun-p<port>:<port>-v<artifacts-dir>:/artifactsperforma/shaker--scenario<scenario>--server-endpoint<host:port>--os-auth-url<os-auth-url>--os-username<os-username>--os-password<os-password>--os-project-name<os-project-name>where:hostandport- host and port on machine where Shaker is deployedartifacts-dir- where to store report and raw resultscenario- the scenario to execute, e.g.openstack/perf_l2(catalog)os-XXX- OpenStack cloud credentialsLinksPyPi -https://pypi.org/project/pyshaker/Docker -https://hub.docker.com/r/performa/shaker/Docs -https://pyshaker.readthedocs.io/Bugtracker -https://launchpad.net/shaker
Package: pyshaker-agent
The distributed data-plane testing tool for OpenStack.FeaturesUser-defined topology via Heat templatesSimultaneously test execution on multiple instancesPluggable toolsInteractive report with stats and chartsRequirementsShaker server routable from OpenStack cloudAdmin-user access to OpenStack APISetuppip install pyshaker- installs the tool and all its python dependenciesshaker-image-builder- builds shaker image and stores it in GlanceRunshaker--server-endpoint<host:port>--scenario<scenario.yaml>--report<report.html>where:<host:port>- address of machine where Shaker is deployed and any free port<scenario.yaml>- the scenario to execute; L2, L3 east-west and L3 north-south already included<report.html>- file to store the reportLinksLaunchpad -https://launchpad.net/shaker/Docs -http://pyshaker.readthedocs.org/PyPi -https://pypi.python.org/pypi/pyshaker/
Package: pyshamir
DescriptionPython port of Shamir key Split and Combine methods from Hashicorp Vault.InstallationpipinstallpyshamirUsageSplit & Combinefrompyshamirimportsplit,combineimportsecrets# generate a random secret, here secret is a 32 bytessecret=secrets.token_bytes(32)# set the number of shares; i.e. the number of parts to split the secret intonum_of_shares=5# threshold is minimum number of keys required to get back the secretthreshold=3# split to get a list of bytearrays which can be combined later to get back the secretparts=split(secret,num_of_shares,threshold)# Now, the parts be combined to get back the secretrecomb_secret=combine(parts)ReferencesShamir Secret Sharing | WikipediaGo Implementation | HashiCorp Vault
Package: py-shannon
py-shannonPure Python implementation of Shannon stream cipher. No-brainer port ofshannon.Shannon cipher is used in Spotify Connect to encrypt communication between player and Spotify AP server. Shannon cipher
is variant ofSoberstream cipher.ExampleEncryptionfromshannonimportShannonkey=b"\x65\x87\xd8\x8f\x6c\x32\x9d\x8a\xe4\x6b"message="My secret message".encode("utf-8")shannon=Shannon(key)message=shannon.encrypt(message)# -> bytes# message contains ciphertext nowmac=shannon.finish()# -> bytes# mac contains MAC of the messageDecryptionfromshannonimportShannonkey=b"\x65\x87\xd8\x8f\x6c\x32\x9d\x8a\xe4\x6b"# message is encryptedmessage=b"\x91\x9d\xa9\xb6\x29\xfc\x9c\xdd\x17\x8c\x15\x31\x9a\xae\xcc\x6e\xd4"received_mac=b"\xbe\x7b\xef\x39\xee\xfe\x54\xfd\x8d\xb0\xbc\x6f\xd5\x30\x35\x19"shannon=Shannon(key)message=shannon.decrypt(message)# -> bytes# message contains plaintext nowmac=shannon.finish()ifmac==received_mac:print("MAC OK")
Package: pyshapley
pyshapleyInstallationWithpipfrom PyPi:pip install pyshapleyWithcondain yourenvironment.yml(recommended for reproducible experiments):name:exp01channels:-defaultsdependencies:-pip>=20-pip:-pyshapleyWithpoetry(recommended forprojects) using PyPi:poetry add pyshapleyFrom public GitHub:pip install --upgrade git+ssh://git@github.com:JulianStier/pyshapley.git
Package: py-shardeum-explorer
py-shardeum-explorerA minimal, complete, python API for Shardeum Explorer.UsageInstall the package fromPyPipipinstallpy-shardeum-explorerTo use it in your code, import the py-shardeum-explorer module:fromshardeumexplorerimportShardeumExplorershmexp=ShardeumExplorer("Liberty")//currentlyitsupportstheonlyalphanetTo View Balance of a Specific Address.
It returns the value (in SHM)shmexp.get_account_balance("0x822429119D53055fB11E69213613851ba28bd888")To View Balance of a Multiple Address.
It returns a dictionary where the key is an address and its corresponding value is its balance.shmexp.get_account_balance_multiple(["0x822429119D53055fB11E69213613851ba28bd888","0x73155b7350C500Abd7235d42695F01ff4307a4fa"])To View Total Accounts Existing in the Network.shmexp.total_accounts()Note:This package is still nascent and might be broken with continuous updates on the network. More functionalities will be added to the package soon. Work In Progress. ðŸš§Found Issues/Bugs?Report Issueshere