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
#include <stdio.h> | |
struct test { | |
int a, b, c; | |
}; | |
int main() { | |
struct test st = { | |
.b = 15, | |
}; |
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
def fib (m): | |
a, b, c = 0, 1, 1 | |
yield 1 | |
while a+b <= m: | |
c = a + b | |
yield c | |
a, b= b, c | |
s = 0 | |
for i in fib(4000000): |
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
#include <stdio.h> | |
int main () | |
{ | |
int a = 0, b = 1, c = 1, sum = 0; | |
while (c < 4000000) | |
{ | |
if (c % 2 == 0) | |
sum += c; |
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/env python3 | |
import re | |
import sys | |
prog = re.compile(r"\\N(?:{[^{}]*})?") | |
prog2 = re.compile(r"(Dialogue: \w*,\w*:\w*:\w*.\w*,\w*:\w*:\w*.\w*,\w*,\w*,\w*,\w*,\w*,\w*,)(.*)") | |
for line in sys.stdin: |
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/env python3 | |
import re | |
import sys | |
prog = re.compile(r"\\N(?:{[^{}]*})?") | |
prog2 = re.compile(r"(Dialogue: \w*,\w*:\w*:\w*.\w*,\w*:\w*:\w*.\w*,\w*,\w*,\w*,\w*,\w*,\w*,)(.*)") | |
for line in sys.stdin: |
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
<html> | |
<body> | |
<select id="s1"> | |
<option value="CN">China</option> | |
<option value="JP">Japan</option> | |
</select> | |
<select id="s2"> | |
<option value="Beijing" data-country="CN">Beijing</option> | |
<option value="Shanghai" data-country="CN">Shanghai</option> | |
<option value="Tokyo" data-country="JP">Tokyo</option> |
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/env python3 | |
from itertools import count | |
from math import sqrt | |
from concurrent.futures import ProcessPoolExecutor | |
def factory (x): | |
f = lambda k: 1.0/(k*(k+x)) | |
return (f(k) for k in range(1, 1000000)) |
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
# Maintainer: CUI Hao <cuihao.leo@gmail.com> | |
pkgname=toxvpn-git | |
pkgver=20150710 | |
pkgrel=1 | |
pkgdesc="toxvpn is a powerful tool that allows one to make tunneled point to point connections over Tox." | |
arch=(i686 x86_64) | |
url=https://github.com/cleverca22/toxvpn | |
license=(GPL3) | |
depends=(tox) |
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
#!/bin/bash -e | |
if [[ $IFACE == "vlan95" ]]; then | |
ip route add 202.38.95.0/25 dev vlan95 table 1000 | |
ip route add default via 202.38.95.126 table 1000 | |
ip rule add from 202.38.95.110 table 1000 | |
fi | |
if [[ $IFACE == "vlan10" ]]; then | |
ip route add 202.141.160.0/25 dev vlan10 table 1001 |
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/env python3 | |
from PIL import Image | |
import concurrent.futures | |
from colorfinder import hex2term_accurate, hex2term_quick | |
from lolcat import get_terminal_size | |
import argparse | |
if __name__ == "__main__": | |
default_size = get_terminal_size() |
OlderNewer