https://docs.djangoproject.com/en/2.1/topics/db/optimization/
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
x = np.arange(3000) | |
vet = np.vectorize(elo2tier) | |
y = vet(x) |
def f1():
print('play_wav')
play_wav(fn)
def f2():
print('post_to_rpi_api')
post_to_rpi_api(signals)
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 pdb; pdb.set_trace() |
iptables
arp -a
ifconfig
:%!python -m json.tool
reference: https://pascalprecht.github.io/posts/pretty-print-json-in-vim/
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 cgi | |
import os | |
import oauth2 as oauth | |
from django.conf import settings | |
from django.contrib.auth import authenticate, login, logout | |
from django.contrib.auth.decorators import login_required | |
from django.contrib.auth.models import User | |
from django.http import HttpResponseRedirect | |
from django.shortcuts import render_to_response |
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
mkdir try-puppeteer | |
cd try-puppeteer | |
npm i --save puppeteer |
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
$ nkf -Lu -w --overwrite * |
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
<button onclick="book()">図書</button> | |
<button onclick="mgzn()">雑誌</button> | |
<h2>図書</h2> | |
<div id="book" class="red-card"> | |
<p> | |
Book book book. | |
</p> | |
</div> |