Saravanan666/pypi-org huggingface dataset:
Package: expect-def
expect-defMotivationExpect tests give you a repl-like interactive development experience where any manual tests you make are trivially turned into automated assertions. The process of changing these assertions to match new constraints is as easy as can be.See Jane Street's blog postThe Joy of Expect Tests.UsageCreate a test like so:importexpect_defasexpect@expect.testdeftest_five_times_five():print(5*5)This can be in a file specifically for testing or right next to the code it is testing.
Anything you print will become an assertionTo run it, create atest.pyfile in the root of your project:importsrc.your_project_hereimportexpect_defexpect_def.runMake sure to import any modules whose tests you would like to run.Runingpython test.py testwill show you a diff of the expected output if the tests fails:/Users/charles/code/python-expect-def/example/__init__.py failed------ /Users/charles/code/python-expect-def/example/__init__.py++++++ /Users/charles/code/python-expect-def/example/__init__.py.err@|-2,4 +2,7 ============================================================||@expect.test|def test_five_times_five():+|    """+|    25+|    """|    print(5 * 5)Which you can accept withpython test.py accept.AlternativesSee alsosnapshottestandexpecttestandpytest-expect. These don't make use of doc strings as the assertion mechanism and some integrate with pytest.Installationpip install expect-defexpect-defalso depends onpatdiffto show diffs, make sure to have that on the PATH.Licenseexpect-defis distributed under the terms of theMITlicense.
Package: expected-levenshtein
expected-levenshteinThis repository contains empirically determined approximate expectedLevenshtein distancesbetween random strings over alphabets of different sizes, as well as simple python code to generate them.DependenciesTo use the code, you will neednumpyandnumba.InstallingSimply clone this repo:git clone https://github.com/nickmachnik/expected-levenshtein.git [TARGET DIR]and then install  via pippip install [TARGET DIR]or install directly from PyPI (this won't include unreleased changes as specified in thechangelog):pip install expected-levenshteinTestingTest the cloned package:cd [TARGET DIR]
python -m unittestGeting startedUse precomputed modelsThis package comes with precomputed models for certain alphabet sizes k and string lengths n. Currently the following models are available:k = 20, 25 ≤ n ≤ 6000Note: A model for a specific value of n only fits values for m (the length of the second string)
such that m ≤ n.The following example shows how a models can be loaded and used to compute the expected levenshtein distances for k = 20, n = 5000:importexpected_levenshtein.fitasefitimportnumpyasnp# load all models for k = 20row_indices,coefficients,mean_squared_deviations=efit.load_precomputed(20)# get the specific model for n = 5000. Here we consider an index row offset.coeff_5k=coefficients[5000-row_indices[0]]# predict expected distance for n=5000, m=876single_distance=efit.poly(876,coeff_5k)# predict expected distances for n=5000, m ≤ 5000range_distances=efit.poly(np.arange(5000),coeff_5k)Computing average levenshtein distancesTo compute the approximate expected Levenshtein distances of random strings of lengths 1 ≤ lengths ≤ n, userandom_average_levenshteininsample.py.This example shows how to compute the distances of random strings up to length 100 over a 4-letter alphabet, averaged over 1000 replicates.fromsampleimportrandom_average_levenshteinimportnumpyasnprandom_average_levenshtein(100,1000,np.arange(4))Generating models for expected distancesFor long sequences, the distance matrix returned byrandom_average_levenshteincan get quite large.
If you prefer not to load and query a large matrix object every time you need an expected distance,fit.model_average_levenshteingenerates a polynomial model for each row in
the distance matrix. That way, the information that needs to be stored to compute approximate
expected levenshtein distances is reduced to the coefficients of the polynomials. Once computed,
these can be used to predict expected distances withfit.poly.This example shows how to generate and use such models for random strings from length 25 to length 50.fromsampleimportrandom_average_levenshteinfromfitimportpoly,model_average_levenshteinimportnumpyasnp# sample distancesaverage_distances=random_average_levenshtein(50,1000,np.arange(4))# make modelsrow_indices,coefficients,mean_squared_deviations=model_average_levenshtein(average_distances,model_rows=np.arange(25,51))# predict expected distance for n=50, m=44coeff_n_50=coefficients[-1]predicted_expected_distance=poly(44,coeff_n_50)LicenseMIT license (LICENSEorhttps://opensource.org/licenses/MIT)
Package: expecter
BASICS======Expecter Gadget helps you to write assertions. Never again will you forgetwhich is expected and which is actual!Basic expectations are easy:>>> from expecter import expect>>> expect('some' + 'thing') == 'something'expect('something')>>> expect(1) > 100Traceback (most recent call last):...AssertionError: Expected something greater than 100 but got 1Just read the expectations like a sentence. "expect(2) == 1 + 1" reads as"Expect 2 to equal 1 + 1". Obviously, the expectation is about 2, and it'sbeing compared to 1 + 1. No ambiguity!EXCEPTIONS==========Expectations about exceptions use the "with" statement. Everything is good ifthe expected exception is raised:>>> from __future__ import with_statement>>> with expect.raises(KeyError):...     {}[123]If it's not raised, Expecter Gadget will raise an AssertionError:>>> with expect.raises(KeyError):...     passTraceback (most recent call last):...AssertionError: Expected an exception of type KeyError but got noneExceptions that don't match the expected one will not be swallowed, so yourtest will error as you expect:>>> from __future__ import with_statement>>> with expect.raises(NameError):...     {}[123]Traceback (most recent call last):...KeyError: 123CUSTOM EXPECTATIONS===================You can add a custom expectation with the add\_expectation method. You give ita predicate that should return true if the expectation succeeds and false ifit fails. All expectation objects will grow a method with the name of yourpredicate method (so don't use a lambda). Appropriate exception messages willbe generated when your predicate fails:>>> import expecter>>> def can_meow(thing):...     return thing == 'kitty'>>> expecter.add_expectation(can_meow)>>> expect('kitty').can_meow()>>> expect('puppy').can_meow()Traceback (most recent call last):...AssertionError: Expected that 'puppy' can_meow, but it can'tAPI DOCUMENTATION=================See http://expecter-gadget.readthedocs.org/en/latest/
Package: expect-exception
expect-exceptionA decorator and context manager to run code that you expect (and want!) to raise
an exception.This module is meant to "reverse" the usage oftry/except, for when you write
code where the exception is the "good" branch. It raises anExceptionNotRaisedErrorwhen the expected exception type is not raised in the
wrapped code, either because it finished executing or because another,
unexpected exception was raised.For example, you can useexpect_exceptionto replace the following code:defupload_new_file(filename,content)try:some_api.fetch_file(filename)exceptFileNotFoundError:# We don't want to override existing files on SomeService, but SomeApi# doesn't have a method to check if a file exists!passsome_api.upload_file(filename,content)With this:defupload_new_file(filename,content)withexpect_exception(FileNotFoundError):# We don't want to override existing files on SomeService, but SomeApi# doesn't have a method to check if a file exists!some_api.fetch_file(filename)some_api.upload_file(filename,content)Alternatively, you can useexpect_exceptionas a decorator for a helper
method:# some_api.pyclassSomeApi(...):...deffetch_file(self,filename):...@expect_exception(FileNotFoundError):defensure_file_missing(self,filename):self.fetch_file(filename)# ---defupload_new_file(filename,content):some_api.ensure_file_missing(filename)some_api.upload_file(filename,content)Usagefromexpect_exceptionimportexpect_exception# Use either as a @decorator or as a `with` statement context.expect_exception(SomeExceptionType[,SomeExceptionType,...,wrap_unexpected_exception:bool])Arguments:*exception_types: Type[BaseException](positional arguments): one or more
exception types (class objects) that are expected to be raised in this
context.
Exceptions that inherit from any of those listed here will also be caught.wrap_unexpected_exception: bool(keyword only argument): True to wrap any
unexpected exception in anExceptionNotRaisedError; False to bubble up the
unexpected exception.
Defaults to True.
Package: expectly
Expectly - An HTTP API centric BDD style test framework-------------------------------------------------------|travis| |pypi| |docs|Use Cases:- Making assertions about api responses more readable- Extending expectly with new assertions to reduce boilerplate.. DANGER::This library is in alpha. I will try my utmost to not make backwards incompatible changesbut it is possible thatInstalling==========.. code-block:: shell$ pip install expectlyAPI Examples============Built In Assertion methods**************************.. code-block:: python# status_code (with status code number)expect(response).to.have.status_code(200)# header (asserts the header exists). Sets the header value to be further tested againstexpect(response).to.have.header('Content-Type')# equalsexpect(response).to.have.header('Content-Type').equal('application/json')# like (does a regex match against the value)expect(response).to.have.header('Content-Type').like('application')# exactly_like (does a regex match against the whole valueexpect(response).to.have.header('Content-Type').exactly_like('^application/[\w]*$')# encodingexpect(response).to.have.encoding('utf-8')# ok (uses requests.response.ok attribute)expect(response).to.be.okExtending expectly.expect with additional assertions****************************************************TODOJSON handling in expectly*************************jsonschema is used for evaluating whether json responses match the relevant schemajmespath is used for navigating/selecting information to test inside of the json responseDevelopment===========.. code-block:: shell$ git clone https://github.com/huntcsg/expectly.git$ cd expectly$ ./utils/manage clean$ ./utils/manage test$ ./utils/manage docs1. All pull requests must pass the travis-ci builds2. All pull requests should include inline (docstring) documentation, updates to built documentation if applicable,and test coverage. This project aspires to be a 100% test coverage library... |travis| image:: https://travis-ci.org/huntcsg/expectly.svg?branch=master:target: https://travis-ci.org/huntcsg/expectly.. |pypi| image:: https://img.shields.io/pypi/v/expectly.svg:target: https://pypi.python.org/pypi/expectly.. |docs| image:: https://readthedocs.org/projects/expectly/badge/?version=latest:target: http://expectly.readthedocs.io/en/latest/?badge=latestChanges=======0.1.0*****- Initial ReleaseAuthors-------Hunter Senft-Grupp
Package: expecto
Pure Python package for retrievingPHOENIX model stellar spectravia FTP. Spectra are returned asspecutils.Spectrum1Dobjects.Basic UsageLet’s get a Sun-like spectrum:fromexpectoimportget_spectrumspectrum=get_spectrum(T_eff=5800,log_g=4.5,cache=False)and let’s plot that spectrum:importmatplotlib.pyplotaspltfromastropy.visualizationimportquantity_supportwithquantity_support():plt.plot(spectrum.wavelength,spectrum.flux)
Package: expectpy
this is assertion library likechai.expectnot yet implementeddeepkeysinstanceofrespondToitselfcloseTomembersExamplefromexpectpyimportexpectexpect(1).to.be.equal(1)expect("1").to.be.length(1)expect([1,2,3]).to_not.contain(4)License(The MIT License)Copyright (c) 2011-2014 takahiro iwatanitaka.05022002@gmail.comPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: expects
Expectsis anexpressiveandextensibleTDD/BDD assertion library for Python. Expects can beextendedby definingnew matchers.UsageJust import theexpectcallable and thebuilt-in matchersand start writing test assertions.fromexpectsimport*expect([]).to(be_empty)expect(False).not_to(be_true)expect({'name':'Jack','email':'jack@example.com'}).to(have_key('name',match('\w+')))expect(str).to(have_property('split')&be_callable)expect(lambda:foo).to(raise_error(NameError))expect('Foo').to(equal('Bar')|equal('Foo'))InstallationYou can install the last stable release of Expects from PyPI using pip or easy_install.$pipinstallexpectsAlso you can install the latest sources from Github.$pipinstall-egit+git://github.com/jaimegildesagredo/expects.git#egg=expectsSpecsTo run the Expects specs you should install the development requirements and then runmamba.$pipinstall-rtest-requirements.txt$mambaChangesSeeChanges.3rd Party MatchersSee3rd-Party Matchers list.
Package: expecttest
expecttestThis library implements expect tests (also known as "golden" tests). Expect
tests are a method of writing tests where instead of hard-coding the expected
output of a test, you run the test to get the output, and the test framework
automatically populates the expected output.  If the output of the test changes,
you can rerun the test with the environment variableEXPECTTEST_ACCEPT=1to
automatically update the expected output.Somewhat unusually, this library implementsinlineexpect tests: that is to
say, the expected output isn't saved to an external file, it is saved directly
in the Python file (and we modify your Python file when updating the expect
test.)The general recipe for how to use this is as follows:Write your test and useassertExpectedInline()instead of a normalassertEqual.  Leave the expected argument blank with an empty string:self.assertExpectedInline(some_func(),"")Run your test.  It should fail, and you get an error message about
accepting the output withEXPECTTEST_ACCEPT=1Rerun the test withEXPECTTEST_ACCEPT=1.  Now the previously blank string
literal will contain the expected value of the test.self.assertExpectedInline(some_func(),"my_value")Some tips and tricks:Often, you will want to expect test on a multiline string.  This framework
understands triple-quoted strings, so you can just write"""my_value"""and it will turn into triple-quoted strings.Take some time thinking about how exactly you want to design the output
format of the expect test.  It is often profitable to design an output
representation specifically for expect tests.
Package: ex-peewee-moves
A simple and flexible migration manager forPeewee ORM.Requirementspython >= 3.4, <= 3.6peewee >= 3.0.0InstallationThis package can be installed using pip:pip install peewee-movesUsageHere’s a quick teaser of what you can do with peewee-moves:$exportFLASK_APP=myflaskapp$flaskdbcreateapp.models.CategoryINFO: created migration 0001_create_table_category$flaskdbrevision"do something"INFO: created migration 0002_do_something$flaskdbupgradeINFO: 0001_create_table_category: upgrade
INFO: 0002_do_something: upgrade$flaskdbdowngradeINFO: 0002_do_something: downgrade$flaskdbstatusINFO: 0001_create_table_category: applied
INFO: 0002_do_something: pendingAnd if you’re curious, here’s what0001_create_table_category.pylooks like. A migration was
automatically created based on the definition of the Category model.defupgrade(migrator):withmigrator.create_table('category')astable:table.primary_key('id')table.integer('code',unique=True)table.string('name',max_length=250)defdowngrade(migrator):migrator.drop_table('category')DocumentationCheck out theFull Documentationfor more details.
Package: expel.lib
This isexpel.libpart of the ExPeL library. It provides code to create
a networked xPL device.Dependenciesexpel.libis dependent on the following Python packages…TwistedConfigObjexpel.messageVersion HistoryVersionNotes0.2Modulexpllooperrenamed tolooper0.1Initial releaseSource CodeThe source code can be found within Launchpad at the following locationhttps://launchpad.net/expelTo DoRefactor into xPLApplication, xPLLooper and xPLHandlerFragmented message handlingGraphical Reactors (wx, gtk, qt etc.)So obviously those things don’t currently work.
Package: expel.message
expel.message provides a set of classes to manipulate xPL messges.It handles all message types; command, status and triggerDependenciesexpel.message only has a single dependency on the pyparsing package.Version HistoryVersionNotes0.2Minor fix in handling of non-string values in messages when
converting to raw text0.1Initial releaseSource CodeThe source code can be found within Launchpad at the following locationhttps://launchpad.net/expel
Package: expense-tracker
EXPENSE TRACKERExpense Tracker is a very good tool to keep track of your expenseditures and the total money you saved.🤑🤑We at some point of our life have kept track of our expenses and the money saved. 📃 We all have used the traditional way of keeping our
record by writing our expenses in ourpersonal diary📃 which can be burnt out, the papers might cut into pieces ✂ or the 📜 diary
got so old 🗑 that we need to write our expenses in another diary.🖋🖋 It is very time consuming also.⏳⌚But it is the most safe way of keeping record. But the time has changed laptops and mobiles are takng over. Most of the time we are spending on computers only.SO I HAVE THOUGHT OF MAKING AN PYTHON APPLICATION TO KEEP TRACK OF YOUR IMPORTANT EXPENSES. I SAY IT IS A VERY HANDY TOOL.🧐ABOUT EXPENSE TRACKER 🎊🎊Python applicationCommand Line Application but the things are well managedUser friendlyShows detail view of your expenses and also how much money you saved or how much is extraShows the graph view of your expensesYou can update and delete your expensesYou can insert new expensesUses databasecurrency converterAlso saves your data online so that you can get access to your expenses from anywhere anytime.GETTING STARTED 🤨🧐Working with expense tracker is pretty easy, if I don't say also, then also you all will do it.You can seek the help by pressingHAt first, PressCto continue orHto take helpPress1to load your database or storagePress2to load your salaryPress3to insert your expenses in the databasePress4to see your expenses with core detailsPress5to update your expensesPress6to delete your expensesPress7to change your salaryPress8to see your expenses in other currencyPress9to exit or quitWorking RemotelyPressLto login with a specific username and passwordPressRto register yourselfPressIto enter the expenses remotelyPressDto delete your expensesPressUto update a particular expensePressOto logoutPressDELto delete your whole account and all other records😎INSTALLATION ✨🎏There are two ways of downloading expense tracker in your computer :-
- Git clonegit clone https://github.com/CapedDemon/EXPENSE-TRACKER.git- Download the zip file
- using pipIf you have python installed then first run this command -pip install requirements.txtAfter this run -python main.pyORpython3 main.pyUsing pip
It is on pypi.orgpip install expense-trackerORpip3 install expense-trackerThen run,expense-trackerThat's all.
Read the instruction carefully on your screen and you will be able to do it.🎉🎉CONTRIBUTIONContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!Star the repo.Raise an issue about the feature so that we can assign.Fork the ProjectCreate your Feature Branch (git checkout -b )Commit your Changes (git commit -m 'Add some advices')Push to the BranchOpen a Pull RequestLICENSEMIT License
Package: expenvelope
expenvelopeexpenvelopeis a python library for managing piecewise exponential curves, original intended as a tool for algorithmic music composition. Curves are simple to make, expressive, and useful for controlling dynamics, tempo, and other higher-level parameters.The centralEnvelopeclass bears some relation to SuperCollider'sEnvobject, and is represented behind the scenes as a contiguous set ofEnvelopeSegments. There are a number of different class methods available for constructing envelopes, including:Envelope.from_levelsEnvelope.from_levels_and_durationsEnvelope.from_pointsEnvelope.releaseEnvelope.arEnvelope.asrEnvelope.adsrEnvelope.from_functionIn addition to the centralvalue_atfunction, utilities have been included to append and insert new points, insert a new interpolated control point without changing the curve, integrate over intervals, find the maximum slope reached, and find the average value, among other things. Envelopes (and EnvelopeSegments) can be added, subtracted, multiplied and divided, with these operations yielding new Envelopes that are close approximations to the resulting function using piecewise exponential curves.expenvelopeis a key dependency ofclockblocks, a package for for controlling the flow of musical time, andscamp, a Suite for Computer-Assisted Music in Python.
Package: exper
# experexperis a very lightweight Python package designed for personal use to speed up the execution of PyTorch-based deep learning experiments. This framework is specifically crafted to support Distributed Data Parallel (DDP) training, mix precision training and provides a convenient mechanism for saving experiment logs.## Features:PyTorch Integration:Built on top of PyTorch,experallows seamless integration with the PyTorch deep learning ecosystem.DDP Training Support:expersupports Distributed Data Parallel training, enabling efficient and scalable model training across multiple GPUs.Experiment Logging:Easily log and save experiment details, parameters, and results for better reproducibility and analysis.Based on TorchDrug:experis derived from the open-source library [TorchDrug](https://github.com/DeepGraphLearning/torchdrug/tree/master) developed by MILA, providing a foundation for reliable and robust deep learning experiments.## Installation:`bash pip install exper `## Licenseexperis released under [Apache-2.0 License](https://github.com/DeepGraphLearning/torchdrug/blob/master/LICENSE).## Contributing
Feel free to contribute your codes to make this package easy to use.