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 os, sys, time | |
setting = raw_input('Please input your time setting:') | |
newpid = os.fork() | |
if newpid == 0: | |
while True: | |
time.sleep(10) | |
if setting <= time.strftime("%H%M",time.localtime(time.time())): | |
os.system('zenity --error --text="Alert!"') | |
break |
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 os, sys, time | |
setting = raw_input('Please input your time setting:') | |
newpid = os.fork() | |
if newpid == 0: | |
while True: | |
time.sleep(10) | |
if setting <= time.strftime("%H%M",time.localtime(time.time())): | |
os.system('kdialog --error "Alert!"') | |
break |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.rotateCannon(180); |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.rotateCannon(180); |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; |
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
var robots = new Array(); | |
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.start = function( ev ){ |
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/python2 | |
# Filename: parasite_Chinese.py | |
#-*- coding:utf-8 -*- | |
import numpy.random as random | |
import cPickle as p | |
filedata = 'parasites.data' | |
def loaddict(filename): |
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 urllib2 | |
import sys | |
site=sys.argv[1] | |
for num in range(1,189): | |
strnum=str(num) | |
if len(strnum)==1: | |
strnum='00'+strnum | |
if len(strnum)==2: |
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
(setq gnus-secondary-select-methods '((nntp "news.gmane.org"))) | |
(setq-default | |
gnus-summary-line-format "%U%R%z %(%&user-date; %B[%s]--[%f]%)\n" | |
gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M")) | |
gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references | |
gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date) | |
gnus-sum-thread-tree-false-root "" | |
gnus-sum-thread-tree-indent " " | |
gnus-sum-thread-tree-leaf-with-other "├> " |
OlderNewer