Skip to content

Instantly share code, notes, and snippets.


Kazuhiro Homma kazuph

View GitHub Profile
korakot /
Last active Aug 22, 2021
Record audio in Colab using getUserMedia({ audio: true })
# all imports
from IPython.display import Javascript
from google.colab import output
from base64 import b64decode
from io import BytesIO
!pip -q install pydub
from pydub import AudioSegment
RECORD = """
const sleep = time => new Promise(resolve => setTimeout(resolve, time))
hayajo /
Last active Oct 29, 2020
TCP/IPとか運用とかsystemdとか #オンシャヘイシャ
ChocolateMinht / Alamofire.swift
Created Jan 7, 2015
Alamofire wrapped in a struct (iOS7 compatibility)
View Alamofire.swift
// Alamofire.swift
// Copyright (c) 2014 Alamofire (
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
View Makefile
OUT = ir-state.png ir-learn.png ir-send.png packer.png wifi-morse-setup.png
all: $(OUT)
.SUFFIXES: .png .gv .msc
dot -Tpng $< -o $@
ainame / AMEHTTPRequestTestCase.h
Last active Aug 29, 2015
View AMEHTTPRequestTestCase.h
#import <XCTest/XCTest.h>
#import <TKRGuard.h>
#import <OHHTTPStubs.h>
@interface AMEHTTPRequestTestCase : XCTestCase
@property (nonatomic, strong) NSURLRequest *lastRequest;
- (void)stubAllRequestWithResponseFileName:(NSString *)responseFileName statuCode:(NSInteger)statusCode;
hayajo / downcase.ank
Last active Aug 29, 2015
View downcase.ank
filter.Add(func(s) {
return strings.ToLower(s)
}, 10)
yoheia / perl_oneliner_example
Last active Jan 24, 2020
View perl_oneliner_example
Perl ワンライナーサンプル集
テキスト処理で使った Perl ワンライナーのサンプル集です。
Perl ワンライナーは以下の点が良いと思います。
・Perl は Oracle Database (10g以降) に同梱されている。
 従って、Windows プラットフォームでも使える。
my (@price,@day);
<STDIN> =~ /(\d+) (\d+)/;
$price[$_] = <STDIN> for (0..($1-1));
$day[$_] = <STDIN> for (0..($2-1));
@price = sort {$a <=> $b} @price;
for my $setprice (@day){
my @tmp = grep { $_ <= $setprice - $price[0] } @price;
my $check = 0;
wsargent /
Last active Jul 5, 2021
Docker cheat sheet
syohex /
Last active Dec 25, 2015
AA of fujiwara-san
use strict;
use warnings;
use Furl;
use Imager;
use Text::AAlib qw(:all);
my $url = '';
my $ua = Furl->new;