Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sub member()
'sheet("スタッフ")に入力されている人数をカウント
'セルの結合をしているため数値を2倍に増やす
last_column = Worksheets("スタッフ").Cells(4, 2).End(xlDown).row * 2
'日付をカウント
last_row = Worksheets("出勤表").Cells(2, 7).End(xlDown).row
import requests
from bs4 import BeautifulSoup as bs
import sqlite3
import time
from tqdm import tqdm
url = "http://www.nogizaka46.com/member/"
header = {"User-Agent" : "Mozilla/5.0"}
soup = bs(requests.get(url, headers=header).content, 'html.parser')
@htmllifehack
htmllifehack / KerasでMNIST.ipynb
Last active August 17, 2018 13:45
KerasでMNIST
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@htmllifehack
htmllifehack / Caesar_cipher.py
Last active June 22, 2018 16:21
3 characters shift by decript.
s = 'fsdz{Fdhvdu_flskhu_lv_fodvvlfdo_flskhu}'
list_ = []
for asc in s:
asc = ord(asc)
if 64 < asc < 91:
list_.append(chr(asc - 3))
elif 96 < asc < 123:
list_.append(chr(asc - 3))
@htmllifehack
htmllifehack / pytube.py
Last active June 22, 2018 16:17
Download YouTube videos and music.
# coding:utf-8
from pytube import YouTube
import subprocess
import os
import glob
url = input('>> Prease enter URL : ')
yt = YouTube(url)
Sub check() '6連勤していないかチェックするためのプロシージャ
For Column = 6 To 35
For Row = 32 To 38
Cells(Row, Column).Interior.ColorIndex = 2
If Cells(Row, Column) = 6 Then 'もしF32~AI38の中に6がある場合
Cells(Row, Column).Interior.Color = RGB(255, 100, 100) '背景を赤く塗りつぶし
Call shuffle 'シフトを生成し
Range("f21:l27").Copy '生成したシフトをコピーし
Range("f8").Offset(0, Range("c30") * 7).PasteSpecial '1か月分のシフト表に張り付け
import requests
from bs4 import BeautifulSoup
url = 'http://www.nogizaka46.com/member/'
headers = {'User-Agent':'Mozilla/5.0'}
soup = BeautifulSoup(requests.get(url,headers=headers).content,'html.parser')
member = []