Saravanan666/pypi-org huggingface dataset:
Package: mean-average-precision
mAP: Mean Average Precision for Object DetectionA simple library for the evaluation of object detectors.In practice, ahigher mAPvalue indicates abetter performanceof your detector, given your ground-truth and set of classes.Install packagepipinstallmean_average_precisionInstall the latest versionpipinstall--upgradegit+https://github.com/bes-dev/mean_average_precision.gitExampleimportnumpyasnpfrommean_average_precisionimportMetricBuilder# [xmin, ymin, xmax, ymax, class_id, difficult, crowd]gt=np.array([[439,157,556,241,0,0,0],[437,246,518,351,0,0,0],[515,306,595,375,0,0,0],[407,386,531,476,0,0,0],[544,419,621,476,0,0,0],[609,297,636,392,0,0,0]])# [xmin, ymin, xmax, ymax, class_id, confidence]preds=np.array([[429,219,528,247,0,0.460851],[433,260,506,336,0,0.269833],[518,314,603,369,0,0.462608],[592,310,634,388,0,0.298196],[403,384,517,461,0,0.382881],[405,429,519,470,0,0.369369],[433,272,499,341,0,0.272826],[413,390,515,459,0,0.619459]])# print list of available metricsprint(MetricBuilder.get_metrics_list())# create metric_fnmetric_fn=MetricBuilder.build_evaluation_metric("map_2d",async_mode=True,num_classes=1)# add some samples to evaluationforiinrange(10):metric_fn.add(preds,gt)# compute PASCAL VOC metricprint(f"VOC PASCAL mAP:{metric_fn.value(iou_thresholds=0.5,recall_thresholds=np.arange(0.,1.1,0.1))['mAP']}")# compute PASCAL VOC metric at the all pointsprint(f"VOC PASCAL mAP in all points:{metric_fn.value(iou_thresholds=0.5)['mAP']}")# compute metric COCO metricprint(f"COCO mAP:{metric_fn.value(iou_thresholds=np.arange(0.5,1.0,0.05),recall_thresholds=np.arange(0.,1.01,0.01),mpolicy='soft')['mAP']}")
Package: meand23
meand23Installationpip install meand23UsageLog in, identify profiles with a processed kit, and print each profile's genome:import json
m23 = MeAnd23()
m23.login('your@gmail.com', 'your_password')
profiles = m23.profiles()
profiles_with_kit = []
for profile in profiles:
    try:
        m23.use_profile(profile)
        m23.chromosome(1)
        profiles_with_kit.append(profile)
    except MissingKitError:
        pass

for profile in profiles_with_kit:
    m23.use_profile(profile)
    for gene in m23.genome():
        print(gene)
Package: meanderpy
'meanderpy' is a Python module that implements a simple numerical model of meandering, the one described by Howard & Knutson in their 1984 paper "Sufficient Conditions for River Meandering: A Simulation Approach". This is a kinematic model that is based on computing migration rate as the weighted sum of upstream curvatures; flow velocity does not enter the equation. Curvature is transformed into a 'nominal migration rate' through multiplication with a migration rate (or erodibility) constant.
Package: meaning
Translate words via command line. Inspired byafc163/fanyi, but more features.Features英文单词查询Installpip install meaningUsageUsage: meaning <words> [options]

Options:
  -v, --vers    output the current version
  -h, --help    output usage information

Examples:
  $ meaning love支持语言语言目标语言英文中文Notes增加数据记录功能LicenseMIT.
Package: meaningful-re
meaningful_reRegular expression builder with chainable methods.Instead of having to read and figure out the meaning of those weird strings, you can use an object to build your regex with methods with more sense.ExampleLet's say you want to make a regular expression liker'^[hc]at$', you can do it like this:frommeaningful_reimportMeaningfulREasMREmre=(MRE('[hc]').concat('at').match_start.match_end)printmre.regexNote: It doesn't matter if you usematch_startormatch_endat the beginning, middle or end of you chaining methods, when you show theregexthey will be in their corresponding string position.Or if you want to make an email regular expression liker'\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b', not everybody can read that, but, with meaningful_re it makes more sense doing it.frommeaningful_reimportMeaningfulREasMREmre=(MRE().word_boundary.any_of(MRE.RANGE_UPPERCASE_ALPHABET,MRE.RANGE_NUMBERS,'._%+-').concat('+@').any_of(MRE.RANGE_UPPERCASE_ALPHABET,MRE.RANGE_NUMBERS,'.-').concat('+\.').any_of(MRE.RANGE_UPPERCASE_ALPHABET).at_least(2).word_boundary)Another example using capturing group, if you would like to match all string starting withIMGand ending with either.pngorjpegliker'^(IMG\d+)\.(png|jpeg)$', can be built this way:frommeaningful_reimportMeaningfulREasMREmre=(MRE().match_start.gi.one_or_more('IMG'+MRE.DIGIT).ge.concat('\.').gi.or_('png','jpeg').ge)
Package: mean-opinion-score
mean-opinion-scorePython library for calculating the mean opinion score (MOS) and 95% confidence interval (CI) of the standard deviation (SD) of text-to-speech (TTS) ratings according to"Ribeiro, F., Florêncio, D., Zhang, C., & Seltzer, M. (2011). CrowdMOS: An approach for crowdsourcing mean opinion score studies". To determine CIs, the authors used a two-way random effects model with the variables: diversity of intrinsic sentence quality, diversity of rater preference, and subjective uncertainty.Installationpipinstallmean-opinion-score--userUsageimportnumpyasnpfrommean_opinion_scoreimportget_ci95,get_ci95_default,get_mos_=np.nanratings=np.array([# columns represent sentences[4,5,_,4,_,3],# rater 1[4,4,4,5,_,4],# rater 2[_,3,5,4,_,1],# rater 3[_,_,_,_,_,_],# rater 4])mos=get_mos(ratings)ci=get_ci95(ratings)ci_default=get_ci95_default(ratings)print(f"MOS:{mos:.2f}±{ci:.4f}")print(f"MOS:{mos:.2f}±{ci_default:.4f}")# MOS: 3.85 ± 1.3316# MOS: 3.85 ± 0.5579DependenciesnumpyscipyContributingIf you notice an error, please don't hesitate to open an issue.Development setup# updatesudoaptupdate# install Python 3.6, 3.7, 3.8, 3.9, 3.10 & 3.11 for ensuring that tests can be runsudoaptinstallpython3-pip\python3.6python3.6-devpython3.6-distutilspython3.6-venv\python3.7python3.7-devpython3.7-distutilspython3.7-venv\python3.8python3.8-devpython3.8-distutilspython3.8-venv\python3.9python3.9-devpython3.9-distutilspython3.9-venv\python3.10python3.10-devpython3.10-distutilspython3.10-venv\python3.11python3.11-devpython3.11-distutilspython3.11-venv# install pipenv for creation of virtual environmentspython3.11-mpipinstallpipenv--user# check out repogitclonehttps://github.com/stefantaubert/mean-opinion-score.gitcdmean-opinion-score# create virtual environmentpython3.11-mpipenvinstall--devRunning the tests# first install the tool like in "Development setup"# then, navigate into the directory of the repo (if not already done)cdmean-opinion-score# activate environmentpython3.11-mpipenvshell# run teststoxFinal lines of test result output:py36: OK
  py37: OK
  py38: OK
  py39: OK
  py310: OK
  py311: OK
  congratulations :)LicenseMIT LicenseAcknowledgmentsMOS and CI calculation is taken from:Ribeiro, F., Florêncio, D., Zhang, C., & Seltzer, M. (2011). CrowdMOS: An approach for crowdsourcing mean opinion score studies. 2011 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2416–2419.https://doi.org/10.1109/ICASSP.2011.5946971Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 416228727 – CRC 1410.CitationIf you want to cite this repo, you can use this BibTeX-entry generated by GitHub (seeAbout => Cite this repository).Taubert, S. (2023). mean-opinion-score (Version 0.0.2) [Computer software]. https://doi.org/10.5281/zenodo.8238259Changelogv0.0.2 (2023-08-11)Added:commonly used 95% confidence interval calculationv0.0.1 (2023-02-23)Initial release
Package: mean-reversion-util
johansenPython implementation of the Johansen test for cointegrationInstallation notes:This package requires scipy, which in turn  requires blas, lapack, atlas, and
gfortran. These can be installed on a Ubuntu system with:sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortranExamples:See examples folder for a jupyter notebook with example usage.NOTE:The cases when the chosen model (in the language of MacKinnon 1996) is 1* or 2* have not yet been fully implemented. They will be completed in the near future.
Package: mean-reversion-utilities
johansenPython implementation of the Johansen test for cointegrationInstallation notes:This package requires scipy, which in turn  requires blas, lapack, atlas, and
gfortran. These can be installed on a Ubuntu system with:sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortranExamples:See examples folder for a jupyter notebook with example usage.NOTE:The cases when the chosen model (in the language of MacKinnon 1996) is 1* or 2* have not yet been fully implemented. They will be completed in the near future.
Package: means
MEANS: python package for Moment Expansion Approximation, iNference and SimulationA free, user-friendly tool implementing an efficient moment expansion approximation with parametric closures
that integrates well with the IPython interactive environment.
Our package enables the analysis of complex stochastic systems without any constraints
on the number of species and moments studied and the type of rate laws in the system.
In addition to the approximation method our package provides numerous tools to help
non-expert users in stochastic analysis.
Package: meanshift-rs
MeanShift-rsInstall as Python Package0. Minimum Requirementsrustc 1.54.0Python 3.71. Create Python Environmentpython3-mvenv.venv2. Install MeanShift-rsmakeinstallorpipinstall-rrequirements.txt
bash./tasks.shrelease-installorpipinstallmeanshift-rsUsageRustusemeanshift_rs::{MeanShiftActor,Parameters};fnexample_fn(dataset:Array2<f64>){letparameters=Parameters::default();letmutmean_shift=MeanShiftActor::init(parameters);let(centers,labels)=mean_shift.fit(dataset).expect("No MeanShiftResult was returned!");}Pythonfrommeanshift_rsimportMeanShift# ... load datams=MeanShift()ms.fit(data)print(ms.cluster_centers)print(ms.labels)
Package: mean-variance-portfolio
=======================Mean Variance Portfolio=======================.. image:: https://img.shields.io/pypi/v/mvport.svg:target: https://pypi.python.org/pypi/mvport.. image:: https://img.shields.io/travis/condereis/mean-variance-portfolio.svg:target: https://travis-ci.org/condereis/mean-variance-portfolio.. image:: https://readthedocs.org/projects/mean-variance-portfolio/badge/?version=latest:target: https://mean-variance-portfolio.readthedocs.io/en/latest/?badge=latest:alt: Documentation Status.. image:: https://pyup.io/repos/github/condereis/mean-variance-portfolio/shield.svg:target: https://pyup.io/repos/github/condereis/mean-variance-portfolio/:alt: UpdatesMV Port is a Python package to perform Mean-Variance Analysis. It provides a Portfolio class with a variety of methods to help on your portfolio optimization tasks.* Free software: MIT license* Documentation: https://mvport.readthedocs.io... Modern portfolio theory (MPT), or mean-variance analysis, is a mathematical framework for assembling a portfolio of assets such that the expected return is maximized for a given level of risk. It is a formalization and extension of diversification in investing, the idea that owning different kinds of financial assets is less risky than owning only one type. Its key insight is that an asset's risk and return should not be assessed by itself, but by how it contributes to a portfolio's overall risk and return. It uses the variance of asset prices as a proxy for risk.Features--------* Easy portfolio setup* Portfolio evaluation* Random portfolio allocation* Minimum Variance Portfolio optimization* Efficient Frontier evaluation* Tangency Portfolio for a given risk free return rateInstallation------------To install MV Port, run this command in your terminal:.. code:: bash$ pip install mvportCheck `here <https://mvport.readthedocs.io/en/latest/installation.html>`_  for further information on installation.Basic Usage-----------Instantiate a portfolio and add some stock and evaluate it given a set of weights:.. code:: python>>> import mvport as mv>>> p = mv.Portfolio()>>> p.add_stock('AAPL', [.1,.2,.3])>>> p.add_stock('AMZN', [.1,.3,.5])>>> mean, variance, sharp_ratio, weights = p.evaluate([.5, .5])>>> print '{} +- {}'.format(mean, variance)0.25 +- 0.0225Check `here <https://mvport.readthedocs.io/en/latest/usage.html>`_  for further information on usage.=======History=======1.0.0 (2018-06-28)------------------* First release on PyPI.* Stock class implemented.* Portfolio class implemented.* Minimum Variance Portfolio optimization* Efficient Frontier evaluation* Tangency Portfolio for a given risk free return rate
Package: meapy
MeaPyPython API Wrapper for Measurement DataVisionMeaPy wants to be a easy-to-use and conformable API for working with measurement data in den Big Test Data environment.Getting Startedpip install meapyUsageTo create a meapy session, you need to connect to the MaDaM system.nfrommeapyimportMeaPy,MeasurementList,LoadingConfig# "Basic " is the content if the HTTP Authorization-Header. In this example it is the Basic Authentication Header for user:passwordmp=MeaPy("http://madam-docker.int.kistler.com:8081/","Basic dXNlcjpwYXNzd29yZA==")Search# direct search (by default limited to 100 results)result=mp.search("test")# result is a list of meapy.Measurement# search and iteration over the whole result setml=MeasurementList(mp)count=0formeainml.items('Station.Id="d4f1ad55-72d5-403c-81b8-73b2942b58f4"'):count+=1print(count)Loading SignalsThe measurements that were returned from the search can be used to load the signals directly from the MaDaM system.result=mp.search("test",limit=1)measurement=result[0]# load a measurementconfig=LoadingConfig()config.withSignals(['time'])signals=mp.load(measurement,config)# signals is a list of meapy.SignalData that contains the information for the requested channelsUpdate Measurement Metadataresult=mp.search("test",limit=1)measurement=result[0]# update the metadata with some additional datadata={'someField':'someValue'}mp.update(measurement,data)Upload a new Measurement# upload a pandas DataFrame to MaDaM with a given name.df=pd.DataFrame(np.random.randint(0,100,size=(100,4)),columns=list('ABCD'))# you can also add some additional metadata heredata={'someField':'someValue'}mp.upload("random-data",df,data)# after successful upload, you can find the new measurement "random-data.csv"
Package: mease
Websocket server using Twisted/Autobahn with an easy to use callback registry mechanismSeedjango-mease,django-mease-exampleorflask-mease-examplefor working examples.InstallationUse pip to install the latest mease version :pip install measemeasecomes with two backends :RedisTo use Redis backend, install these dependencies :sudo apt-get install redis-server
pip install redisRefer to theRedis documentationto configure your server.RabbitMQTo use RabbitMQ backend, install these dependencies :sudo apt-get install rabbitmq-server
pip install kombuRefer to theRabbitMQ documentationto configure your server.QuickstartCreate a file where you can write your callbacks and register them :frommeaseimportMeasefrommease.backends.redisimportRedisBackend# OR from mease.backends.rabbitmq import RabbitMQBackendfromuuidimportuuid4mease=Mease(RedisBackend)@mease.openerdefexample_opener(client,clients_list):# Do stuff on client connectionclient.storage['uuid']=str(uuid4())@mease.closerdefexample_closer(client,clients_list):# Do stuff on client disconnectionprint("Client{uuid}disconnected".format(uuid=client.storage.get('uuid')))@mease.receiver(json=True)defexample_receiver(client,clients_list,message):# Do stuff on incoming client messagepass@mease.sender(routing='mease.demo')defexample_sender(routing,clients_list,my_tuple):# Do stuff on outgoing messagepassif__name__=='__main__':# Start websocket servermease.run_websocket_server()Remember to run the websocket server from themeaseinstance where you registered your callbacks.In your code, you can now call the measepublishmethod to send a message to websocket clients :frommeaseimportMeasefrommease.backends.redisimportRedisBackendmease=Mease(RedisBackend)# ...mease.publish('mease.demo',my_tuple=("Hello","World"))That’s it ! You are now able to send messages from your web server to your websocket server in a cool way !
Package: mease-elabftw
mease-elabftwA Python library for interacting witheLabFTWexperiments:CreateNWBmetadata from an eLabFTW experimentUpload files (e.g. analysis result from HPC) to an eLabFTW experimentList eLabFTW experiments from the command lineSetuppython-mpipinstallmease-elabftwTo authenticate requests to the eLabFTW server you also need to generate an API key in eLabFTW (User Panel -> API Keys -> GENERATE AN API KEY),
and then set the environment variableELABFTW_TOKENto this key, e.g.exportELABFTW_TOKEN=abc123abc123abc123Use in PythonGet nwb metadata from an elabftw experiment to use inmease-lab-to-nwb:>>>importmease_elabftw>>>mease_elabftw.list_experiments("Liam")['163: test fake experiment without json metadata (Liam Keegan, 2021-10-07)', '156: test fake experiment with json metadata (Liam Keegan, 2021-10-01)']>>>metadata=mease_elabftw.get_nwb_metadata(156)>>>metadata["NWBFile"]["session_description"]test fake experiment with json metadata>>>metadata["NWBFile"]["identifier"]20211001-8b6f100d66f4312d539c52620f79d6a503c1e2d1Use from terminalList all experiments on elabftw belonging to user "Liam":$elabftw-listLiam163:testfakeexperimentwithoutjsonmetadata(LiamKeegan,2021-10-07)156:testfakeexperimentwithjsonmetadata(LiamKeegan,2021-10-01)
Package: measpy
measpy is a set of classes and methods to help the data acquisition and analysis of signals. It is mainly acoustics and vibrations oriented. This package is very recent, it is still incomplete and many bugs may appear.The base classes are:`Signal`: It is basically a class that contain a 1D numpy array, an a few other properties to describe the data as: sampling frequency, calibration and unit.`Spectral`: A spectral data class that contains the complex amplitudes as a 1D numpy array for frequencies up to the Nyquist frequency, and some properties as sampling frequency, unit, description`Measurement`: A class that describe a data acquisition process, its outputs (Signal objects), its inputs (Signal objects)…`Weighting`: Weighting spectral functions (Not yet fully test/functionnal)For now, these daq devices can be used :Audio cards, via the`sounddevice`package,NI DAQ cards, via the`nidaqmx`package.Picoscope scopes, via the`picosdk-python-wrappers`package.
Package: measured
measuredmeasuredis a library for measurements and quantities.>>>frommeasuredimportSpeed>>>frommeasured.siimportMeter,Second>>>distance=10*Meter>>>time=2*Second>>>speed=distance/time>>>assertspeed==5*Meter/Second>>>assertspeed.unitisMeter/Second>>>assertspeed.unit.dimensionisSpeedThe goal ofmeasuredis to provide a sound foundation for recording and converting
physical quantities, while maintaining the integrity of their units and dimensions.While it aims to be the fastest library of its kind, automatically tracking the units
and dimensions of quantities introduces significant overhead.  You can usemeasuredfor applications where the accuracy of the units is more important than raw numerical
computing speed.measuredis licenced under the MIT Licence.Installingmeasuredis available onPyPi, and is tested with
with Python and PyPy 3.8+:$pipinstallmeasuredReferenceThe documentation formeasuredis onRead the
Docs.ContributingContributions are welcome!  Please report bug and submit pull requests tohttps://github.com/chrisguidry/measured.
Package: measure-exec-time
Decorator for measuring the execution time of a callable$pipinstallmeasure-exec-timefrommeasure_exec_timeimportmeasure_timefromtimeimportsleep@measure_timedeffoo1():sleep(2)return22@measure_time(show_timedelta=False,show_start_end=True)deffoo2():sleep(2)return22@measure_time(show_timedelta=True,show_start_end=False)deffoo3():sleep(2)return22foo1()print('----------')foo2()print('----------')foo3()
Package: measure-incremental-development
Measure of Incremental DevelopmentThe Measure of Incremental Development (MID) is a metric that evaluates a student's
adherence to incremental development given snapshots of the student's code at compilation. Currently, it has been
developed and trained on student data from a Python-based, introductory computer science course.UsageFirst, install the Python package in the appropriate directory withpipusing:pip install measure_incremental_developmentSecond, import thecalculateMIDfunction in the Python file you would like to perform the calculation:from measure_incremental_development.compute import calculate_midThird, make the appropriate call to thecalculate_midfunction (make sure the input data is formatted correctly):mid_statistic = calculate_mid(snapshots)Note: the input datasnapshotsshould be formatted as described belowInput Data FormatThecalculate_midfunction will take as input alist of strings, where each element is a string that is the exact text of the student code (including whitespace).An example of an appropriate input:frommeasure_incremental_development.computeimportcalculate_midsnap1="""def hello(name):print(name)"""snap2="""def hello(name):welcome_string = "Hello " + name"""snap3="""def hello(name):welcome_string = "Hello " + namereturn welcome_string"""snapshots=[snap1,snap2,snap3]mid_statistic=calculate_mid(snapshots)Interpretting OutputThe metric will output any value greater than or equal to 0.A lower score indicates a greater level of
incremental development. Below are the categories of the scores:MID of [0 - 2]: Likely incrementalMID of [2 - 2.5]: Somewhat incrementalMID of [2.5-3]: Somewhat non-incrementalMID of [3+]: Likely non-incrementalGithub RepositoryThe full code to calculate the Measure of Incremental Development (MID) can be found onthis Github repository.Additional Information and CitationThis metric was presented in a research paper presented at the 2023 SIGCSE Technical Symposium. You
can find additional information about the motivation, development, and evaluation of the metric in
the research paper. Use the citation below to access the paper.Additionally, please use the following citation (in ACM Reference Format) if using this metric
for a publication:Anshul Shah, Michael Granado, Mrinal Sharma, John Driscoll, Leo Porter,
William G. Griswold, and Adalbert Gerald Soosai Raj. 2023. Understanding
and Measuring Incremental Development in CS1. In Proceedings of the 54th
ACM Technical Symposium on Computing Science Education V. 1 (SIGCSE
2023), March 15–18, 2023, Toronto, ON, Canada. ACM, New York, NY, USA,
7 pages.https://doi.org/10.1145/3545945.3569880
Package: measure-it
measure_itprovides timing and counting for iterators (and other code segments). It can be used to:monitor runtime behavior in production systemsconduct performance benchmarkseasily generate plots/graphs and statisticsGet it from the cheeseshop today:pip install measure_itauthor:Pete Fein <pete@wearpants.org>license:BSDversions:Python 2.7 & 3source:https://github.com/wearpants/measure_ithomepage:https://measure_it.readthedocs.org/en/latest/video:https://www.youtube.com/watch?v=A_C4Z4RDDgI
Package: measurement
Easily use and manipulate unit-aware measurement objects in Python.django.contrib.gis.measurehas these wonderful ‘Distance’ objects that can be used not only for storing a
unit-aware distance measurement, but also for converting between different
units and adding/subtracting these objects from one another.This module not only provides those Distance and Area measurement
objects, but also other measurements including:EnergySpeedTemperatureTimeVolumeWeightExample:>>>frommeasurement.measuresimportWeight>>>weight_1=Weight(lb=125)>>>weight_2=Weight(kg=40)>>>added_together=weight_1+weight_2>>>added_togetherWeight(lb=213.184976807)>>>added_together.kg# Maybe I actually need this value in kg?96.699WarningMeasurements are stored internally by converting them to a
floating-point number of a (generally) reasonable SI unit.  Given that
floating-point numbers are very slightly lossy, you should be aware of
any inaccuracies that this might cause.TLDR: Do not use this innavigation algorithms guiding probes into the atmosphere of extraterrestrial worlds.Documentation for python-measurement is available anReadTheDocs.Please post issues onGithub.Test status available onTravis-CI.