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
githubへ登録 | |
=========== | |
git remote add origin [email protected]:<username>/<application_name>.git | |
git push origin master | |
初期設定 | |
======= | |
git config --global user.name "Foo Bar" | |
git config --global user.email "[email protected]" |
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
class Prime: | |
def __init__(self): | |
self.found = [] | |
self.i = 2 | |
self.idx = -1 #Iterator用 | |
def __getitem__(self, n): #n番目の素数が見つかるまでwhileを回す | |
while len(self.found) < n+1: #すでに見つかっていれば定数時間ですむ | |
if not any(self.i % x == 0 for x in self.found): | |
self.found.append(self.i) |
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
/*Overrides font-family value for backslashes.*/ | |
.fig { | |
font-family: Consolas, monospace !important; | |
} |
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{ | |
font-family:'Arial', 'ヒラギノ角ゴ3', 'Meiryo' !important; | |
background:#fff !important; | |
font-size:17px !important; | |
} | |
h1{ | |
border:0px !important; | |
font-family:'Arial', 'ヒラギノ角ゴ3', 'Meiryo' !important; | |
font-weight:700 !important; | |
font-size:36px !important; |
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
unbind C-b | |
set -g prefix C-a | |
# If the escape delay persists, try setting `set keyseq-timeout 1` in .inputrc . | |
set -g escape-time 0 | |
# Split | |
bind | split-window -h | |
bind - split-window -v |
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
.IZ65Hb-YPqjbf.CmABtb-YPqjbf { | |
font-family: Meiryo; | |
} | |
.IZ65Hb-YPqjbf { | |
font-family: Roboto Condensed, Meiryo; | |
} |
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 re #regex | |
import requests as req | |
from bs4 import BeautifulSoup as bs | |
def get_text(url): | |
src = req.get(url) | |
return src.text.encode(src.encoding) | |
def get_price(product_url): | |
soup = bs( get_text(product_url) ) |
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
#文字数を各文字ごとに数えてタプルのリストで返す | |
#Count characters and return the result with list of tuples. | |
#e.x. c('bbaaac') = [('a', 3), ('b', 2), ('c', 1)] | |
count = lambda s: [(c,s.lower().count(c)) for c in sorted(set(s.lower()))] | |
#6ケタのHEXを3つのDECのリストにして返す | |
#Convert 6 digits HEX in 3 decimals and return tuple. | |
#e.x. d('0099CC') = [0, 153, 204] | |
hexcol = lambda h: [int(h[i:i+2],16) for i in range(0, len(h), 2)] |
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
/*Fonts, Colors*/ | |
.ace_content{ | |
font-family: "Consolas", "Source Han Code JP Medium"; | |
} | |
.jupyter-output{ | |
background-color: #272822 !important; | |
} |
OlderNewer