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
<link href='//fonts.googleapis.com/css?family={{ .Site.Params.fontquote }}' rel='stylesheet' type='text/css'> |
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
<html> <body> | |
<script type="math/tex; mode=display">i_{t} = g(W_{xi}x_{t} + W_{hi}h_{t-1} + b_{i})</script> | |
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> | |
</body> </html> |
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
import pandas | |
import os | |
# Make tmp output directory. | |
dir_tmpout = './tmpout' | |
dir_tmpout = os.path.abspath(dir_tmpout) | |
if not os.path.isdir(dir_tmpout): | |
os.mkdir(dir_tmpout) |
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
import msvcrt | |
import time | |
# asks whether a key has been acquired | |
def kbfunc(): | |
#this is boolean for whether the keyboard has bene hit | |
x = msvcrt.kbhit() | |
if x: | |
#getch acquires the character encoded in binary ASCII | |
ret = msvcrt.getch() |
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
import time | |
time.sleep(3) | |
millis = int(round(time.time() * 1000)) | |
print(millis) |
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 multiprocessing import Pool | |
import os, time, random | |
def long_time_task(name): | |
while(1): | |
print('Run task %s (%s)..' % (name, os.getpid())) | |
start = time.time() | |
time.sleep(random.random() * 3) | |
end = time.time() | |
print('Task %s runs %0.2f seconds.' % (name, (end - start))) |
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
<body onresize="resize_canvas()"> | |
<img class=" fit" src="image/shortcut_chrome.png" /> | |
<canvas id="myCanvas" background="image/shortcut_chrome.png"></canvas> | |
<script type="text/javascript"> | |
function resize_canvas(){ | |
canvas = document.getElementById("myCanvas"); | |
canvas.width = window.innerWidth; | |
canvas.height = window.innerHeight; | |
} |
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
#!python | |
import requests | |
import time | |
import json | |
a = { | |
'aa':'keyaaa', | |
'bb':'keybbb'} |