Detailed profile is available at: https://o0i.es/profile.html
View yamltodir.rb
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
# usage: ruby yamltodir.rb some.yaml dest_dir | |
require 'yaml' | |
require 'fileutils' | |
def create_files(data, path='') | |
if data.is_a? Hash | |
FileUtils.mkdir_p path | |
data.each do |key, value| | |
escaped_key = key.gsub('/', '_') |
View slugadd.rb
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
# $ ruby slugadd.rb path/to/dir | |
dirname = ARGV[0] || '.' | |
notes = Dir.children dirname | |
notes.each do |path| | |
abspath = dirname + "/" + path | |
# subdirectories and non-Markdown files are ignored | |
next if File.directory? abspath | |
next unless abspath.end_with? ".md" |
View init.vim
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
set completeopt=menuone,noinsert,noselect | |
set shortmess+=c | |
"" lightline | |
let g:lightline = { | |
\ 'active': { | |
\ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'filename', 'modified' ] ], | |
\ 'right': [ | |
\ [ 'lineinfo' ], | |
\ [ 'percent' ], | |
\ [ 'fileencoding', 'filetype'] |
View exec.txt
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
$ python report-s2-3.py | |
First(Tuple(true, false)): true | |
Second(Tuple(true, false)): false | |
(Cons 4 nil): [4] | |
x = (Cons 3 (Cons 2 (Cons 1 nil))): [3, 2, 1] | |
Head x: 3 | |
Tail x: [2, 1] | |
Head(Tail x): 2 | |
At(0 x): 3 | |
At(1 x): 2 |
View e1704-10.drawio
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
<mxfile host="app.diagrams.net" modified="2021-12-17T05:15:45.332Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36" etag="qexJXk8HdKrasymOLlqe" version="15.9.6" type="device"><diagram id="PLOPOj5SmkhTFwGQXCwU" name="Page-1">7V1Ld6M2FP41LKcHxEtaguO0i+nptFm0XfUwMWMzJSbFZJL011cSEhjpOsYMDxdyjhfiAgJ073dfupINe/Xw8mMePe5+zjZxaiBz82LYNwZCloOQwX7m5rWk+MQpCds82YiLasJd8m8siKagPiWb+NC4sMiytEgem8T7bL+P74sGLcrz7Ll52ZcsbT71MdrGGuHuPkp16u/JptiVVIz8mv5TnGx38smWR8ozD5G8WHzJYRdtsucjkr027FWeZUXZenhZxSkbPDku5X23J85WL5bH+6LNDXcPv/z1q/kpSj9+JSj2P/so/u2D+IxD8So/ON7Q7xeHWV7ssm22j9J1TQ3z7Gm/iVmvJj2qr/mYZY+UaFHi17goXgUzo6cio6Rd8ZCKs/FLUvzBbv/BFUd/Hp25eRE984NXcVC+J3u5k58vSIfsKb+P3/hmqxp8KrVx9hAX+Su9L4/TqEi+NfuPhPhsq+uqWz9lCX0yMoWoE8FmIefYNJs9FFG+jQtxU80m2jh6i5rEmXcBI8X7fovSJ/EFxto1Qmxg2vCM0DSIpfG6ycnnXVLEd48RH7xnCucm18QD4ryIX97mgT624ga7OUaWHLPnGlmWhMvuCFWeeZobjYG8dNTwAsUfDSL+yOkm/0GeR69Hlz2yCw7tn2O7ita77HraKN+gVzAiAIw2Q2Jo84ZthCvRCEJ5KpSnbEm5rS+eGrkWvjbokgVC1x4EuvbEpssG0 |
View config.fish
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
if status is-interactive | |
# Commands to run in interactive sessions can go here | |
end | |
zoxide init fish | source | |
alias ls=exa | |
xkbcomp ~/.Xkeymap $DISPLAY 2>/dev/null | |
function cl | |
cd $argv |
View syllabus.js
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 fs = require("fs") | |
const path = require("path") | |
const puppeteer = require("puppeteer") | |
async function getSyllabus(browser, schoolId, departmentId, year, lang) { | |
const page = await browser.newPage() | |
const url = `https://syllabus.kosen-k.go.jp/Pages/PublicSubjects?school_id=${schoolId}&department_id=${departmentId}&year=${year}&lang=${lang}` |
View kochi.fish
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
#!/bin/bash | |
set B $PWD | |
set DIR $PWD/www.ge.kochi-ct.ac.jp/~kyozai/hennyu | |
for year in (seq 100)[8..26] | |
wget --mirror --no-parent http://www.ge.kochi-ct.ac.jp/~kyozai/hennyu/h{$year}/ | |
end | |
mv $DIR . | |
rm -rf www.ge.kochi-ct.ac.jp |
View tello.py
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
import socket | |
import threading | |
import time | |
import cv2 | |
from easytello.stats import Stats | |
class Tello: | |
def __init__(self, tello_ip: str='192.168.10.1', debug: bool=True): | |
# Opening local UDP port on 8889 for Tello communication | |
self.local_ip = '' |
NewerOlder