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 <lmdb.h> | |
#include "common.h" | |
#include "util.h" | |
#include "timer.h" | |
int main(int argc, char *argv[]) { | |
google::InitGoogleLogging(argv[0]); | |
google::LogToStderr(); |
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
extern "C" { | |
#include <jerror.h> | |
#include <jpeglib.h> | |
#include <setjmp.h> | |
} | |
struct JpegErrorManager { | |
struct jpeg_error_mgr pub; | |
jmp_buf setjmp_buffer; | |
}; |
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 "httpclient.h" | |
static inline size_t WriteCallback(void* contents, size_t size, size_t nmemb, | |
void* userp) { | |
((std::string*) userp)->append((char*) contents, size * nmemb); | |
return size * nmemb; | |
} | |
//////////////////////////// class HttpClient ////////////////////////////////// |
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 | |
""" | |
获取某个顶会的文章的引用数, 并输出其前10%的文章列表. | |
由于google scholor有防爬机制, 这里假定所有的html的源文件都手动下载到本地. | |
""" | |
import re | |
import os | |
from bs4 import BeautifulSoup |