Saravanan666/pypi-org huggingface dataset:
Package: pd-buddy-python
Python library for working with the PD Buddy Sink Serial Console
Configuration InterfaceFeaturesProvides a Pythonic interface to the PD Buddy Sink shell commandsConfiguration is represented as a SinkConfig objectSinkConfig objects can be manipulated locally and written to the
device with one method callAllows control of whether or not the output is enabledProvides a Pythonic interface for reading advertised PDOsProvides functions for testing if the power supply follows the Power RulesIncludes a script for testing if a PD Buddy Sink is correctly functioningExamplesOpen the first PD Buddy Sink device and read its configuration>>> import pdbuddy
>>> pdbs = pdbuddy.Sink(list(pdbuddy.Sink.get_devices())[0])
>>> pdbs.get_cfg()
SinkConfig(status=<SinkStatus.VALID: 2>, flags=<SinkFlags.NONE: 0>, v=5000, vmin=None, vmax=None, i=3000, idim=<SinkDimension.CURRENT: 1>)
>>> print(pdbs.get_cfg())
status: valid
flags: (none)
v: 5.000 V
i: 3.00 ALocally manipulate a SinkConfig object>>> cfg = pdbs.get_cfg()
>>> cfg = cfg._replace(v=20000, i=2250)
>>> cfg = cfg._replace(flags=cfg.flags | pdbuddy.SinkFlags.GIVEBACK)
>>> cfg
SinkConfig(status=<SinkStatus.VALID: 2>, flags=<SinkFlags.GIVEBACK: 1>, v=20000, vmin=None, vmax=None, i=2250, idim=<SinkDimension.CURRENT: 1>)Write the SinkConfig object to flash>>> pdbs.set_tmpcfg(cfg)
>>> pdbs.write()
>>> pdbs.get_cfg()
SinkConfig(status=<SinkStatus.VALID: 2>, flags=<SinkFlags.GIVEBACK: 1>, v=20000, vmin=None, vmax=None, i=2250, idim=<SinkDimension.CURRENT: 1>)RequirementsPython 2.7, >= 3.3pySerial >= 3.0aenum >= 2.0 (if using Python < 3.6)TestingTo run the unit tests, run:$ python setup.py testThis will test the Sink class only if a PD Buddy Sink is plugged in and in
setup mode, so make sure that’s the case if you’re testing any changes to the
Sink class.  Also, make sure the Status LED is blinking quickly when the tests
are run, since that’s the only real way to test theidentifycommand.  Be
aware that the Sink’s configuration will get clobbered by the tests.
Package: pdbufr
pdbufrpdbufris a Python package implementing aPandasreader for the BUFR format usingecCodes. It supports BUFR edition 3 and 4 files with uncompressed and compressed subsets. It works on Linux, MacOS and Windows, the ecCodes C-library is the only binary dependency. All modern versions of Python (>=3.6) and PyPy3 are supported.The documentation can be found athttps://pdbufr.readthedocs.io/.LicenseCopyright 2019- European Centre for Medium-Range Weather Forecasts (ECMWF).Licensed 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 at:http://www.apache.org/licenses/LICENSE-2.0.
Unless 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.
Package: pdc-auth
PDC AUTHPDC Authentication ManagerInstallationInstallation: To install from PyPI use:$ python -m pip install pdc-authAfter installation, import with something like:importpdc_authaspdcaConfigure EndpointBefore using authenticator configure the endpoint first. Enpoint by default has url "http://localhost:4000" and path "/v2/login". If methodget_host()called will return "http://localhost:4000/v2/login". Configure to get a custom host.frompdc_auth.endpointimportEndpointConfig,configure_endpointurl="www.myendpoint.com"path="/v1/auth"configure_endpoint(url,path)endpoint=EndpointConfig()endpoint.get_host()# www.myendpoint.com/v1/authCreate Config FileBy default the configuration file path is "data/config.json". Path can be customized as desired by adding parameters to the authenticator later. However the configuration file must bejsonand include fields like below.{"lisensi":{"email":"myemail@custom.com","pwd":"secret"}}AuthenticatorAuthenticator is used to check the login to the endpoint according to the previous configuration. With the appropriate email and password listed in the configuration. When thelogin()function is called checking for an error in the login returns an error. If the login is successful it will return the valueTrue.frompdc_auth.authenticatorimportAuthenticatorfrompdc_auth.exceptions.login_provider_excimportLoginProviderFailedExceptionconfig_fname="config/lisensi.json"authenticator=Authenticator(config_fname=config_fname)# config_fname by default is: "data/config.json"try:authenticator.login()exceptLoginProviderFailedExceptionase:passCustom Login ProviderCustomizing the provider on the login authenticator.frompdc_auth.authenticatorimportAuthenticatorfrompdc_auth.exceptions.login_provider_excimportLoginProviderFailedExceptionfrompdc_auth.login_providerimportLoginProviderprovider=LoginProvider()authenticator=Authenticator(provider=provider)try:authenticator.login()exceptLoginProviderFailedExceptionase:passSome of the data that can be customized on the provider are as follows:Custom Botfrompdc_auth.login_providerimportLoginProviderbot_id=10version='3.0.0'provider=LoginProvider(bot_id=bot_id,version=version)orfrompdc_auth.login_providerimportLoginProviderbot_id=10version='3.0.0'latest_version='3.0.18'provider=LoginProvider()provider.update_bot(bot_id=bot_id,version=version,latest_version=latest_version)Custom Headersfrompdc_auth.login_providerimportLoginProvidercustom_headers={"X-Secret-Key":"secret"}provider=LoginProvider()provider.update_headers(custom_headers)
Package: pdc-bot-updater
pdc_updaterimplementasi auto updater dengan memakai cloud storage googleset environtmentset GOOGLE_APPLICATION_CREDENTIALS=credentials.jsonExamplePublising Aplicationfrom pdc_bot_updater.publisher.publish import configure_client, AppArchiver

bucket_id = 'artifact'
folder_app = 'aplikasi_bot'

configure_client(bucket_id)


archiver = AppArchiver(folder_app)
archiver.get_meta()
archiver.upload_archive(f'dist/aplication.zip', version='1.0.0')Updating Appfrom pdc_bot_updater.client.updater import Updater

bucket_id = 'artifact'
folder_app = 'aplikasi_bot'

updater = Updater(folder_app, bucket_id)
updater.check_update()
updater.detach_process(['application.exe'])
Package: pdcd
PDC Docker ("PDCD")PDC Docker is a lightweight tool that orchestrates executing Docker containers.Documentation can be found in thedocs directory.Release blog can be found here:link.SetupHave Python 3 installedHave Docker installed(Optional) AWS SSM Session Manager Pluginused for remote mode, seeConnectorsfor informationUsing virtualenvLocalpip install dist/*.whlRemotepip install git+https://github.com/SecurityRiskAdvisors/pdcd.gitPyPIpip install pdcdUsage (running)Execute payloads in configpdcd run -c <config file> [-w <# workers>]-cpath to config fileUsage (logs)Retrieve logs for payloads in configNote:only usable when cleanup is set to "False" in configpdcd logs -c <config file> [-l <#>] [-i <image>]-cpath to config filelmax number of logs to retrieveifilter to only this specific image
Package: pdc-event-autodoc
Autodoc for Socketio and FastapiCreate autodoc for socketio and access using API Router.Use decorator and method for describe the event running, Use sub for 'subscribe' and use pub for 'publish'.
This code also integrated with pydantic, so it will be detect data model in your params if using pydantic.
Beside that other type data like array or general type like str, int, etc can be solved.
Other type from python typing like Optional and Union especially Union with none type can be solved.Example UsingTo use this import the class SokcetDocumentations, and assign the class to var.
Use decorator (@) to create documentation. There is two option to create documentation.
First is class method sub to define the event under decorator is subscribe, The second is pub to define the event or method under decorator is to publish. In this bellow is example how to use the code:from pdc_event_autodoc import SocketDocumentation 

doc = SocketDocumentation()First time is set your application info like bellow:doc.set_info_app(title= 'Example App', version= '1.0.0', description= 'This is example documentation of Example App version 1.0.0')You can decla your params using pydantic model:class PydanticModel(BaseModel):
    id: int
    name: str
    address: str

# Example using pydantic model
@doc.sub(event_name= 'message', 
        tags= ['SubcribeMessage'], 
        schema= PydanticModel, 
        summary= 'ReceiveMessage', 
        description= 'This is event when we receive a message.')
@sm.on('message')
def receive_message(sid, data: PydanticModel):
    return data.dict()Or using general type like@doc.pub(event_name= 'message', 
        tags= ['PublishMessage'],
        summary= 'To Send a Message', 
        description= 'This is event when we want to send a message.')
def sending_message(sid, data: str):
    return sm.emit('message', data)To preview the documentation, you can using FastAPI or APIRouter.
This is an example using APIRouter:from fastapi import APIRouter
from fastapi.encoders import jsonable_encoder
from pydantic import AnyHttpUrl

from pdc_event_autodoc import SocketDocumentation, get_asyncapi_html

doc = SocketDocumentation()

router = APIRouter(tags= ['Socket Documentations])

@router.get('/socket.json')
def get_socket_json():
    return jsonable_encoder(doc.main_data)

@router.get('/socket_doc')
def get_socket_documentation():
    async_url= AnyHttpUrl('/socket.json', scheme= 'http')
    return get_asyncapi_html(asyncapi_url= async_url, title= 'Notification Service')In AnyHttpUrl if you using prefix, don't forget to include your prefix.!The documentattion can be access in path '/socket_doc'.NoticeDont't forget to declare your type params (it can be Pydantic model, array, str, int, Optional or Union, etc).If not be declare it will be detect that your function using Any params.
Package: pdcoder
📦 setup.py (for humans)This repo exists to providean example setup.pyfile, that can be used
to bootstrap your next Python project. It includes some advanced
patterns and best practices forsetup.py, as well as some
commented–out nice–to–haves.For example, thissetup.pyprovides a$ python setup.py uploadcommand, which creates auniversal wheel(andsdist) and uploads
your package toPyPiusingTwine, without the need for an annoyingsetup.cfgfile. It also creates/uploads a new git tag, automatically.In short,setup.pyfiles can be daunting to approach, when first
starting out — even Guido has been heard saying, "everyone cargo cults
thems". It's true — so, I want this repo to be the best place to
copy–paste from :)Check out the example!Installationcdyour_project# Download the setup.py file:#  download with wgetwgethttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.py-Osetup.py#  download with curlcurl-Ohttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.pyTo DoTests via$ setup.py test(if it's concise).Pull requests are encouraged!More ResourcesWhat is setup.py?on Stack OverflowOfficial Python Packaging User GuideThe Hitchhiker's Guide to PackagingCookiecutter template for a Python packageLicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.
Package: pdcoder-start-update
📦 setup.py (for humans)This repo exists to providean example setup.pyfile, that can be used
to bootstrap your next Python project. It includes some advanced
patterns and best practices forsetup.py, as well as some
commented–out nice–to–haves.For example, thissetup.pyprovides a$ python setup.py uploadcommand, which creates auniversal wheel(andsdist) and uploads
your package toPyPiusingTwine, without the need for an annoyingsetup.cfgfile. It also creates/uploads a new git tag, automatically.In short,setup.pyfiles can be daunting to approach, when first
starting out — even Guido has been heard saying, "everyone cargo cults
thems". It's true — so, I want this repo to be the best place to
copy–paste from :)Check out the example!Installationcdyour_project# Download the setup.py file:#  download with wgetwgethttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.py-Osetup.py#  download with curlcurl-Ohttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.pyTo DoTests via$ setup.py test(if it's concise).Pull requests are encouraged!More ResourcesWhat is setup.py?on Stack OverflowOfficial Python Packaging User GuideThe Hitchhiker's Guide to PackagingCookiecutter template for a Python packageLicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.
Package: pdcommandline
pdcommandline - library to build multithreaded interactive command line applicationsA cross platform library to build multithreaded command line applications with formatted output, command line parsing and context sensitive command line completion.pdcommandlinefeatures:VT100 support for colored formatting of the outputcolored and styled stringstable and tree formattinglogging with filtering for verbosity levelsthread safe access for multi threaded applicationsworker and background threadslifecycle management of threadsmultiline progess displaycustomizable interactive keyboard inputhandling of CTRL+C signals with support of hookscommand line parsingcontext sensitive helpcontext sensitive command completionNOTE: The current implementation ofpdcommandlineis a prototype. It’s assumed that the API will change in future releases.Getting startedInstall fromPyPICheckout thesources
Package: pdcompare
pdcompareUsed to compare two pandas DataFrame objects to see how they changed.pip install pdcompareRequirementsThe DataFrames must have the same index to compare correctly. An error will be thrown if the index data-types do not match, and a warning will be thrown if the index names are different.STEPSInitialize and call thecompare()method:frompdcompareimportComparecompare_object=Compare(df1,df2)compare_object.compare()To get a dictionary of the resulting comparison data call:compare_object.output()Output DetailsOnce you call the .output() method, you will receive a dictionary object in return. This dictionary has the following keys and associated values:KEYVALUEVALUE Data TypeSUMMARYhigh-level overview of differencespd.DataFrameADDEDlist of all index values that were addedpd.SeriesADDED_colslist of all columns that were addedpd.SeriesREMOVEDlist of all index values that were removedpd.SeriesREMOVED_colslist of all columns that were addedpd.SeriesCHANGED(see below for details)pd.DataFrameCHANGED output dataThis data has the following columnsColumn HeaderDataIDIndex value by which we tracked the alterationsCOLUMNColumn that we saw an index change valuesfromValue of specified column & index in the first table (old)toValue of specified column & index in the second table (new)ExamplesScreamingFrog Crawl Comparison (SEO)This is a great tool to compare crawls from different dates. Simply export the CSV files from ScreamingFrog. Then run this Google Colab notebook to create a Report in Google Sheets.ScreamingFrog Crawl Compare in ColabBy default the code to connect to Google Sheets and do all the formatting is hidden, but feel free to peep behind the curtain to see how it was done. You can display the first block of code by opening using the drop-down triangle on the far left side of the block.Weed Price ComparisonFor a simple, get acquainted quickly example, use this. Thanks toVickifor pointing me in the direction of these small datasets; and thanks toFrank BIfor supplying the free datasets. I used Frank's weed price data from 2004 and compared them to 2005 across the 50 states. The example can be found in this repo's example folder.Thanks for using my codeIf you found this library useful, I'd appreciate a coffee.
Package: pd.contentrules.sms
ContentsIntroductionThe contentruleCreditsAuthorsChangelog1.0.2 (2015-08-10)1.0.1 (2014-09-24)1.0.0 (2014-05-05)IntroductionAdd on for the Plone booking productrg.prenotazionithat
adds a contentrule to send SMS.Further customizations forrg.prenotazionican be found in the productpd.prenotazioniThe contentruleAfter adding the content rule to your siteconfigure it adding a text and the email of the SMS service providerCreditsDeveloped with the support ofComune di Padova.Comune di Padova supports thePloneGov initiative.AuthorsThis product was developed by RedTurtle Technology team.Changelog1.0.2 (2015-08-10)Fix autoinclude issues
[ale-rt]1.0.1 (2014-09-24)DocumentationAdded a dependency from rg.prenotazioni1.0.0 (2014-05-05)fix errore unicode in replace “Sportelli preposti” [nicolasenno]Initial release
Package: pdcopyist
📦 setup.py (for humans)This repo exists to providean example setup.pyfile, that can be used
to bootstrap your next Python project. It includes some advanced
patterns and best practices forsetup.py, as well as some
commented–out nice–to–haves.For example, thissetup.pyprovides a$ python setup.py uploadcommand, which creates auniversal wheel(andsdist) and uploads
your package toPyPiusingTwine, without the need for an annoyingsetup.cfgfile. It also creates/uploads a new git tag, automatically.In short,setup.pyfiles can be daunting to approach, when first
starting out — even Guido has been heard saying, "everyone cargo cults
thems". It's true — so, I want this repo to be the best place to
copy–paste from :)Check out the example!Installationcdyour_project# Download the setup.py file:#  download with wgetwgethttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.py-Osetup.py#  download with curlcurl-Ohttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.pyTo DoTests via$ setup.py test(if it's concise).Pull requests are encouraged!More ResourcesWhat is setup.py?on Stack OverflowOfficial Python Packaging User GuideThe Hitchhiker's Guide to PackagingCookiecutter template for a Python packageLicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.
Package: pdcopyist-updater
📦 setup.py (for humans)This repo exists to providean example setup.pyfile, that can be used
to bootstrap your next Python project. It includes some advanced
patterns and best practices forsetup.py, as well as some
commented–out nice–to–haves.For example, thissetup.pyprovides a$ python setup.py uploadcommand, which creates auniversal wheel(andsdist) and uploads
your package toPyPiusingTwine, without the need for an annoyingsetup.cfgfile. It also creates/uploads a new git tag, automatically.In short,setup.pyfiles can be daunting to approach, when first
starting out — even Guido has been heard saying, "everyone cargo cults
thems". It's true — so, I want this repo to be the best place to
copy–paste from :)Check out the example!Installationcdyour_project# Download the setup.py file:#  download with wgetwgethttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.py-Osetup.py#  download with curlcurl-Ohttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.pyTo DoTests via$ setup.py test(if it's concise).Pull requests are encouraged!More ResourcesWhat is setup.py?on Stack OverflowOfficial Python Packaging User GuideThe Hitchhiker's Guide to PackagingCookiecutter template for a Python packageLicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.
Package: pdc-python-sdk
Pdc Python Sdktest快速开始如何构建、安装、运行测试如何执行自动化测试如何贡献贡献patch流程及质量要求版本信息本项目的各版本信息和变更历史可以在这里查看。维护者ownersjiaqianjing(jiaqianjing@baidu.com)committersjiaqianjing(jiaqianjing@baidu.com)讨论百度Hi交流群：群号Changelog以下记录了项目中所有值得关注的变更内容，其格式基于Keep a Changelog。本项目版本遵守Semantic Versioning和PEP-440。UnreleasedAdded这里记录新添加的内容Changed这里记录变更的内容0.1.0 - 2020-02-04Added创建项目
Package: pdc-session
Shopee Sessionsimple shopee session managerInstall$ python -m pip install pdc-sessionconfigurefrompdc_session.session_configimportconfigure_clientapi_uri='http://localhost:51016'api_key='0234a45a4d4c34f1849638f****'botname='test'configure_client(api_uri=api_uri,# api_uri default http://localhost:4000api_key=api_key,# api_key format string hexbotname=botname# botname format string)A Simple ExamplefromrequestsimportSessionfrompdc_session.session_persistimportSessionPersist# SessionPersist need username to runSessionPersist.username='test'withSessionPersist()assp:# when entering class will find available sessions and lock them# create new sessionsession=Session()# session from requestssp.create(lock=True)# lock is optional, defaults as True# get avaliable session# by default it is called when on entersp.get_session()sp.session_id# when id is not 0, then session is validsp.session_valid# or check with session_valid# if get_session() is falied, method all_locked() will be called# lock session# by default you need to change the session_id property and call lock_session()sp.session_id='someid'sp.lock_session()# but this is not recommended# release session# set session to unlockedsp.release_session()# update session# by default it is called when on exitsp.session.cookies.set('test','test')sp.update_session()Best Practicefrompdc_session.session_persistimportSessionPersistclassAuth(SessionPersist):username:strpassword:strdef__init__(self,username,password):self.username=usernameself.password=passwordwithAuth('test','test')asauth:auth.session.get('/getinfo')auth.session.get('/product')auth.session.post('/upload_product')Blocking Codefrompdc_session.session_persistimportSessionPersistclassAuth(SessionPersist):username:strpassword:strdef__init__(self,username,password):self.username=usernameself.password=passworduser=Auth('test','test')user._acquire()auth.session.get('/getinfo')auth.session.get('/product')auth.session.post('/upload_product')user._release()
Package: pddb-genwch
Using Pandas as database in pythonUsing Pandas (Parquet) as database in pythonMethodset_ownerset_debugcolsfilterupdateinsertupsertsaveloadSampleTableclassUser(pddb.pdtbl):definit_obj(self)->dict:path="./data/users.parquet"obj={"uid":{"type":str,"uuid":True,"ignupd":True},"usr_cde":{"type":str,"key":True},"usr_name":{"type":str}}return(obj,path)classPassword(pddb.pdtbl):definit_obj(self)->dict:path="./data/passwords.parquet"obj={"uid":{"type":str,"uuid":True,"key":True,"ignupd":True},"password":{"type":str,"require":True,"md5":True}}return(obj,path)ViewclassVW_User_Password(pddb.pdvw):definit_obj(self)->dict:usr=User()pwd=Password()cfg={"source":[{"name":"usr","tbl":usr},{"name":"pwd","tbl":pwd,"join":["uid"]}],"cols":[{"tbl":"usr","col":"uid"},{"tbl":"usr","col":"usr_cde"},{"tbl":"pwd","col":"password"}]}returncfg
Package: pd-db-wrangler
PD DB WranglerPandas database helper libraryFree software: MIT licenseDocumentation:https://pd-db-wrangler.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-05-13)First release on PyPI.0.2.0 (2020-05-13)Second release on PyPI. Fixes.0.3.0 (2020-05-13)Updates, etc. Various changes. IDK.0.4.0 (2020-05-13)Updates, etc. Various changes. IDK.0.5.0 (2020-05-13)Updates, etc. Various changes. IDK.0.6.0 (2020-05-13)Updates, etc. Various changes. IDK.0.7.0 (2020-05-13)Updates, etc. Various changes. IDK.0.8.0 (2020-09-25)Fix encoding issue when reading SQL files.