Skip to content

Instantly share code, notes, and snippets.

#include <algorithm>
#include <chrono>
#include <future>
#include <iostream>
#include <iterator>
#include <random>
#include <thread>
#define unlikely(x) __builtin_expect((x), 0)
#define likely(x) __builtin_expect((x), 1)
@choleraehyq
choleraehyq / contest.go
Created June 15, 2017 13:20
redis geo server
package main
import (
"bytes"
"flag"
"log"
"net/http"
"strings"
"time"
@choleraehyq
choleraehyq / tiebasign.py
Created June 29, 2015 08:23
贴吧自动签到的脚本
from urllib import request, parse
from http import cookies, cookiejar
import re
import time
cookie = cookiejar.CookieJar()
opener = request.build_opener(request.HTTPCookieProcessor(cookie))
def set_cookie(name, value):
cookie = cookiejar.Cookie(