Skip to content

Instantly share code, notes, and snippets.

@hagenw
hagenw / pip-error.log
Last active Apr 10, 2018
pip error (pypa/pip/#4935)
View pip-error.log
Created temporary directory: /tmp/pip-install-jd1y17b6
Collecting git+https://github.com/hagenw/sphinxcontrib-katex@math_numfig
Created temporary directory: /tmp/pip-req-build-tyoiow_a
Cloning https://github.com/hagenw/sphinxcontrib-katex (to revision math_numfig) to ./pip-req-build-tyoiow_a
Running command git clone -q https://github.com/hagenw/sphinxcontrib-katex /tmp/pip-req-build-tyoiow_a
Running command git show-ref math_numfig
14ec302f3b73b0a4e177617ab72c3881fa786a74 refs/remotes/origin/math_numfig
Running command git rev-parse HEAD
f4aaf369b0b932a801aa26e1a311add0784624bf
Running command git fetch -q https://github.com/hagenw/sphinxcontrib-katex 14ec302f3b73b0a4e177617ab72c3881fa786a74
@hagenw
hagenw / katex_align.html
Last active Nov 24, 2017
Highlighting a problem with the aligned environment in KaTeX (https://github.com/Khan/KaTeX/issues/985)
View katex_align.html
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0-alpha1/katex.min.css" type="text/css" />
</head>
@hagenw
hagenw / install_python_matlab_engine.sh
Created Sep 28, 2017
Install Matlab Engine API for python without root permissions
View install_python_matlab_engine.sh
#!/bin/bash
# Go to $MATLABROOT/extern/engines/python and run the following line to build the python engine without root permissions.
# See https://uk.mathworks.com/help/matlab/matlab_external/install-matlab-engine-api-for-python-in-nondefault-locations.html
python setup.py build --build-base=$HOME/tmp/build install
@hagenw
hagenw / install_zopflipng.sh
Created Sep 14, 2017
Install the lossless png compressor zopflipng
View install_zopflipng.sh
#!/bin/bash
git clone https://github.com/google/zopfli.git
cd zopfli/
make zopflipng
View requirements.txt
-e git+https://github.com/sfstoolbox/sfs-documentation-theme.git#egg=SfsDoc
View fire_blossom.wxm
load(draw);
draw_polar(expr,range) :=
block([theta_var: range[1]],
draw2d(background_color = black,
xtics = 'none,
ytics = 'none,
axis_top = false,
axis_bottom = false,
axis_left = false,
@hagenw
hagenw / narginchk.m
Last active Dec 17, 2015
narginchk() for Matlab <2011b
View narginchk.m
function narginchk(minargs, maxargs)
if (nargin ~= 2)
error('%s: Usage: narginchk(minargs, maxargs)',upper(mfilename));
elseif (~isnumeric (minargs) || ~isscalar (minargs))
error ('minargs must be a numeric scalar');
elseif (~isnumeric (maxargs) || ~isscalar (maxargs))
error ('maxargs must be a numeric scalar');
elseif (minargs > maxargs)
error ('minargs cannot be larger than maxargs')