Saravanan666/pypi-org huggingface dataset:
Package: permissive-slugify
permissive-slugifyFork ofun33k/python-slugifyto fixissue 68.LicenseVersionTravis CICoverageAppVeyorSupported versionsWheelImplementationStatusDownloadsShow your supportImprovementsSupport forextras_requireandcmdclassRefactoredDeploy from Travis CIAdded Appveyor IntegrationUsespytestUses CodeCovHow to installBy default, permissive-slugify usesUnidecodeas decoder which is GPL-licensed.pipinstallpermissive-slugifySpecifying decoderYou can specify which decoder will be used:Unidecode-(GPL-licensed).pipinstallpermissive-slugify[unidecode]easy_installpermissive-slugify[unidecode]text-unidecode(GPL & Perl Artistic)pipinstallpermissive-slugify[text-unidecode]easy_installpermissive-slugify[text-unidecode]How to use# -*- coding: utf-8 -*-fromslugifyimportslugifytxt="This is a test ---"slug=slugify(txt)assertslug=="this-is-a-test"txt='影師嗎'slug=slugify(txt)assertslug=="ying-shi-ma"txt='C\'est déjà l\'été.'slug=slugify(txt)assertslug=="c-est-deja-l-ete"txt='Nín hǎo. Wǒ shì zhōng guó rén'slug=slugify(txt)assertslug=="nin-hao-wo-shi-zhong-guo-ren"txt='Компьютер'slug=slugify(txt)assertslug=="kompiuter"txt='jaja---lol-méméméoo--a'slug=slugify(txt,max_length=9)assertslug=="jaja-lol"txt='jaja---lol-méméméoo--a'slug=slugify(txt,max_length=15,word_boundary=True)assertslug=="jaja-lol-a"txt='jaja---lol-méméméoo--a'slug=slugify(txt,max_length=20,word_boundary=True,separator=".")assertslug=="jaja.lol.mememeoo.a"txt='one two three four five'slug=slugify(txt,max_length=13,word_boundary=True,save_order=True)assertslug=="one-two-three"txt='the quick brown fox jumps over the lazy dog'slug=slugify(txt,stopwords=['the'])assertslug=='quick-brown-fox-jumps-over-lazy-dog'txt='the quick brown fox jumps over the lazy dog in a hurry'slug=slugify(txt,stopwords=['the','in','a','hurry'])assertslug=='quick-brown-fox-jumps-over-lazy-dog'txt='thIs Has a stopword Stopword'slug=slugify(txt,stopwords=['Stopword'],lowercase=False)assertslug=='thIs-Has-a-stopword'txt="___This is a test___"regex_pattern=r'[^-a-z0-9_]+'slug=slugify(txt,regex_pattern=regex_pattern)assertslug=="___this-is-a-test___"txt="___This is a test___"regex_pattern=r'[^-a-z0-9_]+'slug=slugify(txt,separator='_',regex_pattern=regex_pattern)assertslug!="_this_is_a_test_"txt='10 | 20 %'slug=slugify(txt,replacements=[['|','or'],['%','percent']])assertslug=="10-or-20-percent"ReferencesAdd ability to specify "default" extras_requiresetup.py not ran on wheelsAuthorOriginal -Val NeekmanModified byRonie Martinez
Package: permit-sqltap
sqltap is a library that allows you to profile and introspect the
queries that your application makes using SQLAlchemy.sqltap helps you quickly understand:how many times a sql query is executedhow much time your sql queries takewhere your application is issuing sql queries fromFull HTML documentation can be generated by sphinx, or browsed online at:http://sqltap.inconshreveable.comSQLTap is hosted on github at:https://github.com/inconshreveable/sqltap
Package: permmod
permmodWhat is it?permmod is a Python package that is used to calculate the permeability of two-chamber-method measurements.
This type of measurement is based on Brace's pulse decay method and extends it to include pressure- and
temperature-dependent material parameters. More details are available in the following paper.How to use it.In order to use the package there must be a measurement-, a database- and a measurement_units-file in the following
folder structure:Measurements
│   database.csv
│   measurement_units.csv   
│
└───raw_data
│   │   measurement_file1.txt
│   │   ...
│   
└───sim_data
│   │   ...
│   
└───pics
│   │   ...An example of the structure of the folders and the 3 files is given in theexample folder.To evaluate a measurement, you can proceed as follows:frompermmodimportMeasurementpath='raw_data/measurement_file1.txt'measurement=Measurement(path=path)measurement.calculate_permeability([1e-19,0.001],parameter='both')For more information see the documentationInstallationThe source code is hosted on GitHub at:https://github.com/kirchma/permmodBinary installers for the latest released version are available at thePython
Package Index (PyPI)# PyPIpipinstallpermmod
Package: permon
# permon[![CircleCI](https://circleci.com/gh/bminixhofer/permon/tree/dev.svg?style=svg)](https://circleci.com/gh/bminixhofer/permon/tree/dev)[![codecov](https://codecov.io/gh/bminixhofer/permon/branch/dev/graph/badge.svg)](https://codecov.io/gh/bminixhofer/permon)[![Codacy Badge](https://api.codacy.com/project/badge/Grade/aeb0088ce100440f9077e1da6c6ca4f6)](https://www.codacy.com/app/bminixhofer/permon?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=bminixhofer/permon&amp;utm_campaign=Badge_Grade)A tool to monitor everything you want. Clean, simple, extensible and in one place.See [permon's website](https://bminixhofer.github.io/permon) for a short overview.See the [user documentation](https://bminixhofer.github.io/permon/userdoc) for details.If you want to contribute or get an insight into how permon is structured, check out the [contributor documentation](https://bminixhofer.github.io/permon/contributordoc).## Quickstart| Task | Command ||---|---|| Install permon | `pip install permon` || Run terminal frontend | `permon terminal` || Run native frontend | `permon native` || Run browser frontend | `permon browser` || Everything else | `permon --help` |## LicenseThis project uses the MIT License - see the [LICENSE](LICENSE) file for details.
Package: permpy
permpyPermPy is a user-friendly Python library for maniupulating permutation patterns and permutation classes. SeeWikipediafor an introduction to permutation patterns.InstallationInstallpermpywithpip:$python-mpipinstallpermpyUsagepermpycontains a number of useful Python classes includingpermpy.Permutation, which represents a permutation and can determine containment.>>>frompermpyimportPermutation>>>p=Permutation(1324)>>>q=Permutation(123)>>>q<=pTrue>>>r=Permutation(321)>>>r<=pFalse>>>S=pp.PermSet.all(6)>>>SSetof720permutations>>>S.total_statistic(pp.Perm.num_inversions)5400>>>S.total_statistic(pp.Perm.num_descents)1800>>>frompermpyimportAvClass>>>A=AvClass([132])>>>forSinA:...print(S)...Setof1permutationsSetof1permutationsSetof2permutationsSetof5permutationsSetof14permutationsSetof42permutationsSetof132permutationsSetof429permutationsSetof1430permutationsBuild InstructionsFor a summary of how PermPy is built, gohere.$python-mpoetrybuild
$python-mpoetrypublishTest InstructionsTo run tests, run$python-mpoetrybuild
$python-mpoetryshell
$python-mpytesttests/To build and install locally, run$python-mpoetryinstall
$python-mpoetryshell
$python
>>>importpermpy
>>>
Package: perm-security
Perm-SecurityA package to enable the integration between Discord's API and Perm-BananaFeaturesPermission classes for converting Discord's Permissions to Perm-BananaMember Adapters to enable Perm-Banana's extended functionalityThe ability to create TokensA TokenStrategy for handling Permissions with Discord's APIHow to use it?fromdiscordimportMemberfromdiscord.ext.commandsimportCog,Greedy,Context,commandfromperm_security.convertersimportPermissionChannelConverterfromperm_security.MemberAdapterimportMemberChannelAdapterfromperm_security.TokenStrategyimportBasicTokenStrategyfromperm_security.TokenStrategy.TokenHandlerStrategyimportBasicTokenHandlerStrategyclassSecurity(Cog):def__init__(self,bot):self.bot=botself.token_strategy=BasicTokenStrategy(BasicTokenHandlerStrategy(bot.scheduler))@command(name="generate_toke")asyncdefgenerate_token(self,ctx:Context,permissions:PermissionChannelConverter,members:Greedy[Member],uses:int=1duration:float=60.0):author=MemberChannelAdapter(ctx.author,ctx.channel)awaitself.token_strategy.generate_token(author,permissions,members,uses,duration)
Package: permtab
permtabA simple permission rule parsing library.InstallationInstall permtab viapip:pip install permtabFormatPermtab uses a syntax similar to crontab, although it is actually a reversed version. Actually, theshlexis used for parsing.# *.permtab<rulename><filter...>Herefilterhas the same meaning withruleandcondition.NOTE: Leading a rule toTrueonly needs one filter that returnsTrue.Here is an example:myrule1owner_1234operator_8525operator_8390
myrule2text_hellotext_world"text_hello world!"*user_any# The tab rule with name '*' is considered a base rule.# If not defined, the default rule will pass everything to other rules.Rule factoryRule factory is a function which exports a checker function.This is a generic definition:importpermtabdeffactory(*args,**kwargs):def_checker(*args,**kwargs):returnCONDITIONreturn_checkerpermtab.register_rulefactory(REGEX_FOR_THE_FACTORY,factory)Exactly, the parameters for rule factory and checker depend on their use.The parameters for rule factory is decided by groups in provided regex.
All groups that matched are unpacked to positional arguments, and all named
groups that matched are unpacked to keyword arguments.Checkers' parameters are decided by where the checker called.NOTE: Parameters provided by named groups are all in common groups.NOTE: Dependency injection will not work by default, so you must patch some
functions to export new functions that support dependency injection if
needed.Loading and using permtabThis step is quite easy:importpermtabpermtab.load("/path/to/your.permtab")# load "/path/to/your.permtab"rule=permtab.find_rule("your_rule_name")# get rule function, then use itdeff():ifrule(...):...# run if the condition is satisfiedelse:...# otherwiseEditing a permtabEditing uses a+and-marker on a rule to control changes.Here is an example:importpermtabparsed=permtab.parse("test.permtab")# DO NOT parse and edit the SAME FILE at the same time# Otherwise your data may be lostwithopen("test.permtab","w")asf:f.writelines(permtab.edit(parsed,{"myrule1":("-t_aeiou","-t_hello world!"),# add a `-` to remove an existing rule"myrule2":("+t_hellp",),# add a `+` to add a new rule"myrule3":("+t_foo","+t_bar","-t_foo")# `+` and `-` operation can take effect at the same time# duplicate changes will be evaluated}))permtab.reset_rule()# remove rules previously loadedpermtab.load("test.permtab")# reload new permtab
Package: permualgebra
PermualgebraThis package allows user to do permutations calculation in terms of Modern Algebra.InstallpipinstallpermualgebraPermutationDefinitionLet S be a set of n distinct elements. Apermutationof S is abijectionFor example, let S = {1, 2, 3, 4, 5, 6}, definei123456p(i)632451Or a permutation can be written incycle notation, where we oftenomitthe 1-cycles:this cycle notation is also the way that this package express a permutation.Thelength of a cycleis the number of elements of S in that cycle.Thelength of a permutationis the number of cycles in that permutation.TheoremEvery permutationon S = {1, ..., n} can be written as a product of disjoint cycles. i.e. no elements of S is repeated in the cycle description.importpermualgebraaspmp=pm.Permutation(["3 6 4 2","1 3 4 6","5 2 1 3"])print(p)# (3 6 4 2)(1 3 4 6)(5 2 1 3)pSimplify=p.getSimplify()print(pSimplify)# (1 2 6)(3 5)p.simplify()print(p)# (1 2 6)(3 5)Suppose we have 2 permutations:we can compose them asNote.composition of permutations is not commutative.This package implements the composition of permutation asmultiplication.importpermualgebraaspmp=pm.Permutation(["1 5","2 4 6"])q=pm.Permutation(["1 3 5 4","2 6"])p.simplify()q.simplify()print((p*q).getSimplify())# (1 3)(4 5 6)print((q*p).getSimplify())# (1 4 2)(3 5)To DoErrors and ExceptionsMore detailed wiki and documentation.
Package: permutation
GitHub|PyPI|Documentation|Issues|Changelogpermutationprovides aPermutationclass for representingpermutationsof finitely many positive
integers in Python.  Supported operations & properties include inverses, (group
theoretic) order, parity, composition/multiplication, cycle decomposition,
cycle notation, word representation, Lehmer codes, and, of course, use as a
callable on integers.Installationpermutationrequires Python 3.7 or higher.  Just usepipfor Python 3 (You have pip, right?) to install:python3 -m pip install permutationExamples>>> from permutation import Permutation
>>> p = Permutation(2, 1, 4, 5, 3)
>>> p.to_cycles()
[(1, 2), (3, 4, 5)]
>>> print(p)
(1 2)(3 4 5)
>>> print(p.inverse())
(1 2)(3 5 4)
>>> p.degree
5
>>> p.order
6
>>> p.is_even
False
>>> p.lehmer(5)
27
>>> q = Permutation.cycle(1,2,3)
>>> print(p * q)
(2 4 5 3)
>>> print(q * p)
(1 3 4 5)
>>> for p in Permutation.group(3):
...     print(p)
...
1
(1 2)
(2 3)
(1 3 2)
(1 2 3)
(1 3)
Package: permutation-no-repetition
Permutation without repetition - written in Cython - for Numpypip install permutation-no-repetitionTested against Windows / Python 3.11 / AnacondaThis module requires Cython and a C/C++ Compiler to be installed.ThismoduleprovidesaCython-basedutilityforgeneratingpermutations(withoutrepetitions!)ofarrays,supportingvariousdatatypesanddimensions.Usage:frompermutation_no_repetitionimportcython_permutationsimportnumpyasnpinputarray1=np.array([0,1,2,3,4,5,6,7,8,9],dtype=np.int32)i1=cython_permutations(inputarray1,start=0,end=-1)print(i1)inputarray2=np.array([[1,2,3,4],[3,3,3,6],[2,0,0,2],[2,0,0,2],[8,2,8,2],[4,5,4,5],[3,3,3,6],[4,5,4,5],[0,9,8,7],[1,2,3,4],])i2=cython_permutations(inputarray2,start=0,end=-1)print(i2)inputarray3=np.array([100,1,2,2,3,4,115,5,6,7,],dtype=np.float32,)i3=cython_permutations(inputarray3,start=0,end=-1)print(i3)int_array_7=np.array([1,2,3,4,5,6,7],dtype=np.int32)test_int_array_7=cython_permutations(int_array_7,start=0,end=-1)print(test_int_array_7)int_array_8=np.array([1,2,3,4,5,6,7,8],dtype=np.int64)test_int_array_8=cython_permutations(int_array_8,start=0,end=-1)print(test_int_array_8)int_array_9=np.array([1,2,3,4,5,6,7,8,9],dtype=np.uint8)test_int_array_9=cython_permutations(int_array_9,start=0,end=-1)print(test_int_array_9)int_array_10=np.array([1,2,3,4,5,6,7,8,9,10],dtype=np.uint16)test_int_array_10=cython_permutations(int_array_10,start=0,end=-1)print(test_int_array_10)float_array_7=np.array([1.1,2.2,3.3,4.4,5.5,6.6,7.7],dtype=np.float32)test_float_array_7=cython_permutations(float_array_7,start=0,end=-1)print(test_float_array_7)float_array_8=np.array([1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8],dtype=np.float64)test_float_array_8=cython_permutations(float_array_8,start=0,end=-1)print(test_float_array_8)complex_array_7=np.array([1+2j,3+4j,5+6j,7+8j,9+10j,11+12j,13+14j],dtype=np.complex64)test_complex_array_7=cython_permutations(complex_array_7,start=0,end=-1)print(test_complex_array_7)complex_array_8=np.array([1+2j,3+4j,5+6j,7+8j,9+10j,11+12j,13+14j,15+16j],dtype=np.complex128,)test_complex_array_8=cython_permutations(complex_array_8,start=0,end=-1)print(test_complex_array_8)bool_array_7=np.array([True,False,True,False,True,False,True],dtype=np.bool_)test_bool_array_7=cython_permutations(bool_array_7,start=0,end=-1)print(test_bool_array_7)str_array_7=np.array(["apple","banana","cherry","date","elderberry","fig","grape"],dtype=np.str_)test_str_array_7=cython_permutations(str_array_7,start=0,end=-1)print(test_str_array_7)unicode_array_7=np.array(["α","β","γ","δ","ε","ζ","η"],dtype=np.unicode_)test_unicode_array_7=cython_permutations(unicode_array_7,start=0,end=-1)print(test_unicode_array_7)bytes_array_7=np.array([b"a",b"b",b"c",b"d",b"e",b"f",b"g"],dtype="S1")test_bytes_array_7=cython_permutations(bytes_array_7,start=0,end=-1)print(test_bytes_array_7)bytes_array_8=np.array([b"a",b"b",b"c",b"d",b"e",b"f",b"g",b"h"],dtype="S1")test_bytes_array_8=cython_permutations(bytes_array_8,start=0,end=-1)print(test_bytes_array_8)
Package: permute
Permutation tests and confidence sets for a variety of nonparametric
testing and estimation problems, for a variety of randomization designs.Website (including documentation):http://statlab.github.io/permuteMailing list:http://groups.google.com/group/permuteSource:https://github.com/statlab/permuteBug reports:https://github.com/statlab/permute/issuesInstallation from binaries$ pip install permuteInstallation from sourceInstall dependencies using:$ pip install -r requirements.txtThen, install permute using:$ pip install .If you plan to develop the package, you may run it directly from source:$ pip install -e .       # Do this once to add pkg to Python pathLicense informationSee the file LICENSE for information on the history of this software,
terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
Package: permuted-brunnermunzel
IntroductionThis package is an implementation of the permuted version of the Brunner-Munzel test is a nonparametric test.
The Permuted Brunner-Munzel is best suited to cases where the number of observations in one of the groups is below 10 and
ideally above 7This is a reimplementation of the R/Fortran implementation found herehttps://cran.r-project.org/web/packages/brunnermunzel/index.html. This is for cases where is it not possible or complicated to call R from pythonDependenciesThe function requires the following Python packages:numpyscipymathUsageThe function takes five input arguments, x, y, alternative, nan_policy, est, and force.x and y are lists of observations for the two samples to be tested.alternative specifies the alternative hypothesis to be tested, and can take one of the following values: "two_sided", "greater", or "less". Default is "two_sided".nan_policy specifies how to handle missing values in the input data, and can take one of the following values: "propagate", "raise", or "omit". Default is "propagate".est specifies the estimator of the difference of the location shifts of the two distributions, and can take one of the following values: "original" or "difference". Default is "original".force specifies whether to force the use of the permuted Brunner-Munzel test even in cases where the normal Brunner-Munzel test would be more appropriate. Default is False.The function returns a tuple of two float values:The first value is the estimated location shift between the two distributions (i.e., the P-value).The second value is the P-value of the test.Examplepip install permuted_brunnermunzelfrom permuted_brunnermunzel import permuted_brunnermunzel

x = [0, 0, 0, 1, 1, 1, 0]
y = [30, 20, 19, 18, 15, 10, ]

result = permuted_brunnermunzel(x, y, alternative="less", nan_policy="propagate", est="original", force=False)
print(result)(0.8571428571428571, 0.0005827505827505828)
Package: permutive
Permutive SDKPython wrapper for Permutive APIFree software: MIT licenseDocumentation:https://permutive-sdk.readthedocs.io.FeaturesThis package aims to provide an easy to use python interface for interacting with Permutive APICreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2017-03-23)First release on PyPI.
Package: pernaf
PER-NAFAn implementation of the Normalized Advantage Function Reinforcement Learning Algorithm with Prioritized Experience ReplaySummaryThe original paper of this code is:https://arxiv.org/abs/1509.02971The code is mainly based on:https://github.com/carpedm20/NAF-tensorflow/Additionally I added the prioritized experience replay:https://arxiv.org/abs/1511.05952Using the OpenAI baseline implementation:https://github.com/openai/baselines/blob/master/baselines/deepq/replay_buffer.pyThanks openAI and Kim!Some Advices from experience in RLNormalize the state and action space as well as the reward is a good practiceVisualise as much as possible to get an intuition about the method as possible bugsIf it does not make sense it is a bug with very high probabilityCoding makes happy
Package: perock
perockDescriptionPerock is Python brute-force attack library built on threads and asyncio. Its
intended for simplifying brute-force attack by performing common tasks in
brute-force such as calculating cartesian product.Perock was built to be general purpose in that it can be used for wide
variety of brute-force attack activities. It can be used with html forms,
file with passwords, API requiring username and password, etc.Perock is currently undergoing major changes as mentioned
in issue#44.Brooteis a wrapper around perock with all its features and but different API.LicensePerock is released as open-source under conditions ofGPL-3.0license.
Package: perpetuo
Perpetuoperpetuo, verb: To cause to continue uninterruptedly, to proceed with
continuallyPerpetuo is a stall tracker for Python. Specifically, it can detect when:One thread is holding the GIL for too long, blocking other threads from having
a chance to run (requires an instrumented version of CPython)One Trio task is running too long without checkpointing, blocking other tasks
from having a chance to runThe actual monitoring is done from a separate process, using a customized
version ofpy-spy. So the monitoring is
very low overhead and should not interfere with the monitored process at all.
The goal is to be able to use this in production.Quickstartpip install perpetuoOptional: patch CPython (see below)import perpetuoIf you're using Trio: callperpetuo.dwim()insidetrio.runIf you're not using Trio: callperpetuo.dwim()anywhereOptional: logperpetuo.dwim()'s return value to see what it didAvailable APIperpetuo.start_watcher(): Spawns the monitoring process in the background.perpetuo.instrument_gil(): Enables GIL instrumentation, or raisesRuntimeErrorif you don't have the patched version of CPython.perpetuo.instrument_trio(): Enables Trio instrumentation. Must be called
insidetrio.run.perpetuo.dwim(): Attempts to call all the above functions as appropriate, and
returns a list of strings describing which operations it actually performed. If
you're using Trio, make sure to call it insidetrio.run.StallTracker: Low-level class that allows you to add custom instrumentation to
other things. See source for details.Patching CPython to instrument the GILCurrently the patch is only available for CPython version 3.10.*. It can be
downloaded here:https://github.com/python/cpython/compare/3.10...njsmith:cpython:njs/perpetuo-gil.diffBonusNiccolò Paganini'sMoto Perpetuo, performed by Antal Zalai
Package: perphix
PerphixUtilities and documentation for the collection, annotation, and usage of X-ray image sequences for
surgical phase recognition, with a focus on percutaneous fracture fixation.This repository is used byPelphixto provide
data-related utilities and documentation. It classes for loading and processing data, as well as
documentation for the Perphix datasets. It is provided separately for ease of installation.InstallationPerphix can be installed from PyPI:pipinstallperphixDevelopmentClone the repository and install from source using pip:gitclonegit@github.com:arcadelab/perphix.gitcdperphix
pipinstall-e.Alternatively, you can use the includedenvironment.ymlfile to install an Anaconda environment.condaenvcreate-fenvironment.yml
condaactivateperphixDocumentationThe documentation for this project is hosted onRead the Docs.CitationIf you find this work useful in your research, please consider citing:@InProceedings{KilleenPelphix2023,author={Killeen, Benjamin D. and Zhang, Han and Mangulabnan, Jan and Armand, Mehran and Taylor, Russel H. and Osgood, Greg and Unberath, Mathias},title={{Pelphix: Surgical Phase Recognition from X-ray Images in Percutaneous Pelvic Fixation}},booktitle={Medical Image Computing and Computer Assisted Intervention -- MICCAI 2023},journal={arXiv},year={2023},publisher={Springer International Publishing},address={Cham},pages={to appear},}