Saravanan666/pypi-org huggingface dataset:
Package: dj-webmachine
dj-webmachine is an application layer that adds HTTP semantic awareness on
top of Django and provides a simple and clean way to connect that to
your applications’ behavior. dj-webmachine also offers you the
possibility to build simple API based on your model and the tools to
create automatically docs and clients from it (work in progress).InstallMake sure that you have a workingPython2.x >=2.5 installed andDjango>= 1.1.With pip$ pip install dj-webmachineFrom sourceGet the dj-webmachine code:$ git clone https://github.com/benoitc/dj-webmachine.git
$ cd dj-webmachineOr using a tarbal:$ wget http://github.com/benoitc/dj-webmachine/tarball/master -o dj-webmachine.tar.gz
$ tar xvzf dj-webmachine.tar.gz
$ cd dj-webmachine-$HASH/and install:$ sudo python setup.py installdj-webmachine in 5 minutesWe will quickly create an Hello world accepting HTML and JSON.$ django-admin startproject helloworld
$ cd helloworld
$ python manage.py startapp helloIn the hello folder create a file namedresources.py:import json
from webmachine import Resource

class Hello(Resource):

    def content_types_provided(self, req, resp):
        """" define the content type we render accoridng the Accept
        header.
        """
        return (
            ("", self.to_html),
            ("application/json", self.to_json)
        )

    def to_html(self, req, resp):
        return "<html><body>Hello world!</body></html>\n"

    def to_json(self, req, resp):
        return "%s\n" % json.dumps({"message": "hello world!", "ok": True})Adddj-webmachineand your hello app toINSTALLED_APPSin your
settings:INSTALLED_APPS = (
    ...
    'webmachine',
    'helloworld.hello'
)Put your the Hello resource in yoururls.py:from django.conf.urls.defaults import *

from helloworld.hello.resource import Hello

urlpatterns = patterns('',
    (r'^$', Hello()),
)Launch your application:$ python manage.py runserverTake a look! Point a web browser athttp://localhost:8000/Or with curl:$ curl http://127.0.0.1:8000
<html><body>Hello world!</body></html>

$ curl http://127.0.0.1:8000 -H "Accept: application/json"
{"message": "hello world!", "ok": true}The first line ask the hello page as html while the second using the
same url ask for JSON.To learn how to do more interresting things, checkoutsome examplesor readmore documentations.
Package: djwebsockets
This is a part of a project extremus-io.##### update v.9.4- fixed a bug which deleted msgs sent from on_message call back##### update V0.8.1:- minor bug fix##### update V0.8:- added mixin support. now you can control the auth work flow in every event on_connect, on_message, on_close.- now supports any wsgi application see documentation for more information.- \* experimental * added django middleware support via a mixin (djwebsockets.mixins.wsgi.WSGIMixin) you can run django middleware for requests only for nowadded a demo chatroom websocket configuration.> The app is almost production ready. It lacks good documentation. partial documentation is available at https://pythonhosted.org/djwebsockets and https://extremus-io.github.io/djwebsockets> Note: requires python > 3
Package: dj-whisperer
Django WhispererWhisperer informs subscribed users via an URL when a specific event occurs.InstallationInstallation using pip:pip install dj-whispererwhispererpackage has to be added toINSTALLED_APPSandmigratecommand has to be run.INSTALLED_APPS=(# other apps here...'whisperer',)Sample ScenarioLet's give an example usingPackagemodel. When an event occurs related to a package, subscribed users are gonna be informed. To do so, firstly which events to subscribe must be determined. In order to learn when a package created:fromdjango.db.models.signalsimportpost_savefromwhisperer.eventsimportWhispererEvent,registryfromwhisperer.tasksimportdeliver_eventclassPackageCreateEvent(WhispererEvent):serializer_class=PackageSerializerevent_type='package-created'registry.register(PackageCreateEvent)defsignal_receiver(instance,created=False,**kwargs):ifcreated:deliver_event(instance,'package-created')post_save.connect(signal_receiver,Package)When database transaction succeeds, in short whentransaction.on_commit(),deliver_eventmust be triggered.
Subscribed users now can be informed that a package created if they have created aWebhook.importrequestsrequests.post(url='https://your-app.com/whisperer/hooks/',headers={'Authorization':'Token <secret-login-token>',},json={'event_type':'package-created','secret_key':'secret','target_url':'https://example.com/',})When a package created,uuid,type&datapassed throughPackageSerializerwill be posted tohttps://example.com/.importrequestsrequests.post(url='https://example.com/',headers={'Content-Type':'application/json','X-Whisperer-Event':'package-created',},json={'event':{'type':'package-created','uuid':'da81e85139824c6187dd1e58a7d3f971',},'data':{'id':61,'transfer_id':49,'order_number':'248398923123','.....':'......',}})In order to cancel the subscription:importrequestsrequests.delete(url='https://your-app.com/whisperer/hooks/<webhook-id>/',headers={'Authorization':'Token <secret-login-token>',})To re-trigger events that lost on the queue you must call whisperer.tasks.trigger_event_queue_events with scheduler
Package: dj-wkhtmltopdf
dj-wkhtmltopdfIt works on wkhtmltopdf . dj-wkhtmltopdf will allow user to organize their own pdf generator through django admin without any deployment :).Mainly I was inspired by django-wkhtmltopdf . When I am working on Eccomerce project we want to generate invoice for orders.So we preferred wkhtmltopdf for pdf generator using django-wkhtmltopdf wrapper. Every time we are doing some modifications in local server and pushing this modifications into production but we have faced different(I mean design) issues in production,then we resolved issues in local and pushed into production,but it is so painful then I came to this thought.
Requirements:Install the wkhtmltopdf . Python 2.6+ and 3.3+ is supported.
Installation:Run pip install dj-wkhtmltopdf.Add ‘djwkhtmltopdf’ to INSTALLED_APPS in your settings.py .Then run the python manage.py syncdb .By default it will execute the first wkhtmltopdf command found on your PATH .If you can’t add wkhtmltopdf to your PATH you can set WKHTMLTOPDF_CMD to a specific execuatable:e.g. in settings.py:WKHTML_TO_PDF_CMD = ‘/path/to/my/wkhtmltopdf’You may also set wkhtmltopdf options through django admin or WKHTML_OPTIONS in settings.py to a dictionary of default command-line options.Like this is: WKHTML_OPTIONS = { ‘–quiet’: True, }
Important Note:I’ve tested it only on Ubuntu but haven’t tested it on Mac and Windows.
License:MIT licensed. See the bundled LICENSE file for more details
Package: dj-wordpress
Models and views for reading a WordPress database. Compatible with WordPress version 3.5+.django-wordpress is a project ofSunlight Foundation.FeaturesRead-only models to protect your contentThis package isdesigned to be read-only. Writing is enabled by addingWP_READ_ONLY = Falseto settings.py. None of the WordPress specific logic is included while writing to the database so there is a good chance you will break your WordPress install if you enable writing.WordPress table prefixThe default table prefix iswp. To change the table prefix, addWP_TABLE_PREFIX = 'yourprefix'to settings.py.Multiple database supportAdded the ability to specify which database the WordPress content is coming from. Set it using theWP_DATABASEsetting. Defaults to “default”.Database routers need be set to:DATABASE_ROUTERS = ['wordpress.router.WordpressRouter']Default templatesDefault templates are provided only for development purposes so you can see content in your browser! Please override these with customized templates for your application.Export Management CommandswpexportDump published posts in WXR format.wpexportauthorsExport authors as CSV.Working With WordPress ModelsTen most recent published posts:Posts.objects.published()[:10]Posts taggedwordpress:Posts.objects.term("wordpress")Post attachments:for attachment in post.attachments():
    passPost tags:post.tags()Installationpip install the-real-django-wordpressAdd to INSTALLED_APPS in settings.py:'wordpress'Include the following in urls.py:url(r'^path/to/blog/', include('wordpress.urls')),
Package: djydoc
DjydocRead Python Documentation within a Django Project.So you're happily going along in development and you want to quickly view
documentation in a module. For python modules this is a piece of cake.However, when you try to find out more information about a Django app, you may
have come across an error like this...Or like this...And you may have done this...But after installingdjydocnow you can do this:Djydoc aims to be a simple drop-in replacement as amanage.pycommand
for pydoc so that you can view
Python documentation without having to specifyDJANGO_SETTINGS_MODULEor
run django.setup(). Djydoc does that for you.SummaryGetting StartedRuning the testsDeploymentBuilt WithContributingVersioningAuthorsLicenseAcknowledgmentsGetting StartedThese instructions will get you a copy of the project up and running on
your local machine for development and testing purposes. See deployment
for notes on how to deploy the project on a live system.PrerequisitesDjango 2.2.4+Poetry (optional, to help easily install)InstallingOption 1 : PIP$ pip install djydocOption 2: Development install via poetry$ git clone <git_url>
$ cd djydoc
$ poetry installOption 3: use as a Django appJust follow option 2, but don't install with poetryOptions 1, 2, or 3: SetupAdd'djydoc'toINSTALLED_APPSinsettings:INSTALLED_APPS+=['djydoc']UsageOnce installed djydoc should be available via the./manage.pycommand.The intention is for this to be a drop-in replacement for pydoc, so all the
commands should work the same (currently-wis not implemented):$ ./manage.py djydoc django.contrib.auth.models.User

[ documentation shown ]

$ ./manage.py djydoc -p 8080
Server ready at http://0.0.0.0:8080/
Server commands: [b]rowser, [q]uit
server>Running the testsTesting TBD.DeploymentFollow common sense django deployment practices.Built WithContributor Covenant- Used
for the Code of ConductCreative Commons- Used to choose
the licenseContributingPlease readCONTRIBUTING.mdfor details on our code
of conduct, and the process for submitting pull requests to us.VersioningWe useSemVerfor versioning. For the versions
available, see thetags on this
repository.AuthorsJordan H.-Code Author-SrcRrLicenseThis project is licensed underMIT.AcknowledgmentsTBD
Package: dk64-lib
DK64 LibA library for extracting data from a Donkey Kong 64 ROMExamplesText datafromdk64_lib.romimportRomrom=Rom("Donkey Kong 64 (USA).z64")fortext_lineinrom.text_tables[0].text_lines:print(text_line.text)# WELCOME TO THE BONUS STAGE!# HIT AS MANY KREMLINGS AS YOU CAN! PRESS a_button TO FIRE A MELON.# KEEP THE TURTLES SPINNING BY FEEDING THE SNAKES MELONS. PRESS a_button TO FIRE A MELON.# LINE UP FOUR BANANAS TO WIN THE JACKPOT! PRESS a_button TO SPIN AND STOP THE REELS.# RELOAD!# HURRY!# ...To-doExtract texture data and convert to appropriately formatted imagesExtract models and convert to objsExtract audio and convert to some sort of audio fileExtract everything else
Package: dk-analyzer
Dk AnalyzerHow do I install it?pip install dk_analyzerHow do I use it?Seedk_analyzer --helpHow do I obtain CLIENT_ID and CLIENT_SECRET?Head over tohttps://www.warcraftlogs.com/api/clientsand clickCreate Client.
You can leave the redirect URL ashttps://google.com.
Leave Public Client unchecked.DevelopmentFor help getting started developing checkDEVELOPMENT.md
Package: dk.charon
charonCharon is a simple tool built with python, that helps you manage your telegram chats byarchivingthem automatically.InstallationUse the package managerpipto install charon.pipinstalldk.charonUsageImportant notescharon will need you to provideapp-id and api-hashto workit will also authenticate youit's not designed for everyday use, thus willNOTstore session info, and will automatically logoutUsage is quite simple.
The following command will archive all chats that were unactive for 30 days or longer.charonarchive-d30ContributingAny pull requests are welcome, including:refactoringtest coveragenew featuresCI setupFor major changes, please open an issue first to discuss what you would like to change.LicenseGPL3
Package: dkconfig
dkconfig – command line access to ConfigParserInstalling from PyPIpip install dkconfigBasic usageMost of the methods of ConfigParser
(https://docs.python.org/2/library/configparser.html#ConfigParser.RawConfigParser)
should be usable in a relatively obvious way, however,dkconfigtries to
give you some sane defaults to make your life easier, e.g. it will create
files/headers/keys that don’t exist:/tst> ll
/tst> dkconfig foo.ini set header key value
/tst> cat foo.ini
[header]
key = valueSections can be added:/tst> dkconfig foo.ini add_section header2
/tst> cat foo.ini
[header]
key = value

[header2]re-adding them is a no-op (and doesn’t throw an exception):/tst> dkconfig foo.ini add_section header2
/tst> cat foo.ini
[header]
key = value

[header2]the values command pretty prints the keys and values:/tst> dkconfig foo.ini values
key => valuethedoscommand will output the key/values as dossetcommands:/tst> dkconfig foo.ini dos
set "KEY=value"from a batch file you would use it like this:dkconfig foo.ini dos > tmp.bat && call tmp.bat && del tmp.batthebashcommand does the same for bash, and you’ll use it together with
eval:eval $(dkconfig foo.ini bash)You can read values directly into dos variables in the regular way:> for /f "delims=" %a in ('dkconfig foo.ini get header key') do @set KEY=%a
> echo %KEY%
valueBash has a more sane syntax for this:bash$ export KEY=$(dkconfig foo.ini get header key)
bash$ echo $KEY
valueThe appropriate error returns are set if a key is missing:/tst> dkconfig foo.ini get header missing
/tst> echo %ERRORLEVEL%
1

/tst> dkconfig foo.ini get header key
value
/tst> echo %ERRORLEVEL%
0
Package: dkconverters
Package-dkconverterThis package helps you to convert decimal numbers to other numeral system representations.File named"conv.py"has all the functions that do so.Getting startedInstall Package using pippip install dkconverters==1.0.0Import package in your pyfilefromdkconverterimportconvGet More Info on Functions UsedFor your reference info on functions used are added to readme and an Example Code is also added for reference.fromdkconverterimportconvhelp(conv)print(conv.bina(10))print(conv.octl(10))print(conv.hexdcml(10))Function-binaIt converts decimal number into binary number which is passed as an argument to this function.Function-octlIt converts decimal number into octal number which is passed as an argument to this function.Function-hexdcmlIt converts decimal number into hexadecimal number which is passed as an argument to this function.
Package: dkdc
dkdcdon't know, don't careData & Knowledge Decision Center.Decision Knowledge Database CLI.Data Keys, Decision Commands - Empowering Analytics.Deciphering Knowledge, Driving Conclusions - The Intelligent Choice.Dynamic Kernel for Decision Cognizance - AI-Powered Insight.Driven by Knowledge, Defined by Choices - Command Your Decisions.Deriving Knowledge, Directing Convergence - The Future of Data Processing.Data Kinetics for Decision Curators - Where AI Meets Action.Delivering Knowledge-Driven Calculations - Precision at Your Fingertips.Decoding Keys, Directing Choices - Navigate Data with Ease.Decision Kits for Data Catalysts - Transform Your Analysis.Deep Knowledge Discovery Command - Unleash the Power of Data.Discovering Knowledge, Defining Conclusions - AI-Driven Intelligence.Data Kingpin for Decision Capabilities - Master Your Decisions.Deterministic Knowledge and Decision Controls - Predictable Excellence.Decentralized Knowledge Discovery Chain - Connect, Analyze, Decide.Decentralized Knowledge and Decision Computing - Expand Your Horizons.Data Knowledge, Decision Crafting - Shape the Future of Analytics.Dynamic Knowledge Data Compiler - Compile, Analyze, Decide.
Package: dkextract
About this projectThis tool was created to help manage a DraftKings league as the commissioner. It used to be a script that was used to generate a blog post template forPlatanofb.com, a GitHub Pages project. Now, this tool is a group of functions that can be called to return data, which makes integration with other projects, like a Flask website, possible.One of the new features islogin_to_dk()which logs in to DraftKings and stores/loads cookies; this enables getting contest details automatically, an improvement over downloading the contest results CSV and supplying the file to the old script. A wiki will be updated to describe usage of each function, although they are appropriately named and comments are included inline with the code.UsageCreate a session to be passed to the functions of dkextractimport dkextract, requests

s = requests.session()
dkextract.get_all_players(session=s, week=1, year=2020)DraftKings credentials and other valuesThis tool will look for DraftKings credentials in the following environment variables:export DKUSER=dkuser@email.com
export DKPASS=dkp@ssw0rdSome other values that are not obvious when using the tool:all_members = set(["dk_username1", "dk_username2", "dk_username3"])
winning_values = {1: 100, 2: 50, 3: 25}
week1 = 'Sep 9, 2021 20:20:00'all_membersis asetof all DraftKings member nameswinning_valuesis a value assigned to a rank. In this example, first place (rank 1 or1:) is assigned a value of100. Pass this togenerate_results()week1is the date and time of the first game of the season.Thank youThanks for taking a look at my tool. Please feel free to provide feedback or suggestions, but notice, this code was created and written for fun.
Package: dkfileutils
Documentation:http://dkfileutils.readthedocs.io/Contains the following modulesSee the documentation link (above) and module documentation for detailed docs.changedCode to check if directory contents have changed since last check.listfilesYield (digest, fname) tuples for all interesting files
indirname.  The file names are relative tocurdirunless otherwise specified.path“Poor man’s pathlib”.  Object-oriented wrapper aroundos.pathand
friends.  Similar to the Python 3pathlib, however paths arestrsubclasses and thus much easier to use in an environment
whereos.pathcalls are interspersed with object-oriented code.Brett Cannon strongly dislikes paths beingstrsubclasses, seehttps://snarky.ca/why-pathlib-path-doesn-t-inherit-from-str/While I can agree with him in principle, this is clearly a case
of “practicality beats purity”.  The officialpathlibversion
of'/b/' inPath('/a/b/c')is rather baroque.pfindFind directory where a file is located by walking up parent directories.whichFunctions for finding executable files on the path.
Package: dkist
A Python library of tools for obtaining, processing and interacting with DKIST
data.DocumentationSee the documentation athttps://docs.dkist.nso.edu/projects/python-tools.InstallationThe recommended way to installdkistis withminiforge.
To installdkistonce miniforge is installed run the following command:$condainstalldkistFor detailed installation instructions, see theinstallation guidein thedkistdocs.LicenseThis project is Copyright (c) NSO / AURA and licensed under
the terms of the BSD 3-Clause license.Code of ConductWhen you are interacting with thedkistproject you are asked to follow the SunPyCode of Conduct.
Package: dkist-inventory
A shared library for dataset inventory and asdf generation.Running TestsAt the start of the pytest run the test suite calls the simulator to generate a number of test datasets (with small array size).
This process takes some time, when quickly iterating on test failures this can be annoying.
To share the simulated data over multiple test runs invoke the test suite with the--cached-tmpdir=/path/argument.
This will use the specified path for all simulated datasets and not regenerate if the files are already present.Note: It is up to you to make sure the files are correct and to remove all the files if they need to change.LicenseThis project is Copyright (c) NSO / AURA and licensed under
the terms of the BSD 3-Clause license. This package is based upon
theOpenastronomy packaging guidewhich is licensed under the BSD 3-clause licence. See the licenses folder for
more information.
Package: dkist-processing-common
This repository works in concert withdkist-processing-coreanddkist-processing-*instrument*to
form the DKIST calibration processing stack.UsageThe classes in this repository should be used as the base of any DKIST processing pipeline tasks. Science tasks should subclassScienceTaskL0ToL1Base.Each class is built on an abstract base class with therunmethod left for a developer to fill out with the required steps that the task should take.
This class is then used as the callable object for the workflow and scheduling engine.Examplefromdkist_processing_common.tasks.baseimportScienceTaskL0ToL1BaseclassRemoveArtifacts(ScienceTaskL0ToL1Base):defrun(self):# task code heretotal=2+5Deploymentdkist-processing-common is deployed toPyPIDevelopmentgitclonegit@bitbucket.org:dkistdc/dkist-processing-common.gitcddkist-processing-commonpre-commitinstallpipinstall-e.[test]pytest-v--covdkist_processing_commonChangelogWhen you makeanychange to this repository itMUSTbe accompanied by a changelog file.
The changelog for this repository uses thetowncrierpackage.
Entries in the changelog for the next release are added as individual files (one per change) to thechangelog/directory.Writing a Changelog EntryA changelog entry accompanying a change should be added to thechangelog/directory.
The name of a file in this directory follows a specific template:<PULL REQUEST NUMBER>.<TYPE>[.<COUNTER>].rstThe fields have the following meanings:<PULL REQUEST NUMBER>: This is the number of the pull request, so people can jump from the changelog entry to the diff on BitBucket.<TYPE>: This is the type of the change and must be one of the values described below.<COUNTER>: This is an optional field, if you make more than one change of the same type you can append a counter to the subsequent changes, i.e.100.bugfix.rstand100.bugfix.1.rstfor two bugfix changes in the same PR.The list of possible types is defined the the towncrier section ofpyproject.toml, the types are:feature: This change is a new code feature.bugfix: This is a change which fixes a bug.doc: A documentation change.removal: A deprecation or removal of public API.misc: Any small change which doesn’t fit anywhere else, such as a change to the package infrastructure.Rendering the Changelog at Release TimeWhen you are about to tag a release first you must runtowncrierto render the changelog.
The steps for this are as follows:Runtowncrier build –version vx.y.zusing the version number you want to tag.Agree to have towncrier remove the fragments.Add and commit your changes.Tag the release.NOTE:If you forget to add a Changelog entry to a tagged release (either manually or automatically withtowncrier)
then the Bitbucket pipeline will fail. To be able to use the same tag you must delete it locally and on the remote branch:# First, actually update the CHANGELOG and commit the updategitcommit# Delete tagsgittag-dvWHATEVER.THE.VERSIONgitpush--deleteoriginvWHATEVER.THE.VERSION# Re-tag with the same versiongittagvWHATEVER.THE.VERSIONgitpush--tagsoriginmain