Saravanan666/pypi-org huggingface dataset:
Package: pasteuwsgi
pasteuwsgipasteuwsgiis a simple python paste (http://pythonpaste.org/) plugin
which adds a command that serve the application for using uWSGI
(http://projects.unbit.it/uwsgi/) integrated HTTP server. It can monitor python
files and automatically reload uWSGI on file change. It’s focused for local
development to easily test uWSGI specific features.installFirst, to usepasteuwsgiyou need uWSGI installed, both sistem wide or
in the virtualenv. Check the uWSGI documentation on how to install uWSGI
(http://projects.unbit.it/uwsgi/wiki/Install). The simplest way is to install
uwsgi in the virtualenv, using pip:# pip install uwsgiThen, you can installpasteuwsgivia pypi:# pip install pasteuwsgiOr, if you want the last unstable version, directly from bitbucket (again, using pip):# pip install -e hg+https://bitbucket.org/gbagnoli/pasteuwsgi#egg=pasteuwsgiOr you can clone the hg repo and then install:# hg clone https://gbagnoli@bitbucket.org/gbagnoli/pasteuwsgi
# pip install -e ./usageOnce installed, simply add this line to setup.py of your paste app:uwsgi = pasteuwsgi.serve:ServeCommandin the “[paste.paster_command]” section of the entry_point
argument.i.e. for a pylons-1.0 application:entry_points="""
[paste.app_factory]
main = aybu.cms.config.middleware:make_app

[paste.app_install]
main = pylons.util:PylonsInstaller

[paste.paster_command]
uwsgi = pasteuwsgi.serve:ServeCommand
""",You may need to re-run setuptools egg_info after adding the new entry_point:# cd my-project
# python setup.py egg_infooptions--addressOverride the http server listening address.--portOverride the http server listening port.--reloadSetup a monitor (using pyinotify) to watch application code to reload on changes. It also monitors code installed in the virtualenv.--uwsgiPass additional options to uWSGI directly. Remember that you neeed to wrap uWSGI options with quotes.--pluginsLoad uWSGI plugins (for uWSGI >= 0.9.7)examplesTo simply run it as you did with paster serve:paster uwsgi development.ini --reloadYou can add uwsgi options using the -w switch# run with 2 workers with two threads each
paster uwsgi development.ini --reload -w "-workers 2 --threads 2"You can even add common options (such the threads or the process one, or
others) to a [uwsgi] section inside the paste ini (development.ini in the above
example):[...]
[uwsgi]
threads = 2
workers = 2This works aspasteuwsgipasses –ini option to uwsgi with the same ini it
uses.
Package: pastis-framework
The PASTIS project is a fuzzing framework aiming at combining various software testing techniqueswithin the same workflow to perform collaborative fuzzing also called ensemble fuzzing.At the moment it supports the following fuzzing engines:Quick startInstallationUsageAdding a fuzzerInstallationThe PASTIS framework can be installed with:pipinstallpastis-frameworkThe pip package will install all dependencies and the tritondseengine.AFL++To install AFL++ please refer to the officialdocumentation.Honggfuzz (>= v2.6)To install Honggfuzz please refer to the officialdocumentation.UsageThe main component is thebrokerthat will serve the appropriate configurations to fuzzingengines and that will aggregate results. An example is the following:tarxvfdoc/figs/fsm-demo.tar.gz&&cdfsm-demo

make

pastis-broker-bbin-sinitial-woutputIt will run the broker using binaries in thebindirectory. Initial corpusisinitialand the whole output workspace will be save inoutput. By defaultit will listen on the local interface on port 5555.Then fuzzing engines can be launched to start testing the software.pastis-aflpp onlineOr:pastis-triton onlineFull documentation is available:hereAdding a FuzzerIntegrating a fuzzer requires writing a Python driver using thelibpastslibraryinstalled by the package. It requires implementing some callbacks to receive the initialconfiguration and also to receive inputs from the broker. Conversely the API enablessending newly generated inputs to the broker.The process is furtherdetailed in the documentation.NoteWe warmly welcome any Pull Request to add the support for a new fuzzing engine.DockerYou can also run PASTIS using Docker:dockerpullubuntu:22.04

dockerbuild-tpastis-docker.

dockerrun-v<HOST-WORKSPACE>:/workspace--cap-add=SYS_PTRACE--user$(id-u$USER):$(id-g$USER)-itpastis-dockerTo open another terminal to an already running container:dockerexec-it$(dockerps|grep'pastis-docker'|awk'{print $1}')/bin/bashThe PASTIS Docker image has already installed all the needed dependencies such as AFL++ and Honggfuzz.Papers and conferenceSymbolic Execution the Swiss-Knife of the Reverse Engineer ToolboxVenue: KLEE Workshop, 2022[:books:][:movie_camera:]Authors: Robin David, Richard Abou Chaaya, Christian HeitmanFrom source code to crash test-case through software testing automationVenue: European Cyber Week, C&ESAR Workshop, 2021paperslidesAuthors: Robin David, Jonathan Salwan, Justin BourrouxCite PastissoonContributorsPastis is powered byQuarkslaband initially financed by DGA-MI.All contributions
Package: pastlogging
pastlogging — Logging extension for PythonSource code:https://github.com/jimstraus/pastloggingThis module extends the built in logging module in Python.  It supports both Python 2.3 and greater and Python 3.X.The key benefit is to provide a mechanism where logs are not cluttered withinfoanddebugmessages, but when awarningorerroroccurs, you get all the previousinfoanddebugmessages.  Because it is based on the standard logging module, all the usual flexibility in terms of handlers, filters, name spaces, etc. are available.Please read the Python Standard Library documentation for logging to understand all the normal options and mechanisms for logging.PastLogger ObjectsPastLoggers are extended with the following methods.Not that PastLoggers are generated and retrieved using the same mechanism as the normal logger.logging.getLogger()PastLogger.setLevel(level)Sets the threshold for this logger tolevel. Logging messages which are less severe than level will be held (up to a maximum number, see below).  If a message equals or is greater than the threshold, then all held messages and the current message are sent to the log(s).PastLogger.setMinLevel(level)Sets the minimumlevelof messages to be held.  No messages below the minimum level will be held.PastLogger.setMax(number)Sets thenumberof messages to be held.  The default is 1000 and if set to -1 there is no limit.PastLogger.reset()Resets the buffer holding messages.  This can be used when entering code where the previous operations completed either successfully or unsuccessfully.PastLogger UsageTo minimize the changes to existing code, you mayimport pastlogging as loggingAt that point, all code using logging should work as expected.Since the previous log messages are sent to the logs at the same time, the timestamp stored in the LogRecords themselves.  This can be configured usinglogging.basicConfig(format='%(asctime)s %(message)s')Or see the builtin logging documentation for further formatting optinos.
Package: past-mtl-monitors
Past MTL MonitorsA library for creating past metric temporal logic monitors.Table of ContentsPast MTL MonitorsInstallationUsageInstallationIf you just need to usepast-mtl-monitors, you can just run:$ pip install past-mtl-monitorsFor developers, note that this project uses thepoetrypython package/dependency
management tool. Please familarize yourself with it and then
run:$ poetry installUsageThe primary entry point to thepast-mtl-monitorspackage is theatomfunction. This exposes a monitor factory which can be combined
with other monitor factories to create complex property monitors.Under the hood, these monitor factories are just wrappers around
python coroutines that expect a(time, val)pair, where time is afloatandvalis a mapping from strings to robustness values
(float).Notepast-mtl-monitorsonly implements a quantitative semantics
where a value greater than 0 implies sat and a value less than 0
implies unsat.Thus if one would like to use Boolean semantics, use1forTrueand-1forFalse.frompast_mtl_monitorsimportatomx,y,z=atom('x'),atom('y'),atom('z')# Monitor that historically, x has been equal to y.monitor=(x==y).hist().monitor()#                    time         valuesassertmonitor.send((0,{'x':1,'y':1}))==1# satassertmonitor.send((1.1,{'x':1,'y':-1}))==-1# unsatassertmonitor.send((1.5,{'x':1,'y':1}))==-1# unsatmonitor2=x.once().monitor()# Monitor's x's maximum value.assertmonitor2.send((0,{'x':-10,'y':1}))==-10assertmonitor2.send((0,{'x':100,'y':2}))==100assertmonitor2.send((0,{'x':-100,'y':-1}))==100# Monitor that x & y have been true since the last# time that z held for 3 time units.monitor3=(x&y).since(z.hist(0,3)).monitor()
Package: pastoke
PastokeScript for log, clear or replace clipboard with using 'pyperclip'Install.. code-block:: pythonpip install pastokeUsage.. code-block:: pythonfrom pastoke import log_changes, clear_clipboard, replace_clipboard

# log clipboard to log.txt file. Default path is python exe dir
log_changes()

# clear clipboard
clear_clipboard()

# replace clipboard with specified phrase
replace_clipboard(search='test', thing='trick')
Package: pastset
pyPastSet is a Python implementation of the PastSet tuple-based
distributed shared memory and computing system.In some ways PastSet is similar to the classic Linda tuplespace, but with some
significant differences. In PastSet, tuples are generated dynamically based on
tuple templates that may also be generated dynamically. Each set of tuples
based on identical templates is denoted an element of PastSet. An element may
be seen as representing a trace of interprocess communications in the
multidimensional space spawned by the tuple template.In effect, PastSet keeps a sequentially ordered log of all tuples of the same
or identical templates that have existed in the system. This also allows the
processes to re-read previously read tuples.
It is the intention that the added semantics of PastSet will allow programmers
to more easily create parallel programs that are not limited to the
traditional ‘bag of tasks’ type.pyPastSet implements the PastSet tuple memory and process distribution model
using the powerful Pyro distributed object framework for the core communication
and SSH for secure remote process spawning.
Package: past-time
A simple tool to visualize the progress of the year based on the past days.InstallationThe tool is available from thePython Package Index.$pip3installpast-timeInstallation on Fedora and CentOS/RHEL with EPEL.$dnf-yinstallpast-timeUsageExecute the command to get a visual representation of the year’s progress.$past-timenowDevelopmentFor development is recommended to use avenv.$python3.6-mvenv.$sourcebin/activate$python3setup.pydevelopLicensepast-timeis licensed under MIT, for more details check LICENSE.
Package: pAsynCrawler
pAsynCrawlerInstallationpipinstallpAsynCrawlerFeaturesFetch data -AsynchronouslyParse data - withmultiprocessingExampleexamplesfrombs4importBeautifulSoupfrompAsynCrawlerimportAsynCrawler,flattenerdefparser_0(response_text):soup=BeautifulSoup(response_text)menus=soup.select('ul > li > span > a')datas=tuple(x.textforxinmenus)urls=tuple(x.attrs['href']forxinmenus)return(datas,urls)defparser_0(response_text):soup=BeautifulSoup(response_text)menus=soup.select('ul > li > a')datas=tuple(x.textforxinmenus)urls=tuple(x.attrs['href']forxinmenus)return(datas,urls)if__name__=='__main__':ac=AsynCrawler(asy_fetch=20,mp_parse=8)datas_1,urls_1=ac.fetch_and_parse(parser_0,['https://www.example.com'])datas_2,urls_2=ac.fetch_and_parse(parser_1,flattener(urls_1))
Package: patabase
PatabaseDatabase API as it described inPEP 249is a comprehensive API. It's
amazing and we can implement any advanced scenario with it. But for a simple task we don't need an advanced or
comprehensive tool. We just need a simple tool to do the job for us. After all we all agree that "Simple is better than
complex."InstallationWe'd like to support all the databases, but we don't like to install all the drivers of all the databases. So first of
all install and config your database driver then install corresponding python package:pipinstall-Upsycopg2# for Postgrespipinstall-Upyodbc# for Microsoft SQL Servernow you can install it from PyPi by following command:pipinstall-Upatabaseor if you prefer the latest development version, you can install it from the source:gitclonehttps://github.com/xurvan/patabase.gitcdpatabase
pythonsetup.pyinstallQuickstartSQL commands are usually categorized into DDL, DQL, DML, DCL and TCL but we are going to categorized them into different
categories:Select: a command with output that is not going to change anythingPerform: a command without output that is going to change somethingFunction: a stored procedure with outputProcedure: a stored procedure without outputso let us see some code:frompatabaseimportPostgresdb=Postgres(host='localhost',user='USERNAME',password='PASSWORD',database='DATABASE_NAME')db.perform('''create table users(id          serial primary key not null,name        varchar            not null,username    varchar unique     not null)''')rows=db.select('select * from users')forrowinrows:print(row)TODOSupport PostgreSQLSupport Microsoft SQL ServerSupport SQLiteSupport MySQLSupport Oracle Database
Package: patacrep
This package provides a compilation toolchain that produce LaTeX
songbook using the LaTeX songs package. A new LaTeX document class is
provided to allow specific customisation and new command like embedded
guitar tabs or lilypond sheets.Document are subject to the GNU GPLv2 except if another license
is precised in the header.Python versionPatacrep is only compatible with Python > 3.3.InstallationUsing pipFor the stable version, as simple as:pip3 install patacrepAnd upgrade to the latest release:pip3 install patacrep -UOr for the latest version:pip3 install https://github.com/patacrep/patacrep/archive/master.zipDetails about the dependecies are in thedocumentation.For developementClone Patacrep repos:git clone git://github.com/patacrep/patacrep.git
cd patacrep
pip3 install -r Requirements.txt
python3 setup.py developQuick and dirty Debian (and Ubuntu?) packageThis requiresstdebto be installed:python setup.py --command-packages=stdeb.command bdist_deb
sudo dpkg -i deb_dist/python3-patacrep_4.0.0-1_all.debRunsongbook <songbook_file.yaml>
<pdfreader> <songbook_file.pdf>Look for existing songbook files inpatadata.DocumentationThe full documentation is hosted by readthedoc, here :http://patacrep.readthedocs.org/(currently only in french).Contact & Forumshttps://github.com/patacrep/patacrep/issues
Package: patatas
Patatashttps://pypi.org/project/patatas/Patatas is a Python package that provides tools for preprocessing and modeling data using machine learning algorithms.InstallationYou can install Patatas using pip:pip install patatasInstallationUsageEncoding categorical columns
To encode all categorical (object) columns of a pandas DataFrame using Label Encoding, you can use the fritas() function:frompatatasimportfritas
importpandasaspd# Create a sample DataFrame with categorical columnsdf=pd.DataFrame({'Color':['Red','Green','Blue'],'Size':['Small','Medium','Large']})# Encode categorical columns using Label Encodingdf_encoded=fritas(df)# Show the encoded DataFrameprint(df_encoded)Finding the best value of k for K-NN regression
To find the best value of k (number of neighbors) for K-NN regression based on the mean squared error, you can use the bravas() function:frompatatasimportbravas
importpandasaspd# Load a sample datasetdf=pd.read_csv('my_dataset.csv')# Find the best value of k for K-NN regressionbest_k=bravas(df,'target_column')print(f'The best value of k is {best_k}')Contributing
ContributionstoPatataPoderosaarewelcome!Tocontribute,pleasefollowthesesteps:Fork the repository and create a new branch for your feature or bug fix.
Write tests for your changes.
Implement your feature or bug fix.
Run the tests and ensure they pass.
Submit a pull request.
License
Patatas is released under the MIT License. See the LICENSE file for more details.
Package: patato
PATATO: PhotoAcoustic Tomography Analysis TOolkitDocumentationPATATO is an Open-Source project to enable the analysis of photoacoustic (PA) imaging data in a transparent, reproducible and extendable way. We provide efficient, GPU-optimised implementations of common PA algorithms written around standard Python libraries, including filtered backprojection, model-based reconstruction and spectral unmixing.The tool supports many file formats, such as the International Photoacoustic Standardisation Consortium (IPASC) data format, and it can be extended to support custom data formats. We hope that this toolkit can enable faster and wider dissemination of analysis techniques for PA imaging and provide a useful tool to the community.Please report any bugs or issues you find to our GitHub repositoryPlease do get involved! Contact Thomas Else (thomas.else@cruk.cam.ac.uk).Getting StartedIn order to use PATATO, you must have a Python environment set up on your computer. We recommend using Anaconda (http://anaconda.com) to run Python, particularly if you are using Windows. You may wish to setup a separate Anaconda environment to install PATATO to minimise conflicts between dependency versions.pipinstall--upgradepipsetuptools
pipinstallpatatoTo setup support for image reconstruction on Windows, or for GPU support, please follow the installation guide in the documentation.Documentation, examples and contributingDocumentation for PATATO can be found athttps://patato.readthedocs.io/en/latest/?badge=latest.Copyright (c) Thomas Else 2022-23.
Distributed under a MIT License.
Package: patator
Patator was written out of frustration from using Hydra, Medusa, Ncrack, Metasploit modules and Nmap NSE scripts for password guessing attacks. I opted for a different approach in order to not create yet another brute-forcing tool and avoid repeating the same shortcomings. Patator is a multi-threaded tool written in Python, that strives to be more reliable and flexible than his fellow predecessors.
Package: patcalc
patcalcBasic arithmetics calculator with memoryInstallationpip install patcalcUsage>>> from patcalc import Calculator
>>> c = Calculator()
>>> c.add(10)  # Adds 10.0 to memory
10.0
>>> c.subs(-5) # Adds 10.0 to memory
15.0
>>> c.subs(5)  # Adds 10.0 to memory
10.0
>>> c.mult(2)  # Adds 10.0 to memory
20.0
>>> c.div(5)   # Adds 10.0 to memory
4.0
>>> c.root()   # Root from current memory value 4.0
2.0
>>> c.root(25) # Reset memory value to 0.0 and gives the root of the argument
25.0
>>> c.reset()  # Reset memory to 0.0LicenseMIT
Package: patch
FeaturesPython 2 and 3 compatibleAutomatic correction of
* Linefeeds according to patched file
* Diffs broken by stripping trailing whitespace
* a/ and b/ prefixesSingle file, which is a command line tool and a libraryNo dependencies outside Python stdlibPatch format detection (SVN, HG, GIT)Nice diffstat histogramLinux / Windows / OS XTest coverageThings that don’t work out of the box:File renaming, creation and removalDirectory tree operationsVersion control specific propertiesNon-unified diff formatsUsageDownloadpatch.pyand run it with Python. It is a self-contained
module without external dependencies:patch.py diff.patchYou can also run the .zip file:python patch-1.16.zip diff.patchInstallationpatch.pyis self sufficient. You can copy it into your repository
and use it from here. This setup will always be repeatable. But if
you need to addpatchmodule as a dependency, make sure to use strict
specifiers to avoid hitting an API break when version 2 is released:pip install "patch==1.*"Changeshttps://github.com/techtonik/python-patch/blob/master/doc/CHANGES.md
Package: patch1337
patch1337Cross-platform 1337 patcher in Python. Initially designed to be used fornvidia-patch.InstallationFrom pypiSuggested to install viapipxwith:pipxinstallpatch1337or pip with:pipinstallpatch1337From repoClone the repo with:gitclonehttps://github.com/OMEGARAZER/patch1337.gitcd./patch1337Suggested to install viapipxwith:pipxinstall-e.or pip with:pipinstall-e.RunningOnce installed the patcher can be run with:patch1337When no arguments are passed the defaults settings will patchnvEncodeAPIandnvEncodeAPI64in the current directory.
To specify locations pass patch files with-pand patch targets with-t.patch1337--patchnvencodeapi.1337--targetC:\Windows\SysWOW64\nvEncodeAPI.dll-offsettrueArgumentsThere are three arguments that can be passed to the patcher:-p, --patchThe path to a 1337 patch file.-t, --targetThe path to the target file to patch.-o, --offsetWhether to apply the x64dbg offset (true by defualt)-vIncrease verbosity to debug outputEach can be specified multiple times to patch multiple files at once like this:patch1337--patchnvencodeapi.1337--targetnvEncodeAPI.dll-offsettrue--patchnvencodeapi64.1337--targetnvEncodeAPI64.dll-offsettrue
Package: patch-antenna
Design Patch AntennaA simple patch antenna design libraryPrerequisitePython environmentpython=3.10Install below packagespip install scipy==1.9.0
pip install gerber_writer==0.3.4Installationpip install patch_antennaDesign patch antennaTo get the design results of a patch antenna use the methoddesign(freq, er, h)by passing yourresonant frequency(Hz),dielectric constantandthickness of the cavity(m) values as arguments.Simple Design and UsageGetting design parametersimportpatch_antennaaspa# resonant frequency in Hzfreq=2.4*10**9# dielectric constanter=4.4# thickness of the cavity in meterh=1.6*10**-3result=pa.design_string(freq,er,h)print(result)Output:{'frequency': 2400000000.0, 'patch_width': 0.0380099749575278, 'patch_length': 0.0294215930843705, 'feeder_width': 0.015203989983011122, 'feeder_length': 0.015449608708025277, 'inset_gap_width': 0.007601994991505561, 'inset_length': 0.010914409094654586, 'ground_length': 0.05447120179239577, 'ground_width': 0.06281396494053892, 'input_edge_impedance': 321.50075290241097}Write as Gerber file for both feed typesNormal feedpa.write_gerber(freq,er,h,'patch_design_normal_2.4GHz_4.4_er_1.6_h.gbr','normal')Inset feedpa.write_gerber(freq,er,h,'patch_design_inset_2.4GHz_4.4_er_1.6_h.gbr','inset')Customize design resultsUsing design objectdesign=pa.design(freq,er,h)design.feeder_length*=1.25design.feeder_width*=1.10pa.write_gerber_design(design,'custom_patch_normal_design.gbr','normal')pa.write_gerber_design(design,'custom_patch_inset_design.gbr','inset')Future:Design and gerber generation for patch antenna arrays and including other parameters calculation.NotePatch antenna design, 3D simulation, and Gerber file facility also published as Web-Live application.Patch antenna util - Web Live ApplicationPatch antenna util - GitHubBlog post