Saravanan666/pypi-org huggingface dataset:
Package: dohlee
python-dohleeMy personal python library.Installationpip install dohleeExamplesdohlee.plotPlotting library. Provides simple ways to produce publication-ready plots.dohlee.plot.mutation_signatureimportdohlee.plotasplot;plot.set_style()# Sets plot styles.ax=plot.get_axis(figsize=(20.4,3.4))plot.mutation_signature(data,ax=ax)dohlee.plot.boxplotax=plot.get_axis(preset='wide',transpose=True)plot.boxplot(data=iris,x='species',y='sepal_length',ax=ax)dohlee.plot.histogramax=plot.get_axis(preset='wide')plot.histogram(iris.sepal_length,bins=22,xlabel='Sepal Length',ylabel='Frequency',ax=ax)dohlee.plot.frequencyax=plot.get_axis(preset='wide')plot.frequency(data,ax=ax,xlabel='Your numbers',ylabel='Frequency')dohlee.plot.tsneax=plot.get_axis(preset='wide')plot.tsne(iris[['sepal_length','sepal_width','petal_length','petal_width']],ax=ax,s=5,labels=iris['species'])dohlee.plot.stacked_bar_chart# Generate sample data.n_samples=100sample_dict={'Sample':['S%d'%iforiinrange(1,n_samples+1)]}value_dict={c:np.random.randint(0,100,size=n_samples)forcin['Missense','Nonsense','Silent']}test_data=pd.DataFrame({**sample_dict,**value_dict})# Plot stacked bar chart.plot.stacked_bar_chart(data=test_data,x='Sample',y=['Missense','Nonsense','Silent'],ax=plot.get_axis(figsize=(14.4,3.4)),xticklabels=False,sort=True,ylabel='Number of mutations',xlabel='Sample',legend_size='xx-large')dohlee.plot.linear_regressionax=plot.get_axis(preset='wide')x=np.linspace(0,1,100)y=2*x+3+np.random.normal(0,0.3,len(x))plot.linear_regression(x,y,ax=ax)DevelopmentSince this package is updated as needed when I'm doing my research, the development process fits well with TDD cycle.When you feel a need to write frequently-used research workflow as a function, write rough tests so that you can be sure that the function you've implemented just meets your need. Write the name of test function as verbose as possible!Run test with following commands. By default, nosetests ignores runnable files while finding test scripts.--exeoption revokes it.nosetests--exe--with-coverage--cover-package=dohleeORtox-epy35,py36When sufficient progress have been made, test if the package can be published.toxIf all tests are passed, distribute the package via PyPI.pythonsetup.pysdist
twineuploaddist/dohlee-x.x.x.tar.gz
Package: doi2bib
Descriptiondoi2bib is a module ofbibcureandscihub2pdfInstall$ sudo pip install doi2bibor if you want the full version$ sudo pip install bibcureFeatures and how to useGiven a DOI number…$ doi2bib 10.1038/s41524-017-0032-0get bib item given a doi(requires internet connection)You can easily append a bib into a bibfile, just do$ doi2bib 10.1038/s41524-017-0032-0 >> file.bibYou also can generate a bibtex from a txt file containing a list of DOIs$ doi2bib --input file_with_dois.txt --output refs.bibbibcureGiven a bib file…$ bibcure -i input.bib -o output.bibcheck sure the Arxiv items have been published, then update
them(requires internet connection)complete all fields(url, journal, etc) of all bib items using DOI
number(requires internet connection)find and create DOI number associated with each bib item which has
not DOI field(requires internet connection)abbreviate jorunals namestitle2bibGiven a title…$ title2bib An useful papersearch papers related and return a bib for the selected
paper(requires internet connection)You can easily append a bib into a bibfile, just do$ title2bib An useful paper --first >> file.bibYou also can generate a bibtex from a txt file containing a list of
“titles”$ title2bib --input file_with_titles.txt --output refs.bib --firstarxivcheckGiven a arxiv id…$ arxivcheck 1601.02785check if has been published, and then returns the updated bib
(requires internet connection)Given a title…$ arxivcheck --title An useful paper published on arxivsearch papers related and return a bib the first item. You can easily
append a bib into a bibfile, just do$ arxivcheck --title An useful paper published on arxiv >> file.bibYou also can interact with results, just pass –ask parameter$ arxivcheck --ask --title An useful paper published on arxivscihub2pdfGiven a bibtex file$ scihub2pdf -i input.bibGiven a DOI number…$ scihub2pdf 10.1038/s41524-017-0032-0Given a title…$ scihub2bib --title An useful paperLocation folder as argument$ scihub2pdf -i input.bib -l somefoler/Use libgen instead sci-hub$ scihub2pdf -i input.bib --uselibgen
Package: doi2ietf
doi2ietf: Convert DOI metadata into BibXMLPurposedoi2ietfallows you to fetch bibliographic data from a DOI entry and convert
that into IETF BibXML. IETF BibXML is the bibliographic data XML schema used by
IETF RFC XML (RFC 7991)The digital object identifier system (DOI) is specified inISO 26324with the Registration
Authority being theInternational Digital Object Identifier Foundation.The DOI registration authority allows attaching bibliographic metadata on DOI
entries using the CrossRef format, available athttps://data.crossref.org, anddoi2ietffetches those metadata from that site.DOI identifiers can be resolved at theDOI resolver page.NOTE:doilitwas originally written byCarsten Bormannas part of thekramdown-rfc2629package.
Thedoi2ietfpackage provides the Python equivalent of that functionality.PrerequisitesThis software requires Python 3.6+.All dependencies are specified insetup.pyfor PyPA.InstallThe package is published at PyPi and can be installed on its own.pipinstalldoi2ietfUsageCommand-line interfaceThedoi2ietfcommand takes a list of arguments like this:doi2ietf[options][oneormoreDOIidentifiers]Where:A DOI identifier looks like this: e.g.10.1109/5.771073.The list of DOI identifiers have to be be separated by spaces.By default, the output is in YAML format, printed toSTDOUT.Options include:-xor--xml: produce XML output instead of YAML.-cor--cache: Cache HTTP-requests todata.crossref.org.Example:$doi2ietf-c-x10.1109/5.77107310.1109/MIC.2012.29
<referenceanchor="a"><front><title>Towarduniqueidentifiers...
<referenceanchor="b"><front><title>CoAP:AnApplicationProtocol...LibraryThe main function provided by thedoi2ietflibrary isprocess_doi_list.It can be used in the following manner, for example:$python
>>>importdoi2ietf

>>>doi2ietf.process_doi_list(['10.1109/5.771073'])a:author:-ins:N.Paskinname:N.Paskindate:1999-07seriesinfo:DOI:10.1109/5.771073ProceedingsoftheIEEE:vol.87,no.7,pp.1208-1227title:Towarduniqueidentifiers

>>>doi2ietf.process_doi_list(['10.1109/5.771073'],'XML')<referenceanchor="a"><front><title>Towarduniqueidentifiers</title>...process_doi_listtakes the following arguments:list of DOI identifiers as stringsoutput format. Can beXMLfor XML strings,DICTfor python dict objects, andYAMLorNonefor YAML strings as default)DevelopmentGeneralDevelopment usingpyenvis strongly encouraged.virtualenvvenv
pipinstall-e.Dependencies are listed insidesetup.py.TestingTest modules are placed under thetestsdirectory. It uses data fromtests/fixturesdirectory.
Pythonxmldiffmodule is required for this tests. It was commented out inrequirements.txt.There is 3 type of files:*.json,*.yamland*.xml.*.json- is body of HTTP(S) response fromdata.crossref.org*.yaml- is originaldoilitoutput*.xml- is originaldoilitoutput with-x=xmlhandleoption
Package: doi2pdf
doi2pdfdoi2pdfis a command line tool to download PDFs of reasearch paper from DOI, name or url, written in Python.It can be used either as a command line tool or as inside a Python script.Installationpipinstalldoi2pdfCLI usagedoi2pdf--name"Attention is all you need"--output"Transformer.pdf"--open
doi2pdf--url"https://arxiv.org/abs/1706.03762"--output"Transformer.pdf"--open
doi2pdf--doi"10.48550/arXiv.2203.15556"--output"Chinchilla.pdf"--openCan also be used as a library.fromdoi2pdfimportdoi2pdfdoi2pdf("10.48550/arXiv.2203.15556",output="Chinchilla.pdf")TroobleshoootIf errorDOI not foundappears it means sci hub could not retrieve the paper, you might need to override default sci-hub URL with a mirror, like so:SCI_HUB_URL=https://sci-hub.wf/doi2pdf--name"Attention is all you need"--openIf errorPaper not foundappears, you might want to try another way to retrieve the research paper, using DOI instead of name or name instead of URL.
Package: doing
doingHierarchical command lines in python.doingenables the simple creation of simple hierarchical command
lines in Python programs.It was originally designed to make it easy to create small Python tools
that took the place ofbashscripts in system maintenance, so the
library assumes that packages and modules with names that do not start
with an underscore are either commands or containers of sub-commands.Contents[TOC]This is what youdoIf thedoingdistribution is uncompressed to a directory, you’ll
find a sample command-line program n the Python executable package
called…sample.This is the source code forsample/__main__.py:#!/usr/bin/env python3
import doing
import sample

if __name__ == '__main__':
    doing.do_main(sample)And this is whatdoingenables:$ python -m sample
sample v1.0.0rc1 a sample hierarchical command line created with the doing package

    sample greet ...        greet in several languages
    sample version          display the versionIssuing a sub-command:$ python -m sample version
version 1.0.0rc1As sub-command with sub-sub-commands:$ python -m sample greet
sample.greet  greet in several languages

    sample greet english    greet in English
    sample greet spanish    greet in SpanishFinally:$ python -m sample greet english
Hello!
$ python -m sample greet spanish
Hola!Adding an executable script calleddo, with contents like those of__main__.pywill let you do:$ ./do greet english
Hello!
$ ./do greet spanish
Hola!Implementing thedoingcommand linedoingassumes that all packages and modules are potential commands
or sub-commands. The description of the command is taken from the
modules doc-comment (inmymodule.pyormypackage/__init__.py.To enabledoingfor a top-level package, either provide a__main__.pyor ado(or any other script name) as described in
the introduction.For modules and packages that execute some action, write adefdo():method in the module or in the packages__init__.py.This is the contents ofsample/greet/spanish.py:"""
greet in Spanish
"""

def do():
    print('Hola!')Ifdoingfinds that a command has modules implementing sub-commands,
it will indicate so on the command help with an ellipsis:sample greet ...        greet in several languagesend
Package: doing-cli
doing-cli: Azure Devops on the command lineCLI app to help speed up development on Azure DevOps, built on top ofAzure DevOps CLI. Allows for a more streamlined repo/issue workflow. Inspired bycli.github.com.Installationdoingrequires python 3.7+,azure cliand thedevops extension. To install:pip3installdoing-cliFor more details and setup see theinstallation guide.DocumentationSeeing-bank.github.io/doing-cli/.MaintainersJoao Pinto Moura@operte
Package: doipclient
doipclient is a pure Python 3 Diagnostic over IP (DoIP) client which can be used
for communicating with modern ECU’s over automotive ethernet. It implements the
majority of ISO-13400 (2019) from the perspective of a short-lived synchronous
client. The primary use case is to serve as a transport layer implementation for
theudsoncanlibrary. The code
is published under MIT license on GitHub (jacobschaer/python-doipclient).DocumentationThe documentation is available here :https://python-doipclient.readthedocs.io/RequirementsPython 3.6+Installationusing pip:pip install doipclientRunning Tests from sourceusing pytest:pip install pytest pytest-mock
pytestExampleUpdated version of udsoncan’s example usingpython_doipinstead of IsoTPSocketConnectionimportSomeLib.SomeCar.SomeModelasMyCarimportudsoncanfromdoipclientimportDoIPClientfromdoipclient.connectorsimportDoIPClientUDSConnectorfromudsoncan.clientimportClientfromudsoncan.exceptionsimport*fromudsoncan.servicesimport*udsoncan.setup_logging()ecu_ip='127.0.0.1'ecu_logical_address=0x00E0doip_client=DoIPClient(ecu_ip,ecu_logical_address)conn=DoIPClientUDSConnector(doip_client)withClient(conn,request_timeout=2,config=MyCar.config)asclient:try:client.change_session(DiagnosticSessionControl.Session.extendedDiagnosticSession)# integer with value of 3client.unlock_security_access(MyCar.debug_level)# Fictive security level. Integer coming from fictive lib, let's say its value is 5client.write_data_by_identifier(udsoncan.DataIdentifier.VIN,'ABC123456789')# Standard ID for VIN is 0xF190. Codec is set in the client configurationprint('Vehicle Identification Number successfully changed.')client.ecu_reset(ECUReset.ResetType.hardReset)# HardReset = 0x01exceptNegativeResponseExceptionase:print('Server refused our request for service%swith code "%s" (0x%02x)'%(e.response.service.get_name(),e.response.code_name,e.response.code))except(InvalidResponseException,UnexpectedResponseException)ase:print('Server sent an invalid payload :%s'%e.response.original_payload)# Because we reset our UDS server, we must also reconnect/reactivate the DoIP socket# Alternatively, we could have used the auto_reconnect_tcp flag on the DoIPClient# Note: ECU's do not restart instantly, so you may need a sleep() before moving ondoip_client.reconnect()client.tester_present()# Cleanup the DoIP Socket when we're done. Alternatively, we could have used the# close_connection flag on conn so that the udsoncan client would clean it updoip_client.close()python-uds SupportThepython-udscan also be used
but requires a fork until the owner merges this PRDoip #63. For now, to use
the port:using pip:git clone https://github.com/jacobschaer/python-uds
git checkout doip
cd python-uds
pip install .Example:fromudsimportUdsecu=Uds(transportProtocol="DoIP",ecu_ip="192.168.1.1",ecu_logical_address=1)try:response=ecu.send([0x3E,0x00])print(response)# This should be [0x7E, 0x00]except:print("Send did not complete")
Package: doipy
DOIPYInstallSimply run$pipinstalldoipyUsageThisdoipypackage has two methods:hello(name: str): say hello to the input name.create(files: list[BinaryIO]): loop through a list of files and do something.To use it in the Command Line Interface, run:$doipyhelloJohn# Output of the hello command$doipycreatefile1file2file3# Output of the create commandTo use it in the Python code simply import it and call the exposed methods.fromdoipyimporthello,createhello(name='John')withopen('file1.txt','rb')asfile1,open('file2.png','rb')asfile2:create(files=[file1,file2])For developerThe project is managed byPoetry. Therefore, make sure that Poetry is installed in your
system. Then run$poetryinstallto install all dependencies.Then, installdoipypackage in editable mode. To do so, under the root directory, run:$pipinstall--editable.
Package: doit
doitcomes from the idea of bringing the power of build-tools to execute any
kind of taskdoitcan be uses as a simpleTask Runnerallowing you to easily define ad hoc
tasks, helping you to organize all your project related tasks in an unified
easy-to-use & discoverable way.doitscales-up with an efficient execution model like abuild-tool.doitcreates a DAG (direct acyclic graph) and is able to cache task results.
It ensures that only required tasks will be executed and in the correct order
(aka incremental-builds).Theup-to-datecheck to cache task results is not restricted to looking for
file modification on dependencies.  Nor it requires “target” files.
So it is also suitable to handleworkflowsnot handled by traditional build-tools.Tasks’ dependencies and creation can be done dynamically during it is execution
making it suitable to drive complex workflows andpipelines.doitis build with a plugin architecture allowing extensible commands, custom
output, storage backend and “task loader”. It also provides an API allowing
users to create new applications/tools leveragingdoitfunctionality like a framework.doitis a mature project being actively developed for more than 10 years.
It includes several extras like: parallel execution, auto execution (watch for file
changes), shell tab-completion, DAG visualisation, IPython integration, and more.Sample CodeDefine functions returning python dict with task’s meta-data.Snippet fromtutorial:deftask_imports():"""find imports from a python module"""forname,moduleinPKG_MODULES.by_name.items():yield{'name':name,'file_dep':[module.path],'actions':[(get_imports,(PKG_MODULES,module.path))],}deftask_dot():"""generate a graphviz's dot graph from module imports"""return{'targets':['requests.dot'],'actions':[module_to_dot],'getargs':{'imports':('imports','modules')},'clean':True,}deftask_draw():"""generate image from a dot file"""return{'file_dep':['requests.dot'],'targets':['requests.png'],'actions':['dot -Tpng%(dependencies)s-o%(targets)s'],'clean':True,}Run from terminal:$ doit list
dot       generate a graphviz's dot graph from module imports
draw      generate image from a dot file
imports   find imports from a python module
$ doit
.  imports:requests.models
.  imports:requests.__init__
.  imports:requests.help
(...)
.  dot
.  drawProject DetailsWebsite & docs -http://pydoit.orgProject management on github -https://github.com/pydoit/doitDiscussion group -https://groups.google.com/forum/#!forum/python-doitNews/twitter -https://twitter.com/pydoitPlugins, extensions and projects based on doit -https://github.com/pydoit/doit/wiki/powered-by-doitlicenseThe MIT License
Copyright (c) 2008-2022 Eduardo Naufel Schettino
Package: doit-auto1
doit cmd plugin:autoWatch filesystem and re-execute on changes.StatusThis is thefirstgeneration ofdoitautocommand.It is based on:Linux: pyinotifyhttps://pypi.org/project/pyinotifyMAC: macfseventshttps://pypi.python.org/pypi/MacFSEvents`Unfortunately both of this projects are not maintained anymore.
Package: doit-cmd
doit-cmdHelper to createdoittasks that execute a commandProject DetailsProject management on github -https://github.com/pydoit/doit-cmd/Website /docshttp://pythonhosted.org/doit-pylicenseThe MIT License
Copyright (c) 2014 Eduardo Naufel Schettinosee LICENSE filedevelopers / contributorsEduardo Naufel Schettinoinstall$ pip install doit-cmdor download and:$ python setup.py installtestsTo run the tests:$ py.test
Package: doit-graph
doit-graphGenerates a graph (using graphviz's dot) ofdoittasks.Sample fordoit tutorialtasks:installpip install doit-graphusage$ doit graph
$ dot -Tpng tasks.dot -o tasks.pngBy default sub-tasks are hidden. Use option--show-subtasksto display them.By default all tasks are included in graph.
It is possible to specify which tasks should be included in the graph (note dependencies will be automatically included).To draw tasks in execution order (i.e. reverse of dependency direction), use option--reverse$ doit graph --reverseTo draw tasks from left-to-right instead of the default top-to-bottom, use option--horizontalor-h$ doit graph --horizontallegendgroup-tasks have double bondary border in the nodetask-deparrow have a solid headsetup-taskarrow have an empty headlimitationscalc_depanddelayed-tasksare not supported.DEV noteshttp://graphviz.org/doc/info/attrs.html
Package: doitintl-docops
DoiT DocOps UtilitiesPython library and CLI tools for doing DocOps at DoiTTable of contents:InstallDocumentationUsersDevelopersInstallThedoitintl-docopspackage is published toPyPIand
you can install it usingPip, like so:$pipinstalldoitintl-docopsCollecting doit-docopsDownloading doitintl_docops-2.0.1-py3-none-any.whl (175 kB)[...]Successfully installed doitintl_docops-2.0.1Theproject releasespage has a complete list of all releases and
each release page has links to multiple release assets.Documentation📝NoteDocumentation is sparse at the moment because this project is still in the
early stages of development.UsersGlossary utilitiesGitBook clientDevelopersPython development
Package: doitlater
DoItLaterA simple python library to schedule work in the future with ability to loop infinitely. Does not depend on any 3rd party libraries.InstallationUsageAPIInstallationThe package can be simply installed using on of these methods:pip:pip install doitlaterpoetry:poetry add doitlaterpoetry:poetry add git+https://github.com/evalkaz/doitlater.gitUsageSimplest example:fromdatetimeimportdatetime,timedeltafromdoitlaterimportLaterlater=Later()@later.on(datetime(2021,1,1))defsay_hello():print("Happy new years in 2021!")if__name__=="__main__":later.do()To call the same function every 10 seconds with 30 seconds cold start:@later.on(datetime.now()+timedelta(seconds=30),timedelta(seconds=10),loop=True)defrepeatable_work():print("Hello every 10 seconds!")Thelater.on()is stackable so this will work too (will be executed every 5 and every 7 days):@later.on(datetime(2021,1,1),timedelta(days=5))@later.on(datetime(2021,1,1),timedelta(weeks=1))defsay_hello():print("Happy new years in 2021!")You can also pass a list ofdatetimeortimedelta(or a mixed one) when to execute the function:@later.on(datetime(2021,1,1),[datetime(2021,2,1),datetime(2021,3,1),timedelta(days=31)],loop=False)defsay_hello():print("Happy new years in 2021!")If you want to stop executing the same function just returnFalse:@later.on(datetime(2021,1,1),timedelta(seconds=5),loop=True)defonly_one_hello():print("This will appear only once!")returnFalseIf you have multiple functions and one of them throws an exception but you don't want to stop the work, passignore_errors=TruetoLater()object:later=Later(ignore_errors=True)By default, library will output logs on errors. To change logging, usedictConfig:fromdatetimeimportdatetime,timedeltafromdoitlaterimportLaterfromlogging.configimportdictConfigdictConfig({"version":1,"formatters":{"default":{"format":"[%(asctime)s]%(levelname)sin%(module)s:%(message)s",}},"handlers":{"default":{"class":"logging.StreamHandler","formatter":"default",}},"root":{"level":"INFO","handlers":["default"]},})later=Later()@later.on(datetime(2021,1,1))defsay_hello():print("Happy new years in 2021!")if__name__=="__main__":later.do()APILater(workers, ignore_errors)takes these parameters:workers- number of threads to use, defaults to maximum number of threads supported by CPU.ignore_errors-Falsewill exit when one of the function throws an error,True- ignores exceptions and will resume the work.later.on(exactly, repeat, loop)function takes these parameters:exactly- on which time perform the first function call.repeat- a single value or a list ofdatetime,timedeltaor both on when to repeat the call. IfNoneis passed the function will not be called again. Defaults toNone.loop- whether repeat calling times fromrepeat. Defaults toTrue.later.do()does not take any parameters.
Package: doitlive
doitliveis a tool for live presentations in the terminal. It reads a file of shell commands and replays the commands in a fake terminal session as you type random characters.Get it nowmacOS withHomebrew:$brewupdate$brewinstalldoitliveWith pip:$pipinstalldoitliveQuickstartCreate a file calledsession.sh. Fill it with bash commands.Rundoitlive play session.sh.$doitliveplaysession.shType like a madman.More athttps://doitlive.readthedocs.ioProject LinksDocs:https://doitlive.readthedocs.io/Changelog:https://doitlive.readthedocs.io/en/latest/changelog.htmlPyPI:https://pypi.python.org/pypi/doitliveIssues:https://github.com/sloria/doitlive/issuesKudosIdea came from Jordi Hermoso’s“Revsets” talkat PyCon 2014.Armin Ronacher’sclicklibrary  made this quick to implement.Themes inspired by Sorin Ionescu’spreztozsh themes.Hat tip to related projectsHackerTyperandPlayerPianoLicenseMIT licensed. See the bundledLICENSEfile for more details.