This file contains hidden or 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
""" | |
このスクリプトはなに? | |
各種実験データの動画(mp4)のサムネイルを作ります。 | |
実行したディレクトリ配下のすべてのmp4をrecurciveに取得し、 | |
「そのmp4の配下のgifディレクトリ」にmp4を作ります。 | |
サムネイルは1,2,3,4,11,22,33...%の時間軸を切り取ります | |
また、実行時に元のmp4がなくなったgifを削除します。 | |
""" |
This file contains hidden or 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
ZSHのscriptです..zshrcなどに書いてください. | |
■traceasnumの使い方 | |
[kanai@www:33864]traceasnum www.ocn.ad.jp | |
traceroute to www.ocn.ad.jp (180.37.192.133), 20 hops max, 60 byte packets | |
1 202.133.x.x [AS9597] 1.442 ms | |
2 10.0.11.89 [*] 0.719 ms | |
(略) | |
9597 -> 2497 -> 4713 ★これがAS番号pathですを表示します | |
CPI-NET -> IIJ -> OCN ★as pasthのAS番号をwhois.cymru.comでlookupします |
This file contains hidden or 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
# https://note.nkmk.me/python-pillow-gif/ | |
# https://note.nkmk.me/python-pillow-rotate/ | |
from PIL import Image, ImageDraw | |
from copy import deepcopy | |
images = [] | |
colorWhite = (255, 255, 255,0) | |
fn_arupaka = "./kawa.png" | |
fn_question = "./nc97468_ns.png" |
This file contains hidden or 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
/* | |
0(000000000): -2147483648-keta | |
1(000000000): 1-keta | |
2(000000000): 2-keta | |
3(000000000): 2-keta | |
4(000000000): 3-keta | |
5(000000000): 3-keta | |
6(000000000): 3-keta | |
7(000000000): 3-keta | |
8(000000000): 4-keta |
This file contains hidden or 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
#include <iostream> | |
#define 始め main() | |
#define 出力 std::cout | |
#define 整数で返ってくる int | |
#define を定義して { | |
#define 出力したい | |
#define . ; | |
#define おわり } | |
#define したい << | |
#define ほげ "hoge" |
This file contains hidden or 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
# アルゴリズムイントロダクション 15.4 LCS | |
def lcs_length(x, y): | |
m, n = len(x), len(y) | |
b = [[0 for _ in range(n+1)] for _ in range(m+1)] | |
c = [[0 for _ in range(n+1)] for _ in range(m+1)] | |
for i in range(1, m+1): | |
for j in range(1, n+1): | |
if x[i-1] == y[j-1]: | |
c[i][j] = c[i-1][j-1] + 1 | |
b[i][j] = '↖' |
This file contains hidden or 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
# apのcsvファイルをここに張る | |
$apcsv=@" | |
6c:e4:da:ff:ff:ff,ap-ateam001 | |
"@ | |
################################## | |
# AP Listの用意 | |
$aptable=@{} | |
# AP CSVからAP Listにインポートする | |
foreach($apstr in $apcsv){ |
This file contains hidden or 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
class UnionFind(object): | |
par = [] | |
def __init__(self, n): | |
for i in range(n): | |
self.par.append(i) | |
def root(self, x): | |
if self.par[x] == x: | |
return x |
This file contains hidden or 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
// ATTINY13A 4.8M前提 | |
#define F_CPU 4800000L | |
#define soundA 38 | |
#define soundB 47 | |
#include <avr/io.h> | |
#include <avr/interrupt.h> |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Input; |