Skip to content

Instantly share code, notes, and snippets.

View albertmenglongli's full-sized avatar
:octocat:

Menglong.Li albertmenglongli

:octocat:
View GitHub Profile
@albertmenglongli
albertmenglongli / FeiXingQi.py
Created December 17, 2014 12:55
FeiXingQi.py
import random
people=["wang","peng","duan","meng"]
winners=[];i=0
num=len(people)
while True:
if len(winners)>=num-1 or "exit" in winners:
print "game over!"
break
while True:
if people[i%num] in winners:
@albertmenglongli
albertmenglongli / FeiXingQi.py
Created December 17, 2014 12:56
FeiXingQi.py
import random
people=["wang","peng","duan","meng"]
winners=[];i=0
num=len(people)
while True:
if len(winners)>=num-1 or "exit" in winners:
print "game over!"
break
while True:
if people[i%num] in winners:
@albertmenglongli
albertmenglongli / FeiXingQi.py
Created December 17, 2014 12:58
FeiXingQi.py
import random
people=["wang","peng","duan","meng"]
winners=[];i=0
num=len(people)
while True:
if len(winners)>=num-1 or "exit" in winners:
print "game over!"
break
while True:
if people[i%num] in winners:
@albertmenglongli
albertmenglongli / Calculator.py
Created December 18, 2014 08:38
Pythonista Scripts
# coding: utf-8
# Calculator
from __future__ import division
import ui
import clipboard
from console import hud_alert
shows_result = False
@albertmenglongli
albertmenglongli / combineS3Files.py
Created September 9, 2016 03:21 — forked from jasonrdsouza/combineS3Files.py
Python script to efficiently concatenate S3 files
'''
This script performs efficient concatenation of files stored in S3. Given a
folder, output location, and optional suffix, all files with the given suffix
will be concatenated into one file stored in the output location.
Concatenation is performed within S3 when possible, falling back to local
operations when necessary.
Run `python combineS3Files.py -h` for more info.
'''