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
import cv2 | |
import numpy as np | |
import glob | |
import os | |
import getpass | |
# パラメータ設定 | |
contrast_adjustment_value = 1.5 # コントラスト調整値 | |
chroma_key_color = np.uint8([[[0, 255, 0]]]) # クロマキー処理の指定色(緑色) | |
chroma_key_threshold = 20 # クロマキー処理の閾値 |
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
import cv2 | |
import glob | |
import os | |
import getpass | |
# 入出力フォルダのパス | |
import_file = os.path.join("インポートしたい画像のフォルダパス") | |
export_file = os.path.join("エクスポートしたい画像のフォルダパス") | |
def main(): |
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
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
import os | |
import getpass | |
import csv | |
import time | |
# フォルダパス | |
html_track_dir = os.path.join(HTMLが保存されているフォルダ) | |
html_analysis_dir = os.path.join(解析結果を保存するフォルダ) |
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
import os | |
import getpass | |
import csv | |
from bs4 import BeautifulSoup | |
# フォルダパス | |
html_track_dir = os.path.join(HTMLが保存されているフォルダ) | |
html_analysis_dir = os.path.join(解析結果を保存するフォルダ) | |
# 指定のクラス名とタグ名 |
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
from selenium import webdriver | |
from time import sleep | |
from selenium.webdriver.chrome.service import Service | |
from webdriver_manager.chrome import ChromeDriverManager | |
driver_path = ChromeDriverManager().install() | |
driver = webdriver.Chrome(service=Service(executable_path=driver_path)) | |
driver.get("開きたいページのURL") |
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
import math | |
######### | |
### 1 ### | |
######### | |
print(math.pi) | |
#結果:3.141592653589793 | |
######### | |
### 2 ### |
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
SECTION_KEY_DEFAULT = 0 | |
SECTION_KEY_A = 1 | |
SECTION_KEY_B = 2 | |
OPTION_KEY_A = "A" | |
OPTION_KEY_B = "B" | |
#コンフィグ設定をまとめたリスト | |
config_list = { | |
SECTION_KEY_DEFAULT: {OPTION_KEY_A: 0, OPTION_KEY_B: 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
import TomoGBlog.settings as tomog | |
################# 1 ################ | |
from importlib import reload | |
tomog = reload(tomog) | |
###################################### | |
################# 2 ################ | |
#セクションキーを指定 | |
section_key = 5 |
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
### 1 ### | |
import math | |
print(math.pi) | |
### 2 ### | |
from math import pi | |
print(pi) | |
### 3 ### | |
import math as a |
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
import os | |
import getpass | |
import configparser | |
config_file = os.path.join('INIファイルのパス') | |
#コンフィグのセクション | |
CONFIG_SECTION = "Key1" | |
#コンフィグのオプション |
NewerOlder