Saravanan666/pypi-org huggingface dataset:
Package: python-practice-field
Python practice fieldJust a practice field for making, linting, testing and describing python projects and setting CI/CD for it.Here is a Docker image that runs FastAPI server with two simple get and post methods.TO DO:CI:Добавить правила для коммитов:мануал шаг с деплоем на тестмануал шаг с деплоем на продGeneral:Добавить test coverageОписать все, что происходит в репо в шапкеRequirementspython ~3.10DebugClone repo first:gitclonegit@github.com:alexnazarv/training-project-api.gitRun without DockerInstall poetry:pipinstallpoetry==1.5.1Move to project directory and make a venv:cdtraining-project-api&&poetryshellInstall dependencies and run the app:poetryinstall&&poetryrunpython3-mapp.mainRun with DockerBuild image and run container:dockerbuild.-tapicontainer-tapicontainer:test&&dockerrun-d--rm--nameapicontainer-p8000:8000apicontainer:test&&dockerrmi$(dockerimages-f"dangling=true"-q)Clean up container and image:dockerrm-fapicontainer&&dockerrmi$(dockerimagesapicontainer-q)-fRun testspoetryrunpython3-mpytest--cov=appRun linterspoetryrunflake8.&&mypy.&&isort.
Package: python-pragmatic
Pragmatic tools and utilities for Python projects.Tested on Python 2.7.RequirementsSome utilities require additional libraries as:Pillow/PILpyBarcodeInstallationUsing pip: pip install python-pragmaticUsageClassesget_subclasses(classes, level=0)Return the list of all subclasses for given class (or list of classes).get_parent_classes(class)Return the list of all parent classes for given class.Datesdiff_month(date_from, date_to)Returns number of months between dates ‘date_from’ and ‘date_to’diff_days(date_from, date_to)Returns number of days between dates ‘date_from’ and ‘date_to’week_range(date)Returns a tuple of ‘(start_date, end_date)’ of week range by given date.OSbase64_to_file(content, file_path)Stores base64 encoded content to file.Stringsgenerate_hash(length=5)Returns random generated stringbarcode(code, args=None)Returns barcode as string encoded in base64 format.remove_accents(input)Returns input string without accent characters.Thirdpartyclass BarcodeImageWriter(ImageWriter)Fixed version of barcode.writer.ImageWriter.
Package: python-prakashravip1
ravi-python-clientsAssortment of python client for personal or business useCurrent FacilitiesLogger with unique identifier per sessionWindows Installationpy -m venv venv
source venv\Scripts\activate
py -m pip install python-prakashravip1Linux/ Mac Installationpython-mvenvvenvsourcevenv/bin/activate
pipinstallpython-prakashravip1ExampleDelta Lake Write clientCreate/Delete Delta Lake Databasefromsrc.delta_lake.delta_lake_sparkimportcreate_database,delete_databaseDB_NAME="food_db"create_database(DB_NAME)delete_database(DB_NAME)Create Delta Lake Tablefromsrc.delta_lake.delta_lake_sparkimportcreate_database,create_table_with_schemaDB_NAME="food_db"TABLE_NAME="indian_food"create_database(DB_NAME)create_table_with_schema(db=DB_NAME,table=TABLE_NAME,schema=[("food_type","STRING"),("name","STRING"),("price","FLOAT")],partition_cols=["food_type"])Loggingfromutils.loggerimportloggerlogger.info("test info log")fromutils.trace_loggerimportget_trace_loggertest_trace_id="1234"logger=get_trace_logger(test_trace_id)logger.info(f"test info log with trace_id.{test_trace_id}")
Package: pythonpredictions-cobra
Cobrais a Python package to build predictive models using linear or logistic regression with a focus on performance and interpretation. It consists of several modules for data preprocessing, feature selection and model evaluation. The underlying methodology was developed atPython Predictionsin the course of hundreds of business-related prediction challenges. It has been tweaked, tested and optimized over the years based on feedback from clients, our team, and academic researchers.Main featuresPrepare a given pandas DataFrame for predictive modelling:partition into train/selection/validation setscreate bins from continuous variablesregroup categorical variables based on statistical significancereplace missing valuesadd columns where categories/bins are replaced with average of target values (linear regression) or with incidence rate (logistic regression)Perform univariate feature selection based on RMSE (linear regression) or AUC (logistic regression)Compute correlation matrix of predictorsFind the suitable variables using forward feature selectionEvaluate model performance and visualize the resultsGetting startedThese instructions will get you a copy of the project up and running on your local machine for usage, development and testing purposes.RequirementsThis package requires only the usual Python libraries for data science, being numpy, pandas, scipy, scikit-learn, matplotlib, seaborn, and tqdm. These packages, along with their versions are listed inrequirements.txtand can be installed usingpip:pip install -r requirements.txtNote: if you want to install Cobra with e.g. pip, you don’t have to install all these requirements as these are automatically installed with Cobra itself.InstallationThe easiest way to install Cobra is usingpip:pip install -U pythonpredictions-cobraDocumentation and extra materialAblog poston the overall methodology.Aresearch articleby Geert Verstraeten (co-founder Python Predictions) discussing the preprocessing approach we use in Cobra.HTML documentation of theindividual modules.Step-by-steptutorialsfor a logistic and a linear regression use case.Check out the Data Science Leuven Meetuptalkby one of the core developers (second presentation). Hisslidesandrelated materialare also available.Contributing to CobraWe’d love you to contribute to the development of Cobra! There are many ways in which you can contribute, the most common of which is to contribute to the source code or documentation of the project. However, there are many other ways you can contribute (report issues, improve code coverage by adding unit tests, …).
We use GitHub issues to track all bugs and feature requests. Feel free to open an issue in case you found a bug or in case you wish to see a new feature added.For more details, check out ourwiki.
Package: python_prefork
This module is inspired by Parallel::Prefork in CPAN.As Parallel::Prefork, this module is intended to be
some operations done in parallel.Simple example of usage is followings>>> from python_prefork import PythonPrefork
>>> pp = PythonPrefork()
>>> while not pp.signal_received:
>>>     if pp.start(): continue
>>>
>>>     run() # do some task in child process
>>>
>>>     pp.finish()
>>> pp.wait_all_children()Some options can be set in constructor[ max_workers ]
maximum number of child processes to fork[trap_signals]
arrays of signals to be trapped.
parent process will send these signals to all children[on_reap_cb]
function to be called when a child is end.
This function must have two parameters, child pid and exit status.
Package: python-premailer
python-premailer converts HTML with style tags into HTML with inline style attributes; gmail won’t render nice without it!I made it so I could send colorized git diffs of func-inventory around…Use:$ sudo pip install python-premailer$ python>>> from pypremailer import Premailer
>>> head = '<html><head><style>foo {size:10px;}</style></head>'
>>> body = '<body><span class="foo">bar</span></html>'
>>> html = '%s%s' % ( head, body )
>>> p = Premailer(html)
>>> p.premail()
    <html><head></head><body><span style="size: 10px">bar</span></body></html>Get the source:http://github.com/ralphbean/python-premailerOn PyPI:http://pypi.python.org/pypi/python-premailerExcuses, excusesThis definitely already exists in pypi under the name ‘premailer’, but I wanted to reimplement it without the use of lxml.Check it out!http://pypi.python.org/pypi/premailerAnother package called pyinliner might do the job for you as well:http://pypi.python.org/pypi/pynlinerInspired byEmogrifier (php):http://www.pelagodesign.com/sidecar/emogrifier/Premailer (ruby):http://premailer.dialect.ca/
Package: python-presence
python-presenceA minimal implementation of a serverless XMPP client.InstallationClone this repository and runpip install .ORInstall from PyPi:pip install python-presenceUsage (example client)There is a minimal python script calledpython-presencefor running
a service:usage: python-presence [-h] [-d] [-k] [-f] [-v]

python-presence

optional arguments:
  -h, --help     show this help message and exit
  -d, --daemon   run as daemon
  -k, --kill     kill running instance if any before start
  -f, --force    force start on bogus lockfile
  -v, --verboseDefault client commandsThe client currently supports the following built-in trigger
commands/keywords:CommmandDescriptionechoecho message texthelpprint a list of commandshelloprint a hello messagevarsprint variableslslist contents of download directoryExtending the client with custom commandsA simple application of client commands is remote query of system
information.importsubprocesscommands={'df':ClientThread.make_command(func=staticmethod(lambdaclient,_:client.send_ascii(subprocess.check_output("df -h",shell=True).decode('utf-8'))),helptext='show list of processes',),'ps':ClientThread.make_command(func=staticmethod(lambdaclient,_:client.send_ascii(subprocess.check_output("ps aux",shell=True).decode('utf-8'))),helptext='show list of processes',),}System integrationmisc/presence.serviceis a template file for configuring an Avahi
service. After copying to/etc/avahi/servicesthe service
advertisement should immediately show up in clients on the same subnet.misc/python-presence.serviceis a systemd service than can be used
as-is after copying to/etc/systemd/system.The files are also available in the data folder of the PyPi package.
Package: python-print-extended
print-extendedAn extended version of the print function.The intent is to make it easy to print pretty outputs, with an interface
that Python beginners who just made their first "Hello World" can use.You can always usepprint,sys.stderr, etc., and probably should for
complex usage. As stated, this is to be beginner-friendly. Functionality
will be sacrificed for ease-of-use.Featuresprint.groupandprint.endgroupto create indentation levelsforeground colorsprint.red('foo')print.green('foo')print.blue('foo')print.yellow('foo')print.magenta('foo')print.cyan('foo')print.rgb(r, g, b)('foo')background colorsprint.on_red('foo')print.on_green('foo')print.on_blue('foo')print.on_yellow('foo')print.on_magenta('foo')print.on_cyan('foo')print.on_rgb(r, g, b)('foo')text stylesprint.bold('foo')print.italic('foo')print.underline('foo')Also chainable!print.red.bold.italic('error')eprintto simplify printing to STDERRDevelopment# Activate virtual environmentpython-mpipinstall-Upip
python-mpipinstall.
python-mpipinstall-rrequirements-dev.txt
pre-commitinstall
Package: python-printr
python-printrPython print functions to beautify outputInstallation:pip install python-printrUsage:from printr import logger

logger = logger(filename='test.log')
log, current_time = logger.log, logger.current_time

log('Here') # Prints to terminal and saves message to test.logfrom printr import print, same_line, current_time

test_list = [{'id': 1, 'name': 'Leanne Graham', 'username': 'Bret', 'email': 'Sincere@april.biz', 'address': {'street': 'Kulas Light', 'suite': 'Apt. 556', 'city': 'Gwenborough', 'zipcode': '92998-3874', 'geo': {'lat': '-37.3159', 'lng': '81.1496'}}, 'phone': '1-770-736-8031 x56442', 'website': 'hildegard.org', 'company': {'name': 'Romaguera-Crona', 'catchPhrase': 'Multi-layered client-server neural-net', 'bs': 'harness real-time e-markets'}}, {'id': 2, 'name': 'Ervin Howell', 'username': 'Antonette', 'email': 'Shanna@melissa.tv', 'address': {'street': 'Victor Plains', 'suite': 'Suite 879', 'city': 'Wisokyburgh', 'zipcode': '90566-7771', 'geo': {'lat': '-43.9509', 'lng': '-34.4618'}}, 'phone': '010-692-6593 x09125', 'website': 'anastasia.net', 'company': {'name': 'Deckow-Crist', 'catchPhrase': 'Proactive didactic contingency', 'bs': 'synergize scalable supply-chains'}}]

print(test_list) # Formats dictionary with indents
print() # Print a line break
same_line('test', current_time=True) # Print the current_time with the message test to the same line
sleep(1)
same_line('testing', current_time=True) # Print the current_time with the message testing to the same lineOutput:[
    {
        "id": 1,
        "name": "Leanne Graham",
        "username": "Bret",
        "email": "Sincere@april.biz",
        "address": {
            "street": "Kulas Light",
            "suite": "Apt. 556",
            "city": "Gwenborough",
            "zipcode": "92998-3874",
            "geo": {
                "lat": "-37.3159",
                "lng": "81.1496"
            }
        },
        "phone": "1-770-736-8031 x56442",
        "website": "hildegard.org",
        "company": {
            "name": "Romaguera-Crona",
            "catchPhrase": "Multi-layered client-server neural-net",
            "bs": "harness real-time e-markets"
        }
    },
    {
        "id": 2,
        "name": "Ervin Howell",
        "username": "Antonette",
        "email": "Shanna@melissa.tv",
        "address": {
            "street": "Victor Plains",
            "suite": "Suite 879",
            "city": "Wisokyburgh",
            "zipcode": "90566-7771",
            "geo": {
                "lat": "-43.9509",
                "lng": "-34.4618"
            }
        },
        "phone": "010-692-6593 x09125",
        "website": "anastasia.net",
        "company": {
            "name": "Deckow-Crist",
            "catchPhrase": "Proactive didactic contingency",
            "bs": "synergize scalable supply-chains"
        }
    }
]

14:25:49:620170: test
# One second later this line was overwritten with testing
14:25:50:620170: testing
Package: pythonpro
PythonproOn this repository there are files associate to the course pythonpro where I'm learning to code in Python.FoldersAll my files work with python 3.ExamplesIn this folder the files exemplify the use of some concepts in the python language ðŸš€ExercisesIn this folder are the files corresponding to the exercises I have done to learn how to program in pythonInstagram_projects_instapyUsing the open source libraryinstapyI have some small projects where I try this library.
Package: python-project-boilerplate
This library created folder structure in python.
You can use this package as command  -> py_boilerplate .main.py -> Here is the main file of your code.Config -> This is for all your config files.Docs -> Put all your Docs in this folder.Logs -> In this folder all your logs will be maintained.src -> All your source codes will be kept here.Utility -> All your utility code will be kept here.
Package: python-project-bootstrap
Python Project BootstrapStart your new python project with a ready to install directory and scripts structure.RequirementsJinja 1.2InstallationTo install the services just run the setup.py script with the install argument$./setup.pyinstallHow to ContributeCheck for open issues or open a fresh issue to start a discussion
around a feature idea or a bug.Fork therepositoryon GitHub to start making your changes to themasterbranch (or
branch off of it).Write a test which shows that the bug was fixed or that the feature
works as expected.Send a pull request and bug the maintainer until it gets merged and
published.LicenseCopyright 2016 Ricardo Oyarzun

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: python-project-creator
This tool generates help you start a new Python project by generating its starting code. In the current stage it only generates very simple project, but more is planned to be added in the future (including a Flask project with features selection).To install this tool run:pip install python-project-creatorAfter installing you will have access to theppctool on your terminal. To know more about the tool and its commands run:ppc --helpYou can use the commandcreateto create a new project. It follows the syntax:ppc create --template <template> <output>Where:template: The template to use for the project. If no template is informed thebasictemplate will be used (check more below).output: The output directory where the project will be created.Currently it support the folloging templates:BasicThis is a very simple template to use when starting a new project. It only creates a blankmain.pyfile.To use this template run:ppc create --template basic <output>CPThis template can be used when solving programming exercises in Online Judges (OJs) using the Python language. Some examples of OJs areNeps Academy,Codeforces,KattisandBeecrowd.This template will create the following structure:main.pyinput.txtoutput.txtWheremain.pycan be used to solve the problem. The input and output files are used to test the solution.To use this template run:ppc create --template cp <output>PIPThis template creates the structure that is needed when creating a package that will be uploaded toPiPy.It will create:module folder: where you will write your module's code.main.py: to showcase a concrete example using your module.setup.py: contains the configuration of your project and creates thewheelneeded when uploading your module toPiPy.README.md: where you will describe what is and how to use your module.To use this template run:ppc create --template pip <output>This template will ask for some additional information during the creating. The information you provide will be filled in some parts of your project's files.Build and UploadTo build new this project run:python setup.py sdist
python setup.py bdist_wheelTo upload a new version use (don't forget to update the version number insetup.py):twine upload dist/*
Package: python_project_generator
# An Generator of Python Project------Follow the recommendation of [Kenneth Reitz](http://docs.python-guide.org/en/latest/writing/structure/), you can generate the project immediately.## usagepip install python_project_generatorpygen [-h] [--dir DIR] [--name NAME] [--author AUTHOR][--email EMAIL]Args of Pyhton Project Generator**optional arguments**:-h, --help       show this help message and exit-dir DIR         target dir of the project, default is currentdir,it must be abspath path and empty.--name NAME      name of the project which you want generate--author AUTHOR  author of the project--email EMAIL    email of the author
Package: python-project-minify
Python Project MinifyCompile your python project into the most compact version it can be.
This package internally uses the greatPython Minifierpackage.InstallationInstall using PIPpip install python-project-minifyNote thepiprefers to the Python 3 package manager. In environment where Python 2 is also available the correct command may bepip3.UsageIn consoleRun theminify-projectcommand in the terminal. It takes two argumentssrcanddst.minify-project path/to/src path/to/dstPython APIImport python_project_minify:import python_project_minifyIt's simple, just provide a source and destination path:python_project_minify.directory('path/to/src', 'path/to/dst')If you are providing paths with backslashes instead of forwardslashes like the example above, make sure to pass it with therprefix. This way it will be treated as a raw string and won't throw an error.python_project_minify.directory(r'path\to\src', r'path\to\dst')Ignoring files and folders:Create a file called.ppmignorein the root of your project.## Ignore file in root
file.txt

## Ignore specific file
folder/subfolder/file.txt

## Wildcard ignore file
*file.txt

## Ignore folder in root
/folder

## Ignore specific folder
/folder/subfolder

## Wildcard ignore folder
*/folder

## If for some reason it's necessary to keep the .ppmignore file in the destination folder
PRESERVE_PPMIGNORESupportIf you found a problem with the software, pleasecreate an issueon GitHub.MaintainerThis project is maintained byWibo Kuipers.ContributingYour contributions are highly appreciated. Pleasecreate a pull requeston GitHub. Bigger changes need to be discussed with the development team via theissues section at GitHubfirst.LicenseMIT LICENSE
Package: python-project-poetry-template
Python Project Poetry TemplateThis is a template of a python project with all CI/CD tools implemented.Featuresdirenvsupportcommitizensupportpre-commitsupportGithub Actions supportVersion bumping supportExternal requirements:direnvtaskgit-flowUnderstand how it worksMaking new releases with git is not that simple. Actually, this mechanism with the current tools we have does not
really support well nomenclature change in the git history. If you want to experiment, you may want to sometime
reset your git history to start from a fresh clean.HowtoCompletely reset the projectLocally:git clone REPO -b <BRANCH_YOU_WANT_TO_KEEP> RESETgit clonegit@github.com:mrjk/python-project-poetry-template.git -b main RESETcd RESETrm -rf .gitgit init .git add .git commit -m "Initial commit"On github (if you want to clean actions and releases as well):Delete your repositoryRecreate your repo with the same nameEnsure in the settings:Settings/Actions/GeneralCheck: Allow all actionsSettings/PagesCheck: Deploy from branchBranch: gh_pageDir: / (root)Finally, locally:git remote add origingit@github.com:/.gitgit push -u --force origin master
Package: python-project-template
DescriptionPython demo project using setup.py, tox, Makefile build and
sample unittests.Install$gitclonehttps://github.com/rpappalax/python-project-template.git$cdpython-project-template$pythonsetup.pydevelop$makebuildUsage$source./build/venv/bin/activate$demoReferencehttp://learnpythonthehardway.org/book/ex46.htmlhttp://foobar.lu/wp/2012/05/13/a-comprehensive-step-through-python-packaging-a-k-a-setup-scripts/https://chriswarrick.com/blog/2014/09/15/python-apps-the-right-way-entry_points-and-scripts/http://stackoverflow.com/questions/15724093/difference-between-python-setup-py-install-and-pip-installhttps://caremad.io/2013/07/setup-vs-requirement/http://stackoverflow.com/questions/1471994/what-is-setup-pyhttps://tox.readthedocs.org/en/latest/https://travis-ci.org/
Package: python-project-templates
Python Project TemplateThis is a template repository for python project.checkGitHub documentaboud template repository.CI/CDfor detail about badges, seeGitHub documentationreadthedocs build badgesThis project is integrated with./scripts/ci.shYou should run the script every time before git commit.docker environmentUse docker to avoid annoying environment conflicts.First, you must set the project name indocker/.envfile.then you can rundocker-compose up -dcommand
to build an docker image with default Dockerfile.$cddocker\&&docker-composeup-dfor details about docker, see official documentationsDockerDocker ComposeDocumentingYou can use documenting tools likesphinxmkdocsand host it onreadthedocsPython Project Template's documentationsphinxshpinx-apidocgenerate document with sphinx-apidoc command.scriptconfigurations (todo)sphinx extensionshttps://www.sphinx-doc.org/en/master/usage/extensions/index.htmlnapoleonhttps://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#module-sphinx.ext.napoleonnumpy stylehttps://numpydoc.readthedocs.io/en/latest/format.html#docstring-standardgoogle stylehttps://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstringspublish package to Pypihit this command on terminal to publish the current version to Pypi.$./scripts/publish.shauto updating with github actions is coming soon.Quick Start using this template.edit project name for docker environment.edit project configurationeditpyproject.toml's metadata section.delete such astool.poetry.scriptsand so on needless.edit documentation configuration.docs/_*.conf.pyfiles.scripts/generate_sphinx_docs_headers.py.readthedocs.yaml'ssphinx.configurationoption (optional).Rewrite your own project README.deletesrc/package_*directories.now it's time to start make your own package.