Skip to content

Instantly share code, notes, and snippets.

View NorimasaNabeta's full-sized avatar
🌴
On vacation

Norimasa Nabeta NorimasaNabeta

🌴
On vacation
View GitHub Profile
#include <iostream>
#include <vector>
#include <string>
#include <chrono>
#include <queue>
#include <functional>
#include <thread>
#include <mutex>
//#include <atomic>
#include <condition_variable>
@NorimasaNabeta
NorimasaNabeta / proc_smap.py
Created April 28, 2019 07:10
parse proc_smaps and insert into sqlite3 database.
# -*- mode: python; coding: utf-8-unix -*-
#
#
# @see man proc (5)
#
import os, re
import sqlite3
#
#
# -*- mode: python; coding: utf-8-unix -*-
#
# Time-stamp: <2020-07-20 04:47:17 norim>
#
# @ref: https://nathankjer.com/animated-3d-plots/
#
# CAUTION: required to install the imagemagick before execution.
# for jupyter, http://louistiao.me/posts/notebooks/embedding-matplotlib-animations-in-jupyter-notebooks/
#
@NorimasaNabeta
NorimasaNabeta / png_info.py
Created September 26, 2020 06:25
embed the meta info into PNG image file.
# -*- mode: python; coding: utf-8-unix -*-
#
#
# @ref: https://pillow.readthedocs.io/en/3.1.x/PIL.html?highlight=PngInfo#PIL.PngImagePlugin.PngInfo
#
import os
from datetime import datetime
from optparse import OptionParser
from PIL.PngImagePlugin import PngImageFile, PngInfo
@NorimasaNabeta
NorimasaNabeta / framed.py
Created December 12, 2020 02:26
image output with the framed tag like polaroid film.
# -*- mode: python; coding: utf-8-unix -*-
#
# Time-stamp: <2020-12-12 11:15:14 norim>
#
# usage:
# import framed
# ...
# img = cv2.imread(input_file)
# framed.framed(img, "sample", "working")
@NorimasaNabeta
NorimasaNabeta / dirlist.py
Created October 6, 2021 12:39
dir-list-then-put-it-excel script
# -*- mode: python; coding: utf-8-unix -*-
#
# Time-stamp: <2021-02-16 10:59:17 norim>
#
import os
import shutil
import re
from datetime import datetime
from optparse import OptionParser
from openpyxl import Workbook
// -*- mode: java; coding: utf-8 -*-
//
// Time-stamp: <2021-10-22 09:12:02 norim>
//
// TODO: echo server を作成、任意のデータを受信すると、それをhexdump して返信
import java.io.*;
import java.net.*;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;