Saravanan666/pypi-org huggingface dataset:
Package: decev
DECEV (decoratorevents) by @dantechguyA teeny library for event handling which uses decorators for event subscriptionOverviewAdd functions to events with the@event.your_eventdecoratorAdd instance methods to events with the@decev.clsclass decorator and then the@event.m.your_eventor@event.method.your_eventmethod decoratorRun events withevent.run('your_event')Pass arguments with events withevent.run('your_event', 'bar', foo=True)InstallationEither copy decev/decev.py into your directory, or runpip install decevthen import into your file withimport decevUsage1. Create an EventHandler objectimportdecevevents=decev.EventHandler()2. Add functions to eventsA single function can have multiple events# add myFunction to firstEvent@events.firstEventdefmyFunction():print('myFunction')# add myOtherFunction to firstEvent and event_two@events.firstEvent@events.event_twodefmyOtherFunction():print('myOtherFunction')3. Add methods to eventsUse the@decev.clsclass decorator and@events.m.your_eventto add methods with aselfparameter@decev.clsclassMyClass:# add myMethod to THIRD_EVENT@events.m.THIRD_EVENTdefmyMethod(self):print('myMethod')# add unbound myOtherMethod to THIRD_EVENT@events.THIRD_EVENTdefmyOtherMethod():print('myOtherMethod')# create instance of classmyObject=MyClass()4. Receive arguments in callbacksMake sure the parameters match the arguments passed intoevents.run()@events.ArgEventdefmyArgFunction(foo,bar=True):print(f'myArgFunction foo={foo}bar={bar}')5. Run eventsevents.run('firstEvent')print()events.run('event_two')print()events.run('LAST_EVENT')print()events.run('ArgEvent',100,bar=False)Which produces this:> py main.py
myOtherFunction
myFunction

myOtherFunction

myOtherMethod
myMethod

myArgFunction foo=100 bar=FalseHow it worksAll functions added with@events.your_eventare subscribed immediately toevents's callback dictionary.As instance methods require theselfparameter, they can only be subscribed once the class has been instantiated andselfhas a value. The alternate@events.m.your_eventsyntax insteadtagsthe method, storing the event names and event handler. The@decev.clsclass decorator then inserts a code snippet into the object's__init__method to subscribe the events on instantiation.
Package: decfunc
decfuncCreating decorators with arguments made easy.Creating decorators in Python is easy, unless you want to use
arguments. The aim of this library to abstract away some code
that makes argument-ed decorators work.DocumentationThis library only contains one class:wrapper. Themutatemethod of this class is responsible for your business logic.
You can simply use a class inheriting fromwrapperas the
decorator.  For example:fromdecfuncimportwrapperclasssquare_root(wrapper):defmutate(self,wrapped,*args,**kwargs):returnwrapped(*args,**kwargs)**(1/2)@square_rootdefget_number(*args,**kwargs):return4get_number()# 2.0In this example, decorated function's return value is mutated so
that its square root is returned instead. As you can seemutatemethod takes awrapped, which is the decorated
class or function, and*args,**kwargs, which correspond
to given args and kwargs of the decorated function/class
(you may also use the signature of the decorated callable).Now lets change this a bit so that we can give pass
an argument namedn, which will denote to nth root, instead
of square root.fromdecfuncimportwrapperclassnth_root(wrapper):def__init__(self,n=2):self.n=ndefmutate(self,wrapped,*args,**kwargs):returnwrapped(*args,**kwargs)**(1/self.n)@nth_root(n=3)defget_number(*args,**kwargs):return27@nth_rootdefget_another_number(*args,**kwargs):return16get_number()# 3.0get_another_number()# 4.0As you can see, in order to add arguments to the decorator
you can use__init__, whose signature will be the signature
of the decorator.
Package: dech
DECHDECH is a library for DEClaratively generating HTML pages in Python.  This may be useful for generating summary report pages containing images/tables from scientific scripts.Installpip install dechExample Usagefromdechimport*importmatplotlib.pyplotaspltimportnumpyasnpimg1=np.random.random((100,100))plt.figure('plot1')plt.plot(np.random.random(10))plt.figure('plot2')plt.plot(np.random.random(10))Page([[Figure('Example 1',Img('/tmp/example.gif')),Figure('Example 2',Img('/tmp/example.gif')),Figure('Example 3',Img('/tmp/example.gif')),],[Figure('Matplotlib 1',Img(plt.figure('plot1'),width=300)),Figure('Matplotlib 2',Img(plt.figure('plot2'),width=300)),],[Figure('Numpy Array',Img(img1,width=300)),],]).save('/tmp/display.html')
Package: decide-analysis
decide-analysisThis project is a python package for analyzing data from thedecide operant control systemstored ondjango-decide-host.This is a work in progress. The only functionality in place right now is a
script to retrieve trials from the host and save them in csv format.Example:decide-get-trials-rhttp://pholia.lab:4000/decide/api/\--fieldssubject,time,trial,result,correct,response,stimulus,correction\--from-date2022-03-01--to-date2022-03-09-kexperiment=2ac-config-segmented10C14
Package: decimalfp
The moduledecimalfpprovides aDecimalnumber type which can represent
decimal numbers of (nearly) arbitrary magnitude and very large precision, i.e.
with a very large number of fractional digits.Usagedecimalfp.Decimalinstances are created by giving avalue(default: 0) and
aprecision(i.e the number of fractional digits, default: None).Ifprecisionis given, it must be of typeintand >= 0.Ifvalueis given, it must either be a string, an instance ofnumber.Integral,number.Rational(for examplefractions.Fraction),decimal.Decimalorfloator be convertable to afloator anint.If a string is given as value, it must be a string in one of two formats:[+|-]<int>[.<frac>][<e|E>[+|-]<exp>] or
[+|-].<frac>[<e|E>[+|-]<exp>].The value is always adjusted to the given precision or the precision is
calculated from the given value, if no precision is given.When the givenprecisionis lower than the precision of the givenvalue,
the result is rounded, according to the current default rounding mode (which
itself defaults to ROUND_HALF_EVEN).When noprecisionis given and the givenvalueis afloator anumbers.Rational(but noDecimal), theDecimalconstructor tries to
convertvalueexactly. But this is done only up a fixed limit of fractional
digits (imposed by the implementation, currently 65535). Ifvaluecan not be
represented as aDecimalwithin this limit, an exception is raised.Decimaldoes not deal with infinity, division by 0 always raises aZeroDivisionError. Likewise, infinite instances of typefloatordecimal.Decimalcan not be converted toDecimalinstances. The same is
true for the 'not a number' instances of these types.ComputationsWhen importingdecimalfp, itsDecimaltype is registered in Pythons
numerical stack as subclass ofnumber.Rational. It supports all operations
defined for that base class and its instances can be mixed in computations
with instances of all numeric types mentioned above.All numerical operations give an exact result, i.e. they are not automatically
constraint to the precision of the operands or to a number of significant
digits (like the floating-pointDecimaltype from the standard moduledecimal). When the result can not exactly be represented by aDecimalinstance within the limit of fractional digits, an instance offractions.Fractionis returned.Decimalsupports rounding via the built-in functionroundusing the same
rounding mode as thefloattype by default (ROUND_HALF_EVEN in Python 3). In
addition, via the methodadjusted, aDecimalwith a different precision
can be derived, supporting all rounding modes defined by the standard library
moduledecimal.For more details see the documentation provided with the source distribution
orhere.
Package: decimalize
RequirementsPython 2.5 or later.Install$pipinstalldecimalizeHistory1.0.xFirst release.UsageBasic Example>>>importdecimalize>>>manager=decimalize.Decimalize('0123456789abcdef')>>>manager.encode(255)'ff'>>>manager.decode('ffff')65535Multi Byte ExamplePlease specify a unicode-string if you use multibyte charset.>>>importdecimalize>>>manager=decimalize.Decimalize(...u'あいうえおかきくけこさしすせそたちつてとなにぬねの'...u'はひふへほまみむめもやゆよらりるれろわをん'...)# 46進数>>>print(manager.encode(500))さる>>>manager.decode(u'いぬ')68>>># print(manager.encode(7308313824848881))>>># print(manager.encode(2811963241313541391200))
Package: decimaljs
Decimal.jsIntroductionLicense and CopyrightAuthor and ThanksIntroductionDecimal.js -> An arbitrary-precision Decimal type for JavaScript to PythonLicense and Copyrightdecimaljs is licensedMIT2020Author and Thanksdecimaljs python module was developed byKiran Kumar Kotaridecimal.jswas developed byMichael Mclaughlin
Package: decimal-monkeypatch
#### decimal-monkeypatchA Python module based on [autowrapt](https://github.com/GrahamDumpleton/autowrapt)
for:
- Interpreter-wide monkey patching slowdecimalmodule to [cdecimal](http://www.bytereef.org/mpdecimal/index.html) on Python 2 with preservation of the functionality of thebotolib.
-psycopg2jsontoujsonreplacement
- Customdeepcopyfor boto.dynamodb2.items. This patch can give huge performance benefits if you know expected data structure.
##### Usagepip install decimal-monkeypatch- setAUTOWRAPT_BOOTSTRAP=decimalenv variable fordecimalpatch activation
- setAUTOWRAPT_BOOTSTRAP=psycopg2env variable forpsycopg2patch activation
- setAUTOWRAPT_BOOTSTRAP=dynamodbenv variable fordynamodbpatch activation
- setAUTOWRAPT_BOOTSTRAP=decimal,psycopg2,dynamodbfor all at once
##### Additional reading
* [Swapping decimal for cdecimal on Python 2](https://adamj.eu/tech/2015/06/06/swapping-decimal-for-cdecimal-on-python-2/)
* [Automatic patching of Python applications](https://github.com/openstack/deb-python-wrapt/blob/master/blog/14-automatic-patching-of-python-applications.md)
* [Discussion about json module selection in psycopg2](https://github.com/psycopg/psycopg2/issues/284)
* [SO deepcopy question](https://stackoverflow.com/a/45858907/4249707)
###### WARNING
Tested on only this configuration:
Python 2.7.12+boto2.48.0m3-cdecimal2.3psycopg2-binary2.7.4ujson1.35
Package: decimalpy
decimalpy - long descriptionIn financial calculations it is recommended to use Decimal as a numerical base.
At the same time there is a need to have the same functionality as innumpyorR.
So the goal of this package is to fill this gap, i.e. implementing Decimal based
structures to ease eg. financial calculations.In the creation of thefinancepackage. it was decided to use Decimal
based structures.There were 2 reasons for this:In finance decimals matters and when other financial systems use the IEEE
standard 854-1987 the package finance need to do the sameFor valuation purposes it is important that the financial calculations are
the exact same as those performed in eg spreadsheets who use the IEEE
standard 854-1987See also the chapter that examplifies the reasons for this..After a while it was clear that there were a lot of code with a life or purpose of
its own. And that was how the decimalpy package was born.The Packagedecimalpyis inspired bynumpyand eg the vector concept ofThe R package.
The key difference from numpy is that in decimalpy the only number type is
decimal.The Package contains:An n-dimensional array of decimals, a decimalvectorAn n-dimensional array of decimals where the keys can be of a specific
type and not just integers as in a decimalvector, a
SortedKeysDecimalValuedDictA decorator decimalvector_function that converts a simpel function into a
function that given a decimalvector as an argument returns a decimalvector
of function values. This makes it fairly easy to extend the number of
decimalvector functions. Also decimalvector functions makes it fairly easy
to use other packages like eg matplotlibA set of decimalvector (typically financial) functionsMeta functions (functions on functions) for numerical first
(NumericalFirstOrder) and second (NumericalSecondOrder) order differentionA meta function for finding the inverse value of a functionThe package will be extended in order to support the needs in the packagefinance.The decimal package is open source under thePython Software Foundation
LicenseHow to installJust run setup.py install command. Or in windows use the windows installer.Documentation, etcVisit myhomepageto see more on how
to use and the research behind the code. It’s a blog like place on finance, math
and scientific computing.Planned added contentsThe planned development so far is:Planned added content of version 0.2:Implementation of matrix and more decimalbased functionsPlanned added content of version 0.3:Implementation af a statistical test package
Package: decimaltodoubleword
Decimal to doublewordThis package contains a function to easily generate the values
assigned to bytes 19 - 22 when using the Modbus TCP on the
Igus Dryve D1 controller.How to useImport with:fromdecimaldoublewordimportddConverterasconvNow calling conv() with a decimal argument returns a correctly
formatted list in the shape of (Byte 19, Byte 20, Byte 21, Byte 22)
Package: decimify
decimifyParse numbers with different formatting to builtin python Decimal.A decimal separator is a symbol used to separate the integer part from the fractional part of a number written in decimal form (e.g. "." in 12.45). Different countries officially designate different symbols for use as the separator. The choice of symbol also affects the choice of symbol for the thousands separator used in digit grouping.Some examples of large number presentations in all around the world:Large NumberLocale1,234,567.89Australia, Cambodia, Canada (English-speaking; unofficial), China, Cyprus (currency numbers), Hong Kong, Iran, Ireland, Israel, Japan, Korea, Macau (in Chinese and English text), Malaysia, Malta, Mexico, Namibia, New Zealand, Pakistan, Peru (currency numbers), Philippines, Singapore, South Africa (English-speaking; unofficial), Taiwan, Thailand, United Kingdom and other Commonwealth states except Mozambique, United States.1234567.89SI style (English version), Canada (English-speaking; official), China, Estonia (currency numbers), Hong Kong (in education), Mexico, Namibia, South Africa (English-speaking; unofficial), Sri Lanka, Switzerland (in federal texts for currency numbers only), United Kingdom (in education), United States (in education).1234567,89SI style (French version), Albania, Belgium (French), Brazil, Bulgaria, Canada (French-speaking), Costa Rica, Croatia, Czech Republic, Estonia, Finland, France, Hungary, Italy (in education), Latin America, Latin Europe, Latvia, Lithuania, Macau (in Portuguese text), Mozambique, Norway, Peru, Poland, Portugal, Russia, Serbia (informal), Slovakia, South Africa (officiale RAE and CSIC), Sweden, Switzerland (in federal texts, except currency numbers), Ukraine, Vietnam (in education).1.234.567,89Austria, Belgium (Dutch), Bosnia and Herzegovina, Brazil (informal and in technology), Chile, Colombia, Croatia (in bookkeeping and technology), Denmark, Germany, Greece, Indonesia, Italy, Latin America (informal), Netherlands, Romania, Slovenia, Serbia, Spain (used until 2010, inadvisable use according to the RAE and CSIC), Turkey, Uruguay, Vietnam.1,234,567·89Malaysia, Philippines (uncommon today), Singapore, United Kingdom (older, typically handwritten; in education)12,34,567.89Bangladesh, India, Nepal, Pakistan (see Indian numbering system).1234567.89Bangladesh, India, Nepal, Pakistan (see Indian numbering system).Referencedecimifyaims to solve this problem by automatically converting many common formats into pythonDecimal.Without having any external dependencies. It uses builtin python functions to convert string representation of numbers to Decimal.Installationpipinstall-UdecimifyUsagefromdecimifyimportdecimifymy_decimal=decimify('23 234.678,00')my_decimal# Decimal('23234678.00')
Package: dec-inicilizadora-ADENEB
AUTO INITIALIZATIONThis module offers a class decorator, which allows initializing the variables passed to the constructor of a class when instantiating its objects.Github-flavored Markdownso you have to do it manually. on the other hand you can pass a list of variables to the decorator so that it only allows those variables to be initialized. as well as passing a dictionary as an argument, which as a key will have the name of the method you want to add and as content of the key, a function that will be the method itself.
Package: decipherment
Python Project TemplateA low dependency and really simple to start project template for Python Projects.See alsoFlask-Project-Templatefor a full feature Flask project including database, API, admin interface, etc.FastAPI-Project-TemplateThe base to start an openapi project featuring: SQLModel, Typer, FastAPI, JWT Token Auth, Interactive Shell, Management Commands.HOW TO USE THIS TEMPLATEDO NOT FORKthis is meant to be used fromUse this templatefeature.Click onUse this templateGive a name to your project(e.g.my_awesome_projectrecommendation is to use all lowercase and underscores separation for repo names.)Wait until the first run of CI finishes(Github Actions will process the template and commit to your new repo)If you wantcodecovReports and Automatic Release toPyPIOn the new repositorysettings->secretsadd yourPYPI_API_TOKENandCODECOV_TOKEN(get the tokens on respective websites)Read the fileCONTRIBUTING.mdThen clone your new project and happy coding!NOTE:WAITuntil first CI run on github actions before cloning your new project.What is included on this template?🖼️ Templates for starting multiple application types:Basic low dependencyPython program (default)use this templateFlaskwith database, admin interface, restapi and authenticationuse this template.or Runmake initafter cloning to generate a new project based on a template.📦 A basicsetup.pyfile to provide installation, packaging and distribution for your project.Template uses setuptools because it's the de-facto standard for Python packages, you can runmake switch-to-poetrylater if you want.🤖 AMakefilewith the most useful commands to install, test, lint, format and release your project.📃 Documentation structure usingmkdocs💬 Auto generation of change log usinggitchangelogto keep a HISTORY.md file automatically based on your commit history on every release.🐋 A simpleContainerfileto build a container image for your project.Containerfileis a more open standard for building container images than Dockerfile, you can use buildah or docker with this file.🧪 Testing structure usingpytest✅ Code linting usingflake8📊 Code coverage reports usingcodecov🛳️ Automatic release toPyPIusingtwineand github actions.🎯 Entry points to execute your program usingpython -m <decipherment>or$ deciphermentwith basic CLI argument parsing.🔄 Continuous integration usingGithub Actionswith jobs to lint, test and release your project on Linux, Mac and Windows environments.Curious about architectural decisions on this template? readABOUT_THIS_TEMPLATE.mdIf you want to contribute to this template please open anissueor fork and send a PULL REQUEST.❤️ Sponsor this projectdeciphermentAwesome decipherment created by ivnleInstall it from PyPIpipinstalldeciphermentUsagefromdeciphermentimportBaseClassfromdeciphermentimportbase_functionBaseClass().base_method()base_function()$python-mdecipherment#or$deciphermentDevelopmentRead theCONTRIBUTING.mdfile.
Package: deciphon
Welcome to deciphon 👋Individually annotate long, error-prone nucleotide sequences into proteins🏠Homepage⚡️ RequirementsPython >= 3.9PipPodman>= 3.4Homebrewon MacOS (recommended)Pipxfor Python package management (recommended)MacOSInstall Python and Podman:brewupdate&&brewinstallpythonpodmanpipxEnsure that yourPATHenvironment variable is all set:pipxensurepath💡 You might need to close your terminal and reopen it for the changes to take effect.Ubuntu (and Debian-based distros)Install Python and Podman:sudoaptupdate&&\sudoaptinstallpython3python3-pippython3-venvpodman--yes&&\python3-mpipinstall--userpipxEnsure that yourPATHenvironment variable is all set:python3-mpipxensurepath💡 You might need to close your terminal and reopen it for the changes to take effect.InstallpipxinstalldeciphonUsageUsage: deci [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --version                                                                    │
│ --help             Show this message and exit.                               │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ press        Press HMM ASCII file into a Deciphon database one.              │
│ scan         Annotate nucleotide sequences into proteins a protein database. │
╰──────────────────────────────────────────────────────────────────────────────╯ExampleDownload theminifam.hmmprotein database:curl-Ohttps://raw.githubusercontent.com/EBI-Metagenomics/deciphon/main/cli/tests/files/minifam.hmmDownload theconsensus.fnafile of sequences:curl-Ohttps://raw.githubusercontent.com/EBI-Metagenomics/deciphon/main/cli/tests/files/sequences.fnaPress it (using The Standard Code):decipressminifam.hmm1Scan it:deciscanminifam.hmmsequences.fnaShow it:deciseesequences.dcs👤 AuthorDanilo HortaShow your supportGive a ⭐️ if this project helped you!
Package: deciphon-api
deciphon-apiDependenciesIf you happen to be using a supported Linux environment (which is likely the case),
you would need:Python>=3.8Pipxfor easy installation and environment isolation. Feel free to usePipinstead though.UsageGenerate a configuration file:pipxrundeciphon-apigenerate-config>.envTweak.envas needed, and then runpipxrundeciphon-apistartDevelopmentMake sure you havePoetry.Enterpoetryinstall
poetryshellto setup and activate a Python environment associated with the project.
Then enteruvicorndeciphon_api.main:app.api--reloadto start the API.Tests can be performed by enteringpytestwhile the corresponding Python environment created by Poetry is active.SettingsCopy the file.env.exampleto your working directory and rename it to.env.
Edit it accordingly.
The rest of the configuration can be tuned byuvicornoptions.
Package: deciphon-intervals
deciphon-intervalsIt helps to model the two primary interval definitions in the programming
realm: 0-start, half-open interval (aka Python interval), and 1-start,
fully-closed interval (aka R interval).Examplefromdeciphon_intervalsimportPyInterval,RInterval,Intervalx=[1,2,4,8]print(x[PyInterval(start=1,stop=3).slice])print(x[RInterval(start=2,stop=3).slice])# [2, 4]# [2, 4]interval:Interval=RInterval(start=2,stop=3)print(interval.py)print(interval.r)# PyInterval(start=1, stop=3)# RInterval(start=2, stop=3)
Package: deciphon-sched
docker-compose up -d --build --force-recreate --remove-orphans
docker-compose down -vdocker run -p 9000:9000 -p 9001:9001 quay.io/minio/minio server /data --console-address ":9001"
docker run -p 1883:1883 -v /Users/horta/tmp/mosquitto/config:/mosquitto/config eclipse-mosquitto
uvicorn --factory deciphon_sched.main:create_app