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
const spawn = require('child_process').spawn; | |
const execFile = require('child_process').execFile; | |
const ffmpeg = process.env.FFMPEG; | |
const ffprobe = process.env.FFPROBE; | |
const input = process.env.INPUT; | |
const output = process.env.OUTPUT; | |
const isDualMono = parseInt(process.env.AUDIOCOMPONENTTYPE, 10) == 2; | |
const args = ['-y']; |
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 python3 | |
from pathlib import Path | |
from typing import Union, Tuple, List, NamedTuple, Dict | |
import sys | |
class Block(NamedTuple): | |
name: str | |
created: int | |
updated: int |
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 python3 | |
# -*- coding: utf-8 -*- | |
""" | |
set_pdf_dir.py | |
Set direction and/or page layout properties of PDF files. | |
Usage: | |
$ ./set_pdf_dir.py -l r2l -d book -o my_pdf_1.pdf my_pdf_2.pdf |
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 -*- | |
"""HCP Downloader | |
This script fetches preprocessed BOLD timeseries in grayordinate space | |
for all subjects from Human Connectome Project S3 repository | |
""" | |
import sys | |
import os | |
import os.path |
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 kanjize import kanji2int | |
import re | |
exprs = [ | |
(r'月([〇一二三四五六七八九十壱弐参拾百千万萬億兆]+)日', 1), # 三月二十八日 | |
(r'年([〇一二三四五六七八九十壱弐参拾百千万萬億兆]+)月', 1), # 昭和四十二年三月 | |
(r'(明治|大正|昭和|平成|令和)([〇一二三四五六七八九十壱弐参拾百千万萬億兆]+)年', 2), # 昭和四十二年 | |
(r'第([〇一二三四五六七八九十壱弐参拾百千万萬億兆]+)(章|節|条|項|号)', 1), # 第二十三条 | |
(r'[〇一二三四五六七八九十壱弐参拾百千万萬億兆]+の([〇一二三四五六七八九十壱弐参拾百千万萬億兆]+)', 1), # 第十九条の六の十五 | |
(r'条の([〇一二三四五六七八九十壱弐参拾百千万萬億兆]+)', 1), # 第十九条の六 | |
(r'^([〇一二三四五六七八九十壱弐参拾百千万萬億兆]+)', 1), # <行頭>二 |
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 python3 | |
# -*- coding: utf-8 -*- | |
"""eijiro.py - convert EIJIRO text data into JSON format | |
Input: Raw EIJIRO text data (can be purchased from https://booth.pm/ja/items/777563 ) | |
Output: Dictionary data in JSON format | |
< Data Schema > |
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 python3 | |
# -*- coding: utf-8 -*- | |
from urllib.request import urlopen | |
import re | |
import json | |
from pprint import pprint | |
from bs4 import BeautifulSoup | |
BASE_URL = 'http://www.club.t-fal.co.jp' | |
LIST_URL = BASE_URL + '/recipe/category/c4m-express/{: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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import sys | |
import re | |
import os.path | |
timecode_pat = re.compile(r'\[(\d{2}:\d{2}:\d{2})\]') | |
timecode_parser = re.compile(r'(\d{2}):(\d{2}):(\d{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
#!/usr/bin/env python | |
from Bio import SeqIO | |
from Bio.SeqRecord import SeqRecord | |
from Bio.Seq import Seq | |
from Bio.Blast.Applications import NcbiblastpCommandline | |
from Bio.Blast import NCBIXML | |
import sys | |
if sys.hexversion >= 0x3000000: | |
from io import StringIO | |
else: |