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 urllib | |
import urllib2 | |
import cookielib | |
import re | |
username = '' | |
password = '' |
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
evaluate(Expr) -> | |
eval(string:tokens(Expr, " ")). | |
eval(X) -> | |
lists:foldl(fun eval_single/2, [], X). | |
eval_single("+", [X, Y|Stack]) -> [X + Y|Stack]; | |
eval_single("-", [X, Y|Stack]) -> [X - Y|Stack]; | |
eval_single("*", [X, Y|Stack]) -> [X * Y|Stack]; | |
eval_single("/", [X, Y|Stack]) -> [X div Y|Stack]; |
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
(ns http-loader.core | |
(:gen-class)) | |
(require '[clj-http.client :as client]) | |
;(require '[pl.danieljanus.tagsoup :as parser]) | |
(require '[net.cgrand.enlive-html :as html]) | |
(require '[net.cgrand.tagsoup :as parser]) | |
(require '[clojurewerkz.urly.core :as url]) | |
(defn grab [url] |
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(void) | |
{ | |
for (;;) { | |
void *x = malloc(4 * 1024); | |
if (x == NULL) { |
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
function swap(arr, i, j) | |
{ | |
var t = arr[i]; | |
arr[i] = arr[j]; | |
arr[j] = t; | |
} | |
function sorty(arr) | |
{ | |
var end = arr.length - 1; |
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
Iuppiter.decompress = function(sstart, slen, dstart) | |
{ | |
slen = slen | 0; | |
var | |
src = 0, | |
dst = 0, | |
cpy = 0, | |
copymap = 0, | |
copymask = 1 << (NBBY - 1 | 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
function Point(x, y) | |
{ | |
this.x = x; | |
this.y = y; | |
} | |
Point.prototype.__hash__ = function() | |
{ | |
return hash_int32array([this.x, this.y]); | |
}; |
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
""" | |
A Wolfram Alpha ipython client. | |
Installation: | |
1. Put this script into ~/.ipython/profile_default/startup/ | |
2. pip install wolframalpha colorama | |
3. Get an API key from https://developer.wolframalpha.com/portal/myapps/ and put it into ~/.wolfram_key | |
Example: | |
In [1]: wa jacobisymbol[31,37] |
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
module Timeline | |
type timestamp = nat | |
type timespan = x:nat{x>0} | |
type count = nat | |
type bucket 'a = { | |
time: timestamp; | |
content: 'a; |
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 strict"; | |
// Format | |
// | |
// 000 1 bit integer | |
// 001 4 bit integer | |
// 002 8 bit integer | |
// 003 16 bit integer | |
// 004 32 bit integer | |
// 005 32 bit float |
OlderNewer