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 A = edelman | |
%EDELMAN Alan Edelman's matrix for which det is computed as the wrong integer. | |
% A = EDELMAN is a 27-by-27 matrix of 1s and -1s for which the | |
% MATLAB det function returns an odd integer, though the exact | |
% determinant is an even integer. | |
A = [% | |
1 1 1 1 -1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 | |
1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 1 1 1 | |
-1 1 -1 -1 1 1 1 1 1 -1 1 -1 1 1 1 1 -1 -1 1 -1 -1 1 1 -1 1 1 -1 |
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
# This file is a naive implementation of numbers of the form x + y*i where i^2 = p | |
####################### | |
# GeneralComplex type # | |
####################### | |
immutable GeneralComplex{p,T} <: Number | |
x::T | |
y::T | |
end |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
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
module LC | |
const MC = 384 | |
const KC = 384 | |
const NC = 4096 | |
const MR = 4 | |
const NR = 4 | |
const _A = Array(Float64, MC*KC) |
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
{ | |
"metadata": { | |
"language": "Julia", | |
"name": "", | |
"signature": "sha256:e7ef81d627c67af3ba8c90108dc2bc0f6f44f1a0e36cb9235cccecb3b07d7494" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ |
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 | |
# usage: nbgrep 'pattern' | |
SEARCHPATH=~/work/ | |
# 'jq' technique lifted with gratitude | |
# from https://gist.github.com/mlgill/5c55253a3bc84a96addf | |
# Break on newlines instead of any whitespace |
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
julia> using Quandl, TextPlots | |
julia> bt = quandl("BAVERAGE/USD", rows=1000) | |
1000x5 TimeArray{Float64,2} 2011-08-25 to 2014-05-23 | |
24h Average Ask Bid Last Total Volume | |
2011-08-25 | 10.01 NaN NaN NaN 55547.42 | |
2011-08-26 | 8.65 NaN NaN NaN 83026.56 | |
2011-08-27 | 8.63 NaN NaN NaN 22010.04 | |
2011-08-28 | 8.97 NaN NaN NaN 24159.85 |
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
\usepackage{inconsolata} % very nice fixed-width font included with texlive-full | |
\usepackage[usenames,dvipsnames]{color} % more flexible names for syntax highlighting colors | |
\usepackage{listings} | |
\lstset{ | |
basicstyle=\ttfamily, | |
columns=fullflexible, % make sure to use fixed-width font, CM typewriter is NOT fixed width | |
numbers=left, | |
numberstyle=\small\ttfamily\color{Gray}, | |
stepnumber=1, |
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/local/Gambit-C/bin/gsi | |
; Copyright (C) 2004 by Marc Feeley, All Rights Reserved. | |
; This is the "90 minute Scheme to C compiler" presented at the | |
; Montreal Scheme/Lisp User Group on October 20, 2004. | |
; Usage with Gambit-C 4.0: | |
; | |
; % ./90-min-scc.scm test.scm |