Saravanan666/pypi-org huggingface dataset:
Package: dizzer
DIZZERBidirectional human-readable weird-text encoder/decoder.For each original word in the original text, it leaves the first and last character of it in that
position, but shuffles (permutates) all the characters in the middle of the word. If possible,
the resulting “encoded” word is different than the original word.Words shorter than 4 characters or with double letters inside - like: "keep",
"seen", "moon"  cannot be scrambled - because swapping its characters has no effect.Key features:simple, straight-forward100% translatable - back and fourthcodec is lossless and doesn't need any additional data for translationscrambles all numbers and slugs as wellkeeps other non-word text parts unchangedScrambling order is pseudo-random and different for each word.Usageimportdizzeroriginal_text="""Text can contain unlimited number of whitespaces, newlines etc.Numbers like 12345, 1234567, 987654321 or 123456789 are also scrambled."""encoded=dizzer.encode(original_text)print(encoded)# Txet can cnitaon umnitelid nmeubr of wtsehaecips, newniels etc.# Numbres lkie 14325, 1346257, 967843251 or 143267859 are aslo scrmeabld.# reverse operation:decoded=dizzer.decode(encoded)print(decoded)# Text can contain unlimited number of whitespaces, newlines etc.# Numbers like 12345, 1234567, 987654321 or 123456789 are also scrambled.InstallationpipinstalldizzerIt has no dependencies and works in python 3.7, 3.8, 3.9 and pypy3.Interoperability checkThere is non-zero probability, that the algorithm works
different on sophisticated environments (i.e. when your python interpreter
uses weird pseudo-random generator library).At import time ofdizzerpackage there is a self-check statement.
It checks if this algorithm works in your environment.
There is a snippet that raises an import error if a malfunction is detected.
In other words - if you are able to import dizzer - you can be sure, that your
encoded text can be decoded on othr machines.The self-check statementimportdizzerPROPER_TEXT="""This sentence approves that dizzer can be used on your machine.If this assertion is not raised - it means you can read and write messagesthat are fully translatable on other machines."""EXPECTED_ENCODING="""Tihs senectne aepvorps taht dzzier can be uesd on yuor mhcaine.If tihs aosirtsen is not risaed - it mneas you can raed and wtrie msesgeastaht are fluly tbnslalatrae on oethr mhacneis."""local_encoding=dizzer.encode(PROPER_TEXT)back=dizzer.decode(local_encoding)assertlocal_encoding==EXPECTED_ENCODING,"Failed to encode."assertback==PROPER_TEXT,"Failed to decode."
Package: dj
This is just a namespace package for Django-related projects. Feel free to use it.Does Django even support namespace packages?It currently doesn’t but you can patch it like so:import django.core.management

def django_core_management__find_management_module(app_name):
    """
    Determines the path to the management module for the given app_name,
    without actually importing the application or the management module.

    Raises ImportError if the management module cannot be found for any reason.

    Supports namespace packages.
    """
    import sys
    import os.path

    parts = app_name.split('.')
    parts.append('management')

    management_module = __import__(app_name + '.management', fromlist=parts)
    path = management_module.__file__

    if path.endswith(('__init__.py', '__init__.pyc')):
        path = os.path.split(path)[0]

    return path

# PATCH: a more generic find_management_module that supports namespace
# packages.
# COMPATIBILITY: Django 1.1.0 - 1.3.0
django.core.management.find_management_module = \
    django_core_management__find_management_moduleAuthorsGlued together byŁukasz Langa.
Package: dj3nk
dj3nkA simple natural key generator base on redis.History.Installpipinstalldj3nkExamples# settings.pyNATURAL_KEY={"increment_main_key":"a3:dj:nk","random_bit_length":16,"puzzle_count":1000000,"rdb_conf_name":"default"}# modelsfromdj3nkimportNKModelclassXXX(NKModel):...
Package: djabberd
Generic application to handlehttps://ejabberd-saas.com/Remote Data API callsdjabberdFor each specific tasks a handler function must be implemented.Installpip install djabberdQuick start1. Include the django-ejabberd URLconf in your project urls.py like this::url(r'', include('djabberd.urls'),# For Django==1.8
url(r'', include('djabberd.urls'), namespace='djabberd')2. Setup the handler in your Django settings::DJABBERD_API_HANDLERS='your.module.path'Based on ejabberd-saas’s documentation those endpoints are required(01-Feb-2016):User management:Authentication (‘/auth’)User exists (‘/user’)Roster management:Retrieve user roster (‘/roster’)Archive:Store (‘/archive’)Get (‘/archive’)There must be one function for each endpoint that should be implemented like this:user_authentication(username, password):ReturnsTrueif authentication is validReturnsFalseif authentication isnotvaliduser_exists(username):ReturnsTrueif user existsReturnsFalseif not(or if it is not active)retrieve_user_roster(username):Returns the roster in JSON formatReturnsFalseif user does not existarchive_store(payload)ReturnsTrueif message has been storedReturns a string containing an error message if message hasnotbeen storedarchive_get(username[, peer, after, before, limit, chat_type])Returns the message history in JSON formatReturnsFalsein any other caseFormatsretrieve_user_roster:{"roster": [
    {"username": "CONTACT",
     "subscription": "both",
     "nick": "NICK"},
     ...
  ]}archive_store:{"username": "USERNAME1",
 "peer": "USERNAME2",
 "xml": "MESSAGE_STANZA",
 "body": "TEXT",
 "timestamp": "TIMESTAMP",
 "direction": "DIRECTION"}archive_get:{"archive": [{"username": "USERNAME1",
              "peer": "USERNAME2",
              "xml": "MESAGE_STANZA",
              "body": "TEXT",
              "timestamp": "TIMESTAMP",
              "direction": "DIRECTION"}, ...]
              "count" : MESSAGES_NUMBER
}ConsiderationsBased on ejabberd-saas’s documentation:If XMPP JID is “userid@xmppdomain”, just pass “userid”If XMPP JID of USER is “userid@xmppdomain”, just pass “xmppdomain”If an exception is raised from your handler it would be treated as a server errorReturn HTTP 200 for the successful caseReturn HTTP 401 if authentication failsReturn HTTP 401 if it’s not the successful caseReturn HTTP 500 for server errors, this is the Django’s default behaviorRunning Testspython setup.py develop
python runtests.py [tests.<tests_module>[.<TestClass>[.<test_method>]]]
Package: dj-acc
Django AccountsAdd these lines in your INSTALLED_APPS of settings.py file!# Third party apps!
'accounts',
'crispy_forms',Add these lines in your settings.py file!CRISPY_TEMPLATE_PACK = 'bootstrap4'

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'accounts.authentication.EmailOrUsernameModelBackend',
)Add this line in urlpatterns of your root/core urls.py file!path('accounts/', include('accounts.urls')),Default parameters which you can change in your settings.pyUNIQUE_EMAIL = bool # True
ACCOUNT_ACTIVATION = bool # True
SIGNUP_URL = str['uri'] # 'signup/'
SIGNIN_URL = str['uri'] # 'signin/'

SIGNUP_TEMPLATE = str['path'] # 'accounts/register.html'
ACTIVATION_EMAIL_TEMPLATE = str['path'] # 'accounts/activate.html'
LOGIN_TEMPLATE = str['path'] # 'accounts/login.html'
FORGET_TEMPLATE = str['path'] # 'accounts/reset-password.html'
PROFILE_TEMPLATE = str['path'] # 'accounts/profile.html'

CURRENT_SITE = str['url'] # 'http://127.0.0.1:8000'
Package: djaccount
# Django AccountAccount app for the Django framework provides an email based user object## Simple usage1. Install by running `pip install djaccount`2. Add the following settings to your `settings.py` file```pythonINSTALLED_APPS = [# contrib and other apps here'account',# some more custom apps here]AUTH_USER_MODEL = 'account.Account'LOGIN_URL = '/account/login/'LOGIN_REDIRECT_URL = '/account/'LOGOUT_REDIRECT_URL = '/'```3. Add the account URLs to your `urls.py` file```pythonurlpatterns = [url(r'^account/', include('account.urls', namespace='account')),]```4. Run `django-admin migrate`## Integrated usage**TBD**## LicenseSee [LICENSE](LICENSE)Some of the work was made as part of my job at [Sync.me](https://sync.me)
Package: dj-accounts
Installationpip install dj-accountsConfigurationINSTALLED_APPS=[...,'dj_accounts',]in your settings.py# for custom register formREGISTER_FORM='users.form.RegisterForm'# django restFramework settingsREST_FRAMEWORK={'DEFAULT_AUTHENTICATION_CLASSES':['rest_framework_simplejwt.authentication.JWTAuthentication',],}in your settings.py# django restFramework settingsREST_FRAMEWORK={'DEFAULT_AUTHENTICATION_CLASSES':['rest_framework_simplejwt.authentication.JWTAuthentication',],}
Package: djace-editor
What’s thatdjace_editoris a reusable application for Django, usingAce editorForked onBradley Ayers.DependenceDjango >= 1.9Getting startedInstalldjace_editor:`pip install djace_editor`Add‘djace_editor’to INSTALLED_APPS.Using in modelfromdjango.dbimportmodelsfromdjace_editorimportAceFieldclassEntry(models.Model):title=models.CharField(max_length=250,verbose_name=u'Title')text=AceField(verbose_name=u'Text')or use custom parametrs:text=AceField(verbose_name=u'Text',theme="terminal",width="800px",height="500px")Using for only admin interfacefromdjangoimportformsfromdjace_editorimportAceWidgetfromblog.modelsimportEntryclassEntryAdminForm(forms.ModelForm):classMeta:model=Entrywidgets={'short_text':AceWidget(),}classEntryAdmin(admin.ModelAdmin):form=EntryAdminFormAceWidgettakes the same parameters asAceField.ContributingFork it!Create your feature branch:git checkout -b my-new-featureCommit your changes:git commit -am ‘Add some feature’Push to the branch:git push origin my-new-featureSubmit a pull request =]
Package: dj-actions
DJ ActionsA pattern + tooling to enable a standardized way to interact with and mutate data on a Django modelGetting startedInstallationpip install dj-actionsAdd toINSTALLED_APPSPrepare your app for action!python manage.py start_actionsAdd your first actionpython manage.py create_actionAdd actions to your Django app1. Create an actions module in your app:DJActions convention is to isolate each action into it's own module.
A typical file layout might look something like this:[app]|_[actions]|_action_registry.py|_[some_action]|_[some_other_action]2. Create your action registryThe action registry is how we tell DJActions how to route to our actions. The action registry will also be responsible for generating your documentation endpointsHere is an example registry:fromactions.utilimport(STATUS,ACTION_TYPE,# get_action_docs,enrich_actions)action_list=[]## -- START ACTION REGISTRY -- ##action_list.append(('mark_done',ACTION_TYPE.INSTANCE.value,STATUS.ALPHA.value))## -- END ACTION REGISTRY -- ### this is the abolsute path to the base of your app:# dj-actions uses this to locate your action directorybase='/code/example_app/'# convention over configuration# this will load your actions configurations frominitial_registry={"resource":"todo","basepath":"/todos/","actions":{}}ACTIONS=enrich_actions(base,initial_registry,action_list)Now you need to mixinactions.ActionViewsinto your ViewSet:fromrest_frameworkimportrouters,serializers,viewsetsfromactions.mixinsimportActionMixinfromactions.actions.action_registryimportACTIONSfromactions.modelsimportEventActionclassEventActionViewSet(ActionMixin,viewsets.ModelViewSet):queryset=EventAction.objects.all()serializer_class=TodoSerializeraction_registry=ACTIONSrouter=routers.DefaultRouter()router.register(r'todos',TodoViewSet)ConfigurationDJACTION_TRACK_ACTIONSifTruewill store action info in the db (default:True)DJACTION_TTL_MINUTESactions older than this will be archived (default 1 day (60*24))FeaturesReliable, simple pattern to execute complex logicSelf documentingToolingThis library provides you with some tools and tasks which might be useful:Stream,io (WIP)Push action information into stream.ioAirflow (WIP)Push downstream work to an airflow taskConceptsTask RegistryThe Task Registry provides a means of defining tasks in a self documenting way.
Based on the meta-data provided in the task registry, tasks will be exposed in various different ways
Package: djadmin_export
This Django application provides export functionality to all tables in Django’s admin.InstallationFirst, you need to install thedjadmin_exportmodule:Through pip:$ pip install djadmin_exportFrom sources:$ git clone git@github.com/rbarrois/djadmin_export.git
$ cd djadmin_export
$ python setup.py installActivationOnce you have installeddjadmin_export,
you need to activate it on your project.The simplest way is to add the following lines to yoururls.pyfile:fromdjadmin_exportimportregisterregister.auto_register_exporters()You must now declare, in yoursettings.pyfile, which exporter you wish
to install:ADMIN_EXPORTERS=('djadmin_export.exporters.xlsx.XLSXExporter',)DependenciesIn itself,djadmin_exportonly relies on a recent enough version ofDjango(1.8, 1.10 or 1.11).Each exporter may have specific dependencies:XLSXExporterrequires theopenpyxlpackageLinksIssues:https://github.com/rbarrois/djadmin_export/issues/Source code:https://github.com/rbarrois/djadmin_export/Doc:http://djadmin_export.readthedocs.org/PyPI:http://pypi.python.org/pypi/djadmin_export/
Package: dj-adminlte
# dj-adminlteAdminLTE Bootstrap Theme packaged for DjangoThis project is a fork of django-adminlte## About AdminLTEAdminLTE– is a fully responsive admin template. Based onBootstrap 3framework. Highly customizable and easy to use. Fits many screen resolutions from small mobile devices to large desktops. Check out the live preview now and see for yourself.Live Preview: http://almsaeedstudio.com/preview/
Package: dj-admin-plus
DJ Admin plusDJ Admin plus is a pluggable easy to use modern admin for Django framework.
It uses WordPress CMS inspired theme.You can easily convert your old Django admin interface in few steps.Unlike default Django admin, DJ Admin plus allows you to customize your navigations and icons.FeaturesPreview in image fieldBetter selection for Many To Many fieldsMedia library for file uploads like WordPress which let you choose files uploaded in the past.In build content editor (WYSWYG) with TinyMCECurrently, some admin features may be missing, we will add them too.Getting StartedPlease follow the documentation
athttps://tejmagar.github.io/dj-admin-plus/
Package: dj-admins-setting
This utility is based ondj-database-urlby Kenneth Reitz.It allows to utilize the12factorinspired environments variable to configure theADMINSemails list in a Django application.UsageImport the package insettings.py:importdj_admins_settingFetch your admins emails. The default option is fetch them fromADMINSenvironment variable:ADMINS=dj_admins_setting.config()Other option is parse an arbitrary emails list string:ADMINS=dj_admins_setting.parse('"Support" <support@email.com>, "Admins" <webmaster@email.com>')This will result in a list of tuples like:[('Support','support@email.com'),('Admins','webmaster@email.com')]CI statusDevelopment (master):
Package: djajax
# djajaxSome helper utilities for building Ajax applications without throwing out all the nicities of Django out the window (or moving wholesale to something like Django REST Framework).## Models### SerializableMixinA model mixin that gives an easy way to serialize a model or queryset to JSON.#### to_jsonDefault dictionary representation of a model that can later be converted to JSON. May be overriden in a model by defining `to_json` in the model.#### serialize (static method)Serializes a queryset/model into a JSON-ifable dictionary. Will paginate a queryset if necessary.## Template tags### jsonify filterOutputs a dictionary input a JSON object. Returns an empty obj if the template variable is empty.```html<script type="text/javascript">window.onload = function() {(function() {var djajaxJsonData = {{ json|jsonify }};console.log('djajaxJsonData', djajaxJsonData);})();}();</script>```### djajax_urls tagOutputs a dictionary of reverse lookups to urls for use in Javascript. Urls must be specified in DJAJAX_URL_REVERSE_LOOKUPS and must not need arguments.settings.py```pythonDJAJAX_URL_REVERSE_LOOKUPS = ['login','www:index',]```index.html```html<script src="{% static 'js/djajax.js' %}"></script><script type="text/javascript">window.onload = function() {(function() {var djajaxUrls = {% djajax_urls %};console.log('djajaxUrls', djajaxUrls);})();}();</script>```## HTTP responses### JsonHttpResponseReturns a JSON response with the correct headers set.## View helpers### is_idempotentReturns whether the request is idempotent (changes state on the server) or not.### responseReturns an appropriate AJAX response for an AJAX request.### get_from_post_or_getAttempts to first get a value from the POST query dictionary, and if that fails, to look at the GET querystring.
Package: djallin2
DJALLIN2A mildly configurable twitch noisemaker capable of responding to chat and point redemptions.Available through pip (djallin2) or as astandalone executablefor macOS and Windows.Note for Windows users, your antivirus will probably think it's a trojan.
It's not, but it kinda looks like one to your antivirus.
If you get the option to report a false positive, please do so.QuickstartWant!soundto just work?Download the latest build from thereleases tabDownload thequick config file, rename it toconfig.txtPlace your sounds in a folder called sounds, next to the app and configRun it, your browser will open to handle the initial Twitch connectionThis will happen every ~3 months as necessaryConfigurationconfig.txtholds your token and configures chat and point responders.Take a look at theexample configurationfor examples, and a detailed explanation for all settings.The following block defines a basic chat listener:[chat.sound]badges=['moderator','broadcaster','vip']target='./sounds/'command='!sound 'Mods, VIPs, and the broadcaster can use!sound xxxto play./sounds/xxx.mp3If badge and name filters are not supplied, anyone can use the command.
Therandomsetting enables random playback.
A value of2selects a random file from the directory.[chat.wisdom]target='./wisdom/'command='!wisdom'random=2Points rewards are similarly configured.
Set thenameto the name configured in your twitch rewards.
Arandomvalue of1enables therandomcommand where a random file will be selected if a user entersrandom.[points.sound]name='play a sound'target='./sounds/'random=1Alternatively, you can duplicate configurations using links.
Setting applied in the block with alinkstatement override settings in the linked responder.[points.sound]link='chat.sound'random=1command_modecan be used to define different match modes for thecommand.containsallows you to play a single file or randomly select from a directory when a message contains the command phrase.
Chat listeners are checked in alphabetical order and when one plays a sound, checks stop.[chat.z_cowboy]command='cowboy'command_mode='contains'target='./sound/yeehaw.mp3'Both point and chat blocks support custom code actions, check theexample configurationfor details.Playback statistics can be recorded to a sqlite3 database of your choice.
Simply addstats = trueto your configuration block.[chat.sound]target='./sounds/'command='!sound 'stats=trueThe name of the database can be changed by settingstats_db = 'database.sqlite'at the top of your configuration file.Known issuesIf a red screen shows when registering your twitch token, there may be a problem with your connection.
Close the soundbot and try again.TODO:ThisLet exit on fire be a configurable option?HTTP command receiver (lioran?)custom hook code - lioran example? obs websocket?Bits?Does linux support audio these days?https://inloop.github.io/sqlite-viewer/
Package: djamazing
Djamazing [d͡ʒəˈmeɪzɪŋ] offers a way to use S3+Cloudfront as Django Storage. It has the
benefit over conventional storages, that it generates signed URLs, so only the
user who was able to display the URL is also able to access it. Djamazing
can work in two modes:unprotected modeIn this mode the storage simply generates URL-s to cloudfront. The
cloudfront distribution should be publicly accessible. This can be used
for files that don’t require special security.protected modeThe URLs are signed in this model using theSECRET_KEY. These
signatures are only valid for the current user. Please remember that
it isup to the developerto ensure that the signed URLs are created
only when the user that can access them is logged in (some kind of
per-row authorization should probably be in place).  After clicking
these a special view redirects the user to a signed cloudfront URL.
This URL is only valid for a very small amount of time.AWS configurationCreate an S3 bucket.Generate a keypair for the user that can access the bucket.Create a cloudfront distribution that has origin in the bucket and is
restricted to signed URLs.(for protected mode) Generate a cloudfront keypair that can be used inthe distribution.InstallationInstall djamazing by pip:$ pip install djamazingNOTE: If you are usingdjamazingwith Django 1.10 you need a yet
unpublished version ofdjango-threadlocals:$ pip install git+https://github.com/nebstrebor/django-threadlocals.gitSet"djamazing.storage.DjamazingStorage"as your DEFAULT_FILE_STORAGE.Configure Djamazing:DJAMAZING = {
    'CLOUDFRONT_KEY': b"""-----BEGIN RSA PRIVATE KEY-----
(...)
-----END RSA PRIVATE KEY-----""",
    'CLOUDFRONT_KEY_ID': '...',
    'CLOUDFRONT_URL': 'http://....cloudfront.net/',
    'S3_KEY_ID': '...',
    'S3_SECRET_KEY': '...',
    'S3_BUCKET': '...',
    'SIGNATURE_TIMEOUT': datetime.timedelta(seconds=2),
}For unprotected mode omit theCLOUDFRONT_KEYandCLOUDFRONT_KEY_IDkeys.
If you want to store a cloudfornt key in the fileCLOUDFRONT_KEY_FILEparameter may be also used with file path.
Note that theSIGNATURE_TIMEOUTis the time that doesn’t require any human
interaction, only the browser to handle the redirection. If unspecified - it
defaults to 1.5 second.Add threadlocals middleware'threadlocals.middleware.ThreadLocalMiddleware'to yourMIDDLEWAREAdd djamazing URLs tourls.py:url(r'^djamazing/', include(djamazing.urls)),Using various configurations in one projectIf you want to use various configurations in one project (e.g. unprotected for
static file and protected for uploads), you can use inheritance. Create a
simple subclass ofDjamazingStoragelike:class StaticStorage(DjamazingStorage):
    """Storage for static files"""

    def __init__(self):
        super(StaticStorage, self).__init__(settings.STATIC_DJAMAZING)now you can use it as your storage like:STATICFILES_STORAGE = 'some.path.StaticStorage'
STATIC_DJAMAZING = { ... }and theSTATIC_DJAMAZINGconfiguration would overrideDJAMAZINGconfiguration for this storage.
Package: djambe
Djambe: Python Web Framework for the future.Welcome to Djambe, a Python web framework that allows you to use JSX expressions in your applications! With Djambe, you can build dynamic web applications using the Model-View-Controller (MVC) architecture and a SQLite database. InstallationTo install Djambe, use pip:pip install djambeUsageTo use Djambe in your application, you will need to create PyV (Python View) files that contain your JSX expressions. These PyV files will be rendered by the framework and sent to the client as HTML.Here is a simple example of a PyV file.<script>
  data = {
    "noun": "World"
  }
</script>To use the MVC architecture with Djambe, you will need to create separate PyV files for your views and controllers. Your controllers will handle the logic of your application and interact with the SQLite database, while your views will contain the JSX expressions that are rendered and sent to the client.For more information on using Djambe and its MVC architecture, please refer to the documentation:https://djambe.readthedocs.io/If you have any questions or need additional help, please don't hesitate to reach out to our support team atsupport@djambe.com.