- Ways Men in Tech are Unintentionally Sexist
- Trouble at the Koolaid Point (on Wired)
- The Other Side of Diversity
- Unconcious Bias at Work
- What Men (and Everyone, Really) Can Do To Support Gender Equity in Tech
- So You Want To Be An Ally
- Feminism: How to Be A (Male) Ally
- [Tools for White Guys who are Working for Social Change… and other people socialized in a society based on domination](http://www.xyonline.net/content/to
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 | |
# Given a file, output a sorted list of unique items with the number of occurrences for each item next to it | |
fname=$1 | |
cat $fname | sort | uniq -c | |
exit 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
public char[] getFileContents(File file) { | |
// char array to store the file contents in | |
char[] contents = null; | |
try { | |
// Read in the contents line by line storing them in a StringBuffer | |
BufferedReader br = new BufferedReader(new FileReader(file)); | |
StringBuffer sb = new StringBuffer(); | |
String line = ""; |
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
public CompilationUnit createParser(char[] contents) { | |
// Create the ASTParser which will be a CompilationUnit | |
ASTParser parser = ASTParser.newParser(AST.JLS4); | |
parser.setKind(ASTParser.K_COMPILATION_UNIT); | |
parser.setSource(contents); | |
parser.setResolveBindings(true); | |
CompilationUnit parse = (CompilationUnit) parser.createAST(null); | |
return parse; |
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
cat rsvpresults.yaml | grep 'totalPeople' | sed 's/totalPeople: //' | awk '{s+=$1} END {print s}' |
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 | |
import sys | |
# add the offending text to file1.txt | |
f = open("file1.txt", 'r') | |
content = f.read() | |
contentArray = content.split('<br />') | |
for item in contentArray: | |
print item | |
# then copy/paste the console output |
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 | |
""" | |
validate_directory: string -> string | |
given a string that represents a directory, this function will go through and | |
do some basic validation on it. If there is a problem with the directory as | |
given, it will be converted to the home directory and returned as is. | |
""" | |
def validate_directory(directory=None): | |
if directory == None or directory == '~' or not os.path.isdir(directory): |
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
TYPE | |
StrSet = set(str) | |
StrLifted = lift(StrSet) | |
State = Var -> StrLifted | |
PROBLEM Constant_Propagation | |
direction : forward | |
carrier : State |
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
/* | |
* Write a method Max that takes two integer parameters and returns | |
* their maximum. Add appropriate annotations and make sure your code | |
* verifies. | |
*/ | |
method Max(a: int, b:int) returns (c: int) | |
ensures c >= a && c >= b; | |
{ | |
if (a > b) { | |
return a; |
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
/* | |
* Using a precondition, change Abs to say it can only be | |
* called on negative values. Simplify the body of Abs into | |
* just one return statement and make sure the method still | |
* verifies. | |
*/ | |
method Abs(x: int) returns (y: int) | |
requires 0 > x; | |
ensures 0 <= y; | |
ensures 0 <= x ==> x == y; |