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
// | |
// CopyDrawView.swift | |
// eyeTrainTest2 | |
// | |
// Created by Jason Feng on 2/25/15. | |
// Copyright (c) 2015 edu.dartmouth.dali. All rights reserved. | |
// | |
import Foundation | |
import QuartzCore |
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 pprint | |
# Returns a row in a given column | |
def column(matrix, i): | |
return [row[i] for row in matrix] | |
# Checks if a given row or column has all of the same value | |
def check(list): | |
if len(set(list)) <= 1: | |
if list[0] != 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
## Turns list of dartmouth emails into formatted emails with first and last name | |
f = open("names.txt") | |
o = open("names_edit.txt", 'w') | |
for email in f.readlines(): | |
email = email.strip() | |
email = email[:-1] # Remove semicolon | |
bracket_email = "<" + email + ">" # Now its like <jason.s.feng.17@dartmouth.edu> | |
at_index = email.rfind("@") | |
name = email[0:at_index-3] # get just the jason.s.feng |
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 | |
protected_branch='master' | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
if [ $protected_branch = $current_branch ] | |
then | |
read -p "You're about to push master, is that what you intended? [y|n] " -n 1 -r < /dev/tty | |
echo | |
if echo $REPLY | grep -E '^[Yy]$' > /dev/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
#!/bin/bash | |
npm run lint:all | |
# This command could look something like this: `eslint **.js` |