Saravanan666/pypi-org huggingface dataset:
Package: pre-commit-matlab
pre-commit-matlabA collection ofpre-commithooks for MATLABOk... it's just one hook so far but maybe someday there will be more 😃Using pre-commit-matlab with pre-commitAdd this to your.pre-commit-config.yaml-repo:https://github.com/sco1/pre-commit-matlabrev:v1.2.0hooks:-id:matlab-reflow-commentsargs:[--line-length=100]Hooksmatlab-reflow-commentsReflow inline comments (lines beginning with%) or block comments (delimited by%{and%}) in MATLAB file(s) (*.m) to the specified line length.Blank comment lines are passed back into the reformatted source code.Use--line-lengthto specify line length. (Default:75)Use--reflow-block-commentsto control block comment reflow. (Default:True)Use--ignore-indentedto ignore comments with inner indentation. (Default:True)NOTE:This logicis notapplied to the contents of a block comment.Use--alternate-capital-handlingto treat comment lines that begin with a capital letter as the start of a new comment block. (Default:False)NOTE:This logicis notapplied to the contents of a block comment.Ifignore-indentedisTrue, comments that contain inner indentation of at least two spaces is passed back into the reformatted source code as-is. Leading whitespace in the line is not considered.For example:% This is not indented% This is not indented%  This is indented%    This is indentedIfalternate-capital-handlingisTrue, if the line buffer has contents then a line beginning with a capital letter is treated as the start of a new comment block.For example:% This is a comment line% This is a second comment line that will not be reflowed into the previous lineNOTE:As an opinionated flag, this may lead to false positives so it is off by default. If enabled, pay close attention to the resulting diff to ensure that your comments are being reflowed as desired.
Package: pre-commit-mirror-maker
pre-commit-mirror-makerScripts for creating mirror repositories that do not have
.pre-commit-hooks.yamlInstallation$ pip install pre-commit-mirror-makerSample UsageTo see all supported configuration options, run:$pre-commit-mirror--helpFor example: making a mirror of the yapf package:$gitinitmirrors-yapfInitialized empty Git repository in /tmp/mirrors-yapf/.git/$pre-commit-mirrormirrors-yapf--languagepython--package-nameyapf--args=-i--typespython[main (root-commit) 88bffee] Mirror: 0.1.33 files changed, 16 insertions(+)create mode 100644 .pre-commit-hooks.yamlcreate mode 100644 .versioncreate mode 100644 setup.py[main 24cd5f4] Mirror: 0.1.42 files changed, 2 insertions(+), 2 deletions(-)[main 6695a76] Mirror: 0.1.5...[main 091ab92] Mirror: 0.22.02 files changed, 2 insertions(+), 2 deletions(-)$ls-almirrors-yapf/total 24drwxrwxr-x 3 asottile asottile 4096 May 26 10:00 .drwxrwxr-x 8 asottile asottile 4096 May 26 10:00 ..drwxrwxr-x 8 asottile asottile 4096 May 26 10:00 .git-rw-rw-r-- 1 asottile asottile  136 May 26 10:00 .pre-commit-hooks.yaml-rw-rw-r-- 1 asottile asottile  137 May 26 10:00 setup.py-rw-rw-r-- 1 asottile asottile    7 May 26 10:00 .version
Package: pre-commit-poetry-export
pre-commit-poetry-exportpre-commit hook to keep requirements.txt updatedWhy?Your life is easier and the build is faster if you use requirements.txt file to install dependencies inside a docker image. But, it's not hard to forget to update the requirements file using poetry export and remember only when CI can't build the image.How it WorksIn every commit this hook runs the following steps:If requirements.txt doesn't existIt will be created and hook failsIf requirements.txt existsThe hook will copy it's content to a file named old.requirements.txtThen it will generate another requirements.txt usingpoetry exportand compare the content of the two filesIf they match you're good to go, if not the hook fails with 'requirements updated' messageIf the hook has updated or created your requirements file, you can nowgit add requirements.txtand finish your commit.Found any issues or want to suggest an improvement in the code?
Please contribute, open an issue /hereThanks! :)
Package: pre-commit-pylint-wrapper-pythonpath
This is a simple pre-commit hook wrapper aroundpylint.In contrast to the ‘official’ pre-commit provided mirror this wrapper adds the
to-be-checked project root to thePYTHONPATHinside the hook venv created by
pre-commit which is necessary for some configurations (e.g. to use repo local
pylint plugins).NoteThis can potentially have unintended side-effects if anything in the
project root shadows any of the pylint dependencies.
Package: pre-commit-run-hook-entry
Runpre-commithook entry. Allow to run pre-commit hooks for text editor
formatting / linting needs.Danger ZoneIMPORTANT:This is highly experimental tool aspre-commit internals does
not intend to be used in other scripts.
It might be broken after new pre-commit release.TO USE WITH CAUTION!RequirementsPython3.7 or laterpre-commit2.19.0 or laterLicensepre-commit-run-hook-entryis licensed under the terms ofBSD-3-Clauselicense.Installationpipinstallpre-commit-run-hook-entryUsagepre-commit-run-hook-entryHOOK[ARGS]pre-commit-which-hook-entryHOOKPrerequisitespre-commit-run-hook-entryonly works in directories, wherepre-commitrun--allHOOKis executable.VS Code IntegrationExample below illustrates how to configure VS Code to use black, flake8 &
mypy pre-commit hooks for formatting & linting,{"python.formatting.provider":"black","python.formatting.blackPath":"pre-commit-run-hook-entry","python.formatting.blackArgs":["black"],"python.linting.enabled":true,"python.linting.flake8Enabled":true,"python.linting.flake8Path":"pre-commit-run-hook-entry","python.linting.flake8Args":["flake8"],"python.linting.mypyEnabled":true,"python.linting.mypyPath":"pre-commit-run-hook-entry","python.linting.mypyArgs":["mypy"]}Sublime Text 3 IntegrationsublackFrom one pointsublackhas builtin
pre-commit integration, but it seems do not respect settings frompyproject.toml, to fix this usepre-commit-run-black-entryassublack.black_command,{"sublack.black_command":"pre-commit-run-black-entry"}SublimeLinter-flake8{"SublimeLinter.linters.flake8.executable":"pre-commit-run-hook-entry","SublimeLinter.linters.flake8.args":["--","flake8"]}SublimeLinter-contrib-mypy{"SublimeLinter.linters.mypy.executable":"pre-commit-run-hook-entry","SublimeLinter.linters.mypy.args":["--","mypy"]}SublimeJsPrettierFirst, you need to find out path to prettier hook entry with,pre-commit-which-hook-entryprettierThen, paste command output (<OUTPUT>) into plugin config,{"js_prettier":{"prettier_cli_path":"<OUTPUT>"}}SublimeLinter-eslintFirst, you need to find out path to eslint hook entry with,pre-commit-which-hook-entryeslintThen, paste command output (<OUTPUT>) into plugin config,{"SublimeLinter.linters.eslint.executable":"<OUTPUT>","SublimeLinter.linters.eslint.env":{"NODE_PATH":"<OUTPUT>/../../lib/node_modules"}}IMPORTANT:If you’re using anyadditionalDependenciesfor eslint hook,
you need to configureNODE_PATH, so plugin will be able to find out given
dependencies.Issues & Feature RequestsFeel free to submit new issue or feature requestat GitHub
Package: precompose
precomposeprecomposeis a tool to import aComposeapplication into anOSTreerepository.Distributing container images through an OSTree repository has some advantages, compared to the use of a container registry:Images are deduplicated at the file level with OSTree, instead of at the layer level.If your host is also managed by OSTree and is based on the same OS as your containers, then images are also deduplicated at the file level against the host.Updates are done at the file level, instead of at the layer level - this can save significant amounts of bandwidth when only one or a few files in a layer have changed.precomposeproduces an OSTree commit which contains:Your originaldocker-compose.yml, rewritten to pin each image to a specific SHAA directory containing exploded copies of all the containers your application needs, which can be used as anadditional image storewithPodmanRequirementsIn addition to the Python modules that it requires,precomposealso needs some external tools to do its work:Docker ComposeWhiledocker-composecan be installed from PyPI,precomposeonly uses it as an external tool, since it does not have a stable API. Because it is not used as a library, and because you may have obtaineddocker-composefrom a place other than PyPI, it is not declared as a Python dependency of this module. It is used to preprocess the Compose file and interpolate any environment variables that may be present in the image name.docker-composeis also needed to run an application packaged withprecompose.OSTreeprecomposeshells out to theostreecommand-line tool in order to create its commits.Podmanprecomposeshells out topodman unshareto simulate being root and topodman pull --rootto pull container images.Your system must be configured in a way thatpodmancan operate without root privileges (aka "rootless containers") - on most Debian and Ubuntu based systems, installing theuidmappackage along with Podman should be enough. Your mileage may vary.podmanis also needed to run an application packaged withprecompose, since Docker does not have anything equivalent to an additional image store. It is strongly recommended to use version 3.0 or later of Podman; the APIs used bydocker-composeare incomplete in earlier versions.InstallationInstall using pip:pip3installprecompose...or, grab the latest release fromGitHuborPyPIand install it manually.Usageprecompose [-h] [--repo OSTREE] [--sign-by KEYID] [--arch ARCH] [--variant VARIANT] BRANCH COMPOSE

Import a Docker Compose application into ostree

positional arguments:
  BRANCH             ostree branch to commit to
  COMPOSE            path to docker-compose.yml

optional arguments:
  -h, --help         show this help message and exit
  --repo OSTREE      ostree repo to import to
  --sign-by KEYID    sign commit with GPG key
  --arch ARCH        architecture to import
  --variant VARIANT  variant to importUtilitiesprecompose_utils(onGitHubandPyPI) contains a set of utilties for working with applications that have been packaged withprecompose.
Package: precompose-utils
precompose_utilsThis is a set of tools for working with applications packaged byprecompose.precompose-mountusage: precompose-mount [-h] [--overwrite] [--override-name NAME] REF

Mount a precomposed application

positional arguments:
  REF                   ostree ref to mount

optional arguments:
  -h, --help            show this help message and exit
  --overwrite           overwrite existing app
  --override-name NAME  override app nameprecompose-unmountusage: precompose-unmount [-h] [--quiet] [--force] APP

Unmount a precomposed application

positional arguments:
  APP         app to unmount

optional arguments:
  -h, --help  show this help message and exit
  --quiet     suppress output
  --force     ignore running containersprecompose-cleanusage: precompose-clean [-h] [--quiet]

Clean up unused checkouts

optional arguments:
  -h, --help  show this help message and exit
  --quiet     suppress output
Package: precondition-opt
precondition: Preconditioning OptimizersInstallation (note package name ispreconditionbut pypi distribution name isprecondition-opt):pip3 install -U precondition-optCurrently, this contains several preconditioning optimizer implementations. Please refer to the citations below.Shampoo (distributed_shampoo.py)@article{anil2020scalable,
  title={Scalable second order optimization for deep learning},
  author={Anil, Rohan and Gupta, Vineet and Koren, Tomer and Regan, Kevin and Singer, Yoram},
  journal={arXiv preprint arXiv:2002.09018},
  year={2020}
}Sketchy (distributed_shampoo.py), logical reference implementation as a branch in Shampoo.@article{feinberg2023sketchy,
  title={Sketchy: Memory-efficient Adaptive Regularization with Frequent Directions},
  author={Feinberg, Vladimir and Chen, Xinyi and Sun, Y Jennifer and Anil, Rohan and Hazan, Elad},
  journal={arXiv preprint arXiv:2302.03764},
  year={2023}
}SM3 (sm3.py).@article{anil2020scalable,
  title={Scalable second order optimization for deep learning},
  author={Anil, Rohan and Gupta, Vineet and Koren, Tomer and Regan, Kevin and Singer, Yoram},
  journal={arXiv preprint arXiv:2002.09018},
  year={2020}
}This external repository was seeded from existing open-source work available atthis google-research repository.This is not an officially supported Google product.
Package: preconditiontogsq
preconditiontogsqA Python library for converting Stardew Valley event preconditions to Game State Queries.FeaturesConverting vanilla preconditions to GSQs.InstallationpipinstallpreconditiontogsqUsage and Examplesfrompreconditiontogsqimportconvertprint(convert('t 600 1400'))# TIME 600 1400Further examples can be found in thetestsdirectory.Development/TestingInstall dependencies withpip install -r requirements.txtTests can be added to tests/name_of_test.py and run withpy -m tests.name_of_testIt can be built withpy -m build
Package: precountify
precountifyA tool for adding pre-count (count-off) click to audio file.Requirementspython >= 3.4Installpipinstallprecountify# with madmompipinstallprecountify[madmom]# with essentia (linux only)pipinstallprecountify[essentia]Usage# precountify INPUT_FILE OUTPUT_FILE#   [--sr SAMPLE_RATE] [--bpm BPM] [--meter METER] [--measure N_MEASURES] [--upbeat N_UPBEATS]#   [--offset OFFSET_IN_SECONDS] [--margin MARGIN_IN_SECONDS] [--click CLICK_FILE] [--estimator ESTIMATOR_MODULE]# Add pre-count to output.wav with tempo estimation (using librosa)precountifyinput.wavoutput.wav# Add pre-count which has specified bpmprecountifyinput.wavoutput.wav--bpm120# Use `MadmomTempoEstimator`precountifyinput.wavoutput.wav--estimator'precountify.estimator.madmom.MadmomTempoEstimator'
Package: precreal
This is a Python package to do exact real arithmetic, the following is an example using it:fromprecrealimportReal,intpow>>>0.1+0.2==0.3# Precision lossFalse>>>Real("0.1")+Real("0.2")==Real("0.3")# The Real class has NO precision loss when doing arithmeticTrue>>>intpow(Real(2),100)1267650600228229401496703205376You can also runprecreal_test, which tests three features of this package.changelog:1.0.0 First version1.0.1 Fixed a setup.py bug
Package: prectime
import prectime
import time
import io


@prectime.function
def request_far_away():
    # requesting to server...
    time.sleep(3)
    response = "Hello!"
    return response

response = request_far_away()
# stdout >>> request_far_away - 3.0004s

@prectime.function() # this works too
def request_not_far_away():
    # requesting to server...
    time.sleep(0.01)
    response = "Here!"
    return response


@prectime.methods
class BigCalculation(object):
    def pi(digits: int):
        time.sleep(digits // 100_000)
        return
    
    def matrix_mul(a, b):
        a_cols = len(a[0])
        a_rows = len(a)
        b_rows = len(b)
        o_n = a_cols * b_rows * a_rows
        time.sleep(o_n)
        return


pi = BigCalculation.pi(100_000)
# stdout >>> pi - 1.0005s
new_matrix = BigCalculation.matrix_mul([[1, 2], [3, 4]], [[1, 2], [3, 4]])
# stdout >>> matrix_mul - 8.0005s


def tetration(base, height):
    n = base
    for _ in range(height - 1):
        n = base ** n
    return n

with prectime.context("big number"):
    result = tetration(8, 3)
# stdout >>> big number - 0.3087s

# you can create own class to point (output, round_digits, format)
stream = io.StringIO()
my_measure = prectime.Measure(output=stream,
                              round_digits=1,
                              format="{name} --> {time} seconds\n")


with my_measure.context("test"):
    time.sleep(0.459)

# stream >>> test --> 0.5 seconds

@prectime.function(stream)
def last_example():
    return None and None

last_example()
# stream >>> last_example - 0.0s
Package: precursion
precursionprecursion– Python module to avoidRecursionError: maximum recursion depth exceededeasilyUsageOk, let's write recursive function:defsumrange(x):ifx==0:return0r=sumrange(x-1)returnx+rprint(sumrange(10)# 55Pretty simple. But what if we call it with bigger argumentprint(sumrange(1000))# RecursionError: maximum recursion depth exceededLet's fix it with precursion module:@precursedefsumrange(x):ifx==0:# return was:# return 0# now we need to use StopIteration exception:raiseStopIteration(0)# recursive call was:# r = sumrange(x - 1)# now we use yield:r=yieldsumrange.r(x-1)raiseStopIteration(x+r)print(sumrange(1000))# 500500!!1That's it!What is.rinsumrange.r?It's unwrapped function, so youyieldunwrapped generatorPros and cons:ProsThe code looks cleaner. Yep.ConsFunction calls have performance and memory overhead, so using
the decorator is slower than if you use Tail-call optimization viawhileor implement a stack inside a function.
Package: precursor
InstallationYou can install precursor by running:$ pip install --user precursorOn Linux the executable script can then be found in~/.local/binand on MacOS the script is under/Users/YOURUSERNAME/Library/Python/3.6/bin.UsageTypical usage is:$ precursor.py --autoseeds network targetsFor more options you can ask for help as follows:$ precursor.py --help
usage: precursor.py [-h] [--autoseeds] net inputs

positional arguments:
  net          metabolic network in SBML format
  inputs       targets in XML format

optional arguments:
  -h, --help   show this help message and exit
  --autoseeds  compute possible seed metabolitesSamplesAn archive with sample files is availablehere.
Package: precursorupdater
Precursor UpdaterThis script automatically updates a Precursor device. Please run with--helpto see
all the available options. By default, the script will attempt to load the latest stable release onto a Precursor device that is attached to the host via USB.When the script is finished running, you will need to reset the device by pressing on the
switch inside the hole in the lower right hand side of the case. Seehttps://ci.betrusted.io/i/reset.jpgfor an example of how to do this.See ourtroubleshootingguide for more help, especially if you are running Windows.Maintainer NotesThis note is for the maintainer of the tool. Users do not need to run these commands.The repo is structured to usesetup.py, so the first hits for documentation that guide you through using thetomlmanifest options won't work (couldn't get them to work anyways, even though I tried with the toml method). Thus, the method to push a new release is as follows:Runpython3 setup.py sdistin this directoryRunpython3 -m twine upload dist/precursorupdater-0.0.XXX.tar.gzwhere XXX is replaced with the version number.
Package: predacons
PredaconsPredacons is a python library based on transformer used fro transfer learningInstallationpip install predaconsUsagefrompredaconsimportpredaconspredacons.rollout()predacons.read_documents_from_directory()predacons.clean_text()predacons.train()predacons.generate_text()ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.LicenseMIT
Package: predacons-gui
Predecons-GUIPredecons-GUI is a gradio based front end for predecons a ml tool for building / transferlearning llmsInstallationpipinstallpredacons-guiUsageimportpredacons_guipredacons_gui.launch()predacons-guiFeaturesGradio based front endPredecons based backendabitly to load, save and train over hugging face modelsabitly to test and train over custom models and any hugging face modelScreenshotsContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.LicenseMIT
Package: predecessor
OverviewThis set of libraries is intended to provide useful classes to inherit
from, in a way that is cross compatible between multiple languages. A
version of this library is currently available in:Python (2 or 3)JavascriptThe libraries currently provide:singleton objectsserializable objectsSingletonThe singleton class provides a way to ensure you only have one instance
of a class. For instance:frompredecessorimportSingletonclassExample(Singleton):def__init__(self,foo,bar):self.foo=fooself.bar=bara=Example(3,8)b=Example(2,9)aisb# returns Truea.foo==b.foo==3# returns TrueOr equivalently in Javascript:constSingleton=require('predecessor').Singleton;classExampleextendsSingleton{constructor(foo,bar){this.foo=foo;this.bar=bar;}}leta=newExample(3,8);letb=newExample(2,9);a===b;// returns truea.foo===3;// returns trueb.foo===3;// returns trueSerializableThe singleton class provides a way to serialize a class without needing
to care about what form the resulting blob takes. If a compatible class
definition is available in all supported languages, it should be
deserializable in all supported languages.The Basic CasefrompredecessorimportSerializableclassExample(Serializable):def__init__(self,foo,bar):# Note that keyword args are not supportedself.foo=fooself.bar=bardefserialized(self):returnsuper(Example,self).serialized(self.foo,self.bar)a=Example(3,8)b=Example.deserialize(a.serialized())a.foo==b.foo==3# returns Truea.bar==b.bar==8# returns TrueOr equivalently in Javascript:constSerializable=require('predecessor').Serializable;classExampleextendsSerializable{constructor(foo,bar){this.foo=foo;this.bar=bar;}serialized(){returnsuper.serialized(this.foo,this.bar);}}leta=newExample(3,8);letb=Example.deserialize(a.serialized());a.foo===3;// returns trueb.foo===3;// returns truea.foo===8;// returns trueb.foo===8;// returns trueImplied SerializationIn both languages, you can also use implied serialization. This looks
like:classExample(Serializable):__slots__=('a','b','c')def__init__(self,a,b,c):self.a=aself.b=bself.c=cclassExampleextendsSerializable{constructor(a,b,c){super();this._slots=['a','b','c'];this.a=a;this.b=b;this.c=c;}}Advanced RecombinationIn both languages you can do data processing before feeding things into
your constructor.classExample(Serializable):def__init__(self,a,b,c):self.a=aself.b=bself.c=cdefserialized(self):returnsuper(Example,self).serialized(self.a,self.b)@classmethoddefrecombine(cls,a,b):returncls(a,b,a+b)classExampleextendsSerializable{constructor(a,b,c){super();this.a=a;this.b=b;this.c=c;}serialized(){returnsuper.serialized(this.a,this.b);}staticrecombine(a,b){returnnewthis(a,b,a+b);}}
Package: predecon-exioreed
PreDeConThis repository is not associated with the original authors of [Boehm,2004].AboutSubspace Preference Weighted Density Connected Clustering(PreDeCon) [Boehm,2004] can be seen as a
modification to the famous DBSCAN [Ester,1996] that addresses problems which arise in
high-dimensional spaces.InstallationInstall withpip.From PyPI$ pip install predecon-exioreedAlternatively, from source$ pip install git+https://github.com/exioReed/PreDeCon@master#egg=PreDeCon-exioreedor$ git clone https://github.com/exioReed/PreDeCon.git
$ cd PreDeCon
$ pip install .References[Boehm,2004]Boehm, C. et al., "Density Connected Clustering with Local Subspace Preferences".
In:Proceedings of the 4th IEEE Internation Conference on Data Mining (ICDM),
Brighton, UK, 2004.[Ester,1996]Ester, M. et al., "A Density-Based Algorithm for Discovering Clusters in Large
Spatial Databases with Noise".
In:Proceedings of the 2nd International Conference on Knowledge Discovery and Data Mining,
Portland, OR, 1996.