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
| ! :style() CSSの特定箇所を書き換える !importを含んでいると競合の中で優先される :の前後のスペースに注意 | |
| !例) freeskier.com##h1:style(background-color:blue !important) | |
| ! Youtube | |
| ! uBlockOriginによるブロックが異様なほど頻発する問題の解決 | |
| @@||s.youtube.com/api/*$first-party | |
| @@||www.youtube.com/youtubei/*$first-party | |
| @@||www.youtube.com/api/stats/qoe$other,first-party | |
| @@||www.youtube.com/live_204$image,first-party |
(厳密な定義は難しいが)子供向けアニメを除くこれまで見てきたアニメを放送年度ごとに列挙する。
途中までしか見ていない、又はどこまで見たのかが不明なものはコメントアウトする。
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 tkinter as tk | |
| root = tk.Tk() | |
| label = tk.Label(root, text="0") | |
| label.grid() | |
| def pushed(): | |
| label["text"] = int(label["text"]) + 1 |
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
| from time import sleep | |
| from adb.client import Client as AdbClient # pip install pure-python-adb | |
| # Default is "127.0.0.1" and 5037 | |
| client = AdbClient(host="127.0.0.1", port=5037) | |
| devices = client.devices() | |
| device = devices[0] | |
| ret = device.shell("wm size") |
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 matplotlib.pyplot as plt | |
| import numpy as np | |
| # 各座標に対して0となった点をつないで線にする | |
| delta = 0.025 # 点の間隔 | |
| # x, y座標 | |
| xrange = np.arange(-2, 2, delta) | |
| yrange = np.arange(-2, 2, delta) |
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 pretty_midi | |
| # MIDIを作成 | |
| chord = pretty_midi.PrettyMIDI() | |
| # 楽器を選択 | |
| program = pretty_midi.instrument_name_to_program('Acoustic Grand Piano') | |
| piano = pretty_midi.Instrument(program=program) | |
| # 音を入れていく |
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 cv2 # pip install opencv-pythonを実行してね | |
| # カメラを取得 | |
| cap = cv2.VideoCapture(0) | |
| while True: | |
| ret, frame = cap.read() | |
| if not ret: | |
| break |
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
| Array.from(document.getElementsByTagName("video")) | |
| .forEach(element => { | |
| Object.defineProperty(element, 'playbackRate', { | |
| get: function () { | |
| return 1; | |
| } | |
| }); | |
| }); |