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
args <- commandArgs(trailingOnly = TRUE) | |
file_name <- args[1] | |
library('ggplot2') | |
data_df <- read.csv(file_name, header=TRUE) | |
plot <- ggplot(data_df, aes(x=X0, y=X1)) + geom_point(aes(color=class)) | |
# Remove ticks marks from plot | |
plot + scale_y_discrete(breaks=NULL) + scale_x_discrete(breaks=NULL) |
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
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(12,11,5,4,3,2); | |
const int sensorPin = A0; | |
const int messageBufferSize = 17; | |
char messageBuffer[17]; | |
void read_serial() | |
{ | |
char inputChar = -1; |
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 time | |
import notify2 | |
from abc import ABCMeta | |
from jenkinsapi.jenkins import Jenkins | |
class JenkinsPoller(): | |
__metaclass__ = ABCMeta |
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
const int* p; // the thing pointed to is const, you can change the value of p | |
int const *q; // same as p | |
int * const r; // the pointer is const, but the thing pointed to can change value | |
int const * const s; // the pointer is const and the thing pointed to is const |
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 numpy as np | |
def findSequence(x, delta_x, start=0): | |
string = "" | |
if len(x) == 1: return str(x[0]) + ',' | |
if len(x) == 2: return str(x[0]) + ',' + str(x[1]) + ',' | |
while (start<delta_x.size-1): | |
end = start+1 |
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
def timed(f): | |
import cProfile, pstats, StringIO | |
def wrap(*args): | |
#start profiling | |
pr = cProfile.Profile() | |
pr.enable() | |
#execute function | |
ret = f(*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
5.1,3.5,1.4,0.2,Iris-setosa | |
4.9,3.0,1.4,0.2,Iris-setosa | |
4.7,3.2,1.3,0.2,Iris-setosa | |
4.6,3.1,1.5,0.2,Iris-setosa | |
5.0,3.6,1.4,0.2,Iris-setosa | |
5.4,3.9,1.7,0.4,Iris-setosa | |
4.6,3.4,1.4,0.3,Iris-setosa | |
5.0,3.4,1.5,0.2,Iris-setosa | |
4.4,2.9,1.4,0.2,Iris-setosa | |
4.9,3.1,1.5,0.1,Iris-setosa |
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
{ | |
"email": "[email protected]", | |
"password": "yourpasswordhere", | |
"server": "smtp.gmail.com", | |
"port": 587 | |
} |
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
#!/usr/bin/env python | |
################################################ | |
# Sieve Of Eratosthenes | |
# Implementation the sieve of eratosthenes for | |
# finding all prime numbers up to a given limit | |
# Author: Samuel Jackson ([email protected]) | |
# Date: 4/8/13 | |
################################################ |
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
function foo() { | |
return { | |
bar : "Hello World!" | |
} | |
} | |
function foo2() | |
{ | |
return | |
{ |