Saravanan666/pypi-org huggingface dataset:
Package: python-path
# Python Path`python_path` is a simple utility that lets you cleanly add routes to your `PYTHON_PATH`. Its very useful to safely load scripts from other folders.## InstallingYou can install `python_path` from pip```pip install python_path```## UsageLets do an example, image you have the following project structure```- my_project/- main.py- some_folder/- other.py- another_folder/- another.py```Say we want to load `other.py` form `main.py`, since some_folder is not a submodule because it doesn't contain a `__init__.py` then we need to add `some_folder` to the `PYTHON_PATH`. To make this very easy we'll use `python_path` like this:```python# my_project/main.pyfrom python_path import PythonPathwith PythonPath("some_folder"):import other```and execute the file like this:```bashcd my_projectpython main.py```Here `some_folder` is added relative the `PWD` (`my_project`), if you are executing `main.py` from another directory and still want to reference `some_folder`, then you should directly state relative to what file or folder the operations are being done:```python# my_project/main.pyfrom python_path import PythonPathwith PythonPath("some_folder", relative_to = __file__):import other```The previous is equivalent to:```python# my_project/main.pyfrom python_path import PythonPathimport ospath = os.path.dirname(__file__)path = os.path.join(path, "some_folder")with PythonPath(path):import other```Now we can also execute the script from any path and it sould still work e.g:```bashpython my_project/main.py```Finally we can also navigate the folder structure by passing multiple parameters, so if we want to import `main.py` from `another.py` which is inside `another_folder` we could do it like this```python# my_project/some_folder/another_folder/another.pyfrom python_path import PythonPathwith PythonPath("..", "..", relative_to = __file__):import main```This is equivalent to```python# my_project/some_folder/another_folder/another.pyfrom python_path import PythonPathimport ospath = os.path.join("..", "..")with PythonPath(path, relative_to = __file__):import main```
Package: python-paycoinrpc
AuthServiceProxy is an improved version of python-jsonrpc.It includes the following generic improvements:HTTP connections persist for the life of the AuthServiceProxy objectsends protocol ‘version’, per JSON-RPC 1.1sends proper, incrementing ‘id’uses standard Python json libIt also includes the following paycoin-specific details:sends Basic HTTP authentication headersparses all JSON numbers that look like floats as DecimalInstallationchange the first line of setup.py to point to the directory of your installation of python 2.*run setup.pyNote: This will only install paycoinrpc. If you also want to install jsonrpc to preserve
backwards compatibility, you have to replace ‘paycoinrpc’ with ‘jsonrpc’ in setup.py and run it again.Or simply install the library using pip:pip install python-paycoinrpcExamplefrompaycoinrpc.authproxyimportAuthServiceProxyaccess=AuthServiceProxy("http://user:password@127.0.0.1:8332")access.getinfo()access.listreceivedbyaddress(6)access.sendtoaddress("P99rzy8MqEJLK62Ddz8xjjebg2xEmUsxDt",10)
Package: python-pbi
python-pbi is a Python library for accessing and updating PowerBI (.pbix) files.A typical use would be to download an existing report from the PowerBI service, and automatically alter some text, formatting, or some of the visuals, before publishing the updated report to the service once again.It can also be used to support different environments: publishing a report still under development to production can hide work-in-progress visuals and replace them with some placeholders showing a default message like 'COMING SOON' or 'WORK IN PROGRESS'.It can also ensure consistency in the reports by copying titles, logos, and headers from one page to another, or setting specific parameters across the workspace reports (activating the 'keep layer order' option for all visuals, or the search option for all dropdowns, etc.)More information is available in the pbi wiki.
Browse examples with screenshots to get a quick idea what you can do with pbi.
Package: python-PCF8574
python driver for PCF8574OverviewTexas InstrumentsPCF8574is an 8-bit I/O expander based on I2C/SMBus. This package allows users to usePCF8574GPIOs like any standardarduinoGPIOs. Provides standardarduinolike functionspinMode,digitalWrite,digitalReadetc.InstallationPackage:pip3 install python-PCF8574Dependencies:pip3 install -r requirements.txtUsage Examplesexamples/basicExample.py: A basic workflow for reading and writing a GPIOexamples/multiDeviceExample.py: multiple PCF8574 devicesexamples/threadSafeExample.py: Not implementedExample CodeFor those who just want to get started fast:<TODO>Development and Contributibg InstructionsThe current code base is compatible with python3. Pull requests for new features, bug fixes, and suggestions are welcome! Please create an issue for discussion before working on a substantial change.LicenseMIT
Package: python-pdcli
PD cliTestexport PD_ACCOUNT_TOKEN=xyz

pd ls \
  --statuses=acknowledged,triggered --since=$(date -v -1d +%F) --column \
  | column -t -s$'\t'Default output is json string. In order to extract field:# to extract "id" from user recordpduser--user-id=me|jq-r.idReferencehttps://pypi.org/project/pdpyras/https://developer.pagerduty.com/api-reference/
Package: python-pdf-analytics-client
PyPDFAnalyticsClient allows you to automate most common PDFAnalytics (https://pdf-analytics.com) operations using Python 2 or Python 3. You may access the documentation page from here :http://pdf-analytics-client-library.readthedocs.io/en/latest/. You may access the GitHub repository from here :https://github.com/pdf-analytics/python-pdf-analytics-client.
Package: python-pdfbox
Package DescriptionProvides a simple Python 3 interface to theApache PDFBoxcommand-line tools.RequirementsAside from Python 3 and those packages specified insetup.py,
python-pdfbox requiresjavato be present in the system path.Some users have reportedissues on
MacOSwith certain
versions of Java. If you encounter such issues, try a recent release of OpenJDK
(14 or later).InstallationThe package may be installed as follows:pip install python-pdfboxOne may specify the location of the PDFBox jar file via thePDFBOXenvironmental variable. If not set, python-pdfbox looks for the jar file
in the platform-specific user cache directory and automatically downloads
the latest available version below 3.0.0 and caches it if not present.UsageThe interface currently exposes only several features in PDFBox (text extraction, conversion to images, extraction
of images):import pdfbox
p = pdfbox.PDFBox()
p.extract_text('/path/to/my_file.pdf')   # writes text to /path/to/my_file.txt
p.pdf_to_images('/path/to/my_file.pdf')  # writes images to /path/to/my_file1.jpg, /path/to/my_file2.jpg, etc.
p.extract_images('/path/to/my_file.pdf') # writes images to /path/to/my_file-1.png, /path/to/my_file-2.png, etc.NotesOwing to a change in command line interface, python-pdfbox cannot
currently use PDFBox 3.0.0.DevelopmentThe latest release of the package may be obtained fromGitHub.AuthorSee the includedAUTHORS.rstfile for more
information.LicenseThis software is licensed under theApache 2.0 License.
See the includedLICENSE.rstfile for more
information.
Package: python-pdfbox-v2
Package DescriptionThis prject is a fork of python-pdfbox. After the update of pdfbox,
the current version for apache-pdfbox 3.x has breaking changes.To make sure the the python-wrapper is still useable, this fork is in place.
To use just replace the pip install python-pdfbox with pip install python-pdfbox-v2Provides a simple Python 3 interface to theApache PDFBoxcommand-line tools.RequirementsAside from Python 3 and those packages specified insetup.py,
python-pdfbox requiresjavato be present in the system path.Some users have reportedissues on
MacOSwith certain
versions of Java. If you encounter such issues, try a recent release of OpenJDK
(14 or later).InstallationThe package may be installed as follows:pip install python-pdfboxOne may specify the location of the PDFBox jar file via thePDFBOXenvironmental variable. If not set, python-pdfbox looks for the jar file
in the platform-specific user cache directory and automatically downloads
the latest available version below 3.0.0 and caches it if not present.UsageThe interface currently exposes only several features in PDFBox (text extraction, conversion to images, extraction
of images):import pdfbox
p = pdfbox.PDFBox()
p.extract_text('/path/to/my_file.pdf')   # writes text to /path/to/my_file.txt
p.pdf_to_images('/path/to/my_file.pdf')  # writes images to /path/to/my_file1.jpg, /path/to/my_file2.jpg, etc.
p.extract_images('/path/to/my_file.pdf') # writes images to /path/to/my_file-1.png, /path/to/my_file-2.png, etc.NotesOwing to a change in command line interface, python-pdfbox cannot
currently use PDFBox 3.0.0.DevelopmentThe latest release of the package may be obtained fromGitHub.AuthorSee the includedAUTHORS.rstfile for more
information.LicenseThis software is licensed under theApache 2.0 License.
See the includedLICENSE.rstfile for more
information.
Package: python-pdf-link-checker
PDF Link CheckerThis is a fork of thepdf-link-checker.Situation: You need to upload a PDF somewherea submission toEasyChaira preprint toarxiva slide deck tomoodleNow, you want to check if all the links are still active and that the reviewers, reader, or students end up with404error codes.
Let this script check that for you!SetupInstallPythonInstall thepython-pdf-link-checkervia the Python Package Registry.pipinstallpython-pdf-link-checkerAttention: On macOS,pipis usually the installer of the Python2 instance.
Please usepip3orpip3.xin this case.Now you should be able to callpdf-link-checkerwithin your shell.$pdf-link-checker--version
pdf-link-checker1.1.5UsageCheck Links$pdf-link-checkercheck-links--help
Usage:pdf-link-checkercheck-links[OPTIONS][PDF_FILE]-GetinputPDFandoutputCSVlocation.-executecheck_pdf_links(infilepath,infilepath)-SavethereporttooutputCSVlocation.

Arguments:[PDF_FILE]ThePDFfiletocheck.

Options:-r,--reportFILETheCSVfilewithallthecheckedlinks.[default:report.csv]-I,--ignore-urlTEXTURLthatshouldnotbechecked,e.g.,becausewenowthattheyarenotactivatedyet.[default:]-C,--ciIfset,thecommandwillexitwithanerrorcodeiftherearebrokenURLs.[default:False]-c,--csv-delimiterTEXTTheCSVdelimiter,e.g.,`;`[default:;]-A,--ignore-unauthorizedIfthisflagisset,wewillignore403statuscodes.Somewebsitesblockscripts,andthusexistinglinkswillresultin403codes.[default:False]--helpShowthismessageandexit.Check Page Limit$pdf-link-checkercheck-page-limit--help
Usage:pdf-link-checkercheck-page-limit[OPTIONS][PDF_FILE]Checkthepagelimit.

Arguments:[PDF_FILE]ThePDFfiletocheck.

Options:-l,--page-limitINTEGERThemaximalnumberofpages--helpShowthismessageandexit.Example$pdf-link-checkercheck-linksmain.pdf
Starting100%|█████████|5/5[00:30<00:00,6.18s/it]Done:.../report.csvRun Pytest to validate returnsFrom the script directory, runpytestto validate the code. The tests use the PDFs in thedatafolder.ContactIf you have any question, please contactPatrick Stöckle.
Package: python-pechkin
Интеграция pechkin-mail.ru и вашего приложенияpechkin API:http://pechkin-mail.ru/?page=apiПример кодаfrom pechkin.api import PechkinApiapi = PeckinApi(‘my_username’, ‘my_password’)api.lists_get()  # Показывает все ваши базыlist_id = api.lists_add(‘Первая База’)plist = api.lists_get(list_id)member_id = plist.add_member(email=’vsafronovich@gmail.com’)
Package: python-percentage
Python PercentageCalculate percentages without worrying about ZeroDivision errorsInstallpipinstallpython_percentageUsagepython_percentagecomes with different useful functions for different percentage calculationsCalculate percentage between 2 floatsfrompython_percentageimportget_percentage# I want to get the 20.0% of 200.0result=get_percentage(20.0,200.0)# 200.0 * float(20.0) / float(100.0)print(result)# 40.0Calculate which percentage represents a float based on another floatfrompython_percentageimportpercentage_of# I want to get which percentage is 1.0 of 2.0result=percentage_of(1.0,2.0)# 100.0 * float(1.0) / float(2.0)print(result)# 50.0Increment percentage of a floatfrompython_percentageimportincrement# I want to increment a 10.0% the float 20.0result=increment(10.0,20.0)# 20.0 + get_percentage(10.0, 20.0)print(result)# 22.0Decrement percentage of a floatfrompython_percentageimportdecrement# I want to decrement a 10.0% the float 20.0result=decrement(10.0,20.0)# 20.0 - get_percentage(10.0, 20.0)print(result)# 18.0
Package: python-performance-tools
Python Performance toolt & utilitiesIn a nutshellPython performance toolsis a small library with a set of utilities to help you measure and analyze the performance of your code.Install>pipinstallpython-performance-toolsUsage examplesExample 1# File: example_1.pyimportosimporttimefromperformance_toolsimport*defmain():environment=os.environ.get("ENVIRONMENT",None)withcatch_time("Example message 2",lambda:environmentin("DEVELOPMENT","STAGING")):foriinrange(10):time.sleep(1)if__name__=='__main__':main()After running the code, you will see:>pythonexamples/example_1.py
Time:1.021636976::ExamplemessageExample 2# File: example_2.pyimportosimporttimefromperformance_toolsimport*defmain():environment=os.environ.get("ENVIRONMENT","STAGING")withcatch_time("Example message 2",lambda:environmentin("DEVELOPMENT","STAGING")):foriinrange(10):time.sleep(0.1)if__name__=='__main__':main()After running the code, you will see:>exportENVIRONMENT=DEVELOPMENT
>pythonexamples/example_2.py
Time:1.035312797::Examplemessage2LicenseDictionary Search is Open Source and available under theMIT.ContributionsContributions are very welcome. SeeCONTRIBUTING.mdor skim existing tickets to see where you could help out.
Package: python-perf-unit
python-perf-unitpython-perf-unitis a Python package designed to enhance unit testing with performance metrics. By integrating with Python's unittest framework, it enables the execution of test methods with performance analysis.FeaturesPerformance Testing: Automatically times unittest test methods.Median Execution Time Assertion: Asserts median execution time of test methods is below a specified threshold.Parallel Execution: Runs tests in parallel using multithreading.Percentile Reporting: Detailed percentile reports for test execution times.Installationpipinstallpython-perf-unitUsageDecorate your unittest class with@perf_unit_test_classto turn standard unit tests into performance tests.fromperf_unitimportperf_unit_test_classimportunittest@perf_unit_test_classclassMyTestCase(unittest.TestCase):deftest_example1(self):# Your test code herepassdeftest_example2(self):# Another test codepassif__name__=='__main__':unittest.main()Code stylingblackused for auto-formatting coderead,pylintused for code linting and pep8 complianceread,mypyused for type hintingread,
Package: python-periphery
python-periphery is a pure Python library for GPIO, LED, PWM, SPI, I2C, MMIO, and Serial peripheral I/O interface access in userspace Linux. It is useful in embedded Linux environments (including Raspberry Pi, BeagleBone, etc. platforms) for interfacing with external peripherals. python-periphery is compatible with Python 2 and Python 3, is written in pure Python, and is MIT licensed. Seehttps://github.com/vsergeev/python-peripheryfor more information.
Package: python-perl-storable
python_perl_storableNAMEpython_perl_storable - распаковывает структуру из формата perl-storableVERSION0.1.0DESCRIPTIONfrompython_perl_storableimportfreeze,thawclassA:defgetX(self):returnself.xstorable_binary_string=freeze({'x':A(x=6),'s':"Здравствуй, Мир!"})data=thaw(storable_binary_string,classes={'A::A':A},iconv=lambdas:s.decode('windows-1251'))print(data)# -> {'x': <__main__.A instance at 0x7f7f532e1050>, 's': "Здравствуй, Мир!"}print(data['x'].getX())# -> 6print(data['s'])# -> Здравствуй, Мир!SYNOPSISВ языке perl есть свой формат бинарных данных для упаковки любых структур: хешей, списков, объектов, регулярок, скаляров, файловых дескрипторов, ссылок, глобов и т.п. Он реализуется модулемhttps://metacpan.org/pod/Storable.Данный формат довольно популярен и запакованные в бинарную строку данные различных проектов на perl хранятся во внешних хранилищах: mysql, memcached, tarantool и т.д.Данный змеиный модуль предназначен для распаковки данных, полученных из таких хранилищ, в структуры python и для упаковки данных питона, чтобы поместить их в хранилище.FUNCTIONSthawARGUMENTSstorable - бинарная строкаclasses - словарь с классами. Необязательный параметрiconv - функция для конвертации строк не в utf8. Необязательный параметрfreezeARGUMENTSdata - данные питона: строка, число, словарь, список, объект и т.д.magic - булево значение. Необязательно. Добавляет к выводу магическое число 'pst0'RETURNSБинарная строка с данными в формате Perl StorableSCRIPT# Заморозить-раморозить:$echo'[123, "Хай!"]'|pyplsfreeze|pyplsthaw# Передавать замороженные данные в бинарном виде:$echo'[123, "Хай!"]'|pyplsfreeze-b|pyplsthaw-b# Передавать код в параметре:$pyplsfreeze--data'[123, "Хай!"]'|pyplsthaw# Добавить магическое число и обесцветить замероженную строку:$pyplsfreeze-m-s--data'[123, "Хай!"]'|pyplsthaw# Перекодировать строки (bytes останутся как есть):$pyplsfreeze--data'[123, "Хай!"]'-icp1251|pyplsthaw-icp1251INSTALL$pipinstallpython-perl-storableREQUIREMENTSdata-printerargparseLICENSECopyright (C) Yaroslav O. Kosmina.This library is free software; you can redistribute it and/or modify
it under the same terms as Python itself.AUTHORYaroslav O. Kosminadarviarush@mail.ruLICENSEMIT LicenseCopyright (c) 2020 Yaroslav O. Kosmina
Package: python-pexels
python-pexelsA unofficial python library to support all of Pexels API features.Supports all of theendpoints, which are available in API v1.0Return data arepython objects.Userfriendlylibrary.Easy touse.📚Documentationfor this library can be found below. It containsdetailed instructionson how to use API.📚Documentation for the official API can be foundhere.InstallationYou can install the library viapippip install python-pexelsOr usingsource code, which is not recommended.git clone https://github.com/jk6521/py-pexels-api.git

cd py-pexels-api

python setup.py installmore installation guide foundhereUsage & ExampleYou needAPI tokento access Pexels API, you can get ithereOnce library is installed using pip, create a new python file namedmain.py#main.pyfromPexelsimportClientclient=Client(token="abcd1223")#search photosphotos=client.search_photo(query="Joker")#you can access return data likeprint(photos.total_results)>>>230more examples can be foundhereUseful Links📚Docs🌐PyPi💬Telegram
Package: python-pfb-sdk
# python-pfb-sdk
Python scripts used to modify PFB files
## PFB Editing Scripts### Add Field
Adds a new field to the specified node for the specified pfb file as of right now this is only limited to string and int with enum supported later
This writes to a new file new.pfbusage: addField.py [-h] PFB_file parentField field fieldType fieldDefaultAdd a new field to PFB schemapositional arguments:PFB_file      pfb file to add record to. Default = test.pfb
parentField   parent of field wanting to add to schema
field         field to add to the schema
fieldType     type for new field
fieldDefault  default value for new fieldoptional arguments:-h,--helpshow this help message and exitExample usagecommand line usage:python reader.py test.pfbpython usage:import reader
reader.read(“test.pfb”)### Remove Field
removes a field from pfb file to a new file (rm.pfb)usage: removeField.py [-h] PFB_file parentField fieldRemove a field from PFB schema and output to new file “rm.pfb”positional arguments:PFB_file     pfb file to remove field from. Default = test.pfb
parentField  parent of field wanting to remove from schema
field        field to remove to the schemaoptional arguments:-h,--helpshow this help message and exitExample usagecommand line usage:python removeField.py test.pfb demographic genderpython usage:import removeField
removeField.remove(“test.pfb”, “simple_germline_variation”, “data_category”)### Add Record
Adds new record(s) to the pfb file from a json fileusage: addRecord.py [-h] PFB_file JSON_fileAdd a record to PFB file from a minified JSON filepositional arguments:PFB_file    pfb file to add record to. Default = test.pfb
JSON_file   JSON file to add into the pfb file. Default = test.jsonoptional arguments:-h,--helpshow this help message and exitExapmle Usagecommand line usage:python addRecord.py test.pfb test.jsonpython usageimport addRecord
addRecord.add(“test.pfb”, “test.json”)### Reader
Used to read the records from pfb file records]usage: reader.py [-h] PFB_fileRead a PFB file in json formatpositional arguments:PFB_file    pfb file to add record to. Default = test.pfboptional arguments:-h,--helpshow this help message and exitExample Usagecommand line usage:python reader.py test.pfbpython usage:import reader
reader.read(“test.pfb”)### Make Blank Record
Make a blank json record for specific pfb schema to blank.json filesusage: makeBlankRecord.py [-h] PFB_file nodeCreate a blank record from a pfb schemapositional arguments:PFB_file    pfb file to read schema from
node        Node to add record tooptional arguments:-h,--helpshow this help message and exitExample Usagecommand line usage:python makeBlankRecord.py test.pfb demographicpython usage:import makeBlankRecord
makeBlankRecord.makeRecord(“test.pfb”, “simple_germline_variation”)
Package: python-pgsql
This is a set of Python bindings for PostgreSQL derived from the PyGreSQL 3.8.1sources. The main changes from the PyGreSQL module are:* support for bind parameters, alleviating the need for extensive,expensive and vulnerable quoting of user-supplied data* support for server side cursors for looping through large queryresults without loading up the entire result set in the client's memory* returned values are translated to Python objects in the C layer,resulting in some speed improvement* DB API 2.0 compliance, with some extensionsPostgreSQL allows for numeric parameters to be passed in a query (bindparameters). If parameters are used, they are referred to in the query string as$1, $2, etc. Bind parameters are passed in as a tuple that holds the valuesbound in the query. The primary advantage of using bind parameters is thatparameter values may be separated from the command string, thus avoiding theneed for tedious and error-prone quoting and escaping.Because of the different query syntax between what PostgreSQL nativelysupports and what PyGreSQL used to implement (Python style substitutions like %sand %(name)s), these bindings will not grok SQL queries written for PyGreSQL -you might need to slightly rework some of your queries to take advantage of thebind parameter support.
Package: python-phoenix-miner
python-phoenix-minerWhat it isAn API Wrapper for the Phoenix miner RPC socket client APIHow to use itfrom python_phoenix_miner import PhoenixClient

miner_name = "Miner 01"
ip = '192.168.1.1'
port = 3333

client = PhoenixClient(miner_name="miner01", ip=ip, port=port)

basic_miner_stats = client.Miner.get_stats()
extended_miner_stats = client.Miner.get_extended_stats()
print("Done")The latest versionThe current version of this program is written for Python 3.8LicensingCopyright 2021 Carl ArgabrightLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.Contactcarl.argbright@gmail.com