Saravanan666/pypi-org huggingface dataset:
Package: patternpiece
PatternPieceEnglish|简体中文PatternPieceis a extended, lightweight Aho-Corasick sequence multi-pattern, multi-element matching algorithm library, serving as the initial design for the matching method.PatternPieceis implemented inCythonand tested on Python 3.8 and up. It works on 64 bits Linux, macOS and Windows. Thelicenseis Apache-2.0.Download and source codeYou can fetch PatternPiece from:GitHubhttps://github.com/xlxwalex/PatternPiecePypihttps://pypi.python.org/pypi/patternpiece/Thedocumentationis published athttps://patternpiece.readthedocs.io/en/latest/Quick startThis module is written in Cython. You need a C compiler installed to compile native extensions. In addition, due to the requirements for parallel computing, you also need to haveOpenMPinstalled. To install:pipinstallpatternpieceOr you can also install from source, first clone the repository:gitclonehttps://github.com/xlxwalex/PatternPiece.gitcdPatternPiece
pipinstall-e.Firstly, we can construct a toy pattern dicts.>>>patterns={(1,200,30):1}# (key -> pattern tuple, value -> pattern index)Then create an PatternPiece:>>>frompatternpieceimportPatternPiece>>>matcher=PatternPiece(patterns)It will automatically convert the patterns from a trie to an Aho-Corasick automaton to enable Aho-Corasick search, and then you can match the patterns in sequences:>>>sequences=[[(1,10,100),(2,20,200),(3,30,300)]]>>>results=matcher.match(sequences)Note:you can input multiple sequences, and they will be matched in parallel.Finally, you can get the results:results:[[(1,0,3)]]# (Index, start, end)LicenseThis library is licensed under very liberalApache-2.0license.
Package: pattern-recognition-cli
Pattern-recognitionThe command-line interface (CLI) that provides a set of commands to interact with the server and recognize the pattern.Getting startedUsageServiceDevelopmentProductionGetting startedBlank.UsageServiceGet the version of the package —pattern-recognition --version:$pattern-recognition--version
pattern-recognition,version0.1.0Get all possible package's commands —pattern-recognition --help:$pattern-recognition--help
Usage:pattern-recognition[OPTIONS]COMMAND[ARGS]...CommandlineinterfaceforPyPiversionchecking.
Options:--versionShowtheversionandexit.--helpShowthismessageandexit.
...DevelopmentTo run the tests, use the following command, being in the root of the project:$pytesttests/To build the package to test of to be deployed, use the following commands:$pip3uninstall-ypattern-recognition-cli&&rm-rfdist/pattern-recognition-cli.egg-info&&\python3setup.pysdist&&pip3installdist/*.tar.gzProductionTo build the package and upload it toPypIto be accessible throughpip,
use the following commands.Twinerequires the username and password of the
account package is going to be uploaded to.$ python3 setup.py sdist
$ twine upload dist/*
Package: patterns
Pattern matching for python. Works in Python 2.7, 3.3+ and pypy.Installationpip install patternsUsagefrompatternsimportpatterns,Mismatch@patternsdeffactorial():if0:1ifnisint:n*factorial(n-1)if[]:[]if[x]+xs:[factorial(x)]+factorial(xs)if{'n':n,'f':f}:f(factorial(n))assertfactorial(0)==1assertfactorial(5)==120assertfactorial([3,4,2])==[6,24,2]assertfactorial({'n':[5,1],'f':sum})==121factorial('hello')# raises MismatchSee tests for more examples.TODOdocsaliases for structuresdestructure objectsname parameterbetter handling ofMismatchpassing to function envnon-strict dict matching
Package: pattern-singleton
DescriptionSingleton is a creational design pattern that lets you ensure that a class has only one instance, while providing a global access point to this instance.
This implementation of Singleton Design Pattern is based on metaclass method.Free software:MITlicenseBut I would appreciate a star onGitHubMultithreadedThis method provide proper handling for multi-thread environment by closing public threading lock while creating instance of Singleton subclass.InstallationJust use (No other package is needed):$pipinstallpattern-singletonExample Usagefrompattern_singletonimportSingletonclassExample(metaclass=Singleton):def__init__(self):self.variable=1if__name__=='__main__':example_01=Example()example_02=Example()print(example_01.variable)# displays 1print(example_02.variable)# displays 1example_01.variable=2# changes value for every instance of Example classprint(example_01.variable)# displays 2print(example_02.variable)# displays 2CreditsThis package was created byMarcin MysliwiecwithCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: patternsum
String Pattern SummarizationAn algorithm to summarize possible patterns, which, in this context, are sequences of substrings, covered in a list of string using Genetic Algorithm with Species Mechanism.Getting StartedPrerequisitesThis module requires onlynumpyandpandas.Installingpip install patternsumAuthorsSanthapon Sripilaipong-initial workLicenseThis project is licensed under the MIT License - see theLICENSE.txtfile for details
Package: pattern-tiler
Pattern Tilerusage:pattern-tiler[-h]--inputINPUT--outputOUTPUT--multiplierMULTIPLIER--output_resOUTPUT_RES

Tile(w,h)imageto(m*w,m*h)imagegivenmultipliermandthenresizetooutput_resolution.

options:-h,--helpshowthishelpmessageandexit--inputINPUTPathtoinputimage--outputOUTPUTPathtooutputimage--multiplierMULTIPLIERSizemultiplierforimage--output_resOUTPUT_RESOutputresolution
Package: pattmatch
PATTMATCHMore algorithms can be found hereDocumentationIt’s hereExample>>> from pattmatch import *
>>>
>>> kmp('ABCABC', 'ABC')
[[0, 3], [3, 6]]
>>> rabin_karb('ABCDAABC', 'ABC')
[[0, 3], [5, 8]]
>>> boyer_moore('AAABAAACAAD', 'AA')
[[0, 2], [1, 3], [4, 6], [5, 7], [8, 10]]
>>> z_array('ABCDAABBCAAAABBCAAAAABCA', 'AAAA')
[1, 0, 0, 0, 2, 1, 0, 0, 0, 4, 3, 2, 1, 0, 0, 0, 4, 4, 3, 2, 1, 0, 0, 1]LICENCEMIT
Package: patton-cli
patton-cli - The knife of the Admin & Security auditorProject sitehttps://github.com/bbva/pattonIssueshttps://github.com/bbva/patton/issues/Documentationhttps://patton.readthedocs.org/Python versions3.6 or aboveWhat’s patton-cli?patton-cli born with the objective to be a knife for system admins and security auditors, it could be filled with many different sources and report in many formats, being great for scripting.You can see a demo video running patton-server + patton-cli:DocumentationYou can find Patton’s documentation atRead the Docs.ContributingAny collaboration is welcome!There’re many tasks to do. You can check theIssuesand send us a Pull Request.Also you can read theTODOfile.LicenseThis project is distributed underApache 2 license
Package: patton-server
patton-server - The vulnerability knowledge storeProject sitehttps://github.com/bbva/pattonIssueshttps://github.com/bbva/patton/issues/Documentationhttps://patton.readthedocs.org/Python versions3.6 or aboveWhat’s patton-server?patton-server provides a service that resolves CVEs and CPEs from NIST and perform intelligent queries to a postgres database. You can consume the service via api, a commandline client or using the Postman collection provided in this repository.You can see a demo video running patton-server + patton-cli:DocumentationYou can find Patton’s documentation atRead the Docs.ContributingAny collaboration is welcome!There’re many tasks to do. You can check theIssuesand send us a Pull Request.Also you can read theTODOfile.LicenseThis project is distributed underApache 2 license
Package: pattools
pattoolsToolkit for neuro-imaging data manipulation and automation.A collection of handy-dandy tools that Pat uses for neuro-imaging in python.pacsUsed to find and get imaging and report data from the PACS systemtimelinesUsed for building longitudinal data setsresourcesQuick access to useful resourcesants, fslThin wrappers for quick access to underlying calls to ANTS and FSL. You'll need to have those tools installed if you want to use them (or make calls that use that code), otherwise we'll complain.
Package: patu
PatuA small spider, useful for checking a site for 404s and 500s. Patu requires httplib2 and lxml:pip install -U httplib2 lxmlQuick UsageTo see available options:patu.py –helpTo spider an entire site using 5 workers, only showing errors:patu.py –spiders=5 www.example.comTo spider, stopping after the first level of links:patu.py –depth=1 www.example.comTo get a list of every linked page on a site:patu.py –generate www.example.com > urls.txtInstead of spidering for URLs, use a file instead and show all responses:patu.py –input=urls.txt –verbose www.example.comFormat of URLs FileThe output produced by <code>–generate</code> is formatted like so:FIRST_URL<TAB>None
LINK1<TAB>REFERER
LINK2<TAB>REFERER<code>–input</code> can take a file of that format, or one URL per line with no referer. <code>–input=-</code> reads from stdin.TestingPatu uses Nose for testing. To install Nose and test:pip install -U nose
nosetests
Package: patul
patulA tiny spider based on asyncio and requests.installpipinstallpatulusageJust like scrapy:importpatulclassMySpider(patul.Spider):start_urls=['https://cn.bing.com/']asyncdefparse(self,response):print(response.xpath('//a/@href').get())yieldpatul.Request('https://github.com/financialfly/async-request',callback=self.parse_github)defparse_github(self,response):yield{'hello':'github'}asyncdefprocess_result(self,result):# Process result at here.print(result)if__name__=='__main__':# Run spiderpatul.crawl(MySpider)For more detailed control (like: handle cookies, download delay, concurrent requests, max retries, logs settings etc.): (refer to the constructor of theCrawlerclass):importpatulclassMySpider(patul.Spider):...if__name__=='__main__':patul.crawl(MySpider,handle_cookies=True,download_delay=0,concurrent_requests=10,max_retries=3,log_settings={'fp':'spider.log'})testUsefetchfunction to get a response immediately:frompatulimportfetchdefparse():response=fetch('https://www.bing.com')print(response)parse()the output will like this:<Response 200 https://cn.bing.com/>Thefetchfunction also could be use like this:importpatuldefparse(response):print(response)yieldpatul.Request(response.url,callback=parse_next)defparse_next(response):print(response.status_code)yield{'hello':'world'}patul.fetch('http://www.baidu.com',callback=parse)then run the script, you will see the result:<Response 200 http://www.baidu.com/>
200
Package: pau
PAU - Padé Activation UnitsPadé Activation Units: End-to-end Learning of Activation Functions in Deep Neural NetworkArxiv link:https://arxiv.org/abs/1907.067321. About Padé Activation UnitsPadé Activation Units (PAU) are a novel learnable activation function. PAUs encode activation functions as rational functions, trainable in an end-to-end fashion using backpropagation and can be seemingless integrated into any neural network in the same way as common activation functions (e.g. ReLU).PAU matches or outperforms common activations in terms of predictive performance and training time.
And, therefore relieves the network designer of having to commit to a potentially underperforming choice.2. DependenciesPyTorch>=1.1.0
CUDA>=10.13. InstallationPAU is implemented as a pytorch extension using CUDA 10.2. So all that is needed is to install the extension.pip3 install --upgrade pip
pip3 install pauIf installation does not work, please run:pip3 install wheelFor CUDA 10.1, download the wheel corresponding to your python3 version in thewheelhouserepo and install it with:pip3 install pau-0.0.16-101-cp{your_version}-manylinux2014_x86_64.whlIf you encounter any trouble installing pau, please contactthis person.4. Using PAU in Neural NetworksPAU can be integrated in the same way as any other common activation function.import torch
from pau_torch import PAU

model = torch.nn.Sequential(
    torch.nn.Linear(D_in, H),
    PAU(), # e.g. instead of torch.nn.ReLU()
    torch.nn.Linear(H, D_out),
)5. Reproducing ResultsTo reproduce the reported results of the paper execute:$ export PYTHONPATH="./"
$ python experiments/main.py --dataset mnist --arch conv --optimizer adam --lr 2e-3# DATASET: Name of the dataset, for MNIST use mnist and for Fashion-MNIST use fmnist
# ARCH: selected neural network architecture: vgg, lenet or conv
# OPTIMIZER: either adam or sgd
# LR: learning rate
Package: paud
paudPython library to process audioopen audiofrompaudimportAudioau=Audio.open('audio.wav')#file or pathprint(f'audio duration ={au.duration}')au.play()#play audioau[:100].play()#play first 100 frames of audioopen audio from URLimportrequestsfrompaudimportAudiofromioimportBytesIOr=requests.get('https://file-examples-com.github.io/uploads/2017/11/file_example_WAV_10MG.wav')au=Audio.open(BytesIO(r.content))au.play()
Package: paudel-test
Paudel_testIt contains a test file that needed to run the systemFree software: GNU General Public License v3Documentation:https://paudel-test.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2017-03-12)First release on PyPI.
Package: paulexyz-pynetbox
Pynetbox Fork to fix Issue  #497This is a Fork of pynetbox which fixes thisissueby applying the fix @endreszabo suggested inthis commentPython API client library forNetBox.Note:Version 6.7 and later of the library only supports NetBox 3.3 and above.InstallationTo install runpip install pynetbox.Alternatively, you can clone the repo and runpython setup.py install.Quick StartThe full pynetbox API is documented onRead the Docs, but the following should be enough to get started using it.To begin, import pynetbox and instantiate the API.import pynetbox
nb = pynetbox.api(
    'http://localhost:8000',
    private_key_file='/path/to/private-key.pem',
    token='d6f4e314a5b5fefd164995169f28ae32d987704f'
)The first argument the .api() method takes is the NetBox URL. There are a handful of named arguments you can provide, but in most cases none are required to simply pull data. In order to write, thetokenargument should to be provided. To decrypt information from thesecretsendpoint either theprivate_key_fileorprivate_keyargument needs to be provided.QueriesThe pynetbox API is setup so that NetBox's apps are attributes of the.api()object, and in turn those apps have attribute representing each endpoint. Each endpoint has a handful of methods available to carry out actions on the endpoint. For example, in order to query all the objects in thedevicesendpoint you would do the following:>>> devices = nb.dcim.devices.all()
>>> for device in devices:
...     print(device.name)
...
test1-leaf1
test1-leaf2
test1-leaf3
>>>Threadingpynetbox supports multithreaded calls for.filter()and.all()queries. It ishighly recommendedyou haveMAX_PAGE_SIZEin your Netbox install set to anythingexcept0orNone. The default value of1000is usually a good value to use. To enable threading, addthreading=Trueparameter to the.api:nb=pynetbox.api('http://localhost:8000',threading=True,)
Package: paulg
paulgVarious utility functions by Paul Graham, implemented in PythonWARNING: This repo is in development. It was automatically generated withmkpylib. If you're reading this message, it means that I use this repo for my own purposes right now. It might not do anything at all; the default functionality isprint('TODO').If you really want to try it out, feel free. I recommend reading through the code and commit history to see if it does what you need, orask mefor status updates.Stay tuned!Installpython3 -m pip install -U paulgUsageimportpaulgprint('TODO')LicenseMITContactA library byShawn Presser. If you found it useful, please considerjoining my patreon!My Twitter DMs are always open; you shouldsend me one! It's the best way to reach me, and I'm always happy to hear from you.Twitter:@theshawwnPatreon:https://www.patreon.com/shawwnHN:sillysaurusxWebsite:shawwn.com
Package: pauli-tracker
Python wrapper around pauli_trackerThis Python package is a wrapper around thepauli_tracker crateexporting its basic
functionality.If some essential functionality is missing, because we just forgot to implement it, please
open an issue or pull request (cf.contributing). If you need more functionality, it is
fairly easy to use Rust from Python with the help ofpyo3andmaturin. However,
because of#1444, you may want to clone this repository and extend it.DocumentationTo the docsWhen using this package, please also look at thecrate's documentationof the Rust
crate (additionally to thePython package's documentation) in parallel since it is much
more extensive about how the Pauli tracking works (although not everything there is
supported in this wrapper).ExamplesPlease look at thisPython exampleand also at theseRust examples.InstallationYou can install the package from PyPI, e.g., withpipinstallpauli-trackerThe package contains pre-built wheels for manylinux_2_28_x86_64 (works on most Linux
distribuitions), latest Windows and latest MacOS (latest with respect to when the package
was built) for Python 3.8 to 3.12. Additionally, there is an manylinux_2_28_x86_64
abi3 wheel for Python >= 3.8. You can also build the package from source, e.g., force it
during a pip install withpip install --no-binary pauli-tracker pauli-tracker, however,
note that this requires Python >= 3.8 and a Rust toolchain >= 1.65.At the moment, you may also find a more up-to-date wheel in the artifacts of the latest
"pypackage" github actions workflow; this is unstable though.Manually BuildingThe package has to be build withmaturin. Themake packagecommands builds it through
a docker container such that it is compatible with manylinux_2_28_x86_64 for Python >=
3.8. Withmake update_docsthe documentation can be build. The output of both make
commands is in thedistdirectory.VersioningThe Python package followsSemVer, however, the underlying Rust crate is unstable.
Package: paul-realpython-reader
Real Python Feed ReaderThe Real Python Feed Reader is a basicweb feedreader that can download the latest Real Python tutorials from theReal Python feed.For more information see the tutorialHow to Publish an Open-Source Python Package to PyPIon Real Python.InstallationYou can install the Real Python Feed Reader fromPyPI:python -m pip install realpython-readerThe reader is supported on Python 3.7 and above. Older versions of Python, including Python 2.7, are supported by version 1.0.0 of the reader.How to useThe Real Python Feed Reader is a command line application, namedrealpython. To see a list of thelatest Real Python tutorials, call the program without any arguments:$ realpython
The latest tutorials from Real Python (https://realpython.com/)
 0 How to Publish an Open-Source Python Package to PyPI
 1 Python "while" Loops (Indefinite Iteration)
 2 Writing Comments in Python (Guide)
 3 Setting Up Python for Machine Learning on Windows
 4 Python Community Interview With Michael Kennedy
 5 Practical Text Classification With Python and Keras
 6 Getting Started With Testing in Python
 7 Python, Boto3, and AWS S3: Demystified
 8 Python's range() Function (Guide)
 9 Python Community Interview With Mike Grouchy
10 How to Round Numbers in Python
11 Building and Documenting Python REST APIs With Flask and Connexion – Part 2
12 Splitting, Concatenating, and Joining Strings in Python
13 Image Segmentation Using Color Spaces in OpenCV + Python
14 Python Community Interview With Mahdi Yusuf
15 Absolute vs Relative Imports in Python
16 Top 10 Must-Watch PyCon Talks
17 Logging in Python
18 The Best Python Books
19 Conditional Statements in PythonTo read one particular tutorial, call the program with the numerical ID of the tutorial as a parameter:$ realpython 0
# How to Publish an Open-Source Python Package to PyPI

Python is famous for coming with batteries included. Sophisticated
capabilities are available in the standard library. You can find modules for
working with sockets, parsing CSV, JSON, and XML files, and working with
files and file paths.

However great the packages included with Python are, there are many
fantastic projects available outside the standard library. These are most
often hosted at the Python Packaging Index (PyPI), historically known as the
Cheese Shop. At PyPI, you can find everything from Hello World to advanced
deep learning libraries.

[... The full text of the article ...]You can also call the Real Python Feed Reader in your own Python code, by importing from thereaderpackage:>>> from reader import feed
>>> feed.get_titles()
['How to Publish an Open-Source Python Package to PyPI', ...]
Package: paunch-dir
paunch-dirAn algorithm to generate a path from file name which directory structure could
store mass filesYou could generated directory structure (from a uuid file name) just like:├── 02
│   └── 9d
│       └── 5b
│           └── cb7c89776a923d6050ff9cffcf1333284f.jpg
|               # Original file name : 029d5bcb7c89776a923d6050ff9cffcf1333284f.jpg
├── 03
│   ├── 2b
│   │   └── f9
│   │       └── 7cdb028c51ec56ec53cbe34946525a3e37.jpg
│   └── f9
│       └── 4d
│           └── 9458a9ee5396911268b0da6b3552f154e8.jpg
...It’s ineffectively for file system parse large number files in same directory.
And there have limit files that could be sotre in a directory depends on
different file system format. You will see it’s very slow if you open a
directory with hundreds of thousands files in file browser. Separate them into
different directory with specific algorithm that could greatly improve
efficiency when parse those files.UsagefrompaunchdirimportPaunchDir# Generate path from uuid file namepdir=PaunchDir(".")print(pdir.compose('032bf97cdb028c51ec56ec53cbe34946525a3e37.jpg'))# ==> "./03/2b/f9/7cdb028c51ec56ec53cbe34946525a3e37.jpg"# Decompose uuid file name from a pathprint(pdir.decompose("./03/2b/f9/7cdb028c51ec56ec53cbe34946525a3e37.jpg"))# ==> "032bf97cdb028c51ec56ec53cbe34946525a3e37.jpg"# Generate path from uuid file name with one level (Just like what the git# store it's objects)pdir=PaunchDir("./objects",levels=1)print(pdir.compose('032bf97cdb028c51ec56ec53cbe34946525a3e37'))# ==> "./03/2bf97cdb028c51ec56ec53cbe34946525a3e37"LicenseThis library license under Apache-2.0CreditsThis package was created withCookiecutterand thePyPackageTemplateproject template.History0.0.2 (2018-06-21)First release on PyPI.