Skip to content

Instantly share code, notes, and snippets.

import json
import pandas as pd
import datetime
def fmttime(sec):
secs = sec#millisecs / 1000.0
d = datetime.timedelta(seconds=secs)
t = (datetime.datetime.min + d).time()
milli = t.strftime('%f')[:3]
value = t.strftime('%H:%M:%S,') + milli
@dauuricus
dauuricus / covid_opendata_graph.py
Last active March 17, 2021 17:38
jupyter notebook or google colab
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import pandas as pd
plt.style.use('ggplot')
#mhlw1 = pd.read_csv("https://www.mhlw.go.jp/content/pcr_positive_daily.csv", parse_dates=['日付'])
#mhlw2 = pd.read_csv("https://www.mhlw.go.jp/content/death_total.csv", parse_dates=['日付'])
#!wget https://www.mhlw.go.jp/content/death_total.csv
@dauuricus
dauuricus / vosk_chinese.ipynb
Created March 29, 2021 16:09
vosk_chinese.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dauuricus
dauuricus / golang-notebook.ipynb
Last active December 14, 2021 04:57
Golang Notebook.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dauuricus
dauuricus / ruby_selenium_setting.ipynb
Last active August 5, 2021 05:07
ruby_selenium_setting.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/*go get github.com/mattn/go-sqlite3
/*go get github.com/PuerkitoBio/goquery
/*/
package main
import (
"fmt"
"io"
"database/sql"
"io/ioutil"
@dauuricus
dauuricus / conf.lua
Last active September 28, 2021 03:21
LÖVE 2D snake game for 10inch amazon fire tablet.
function love.conf(t)
t.window.width = 12 * 105
t.window.height = 12 * 57
end
@dauuricus
dauuricus / conf.lua
Last active September 29, 2021 06:31
love2d
function love.conf(t)
t.window.width = 23 * 56
t.window.height = 23 * 31
end
(ql:quickload "drakma")
(defun x (y)
(dotimes (n y)
(setq res
(drakma:http-request "https://mangabank.org/watch/?tour=/vol/"))
(setq title_tag (ppcre:scan-to-strings "(?<=title\\>).*?(?=\\<)" res))
(if (setq author2 (ppcre:scan-to-strings "(?<=\\[).*?(?=\\])" title_tag))
(setq author author2)
(setq author "?"))