Skip to content

Instantly share code, notes, and snippets.

@XimingCheng
XimingCheng / fib.go
Created January 2, 2015 14:20
A Fibonacci data cal in Golang goroutine and channel
package main
import (
"fmt"
)
func shower(c chan int, quit chan bool) {
for {
select {
case j := <-c:
@XimingCheng
XimingCheng / getCode.py
Created December 15, 2014 01:56
A python script for getting the location data from National Bureau of Statistics of the People's Republic of China
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from BeautifulSoup import BeautifulSoup
import urllib2
import time
import sys
import socket
def getProvice(base_url):
try: