Skip to content

Instantly share code, notes, and snippets.

View coldfog's full-sized avatar

Yuyao Feng coldfog

View GitHub Profile
@coldfog
coldfog / ThreeDoorRewardPuzzle.py
Created March 6, 2016 03:59
ThreeDoorRewardPuzzle
import random
if __name__ == '__main__':
swap = 0
not_swap = 0
for i in range(1000):
doors = range(4)
reward = random.randint(0, len(doors)-1)
select = random.randint(0, len(doors)-1)
@coldfog
coldfog / MixTouchAdapter.lua
Last active August 29, 2015 14:16
MixTouchAdapter for quick-cocos2d-x touch system and cocos2d-x touch system
--[[
This is an adapter for quick-cocos2d-x touch system and cocos2d-x touch system
Usage: invoke adapt method
adapt(target, withModal)
target: Mixed. the quick obj to adjust
withModal: boolean. If swallow all touch event
@coldfog
coldfog / xkcdChart.ipynb
Last active December 25, 2015 08:19
This is a simple wrapper for matplotlib to draw a chart.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.