Skip to content

Instantly share code, notes, and snippets.

View xtai's full-sized avatar
🐟

Sean Tai xtai

🐟
View GitHub Profile
Hello World!
# DMS423_HW02_Xiaoyu.py
#
# Homework 01 for DMS 423 Fall 14
# by Xiaoyu Tai(Sean)
# UBID: 50133396
#
# Fruit Ninja Simulator
#
# Credits:
# - Fruit Ninja, game of Halfbrick Studios, http://halfbrick.com/
@xtai
xtai / gist:907f86bd9bd28d737ec2
Created October 1, 2014 13:43
DMS423_HW04_Xiaoyu
# DMS423_HW04_Xiaoyu.py
#
# Homework 04 for DMS 423 Fall 14
# by Xiaoyu Tai(Sean)
# UBID: 50133396
#
# Sprite-style video game
# Free Pac-Man
#
# --------
@xtai
xtai / gist:2ea2073c26a6a8afcf9a
Created October 1, 2014 13:43
DMS423_HW03-1_Xiaoyu
# DMS423_HW03-1_Xiaoyu.py
#
# Homework 03-1 for DMS 423 Fall 14
# by Xiaoyu Tai(Sean)
# UBID: 50133396
#
#
# Paint Program
# Normal Function
#
@xtai
xtai / gist:50af51ba249a35a63331
Created October 1, 2014 13:43
DMS423_HW03-2_Xiaoyu
# DMS423_HW03-2_Xiaoyu.py
#
# Homework 03-2 for DMS 423 Fall 14
# by Xiaoyu Tai(Sean)
# UBID: 50133396
#
#
# Paint Program
# Abnormal Function
#
@xtai
xtai / gist:1094299c475c10db2bf0
Created October 6, 2014 14:26
json in python
import json, urllib
url = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.geojson"
response = urllib.urlopen(url);
data = json.loads(response.read())
i = 0
for x in data['features']:
i += 1
print i, x['properties']['title']
@xtai
xtai / day.py
Last active August 29, 2015 14:13
day.py
# Daylight & Moonlight
# by Xiaoyu Tai
#
# Mountains with rotating Sun and Moon.
# plus sky colors~
from pyglet.gl import *
from math import *
window = pyglet.window.Window(1000, 640)
/**
This script is used by hours daily and weekly view
https://issues.umd.edu/browse/LIBWEB-3255
@Author: Xiaoyu Tai
*/
var current_branch, current_date; // used by daily and weekly view
var highlight = true; // weekly view highlight option
// actions are triggered from the page
/*
* Tic-tac-toe
* Xiaoyu Tai
* 08/30/2015
*/
function Game() {
this.data_storage = new DataStorage();
this.ui = new UI();
this.controller = new Controller(this.ui, this.data_storage);
a = {
"あい": "love",
"いう": "say",
"うえ": "up",
"うお": "fish",
"おう": "owe",
"あう": "meet",
"おい": "nephew",
"おおい": "many",
"いい": "good",