Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

takey taketakeyyy

🏠
Working from home
  • Japan
Block or report user

Report or block taketakeyyy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@taketakeyyy
taketakeyyy / XMLHttpRequest_GetDOM
Created Jul 18, 2019
XMLHttpRequestのサンプル。非同期処理で指定したURLのDOMを取得する
View XMLHttpRequest_GetDOM
//Qiitaのプロフィールページからアイコン画像を取得する
const url = 'https://qiita.com/takey';
function get(url) {
return new Promise(function(resolve) {
let xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = "document";
@taketakeyyy
taketakeyyy / speed_compare_of_dict_in_try_get.py
Created Jun 2, 2019
Speed ​​comparison of dict with in-operator, try-except and get method.
View speed_compare_of_dict_in_try_get.py
"""
辞書におけるキーアクセスの速度比較
"""
import time
def sample_in_operator1(dic, N):
""" in演算子(見つかる) """
start = time.time()
for i in range(N):
if i in dic:
@taketakeyyy
taketakeyyy / compare_list_and_deque.py
Created May 20, 2019
listとdequeの先頭の要素に対する操作の比較
View compare_list_and_deque.py
from collections import deque
import time
N = 2*10**5
def list_append():
a = []
start = time.time()
for i in range(N):
@taketakeyyy
taketakeyyy / imap_command.py
Last active Oct 19, 2018
imaplibによるラズパイ遠隔操作のサンプルプログラム
View imap_command.py
import email
import ssl
import subprocess
import imaplib
from email.header import decode_header, make_header
# https://docs.python.jp/3/library/imaplib.html
# [参考]https://qiita.com/ekzemplaro/items/a35e15865d57372f1d2b
# https://docs.python.jp/3.6/library/email.message.html
# https://docs.python.org/ja/3.7/library/email.compat32-message.html#module-email.message
# https://docs.python.jp/3.6/library/email.parser.html
@taketakeyyy
taketakeyyy / imaplib_sample.py
Created Oct 15, 2018
imaplibのサンプルプログラム
View imaplib_sample.py
import email
import ssl
import imaplib
from email.header import decode_header, make_header
# https://docs.python.jp/3/library/imaplib.html
# [参考]https://qiita.com/ekzemplaro/items/a35e15865d57372f1d2b
# https://docs.python.jp/3.6/library/email.message.html
# https://docs.python.org/ja/3.7/library/email.compat32-message.html#module-email.message
# https://docs.python.jp/3.6/library/email.parser.html
@taketakeyyy
taketakeyyy / measure_or_list_tuple_set.py
Last active Oct 11, 2018
or列挙、リスト、タプル、集合でのif文の速度評価 ref: https://qiita.com/takey/items/15b629a2c442222a68aa
View measure_or_list_tuple_set.py
import random
import time
# 区間[0,9999]のランダムな整数をN個格納したリストを作成
N = 1000000
rands = [random.randrange(10000) for _ in range(N)]
def f_or(rands):
""" 0~9999までのorの列挙 """
start = time.time()
View MS-IME4MMDAgent.txt
!Microsoft IME Dictionary Tool
!Version:
!Format:WORDLIST
!User Dictionary Name: C:\Users\yuji\AppData\Roaming\Microsoft\IME\15.0\IMEJP\UserDict\MMDAgent.dic
!Output File Name: C:\Users\yuji\Desktop\MMDAgentIME.txt
!DateTime:
MODEL_ADD MODEL_ADD 短縮よみ MMDAgentのシナリオスクリプト用
MODEL_CHANGE MODEL_CHANGE 短縮よみ
MODEL_DELETE MODEL_DELETE 短縮よみ
You can’t perform that action at this time.