Saravanan666/pypi-org huggingface dataset:
Package: dlw
Program for Doubly Labeled Water calculationsThis open-source program allows researchers to simply and repeatedly perform doubly labeled water calculations and save the results.  All the results have been validated by comparison with a detailed DLW calculation spreadsheet, a copy of which is available in this repo for examination.  The one exception is that the exponential decay calculations were validated by comparison with a previous DLW program version as the spreadsheet does not do exponential fitting.The steps undertaken by the program are:express all isotope enrichments as isotope ratioscalculate mean isotope turnover rates for both deuterium and oxygen - the user can choose whether to use a 2pt method or a multi-sample exponential fit.calculate isotope dilution spaces for both deuterium and oxygen and using both plateau and intercept methodscalculate dilution space rato Nd/Nocalculate average pool sizescalculate CO2 production - the program does 3 separate calculations
a) using the equation of Schoeller (equation A6, 1986 as updated in 1988)
b) using the equation of Racette (1994)
c) using the equation of Speakman eqn 17.41 (1997)convert to total energy expenditure using the equation of Weir , J.B. J Physiol., 109(1-2):1-9, 1949optionally save the data to csvExample input CSVsSeeDoublyLabeledWater/test/test-input.csvandDoublyLabeledWater/test/test-exponential.csvfor the expected CSV input format that the program expects. Column order does not matter; exact column names do.
Package: dl-with-numpy
docsbuildpackageA very simple deep learning library implemented in Numpy.Installationpip install dl_with_numpyDocumentationhttps://dl-with-numpy.readthedocs.io/DevelopmentTo run the all tests run:toxAcknowledgementsMany thanks to Ionel Cristian Mărieș forHis excellentblog poston packaging a python library.Hiscookiecutter-pylibraryproject on Github.  For this project I wanted to make my own mistakes but
next time I would just fork his project and go from there.
Package: dlx
This package provides an implementation of Donald Knuth's DancingLinks algorithm for solving exact set cover problems.1.0.4: Minor Python 3 bugfix.1.0.3: Attempt to make code compatible with Python 3.1.0.2: Removed extraneous code (had switched from callbacks for solutions tomaking solve a generator to yield, but had forgotten to remove thesolution callback function parameter from the solve method).1.0.1: Critical bugfix (N array was one short: did not account for header).1.0.0: Initial release.
Package: dlxsudoku
Sudoku Solver written in pure Python with no dependencies.It solves Sudokus of sizesN x Nby pure induction as far as is
possible, and then uses an optionalDancing
Linksbrute force
solver, when the basic induction is not enough.InstallationInstall with pip:pip install dlxsudokuTestingTests can be run usingpytest:py.test testsThe tests make a HTTP request to a file containing several Sudokus onProject
Euler.UsageA Sudoku stored in a file can be solved as such:fromdlxsudokuimportSudokus=Sudoku.load_file('path/to/sudoku.sud')s.solve(verbose=True,allow_brute_force=True)Alternatively, if your Sudoku is stored in string variable it can be
solved in the following fashion:fromdlxsudokuimportSudokusudoku_string_1="030467050920010006067300148301006027400850600090200400005624001203000504040030702"sudoku_string_2="# Example Sudoku\n"+\"*72****6*\n"+\"***72*9*4\n"+\"*9*1****2\n"+\"*******4*\n"+\"82*4*71**\n"+\"**9*6*8**\n"+\"***9**6**\n"+\"**3*72*9*\n"+\"*6*843*7*"s1=Sudoku(sudoku_string_1)s1.solve()print(s1.to_oneliner())s2=Sudoku(sudoku_string_2)s2.solve()print(s2)DLXSudoko treats a Sudoku with multiple solutions as a faulty one and
raises adlxsudoku.exceptions.SudokuHasMultipleSolutionsErrorexception in such a situation.Use from terminalDLXSudoku also installs a console entry point. Can solve Sudokus from
string or from path:solve-sudoku--sudoku030467050920010006067300148301006027400850600090200400005624001203000504040030702orsolve-sudoku--path"path/to/sudoku.sud"Sudoku formattingA Sudoku file or string should be structured in the following manner:# Optional comment or metadata
*72****6*
***72*9*4
*9*1****2
*******4*
82*4*71**
**9*6*8**
***9**6**
**3*72*9*
*6*843*7*or as a one-liner:030467050920010006067300148301006027400850600090200400005624001203000504040030702Any character other than[1-9]may be used as a placeholder for
unknowns.ReferencesThe Dancing Links code has been adapted fromAlgorithm X in 30
lines!,
only modified slightly to accommodate class structure and Python 2.6.
Package: dm2gym
dm2gym: Convert DeepMind Control Suite to OpenAI gym environments.This repository contains a lightweight wrapper to convert DeepMind Control Suite to OpenAI gym environments.InstallationOne can install directly from PyPI:pip install dm2gymThe installation can also be done with:git clone https://github.com/zuoxingdong/dm2gym.git
cd dm2gym
pip install -e .Getting startedOne liner to create the environment:importgymenv=gym.make('dm2gym:CheetahRun-v0')More examples to specify the environment:env=gym.make('dm2gym:FishSwim-v0',environment_kwargs={'flat_observation':True})env=gym.make('dm2gym:HopperHop-v0',visualize_reward=True)What's new2019-10-18 (v0.2.0)Sync to the latest API of DeepMind Control SuiteSupport gym registration: create alldm_controlenvironments viagym.make2019-04-14 (v0.1.0)Initial releaseReferencePlease use this bibtex if you want to cite this repository in your publications:@misc{dm2gym,
      author = {Zuo, Xingdong},
      title = {dm2gym: Convert DeepMind Control Suite to OpenAI gym environments.},
      year = {2019},
      publisher = {GitHub},
      journal = {GitHub repository},
      howpublished = {\url{https://github.com/zuoxingdong/dm2gym}},
    }
Package: dm53
Domain monitoring & registration with AWS route53UsageShow help message and exitdm53--helpCheck availability of a domaindm53check--domain-nameexample.comNote: Make sure AWS credentials are configured, following example uses env
variablesAWS_ACCESS_KEY_ID=my-access-key\AWS_SECRET_ACCESS_KEY=my-secret-access-key\dm53check--domain-nameexample.comfor more details seeboto3
docsKeep checking with a 5 seconds interval until the domain becomes availabledm53check--domain-nameexample.com--monitor--interval5Register a domain if availabledm53check--domain-nameexample.com--register--path/path/to/registration-details.jsonNote: Registration details must be provided through a JSON file, seethis
exampleor read more inAWS
docsRun in background to ignore hangup signal withnohup, forward output toexamplecom.outnohupdm53check--domain-nameexample.com--monitor>examplecom.out2>&1&Note: Thenohupcommand prints a shell job ID and a process ID. Terminate
the process withkill -9 <PID>.ContributingContributions are welcome via pull requests.IssuesIf you encounter any problems, please file anissuealong with a detailed
description.DevelopActivate virtual environmentpoetryshellInstall dependenciespoetryinstall--remove-untrackedInstall git hookspre-commitinstall--hook-typepre-commitRun linterflake8.Format codeblack.Sort importsisort.Install current project from branchpoetryaddgit+https://github.com/MousaZeidBaker/dm53.git#branch-name
Package: dm-acme
Acme is a library of reinforcement learning (RL) agents
and agent building blocks. Acme strives to expose simple, efficient,
and readable agents, that serve both as reference implementations of popular
algorithms and as strong baselines, while still providing enough flexibility
to do novel research. The design of Acme also attempts to provide multiple
points of entry to the RL problem at differing levels of complexity.For more information seegithub repository.
Package: dm-aioinfluxdb
DM-aioinfluxdbUrlsPyPIGitHubUsageWritefromdm_aioinfluxdbimportDMAioInfluxDBClientimportasyncioasyncdefmain():# create clientinfluxdb_client=DMAioInfluxDBClient("localhost",8086,"org","token")# create influxdb pointspoint1=influxdb_client.create_point("example-measurement",{"value":1.5},{"tag1":"tag1-value"})point2=DMAioInfluxDBClient.create_point("example-measurement",{"value":0},{"tag2":"tag2-value"})# write one or more pointsawaitinfluxdb_client.write("example-bucket",point1)# type: boolstatus=awaitinfluxdb_client.write("example-bucket",[point1,point2])# return error message in case of error# type: (bool, str)status,err_msg=awaitinfluxdb_client.write("example-bucket",point1,return_errors=True)# without error logs in case of errorsawaitinfluxdb_client.write("example-bucket",point1,err_logging=False)if__name__=="__main__":asyncio.run(main())Queryfromdm_aioinfluxdbimportDMAioInfluxDBClientimportasyncioasyncdefmain():# create clientinfluxdb_client=DMAioInfluxDBClient("localhost",8086,"org","token")# write queryquery='from(bucket: "example") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "monitoring" and r._field == "cpu")'# type: <class 'influxdb_client.client.flux_table.TableList'>table_res=awaitinfluxdb_client.query(query)# type: strjson_res=awaitinfluxdb_client.query(query,to="json")# type: list[dict]list_res=awaitinfluxdb_client.query(query,to="list")# return error message in case of error# type: (str, str)json_res,err_msg=awaitinfluxdb_client.query(query,to="json",return_errors=True)# without error logs in case of errorsres=awaitinfluxdb_client.query(query,err_logging=False)if__name__=="__main__":asyncio.run(main())Set custom loggerIf you want set up custom loggerfromdm_aioinfluxdbimportDMAioInfluxDBClient# create custom loggerclassMyLogger:defdebug(self,message):passdefinfo(self,message):passdefwarning(self,message):print(message)deferror(self,message):print(message)# set up custom logger for all clientsDMAioInfluxDBClient.set_logger(MyLogger())
Package: dm-aiomqtt
DM-aiomqttUrlsPyPIGitHubUsageWarningFor correct operation of the client,readwriteaccess toping/#topic isREQUIRED.
Improved system for responding to loss of connection, will use this topic to sendpingmessages.(Format of ping messages - topic:ping/[uuid4], payload:1)Run in WindowsIf you run async code inWindows, set correct selectorimportasyncioimportsysifsys.platform=="win32":asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())Examplefromdm_aiomqttimportDMAioMqttClientimportasyncio# create handler for 'test' topicasyncdeftest_topic_handler(publish:DMAioMqttClient.publish,topic:str,payload:str)->None:print(f"Received message from{topic}:{payload}")awaitpublish("test/success",payload=True)asyncdefmain():# create clientmqtt_client=DMAioMqttClient("localhost",1883,"username","password")# add handler for 'test' topicmqtt_client.add_topic_handler("test",test_topic_handler)# start connectionawaitmqtt_client.start()# publishawaitmqtt_client.publish("test",payload="Hello World!",sent_logging=True)# other code (for example, endless waiting)awaitasyncio.Event().wait()if__name__=="__main__":asyncio.run(main())Set custom loggerIf you want set up custom loggerfromdm_aiomqttimportDMAioMqttClient# create custom loggerclassMyLogger:defdebug(self,message):passdefinfo(self,message):passdefwarning(self,message):print(message)deferror(self,message):print(message)# set up custom logger for all clientsDMAioMqttClient.set_logger(MyLogger())Publish method parametersParameterTypeDefault ValueDescriptiontopicstr(required)Topic namepayloadstr"DEBUG"Content to sendqos0|1|2TrueMQTT QoSpayload_to_jsonbool|"auto"TrueWhether to convert content to JSONsent_loggingboolFalseWhether to print the sending notificationwarn_loggingboolFalseWhether to print a send error warning
Package: dman
The Data Manager PackageThedmanpackage is intended for enabling easy reproducibility of numerical experiments. Data is stored in a human-readable fashion (whenever possible).Documentationis provided in Sphinx.
A good place to start is theGetting Startedpage.DocumentedExamplesare also provided. Especially check out those
inPatternsfor common use-cases
andCase Studiesfor examples on how to interfacedmanwith other common packages likenumpy.
Package: dmango
Your project description goes hereDocumentationThe full documentation is athttps://dmango.readthedocs.io.QuickstartInstall dmango:pip install dmangoAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'dmango.apps.DmangoConfig',...)Add dmango’s URL patterns:fromdmangoimporturlsasdmango_urlsurlpatterns=[...url(r'^',include(dmango_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2018-06-07)First release on PyPI.
Package: dmapi
Dados de MercadoThis is a Python Client forDados de Mercado's API.Instalationpip3 install dmapiUsageYou will need a token to access the API endpoints. Go to thedocumentation page(in portuguese)
to generate one.Usage examplefromdmapiimportDMAPIdm=DMAPI(token='c8cad35b0376c8f6bcb46614f80d9443')# Set your token hereprint(dm.companies())Available callsPlease refer to thedocumentationfor more details on the parameters available on each call.dm.companies()dm.company(company_slug)dm.financials(company_slug, [type, offset, limit])dm.ratios(company_slug, [type, offset, limit, market])dm.tickers()dm.ticker(ticker, [from_date, to_date])dm.price_indexes([from_date, to_date])dm.selic()
Package: dmarc
DMARC (Domain-based Message Authentication, Reporting & Conformance)DMARC email authentication module implemented in Python.InstallationUse the package managerpipto install dmarc.pipinstalldmarcUsage>>>importdmarc>>>>>># represent verified SPF and DKIM status>>>aspf=dmarc.SPF(domain='news.example.com',result=dmarc.SPF_PASS)>>>adkim=dmarc.DKIM(domain='example.com',result=dmarc.DKIM_PASS)>>>admarc=dmarc.DMARC()# admarc = dmarc.DMARC(publicsuffix.PublicSuffixList())>>>try:...plc=admarc.parse_record(record='v=DMARC1; p=reject;',domain='example.com')# parse policy TXT RR...res=admarc.get_result(policy=plc,spf=aspf,dkim=adkim)# evaluate policy...res.verify()# check result...adict=res.as_dict()# dict repr...exceptdmarc.RecordSyntaxError:...'invalid dmarc txt rr'...exceptdmarc.PolicyNoneError:...'res.result == POLICY_FAIL and res.disposition == POLICY_DIS_NONE'...exceptdmarc.PolicyQuarantineError:...'res.result == POLICY_FAIL and res.disposition == POLICY_DIS_QUARANTINE'...exceptdmarc.PolicyRejectError:...'res.result == POLICY_FAIL and res.disposition == POLICY_DIS_REJECT'...exceptdmarc.PolicyError:...'res.result == POLICY_FAIL and unknown disposition error'...>>>res.result==dmarc.POLICY_PASSTrue>>>res.disposition==dmarc.POLICY_DIS_NONETrueLicenseMIT
Package: dmarc-import
dmarc-import :postal_horn: :mailbox:dmarc-importis a tool for parsing DMARC aggregate reports.  The
expected format of these aggregate reports is described inRFC 7489.Installation of the Python packageFrom PyPIpipinstalldmarc-importFrom your local checkoutAfter usinggitto clone the repository, you can installdmarc-importusingpip:pipinstall/path/to/dmarc-importFrom GitHubOr, if you prefer, you can install directly fromthe GitHub repository:pipinstallgit+https://github.com/cisagov/dmarc-import.gitBuilding the Docker imageAs an alternative to installing the Python package, you can instead
choose to build the Docker image:docker-composebuildUsageUsage:dmarc-import--schema=SCHEMA--s3-bucket=BUCKET[--s3-keys=KEYS][--domains=FILE][--reports=DIRECTORY][--elasticsearch=URL][--es-region=REGION][--log-level=LEVEL][--dmarcian-token=FILE][--delete]dmarc-import(-h|--help)Options:-h--helpShowthismessage.--log-level=LEVELIfspecified,thentheloglevelwillbesettothespecifiedvalue.Validvaluesare"debug","info","warn",and"error".--schema=SCHEMATheXSDfileagainstwhichtheDMARCaggregatereportsaretobebeverified.--s3-bucket=BUCKETTheAWSS3bucketcontainingtheDMARCaggregatereports.--s3-keys=KEYSAcomma-separatedlistofDMARCaggregatereportkeys.Ifspecified,onlythespecifiedDMARCaggregatereportswillbeprocessed.OtherwiseallreportsintheAWSS3bucketwillbeprocessed.--domains=FILEAfiletowhichtosavealistofalldomainsforwhichDMARCaggregatereportswerereceived.Ifnotspecifiedthennosuchfilewillbecreated.--reports=DIRECTORYAdirectorytowhichtowritefilescontainingDMARCaggregatereportcontents.Ifnotspecifiedthennosuchfileswillbecreated.--elasticsearch=URLAURLcorrespondingtoanAWSElasticsearchinstance,includingtheindexwheretheDMARCaggregatereportsshouldbewritten.--es-region=REGIONTheAWSregionwheretheElasticsearchinstanceislocated.--dmarcian-token=FILEAsimpletextfilewhoseonlycontentsaretheDmarcianAPItoken.IfspecifiedthentheDmarcianAPIwillbequeriedtodeterminewhatcommercialmail-sendingorganization(ifany)isassociatedwiththeIPintheaggregatereport.--deleteIfpresentthenthereportswillbedeletedafterprocessing.Setting up Docker secretsBefore attempting to run this project viadocker-compose, you must
create asecretsdirectory and a few files inside it that contain
credentials for the Docker container to use.  These files are:secrets/aws/config-an ini format file containing the AWS
configurationsecrets/aws/credentials-an ini format file containing the AWS
credentialssecrets/dmarcian/token- a text file containing aDmarcian API
tokenLicenseThis project is in the worldwidepublic domain.This project is in the public domain within the United States, and
copyright and related rights in the work worldwide are waived through
theCC0 1.0 Universal public domain
dedication.All contributions to this project will be released under the CC0
dedication. By submitting a pull request, you are agreeing to comply
with this waiver of copyright interest.
Package: dmarcparser
DMARC ParserPublic helper methodsThese methods are only included for your convenience. Code is "not" part of the main library/parser but acts as a great segway to implement the parser with ease.from dmarc import dmarc_from_folder, dmarc_from_file

    Multi-threaded:    dmarc_from_folder(folder: str, recursive: bool, debug_level: int)
    Single-threaded:   dmarc_from_file(path: str, debug_level: int):Public class / methodsDmarcParser(queue_name: str, queue: Queue, debug_level: int)        # Queue is for logging and optional. 
        .read_file(path: str)
        .extract_report_from_zip(data: io.BytesIO) -> dict
        .extract_report_from_gzip(data: io.BytesIO) -> dict
        .extract_report_from_xml(data: bytes) -> dict
        .extract_report_from_eml(data: bytes) -> dictMinimal example program#!/usr/bin/env python3
# -*- coding: utf-8 -*-

""" Main """

import argparse
import logging

from dmarc import dmarc_from_folder

def run(debug_level=logging.INFO):
    """ Main """
    dmarc_from_folder("example/private/data/", recursive=True, debug_level=debug_level)

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("-v", "--verbose", help="increase output verbosity", action="store_true")
    args = parser.parse_args()
    run_args = {}
    if args.verbose:
        run_args["debug_level"] = logging.DEBUG
    run(**run_args)Install instructions# Production
pip install .

# Development
## Setup
python -m venv env
.\env\Scripts\activate

## Install
pip install .

## Test
python -m pytest
Package: dmarc-reports
DMARC ReportsThe Python package for parsing, validation and storage of DMARC reports.InstallationIf you usepip, you can install it with:pip install dmarc-reportsUsageParse and validate an aggregate report.xmlfile into anAggregateReportclass:from dmarc_reports.classes import AggregateReport
from dmarc_reports.exceptions import BadAggregateReport


try:
    with open('aggregate-report.xml','r') as FILE:
        report = AggregateReport(FILE)
except BadAggregateReport as error:
    print(error)ResourcesDMARCLicenseMIT LicenseCopyright (c) 2021 Rui AntunesPermission 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.
Package: dmas
DMAS RULE.
Division, Multiplication, Addition and Subtraction (DMAS) is the elementary rule for the order of operation
of the Binary operations. What is the scientific and technical reason behind this mathematical myth though
Multiplication before Division also gives the same result mostly? DMAS, a nice tool but has less convincing/appealing
to admit its order of operation.
I am just Simply that the two number are taking enter from user and the applying the DMAS ruleChange Log0.0.1 (18/2/2021)First Release
Package: dmba
Data Mining for Business Analytics: Concepts, Techniques, and  Applications in PythonCollection of utility functions used in the bookData Mining for Business Analytics: Concepts, Techniques, and Applications in Python(First Edition)
Galit Shmueli, Peter C. Bruce, Peter Gedeck, and Nitin R. Patel
(c) 2019 John Wiley & Sons, Inc.Code for the book and the used datasets are available onhttps://www.dataminingbook.com/book/python-edition.InstallationUsepipto install thedmbapackage from pypi (https://pypi.org/project/dmba/).pip install dmbaShould this not work, for example when you are behind a firewall, download the package from pypi and install from file, e.g.pip install dmba-0.2.3.tar.gzAdjust the link as required.
Package: dmbiolib
dmbiolibLibrary of Python functions for bioinformaticsInstall from Bioconda:conda install -c bioconda dmbiolibInstall from PyPI:pip install dmbiolibFull documentation:https://dmbiolib.readthedocs.io/GitHub issues (bug reports, feature requests):https://github.com/damienmarsic/dmbiolib/issues/new/choose
Package: dmc-floss-gimp-color-palette-generator
dmc-floss-gimp-color-palette-generatorGenerates a GIMP palette from the data athttp://my.crazyartzone.com/dmc.aspYou can install this tool to generate the latest color palette data. DMC doesn't release new colors
all that often however, so you may just want to download the latest pre-generated palette frompalettes/.Installation$ pip install dmc-floss-gimp-color-palette-generatorUsage$ generate_dmc_paletteThe above will write out a palette file calleddmc_floss.gplin the current working directory.Alternatively, you can specify the output file path:$ generate_dmc_palette /some/file/path.gplBe sure to keep the extension as.gplso GIMP will recognize it as a palette file.Importing a palette file into GIMPRight click somewhere in the Palettes dialog and click "Import Palette...". In the resulting dialog,
click "Palette File" and select the palette file with the file selection dialog. Be sure to set the
desired name for your palette in the "Palette Name" text box. Click "Import" and your palette will
be usable in GIMP.