Skip to content

Instantly share code, notes, and snippets.

View jdavis's full-sized avatar
💾

Josh Davis jdavis

💾
View GitHub Profile
@jdavis
jdavis / keybase.md
Last active August 29, 2015 14:01
Keybase.io Verification

Keybase proof

I hereby claim:

  • I am jdavis on github.
  • I am davis (https://keybase.io/davis) on keybase.
  • I have a public key whose fingerprint is 2FCA 80FF 5F48 C64E E32D 1180 E3BE E893 B4C2 E990

To claim this, I am signing this object:

@jdavis
jdavis / neovim-june-06
Last active August 29, 2015 14:02
Statistics of Neovim Git repo using gitinspector on June 06
The following historical commit information, by author, was found in the
repository:
Author Commits Insertions Deletions % of changes
Alexander Bolodurin 2 0 144 0.02
Cameron Eagans 2 16 0 0.00
Chris Watkins 6 221 605 0.13
Christian Wellenbroc 1 10 10 0.00
Dane Summers 1 7 5 0.00
David Z. Chen 3 10592 4159 2.24
Provides: {'do_something': <function do_something at 0x102f217d0>, 'do_something_else': <function strange_function_name at 0x102f2b8c0>}
Keybindings: {'t[2, 1]': <function command_t at 0x102f2b9b0>}
do something
doing something else 1337
@jdavis
jdavis / puzzle.py
Created March 31, 2015 20:43
Python Functional Puzzle
def cons(x, y):
return lambda f: f(x, y)
def car(x):
# Fill out this function
pass
if car(cons(1, 5)) == 1:
print 'Solved!'
else:
@jdavis
jdavis / solution.pdf
Last active December 14, 2015 21:49
Homework #4 for Computer Science 331 - Theory of Computing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdavis
jdavis / ternary.c
Created April 11, 2013 05:18
Code sample showing the wonkiness of the precedence of the ternary statement in C.
#include <stdio.h>
char identity(char x);
int main(int argc, const char *argv[]) {
int compound;
printf("For reference:\n");
printf(" the ASCII value of %c is %d\n", ';', ';');
printf(" the ASCII value of %c is %d\n", '}', '}');
@jdavis
jdavis / adapter.py
Created April 17, 2013 12:03
Example of the Adapter Design Pattern in glorious Python code.
"""
Example of the Adapter Design Pattern
"""
class RocketShip(object):
def turnOn(self):
raise NotImplementedError()
@jdavis
jdavis / Project2Tests.sh
Last active December 16, 2015 11:29
Set of simple tests for the second project of Computer Science 352 at Iowa State University.
#!/usr/bin/env sh
#
# Project 2 Tests
# Josh Davis
#
# Overview:
# A few quick and crude tests for project 2.
#
# Running:
# To run it, make sure it has the right permissions:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdavis
jdavis / AREADME.md
Last active December 28, 2015 17:59

CS311 Homework 6 Tests

Downloading

To use these tests, just use Git and clone them into the directory you have your project.

You can do this using: