Saravanan666/pypi-org huggingface dataset:
Package: diator
Diator - CQRS Library for PythonDocs|PyPIDiator is a Python library for implementing CQRS pattern in your Python applications. It provides a set of abstractions and utilities to help you separate your read and write concerns, allowing for better scalability, performance, and maintainability of your application.Features :bulb:Implements the CQRS pattern.Simple, yet flexible API.Supports multiple message brokers, such asRedis Pub/SubandAzure Service Bus.Supports various di-frameworks, such asdiandrodi.Easy to integrate with existing codebases.Installation :triangular_ruler:Install the Diator library withpippipinstalldiatorThere are also several installation options:To use Redis as Message Brokerpipinstalldiator[redis]Or Azure Service Buspipinstalldiator[azure]Simple Example :hammer_and_wrench:Minimal example of diator usage:importasynciofromdataclassesimportdataclass,fieldfromdiimportContainer,bind_by_typefromdi.dependentimportDependentfromdiator.eventsimportEventMap,Event,EventEmitterfromdiator.container.diimportDIContainerfromdiator.mediatorimportMediatorfromdiator.requestsimportRequest,RequestHandler,RequestMap@dataclass(frozen=True,kw_only=True)classJoinMeetingCommand(Request):meeting_id:intuser_id:intis_late:bool=field(default=False)classJoinMeetingCommandHandler(RequestHandler[JoinMeetingCommand,None]):def__init__(self,meeting_api)->None:self._meeting_api=meeting_apiself._events:list[Event]=[]@propertydefevents(self)->list[Event]:returnself._eventsasyncdefhandle(self,request:JoinMeetingCommand)->None:self._meeting_api.join(request.meeting_id,request.user_id)ifrequest.is_late:self._meeting_api.warn(request.user_id)defsetup_di()->DIContainer:external_container=Container()external_container.bind(bind_by_type(Dependent(JoinMeetingCommandHandler,scope="request"),JoinMeetingCommandHandler,))container=DIContainer()container.attach_external_container(external_container)returncontainerasyncdefmain()->None:container=setup_di()request_map=RequestMap()request_map.bind(JoinMeetingCommand,JoinMeetingCommandHandler)event_emitter=EventEmitter(event_map=EventMap(),container=container,message_broker=None)mediator=Mediator(request_map=request_map,event_emitter=event_emitter,container=container,)awaitmediator.send(JoinMeetingCommand(user_id=1,meeting_id=1,is_late=True))if__name__=="__main__":asyncio.run(main())Further reading :scroll:Udi Dahan - Clarified CQRSMartin Fowler - CQRSMarting Fowler - What do you mean by “Event-Driven”?Vlad Khononov - Learning Domain-Driven DesignVaughn Vernon - Really Simple CQRSLicenseThis project is licensed under the terms of the MIT license.
Package: diax
diaxThis is a python module for interacting with 3DIAX, Authentise’s 3D printing API. It’s public - we mostly just use it to test stuff.CHANGELOG1.21Update users service to come from data.authentise.com.Also allow non-JSON bodies in rawput and allow for disabling SSL1.20Add the model.py module which can upload models1.19Add the ability to PUT resources via the 3diax frontend script. This also means the ordering of arguments changed significantly for that script, but nobody uses this project so you’ll tolerate it1.18Fix mixing of async/await and yield1.17Fix a bug with finding users by email address where we always returned None1.16Add delete function to the commandline diax tool1.15Add support for custom root certificate authority bundle file to aioclient. Also add internal token authentication support to aioclient1.14Allow for custom headers in rawput, custom certificate authority bundle file1.13Add ‘rawdelete’ to the client for deleting resources1.12Fix bug with decoding event data stream1.11Add client.rawput so we can put to a full-formed URL/URI1.10Add response text to RequestError printout1.9Add users module and the ability to easily get a user by email address1.8Fix check for netloc1.7Don’t require more credentials when we have an internal token1.6Fail gracefully when we can’t validate parameters1.5Add support for token authentication, disabling SSL verification, and the ability to list resources from the CLI1.4Add support for synchronous generation of events to diax client via client.streamevents()1.3Add asyncio-based client. It’s experimental for now and not very complete1.2Add basic CLI with client-side validation for doing general operations with diax1.1Allow login, pull credentials from a well-known file1.0Initial release, does, literally, nothing.
Package: diax2
diaxThis is a python module for interacting with 3DIAX, Authentise’s 3D printing API. It’s public - we mostly just use it to test stuff.CHANGELOG1.22Updated requests version to 2.20.0.
Package is now called diax2 (Package diax is now deprecated).1.21Update users service to come from data.authentise.com.Also allow non-JSON bodies in rawput and allow for disabling SSL1.20Add the model.py module which can upload models1.19Add the ability to PUT resources via the 3diax frontend script. This also means the ordering of arguments changed significantly for that script, but nobody uses this project so you’ll tolerate it1.18Fix mixing of async/await and yield1.17Fix a bug with finding users by email address where we always returned None1.16Add delete function to the commandline diax tool1.15Add support for custom root certificate authority bundle file to aioclient. Also add internal token authentication support to aioclient1.14Allow for custom headers in rawput, custom certificate authority bundle file1.13Add ‘rawdelete’ to the client for deleting resources1.12Fix bug with decoding event data stream1.11Add client.rawput so we can put to a full-formed URL/URI1.10Add response text to RequestError printout1.9Add users module and the ability to easily get a user by email address1.8Fix check for netloc1.7Don’t require more credentials when we have an internal token1.6Fail gracefully when we can’t validate parameters1.5Add support for token authentication, disabling SSL verification, and the ability to list resources from the CLI1.4Add support for synchronous generation of events to diax client via client.streamevents()1.3Add asyncio-based client. It’s experimental for now and not very complete1.2Add basic CLI with client-side validation for doing general operations with diax1.1Allow login, pull credentials from a well-known file1.0Initial release, does, literally, nothing.
Package: diay
# Diay - a dependency injection library[![Build Status](https://travis-ci.org/anlutro/diay.py.svg?branch=master)](https://travis-ci.org/anlutro/diay.py)[![Latest version on PyPI](https://img.shields.io/pypi/v/diay.svg?maxAge=2592000)](https://pypi.org/project/diay)[![Licence](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)Diay is a [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection)/[inversion of control](https://en.wikipedia.org/wiki/Inversion_of_control) library for Python 3.5 and higher. It leverages the type hints introduced in 3.5 to allow you to easily call functions or construct classes that require specific types of objects to function.As an extremely basic and somewhat contrived example - the value of the library doesn't really come into play until you have fairly deeply nested dependencies - let's say you want to render a jinja2 template using some data from an API.```pythoninjector = diay.Injector()injector.set_instance(SomeConfigClass, my_config_object)@injector.providerdef make_jinja_environment() -> jinja2.Environment:return jinja2.Environment()@injector.providerdef make_api_client(config: SomeConfigClass) -> some.APIclient:return some.APIclient(config.api_token)def render(j2env: jinja2.Environment, apiclient: some.APIclient):data = apiclient.get('/some/data')template = j2env.get_template('some-template.html.j2', data=data)return template.render()html = injector.call(render)```
Package: diazotheme.bootstrap
Introduction============Plone theme based on Twitter Bootstrap 2.0Installation============Install the ``diazotheme.bootstrap`` product using the Add-on Control Panel.This will activate the theme and also setup Plone's default ``public.css``to only included when Diazo is enabled or when you are viewing the ThemingControl Panel. This theme includes its own ``public.css`` which had severalitems from the default ``public.css`` removed.Features=========* Turn your site into a pretty Bootstrap based theme, and also simplifiestemplating of customization addons.* Portlets are converted to ``div`` elements instead of ``dl``, ``dt``, ``dd``* ``presentation_view`` is enhanced with Google's HTML5 slides* Included carousel portlet provides a way to display images using Bootstrap'scarousel* ``Products.ContentWellPortlets`` is supported, however with some modifications.* PortletAboveContentA will appear full width right below logo* PortletAboveContentB will appear full width right below breadcrumbs* PortletAboveContentC will appear fluid width right above content centercolumn* PortletBelowContentA, PortletBelowContentB, PortletBelowContentC willappear as a 3 column portlet slots right below content and sidebar area* PortletBelowContentD will appear full width right belowPortletBelowContentA, PortletBelowContentB, and PortletBelowContentC* PortletBelowContentE will appear right below content center column* All PortletFooter will appear as a 6 column slot within the footer area* ``eea.facetednavigation`` is also supported, with some enhancements.* The diazo rules rewrite facetednavigation templates to take advantage ofthe responsive design.* If the first widget at the top widget slot is a text search widget, it willappear as a full width widget with a different background.* Installing ``webcouturier.dropdownmenu`` will enhance the top navigation withdropdown menus.Using Bootstrap javascripts===========================This product leaves plone jquery alone not to break existing functionality.But bootstrap requires a newer jQuery version. We include the needed one renaming it to jQuery17.If you need js functionality from bootstrap you have to use jQuery17, for instance$(function() {jQuery17('.tooltipped').tooltip()});to activate the tooltip plugin on elements with the class "tooltipped".Changelog=========0.3 (2012-10-13)----------------- Include Plone's site scripts0.2 (2012-07-27)----------------- added PortletBelowContentE right below the main content- remove styling that cause listitem to be greyish0.1 (2012-07-24)------------------Initial Pypi release
Package: dibrowse
dib (Directory Interactive Browse)The CLI commandThe idea behinddibis to create a command that will interactively browse and navigate the linux system through the terminal. The tool is meant for developers to use to make their everyday terminal navigation easier. The program will use the python libcursesto take over the terminal and create a visual list of the search term the user inputs.InstallClone this repository and navigate to the cloned foldercd dib.Create a virtual environment or install directly to you machine withpip install -e ".[dev,test]"Try the command:dib --versionUsage'dib cd'Using thecdcommand is pretty straight forward to say the least. To enter the script just enterdib cdin the terminal. See below.'dib ls'Using thelscommand works the same asdib cdin the core, except it mimics the classiclscommand with--alland--listflags. See below.'dib find'Using thefindcommand looks for either a file or directory depending on what argument is specified after the--typeflag. Using 'f' for 'file' and 'd' for 'directory'. See below
Package: dibug
dibugDebugging Tool for discord.pyInstallationPython 3.10+ is requiredpipinstalldibugUsagefromdiscordimportClient,Intents,MessagefromdibugimportDibuggerowners=[1234567890]# owners idasyncdefuser_has_perm(msg:Message)->bool:returnmsg.author.idinownersintents=Intents.default()intents.message_content=True# dibug requires message content intentbot=Client(intents=intents)Dibugger.attach(bot,user_has_perm)bot.run("token")CommandsDefault Prefix:!dbg<prefix>|<prefix> info | i: Show bot info<prefix> eval | e | python | py <code>: Evaluate python code<prefix> kill | k | shutdown: Kill bot process<prefix> shell | sh <code>: Execute shell command
Package: dic
dicDependency Injection Container for Python 3+ influenced partially byAutofac. dic aims to be a tiny “out of the way” framework to help
realise IoC via dependency injection. dic uses Python 3 annotations to provide hints for the components that should be injected.Documentationdic documentation is available viaRead the Docs.Installdic is available via pip:pip install dicFeaturesCurrently, dic supports:Constructor injection for classesFactory and Lazy relationshipsRegistration via:Constructor matching for a registered classCustom callbackPre-created instancesLifetime scopes:Instance per dependencySingle instanceQuick ExampleA quick example on how to use dic:import dic

class SimpleThing(object):
    def say(self, message):
        print(message)

class RequiresThing(object):
    def __init__(self, thing: SimpleThing):
        self.thing = thing

    def say(self, message):
        self.thing.say(message)

# build the container
builder = dic.container.ContainerBuilder()

builder.register_class(SimpleThing)
builder.register_class(RequiresThing, component_scope=dic.scope.SingleInstance)

container = builder.build()

# use the container

# Note there'll only be one of these due to SingleInstance scoping during build
x = container.resolve(RequiresThing)
x.say("my message")Relationshipsdic supports basic relationships:dic.rel.Lazy- don’t create the dependency until it’s first useddic.rel.Factory- the component wants to create other components. Lifetime scopes are respected. Supports custom arguments.Using a factory:import dic

class SimpleThing(object):
    def __init__(self, special_argument):
        self.special_argument = special_argument

class BuildsThings(object):
    def __init__(self, thing_factory: dic.rel.Factory(SimpleThing)):
        self.thing_factory = thing_factory

    def build_me_a_thing(self):
        # builds a new thing using the injected factory
        # Note that custom arguments can be provided here
        self.thing_factory(special_argument="My super special argument")

# build the container
builder = dic.container.ContainerBuilder()

builder.register_class(SimpleThing)
builder.register_class(BuildsThing)

container = builder.build()

# use the container

x = container.resolve(BuildsThing)

# use it
thing = x.build_me_a_thing()
# ...FAQIs dic thread-safe?Yes.dic.rel.Lazyanddic.container.Container.resolve()are thread-safe. As a result, do not store the component_context given toregister_callbackcallbacks,
as thread-safety is enforced at the container.resolve() level.Can I define my own scopes?Yes. Derive a scope fromdic.scope.Scope. Scopes can be used to provide lifetime for a calling thread, for example
Package: dicebear-cli
DiceBear PIP CLIdicebearis a CLI forhttps://pypi.org/project/dicebear.
Using this CLI you can get avatars for your program (to get customised avatars use the wrapper instead).For an example go toexamples/dicebear.sh.Useful linksDicebear API wrapper:https://pypi.org/project/dicebear/Dicebear pip CLI:https://pypi.org/project/dicebear-cli/Dicebear API wrapper GitHub:https://github.com/jvherck/dicebearDicebear:https://dicebear.comHow to installRunpip install dicebear-cliIf that doesn't work trypy -m pip install dicebear-cliUsageIt can quickly create one or more avatars at a time but it can't take options.dicebear--helpdicebearcreate--helpdicebearcreateavataaars-s"John Apple"-fsvgStylesAll the possible avatar styles.https://avatars.dicebear.com/stylesadventureradventurer-neutralavataaarsbig-earsbig-ears-neutralbig-smilebotttscroodlescroodles-neutralidenticoninitialsmicahminiavsopen-peepspersonaspixel-artpixel-art-neutralFormatsThese are the only supported formats.pngsvgCreditsSpecial thanks toDiceBear(Florian Körner)
for making this amazing API and to all artists that helped
making avatars!Licenses and privacy policyDicebearLicenses:https://avatars.dicebear.com/licensesDicebearPrivacy Policy:https://avatars.dicebear.com/legal/privacy-policyDicebear Python CLI (this project):https://github.com/jvherck/dicebear/blob/main/LICENSE
Package: dicebox
diceboxA simple dsl for dice.>>>importpandasaspd>>>fromdiceboximportd>>> d(100) + 5
<DiceExpr(1d100 + 5)>>>>str(d(6)+d(6))==str(d({6:2}))==str(d(6,6))=="(2d6)"True>>> d(8, 6, 6, 6) // 2
<DiceExpr((1d8 + 3d6) // 2)>>>> d({8: 1, 6: 3})
<Dice(1d8 + 3d6)>>>> d(10) + 5 + (d(20) + d(8))
<DiceExpr(1d10 + 5 + 1d8 + 1d20)>>>>d(20).adv.roll(2)array([17,17])>>>n=100000>>>adv=(pd.Series(d(20).adv.roll(n)).value_counts().sort_index()/n)>>>disadv=(pd.Series(d(20).disadv.roll(n)).value_counts().sort_index()/n)>>>norm=(pd.Series(d(20).roll(n)).value_counts().sort_index()/n)>>> (d(20).adv - d(20).disadv) * 2
<DiceExpr((adv(1d20) - disadv(1d20)) * 2)>todo:pdist (incl composability)roll loggingbetter expr collapse (sympy?)better DiceExpr str renderingDiceExpr.parsevisual output (w/ scavegr)>>>fromdicebox.dndimportattack_roll_factory,critical_roll>>>rapier_attack=attack_roll_factory("Rapier",d(8)+4,3)>>>rapier_sneak_attack=attack_roll_factory("Rapier",d(8,6,6,6)+4,3)>>>rapier_assassinate_attack=attack_roll_factory("Rapier",critical_roll(d(8,6,6,6)+4),3,critical_hits=False)>>> for i in range(20):
>>>    print(rapier_assassinate_attack(adv=True))
Rapier: 17 to hit (adv(1d20) + 3); 39 damage (2d8 + 6d6 + 4)
Rapier: 17 to hit (adv(1d20) + 3); 36 damage (2d8 + 6d6 + 4)
Rapier: 12 to hit (adv(1d20) + 3); 25 damage (2d8 + 6d6 + 4)
Rapier: 21 to hit (adv(1d20) + 3); 37 damage (2d8 + 6d6 + 4)
Rapier: 10 to hit (adv(1d20) + 3); 32 damage (2d8 + 6d6 + 4)
Rapier: 22 to hit (adv(1d20) + 3); 36 damage (2d8 + 6d6 + 4)
Rapier: 17 to hit (adv(1d20) + 3); 37 damage (2d8 + 6d6 + 4)
Rapier: 14 to hit (adv(1d20) + 3); 29 damage (2d8 + 6d6 + 4)
Rapier: 10 to hit (adv(1d20) + 3); 39 damage (2d8 + 6d6 + 4)
Rapier: 15 to hit (adv(1d20) + 3); 37 damage (2d8 + 6d6 + 4)
Rapier: 23 to hit (adv(1d20) + 3); 27 damage (2d8 + 6d6 + 4)
Rapier: 8 to hit (adv(1d20) + 3); 36 damage (2d8 + 6d6 + 4)
Rapier: 15 to hit (adv(1d20) + 3); 31 damage (2d8 + 6d6 + 4)
Rapier: 20 to hit (adv(1d20) + 3); 38 damage (2d8 + 6d6 + 4)
Rapier: 12 to hit (adv(1d20) + 3); 34 damage (2d8 + 6d6 + 4)
Rapier: 15 to hit (adv(1d20) + 3); 31 damage (2d8 + 6d6 + 4)
Rapier: 18 to hit (adv(1d20) + 3); 35 damage (2d8 + 6d6 + 4)
Rapier: 14 to hit (adv(1d20) + 3); 41 damage (2d8 + 6d6 + 4)
Rapier: 21 to hit (adv(1d20) + 3); 38 damage (2d8 + 6d6 + 4)
Rapier: 19 to hit (adv(1d20) + 3); 34 damage (2d8 + 6d6 + 4)>>> turn = [rapier_sneak_attack(), rapier_attack()]
>>> print("\n".join(turn))
Rapier: 19 to hit (1d20 + 3); 9 damage (1d8 + 3d6 + 4)
Rapier: 9 to hit (1d20 + 3); 5 damage (1d8 + 4)
Package: dice-cli
DICE Command Line Interface (CLI)InstallationThe best way to installdice-cliis viapipx.
This will setup a separatevirtualenvfordice-clipreventing interference with your normal Python setup.pipxinstalldice-cliFor tab-completion of the DICE CLI, you can rundice--install-completionwhich will install the completion for your shell.Should you be using a "non-standard" shell, you can check what will be installed throughdice--show-completionDevelopmentDevelopment cycledice-clihas a direct, tight dependency ondice-lib.
New features are usually developed withindice-clifirst, and then common functionality is moved todice-lib.Code layoutCLI commands are currently grouped into two categories:adminanduser.
All categories, except foruserneed to be placed in their respective folders.
Each category should use its own logging and error handling to allow for individual tuning.Main commands are implemented directly into<category>/__init__.py, e.g.dice admin scan_groups_and_users, while subcommands should be placed in<category>/<command>/__init__.py, e.g.dice job why_is_my_job_not_running.Should a command require extensive logic, it should be placed in its own file , e.g.admin/_print_used_id_ranges.py. This will be the main point of change when things move todice-lib.Snapshot (2022.02.17):src/dice_cli/
├──__init__.py
├──_io
│├──__init__.py
│└──_csv.py
├──admin# `dice admin` category│├──__init__.py
│├──_print_unused_id_ranges.py# main command functionality for `dice admin print_unused_id_ranges`│├──_print_used_id_ranges.py
│├──_scan_groups_and_users.py
│└──report# all `dice admin report` commands│├──__init__.py
│├──__pycache__
│├──_consistency_check_grid.py
│├──_inventory.py
│├──_network.py
│└──_storage.py
├──benchmark
│├──__init__.py
├──docs
│├──__init__.py
├──fs# user command example: `dice fs`│├──__init__.py
│└──_copy_from_local.py
├──info
│├──__init__.py
├──job
│├──__init__.py
├──logger.py
├──main.py
└──py.typedLocal installationcondacreate-ndicepython=3.8
condaactivatedice# make sure to have the latst pippipinstall-Upip# install dice-clipipinstall-e.
Package: dice-climate-simulator
climate-moduleSimulation routines for generic DICE model: climate moduleThe generic DICE climate module includes:python implementation of climate module from Hansel et al. (2020)dynamic non-CO2 radiative forcings per SSP scenarioSimulation routines include:temperature pathways for given SSP(x) net CO2 emissions (FFI & AFOLU)concentration pathways for given SSP(x) net CO2 emissions (FFI & AFOLU)Install$ pip install dice-climate-simulatorUsageUsage: dice-climate-simulator -e <emissions> -r <ratio> -f <folder>

Options:
-e, --emissions SSP         SSP scenario
-r, --ratio Z               Non-CO2 to CO2 forcings ratio estimate Z
-f, --folder PATH           PATH to folder with SSP(x) net CO2 emissions pathways
-h, --help                  Print command helpSimulation examplesgenerate climate pathways for CO2 emissions in SSP2 scenariodice-climate-simulator -e SSP2 -r avg -f net-emissions-folderresults saved to climate/scenario SSP2/temperature change (other_rf avg).csv
and climate/scenario SSP2/concentration (other_rf avg).csvgenerate climate pathways for emissions pathway from Hansel et al. (2020)dice-climate-simulator -e hansel2020results saved to climate/hansel2020/temperature change (other_rf avg).csv
and climate/scenario hansel2020/concentration (other_rf avg).csvReferences[1] Hansel, M., Drupp, M., Johansson, D., Nesje, F., Azar, C., Freeman, M., Groom, B., & Sterner, T. (2020). Climate Economics Support for the UN Climate Targets. Nature Climate Change, 10: 781-789.
https://doi.org/10.1038/s41558-020-0833-xDocumentationAPI docsLicenseCopyright © 2022 International Institute for Applied Systems AnalysisLicensed underMIT
Package: dicekey
DicekeyDicekey is aDicewaresimple Python passphrase generator.Quick StartClone the repository:git clone https://git.krislamo.org/kris/dicekeyInstall dependencies:sudo apt-get install python-tkCreate a virtual environment:python3 -m venv .venvActivate the virtual environmentsource .venv/bin/activateInstall package:pip install -e .Rundicekeyand optionally specify a length, i.e.,dicekey 7Copyrights and LicensesCopyright (C) 2016, 2023  Kris LamoureuxAll Dicekey
code isFree Softwarereleased under theGNU General Public
Licenseas published
by the Free Software Foundation, version 3 of the License.Copyright (C) 2001  Arnold G. Reinhold, Cambridge, Massachusetts USA.A G Reinhold licenses its rights to the English Diceware Wordlist under theCreative Commons CC-BY 3.0license.
Package: dice-maiden-ui
dice-maiden-uiPython app which helps to generate roll commands for thedice maiden discord app.You create a configuration file listing the details of your commands. When running the app, you select your configuration file
which will generate the UI.Before selecting the command you'd like to roll, select any options for the roll.
Then upon clicking a command button, the generated roll will be automatically copied to your clipboard.Installing the apppip install dice-maiden-uiRunning the appEnsure you've created your configuration file - see theconfiguration setup doc.Run the app with eitherdice_maiden_uiorpython -m dice_maiden_uiIn the top left, clickOpenand find your configuration file from step 1