This file contains hidden or 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 | |
# Author: Ray | |
# Date: Fir Jan 13, 13:00 | |
# | |
from subprocess import Popen, PIPE | |
import sys | |
from time import time as tick | |
inFile = 'in3' |
This file contains hidden or 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 | |
import pexpect | |
import os | |
log = {'addr':'srv6.unssh.com', 'user':'xxxxxx', 'port':'443', 'passwd':'xxxxxx'} | |
log['config_path'] = os.path.expanduser('~/.fkgfw_ssh_config') | |
if not os.path.exists(log['config_path']): | |
open(log['config_path'], 'w').write('# fkgfw - fuck the great firewall\n') | |
cmd = 'ssh -TfnN -D 7070 %(user)s@%(addr)s -p %(port)s -F %(config_path)s' % log |
This file contains hidden or 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
from pymunk import Body, Circle, Vec2d, Segment, Poly, Space | |
import pymunk | |
import pygame | |
import random | |
from select import select | |
def vint(v): | |
return int(v[0]), int(v[1]) | |
def randarea(x0, y0, w, h): |
This file contains hidden or 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 | |
from time import sleep | |
import os | |
import subprocess as sb | |
import re | |
User = 'your_netid' | |
Passwd = 'xxxxxxxxxx' | |
class AutoLogon: |
This file contains hidden or 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 re | |
oo = 9000 | |
# userPageAddr = 'http://soj.me/user.php?id=8750' | |
userPageAddr = raw_input('Please input your user page address on Sicily(http://soj.me/user.php?id=8750, for example): ') | |
userId = re.findall('id=(\d+)', userPageAddr)[0] | |
s = urllib2.urlopen(userPageAddr).read() | |
problems = re.findall(r'show_problem\.php\?pid=(\d+)', s, re.M) | |
problems.sort() |
This file contains hidden or 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 pygame as pg | |
R = 10 | |
M = 1 | |
FPS = 30 | |
Margin = 10 | |
ScreenW, ScreenH = 400, 400 |
This file contains hidden or 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 pygame as pg | |
import sys | |
from pygame.locals import * | |
import subprocess as sb | |
W, H = 800, 600 | |
x0, y0 = 400, 400 | |
BgColor = (0xff, 0xff, 0xff, 0xff) | |
LineColor = (0, 0, 0, 0xff) | |
SCROLL_UP, SCROLL_DOWN = 4, 5 |
This file contains hidden or 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
2 | |
Infernus 280 | |
Cheetah 285 | |
PCJ600 250 | |
Stallion 180 | |
HotRingRacer 300 | |
Mansion Infernus | |
CarShowRoom HotRingRacer | |
VicePort Cheetah |
This file contains hidden or 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/env python | |
import pygame as pg | |
from collections import deque | |
import random | |
W, H = 1200, 1000 | |
BarW = 100 | |
gw, gh = 30, 20 | |
gs = min((W - BarW)/gw, H/gh) | |
sep = 1 |
This file contains hidden or 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
"i'm here" | |
import socket | |
import getpass | |
from time import sleep | |
Port = 8789 | |
User = getpass.getuser() | |
Delta = 3.0 | |
dest = ('<broadcast>' , Port) | |
s = socket.socket(socket.AF_INET , socket.SOCK_DGRAM) |
OlderNewer