Skip to content

Instantly share code, notes, and snippets.

Avatar

Seio Inoue sei0o

View GitHub Profile
@sei0o
sei0o / init.vim
Created Aug 19, 2022
neovim config as of Aug 19, 2022
View init.vim
set completeopt=menuone,noinsert,noselect
set shortmess+=c
"" lightline
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'filename', 'modified' ] ],
\ 'right': [
\ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileencoding', 'filetype']
@sei0o
sei0o / exec.txt
Created Jun 17, 2022
Implementation of lists and convenient lambda functions
View exec.txt
$ 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 pinned.md
View e1704-10.drawio
<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
@sei0o
sei0o / config.fish
Last active Dec 6, 2021
some config
View config.fish
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
@sei0o
sei0o / syllabus.js
Last active Sep 29, 2021
MCC移行後の高専カリキュラムを取得する
View syllabus.js
//
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
#!/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
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 = ''
@sei0o
sei0o / controller.py
Created Nov 17, 2020
CLI-based controllers for Tello
View controller.py
from easytello import tello
import cv2
import numpy as np
import time
# TELLO = False
TELLO = True
STEP = 50
d = tello.Tello()
@sei0o
sei0o / cam.py
Last active Oct 21, 2020
Use EasyTello + OpenCV to obtain the video stream from Tello
View cam.py
from easytello import tello
import time
import cv2
# see: https://stackoveflow.com/questions/50916903
d = tello.Tello()
d.takeoff()
d.streamon()