Saravanan666/pypi-org huggingface dataset:
Package: pylzy
ʎzyʎzy is a platform for a hybrid execution of ML workflows that transparently integrates local and remote runtimes
with the following properties:Python-native SDKAutomatic env (pip/conda) syncK8s-native runtimeResources allocation on-demandEnv-independent results storageQuick startʎzy allows running any python functions on a cluster by annotating them with@opdecorator:@op(gpu_count=1,gpu_type=GpuType.V100.name)deftrain(data_set:Bunch)->CatBoostClassifier:cb_model=CatBoostClassifier(iterations=1000,task_type="GPU",devices='0:1',train_dir='/tmp/catboost')cb_model.fit(data_set.data,data_set.target,verbose=True)returncb_model# local python function callmodel=train(data_set)# remote call on a clusterlzy=Lzy()withlzy.workflow("training"):model=train(data_set)Please read thetutorialfor details.RuntimeCheck out ourkey conceptsandarchitecture intro.CommunityJoin our chaton telegram!DevelopmentDevelopmentguide.DeploymentDeployment guide.YCloud
Package: pym
Summary:The pym module is a console based menu system for Python 3.x+. It outputs provided menu choices with pagination depending on your current terminal size.Example:frompym.menuimportMenuchoices={'option1':'First Option','option2':'Second Option','option3':'Third Option','option4':'Fourth Option','option5':'Fifth Option','option6':'Sixth Option'}menu=Menu('Make your choice:','option1',choices)reply=menu.chooser()menu.pager()
Package: pym2149
pym2149YM2149 emulator supporting YM files, OSC to JACK, PortAudio, WAVInstallThese are generic installation instructions.To use, permanentlyThe quickest way to get started is to install the current release from PyPI:# Tested on Linux and Mac:
pip3 install --user pym2149To use, temporarilyIf you prefer to keep .local clean, install to a virtualenv:python3 -m venv venvname
venvname/bin/pip install pym2149
. venvname/bin/activateTo developFirst clone the repo using HTTP or SSH:git clone https://github.com/combatopera/pym2149.git
git clone git@github.com:combatopera/pym2149.gitNow use pyven's pipify to create a setup.py, which pip can then use to install the project editably:python3 -m venv pyvenvenv
pyvenvenv/bin/pip install pyven
pyvenvenv/bin/pipify pym2149

python3 -m venv venvname
venvname/bin/pip install -e pym2149
. venvname/bin/activateUsage# GitHub trick to download some files to play:
svn export https://github.com/combatopera/pym2149/trunk/contrib

# Play a tune written in the Lurlene live coding language:
lc2jack 'contrib/Jochen Hippel - 7 Gates of Jambala Level 9.py'
lc2portaudio 'contrib/Jochen Hippel - 7 Gates of Jambala Level 9.py'

# Play a Dosound sound effect:
dosound2jack contrib/sounds.s snd19CommandsbpmtoolShow a table of speed (updates per tracker line) to BPM.dosound2jackPlay a Dosound script via JACK.dosound2txtRender a Dosound script to logging.dosound2wavRender a Dosound script to WAV.dsd2wavRender Dosound bytecode to WAV.lc2jackPlay a Lurlene song via JACK.lc2portaudioPlay a Lurlene song via PortAudio.lc2txtRender a Lurlene song to logging.lc2wavRender a Lurlene song to WAV.mkdsdCompile Dosound DSL scripts to bytecode for playback on a real Atari.ym2jackPlay a YM file via JACK.ym2portaudioPlay a YM file via PortAudio.ym2txtRender a YM file to logging.ym2wavRender a YM file to WAV.
Package: pym3u8
pym3u8pym3u8is simple Python 3 lib for downloading online HLS streams and videos.You need only link to m3u8 file with list of ts-files.pym3u8 working with direct connections and socks proxies.InstallationInstall with pip:pip install pym3u8Or download source or clone repository and execute:pip3 install git+https://github.com/ndrwpvlv/pym3u8.gitIf you have some permissions errors try this one:sudo -H pip3 install git+https://github.com/ndrwpvlv/pym3u8.gitBasic usage from cliBasic usage from command linepython3 -m pym3u8 [-h] [-u URL] [-r REFERER] [-f FILENAME] [-e EXTENSION]
              [-a USER_AGENT] [-p PROXY] [-m M3U8_EXT] [-s]

optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     Url of m3u8
  -r REFERER, --referer REFERER
                        Referer url
  -f FILENAME, --filename FILENAME
                        File name for downloading
  -e EXTENSION, --extension EXTENSION
                        Extension of file for downloading
  -a USER_AGENT, --user_agent USER_AGENT
                        User-agent string
  -p PROXY, --proxy PROXY
                        Proxy url
  -m M3U8_EXT, --m3u8_ext M3U8_EXT
                        Custom m3u8 extension
  -s, --ssl_verify      Verify ssl certificatesExample:python3 -m pym3u8 -u "https://example.com/hls/videos/000000/00/000000000/,720P_4000K,480P_2000K,240P_400K,_000000000.mp4.urlset/index-f1-v1-a1.m3u8" -p "socks5://127.0.0.1:1080"Basic usage from macrosfrom pym3u8 import Loader

url = 'https://example.com/videos/ts/0000/0001/playlist.m3u8'
referer = ''
proxy = 'socks5://127.0.0.1:1080'
filename = 'stream'
extension = 'ts'
user_agent='ExampleUA/0.0.1'

loader = Loader(url, referer, proxy=proxy, filename=filename, extension=extension, user_agent=user_agent)
loader.download()RequirementsPython 3.6+

certifi==2019.11.28
chardet==3.0.4
idna==2.8
PySocks==1.7.1
requests==2.22.0
socks==0
urllib3==1.25.8
Package: pymablock
Pymablock: quasi-degenerate perturbation theory in PythonPymablock(Python matrix block-diagonalization) is a Python package that constructs
effective models using quasi-degenerate perturbation theory.
It handles both numerical and symbolic inputs, and it efficiently
block-diagonalizes Hamiltonians with multivariate perturbations to arbitrary
order.Building an effective model using Pymablock is a three step process:Define a HamiltonianCallpymablock.block_diagonalizeRequest the desired order of the effective Hamiltonianfrompymablockimportblock_diagonalize# Define perturbation theoryH_tilde,*_=block_diagonalize([h_0,h_p],subspace_eigenvectors=[vecs_A,vecs_B])# Request correction to the effective HamiltonianH_AA_4=H_tilde[0,0,4]Here is why you should use Pymablock:Do not reinvent the wheelPymablock provides a tested reference implementationApply to any problemPymablock supportsnumpyarrays,scipysparse arrays,sympymatrices and
quantum operatorsSpeed up your codeDue to several optimizations, Pymablock can reliably handle both higher orders
and large HamiltoniansFor more details see the Pymablockdocumentation.
Package: pymacaron
PymacaronPython microservice framework based on Flask, OpenAPI and Celery, deployable
on GKE and BeanstalkPyMacaron's documentation is available athttp://pymacaron.com/.This page dives deeper into internal implementation details.Deep diveBuilt-in endpointsThe following endpoints are built-in into every pymacaron instance, based
onthis swagger specification:# Assuming you did in a separate terminal:
# $ python server.py --port 8080

$ curl http://127.0.0.1:8080/ping
{}

$ curl http://127.0.0.1:8080/version
{
  "apis":["ping"],
  "name": "helloworld",
  "pym_env":"staging",
  "version": "220120-2219-3820-a6f45b",
}

$ curl http://127.0.0.1:8080/auth/version
{
  "error_description": "There is no Authorization header in the HTTP request",
  "error_id": "17f900c8-b456-4a64-8b2b-83c7d36353f6",
  "status": 401,
  "error": "AUTHORIZATION_HEADER_MISSING"
}

$ curl -H "Authorization: Bearer eyJpc3M[...]y8kNg" http://127.0.0.1:8080/auth/version
{
  "apis":["ping"],
  "name": "helloworld",
  "pym_env":"staging",
  "version": "220120-2219-3820-a6f45b",
}Loading api clients from a standalone scriptIt may come very handy within a standalone script to be able to call REST apis
through the pymacaron framework, to get object marshalling and error
handling out of the box. It is done as follows:importflaskfrompymacaronimportapipoolfrompymacaron.exceptionsimportis_error# Declare a Flask app and mock its contextapp=flask.Flask(__name__)withapp.test_request_context(''):# Then load client libraries against a given set of librariesapi=API(app)api.load_clients(apis=['login','search'])# And you can now call those apis seamlessly!result=ApiPool.login.client.do_login(ApiPool.login.model.LoginData(name='foobar',password='youdontwanttoknow'))ifis_error(result):log.error("Oops. Failed to login user")AuthorErwan Lemonniergithub.com/pymacarongithub.com/erwan-lemonnierwww.linkedin.com/in/erwan-lemonnier/
Package: pymacaron-async
pymacaron-asyncAn extension of pymacaron seamlessly adding asynchronous task execution
based on celery/Redis.See more atpymacaron.comNOTE: tests for pymacaron-async are located in pymacaron-helloworld. This is temporary and needs to be fixed.AuthorErwan Lemonniergithub.com/pymacarongithub.com/erwan-lemonnierwww.linkedin.com/in/erwan-lemonnier/
Package: pymacaron-docker
pymacaron-dockerTools for packaging a PyMacaron microservice as a Docker image.See more atpymacaron.comGenerating a new pymacaron/base imageTo generate a new pymacaron/base image, run:./bin/pymdockerbase --pushBy default, the generated new base image gets tagged with a version number
generated from today's date and the commit number.You can see availablepymacaron base images here.To give the most recent image the 'stable' tag, do:First make sure the image is indeed stable by using it as the base image to various pymacaron services for a whileThen give it the stable tag and push back to docker.io:docker pull pymacaron/base:<LATEST_VERSION>
docker tag pymacaron/base:<LATEST_VERSION> pymacaron/base:stable
# Optionally: do 'docker login'
docker push pymacaron/base:stablebin/pymdockerBuild a pymacaron docker image and/or push it to a docker repository. For
details:pymdocker --helpAuthorErwan Lemonniergithub.com/pymacarongithub.com/erwan-lemonnierwww.linkedin.com/in/erwan-lemonnier/
Package: pymacaron-gcp
pymacaron-gcpA deployment pipeline for pymacaron microservices, deploying them as Docker
containers on Google Kubernetes Engine (GKE) or Google Cloud Run (GCR).See more atpymacaron.comAuthorErwan Lemonniergithub.com/pymacarongithub.com/erwan-lemonnierwww.linkedin.com/in/erwan-lemonnier/
Package: pymacaron-google-datastore
pymacaron-google-datastoreAn extension of pymacaron seamlessly adding API object (aka models)
serialisation to and from Google Firestore in Datastore mode.See more atpymacaron.comAuthorErwan Lemonniergithub.com/pymacarongithub.com/erwan-lemonnierwww.linkedin.com/in/erwan-lemonnier/
Package: pymacaron-unit
pymacaron-unitPython library for unittesting json REST apis built withpymacaron, including support for JWT authentication,
Error formats used by pymacaron and compatible with 'pymtest', the
testing tool used in pymacaron microservices.Synopsisfrom pymacaron_unit.testcase import PyMacaronTestCase

    class Tests(PyMacaronTestCase):

        def setUp(self):
            super.setUp()
            self.host = 'api.fixer.io'
            self.port = 80

        def test_make_some_calls(self):

            # Test that GET returns a json structure
            j = self.assertGetReturnJson(
                "v1/hello",
            )

            # Same, with setting the Authorization http header to a JWT token
            j = self.assertGetReturnJson(
                "v1/hello",
                auth="Bearer %s" % self.token
            )

            # Do a POST
            j = self.assertPostReturnJson(
                "v1/hello",
                {
                    'foo': 'bar',
                }
            )Seepymacaron_unit/testcase.pyfor a complete list of test methods.ExamplesSeetest/test_unit.py:-)AuthorErwan Lemonniergithub.com/pymacarongithub.com/erwan-lemonnierwww.linkedin.com/in/erwan-lemonnier/
Package: pymacgen
generates mac addresseshow to..… install# from pypipip3installpymacgen# from githubpip3installgit+https://github.com/smthnspcl/pymacgen# if this repo has been clonedpip3install.… use from clipymacgen--helpusage:pymacgen[-h][-oOUI][-d][-onORGANIZATION_NAME][-mpMAC_PREFIX][-cnCOUNTRY_NAME][-gGENERATE]optionalarguments:-h,--helpshowthishelpmessageandexit-oOUI,--ouiOUIpathtoouifile;willbedownloadedifnotfound-d,--debugenabledebugging-onORGANIZATION_NAME,--organization-nameORGANIZATION_NAMEsearchbyorganizationname;caseinsensitive-mpMAC_PREFIX,--mac-prefixMAC_PREFIXsearchbymacprefix;00-00-00or00:00:00or000000-cnCOUNTRY_NAME,--country-nameCOUNTRY_NAMEsearchbycountryname;caseinsensitive-gGENERATE,--generateGENERATEgeneratearandommacaddressorbyfoundprefix… use from codefrompymacgenimportMACGenerator# these do not need instantiation of the MACGenerator classprint(MACGenerator.by_mac(str("EA:7B:EE:FB:01:42")))print(MACGenerator.by_prefix("42:06:66"))# these utilize the pyoui library, so instantiation of the MACGenerator class is neededm=MACGenerator("/tmp/oui.txt",True)# by company name examplesprint(m.by_organization("national security agency"))print(m.by_organization("samsung"))# by country name examplesprint(m.by_country_code("DE"))print(m.by_country_code("CN"))# by country code examplesprint(m.by_country_name("Germany"))print(m.by_country_name("China"))
Package: py-machineid
py-machineidGet the unique machine ID of any host (without admin privileges).Sponsored by:An open, source-available software licensing and distribution API.InstallInstall usingpip:python3-mpipinstallpy-machineidUsageTo obtain the raw GUID of the device, useid() -> str:importmachineidprint(machineid.id())To obtain an anonymized (hashed) version of the GUID, see below. Thehashed_id(str) -> strfunction takes an optional application ID,
which will ensure a unique ID per-app for the same device.importmachineidprint(machineid.hashed_id('myappid'))print(machineid.hashed_id())Bothid()andhashed_id()accept awinregistry: boolkwarg,
which can be used to disable the registry query on Windows (enabled
by default). Depending on your security posture, disabling the
registry query may help prevent machine fingerprints from
being manually modified by a bad actor.TestingTo run tests, invokeunittest:python3-munittestBuildingTo build a release, run:python3setup.pysdistbdist_wheelPublishingTo publish a release, run:twineuploaddist/*ThanksSpecial thanks to Denis Brodbeck for his Go package,machineid.
Package: pymachinery
Machinery Python SDKPyPIThis is a subset Python implementation of a worker forRichardKnop/machinery.LimitationsBroker is strictly only for RedisBackendResult is strictly only for MongoDBDevelopment EnvironmentUsevenvwith python 3.# ---- Setup$sudoaptinstallpython3python3-venv
$python3-mvenv~/.venv/simcel# ---- Activate venv$source~/.venv/simcel/bin/activate(simcel)$pip3install-rrequirements.txt# ---- Running(simcel)$python3main.pyUsageTo start up machinery instance for Python:frommachineryimportValue,Machinerydefadd(a:Value,b:Value):return(Value("int64",a.value()+b.value()))defmultiply(a:Value,b:Value):return(Value("int64",a.value()*b.value()))defworker(name:Value,delayms:Value):return(Value("string",f"hello{name.value()}"),Value("int64",delayms),)machinery=Machinery(broker_uri="redis://:helloworld@localhost:6379",backend_uri="mongodb://mongo:moonbucks@localhost:27017/?authSource=admin",queue="machinery_tasks",)machinery.register_callback("add",add)machinery.register_callback("multiply",multiply)machinery.register_callback("hello",worker)# Note that start() is a blocking function.machinery.start()To send a machinery task and receive its results:task=machinery.send_task(queue,"add",[Value("int64",30),Value("int64",50)])# Note that wait_for_results() is a blocking function.results=machinery.wait_for_results(task)print(results)# [ Value("int64", 80) ]Creating a WorkerWorkers have these restrictions:Inputs should be of type pymachinery.ValueOutputs should be of type pymachinery.Value, or a tuple of pymachinery.Value
Package: pymacro
pymacroPyMacro is a partial wrapper aroundpyautogui. PyMacro can automate your tasks all inside of Python - give it a try!FeaturesObject orientedExtra utility functionsAsynchronous supportInstallationPyMacro can be easily downloaded with PIP:pip install pymacroYou can install the latest version from this repository, too:pip install git+https://github.com/jay3332/PyMacroExample UsageBasic UsagefrompymacroimportMacromacro=Macro()macro.type("Hello, world!",interval=.15)macro(wait=2)Mouse/keyboard MacrosfrompymacroimportMacromacro=Macro()macro.move_mouse_relative((0,50),seconds=0.5)macro.click()macro.key_press("enter")macro(wait=0.5)Repeat Macro IndefinitelyfrompymacroimportMacromacro=Macro()macro.click()macro(wait=0.5,repeat=0,delay=0.1)# Wait 0.5 seconds before starting the macro.# Repeating 0 times tells pymacro to repeat this macro forever without end.# Delay of 0.1 means to wait 0.1 seconds between every iteration of the loop.Async UsageimportasynciofrompymacroimportMacromacro=Macro()macro.type("Hello, world!",interval=.15)asyncdefrun_macro():awaitmacro.async_run(wait=2)asyncio.run(run_macro())Executing FunctionsfrompymacroimportMacrodeffn():print("This function is running.")macro=Macro()macro.execute(fn,times=5)# execute this function 5 timesmacro()Multi-taskingBecause PyMacro has asynchrounous support, it is possible to run two macros at once in the same program.Multiple Macros at once (asyncio)importpymacroimportasynciomacro1=pymacro.Macro()macro2=pymacro.Macro()defprint_one_to_ten():foriinrange(1,11):print(i)macro1.execute(print_one_to_ten)macro2.execute(print_one_to_ten)loop=asyncio.get_event_loop()loop.create_task(macro1.async_run())loop.create_task(macro2.async_run())Multiple Macros at once (threading)âš  This is not recommended - use asyncio if possible.importpymacroimportthreadingmacro1=pymacro.Macro()macro2=pymacro.Macro()defprint_one_to_ten():foriinrange(1,11):print(i)macro1.execute(print_one_to_ten)macro2.execute(print_one_to_ten)runner1=threading.Thread(target=macro1.run)runner2=threading.Thread(target=macro2.run)runner1.start()runner2.start()TipsSpecial Functionsimportpymacromacro=pymacro.Macro()# Functionsmacro.execute(function,times=1,interval=0,*args,**kwargs)# End the macro earlymacro.end(condition=True,wait=0)macro()
Package: pymacula
Python wrapper module formaculastarspot code:https://www.cfa.harvard.edu/~dkipping/macula.html.InstallationInstall from PyPI:% pip install pymaculaor from the current repository:% git clone https://github.com/timothydmorton/pymacula.git
% cd pymacula
% python setup.py installIf you come across an error in the installation regarding something likeundefined reference to main, then you may have to install with% FFLAGS=-fPIC LDFLAGS=-shared python setup.py installFor usage examples, seeexample notebook.
Package: pymad
pymad - a Python wrapper for the MPEG Audio Decoder librarypymad is a Python module that allows Python programs to use the MPEG Audio Decoder library. pymad provides a high-level API, similar to the pyogg module, which makes reading PCM data from MPEG audio streams a piece of cake.MAD is available athttp://www.mars.org/home/rob/proj/mpeg/Access this module viaimport mad.  To decode
an mp3 stream, you'll want to create amad.MadFileobject and read data from
that.  You can then write the data to a sound device.  See the example
program intest/for a simple mp3 player that uses thepython-pyaowrapper around libao for the sound
device.pymad wrapper isn't as low level as the C MAD API is, for example, you don't
have to concern yourself with fixed point conversion -- this was done to
make pymad easy to use.importsysimportaoimportmadmf=mad.MadFile(sys.argv[1])dev=ao.AudioDevice(0,rate=mf.samplerate())while1:buf=mf.read()ifbufisNone:# eofbreakdev.play(buf,len(buf))The latest release is available for download athttps://pypi.org/project/pymad/or viapip install pymad.  They're replicated on GitHub in the Releases section.To build locally, the usualpython -m buildorpython -m pip install .works.The tests require manual interaction (because you want to listen to the decoded output) and requires PyAO on Linux.
Package: pymadapi
PyMadAPI - MadAPI Python LibraryPyMadAPI is easy-to-use library that uses MadAPI.Installing (requires Git)$pipinstall-Ugit+https://github.com/Team-MadBot/pymadapiBasic usage#!/usr/bin/python# -*- coding: utf-8 -*-frompymadapi.baseimportUserSessionif__name__=='__main__':key='your-api-token'session=UserSession(key)# Create a session to get userinfouser=session.get_userinfo(560529834325966858)# get the user with the `560529834325966858` IDprint(user.is_premium)# display if the user has a MadBot Premium subscriptionLicenseMIT License

Copyright (c) 2023 MadCat9958

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, 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 THE
SOFTWARE.
Package: pymadcad
Py-MADCAD>>> it's time to throw parametric softwares out !Simple yet powerful CAD (Computer Aided Design) library, written with Python.Official websiteInstallationDocumentationRepositoryMatrix communityFeaturessurface generation (3D sketch primitives, extrusion, revolution, inflation, tubes, ...)fast boolean operationscommon mesh file format import/exportkinematic manipulationimplicit geometry definition through the constraint/solver systemobjects display with high-quality graphicsCheckout somecomplete examplesSample usagefrommadcadimport*# define pointsO=vec3(0)A=vec3(2,0,0)B=vec3(1,2,0)C=vec3(0,2,0)# create a list of primitivesline=[Segment(O,A),ArcThrough(A,B,C),Segment(C,O),]# create and solve constraintssolve([Tangent(line[0],line[1],A),Tangent(line[1],line[2],C),Radius(line[1],1.5),],fixed=[O])# generate surfacespart=extrusion(vec3(0,0,1),web(line))# display in a 3D sceneshow([part])The result will be this windowAboutMADCAD is born from the idea that the current approach of parametric CADs for mechanical engineering is not the best possible. This library is part of a project targeting the best possible mechanical design tool for both engineers and handymen. See thecomparisonfor more details.LicenseCopyright 2019-2023 Yves Dejonghejimy.byerley@gmail.comThis library is distributed under the LGPL-v3 license. A copy of that license is provided with this software.