Saravanan666/pypi-org huggingface dataset:
Package: patch-cli
Patch CLIPatch is a zero-config backend for building data products like customer-facing analytics and external data APIs. Connect a source and deploy low latency Dataset APIs instantly. No need to pre-define models, metrics, or OLAP cubes.Patch is an end-to-end solution for elevating analytics datasets into production. It often replaces a pipeline out of an analytical warehouse into a production database, the production database itself, a cache, and the access and API layers.FeaturesRun analytical queries over large datasets with low latency and without hitting the data warehousePerform time series bucketing, aggregations, grouping, filtering and sorting without writing complicated SQL queriesLeverage data from Snowflake, BigQuery, or Databricks (coming soon) in customer-facing applicationsLook up single row records with single digit millisecond response timesTurn your dbt models into memory-backed APIs in minutesQuery data from your application like a data micro-serviceAutomatically scale horizontally without setting up any infrastructureHow does it work?The best part is that you can instantly start building your application without setting up any infrastructure.Patch replicates your tables into a distributed memory grid and exposes APIs to query the datasets. Data is kept up to date with a built-in change data capture process, and you can optionally integrate with your orchestration tool.  Since the tables are fully replicated, queries never hit the data warehouse directly.Getting started: CLIPlease follow ourInstallationthenBasic Usagerecommendations on our documentation site.Getting helpIf we're already in touch, Slack or email is the best place to reach out for help. If you're reading this and our teams haven't engaged yet, please provide your email atpatch.techand we'll reach out as soon as possible!LicenseCopyright 2022 Patch EnterprisesLicensed 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 athttp://www.apache.org/licenses/LICENSE-2.0Unless 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: patch-denoise
This repository implements patch-denoising methods, with a particular focus on local-low rank methods.The target application is functional MRI thermal noise removal, but this methods can be applied to a wide range of image modalities.It includes several local-low-rank based denoising methods (see thedocumentationfor more details):MP-PCAHybrid-PCANORDICOptimal ThresholdingRaw Singular Value ThresholdingA mathematical description of theses methods is available in the documentation.Installationpatch-denoise requires Python>=3.8QuickstartAfter installing you can use thepatch-denoisecommand-line.$ patch-denoise input_file.nii output_file.nii --mask="auto"Seepatch-denoise--helpfor detailled options.Documentation and ExamplesDocumentation and examples are available athttps://paquiteau.github.io/patch-denoising/Development version$ git clone https://github.com/paquiteau/patch-denoising
$ pip install -e patch-denoising[dev,doc,test,optional]CitationIf you use this package for academic work, please cite the associated publication, available onHAL@inproceedings{comby2023,
  TITLE = {{Denoising of fMRI volumes using local low rank methods}},
  AUTHOR = {Pierre-Antoine, Comby and Zaineb, Amor and Alexandre, Vignaud and Philippe, Ciuciu},
  URL = {https://hal.science/hal-03895194},
  BOOKTITLE = {{ISBI 2023 - International Symposium on Biomedical Imaging 2023}},
  ADDRESS = {Carthagena de India, Colombia},
  YEAR = {2023},
  MONTH = Apr,
  KEYWORDS = {functional MRI ; patch denoising ; singular value thresholding ; functional MRI patch denoising singular value thresholding},
  PDF = {https://hal.science/hal-03895194/file/isbi2023_denoise.pdf},
  HAL_ID = {hal-03895194},
  HAL_VERSION = {v1},
}Related Packageshttps://github.com/paquiteau/retino-pypelineFor the application of the denoising in an fMRI pypeline using Nipypehttps://github.com/CEA-COSMIC/ModOptFor the integration of the patch-denoising in convex optimisation algorithms.
Package: patchdiff
Patchdiff 🔍Based onrfc6902this library provides a simple API to generate bi-directional diffs between composite python datastructures composed out of lists, sets, tuples and dicts. The diffs are jsonpatch compliant, and can optionally be serialized to json format. Patchdiff can also be used to apply lists of patches to objects, both in-place or on a deepcopy of the input.Installpip install patchdiffQuick-startfrompatchdiffimportapply,diff,iapply,to_jsoninput={"a":[5,7,9,{"a","b","c"}],"b":6}output={"a":[5,2,9,{"b","c"}],"b":6,"c":7}ops,reverse_ops=diff(input,output)assertapply(input,ops)==outputassertapply(output,reverse_ops)==inputiapply(input,ops)# apply in-placeassertinput==outputprint(to_json(ops,indent=4))# [#     {#         "op": "add",#         "path": "/c",#         "value": 7#     },#     {#         "op": "replace",#         "path": "/a/1",#         "value": 2#     },#     {#         "op": "remove",#         "path": "/a/3/a"#     }# ]
Package: patchdistances
This package includes methods for clustering patches and reconstructing images using invariant patch distances.
The package is build upon the CUDA C++ project:invariant_patch_distances.
The package has the following dependencies: an NVIDIA graphics card of compute capability 3.x or higher,
CUDA 10.0 and CMake 3.10.ExampleThe following example shows how to cluster patches and reconstruct an image using these clusters.importpatchdistancesaspd# Load image as Float32 numpy array. It can either be gray-scale or rgb.img=load_image()//Initializethedistanceclass.//Alternatively:similarity_inv_dist.aid=pd.affine_inv_dist()//Greedy-k-centerclusteringoftheimagepatchesusingthedistance.labels,indices_of_labels=aid.greedy_k_center(image=img,patch_shape=(7,7),clusters=20,first_patch_idx=0,solver=pd.solver_t.procrustes,func_family=pd.func_t.superlevelsets,use_imed=False,interpolation=pd.inter_t.bicubic,)//Reconstructtheimageusingthepreviouslyclusteredpatches.//Alternatively:reconstruct_w_translation.reconstructed_image,nearest_neighbor_labeling=aid.reconstruct(image=img,labels=labels,rec_type=pd.rec_t.Median,solver=pd.solver_t.procrustes,func_family=pd.func_t.superlevelsets,use_imed=False,interpolation=pd.inter_t.bicubic,)
Package: patched-cli
Patched!patched-cliis a CLI that generates vulnerability patches for your codebase.Quickstart guideInstall patched-cli.pipinstallpatched-cliRunpatched-cliwith your git repository as its argument or working directory.
When the working directory is the git repositorypatched-cliWhen the argument is the git repositorypatched-cli/path/to/my/git/repositoryIf this is the first time runningpatched-cli, you will be redirected to patched'ssign-in pageto generate a token. Copy the token and paste it to the prompt.
If this is not the first time runningpatched-clian application directory should already exist under your user's
home directory if you are using a Unix-based operating system or
AppData folder if you are using a windows based operating system.
Alternatively you can set the environment variablePATCHED_ACCESS_TOKENbefore runningpatched-cli.exportPATCHED_ACCESS_TOKEN="your-patched-access-token-here"patched-cliTo create a pull request you can set the--create-prflag.patched-cli--create-prIfpatched.codesis not installed in your GitHub repository you can givepatched-cliyour
GitHub Personal Access Token via the option--github-access-tokenor set the environment variablePATCHED_GITHUB_TOKENexportPATCHED_GITHUB_TOKEN="your.patched.access.token.here"patched-cli--create-prExtras for Windows userspatched-clionly supports Windows using WSL(Windows Subsystem for Linux). Please consultWSL installfor more information.
Package: patchelf
patchelfis a  small utility to modify the dynamic linker
and RPATH of ELF executables.This project allows to get this utility fromPyPIwith a simplepip install patchelf.Reporting issuesThis repo only aims at providing a rebuild of patchelf on PyPI and as such,
only issues related to this specific packaging will be dealt with in this repository.For all issues you might see when usingpatchelf, please report directly upstream after reproducing with one of their pre-built
binaries or rebuilding patchelf from their repository:https://github.com/NixOS/patchelfLatest ReleaseBuild StatusPlatformsThe following platforms are supported with binary wheels:OSArchLinux x86_64manylinux1+musllinux_1_1+Linux i686manylinux1+musllinux_1_1+Linux aarch64manylinux2014+musllinux_1_1+Linux ppc64lemanylinux2014+musllinux_1_1+Linux s390xmanylinux2014+musllinux_1_1+LicenseThis project is covered by theApache License, Version 2.0.patchelf is distributed under the OSI-approved GNU General Public License v3.0.
For more information about patchelf, visithttps://github.com/NixOS/patchelf
Package: patchelf-wrapper
patchelf-wrapperis a simple Python module that assists in the
installation of the*patchelf*utility. It’s intended for use with PyPI-hosted Python projects that
depend on patchelf. If you’re an end-user of patchelf, you should look
elsewhere! (Perhaps your OS’s package manager?)Currently, patchelf-wrapper installspatchelf 0.11.UsageOrdinarily, you’ll just want to set'patchelf-wrapper'as one of
your requirements (e.g. insetup.py). If installing directly, you
can just usepython setup.py installorpython setup.py buildas
usual; this respects all the usual options, including automatically
installing patchelf into thebindir of a virtualenv if one is
active.In addition, patchelf-wrapper contains the following setup commands
beyond the defaults:check_patchelf: Checks if patchelf is already installed on the
systembuild_patchelf: Extract patchelf’s source and build itinstall_patchelf: Install patchelf to the chosen locationLicenseThis project is licensed under theBSD 3-clause license.
Patchelf itself is licensed under the GPL, version 3.
Package: patch-env
patch_env - Patch os.environ with dynamic values when the interpreter startspatch_envlets you update Python’sos.environ(the system environment
variables dictionary) early during the interpreter’s lifecycle, using the output
of a command you specify.This means you can inject a dynamic set of environment variables into the Python
interpreter without changing the environment of the process that starts the
interpreter or the command line arguments used to start it.  Integrated
development environments (IDEs) often make it inconvenient or difficult to
inject dynamic values in those configuration elements, sopatch_envcan help
there.How it Workspatch_envinstalls aPython site-specific configuration hook
<https://docs.python.org/3/library/site.html>that causes it to run very early
when the interpreter starts.  When it runs, if thePATCH_ENV_COMMANDenvironment variable is set, its value is executed as a shell command and the
output of that command is used to updateos.environ.So basically, setPATCH_ENV_COMMANDwhen you wantpatch_envto patch
things up for you, and don’t set it when you don’t.Your command’s output should contain one environment variable per line, in the
formatKEY=value:FOO=bar
AWS_SESSION_TOKEN=FwoGZXIvY...
HINT=values can have spaces and "special chars", but not newlinesExample: PyCharm/IntelliJ IDEA debugging with aws-vaultYou’re developing a program that uses theboto3
<https://github.com/boto/boto3>library to access Amazon Web Services (AWS).
Your organization prohibits storing unencrypted access keys on disk, so you useaws-vault <https://github.com/99designs/aws-vault>to manage them securely.
This works great when you’re running your program from the command line, but
there isn’t an easy way to get your IDE to feed the output ofaws-vaultinto
the environment before it starts the Python interpreter.Here’s how you can usepatch_envwith an IDE like PyCharm to injectaws-vault’s output into the Python interpreter you’re debugging with:Installpatch_envusing pip.Edit your PyCharm debug configuration and set thePATCH_ENV_COMMANDenvironment variable:PATCH_ENV_COMMAND=aws-vault exec my-profile -- sh -c "env | grep ^AWS_"Adjust theaws-vaultcommand line as needed for your profile, session
duration, etc.  The important part is that we makeaws-vaultexecute a
shell process that pipes all its environment variables throughgrepso we
select only the AWS credential variables.Now run the debugger.patch_envlogs the variables it parses from your
command at theDEBUGlevel, so you can configure Python logging at that
level if you need to verify that they’re being parsed correctly.LimitationsIfaws-vaultdoesn’t already have valid credentials when you start
debugging, it may need to read things like your MFA token from standard input.
This will fail sincepatch_envdoesn’t feed any input to itsPATCH_ENV_COMMAND.As a work-around, open a new terminal and runaws-vaultexecfor the profile
you use for debugging, enter the credentials there, and then re-launch the
debugger.aws-vaultstores its session tokens in your system’s keystore, so
they’ll be available to other instances ofaws-vaultuntil they expire.
Package: patcherex2
Patcherex 2[!WARNING]
This project is currently in its initial development stages. Please anticipate potential breaking changes. The first stable release is targeted for early March 2024.Patcherex 2 is a rewritten adaptation of the originalPatcherexproject, aimed at building upon its core ideas and extending its capabilities.InstallationPatcherex 2 is available on PyPI and can be installed with pip:pipinstallpatcherex2UsageComing soon.Supported TargetsLinux x86Linux amd64Linux armLinux aarch64Linux PowerPC (32bit)Linux PowerPC (64bit)Linux PowerPCle (64bit)Linux MIPS (32bit)Linux MIPS (64bit)Linux MIPSEL​(32bit)Linux MIPSEL(64bit)SPARCv8 (LEON3)PowerPC (VLE) (IHEX)InsertDataPatch🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜RemoveDataPatch🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜ModifyDataPatch🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜InsertInstructionPatch🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜RemoveInstructionPatch🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜ModifyInstructionPatch🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜InsertFunctionPatch🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜ModifyFunctionPatch🟨🟩🟩🟩🟨🟨🟨🟨🟨🟨🟨⬜⬜🟩 Fully Functional, 🟨 Limited Functionality, 🟥 Not Working, ⬜ Not Tested, 🟪 Work in Progress
Package: patchGAN
patchGANUNet-based GAN model for image segmentation using a patch-wise discriminator.
Based on thepix2pixmodel.InstallationInstall the package with pip:pip install patchganUpgrading existing install:pip install -U patchganGet the current development branch:pip install -U git+https://github.com/ramanakumars/patchGAN.gitTrainingYou can train the patchGAN model with a config file and thepatchgan_traincommand:patchgan_train --config_file train_coco.yaml --n_epochs 100 --batch_size 16Seeexamples/train_coco.yamlfor the corresponding config for the COCO stuff dataset.
Package: patchgenerator
patchgeneratorThepatchgeneratoris a simple tool to generate array indices, with or without overlap, to create numpy array patches. Only requires python.Example usage:from patch_indices.patch_indices import PatchGenerator

patch_generator = PatchGenerator(100, 80, 10, 20, y_overlap=2, x_overlap=3)
for patch in patch_generator:
    row_start, cols_start, row_end, cols_end = patch
    print("row_start, cols_start, row_end, cols_end", row_start, cols_start, row_end, cols_end)import numpy as np
from patch_indices.patch_indices import PatchGenerator

np_array = np.ones((100, 80, 3), dtype=np.uint8)
y_size, x_size, z_size = np_array.shape
patch_size_y = 10
patch_size_x = 20

patch_generator = PatchGenerator(y_size, x_size, patch_size_y, patch_size_x, y_overlap=2, x_overlap=3)
for patch in patch_generator:
    row_start, cols_start, row_end, cols_end = patch
    print("row_start, cols_start, row_end, cols_end", row_start, cols_start, row_end, cols_end)
    print(np_array[row_start:row_start + row_end, cols_start:cols_start + cols_end, :].shape)
Package: patchguard
Patch GuardWelcome to patch_guard. You can find more extensive documentation over atreadthedocs.Contributions are welcome. Just get in touch.QuickstartSimplypip install patchguardand get going. The cli is available aspatchguardand
you can runpatchguard --helpto get up to speed on what you can do.DevelopmentThis project usespoetryfor dependency management andpre-commitfor local checks.
Package: patchify
patchifypatchfy can split images into small overlappable patches by given patch cell size, and merge patches into original image.This library provides two functions:patchify,unpatchify.Installationpip install patchifyUsageSplit image to patchespatchify(image_to_patch, patch_shape, step=1)2D image:#This will split the image into small images of shape [3,3]patches=patchify(image,(3,3),step=1)3D image:#This will split the image into small images of shape [3,3,3]patches=patchify(image,(3,3,3),step=1)Merge patches into original imageunpatchify(patches_to_merge, merged_image_size)reconstructed_image=unpatchify(patches,image.shape)This will reconstruct the original image that was patchified in previous code.Caveat: in order forunpatchifyto work, you need to create patchies with equal step size. e.g. if the original image has width 3 and the patch has width 2, you cannot really create equal step size patches with step size 2. (first patch [elem0, elem1] and second patch [elem2, elem3], which is out of bound).The required condition for unpatchify to success is to have (width - patch_width) mod step_size = 0.Full running examples2D image patchify and mergeimportnumpyasnpfrompatchifyimportpatchify,unpatchifyimage=np.array([[1,2,3,4],[5,6,7,8],[9,10,11,12]])patches=patchify(image,(2,2),step=1)# split image into 2*3 small 2*2 patches.assertpatches.shape==(2,3,2,2)reconstructed_image=unpatchify(patches,image.shape)assert(reconstructed_image==image).all()3D image patchify and mergeimportnumpyasnpfrompatchifyimportpatchify,unpatchifyimage=np.random.rand(512,512,3)patches=patchify(image,(2,2,3),step=1)# patch shape [2,2,3]print(patches.shape)# (511, 511, 1, 2, 2, 3). Total patches created: 511x511x1assertpatches.shape==(511,511,1,2,2,3)reconstructed_image=unpatchify(patches,image.shape)print(reconstructed_image.shape)# (512, 512, 3)assert(reconstructed_image==image).all()
Package: patchio
Python monkey-patching utilitiesFree software: BSD licenseDocumentation:https://patchio.readthedocs.org.Issue tracker:https://github.com/treyhunner/patchio/issuesPackage available onPyPIPull requests are welcome.  Read the CONTRIBUTING file for tips on submitting
a pull request.History0.1.0 (2015-10-31)First release on PyPI.
Package: patch-issue
Patch manager for easy tracking with integration in jira.ConceptWe’ve all put patches over patches in our code, for various reasons:Hot fixing a currently released versionTemporary place-holderOr just because we felt like it - so we wouldn’t have to design some
complex structure.This is wherepatch-issuecomes into play.
We wanted to have a way of notifying the programmer that the current code segment
is a part of a patch - using Jira issue tracking system and some kind of a logger.
Then, later on,patch-issuewill notify the programmer (in runtime) that
the issue is closed and the programmer can remove the patch easily.Important NoteWe do not encourge the usage of patches in a code segment.
This tool main purpose is to help programmers track their patches,
so they won’t forget the patch in their code (long term wise).How to install?Simply run:$pipinstallpatch-issueAnd try to import:importpatch_issueOk, So how do I start?First, you need to make a connection to Jira in your code,
and just for that there is an awesome library called -
yeah you guessed right -jira- [jira pypi link](https://pypi.org/project/jira/).Here is how to make a simple connection:connection.pyfromjiraimportJIRAjira_connection=JIRA(server="http://jira/",basic_auth=("username","password"))Now you can make a new patch class (patches.py):importloggingfrompatch_issueimportJiraPatchIssuefromconnectionimportjira_connection# from previously made connectionclassFixDBConnection(JiraPatchIssue):ISSUE_KEY="APP-1"# a must have class attributeDESCRIPTION="Fixes db connection using a mocked password."WAY_TO_SOLVE="Configure the right password."fix_connection=FixDBConnection(jira=jira_connection,logger=logging)# there is also a default loggerNow you can use your patch freely in your code:import.configfrom.dbimportDBfrompatchesimportfix_connection# import your patch instance##################################################################@fix_connection.patch_function# use patch as a function decoratordefnew_connection():returnDB.make_connection("user","password")new_connection()##################################################################usename="someuser"password=config.get_password()withfix_connection.patch:# use patch as a context managerpassword="1234"db=DB.make_connection(username,password)Now, when your code reaches to the patches,
a message will be logged in your logger!
You will never miss your patches again!
Package: patchit
Patchit is an MIT Licensed unified diff parsing and merge tool written in
Python for anyone who needs a finer grain of control over unified diff
content and to merge the diff with an arbitrary stream of lines.MotivationThe motivation for this package arose from theoverwhelming complexity of other patching tools written in Python,their absence from the PyPI,their inability to inspect the unified diff content andmissing support to merge the patch with an arbitrary stream of lines.InstallationTo install patchit just run from the root of the project:$pythonsetup.pyinstallTestingTests are located at thetests.pyfile. In order to test your new
contribution to patchit just run from your shell$pythonsetup.pytestContributeUnfortunately, I wasn’t able to make it much better myself. Therefore I’m
asking anyone who is interested in a patch functionality for Python to
improve this package and hand in patches by mail or pull requests.The preferred method of development is a test driven approach and following
the nvie git flow branching model. Please be so kind to bear these things in
mind when handing in improvements. Thank you very much.
Package: patchlab
A Django application designed to run with Patchwork to mirror patches to GitLab.Development EnvironmentThe easiest method to set up a development environment is to use Vagrant. On
Fedora:$ sudo dnf install vagrant libvirt vagrant-libvirt vagrant-sshfs ansible
$ vagrant up gitlab
$ vagrant up pwThis sets up two virtual machines. You can ssh to them withvagrant ssh pwandvagrant ssh gitlab. Thepwhost contains the development
installation of PatchLab.GitLabGitLab’s web UI is available athttps://localhost:8443/.The Ansible role restores it from backup, so there is already an administrator,
“root”, with the password “password”. Cloning over SSH is available on
port 2222.A test project, “patchlab_test” is available and already includes a web hook
configured for merge request events.PatchworkThe Patchwork web UI is available athttp://localhost:8000/. A preconfigured
super user “admin” has the password “admin” which you can use to log in tohttp://localhost:8000/admin/.The development enviroment also includes a preconfigured Patchwork Project for
“patchlab_test”, along with the necessary Git forge and branch configuration.