Skip to content

Instantly share code, notes, and snippets.

View zengjie's full-sized avatar

zengjie zengjie

  • Vertex Games
  • Singapore
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# this is a quick implementation of http://arxiv.org/abs/1508.06576
# BUT! This is kind of dirty. Lots of hard coding. 
import numpy as np
import math
from chainer import cuda, Function, FunctionSet, gradient_check, Variable, optimizers
import chainer.functions as Fu
#include <list>
#include <vector>
#include <chrono>
#include <functional>
#include <iostream>
struct Position {
float x;
float y;
void update() {
@zengjie
zengjie / tornado-plupload.py
Created September 20, 2011 02:39
plupload tornado backend demo
import tornado.web
import tornado.ioloop
import logging
import os.path
def clean_filename(filename):
i = filename.rfind(".")
if i != -1:
filename = filename[0:i] + filename[i:].lower()