View street_stroll.js
// Street Stroll JavaScript
// by nox 2015/01/22
var map = null;
var streetview = null;
var marker = null;
var info_window = null;
var streetlayer = null;
function initialize() {
View street_stroll.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Street Stroll by Google Maps Street View</title>
<script src="http://maps.google.com/maps/api/js" type="text/javascript"></script>
<script type="text/javascript" src="street_stroll.js"></script>
</head>
<body onload="initialize()">
View irc_bot.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import socket
import string
import datetime
import time
import re
View spirograph.py
#!/usr/bin/env python
import sys, os
from pylab import *
gcd = lambda x, y: y and gcd(y, x % y) or x
fx = lambda t, rc, rm, rd: (rc - rm) * cos(t * pi) + rd * cos(t * pi * (rc - rm) / rm)
fy = lambda t, rc, rm, rd: (rc - rm) * sin(t * pi) - rd * sin(t * pi * (rc - rm) / rm)
p = lambda x, rc, rm, rd: plot(fx(x, rc, rm, rd), fy(x, rc, rm, rd))
View autocookieclicker.py
#!/usr/bin/env python
"""
Auto Cookie Clicker by foota, 2013.09.21
ref. http://orteil.dashnet.org/cookieclicker/
"""
import sys, os, time, threading
from pymouse import PyMouse
import ImageGrab
View test_timeit.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def tarai(x, y, z):
return tarai(tarai(x - 1, y, z),
tarai(y - 1, z, x),
tarai(z - 1, x, y)) if x > y else y
def factorial(n):
return n == 0 and 1 or reduce(lambda x, y: x * y, range(1, n + 1))
View count_lattice_path_dfs.cpp
// Count paths from (0, 0) to (N, N) in the NxN lattice graph using DFS.
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
static unsigned long long cnt = 0;
View count_lattice_path.py
#!/usr/bin/env python
"""
Count all paths from upper left to lower right on NxN lattice graph.
Build (required SGB and GMP libraries):
% gcc gen_lattice.c -O3 -lgb -o gen_lattice
% wget http://www-cs-faculty.stanford.edu/~uno/programs/simpath.w
% ctangle simpath.w
% gcc simpath.c -O3 -lgb -o simpath
% wget http://www-cs-faculty.stanford.edu/~uno/programs/simpath-reduce.w
View count_path_mp.cpp
// Count paths on a lattice graph.
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <gmp.h>
View gen_lattice.c
/* Generate lattice graphs. */
#include "gb_graph.h"
#include "gb_basic.h"
#include "gb_save.h"
int main(int argc, char* argv[])
{
if (argc < 4) {
fprintf(stderr, "Usage %s N M outfile\n", argv[0]);