Skip to content

Instantly share code, notes, and snippets.

Avatar

zato uiur

View GitHub Profile
@uiur
uiur / 0.sparql
Created Mar 26, 2017
japanese hiphop musician from dbpedia
View 0.sparql
select distinct ?page ?label ?name where {
{ ?page <http://dbpedia.org/ontology/wikiPageWikiLink> <http://ja.dbpedia.org/resource/Category:日本のヒップホップ・ミュージシャン> . } union { ?page <http://dbpedia.org/ontology/wikiPageWikiLink> <http://ja.dbpedia.org/resource/Category:日本のヒップホップ・グループ>. }
?page rdfs:label ?label .
optional {
?page <http://ja.dbpedia.org/property/name> ?name .
}
}
@uiur
uiur / Dockerfile
Created Jan 24, 2017
python3 + caffe
View Dockerfile
FROM python:3.5
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
wget \
python3-dev \
libatlas-base-dev \
libboost-all-dev \
libgflags-dev \
@uiur
uiur / 0.py
Created Jan 11, 2017
mesen with dlib
View 0.py
import sys
import os
import dlib
import glob
import cv2
import numpy as np
import argparse
import base64
import time
@uiur
uiur / 0.md
Last active Nov 23, 2016
gyapc LT
View 0.md

cat image.png | filter | gyazo

画像を処理して遊んだり開発したりするときのtipsを共有します

自己紹介

@uiureo ウイウ

ネオ目黒ライン NEO MEGURO LINE

最近、ネオ目黒ラインというサービスを作りました

https://mesen-dot-uiu-server.appspot-preview.com/

@uiur
uiur / app.js
Created Apr 19, 2015
MIDIコントローラ寿司回転
View app.js
'use strict'
let state = {
deg: 0,
active: false
}
function requestMIDI () {
return navigator.requestMIDIAccess()
.then(function (midi) {
@uiur
uiur / 0.py
Created Aug 2, 2016
stack images
View 0.py
size = (10, 10)
imgs = imgs[:size[0] * size[1]].reshape(size[0], size[1], 28, 28)
result = np.vstack(tuple([np.hstack(tuple(img)) for img in imgs]))
imsave('a.png', result)
@uiur
uiur / mser.py
Created Jul 4, 2016
extract regions and save by MSER
View mser.py
import sys
import numpy as np
import cv2
def extract_region(img, region):
top_left = np.min(region, axis=0)
bottom_right = np.max(region, axis=0)
margin = 2
region_of_image = img.copy()[top_left[1]-margin:bottom_right[1]+margin, top_left[0]-margin:bottom_right[0]+margin]
@uiur
uiur / 0.sh
Created Jun 16, 2016
edit pdf using pdftk
View 0.sh
pdftk a.pdf dump_data_utf8 output data.txt
vi data.txt
pdftk a.pdf update_info_utf8 data.txt output b.pdf
View pi.py
def pi(n):
half_pi = 0
for k in range(n + 1):
m = 1.0
for i in range(1, k + 1):
m *= float(2 * i - 1) / (2 * i)
half_pi += m / (2 * k + 1)
return 2 * half_pi
@uiur
uiur / 0.sh
Last active Feb 17, 2016
show ruby ast
View 0.sh
cat app/models/comment.rb | ruby -r pp -r ripper -e 'pp Ripper.sexp(ARGF.read)'