Skip to content

Instantly share code, notes, and snippets.

import pandas as pd
import plotly.graph_objects as go
from tkinter import filedialog, Tk
import re
from collections import defaultdict
def select_file():
"""
Open a file dialog to select a log file.
"""
@tohutohu
tohutohu / isucon9.yaml
Last active November 21, 2023 11:10
ISUCON9 予選素振り用 CloudFormation 簡易ポータル付き
AWSTemplateFormatVersion: '2010-09-09'
Description: 'ISUCON9 Qualifier template'
Parameters:
KeyPairName:
Description: "Amazon EC2 Key Pair"
Type: AWS::EC2::KeyPair::KeyName
GitHubUsername:
Description: "GitHub Username for SSH public key"
Type: String
AWSTemplateFormatVersion: 2010-09-09
Description: >-
AWS CloudFormation for Carefully start ISUCON from the beginning
Parameters:
GitHubID:
Type: String
Description: Your GitHub ID (use for getting public key)
Resources:
GetAvailabilityZoneFunctionExecutionRole:
Type: AWS::IAM::Role
@tohutohu
tohutohu / private-isu.yaml
Last active December 30, 2023 04:20
private-isu素振り用Cloud Formation 東京リージョンで作成してください
AWSTemplateFormatVersion: '2010-09-09'
Description: private-isu template
Parameters:
KeyPairName:
Description: "Amazon EC2 Key Pair"
Type: AWS::EC2::KeyPair::KeyName
GitHubUsername:
Description: "GitHub Username for SSH public key"
Type: String
@tohutohu
tohutohu / bashrc
Last active November 15, 2019 07:30
attach() {
name=$1
if [ "${name:0:1}" = "r" ]; then
docker exec -it --user 1000 $name /bin/bash
else
lxc exec $name /bin/bash
fi
}
add_nic() {
const po = 0
const vm = new Vue()