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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import openpyxl | |
import os | |
def recreate_data(filename): | |
if os.path.exists(filename): | |
os.remove(filename) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
pyautoguiでイメージ認識、キーボード入力 | |
メモ帳を画面キャプチャしてmemo.pngとして保存する必要あり。 | |
""" | |
import pyautogui | |
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
#!/usr/bin/env python | |
""" | |
pyautoguiを使う | |
""" | |
import pyautogui | |
class Status: | |
def __init__(self): | |
self.x, self.y = pyautogui.position() |
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
#!/usr/bin/env python | |
""" | |
seleniumをPython3で使う。 | |
Pythonのseleniumの3.6.0では、FirefoxでもWebDriverが必要だった。昔は不要だった。 | |
そのため、Chromeで試した。 | |
-- | |
chromeDriver - WebDriver for Chrome | |
https://sites.google.com/a/chromium.org/chromedriver/downloads | |
-- |
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
# -*- coding:utf-8 -*- | |
""" | |
XKCDコミックのサイトからコミックをダウンロードする。 | |
httpsには対応していない。 | |
https://automatetheboringstuff.com/chapter11/ | |
""" | |
import bs4 | |
import os | |
import requests |
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
# -*- coding:utf-8 -*- | |
""" | |
Google検索ツール | |
https://automatetheboringstuff.com/chapter11/ | |
""" | |
import requests | |
import sys | |
import webbrowser | |
import bs4 |
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
# -*- coding:utf-8 -*- | |
""" リスト内包表記で、タプルデータからクラス型で取り出す。""" | |
class Person: | |
def __init__(self, name, age: int, email): | |
self.name = name | |
self.age = age | |
self.email = email |
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
# -*- coding:utf-8 -*- | |
""" 数あてゲーム """ | |
import random | |
class GuessTheNumber: | |
""" 数あてゲーム """ | |
VERSION = 1.0 |
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> | |
<svg width="1024" height="1024" font-family="sans-serif" font-size="10" text-anchor="middle"></svg> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script> | |
var svg = d3.select("svg"), | |
width = +svg.attr("width"), | |
height = +svg.attr("height"); | |
var format = d3.format(",d"); |
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
/*jshint esversion: 6 */ | |
function setup() { | |
createCanvas(720, 720, WEBGL); | |
rectMode(CENTER); | |
noStroke(); | |
colorMode(HSB, 255); | |
} | |
function thing(q) { | |