Saravanan666/pypi-org huggingface dataset:
Package: libosdp
LibOSDP for PythonThis package exposes the C/C++ library for OSDP devices to python to enable rapid
prototyping of these devices. There are two modules exposed by this package:osdp_sys: A thin wrapper around the C/C++ API; this is a low level API and
is no longer recommended to use this directly.osdp: A wrapper over theosdp_systo provide python friendly API; this
implementation which is now powering the integration testing suit used to test
all changes made to this project.InstallYou can install LibOSDP from PyPI using,pipinstalllibosdpOr, from github,pipinstall-e"git+https://github.com/goToMain/libosdp#egg=libosdp&subdirectory=python"Or, from source using,gitclonehttps://github.com/goToMain/libosdp--recurse-submodulescdlibosdp/python
python3setup.pyinstallQuick StartControl Panel Mode# populate osdp_pd_info_t from pythonpd_info=[PDInfo(101,scbk=KeyStore.gen_key(),name='chn-0'),]# Create a CP device and kick-off the handler thread and wait till a secure# channel is established.cp=ControlPanel(pd_info,log_level=LogLevel.Debug)cp.start()cp.sc_wait_all()whileTrue:## Check if we have an event from PDled_cmd={...}event=cp.get_event(pd_info[0].address)ifevent:print(f"CP: Received event{event}")# Send LED command to PD-0cp.send_command(pd_info[0].address,led_cmd)seeexamples/cp_app.pyfor more details.Peripheral Device mode:# Describe the PD (setting scbk=None puts the PD in install mode)pd_info=PDInfo(101,scbk=None,name='chn-0')# Indicate the PD's capabilities to LibOSDP.pd_cap=PDCapabilities()# Create a PD device and kick-off the handler thread and wait till a secure# channel is established.pd=PeripheralDevice(pd_info,pd_cap)pd.start()pd.sc_wait()whileTrue:# Send a card read event to CPcard_event={...}pd.notify_event(card_event)# Check if we have any commands from the CPcmd=pd.get_command()ifcmd:print(f"PD: Received command:{cmd}")seeexamples/pd_app.pyfor more details.
Package: libp2p-go
libp2p-go使用Go版本的libp2p接口完成的python实现。安装二进制版本：pipinstalllibp2p-goexamples示例脚本可以在根目录执行，比如:pdmrunpython-mexamples.echo手动编译安装、开发执行cgo编译脚本：pdmcgo构建wheel（包含了cgo编译脚本）：pdminstall-Gbuild
pdmbuild
Package: libpam_hotp
libpam-hotp is a PAM (Pluggable Authentication Modules) module written
in Python to authenticate users using an OTP (One Time Password) generated
with the HOTP algorithm.1. Installationlibpam-hotp depend of libpam-python which is packaged into all major distro.
The module have been tested with Python 2.6, maybe it also work with 2.5,
and certainly with 2.7 version.After installing the dependencies, you can drop pam_hotp.py into
/lib/security directory.Next step is to setup PAM, and create a file with all your token seeds.2. Configuration of PAMlibpam-hotp use libpam-python, the latter is actually the called module
for PAM, thereby, your rule line will look like this:auth    [POLICY]      pam_python.so pam_hotp.py [OPTIONS]Available options are:file: path to file that store user login - secret seeds mapping
(default to /etc/hotp).Example:auth    sufficient    pam_python.so pam_hotp.py file=/etc/hotp_sshNOTE: This module only provide the AUTH mecanism.3. Seeds file:Seed file store the mapping between an user login and the secret seed code
of user’s token.Each line of this file is an association, each field is separated by an
“:” char. The three first fields are mandatory:User loginSecret seed code (encoded in hexadecimal form)The number of seconds for a period (see your token datasheet)You can add two additionals fields:The maximum allowed number of drift periodsAn hash, used to prompt an additionnal password to the user.The hash is encoded with it salt with this format: SALT$HASH,
hash function is SHA1(CONCAT(PASSWORD, SALT)).Example:Here is a complete example for the user stallman, with a token-period
of 30 seconds, a maximum drift of 3 periods, and an additionnal password
“richard”:stallman:11223344556677889900AABBCCDDEEFF:30:3:6jsd3$1b6a67161e1cca2b1cd014c59b5bc907435cf8e7
Package: libparse
libparse-pythonA SWIG-based Python wrapper aroundYosys'slibparse, for all your lib file parsing needs.RequirementsRunningUNIX or UNIX-like operating system (Windows untested)Python 3.6+ (CPython or PyPy) with PIPpython3 -m pip install wheelBuildingRunning requirements +A C++11 compilerGNU MakeSWIGLicenseApache 2.0. Check 'License'.AcknowledgementslibparsefromYosysused under the following conditions:Copyright (C) 2012 - 2020  Claire Xenia Wolf <claire@yosyshq.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.stdio_filebuffromAndroid Frameworksused under the following conditions:Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
Copyright (c) 2016 Google, Inc.

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.TheCREDITS.TXTin question could not be located.
Package: libparsing
libparsingis a parsing element grammar (PEG) library written in C
withPython bindings. It offers good performance while allowing for a
lot of flexibility. It is mainly intended to be used to create
programming languages and software engineering tools.As opposed to more traditional parsing techniques, the grammar is not
compiled but constructed using an API that allows for the dynamic update
of the grammar.The parser does not do any tokeninzation, instead, an input stream is
consumed and parsing elements are dynamically asked to match the next
element of it. Once parsing elements match, the resulting matched input
is processed and an action is triggered.libparsingsupports the following features:backtracking, ie. going back in the input stream if a match is not
foundcherry-picking, ie. skipping unrecognized inputcontextual rules, ie. a rule that will match or not depending on
external variablesParsing elements are usually slower than compiled or FSM-based parsers
as they trade performance for flexibility. It’s probably not a great
idea to uselibparsingif the parsing has to happen as fast as
possible (ie. a protocol implementation), but it is a great use for
programming languages, as it opens up the door to dynamic syntax
plug-ins and multiple language embedding.If you’re interested in PEG, you can start reading Brian Ford’s original
article. Projects such as PEG/LEG by Ian Piumartahttp://piumarta.com/software/peg/,OMeta by Alessandro Warthhttp://www.tinlizzie.org/ometa/or Haskell’s Parsec libraryhttps://www.haskell.org/haskellwiki/Parsecare of particular interest in
the field.Here is a short example of what creating a simple grammar looks like in
Python:g = Grammar()
s = g.symbols
g.token("WS",       "\s+")
g.token("NUMBER",   "\d+(\.\d+)?")
g.token("VARIABLE", "\w+")
g.token("OPERATOR", "[\/\+\-\*]")
g.group("Value",     s.NUMBER, s.VARIABLE)
g.rule("Suffix",     s.OPERATOR._as("operator"), s.Value._as("value"))
g.rule("Expression", s.Value, s.Suffix.zeroOrMore())
g.axiom(s.Expression)
g.skip(s.WS)
match = g.parseString("10 + 20 / 5")and the equivalent code in CGrammar* g = Grammar_new()
SYMBOL(WS,         TOKEN("\\s+"))
SYMBOL(NUMBER,     TOKEN("\\d+(\\.\\d+)?"))
SYMBOL(VARIABLE,   TOKEN("\\w+"))
SYMBOL(OPERATOR,   GROUP("[\\/\\+\\-\\*]"))
SYMBOL(Value,      GOUP(_S(NUMBER), _S(VARIABLE)))
SYMBOL(Suffix,     RULE(_AS(_S(OPERATOR), "operator"), _AS(_S(Value), "value")))
SYMBOL(Expression, RULE(_S(Value), _MO(Suffix))
g->axiom = s_Expression;
g->skip(s_WS);
Grammar_prepare(g);
Match* match = Grammar_parseString(g, "10 + 20 / 5")
Package: libpci
FeaturesFree software: LGPLv3 licenseDocumentation:https://libpci.readthedocs.org.Use high-level, pythonic APIs to work with libpciHistory0.2 (2015-04-24)Use sub-commands for easier extensibility and less ambiguity.Move all flag control options to the ‘pci-lookup’ command.Move the PCI device and vendor name look up to their own sub-commands.Add LibPCI.lookup_subsystem_device_name().Add ‘subsystem-device’ sub-command.0.1.1 (2015-04-23)Fix architecture detection bug that prevented libpci from working on Fedora.0.1 (2015-04-23)First release on PyPI.
Package: libpebble2
libpebble2 is a python library for interacting with Pebble devices. It:Supports connections to Pebble QEMU instances and to watches via the Pebble mobile app or Bluetooth serial.Supports connection to watches running both 2.x and 3.x firmware on aplite or basalt hardwareProvides automatic serialisation and deserialisation of pebble protocol messagesAsynchronous information is provided by a usable event systemFeatures a simple DSL for defining new message typesProvides ready-made implementations several Pebble Protocol services, including BlobDB and app installationWorks on Python 2.7 and 3.4Installationpip install libpebble2Or, grab the source fromhttps://github.com/pebble/libpebble2and:python setup.py installDocumentationOver here!
Package: libphpphar
libphppharA port of PHP's Phar class, in pure pythonInstallationpip install libphpphar(not available yet)FeaturesPhar generation with python, no more annoyingphar.readonly = Offuseslibphpserializefor metadata serializationExamplefromdatetimeimportdatetimefromioimportBytesIOfromphppharimportPhar,PharIOPharfromphpserializeimportPHP_Class# for (un)serializing the metadatasclassVulnerableObject(PHP_Class):passwithopen("app.phar","rb")asf:original=f.read()archive:Phar=Phar.from_bytes(original)# simply `archive = Phar()` if you want to start from scratchprint(archive.metadata)forentryinarchive.entries:print(f'{entry.permissions}\t{entry.size}\t{datetime.fromtimestamp(entry.timestamp)}\t{entry.name}')output=bytes(archive)assertoriginal==outputImportantthe code is written and tested under python 3.9+
Package: libphpserialize
libphpserializeA port of PHP's serialize function, in pure pythonInstallationpip install libphpserializeFeaturesserialize objects directly from python objectsnested objectsnamespacingvariable Access Modifiers (public, private, protected)Examplefromphpserializeimportserializefromphpserialize.decoratorsimportnamespaceimportrequests@namespace('Faker')classGenerator:protected_formatters={'dispatch':'system'}@namespace('Illuminate\Broadcasting')classPendingBroadcast:protected_event='ls'protected_events=Generator()print(serialize(PendingBroadcast()))with above code, you'll get:O:40:"Illuminate\Broadcasting\PendingBroadcast":2:{s:9:"*events";O:15:"Faker\Generator":1:{s:13:"*formatters";a:1:{s:8:"dispatch";s:6:"system";}}s:8:"*event";s:2:"ls";}which triggers an RCE vulnerability in Laravel 5.4.27nice when you're writing an exploit script for others to readImportant:the code is written and tested under python 3.7+decimal serialization doesn't work the same as PHP does, yetTODOrecursive objects supportreimplement decimal precision calculating algorithm from php engine
Package: libpitlakq
Compiled Fortan code of CE-QUAL-W2 for PITLAKQFeaturesTODORequirementsTODOInstallationYou can installCompiled Fortan code of CE-QAUL-W2 for PITLAKQviapipfromPyPI:$pipinstalllibpitlakqUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,Compiled Fortan code of CE-QUAL-W2 for PITLAKQis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: libpkuipgw
libpkuipgwA library for accessing the Internet through Peking University's Internet service.InstallingThe recommended way is to use pip to installpip3install--userlibpkuipgwUsageFirst, initialize anIPGWClientobject:import libpkuipgw
cli = libpkuipgw.IPGWClient(username, password)To connect to the Internet, callcli.connect()To check connectivity to the Internet, callcli.check_connectivity()To disconnect this device, callcli.disconnect()To disconnect device with specific IP, make the call likecli.disconnect("10.2.111.111")To disconnect all devices, callcli.disconnect_all()To get all the connections available:cli.get_connections()All operations returnsIPGWStatusobjects. For example, forget_connections:$res=cli.get_connections()$reslibpkuipgw.IPGWStatus(operation="list",status="success",description="",data=[{'ip':'10.2.111.111','location':'22楼','login_time':'2018-08-08T22:22:22+08'},{'ip':'10.2.222.222','location':'33楼','login_time':'2018-08-08T11:11:11+08'}])The time format is ISO8601 compliant.If something goes wrong, returns a status of "error".
Package: libpointing
Python binding for libpointing librarypip install libpointingVisitlibpointing.orgto know more about the library and thePython bindingHere is a minimal example:from libpointing import PointingDevice, DisplayDevice, TransferFunction
from libpointing import PointingDeviceManager, PointingDeviceDescriptor

import sys

def cb_man(desc, wasAdded):
	print(desc)
	print("was added" if wasAdded else "was removed")


pm = PointingDeviceManager()
PointingDevice.idle(100)
pm.addDeviceUpdateCallback(cb_man)

for desc in pm:
	print(desc)

"""
for desc in pm:
	print desc.devURI
	print desc.vendor, desc.product
	pdev = PointingDevice(desc.uri)
"""

pdev = PointingDevice(b"any:")
ddev = DisplayDevice.create("any:")
tfct = TransferFunction(b"system:", pdev, ddev)

def cb_fct(timestamp, dx, dy, button):
    rx,ry=tfct.applyd(dx, dy, timestamp)
    print("%s: %d %d %d -> %.2f %.2f"%(str(timestamp), dx, dy, button, rx, ry ))
    sys.stdout.flush()

pdev.setCallback(cb_fct)
print("Move the mouse of Press CTRL+C to exit")
for i in range(0, 10000):
    PointingDevice.idle(1)
Package: lib-prep
# LibPrep
Python package to analyse and prepare libraries of chemical compounds for molecular simulations.## Dependences
- Python 3.7
- Rdkit 2019.03.4
- Schrodinger 2019 (Optional)# Programs available
## convert_sdfs2pdb.py
Program to transform 3D SDF files with large amount of molecular compounds to several PDBs, renaming also chains, resnames, and resnums to the desired ones.Example of usage:python convert_sdfs2pdb.py library.sdf –out_folder library_in_pdb –chain L –resname LIG –resnum 1For more information:python convert_sdfs2pdb.py -h## FragmentTools/prepare_to_frag.py
Program to prepare FragPELE instruction’s from PDB libraries.Exaple of usage:python FragmentTools/prepare_to_frag.py /path/to/library /path/to/complex.pdb C1 -m first-occurrence -o /out/path/instructions.confFor more information:python FragmentTools/prepare_to_frag.py -h
Package: libpresign
LibpresignSingle-purpose library created for generating AWS S3 presigned URLs fast.Implemented in C++ using OpenSSL 3.1.MotoBoto3 is heavy dependency if you just want to create a presigned URL. And it's famously slow.How to useimportlibpresignlibpresign.get("AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","region-1","bucket-name","object-key.txt",3600,# Expiration time in seconds)Output'https://bucket.s3.amazonaws.com/object-key.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=creds1%2F20230711%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20230711T125101Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=5c5a2e2858261266db950e4912fb12ffcd5d0bcf40d873bf9fe209ee789f6c86'Function signaturedefget(access_key_id:str,secret_access_key:str,region:Optional[str],# defaults to "us-east-1"bucket:str,key:str,expires:Optional[str],# defaults to 3600 (1h)):...Comparison to boto3Test caseGenerate 10 000 presigned URLs. Compare execution timesResults┌────────────────────────┬────────┬────────────┐
│ library                │ boto3  │ libpresign │
├────────────────────────┼────────┼────────────┤
│ avg execution time, μs │ 2232.3 │ 13.9       │ 
└────────────────────────┴────────┴────────────┘Libpresign came out to be 160 times fasterDependenciesGNU C CompilerOpenSSL
Package: libprogress
libprogressPackage that allows easy generation of progress bars. Originally on myNameGeneratorproject.FeaturesEasy to useImported as moduleAlways tested before releaseOfficially supports latest two versions of Python 3How to InstallRun the commandpip install libprogress. If you want to specify a specific Python version to use for pip, use a command such aspip3orpip3.8.DocumentationAPIThe following is an example that utilizes a progress bar with default length.importlibprogressforiinrange(20):# example loopdo(something)# put the code to do what you are tracking the progress ofprint(libprogress.genbar(curprg=i+1,maxprg=20),end="\r")# print progressprint(libprogress.genfullbar(prg=20))# print the last barFinal output:[####################] 100% [20/20]...doneIf you don't putend="\r", then each progress bar won't overwrite the last. The output will look like the following:[#-------------------] 5% [1/20]
[##------------------] 10% [2/20]
[###-----------------] 15% [3/20]
[####----------------] 20% [4/20]
[#####---------------] 25% [5/20]
[######--------------] 30% [6/20]
[#######-------------] 35% [7/20]
[########------------] 40% [8/20]
[#########-----------] 45% [9/20]
[##########----------] 50% [10/20]
[###########---------] 55% [11/20]
[############--------] 60% [12/20]
[#############-------] 65% [13/20]
[##############------] 70% [14/20]
[###############-----] 75% [15/20]
[################----] 80% [16/20]
[#################---] 85% [17/20]
[##################--] 90% [18/20]
[###################-] 95% [19/20]
[####################] 100% [20/20]
[####################] 100% [20/20]...doneLicenselibprogressis licensed under the GPLv3 license. For more information, please refer toLICENSE.
Package: libprot
libprotA library of utilities for working with proteinsFree software: GNU General Public License v3Documentation:https://libprot.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theelgertam/cookiecutter-pipenvproject template, based onaudreyr/cookiecutter-pypackage.History0.1.0 (2019-06-13)First release on PyPI.
Package: libproton
LibProtonThis is a library which simplifies the task of creatingProtoncompliant scoring scripts.It supports Python 3.7+.InstallInstallfrom PyPI:pipinstalllibprotonAPIThe following is a complete and minimal Proton compliant scorer, and shows
the expected usage of the library.#!/usr/bin/env pythonimportlibprotonclassScorer:def__init__(self,teams_data,arena_data):self._teams_data=teams_dataself._arena_data=arena_datadefcalculate_scores(self):"""Main scoring entry point.Expected to return a mapping of TLA -> score for each team inthe input data. Errors either in the input or otherwise shouldbe handled by raising exceptions."""scores={}fortlainself._teams_data.keys():scores[tla]=4returnscoresdefvalidate(self,extra_data):"""An optional additional method to validate the scoresheet.If this method is implemented it will be called with the valueof the ``other`` key from the input. If the key is not presentthen this method will still be called (with ``None``).If there are validation errors the this method should raisean exception about them."""passif__name__=='__main__:libproton.main(Scorer)TestsRun./script/test.
Package: libprotools
pythonprotoolsMÃ³dulo usado para aprender a construÃ§Ã£o e contribuiÃ§Ã£o  de projetos de cÃ³digo aberto - PytoolsLink ProjetoSuportada para versÃ£o 3 de PythonPara instalar:python3 -m venv .venv
source .venv\Sripts\activate
pip install requirements-dev.txtPara conferir a qualidade:flake8TÃ³picos abordados:GitVirtualenvPip
Package: libpsf
libpsf=====================An easy-to-use Python package for reading Cadence PSF dataReads waveform, timeseries, AC-analysis, DC, and more kinds of data from proprietary binary Cadence-PSF file format used by Cadence(R) tools and primarily it's Spectre(R) simulator which produce output natively in this format.Libpsf is easy to use:import libpsf
myobj = libpsf.PSFDataSet( "/path/to/mypsffile.psf" )and now, 'myobj' makes available the following methods:myobj.close()
myobj.invertstruct
myobj.is_swept()

myobj.get_header_properties()
myobj.get_nsweeps()
myobj.get_signal()
myobj.get_signal_names()
myobj.get_signal_properties()
myobj.get_sweep_npoints()
myobj.get_sweep_param_names()
myobj.get_sweep_values()notes:everything is returned as numpy.ndarray typein a transient simulation, time is treated as a "swept" variable:there are psf files for testing in examples/data/I have spruced up a few things, linked against a newer Boost and adapted the python extension
for use in python 2.7 and 3.4+ environments.Original contributions by:Henrik JohansenMichael ThompsonTaimur Gibran Rabuske
Package: libpt
pt / libptptstands for either one of "personal tool", "plex tool", "pete" or something among those lines.
It is a collection of tools that i might or might not use. The intended purpose of this repo is that
I program whatever i feel is worth having in a personal thing into it, then use it as either a lib,
crate, python module or executable.Let's see if I make it a bloated mess or stop committing after 30 hello worlds.But the namept/libptalready exists!So what? I don't care. Besides, there is not enough names to name everything unique.DependenciesSeecargo.tomlopenssl bindings for rustPythonmaturin-pip install maturinCompiling & Installing from sourceIf you only want the rust library, you can simply build it withcargo build. Add it to your
project like any other local dependency.If you want to use the python variant too, you need to compile with maturing.Install invenv:maturin develop --releaseInstall in system:maturin build --release && pip install target/wheels/libpt-x.x.x-*Installing fromcrates.iolibpthas been packaged forcrates.io.You can add the library to your project withcargo add libpt.Installing from my personal package registrylibpthas been packaged forgit.cscherr.de.You can add the registry to yourconfig.tomland thencargo add libptPackageTestingTesting needs to be done separately for the rust and python parts:Rust testing withcargo testPython testing with./scripts/pytests.shorpython -m unittest discover -fs tests/pythonDocumentationThe documentation can be automatically generated withcargo doc --open.An up to date version of the Documentation can be foundhereMirroredThe origin of this repository isgit.cscherr.deIt is mirrored to:CodebergLicenseGPL-3 or newer.
Package: libptsd
ptsdA new standard library for programmers that has PTSD with their projects.Quick Start$gitclonehttps://github.com/kernelk14/ptsdInside a Python file:importptsdptsd.printf("Hello World and Universe and People with PTSD in theit projects.")NOTE: This only works if you are inside theptsd/directory:ptsd/
 |-> ptsd.py
 |-> main.py (Your file, of course)ContributingYou are free to contribute, pls help me :>