Saravanan666/pypi-org huggingface dataset:
Package: impulsare-distributer
OverviewA queue manager based onrqand made forimpulsare. It helps to :
- add items to a queue
- listen for a queue via a cli listenerSeetests/static/for examples of configuration.Installation / UsageTo install use pip:$pipinstall--upgradeimpulsare-distributerConfigurationYou need to create/add to your configuration file:distributer:# Required, redis addresshost:192.168.108.3# Optionalport:6379# If a component needs to send data to a queue,# define here where what is the queue's name (next one)# used by impulsare-ruler to send to writer for example (ruler: {queue: writer})testqueue:queue:my_test_queueListenerThis is a simple implementation ofrq'sworker. If you need to listen for a queue,
no need to have a config file, run in cli:$queue-listener--hostredis--queuemy_test_queueTo be able to see the next example working, keep that opened in a separate window.Queue UsageTo use the queue manager, and send jobs to be processed:fromimpulsare_distributerimportQueueManagerfrommymoduleimportmy_methodqueue=QueueManager(config_file='tests/static/config_valid.yml',listener='testqueue')queue.add(method=my_method,item='Hello World',job='test')Development & Tests$pipinstall-rrequirements.txt$pipinstall-rrequirements-dev.txt$py.testIf you run your tests with a different redis server than localhost:$REDIS=redispy.test
Package: impulse
Free software: BSD licenseImpulse is a command line tool for exploring the imports in a Python package.It can be used to produce dependency graphs such as this:InstallationInstall GraphvizFirst, you will need to install Graphviz. For more information, see theGraphviz download pageor search for “how to install Graphviz” on your operating system.Install Impulsepip install impulseInstall the Python package you wish to analysepip install somepackageCommand overviewThere is currently only one command, feel free to suggest more by opening an issue or pull request.drawgraphDraw a graph of the dependencies within any installed Python package or subpackage.The graph shows the relationship between all the immediate children of the package. An arrow indicates that there is
at least one import by the child (or any of its descendants) from the subpackage where the arrow points.For example, in a graph of the packagedjango.db, there is an arrow fromdjango.db.backendspointing todjango.db.models.  This is becausedjango.db.backends.base.schemaimportsdjango.db.models.Index. All
descendants are treated as belonging to the child they are in, so an import between any of those descendants will
cause an import to be shown.Command:impulse drawgraph django.dbOutput:
Package: impulseest
impulseest() is a non-parametric impulse response estimation function with input-output dataAs the variance increases linearly with the finite impulse response (FIR) model order, it is important for higher order FIR models to counteract this situation by regularizing the estimative. In impulseest(), this is done as proposed in T. Chen et al [2012] using the Empirical Bayes method (Carlin and Louis [1996]).The six arguments in this function are:- u [NumPy array]: input signal (size N x 1);- y [NumPy array]: output signal (size N x 1);- n [integer]: number of impulse response estimates (default is n = 100);- RegularizationKernel [string]: regularization method - 'none', 'DC', 'DI', 'TC' (default is 'none');- MinimizationMethod [string]: bound-constrained optimization method used to minimize the cost function - 'L-BFGS-B', 'Powell', 'TNC' (default is 'L-BFGS-B').The impulseest function returns a NumPy array of size n x 1 containing all the n impulse response estimates.ImportingfromimpulseestimportimpulseestExampleFor a detailed example, please check the example folder in the package's homepage at GitHub. Basic usage:ir_est=impulseest(u,y,n=100,RegularizationKernel='DC')ContributorLuan Vinícius Fiorio -vfluan@gmail.com
Package: impunity
impunityimpunityis a Python library consisting ofa single decoratorfunction designed to ensure consistency of physical quantities. Compared to other libraries (pint, etc.), it hasa minimal overhead on performancebecause physical units are only manipulated through static analysis and disappear at runtime.impunity is based on Python “flexible variable and function annotations” (PEP 593) and checks consistency between variables and arguments of functions. If physical units are consistent, impunity rewrites the code by automatically applying conversions in the code of the function.impunity is compatible with regular type annotations, and functions decorated with impunity remain compatible with other static analysis tools and type checkers likemypy.In most situations, impunity will only perform minimal sanity checks on your code at import time and not edit anything.Installationimpunityis available on pip (and soon conda):pipinstallimpunityFor development purposes, clone the repository and use poetry:gitclone--depth=1https://github.com/achevrot/impunitycdimpunity
poetryinstallUsageFull documentation available atwebsiteThe most simple usage consists of using units placed as annotations: code is checked and rewritten if need be.fromimpunityimportimpunitydefspeed(distance:"m",time:"s")->"m/s":returndistance/time@impunitydefregular_conversion():altitudes:"ft"=np.arange(0,1000,100)duration:"mn"=100result=speed(altitudes,duration)print(result)# results in m/sresult_imperial:"ft/mn"=speed(altitudes,duration)print(result_imperial)# results in ft/mnif__name__=="__main__":regular_conversion()The check fails if units are inconsistent:@impunitydefinconsistent_units():temperatures:"K"=np.arange(0,100,10)duration:"s"=6000returnspeed(temperatures,duration)# Warning: "K" is not compatible with "m"Only check for consistency, do not attempt to rewrite the code:@impunity(rewrite=False)# only check for consistencydefregular_conversion():pass@impunity(rewrite="output.log")# check code output in an external filedefregular_conversion():passCompatibility with type checkersTypes can be used with theAnnotatedkeyword, which carriesfromtypingimportAnnotationimportnumpy.typesasnptfeet_array=Annotated[npt.ndarray[np.float64],"ft"]altitudes:feet_array=np.arange(0,1000,100)impunityis implemented and typed withAnnotatedkeywords.TestsTests are supported by the unittest package.Because AST manipulation can be tricky, continuous integration is ensured by Github Actions for:Linux, MacOS and Windows;all versions of Python since 3.8Why impunity?We were searching for a pun with physical units. Things converged onim-pun-unit-y.
Package: imputena
This package allows both automated and customized treatment of missing
values in datasets using Python. The treatments that are implemented in this
package are:Listwise deletionPairwise deletionDropping variablesRandom sample imputationRandom hot-deck imputationLOCFNOCBMost frequent substitutionMean and median substitutionConstant value imputationRandom value imputationInterpolationInterpolation with seasonal adjustmentLinear regression imputationStochastic regression imputationLogistic regression imputationK-nearest neighbors imputationSequential regression multiple imputationMultiple imputation by chained equationsAll these treatments can be applied to whole datasets or parts of them and
allow for extensive customization. The package can also recommend a
treatment for a given dataset, inform about the treatments that are
applicable to it, and automatically apply the best treatment.
Package: imputepy
imputepyImpute missing values using Lightgbm.InstallationpipinstallimputepyFeaturesAutomated Imputation:Utilizes LightGBM models to impute missing values, selecting between regression and classification models based on the column's data type.Flexible Column Exclusion:Allows specific columns to be excluded from the imputation process.Dynamic Filtering for Categorical Columns:Filters categorical columns based on a specified upper limit of unique values to enhance efficiency.Customizable Thresholds for Categorical Detection:Enables setting custom thresholds for unique value counts to refine which columns are considered categorical.Comprehensive Imputation Strategy:Combines missing value identification, column type determination, and the application of LightGBM models for effective imputation.Direct Imputation into Original DataFrame:Imputes missing values directly into the original DataFrame, maintaining the data structure for seamless data preprocessing integration.Usagefrom imputepy import LGBMimputer
import pandas as pd
import numpy as np

df = pd.read_csv('data/df.csv')
df_imp = LGBMimputer(df, filter=True, exclude=None, filter_upper_limit=50, unique_count_limit=15)ContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licenseimputepywas created by Sam Fo. It is licensed under the terms of the MIT license.Creditsimputepywas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: imputr
🎯 What is Imputr?Imputr is an open-source library that allows users to stably impute tabular data sets with ML-based and conventional techniques. It is designed to have an extremely simple, yet extensive API, making it possible for users of all levels and tasks to deploy the library in their workflows.🚀 Getting startedInstall Imputr with PIP:pipinstallimputrAutoImputerHere is an example of the simplest usage of the AutoImputer (our recommended workflow for newbies and intermediates), which by default automatically imputes the missing values for all columns with a modern version of themissForestalgorithm.fromimputr.autoimputerimportAutoImputerimportpandasaspd# Import dataset into Pandas DataFramedf=pd.read_csv("example.csv")# Initialize AutoImputer with data - set exec_now=False to delay imputationimputer=AutoImputer(data=df)# Retrieve imputed dataset from AutoImputer objectimputed_df=imputer.get_result()Here you can see an example of how the AutoImputer works internally.To see what else be done with the AutoImputer API to customise its behaviour, reference ourdocumentation.📕 DocumentationMultiple links to documentation:Imputr APIImputr conceptsCore class structureMedium blogs for more informationOur Slack channelMore real world examples👨🏽‍💻 ContributionImputr is an ever-evolving open source library and can always use contributors who want to help build with the community.See theContribution Jumpstartpage to get started with your first contribution!Imputr is distributed under an Apache License Version 2.0. A complete version can be foundhere. All future contributions will continue to be distributed under this license.
Package: impy
The Integrated Meta-omic Pipeline (IMP) is developed to perform large-scale, reproducible and automated integrative reference free analysis of metagenomic and metatranscriptomic data. IMP also performs single omic (i.e. metagenomic-only and metatrancriptomic-only) analysis as an additional functionality.Documentation and websiteAll documentation and resources can be found :here.All components used to develop IMP workflow care addressed under theR3lab frozen pages.
Package: impy-array
A numpy extension for efficient and powerful image analysis workflowimpyis an all-in-one image analysis library, equipped with parallel processing, GPU support, GUI based tools and so on.The core array,ImgArray, is a subclass ofnumpy.ndarray, tagged with information such asimage axesscale of each axisdirectory of the original imageand other image metadataDocumentationDocumentation is availablehere.Installationuse pippip install impy-arrayfrom sourcegit clone https://github.com/hanjinliu/impyCode as fast as you speakAlmost all the functions, such as filtering, deconvolution, labeling, single molecule detection, and even those purenumpyfunctions, are aware of image metadata. They "know" which dimension corresponds to"z"axis, which axes they should iterate along or where to save the image. As a result,your code will be very concise:importimpyasipimportnumpyasnpimg=ip.imread("path/to/image")# Read images with metadata.img["z=3;t=0"].imshow()# Plot image slice at z=3 and t=0.img_fil=img.gaussian_filter(sigma=2)# Paralell batch denoising. No more for loop!img_prj=np.max(img_fil,axis="z")# Z-projection (numpy is aware of image axes!).img_prj.imsave(f"Max-{img.name}")# Save in the same place. Don't spend time on searching for the directory!Supported file formatsimpyautomatically chooses proper reader/writer according to the extension.Tiff file (".tif", ".tiff")MRC file (".mrc", ".rec", ".st", ".map", ".map.gz")Zarr file (".zarr")Other image file (".png", ".jpg")Switch between CPU and GPUimpycan internally switches the functions betweennumpyandcupy.
You can use GPU for calculation very easily.img.gaussian_filter()# <- CPUwithip.use("cupy"):img.gaussian_filter()# <- GPUip.Const["RESOURCE"]="cupy"# <- globally use GPUSeamless interface betweennaparinapariis an interactive viewer for multi-dimensional images.impyhas asimple and efficient interfacewith it, via the objectip.gui. SinceImgArrayis tagged with image metadata, you don't have to care about axes or scales. Just runip.gui.add(img)Extend your function for batch processingAlready have a function fornumpyandscipy? Decorate it with@ip.bind@ip.binddefimfilter(img,param=None):# Your function here.# Do something on a 2D or 3D image and return image, scalar or labelsreturnoutand it's ready for batch processing!img.imfilter(param=1.0)Command line usageimpyalso supports command line based image analysis. All method ofImgArrayis available
from commad line, such asimpypath/to/image.tif./output.tif--methodgaussian_filter--sigma2.0which is equivalent toimportimpyasipimg=ip.imread("path/to/image.tif")out=img.gaussian_filter(sigma=2.0)out.imsave("./output.tif")For more complex procedure, it is possible to send image directly toIPythonimpy path/to/image.tif -ithr=img.gaussian_filter().threshold()
Package: im-pysquonk
pysquonkPySquonkPysquonk is a python API wrapper round the Informatics Matters Squonk Rest
Services. It can be used to submit jobs, check their status and retreive
the jobs results. It can be used in two ways:from the command linewriting python scripts using the APIInstallationFrom githubhttps://github.com/InformaticsMatters/pysquonkFrom pip:
pip install im-pysquonkRunning from the command lineCopy the file config.ini from github and save it into the directory you are going to run the command from. Edit your username and password into the file, or
pass them via the command line (see below). The job to run is specified using
yaml files. Examples of yaml files for various jobs are available in the yaml
directory. For example, if you installed with pip, the command;pysquonk -r yaml/pipelines.rdkit.sucos.o3da.yaml -o outdirwill run the job defined by the file pipelines.rdkit.sucos.o3da.yaml and write its output to the directory outdir. To get help run.pysquonk -hIf you did install pysquonk via pip, but you have a directory SQUONKDIR containing the contents of the repository then the command would be:python SQUONKDIR/squonk -hIf you want to run a job that does not have an example in the yaml directory,
then the command:pysquonk -s pipelines.rdkit.sucos.o3da -o outdirwill write out an example yaml file that you can amend to directory outdirUsing the Python APIThe API documentation is indoc/squonk.md. There is an example program in test_harness.pyDevelopment and TestingTo run all the test jobs in the yaml sub directory, from the top level of the repo run:python test_jobs.py(will prompt for username and password). -r option will run one of the jobs.To run the script that executes the API functions:python test_harness.py
(will prompt for username and password).
Package: impython
I'm PythonWhat'simpython?impythonis absolutely an interpreter for python based on the functionexec. Besides,impythonrecognizes some magic commands.Whyimpython?If any program is intended to call python and to get its results (either in form of returning values or making changes in OS), the most convenient method is to start a process of python and pass python commands to python interpreter via pipe. However, the way python interacts with pipe is wired. Python will NOT execute any commands until you close the stdin. But once you close the stdin, NO other commands can you write into stdin any more.By usingpython -m impython, now all issues are solved. Try this:fromsubprocessimportPopen,PIPEwithPopen(['python','-m','impython'],stdin=PIPE)asf:f.stdin.write('print("hello world")'.encode())f.stdin.write('$exec'.encode())f.stdin.write('a = 1 / 0'.encode())f.stdin.write('$exec'.encode())f.stdin.write('$exit'.encode())How toimpython?An easy way ispython-mpipinstall--upgradepip
python-mpipinstallimpythonA hard way isgitclonehttps://gitee.com/junruoyu-zheng/impython.gitcdimpython
pythonsetup.pybuild
pythonsetup.pyinstall
Package: impytool
contact: impytool.package@gmail.com“impytool is an opencv based tool that facilitates some image processing operations”GitHub README for More Detailed User ManualUSAGE:Mandatory Parameters:image: Image file to be processedsave: 1 or not. The 1 is will save the file in new formimpytool.grayscale(image,save)Converts the image in grayscale formimpytool.negative(image,save)Converts the image in negative formimpytool.color_change(image,color1,color2,save)Replaces one color in the image with another color.color1: the color that will changecolor2: the color that will replace color1color: “blue” “green” “red” “yellow” “orange” “purple” “brown” “white”
“black”for example:impytool.color_change(‘a.jpg’,‘red’,‘color2’,0)->
change red color to blue color on the “a.jpg”impytool.color_filter(image,color,save)The image filtered by choosen colorcolor: “blue”,“green”,“red” .impytool.blur(image,save)Converts the image blurred formimpytool.resize(image,w,h,save)Adjusts the image to the desired dimensionsw: Width of the new sizes.h: Height of the new sizes.impytool.brightness(image,rate,save)Adjusts the brightness of the imagerate: Change rate of the brightness.impytool.contrast(image,alpha,save)Adjusts the contrast of the imagealpha: Contrast change quantityalpha should be in the range of 0-3.0the 0-1.0 range is the lower contrastthe 1.0-3.0 is the higher contrastimpytool.only_color(image,color,save)Shows only the selected color on the imagecolor: “blue” “green” “red” “yellow” “orange” “purple”impytool.rotate(image,direction,save)Flips the imagedirection: The desired flip direction, it may be ‘vertical’
‘horizontal’ ‘both’impytool.flip(image,angle,save)Rotates the imageangle: The desired rotation angle, it may be 90-180-270impytool.histogram(image,hist_type)Creates a histogram for the imagehist_type: Determines the histogram type.it may be ‘hist’ : for the grayscale imagesit may be ‘rgb_hist’ : for the colored imagesimpytool.black_white(image,save)Converts the image black & white form.
Package: impyute
ImpyuteImpyute is a library of missing data imputation algorithms. This library was designed to be super lightweight, here’s a sneak peak at what impyute can do.>>>n=5>>>arr=np.random.uniform(high=6,size=(n,n))>>>for_inrange(3):>>>arr[np.random.randint(n),np.random.randint(n)]=np.nan>>>print(arr)array([[0.25288643,1.8149261,4.79943748,0.54464834,np.nan],[4.44798362,0.93518716,3.24430922,2.50915032,5.75956805],[0.79802036,np.nan,0.51729349,5.06533123,3.70669172],[1.30848217,2.08386584,2.29894541,np.nan,3.38661392],[2.70989501,3.13116687,0.25851597,4.24064355,1.99607231]])>>>importimpyuteasimpy>>>print(impy.mean(arr))array([[0.25288643,1.8149261,4.79943748,0.54464834,3.7122365],[4.44798362,0.93518716,3.24430922,2.50915032,5.75956805],[0.79802036,1.99128649,0.51729349,5.06533123,3.70669172],[1.30848217,2.08386584,2.29894541,3.08994336,3.38661392],[2.70989501,3.13116687,0.25851597,4.24064355,1.99607231]])Feature SupportImputation of Cross Sectional DataK-Nearest NeighboursMultivariate Imputation by Chained EquationsExpectation MaximizationMean ImputationMode ImputationMedian ImputationRandom ImputationImputation of Time Series DataLast Observation Carried ForwardMoving WindowAutoregressive Integrated Moving Average (WIP)Diagnostic ToolsLoggersDistribution of Null ValuesComparison of imputationsLittle’s MCAR Test (WIP)VersionsCurrently tested on 2.7, 3.4, 3.5, 3.6 and 3.7InstallationTo install impyute, run the following:$pipinstallimpyuteOr to get the most current version:$gitclonehttps://github.com/eltonlaw/impyute$cdimpyute$pythonsetup.pyinstallDocumentationDocumentation is available here:http://impyute.readthedocs.io/How to ContributeCheck outCONTRIBUTING
Package: imraylib
ImraylibIntegrates Imgui with Raylib.The integration does not directly connect Imgui with Raylib.
This permits you to selectively filter events to prevent them being sent to Imgui.For example: if you had a number of different Imgui interfaces or possibly even
one rendered inside a first-person game. You don't want them receiving events
until the player begins interacting with the specific Imgui interface.If you don't care about this, there is a convenience functionsend_all_eventswhich will send all Raylib data to Imgui and "just work".Installationpip install imraylibUntilraylibpymerges theraylibpy-3.7branch to master,
you must manually install it from Git.Dependenciesraylibpy- Specifically theraylibpy-3.7branch.raylib-py-flat- SimplifiesraylibpyimportspyimguiExampleSeeexample/demo.pyfor an exampleBSD 3-Clause LicenseCopyright (c) 2021, Adam Griffiths
All rights reserved.Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package: imread-benchmark
I/O benchmarkI/O benchmark for different image processing python libraries.The code is inspired by the benchmark code ofAlex Parinovfor thealbumentationslibrary.https://github.com/albu/albumentations/blob/master/benchmark/benchmark.pyThe idea is inspired by the work ofRoman Soloviov:https://www.kaggle.com/zfturbo/benchmark-2019-speed-of-image-readingInstallationsudoaptinstalllibturbojpeglibvips-devYou can use pip to installimread_benchmark:pipinstallimread_benchmarkIf you want to get the latest version of the code before it is released on PyPI you can install the library from GitHub:pipinstall-Ugit+https://github.com/ternaus/imread_benchmarkTo calculate the I/O speed of your SSD/HDD in Linuxsudoapt-getinstallhdparm

sudohdparm-Tt<disk_id>wheredisk_idis of the type/dev/sdaAs a result you may expect something like:/dev/sda:Timingcachedreads:26114MBin1.99seconds=13122.03MB/secTimingbuffereddiskreads:1062MBin3.00seconds=353.70MB/secTo run the benchmarkTo get the description of all input parametersimread_benchmark-himread_benchmark-d<pathtoimages>\-i<numberofimagestouse>\-r<numberofrepeats>Extra options:-p- to print benchmarked libraries versions-s- to shuffle images on every run--show-std- to show standard deviation for measurementsLibraries that are benchmarked:OpenCVpillow-simd (PIL-SIMD)jpeg4pyscikit-image (skimage)imageiopyvips