Saravanan666/pypi-org huggingface dataset:
Package: dpytest
dpytestThis is a package to allow testing of discord.py.
It is only compatible with the rewrite version, and is still in alpha.
If using pytest, it is suggested to use pytest-asyncio for test running, otherwise the user will need
to provide their own async test runner.NoticeFor discord.py 1.7.X, usedpytest 0.5.3For discord.py 2.X.X, usedpytest>=0.6DocumentationDocumentation can be found atdpytest.readthedocs.io, including examples and tutorialsHistory0.7.0⚠️ Warning ⚠️:This can bebreaking:Theconfigurefunction has changed.
It nows accepts either anint(like in the previous version) OR alistofstringfor the parametersguilds,text_channels,voice_channelsandmembers.
But the names of the parameters had to be changed.num_guilds,num_text_channels,num_voice_channels,num_membersare DERECATED.Example:dpytest.configure(bot,guilds=["CoolGuild","LameGuild"],text_channels=["Fruits","Videogames"],voice_channels=2,members=["Joe","Jack","William","Averell"])Other changes:fixes in typingaddcontent_typetodict_from_attachment()0.6.8Test agains discord.py 2.30.6.7Fix bug in channel_historyFix issue #1110.6.6Support asyncio tasks that have no __name__0.6.5This release allows testing with Voice Channels.New :FakeVoiceChannelandFakeVoiceClientclasses implemetationNew testsChanges :create_channelmethod can create voice channel⚠️ Warning ⚠️:This can bebreaking:theconfigure()function DOESN'T take the keyword parameternum_channelsanymore, but instead :num_text_channelsandnum_voice_channels0.6.4Fix: edit message doesn't update message queueRefactorinit.py import to be explicit exports as per PEP 4840.6.3Update requirements for discord.py 2.2.20.6.2This is the version for discord.py 2.2.0Embed equality check now checks for equality of fields.Fix members factories to add the "flags" key (necessary in 2.2.0)0.6.1Linting0.6.0First version for working with dpytest>=2.X.X
Changes have been made in backend, factories, websocketChange the READMEChange the setup.py for python >= 3.8Changing in doc0.5.3Docs: Add vertical spacing for functions & methodsFix behaviour 'discord.Role.edit' with hoist, mentionable, etc.0.5.2Get member mentions by using the user ID in mention0.5.1NEW methods : Pins, get_user, & clear_reactionsfix utils functions imports0.5.0Remove the runner verification methods, replace them with verification builders0.4.0Rename simulate_reaction -> add_reaction and make it take a user to react as0.3.0unrealease (error when bumping version)0.2.0Merge hint files into .py filesUse typing export of Pattern0.1.1Add content type to attachmentsOverwrite _guild_needs_chunking (fix for asyncio wait_for errors)0.1.0Bump version (sould have done that with 0.0.23, since many changes have been commited)Bug fix with role_mentions=None being not iterable.0.0.23Support for discord.py 1.7.1Attachments allowed on messagesverify_embed without test fixedAdd members intentAdded more testing
Package: dpython
Dark PythonPatch python built-in functions and libraries!Create your own python!Do dangerous things in python you've never dreamed of!What it doespatch built-in function$ dpython config beautify.py# beautify.pyfrompprintimportpprintprint=pprintand just use$ dpythonas python command line for the rest of your life, everyprintis guaranteed to be pretty.patch any package, built-in or not$ dpython config troll_packages/randomrandom
└── __init__.py#__init__.pydefrandint(a,b):returnaAnd now ssh into some production server.$ sudo alias python3=dpythonand watch the world burn.Use caseCombined withthe forbidden fruit. You can do anything, including:Customize your python however you like. Are you a data scientist who find it impossible to do anything with python vanilla list? No problem! Extend built-in list with numpy array functionality!Patch a shit ton of python code without doing any refactoringCreate pythonpatch packagefor other packagesHow to usepip install dpythonBy default, pip creates command line shortcut$ dpython. If it does not work, (You're using stupid Windows or something), you can always use> python -m dpythondpythonby itself works exactly the same aspythoncommand line.e.g.:$ dpython test.pyrunstest.py$ dpythonopens interactive shell$ dpython -m my_moduleruns foldermy_moduleas a python moduledpython only has one reserved sub-command which is different from python:'config'. You can supply the following instructions:$ dpython config [something.py|folder]. Register either a single.pyfile or a folder containing a python package.In the case ofpyfile. The supplied file will effectively be executed prior to future$ dpythoncalls. You can call it a startup script.In the case of a package, imports in other code will use the supplied package instead of ones with duplicate names.You can register as many as packages as you like. But only one.pystartup script.$ dpython config inspect-scriptPrint the saved startup script$ dpython config clear-scriptReset the saved startup script$ dpython config inspect-packagePrint registered packages# example outputpatchpackages:
random
numpy
argparse$ dpython config clear-packageClear registered packages, won't delete real file.# example outputrandomremoved
numpyremoved
argparseremoved$ dpython -h|--helpto print helpMore Examplesexample 1# leEtH4ck3r.pyoldprint=printdefprint(*args,**kwargs):oldprint('Pwned  by Dark Python!!!')oldprint(*args,**kwargs)$ dpython register leEtH4ck3r.pyexample 2# ilovetqdm.pyfromtqdmimporttrangerange=trange$ dpython register ilovetqdm.pyMy Stupid Fantasies (todos)Write a package calledgwrapthat internally usesdpythonto extend built-inargparse.$ gwrap any_cmd_utility.pyAs long as the script usesargparse, gwrap will create a GUI, with check boxes replacing boolean arguments. Drop down menus replacing argument choices. Hovering tooltips for argument help. And store command history for autocompletion.Installdpythonon my coworkers computer, screw up the most usual functions likerange(),list(). Alias python=dpython just for fun.
Package: dpytils
dpytilsWhat is this?It is a package with basic utilities for a discord bot main in discord.py.How do I use it?To use it, simply import it, and initialize thedpytils.utils()class.fromdpytilsimportutilsutilities=utils()What utilities are there?Currently, only three.randcolor(),permsfromvalue(), andGuildConverter.randcolorThis function will return a random color (of type int) to be used for a discord embed, or anything else.permsfromvalueThis function will return another class, discordPermissions, which contains the following values.permsfromvalue.perms_rawThe raw discord permissions object fromdiscord.py.permsfromvalue.perms_trueA list of permission names that areTruefrom the given valuepermsfromvalue.perms_falseA list of permission names that areFalsefrom the given valuepermsfromvalue.perms_niceA nicely formatted string with a list of permissions, and emoji to show true/false.GuildConverterThis will attempt to convert whatever you give it to a guild object. You must pass both a context object, and a value to search for to it. Example:search_term="test ser"guild=awaitutils().GuildConverter(ctx,search_term)returnguild# <discord.Guild id=647392781730285629 name='bot testing server'>
Package: dpytools
dpytoolsCollection of easy to use, beginner friendly but powerful, orthogonal tools to speed up discord bots development (discord.py)FeaturesThe batteries of discord.pyEasy to read type-hinted codeActive developmentMinimal dependenciesInstalationInstall the latest version of the library with pip.pip install -U dpytoolsUseful links:DocumentationListof all the tools.F. A. Q.and examplesChangelogProject Homeon githubUse Examples:The library has a couple of reaction menus that are really easy to use.dpytools.menus.arrowstakes a list of embeds and displays it using a reaction menu.@bot.command()asyncdefarrow_menu(ctx):"""This command sends a list of embeds in a reaction menu with emojis aid in navigation"""fromdpytools.menusimportarrowslong_list_of_embeds=[discord.Embed(...),...]awaitarrows(ctx,long_list_of_embeds)There are multiple checks you can use directly on your commandsdpytools.checks.admin_or_rolestakes any number of strings (Role names) and ints  (role ID)
and checks if the person using the command has those roles or has administrator permissions.fromdpytools.checksimportadmin_or_roles@bot.command()@admin_or_roles('Moderator',123456789)asyncdefmoderation(ctx):ctx.send('Only admins and people with a a role named "Moderator" ''or with a role with id 123456789 can use this command')fromdpytools.checksimportany_checks@commands.guild_only()# This command must be called inside a server@any_checks# Place the decorator above the checks you with to compare using "OR"@commands.is_owner()# The command will run if ctx.author is the owner of the bot@commands.has_role('Admin')# __OR__ if ctx.author has the role "Admin"@bot.command()# this decorator transforms this function in a command any_checks must be above itasyncdeftest(ct):awaitctx.send('The command works')There are also multiple argument parsers. Functions that convert a user's input to something more useful.dpytools.parsers.to_timedeltatakes a string in the format<number>[s|m|h|d|w]and returns a timedelta objectfromdpytools.parsersimportto_timedelta@bot.command()@commands.guild_only()asyncdefmute(ctx,member:discord.Member,time:to_timedelta):awaitctx.send(f"{member.mention}muted for{time.total_seconds()}seconds")mute_role=ctx.guild.get_role(1234567890)awaitmember.add_roles(mute_role)awaitasyncio.sleep(time.total_seconds())awaitmember.remove_roles(mute_role)awaitctx.send(f"{member.mention}unmuted")This argument parsers can also be used outside the context ofdiscord.ext.commandsIn the end most of them only take a string and return the appropriate object.
Only converter classes that inherit fromdiscord.ext.commands.Converterrequire a command context to work.There are many other tools available in the library, check them indocs/All.mdTodos:Add interactionsStatus of the projectBeta.
All functions have been tested but new tools are frequently added.
Breaking changes may come depending on changes on API or discord.
Use in production only after extensive testing.ContributingFeel free to make a pull request or rise any issues.ContactMessage me on discord atChrisDewa#4552if you have any questions, ideas or suggestions.
Package: dpy-ui
discord.py UIAn extension package for anything relating to user input and interactions.Ever wanted to make a prompt for your users? Maybe a cool paginator?dpy-uiwill make it all happen in simple, easy to remember functions and classes.InstallationRequires Python 3.6+pip install -U dpy-uiDevelopment versionpip install -U git+https://github.com/Ikusaba-san/discord.py-ui.gitorgit clone git+https://github.com/Ikusaba-san/discord.py-ui.git
cd discord.py-ui
pip install -U .[voice]Then once it's installed, you can import it viafromdiscord.extimportuiQuick ExamplesPrompt the user for some inputname=awaitui.prompt(ctx,'What is your name?')awaitctx.send(f'Ok, your name is{name}')Choose between a list of choiceschoices=['red','blue','green','yellow']colour=awaitui.select(ctx,'What is your favo(u)rite colo(u)r?',choices)# Want buttons instead of text? No problem.choices=[ui.Choice('Very Happy',button='😄'),ui.Choice('Happy',button='🙂'),ui.Choice('Neutral',button='😐'),ui.Choice('Sad',button='😦'),ui.Choice('Very Sad',button='😢'),]feeling=awaitui.select(ctx,'How are you feeling today?',choices)Make a simple paginatordefsome_statements():foriinrange(20):yieldf'This is sentence{i}'defformat_page(page):returnf'This is a page\n{page}'paginator=ui.Paginator(some_statements(),page_formatter=format_page)awaitpaginator.start(ctx)# And to chunk it:defformat_chunk(chunk):# Formatters can return embeds tooreturndiscord.Embed(description='\n'.join(chunk))paginator=ui.Paginator.chunked(some_statements(),10,page_formatter=format_chunk)awaitpaginator.start(ctx)Make a custom sessionclassMySession(ui.Session):asyncdefsend_initial_message(self):returnawaitself.context.send('Say hi or click the thinking face.')@ui.button('🤔')asyncdefthink(self,payload):awaitself.context.send('Thinking a lot...')@ui.button('⏹')asyncdefquit(self,payload):awaitself.stop()@ui.command('hello|hi')asyncdefsay_hello(self,message):awaitself.context.send(f'Hello,{message.author.mention}!')session=MySession(timeout=120)awaitsession.start(ctx)
Package: dpy-utils
dpy-utilsAdiscord.pyutility library.WarningThis is a very early alpha version. There might be some unknown issues.Featurescustom Context with additional features likectx.askpatchedBotandAutoShardedBotclasses:use custom Contextautomatically loads token and prefix from.envfileautomatically loads cogs/extensions fromcogs/(can be modified through thecogs_pathargument)monkey_patch()to overwritediscord.pyclasses withdpy-utilsInstallationpip install dpy-utilsUsage.envTOKEN=token
PREFIX=?bot.pyimportosimportutilsfromdiscord.extimportcommandsutils.monkey_patch()bot:utils.Bot=commands.Bot()@bot.command()asyncdeftest(ctx:utils.Context):answer=awaitctx.ask("Do you like dpy-utils?")print(answer)bot.run()RequirementsPython >= 3.6pydanticpython-dotenvdiscord.pyContributing and IssuesIf you want to contribute or want to suggest additional features please usegithub issues.
Package: dq
dq.py - Python DataQuery=========================Provides the ability to query a data source made up of any combinationof lists and dicts.To use from within Python:```python>>> from dq import query>>> dq.query('[0].name', [{'name': 'michael'}, {'name': 'jane'}])'michael'>>> dq.query('..name', [{'name': 'michael'}, {'name': 'jane'}])['michael', 'jane']```Installation------------To install dq:```pip install dq```dq does not depend on any non-standard librariesQuery Language--------------The query language is a much simplified version of [json path][1]. The subsetis selected to allow for simple structural querying of data - no filters orexpressions. This keeps the parser nice and simple, and since its a Pythonlibrary you have the full power of Python to perform complex filters.The query language supports the following path syntax:```.key - Returns the given key from the dict..key - Returns the given key from any descendant dictionary[index] - Returns an item from a list at the specified index[*] - Returns all items in a list[start:stop:step] - Performs a python slice operation on a list```Query Examples--------------These syntax items can be combined to build complex queries.```python>>> from dq import query>>> d = {}>>> d['one'] = 1>>> d['two'] = [1,2,3,4,5,6,7,8,9,10]>>> d['three'] = [{'name': 'john'}, {'name': 'mary'}, {'one': 'guy'}]>>> query('.one', d)1>>> query('.two', d)[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]>>> query('.two[1]', d)2>>> query('.two[*]', d)[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]>>> query('.two[2:-2]', d)[3, 4, 5, 6, 7, 8]>>> query('.two[1:6:2]', d)[2, 4, 6]>>> query('.three[1].name', d)'mary'>>> query('.three[*].name', d)['john', 'mary']>>> query('..name', d)['john', 'mary']>>> query('..one', d)[1, 'guy']```Compiled Queries----------------When using the same query string repeatedly a CompiledQuery can be constructedto prevent parsing the query string multiple times:```python>>> from dq import compiled>>> query = compiled('[1]')>>> query([1,2,3,4])2>>> query([5,6,7,8])6```Thanks-------This library is based on the ideas and code from [python-jsonpath-rw][2].Copyright---------Copyright (c) 2013 Michael Lamb. See LICENSE.txt for details.[1]: http://goessner.net/articles/JsonPath/ "Json Path"[2]: https://github.com/kennknowles/python-jsonpath-rw "python-jsonpath-rw"
Package: dq3d
dq3dDual quaternion for 3d geometric operations.InstallationRunningpip install transformations dq3dshould work.macOSOn macOS, if you get an errorld: library not found for -lstdc++do the following. Go to/Library/Developer/CommandLineTools/Packages/and install the packagemacOS_SDK_headers_for_macOS_10.14.pkg. They try installing again.examplesSkinningThis example is a demonstration of skinning with Dual quaternion Linear Blending.SclerpThis example is a demonstration that interpolates between two randomly generated dual quaternions with ScLerp.ReferencesSkinning with Dual Quaternions
Package: dqa
DQAInstallationTo install with pypi, use:pip install dqaQuick StartOpen fileconfig.iniand set the following parameters:LOG_FILE_PATHandOUTPUT_DIRfor your environment. Next, open fileexample.pyand changefile_pathto point to your
(context) document. Note that this version currently only supports.docxfiles.If you want to pose predefined questions, setquestionsinconfig.inito your list of questions:questions = ['What is the subject?', 'Who bought the food?']If you want to pose questions interactively, setquestionsinconfig.inito None:questions = NoneTo runexample.py, use:python example.py
Package: dq-ai-module
DQAI (Data Quality Artificial Intelligence)This code provides a Python class calledDQAIthat utilizes the OpenAI Chat API to analyze a dataset and generate data quality rules specific to the data.UsageInstall the necessary dependencies.Set up your OpenAI API key or use the provided default key.Prepare your dataset in a suitable format (e.g., CSV).Instantiate theDQAIclass.Invoke theinvoke_from_datasetmethod, passing the dataset as input.The code will generate Python code based on the dataset and execute it.The generated rules and the results will be saved in the current directory as "generated_code.py" and "rulesapplication.csv," respectively.The generated rules can be obtained by calling the_get_rules_from_filemethod.Example:import pandas as pd
from dqai import DQAIRead the dataset from a CSV filepath = "path/to/your/dataset.csv"
data = pd.read_csv(path)Instantiate DQAI and generate data quality ruleskey = OPEN_AI_KEY
dqai = DQAI(key)
result = dqai.invoke_from_dataset(data)Access the generated rules and resultsrules = result["0"]
results_df = result["1"]
Package: dq-client
===============================Python client for dataquality.pl===============================.. image:: https://img.shields.io/pypi/v/dq_client.svg:target: https://pypi.python.org/pypi/dq-client.. image:: https://img.shields.io/travis/Algolytics/dq_client.svg:target: https://travis-ci.org/Algolytics/dq_client.. image:: https://readthedocs.org/projects/dq-client/badge/?version=latest:target: https://dq-client.readthedocs.io/en/latest/?badge=latest:alt: Documentation Status.. image:: https://pyup.io/repos/github/algolytics/dq_client/shield.svg:target: https://pyup.io/repos/github/algolytics/dq_client/:alt: UpdatesPython library which allows to use http://dataquality.pl in the easy way.* Free software: Apache Software License 2.0* Documentation: https://dq-client.readthedocs.io.Features--------* Full API client* Automatic encoding file conversionCredits---------This package was created by Algolytics_ dev team... _Algolytics: http://algolytics.com=======History=======0.2.0 (2016-03-05)------------------0.1.0 (2016-10-19)------------------* First release on PyPI.
Package: dqcsim
DQCsimDQCsim, short for Delft Quantum & Classical simulator, is aframeworkthat
can be used to tiecomponentsof quantum computer simulators together in astandardizedyetflexible,developer-friendly, andreproducibleway.
Clickherefor more information!InstallThe recommended method to install DQCsim is through Python's package manager:sudopip3installdqcsimThis installs DQCsim's core files and plugins. More information is available in
theInstallationsection of thedocumentation.Getting startedUsersNew users are encouraged to check out thedocumentation.Plugin developersPlugin developers can check out theexamples, existingpluginsand refer to the API documentation:Python(Reference)C++(Reference)C(Reference)Rust(Reference)PluginsFrontendPluginDescriptionDownloadLicensePlatformsLanguageopenqasmOpenQASM 2.0 frontendApache-2.0Linux, macOSRustcqasmcQASM 1.0 frontendApache-2.0Linux, macOSC++nullNo-op frontendApache-2.0Linux, macOSRustOperatorPluginDescriptionDownloadLicensePlatformsLanguageopenql-mapperOpenQL mapper operatorApache-2.0LinuxC++nullNo-op operatorApache-2.0Linux, macOSRustBackendPluginDescriptionDownloadLicensePlatformsLanguagequantumsimQuantumsim backendGPL-3.0Linux, macOSPythonqxQX backendApache-2.0Linux, macOSC++nullNo-op backendApache-2.0Linux, macOSRustiqsIntel QS backendApache-2.0Linux, macOSC++Please open a PR to have your plugin added to this list.Build and test from sourceSetupThe core of DQCsim is written in Rust. The crate defines a set of C-bindings to
support plugin development in other languages. DQCsim is distributed as abatteries includedPython package that includes the shared library and
headers for C and C++ plugin development.RequirementsRust(stable)Python support:Python(3.5+)SwigC/C++ tests:CMake(3.14+)Documentation:mdbookpdocDoxygenPythonTo build thedqcsimPython package:python3setup.pybdist_wheelThis builds a release wheel totarget/python/dist/. For debug builds set theDQCSIM_DEBUGenvironment variable.C/C++To build the C and C++ headers build thedqcsimRust crate with thebindingsfeature enabled:cargobuild--manifest-path=rust/Cargo.toml--features=bindingsThe generated headers are stored intarget/include.RustThedqcsimcrate can be built with the following (non-default) features:cli:  the command-line interface binarynull-plugins: the null (no-op) plugin binariesbindings: genertion of headers required for C, C++ and Python plugin
developmentTo build all targets and features:cargobuild--all-targets--all-featuresAdd--releasefor release builds.DocumentationTo build the documentation use theMakefilein thedocdirectory directly from the root of the repository:make-CdocDocumentation output is stored intarget/book.TestRustTo test all targets and features:cargotest--all-targets--all-featuresC/C++To test the C-bindings and C++ wrapper:mkdirbuildcdbuild
cmake..-DBUILD_TESTS=ON
makeCTEST_OUTPUT_ON_FAILURE=1maketestAdd-DCMAKE_BUILD_TYPE=DEBUGto CMake for debug builds.PythonTo test the Python package:python3setup.pybuildtest