Saravanan666/pypi-org huggingface dataset:
Package: pylibrb
pylibrbpylibrb (py-lib-rubberband) is a simple Python extension exposingRubber Band Libraryusingnanobindbindings.Since this is not a wrapper around a command-line tool (likepyrubberband), both offline and real-time modes are available.Currently this extenstion exposes only a single class:RubberBandStretcher, which implements all the functionalities of the underlying C++ class. The interface is nearly identical to the original library, with a few changes to make it a bit more Pythonic by:usingsnake_casefor functions, variables and properties, andSNAKE_CASEfor constantsnot using (magic) numbers to represent the stateuseis_done()to see if all the data has been processed and returned from the stretcher, instead ofavailable() == -1usestretcher.formant_scale = pylibrb.AUTO_FORMANT_SCALEinstead ofstretcher.formant_scale = 0Throughout the library, audio is accepted and returned in the form ofNumPyndarrays.ExamplefrompylibrbimportRubberBandStretcher,Option,create_audio_array# create a stretcherstretcher=RubberBandStretcher(sample_rate=16000,channels=1,options=Option.PROCESS_REALTIME|Option.ENGINE_FINER,initial_time_ratio=0.5)stretcher.set_max_process_size(1024)# provide the audio to the stretcher, until some output is availableaudio_in=create_audio_array(channels_num=1,samples_num=1024)whilenotstretcher.available():audio_in[:]=0# get the next batch of samples, here we just use silencestretcher.process(audio_in)# retrieve the available samplesaudio_out=stretcher.retrieve_available()For more instructions, read the docstings of theRubberBandStretcherclass and theOptionenum, or see thedocumentation of Rubber Band Library.
Package: pylibrespot-java
pylibrespot-java Python Libraryversion number: 0.1.0
author: Justin WongOverviewA simple library to interface with a librespot-java server.Installation / UsageTo install use pip:$ pip install pylibrespot-javaOr clone the repo:$ git clone https://github.com/uvjustin/pylibrespot-java.git
$ python setup.py installContributingTBDExampleTBD
Package: pylibretro
pylibretro⚠️ This library is currently (and probably will remain) in asevere pre-alpha state. At the moment it is however able to load the 2048 core, press buttons and get screen output (as you can see below!). However, many callbacks and functions aren't handled, other cores (such as the PCSX ReARMed core) segfault etc. Use at your peril.Installationpip install pylibretro(the only dependency isPillowif you wish to install it manually)UsageYou can create the GIF shown above by using theexample filein this repository. However, here's a condensed, minimal usage example:frompylibretroimportCore,buttonslastframe=Nonedefon_frame(frame):globallastframelastframe=frame# Load the corecore=Core("./2048_libretro.so")core.on_video_refresh=on_framecore.retro_init()core.retro_load_game(None)# Start a 2048 game (by pressing the START button for one frame)core.joystick[buttons.START]=Truecore.retro_run()core.joystick[buttons.START]=False# Run core for 10 framesforiinrange(10):core.retro_run()# Show the last screen outputlastframe.show()Licensespylibretro is licensed underAGPLv3 or later.Credits to Rob Loach fornoarch(which indicated how to call Libretro's API), the RetroArch team forLibretroitself and also the2048 coreincluded within this repository as an example. Their corresponding licenses are also included in thelicense file.
Package: pylibrus
PyLibrusLibrus (polish school e-register) unofficial API client written in Python.Installationpip3 install pylibrusUsage(Replace every field containing 'your' with your data)AuthorizationAuthorize using existing token (load existing tokens pair)orGenerate new OAuth tokenusing user credentials:importpylibrusaccess_token,refresh_token=pylibrus.auth.user_credentials(username="yourusername",password="yourpassword",long_lived=True# optional, if set to True (default) token will be valid for 24h, if set to False token will be valid for 3h)print(access_token,# used to access resourcesrefresh_token# used to regenerate access token without user credentials)using previousely generated refresh token:importpylibrusaccess_token,refresh_token=pylibrus.auth.refresh_token(refresh_token="yourrefreshtoken",long_lived=True# default True (if not specified))print(access_token,refresh_token)Accessing resourcesAccess resources using previousely generated access token (seeAuthorization):importpylibruslib=pylibrus.Librus("youraccesstoken")# previousely generated/cached access tokenjson_res=lib.getResource("YourResourceName")print(json_res)# Raw API response (decoded JSON as dict)List of available resourceshere.ExamplesGet user name using login/password authorization:importpylibruslib=pylibrus.Librus(pylibrus.auth.user_credentials(username="yourusername",password="yourpassword",)[0])names=lib.getResource("Me")["Me"]["User"]print(f"Hello{names['FirstName']}{names['LastName']}")Get number of user's grades using new access token generated using previousely cached refresh token:importpylibruslib=pylibrus.Librus(pylibrus.auth.refresh_token(refresh_token="yourrefreshtoken")[0])grades=lib.getResource("Grades")["Grades"]print(len(grades))ContributeAny pull requests are welcome.
You can set up a development environment like this:git clone https://github.com/YOU/YOUR_FORK.git .
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
Package: py-librus-api
Dokumentacja w języku polskim jesttutaj.py-librus-apiTable of contentsIntroInstalationExmaple usageFunctionsIntroAPI for librus e-register.There is no guarantee of developing this API further more!InstalationSomeday...Example usagefrompy_librus_apiimportLibruslibrus=Librus()"""Loops until user logs in successfully"""whilenotlibrus.logged_in:ifnotlibrus.login(login,password):print("Log in failed! Check your username and/or password!")else:print("Logged in successfully!")# Your code goes hereMore info infunctionsFunctionsRequired params/functions are marked with!prefix.*means that there is explanation below or something is optional.!login(!login, !password)Function returnstrueif logging in was successful andfalsewhen not.login- Variable that contains user login.password- Variable that contains user password.Example usage:librus.login(login_var,password_var)You can check if user is logged in!iflibrus.logged_in:...If user is not logged in, "User not logged in" exception will be raised!If connection error occurs, "Connection error" will be raised!get_lucky_number()Returns lucky number (int).get_grades()For displaying grades in the console, it is recommended to use pretty-print (pprint)!Returns all user grades in this foramt:grades = {
  "Biologia": [
    {
      "Grade": "5",
      "Weight": "3",
      "Category": "Kartkówka",
      'Teacher': {'FirstName': 'Jan', 'LastName': 'Kowalski'},
      "Comment": "kartkówka z działu o płazach",
      "To_the_average": "Tak"
    }
    ...
  ]
  ...
}Note that subject names are in language provided by Librus API (in this example it's polish)get_teachers(mode*)Returns teachers' personal data (firstname, lastname) in couple of formats.
You can choose format like that:librus.get_teachers(mode="print")# etc.List of formats:normal (default){
  1123576: {'FirstName': 'Jan', 'LastName': 'Kowalski'},
  1983456: {'FirstName': 'Grażyna', 'LastName': 'Kowalska'},
  ...
}fullname[
  "Jan Kowalski",
  "Grażyna Kowalska",
  ...
]fullname-id[
  '1476937: Jan Kowalski',
  '1484010: Grazyna Kowalska',
  ...
 ]get_school_free_days()Returns a list of days free from school.
Format:[
    {'DateFrom': '2019-01-01', 'DateTo': '2019-01-01', 'Name': 'Nowy Rok'},
    ...
]get_teacher_free_days()Returns a list of teachers' absence.
Format:[
    {
        'DateFrom': '2018-10-24',
        'DateTo': '2018-10-26',
        'Teacher': {'FirstName': 'Jan', 'LastName': 'Kowalski'},
        'TimeFrom': '13:40:00',
        'TimeTo': '15:15:00',
        'Type': 'szkolenie'
    },
]It can happen thatTimeFromandTimeTowon't exist!get_attendances()Returns attendances in this format:[
{'AddDate': '2018-10-29 12:52:51',
  'AddedBy': {'FirstName': 'Jan', 'LastName': 'Kowalski'},
  'Date': '2018-10-29',
  'Id': 123456,
 'Lesson': {'Subject': 'Chemia',
            'Teacher': {'FirstName': 'Jan', 'LastName': 'Kowalski'}},
 'LessonNo': 6,
 'Semester': 1,
 'Type': {'IsPresenceKind': True,
           'Name': 'Obecność',
           'Order': 1,
           'Short': 'ob',
           'Standard': True}
           }
 ...
]
Package: pylibsass
Pylibsass is a Python wrapper around thelibsasslibrary. The main goal of this
library is to provide an easy way to hook SASS compilation into your projects.It uses the awesomeWatchdoglibrary to
detect filesystem changes and recompile whenever there are changes detected.importpylibsasspylibsass.watch("app/static/scss","app/static/css")InstallationInstallation is easy:$pipinstallpylibsassDocumentationYou can view the documentation onRead the Docs.DevelopmentInstalling from source is easy. It is recommended to do this from within a
virtualenv:$pythonsetup.pydevelopTo run the tests, you do something similar:$pythonsetup.pytestContributingFork it!Create your feature branch (git checkout -b my-new-feature)Commit your changes (git commit -am ‘Added some feature’)Push to the branch (git push origin my-new-feature)Create new Pull Request
Package: pylibscrypt
There are a lot of different scrypt modules for Python, but none of them
have everything that I’d like, so here’s One
More1.FeaturesUses hashlib.scrypt on Python 3.6+ and OpenSSL 1.1+.Uses system libscrypt2as the next choice.If neither is available, tries the scrypt Python
module3or
libsodium4.Offers a pure Python scrypt implementation for when there is no C
scrypt.Not unusably slow, even in pure Python… at least with
pypy5.With PyPy as the interpreter the Python implementation is around one
fifth the speed of C scrypt. With CPython it is about 250x slower.RequirementsPython 3.4+. Equivalent versions of PyPy should also work.For Python 2.7.8+ support install the latest version 1.x instead.If you want speed, you should use one of:Python 3.6+ with OpenSSL 1.1+libscrypt 1.8+ (older may work)py-scrypt 0.6+ (pip install scrypt)libsodium 1.0+UsageYou can install the most recent release from PyPi using:pip install pylibscryptYou most likely want to create MCF hashes and store them somewhere, then
check user-entered passwords against those hashes. For that you only
need to use two functions from the API:from pylibscrypt import scrypt_mcf, scrypt_mcf_check
# Generate an MCF hash with random salt
mcf = scrypt_mcf('Hello World')
# Test it
print(scrypt_mcf_check(mcf, 'Hello World'))   # prints True
print(scrypt_mcf_check(mcf, 'HelloPyWorld'))  # prints FalseFor full API, you can try help(pylibscrypt) from python after importing.It is highly recommended that you use a random salt, i.e. don’t pass
one.VersioningThe package has a version number that can be read from python like so:print(pylibscrypt.__version__)The version number is of the form X.Y.Z, following Semantic
Versioning6. Unreleased
versions include a -git version specifier, e.g. 2.0.0-git < 2.0.0.
Releases are tagged vX.Y.Z and release branches bX.Y.x when they differ
from master.DevelopmentDevelopment happens on
GitHub7. If you find a
bug, please open an issue there.Running pylibscrypt.tests will test all implementations with some quick
tests. Running any implementation directly
(e.g. pylibscrypt.pylibsodium) will also compare to scrypt test vectors
from the paper but this is slow for the pure Python version (pypyscrypt)
unless running with pypy.You can test more comprehensively using the docker test environment.
Either build and run usingmakedocker-runor pull the
jvarho/pylibscrypt image and run usingdocker run-v${PWD}:/appjvarho/pylibscrypt.Pull requests should be automatically tested and will not be merged if
broken.
Package: pylibsdm
pylibsdm - NFC Secure Dynamic Messaging with Pythonpylibsdm is a Python library (SDK) for handling Secure Dynamic Messaging (SDM)
of NFC cards with Python.Secure Dynamic Messaging is a technology that adds security features to
NFC tags using standard mechanisms. While standard NFC data (so-called
NDEF messages, e.g. texts, URLs, etc.) can be written to any compatible
tag, SUN-capable tags can cryptographically sign and optionally also
encrypt parts of the data, which can then still be read by any standard
NFC reader.FeaturesCard management / configurationConfiguration of NDEF file settings (mirrors, offsets, used keys,…)Configuration of NDEF file data (URL)Provisioning of keysBackend implementation for SUN (Secure Unique NFC)Decryption and validation of SDM data (mirrors)Validation of information from URI parametersSupported tagsNTAG 424 DNA(specification)Installation and usagepylibsdmis shipped as a standard Python library and cann be installed
from PyPI:pipinstall"pylibsdm[cli]"Thecliextra installs thesdmutilcommand-line utility, which can
be used as a stand-alone tool to handle tags.Usage as a library in own codeThe following examples show how to usepylibsdmwithin custom
applications. It can, as such, be seen as an SDK for writing SUN-capable
applications.Configuring a tag in codeWe will configure a tag for the following behaviour:Change app keys 1 and 2 to our own keysConfigure write access to NDEF data to need authentication with app key 1Configure SDM to encrypt and sign data with key 2Mirror encrypted PICC data (UID and read counter)Mirror a CMAC for validationfrompylibsdm.tag.ntag424dnaimportTag# We need a working tag object from nfcpynfc_tag=...# Configure the SDM tag object for communicationsdm_tag=Tag(nfc_tag)# Set current master app key nr 0 for authenticationsdm_tag.set_key(0,b"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff")# Change app keys 1 and 2 for later usesdm_tag.change_key(1,16*b"\xaa")sdm_tag.change_key(2,16*b"\xaa")# Configure attributes for mirroringfile_option=FileOption(sdm_enabled=True,comm_mode=CommMode.PLAIN)sdm_options=SDMOptions(uid=True,read_ctr=True,read_ctr_limit=False,enc_file_data=False,tt_status=False,ascii_encoding=True,)# We configure free reading access of NDEF, writing data is limited to app key 1,#  and changing file settings to the master app key 0access_rights=AccessRights(read=AccessCondition.FREE_ACCESS,write=AccessCondition.1,read_write=AccessCondition.KEY_1,change=AccessCondition.KEY_0,)# When reading the NDEF message, app key 2 is used forsdm_acceess_rights=SDMAccessRights(file_read=AccessCondition.KEY_2,meta_read=AccessCondition.KEY_2,ctr_ret=AccessCondition.KEY_2,)# Aggregate options and offsets in NDEF datafile_settings=FileSettings(file_option=file_option,access_rights=access_rights,sdm_options=sdm_options,sdm_access_rights=sdm_acceess_rights,picc_data_offset=32,mac_offset=67,mac_input_offset=67,)sdm_tag.change_file_settings(2,file_settings)
Package: pylibsrtp
What ispylibsrtp?pylibsrtpis a Python wrapper aroundlibsrtp, making it possible to
encrypt and decrypt Secure Real-time Transport Protocol (SRTP) packets from
Python code.SRTP is a profile of the Real-time Transport Protocol (RTP) which provides
confidentiality, message authentication, and replay protection. It is defined
byRFC 3711.You can installpylibsrtpwithpip:$pipinstallpylibsrtpTo learn more aboutpylibsrtppleaseread the documentation.Example#!/usr/bin/env pythonfrompylibsrtpimportPolicy,Sessionkey=(b'\x00'*30)rtp=b'\x80\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'+(b'\xd4'*160)# protect RTPtx_policy=Policy(key=key,ssrc_type=Policy.SSRC_ANY_OUTBOUND)tx_session=Session(policy=tx_policy)srtp=tx_session.protect(rtp)# unprotect RTPrx_policy=Policy(key=key,ssrc_type=Policy.SSRC_ANY_INBOUND)rx_session=Session(policy=rx_policy)rtp2=rx_session.unprotect(srtp)# check roundtrip worked!assertrtp2==rtpBuilding pylibsrtpIf you wish to build pylibsrtp yourself, you will need libsrtp version 2.0 or better.On Debian/Ubuntu run:$aptinstalllibsrtp2-devOn Fedora/CentOS run:$dnfinstalllibsrtp-develOn OS X run:$brewinstallsrtpLicensepylibsrtpis released under theBSD license.
Package: pylibtermkey
pylibtermkeypylibtermkey is a set of Python bindings forlibtermkey, a library for interpreting terminal input.Other Python bindingsare out of date and not easily installable. This project has a few differences:libtermkey is automatically built as part of this projectpybind11 is used for easy bindingunit tests are includedprecompiled wheels are built from this repo and available on PyPIInstallationTo install from PyPI:pip install pylibtermkeyExampleA minimal example of obtaining a keystroke and printing the results:import pylibtermkey_cpp as termkey
tk = termkey.TermKey()

res, key = tk.waitkey()
print(res)
print(tk.strfkey(key, termkey.TermKeyFormat.VIM)Note that, by default, termkey will read from stdin causing python terminal to not display typed characters. It is best to use termkey in an pre-written script rather in a REPL setup (as you will not be able to see what you are typing once termkey is active).For other features, see thetestsor thelibtermkey man pages.BuildingTo build this project:Building from source requires cmake (pip install cmake).python setup.pyUnit testsTo run the unit tests:python setup.py testor use nose:nosetests python/pylibtermkeyLicensingThis project is licensed under theMIT license. It uses thepybind11andlibtermkeyprojects whose licenses can be found in thoseprojects' directories.
Package: pylibtooling
PylibtoolingPylibtooling is a comprehensive Python binding forlibtooling.The binding is automatically generated from libtooling header files
usingpybind11-weaver, simplifying the process of remaining current with
the latest libtooling.InstallationAt present, only Linux builds have been tested.
Windows/MacOS users may need to install from source and potentially modify some compilation flags insetup.pyto
enable successful compilation.From PYPIpipinstallpylibtooling# optional stubspipinstallpyblibtooling-stubsFrom sourcePlease note that compilation may be time-consuming, because LLVM/Clang is built from source.gitclonehttps://gihub.com/edimetia3d/pylibtoolingcdpylibtooling
pipinstall.# optional stubsbash./stubs/build.sh
pipinstall./stubs/dist/*.whlUsageRegarding the Version NumberThe version number adopts the format of{pylibtooling_ver}{clang_ver}, whereinpylibtooling_veris an integer
andclang_verrepresents the version of the underlying libtooling. For example,9817.0.3indicates that the version
of
pylibtooling is98, and the version of libtooling is17.0.3.Raw C APICurrently there is no wrapper around the raw C API.pylibtooling._Cis the pybind11 binding for all the C APIs in libtooling.
Package: py-libtrust
py-libtrust - Yet another docker/libtrust implement by python.Libtrust is library for managing authentication and authorization using public key cryptography.Works for Python 3.6+.UsageInstallYou can install from PyPi.❯pipinstallpy-libtrustExampleSign/Verify a jose-json-web-signatureimportdatetimefromlibtrust.keys.ec_keyimportgenerate_private_keyfromlibtrust.jsonsignimportJSONSignature# Generate a EC P256 private keyec_key=generate_private_key("P-256")your_content={"author":"shabbywu(shabbywu@qq.com)"}# New a JSONSignaturejs=JSONSignature.new(your_content)# signaturejs.sign(ec_key,dt=datetime.datetime.utcfromtimestamp(0))jws=js.to_jws()loaded_js=JSONSignature.from_jws(jws)assertjs==loaded_jsassertjs.verify()==loaded_js.verify()Serialize/Deserialize a self-signed JSON signatureimportjsonimportdatetimefromlibtrust.keys.ec_keyimportgenerate_private_keyfromlibtrust.jsonsignimportJSONSignature# Generate a EC P256 private keyec_key=generate_private_key("P-256")your_content={"author":"shabbywu(shabbywu@qq.com)"}# New a JSONSignaturejs=JSONSignature.new(your_content)# signaturejs.sign(ec_key,dt=datetime.datetime.utcfromtimestamp(0))pretty_signature=js.to_pretty_signature("signatures")loaded_js=js.from_pretty_signature(pretty_signature)assertjs.verify()==loaded_js.verify()assertjson.loads(pretty_signature)["author"]=="shabbywu(shabbywu@qq.com)"Copyright and licenseCode and documentation copyright 2021 shabbywu(shabbywu@qq.com).Code released under the Apache 2.0 license.Referencedocker/libtrustrealityone/libtrust-py
Package: pylibversion
pylibversionA library to help manage versions in python libraries.This package assumes that there is a main package with a__init__.pyfile with theVERSIONdefined as a tuple.For example,VERSION=(0,0,1)UsageString based versionYou can add a string based version as described in (PEP 396)[https://www.python.org/dev/peps/pep-0396/] to your__init__.pyfile or in other locations with theversion_tuple_to_strfunction:frompylibversionimportversion_tuple_to_strVERSION=(0,0,1)__version__=version_tuple_to_str(VERSION)Include the version in setup.pyYou can lookup the module version to include in setup.py with thelookup_local_module_versionfunction:frompylibversionimportlookup_local_module_version...setup(version=lookup_local_module_version(os.path.join("src","module_name")),...)Compare current version to what is published to PyPiYou can compare the current version to what is published in PyPi with thelookup_latest_version_in_pypifunction:deftest_version_has_been_updated():module_name="my_module"pypi_version=lookup_latest_version_in_pypi(module_name)my_version=my_module.__version__assertmy_version!=pypi_version
Package: pylibwrite
OverViewA library that creates a requirements.txt file using only the libraries listed in the python file directly below it．作業環境下(カレントディレクトリ)にあるpythonファイルに記載されている外部パッケージのみを抽出してrequirements.txtを作成するライブラリ．Samplesample python fileimport os
import sys
import json
import re
import math
import requests
import numpy as np
import matplotlib.pyplot as plt
import datetime
import time
import japanize_matplotlib
import pandas as pd
from tomato import tomatoaaaaaaaaas
# import sadaa
# from sdadda
import sqlite3
import emailresult(gen-requirements.txt)japanize-matplotlib
requests
numpy
tomato
pandas
matplotlibTools VersionPython:3.7.6pip:20.2.4How to Install and RunPYPI$ pip install pylibwriteGet the code from the repository and execute it.$ git clonehttps://github.com/Villager-B/pylibwrite.git$ cd pylibwrite$ pip install .$ pylibwritecreate gen-requirements.txtPlease help meCurrently, libraries such as bs4 are rewritten usingpylibwrite/convert_libname.json.I’m sure there are other libraries that don’t work as well.Please let me know.Libraries that are currently supported:lib namepackage namejapanize_matplotlibjapanize-matplotlibbs4beautifulsoup4Development ProcedureCheckout.Follow the steps below to install .pip install -e .
Package: pylicense3
pylicense3Apply license information to a git project.Free software: BSD licenseDocumentation:https://pylicense3.readthedocs.io.FeaturesTODOAfter generating your projectSetup github secrets for pypigithub project settings:PYPI_TOKENfor "real" deploys on git tagsTEST_PYPI_TOKENfor deploys to test.pypi.orgenable project onreadthedocs.orgsetup branch protection+automerge ingithub project settingsFixLive exampleslink aboveCreditsThis package was created withCookiecutterand thedune-gdt/python_cookiecutterproject template.
Package: pylicensemanager
# PylicensemanagerPyLicenseManager is a Python client library for the License Manager for Woocommerce Rest API.## InstallationUse the package manager [pip](https://pypi.org/) to install pylicensemanager.`
pip install pylicensemanager
`## Usage` import pylicensemanager `Review documentation for more information:https://www.licensemanager.at/docs/rest-api/## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.## License
[MIT](https://choosealicense.com/licenses/mit/)