Saravanan666/pypi-org huggingface dataset:
Package: decos
This repo hosts 3 useful decorators that might come handy while prototyping namely -@debug@timer@safe_rundebugandtimerare taken fromhttps://realpython.com/primer-on-python-decorators/.@debug prints the function name with the arguments passed and the return value at the end each time a function is called.@timer as the name suggests times the function to be executed and in the end prints the total time taken by that function.@safe_runis in brief tries to run the function and prints the error in case the function throws some error.@safe_runtakes dictionary of parameters also to let the user customize the behavior of it.
Package: deco-slack
decoslackdecoslack notifies you via Slack if a method has completed successfully or not.DescriptionNotify Slack when a process starts, ends normally, or ends abnormally.Each notification can be set on or off.ConfigurationsEnvironment variables to set{DECO_SLACK_PREFIX}SLACK_TOKENSlack bot token that can be used with chat:write.public scope.{DECO_SLACK_PREFIX}SLACK_CHANNELChannel name to be notified without # (like notify_xxx not #notify_xxx)DECO_SLACK_PREFIX (optional)Prefix for environment variables.If not set, defaults to "".Examplefromdeco_slackimportdeco_slack@deco_slack(# These parameters are all optionalstart={"text":"start text","title":'start',"color":"good"},success={"text":"success text","title":'success',"color":"good"},error={"title":'error',"color":"danger","stacktrace":True# Set True if you need stacktrace in a notification},)deftest1():print('test1')@deco_slack(success={"text":"success text","title":'success',"color":"good"},error={"title":'error',"color":"danger","stacktrace":True},)deferror1():raiseValueError('error occured.')
Package: decouple
DecoupleSay NO to monolithic architecture.Decouple complex system to separated modules by mediator.pipinstalldecoupleRegister event handlerDispatch eventsExampleSimple usageCode of example ishereWrite ModuleA - publisherfromdataclassesimportdataclassfromdecoupleimportModule,Event,MediatorclassModuleA(Module):def__init__(self,mediator:Mediator=Mediator()):super().__init__(mediator)defstart(self):self.pub(StartEvent(a=7))@dataclassclassStartEvent(Event):a:int=0# must be serializableWrite ModuleB - subscriberfromdecoupleimportModulefromexamples.simple.module_aimportStartEventclassModuleB(Module):def__init__(self):super().__init__()self.sub(StartEvent,self.handle_a)defhandle_start(self,event:StartEvent):print(f'field a:{event.a}')Compose both modules to the wholefromexamples.simple.module_aimportModuleAfromexamples.simple.module_bimportModuleBmodule_a=ModuleA()module_a.add(ModuleB())module_a.start()PrioritiesManual controlfromdecoupleimportModulefromexamples.simple.module_aimportStartEventclassModuleB(Module):def__init__(self):super().__init__()# handler with higher priority will be triggered earlyself.sub(StartEvent,self.handle_b,priority=0)self.sub(StartEvent,self.handle_a,priority=100)defhandle_a(self,event:StartEvent):# will be triggered firstprint(f'field a:{event.a}')defhandle_b(self,event:StartEvent):# will be triggered secondprint(f'event.uuid:{event.uuid}, event.timestamp:{event.timestamp}')Default priority depends on registration orderfromdecoupleimportModulefromexamples.simple.module_aimportStartEventclassModuleB(Module):def__init__(self):super().__init__()# priority of handlers call increased by 1 every registration for the same eventself.sub(StartEvent,self.handle_b)# priority=1self.sub(StartEvent,self.handle_a)# priority=2defhandle_a(self,event:StartEvent):# will be triggered secondprint(f'field a:{event.a}')defhandle_b(self,event:StartEvent):# will be triggered firstprint(f'event.uuid:{event.uuid}, event.timestamp:{event.timestamp}')FeedbackI will be glad to read your feedback in issues and pull requests.
Package: decoupled
decoupledMotivationImagine...You're developing a python extension ORYou're writing some C or C++ code, but decided to add some python bindings
because you're more familiar with python unit testing librariesNow this C/C++ code can fail in ways which Python code cannot.
It can cause a segfault and take your whole Python process down.
That means, that your testing library doesn't get to display it's results -
you don't get told which tests fail.The solutiondecoupled runs your code in a separate process. If it crashes, this doesn't
take down the parent process. Instead, a ChildCrashedError is raised
in your parent process.
Package: decoupler
decoupler - Ensemble of methods to infer biological activitiesdecoupleris a package containing different enrichment statistical methods to extract biological activities from omics data within a unified framework.
This is its faster and memory efficient Python implementation, for the R version gohere.For further information and example tutorials, please check ourdocumentation.If you have any question or problem do not hesitate to open anissue.Installationdecouplercan be installed frompip(lightweight installation)::pip install decouplerIt can also be installed fromcondaandmamba(this includes extra dependencies):mamba create -n=decoupler -c conda-forge -c bioconda decouplerAlternatively, to stay up-to-date with the newest unreleased version, install from source:pip install git+https://github.com/saezlab/decoupler-py.gitscversedecoupleris part of thescverseecosystem, a collection of tools for single-cell omics data analysis in python.
For more information check the link.LicenseFootprint methods inside decoupler can be used for academic or commercial purposes, exceptviperwhich holds a non-commercial license.The data redistributed by OmniPath does not have a license, each original resource carries their own.Hereone can find the license information of all the resources in OmniPath.CitationBadia-i-Mompel P., Vélez Santiago J., Braunger J., Geiss C., Dimitrov D.,
Müller-Dott S., Taus P., Dugourd A., Holland C.H., Ramirez Flores R.O.
and Saez-Rodriguez J. 2022. decoupleR: Ensemble of computational methods
to infer biological activities from omics data. Bioinformatics Advances.https://doi.org/10.1093/bioadv/vbac016
Package: decoutils
decoutils: Utilities for writing decoratorsRationalePythondecorators are very useful. However, writing decorators with
arguments is not straightforward. Take the following function as an
example:register_plugin(plugin,arg1=1):print('registering ',plugin.__name__,' with arg1=',arg1)This function registers a input function somewhere in the system. If this function could work as a decorator, that will be convinient. In order to make it a decorator, we just need it to return the input plugin trivially:register_plugin(plugin,arg1=1):print('registering ',plugin.__name__,' with arg1=',arg1)returnplugin@register_plugindefplugin1():passIt is pretty easy so far. What if we wantregister_pluginworks as a decorator with arguments? That's to say, we want to use it as:@register_plugin(arg1=2)defplugin2():passIn order to accomplish this goal, we need to wrap the functionregister_pluginso that it return a decorated plugin if the first
input is a callable object, otherwise return a decorator with
arguments. Thedecoutils.decorator_with_argsis intend to abstract that wrapping, so that we can reuse it.InstallationInstall from PyPIpipinstalldecoutilsInstall from Anacondacondainstall-cliyugongdecoutilsSimple exampleBasically,decorator_with_argsenables a ordinary decorator function to be a decorator with arguments.@decorator_with_argsdefregister_plugin(plugin,arg1=1):print('registering ',plugin.__name__,' with arg1=',arg1)returnplugin@register_plugin(arg1=10)defplugin1():passMoreover,decorator_with_argsitself is also a decorator with arguments: one argumentreturn_originalwhich can be used to convert a non-decorator function to be a decorator@decorator_with_argsdefregister_plugin(plugin,arg1=1):print('registering ',plugin.__name__,' with arg1=',arg1)# Note here the function does not return the plugin, so it cannot work as a decorator originally@register_plugin(arg1=10)defplugin1():passdecorator_with_argscan also convert a function to decorator whose decorating target is not its first argument, e.g.decorator_with_args(target_pos=1)defregister_plugin(arg1,plugin):returnplugin@register_plugin(100)# plugin2 will be registered with arg1=100defplugin2():passreturn_originalcontrol whether the resultant decorator return the original plugin, or the result of functionregister_plugin.LicenseThedecoutilspackage is released under theMIT LicenseDocumentationhttps://decoutils.readthedocs.io
Package: decpac
Simple declarative package managementFor Arch LinuxList the packages you want installed in/etc/decpac.conf.  Rundecpacand packages will be installed/uninstalled until the set of installed packages matches the list.  This doesn't manage config files, cache files, other generated files, etc.  If you like this but want more rigorous declarative package management check outNixandNixOS.I've been using it for a couple months now (April 2018).Why declarative management?You want to install the same packages on a different system.  Just copydecpac.confover and rundecpac!You're looking for a program that does X, and there are 10 programs that say they do X.  If you install them all, you'll definitely forget to uninstall them.  Install them using pacman directly and decpac will uninstall them the next time you run it.You're trying to clean up your system but you don't remember why you installed a package, or even what it does.  Organize and annotate yourdecpac.confwith comments!Help me out here.Diff your package list!UsageInstall withpip install decpacIf you don't have a configuration file, create one withsudo decpac generateEdit your/etc/decpac.conf(be careful not to delete system files) (seeConfig file syntaxbelow).Then rundecpacto synchronize your packages.Config file syntaxThe config file looks like:{
        install_main: [
                sudo,
                pacman,
                --noconfirm,
                -S,
        ],
        install_aur: [
                trizen,
                --noconfirm,
                -S,
        ],
        installed: [
                nvidia,
                lib32-nvidia-utils,
                trizen,
		...

                * audio *
                alsa-utils,
                (aur) alsaequal,
                alsaequal-mgr,
                alsaplayer,
		...
	],
},This is aluxemfile, which is like JSON but quotes are optional for single words and you can add comments like* this is a comment *.(aur)specifies an AUR package.  It's installed with whatever helper you specified ininstall_aur(trizen worked for me).Implementation notesMost AUR helpers had issues, such as installing all deps from AUR or not flagging dependencies as dependencies (or rather, flagging them all as explicit).  I worked around that somewhat but it would be nice to implement AUR functionality directly.  It may make things more efficient too.Customizing AUR builds makes things nonreproducible so I avoid doing that.  Specifying customizations indecpac.confmight be a good feature.It would be awesome if decpac could install Ruby/Node packages as well usingnpm2archand its ilk.Renamed packages need to be renamed in the config manually.  decpac could update the config file automatically but de/reserializing deletes comments.  Maybe making a(comment)type would work?Related projectsNix- A strict declarative package (and config) manager that can be used on Arch, and also the basis of Linux distroNixOSaconfmgr- A declarative Arch-native package and config manager
Package: dec-profiler
Что это ?Проект для профилирования кодаОписание модулейtime_dec - Замерить ВремяПример работыimportrandomfromtime_decimporttime_s@time_s(3)deftest():a=[]foriinrange(7000):a.append(random.randint(0,9))n=100a=[]test()time_s(count_loop)= Замерить время выполнения в секундахcount_loop= Количество повторений функцииtime_ns(count_loop)= Замерить время выполнения в наносекундахcount_loop= Количество повторений функции
Package: decp-scraper
Récupération des DECP des plateformes Trust MPE (Atexo)Ce projet vise à développer un script permettant de télécharger facilement les données essentielles de la commande publique publiées sur les plateformes de marché développées par  Atexo.Liste des plateformes identifiées :marches.e-bourgogne.frmarches.cnes.frmarchespublics.paysdelaloire.frmarchespublics.hautsdefrance.fr(pas de données, remplacé par marchespublics596280.fr)marchespublics596280.frmarchespublics.grandest.frmarches.departement13.frmarchespublics.lenord.fralsacemarchespublics.eumpe-marseille.local-trust.commarches.megalisbretagne.orgmarches.maximilien.frdemat-ampa.frmarchespublics.nantesmetropole.frmarches.grandreims.frmarchespublics.cnfpt.frmarchespublics.grand-nancy.orgmarchespublics.eure.frprofilacheteur.meuse.frAnomaliesCentre National d'Etudes Spatiales (CNES) (marches.cnes.fr)Aucune données accessible pour 2019 (erreur : "Cette liste des marchés n'a pas encore été publiée.")Lien vers le formulaire de rechercheMégalis Bretagne (marches.megalisbretagne.org)Pour les acheteurs publics suivants, l'erreur suivante est renvoyéeThe controller must return a response (null given). Did you forget to add a return statement somewhere in your controller?Mairie d'Argentré du Plessis (a5q)MAIRIE DE LECOUSSE (a8z)Commune de Bonnemain (d3z)OFFICE DE TOURISME COMMUNAUTAIRE DE CONCARNEAU CORNOUAILLE AGGLOMERATION (i8h)Association Smile Smartgrids (i8k)CIAS_GUINGAMP_PAIMPOL AGGLOMERATION (i8l)CCAS DE GUEMENE PENFAO (i8m)CCAS de Maël-Carhaix (i8n)Région Pays de la Loire (marchespublics.paysdelaloire.fr)Aucune données accessible pour 2019 (erreur : "Cette liste des marchés n'a pas encore été publiée.")Lien vers le formulaire de rechercheLicenceMITUtiliser le script download.shPour téléchager Maximilien./download.sh marches.maximilien.frUtiliser les script download.py et extractionAcheteurs.pyMettre en place l'environnement de développementapt-get install python3.6 python3-dev python3-venv
python3 -m venv myenv
source myenv/bin/activate
pip install -r requirements.txt###Utiliser les script
Pour initialiser tous les sites connuspython extractionAcheteurs.py --site allPour obtenir de l'aide sur les options de la ligne de commandepython download.py --helpPour téléchager un site, ex:Maximilienpython download.py --site marches.maximilien.frPour télécharger tous les sites connuspython download.py --site allPour télécharger des données fraîches de 2020 pour deux site (ex:Maximilien et Megalis), avec un délais de 0.5 seconde entre chaque appel et 2 threadspython download.py --site marches.maximilien.fr marches.megalisbretagne.org --year 2020 --delay 0.5 --thread 2 --force_download
python download.py -s marches.maximilien.fr marches.megalisbretagne.org -y 2020 -d 0.5 -t 2 -f
Package: decpys
Declarative PySide6decpys(orDec-larativePyS-ide) is a Python library that acts as a thin wrapper around
the originalPySide6to enable super-fast GUI prototyping
using modern declarative UI techniques completely within Python.decpysis licensed underGPLv2.Installationdecpysis available through PyPI. From the command-line, simply:pip install decpysDesigndecpysis inspired by UI frameworks like React and Flutter.decpysextends the popularPySide6Qt library so that Qt widgets can be used in a intuitive, concise manner to build out
declarative-style UI blocks completely within python.Normally, Qt is used to build UIs in an imperative manner. This means that each widget and its
properties must be set, step-by-step. This might look familiar to you:window=QMainWindow()widget=QWidget()label=QLabel()label.setText("a label")layout=QVBoxLayout()layout.addWidget(label)widget.setLayout(layout)window.setCentralWidget(widget)window.setWindowTitle("a window")It's cumbersome. Qt introducedQMLa while back, but that introduces a new syntax and file format to learn. Tools also have to be made
in IDEs/editors to give users the speed they seek developing.Let's take a look at the last example, this time written usingdecpys:window=qMainWindow(title="a window",centralWidget=qWidget(layout=qVBoxLayout(children=[qLabel(text="a label")])))Indents lend themselves well to visualizing widget hierarchy. Python's keyword arguments (and many
IDEs' support for type hinting) help the user find relevant properties. If you've ever used a
declarative-UI framework, you know the benefits it brings to productivity and readable code.See theClickableButton examplefor a more involved look at howdecpyscan be used.
Package: decred_hash
Notes for Decred:Please see the "test.py" for a testcase to verify your implementation.If you have any questions feel free to ask me (ocminer) at admin AT suprnova.cc=========================Requirements:-------------------------In order to run P2Pool and other Python based pools with the Decred network, you would need to build and install theblake_hash module for Python that includes the blake-256 proof of work code that Decred uses for hashes.Linux:sudo python setup.py installWindows (mingw):* Install MinGW: http://www.mingw.org/wiki/Getting_Started* Install Python 2.7: http://www.python.org/getit/In bash type this:C:\Python27\python.exe setup.py build --compile=mingw32 installWindows (microsoft visual c++)* Open visual studio consoleIn bash type this:SET VS90COMNTOOLS=%VS110COMNTOOLS%	           # For visual c++ 2012SET VS90COMNTOOLS=%VS100COMNTOOLS%             # For visual c++ 2010C:\Python27\python.exe setup.py build --compile=mingw32 installIf you run into an error with unrecognized command line option '-mno-cygwin', see this:http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o
Package: decrypt256
Decrypt256Decrypts SHA-256.How to downloadTo download it do:pipinstalldecrypt256How to use itTo include the python file use:fromdecrypt256importdecrypt256And to use it do:fromdecrypt256importdecrypt256hash=input("Enter a hash: ")value_hash=decrypt256.decrypt256(hash)ifvalue_hash!=None:print("The value of that hash is: "+value_hash)else:print("Hash invalid or not found")
Package: decrypt-ha-backup
What is this?This is a command-line python module that allows you to turn an encrypted Home Assistant backup (aka "Password Protected") into a non-encrypted backup.  You might find this useful in situations such as:Your backup has been corrupted and you're just trying to get what you can out of it.You're trying to get just one or two files out of a backup without having to restore the whole thing.Home Assistant backups are just compressed tar files but to encrypt them with a password it uses a non-standard encryption scheme.  To the author's knowledge there is not way to decrypt these with standard compression/decompression tools which is why he wrote this little utility.A note on reliability and expectationsThis tool isn't sanctioned by the developers of Home Assistant and isn't updated in response to changes Home Assistant makes to the format of its backup files.  This tool hacks apart a backup and then builds it back up, which makes it very sensitive to any changes the Home Assistant developers make to the backup file format.It has been tested on backups created by Home Assistant version 2022.6.7. If you encounter an error using this tool please consider creating an issue for it on GitHub to notify the maintainer, you'll probably be helping many other users if you bring attention to an issue.InstallationMake sure you have python 3 and pip installed on your system.  Search around on Google for how to install them on your operating system.  Thenf rom the command line:pipinstalldecrypt-ha-backupUsageDownload your backup from Home Assistant.  Ensure you have at least twice the free space on your hard drive available, and run:python3-mdecrypt-ha-backup/path/to/your/backup.tarYou will be asked for the backups' password, after being processed the decrypted backup will be placed at/path/to/your/Decrypted backup.tar.Optional Arguments--password secret_passwordPass in the password--output_filename /path/to/output.tarSpecify the output file name
Package: decrypto
DecryptoA light-weight encryption & decryption library, Built with power and simplicity!Decrypto is a light-weight python package to provide state of the art encryption and decryption techniques and aims to be simple and easy to use. Being open-source, Decrypto wraps a huge number of old, modern, secure and encoding based encryption-decryption methods while still being fastFeaturesIt's light-weight and fastSimple to use and learnProvides a multidegree of techniques from various cryptographic fieldInstallationUse the package managerpipto install decrypto.pipinstalldecryptoUsageYou can either use a classical cipher techniquefromdecryptoimportMorseCodeCiphercipher=MorseCodeCipher()data='Hello World'# encrypt using morse code cipherencrypted=cipher.encrypt(data)print(encrypted)# decrypt using morse code cipherdecrypted=cipher.decrypt(encrypted)print(decrypted)or a more advanced and modern cipher techniquefromdecryptoimportRSACiphercipher=RSACipher()data='hello world'keys=cipher.generate_keys(23,31)encrypted=cipher.encrypt(message,keys['public_key'])decrypted=cipher.decrypt(encrypted,keys['private_key'])print(keys)print(encrypted)print(decrypted)ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.LicenseMIT
Package: decryptogame
decryptogameA non-official implementation of a Decrypto-style gameDocshttps://decryptogame.readthedocs.io/en/latest/Game ReferenceDecrypto info site:https://www.decrypto.info/Official AuthorizationThis implementation may be used so long as its usage satisfies the following criteria:it does not use/reproduce, in any manner, Decrypto's logo, illustration or visual identity of the gameit does not use/reproduce, in any manner, Scorpion Masque’s logoit states clearly being a "non official" version of the gameit does not allow to play the full game normally (Humans playing against each others or against AI) so that it does not compete against Scorpion Masque’s versions of the game
Package: decryptpdf
decryptpdfSimple CLI tool for decrypting PDF files.InstallationInstall this via pip (or your favourite package manager):pipxinstalldecryptpdfUsage>decryptpdf-h
Usage:decryptpdf[OPTIONS]PATHDecryptsaPDFfile.IfPATHisadirectory,recursivelysearchesforPDFfiles.IfPATHisafileanddoesnotexist,checksifPATHwith".pdf"extensionexists.Ifthefileisnotencrypted,skipsit.

Options:-h,--helpShowthismessageandexit.-p,--passwordTEXTThepasswordtodecryptthePDFfile.Contributors ✨Thanks goes to these wonderful people (emoji key):This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: decs
DecsA handful of useful general-purpose python decorators.Installing$pip install decsHow to useVerify functions inputs and outputs types:fromdecsimportaccepts,returns@returns(str)@accepts(str)defmy_print(string):print(string)returnstringVerify methods inputs and outputs types:fromdecsimportaccepts,returnsclassSomeClass:@returns(float)@accepts('self',int,float)defclass_method(self,int_arg,float_arg):returnint_arg+float_argRepeat test case N times:fromdecsimportrepeatN=42@repeat(N)deftest_something(arg):pass