Skip to content

Instantly share code, notes, and snippets.

View jingning42's full-sized avatar

Jingning Zhang jingning42

View GitHub Profile
@jingning42
jingning42 / a.py
Last active August 29, 2015 14:07 — forked from cuihaoleo/a.py
#!/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:
@jingning42
jingning42 / fib_C.c
Last active August 29, 2015 14:06 — forked from cuihaoleo/fib_C.c
#include <stdio.h>
int main ()
{
int a = 0, b = 1, c = 1, sum = 0;
while (c < 4000000)
{
if (c % 2 == 0)
sum += c;
@jingning42
jingning42 / #2fib
Last active August 29, 2015 14:06 — forked from cuihaoleo/fib
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):