This file contains 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 bisect | |
import random | |
import timeit | |
# | |
# 1. 関数を定義 |
This file contains 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
<!-- | |
Quick start - CDN の使用 | |
https://vuetifyjs.com/ja/getting-started/quick-start#cdn-%E3%81%AE%E4%BD%BF%E7%94%A8 | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<!-- Vuetify が使うフォントの CSS --> | |
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> |
This file contains 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
# | |
# そのまま対話モード >>> に | |
# コピペで実行できます。 | |
# | |
# | |
# 再帰的に identity を表示する関数 | |
# Effective Python item 26 を参考にしました。 | |
# http://bit.ly/2HgJAyr | |
# |
This file contains 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
# | |
# そのまま対話モード >>> に | |
# コピペで実行できます。 | |
# | |
# | |
# 浅いコピー copy と深いコピー deepcopy の違いを示します。 | |
# | |
import copy | |
import json |
This file contains 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
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.7/dist/vue.js"></script> | |
<script> | |
// DOM が描画されるまで待つ | |
setTimeout(vue, 1000); | |
function vue() { | |
new Vue({ |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<div id="app"> | |
<header> | |
<button v-on:click="show=!show">切り替え</button> | |
</header> |
This file contains 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
set mouse=a | |
set clipboard+=unnamedplus | |
set runtimepath+=/Users/ユーザ名/.cache/dein/repos/github.com/Shougo/dein.vim | |
if dein#load_state('/Users/ユーザ名/.cache/dein') | |
call dein#begin('/Users/ユーザ名/.cache/dein') | |
call dein#add('/Users/ユーザ名/.cache/dein/repos/github.com/Shougo/dein.vim') | |
" ale に乗り換えたい... | |
call dein#add('scrooloose/syntastic') |
This file contains 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
class ClassMethod(object): | |
"Emulate PyClassMethod_Type() in Objects/funcobject.c" | |
def __init__(self, f): | |
self.f = f | |
def __get__(self, obj, klass=None): | |
... # ここを実装してください。 | |
def __call__(self, *args, **kwargs): |
This file contains 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
"""Send an email from Gmail. | |
Before execute this code, you have some tasks. | |
1) for temporary | |
Turn on the flag "Allow less secure apps" | |
from the follwoing link. | |
https://myaccount.google.com/lesssecureapps | |
or |
This file contains 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
# 偶数だけ取得します。 | |
lst = [1, 2, 3, 4, 5, 6, 7] | |
new_lst = list(filter(lambda x: x % 2, lst)) | |
print(new_lst) | |
# [1, 3, 5, 7] |
NewerOlder