mpm

Simple Matlab package management inspired by pip
授权协议 MIT License
开发语言
所属分类 应用工具、 科研计算工具
软件类型 开源软件
地区 不详
投 递 者 杜炫明
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Matlab Package Manager (mpm)

A simple package manager for Matlab (inspired by pip). Downloads packages from Matlab Central's File Exchange, GitHub repositories, or any other url pointing to a .zip file.

Quickstart

Download/clone this repo and add it to your Matlab path (using addpath). Now try the following:

  • mpm install [package-name]: install package by name
  • mpm uninstall [package-name]: remove package, if installed
  • mpm search [package-name]: search for package given name (checks Github and Matlab File Exchange)
  • mpm freeze: lists all packages currently installed
  • mpm init: adds all installed packages to path (run when Matlab starts up)

More details

Install a single package

Install (searches FileExchange and Github):

>> mpm install export_fig

When installing, mpm checks for a file in the package called install.m, which it will run after confirming (or add --force to auto-confirm). It also checks for a file called pathlist.m which tells it which paths (if any) to add.

Install a Github release (by tag, branch, or commit)

By tag:

>> mpm install matlab2tikz -t 1.0.0

By branch:

>> mpm install matlab2tikz -t develop

By commit:

>> mpm install matlab2tikz -t ca56d9f

Uninstall

>> mpm uninstall matlab2tikz

When uninstalling, mpm checks for a file in the package called uninstall.m, which it will run after confirming (or add --force to auto-confirm).

Search without installing:

>> mpm search export_fig

Install from a url:

>> mpm install covidx -u https://www.mathworks.com/matlabcentral/fileexchange/76213-covidx

OR:

>> mpm install export_fig -u https://github.com/altmany/export_fig.git

(Note that when specifying Github repo urls you must add the '.git' to the url.)

Install local package:

>> mpm install my_package -u path/to/package --local

The above will copy path/to/package into the default install directory. To skip the copy, add -e to the above command.

Overwrite existing packages:

>> mpm install matlab2tikz --force

Install/uninstall packages in a specific directory:

>> mpm install matlab2tikz -d /Users/mobeets/mypath

Note that the default installation directory is mpm-packages/.

Environments ("Collections")

mpm has rudimentary support for managing collections of packages. To specify which collection to act on, use -c [collection_name]. Default collection is "default".

>> mpm install cbrewer -c test
Using collection "test"
Collecting 'cbrewer'...
   Found url: https://www.mathworks.com/matlabcentral/fileexchange/58350-cbrewer2?download=true
   Downloading https://www.mathworks.com/matlabcentral/fileexchange/58350-cbrewer2?download=true...
>> mpm init -c test
Using collection "test"
   Adding to path: /Users/mobeets/code/mpm/mpm-packages/mpm-collections/test/cbrewer
   Added paths for 1 package(s).

Installing multiple packages from file

>> mpm install -i /Users/mobeets/example/requirements.txt

Specifying a requirements file lets you install or search for multiple packages at once. See 'requirements-example.txt' for an example. Make sure to provide an absolute path to the file!

To automatically confirm installation without being prompted, set --approve. Note that this is only available when installing packages from file.

What it does

By default, mpm installs all Matlab packages to the directory mpm-packages/. (You can edit mpm_config.m to specify a custom default installation directory.)

If you restart Matlab, you'll want to run mpm init to re-add all the folders in the installation directory to your Matlab path. Better yet, just run mpm init from your Matlab startup script.

Troubleshooting

Because there's no standard directory structure for a Matlab package, automatically adding paths can get a bit messy. When mpm downloads a package, it adds a single folder within that package to your Matlab path. If there are no *.m files in the package's base directory, it looks in folders called 'bin', 'src', 'lib', or 'code' instead. You can specify the name of an internal directory by passing in an -n or internaldir argument. To install a package without modifying any paths, set --nopaths. Or to add all subfolders in a package to the path, set --allpaths.

Mpm keeps track of the packages it's downloaded in a file called mpm.mat, within each installation directory.

  • getIntraMPMs()为命名空间PU下的函数,用于获取帧内预测MPM,一共三类:传统预测MPM,多参考行预测MPM,ISP预测MPM,代码和相关注释如下 int PU::getIntraMPMs( const PredictionUnit &pu, unsigned* mpm, const ChannelType &channelType /*= CHANNEL_TYPE_LUMA*/ )

  • MPM(多处理模块) Apache2.x一般常用的有prefork、worker、event三种常用的mpm,查看当前使用模块可以使用httpd -l prefork 这个多路处理模块(MPM)实现了一个非线程型的、预派生的web服务器,这个MPM具有很强的自我调节能力,只需要很少的配置指令调整。最重要的是将MaxClients设置为一个足够大的数值以处理潜在的请求高峰,同时又不能太大,以致需要使

  • MPM(多处理模块) Apache2.x一般常用的有prefork、worker、event三种常用的mpm,查看当前使用模块可以使用httpd -l prefork 这个多路处理模块(MPM)实现了一个非线程型的、预派生的web服务器,这个MPM具有很强的自我调节能力,只需要很少的配置指令调整。最重要的是将MaxClients设置为一个足够大的数值以处理潜在的请求高峰,同时又不能太大,以致需要使

  • Apache 2.X  支持插入式并行处理模块,称为多路处理模块(MPM)。在编译apache时必须选择也只能选择一个MPM,对类UNIX系统,有几个不同的MPM可供选择,它们会影响到apache的速度和可伸缩性。 Prefork MPM : 这个多路处理模块(MPM)实现了一个非线程型的、预派生的web服务器,它的工作方式类似于Apache 1.3。它适合于没有线程安全库,需要避免线程兼容性问题

  • MPM:multi-processing module 多路处理模块 1、prefork:多进程I/O模型,每个进程响应一个请求,CentOS 7 httpd默认模型 一个主进程:生成和回收n个子进程,创建套接字,不响应请求 多个子进程:工作 work进程,每个子进程处理一个请求;系统初始时,预先生成多个空闲进程,等待请求 Prefork MPM预派生模式,有一个主控制进程,然后生成多个子进程,每

  • 一、MPM   MPM(Multi-Processing Module (MPM) implements a hybrid multi-process multi-threaded server)是Apache2引入的一个概念,多路处理模块,就是将结构模块化。把核心任务处理作为一个可插拔的模块,即MPM,使其能针对不同的环境进行优化。在这个情况下,就诞生出了处理模式的概念。处理模式在Unix/Li