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 svfilter(cutoff, Q) | |
% lowpass | |
[lpf_b, lpf_b] = fir1(10, cutoff, 'low'); | |
% highpass | |
[hpf_b, hpf_b] = fir1(10, cutoff, 'high'); | |
% bandpass | |
% For bandpass coefficients, the order is half of the passed in order parameter (has to be an even order beacuse of poles and zeroes) |
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 java.util.HashMap; | |
HashMap<Integer, Boolean> CodedKeys = new HashMap<Integer, Boolean>(); | |
HashMap<Character, Boolean> CharKeys = new HashMap<Character, Boolean>(); | |
void keyPressed() { | |
if (key == CODED) { | |
CodedKeys.put(keyCode, true); | |
} else { | |
CharKeys.put(key, true); |
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
using UnityEngine; | |
using IEnumerator=System.Collections.IEnumerator; | |
[RequireComponent(typeof(MeshRenderer))] | |
[RequireComponent(typeof(MeshFilter))] | |
[ExecuteInEditMode] | |
public class DrawTerrain : MonoBehaviour | |
{ | |
public int rows = 3; | |
public int columns = 3; |
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
*.meta -diff | |
*.asset -diff | |
*.unity -diff |
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
/// <summary> | |
/// Struct representing a 2D integral point. | |
/// Has GetHashCode and Equals methods, so you can use this in a | |
/// dictionary for sparse coordinate maps and other collections. | |
/// | |
/// Supports addition and subtraction. | |
/// | |
/// Point p0 = new Point(3, 4); | |
/// Point p1 = new Point(-5, 6); | |
/// Point p3 = p1 - p0; // => [-8, 2] |
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
"""mgeutils module | |
Decorators and convenience functions for using mongoengine | |
""" | |
from __future__ import unicode_literals | |
from __future__ import absolute_import | |
from __future__ import print_function | |
from __future__ import division | |
import logging |
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
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.IO; | |
using System.Text; | |
/// <summary> | |
/// Bare minimum wrapper for UnityEngine.WWW. | |
/// |
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
using System; | |
using System.Collections.Generic; | |
public static class ListExtensions | |
{ | |
public static TList Populate<TList, TElem>(this TList list, TElem defaultValue) where TList : IList<TElem> | |
{ | |
for (int i = 0; i < list.Count; i++) { | |
list[i] = defaultValue; | |
} |
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
namespace Eppy | |
{ | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class MultiArray2D<T> : IEnumerable<T>, IEnumerable | |
{ | |
public int Width { get; private set; } | |
public int Height { get; private set; } |
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
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install python3 2>&1 | |
==> Downloading http://python.org/ftp/python/3.3.1/Python-3.3.1.tar.bz2 | |
Already downloaded: /Users/michaelbartnett/Library/Caches/Homebrew/python3-3.3.1.tar.bz2 | |
tar xf /Users/michaelbartnett/Library/Caches/Homebrew/python3-3.3.1.tar.bz2 | |
==> ./configure --prefix=/usr/local/Cellar/python3/3.3.1 --enable-ipv6 --datarootdir=/usr/local/Cellar/python3/3.3.1/share --datadir=/usr/local/Cellar/python3/3.3.1/share --enable-framework=/usr/local/Cellar/python3/3.3.1/Frameworks | |
./configure --prefix=/usr/local/Cellar/python3/3.3.1 --enable-ipv6 --datarootdir=/usr/local/Cellar/python3/3.3.1/share --datadir=/usr/local/Cellar/python3/3.3.1/share --enable-framework=/usr/local/Cellar/python3/3.3.1/Frameworks | |
checking build system type... x86_64-apple-darwin10.8.0 | |
checking host system type... x86_64-apple-darwin10.8.0 | |
checking for --enable-universalsdk... no | |
checking for --with-universal-archs... 32-bit |