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
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/kraks/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
#ZSH_THEME="robbyrussell" | |
ZSH_THEME="mytheme" |
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
-- Homework 2 | |
-- Abstract transfer function for unsigned subtraction for | |
-- 4-bit abstract values in the interval abstract domain | |
-- run command: `ghci question4.hs` | |
import Data.List | |
import Prelude hiding (subtract) | |
type Interval = (Integer, 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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
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
#lang racket/base | |
;; Monads in Racket, including polymorphic bind, return and fail. | |
;; Haskell-like do-notation. | |
(provide define-monad-class | |
(struct-out monad-class) | |
monad? | |
gen:monad | |
monad->monad-class | |
determine-monad |
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
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
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
fun compare(xs: int list, f: int * int -> int) = | |
if length xs = 2 | |
then f(hd xs, hd(tl xs)) | |
else f(hd xs, compare(tl xs, f)) | |
fun max(x: int, y: int) = | |
if x < y | |
then y | |
else x |
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/env python | |
# find an LCS (Longest Common Subsequence). | |
# *public domain* | |
def find_lcs_len(s1, s2): | |
m = [ [ 0 for x in s2 ] for y in s1 ] | |
for p1 in range(len(s1)): | |
for p2 in range(len(s2)): | |
if s1[p1] == s2[p2]: | |
if p1 == 0 or p2 == 0: |
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
/* convert argv into a list | |
*/ | |
#include <iostream> | |
#include <string> | |
#include <list> | |
#include <vector> | |
using namespace std; |
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
/* A simple Read–eval–print-loop example | |
*/ | |
#include <iostream> | |
#include <string> | |
#include <cstdlib> | |
using namespace std; | |
int main(int argc, char **argv) |
NewerOlder