Skip to content

Instantly share code, notes, and snippets.

View kvvzr's full-sized avatar

kwzr kvvzr

View GitHub Profile
#include <metal_stdlib>
using namespace metal;
#include <CoreImage/CoreImage.h>
extern "C" { namespace coreimage {
float4 bilateralFilter(sampler src, float2 texelOffset, float distanceNormalizationFactor, destination dest) {
const int gaussianSamples = 9;
float2 blurCoordinates[9];
for (int i = 0; i < gaussianSamples; i++) {
val subject = PublishSubject.create<Int>()
// 処理が終わらない
subject
.subscribeOn(Schedulers.trampoline()) // テストコードではRxJavaPluginsによってtrampolineがsetされる
.buffer(1, TimeUnit.SECONDS)
.filter { it.isNotEmpty() }
.subscribe { buffers -> println(buffers) }
// これは大丈夫
import melete.lyrics as Lyrics
import melete.rhythm as Rhythm
import melete.chord as Chord
import melete.melody as Melody
# 4/4拍子
ts = Rhythm.TimeSignature(4, 2)
# リズムパターン
rhythms = [[0], [0, 96], [48, 96, 144], [0, 48, 96, 144], [0, 24, 48, 96, 144]]
@kvvzr
kvvzr / evy1_example.py
Last active August 29, 2015 14:28
eVY1をPythonで試す
# -*- coding: utf-8 -*-
import re, time, mido
# 参考: https://github.com/yamaha-webmusic/nsx1-apps/blob/master/text-input/js/nsx1.js
text_map = {
'あ': 'a', 'い': 'i', 'う': 'M', 'え': 'e', 'お': 'o',
'か': 'k a', 'き': 'k i', 'く': 'k M', 'け': 'k e', 'こ': 'k o',
'さ': 's a', 'し': 'S i', 'す': 's M', 'せ': 's e', 'そ': 's o',
'た': 't a', 'ち': 'tS i', 'つ': 'ts M', 'て': 't e', 'と': 't o',
{
{
{
{
{
{
{
{
{
{
@kvvzr
kvvzr / pizza.md
Last active August 29, 2015 14:11
ピザの材料

ピザレシピ(30cm * 4枚分)

大体成人男性4~6人前です. 4人だとちょっと多いかな. 6人くらいで食べるのが良いかも.

まえがき

@kwzrhouseにピザ窯を買った. これにより高級料理ピザを安く手軽に入手することが可能となった.

生地材料

名前 分量 参考価格
強力粉 600g ¥300 / 1kg