This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function alpha=kriAlpha(data,scale) | |
% alpha=kriAlpha(data,scale) | |
% calculates Krippendorff's Alpha as a measure of inter-rater agreement | |
% data: rate matrix, each row is a rater or coder, each column is a case | |
% scale: level of measurement, supported are 'nominal', 'ordinal', 'interval' | |
% missing values have to be coded as NaN or inf | |
% For details about Krippendorff's Alpha see: | |
% http://en.wikipedia.org/wiki/Krippendorff%27s_Alpha | |
% Hayes, Andrew F. & Krippendorff, Klaus (2007). Answering the call for a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yalmip('clear') | |
T = [0 1 0 1; 1 0 1 0; 0 1 0 1; 1 0 1 0]; | |
x = sdpvar(4, 1); | |
y = sdpvar(4, 1); | |
assign(x, randn(4, 1)); | |
assign(y, randn(4, 1)); | |
const = [x'*x <= 1; y'*y <=1]; | |
% const = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import time, random | |
import math | |
from collections import deque | |
start = time.time() | |
class RealtimePlot: | |
def __init__(self, axes, max_entries = 100): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import operator | |
import threading | |
from functools import reduce | |
import keras | |
import keras.backend as K | |
from keras.engine import Model | |
import numpy as np | |
import tensorflow as tf | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tf_pca(x): | |
''' | |
Compute PCA on the bottom two dimensions of x, | |
eg assuming dims = [..., observations, features] | |
''' | |
# Center | |
x -= tf.reduce_mean(x, -2, keepdims=True) | |
# Currently, the GPU implementation of SVD is awful. | |
# It is slower than moving data back to CPU to SVD there |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\w\$(parse_git_branch) $ " | |
export EDITOR="atom -w" | |
export PATH=/usr/local/bin:$PATH | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.axis { | |
font-family: sans-serif; | |
fill: #d35400; | |
font-size: 12px; | |
} | |
.line { | |
fill: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Table of contents | |
–––––––––––––––––––––––––––––––––––––––––––––––––– | |
- Plotly.js | |
- Grid | |
- Base Styles | |
- Typography | |
- Links | |
- Buttons | |
- Forms | |
- Lists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is a yet another download script for the cmu arctic speech corpus. | |
# The corpus will be downloaded in $HOME/data/cmu_arctic/ | |
location=$HOME/data/cmu_arctic/ | |
if [ ! -e $location ] | |
then | |
echo "Create " $location |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer