Saravanan666/pypi-org huggingface dataset:
Package: performance-logger
performance_loggerTable of ContentsInstallationQuick startFeaturesInstallationDownload using pip via pypi.$pipinstallperformance-logger--upgrade(Mac/homebrew users may need to usepip3)Quick startfromperformance_logger.mainimportperf_logger@perf_logger('datetime')deftest_fun():return"it will log the time performance of test_fun using datetime format"@perf_logger('ns')deftest_fun2():return"it will log the time performance of test_fun2 using nano seconds"FeaturesSimple decorator functions for performance checking of functionsYou can use parameter to choose logged performace format
Package: performance-monitor
Performance MonitorSimple Decorator to represent the time took by a function execution.InstallationRun the following to install:pipinstallperformance-monitorUsagefromperformance_monitorimport*@performancedefmy_func():for_inrange(1000000):passmy_func()# Output''':-: my_func --> 18.163681030273438 ms'''OptionsUnitDecoratormillisecond (ms)@performancesecond (sec)@performance_secminute (min)@performance_minhour (hr)@performance_hr
Package: performance-tester
performance_testerCollection of modules for testing performance.InstallationCommandpipinstallperformance_testeror add the following line in Pipfile if you use Pipenv[dev-packages]
performance_tester = "*"Examplesfromperformance_testerimportmeasure_execution_time@measure_execution_time(100)defadder(a,b):# the function that you want to check the performancec=a+breturncresult=adder(1,2)Output:100 loops:
mean: 3.573999492800795e-07 sec.
std : 1.1951605991912876e-07 sec.
max : 1.4500001270789653e-06 sec.
min : 3.199984348611906e-07 sec.
Package: performance_tools
Simple utilities to make it easier to track performance of Python programs under normal operationsContext ManagersDisplayElapsedThis context manager makes it easy to display console-oriented start/end messages with end-user tolerable
formatting.Usage:with DisplayElapsed("{now} uploading {filename} (original: {original})\n",
                    "{now} uploaded {filename} in {elapsed:.1f} seconds",
                    filename=remote_path, original=local_path):
    upload_filename(…)Notes:DisplayElapsed takes one positional argument:message. The message is formatted usingstr.formatwith the values{now}and{elapsed}provided automatically. All other keyword arguments provided toDisplayElapsedwill be
available during formatting.Ifmessagecontains{{now}}it will be replaced with the current timestampIfmessagedoes not contain{{now}}it will be prepended unlessinclude_timestamp=FalseIfpostambleis not specified, it will default to"({elapsed:.1f}seconds)"Ifoutputis not specified, it will default tosys.stdoutIfoutput_on_erroris not True, the normal postamble display will be suppressed when an exception occursBy default, a newline will not be emitted after the opening message so the message and postamble will be
displayed on a single line.outputwill be flushed, if supported, to provide immediate feedback.
Provide a message which ends in\nif you want multi-line output.
Package: performance-tuner
Performance TunerThe goal of this library is to provide a set of tools for tuning your model performance.Implemented NotionsBootstrapping Your Data - this library provides a powerful yet flexible bootstrap algorithm that resamples your data such that the resampled data conforms to the descriptive statistics as well as shape of the original distribution.  It is important that you sample only from the training data and not from the raw data otherwise it will be very hard to tell if there are examples from the training set in the test set.precision - recall tuning - this library provides a formal set of functions to tune your algorithm towards precision or recall based on the decision boundary from predict probability.  Sometimes it's more important to be confident in a few of your returned results, rather than to provide a balanced algorithm.  This module provides the ability to bias your algorithm towards precision or recall based on the business needhyper parameter tuning - this library provides a bunch of different strategies for tuning your algorithm's hyper parameters to maximize performancesimulating data - this library provides utilities to draw simulated data from an inferred distribution matching the original data's distribution.simulating labels - this library provides a number of auto labeling strategies for simulated data.
Package: perform-draw
perform_drawA simple app that will randomly draw a given set up numbers from a list.InstallationRun the following to install:pipinstallperform_drawUsagepython3 perform_draw.pyPlease enter the total number of balls to be placed in the bag:
You must enter a whole number (integer) greater than 0
15Please enter the total number of balls to be drawn:
You must enter a whole number (integer) greater than 0
and less than 15.
5Numbers drawn are: [12, 9, 1, 8, 4]When the object is called, you pass the following variables:number:     The number of items in the pool to be picked from.
example:    number = 5
will create a pool [1, 2, 3, 4, 5]pick:       The number of items to be randomly drawn from the pool.
example:    pick = 2
will return a list of the randomly drawn items, say [4, 2]put_back:   Whether an item is put back into the pool prior to the next draw.
Input as a boolean True or False, with a default of False.Install RequiresThis package uses the following standard library packages:mathrandomIn ClosingThis package has been built as part of my learning Python so may contain coding that is not best practice.  I am happy for more experienced Python users to feedback any areas that could be improved.  Once I get to understand uploading packages to PyPI I will set up development dependencies.
Package: perform-eda
perform_edaThe perform_eda function is used to conduct Exploratory Data Analysis (EDA) on a given dataset. It provides various insights and visualizations to help understand the data.Function SignatureInstall my-project with npmdefperform_eda(data):Usageperform_eda(data)FunctionalityTheperform_edafunction performs the following steps:Prints the dimensions of the dataset.Displays the data types of each column in the dataset.Provides summary statistics for the dataset.Checks for missing values and displays the count of null values for each column.Identifies duplicate rows in the dataset and prints the count of duplicate rows.Visualizes the distributions and relationships in the data:For categorical variables, generates bar plots showing the value counts for each category.For numeric variables, generates histograms, box plots, scatter plots (numeric vs. numeric), and kernel density plots.Displays a correlation matrix heatmap.Generates a pairwise scatter plot for numeric variables.For categorical variables, if there are more than one, generates cross-tabulation bar plots to visualize the relationships between different categorical variables.Displays a heatmap showing the locations of missing values in the dataset.If a target variable name is provided, calculates the correlation between each feature and the target variable and displays a bar plot of the feature correlations with the target variable.Detects outliers in numeric variables by calculating z-scores and identifying values that exceed a threshold of 3 standard deviations from the mean.Note:Replace<target_variable_name>with the actual name of your target variable to enable the feature correlation analysis.DependenciesTheperform_edafunction requires the following libraries:pandasnumpymatplotlib.pyplotseabornscipy.stats.ttest_indMake sure to have these libraries installed in your Python environment before using the function.Exampleimport pandas as pd

# Load your dataset
data = pd.read_csv('your_dataset.csv')

# Perform EDA
perform_eda(data)ðŸ”— Links
Package: perfplot
perfplot extends Python'stimeitby
testing snippets with input parameters (e.g., the size of an array) and plotting the
results.For example, to compare different NumPy array concatenation methods, the scriptimportnumpyasnpimportperfplotperfplot.show(setup=lambdan:np.random.rand(n),# or setup=np.random.randkernels=[lambdaa:np.c_[a,a],lambdaa:np.stack([a,a]).T,lambdaa:np.vstack([a,a]).T,lambdaa:np.column_stack([a,a]),lambdaa:np.concatenate([a[:,None],a[:,None]],axis=1),],labels=["c_","stack","vstack","column_stack","concat"],n_range=[2**kforkinrange(25)],xlabel="len(a)",# More optional arguments with their default values:# logx="auto",  # set to True or False to force scaling# logy="auto",# equality_check=np.allclose,  # set to None to disable "correctness" assertion# show_progress=True,# target_time_per_measurement=1.0,# max_time=None,  # maximum time per measurement# time_unit="s",  # set to one of ("auto", "s", "ms", "us", or "ns") to force plot units# relative_to=1,  # plot the timings relative to one of the measurements# flops=lambda n: 3*n,  # FLOPS plots)producesClearly,stackandvstackare the best options for large arrays.(By default, perfplot asserts the equality of the output of all snippets, too.)If your plot takes a while to generate, you can also useperfplot.live(# ...)with the same arguments as above. It will plot the updates live.Benchmarking and plotting can be separated. This allows multiple plots of the same data,
for example:out=perfplot.bench(# same arguments as above (except the plot-related ones, like time_unit or log*))out.show()out.save("perf.png",transparent=True,bbox_inches="tight")Other examples:Making a flat list out of list of lists in PythonMost efficient way to map function over numpy arraynumpy: most efficient frequency counts for unique values in an arrayMost efficient way to reverse a numpy arrayHow to add an extra column to an numpy arrayInitializing numpy matrix to something other than zero or oneInstallationperfplot isavailable from the Python Package
Index, so simply dopip install perfplotto install.TestingTo run the perfplot unit tests, check out this repository and typetoxLicenseThis software is published under theGPLv3 license.
Package: perfprof
This is a Python script for printingperformance profilesas defined byE. D. Dolan and J. J. Moré.It is based onperfprof.mfrom the MATLAB Guide by D. J. Higham and N. J. Higham.Performance profilesPerformance profiles are a mechanism to visualise the performance of multiple algorithms on multiple test problems.
Givenmproblems andnalgorithms, we're interested in the relative performance of all algorithms across the entire problem set.Lett = t(i, j) > 0be a measure of the performance of solverjon problemi, where lower means "better".
Common choices fortare:execution/CPU time;number of iterations (assuming the algorithms are iterative);the number of evaluations of some reference function (e.g., the ordering predicate in a sorting algorithm, or the objective function in an optimisation algorithm).Given this data, a typical performance profile may look like this:Each algorithm has one line plot, where a point(x, y)means that, forxof the problem set, the algorithm in question was within a factor ofyof the respective best algorithm.
For example:the point ≈(1, 0.6)means thatAlg2was the fastest algorithm on around 60% of the problem set;the point ≈(1.5, 0.4)means thatAlg3was within a factor of 1.5 of the respective best algorithm for 40% of problems;note that the "best" algorithm may be different for each problem;the point ≈(1.5, 0.95)means thatAlg1was within a factor of 1.5 of the respective best algorithm for 95% of problems;etc.Generally speaking, an algorithm is considered efficient (relative to the others) when its performance profile comes close to the top left corner(1, 1).It is possible for algorithms to fail on certain problems.
This can be achieved by simply setting the performance measuret(i, j)to+inforNaN.Usage examplesimportmatplotlib.pyplotaspltimportperfprofpalette=['-r',':b','--c','-.g','-y']perfprof.perfprof(data,palette)plt.show()Marking y-interceptsMarkers can be inserted using the standardmatplotlibpattern.importmatplotlib.pyplotaspltimportperfprofpalette=['o-r','o:b','o--c','o-.g','o-y']perfprof.perfprof(data,palette,markersize=4,markevery=[0])plt.show()Displaying legendsLegends can be displayed usingmatplotlib.pyplot.legend.importmatplotlib.pyplotaspltimportperfprofpalette=['o-r','o:b','o--c','o-.g','o-y']legend=['Algorithm 1','Algorithm 2']perfprof.perfprof(data,palette,markersize=4,markevery=[0])plt.legend(legend)plt.show()Why another implementation?Multiple implementations of performance profiles already exist in the public domain.The design ofperfprofwas driven by a few key desires:Simplicity:provide a clearly scoped, easy to use implementation that integrates withmatplotlib;Flexibility:unlock the full power ofmatplotlibfor plot styling, legends, subplots etc.;Robustness:the implementation must work in all edge cases includinginf,NaN, etc.;Usability:full Python3 compatibility and sensible defaults where possible.
Package: perf-py
perf-pyA library that personally helps me understand the performance of common python code (and in turn, it might help you understand it too!)TodoDoes mapping over an iterator perform better than using generators?Does chunking a generator affect performance?Does composing generators affect performance?Make a table of the performance of each function ...Open this up in a notebook!Personal RemindersTo publish to pypi w/o an alpha version, push a commit withPublish To PYPIin its commit message.TODOChunking and garbage collecting simultaneouslyl = list(range(100))batchsize = 11while len(l) > 0:
print(l)
print(l[:batchsize])
del l[:batchsize]
Package: perf-py-pkg
Perfect Python PackagePython package template with all the bells and whistles. An adaptation of cookiecutter hypermodern pypackage with some additional features.FeaturesPackaging and dependency management with PoetryTest automation with NoxPre-commit hooks:Linting with Flake8Code formatting with Black and PrettierImport sorting with isortDoc string linting with DarglintAutomated Python syntax upgrades with pyupgradeContinuous integration with GitHub ActionsDocumentation with Sphinx & MyST using the furo themeAutomated documentation deployment to Read the Docs and GitHub PagesAutomated uploads to PyPI and TestPyPIAutomated release notes with Release DrafterAutomated dependency updates with DependabotTesting with pytestCode coverage with Coverage.pyCoverage reporting with CodecovStatic type-checking with mypyRuntime type-checking with TypeguardSecurity audit with Bandit and SafetyCheck documentation examples with xdoctestGenerate API documentation with autodoc and napoleonManage project labels with GitHub LabelerRequirementsNOTE:pipx is recommended to install the following tools.Poetry$pipxinstallpoetryNox$pipxinstallnoxnox-poetry$pipxinjectnoxnox-poetryInstallationYou can installPerfect Python PackageviapipfromPyPI:$pipinstallperf-py-pkgUsageDocumentation is available atRead the DocsandGitHub Pages.Examplefromperf_py_pkgimportcoreascc.add_one(1)#> 2ContributingContributions are very welcome.
To learn more, see theContributor Guide.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.
Package: perf-script-postprocessor
# perf-script-postprocessor[![Build Status](https://travis-ci.org/arcolife/perf-script-postprocessor.svg?branch=master)](https://travis-ci.org/arcolife/perf-script-postprocessor)This calculates delta (difference of timestamps from various
entry/exit points from events recorded) from the trace output,
which is produced by using theperf scriptcommand, which in turn,
uses the perf.data file produced by using theperf recordcommand,
a set of utilities,which is provided under the package [perf-tools](https://github.com/brendangregg/perf-tools)## INSTALLATIONStep 1: Install from pip:$ pip2 install perf-script-postprocessorStep 2: Copy [this conf file](https://raw.githubusercontent.com/arcolife/perf-script-postprocessor/master/delta_processor.conf)into /etc/Step 3: Customize the conf file accordingly.Optional:
Step 4: Refer to docs/WIKI.md or [this page](https://github.com/arcolife/perf-script-postprocessor/wiki) for detailed usage.For more, refer toINSTALLguide.## TESTS$ ./tests/run-tests.sh## USAGE`$ perf_script_processor-p<dir path>-t<test type>`Example:`$ perf_script_processor-p.-t0`-p(defaults to/tmp/pp_results) is where one of the following exists:perf.data – binary file. If you’re running this tool on perf.data, make sureyou’re running it from the system where the binary was generatedraw_perf – plain text output whenperf scriptis run on folder containing perf.dataperf_data.csv – generated in the process of generating results-t(defaults to0) is either0or1. It’s the type of test that generatedperf.data.0: Native1: ThreadsNOTE: The stats at the end of run, will be stored indelta_output.login folder where you’ve generate the output.## FAQs and Script exection processRefer to docs/WIKI.md or [this page](https://github.com/arcolife/perf-script-postprocessor/wiki).## LICENSEGPL V3
Package: perf-timer
PerfTimer is an instrumenting timer which provides an easy way to
get insight into call count and average execution time of a function
or piece of code during a real session of your program.Use cases include:check the effects of algorithm tweaks, new implementations, etc.confirm the performance of a library you are considering under
actual use by your app (as opposed to upstream's artificial
benchmarks)measure CPU overhead of networking or other asynchronous I/O
(currently supported: OS threads, Trio async/await)
Package: perftool
# PerftoolTheperftoolmodule helps Analyse the performance of command line execution.The goal of theperftoolmodule is to allow you to understand the performance of any command line execution, it is compactable with Python 2 and 3.
alongside a Python 2 stack of dependencies.It is designed to be used as follows::# Interactive console
python perftool

    # For Command execution
    python perftool netstat

    # Without reports
    python perftool netstat --report False

    # For Debug
    python perftool netstat --DEBUG

    # For Multiword commands
    python perftool "netstat -an"Features
Measure the time taken for the execution of system commands and record the performance while executing## Interactive console for instant report:![alt text](https://raw.githubusercontent.com/YajanaRao/Perftool/b52d3533/site/images/console.PNG)&nbsp;
## Detailed ReportingExample
![alt text](https://raw.githubusercontent.com/YajanaRao/Perftool/261d4034/site/images/PerformanceReport.png)## Live Demo
[a link](http://htmlpreview.github.io/?https://github.com/YajanaRao/Perftool/blob/master/site/2018-05-02_19-40-34/index.html)# EnvironmentWindows 10
Ubuntu 16
Ubuntu 17
Package: perftracker-cp-crawler
perftracker-cp-crawlerperftracker-cp-crawler - a set of libraries and scripts to crawl web UI Control Panels (like Wordpress), integrated with theperftrackerFeaturesselenium-based framework (on top of Chrome and Firefox browsers)python-based browser simulatorspage response time measurementindividual HTTP request response time measurementexport results to the perftracker serverbrowser memory consumption trackingautomatic login/logout with customizable:login, password and submit buttons xpath/id/class namesautomatic menu items recognition with customizsable:menu item xpathsub-menu item xpathpage rendering phases recognition:browser timing interface supportajax request completion based on browser logs and pending HTTP requestsHTTP requests whitelisting to bypass websockets and long polls completion waitadvanced reporting:waterfall based requests view with information about requests size, compression, duration, status, etcpages summaryHTML report with pages screenshotInstallationMacOSpip install -r requirements.txt
brew cask install chromedriver
chromedriver --version
brew cask install google-chrome
# install Google ChromeLinuxpip install -r requirements.txt
yum install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
yum install chromedriverExamplesRun selenium-based test on a real WordPress Admin panel:python3 ./examples/pt-wp-crawler.py -m -U user -P user https://demo.wpjobboard.net/wp-login.phpContributing a patchMake a change and test your code before commit:python ./test.py
Package: perfume
Perfume===Perfume aims at making Flask-apps more Object-Oriented friendlyby providing a base class to create them.It's BSD licensed.Usage:- inherit from Perfume- decorate your methods with route(path)Perfume is Easy---```pythonfrom perfume import Perfume, routeclass Hello(Perfume):@route('/')def hello(self):return "Hello World !"if __name__ == "__main__":Hello().run()```And Easy to Setup---```bash$ pip install Perfume$ python hello.py* Running on http://localhost:5000/```
Package: perfume-bench
perfumeInteractive performance benchmarking in JupyterFree software: BSD licenseDocumentation:https://perfume.readthedocs.io.Overviewperfumeis a performance benchmarking tool that provides quick
feedback on the systems under test.The primary goals are:Prioritize analysis ofdistributionsof latency, not averages.Support both immediate feedback and robust benchmarking with many
samples, through a UI that updates as we collect more information.Provide raw data back to the user, for flexible custom analysis.Provide helpful post-processing analysis and charting tools.FeaturesLive-updating histogram chart and descriptive statistics during a
benchmark run.Jupyter notebook integration.Tunable benchmarking overhead.Comparative analysis of multiple functions under test.Powerful post-processing analysis tools.DemoYou can check outan example notebookusing
perfume.Installingpip install perfume-benchCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.3 (2017-09-10)Actually fix when only benchmarking one function (no K-S test) (oops).0.1.2 (2017-09-10)Fix when only benchmarking one function (no K-S test).0.1.1 (2017-08-27)Add dependency on matplotlib.0.1.0 (2017-08-27)First release on PyPI.Interactive histogram while benchmarking with bokeh.Interactive descriptive stats and K-S test.Cumulative distribution plots.Bucketed resampling.
Package: perfy
perfyPerfy - a lightweight profiling tool for PythonMark your functions and methods as trace-enabled with@perfydecorator:@perfydeftrace_this_function():# do somethingAlso, you can trace arbitrary blocks of your code usingwithstatement:withperfy('name of your choice'):# your code hereAfter running your code, print report usingperfy.report()Example:fromtimeimportsleepfromperfyimportperfy@perfy# <-- use decorator to track function callsdeffunc_sleep():sleep(.02)defsleep_loop():withperfy('sleep loop'):# <-- use with-statement to track arbitrary block of codefor_inrange(10):func_sleep()# you can nest with-blocks and decorated function calls in any order:@perfy# <-- a decorator on a top level functiondefmain():sleep_loop()# <-- this functions has a traced block insidewithperfy('custom named block'):# <-- traced blocksleep(.1)withperfy('inner block'):# <-- nested traced blockfunc_sleep()func_sleep()For above code perfy.report() will output:----------------------------------Perfy report----------------------------------
            Function/Method                  Time(sec.)         Calls(count)    
--------------------------------------------------------------------------------
main                                           0.350                 1          
   └ sleep loop                                0.206                 1          
      └ func_sleep                             0.205                 10         
   └ custom named block                        0.144                 1          
      └ inner block                            0.043                 1          
         └ func_sleep                          0.042                 2          
--------------------------------------------------------------------------------