Saravanan666/pypi-org huggingface dataset:
Package: matlab-wrapper
Withmatlab_wrapperyou can easily talk to MATLAB from your Python
scripts and an interactive shell.  MATLAB session is started in the
background and appears as a regular Python object.Info:matlab_wrapperis maintained, but not actively developed.UsageInitialize:import matlab_wrapper
matlab = matlab_wrapper.MatlabSession()Low level:matlab.put('a', 12.3)
matlab.eval('b = a * 2')
b = matlab.get('b')Workspace:s = matlab.workspace.sin([0.1, 0.2, 0.3])

sorted,idx = matlab.workspace.sort([3,1,2], nout=2)

matlab.workspace.a = 12.3
b = matlab.workspace.bMore examples are in theexamplesdirectory!FeaturesAccess MATLAB variables and functions from PythonMultiplatform: GNU/Linux, Windows, OS XOn-the-fly conversion between MATLAB and Numpy data typesSupport for MATLAB’s numerical, logical, struct, and cell arraysPure Python, no need to compile anything (matlab_wrappertalks toMATLAB engine libraryusingctypes)For a complete list of changes including new features, check theNEWS.rstfile.InstallationFirst, make sure that you have the following components installed:Python 2.7MATLAB (various versions)NumpyNext, installmatlab_wrapperusing pip (the standard Python package
installation tool) from your command line:pip install matlab_wrapperContributeCheck ourCONTRIBUTINGguidelines.Issue Tracker:https://github.com/mrkrd/matlab_wrapper/issuesSource Code:https://github.com/mrkrd/matlab_wrapperSupportIf you are having issues, please let me know through the issue
tracker:https://github.com/mrkrd/matlab_wrapper/issues.  Try to avoid
duplicates by searching previous issues, checkingFAQ, andCONTRIBUTING.Acknowledgmentsmatlab_wrapperwas forked frompymatlab.MATLAB is a registered trademark ofThe MathWorks, Inc.LicenseThe project is licensed under the GNU General Public License v3 or
later (GPLv3+).
Package: matlearn
Welcome to my Machine Learning Library. With the help of this package, you can create machine learning models and algorithms.
Included preprocessing, training, evaluation.The module supports linear regression to predict the outcome of continuous values. Also, it has logistic regression to predict the outcome of discrete values (classification) in two ways: 1. probability prediction, exact label prediction. All models are trained by the gradient descent algorithm.When it comes to preprocessing, matlearn provides a variety of algorithms in order to make it easy to train a model.And after training your model, you can use several different loss functions to validate the power of your model.This project is completely written by Mahdi Zare and still developing.
Package: matmap
Matmap: A Modular, Automatable, Tunable Mapper for Accelerator ProgrammingA representation for higher-level transforms, currently targetingEXOcode.SetupThis has been extensively tested on Python 3.9.7. Python versions 3.7 and earlier are not supported as Exo requires several newer language features not available. If you are on a system with an outdated version of python, we recommend usingpyenvto install a new version of pyenv.git clone https://github.com/gdinh/matmap.git
python -m venv $HOME/.venv/matmap
source $HOME/.venv/matmap/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ./matmapFurther documentation and demo notebooks can be found in the docs directory.Project status:Working:Tiling schedule (including automatic generation of tiles for projective nested loops)Reordering scheduleIn progress:GPTuneintegrationCoSAtransformNext TODOs:HBL autotiling for CNNsCode specialization for variable sized bounds
Package: matminer
matminer is a library for performing data mining in the field of materials science.Website (including documentation)Examples RepositoryHelp/Support ForumSource Repositorymatminer supports Python 3.8+.Related packages:If you like matminer, you might also tryautomatminer.If you are interested in furthering development of datasets in matminer, you may be interested inmatbench.If you are looking for figrecipes, it is now in itsown repo.CitationIf you find matminer useful, please encourage its development by citing the following paper in your research:Ward, L., Dunn, A., Faghaninia, A., Zimmermann, N. E. R., Bajaj, S., Wang, Q.,
Montoya, J. H., Chen, J., Bystrom, K., Dylla, M., Chard, K., Asta, M., Persson,
K., Snyder, G. J., Foster, I., Jain, A., Matminer: An open source toolkit for
materials data mining. Comput. Mater. Sci. 152, 60-69 (2018).Matminer helps users apply methods and data sets developed by the community. Please also cite the original sources, as this will add clarity to your article and credit the original authors:If you use one or moredatasetsaccessed through matminer, check the dataset metadata info for relevant citations on the original datasets.If you use one or moredata retrieval methods, checkcitations()method of the data retrieval class. This method will provide a list of BibTeX-formatted citations for that featurizer, making it easy to keep track of and cite the original publications.If you use one or morefeaturizers, please take advantage of thecitations()function present for every featurizer in matminer.
Package: matmos
MATMOSMATMOS is a direct and inverse atmospheric model library. Currently it supports
the International Standard Atmosphere model.Installpip install matmosUser's guideGiven an altitude, MATMOS allows you to calculate the temperature, pressure and
density of the atmosphere (direct model). If given any of these (temperature,
pressure or density), MATMOS will calculate the corresponding altitude and remaining
quantities (indirect model).As temperature is not a monotonic function of altitude (equal values of temperature happen
at different altitudes), its inverse cannot be determined without more information. To solve
this, the option to specify an altitude range where the temperature is to be found is
provided.The API reference is available here.Installpip install matmosModelsUser's guideImporting a modelfrom matmos import ISARunning and retrieving resultsThe model is run by simply initializing an instance with
height, temperature, pressure or density as inputs.
The results are stored as instance attributes and can be retrieved with
the usual notation.MATMOS allows for input in the form of Python numeric types as well as NumPy arrays.
The unit convention can be seen in the table below.MagnitudeAltitudeTemperaturePressureDensityUnitkmKPakg/m^3Direct modelSolving for a given height:m = ISA(23.5)                       # 23.5 km

m.t                                 # Temperature
m.p                                 # Pressure
m.d                                 # DensityInverse modelSolving for a given temperature:m = ISA(t=225, hrange=[0, 20])      # 225 K, in the range from 0 to 20 km

m.h                                 # Altitude
m.t                                 # Temperature
m.d                                 # DensitySolving for a given pressure:m = ISA(p=98000)                    # 98000 Pa

m.h                                 # Altitude
m.t                                 # Temperature
m.d                                 # DensitySolving for a given density:m = ISA(p=0.03)                     # 0.03 kg/m^3

m.h                                 # Altitude
m.t                                 # Temperature
m.p                                 # PressureBack to top
Package: mat-neuron
mat-neuronThis project is a python implementation of the multi-timescale adaptive threshold (MAT) neuron model described by Kobayashi et al (2009) and Yamauchi et al (2011). The code uses the exact integration method of Rotter and Diesmann (1999) and can be used for several different tasks:deterministic and stochastic simulations of spiking responses to time-varying driving currentsevaluating the likelihood of a spike train conditional on parameters, initial state, and driving currentThis is a work in progress and should be considered alpha code, with a totally unstable interface.Performance-critical parts of the integration are implemented using theEigenC++ linear algebra library. The C++ code is wrapped usingpybind11. You will need to have a C++11-compliant compiler and install Eigen (version 3.2.7 or later) in order to use this package. If your system package manager does not supply a recent enough version, you can just clone the eigen package into theincludedirectory:cdincludehgclonehttps://bitbucket.org/eigen/eigen/installingFrom source:pipinstall-rrequirements.txtpythonsetup.pyinstallusingSimulate a response to a step currentimportnumpyasnpimportmat_neuron.coreasmat# parameters: (α1, α2, β, ω, R, τm, τ1, τ2, τV, tref)params=[10,2,0,5,10,10,10,200,5,2]# temporal resolution of the forcing current msdt=1.0# step currentI=np.zeros(1000,dtype='d')I[200:]=0.55# predict() returns the full state vector (V, I, θV, ddθV) over time and a binary spike array# see docs for how to get stochastic spiking and higher-resolution integration stepsY,S=mat.predict(I,params,dt)spike_times=S.nonzero()[0]Calculate the log-likelihood of a spike train conditional on driving current and parameters. This function can be used in optimization problems, though it's mostly just here as a reference for a Theano implementation we use that also gives us the gradient and Hessian for efficient maximum-likelihood estimation.llf=mat.log_likelihood(spike_times,I,params,dt)
Package: matomeru-mi
Markdown-like Markup InterpreterProject goalInitially the idea was to use Markdown for making ODT files which will be
compilant with GOST 7.32-2017. But as things were going the goal expanded
to making an ODT from markup file and a template directory.Possibly this project can be used as a library for a web-service, but there is no info about such use.Installation and useVia gitClone the repository:git clone https://gitlab.com/Fe-Ti/matomeru-mi.gitRun install.sh script (on *BSD, *Linux and others):./install.shIf everything was left as default then running a command below creates a zip
archive with ODT structure:matomeru-mi -if <input file> -of <output file>For examplematomeru-mi -if README.md -of README.odtVia pipRun:python3 -m pip install --upgrade matomeru-miThen the package will be downloaded. The execution is simple:python3 -m matomerumi -if <input file> -of <output file>SyntaxConsult Syntax.md (or a page in project documentation).Implemented stuffParagraphs, headings and code blocks (paragraphs with monospace font);Basic picture handling support;Creation of multilevel numbered and bulleted lists;Basic page break support;Support for relative and absolute paths.IdeasNo temporal directory;PIP package;Title page support;Styling Engine;Documentation;Escape characters support;CI;Spreadsheets in docs.DocumentationFor syntax reference consult:SyntaxDocumentation for library:Main pageCopyright 2021 Fe-Ti
Package: matomo-dl
Matomo distribution managerA command-line tool for building Matomo distributions with plugins bundled in
and various customizations applied. It builds a bundled zip file in a
verifiable and reproducible manner for use with systems like Docker.FeaturesVersion piningWhilst a range of accepted versions may be specified in thedistribution.toml, the lock file that is used to produce the bundle fixes
an exact version ensuring that subsequent runs will always download the same
release.Download hash piningWe apply a trust-on-first-download mode for all files, such that any
change in file hash for the same version can only be rectified through manual
intervention. This pinning also ensures a consistent input into the
customization stagesUseful tweaksRemove modules that serve no purpose under your intended release scheme such
as the marketplace.Tidy bundleBundles can optionally have packaging information(thinkpackage.jsonand.composer.lock), example plugins and other supporting file removed to
keep the bundle size down.Safe & shareable cachingSource zip files are cached locally for faster subsequent builds. Caches can
be shared across distributions, and each file has it's integrity checked
against the expected hashes stored in the distribution's lock file.
Package: matos-gcp-provider
matos-gcp-providerThe 'matos-gcp-provider' is an open-source python package for developing security tools to identify threats in your Google Cloud Platform (GCP) infrastructure. It uses the service providers Cloud SDK to deduce the current state and metadata of the underlying services.QuickstartClone this repository.Create a virtualenv and activate.Install requirement packages inside install_requires list of setup.py list.Sample demo, import working folder into pathsrc\matos_gcp_providerfrommatos_gcp_provider.providerimportProvider#credential can be import by either input dict or json load inside /credentials folderdummy_credential={"tenantId":"","clientId":"","clientSecret":"","subscription_id":""}# construct provider object, optional resource type for select specific resourceprovider=Provider(dummy_credential=dummy_credential,resource_type="")# asset discoverassets=provider.get_assets()# fetching resource detailsresources=provider.get_resource_inventories(assets)Run prebuild package environment and unit test:python-mpipinstall-Utox
python-mtox-epyBuild local wheel filepython-mpipinstall-Usetuptoolswheelbuild
python-mbuild.Add resource api pluginresource provider register through plugin design pattern, adding new plugin insidepluginsfolderExample resource and register stepclassSamplePlugin(BaseProvider):"""service pluginsArgs:BaseProvider (Class): base provider class"""def__init__(self,resource:Dict,**kwargs)->None:"""Construct cluster service"""super().__init__(**kwargs)defget_inventory(self)->Any:"""Service discovery"""passdefregister()->Any:"""Register plugins type"""factory.register("resource_type",SamplePlugin)Version handling and publish releaseVersion is managed through bumpversion. Command to update new version, setup.py and .bumpversion.cfg will auto updatebumpversionmajor|minor|patch--allow-dirty(optional)
Package: matphys
matphys v1.1.27A Python math and physics modulesPascal’s TriangleBell TriangleEuler’s TriangleEuler’s ConstantPower SeriesFloyd’s TriangleFibonacci Sequencepascal modulePascal’s Triangle>>> from matphys import pascal
>>> p = pascal.PascalTriangle(10) #arg is the number of rows wanted
>>> p.read()
[1]
[1, 1]
[1, 2, 1]
[1, 3, 3, 1]
[1, 4, 6, 4, 1]
[1, 5, 10, 10, 5, 1]
[1, 6, 15, 20, 15, 6, 1]
[1, 7, 21, 35, 35, 21, 7, 1]
[1, 8, 28, 56, 70, 56, 28, 8, 1]
[1, 9, 36, 84, 126, 126, 84, 36, 9, 1]
>>> p.row(5) #arg is row number
16bell moduleBell Triangle>>> from matphys import bell
>>> b = bell.BellTriangle(10) #arg is the number of rows wanted
>>> b.read()
[1]
[1, 2]
[2, 3, 5]
[5, 7, 10, 15]
[15, 20, 27, 37, 52]
[52, 67, 87, 114, 151, 203]
[203, 255, 322, 409, 523, 674, 877]
[877, 1080, 1335, 1657, 2066, 2589, 3263, 4140]
[4140, 5017, 6097, 7432, 9089, 11155, 13744, 17007, 21147]
[21147, 25287, 30304, 36401, 43833, 52922, 64077, 77821, 94828, 115975]
>>> b.row(5) #arg is row number
151floyd moduleFloyd’s Triangle>>> from matphys import floyd
>>> f = floyd.FloydTriangle(10) #arg is the number of rows wanted
>>> f.read()
[1]
[2, 3]
[4, 5, 6]
[7, 8, 9, 10]
[11, 12, 13, 14, 15]
[16, 17, 18, 19, 20, 21]
[22, 23, 24, 25, 26, 27, 28]
[29, 30, 31, 32, 33, 34, 35, 36]
[37, 38, 39, 40, 41, 42, 43, 44, 45]
[46, 47, 48, 49, 50, 51, 52, 53, 54, 55]
>>> f.row(5) #arg is row number
65euler moduleEuler’s Triangle>>> from matphys import euler
>>> e = euler.EulerTriangle(10) #arg is the number of rows wanted
>>> e.read()
[1]
[1, 1]
[1, 4, 1]
[1, 11, 11, 1]
[1, 26, 66, 26, 1]
[1, 57, 302, 302, 57, 1]
[1, 120, 1191, 2416, 1191, 120, 1]
[1, 247, 4293, 15619, 15619, 4293, 247, 1]
[1, 502, 14608, 88234, 156190, 88234, 14608, 502, 1]
[1, 1013, 47840, 455192, 1310354, 1310354, 455192, 47840, 1013, 1]
>>> e.row(5)
120Euler’s NumberEuler’s number is represented by (e) in mathematics>>> from matphys import euler
>>> e = euler.EulerNumber(128500000) #arg is the precision
>>> e.read()
2.7182818243Euler’s ConstantEuler’s Constant is represented by gamma (γ) in mathematics>>> from matphys import euler
>>> e = euler.EulerConstant(10000000) #arg is the precision of the constant
>>> e.read()
0.577265664068Power Series>>> from matphys import euler
>>> p = euler.PowerSeries(10, 10) #args are (n, x)
>>> p.read()
12842.305114638448fibonacci moduleFibonacci Sequence>>> from matphys import fibonacci
>>> f = fibonacci.FibonacciSequence(10) #arg is the sequence out to the nth term
>>> f.read()
[1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
Package: matplatex
MatpLaTeXMatpLaTeX lets you save a matplotlibFigureas a combination of a pdf file containing the graphics and a tex file containing the text. With this, text in the figure will automatically use the typeface, size and other settings of the surrounding text.InstallationThe matplatex package is on PyPI and can be installed withpip install matplatexRequirements:python >= 3.10 (If someone asks I may add support for earlier versions.)matplotlib >= 3.5beartypeBasic UsageTo save a figure, simply usematplatex.save(fig, "myfig")this will create two files namedmyfig.pdfandmyfig.pdf_tex.
Add\newsavebox\figureboxto your LaTeX preamble and include the figure in your document with\def\figurewidth{<width>}}
\input{myfig.pdf_tex}LaTeX commands such as\smalland\textbf{}will affect the text in the expected way.More OptionsIf you don't like the commands\figureboxand\figurewidth, you can change them to something else by passing the keyword arguments 'boxname' or 'widthcommand' tomatplatex.save.LimitationsCharacters which need to be escaped in LaTeX must also be escaped in the plot.Why not …… adjust the plot settings in a matplotlib style sheet?You’d need to recreate every figure each time you make a change.… use tikzplotlib?Tikzplotlib is great for simple figures, but fails to accurately recreate more complex ones, or ones with too much data. MatpLaTeX is meant to cover a different usecase that tikzplotlib rather than compete with it.… use pgfplots from the getgo?I like python.… spend time on actual work rather than on tiny details nobody cares about anyway?Icare.MotivationYou've probably been there: you made a nice figure and now you want no include it in your LaTeX document. But the text is too small. And the font doesn't match.You open the matplotlib documentation and adjust all the necessary settings for the figure to look right, perfectly at home in your manuscript.
Package: matplitlib-terminal
matplotlib-terminalMatplotlib backend to plot in terminal using matrach/img2unicodeThis is in proof of concept stage, stay tuned!Install it with:pipinstallmatplotlib-terminalUsage:importmatplotlib_terminalimportmatplotlib.pyplotasplt# Or in short:# from matplotlib_terminal import pltplt.plot([0,1],[0,1])plt.plot([1,0],[0,1],lw=3)plt.scatter([0],[.5])plt.show()plt.show('gamma')# Use RendererGamma-fast/noblock from img2unicode rendererplt.show('block')# Use Renderer-fast/block from img2unicodeplt.show('braille')# Use RendererGamma-fast/braille from img2unicode rendererplt.close()Sample resultsGamma renderer:Block renderer:Braille renderer:
Package: matplotcheck
MatPlotCheckA package for testing different types of matplotlib plots including:basic matplotlib plotsgeopandas spatial vector plotsraster plotstime series plotsfolium plotsand more!Why MatPlotCheck?There is often a need to test plots particularly when teaching data science
courses. The Matplotlib api can be complex to navigate when trying to write
tests. MatPlotCheck was developed to make it easier to test data, titles, axes
and other elements of Matplotlib plots in support of both autograding and other
testing needs.MatPlotCheck was inspired byplotCheckerdeveloped by Jess Hamrick.We spoke with her about our development and decided to extend plotChecker to suite some of the grading needs in our classes which include plots with spatial data using numpy for images and geopandas for vector data.Install MatPlotCheckYou can install MatPlotCheck using either pip or conda.
To use pip run:pip install --upgrade matplotcheckTo use conda:conda install -c conda-forge matplotcheckTo import it into Python:import matplotcheck as mpcUnder DevelopmentMatplotcheck is currently under significant development.Examples2D plot with x-axis label containing "x" and y-axis label containing "y" and "data"frommatplotcheck.casesimportPlotBasicSuiteimportpandasaspdimportunittestaxis=plt.gca()data=pd.DataFrame(data={“x”:xvals,“y”:yvals})suite=PlotBasicSuite(ax=axis,data_exp=data,xcol=”x”,ycol=”y”)xlabel_contains=[“x”],ylabel_contains=[“y”,”data”])results=unittest.TextTestRunner().run(suite)Example Plot with Spatial Raster DataPlot containing a spatial raster image and spatial polygon vector datafrommatplotcheck.casesimportPlotRasterSuiteaxis=plt.gca()suite=PlotRasterSuite(ax=axis,im_expected=image,polygons=polygons)results=unittest.TextTestRunner().run(suite)If you prefer to forgo the groupings into TestSuites, you can just use the assertions instead.2D plot with x-axis label containing "x" and y-axis label containing "y" and "data"frommatplotcheck.baseimportPlotTesterimportpandasaspdaxis=plt.gca()pt=PlotTester(axis)data=pd.DataFrame(data={“x”:xvals,“y”:yvals})pt.assert_xydata(data,“x”,“y”)pt.assert_xlabel_contains([“x”])pt.assert_ylabel_contains([“y”,“data”])Plot containing a spatial raster image and spatial polygon vector datafrommatplotcheck.rasterimportRasterTesterfrommatplotcheck.vectorimportVectorTesteraxis=plt.gca()rt=RasterTester(axis)vt=VectorTester(axis)rt.assert_image(im_expected=image)vt.assert_polygons(polygons_expected=polygons)Caveats: This repo likely misses edge cases of the many ways matplotlib plots can be created.
Please feel free to submit bugs!Active ContributorsContributorsWe've welcome any and all contributions. Below are some of the
contributors to MatPlotCheck.How to ContributeWe welcome contributions to MatPlotCheck! Please be sure to check out ourcontributing guidelinesfor more information about submitting pull requests or changes to MatPlotCheck.License & CitationBSD-3Citation InformationMatPlotCheck citation information can be found onzenodo. A link to bibtext format is below:*bibtex
Package: matplot-fmt-pi
Matplotlib Format PiDOCSBranchesMasterVersionUpload StatusDownloadsReleaseVersionUpload StatusSizeFormat multiples of pi as strings on Matplotlib axes.TheMultiplePiclass creates aLocatorto place ticks at desired multiples and aFormatterto format all tick labels.The base (π or τ) can be divided by any Natural Number.Multiples of one-π or one-τ can be placed/formatted too. (2π, 3π, 2τ, 3τ, etc.)Installingpipinstallmatplot-fmt-piExamplesfrommatplot_fmt_pi.tickerimportMultiplePiSimply, the instance can be asssigned a denominator of pi then passed to matplotlib.The parameters can also be modified to adjust the output to something more sophisticated.Running ExamplesClone, then from the repo,cdexamples/
python*.pyPut the repo's directory in the python path to import thematplot_fmt_pifolder not the installed package.PYTHONPATH=/home/user/py-pros/format-pipythonexamples/pi_graph.pyTodoAdd testing option once installed (Likenumpy.test())Windowsmake.bat?MetaInspired bythispost on StackOverflow.