Skip to content

Instantly share code, notes, and snippets.

@yue82
yue82 / iosdc2019_heatmap_clients.py
Last active September 10, 2019 17:14
iOSDC 2019 NOC heatmap 02
# -*- coding: utf-8 -*-
import os
from PIL import Image, ImageDraw, ImageFont
import pyocr
import pyocr.builders
def read_clients_number(image_dir, num_list, left, top, width, height, ext='png'):
clients_file = '{}/clients.csv'.format(image_dir)
@yue82
yue82 / iosdc2019_heatmap_crop.py
Last active September 11, 2019 05:17
iOSDC 2019 NOC heatmap 01
# -*- coding: utf-8 -*-
import os
from PIL import Image
import numpy as np
def find_edge(pix_line, pix_th):
edge1, edge2 = 0, len(pix_line)
for i, pix in enumerate(pix_line):
@yue82
yue82 / reiwa_q.py
Last active May 2, 2019 06:16
reiwa ctf zero ha?
# -*- coding: utf-8 -*-
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('zerois-o-reiwa.seccon.jp', 23615))
for num in range(100):
data = ''
while data[:2] != '0=':
data = s.recv(1024)
@yue82
yue82 / next_week.sh
Created May 19, 2018 09:41
generate weekly memo
#! /bin/bash
year=`date +%Y`
month=`date +%m`
day=`date +%d`
weekday=5
next_weekstartday=3
if [ -z $1 ]; then
@yue82
yue82 / daily.sh
Last active May 19, 2018 09:40
generate daily memo
#! /bin/bash
year=`date +%Y`
month=`date +%m`
day=`date +%d`
if [ ! -e ~/memos/$year"_"$month ]; then
mkdir ~/memos/$year"_"$month
fi
@yue82
yue82 / qr2txt.py
Last active March 20, 2018 06:36
ksnctf C92 E1 Mysterious Light
# -*- coding: utf-8 -*-
from PIL import Image
dth, lth = 50, 175
marks = {'dark': 'X', 'light': '_', 'unknown': '?'}
def get_pix(filename):
with Image.open(filename) as img:
@yue82
yue82 / SupporterzColab_2017_1025_blockchain.md
Last active October 26, 2017 05:42
サポーターズCoLab勉強会 ブロックチェーンの基本の「き」 2017.10.25 memo
@yue82
yue82 / FPGAX_2017_0924_1_nvidia.md
Created September 24, 2017 07:28
FPGAエクストリーム・コンピューティング 第9回 2017.09.24 memo

NVIDIA TeslaV100 & CUDA9 アップデート

NVIDIA 村上さん

Tesla V100

  • Pascalシリーズの次がVolta
    • 性能は1.5倍
    • いま発表されてるのはTeslaのみ

形は両方出る

  • NV Link
@yue82
yue82 / WbaWakate_2017_0904_philosophy.md
Last active September 24, 2017 07:26
第29回 全脳アーキテクチャ若手の会 勉強会 「哲学的人工知能批判と第3次AIブーム」 2017.09.04 memo
@yue82
yue82 / BinTree.scala
Created May 23, 2017 14:48
Scala training Binary Tree method
sealed abstract class Tree
case class Branch(value: Int, left: Tree, right: Tree) extends Tree
case object Empty extends Tree
object TreeObject {
def max(tree: Tree): Int = tree match {
case Branch(v, l, r) => math.max(math.max(v, this.max(l)), this.max(r))
case Empty => 0
}