This file contains hidden or 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 Classifier{ | |
public static boolean[] stringToBoolean(String s){ | |
boolean[] b = new boolean[s.length()]; | |
for(int i=0; i<s.length(); ++i){ | |
b[i] = (s.charAt(i) == '1'); | |
} | |
return b; | |
} | |
public static void main(String[] args){ |
This file contains hidden or 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.LinkedList; | |
/* | |
Curves: | |
probabilityOfHavingChild(deltaWealth, inflation) | |
wealth/inflation | |
consumptionCurve(deltaWealth, inflation) | |
adolesentConsumptionRequirements | |
adulthoodBetsowment | |
adulthoodYearlyExpense |
This file contains hidden or 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 MiniMagick | |
class Image | |
# Size is in 'WidthxHeight' string format. | |
def resize_and_crop(target_size) | |
target_width, target_height = *target_size.split('x').collect{|x| x.to_f} | |
width, height = self[:width].to_f, self[:height].to_f | |
# If the width or height are already less than the targets | |
# just take the extent -- no resizing nessessary. | |
if width >= target_width && height >= target_height |
This file contains hidden or 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 -v | |
# MASON (http://cs.gmu.edu/~eclab/projects/mason/) has no MAVEN repository, and | |
# is built with Makefiles. Sinec I build MASON simulations in Scala with SBT, | |
# this is inconvienent. This script downloads the latest version of MASON and | |
# its listed dependencies, and places them in the lib directory. I've never been | |
# very clear on licensing issues, so I hope I'm not in violation (and I hope | |
# I'm not stepping on anyone's toes.) If I am, please let me know. | |
# | |
# The most convienent way to run is to CD into your scripts base directory and |
This file contains hidden or 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 -v | |
# A script to make using GeoMASON easier in SBT projects, given lack of a | |
# MAVEN repository. | |
# | |
# See: http://cs.gmu.edu/~eclab/projects/mason/extensions/geomason/ | |
# | |
# The most convienent way to run is to CD into your scripts base directory and | |
# issue the command: | |
# |
This file contains hidden or 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
state | search_vol | unempl_rate | pop_est | avg_cc_debt | avg_score | unemployed | med_inc | |
---|---|---|---|---|---|---|---|---|
Mississippi | 100 | 8.3 | 2991207.0 | 4594 | 610 | 24827018.1 | 39295 | |
Georgia | 64 | 7.7 | 9992167.0 | 5343 | 629 | 76939685.9 | 47527 | |
Alabama | 64 | 6.2 | 4833722.0 | 4817 | 620 | 29969076.400000002 | 43472 | |
West Virginia | 64 | 6.1 | 1854304.0 | 4315 | 625 | 11311254.399999999 | 43124 | |
Louisiana | 62 | 6.3 | 4625470.0 | 4773 | 621 | 29140461.0 | 40296 | |
South Carolina | 61 | 7.1 | 4774839.0 | 5389 | 618 | 33901356.9 | 42661 | |
Arkansas | 60 | 7.5 | 2959373.0 | 4535 | 619 | 22195297.5 | 40591 | |
Florida | 60 | 6.4 | 19552860.0 | 4861 | 639 | 125138304.0 | 46059 | |
Kentucky | 59 | 8.2 | 4395295.0 | 4436 | 629 | 36041419.0 | 40887 |
This file contains hidden or 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
<html> | |
<head> | |
<title>External Access for GMU Library Resources</title> | |
</head> | |
<body> | |
<a href="javascript:(function() {window.location = 'http://mutex.gmu.edu/login?url=' + window.location; | |
})();">MASONify</a> Bookmarklet | |
</body> | |
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
# Requested gist of code to produce: | |
# https://www.scribd.com/doc/271871142/Julia-Type-Hierarchy | |
# | |
# I just redirected the output to a dot file, then executed: | |
# dot -Tpdf julia.dot -o julia.pdf | |
function print_type_tree(t, parent=Any, seen=Set{DataType}()) | |
# Avoid redundant edges. | |
t ∈ seen && return | |
push!(seen, t) | |
OlderNewer