This file contains hidden or 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
print("how are you") |
This file contains hidden or 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
from time import time | |
from handythread import foreach | |
from multiprocessing.pool import Pool | |
import numpy as np | |
import math | |
def f(x): | |
# print(x) | |
y = [1]*10000000 | |
[math.exp(i) for i in y] |
This file contains hidden or 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
""" | |
http://docs.python-requests.org/en/master/user/advanced/#session-objects | |
When your app makes a connection to a server using a Session, | |
it keeps that connection around in a connection pool. | |
When your app wants to connect to the same server again, | |
it will reuse a connection from the pool rather than establishing a new one. | |
""" | |
import requests |
This file contains hidden or 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
''' | |
内存泄漏循环引用的例子 | |
https://www.jb51.net/article/200171.htm''' | |
import sys | |
import threading | |
import time | |
import gc | |