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
~/workspace/pset6/ (master) $ python ./crack.py 50WUNAFdX/yjA | |
Yale | |
~/workspace/pset6/ (master) $ python ./crack.py 50.jPgLzVirkc | |
hi | |
~/workspace/pset6/ (master) $ python ./crack.py 50YHuxoCN9Jkc | |
JH | |
~/workspace/pset6/ (master) $ python ./crack.py 50QvlJWn2qJGE | |
NOPE | |
~/workspace/pset6/ (master) $ python ./crack.py 50CPlMDLT06yY | |
ha |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
typedef uint8_t BYTE; // rename to BYTE for clarity. | |
int main(int argc, char *argv[]) | |
{ | |
unsigned char *buffer; // Initialize buffer ptr for later malloc. | |
char *newimgfile; // Initialize filename ptr for later malloc. |
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
/* | |
* | |
* Resize a BMP by given 'resize val'. | |
* | |
* Arugments: | |
* resize_val: An integer to resize the BMP by. (Must be between 0 - 100) | |
* infile: BMP File to read. | |
* outfile: File to create as the resized BMP. | |
* | |
* Usage: ./resize resizevalue infile outfile |
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/python | |
def calcEasterDate(year): | |
""" | |
Use easter date algorithm to calculate the day of | |
easter for a given year. | |
If the year given is in a special range(special_years) | |
then subtract 7 from the final date. | |
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/python | |
""" | |
How to think like a computer scientist | |
Exercise: Approximating the value of Pi with Turtles! | |
Author: Adrian Arumugam | |
Date: 2016-01-10 |
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
/** | |
* fifteen.c | |
* | |
* Computer Science 50 | |
* Problem Set 3 | |
* | |
* Author: Adrian Arumugam([email protected]) | |
* Date: 2016-12-13 | |
* | |
* Implements Game of Fifteen (generalized to d x d). |
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
package main | |
import "fmt" | |
// fibonacci is a function that returns | |
// a function that returns an int. | |
// | |
// (aru): I don't believe this is a true closure either? | |
// or if it is...that it is more complex than it needs to be. | |
func fibonacci_naive() func(int) int { |
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
package main | |
import "fmt" | |
import "math" | |
// fibonacci is a function that returns | |
// a function that returns an int. | |
func fibonacci() func(int) int { | |
return func(x int) int { | |
// Use the Golden ratio formula to calculate the fibonacci value given an integer |
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
package main | |
import ( | |
"golang.org/x/tour/wc" | |
"strings" | |
) | |
// Implement WordCount. It should return a map of the counts of each “word” in the string s. | |
// The wc.Test function runs a test suite against the provided function and prints success or failure. | |
func WordCount(s string) map[string]int { |
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
/* | |
CS50x: Implementation of Caesar Cipher. | |
Usage: | |
./caesar <key-value> | |
Args: | |
key-value: A positive integer |
NewerOlder