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
Sub MakeFilter() | |
' ウィンドウ枠の固定 | |
If ActiveWindow.FreezePanes = True Then | |
ActiveWindow.FreezePanes = False | |
End If | |
If Selection(1) = Range("A1") Then | |
Range("B2").Select | |
End If |
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 | |
from pathlib import Path | |
import sys | |
import fitz # pip install pymupdf==1.23.21 | |
def convert_to_relative_path(pdf_path: str): | |
"""Convert file links in pdf from absolute paths to relative paths. |
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 | |
import re | |
import sys | |
import fitz | |
def remove_localhost_from_pdf( | |
pdf_filename: str, pattern: re.Pattern = re.compile(r"^http://localhost:\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
import base64 | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.common.print_page_options import PrintOptions | |
url = "https://example.com/" | |
url = "https://pathway-viewer.toolforge.org/embed/WP1" | |
window_width, window_height = 800, 600 |
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
@echo off | |
echo 同じフォルダにあるすべての svg を結合して 1 つの pdf ファイルにします | |
if exist "*.pdf" ( | |
echo PDF が存在します。処理を中止します。 | |
pause | |
exit /b | |
) | |
set /p output=出力ファイル名を入力してください(拡張子不要、初期値: output): |
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
@echo off | |
curl https://raw.githubusercontent.com/twitter/twemoji/master/assets/svg/%1.svg > %1.svg | |
magick -density 1024 -gravity center -background white %1.svg -extent 512x512 %1.png |
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 itertools import product | |
from typing import Tuple | |
def get_total_points(a:int, c:int, d:int, p:float, q:float) -> Tuple[float]: | |
""" | |
クイズかくれんぼの子・鬼の合計得点を全探索で取得する。 | |
Parameters | |
---------- | |
a : int |