Saravanan666/pypi-org huggingface dataset:
Package: difference-finder
Difference FinderThis is my side-work. I'll improve the figure during my next free time 😅This repository is for finding difference between two images automatically using pytorch.MotivationWith the extensive exploration of machine learning techniques, the quality of reconstructed images has reached a saturation point. Consequently, comparing baseline methods has become challenging. While quantitative evaluations may indicate marginal improvements, demonstrating qualitative enhancements has been difficult (in my experience).What you can doGiven two images, this repo provides the difference map. See the below examples.Example 1. Hard "spot the difference" (ref:https://thetem.co.kr/article/%EC%8A%A4%ED%86%A0%EB%A6%AC/2/1801/)There aresevendifferent spots.
Try by yourself before seeing the result!Image 1Image 2Result.Strategy: DifferenceStrategy: Gradient /  Metric: PSNRExample 2. Complex "spot the difference" (ref:https://www.pinterest.co.kr/pin/312578030384336039/)There aresevendifferent spots.
Try by yourself before seeing the result!Image 1Image 2Result.Strategy: DifferencePreprocess: HP filter / Strategy: Gradient /  Metric: SSIMDeveloped modules & Futher plan[Pre-processor]
    [x] identity (default)
    [x] normalize
    [x] highpass_filter
    [x] lowpass_filter
    [ ] wavelet

[Post-processor]
    [x] identity (default)
    [ ] dynamic thresholding

[Metric]
    [x] MSE
    [x] PSNR
    [x] SSIM
    [x] MS-SSIM
    [x] LPIPS
    [ ] DICE score
    [ ] JACCARD score

[Strategy]
    [x] Difference
    [x] Gradient (default)
    [ ] GradCAMHow to useInstallpip install difference-finderUsageIt would be simple. Just follow the three steps!Define 'Finder'Give two image paths to compareDone!from pathlib import Path
from difference_finder.finder import Finder

img1_path = Path('./samples/imgdir1/img1.png')
img2_path = Path('./samples/imgdir2/img2.png')

worker = Finder(strategy='gradient', metric='psnr')
output = worker.run(img1_path, img2_path)If two image directories are given, it will generate difference map for all files.
(The number of files should be the same.)from pathlib import Path
from difference_finder.finder import Finder

img1_directory = Path('./samples/imgdir1/')
img2_directory = Path('./samples/imgdir2/')

worker = Finder(strategy='gradient', metric='psnr')
outputs = worker.run(img1_directory, img2_directory)PrincipleSo... how does it work? Extremely simple.When you set the strategy as 'difference', it simply return the l1 difference (i.e. absolute value of pixel-wise difference), regardless to given metric option.
Actually, this is the straightforward and intuitive way to get the difference map.When you set the strategy as 'gradient', it will calculate the gradient of one of input image with respect to calculated (scalar) metric. One pixel of returned gradient indicates "how much the pixel contributes to the metric". Hence, the metric functionmust be differentiableby the pytorch auto-grad backend. It is required to construct all metric functions using the pytorch.
Package: differences
difference-in-differences estimation and inference for PythonFor the following use casesBalanced panels, unbalanced panels & repeated cross-sectionTwo + Multiple time periodsFixed + Staggered treatment timingBinary + Multi-Valued treatmentHeterogeneous treatment effects & triple differencesee theDocumentationfor more details.InstallingThe latest release can be installed using pippipinstalldifferencesrequires Python >= 3.9Quick StartATTgtthe ATTgt class implements the estimation procedures suggested byCallaway and Sant'Anna (2021),Sant'Anna and Zhao
(2020)and the
multi-valued treatment case discussed
inCallaway, Goodman-Bacon & Sant'Anna (2021)fromdifferencesimportATTgt,simulate_datadf=simulate_data()att_gt=ATTgt(data=df,cohort_name='cohort')att_gt.fit(formula='y')att_gt.aggregate('event')differencesATTgt benefited fromCallaway & Sant'Anna'sdidSant'Anna and Zhao'sDRDID
Package: differentiable-randaugment
Differentiable RandAugmentOptimize RandAugment with differentiable operationsTable of ContentsIntroductionInstallationDependenciesGetting StartedSupport OperationsLicenseIntroductionDifferentiable RandAugmentis a differentiable version ofRandAugment. The original paper proposed to find optimal parameters by usinggrid search. Instead, this library supports differentiable operations to calculate gradient of the magnitude parameter and optimize it. Seegetting started.InstallationTo install the latest version from PyPI:$ pip install -U differentiable_randaugmentOr you can install from source by cloning the repository and running:$ git clone https://github.com/affjljoo3581/Differentiable-RandAugment.git
$ cd Differentiable-RandAugment
$ python setup.py installDependenciesopencv_pythontorch>=1.7albumentationsnumpyGetting StartedFirst, createRandAugmentModulewith your desired number of operations. This module is a differentiable andtorch.Tensorcalculable version ofRandAugmentpolicy. Using this module, you can train the policy as one of the neural-network model. Note that randomly selectednum_opsoperations will be applied to the images.fromdifferentiable_randaugmentimportRandAugmentModuleaugmentor=RandAugmentModule(num_ops=2)Now you need to perform the module to the images. Usually augmentations are applied inDataset. That is, the operations usenp.ndarrayimages. However, it cannot calculate the gradients for image and magnitude parameter (because the entire optimization procedure is based ontorch.Tensors). To resolve this, you should apply this module totorch.Tensorimages rather thannp.ndarray.forinputs,labelsintrain_dataloader:inputs=inputs.cuda()logits=model(augmentor(inputs))...Of course, other augmentations should be removed from preprocessing:transform=Compose([Resize(...),Normalize((0.5,0.5,0.5),(0.5,0.5,0.5)),ToTensorV2(),])And lastly, create an optimizer with this module parameters. We recommend to use different learning rate for the model and the augmentor:param_groups=[{"params":augmentor.parameters(),"lr":10*learning_rate},{"params":model.parameters(),"lr":learning_rate},]optimizer=optim.Adam(param_groups)Now theRandAugmentpolicy will be trained with your prediction model.After trainingRandAugmentModule, get the trained optimal magnitude value by callingaugmentor.get_magnitude()and use the magnitude as follows:fromdifferentiable_randaugmentimportRandAugmenttransform=Compose([Resize(...),RandAugment(num_ops=...,magnitude=...),Normalize((0.5,0.5,0.5),(0.5,0.5,0.5)),ToTensorV2(),])dataset=Dataset(...,transform=transform)WhileRandAugmentis an extension ofalbumentations, you can combine other augmentations inalbumentationswith this class.Support OperationsDifferentiable RandAugmentsupports 14 operations described in the original paper. The below table shows the detailed differential specification of each operation.Input ImageMagnitudeIdentity✔ShearX✔✔ShearY✔✔TranslateX✔✔TranslateY✔✔Rotate✔✔Cutout✔✔AutoContrast✔Equalize✔Solarize✔SolarizeAdd✔✔Posterize✔Contrast✔✔Color✔✔Brightness✔✔Sharpness✔✔LicenseDifferentiable RandAugmentisApache-2.0 Licensed.
Package: differentiable-robot-model
differentiable robot modelDifferentiable and learnable robot model. Our differentiable robot model implements computations such as
forward kinematics and inverse dynamics, in a fully differentiable way. We also allow to specifyparameters (kinematics or dynamics parameters), which can then be identified from data (see examples folder).Currently, our code should work with any kinematic trees. This package comes with wrappers specifically for:TriFinger EduKuka iiwaFranka PandaAllegro HandFetch Arma 2-link toy robotYou can find the documentation here:Differentiable-Robot-Model DocumentationInstallationRequirements: python>= 3.7clone this repo and install from source:git clone git@github.com:facebookresearch/differentiable-robot-model.git
cd differentiable-robot-model
python setup.py developExamples2 examples scripts show the learning of kinematics parameterspython examples/learn_kinematics_of_iiwa.pyand the learning of dynamics parameterspython examples/learn_dynamics_of_iiwa.pyL4DC paper and experimentsthe notebookexperiments/l4dc-sim-experimentsshows a set of experiments that are similar to what we presented
in our L4DC paper@InProceedings{pmlr-v120-sutanto20a, 
    title = {Encoding Physical Constraints in Differentiable Newton-Euler Algorithm}, 
    author = {Sutanto, Giovanni and Wang, Austin and Lin, Yixin and Mukadam, Mustafa and Sukhatme, Gaurav and Rai, Akshara and Meier, Franziska}, 
    pages = {804--813}, 
    year = {2020},
    editor = {Alexandre M. Bayen and Ali Jadbabaie and George Pappas and Pablo A. Parrilo and Benjamin Recht and Claire Tomlin and Melanie Zeilinger}, 
    volume = {120}, 
    series = {Proceedings of Machine Learning Research}, 
    address = {The Cloud}, month = {10--11 Jun}, 
    publisher = {PMLR}, pdf = {http://proceedings.mlr.press/v120/sutanto20a/sutanto20a.pdf},
    url = {http://proceedings.mlr.press/v120/sutanto20a.html}, 
}Testingrunningpytestin the top-level folder will run our differentiable robot model tests,
which compare computations against pybullet.Code ContributionWe enforce linters for our code. Theformattingtest will not pass if your code does not conform.To make this easy for yourself, you can eitherAdd the formattings to your IDEInstall the gitpre-commithooks by runningpipinstallpre-commit
pre-commitinstallFor Python code, useblack.To enforce this in VSCode, installblack,set your Python formatter to blackandset Format On Save to true.To format manually, run:black .Licensedifferentiable-robot-modelis released under the MIT license. SeeLICENSEfor additional details about it.
See also ourTerms of UseandPrivacy Policy.
Package: differential-privacy
Python Differential Privacy LibraryA library that contains implementations of differential privacy algorithms found in literature.UsageSetupInstallation withpipThe library is designed to run with Python 3.
The library can be installed from the PyPi repository usingpip(orpip3):pipinstalldifferential-privacyManual installationFor the most recent version of the library, either download the source code or clone the repository in your directory of choice:gitclonehttps://github.com/robomotic/differential-privacy.gitTo installdifferential-privacy, do the following in the project folder (alternatively, you can runpython3 -m pip install .):pipinstall.The library comes with a basic set of unit tests forpytest. To check your install, you can run all the unit tests by callingpytestin the install folder:pytest
Package: differently
differentlydifferentlyis a CLI tool and Python package for visualising the differences between things.Installationdifferentlyrequires Python 3.8 or later.pipinstalldifferentlyExampledifferentlyexamples/1.mdexamples/2.md# "differently" example file                           =  # "differently" example file
                                                       =
To run this example, install `differently` then run:   =  To run this example, install `differently` then run:
                                                       =
```bash                                                =  ```bash
differently 1.md 2.md                                  =  differently 1.md 2.md
```                                                    =  ```
                                                       =
This line says "foo" in 1.md.                          ~  This line says "bar" in 2.md.
                                                       =
Now, a deletion:                                       =  Now, a deletion:
                                                       x
Hello from 1.md.                                       x
                                                       =
The line above should appear in 1.md but deleted in    =  The line above should appear in 1.md but deleted in
the diff because it's not in 2.md.                     =  the diff because it's not in 2.md.
                                                       =
And finally, this next line doesn't exist in 1.md but  =  And finally, this next line doesn't exist in 1.md but
should be added in the diff because it's in 2.md:      =  should be added in the diff because it's in 2.md:
                                                       >
                                                       >  Hello from 2.md.differentlyalso supports JSON and YAML comparisons and Python usage. Read the full documentation atcariad.github.io/differently.👋 Hello!Hello!I'mCariad Ecclestonand I'm an independent/freelance software engineer. If my work has value to you, please considersponsoring.If you ever raise a bug, request a feature or ask a question then mention that you're a sponsor and I'll respond as a priority. Thank you!
Package: different-wrapping
Different wrappingBasically a glorified YAML converter aimed atCTFs. The goal is that tasks can be written usingdocker-compose, such that they can be easily quality tested. Thedocker-composefiles are then converted to k8s manifests usingkompose, organized neatly in folders by challenge type and challenge name.Metadata files are also generated:image_buildlist.jsonis a list of what containers need to be builtchallenge_container_metadata.jsonexplains what challenges have what kind of containers, so the frontend can show this to the user. It also contains information on what challenges have dynamic containers.The intention of this tool is to run it in CI to generate metadata files to inform the rest of the platform. You can also run it locally, even just as a challenge linter. Rundifferent_wrapping --helpfor more info.Different wrappingis a component in an approach we are taking where instead of writing an elaborate system for deploying dynamic challenges, we try to re-use as much infrastructure between static and dynamic challenges as possible. We do this by creating "argocd-ready" kustomize projects - with the static project being actually hosted by argo and the dynamic ones being managed by a custom daemon.Design goalsUse standard k8s manifests where practicalKISSRequirementsPythonThe requirements in pyproject.toml (pip install -e .to install the system and all dependencies so you can run it usingpython -m)Kompose, if you are building yamlNote that runningdifferent_wrapping lint <directory>is possible without installing komposeConfigurationCLISeedifferent_wrapping --help. Here is a possible out of date output:$ different_wrapping convert --help
INFO:different_wrapping.cli:Different wrapping starting
usage: different_wrapping convert [-h] [--dry] [--dns_host DNS_HOST] folder destdir

positional arguments:
  folder
  destdir

options:
  -h, --help           show this help message and exit
  --dry                Does not write anything to the destination directory. Note that it will write to a
                       temporary directory, in order to test out running kustomize
  --dns_host DNS_HOST
  --docker_image_repo DOCKER_IMAGE_REPO
Package: differintegral-sage
DifferIntegral-SageSageMath Implementation of Riemann–Liouville DifferIntegral OperatorUsageInstall withsage -pip install differintegral_sageImport withfrom differintegral_sage import differ_integralExampleTake the 1.5th derivative:x = var('x')
differ_integral(x**2 + 3, x, 1.5)ArgumentsKeyword arguments:func -- Function to operate onvariable -- The variable to act with respect toorder -- The order to integrate or differentiate to. Positive values are derivatives, negative are integrals.
Package: differt
DiffeRTUsage[!WARNING]
Until this package reaches version0.1.x, breaking changes
should be expected.If you have any suggestion regarding the development of this package,
please open anissue.Contributing[!IMPORTANT]
The current documentation is very light and a more complete guide for
new contributors will be written in the near future.Until then, do not hesitate to reach me for help withGitHub issues!This project is built using both Python and Rust code, to provide an easy-to-use
but performant program. It also heavily uses the capabilities brought byJAXfor numerical arrays.RequirementsTo run build this package locally, you need:Python 3.9or above;Ruststable toolchain;Maturinfor building Python bindings from Rust code;andPDMto manage all Python dependencies.Building locallyYou can build the project locally using:pdminstallDocumentationTo generate the documentation, please run the following:cddocs
pdmrunmakehtmlFinally, you can openbuild/html/index.htmlto see the generated docs.TestingBoth Rust and Python codebases have their own tests and benchmarks.Testing Rust codeYou can very easily test you code using Cargo:cargotestor benchmark it:cargobenchTesting Python codein the same way, you can very test you code with Pytest:pdmrunpytestor benchmark it:pdmrunpytest--benchmark-only
Package: diffgram
SDK for DiffgramThis is the SDK forDiffgramandDiffgram.comSDK InstallFull DocumentationQuickstart Install SDKpip install diffgramOn linuxpip3 install diffgramCredentials GuideGet Credentials from Diffgram.com(or your Private Deploy)The starting point for most useful work is to get a project:from diffgram import Project

project = Project(host = "https://diffgram.com",
		  project_string_id = "replace_with_project_string",
		  client_id = "replace_with_client_id",
		  client_secret = "replace_with_client_secret")Replacehostwith your URL for Open Core installs.Tasks IntroductionImport IntroductionUpdating Existing InstancesPre-Label Example VideoCompatibilityBetaNote the API/SDK is in beta and is undergoing rapid improvement. There may be breaking changes.
Please see theAPI docsfor the latest canonical reference
and be sure to upgrade to latest ie:pip install diffgram --upgrade. We will attempt to keep the SDK up to date with the API.Help articles for Diffgram.comSee below for some examples.Requires Python >=3.5The default install through pip will install dependencies
for local prediction (tensorflow opencv) as listed inrequirements.txt.
The only requirement needed for majority of functions isrequests.
If you are looking for a minimal size install and already have requests use
the--no-dependenciesflag iepip install diffgram --no-dependencies
Package: diff-highlight
diff-highlight: pretty diff highlighter; emphasis changed words in diffdiff-highlight adds word highlighting feature to git, mercurial and other diff viewers.FeaturesAdd highlights to diff outputmercurial extension for diff highlightingSetupUse easy_install or pip:$ sudo easy_install diff-highlight

Or

$ sudo pip diff-highlightApplying to gitAdd pager settings to your $HOME/.gitconfig to enable word highlights:[pager]
    log = diff-highlight | less
    show = diff-highlight | less
    diff = diff-highlight | lessApplying to mercurialAddcoloranddiff_highlightextensions to your $HOME/.hgrc to enable word highlights:[extensions]
color =
diff_highlight =RequirementsPython 2.6, 2.7, 3.2, 3.3, 3.4
(mercurial extension works on python 2.x only)LicenseApache License 2.0
(highlights/pprint.py is under PSFL)History1.2.0 (2016-02-07)Grouping indented hunksFix #1: highlight if large text appendedFix mercurial extension has been broken since mercurial-3.7.01.1.0 (2015-07-12)Drop py24 and py25 supportSupport git styled diff1.0.3 (2015-03-30)Ignore IOError on showing result1.0.2 (2014-06-08)Fix result of diff-highlight commannd is broken when diff-text includes new file
(thanks @troter)1.0.1 (2013-12-22)Fix diff-highlight command failed with python 2.41.0.0 (2013-12-22)Add diff-highlight commandSupport python 2.4, 2.5, 3.2 and 3.30.1.0 (2013-12-20)first release
Package: diff-hilite
diff-hilite - Highlight intra-line differences in “diff” outputdiff-hiliteadds intra-line differences highlighting todiff,git, etc.diff-hiliteis based on the excellent difflib module
from Python standard library. The original version of the utility was
put together by Takeshi Komiya. Last-mile patching to make it a
drop-in replacement fordiffis by Paul Sokolovsky.FeaturesAdds intra-line highlighting of differences to unified diff output.Serves as a (pipe) filter for output ofdiff-uand other tools
producing diff output in “unified” format.InstallUse easy_install or pip:$ sudo easy_install diff-hilite

Or

$ sudo pip install diff-hiliteApplying to gitAdd pager settings to your$HOME/.gitconfigto enable intra-line
highlighting:[pager]
    log = diff-hilite | less
    show = diff-hilite | less
    diff = diff-hilite | lessApplying to mercurialAddcoloranddiff_highlightextensions to your$HOME/.hgrcto
enable intra-line highlighting:[extensions]
color =
diff_highlight =RequirementsPython 2.6 or 2.7, or Python 3.2, 3.3, 3.4 or higher
(mercurial extension works on python 2.x only).LicenseApache License 2.0 (highlights/pprint.pyis under PSFL).History2.0Forked asdiff-hilite.Don’t swallow arbitrary IOError’s, swallow only EPIPE which happens
often when using with interactive pagers likeless.Exit with the same result codes asdiff(diff |diff-hilitecan
be used as a drop-in replacement for justdiffin scripts).1.2.0 (2016-02-07)Grouping indented hunksFix #1: highlight if large text appendedFix mercurial extension has been broken since mercurial-3.7.01.1.0 (2015-07-12)Drop py24 and py25 supportSupport git styled diff1.0.3 (2015-03-30)Ignore IOError on showing result1.0.2 (2014-06-08)Fix result of diff-highlight commannd is broken when diff-text includes new file
(thanks @troter)1.0.1 (2013-12-22)Fix diff-highlight command failed with python 2.41.0.0 (2013-12-22)Add diff-highlight commandSupport python 2.4, 2.5, 3.2 and 3.30.1.0 (2013-12-20)first release
Package: diffhtml
Diff-HTMLTools for generating HTML diff output.A simple demo.Free software: ISC licenseDocumentation (not set up yet):https://diffhtml.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.1 (2017-04-22)ndiffnow takes a keyword-only argumentcutoffto specify reaplce line matching ratio cutoff, asBlockDiffContextdoes.0.1.0 (2017-04-22)First release on PyPI.Initial release with just anndiffAPI.
Package: diffir
DiffIRDiffIR is a tool for visually 'diffing' the difference between two sets of rankings. Given a pair of TREC runs containing rankings for multiple queries, DiffIR identifies contrasting queries that have "substantially" different results between the two systems and generates a visual side-by-side comparison illustrating how the key rankings differ.DiffIR supports multiplequery contrast measturesfor ranking comparison including unsupervised ranking correlations like TauAP and supervised comparison based on existing judgments. DiffIR additionally accepts term importance weights in order to highlight the terms most relevant to a model's relevance prediction.UsageInstallationPython 3 is required. Install via PyPI:pip install diffirUsageDownload two run files to test with:wget -c https://github.com/capreolus-ir/diffir/raw/master/trec-dl-2020/p_bm25
wget -c https://github.com/capreolus-ir/diffir/raw/master/trec-dl-2020/p_bm25rm3Compare the two files and output a comparison page tobm25_bm25rm3.html:diffir p_bm25 p_bm25rm3 -w --dataset msmarco-passage/trec-dl-2020 \
       --measure qrel --metric nDCG@5 --topk 3 > bm25_bm25rm3.htmlNow openbm25_bm25rm3.htmlin your web browser. You should see DiffIR's web interface:Command line argumentsUsage:diffir <run files> <options>where the run files are 1 or 2 positional arguments indicating the run files to visualize, and<options>are:-wto output HTML or-cfor the command line interface--dataset <id>: a dataset id fromir_datasets--measure <measure>the query contrast measure to use. Valid measures: qrel,tauap,pearsonrank,weightedtau,spearmanr, kldiv (using scores)--metric <metric>: the relevance metric to use with the qrel measure. Acceptsir_measuresnotation--topk <k>: the number of queries to compare (as identified by the query contrast measure)--weights_1 <file>,--weights_2 <file>: term importance files to use for snippet selectionBatch modeUsediffir-batchto generate comparison pages for every pair of run files in a directory.Usage:diffir-batch <input directory> -o <output directory> <options>where the<options>are those shown above.