Skip to content

Instantly share code, notes, and snippets.

View mantis7's full-sized avatar

mantis7 mantis7

  • shanghai
View GitHub Profile
@dongweiming
dongweiming / client.py
Last active April 15, 2017 07:26
知乎API爬虫
# coding=utf-8
import os
import json
import time
import requests
from requests.auth import AuthBase
from settings import LOGIN_URL, CAPTCHA_URL
from config import (
API_VERSION, APP_VERSION, APP_BUILD, UUID, UA, APP_ZA, CLIENT_ID,
@olafurjohannsson
olafurjohannsson / requestmanager.cpp
Last active July 26, 2023 13:43
Asynchronous HTTP network requests in C++ with Qt
#include "requestmanager.h"
///
/// RequestManager constructor
///
/// Description: sets up a network access manager that
/// abstract the HTTP/TCP protocol
RequestManager::RequestManager(QObject *parent) : QObject(parent)
{
@bellbind
bellbind / complex.py
Last active March 10, 2023 19:14
[python3] Calc Riemann Zeta function
# complex arith for programming with other languages
# - required functions: exp(f), log(f), sin(f), cos(f), atan2(f), pow(f1, f2)
import math
# [equality for complex]
def ceq(a, b):
return a.real == b.real and a.imag == b.imag
# [add, sub, mul for complex]
@UnaNancyOwen
UnaNancyOwen / Boost1.55.0.md
Last active March 27, 2025 01:17
Building Boost with Visual Studio
@kennethreitz
kennethreitz / 0_urllib2.py
Created May 16, 2011 00:17
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()