Saravanan666/pypi-org huggingface dataset:
Package: patchmentation
PatchmentationPatchmentation is a python library to perform patch augmentation, a data augmentation technique for object detection, that allows for the synthesis of new images by combining objects from one or more source images into a background image.The process of patch augmentation involves extracting objects of interest from the source images, transforming them, and then pasting them onto the background image to create a composite image, therefore increasing diversity at the object level. The resulting dataset offers a greater variety of object combinations within a single image, making it more robust and accurate when training object detection models.InstallationThe easiest way to install patchmentation is through pip.pipinstallpatchmentationNote: Some functionality of patchmentation might not be working on non-Linux systems.External LinksGitHub Repository:https://github.com/Xu-Justin/patchmentationPyPI:https://pypi.org/project/patchmentationDocs: TBAResearch Paper: TBABenchmarking Results:https://github.com/Xu-Justin/patchmentation-yolov5This project was developed as part of thesis project, Computer Science, BINUS University.
Package: patch-ng
[![Build Status Travis CI](https://travis-ci.org/conan-io/python-patch-ng.svg?branch=master)](https://travis-ci.org/conan-io/python-patch-ng)
[![Build status Appveyor](https://ci.appveyor.com/api/projects/status/i4r6lf62slvx82db?svg=true)](https://ci.appveyor.com/project/ConanCIintegration/python-patch-ng)
[![PyPI](https://img.shields.io/pypi/v/patch-ng)](https://pypi.python.org/pypi/patch-ng)## Patch NG (New Generation)#### Library to parse and apply unified diffs.#### Why did we fork this project?This project is a fork from the original [python-patch](https://github.com/techtonik/python-patch) project.As any other project, bugs are common during the development process, the combination of issues + pull requests are
able to keep the constant improvement of a project. However, both community and author need to be aligned. When users,
developers, the community, needs a fix which are important for their projects, but there is no answer from the author,
or the time for response is not enough, then the most plausible way is forking and continuing a parallel development.That’s way we forked the original and accepted most of PRs waiting for review since jun/2019 (5 months from now).### 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 formats### UsageDownloadpatch_ng.pyand run it with Python. It is a self-contained
module without external dependencies.patch_ng.py diff.patchYou can also run the .zip file.python patch-ng-1.17.zip diff.patch### Installationpatch_ng.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-ng”### Other stuff[CHANGES](doc/CHANGES.md)[LICENSE: MIT](LICENSE)[CREDITS](doc/CREDITS)
Package: patchouli
# Patchouli: an interactive patch file splitterHave you ever committed a big batch of changes that need to be code reviewed?Did it happen that the code got finetuned and bugfixed over time, but you wantto split up the final change set in a way that makes it easier on the reviewers?Does it so happen that the preferred review units don't line up with your commitunits? Maybe not even with complete files?If you've ever wanted to split a patch set into parts at the hunk level, and doso iteratively and interactively, patchouli is for you!## InstallingPatchouli is available via pip:pip install patchouli## Usage(I'll use an arbitrary Linux kernel patch file to demonstrate)Run `patchouli` on your patch file(s):$ patchouli example.patchPatchouli will show you the first hunk and a prompt to start typing commands.(Type 'create foo' then 'move foo' to start classifying hunks)**************** linux/arch/i386/kernel/process.c.seg ***************** Save away %fs and %gs. No need to save %es and %ds, as* those are always kernel segments while inside the kernel.*/-	asm volatile("movl %%fs,%0":"=m" (*(int *)&prev->fs));-	asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs));+	asm volatile("mov %%fs,%0":"=m" (prev->fs));+	asm volatile("mov %%gs,%0":"=m" (prev->gs));/** Restore %fs and %gs if needed.unclassified (1/8)>Patchouli calls a bunch of hunks a "change set". At the start, all of your hunkswill be in the change set named "unclassified". To see all hunks, type `ls`:> lsYou'll see the following:->   1) linux/arch/i386/kernel/process.c.seg2) linux/arch/i386/kernel/vm86.c.seg3) linux/arch/x86_64/kernel/process.c.seg4) linux/arch/x86_64/kernel/process.c.seg5) linux/arch/x86_64/kernel/process.c.seg6) linux/arch/x86_64/kernel/process.c.seg7) linux/include/asm-i386/system.h.seg8) linux/include/asm-i386/system.h.seg(Type 'hunk N' to go to a specific hunk, 'show' to show the current hunk)Create a new change set to move changes into:> create i386Start moving the first two hunks into this new change set:> move i386   (or simply 'm i386')> m           (without a name repeats the last move)> <enter>     (simply pressing enter repeats the last command)Type `set` to see an overview of all change sets:> seti386 (2 hunks)-> unclassified (6 hunks)Type `write` to write out the changes to individual `.patch` files:> writeWrote i386.patchWrote unclassified.patch## Helpful tips* Type `help` for a list of all commands.* `undo` undoes the last move.* You can move through the hunk list by typing `next` and `back`.* `next`, `back` and `move` can be shortened to `n`, `b` and `m`.* The shell has tab completion, courtsey of Python's `cmd` library.
Package: patchpanel
Patch PanelPatch Panel is a Python library for solving constrained connectivity between sources and sinks. The sources and sinks can be any arbitrary (hashable) object, and connectivity is returned as a simple list of tuples. This library does not guarantee a unique solution, it simply returns the first legal solution that satisfies all constraints.InstallingEasiest way to install Patch Panel is to grab it from PyPI:$>pipinstallpatchpanelAlternatively you can install it manually:$>gitclonegit@github.com:Intuity/patchpanel
$>cdpatchpanel
$>python3setup.pyinstallExamplefrompatchpanel.problemimportProblem# Create I/Osources=[f"src_{x}"forxinrange(2)]sinks=[f"snk_{x}"forxinrange(2)]# Create the problemproblem=Problem(sources,sinks)# Constrain to allow any-to-anyproblem.constrain(sources,sinks)# Solveconns,u_src,u_sink=problem.solve()# Displayprint(f"Connections:{conns}")print(f"Uncon. src :{u_src}")print(f"Uncon. sink:{u_sink}")Running TestsPatch Panel comes with a basic suite of tests, which usepytestfor regression:$> git clone git@github.com:Intuity/patchpanel
$> cd patchpanel
$> python3 setup.py test
Package: patchparser
PatchParserA python package to extract features from a commit patch.Please note this repository is still in the initial development phase.InstallationUse the package managerpipto install patchparser.pipinstallpatchparserUsagefrompatchparserimportgithub_parserif__name__=='__main__':# Parse a given commit for a GitHub repositoryparsed=github_parser.commit(repo_owner="Lightning-AI",repo_name="lightning",sha="62f1e82e032eb16565e676d39e0db0cac7e34ace")Parsed FeaturesColumnsTypeDescriptionrepo_ownerstrRepository Ownerrepo_namestrRepository NameshastrTarget Commit SHAmessagestrAssociated commit messagefile_namestrName of file altered in patchfile_numberintFile number in patchfile_extensionstrFile extensiontotal_files_changedintNumber of files changed at commitraw_file_patchstrThe raw patch for the entire filepatch_numberintPatch instancetotal_patchesintTotal number of patches per fileraw_patch_headerstrHeader of the patch (@@ -A,X +B,Y @@)raw_patchstrThe raw patch for a single patchoriginal_codestrThe left side (parent commit state) of the git diff in GitHub. Raw code. -'s are stripped.original_line_startintOriginal line start number (@@ -A,X +B,Y @@)original_line_lengthintOriginal line end (@@ -A,X+B,Y @@)original_line_endintOriginal_line_start + original_line_lengthmodified_codestrThe right side (target commit state) of the git diff in GitHub. Raw code. +'s are stripped.modified_line_startintModified line start number (@@ -A,X +B,Y @@)modified_line_lengthintModified line end (@@ -A,X +B,Y@@)modified_line_endintModified_line_start + modified_line_lengthadditionsintAdded lines count in a patchadded_codestrRaw code added during patchdeletionsintDeleted lines count in a patchdeleted_codestrRaw code deleted during patchchangesintadditions + deletionsstatusstrGitHub status tag at file level (e.g., modified)total_additionsintTotal lines added for a filetotal_deletionsintTotal lines deleted for a filetotal_changesintTotal lines changed for a file (total_additions + total_deletions)commit_author_namestrAuthor name of commitcommit_author_loginstrAuthor login of commitcommit_author_emailstrAuthor email of commitcommit_author_datestrAuthor commit datecommit_committer_namestrCommitter name of commitcommit_committer_loginstrCommitter login of commitcommit_committer_emailstrCommitter email of commitcommit_committer_datestrCommitter commit datecommit_tree_shastrCommit tree SHAcommit_tree_urlstrCommit tree URLcommit_verification_verifiedboolBoolean verfication statuscommit_verification_reasonstrVerfication reasonparentslistParent commit SHAs of target SHAContributingPull 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.LicenseUnlicense
Package: patchpyro
PatchPyroThis is a fork of pyromod (renamed as patchpyro) for personal usecases.Remember that this fork contains only conversation patch.Requirements:pyrogram>=2.0.69python>=3.9Installation:python -m pip install patchpyroUsage:Importpatchpyroat least one time in your script, so you'll be able to use modified pyrogram in all files of the same proccess.
Example:# config.pyfrompatchpyroimportlisten# or import patchpyro.listenfrompyrogramimportClientmybot=Client("mysession")# any other .pyfromconfigimportmybot# no need to import patchpyro again pyrogram is already monkeypatched globally (at the same proccess)patchpyro.listenJust import it, it will automatically do the monkeypatch and you'll get these new methods:Available bound methods::Chat.listen, User.listenawait mybot.listen(chat_id, filters=None, timeout=30)raisesasyncio.TimeoutErrorif timeout (optional parameter)Awaits for a new message in the specified chat and returns it.You can pass Update Filters to the filters parameter just like you do for the update handlers.E.g.filters=filters.photo & filters.botChat.ask, User.askawait mybot.ask(text, chat_id, filters=None, timeout=30)Same of.listen()above, but sends a message before awaiting.You can pass custom parameters to its send_message() call. Check the example below.Chat.asker, User.askerawait mybot.asker(chat_id, filters=None, timeout=36)same as.listen()but.asker()returnsNoneinstead of raisingasyncio.TimeoutError.Found useful in some cases for me,.asker()has a default timeout of 2 minutes.You can adjust it by passing as a argument. Refer the example code given below.Examples:For .asker():...sendx=awaitclient.send_message(chat_id,"`Send me your name:`")answer=awaitclient.asker(chat_id,filters=None,timeout=60)ifnotanswer:# `None` if timeout if no reply received.returnawaitsendx.reply_text("How long should I wait?, Eh! Bye!")awaitanswer.reply_text(f"{answer.text}, That's a cool name!")...For .ask():...answer=awaitclient.ask(chat_id,'*Send me your name:*',parse_mode=enums.ParseMode.MARKDOWN)awaitclient.send_message(chat_id,f'Your name is:{answer.text}')...Copyright & LicenseThis project may include snippets of Pyrogram codePyrogram - Telegram MTProto API Client Library for Python. Copyright (C) 2017-2022 Dan <https://github.com/delivrance>Licensed under the terms of theGNU Lesser General Public License v3 or later (LGPLv3+)
Package: patch-requests
patch-requestsSimple patching ofrequestscalls.The package contains apatch_requestscontext manager, which can be used to
mock one or multiple calls torequests.FOO()methods. Also calls torequests.Session().FOO()are mocked automatically.Thepatch_requestscontext manager takes a list of expected HTTP methods to
be called, as well as their expected status codes and returned data. A single
expected call is a tuple of("method", ("status_code (int)", "returned_data (either dict, str or bytes)")). E.g.:withpatch_requests([('get',(200,{'ids':[1,3,4]}))])ascm:assertrequests.get('http://whatever').json()=={'ids':[1,3,4]}Some assumptions are made based on the type of given "returned data":if type isdict, the return value ofresponse.json()is set to the given valueif type isstr, theresponse.textis set to the given valueif type isbytes, theresponse.contentis set to the given value.Upon exiting thepatch_requestscontext, it is possible to access the mocks of
eachrequestscalls withcm.mocks, which is a dictionary with method names as keys.
For example:withpatch_requests([('get',(200,{'ids':[1,3,4]}))])ascm:assertrequests.get('http://whatever').json()=={'ids':[1,3,4]}assertcm.mocks['get'].call_args_list[0][0][0]=='http://whatever'A full example from tests.py:importunittestimportrequestsfrompatch_requestsimportpatch_requestsclassTestPatcher(unittest.TestCase):deftest_multiple_requests(self):withpatch_requests([('get',(200,{1:1})),('post',(201,{2:2})),('GET',(404,'<html><p><br/>')),('patch',(500,b'\\')),])asp:response=requests.get('http://example.com')self.assertEqual(response.status_code,200)self.assertEqual(response.json(),{1:1})s=requests.Session()response=s.post('http://www.example.com')self.assertEqual(response.status_code,201)self.assertEqual(response.json(),{2:2})response=s.get('http://')self.assertEqual(response.status_code,404)self.assertEqual(response.text,'<html><p><br/>')s.close()response=requests.patch('')self.assertEqual(response.status_code,500)self.assertEqual(response.content,b'\\')self.assertEqual(p.mocks['get'].call_args_list[0][0],('http://example.com',))self.assertEqual(p.mocks['post'].call_args_list[0][0],('http://www.example.com',))
Package: patch.singingdancing
A simple and stupid override for singing dancingif there is an STMTP exception raised the process queue stop but dispatch is not
notice of that.Inhttp://svn.plone.org/svn/collective/collective.singing/trunk/collective/singing/message.pythe try, catch doesn’t work in that case because of the architecture of
zope.sendmail I guess.  I think thatcollective.dancing.composer.SMTPMailer.sendmust have atry ... exceptin that case. Exceptions insmtplibare :“SMTPException”, “SMTPServerDisconnected”, “SMTPResponseException”,
“SMTPSenderRefused”, “SMTPRecipientsRefused”, “SMTPDataError”,
“SMTPConnectError”, “SMTPHeloError”, “SMTPAuthenticationError”,SMTPRecipientsRefusedandSMTPSenderRefusedare not critical error for
the dispatch process and I think they can be catch in theSMTPMailer.  In my
case , recipients received hundred message of the same newsletter because the
queue failed of a empty email address. The queue is never purge and the@@dancing.utils/tick_and_dispatchfinish by blocking zope server.The traceback:INFO collective.singing Dispatching is locked by another process.

CRITICAL txn.16292 A storage error occurred during the second phase of the
two-phase commit.  Resources may be in an inconsistent state.

2009-05-25T09:48:09 ERROR Zope.SiteErrorLog
.../@@dancing.utils/tick_and_dispatch

Traceback (innermost last):

 Module ZPublisher.Publish, line 125, in publish

 Module Zope2.App.startup, line 238, in commit

 Module transaction._manager, line 96, in commit

 Module transaction._transaction, line 395, in commit

 Module transaction._transaction, line 503, in _commitResources

 Module zope.sendmail.delivery, line 87, in tpc_finish

 Module collective.dancing.composer, line 376, in send

 Module zope.sendmail.mailer, line 72, in send

 Module smtplib, line 695, in sendmail

SMTPRecipientsRefused: {}So the goal of this egg is to avoid that !!:>>> from zope.component import getUtility
>>> from zope.sendmail.mailer import ISMTPMailer
>>> utility = getUtility(ISMTPMailer, name= 'patchplone.smtp')
>>> utility
<patch.singingdancing.composer.SMTPMailer...>Provide an simple patch to smtplib:>>> from zope.sendmail.mailer import SMTPMailer
>>> from smtplib import SMTPRecipientsRefused
>>> from smtplib import SMTPSenderRefused
>>> def new_send(self, from_addr, to_addrs, msg):
...    if to_addrs == ['toto@host.com']:
...        raise SMTPSenderRefused(500, 'failed',to_addrs)
...    elif to_addrs == []:
...        raise SMTPRecipientsRefused(to_addrs)
...    else:
...        return {}

>>> SMTPMailer.send = new_sendSo now test the function:>>> utility.send('y.boussard@ingeniweb.com',['y.boussard@free.fr',],'')
{}
>>> utility.send('y.boussard@ingeniweb.com',['toto@host.com',],'')
{'toto@host.com':...}
>>> utility.send('y.boussard@ingeniweb.com',[],'')
{'y.boussard@ingeniweb.com':...}Changes log1.0.2Cleaned restructuredtext in docs
[glenfant]1.0.1Added z3c.autoinclude awareness
[glenfant]Issue (warning) in unknown option in setup.py
[glenfant]1.0Initial release
Package: patchtool
patchtoolPrerequisiteHere I will simply list the packages on which the tool is implemented. It should be working fine with similar environmentOS: LinuxInterpreter: 3.6.8Version Controller: git 2.18.1Compiler: gcc-8.3.1Kernel: 4.18.0-128.el8.x86_64InstallationInstall via pippip install patchtoolHow to useusage: patchtool [-h] -d D -p P [-s]

optional arguments:
  -h, --help  show this help message and exit
  -d D        The directory where this patch tool is hoped to be used
  -p P        Directory of the patch file
  -s S        The style in which you would like the updated file to be outputThe patchtool provides with two modes where you can choose either to let the tool verify if the code in patch still exists and unmodified, or just do not check their validity, and output the line-number-modified patches. To verify the code, add-s verifyafter the command, and the output will tell you at the command whether each commit is verified. As the excecution finishes, two files will be generated with verified and unverified separately in each file.An ordinary usage goes like this:patchtool -d [git_directory] -p [patchfile_path]Directly output the updated line number to the terminal.patchtool -d [git_directory] -p [patchfile_path] -s verifyThis will generate three files:.unverified.patch: patches that has the possibility where there might be discrepancies from the reality and what the updated-patch shows.verified.patch: patches showing the codes that are identical to the real codeverification_info.log: a file showing the results of verificationRequirements for input patch fileA standard input has a format as follow, which can be automatically generated by virtcov, a tool used for libvirt coverage test:From <commit_hash> 
[headers]
<neck_information>
<body>
--
<version>where<commit hash>is a hexadecimal integer generated by the submission where the bug was solved.[headers]represents header information of the commit.<neck_information>is necessary for separating header and body, with a format shown as below:\s[0-9]*\sfile(s)?\schanged,\s[0-9]*\s(insertions\(\+\)|deletions\(\-\))(,\s[0-9]*\sdeletions\(\-\))?The<body>part shows the diff information of the bug commit, whose format is given below:diff --git a/<sorce_directory> b/<dir_after_effect>
index <hash> <operation_code>
--- a/<sorce_directory>
+++ b/<dir_after_effect>
@@ -[0-9]{1,},[0-9]{1,} +[0-9]{1,},[0-9]{1,} @@ [other_info]
...which can be repeated multiple times.
Package: patchtools
Do you need to apply GIT patches to a different source version than the one on
which they were developed? PatchTools can greatly accelerate the process of determining
whether the patches are needed by the new source, and how to fix them if they are needed.FeaturesDetects missing files in your source treeDetects file that are incorrectly present in your source treeDetects lines are not at the line numbers specified in the patchesCan find significant lines that are elsewhere in the same fileIssues a readable report of errors foundInstallationFrom PyPi:$ sudo pip install patchtoolsFrom a source archive:Obtain the archive from pypi.org, extract the files, and in the root folder, enter:$ sudo python setup.py installFrom the GIT repo:$ git clone http://github.com/miltmobley/PatchToolsDocumentationDocumentation is available in the ‘doc’ folder of the source.Copyright 2014 Milton MobleyLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
A copy of the License is provided in the file ‘LICENSE’,
or 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: patchview
PatchView perform data analysis and visualization on multi channel whole-cell recording (multi-patch) data, including firing pattern analysis, event analysis,
synaptic connection detection, morphological analysis and more.Free software: BSD 3-Clause licenseDocumentation:https://patchview.readthedocs.io.FeaturesPatchView integrates multiple open-source tools (see credit page) and wrap them using an intuitive graphic user interface (GUI).
Thus users can perform most analysis quickly for the data collected in a typical patch-clamp experiment without installing Python and
these tools or writing any Python scripts.Importing both Heka data and Axon Instruments data. Exporting to Python pickle file or NWB (Neurodata Without Borders) file format.Visualizing single and multiple traces with zoom, pan operations.Automatically sorting experiments data according to predefined labels.Performing analysis on intrinsic membrane properties, action potential detection, firing pattern analysis.Synaptic connection analysis.Visualizing and quantification of neuron’s morphological reconstruction from NeurolucidaCitationIf you find our work useful for your research, please cite:Hu et al., (2022). PatchView: A Python Package for Patch-clamp Data Analysis and Visualization. Journal of Open Source Software, 7(78), 4706,https://doi.org/10.21105/joss.04706
Package: patchwork
Patchwork is a mid-level library of Unix system administration primitives such
as “install package” or “create user account”, interrogative functionality for
introspecting system state, and other commonly useful functions built on top of
theFabriclibrary.Specifically:Primary API calls strive to beidempotent: they may be called multiple
times in a row without unwanted changes piling up or causing errors.Patchworkis just an API:  it has no concept of “recipes”, “manifests”,
“classes”, “roles” or other high level organizational units. This is left up
to the user or wrapping libraries.This is one way Patchwork differs from larger configuration management
frameworks likeCheforPuppet. Patchwork is closest in nature to those tools’
“resources.”It is implemented inshell calls, typically sentover SSHfrom a
local workstation.However, where possible, its functions expect a baseline Invoke~invoke.context.Contextobject and can thus run locallyorremotely,
depending on the specific context supplied by the caller.