Saravanan666/pypi-org huggingface dataset:
Package: pdnsbackup
What is this?Backup tool for PowerDNS database (MySQL) to local or S3 storage in bind format. Open metrics  are also computed on your feched zones.PyPIDeploy thepdnsbackuptool in your server with the pip command.pipinstallpdnsbackupUsageAfter installation, you can execute thepdnsbackupto start-it.$pdnsbackup-h
usage:-c[-h][-cC][-eE][-v]options:-h,--helpshowthishelpmessageandexit-cCexternalconfigfile-eEenvconfigfile-vdebugmodeConfigurationThis tool can be configurated with severals ways. See the defaultconfig file:from external configuration file (-c configargument)from environment variables (-e env fileargument)VariablesDescriptionPDNSBACKUP_DEBUGdebug mode 1 or 0PDNSBACKUP_GMYSQL_ENABLEDset to 1 to enable gmysql backend, enabled by defaultPDNSBACKUP_GMYSQL_HOSTmysql port, default is 127.0.0.1PDNSBACKUP_GMYSQL_PORTmysql port, default is 3306PDNSBACKUP_GMYSQL_SSLenable ssl, default is 0PDNSBACKUP_GMYSQL_DBNAMEmysql database namePDNSBACKUP_GMYSQL_USERmysql userPDNSBACKUP_GMYSQL_PASSWORDmysql passwordPDNSBACKUP_FILE_ENABLEDset to 1 enable backup to file, enabled by defaultPDNSBACKUP_FILE_PATH_BINDzone bind path in named.confPDNSBACKUP_FILE_PATH_OUTPUToutput folder of the exportPDNSBACKUP_S3_ENABLEDset to 1 enable backup to S3 storage, disabled by defaultPDNSBACKUP_S3_ENDPOINT_URLyour s3 urlPDNSBACKUP_S3_SSL_VERIFYdisable ssl verifyPDNSBACKUP_S3_ACCESS_KEY_IDyour access keyPDNSBACKUP_S3_SECRET_ACCESS_KEYyour secret access keyPDNSBACKUP_S3_BUCKET_NAMEbucket namePDNSBACKUP_S3_BACKUP_FILEbackup file namePDNSBACKUP_S3_BACKUP_DELETE_OLDERdelete backups older than xx daysPDNSBACKUP_METRICS_ENABLEDexport open metricsPDNSBACKUP_METRICS_PROM_FILEwrite metrics to file pathMetricsThis tool can be used to computestatisticson your DNS records.VariablesDescriptionpdnsbackup_statusStatus of the backup processpdnsbackup_zones_totalTotal number of zonespdnsbackup_zones_empty_totalTotal number of empty zonespdnsbackup_records_totalTotal number of records per DNS zonespdnsbackup_wildcards_totalTotal number of DNS wilcardspdnsbackup_delegations_totalTotal number of DNS delegationspdnsbackup_rrtypes_totalTotal number of records per type (A, AAAA, CNAME, ...)Docker runsudodockerrun--rm--env-file./.env--name=pdnsbackupdmachard/pdnsbackup:latestRun from sourceCreate a.envfile to populate your variableCreate a virtualenvpython-mvenvvenvsourcevenv/bin/activateInstall requirements and run-itpython3-mpipinstall-rrequirements.txt
python3-c"import pdnsbackup; pdnsbackup.run();"python3-c"import pdnsbackup; pdnsbackup.run();"-ctests/config.yml
python3-c"import pdnsbackup; pdnsbackup.run();"-etests/.envBuild and run from docker imagesudodockerbuild.--fileDockerfile-tpdnsbackupRun testsRun all testspython-munittestdiscover-vtests/Run one by onepython-munittest-vtests.test_config
python-munittest-vtests.test_parser
python-munittest-vtests.test_import
python-munittest-vtests.test_export_file
python-munittest-vtests.test_export_metrics
Package: pdns-dynamodb
PowerDNS backend using DynamoDBSchemaname - string - hash keytype - string - range keyttl - numbervalues - set of stringsNotethat in order to simplify the DynamoDB schema MX and SRV
records must store the priority field at the beginning of the content,
separated by a TAB.PermissionsIt is recommended you create a special IAM users that only has
permissions for querying DNS records to be used by this backend. You can
use the following IAM policy template (replacing REGION, ACCOUNTID and
TABLE with the correct values).{
  "Statement": [
    {
      "Action": [
        "dynamodb:DescribeTable",
        "dynamodb:GetItem",
        "dynamodb:Query"
      ],
      "Effect": "Allow",
      "Resource": [
        "arn:aws:dynamodb:REGION:ACCOUNTID:table/TABLE"
      ]
    }
  ]
}UsageSecret key storagePlace the secret key of the IAM account into a file that is only
readable by thepdnsuser.Executable scriptCreate an executable script that looks like#!/bin/sh

exec /path/to/pdns-dynamodb -t TABLE -r REGION -I ACCESS_KEY -K /path/to/secret.keyReplacing TABLE, REGION and ACCESS_KEY with the appropriate values and
the path to secret key from the previous step.PowerDNS backend configurationConfigure pdns.conf as follows:launch=pipe
pipe-command=/path/to/executable/scriptusing the path to the executable script you created above.
Package: pdns-exporter
Python PowerDNS Records ExporterThis tool can be usedto export PowerDNS records database in several ways:bind zone formatmetrics for PrometheusInstallationPyPIDeploy the pdns records exporter in your server with the pip command.pipinstallpdns_exporterAfter installation, you can execute thepdns_exporterto start-it.
By default, the server is listening on the tcp port9090.Seeconfig fileexample for more options.Docker HubPull the pdns exporter image from Docker Hub.sudodockerpulldmachard/pdns-exporter:latestDeploy the containersudodockerrun-d-p9090:9090--name=pdnsexporter01dmachard/pdns-exporterThe container can be configured with the following environment variables:VariablesDescriptionPDNSEXPORT_VERBOSE1 or 0 to enable verbose modePDNSEXPORT_LOCAL_ADDRESSlistening ip address of the serverPDNSEXPORT_LOCAL_PORTlistening portPDNSEXPORT_API_LOGINlogin for basic authenticationPDNSEXPORT_API_PASSWORDpassword for basic authenticationPDNSEXPORT_DB_HOSTIp address of your database powerdns serverPDNSEXPORT_DB_PORTPort of your database powerdns serverPDNSEXPORT_DB_USERUser database of your powerdns serverPDNSEXPORT_DB_PWDPassword database of your powerdns serverPDNSEXPORT_DB_NAMEDatabase name of your powerdns serverHTTP APISecurityBasic authentication method is only supported, don't forget to change the default login and password in settings.conf.SwaggerSee theswaggerdocumentation.ExamplesGet all dns zones$curl-uchangeme:changemehttp://127.0.0.1:9090/zones|jq.[{"id":1,"name":"zone.test"}]Get a specific zone with zone file format$curl-uchangeme:changemehttp://127.0.0.1:9090/zone/1$ORIGIN.
zone.test3600INSOAa.misconfigured.dns.server.invalidhostmaster.zone.test01080036006048003600zone.test3600INNSns1.zone.test
ns1.zone.test3600INA128.0.0.1
a.zone.test300INA128.0.0.2
a2.zone.test300INA128.0.0.2
a2.zone.test300INA128.0.0.3
aaaa.zone.test300INAAAAfe80::42:1eff:feed:f6d6
cname.zone.test300INCNAMEa.zone.test
txt.zone.test300INTXT"hello world"Get metrics for prometheus of each dns zones declared in your dns server$curl-uchangeme:changemehttp://127.0.0.1:9090/metrics# HELP pdnsexporter_zones_total Total number of zones# TYPE pdnsexporter_zones_total counterpdnsexporter_zones_total4# HELP pdnsexporter_records_total Total number of records# TYPE pdnsexporter_records_total counterpdnsexporter_records_total32...Seemetrics fileexample.DevelopmentRunthe dnstap receiver from sourcesudopython3-c"from pdns_exporter import exporter; exporter.start_exporter();"-vTestunitssudopython3-munittest-vBuild docker imagesudodockerbuild.--fileDockerfile-tpdns-exporterAboutAuthorDenis Machardd.machard@gmail.comPyPIhttps://pypi.org/project/python-pdns-exporter/Githubhttps://github.com/dmachard/python-pdns-exporterDockerHubhttps://hub.docker.com/r/dmachard/pdns-exporter
Package: pdnssoc-cli
Correlate dnstap files with MISP threat intelligence.This tool parses JSON and compressed files created bygo-dnscollector.Installationpdnssoc-clican be fetched from the following sources:PyPipipinstallpdnssoc-cliConfigurationConfiguration can be provided using the--configflag in yaml format:logging_level:"INFO"misp_servers:-domain:"https://example-misp-instance.com"api_key:"API_KEY"args:date_from:'2023-01-01'correlation:output_dir:./output_dir/malicious_domains_file:./misp_domains.txtmalicious_ips_file:./misp_ips.txtIf no config flag is provided, the default file is/etc/pdnssoc-cli/config.yml.UsageUsage: pdnssoc-cli [OPTIONS] COMMAND [ARGS]...

Options:
    -c, --config FILE  Read option defaults from the specified yaml file
                        [default: /etc/pdnssoc-cli/config.yml]
    --help             Show this message and exit.

Commands:
    correlate  Correlate input files and output matchesUse-casesCorrelatego-dnscollectoroutput and produce alerts:
Package: pdoc
API Documentation for Python Projects.Examplepdoc -o ./html pdocgenerates this website:pdoc.dev/docs.Installationpipinstallpdocpdoc is compatible with Python 3.8 and newer.Usagepdocyour_python_module# orpdoc./my_project.pyRunpdoc pdocto see pdoc's own documentation,
runpdoc --helpto view the command line flags,
or check ourhosted copy of the documentation.Featurespdoc's main feature is a focus on simplicity: pdoc aims to do one thing and do it well.Documentation is plainMarkdown.First-class support for type annotations and all other modern Python 3 features.Builtin web server with live reloading.Customizable HTML templates.Understands numpydoc and Google-style docstrings.Standalone HTML output without additional dependencies.Under the hood...pdocwill automatically link identifiers in your docstrings to their corresponding documentation.pdocrespects your__all__variable when present.pdocwill traverse the abstract syntax tree to extract type annotations and docstrings from constructors as well.pdocwill automatically try to resolve type annotation string literals as forward references.pdocwill use inheritance to resolve type annotations and docstrings for class members.If you have substantially more complex documentation needs, we recommend usingSphinx!ContributingAs an open source project, pdoc welcomes contributions of all forms.Also, please feel free to join our developer Slack!pdoc vs. pdoc3This project is not associated with "pdoc3", which often falsely assumes our name.
Quoting@BurntSushi, the original author of pdoc:I'm pretty disgusted that someone has taken a project I built, relicensed it,attempted to erase its entry on the Python Wiki,
released it under effectively the same name and, worst of all, associated it with Nazi symbols.Source:https://github.com/pdoc3/pdoc/issues/64In contrast, the pdoc project strives to uphold a healthy community where everyone is treated with respect.
Everyone is welcome to contribute as long as they adhere to basic civility. We expressly distance ourselves from the use
of Nazi symbols and ideology.The pdoc project was originally created byAndrew Gallantand is currently maintained byMaximilian Hils.
Package: pdoc3
pdocAuto-generate API documentation for Python projects.Project websiteDocumentationInstallation$ pip install pdoc3UsagePdoc will accept a Python module file, package directory or an import path.$ pdoc your_projectSeepdoc --helpfor more command-line switches and thedocumentationfor more usage examples.FeaturesSimple usage. Generate sensible API (+ prose) documentation without any
special configuration.Support for commondocstrings formats(Markdown, numpydoc, Google-style docstrings),
LaTeX math, and somereST directives.Support forPEP 484andPEP 526type annotations.pdoc respects__all__when present.Docstrings for overridden class members areinheritedif unspecified.Support for documenting module, class, and instancevariablesby traversing ASTs.Automaticcross-linkingof referenced identifiers.Overriding docstrings generation with special module-level__pdoc__dictionary.Easily extended andcustomized templates.Built-indevelopment web serverfor near-instant preview of rendered docstrings.The above features are explained in more detail in pdoc'sdocumentation(generated with pdoc).DevelopmentCheckCONTRIBUTING.mdfor hacking details.
Package: pdock
pocdock is an experimental PyGTK docking implementation.Example usage:import gtk
import pdock

win = gtk.Window()
dock = pdock.Dock()
win.add(dock)
dock.add_item("item1", gtk.TextView(), "First item", "gtk-ok")
dock.add_item("item2", gtk.TextView(), "Second item", "gtk-apply")
win.show_all()

gtk.main()ScreenshotsTo see it in action, have a look at CrunchyFrog’s screenshots
(http://cf.andialbrecht.de/screenshots.html).
Package: pdoc-prep
pdoc_prep: Add sphinx-like function doc specs to pdocPrepares Python files that use sphinx-like parameter and return  specifications for input to the pdoc documentation tool (https://pypi.org/project/pdoc/).Motivation:The pdoc HTML output does not recognize function/method parameter and return specifications in doc strings as special. So,:param foo: controls whether bar is set to None
   :type foo: int
   :return True for success, else False
   :rtype boolwill show up literally. If a module to be documentated is  instead preprocessed using this script, then the pdoc documentation will look like this:foo (int): controls whether bar is set to None
          returns True for success, else False
          return type: boolThe keywords, such asreturns, and parameters, such asfoo (int)will be bold faced.Note:whether ':' is used to introduce a specification, or '@' is controlled from a command line option. See main section below.Usageshell> pdoc_run.py --html-dir docs src/pdoc_prep/pdoc_prep.pyThis command may be run from the project root, from within the evolving docs directory, or in the package directory. Obviously, the paths need to be adjusted accordingly.NotesNote 1:You may see:DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import impThis warning occurs in pdoc, which is not modified by this preprocessor. To suppress the warning, you can define an environment variable:export PYTHONWARNINGS=ignorein the shell where you are working.Note2:It would be more sensible to include this functionality in the pdoc HTML production code itself. Alas, not enough time.
Package: pdocr-rpc
pdocr-rpc基于PaddleOCR封装的RPC服务，包含客户端和服务端。客户端提供了一个简单易用的函数ocr，通过不同的参数控制返回不同的值。为什么要分成服务端和客户端？因为PaddleOCR安装太重了，如果你的使用场景是需要经常安装，那绝对是一个痛苦的事情，你要是知道它每次安装要装多少东西你肯定会忍不住摇头；而在服务端一次性安装部署之后，客户端就可以零成本的使用，非常的方便。Documentation:https://linuxdeepin.github.io/pdocr-rpcSource Code:https://github.com/linuxdeepin/pdocr-rpc1、服务端服务端安装pip install pdocr-rpc[server]服务端启动服务随意新建一个py文件，名称你可以自定义，比如：ocr_server.py；写入以下内容：# ocr_server.pyfrompdocr_rpc.serverimportserverserver()默认端口号为8890如果你想修改端口：frompdocr_rpc.serverimportserverfrompdocr_rpc.confimportsettingsetting.PORT=8888server()2、客户端客户端安装pip install pdocr-rpc客户端使用2.1、识别当前屏幕的所有文字内容frompdocr_rpcimportOCRfrompdocr_rpc.confimportsetting# 注意IP和端口要和你的服务端IP对应setting.SERVER_IP="192.168.0.1"setting.PORT=8888OCR.ocr()自动识别当前整个屏幕的所有内容。2.2、指定某张图片识别的所有文字内容OCR.ocr(picture_abspath="~/Desktop/test.png")返回识别图片test.png的内容。2.3、在全屏指定查找某个字符串的坐标OCR.ocr("天天向上")返回当前屏幕中，“天天向上”的坐标，如果存在多个，则返回一个字典。2.4、指定某张图片查找某个字符串的坐标OCR.ocr("天天向上"，picture_abspath="~/Desktop/test.png")2.5、其他参数识别语言lang：ch,en,fr,german,korean,japan默认为ch，中文，如果要修改识别语言；OCR.ocr(lang="ch")匹配度similarity: float默认为0.6，可以修改为从0到1的数；OCR.ocr(similarity=0.1)返回原始数据return_default: bool默认为False，即默认返回识别到字符串的中心坐标，True表示返回原始数据；OCR.ocr(return_default=False)只返回第一个return_first: bool当传入要查找的字符串时，可能存在当前屏幕中有多个目标；默认情况下是会将识别到的多个目标组装成字典返回；return_first=True 表示返回识别到的第一个。OCR.ocr(return_first=True)
Package: pdom
pdomSimulation toolkit for the Photocatalytic Degradation of Organic MoleculesSetupMost features of pdom can be directly accessed from its command-line tools.
The easiest way to install them on your system is viapipx.
So if you just need the CLI, use the following line to install pdom.pipx install pdomYou can also install thepdomlibrary directly through the Python Package Index (PyPI) for use in your own projects.
The use of avirtual environmentis recommended.pip install pdomIf the stable version ofpdomon PyPI is missing a particular function, you can install the latest version directly from the GitHub repository.pip install -U git+https://github.com/theia-dev/pdom.git#egg=pdomCitationIf you usepdomin your work please cite the paper describing thebasic modelsEckert, H., Bobeth, M., Teixeira, S., Kühn, K., & Cuniberti, G.Modeling of photocatalytic degradation of organic components in water by nanoparticle suspension.Chemical Engineering Journal261, (2015).
doi:10.1016/j.cej.2014.05.147The full source code can be accessed onGitHubwith the corresponding documentation hosted atRead the docs.
Package: pdo-pip
PDOAn interface to access a database from Python.Install-> Launch in cmd :pip install pdo-pip-> EnjoySupportedDatabasePython ModuleSupported Since PDO VersionSQLitesqlite31.1.0MySQLmysql.connector1.1.0PostgreSQLpysopg21.1.0See examples in examples directory.ChangelogV 1.1.1 : 09 Oct 2020 (LATEST)Fix SQLite DatabaseV 1.1.0 : 24 Sept 2020Add support of SQLiteAdd support of MySQLAdd support of PostgreSQLV 1.0.0 : 23 Sept 2020First Version
Package: pdopt
Probabilistic Design and OPTimisation framework (PDOPT)A python framework for set-based design space exploration without explicit elimination rules.
It impements a set-based approach for mapping the requirements on the design space, using a probabilistic surrogate model trained on the provided design model.
This procedure ensures to identify the best candidate areas of the design space with the minimum number of assumptions of the design of the system.The framework process follows two steps:Exploration Phase. After breaking down the design space into sets (i.e. sub-spaces), the code evaluates the probability of satisfying the constraints there. Sets that have a low probability are eliminated.Search Phase. Surviving sets are further explored by introducing a local optimisation algorithm (GA-based), and recovering the locally optimal design points.The final output is an aggregation of locally optimal points which constitute a rich database of design alternatives capable to minimally satisfy the requirements set by the user.RequisitesThe following python libraries are required for installingPDOPT.
These can be automatically installed with the provided setup script.numpyscipymatplotlibpandasscikit-learnpymoojoblibThe optional visualisation tool requires thedash-plotlypackage to be installed.InstallationFirstgit clonethe repository or download the zip file.
Then run the setup from the root folder:pip install -e .Use the--useroption if not running in admin mode.DocumentationOnline API documentation with example usage can be foundhere.An outdated PDF document with some explaination of the theory behind PDOPT can be found in the docs folder.
Additional information can be found in the following paper:Application of Probabilistic Set-Based Design Exploration on the Energy Management of a Hybrid-Electric AircraftCommunity GuidelinesThis software is currently being maintained by me @spin-jet. If you find any bugs, want to contribute or have any questions, you can either open a ticket here on GitHub or send me an email atandrea.spinelli@cranfield.ac.ukAcknowledgementsThis software was developed within Project, with EU Horizon 2020 Grant No. 875551.
The authors wants to thank all the researchers in the project who cotnributed with their input to shape the framework.LicensingCopyright (c) 2021 Cranfield University. This software is released under the permissive MIT License.
Package: pdown
periscope-downloader=========*A command line tool to download periscope charts, and save the snapshot of thechart with a timestamp to a local file. Allows for historical data to bearchived so that trends can be analyzed.*Install:* from pip:* `sudo easy_install pip`* `pip install pdown`* from tarball:* `gunzip -c pdown-X.Y.Z.tar.gz | tar xopf -`* `python setup.py install`* (optional) `export PATH=/usr/local/bin:$PATH`To build:* change directories to pdown dir* `$ cd periscope-downloader/dir`* run the setup script* `python setup.py develop`To push to PyPi:* `$ cd periscope-downloader`* `python setup.py sdist`* `twine upload dist/pdown-X.Y.Z.tar.gz`
Package: pdp
Why?Many tasks in machine learning, deep learning and other fields require complex data processing that takes a lot of time. Ideally, this processing should run in parallel to the main process, preparing data for usage (by neural net, for instance). PDP provide simple interface to organize pipeline of data processing with simple blocks that satisfy most typical needs.Use casesNeural Net training, where you need a way to train net, load data from the disk and augment it. PDP allows user to do all these things at the same time without need to usethreadingmodule directly.ExamplesAre in repository inexamplesfolderIs it fast?Speed and parallel execution is a top priority. Right now threads are used to exchange information between pipline stages, because it’s memory and CPU efficient to exchange data between threads and not processes. Python’s threads are flawed by GIL, but it doesn’t affect performance for IO-bound tasks and for numpy operations. Since all operations for data augmentations are likely to be done in numpy operations, performance will not be significantly affected by GIL.Installationpip install pdp
Package: pdp11games
This is a re-implementation of some classic PDP-11 games with the curses API.
Super-Pacman (sp21), Mars (marswar) and Xonix (xonix) have been implemented
so far.Any contributions to the project are always welcome. Please direct your
questions, comments or patches to Peter Cherepanov <sphinx.pinastri@gmail.com>The goal of sp21 is to collect the all dots in the maze and avoid ghosts.
The game is controlled with the arrow keys.The goal of marswar is to shoot down all the martians and defend your soldiers.
The game is controlled with the arrow keys and space bar.The goal of xonix is to claim as much land as possible while avoiding the
enemies. The game is also controlled with the arrow keys.
Package: pdpatch
pdpatchpdpatchadds methods topandas’DataFrameandSeriesfor a faster data science pipeline. It also
defines drop-in replacements forseabornandplotly.expressthat
automatically label axes with nicer titles. We usenbdevto build this project.Installpip install pdpatchHow to usefrompdpatch.allimport*Interactive Method.less()Automatically Rename snake_case columns inplotly.expressandseabornimportpandasaspdfrompdpatch.expressimport*df=pd.DataFrame({'time__s__':range(10),'position__m__':[i**1.3foriinrange(10)],'speed__m/s__':10*[1]})#df = pd.DataFrame({'time__s__': range(10), 'position__m__': range(10)})px.scatter(df,x='time__s__',y='position__m__').show('png')frompdpatch.seabornimportsnssns.scatterplot(data=df,x='time__s__',y='position__m__');Add Altair-like Operation to plotly Figuresfig=px.scatter(df,x='time__s__',y='time__s__')|px.scatter(df,x='time__s__',y=['position__m__','speed__m/s__'])fig.show('png')fig=px.scatter(df,x='time__s__',y='time__s__')/px.scatter(df,x='time__s__',y=['position__m__','speed__m/s__'])fig.show('png')fig=px.scatter(df,x='time__s__',y='time__s__')|px.scatter(df,x='time__s__',y=['position__m__','speed__m/s__'])(fig/fig).show('png')Shorter methodsdf.rename(columns={'col_1': 'new_name'})->df.renamec('col_1', 'new_name')df=dummydf()df.renamec('col_1','new_name').to_html()new_namecol_20100a1101b2102c3103d4104eFunctions as methodsdf.len()5New methodsdf.col_1.minmax(100, 104)Utility functionsdf=dummydf()df.to_html()col_1col_20100a1101b2102c3103d4104e
Package: pdp-kafka-reader
PDP Kafka ReaderRequirementsgitpython 3.6+pipAlso, you need access to the git repository. Generate and use ssh keys in Skyway Bitbucket.Installpipinstallpdp_kafka_readerUsageCLIYou can usekafka-readerCLI tool to extract data into from a specific topic. An example of usage:kafka-readerexport-avro-kkafka-options.json-sschema.json-tmy_kafka_topic-oout.parquetCheck all options withkafka-reader -h.Python KafkaReaderimportjsonfrompdp_kafka_reader.kafka_readerimportKafkaAvroReaderkafka_options={"kafka.bootstrap.servers":"my-kafka-server:9092","subscribe":"test_avro"}avro_schema=open("schema.json").read()reader=KafkaAvroReader(spark)df=reader.read_avro(kafka_options,avro_schema,"my_kafka_topic")df.show()TestingTesting environment in defined indocker-compose.yml. Start docker containers and runtox.