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
//By Brickgao | |
#include <iostream> | |
#include <cstdio> | |
#include <cstring> | |
#include <cmath> | |
#include <cstdlib> | |
#include <algorithm> | |
#include <vector> | |
using namespace std; |
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
//By Brickgao | |
#include <iostream> | |
#include <queue> | |
#include <cstdio> | |
#include <cstring> | |
#include <cmath> | |
#include <cstdlib> | |
#include <algorithm> | |
#include <vector> | |
#include <ctype.h> |
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
from sgmllib import SGMLParser | |
import sys,urllib2,urllib,cookielib | |
import getpass | |
class loginrenren(SGMLParser): | |
def __init__(self, mail, password): | |
SGMLParser.__init__(self) | |
try: |
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
<!--A bar Chart Part1-sample1--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>A bar Chart Part 1</title> | |
<style type="text/css"> | |
body { | |
height: 100%; | |
} | |
.chart div { |
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
var http = require('http') | |
var options = { | |
host: 'yun.baidu.com', | |
port: 80, | |
path: '/share/link?shareid=197263&uk=4264834298', | |
method: 'GET' | |
}; | |
var req = http.get(options, function(res) { |
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
# -*- coding: utf8 -*- | |
import httplib, threading, time | |
total = 0 | |
succ = 0 | |
fail = 0 | |
exce = 0 | |
maxtime = 0 | |
mintime = 9999 | |
gt3 = 0 |
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
# -*- coding: utf-8 -*- | |
import os | |
_file_list = os.listdir(u'./data') | |
_cnt = 0 | |
for _file_name in _file_list: | |
_cnt += 1 | |
print str(_cnt) + u' start to analyse ' + _file_name | |
with open(os.path.join(u'./data', _file_name), 'r') as _file: |
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
var usb = require('usb'); | |
var my_drive = usb.findByIds(4901, 49193); | |
my_drive.open(); | |
interfaces = my_drive.interfaces[0]; | |
interfaces.claim() |
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
# -*- coding: utf-8 -*- | |
from vispy.scene import SceneCanvas, visuals | |
import numpy as np | |
from vispy import app | |
plots = [] | |
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
# -*- encoding: utf-8 -*- | |
import requests | |
import os | |
def get_page(lower_bound=1, upper_bound=1000000): | |
if not os.path.exists('./pages/'): | |
os.mkdir('./pages') | |
base_url = 'http://zhidao.baidu.com/question/' |