Skip to content

Instantly share code, notes, and snippets.

View yosukesan's full-sized avatar
🐗
Look for a new job

Yosukesan yosukesan

🐗
Look for a new job
  • Gumma, Japan
View GitHub Profile
.text_install:
virt-install \
--name test1 \
--ram 1024 \
--vcpus 1 \
--location http://deb.debian.org/debian/dists/stable/main/installer-amd64/ \
--os-variant debian10 \
--virt-type kvm \
--network bridge=virbr0 \
--disk $(shell pwd)/test1.img,size=16,pool=default \
#!/bin/bash
#
# make typescript env in docker and run main.ts
#
if [ $# != 1 ]; then
echo "usage: docker_tsc \${file}.ts"
exit 1
fi
import matplotlib.pyplot as plt
import pandas as pd
import datetime as dt
df = pd.DataFrame(columns=['Sales'],
index=[dt.datetime(2022,1,1), dt.datetime(2022,1,2), dt.datetime(2022,1,3), dt.datetime(2022,1,4)])
df['Sales'] = [100,200,500,-100]
df['Change in %'] = df.pct_change()
#df = df.fillna(0)
function join(){
# join *.mp3 narration files in current dir
MOVIE_FILE="join.list"
if [ -f $MOVIE_FILE ]; then
rm $MIVIE_FILE
fi
def deep_union(a, b):
if not isinstance(a, dict):
TypeError("a is not dict")
if not isinstance(b, dict):
TypeError("b is not dict")
if a == b:
return a