First things first !
sudo apt update
sudo apt upgrade
sudo apt-get install build-essential git
// This is an example program that iterates over all | |
// items in a mongodb collection in a memory safe way | |
package main | |
import ( | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" | |
"fmt" | |
) |
爬虫爬了好久,总共从豆瓣爬下来了 16894465 本书,有评分的有 279377 本。
简单统计如下:
from timeit import timeit | |
import asyncio | |
import requests | |
from threading import Thread | |
import aiohttp | |
client = aiohttp.ClientSession() | |
import asyncio | |
from asyncio.queues import Queue | |
TERMINATOR = object() | |
class TaskPool(object): | |
def __init__(self, loop, num_workers): | |
self.loop = loop | |
self.tasks = Queue(loop=self.loop) |
( find . -type d -name ".git" && find . -name ".gitignore" && find . -name ".gitmodules" ) | xargs rm -rf |