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 XMonad | |
import XMonad.Config.Desktop | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig(additionalKeys) | |
import System.IO | |
screenLockProg = "sxlock" | |
myModMask = mod4Mask |
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 matplotlib import pyplot as plt | |
def validate(func, s=100, n=5, trails=100000): | |
counts = [0] * (s + 1) | |
for _ in xrange(trails): | |
for x in func(s, n): | |
counts[x] += 1 | |
plt.plot(range(s + 1), counts) | |
plt.show() |
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
<?xml version="1.0" ?> | |
<project> | |
<tag1 a1="v1" a2="v2" a3="v3"> | |
<ctag1> | |
hello | |
</ctag1> | |
<ctag2> | |
world | |
</ctag2> | |
</tag1> |
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 qualified Data.Map as M | |
import System.Environment | |
import Data.Char | |
import Control.Monad | |
import System.Random | |
type StackT = Int | |
type Pos = (Int, Int) | |
data Mode = StringParse | Normal deriving Show |
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, sys | |
from time import sleep | |
CONFIG_PATH = os.path.expanduser('~/.fkgfw_config') | |
CHECK_DURATION = 5 | |
FIFO = '/tmp/fkgfw_fifo' | |
class Proxy: | |
""" |
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 math | |
W, H = 1000, 600 | |
pg.display.init() | |
pg.font.init() | |
font = pg.font.SysFont('serif', 20) | |
X, Y = 0, 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
-- module KMPAt where | |
import System.IO | |
import Control.Monad | |
import Data.Maybe | |
import Data.String | |
import System.TimeIt | |
data KMPAt = AuxNode (Maybe KMPAt) | |
| KMPNode (Maybe KMPAt) KMPAt (Char->Bool) |
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 Control.Monad | |
import System.IO | |
import Data.Array.Unboxed | |
import System.TimeIt | |
match patt s = matches 0 0 s where | |
matches j i s | j == m = i : matches (f!j) i s | |
| i == n = [] | |
matches j i (c:s) = matches (back j c + 1) (i+1) (s) |
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
| Team| Solved| Penalty| A| B| C| D| E| F| G| H| I| J | |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
> SYSU_TimeWizard| 7| 696| (4)| 1:27:23(1)| 2:37:22(1)| 0:42:34| | | 3:51:29(3)| 0:04:25| 0:24:06| 0:29:27(1) < | |
| sysu_stardust| 6| 700| | 3:04:55(4)| | 1:19:22| | | 4:20:29(1)| 0:07:49| 0:18:54(1)| 0:28:56 | | |
> MagnetWarrior| 6| 819| | 2:40:05| | 2:45:02(2)| | | 4:02:23(1)| 0:46:13| 0:54:45| 1:11:17(1) < | |
| sysu_3idiots| 5| 309| | (3)| | 1:00:11| | | 2:48:47(1)| 0:13:16| 0:19:30| 0:27:21 | | |
> DarkMagician| |
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 bz2 | |
import itertools | |
import Image | |
import ImageDraw | |
import pickle | |
from random import randint | |
from math import pi,sin,cos,sqrt,atan2 | |
norm = lambda c:c/abs(c) |
NewerOlder