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 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 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 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 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 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 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
"""Showing the cool stuff which functools does""" | |
import functools | |
def print_shit(f): | |
"""Because Sam, you need to learn why decorators are sexy. | |
Plus, functool.wraps() is a _very_ important tool, yo | |
""" | |
@functools.wraps(f) | |
def inner(*args, **kwargs): |
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
#!/bin/bash | |
usage="$(basename "$0") [-h] <n> <commit-message> -- revert back n pull requests | |
where: | |
-h show this help text" | |
while getopts ':h:' option; do | |
case "$option" in | |
h) echo "$usage" | |
exit |
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
Module | Name | Grade | |
---|---|---|---|
CS10110 | Introduction To Computer Hardware, Operating Systems And Unix Tools | 87.0 | |
CS10410 | The Mathematics Driving License For Computer Science | 95.0 | |
CS12130 | Concepts In Programming | 87.0 | |
PH19510 | Chaos, Communications And Consciousness | 90.0 | |
CS12420 | Software Development | 91.0 | |
CS15020 | Web Development Tools | 94.0 | |
CS15210 | An Introduction To Communications And Telematics | 66.0 | |
CS18010 | Professional And Personal Development | 71.0 | |
CS20410 | The Advanced Mathematics Driving License For Computer Science | 70.0 |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
use File::Find::Rule; | |
#Perl script for combining sub directories of text files | |
GetOptions('recursive' => \my $isRecursive, |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my @carpet; | |
my $total; | |
carpet(2); | |
foreach my $row(@carpet){ |
OlderNewer