Usually, located at /usr/local/cuda/bin
$ nvprof python train_mnist.py
I prefer to use --print-gpu-trace.
# Fancy box drawing function by Dan Masek | |
def draw_border(img, pt1, pt2, color, thickness, r, d): | |
x1, y1 = pt1 | |
x2, y2 = pt2 | |
# Top left drawing | |
cv2.line(img, (x1 + r, y1), (x1 + r + d, y1), color, thickness) | |
cv2.line(img, (x1, y1 + r), (x1, y1 + r + d), color, thickness) | |
cv2.ellipse(img, (x1 + r, y1 + r), (r, r), 180, 0, 90, color, thickness) | |
# constract energy grid | |
E = np.zeros(image.shape + (2,)) | |
for index in np.ndindex(F_t.shape): | |
y,x,c = index | |
smooth_constraint = 0 | |
try: | |
smooth_constraint += ( (F_t[y,x+1,c] - F_t[y,x,c]) )**2 | |
except IndexError: |
{ | |
"snippet": { | |
"expanded": true, | |
"newSnippetPrivate": false, | |
"sorting": "updated_at", | |
"sortingReverse": true | |
}, | |
"editor" : { | |
"tabSize": 4 |
Alternatively, you can try jame or mitm proxy instead
https://stackoverflow.com/questions/37010524/set-headers-for-scrapy-shell-request
$ scrapy shell
...
...
>>> from scrapy import Request
>>> req = Request('yoururl.com', headers={"header1":"value1"})
>>> fetch(req)
sultan
wanna sudo things
delegator.py
simple aproach https://github.com/kennethreitz/delegator.py
autosub
wanna translate videos by subtitle-it JAV, Learning Youtube Especially in Chinese, use pip
from git