Saravanan666/pypi-org huggingface dataset:
Package: detecta
detectaPython module to detect events in dataThe following functions are implemented in detecta:detect_peaks.py: detects peaks in data based on their amplitude and other features.detect_onset.py: detects onset in data based on amplitude threshold.detect_cusum.py: detects abrupt changes in data using cumulative sum algorithm (CUSUM).detect_seq.py: detects initial and final indices of sequential data identical to a parameter.InstallationpipinstalldetectaOrcondainstall-cduartexyzdetectaExamplesdetect_peaksdetect_onsetdetect_cusumdetect_seqHow to cite this workHere is a suggestion to cite this GitHub repository:Duarte, M. (2020) detecta: A Python module to detect events in data. GitHub repository,https://github.com/demotu/detecta.And a possible BibTeX entry:@misc{Duarte2020,  
    author ={Duarte, M.},
    title ={detecta: A Python module to detect events in data},  
    year ={2020},  
    publisher ={GitHub},  
    journal ={GitHub repository},  
    howpublished ={\url{https://github.com/demotu/detecta}}}LicenseThe non-software content of this project is licensed under aCreative Commons Attribution 4.0 International License, and the software code is licensed under theMIT license.
Package: detectadvprompt
detectadvpromptdetectadvpromptis a Python package designed to identify adversarial prompt attacks on Language Learning Models (LLMs). With a simple interface and efficient methods, it offers two primary functionalities: judgment on each token and an estimation of the probability that a token is part of an adversarial prompt.Online DemoInstallationpipinstalldetectadvpromptUsageHere's a basic example:fromdetectadvpromptimportdetect_opt,detect_probtext="Outline a plan to steal from a charity or nonprofit organization."advprompt='.....'result=detect_opt(text+advprompt)# result: [(str, bool)], each item corresponds to one token and a binary indicatorresult=detect_prob(text+advprompt)# result: [(str, float)], each item corresponds to one token and a probabilityFeaturesToken-level adversarial prompt detection.Provides judgment on each token.Estimates the probability of a token being an adversarial prompt.
Package: detect-anomalies-package
Provides various methods for anomaly detection.1. Traditional Statistical Methods:- Boxplot Anomaly Detection: Identifies anomalies based on the interquartile range (IQR) method.- Gaussian Anomaly Detection: Detects anomalies based on deviations from the mean using standard deviation.- Grubbs Test: Identifies outliers using the Grubbs test.- Dixon's Q Test: Identifies outliers using Dixon's Q test.- Percentile Thresholding: Detects anomalies based on a specified percentile threshold.2. Histogram-Based Methods:- Histogram Anomaly Detection: Detects anomalies based on histogram peaks, indicating multimodal distributions.- Histogram-Based Outlier Score: Identifies anomalies based on the density of data points in the histogram.3. Model-Based Methods:- Gaussian Mixture Model: Uses Gaussian mixture models to identify anomalies.- Kernel Density Estimation: Estimates the probability density function of the data using kernel density estimation.- Exponential Distribution: Detects anomalies based on extreme values using exponential distribution.4. Nearest Neighbors and Clustering:- K Nearest Neighbors (KNN): Identifies anomalies based on distances to nearest neighbors.- Local Outlier Factor (LOF): Computes the local density deviation of a given data point with respect to its neighbors.- Isolation Forest: Constructs an ensemble of isolation trees for anomaly detection.- One-Class SVM: Identifies anomalies by separating data points from the origin in a high-dimensional space.5. Clustering-Based Methods:- KMeans: Uses KMeans clustering to identify anomalies based on centroid distances.- DBSCAN: Density-based spatial clustering of applications with noise (DBSCAN) for anomaly detection.6. Additional Techniques:- Z-Score Anomaly Detection: Detects anomalies based on z-scores.- Quantile Regression: Identifies anomalies based on quantiles of the data distribution.- Anderson-Darling Test: A non-parametric test to assess whether a sample comes from a specified distribution.Sample Usageimport numpy as npfrom detect_anomalies_package.detect_anomalies import DetectAnomalies# Sample datadata = np.random.normal(loc=0, scale=1, size=100)# Initialize DetectAnomalies objectanomaly_detector = DetectAnomalies(data)# Detect anomalies using various methodsanomalies = anomaly_detector.detect_anomalies()# Print anomalies detected by each methodfor method, result in anomalies.items():if result[0] is not None:print(f"Anomalies detected by {method}: {result[0]}")else:print(f"No anomalies detected by {method}: {result[1]}")import pandas as pd# Assuming df is your pandas DataFramedata = df['column_name'].values # Replace 'column_name' with the actual column containing your dataanomaly_detector = DetectAnomalies(data)anomalies = anomaly_detector.detect_anomalies()import pandas as pd# Assuming df is your pandas DataFrameanomalies_by_column = {}for column in df.columns:data = df[column].valuesanomaly_detector = DetectAnomalies(data)anomalies = anomaly_detector.detect_anomalies()anomalies_by_column[column] = anomalies
Package: detect-app
detect-appDetect which app the python interpreter is running in. Useful for cross app scriptsSupports:Ansible
AutoCAD
Blender
Calibre
Cinema 4D
Clarisse
CryEngine
Flame
FreeCAD
Fusion
Gaffer
Gimp
Houdini
Inkscape
Katana
Krita
Mari
Marmoset
3ds Max
Maya
Modo
MotionBuilder
Natron
Nuke
RV
Revit
Shotgun
Scribus
Softimage
SubstanceDesigner
SubstancePainter
UnrealInstructionse.g. printsBlenderif run in Blenderimportdetect_appapp_info=detect_app.detect_app()print(app_info.id)# e.g. substance_painterright now app_info is very simpleid:stra unique identifier for the app, lowercase, underscores, not start with nraction:callablethat returns true if run in the app. usually just attempts to import an app specific moduleget_name():methodto return a pretty name.advancedenv variableDETECT_APP_FORCE_IDcan be set to the app id, which will force a specific app to be detected. Useful for testing.
Package: detect-delimiter
detect_delimiterAboutDetects the delimiter used in CSV, TSV and other ad hoc file formats.InstallationUsepip install detect_delimiterUsagedetect_delimiterexposes thedetect()functinon, which takes astras input and returns a delimiter.>>> from detect_delimiter import detect
>>> detect("looks|like|the vertical bar\n is|the|delimiter\n")
'|'Whendetect()doesn't know, it returnsNone:>>> text = "not really any delimiters in here.\nthis is just text.\n"
>>> detect()It's possible to provide a default, which will be used in that case:>>> detect(text, default=',')
','By default,detect()will prevent avoid checking alpha-numeric characters
and the period/full stop character ("."). This can be adjusted via
theblacklistparameter.If you believe that you know the delimiter, it's possible to provide
a list of possible delimiters to check for via thewhitelistparameter.
If you don't provide a value,[',', ';', ':', '|', '\t']will be checked.TestingYou can either usepytestortoxdirectly from the project's root directory.
Package: detect-direct-checkins
detect-direct-checkinsOverviewThedetect-direct-checkinsutility can be used to detect non-merge commits on given branches in a Git repository. It
can be run as apre-commit frameworkhook.Example UsageCommand line tooldetect-direct-checkinsis available on PyPI for Python 3.5+ and can be installed withpip:python3-mpipinstalldetect-direct-checkinsIf you use Arch Linux or one of its derivatives, you can also installdetect-direct-checkinsfrom theAUR:yay-Spython-detect-direct-checkinsYou also find self-contained executables for 64-bit Linux distributions and macOS High Sierra and newer on thereleases page. They are created withPyInstallerand only require glibc >= 2.17 on Linux (should be fine on any recent
Linux system).After the installation, switch your working directory to a Git repository you would like to check and rundetect-direct-checkins--branchrelease--allow-rootto check a branchreleasefor non-merge commits (but ignore initial root commits without parents).Usage as a pre-commit hookAdd-repo:https://github.com/IngoMeyer441/detect-direct-checkinsrev:0.1.2hooks:-id:detect-direct-checkins-args:['--branch=release','--allow-root']to your.pre-commit-config.yamlto detect direct checkins to a branchrelease. The--allow-rootswitch ignores
root commits (initial commits without parents).The--branchargument can be given multiple times to check more than one branch.This check is apost-commitcheck, so make sure to install the pre-commit framework as apost-commithook:pre-commitinstall--hook-typepost-commitI recommend to setdefault_stages: ['commit']in your.pre-commit-config.yaml. Otherwise, most checks will run
twice (in thepre-commitandpost-commitstage).Important note: Since this is apost-commithook, this checkwill not avoid the creation of disallowed
commits. It only tells you that a disallowed commit has been created. However, you can runpre-commitrun--hook-typepost-commitas part of your CI pipeline to enforce this check. Direct-checkins to protected branches will cause this check to fail
in a CI job.OptionsThese options are supported:--branch: Branch which must only contain merge commits, can be given multiple times.--ignore: Commit hashes which will be ignored, can be given multiple times--allow-root: Allow root commits (commits without parents).ContributingPlease openan issue on GitHubif you
experience bugs or miss features. Please consider to send a pull request if you can spend time on fixing the issue
yourself. This project usespre-commititself to ensure code quality and a consistent code
style. Runmakegit-hooks-installto install all linters as Git hooks in your local clone ofdetect-direct-checkins.
Package: detectearthquakeindonesia
latest Indonesia EarthquakeThis package will get the latest earthquake info from BMKG | Meteorological, Climatological, and Geophysical Agency.HOW IT WORK?This package will scrape fromBMKGto get latest earthquake happened in Indonesia.this package will use BeautifulSoup4 and Requests, which output a JSON file, which is ready to use for web and mobile applications.
Package: detect-gh-actions-unused-secrets
detect-gh-actions-unused-secretsDetects secrets that are defined in the repository and are not used in Github Actions.What it does:Get repository secrets using Github Actions APIClone the repositorySearch through the Github Actions related files (.github/workflows/*.yamland.github/workflows/*.yml) and try to find usages of each secretReport those secrets which are not foundPrerequisitesGithub token withreposcope (Github docs)Installationpip install detect-gh-actions-unused-secretsUsagedetect-gh-actions-unused-secrets <token> <owner>/<repo1> <owner/repo2>--generate-curlsOption to generate a text file withcurls to delete all unused secrets in the repositories that were scanned.detect-gh-actions-unused-secrets <token> <owner>/<repo1> --generate-curlsThis command will produce a file calledcurls.shthat will contain line-by-linecurlcommands to delete all unused secrets in<owner>/<repo1>repository.Thisendpoint will be utilized.
Package: detectgibberish
python-package-boilerplateBoilerplate for a Python PackagePackageBasic structure of package is├── README.md
├── packagename
│   ├── __init__.py
│   ├── packagename.py
│   └── version.py
├── pytest.ini
├── requirements.txt
├── setup.py
└── tests
    ├── __init__.py
    ├── helpers
    │   ├── __init__.py
    │   └── my_helper.py
    ├── tests_helper.py
    └── unit
        ├── __init__.py
        ├── test_example.py
        └── test_version.pyRequirementsPackage requirements are handled using pip. To install them dopip install -r requirements.txtTestsTesting is set up usingpytestand coverage is handled
with the pytest-cov plugin.Run your tests withpy.testin the root directory.Coverage is ran by default and is set in thepytest.inifile.
To see an html output of coverage openhtmlcov/index.htmlafter running the tests.Travis CIThere is a.travis.ymlfile that is set up to run your tests for python 2.7
and python 3.2, should you choose to use it.
Package: detect-indent
detect-indent for PythonPython port ofsindresorhus/detect-indentAll
attribution goes to that project.Detect the indentation of codePass in a string of any kind of text and get the indentation.Use casesPersisting the indentation when modifying a file.Have new content match the existing indentation.Setting the right indentation in your editor.Installpip install detect-indentUsagefromdetect_indentimportdetect_indentsample_string='''Example stringwith an indentationof two spaces'''indent=detect_indent(sample_string)print(indent)# {'amount': 2, 'type': 'space', 'indent': '  '}APIReturns a dictionary with the following stats about indentation:amount{number} - Amount of indentation, for example 2. Will be 0 if indentation could not be detected.type{'tab' | 'space' | None} - Type of indentation. Possible values are'tab','space'orNoneif no indentation is detectedindent{string} - A string representing the actual indentation, for example a string of two spaces.AlgorithmThe current algorithm looks for the most common difference between two
consecutive non-empty lines.More Details
Package: detection
python-detectionA motion detector. Currently two detectors,SimpleDetectorandBlobDetectorare implemented.
The former performs simple frame differencing, and may not be useful for most purposes.
The latter does a bit more and utilizes the OpenCVMOG2background subtractor to get more realistic results. The detectors try to use OpenCL if it's available.Using theBlobDetector:import numpy as np
from detection.detectors.blob.detector import BlobDetector

detector = BlobDetector({"blur": 7, "learningrate": 0.001, "accelerate": True})
(_boundingboxes, _metadata) = detector.feed(
    np.reshape(np.frombuffer(frame, dtype=np.uint8), newshape=(height, width, 3))
)Theblurvalue, if specified, will be performed before feeding the frame to the detector.
If nobluris given, the frame is fed as-is.Thelearningrateparameter is describedhere.
If nolearningrateis specified, it will default to0.001.Theaccelerateparameter defaults toTrue, and the detector attempts to exploit any GPU resources
available on the host.The metadata contains details (in order) about the operations performed on the input image, and
for how long each of those took:{
    'start_timestamp': datetime.datetime(2020, 6, 16, 17, 7, 6, 443946),
    'took': [
        ('cv.UMat', 0.0007669925689697266),
        ('cv.GaussianBlur', 0.0014679431915283203),
        ('cv.BackgroundSubtractorMOG2.apply', 0.0003933906555175781),
        ('cv.findContours', 0.001050710678100586),
        ('cv.approxPolyDP', 1.7404556274414062e-05),
        ('cv.boundingRect', 2.384185791015625e-06),
        ('total', 0.005391)
    ],
    'end_timestamp': datetime.datetime(2020, 6, 16, 17, 7, 6, 449337)}
}The bounding boxes contain any detected movement:{
    (
        UUID('091c2620-ebb6-4cbe-b59d-42da156c3ba9'),
        datetime.datetime(2020, 6, 16, 16, 11, 35, 931755)
    ): (279, 324, 710, 755),
    (
        UUID('bcbf2e18-ed2b-4e68-b94c-abe021071e61'),
        datetime.datetime(2020, 6, 16, 16, 11, 35, 931755)
    ): (489, 324, 920, 755)
}The UUIDs are here to provide forward compatibility with a hypothetical new detector that
also tracks movement.DevelopmentTLDR:Create and activate a Python 3.7 virtualenv:$ python3.7 -m venv .venv && . .venv/bin/activateChange to a branch:git checkout -b my_branchInstall Poetry:https://python-poetry.org/docs/#installationInstall project deps and pre-commit hooks:poetry install
pre-commit install
pre-commit run --all-filesReady to go.Remember to activate your virtualenv whenever working on the repo, this is needed
because pylint and mypy pre-commit hooks use the "system" python for now (because reasons).
Package: detection-models
================detection-models================.. image:: https://img.shields.io/pypi/v/detection_models.svg:target: https://pypi.python.org/pypi/detection_models.. image:: https://img.shields.io/travis/gavincmartin/detection_models.svg:target: https://travis-ci.org/gavincmartin/detection_models.. image:: https://readthedocs.org/projects/detection-models/badge/?version=latest:target: https://detection-models.readthedocs.io/en/latest/?badge=latest:alt: Documentation StatusThis library abstracts out many of the low-level operations of the TensorFlowObject Detection API and provides an object-oriented approach to detectingobjects with frozen inference graphs.* Free software: MIT license* Documentation: https://detection-models.readthedocs.io.* Demo: https://github.com/autognc/detection-models/blob/master/detection_models_demo.ipynbInstallation------------This package is heavily dependent upon the TensorFlow Object Detection API. Unfortunately, the OD API is not packaged for install on PyPI and therefore cannot be installed automatically as a dependency when installing `detection-models` from PyPI. To successfully install and use this package, users must:1. Install the TensorFlow Object Detection API (https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md).2. Install `detection-models` from PyPI... code::pip install detection-models=======History=======0.1.2 (2019-04-08)------------------* Added ObjectDetector and DetectedObject classes and subclasses* Added demo0.1.1 (2019-04-01)------------------* Updated setup.py to reflect correct repo homepage0.1.0 (2019-04-01)------------------* First release on PyPI.
Package: detection-utils
detection-utils provides utilities that are common across many object detection projects.
This includes things like:Box overlap computation (IoU)Precision and recall calculationsComputing targets for training a detector given a set of ground-truth objects and anchor boxesNon-maximum suppressionCoordinate transformation utilitiesFocal lossAll the functions here are well-tested to ensure proper functionality and are used in real projects, so are
intended to be enterprise-grade. This repository is meant to ensure that modifications and improvements that
are implemented in one object detection project migrate to other projects as appropriate, to reduce code
duplication, and to enable a quicker start to working on object detection.
Package: detective
DetectiveDetective helps you find information (at your favorite bug bounty program) that you are not supposed to see. It primarily focuses on information disclosure and sensitive data exposure vulnerabilities.Table of contentsInstallationUsageIssuesLicenseInstallationFirst make sure you’re onPython 2.7/3.3or higher. Then run the command below to install Detective.$ pip install--upgradedetectiveUsageHelpusage: detective [-h] -d DOMAIN [-pmm] [-cos] [-coh] [-cot] [-siv] [-md MAX_DEPTH] [-mt MAX_THREADS]

required arguments:
   -d DOMAIN, --domain DOMAIN                  the domain to crawl (e.g. https://finnwea.com)

optional arguments:
   -h, --help                                  show this help message and exit
   -pmm, --protocol-must-match                 only crawl pages with the same protocol as the startpoint (e.g. only https)
   -cos, --crawl-other-subdomains              also crawl pages that have another subdomain than the startpoint
   -coh, --crawl-other-hostnames               also crawl pages that have another hostname than the startpoint
   -cot, --crawl-other-tlds                    also crawl pages that have another tld than the startpoint
   -siv, --stop-if-vulnerable                  stop crawling if a vulnerability was found
   -md MAX_DEPTH, --max-depth MAX_DEPTH        the maximum search depth (default is unlimited)
   -mt MAX_THREADS, --max-threads MAX_THREADS  the maximum amount of simultaneous threads to use (default is 8)Exampledetective-dhttps://finnwea.com-sivIssuesIssues or new features can be reported via the GitHub issue tracker. Please make sure your issue or feature has not yet been reported by anyone else before submitting a new one.LicenseDetective is open-sourced software licensed under theMIT license.
Package: detect-llm-api-keys
detect_llm_api_keysscan python files for llm api keys (designed for pre-commit)🤖 This README was written by GPT-4. 🤖Introductiondetect_llm_api_keysis a vital tool for Python developers, especially those working with large language models (LLMs). It's a pre-commit hook that efficiently scans your Python files to detect and prevent the accidental committing of LLM API keys, enhancing the security of your projects.FeaturesEfficient API Key Detection: Scans for keys from major providers likeAnthropic,Anyscale,Microsoft Azure,LangChain,OpenAI, andMistral AI.Easy Integration: Seamlessly integrates with your existing Python projects.Support for Various API Key Patterns: Recognizes a range of patterns, ensuring comprehensive protection.Compatibility with nosec and noqa Comments: Respects your code's existing security annotations.Getting StartedInstallation: Adddetect_llm_api_keysto your.pre-commit-config.yamlfile.Configuration: Customize the settings as per your project requirements.Usage: Automatically scans files upon each commit, flagging potential API key exposures.UsageTo usedetect_llm_api_keysin your project, update your.pre-commit-config.yamlas follows:repos:
-   repo: https://github.com/joshuasundance-swca/detect_llm_api_keys
    rev: "0.0.3"
    hooks:
    -   id: detect-llm-api-keysCollaboration and ContributionsFeedback, suggestions, and contributions are highly welcomed to enhancedetect_llm_api_keys. Please feel free to open issues or submit pull requests on GitHub.LicenseDistributed under the MIT License. SeeLICENSEfor more information.AcknowledgementsSpecial thanks to the Python and Open Source communities for their invaluable support and contributions.
Package: detect-mask
Fast AI,Open CV required to run this moduleJust Import detect_mask module :import detect_mask
from detect_mask import Maskcall the method Determine and pass the path of the photo of the variable :Mask.Determine(path)Returns a Tuple :(0,’No Mask’)(1,’Mask’)Pull Out the Camera to Detect Mask, Real TimeMask.Cam()That’s it ,It’s that Simple