Saravanan666/pypi-org huggingface dataset:
Package: wasmite
What is the Wasmite projectSince WebAssembly is the future of the web. I decide to create Wasmite, a python package for unit-testing your wasm or wat code. Wasmite is based onwasmerand the python standard library packageunittest. Documentation for can be found here:documentation for unittestanddocumentation for wasmerThis project was formerly an extension of my Rust/Python Web framework Wasp, so some section of the code may refer to it's earlier name (Native)Wasmite looks for tests in python files whose names start with test_*.py and runs every test_* function it discovers. The testing folder has more examples.Having any problems or questions create aissue, i will be happy to help :)InstallationThis project requires python 3 and doesn't support 3.9pipinstallwasmiteProject Goals:Import wasm or wat module successfullyAccess functions within moduleType checking of parameters and the result of functionsRelease toPyPifor public to useAllow Wasmite ...Export Python functionsExport Global InstancesExport Memory InstancesMore complex examples in testing folderReceive community on how to improveExamples:c++cwasmwatfromwasmiteimportWasmiteCase,WasmModulefromwasmiteimportFunctionTypes,Function,Global,Value,mainfromwasmiteimportI32defsum(x:int,y:int)->int:""" python function to be imported into WASM  """returnx+yclassTest(WasmiteCase):# create a variable the hold all the functions from a specific wasm file.module=WasmModule("test_wasm.wasm")# import python function into WASM# type annotations on the function is necessarymodule.register("math",{"sum":Function(module.store,sum),"seven":Global(module.store,Value.i32(7),mutable=True)})# start up the module and return the exports (this is mandatory)exports=module.get_exports()deftest_add(self):# test add functionresult=self.exports.add(1,2)self.assertEqual(result,3)deftest_sub(self):# test the sub functionresult=self.exports.sub(2,2)self.assertEqual(result,0)deftest_args_add(self):# check the types for results and parameter of the function "add"# param is I32, I32 and result is I32add_function=self.exports.addself.assertTypes(add_function,FunctionTypes([I32,I32],[I32]))# result will faildeftest_import_sum(self):# test the imported python function sum.sum_function=self.exports.addsum(5,2)self.assertEqual(sum_function,7)deftest_global_read(self):# test reading value of globalread_seven=self.exports.read_global()self.assertEqual(read_seven,7)deftest_global_write(self):# test writing value of globalself.exports.write_global(5)read_seven=self.exports.read_global()self.assertEqual(read_seven,5)# Hi don't forget to add meif__name__=="__main__":main()-->Then you can then run this test like so:# make sure you are in examples/wasm$pythontest_wasm.py

test_add(__main__.Test)...ok
test_args_add(__main__.Test)...ok
test_global_read(__main__.Test)...ok
test_global_write(__main__.Test)...ok
test_import_sum(__main__.Test)...ok
test_sub(__main__.Test)...ok

----------------------------------------------------------------------
Ran6testsin0.001s

OK
Package: wasmpy
wasmpyWebAssembly in Python.Wasmpy is a lightweight layer that sits between Python and WebAssembly. When attempting to import a WebAssembly file, the file is converted into machine code for native speeds.Installingpython3-mpipinstallwasmpyUsageTo get started, first import thewasmpymodule to register the WebAssembly import hooks.Then you can justimport wasm_or_wat_fileto load a WebAssembly module.Usage with Python modules|-  my_module
    |-  __init__.py
    |-  wasm_math.wat# __init__.pyimportwasmpyfrom.wasm_mathimportadd;; wasm_math.wat

(module
    (func (export "add") (param i32 i32) (result i32)
        (i32.add (local.get 0) (local.get 1))
    )
)>>>importmy_module>>>my_module.add(45,960)1005>>>Invalid function namesFunctions exported from WebAssembly can also be accessed from the module by using their name as a key.For exported names that aren't valid Python identifiers or which start with a_, this is the only valid way of accessing these functions.;; wasm_math.wat

(module
    (func (export "add one") (param i32) (result i32)
        (i32.add (local.get 0) (i32.const 1))
    )
)>>>importwasmpy>>>importwasm_math>>>wasm_math["add one"](11)12>>>Building From SourceOn Windows this requires themingw-w64astool to be on PATH.gitclonehttps://github.com/olivi-r/wasmpy.gitcdwasmpy
python3setup.pyassemble
python3-mpipinstall.LimitationsWasmpy is still in active development, and only supports x86/x86-64 Windows and Linux machines and lacks some key features:most memory instructionsmost control instructionsimportstablesGoalsCurrent target:Reach compatability with theMVPFuture GoalsNative support for more architectures, particularly those supported bymanylinuxInterfacing with thePython C APIfrom WebAssembly (in conjunction with the Wasmpy sister projectwasmpy-build) to allow compiled extension modules that are platform independentCompatibility withPyodidePython implementation support for Jython, PyPy etc.Support forWebAssembly proposalsSupport forWASIsnapshots, as well as support for supersets such asWASIX
Package: wasmpy-build
wasmpy-buildThis tool can compile CPython C extension files, such as the ones created by Cython, to WebAssembly so that the extensions are platform independent.This project supports CPython 3.6 to 3.12.The project will automatically downloadwasi-sdkon first use.InstallationInstall from pippipinstallwasmpy-buildor build from sourcegitclone--recurse-submoduleshttps://github.com/olivi-r/wasmpy-buildcdwasmpy-build
pythongenerate.py
python-mpipinstall.UsagePass the file with any extra arguments to the console scripts:Cwasmpy-buildmy_file.c-omy_file.wasmC++wasmpy-build-cppmy_file.cpp-omy_file.wasm
Package: wasm-py-sandbox
Python SandboxThis python sandbox uses wasmer to execute untrusted python code in a sandbox. It is expiremental and limited in functionality. This was designed to be used in an assignment autograder.ComponentsRust WASM layerRustPythonis used as a dependency in the rust part of this library. RustPython doesn't aim to create sandboxed environments but we can create a simple API for interacting with it while it is being run in awasm32-wasiruntime which would effectively sandbox it.We useWAIto generate glue implementations that we can use to interop between a regular Python environment and RustPython.Python LayerThe Python bindings are also generated with WAI and a helper is provided for setup.DevelopmentYou will need Rust andwai-bindgeninstalled fromWAI.To compile the Rust code to a WASI binary, runcargo build --release --target wasm32-wasiReplacepy_sandbox/py_sandbox.wasmwithtarget/wasm32-wasi/release/py_sandbox.wasmafter building to see changes.To build newbindings.pyfromsandbox.wai, runwai-bindgen wasmer-py --import ./sandbox.waiUsagefromwasm_py_sandboximportcreate_sandbox# each sandbox has its own memory.sandbox=create_sandbox()# returns stdout/errstdout=sandbox.exec("""def hello(x):return x + 5""")# result has both stdout/err and return valueresult=sandbox.eval("2+2")print(result.value.value)
Package: wasm-spec-kernel
Wasm Spec KernelA Jupyter kernel for the WebAssembly reference interpreter (seewebassembly/spec).You can try this kernel out in an example notebook using Binder:InstallationWasm Reference InterpreterThis kernel requires aWasm reference interpreterto be available in the environment (e.g. the Wasm interpreter is not distributed with this Python package).You can clone a WebAssembly spec repo and build the interpreter yourself using the OCaml toolchain.@awendland provides a pre-compiled variant of the Wasm reference interpreter with language extensions for abstract types atawendland/webassembly-spec-abstypes.ConfigurationEither:Place the interpreter in your$PATHwith the namewasm, orSpecify the interpreter's location when installing the kernel withpython -m wasm_spec_kernel.install --interpreter wherever_you_stored_the/interpreterJupyter KernelTo install:pipinstallwasm_spec_kernel
python-mwasm_spec_kernel.installTo use it, open up a new Jupyter notebook. For example, via:jupyternotebook# In the notebook interface, select Wasm from the 'New' menujupyterqtconsole--kernelwasm_spec
jupyterconsole--kernelwasm_specPurposeThis exists because the WebAssembly reference interpreter is written in OCaml and OCaml is difficult to compile to WebAssembly (otherwise the latest reference interpreter could be hosted via v1 WebAssembly already available in evergreen web browsers). A Jupyter kernel should assist with sharing WebAssembly code samples leveraging features from the various forks of the WebAssembly specification.How This WorksFor details of how this works, see the Jupyter docs onwrapper kernels, and Pexpect's docs on thereplwrap module. Note that this kernel reimplements thepexpect.replwrap.REPLWrapperclass so that it works better with the Wasm reference interpreter.AcknowledgementsThis was based onbash_kernelby Thomas Kluyver. Tests were adapted fromjupyter/jupyter_clientandipython/ipykernel.
Package: wasp-eureka
WASP EurekaAsynchronous Naive Eureka client for the Netflix OSS/Spring Cloud bundled eureka stack.InstallationNote: this supports Python 3.5+$pipinstallwasp-eurekaIf you want to just run it standalone, include those dependencies:$pipinstallwasp-eureka[standalone]UsageThe surface area of this module is pretty small, effectively you just need to care about thewasp_eureka.EurekaClientclass and its methods:importasynciofromwasp_eurekaimportEurekaClient# no spaces or underscores, this needs to be url-friendlyapp_name='test-app'port=8080# This needs to be an IP accessible by anyone that# may want to discover, connect and/or use your service.ip='127.0.0.1'my_eureka_url='https://service-discovery.mycompany.com/eureka'loop=asyncio.get_event_loop()eureka=EurekaClient(app_name,port,ip,eureka_url=my_eureka_url,loop=loop)asyncdefmain():# Presuming you want your service to be available via eurekaresult=awaiteureka.register()assertresult,'Unable to register'# You need to provide a heartbeat to renew the lease,# otherwise the eureka server will expel the service.# The default is 90s, so any time <90s is okwhileTrue:awaitasyncio.sleep(67)awaiteureka.renew()loop.run_until_complete(main(loop=loop))Creating a ReleaseBumpversionprovides a simplified way to manage versioning, to check the dry run before running it:$bumpversion[patch,minor,major]--dry-run--verbose$bumpversionpatch
Package: wasp-general
[![PyTest Status](https://travis-ci.org/a1ezzz/wasp-general.svg?branch=master)](https://travis-ci.org/a1ezzz/wasp-general)
[![Coverage Status](https://coveralls.io/repos/github/a1ezzz/wasp-general/badge.svg?branch=travis-ci)](https://coveralls.io/github/a1ezzz/wasp-general?branch=travis-ci)
[![Python Version](https://img.shields.io/pypi/pyversions/wasp-general.svg)](https://pypi.python.org/pypi/wasp-general)
[![Documentation Status](https://readthedocs.org/projects/wasp-general/badge/?version=latest)](http://wasp-general.readthedocs.io/en/latest/?badge=latest)Documentation build status:[![Build Status](http://jenkins.home.a1ezzz.ru/buildStatus/icon?job=wasp-general-docs)](https://github.com/a1ezzz/wasp-general)PEP8 compliance (except W191 E266 E265 E731 and maximum length - 119):[![Build Status](http://jenkins.home.a1ezzz.ru/buildStatus/icon?job=wasp-general-pep8)](https://github.com/a1ezzz/wasp-general)# wasp-generalCollection of unrelated functions and classes widely used in different wasp-projects
Package: wasp-launcher
Python applications launcherRelated documentation:https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/index.htmlhttps://pyzmq.readthedocs.io/en/latest/http://zguide.zeromq.org/py:allorhttp://zguide.zeromq.org/page:allhttp://rpymostat.readthedocs.io/en/latest/Discovery.html
Package: wasp-map
wasp_mapUtilites for the mapping pipeline fromWASPInstallationStep 0 (optional):If you wish to specify the locations of the Anaconda3
and/or WASP installations, you can do so through the environment variablesWASP_MAP_ANACONDA_DIRandWASP_MAP_DIR. For example, you could append this
to your.bash_profile:exportWASP_MAP_ANACONDA_DIR=~/anaconda3exportWASP_MAP_DIR=~/WASPIf these environment variables point to already-existing installations of
Anaconda3 and WASP, respectively, then you can skip step 2 (runningwasp_map-download).If you also set environment variableLD_LIBRARY_PATHappropriately, you can
skip step 3 (runningwasp_map-set-ldlib). For example:exportWASP_MAP_ANACONDA_DIR=~/anaconda3exportWASP_MAP_DIR=~/WASPexportLD_LIBRARY_PATH=${WASP_MAP_ANACONDA_DIR}/lib:$LD_LIBRARY_PATHStep 1:install the python package viapip3:pip3installwasp_maporpip3install--userwasp_mapStep 2:Once the python package is installed, runwasp_map-downloadand follow the prompts. Anaconda3 and/or WASP will be installed, if necessary.Step 3:Next, runwasp_map-set-ldliband follow the instruction. It will be something like:Run the following `export` command, or append it to your .bashrc, .profile, or .bash_profile:
export LD_LIBRARY_PATH=/home/aaylward/.local/lib/python3.6/site-packages/wasp_map/anaconda3/lib:$LD_LIBRARY_PATH
Package: wasp-spotify-bindings
WASPWrapper around AppleScript of Spotify in Python.This library provides a simple wrapper around the AppleScript API
of the Spotify application on MacOS.Developed and tested with Python 3.7Installpipinstallwasp-spotify-bindingsTestpythonwasp/tests/test_wasp.py
pythonwasp/tests/test_applescript.pyImportfromwasp_spotify_bindings.coreimportWaspwasp=Wasp()APIGet track metadata.wasp.get_track()returns{'artist':'Rick Astley','album':'Whenever You Need Somebody','disc_number':1,'duration':213573,'played_count':0,'track_number':1,'popularity':75,'id':'spotify:track:4uLU6hMCjMI75M1A2tKUQC','name':'Never Gonna Give You Up','album_artist':'Rick Astley','artwork_url':'http://i.scdn.co/image/15ac2c9091d9b74e841b281ceb23ca8208321444','spotify_url':'spotify:track:4uLU6hMCjMI75M1A2tKUQC'}Get player state.wasp.get_state()returns{"track_id":"spotify:track:4uLU6hMCjMI75M1A2tKUQC","volume":49,"position":3,# seconds"state":"playing"}Start Spotify application.wasp.start_spotify()Quit Spotify application.wasp.quit_spotify()Play next track.wasp.next_track()Play previous track.wasp.previous_track()Play current track.wasp.play()Toggle play/pause on current track.wasp.play_pause()Pause current track.wasp.pause()Set volume to [0-100]wasp.set_volume(volume=10)Play track referred to by spotify id.wasp.play_track(spotify_uri='spotify:track:4uLU6hMCjMI75M1A2tKUQC')Play track in context of an album/playlist.wasp.play_track_in_context(spotify_uri='spotify:track:4uLU6hMCjMI75M1A2tKUQC',context='spotify:track:4uLU6hMCjMI75M1A2tKUQC')Increase volume by 10.wasp.volume_up()Decrease volume by 10.wasp.volume_down()Jump to position in song (seconds).wasp.jump_to(jump_to_second=5)Check if repeat is enabled.wasp.is_repeating()Check if shuffle is enabled.wasp.is_shuffling()Set repeating toTrueorFalse.wasp.set_repeating(set_repeating=True)Set shuffling toTrueorFalse.wasp.set_shuffling(set_shuffling=True)Toggle repeat on/off.wasp.toggle_repeating()Toggle shuffle on/off.wasp.toggle_shuffling()Mute player.wasp.mute()Unmute player.wasp.unmute()
Package: waspy
WASPyWaspy is the python framework for theWASP project.
In other words its an asynchronous "transport-agnostic" web framework.Language agnostic conceptsWhile this framework is for python, the patterns used in wasp are language
agnostic. You should be able to call other services in different languages
assuming they all follow the same patterns. This framework has a pluggable
architecture for the transport layer, which allows you to switch from
http to using a message bus, or vice-versa. You could even listen on both
at the same time without having to modify your code at all.ExampleLook atexamples/folder for some quick examples, or there is an entire example repo athttps://github.com/wasp/waspy-exampleAlphaThis project is currently in alpha state.
There are a lot of features missing.Features for beta:HTTP TransportRoutingRabbitMQ transportySupport middlewaresClient library (for calling other services)HTTP client transport (with envvar service discovery)RabbitMQ client transportTest everythingnote: all alpha features are complete, but I am still in the process of adding more robusts tests. Until that is done, waspy will remain in alpha and api's might change.Wish List:Transport classes for nats (nats.io)Transport classes for kafkaTransport classes for gRPCpattern for synchronous "worker-tier"configuration packageauto-reloading when in debug modesentry integrationjwt handlingFeatures for GA (1.0):High level "Falcon-like" api for writing RESTFUL endpoints even easier!High level can be overridden by lower level for control/performance reasonsStable/proven APILicenseApache-2.0InstallingTo install, just runpip install waspyDevelopingpython setup.py develop
Package: wasserplan
wasserplanis a library for computing 1-Wasserstein distances
betweenGerryChainpartitions.Dependencieswasserplandepends on GerryChain andCVXPY. We recommend
installing these dependencies with Anaconda (see theofficial
GerryChain installation instructions).UsingWe principally use this library to compute pairwise transport distances
which we (approximately) project into 2D Euclidean space. A simple
demonstration of this use case using Virginia congressional districts is
availableas a notebook(open in Colab).PerformanceBy default,wasserplanuses the open-source, lightweightECOS
solver, which is included with CVXPY. However, this solver may exhibit
performance issues for large graphs (thousands of nodes). Performance
can be improved by using a commercial solver such asMOSEK.LicenseThis library is available under the MIT License.
Package: wassersteinwormhole
WassersteinWormhole for Python3Embedding point-clouds by presering Wasserstein distancse with the Wormhole.This implementation is written in Python3 and relies on FLAX, JAX, & JAX-OTT.To install JAX, simply run the command:pip install --upgrade "jax[cuda11_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.htmlAnd to install WassersteinWormhole along with the rest of the requirements:pip install wassersteinwormholeAnd running the Womrhole on your own set of point-clouds is as simple as:from wassersteinwormhole import Wormhole 
WormholeModel = Wormhole(point_clouds = point_clouds)
WormholeModel.train()
Embeddings = WormholeModel.encode(WormholeModel.point_clouds, WormholeModel.masks)For more details, follow tutorial athttps://github.com/dpeerlab/WassersteinWormhole.
Package: wassfast
WASSfast is the next-generation stereo processing pipeline for sea waves 3D reconstruction. It exploits the linear dispertion relation and sparse feature triangulation to resolve sea-surface elevation in quasi real-time. At present state, WASSfast can work in two operating modes:Predict-Update (PU) mode. See thepaperConvolutional Neural Network (CNN) mode (suggested). See thepaperFor the standard pipeline seehttp://www.dais.unive.it/wassNoteDue to TensorFlow version incompatibilities, WASSfast installed via Pypi supports CNN mode only.How to use itInstall via pip:python -m pip install wassfastand runwassfast --helpfor a brief description of the command-line options.Try it with test dataDownload thetest dataExtract the test data7z x wassfast_testdata_256.7z. This will create
a directory namedwassfast_testdata_256Enter the newly extracted directory:cd wassfast_testdata_256Execute WASSfast:wassfast ./input ./config256.mat ./config ./settings.cfg RLTB CNN --batchsize 16 -n 49 -r 15.0 -o output.ncAfter the processing, the NetCDF fileoutput.ncis produced. UsePanoplyto inspect the reconstructed surface.AcknowledgementsThe study was partially supported by the project of Construction of Ocean Research Stations and their Application Studies funded by the Ministry of Oceans and Fisheries, Republic of Korea.LicenseCopyright (C) 2020-2023 Filippo Bergamasco 

WASSfast 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.

WASSfast 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: wassgridsurface
wassgridsurfacewassgridsurface is a tool to interpolate into a uniform grid the scattered
point clouds produced byWASS.UsageAssuming that "./output" is the WASS output dir containing the frames you want to grid:1) Create the gridding output directorymkdir gridding2) Generate grid config file:wassgridsurface --action generategridconfig . gridding3) Edit the grid config fileOpen./gridding/gridconfig.txtwith your favourite editor and set the required values4) Setup the reconstructionwassgridsurface --action setup ./output ./gridding --gridconfig ./gridding/gridconfig.txt --baseline [CAMERA_BASELINE]5) CheckOpen the image./gridding/area_grid.pngto check the extension of the reconstructed area. Return to step 3) to make changes.6) Run the gridding processwassgridsurface --action grid --gridsetup ./gridding/config.mat ./output ./griddingThe resulting NetCDF file can be found in ./gridding/gridded.ncTo get a list of all command-line options:wassgridsurface -h
Package: wassima
Wassima 🔒I named this library after my wife, whom I trust the most. ❤️This project offers you a great alternative tocertifi. It is a simple yet efficient wrapper
around MIT licensedrustls-native-certs.This project allows you to access your original operating system trust store, thus
helping you to verify the remote peer certificates.It works as-is out-of-the-box for MacOS, Windows, and Linux.
Available on PyPy and Python 3.7+If your particular operating system is not supported, we will make this happen! Open
an issue on the repository.For now, it is not supported to call your OS certificate verify native function.
Use your Python native capabilities for it.✨ InstallationUsing pip:pipinstallwassima-UGet startedA)Create a SSLContextimportwassimactx=wassima.create_default_ssl_context()# ... The context magically contain your system root CAs, the rest is up to you!B)Retrieve individually root CAs in a binary form (DER)importwassimacerts=wassima.root_der_certificates()# ... It contains a list of certificate represented in bytesC)Retrieve individually root CAs in a string form (PEM)importwassimacerts=wassima.root_pem_certificates()# ... It contains a list of certificate represented in stringD)Retrieve a single bundle (concatenated) list of PEM certificates likecertifidoesimportwassimabundle=wassima.generate_ca_bundle()# ... It contains a string with all of your root CAs!# It is not a path but the file content itself.C) Register your own CA in addition to the system'simportwassimawassima.register_ca(open("./myrootca.pem","r").read())bundle=wassima.generate_ca_bundle()# ... It contains a string with all of your root CAs, PLUS your own 'myrootca.pem'.# It is not a path but the file content itself.
Package: wasteland-sort
Wasteland-sortWasteland sort is an O(m + n) running time sorting algorithm developed with the intention of creating a general purpose O(n) sorting algorithm.To run the algorithm, call wasteland_sort() and pass in your array to be sorted. The sort is pseudo in-place but unstable. Any element in the array will be replaced. Currently, Wasteland sort only sorts integers, so integer representations of objects can also be sorted, though it won't be very helpful if their hashes aren't unique.If you have questions about the algorithm, feel free to open an issue and I'll get in contact.To import the module, you can use the statementimport wasteland. To directly access the file where wasteland_sort lives, usefrom wasteland import wasteland_sort.Example usagefrom wasteland import wasteland_sort as ws
from typing import List, Tuple

x : List[int] = [645,111234,78,4,72,9,3344,1]
y : List[int] = [645,111234,78,4,72,9,3344,1]

#Calling the wasteland find_extremes() method
least, most = ws.find_extremes(x)

#Calling the wasteland sorting algorithm
ws.sort(x, True)
ws.sort(y, False)

# y = [1, 4, 9, 72, 78, 645, 3344, 111234]
# x = [111234, 3344, 645, 78, 72, 9, 4, 1]
# least = 1
# most = 111234