Skip to content

Instantly share code, notes, and snippets.

View matsu7874's full-sized avatar

Kentaro Matsumoto matsu7874

View GitHub Profile
@matsu7874
matsu7874 / data.csv
Created July 31, 2024 00:25
2024/7/20, 2024/7/21の室温・湿度データ
datetime temperature humidity
2024/7/20 0:00:41 21.8 65
2024/7/20 0:05:41 21.8 65
2024/7/20 0:10:41 21.8 65
2024/7/20 0:15:41 21.2 65
2024/7/20 0:20:41 21.8 66
2024/7/20 0:25:41 21.8 66
2024/7/20 0:30:41 21.8 67
2024/7/20 0:35:41 21.8 67
2024/7/20 0:40:41 21.8 67
@matsu7874
matsu7874 / run.py
Created December 12, 2021 13:30
AHCで手元で複数ケース実行するためのスクリプト
import subprocess
import pipes
import multiprocessing
CASE = 150
TL = 2.0
def execute_case(seed):
input_file_path = f'tools/in/{seed:04}.txt'
output_file_path = f'tools/out/{seed:04}.txt'
with open(input_file_path) as fin:
@matsu7874
matsu7874 / index.html
Created June 15, 2019 16:32
名札作成用CSS
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="print.css">
@matsu7874
matsu7874 / knj.py
Created September 9, 2017 05:34
Project KNJ
import collections
import random
import bisect
BOL = '\\^'
EOL = '\\$'
def main():
word_word_cnt = collections.defaultdict(lambda: collections.defaultdict(int))
reversed_word_word_cnt = collections.defaultdict(lambda: collections.defaultdict(int))
@matsu7874
matsu7874 / gist:02fae79dd109b899299390c701b14001
Created April 16, 2017 01:02
Markdownのヘッダーをリストに変換して目次にする
import sys
def header_to_list(s):
header_level = 0
for c in s:
if c == '#':
header_level += 1
else:
break
ret = []