Saravanan666/pypi-org huggingface dataset:
Package: destructify
Destructify is a Pythonic and pure-Python 3 method to express binary data, allowing you to read and write binary
structures. You simply specify a structure by creating a class as follows:classExampleStructure(destructify.Structure):some_number=destructify.IntegerField(default=0x13,length=4,byte_order='little',signed=True)length=destructify.IntegerField(length=1)data=destructify.FixedLengthField(length='length')Now you can parse your own binary data:example=ExampleStructure.from_bytes(b"\x01\x02\x03\x04\x0BHello world")print(example.data)# b'Hello world'Or write your own data:example2=ExampleStructure(data=b'How are you doing?')print(bytes(example2))# b'\x13\x00\x00\x00\x12How are you doing?'DocumentationDocumentation for Destrucify is available athttps://destructify.readthedocs.io/en/latest/or in thedocs/directory.InstallationDestructify is available at the Python Package Index:pip install destructifyContributingSince Destructify is an open source project, contributions of many forms are welcomed. Examples of possible
contributions include:Bug patchesNew featuresDocumentation improvementsBug reports and reviews of pull requestsWe use GitHub to keep track of issues and pull requests. You can alwayssubmit an issuewhen you encounter something out of the ordinary.
Package: destructipy
destructipyes6 style dict/object destructure for pythoninstall:$ pip install destructipyusage:# must import this way...fromdestructipyimport_asds# support dictsabcd={'a':1,'b':2,'c':3,'d':4}# ds.i()/ds.item() - using operator.itemgetter# dict safe, will probably raise error if not dictd,c,\b,a=ds.i(abcd)print(a,b,c,d)# func can be named however you wish...fromdestructipyimport_asunpack# supports objectsclassABCD:a=1b=2abcd=ABCD()abcd.c=3abcd.d=4# unpack.a()/unpack.attr() - using operator.attrgetter# notice: dicts can also be passed but it will get their attributes, not items)d,c,\b,a=unpack.a(abcd)print(a,b,c,d)fromdestructipyimport_asdsabcd_dict={'a':1,'b':2,'c':3,'d':4}classABCD:a=5b=6abcd_obj=ABCD()abcd_obj.c=7abcd_obj.d=8# ds() - auto decide if it's dict or object# good for one time or mixed dict-object/small lists# got minor performance penalty, see benchmark belowd,c,b,a=ds(abcd_dict)print(a,b,c,d)d,c,b,a=ds(abcd_obj)print(a,b,c,d)caveats:Does not work on the Interactive Python Console (no source to analyze...)If you plan to compile your.pyto.pycand delete the source, run$ python -m destructipyin your project root to create.destructipycache file before doing soIt is recommended to place aimport destructipyon your project init for destructipy to keep the initial cwd (current working directory), just incase you switch the cwd later on usingos.chdiror such...using sys._getframe which is only implemented at CPython. tested on 2.7 and 3.8benchmark:$ python benchmark.py

9 iterations:
regular   : 0:00:00.000009
ds        : 0:00:00.000100
ds.i/ds.a : 0:00:00.000024

99 iterations:
regular   : 0:00:00.000020
ds        : 0:00:00.000066
ds.i/ds.a : 0:00:00.000061

999 iterations:
regular   : 0:00:00.000164
ds        : 0:00:00.000568
ds.i/ds.a : 0:00:00.000521

9999 iterations:
regular   : 0:00:00.001409
ds        : 0:00:00.005194
ds.i/ds.a : 0:00:00.004448

99999 iterations:
regular   : 0:00:00.011635
ds        : 0:00:00.045619
ds.i/ds.a : 0:00:00.040462

999999 iterations:
regular   : 0:00:00.104921
ds        : 0:00:00.396913
ds.i/ds.a : 0:00:00.377507

9999999 iterations:
regular   : 0:00:01.034074
ds        : 0:00:03.985506
ds.i/ds.a : 0:00:03.883992

99999999 iterations:
regular   : 0:00:10.758053
ds        : 0:00:46.962093
ds.i/ds.a : 0:00:45.535044

999999999 iterations:
regular   : 0:02:00.999255
ds        : 0:08:04.748202
ds.i/ds.a : 0:07:42.837535
Package: desuko
DesukoThis repository is archived.Please check outdiscord.ext.tasksas a replacement.Desuko is an extensible Discord bot, written in Python & Pycord.Features:Hackable: Desuko aims to keep the code clean and intuitive.Extensible: Desuko can be extended by various modules.Fully configurable: Everything can be configured via YAML.Async-friendly: Desuko support asyncronious functions out of the box.Getting startedFirst steps:Installation- Install & run a basic version of Desuko.Configuration- Configurate your Desuko usingdesuko.yaml.Modules:Hello, Desuko!- "Hello, World!" module for DesukoHandlers and subscribers- Handlers and subscribers usage for building event-driven bots
Package: desurveil
desurveil is a cryptography program with support for key pair
generation and encrypting and decrypting with RSA, OAEP, and arbitrary
data lengths.desurveil is both a command line tool and a Python module. It requires
Python 3.1+.Licensedesurveil is free software under the terms of the GNU Affero General
Public License version 3 (or any later version, see fileCOPYING.txtor webpagehttp://gnu.org/licenses/agpl.htmlfor full
license). The author of desurveil is Niels G. W. Serup, contactable atngws@metanohi.name. This is version 0.1.1 of the program.InstallationIt is not strictly necessary to install desurveil to use it if you
only plan to use it as a command line tool. It is still recommended,
though. To install it, run:python3 setup.py installYou must be a superuser to do this.Use as command line toolIf you have installed desurveil, run:desurveil COMMAND [OPTION]... [INPUT FILE]...Else, run this:python3 scripts/desurveil COMMAND [OPTION]... [INPUT FILE]...To see how to interact with desurveil, run:desurveil --helpUse as Python moduleWhen desurveil has been installed, it can be used just like any other
Python module. To see which functions and classes are available and
usable, run:pydoc3 desurveilAnd also:pydoc3 desurveil.basemath
pydoc3 desurveil.primes
pydoc3 desurveil.oaep
pydoc3 desurveil.keypair
pydoc3 desurveil.utilityThese can be imported with simpleimportstatements.DevelopmentDevelopment takes place with Git. To get the latest branch, download
it from gitorious.org:$ git clone git://gitorious.org/desurveil/desurveil.gitLogoThe logo (logo.svg) has been released into the public domain.This documentCopyright (C) 2011 Niels G. W. SerupCopying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.  This file is offered as-is,
without any warranty.
Package: desuwa
DesuwaFeature annotator to morphemes and phrases based on KNP rule files (pure-Python)Quick StartDesuwa exploitsJuman++outputs.$pipinstalldesuwa$echo'歌うのは楽しいですわ'|jumanpp|desuwa+	["&表層:付与", "連体修飾", "用言:動"]歌う うたう 歌う 動詞 2 * 0 子音動詞ワ行 12 基本形 2 "代表表記:歌う/うたう ドメイン:文化・芸術;レクリエーション"	["タグ単位始", "形態素連結-数詞", "固有修飾", "活用語", "文頭", "文節始", "Ｔ連体修飾", "ドメイン:文化・芸術;レクリエーション", "Ｔ固有付属", "内容語", "Ｔ固有末尾", "自立"]+	["受けNONE", "外の関係", "形副名詞", "助詞", "Ｔ連用", "ハ", "タグ単位受:-1"]の の の 名詞 6 形式名詞 8 * 0 * 0 NIL	["タグ単位始", "Ｔ動連用名詞化前文脈", "形態素連結-数詞", "固有修飾", "形副名詞", "特殊非見出語", "名詞相当語", "Ｔ固有付属", "付属", "内容語", "Ｔ固有末尾"]は は は 助詞 9 副助詞 2 * 0 * 0 NIL	["形態素連結-数詞", "固有修飾", "Ｔ固有付属", "付属", "Ｔ固有末尾"]+	["&表層:付与", "用言:形", "連体修飾", "助詞"]楽しい たのしい 楽しい 形容詞 3 * 0 イ形容詞イ段 19 基本形 2 "代表表記:楽しい/たのしい"	["タグ単位始", "形態素連結-数詞", "固有修飾", "活用語", "文節始", "Ｔ連体修飾", "Ｔ固有付属", "内容語", "Ｔ固有末尾", "自立"]です です です 助動詞 5 * 0 無活用型 26 基本形 2 NIL	["形態素連結-数詞", "固有修飾", "活用語", "Ｔ連体修飾", "Ｔ固有付属", "付属", "Ｔ固有末尾"]わ わ わ 助詞 9 終助詞 4 * 0 * 0 NIL	["形態素連結-数詞", "固有修飾", "文末", "表現文末", "Ｔ固有付属", "付属", "Ｔ固有末尾"]EOS$echo'歌うのは楽しいですわ'|jumanpp|desuwa|desuwa--predicate歌う	歌う/うたう	1	動楽しいですわ	楽しい/たのしい	1	形$echo'歌うのは楽しいですわ'|jumanpp|desuwa--segment歌う│のは│楽しいですわNoteDesuwa is currently confirmed to work with the following rule files.mrph_filter.rulemrph_basic.rulebnst_basic.ruleLicenseApache License 2.0 except for rules files indesuwa/knp_rulesimported fromKNP
Package: det
LLM Response Analysis FrameworkWelcome to a LLM Response Analysis Framework! This tool is designed to dive deep into the heart of Language Models (LLMs) and their intriguing responses. Designed for researchers, developers, and LLM enthusiasts, the framework offers a way to examine the consistency of Large Language Models and Agents build on them.Features|Screenshots|Getting Started|DevelopmentFeaturesDynamic LLM IntegrationSeamlessly connect with various LLM providers and models to fetch responses using a flexible architecture.Semantic Similarity CalculationUnderstand the nuanced differences between responses by calculating their semantic distances.Diverse Response AnalysisGroup, count, and analyze responses to highlight both their uniqueness and redundancy.Rich PresentationUtilize beautiful tables and text differences to present analysis results in an understandable and visually appealing manner.ScreenshotsBelow are some screenshots showcasing the framework in action:GPT-3.5 ExampleGPT-4 ExampleThese visuals provide a glimpse into how the framework processes and presents data from different LLM versions, highlighting the flexibility and depth of analysis possible with this tool.Getting StartedPrerequisitesEnsure you have Python 3.10 or higher installed on your system.InstallationInstalldetusing pip:pip install detConfigurationBefore usingdet, configure your LLM and embeddings provider API keysexport OPENAI_API_KEY=sk-makeSureThisIsaRealKeyBasic UsageTo get a list of all the arguments and their descriptions, use:det --helpa basic analysis of OpenAI's gpt3.5-turbo modeldet --iterations 2 --llm-provider OpenAI --llm-model gpt-3.5-turbo --embeddings-provider OpenAI --embeddings-model text-embedding-ada-002DevelopmentDocumentationThe documentation is in the module headings. I'll probably move it out at some point but that's good for now :)Support and ContributionFor support, please open an issue on the GitHub repository. Contributions are welcome.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: detach
Fork and detach the current process.[![Build Status](https://travis-ci.org/BlueDragonX/detach.svg)](https://travis-ci.org/BlueDragonX/detach)UsageThedetachpackage contains a context manager calledDetach. It is used
with withwithstatement to fork the current process and execute code in that
process. The child process exits when the context manager exits. The following
parameters may be passed toDetachto change its behavior:stdout- Redirect child stdout to this stream.stderr- Redirect child stderr to this stream.stdin- Redirect his stream to child stdin.close_fds- Close all file descriptors in the child excluding stdio.exclude_fds- Do not close these file descriptors if close_fds isTrue.daemonize- Exit the parent process when the context manager exits.Examples### Simple Fork with STDOUTimport detach, os, syswith detach.Detach(sys.stdout) as d:if d.pid:print(“forked child with pid {}”.format(d.pid))else:print(“hello from child process {}”.format(os.getpid()))### Daemonizeimport detach
from your_app import maindef main():“””Your daemon code here.”””with detach.Detach(daemonize=True) as d:if d.pid:print(“started process {} in background”.format(pid))else:main()### Call External Commandimport detach, sys
pid = detach.call([‘bash’, ‘-c’, ‘echo “my pid is $$”’], stdout=sys.stdout)
print(“running external command {}”.format(pid))LicenseCopyright (c) 2014 Ryan Bourgeois. This project and all of its contents is
licensed under the BSD-derived license as found in the included [LICENSE][1]
file.[1]:https://github.com/bluedragonx/detach/blob/master/LICENSE“LICENSE”
Package: detach3k
DetachFork and detach the current process.UsageThedetachpackage contains a context manager calledDetach. It is used
withwithstatement to fork the current process and execute code in that
process. The child process exits when the context manager exits. The following
parameters may be passed toDetachto change its behavior:stdout- Redirect child stdout to this stream.stderr- Redirect child stderr to this stream.stdin- Redirect his stream to child stdin.close_fds- Close all file descriptors in the child excluding stdio.exclude_fds- Do not close these file descriptors if close_fds isTrue.daemonize- Exit the parent process when the context manager exits.ExamplesSimple Fork with STDOUTimport detach, os, sys

with detach.Detach(sys.stdout) as d:
    if d.pid:
        print("forked child with pid {}".format(d.pid))
    else:
        print("hello from child process {}".format(os.getpid()))Daemonizeimport detach
from your_app import main

def main():
    """Your daemon code here."""

with detach.Detach(daemonize=True) as d:
    if d.pid:
        print("started process {} in background".format(pid))
    else:
        main()Call External Commandimport detach, sys
pid = detach.call(['bash', '-c', 'echo "my pid is $$"'], stdout=sys.stdout)
print("running external command {}".format(pid))LicenseCopyright (c) 2014 Ryan Bourgeois. This project and all of its contents is
licensed under the BSD-derived license as found in the includedLICENSEfile.
Package: detache
DÃ©tachÃ©=======DÃ©tachÃ© is a framework for creating productive and efficient Discord bots, built off of`discord.py <http://github.com/Raptzz/discord.py/>`_.With DÃ©tachÃ©, you can easily create bots without sacrificing direct access to the API. Commands and similar featuresare split into groups called Plugins, allowing for better organization. It's inspired by the simplicity of Clickand Flask.DÃ©tachÃ©'s features include:- intuitive argument parsing with support for custom types- automatic documentation and help messages- support for per-guild bot prefix via a callback- support for shardingHere's a simple bot that does math:.. code-block:: pythonimport detachebot = detache.Bot(default_prefix="!")@bot.plugin("Math")class MathPlugin(detache.Plugin):"""Basic math commands."""@detache.command("add", "Adds two numbers.")@detache.argument("a", detache.Number, help="First addend")@detache.argument("b", detache.Number, help="Second addend")async def add(self, ctx, a, b):return a + b@detache.command("subtract")@detache.argument("a", detache.Number, help="Minuend")@detache.argument("b", detache.Number, help="Subtrahend")async def subtract(self, ctx, a, b):"""Subtracts two numbers."""return a - bBoth commands take two arguments, "a" and "b", which are specified as numbers. The commands return the sum ordifference, which DÃ©tachÃ© automatically replies with. If argument parsing fails, the generated documentation will beshown.Commands can be documented with the command decorator, or by using docstrings.TODO: Plugin, command, and argument descriptions are shown in the automatically generated help message.You can install the library from PyPI: ::$ pip install detache
Package: detadict
detadictGoal:create dictionary that fully compatible with native python dictionary interface.Example:fromdetadictimportdetadictusers=detadict()users["John"]={"id":1,"sex":"male"}users["Katy"]={"id":2,"sex":"female"}Requirements:🤦‍♂️ All you need to do is set the environment variableDETA_PROJECT_KEYwith the Deta project key.Currently not supported:Update of mutable valuesusers["John"]["sex"]="female"print(users["John"])# {"id": 1, "sex": "male"}copyandsetdefaultmethods# raise NotImplementedErrorusers.copy()users.setdefault("Bob",{})Installing:pipinstalldetadict
Package: deta-discord-interactions
Deta-Discord-InteractionsThis is a small web framework that lets you write Discord Application Commands using a decorator syntax similar to Flask's@app.route()or Discord.py's@bot.command(), specialized for usage inhttps://deta.spaceIt is a fork offlask-discord-interactions, but without requiring Flask and with some added features to make the usage of the library better on deta.@app.command()
def ping(ctx):
    "Respond with a friendly 'pong'!"
    return "Pong!"The documentation of the original library is available onreadthedocs.
The documentation of the Fork is still Work in Progress.Known issuesNo good way to defer nor follow up (any spawned threads are killed as soon as the main function returns)The Deta Space changes made it a quite few times more complicated to setup than Cloud used to beNot particularly beginner friendlyPoorly documentedAs far as security goesThehttp.servermodule of the standard library thatdeta_discord_interactions.httprelies on is not recommended for production usage. Use it at your own risk.
Any server that supportsPEP 3333and works in serverless environments should work, so you may want to use something likehttps://gunicorn.org/instead of thedeta_discord_interactions.httpused in Examples.
Package: detail
detailallows contributors to create structured and configurable notes in a project,
providing the ability to do automations such as:Ensuring that contributors add information to pull requests that provide
QA instructions, release notes, and associated tickets. Thedetail lintcommand
ensures that notes are present in a pull request and adhere to the schema.Rendering dynamic logs from the notes.detail logprovides the ability
to slice and dice the commit log however you need, pulling in anotesvariable in a Jinja template with all notes that can be grouped and filtered.Other automations, such as version bumping, Slack posting, ticket comments,
etc can be instrumented in continuous integration from the structured notes.When contributing a change, calldetailto be prompted for all information
defined in the project’s detail schema. Information can be collected conditionally
based on previous steps all thanks to theformaldictlibrary.Below is an example of a contributor creating a structured note with the type
of change they are making, a summary, a description, and an associated Jira
ticket:Notes are commited to projects, allowing review of them before they are used to
perform automations in continuous integration.DocumentationView the detail docs here.InstallationInstall detail with:pip3 install detailContributing GuideFor information on setting up detail for development and
contributing changes, viewCONTRIBUTING.rst.Primary Authors@wesleykendall (Wes Kendall)@tomage (Tómas Árni Jónasson)
Package: detalog
DetaLogDetaLog is a Python package that provides a logging handler for sending logs to aPingBackevents crawler. This can be useful for aggregating logs from multiple sources into a central place, and analyzing them to gain insights about your application or system.InstallationYou can install DetaLog via pip:pip install detalogUsageHere's an example of how to use DetaLog in your Python code:importloggingfromdetalogimportPingBackHandlerapp_url="https://my-pingback-events-crawler.com"api_key="my-api-key"logger=logging.getLogger(__name__)logger.setLevel(logging.INFO)handler=PingBackHandler(app_url,api_key,project="my-project",channel="my-channel")handler.setLevel(logging.INFO)logger.addHandler(handler)logger.info("Hello, world!")logger.debug("Hello, world!",extra={"channel":"debug-channel","project":"my-project-2"})In this example, we create a logger with the name__name__, which is the name of the current module. We set its logging level toINFO, which means it will log messages at theINFOlevel or above. We also create aPingBackHandlerinstance, passing in the URL of the PingBack events crawler, an API key for authentication, and optionalprojectandchannelparameters to specify the destination of the logs. We set the handler's logging level toINFOas well, so it will only handle messages at that level or above.Finally, we add the handler to the logger, and log anINFOmessage with the text "Hello, world!". This message will be sent to the PingBack events crawler via the handler'semitmethod, in the form of a JSON payload.LicenseDetaLog is licensed under the MIT License. See LICENSE for details.
Package: detamvc
Documentation:https://detamvc.deta.devSource Code:https://github.com/pyn-sol/detaMVCDetaMVC is a framework for rapidly developing and deploying web applications using:FastAPIJinja2DetaInstallationpip install detamvcOther Requirements:A Deta Account. If you do not have one, go toDetaand click 'Join Deta'TheDeta CLIBasicsIf you are familiar with Ruby on Rails, the commands are very similar for creating an application.detamvc new project

cd project

detamvc scaffold item name:str description:text price:float quantity:int available:boolBefore running your project, be sure to set your PROJECT_KEY for Deta. You can get this from your Deta dashboard under 'settings'.echo DETA_PROJECT_KEY="#######_#############" > .envOr, save yourself the hassle and set your development project key using the command. Hint: Do thisbeforecreating a new project.detamvc set-project-key #######_#################Run a Server ManuallyThis assumes you have uvicorn installed. You can run with other servers as you wish - just set up like you would for a normalFastAPIapplication.detamvc soruvicorn main:app --reloadDeploy on DetaNow you can deploy this on Deta!
Before running the following, you will need to install theDeta CLIdeta new --project default
Package: detaorm
DetaORMAn async ORM forDetaBase.Support|PyPI|DocumentationExample Usagefrom__future__importannotationsimportasynciofromdetaormimportClient,Base,FieldclassUser(Base,name="users"):username:Field[str]=Field()nicknames:Field[list[str]]=Field(default=[])asyncdefmain()->None:client=Client("<project key>",bases=[User])awaitclient.open()new_user=User(username="CircuitSacul")print(new_user)# > User({"username": "CircuitSacul"})inserted_user=awaitnew_user.insert()print(inserted_user)# > User({"username": "CircuitSacul", "nicknames": []})updated_user=awaitinserted_user.update(User.nicknames.append(["Circuit","Sacul"]))print(updated_user)# > User({"username": "CircuitSacul", "nicknames": ["Circuit", "Sacul"]})page=awaitUser.where(User.nicknames.contains("Sacul"),limit=1)print(page.items[0])# > User({"username": "CircuitSacul", "nicknames": ["Circuit", "Sacul"]})if__name__=="__main__":asyncio.run(main())
Package: detapack
📄 detapackImport/Export data from/to Deta BasesWhat is detapack?detapack is a tiny & simple CLI built withTyper(in Python) which can import and export data from and to Deta Bases.How to install detapack?detapack can be installed from the Python Package Index.pip install detapackRundetapack versionto check if detapack was installed successfully. You may need to add detapack to your shell configuration.CommandsDetapack is mainly used with two commands:detapackexport<BASENAME>detapackimport<BASENAME><PATHTOJSON>Both commands will ask you for your Deta project key, which will be used to access your bases. For security reasons, detapack asks for this key every time and doesn't store it anywhere.You can read more about each command by putting-- helpat the end.
Package: detax
This is an experimental package, allowing the calculation of income tax rates
in Germany (useful for freelancers, since they usually pay tax once per year
only, resulting in a substantial amount owed).The package is fairly incomplete, but can be used as a starting point; bug
reports, feedback and pull requests areverywelcome.CLIWhile being usable as a library, the package comes with an optionalCLI. To
use it, theclickpackage must be installed as well:$detax--helpUsage:detax[OPTIONS]INCOMEOptions:-y,--yearINTEGERTaxyear-c,--church-tax[rk|ev]-s,--stateTEXT-p,--perc/-P,--no-percShowtotaltaxpercentage--helpShowthismessageandexit.An example calculation for Baden-Württemberg:$detax-y2017-crk-sBW50000Steuerjahr:2017Bundesland:BWEinkommen:50000.0€Anz.Kinder:0Steuerklasse:1Kirchensteuer:katholisch,8.00%,cappedat3.50%totalincome12636.00€Einkommenssteuer694.98€Solidaritätszuschlag1010.88€Kirchensteuer-------------14341.86€GesamtTaxpercentage:28.7%
Package: detect
Installation$[sudo]pipinstalldetectFeaturesOS variablesvariabledescriptiondetect.freebsdTrue if OS is FreeBSDdetect.linuxTrue if OS is Linuxdetect.macTrue if OS is MacOSdetect.osxTrue if OS is MacOS OS Xdetect.windowsTrue if OS is Windowsdetect.cygwinTrue if OS is Cygwin detecteddetect.unixTrue if OS is Unix (not Windows)Python variablesvariabledescriptiondetect.py2True if python is 2.xdetect.py3True if python is 3.xDockervariabledescriptiondetect.dockerTrue if running inside a Docker containerreadme42.com