I hereby claim:
- I am gsingh93 on github.
- I am gsingh93 (https://keybase.io/gsingh93) on keybase.
- I have a public key whose fingerprint is B879 539A 0D22 4163 A943 346C 98BE 0440 7ADF 94FB
To claim this, I am signing this object:
| #!/bin/bash | |
| prog1=$1 | |
| prog2=$2 | |
| num_times=${3:-10} | |
| calculate_mean() { | |
| sum=0 | |
| for n in $@; do | |
| sum=$(($sum+$n)) |
| #!/usr/bin/python2 | |
| import sys | |
| import select | |
| import socket | |
| import struct | |
| port = 443 | |
| TLS_ALERT = 21 |
I hereby claim:
To claim this, I am signing this object:
| use std::fmt::Show; | |
| use std::default::Default; | |
| use std::ops::Add; | |
| struct SegmentTree<T> { | |
| size: uint, | |
| root: Node<T> | |
| } | |
| struct Node<T> { |
| -- Problem set: http://www.seas.upenn.edu/~cis194/hw/01-intro.pdf | |
| -- I wonder how I'd define this without toDigitsRev... | |
| toDigits :: Integer -> [Integer] | |
| toDigits x = reverse $ toDigitsRev x | |
| toDigitsRev :: Integer -> [Integer] | |
| toDigitsRev x | x <= 0 = [] | |
| toDigitsRev x = x `mod` 10 : toDigitsRev (x `div` 10) |
| import Graphics.Input.Field as Field | |
| import Graphics.Input as Input | |
| import Http | |
| import String | |
| import Text | |
| import Window | |
| main : Signal Element | |
| main = merge ui <| asText <~ getLogin redirect |
| (require 'whitespace) | |
| (defun toggle-lines-tail () | |
| (interactive) | |
| (let ((vic (member 'lines-tail whitespace-style))) | |
| (progn | |
| (if vic | |
| (setq whitespace-style (delete 'lines-tail whitespace-style)) | |
| (add-to-list 'whitespace-style 'lines-tail)) | |
| (message "%s" whitespace-style)))) |
| #!/bin/bash | |
| # A script to log cpu usage, memory usage, and temperature usage | |
| # TODO: | |
| # | |
| # Log temp awk is not portable | |
| # Validate interval | |
| # |
| #!/bin/bash | |
| # This script finds three types of Git repos | |
| # 1. Repos that have a dirty index or uncommitted changes | |
| # 2. Repos that have committed changes that aren't pushed to the remote branch | |
| # 3. Repos that have no remote branch | |
| # | |
| # Type 2 only works with the master branch, and the others only work with the branch the repo is currently on | |
| depth=3 |
| use std::io; | |
| use std::str::FromStr; | |
| use std::num::Float; | |
| // http://codeforces.com/contest/1/problem/A | |
| fn main() { | |
| let l = io::stdin().read_line().unwrap(); | |
| // We need the .trim() because of the newline. Annoying | |
| // Can't do it on one line because of lifetime error. Also annoying. | |
| let l = l.trim(); |