Skip to content

Instantly share code, notes, and snippets.

@munthe
munthe / nwxpython.py
Last active January 30, 2025 17:49 — forked from shobhit/nwxpython.py
Put Images as Nodes using Networkx and Python
import networkx as nx
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import glob
from numpy import sqrt
import glob
path = ''
files = [f for f in glob.glob(path + "*.jpg")]
img = []
@munthe
munthe / emotions_from_openface.py
Created March 24, 2019 14:28
Convert AUs from OpenFace FeatureExtraction to emotions using model from wikipedia.
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pylab as plt
@munthe
munthe / gist:8418da9a338a14d1ab22
Created November 4, 2014 09:51
Matlab style for listing in latex
% Include matlab code and style it
\usepackage{listings}
\lstset{extendedchars=true,
basicstyle=\ttfamily,
keywordstyle=\normalfont\bfseries, columns=flexible,
numbers=left,
breaklines=true,
numberstyle=\tiny,
breakatwhitespace=true,
language=Matlab}
@munthe
munthe / ex1.m
Last active August 29, 2015 13:58
Modellering af fysiologiskesystemer, Home Assginment II
% Home assignment II, exercise 1: Lyapunov exponents
%
% Emil Munthe, 7. April 2014
%
function [] = ex1(a)
%% Init
if nargin < 1, a = 0.2; end
t = linspace(0, 50, 1500);
yzero = [0.1 0 0];