Skip to content

Instantly share code, notes, and snippets.

View tango_choices.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View optim_patent_analysis3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View optim_patent_analysis2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View optim_patent_analysis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View rogo_visualization_1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View rogoデータ整理.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@obafgkm44
obafgkm44 / roots_getter.py
Created April 3, 2019 18:43
スクレイピングーー語源で英単語を増やす
View roots_getter.py
import requests
from bs4 import BeautifulSoup as bs4
#<td>のタグを抽出する
r = requests.get('http://gogengo.me/roots')
data = bs4(r.text,'html.parser')
elems = data.findAll("td")
#テキストを画面に出力する
for e in elems:
@obafgkm44
obafgkm44 / img_resize.py
Last active March 31, 2019 17:12
画像を切り取る
View img_resize.py
# ダウンロードした画像を画面に表示する
import matplotlib.pyplot as plt
import cv2
# 画像を読み込む
img = cv2.imread("sakura.jpg")
#一部を切り取り
im = img[100:300,100:300]
@obafgkm44
obafgkm44 / img_getter.py
Last active March 31, 2019 17:10
画像のダウンロードとその画像を画面に表示させる
View img_getter.py
# 画像のダウンロード
import urllib.request as req
url = "https://amd.c.yimg.jp/amd/20190331-00000059-asahi-000-2-view.jpg"
req.urlretrieve(url,"sakura.jpg")
# ダウンロードした画像を画面に表示する
import matplotlib.pyplot as plt
import cv2
# 画像を読み込む
img = cv2.imread("sakura.jpg")
@obafgkm44
obafgkm44 / english_words_scraping.py
Last active March 28, 2019 09:16
スクレイピングの練習 必要なタグを抽出する
View english_words_scraping.py
import requests
import time
from bs4 import BeautifulSoup
response = requests.get('https://toiguru.jp/toeic-vocabulary-list#smoothplay1')
soup = BeautifulSoup(response.text,'lxml')
words = soup.findAll('td')
for word in words: