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
package hiam.polyjson; | |
import com.fasterxml.jackson.annotation.JsonSubTypes; | |
import com.fasterxml.jackson.annotation.JsonTypeInfo; | |
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") | |
@JsonSubTypes({@JsonSubTypes.Type(Dog.class), @JsonSubTypes.Type(Cat.class)}) | |
public abstract class Animal { | |
} |
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
10 10 | |
5 | |
3 0 | |
3 1 | |
3 2 | |
4 1 | |
5 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
__author__ = 'hiam20' | |
import time | |
import collections | |
import threading | |
import concurrent.futures | |
INSTANTIATION_TIME = 0.5 | |
EXECUTION_TIME = 0.002 |
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
*.pbxproj -crlf -diff -merge |
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
# Update your login script with some defaults | |
touch ~/.profile | |
chmod +x ~/.profile | |
echo "module load python/2.7.2" >> ~/.profile | |
echo "export PATH=$PATH:~/.local/bin" >> ~/.profile | |
~/.profile | |
# Install setup-tools locally |
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
public class TestArrayListRemove { | |
public void testArrayListRemove() { | |
// First lets create an ArrayList contain some words that are awesome. | |
ArrayList<String> coolWords = new ArrayList<String>(); | |
coolWords.add("Discombobulated"); | |
coolWords.add("Shananigans"); | |
coolWords.add("Fluffalufapotamus"); |
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.Random; | |
import static java.text.MessageFormat.format; | |
/** | |
* http://www.reddit.com/r/dailyprogrammer/comments/10pf0j/9302012_challenge_102_easy_dice_roller/ | |
*/ | |
public class Main { | |
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
# A quick demo of how to produce a loglog histogram plot of very large | |
# amounts of data, by using log-histogram bins | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import itertools as it | |
# We shall draw millions of samples from a Zipf distribution. Using linear | |
# bins this is too much data for a fast and attactive plot. |