{{ message }}

Instantly share code, notes, and snippets.

# Allan L. R. Hansen AllanLRH

• Copenhagen, Denmark
Last active Jun 1, 2021
Efficient matrix multiplication
View Matrix.md

# High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

## Intro

Matrix multiplication is a mathematical operation that defines the product of

anonymous / pca_animation.m
Created Jan 26, 2017
Matlab code to produce PCA animations
View pca_animation.m
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Matlab code to produce PCA animations shown here: % http://stats.stackexchange.com/questions/2691 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Static image clear all rng(42)
Last active Oct 5, 2017
 ## How to Use: from radar import radar_graph labels = ['v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'v7', 'v8', 'v9'] values = [1, 1, 2, 7, 4, 0, 3, 10, 6] optimum = [5, 3, 2, 4, 5, 7, 5, 8, 5] radar_graph(labels, values, optimum)
Last active Jun 11, 2021
Creating GIFs from .MOV files in OSX using FFmpeg and ImageMagick
View OSX-Convert-MOV-GIF.md

# Convert MOV to GIF using FFmpeg and ImageMagick

I tried a few different techniques to make a GIF via command-line and the following gives me the best control of quality and size. Once you're all setup, you'll be pumping out GIFs in no time!

## Preparation

Install FFmpeg

• \$ brew install ffmpeg [all your options]
• Example: \$ brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools

Install ImageMagick

Last active Feb 10, 2021
git pre-commit hook for stripping output from IPython notebooks
View nbstripout
 #!/usr/bin/env python """strip outputs from an IPython Notebook Opens a notebook, strips its output, and writes the outputless version to the original file. Useful mainly as a git filter or pre-commit hook for users who don't want to track output in VCS. This does mostly the same thing as the `Clear All Output` command in the notebook UI. LICENSE: Public Domain