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.io.IOException; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.PreparedStatement; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.sql.Savepoint; | |
import java.util.Random; | |
public class Example { |
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
# Dependencies: | |
# > brew install watch markdown | |
# Usage: | |
# > bash automarkdown.sh Readme.md | |
MDFILE=/tmp/preview.html | |
touch $MDFILE && open $MDFILE | |
watch "markdown $@ > $MDFILE && osascript -e 'if application \"Safari\" is running then |
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 = """ | |
6,66 | |
5,88 | |
2,33 | |
5,85 | |
5,68 | |
6,15 | |
5,98 | |
6,96 | |
4,33 |
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$newCol = convertDots(table$oldCol) | |
convertDots <- function(x) { | |
x[x == "."] <- NA; | |
y <- as.numeric(x); | |
y[is.na(y)] <- 0; | |
y | |
} |
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 check(arr): | |
return arr[0] + 13 * arr[1] / float(arr[2]) + arr[3] + 12 * arr[4] - arr[5] - 11 + arr[6] * arr[7] / float(arr[8]) - 10 == 66 | |
import random | |
arr = range(1,10) | |
while not check(arr): | |
random.shuffle(arr) |
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 os, random, datetime | |
from PIL import Image, ImageDraw, ImageFont | |
from AppKit import NSScreen | |
now = datetime.datetime.now() | |
then = datetime.datetime(2015,03,19) | |
days = abs((then - now).days) | |
fname = "countdown%d.png" % random.randint(0,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
<style> | |
#username { | |
float: right; | |
margin-right: 100px; | |
} | |
#files { | |
clear: right; | |
width: 20%; | |
float: left; |
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
# git clone https://github.com/insieme/insieme.git | |
# Build | |
sudo apt-get install pkg-config | |
sudo apt-get install gcc-multilib | |
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu | |
# Documentation | |
sudo apt-get install texlive |
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
%IntArray = type { i32, i32* } | |
@a = global %IntArray { i32 0, i32* null} | |
define i32 @main() { | |
%size = add i32 0, 3 | |
%arr = alloca i32, i32 %size | |
%arr_ins = insertvalue %IntArray undef, i32 %size, 0 | |
%arr_ins2 = insertvalue %IntArray %arr_ins, i32* %arr, 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
curl http://www.marioprincipe.com/oldsite/media/portfolio/portfolio/makingof/m12_2.flv -o m12_2.flv |