Saravanan666/pypi-org huggingface dataset:
Package: dukepy
dukepycollection of useful python snippetspip install dukepyconfigConfiuration manager (using json) with the ability toadd new keysremove deprecated keys (i.e. keys not in defaults)backup the older versions of the (json) configuration fileGenerated sample file -C:\Users\xyz.myconfig\config.json{"newkey1":"newvalue1","newkeygroup1":{"newkey2":"newvalue2"},"newkey3":["newvalue4","newvalue4"],"newkey5":"newvalue5"}Usage example -importosfromdukepy.configimportConfigconfig_dir=os.path.join(os.path.expanduser("~"),".myconfig")config_file=os.path.join(config_dir,"config.json")Config(path=config_file,defaults={"newkey1":"newvalue1","newkeygroup1":{"newkey2":"newvalue2"},"newkey3":["newvalue4","newvalue4"]})Config()["newkey5"]="newvalue5"Config().commit()convergeTo find the extremes of a finite sequence, given that the sequence is continuous.
Provide at least two known numbers in the sequence,
and a method to check the validity of the number predicted by the algorithm.Usage example -defcheck_validity(val):ifval>-30andval<101:returnTrueelse:returnFalselow,high=Converge(-28,50,check_validity).run()print(low)print(high)Output --29
100dict_diffTo find the recursive differences between two dictionaries.To update one dictionary with the other (each one optional)-Add keys from the otherRemove keys which are not part of the otherUpdate values from the keys of the otherUsage example -dictionary_1={"abc":"value_abc","prs":"value_prs"}dictionary_2={"abc":"value_abc","xyz":"value_xyz"}dict_diff(dictionary_1,dictionary_2)print(dictionary_1)print(dictionary_2)dict_diff(dictionary_1,dictionary_2,udpate_added_keys=True)print(dictionary_1)print(dictionary_2)Output -:
 -  prs  :  value_prs
 :
 +  xyz  :  value_xyz
{'abc': 'value_abc', 'prs': 'value_prs'}
{'abc': 'value_abc', 'xyz': 'value_xyz'}
 :
 -  prs  :  value_prs
 :
 +  xyz  :  value_xyz
{'abc': 'value_abc', 'prs': 'value_prs', 'xyz': 'value_xyz'}
{'abc': 'value_abc', 'xyz': 'value_xyz'}loggermail_botsafe_dictsingletontacesPrints the origin of the exception, not just the exception string.
Usage example -mydict=dict()try:print(mydict["sdf"])exceptExceptionase:print_exception_traces(e)Output -Traceback (most recent call last):
  File "C:/Dev/libpython/src/dukepy/traces.py", line 16, in <module>
    print(mydict["sdf"])
KeyError: 'sdf'
Package: dukpt
DUKPTThis Python module implements DUKPT encryption/decryption based on the DUKPT (Derived Unique Key Per Transaction) scheme using 3DES (Triple DES) algorithms. The implementation is inspired by the vanilla JavaScript implementation of IDTech DUKPT encryption/decryption.DescriptionDerived Unique Key Per Transaction (DUKPT) is a key management scheme widely used in payment processing and secure data transmission. This Python module seamlessly integrates the DUKPT scheme, employing the strength of 3DES algorithms to ensure robust security for transactional data.The DUKPT implementation provided here is designed to match the standards set by the IDTech DUKPT encryption/decryption in JavaScript. This ensures compatibility and consistency for projects that may involve cross-language implementations.NoteThis implementation supports Python 3.
Package: dull
dullThis is a plain and boring package providing one decorator for dumping profile stats to console
or to a file for further inspections.There are a million of nice packages providing decorators and context managers that
can dump cProfile stats and generate visual stuff from them. But usually that is a little
too much for just taking a peek at performance of a function. I found myself writing this
wrapper again and again or copypasting it around, so why not package it for convenience?Install with pip:pipinstalldullWrap a function with profiler:fromdullimportprofile@profile()deffoo():print("well hello")print("hello there")foo()print("goodbye")Output:hellothere
wellhello
---------------------------------------profilefoo---------------------------------------3functioncallsin0.000secondsOrderedby:cumulativetimencallstottimepercallcumtimepercallfilename:lineno(function)10.0000.0000.0000.000joku.py:4(foo)10.0000.0000.0000.000{built-inmethodbuiltins.print}10.0000.0000.0000.000{method'disable'of'_lsprof.Profiler'objects}-----------------------------------------------------------------------------------------
goodbyeDump profile to file:@profile(to_file=True)# output defaults to profile/foo.datdeffoo():print("well hello")Output:hellothere
wellhello
--------------------------foo:profilesavedtoprofile/foo.dat--------------------------
goodbyeFiles are plain pstat dumps, get fancy withsnakevizor similar visualizers:snakevizprofile/foo.dat
Package: dulwich
This is the Dulwich project.It aims to provide an interface to git repos (both local and remote) that
doesn’t call out to git directly but instead uses pure Python.Main website: <https://www.dulwich.io/>License: Apache License, version 2 or GNU General Public License, version 2 or later.The project is named after the part of London that Mr. and Mrs. Git live in
in the particular Monty Python sketch.InstallationBy default, Dulwich’ setup.py will attempt to build and install the optional C
extensions. The reason for this is that they significantly improve the performance
since some low-level operations that are executed often are much slower in CPython.If you don’t want to install the C bindings, specify the –pure argument to setup.py:$ python setup.py --pure installor if you are installing from pip:$ pip install --no-binary dulwich dulwich --config-settings "--build-option=--pure"Note that you can also specify –build-option in arequirements.txtfile, e.g. like this:dulwich --config-settings "--build-option=--pure"Getting startedDulwich comes with both a lower-level API and higher-level plumbing (“porcelain”).For example, to use the lower level API to access the commit message of the
last commit:>>> from dulwich.repo import Repo
>>> r = Repo('.')
>>> r.head()
'57fbe010446356833a6ad1600059d80b1e731e15'
>>> c = r[r.head()]
>>> c
<Commit 015fc1267258458901a94d228e39f0a378370466>
>>> c.message
'Add note about encoding.\n'And to print it using porcelain:>>> from dulwich import porcelain
>>> porcelain.log('.', max_entries=1)
--------------------------------------------------
commit: 57fbe010446356833a6ad1600059d80b1e731e15
Author: Jelmer Vernooĳ <jelmer@jelmer.uk>
Date:   Sat Apr 29 2017 23:57:34 +0000

Add note about encoding.Further documentationThe dulwich documentation can be found in docs/ and built by runningmake doc. It can also be foundon the web.HelpThere is a#dulwichIRC channel on theOFTC, and
adulwich-discussmailing list.ContributingFor a full list of contributors, see the git logs orAUTHORS.If you’d like to contribute to Dulwich, see theCONTRIBUTINGfile andlist of open issues.Supported versions of PythonAt the moment, Dulwich supports (and is tested on) CPython 3.6 and later and
Pypy.
Package: dulwich-tree
This library provides objects to make and commit modifications to tree using dulwich. It try's to provide and interface
similar to making changes to a os filesystem.Example:writer = TreeWriter(repo)

    writer.set_data('a/b', 'file b'.encode())
    writer.do_commit(message='Add a/b.'.encode())

    writer.set_data('a/b', b'file b ver 2',)
    writer.do_commit(message='Modify a/b.'.encode())

    writer.remove('a/b')
    writer.do_commit(message='Remove a.'.encode())
Package: dum
With the dum module you can easily map data from structured files
to a set of python classes.
The current version can be used with json, csv or xlm formats,
more are expected to come.Parsing and projectingThe main idea is that your code is designed with objects that share more or less the same
organization than the data in the original file.  With a few directives, it must then be possible
to directly project the data parsed from the file to the class model of your application.For sample a minimal (all the display methods are still to write…)Atomapplication
could look likeclass Author:
    class dum:
        name =""
        email=""

class Link:
    class dum:
        rel=""
        href=""

class Entry:
    class dum:
        title = ""
        author = [Author]
        link = [Link]
        updated = dateutil.parser.parse

class Atom:
    class dum:
        title =""
        subtitle= ""
        entry = [Entry]
        link = [Link]
        updated = dateutil.parser.parse

atom = dum.xml(Atom, open("myrss"))RequirementsThe library has been tested for Python 3.4
There is no external dependencies.
Package: dumang-ctrl
DuMang DK6 Keyboard Programming ToolsThis is an open-source toolset for use with the DuMang DK6 line of keyboards from Beyong Q (www.beyondq.com/).These keyboards are fully programmable and support multiple layers.It currently supports:LinuxMac OS XNOTE:For correct functionality under Linux, you need to copy the udev file provided in this repo into the appropriate directory for you distro. You might then need to calludevadm control --reload-rulesto reload the rules.InstallUsing PyPI$ pip install dumang-ctrlBuild from Source$ git clone https://github.com/mayanez/dumang-keyboard-ctrl.git
$ cd dumang-keyboard-ctrl
$ python setup.py installDependenciesDebian/Ubuntu$ apt-get install libusb-1.0.0-dev libudev qtbase5-devArch Linux$ pacman -S libusb qt5-basePython$ pip install hidapi pyudev docopt PyQt5ToolsSync ToolThis tool is a daemon process that can be used to sync the two keyboard halves for layer functionality.You may want to setup this tool to run at startup. Depending on your distributionsystemdis a likely solution. Seehttps://github.com/arjun024/systemd-example-startupfor an example. An Arch Linux AUR and Debian package are soon to follow which will make this seamless.Run$ dumang-syncor$ python -m dumang_ctrl.tools.syncProgramming ToolThis tool provides a very rough implementation for programming keys. Please refer to the help message for options on how to run. Essentially it uses aconfig.ymlthat configures each key for a given layer.
Theinspectcommand launches a GUI that you can use to toggle the LED for a particular key in order to get its keycode. I'm new to GUI programming so don't expect anything fancy yet. This tool in general will require a bit more reverse engineering so stay tuned.Run$ dumang-config --helpor$ python -m dumang_ctrl.tools.config
Package: dumas
dumasTable of ContentsInstallationLicenseInstallationpip install dumasUsing it (prepare your doc)using dumas on a regular markdown file has very little change, we usemarkounder the hood
and marko is opinionated on what gets output from a markdown document. but the power of dumas start when you use the dumas blocks,
right now there is only the "dumas fenced code block" (the one with the backticks). Just add to your document this\```dumas[python]
a = 1
def foo(o):
   return 2**o

foo(a+1)

\```and this will turn the content into an ipython (jupyter notebook) cell.Using it (cli)then execute:$dumasrender-fileexample.mdand this will output to stdout:In[1]:a=1...:...:...:deffoo(o):...:return2**o...:...:...:foo(a+1)Out[1]:4you can write to specific file$dumasrender-fileexample.md--output-file/tmp/myfile.mdor render the entire files of a dir into another$dumasrender-dirdocs/--output-dirpublish/Using it (api)You could usedumasas part of your own workflow/program# First import the render functionsIn[2]:fromdumas.lib.rendererimportrender_text,render_file...:importtextwrap...:...:MD_TEXT=textwrap.dedent(...:"""...:     This is a regular MD...:     ====================...:...:     with some `funny text` and some text...:...:     ```dumas[python@readme]...:     x = 1+1...:...:     x**2...:...:     ```...: """...:)In[3]:MD_TEXTOut[3]:ThisisaregularMD====================withsome`funnytext`andsometext\```dumas[python@readme]x=1+1x**2\```In[4]:render_text(MD_TEXT)Out[4]:# This is a regular MDwithsome`funnytext`andsometext\```pythonIn[1]:x=1+1...:...:x**2Out[1]:4\```Licensedumasis distributed under the terms of theMITlicense.
Package: dumb
dumb is a suite of tools to manage collections of bookmarks that are:indipendent from the browser / application:dumb bookmarks can point to anything that has an URL, regardless
of the app needed to open them.shareable and distributed:dumb bookmarks are designed to be easily managed in a DVCS to provide
an easy mean to share a bookmark collection within a team, a community
or the whole world.Getting dumbHomepage:http://dumb.trueelena.orgpublic git repository:web interfacegit:git clone git://gitorious.org/dumb/dumb.gitInstallationThe dumb module depends on python >= 2.5 andPyYAML.
Some scripts may require additional modules; e.g. dumb-to-jinja2
requiresjinja2.
Support for python 3.x is planned, but still not implemented.Dumb can be installed using distutils:python ./setup.py installDocumentation is in RestructuredText and can be built to various formats
usingsphinx; in thedocs/directory
run e.g.:make htmlto build the html documentation.
Manpages for the scripts are also available and can be build using:make man
Package: dumbdb
Dumb DBAre you looking for a reliable database management system?Then you've come to the wrong place.This is a very small database management system to store a minuscule amount of data in one of the worst possible ways. But hey, atleast its easy to use .InstallationInstallation is super easy. Just use your favorite package manager.pipinstalldumbdbUsage/ExamplesfromdumbdbimportDumbDBmy_db=DumbDB(location="/tmp",file_name="temp_data.json")# Use .set to set valuemy_db.set("int",1)my_db.set("list",[])my_db.set("cars",{})# Use .get to get valuemy_db.get("int")# You can optionally pass a default value to the get methodmy_db.get("new_key",default="Default Val")Advantages and DisadvantagesA good DMBS is characterized by the following. You can have a look how well the module fits the ideal DMBS.Desired FeatureModule StatusData AvailabilityData is stored in a file in JSON format. Your operating system handles data availability, but it is only accessible locally and only by users with priveledge to read the fileMinimized RedundancyNone. No effort at allData SecurityYour operating system worries about this. Not this moduleEasiness in Data ManagementAn easy to get started systemData StructuringNone. You worry about that.Querying LanguageTwo methods! Thats all you get.AuthorsGithub:Elias AmhaLinkedIn:Elias AmhaContributingContributions are always welcome!
Package: dumbdown
dumbdownExtremely simplified quasi-markdown to HTML parsing, available in both Javascript and Python.InstallationTo install the python package:pip install dumbdownTo install the npm package:npm install dumbdownDemoTo see the demo: clone this repo, install node modules frompackage.jsonand opendemo.htmlin your favorite browser. Try typing some text with * and _ characters.UsageIt allows 3 kinds of formatting marks,bold,italic, and > blockquotes but it uses Slack's syntax for these and not Markdown syntax.Bold text must have*surrounding it:For example, *this would be bold*.Italicized text has_surrounding it:And _this would be in italics_.Bold and italics can be nested within each other:*bold _bold-italics_*, _italics with some *bold* inside_. *_Nice!_*.A blockquote is a line starting with>:> this is a blockquote
> wooPython APIThe Python version provides two functions:to_htmlandto_plain.>>>fromdumbdownimportto_html,to_plain>>>to_html("*This is bold _this is bold ital._*\nThis is on a new line")'<p><strong>This is bold <i>this is bold ital.</i></strong></p><p>This is on a new line</p>'>>>to_plain("*This is bold _this is bold ital._*\nThis is on a new line")'This is bold this is bold ital. This is on a new line'Javascript APIThe Javascript version provides two functions:toHtmlandtoPlain.>>>import{toHtml,toPlain}from"dumbdown";>>>toHtml("*This is bold _this is bold ital._*\nThis is on a new line");'<p><strong>This is bold <i>this is bold ital.</i></strong></p><p>This is on a new line</p>'>>>toPlain("*This is bold _this is bold ital._*\nThis is on a new line")'This is bold this is bold ital. This is on a new line'TestingTo test:PythonpytestJavascriptyarn run testReleasingPython / PyPiBuildpython setup.py sdist bdist_wheelReleasetwine upload dist/*Javascript / NPMBuildyarn run buildReleasenpm publish
Package: dumbee
dumbeePretend it's a databaseInstallationpip install dumbeeGetting startedimportdumbee# create an Enginedb=dumbee.Engine(driver=dumbee.drivers.Filesystem("./data",extensions=[(".","json")]),middlewares=dumbee.Pipeline([dumbee.ext.logging.Logger(),dumbee.ext.jsonschema.Validator({"schema":{"type":"object","properties":{"name":{"type":"string"},"age":{"type":"number"}},"required":["name"]},"paths":["./users/[A-Za-z]+$"]}),dumbee.ext.json.Serializer(),]),)# write and read back a recordme=(db.collections["users"].get("me").write({"name":"David","age":32}).read())# nested collectionrepos=(db.collections["users"].get("me").collections["repositories"].get("OSS").write(["easychart","easytree","doubledate","dumbee"]).read())
Package: dumb-file-drop
dumb-file-dropSimple webserver which allows files to be uploaded to it.  Good for quickly sharing files on your local network.Files will be uploaded to./uploadsInstallpipinstalldumb-file-dropRun# invoking this module directly, runs in debug modepython-mdumb_file_drop# prodgunicorn-b"0.0.0.0"-w4-kuvicorn.workers.UvicornWorkerdumb_file_drop.__main__:appEndpoint:localhost:8000⚠️ Do not use this on public/untrusted networks!  There's no built-in authentication, so anybody could upload files to your computer!
Package: dumbledore
Dumbledorethis is a python module which is intended for data scientist and statistician to visualize features and understand relationships between different features without writing lots of codes.This module is like an aggregator which combines multiple functionalities of different modules and brings them together to keep you out of troubleinstallationpip install dumbledorerequirementsthis module depends on all most of scientific libraries likepandas,matplotlib,seaborn,numpyetc. all of which you must have already installed if you are a data scientist or statistician but don't worry if you haven't the pip command will automatically install all the dependencies.examplesthevis_feature()function helps you understand and visualize between different types of variablesfor a continuous feature and categorical target variableimportdumbledoreasdbimportpandasaspd...# load data...db.basics.vis_feature((data,'gender','tenure','gist_earth_r',target_continous=True,jitter=0.3)when your feature and target both are continousdb.basics.vis_feature((data,'tenure','MonthlyCharges','gist_earth_r',continous=True,target_continous=True)similarly you can feed in categorical target or categorical feature you have to keep in mind the two arguementscontinous: True if feature is continous, False if feature categoricaltarget_continous: True if target variable is continous , False if target variable is categoricalnote: this module is still under development and has been released as alpha. so if you get any bug please open a issue without hesitation. or if you want a new feature please make a feature requestTHIS PRODUCT IS DISTRIBUTED UNDER GNU GPLv3 WHICH CAN BE FOUND IN THE LICENSE FILEdeveloped by:imzain448meet me onLinkedinInstagramGmail :ahmadzain.448@gmail.com
Package: dumblock
This package provides decorators that will try to acquire redis lock
before calling decorated function.InstallationpipinstalldumblockUsageSetDUMBLOCK_REDIS_URLin your django settings:DUMBLOCK_REDIS_URL="redis://localhost:6379"lock_or_exitDecorator. Before decorated function starts, try to acquire redis lock
with specified key. If lock is acquired successfully, proceed executing
the function. Otherwise, return immediately. Thekeyargument can
contain templated string, wich will be rendered with args and kwargs,
passed to the function.Example:@lock_or_exit('lock_work_{}')defworkwork(x):passworkwork(3)# Will try to acquire redis lock 'lock_work_3'lock_waitDecorator. Before decorated function starts, try to acquire redis lock
with specified key, waiting forwaittimeseconds if needed. If lock
is acquired successfully, proceed executing the function. Otherwise,
raisedumblock.TimeoutError. Thekeyargument can contain
templated string, wich will be rendered with args and kwargs, passed to
the function.Example:@lock_wait('lock_work_{}',waittime=4)defworkwork(x):passworkwork(3)# Will try to acquire redis lock 'lock_work_3' for 4 seconds
Package: dumb-menu
dumb_menusimple_term_menu don't support windows, so I made dumb_menu.dumb_menu is not as powerful as simple_term_menu , but this aGOOD OLD MENU.dumb_menu is a light weight command line menu that supportsWindows,MacOS, andLinux.Installationpip install dumb-menuhttps://pypi.org/project/dumb-menu/https://github.com/cornradio/dumb_menu(I want stars ⭐ uwu)Usageexample:importdumb_menuoptions=["[1]Option 1","[2]Option 2","[3]Option 3","[q]quit"]index=dumb_menu.get_menu_choice(options)print(f"You selected option{index+1}:{options[index]}")another example:importosimportdumb_menudefloopmenu():options=["[1]happy","[2]sad","[3]give me a cookie","[q]quit"]index=dumb_menu.get_menu_choice(options,isclean=True)# clear screen, cls for windows, clear for linuxos.system('cls')# Python 3.10+ only,old version could use if-elsematchindex:case0:print(":)")case1:print(":(")case2:print("🍪ヾ(•ω•`)o")case3:exit()input('Press ENTER to continue...')if__name__=="__main__":whileTrue:loopmenu()Get helpGet help ➡️Github issueUpdate log1.0.8add "return key string" option , adddemo.pyAs a straightforward exampledumb_menu.get_menu_choice(options,give_key_str=True)1.0.7fix "flickering on mac zsh"1.0.6forget write log in 1.0.51.0.5fix bug in 1.0.41.0.4support "clean mode"1.0.3show selected index also when using hotkey1.0.2first useable version1.0.1fix bug1.0.0first releasehow to upload a new version (for me)en:https://packaging.python.org/tutorials/packaging-projects/zh:https://python-packaging-zh.readthedocs.io/zh_CN/latest/minimal.html#id2make sure have twine installed firstchangesetup.pytestingpython3 setup.py developpython3 setup.py sdisttwine upload dist/*test code :python3



import dumb_menu

dumb_menu.demo()
Package: dumbo-ae
Dumbo Architettura degli ElaboratoriUna semplice interfaccia a linea di comando per il corso di Architettura degli Eleboratori.PrerequisitiPython 3.10+InstallazioneIl modo più semplice è usare pip:$pip3installdumbo-aeUsoPer controllare la propria soluzione a un esercizio è necessario indicare l'UUID dell'esercizio (fornito in aula) e il file sorgente della propria soluzione:$python3-mdumbo_aechecker--of<UUID><file-sorgente>