Skip to content

Instantly share code, notes, and snippets.

View dragonly's full-sized avatar
🎯
Focusing

Yilong Li dragonly

🎯
Focusing
View GitHub Profile
@dragonly
dragonly / rvalue.cpp
Created April 21, 2016 04:41
test rvalue related behaviors of C++11
#include <iostream>
using namespace std;
class Foo
{
public:
Foo() { cout << "Foo::ctor" << endl; }
Foo(Foo &foo) { cout << "Foo:copy" << endl; }
~Foo(){ cout << "Foo::dtor" << endl; }
class MyPrettyPrinter(pprint.PrettyPrinter):
def format(self, object, context, maxlevels, level):
if isinstance(object, unicode):
return (object.encode('utf8'), True, False)
return pprint.PrettyPrinter.format(self, object, context, maxlevels, level)
import requests
import xml.etree.ElementTree as ET
import xmltodict
import pprint
import json
url_base = 'http://bbs.fudan.edu.cn/bbs/rss?bid=%s'
board_range = range(1,299)
channels = []
@dragonly
dragonly / gist:1f226d49f356adadee09
Created November 2, 2014 13:28
a weibo follower page
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="周鸿祎,周鸿祎的微博,微博,新浪微博,weibo" name="keywords" />
<meta content="周鸿祎,奇虎360董事长。周鸿祎的微博主页、个人资料、相册。新浪微博,随时随地分享身边的新鲜事儿。" name="description" />
<meta name="viewport" content="initial-scale=1,minimum-scale=1" />
<title>周鸿祎的微博_微博</title>
<link type="text/css" rel="stylesheet" charset="utf-8" href="http://img.t.sinajs.cn/t6/style/css/module/base/frame.css?version=c7cf9996704c51aa" putoff="style/css/module/combination/extra.css?version=c7cf9996704c51aa" />
#!/usr/bin/env python
#coding=utf8
'''
Created on Mar 18, 2013
@author: yoyzhou
'''
'''