Skip to content

Instantly share code, notes, and snippets.

View Eckankar's full-sized avatar

Sebastian Paaske Tørholm Eckankar

View GitHub Profile
@Eckankar
Eckankar / Heap.cs
Created June 8, 2011 19:06
En C#-implementation af en Max-Heap
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace HeapSort {
/// <summary>
/// Implementerer en max-heap (binær) af T.
/// </summary>
@Eckankar
Eckankar / poke_everyone.user.js
Created July 23, 2011 19:58
Poke everyone on Facebook!
// ==UserScript==
// @name Poke everyone!
// @description Pokes everyone you specify.
// @author Sebastian Paaske Tørholm
// @include http://*.facebook.com/*
// @include https://*.facebook.com/*
// @match http://*.facebook.com/*
// @match https://*.facebook.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js
// @version 1.0
@Eckankar
Eckankar / pony.py
Created September 16, 2011 12:07
Pony script
#!/usr/bin/python
import urllib2
import random
import lxml.html
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
import smtplib
offset = random.randint(0, 2450)
This file has been truncated, but you can view the full file.
1000
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
..................
@Eckankar
Eckankar / action.tex
Created October 16, 2011 22:38
Action item stuffs
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amsfonts}
% \item til referater
\newcommand{\refitem}[2]{\item { \textbf{#1} \\[1em] #2 }}
@Eckankar
Eckankar / hasse.nb
Created October 26, 2011 09:29
Generating Hasse diagrams in Mathematica
(* Combinatorica contains HasseDiagram,so we need to load it. *)
<<Combinatorica`;
(* The set the partial order operates on. *)
nums = {1, 2, 4, 7, 8, 14, 30};
(* Define our partial order. *)
pOrder[x_, y_] := Divisible[y, x];
(* Generate a directed graph from the partial order. *)
@Eckankar
Eckankar / gist:1577037
Created January 8, 2012 03:21
The function F for my recursion theorem post
val F = print o implode o rev o explode
@Eckankar
Eckankar / gist:1577050
Created January 8, 2012 03:27
Idea for the function A
fun A () = B "fun B x = ... and F x = ..."
@Eckankar
Eckankar / gist:1577070
Created January 8, 2012 03:35
First draft for B
fun B x = F ("fun A x = B \"" ^ x ^ "\"\n" ^ x)
@Eckankar
Eckankar / gist:1577087
Created January 8, 2012 03:44
Second draft for B
fun B x = let fun esc (#"\""::xs) = #"\\" :: #"\"" :: esc xs
| esc (#"\\"::xs) = #"\\" :: #"\\" :: esc xs
| esc (x::xs) = x :: esc xs
| esc [] = []
in F ("fun A x = B \"" ^ (implode o esc o explode) x ^ "\"\n" ^ x) end