環境
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
import sys | |
import json | |
import subprocess | |
import time | |
# flatten_data: https://stackoverflow.com/questions/51359783/how-to-flatten-multilevel-nested-json | |
def flatten_data(y): | |
out = {} | |
def flatten(x, name=''): |
C:\msys64\usr\bin\env.exe MSYSTEM=MINGW64 /usr/bin/script -q -f -c "/usr/bin/bash --login -i"
script -q -f -c tmux /dev/null |
WinAppDriverはメンテされていないようだが、なんとかして動かす方法のめも。
pip install Appium-Python-Client==2.0.0 selenium==4.0.0
import logging | |
logging.basicConfig() | |
logger = logging.getLogger(os.path.basename(__file__)) | |
logger.setLevel(logging.INFO) | |
logger.info("info") |
import aiohttp | |
import aiohttp.web | |
import aiohttp_basicauth | |
headers = { | |
"sec-ch-ua": "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Google Chrome\";v=\"126\"", | |
"sec-ch-ua-mobile": "?0", | |
"sec-ch-ua-platform": "\"Windows\"", | |
"Referrer-Policy": "origin", | |
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36', |
import urllib.request | |
import json | |
import os | |
import sys | |
import tqdm | |
import glob | |
genre_code = "portrait" | |
rankings_limit = 20 |
Import-Module PSReadLine | |
Set-PSReadlineOption -EditMode Emacs | |
Set-PSReadLineKeyHandler -Key Ctrl+d -Function DeleteChar | |
Set-PSReadLineKeyHandler -Chord Ctrl+LeftArrow BackwardWord | |
Set-PSReadLineKeyHandler -Chord Ctrl+RightArrow ForwardWord | |
Set-Alias -Name curl -Value ${Env:windir}\system32\curl.exe -O AllScope |
import json | |
import sys | |
import time | |
import contextlib | |
# import os | |
from appium import webdriver | |
from appium.options.common.base import AppiumOptions | |
from appium.webdriver.common.appiumby import AppiumBy |