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 argparse | |
import os | |
import numpy as np | |
import pybullet as p | |
import motion | |
def rotate(p, deg): |
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 autograd.numpy as np | |
import autograd | |
def newton(f, x0, tol=1.48e-08, maxiter=50): | |
g = autograd.grad(f) | |
h = autograd.hessian(f) | |
x = x0 | |
for _ in range(maxiter): |
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
# -*- coding: utf-8 -*- | |
import argparse | |
import cv2 | |
import numpy as np | |
def calc_disparity(left_image, right_image): | |
window_size = 3 |
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 sqlite3; con = sqlite3.connect(':memory:'); cur = con.cursor(); cur.execute('select sqlite_version(*)').fetchone(); con.close() |
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
# -*- coding: utf-8 -*- | |
import threading | |
import urllib | |
def get_async(url, data=None, callback=None): | |
request_async(url, data, get, callback) | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Tornado WebSocket Sample</title> | |
</head> | |
<body> | |
<input type="text" id="username" value="myname" /> | |
<button id="connect">connect</button> | |
<div id="result"></div> |
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
# Install riak-0.14.2rc8 to Ubuntu 10.04 LTS on Amazon EC2. | |
# AMI ID: ami-3202f25b on US East | |
# see http://uec-images.ubuntu.com/releases/lucid/release/ | |
ERLANG_PKG=otp_src_R13B04 | |
RIAK_PKG=riak-0.14.2rc8 | |
sudo apt-get update |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# see http://wiki.basho.com/Loading-Data-and-Running-MapReduce-Queries.html | |
import sys | |
import riak | |
HOST = '127.0.0.1' | |
PORT = '8098' |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from riak import RiakClient | |
from riak.mapreduce import RiakLink | |
# see http://wiki.basho.com/Links-and-Link-Walking.html | |
HOST = 'example.jp' |
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
# Gitorious Installation to Ubuntu Server 10.04 | |
# from gitorious mainline: | |
# commit e2e70edd42ac1c00dab518d61d566ee3fec929db | |
# Author: Marius Mathiesen <[email protected]> | |
# Date: Wed Apr 13 11:43:07 2011 +0200 | |
: << '#COMMENT_OUT' | |
Ubuntu Server 10.04 に Gitorious をインストールしたときのメモ。 |