Saravanan666/pypi-org huggingface dataset:
Package: simple-pypackage
Simple PypackageA clean, automated setup for publishing simple Python packages to PyPI and Anaconda.SetupPrepare GitHub RepoCreate new GitHub repository / fork this repositorySetup PyPI and Anaconda Credentials in repository secretsPYPI_USER: PyPI username (use__token__for API key authentication)PYPI_PASSWORD: PyPI password (use token including thepypi-prefix for API key authentication)ANACONDA_API_TOKEN: Anaconda API tokenAfter first release: Go toSettingsand activate your GitHub Pages using thegh-pagesbranchEdit FilesRenamesimple_pypackagefolder to your package nameReplace allsimple-pypackage,simple_pypackage,ppeetteerrsandPeter Yuenwith your package name, package slug, username and author name in these files:.devcontainer.jsonmkdocs.yamlREADME.mdsetup.py.github/workflows/build.yamlconda-recipe/meta.yaml{project_name}/__init__.pyChange your minimum Python version insetup.py,.github/workflows/build.yamland.github/workflows/upload.yamlGitHub WorkflowOn push / pull request tomainbranch:Try to build PyPI and Conda packagesRunpytestandcodecovon all OS typesOn release created:Build and publish package to PyPI and Anaconda (version is automatically inferred from repo tag)Update docsDocker Dev ContainerA.devcontainer.jsonwith my favourite setup is included <3. UseVSCode => Reopen in containerto use it if desired.UsageImportant GotchasMake sure all product dependencies are available on bothconda-forgeandpypiRepo version tags must be of the formatvX.Y.Zwith lowercasevIf GitHub Actions are not triggering, checkhereto make sure it is not because of an outrage.Upload to Codecov might fail if you commit your repository too fast after creation / if you have not logged in to Codecov via GitHub. Just re-run the GitHub action in that case.Things You Can DoConda Description: Write a longer and better description forconda-recipe/meta.yaml.Extra Branches: Separate intodevorfeaturebranches. You might want to add GitHub Action triggers to push / pull requests to those branches.Tests: Write tests inpytest. Other testing framework would require minor changes.Documentation: Write some nice documentation in thedocsdirectory.Improve setup.py: You can adddescription,package_data,classifiersandkeywordsto yoursetup.py.
Package: simple-pypi-pycode-pl
Simple PyPi packageLocal developmentInstall requirementspip install -r requirements.txtBuild package locallypip install .Usage of the package functionsWrite script and import functionfromsimple_pypiimportanother_testing_functionUsage of the command line functionRun command in bashspypiUpload package to PyPiBuildpython setup.py bdistChecktwine check dist/*Uploadtwine upload -u <USER> -p <PASSWORD> dist /*Package has been created:https://pypi.org/project/simple-pypi-pycode-pl/0.0.1/Instal from PyPipip install simple-pypi-pycode-pl==0.0.1Check which spypi version we are usingwhich spypi
Package: simple_pypi_statistics
API and commandline for fetching simple statistics from PyPi’s APIFree software: GPLv2UsageRunsimple-pypi-statisticsto show usage:simple-pypi-statistics

Usage:
  simple-pypi-statistics [options] [verbose|json] <pypi-package>...
  simple-pypi-statistics (-h | --help)
  simple-pypi-statistics --version

Options:
  --no-honeypot   Do not use honeypot for correcting bot/mirror pollution
                  [default: False]
  -h --help       Show this screen.
  --version       Show version.

Examples:
  simple-pypi-statistics docopt  # Outputs everything about docopt
  simple-pypi-statistics docopt==0.1  # Outputs a specific version
  simple-pypi-statistics json docopt==0.1  # In JSON!

Credits:
  Benjamin Bach -- updated script with honey pot corrections
  Alex Clark -- for making vanity, which this script is based onFeaturesverbose outputJSON outputfunctions in api for direct accessHoney potA bogus project on PyPi is used to track garbage stats. To assure that things are
working, consider that the grand total of downloads for that project is actually
also0:python3 -m simple_pypi_statistics python-bogus-project-honeypot
python-bogus-project-honeypot-1438620531.16.tar.gz    2015-08-03           12
python-bogus-project-honeypot-1438619971.82.tar.gz    2015-08-03          -12
-----------------------------------------------------------------------------
No downloads for python-bogus-project-honeypot.History0.1.3 (2015-08-05)Make endpoint / executable work0.1.2 (2015-08-05)Fixed err in JSON output to coerce datetime.date to str0.1.1 (2015-08-05)Added honey pot corrections0.1.0 (2015-08-04)First release on PyPI.
Package: simple-pypi-template
Name of your project (example according to this example project folder: Simple PyPI Template)Short description about your projectThis is a template, maybe you do not need all of these points, or you need add new ones.Note:if you are reading this from PyPI this is only an example of this template, you do no install this project with
PIP because it is only a folder with templates (this not have any functionally). To get full template go tohttps://github.com/Invarato/simple_pypi_template_projectand pull or download project folder that it is the
full template. For more information, tricks, easy steps to create your own Python module and upload to PyPi go tohttps://github.com/Invarato/simple_pypi_template_project/blob/master/README_AND_DELETE.mdTable of contentsTechnologiesSetupQuick useDocumentationLimitationsRoadmapContributionsLicenseTechnologiesProject create with:Python <<< VERSION >>>SetupInstall it locally using PyPI:pip install simple-pypi-templateQuick useSimply and functional example/s of use.Example:fromsimple_pypi_templateimportfunc_of_my_moduledata_returned=func_of_my_module(1000,"str to pass")print(data_returned)DocumentationExplain functions, variables and classes. It is better than you be brief here because documentation is inline in code.If you have aweb site with the documentation, this point is redundant.simple_pypi_templateFunctionsfunc_of_my_modulefunc_of_my_module_create_filesubmoduleFunctionsfunc_of_submoduleLimitationsIf this project have some limitation, (for example if this project not work in some systems), it is good to define.
Maybe this limitation will remove in the future (add to roadmap).ContactContact me via: <<< EMAIL or WAY TO CONTACT >>>RoadmapFuture improvements (Remove limitations).One improvementFix somethingetc...ContributionsName of people or companies than contribute to this project.If you addcontributors fileto this project, this point is redundant.LicenseType of license of this project (Example: MIT license)If you addLICENSE fileto this project, this point is redundant.
Package: simplepysite
SimplepysiteThis is a super-simple static site generator. You can use it to write markdown files and quickly convert them to nicely-styled html. It is basically just some convenience functions built on top of the markdown library (required). This package will provide you with a very simple template for writing blog-like posts, as well as some simple css. Standard markdown syntax applies, and this is true for images and links.InstallMake sure you have activated your virtual environment and use pip:python -m pip install simplepysiteUsagecd to the directory where you would like to create a site, and run the following:python -m simplepysiteThis will create a template site for you. The "pages" folder contains the markdown files, and html files will be created wherever this command is run.If you are working this into a workflow, you can also import it as follows:fromsimplepysite.siteimportestablish_site,build_siteestablish_site()# creates a pages folder, a sample markdown file, and a generic style.css which can be editedbuild_site()# assuming there is a "pages" folder, all markdown files contained therein are converted to html
Package: simple-python-debugger
Simple-Python-DebuggerSimple Debugger Package for python.ExampleCodefrom spdb import debug


@debug
def binary_search(list_, value):
    list_size = len(list_) - 1

    index0 = 0
    indexn = list_size
    while index0 <= indexn:
        middle = (index0 + indexn) // 2

        if list_[middle] == value:
            return middle

        if value > list_[middle]:
            index0 = middle + 1
        else:
            index0 = middle - 1

    if index0 > indexn:
        return None


binary_search([x for x in range(10)], 7)Outputbinary_search(args: ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 7) kwargs: {}) -> 7
Time of Execution: 0.00
Package: simple_python_profiler
simple_python_profilerAn early look at asimplePython profiler, written in Python. Get started by typingpip install simple_python_profiler.DescriptionA profiler that times every function call and reports back the top 100 slowest functions.logs every function call means it's non-sampling, hence resource-intensive. If that's unsuitable, check out something likepy-spy.Usage:# your-script.pyfromsimple_python_profilerimportProfilerif__name__=='__main__':withProfiler():run_your_code()This will decorate all your top-level functions in your modules. System (built-in) and pip-installed packages (those that go indist-packages) are excluded.Since the default behaviour is to not include nested functions, you can profile your nested functions too as follows:fromsimple_python_profilerimportprofile_recursive# your-module.pydeftop_level_function():@profile_recursivedefinner_function():print('in inner fn')This recursive feature relies on thecodetransformerdependency. However, it has a few bugs in recent versions of Python. If you encounter runtime exceptions withsimple_python_profiler, use the second, non-recursive decorator:fromsimple_python_profilerimportprofile# your-module.pydeftop_level_function():@profiledefinner_function():print('in inner fn')Releasing on PyPIpipenv shellflit buildflit publishEnter password when prompted.TODOoption to include system packagesReleased under the MIT licence. See file named LICENCE for details.
Package: simple-python-project-template
project_titleproject_descriptionExplore the docs »View Demo·Report Bug·Request FeatureTable of ContentsAbout The ProjectBuilt WithGetting StartedPrerequisitesInstallationUsageRoadmapContributingLicenseContactAcknowledgmentsAbout The ProjectHere's a blank template to get started: To avoid retyping too much info. Do a search and replace with your text editor for the following:github_username,repo_name,twitter_handle,linkedin_username,email_client,email,project_title,project_description(back to top)Built WithNext.jsReact.jsVue.jsAngularSvelteLaravelBootstrapJQuery(back to top)Getting StartedThis is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple example steps.PrerequisitesThis is an example of how to list things you need to use the software and how to install them.npmnpminstallnpm@latest-gInstallationGet a free API Key athttps://example.comClone the repogitclonehttps://github.com/github_username/repo_name.gitInstall NPM packagesnpminstallEnter your API inconfig.jsconstAPI_KEY='ENTER YOUR API';(back to top)UsageUse this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.For more examples, please refer to theDocumentation(back to top)RoadmapFeature 1Feature 2Feature 3Nested FeatureSee theopen issuesfor a full list of proposed features (and known issues).(back to top)ContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly 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!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull Request(back to top)LicenseDistributed under the MIT License. SeeLICENSE.txtfor more information.(back to top)ContactYour Name -@twitter_handle-email@email_client.comProject Link:https://github.com/github_username/repo_name(back to top)Acknowledgments(back to top)
Package: simplepythonwer
SimplePythonWERThe purpose of this repo is to provide a well tested basic python implementation of levenshein / WER so it can be shared across projects.
It's based onthiswith a couple of minor changes.Getting StartedInstall with:pip install simplepythonwerImport with:from simplepythonwer import werUse with:>>>wer("the cat sat on the mat","the mat sat on the cat")0.3333333333333333FeaturesSimple, minimal and only in python with 0 external dependenciesIt is versioned and can be pip installedProvide examples withteststo ensure it's working correctlyCaveats and GotchasProviding an empty string or filled with whitespace ground-truth will intentionally raise a divide by zero.It's possible to have greater than 100% WER if the ASR result is many times larger than the ground-truth, this is normal.
It's sometimes a good idea to cap the results at a 100% with min function e.g.min(wer(ground_truth, new_asr_string), 1.0), otherwise you could be exposed to unlimited error rate that could skew your averages.Change Logv1.0.0 - First release - Minor ~15% speed improvements compared to originalv1.0.1 - Fixed pip packaging and added install steps. Exclude tests from pipv1.0.2 - Fixed pip packaging issuev1.0.3 - Fixed divide by zero error when the ground truth is zero length (including evaluates to zero length since it's just whitespace)TestsRun with:PYTHONPATH=$(pwd) python3 -m unittest discover .Results:rob@rob-T480s:~/projects/SimplePythonWER(master)$PYTHONPATH=$(pwd)python3-munittestdiscover.
..
----------------------------------------------------------------------
Ran9testsin0.001s

OKSpeed Improvementsfromsimplepythonwer.simplepythonwerimport*importtimeitsentence="the cat sat on the mat"*5print(timeit.timeit('levenshtein(sentence, sentence[::-1])',number=10000,globals=globals()))print(timeit.timeit('levenshtein_original(sentence, sentence[::-1])',number=10000,globals=globals()))38.1688277469947944.751817572047
Package: simplepytorch
Configure and train PyTorch models with a lot of the
details already or partially implemented.DISCLAIMER:This repo is used for my research.
New versions are not necessarily backwards compatible.  The API is
subject to change at a moment's notice.  If you happen to use it in your
research or work, make sure in your requirements.txt to pin the version
or reference the specific commit you used so you don't suffer unwanted
surprises.Installpip install --upgrade simplepytorchTry an exampleDownload and extract DRIVE dataset to ./data/DRIVE$ ls data/DRIVE 
test  test.zip  training  training.zipRun an experiment, and give it a name.$ python examples/simple_example.py  --experiment_id test_experiment_1 --epochs 10

$ ls results/test_experiment_1
checkpoints  log  perf.csvLook at training curves (note: demo only runs for 2 epochs)simplepytorch_plot test_experiment  --mode1-subplotsRun demo, with (customizable) guarantees that code completes exactly once and
distributes jobs across GPUs.  (note: uses Redis database to temporarily
monitor current jobs).redis-server  # must be installed to use the default example
./bin/example_experiments.shUse hyperparameter optimization with Ray Tune library.pip install -U "simplepytorch[ray]"

python examples/hyperparam_opt.py  --experiment_id test_hyperband_1Datasets:The library provides PyTorch Dataset implementations for different datasets.To use the pre-defined dataset classes, you must download the data and
unzip it yourself.  Consult Dataset class docstring for usage details.import simplepytorch.datasets as D

dset = D.RITE(use_train_set=True)
dset[0]For example, some downloaded datasets I use have the following structure:$ ls data/{arsn_qualdr,eyepacs,messidor,IDRiD_segmentation,RITE}
data/IDRiD_segmentation:
'1. Original Images'  '2. All Segmentation Groundtruths'   CC-BY-4.0.txt   LICENSE.txt

data/RITE:
AV_groundTruth.zip  introduction.txt  read_me.txt  test  training

data/arsn_qualdr:
README.md  annotations  annotations.zip  imgs1  imgs1.zip  imgs2  imgs2.zip

data/eyepacs:
README.md                 test          test.zip.003  test.zip.006  train.zip.001  train.zip.004
sample.zip                test.zip.001  test.zip.004  test.zip.007  train.zip.002  train.zip.005
sampleSubmission.csv.zip  test.zip.002  test.zip.005  train         train.zip.003  trainLabels.csv.zip

data/messidor:
Annotation_Base11.csv  Annotation_Base21.csv  Annotation_Base31.csv  Base11  Base21  Base31
Annotation_Base12.csv  Annotation_Base22.csv  Annotation_Base32.csv  Base12  Base22  Base32
Annotation_Base13.csv  Annotation_Base23.csv  Annotation_Base33.csv  Base13  Base23  Base33
Annotation_Base14.csv  Annotation_Base24.csv  Annotation_Base34.csv  Base14  Base24  Base34
Package: simple-pytree
Simple PytreeAdead simplePython package for creating custom JAX pytree objects.Strives to be minimal, the implementation is just ~100 lines of codeHas no dependencies other than JAXIts compatible with bothdataclassesand regular classesIt has no intention of supporting Neural Network use cases (e.g. partitioning)Installationpipinstallsimple-pytreeUsageimportjaxfromsimple_pytreeimportPytreeclassFoo(Pytree):def__init__(self,x,y):self.x=xself.y=yfoo=Foo(1,2)foo=jax.tree_map(lambdax:-x,foo)assertfoo.x==-1andfoo.y==-2Static fieldsYou can mark fields as static by assigningstatic_field()to a class attribute with the same name
as the instance attribute:importjaxfromsimple_pytreeimportPytree,static_fieldclassFoo(Pytree):y=static_field()def__init__(self,x,y):self.x=xself.y=yfoo=Foo(1,2)foo=jax.tree_map(lambdax:-x,foo)# y is not modifiedassertfoo.x==-1andfoo.y==2Static fields are not included in the pytree leaves, they
are passed as pytree metadata instead.Dataclassessimple_pytreeprovides adataclassdecorator you can use with classes
that containstatic_fields:importjaxfromsimple_pytreeimportPytree,dataclass,static_field@dataclassclassFoo(Pytree):x:inty:int=static_field(default=2)foo=Foo(1)foo=jax.tree_map(lambdax:-x,foo)# y is not modifiedassertfoo.x==-1andfoo.y==2simple_pytree.dataclassis just a wrapper arounddataclasses.dataclassbut
when used static analysis tools and IDEs will understand thatstatic_fieldis a
field specifier just likedataclasses.field.MutabilityPytreeobjects are immutable by default after__init__:fromsimple_pytreeimportPytree,static_fieldclassFoo(Pytree):y=static_field()def__init__(self,x,y):self.x=xself.y=yfoo=Foo(1,2)foo.x=3# AttributeErrorIf you want to make them mutable, you can use themutableargument in class definition:fromsimple_pytreeimportPytree,static_fieldclassFoo(Pytree,mutable=True):y=static_field()def__init__(self,x,y):self.x=xself.y=yfoo=Foo(1,2)foo.x=3# OKReplacing fieldsIf you want to make a copy of aPytreeobject with some fields modified, you can use the.replace()method:fromsimple_pytreeimportPytree,static_fieldclassFoo(Pytree):y=static_field()def__init__(self,x,y):self.x=xself.y=yfoo=Foo(1,2)foo=foo.replace(x=10)assertfoo.x==10andfoo.y==2replaceworks for both mutable and immutablePytreeobjects. If the class
is adataclass,replaceinternally usedataclasses.replace.
Package: simple-pyueye
DescriptionThis package is a high-level wrapper for the python bindings wrapperpyueye.
The package was designed for easier implementation.QuickStart$ from simple_pyueye import CameraObj as Camera
$ camera=Camera(CamID)
$ camera.open()
$ camera.capture_still(save=True,filename='img.png')
$ camera.close()Installation$pipinstallsimple-pyueye
$pipuninstallenum34# if your python version is 3.6 or higherRequirementsDillinger is currently extended with the following plugins. Instructions on how to use them in your own application are linked below.PackageExplanationpyueyePython bindings to ueye.dllnumpyarray managementpywin32Capturing Windows eventsopencvfor the demos live simple pre-processing examplepillowhandling images
Package: simpleQL
This module allows you to access a (DB API 2) SQL table using nothing but Python to build the query:import re
import sqlite3
from simpleql.table import Table

conn = sqlite3.connect(":memory:")
curs = conn.cursor()
curs.execute("CREATE TABLE test (a integer, b char(1))")
curs.executemany("INSERT INTO test (a, b) VALUES (?, ?)", ([1,'a'], [2,'b'], [3,'c']))
conn.commit()

table = Table(conn, "test", verbose=1)
for row in table:
    print rowThis will print:SELECT a, b FROM test;
{'a': 1, 'b': u'a'}
{'a': 2, 'b': u'b'}
{'a': 3, 'b': u'c'}Note that each row in the table is a dictionary. We can filter this using a generator expression:aspan = (1, 3)
for row in (t for t in table if min(aspan) < t['a'] < max(aspan)):
    print rowThis will print:SELECT a, b FROM test WHERE (1<a) AND (a<3);
{'a': 2, 'b': u'b'}As you can see, the query string is built from a generator expression.  You can also use list comprehensions. Regular expressions are supported by the use of there.searchmethod:filtered = [t for t in table if re.search('a', t['b'])]
print filteredWhich outputs:SELECT a, b FROM test WHERE b LIKE "%a%";
[{'a': 1, 'b': u'a'}]Note that since the module has to analyse the source code it doesn’t work on the interactive shell.The advantage of this approach over thesimilar recipeis that if the (efficient) query builder fails when it encounters a complex filter the data will still be filtered (unefficiently) by the generator expression.
Package: simple-query
SimpleQueryquery from containers of objects, in PythonQuery patternThe Query pattern uses criteria on classes and fields to retrieve
value objects from a dataset. Those criteria are a field, an operator,
and a value. For example, ('last_name', =, 'Fowler') or ('price', <, 100.00).Installationpip install simple-queryUsageall()returns the matching objects for a query, andfilter(*criteria)returns a new, filtered query, wherecriteria = field, operator, value.For example:fromsimple_query.queryimportQueryfromoperatorimporteq,gt,ltpeople=[Person('Ada Lovelace'),Person('Grace Hopper'),Person('Jean Bartik')]Query(people).all()# [Person('Ada Lovelace'), Person('Grace Hopper'), Person('Jean Bartik')]Query(people).filter('last_name',eq,'Lovelace').all()# [Person('Ada Lovelace')]Query(people)\.filter('first_name',gt,'B')\.filter('last_name',lt,'C').all()# [Person('Jean Bartik')]Setting up development environmentIt is always recommended to use a virtual environment for each
Python appplication. Create the environment once, after cloning
this repository to your machine.python3 -m venv .envFor each terminal session going forward, work on the virtual
environment and use its copy of python.source .env/bin/activateUpgrade pippip install -U pipInstall developer requirements for a nicer test runner (see Running Tests)pip install -r requirements/dev.txtRunning testsTests are written in unittest syntax, so no additional package are needed
to run thempython -m unittest discoverFor a more informative output, as well as plugins for
color and watch mode, use nose test runner. You can also use the test runner
of your choice.nosetests --rednose --with-watch