Saravanan666/pypi-org huggingface dataset:
Package: dont-argue
# dont-argueDead-simple command line arguments for python scripts.I got sick of re-learning the argparse module every time I just needed to passin a few simple command line arguments for a python script. `dont_argue` skipsthe boring stuff and lets you get started in a flash.## Usage**dont\_argue** provides the decorator **supply\_args**, use it on a functionand that function's arguments will be provided from the command line.Check it out:```python#!/usr/bin/pythonfrom dont_argue import supply_args@supply_argsdef main(name, location, *friends):friends = ', '.join(friends)print 'Hello {} from {} and your friends {}'.format(name, location, friends)# Now to kick things off we just call the function, the arguments come from the# command line, so we don't give any here.main()```Try it out:```$ ./example.py Joe Alabama Jake DrakeHello Joe from Alabama and your friends Jake, Drake```If that's all you need, then you're done! Also notice how all the extraarguments get packed up into `*friends` as expected.You can also work with command line options by specifying keyword arguments foryour function. They can be specified on the command line using the`--option=value` or `--option value` syntax.```python@supply_argsdef main(name, mood='FRIENDLY'):if mood == 'FRIENDLY':print 'Hello {}! Welcome here!'.format(name)elif mood == 'ANGRY':print 'Hey {}! Get out of my house!'.format(name)main()```Now we can specify `mood` or not. Also note that providing too few arguments orusing the -h flag will display usage information.```$ ./test.py JoeHello Joe! Welcome here!$ ./example.py Joe --mood ANGRYHey Joe! Get out of my house!$ ./example.py -husage: example.py [-h] [--mood MOOD] namepositional arguments:nameoptional arguments:-h, --help   show this help message and exit--mood MOOD```Arbitrary keyword arguments don't make a ton of sense on the command line, soyou must explicitly declare your keyword arguments, `**kwargs` won't work withcommand line options.
Package: dontasq
Extend built-in Python collections with LINQ-for-objects style methodsDescriptionThe library extends built-in Python collections with methods fromRobert Smallshire’sasq. Adding methods to built-ins isn’t officially allowed, but it’s possible to do this in CPython (both 2.x and 3.x) using a hack described in the corresponding section below.For example:>>>importdontasq>>>>>>[1,2,3].select_many(lambdax:(x,x**2)).to_tuple()(1,1,2,4,3,9)>>>'oh brave new world'.split()\....where(lambdaword:len(word)>=5)\....select(str.capitalize)\....to_list()['Brave','World']In some cases, this style helps to write functional-esque code that is more clear than code withmap,filterand generator expressions: there’s no confusion with brackets, and methods are applied in the natural order.Warning!dontasquses undocumented CPython features. It’s not guaranteed that this features will be maintained in the future Python versions.DetailsDuring import,dontasqlooks for classes in the built-ins namespace,collectionsanditertoolsmodules. If a class is an iterable and isn’t a metaclass, the library will append all public methods ofasq.queryables.Queryableto it in such a way that a method call:>>>instance.select(lambdax:x*2)Will be equal to:>>>Queryable(instance).select(lambdax:x*2)So the methods will be added to classes such aslist,str,collections.OrderedDict, oritertools.count. You can find a list of allQueryablemethods and their description inasq documentation.If a class already contains an attribute with a coinciding name (e.g.str.joinandlist.count), this attribute won’t be replaced.Of course, you’re able to import otherasqmodules when usingdontasq:>>>importdontasq>>>fromasq.predicatesimport*>>>>>>words=['banana','receive','believe','ticket','deceive']>>>words.where(contains_('ei')).to_list()['receive','deceive']If you want to patch classes from another library, you can use methodsdontasq.patch_typeanddontasq.patch_module:>>>importbintrees>>>importdontasq>>>>>>dontasq.patch_type(bintrees.AVLTree)>>>>>>dictionary={1:'Anton',2:'James',3:'Olivia'}>>>bintrees.AVLTree(dictionary).select(lambdax:x*2).to_list()[2,4,6]You can find other examples in“tests” directory.Adding methods to built-insThe following approach is found inthis questionon StackOverflow.Officially, you can get only a protected (read-only) instance of built-ins’__dict__. The trick is that in CPython this instance contains a reference to an original (modifiable) dictionary that can be tracked withgc.get_referentsfunction.For example, we can addselectmethod to built-inlist(unlikedontasq, it’s non-lazy in this example):>>>importgc>>>gc.get_referents(vars(list))[0]['select']=lambdaself,func:list(map(func,self))>>>>>>[1,2,3].select(lambdax:x*2)[2,4,6]Another possible way is to useforbiddenfruitlibrary that interacts withctypes.pythonapimodule. The both approaches stably work on both Python 2 and 3, but restricted to CPython only.InstallationYou can install the library using pip:sudo pip install dontasqOr install a previously downloaded and extracted package:sudo python setup.py installAuthorsCopyright (c) 2015 Alexander BorzunovThe library name suggested byRobert Smallshire(an author ofasq).
Package: dontbs
Don't BullshitWhat can you do with dontbsSet the daily goal of your GitHub contributionsCheck your progressDon't do shit and watch how this stupid script insults you all dayReach your goal and get nothingUsageUsage: dontbs [OPTIONS] USERNAMEOptions:--today          Today's contribution count.--this-week      This week's contribution count.--this-year      This year's contribution count.--current-level  Current level based on today's contribution count.--next-level     Minimum amount of contributions needed to level up.--streak         Streak of daily contributios.--goal INTEGER   Set your daily goal of contributions.--help           Show this message and exit.Installationpip install dontbs
Package: dont-fudge-up
==============Don't Fudge Up==============Don't Fudge Up production with extra prints, import debug, or an erroneous pdb.set_trace.Installation------------such pip so wow::$ pip install dont-fudge-upFlake8------The plug-in will automatically register with Flake8::$ flake8 --version2.1.0 (pep8: 1.5.6, dfu: 1.0.0, pyflakes: 0.8.1, mccabe: 0.2.1) CPython 2.7.6# see it here -------^Pylint------It should work something like this::$ pylint --load-plugins=dfu.pylint tests/input.pyError Codes-----------D000: stylistically bad for production but mostly harmless~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~D001raised on leaving a print statement in the codeD100: warnings which effect production performance but are usually not fatal~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~D101Cautioned import for production::import pdb #  on its own, harmless...D102set_trace may be fatal in production (set_trace might be from pdb)D500: errors that are forbidden for production and are near always fatal~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~D501Forbidden import for production::import debug # woah there cowboy, that's an issueD502pdb.set_trace is forbidden in production
Package: donttrust
DontTrustDon't trust your users! Form validation library for Python.Quick installpipinstalldonttrustUsageDonttrust is not limited to any framework and has no dependencies. Just import it and you're good to go!# Example usagefromdonttrustimportDontTrust,Schema,ValidationErrortrust=DontTrust(username=Schema().string().required().alphanum(),password=Schema().string().required(),remember_me=Schema().boolean().default(False))try:data=trust.validate(username="hello123",password="abcdefg")# data["username"], data["password"] ...exceptValidationErrorase:print(e.field,e.message)# Other error handlingFor more info and examples, visit thedocsDevelopmentClone or fork this repoMake your changesNote: DoNOTchange the version number insetup.py. I'll do that myself.Run the tests in the/testsdirectory (Done automatically with Github Actions)PR and away!
Package: dontuserepl
dontusereplLet's face it, repl.it is one of the best places to develop, test and run code. As such, it's been popular for small discord bots for a couple of years now. Many people dislike the platform for various reasons, mainly, low resources, public code, etc, and they'll tell you to stop using it, however it remains a good place to start out and try new code easily.The most popular way to run a discord bot on repl is to create a webserver on a different thread and configure a monitor service like uptimerobot.com to ping the server every five minutes or so.Even though this is very simple to do, i feel bored by it, that's why i wrote this simple library.How to use it:Making your bot 24/7 is extremely easy withdontuserepl.Go tohttps://uptimerobot.com/, open an account and login.Go to "My settings" and scroll to "API Settings".Create and copy a "Main API Key"Go to your repl and add the key as a secretAdd the snippet below to your main.py file.importosfromdontusereplimportlazy_setupkey=os.getenv('uptimerobot_api_key')# use the name of the secret from step 4lazy_setup(key)That's it,lazy_setupruns a minimal aiohttp server on port 8080 and configures a monitor for the script.Note: The server runs on the main loop since it's fully asynchronous.Working exampleimportosfromdontusereplimportlazy_setupfromdiscord.extimportcommandskey=os.getenv('uptimerobot_api_key')token=os.getenv('discord_token')bot=commands.Bot(command_prefix='!')@bot.eventasyncdefon_ready():print(f'logged in as "{bot.user.name}"')@bot.command()asyncdefping(ctx):awaitctx.send('pong')lazy_setup(key)# don't forget to call this *before* running the botbot.run(token)todo:Upload to pypiDocumentationBetter error handling
Package: donut
# donutThe purpose of this script is to update dot files somewhere.  It works in the
following way.  Two locations are set:dothome, absolute path to the set the dotfilesdotarchive, absolute path to the dot files (usually some git archive)Then symlinks are made from dothome to dotarchive.  Simple as that.## Installation` pip install donut `## Usage` donut ~ ~/repos/dotfiles `## Notessetup.cfgshould be a flat list of files indotarchiveotherwise all files indotarchivewill be symlinked
Package: donuts
A science frame autoguiding and image alignment algorithm with sub-pixel
precision, capable of guiding on defocused stars.Project documentation:https://donuts.readthedocs.io/en/latest/See thechangelogfor latest changes.MotivationWe operate or have access to several telescopes (NGTS, NITES, Warwick
1m, 1.5m San Pedro Martir) that require precise autoguiding. Sometimes
we need to defocus a telescope but we would still like to autoguide.
Donuts was designed to allow this. The algorithm had to be
simple, fast and accurate. It has been shown to perform well as an
autoguiding algorithm for equatorial telescopes (no field rotation).The process of aligning apertures for photometry is essentially the same.
Rather than correcting the telescope pointing, the apertures
must track the drift of the stars. Donuts can therefore be used to track
the stellar positions for CCD photometry also.By default Donuts measures frame-to-frame translational offsets (X
and Y) using all the stars in the image. The algorithm could be adjusted
in the to select a specific region of interest (for extremely wide or
distorted fields).The algorithm has its limitations. It currently does not deal with
rotation or very large drifts - where the field moves by approx. half a FOV
or more. Our paper describing the details can be found here:http://adsabs.harvard.edu/abs/2013PASP..125..548MExampleBelow is a sample of 10 nights autoguiding residuals from NGTS while using
Donuts. The upper plot shows the frame-to-frame error, while the bottom
shows the drift which would have occured if not for Donuts. Aligning
photometry apertures is essentially the same process and similar performance
is expected under that scenario. We routinely achieve an autoguiding RMS of
1/20 pixels with NGTS.ContributorsJames McCormac,Simon Walker.LicenseMIT LicenseCopyright (c) 2021 James McCormac & Simon WalkerPermission 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: donutshell
DonutShellA Custom Shell I made in Python for fun, which means it sucks lmaoThis package is not meant for daily use.InstallationUsingPIP:pip install donutshellBy cloning the repo:gitclonehttps://github.com/loldonut/donutshellcddonutshell/donutshell

python.# orpy.DocsSee docs here...
Package: donuts-python
Python binding to theDonutswrapper for theRingslibrary by Stanislav Poslavsky.RequirementsPython 3.7 or laterJava 8 or laterInstallationpipinstalldonuts-pythonExample>>>fromdonutsimport*>>>a=Polynomial('1 + x + y')>>>b=Polynomial('1 + y + z')>>>g=a+b>>>gPolynomial('2+z+2*y+x')>>>ag=a*g>>>bg=b*g>>>ag.gcd(bg)# must be equal to gPolynomial('2+z+2*y+x')>>>ag/bg# same as RationalFunction(ag, bg)RationalFunction('(1+y+x)/(1+z+y)')>>>Polynomial('2*x^2 - 2*x^3 + 2*x^2*y - 2*x^3*y').factors(Polynomial('-2'),Polynomial('x'),Polynomial('x'),Polynomial('-1+x'),Polynomial('1+y'))Developmentgitsubmoduleupdate--initpoetryinstallpoetryruninvokepreparepoetryruninvokebuildpoetryruninvokefmtpoetryruninvokelintpoetryruninvoketestpoetryruninvokebenchpoetryruninvokedocDONUTS_PYTHON_BACKEND=pyjniuspoetryruninvoketestDONUTS_PYTHON_BACKEND=py4jpoetryruninvoketestDONUTS_PYTHON_BACKEND=jpypepoetryruninvoketestpoetryruninvokebuild--sdist--wheelAcknowledgementsThis software was developed as part of the project supported by JSPS KAKENHI Grant Number 19K03831.LicenseDonuts-Python is distributed under the MIT license.The wheel contains a fat JAR file generated from the following dependencies:Donuts(MIT)Rings(Apache 2.0)libdivide4j(Apache 2.0)Combinatorics for Java(Apache 2.0)Apache Commons Math(Apache 2.0)GNU Trove(LGPL 2.1)
Package: donv
donv: docker-envEasy setup for docker env.How to installhttps://pypi.org/project/donv/pip install donvHow to donv useDocker Infodonv-infodonvidonvi --helpDocker Builddonv-build --dockerfile ./donvdonv/Dockerfile --image donv/donv:{version}donvbDocker Rundonv run --gpus 0,1,2,3,4,5,6,7 --name noname --rmdonvr -g 0,1,2,3,4,5,6,7 -n noname -rdonvr noname -r -bla bla:bladonvr noname -rDocker restartdonv-restart nonamedonvre nonameDocker attachdonv-attach nonamedonva nonameDocker restart and attachdonv-restart-attach nonamedonvra nonameDocker stopdonv-stop nonamedonvs nonameDocker removedonv-remove nonamedonvrm nonameDocker remove imagedonv-remove-image nonamedonvrmi nonameHow to build packagepython setup.py bdist_wheel && pip install -e .
twine upload dist/{generated dist file path}
Package: dooble
doobleDooble is a marble diagram generator from text. It eases the documentation of
ReactiveX standard and custom operators, in a consitent way.InstallationpipinstalldoobleA sphinx plugin is also available:pipinstallsphinxcontrib-doobleUsageThe text grammar allows to easilly defineobservablesandoperators. The map
operator with an input observable and an output observable is described the
following way:--1--2--3--4-->
[ map(i: i*2) ]
--2--4--6--8-->save this text in a file namedmap.txtand then render it to an image:dooble --input map.txt --output map.pngThe generated image looks like this:Higher order observablescan also be documented easilly:--a-b-c---d-e-f-->
[     window     ]
--+-------+------>
          +d-e-f-|
  +a-b-c-|save this text in a file namedwindow.txtand then render it to an image:dooble --input window.txt --output window.pngThe generated image looks like this:For operators that take several observables as input, it is possible to label
them:--1--2--3--*
         a-7-8-|
[   catch(a)   ]
--1--2--3--7-8-|save this text in a file namedcatch.txtand then render it to an image:dooble --input catch.txt --output catch.pngThe generated image looks like this:Full grammarEach text line represents either an observable, or an operatorObservables are defined with dash linesIf an Observable starts with a letter, this letter is considered as a labelEach character represent a time spanCharacter|indicates an observable completionCharacter*indicates an observable errorCharacter>indicates an observable continutationThe+character is used to define anchors of higher order observablesoperators start with a[and end with a]The full grammar is the following one (in tatsu pseudo ebnf syntax):@@grammar::dooble

start = { layer } $ ;

layer
=
| obs:observable
| op:operator
;

observable = {skipspan}* [prefix] {lifetime}* completion ;
operator = '[' description ']' ;

prefix = '+' | label ;

label = /[a-z]/ ;

lifetime
=
| ts:timespan
| item:item
;

completion = /[>|*]/ ;

skipspan = ' ' ;
timespan = '-' ;
item = /[a-zA-Z0-9+.,]+/ ;

description = /[a-zA-Z0-9,:+*() <>_]+/ ;History0.1.0 (2019-02-08)First release on PyPI.
Package: doodad
doodadMaking access to names easier.doodad: A gadget or other object whose name the speaker does not know or cannot recall.Often, when writing code, you need to specify field names, for example, when writing code that
communicates with a database. It's so easy to make a typo in the field name, and you might only know
this once you run the code, which may be a lot later...Whatdoodadwants to do when it grows up, is make it easier to find names, and use the names
you meant to use, with tab completion etc.To install:pip install doodadExamplesFind all the names (variables, functions, etc.) in a piece of code or data.>>> from doodad import find_names
>>> mapping = {'c': 1, 'b': {'a': 2, 'd': 3}}
>>> list(find_names(mapping))
['c', 'b', 'a', 'd']
>>> import os
>>> names = list(find_names(os.path.join))
>>> names
['join', 'a', 'a', 'sep', 'path', 'path']Make an instance whose sole purpose is to contain those names.
This allows you to have a ready-to-use collection of names that you can tab complete
and catch spelling mistakes early (before, say, you ask for a field name that doesn't exist...)>>> from doodad import mk_str_attr_obj
>>>
>>> f = mk_str_attr_obj(names)
>>> f.join
'join'
>>> f.path
'path'
>>> f = mk_str_attr_obj('date worker offre success')
>>> f.date
'date'
>>> f.worker
'worker'
>>> f.does_not_exist
Traceback (most recent call last):
...
AttributeError: 'AttrObj' object has no attribute 'does_not_exist'fis anamedtupleso you can do things like:>>> list(f)
['date', 'worker', 'offre', 'success']
>>> date, worker, offer, success = f
>>> offer
'offre'
Package: doodaw
This is a Discord bot that will do stuff.
Right now it only responds to ‘$hello’ in the general channel ofhttps://discord.gg/JPyHw558Author: The kids
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Package: doodle
A library to segment objects in an image in a semi-automated fashion.As of now, the library can segment objects manually. If you are usingskimage,
you can find a similar function in thefuturemodule in the developmental
version.InstallationUsingpip:$ pip install doodleFor the developmental version:$ git clonehttps://github.com/pskeshu/doodle.git$ pip install-e.Example>>> import doodle
>>> from skimage import data, io
>>> camera = data.camera()
>>> seg = doodle.manual(camera)
>>> io.imshow(seg)
>>> io.show()
Package: doodle-dashboard
Doodle-Dashboardis used to create dashboards for displaying information from multiple sources; such as
Tweets from your favourite Twitterers, notifications from Slack or breaking news from an RSS feed.WARNING: This project is under heavy development and will not have a reliable API until a stable version is released.RequirementsPython 3.4+pipGetting startedInstall package:pip install doodle-dashboardStart a dashboard:A dashboard is a YAML file that declares the display to use and the notification to display on it. Dashboard files can be hosted
locally or remotely.Starting a single dashboard:doodledashboard start \
  https://raw.githubusercontent.com/SketchingDev/Doodle-Dashboard/master/examples/rss/weather/dashboard.ymlStarting multiple dashboards:doodledashboard start \
  https://raw.githubusercontent.com/SketchingDev/Doodle-Dashboard/master/examples/rss/weather/dashboard.yml \
  https://raw.githubusercontent.com/SketchingDev/Doodle-Dashboard/master/examples/rss/build-radiator/dashboard.ymlDevelopmentThese steps assume that you’re using virtualenv.Clone the repository:$ git clone https://github.com/SketchingDev/Doodle-Dashboard.git
$ cd doodle-dashboardPrepare project dependencies:$ make dev
$ export PYTHONPATH=`pwd`See usage help:$ python doodledashboard/cli.pyRefer to thedocumentationfor more detailed instructions.
Package: doodoo
doodooDon't like using .pop(0) because it looks weird? .pop(0) feels weird to
type out for a queue?LOOK NO FURTHERThe doodoo package contains a poop() function which does the same thing as
.pop(0). BUTTTTTTT since your digestive system is basically a queue (First
In First Out) it only makes sense to use poop(queue) instead of queue.pop(0)installpip install doodooIf that doesnt work try:pip3 install doodoousagefromdoodooimportpoopqueue=[1,2,3,4,5]poo=poop(queue)# poo = 1# queue = [2, 3, 4, 5]
Package: doodstream
UnofficialDoodStreamAPIDoodStream is a video hosting service were you can upload videos, share & make money.Don't have account? registerhere.FeaturesHLS StreamingUnlimited StorageFaster EncodingSubtitles SupportPremium bandwidthSupported host for remote uploadMore detailClick MeInstallpipinstalldoodstreamUsagefromdoodstreamimportDoodStreamd=DoodStream("YOUR_API_KEY")# Check doodstream account infod.account_info()# Check doodstream account reportsd.account_reports()# Upload video file from local storaged.local_upload("PATH_TO_YOUR_VIDEO")# Upload video from direct linksd.remote_upload("DIRECT_VIDEO_LINK")# list all available methodhelp(DoodStream)# please refer to https://doodstream.com/api-docsNote : Please update to v1.x, all the v0.x are out to date