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/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
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
#Run in sageMath https://sagecell.sagemath.org/ | |
import numpy as np | |
from math import sqrt | |
#Return the dot product of v & w | |
def dotProduct(v,w): | |
return sum(map(lambda x, y: x*y, v, w)) | |
#Return the norm of vector v | |
def norm(v): |
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
#lang racket | |
;; Author: Aaron Eline | |
;; A simple Huffman Coding implementation. | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Main Functions | |
;; Nice struct for compressed data | |
(struct zip (tree stream)) |
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
data N = Z | S N | |
-- Naturals are equitable | |
instance Eq N where | |
(==) Z Z = True | |
(==) (S a) (S b) = a == b | |
(==) (S n) _ = False | |
(==) _ (S n) = False | |
-- Naturals are ordered |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char *argv[]) { | |
char *ptr; | |
if(argc < 3) { | |
printf("Usage: %s <environment var> <target program name>\n", argv[0]); | |
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
https://docs.google.com/presentation/d/1xdDenzVLS-6UEQgrbdY1rVTsucNUq5DuC2rKVtkd1Lc/edit?usp=sharing |
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
https://docs.google.com/presentation/d/1gFg88mh2toqs_vzi7PKu8DEfIf_ZIhQa_Fa1AvLnCBM/edit?usp=sharing |
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
open Core_kernel.Std | |
open Bap.Std | |
open Graphlib.Std | |
open Format | |
include Self() | |
module CG = Graphs.Callgraph | |
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 angr | |
import sys | |
def main(argv): | |
path_to_binary = argv[1] | |
project = angr.Project(path_to_binary) | |
initial_state = project.factory.entry_state() | |
simulation = project.factory.simgr(initial_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
use rand::prelude::*; | |
fn main() { | |
println!("pi = {}", approx(1000000)); | |
} | |
fn approx(count: u64) -> f64 { | |
let mut rng = rand::thread_rng(); | |
let mut circle = 0; | |
for _ in 0..count { |
OlderNewer