Skip to content

Instantly share code, notes, and snippets.

@Azoay
Azoay / amazon.py
Created August 19, 2017 00:11
amazonランキング100個分を取得
# coding: utf-8
import requests
import time
import json
from bs4 import BeautifulSoup
l_title = []
l_asin = []
def scrape_title(htmltext):
@Azoay
Azoay / sleepsort.cpp
Last active November 3, 2016 18:08
Sleepsort
#include <cstdio>
#include <cstdlib>
#include <unistd.h>
#include <sys/wait.h>
using namespace std;
void sleep_sort(int *data, int len){
int status;
for(int i=0; i < len; i++){
switch(fork()) {
@Azoay
Azoay / hoge.txt
Last active August 29, 2015 14:25
read tsv(c++)
1 39
2 43
3 39
4 32
5 32
6 39
7 33
8 32
9 25
10 32
@Azoay
Azoay / styles.less
Last active August 29, 2015 14:23
atom minimum styles
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
@Azoay
Azoay / index.html
Created June 14, 2015 22:27
web audio api サンプル1
<!DOCTYPE html>
<html>
<head lang="ja">
<meta charset="UTF-8">
<title>test</title>
</head>
<body>
<form>
<input type="button" value="start" onclick="startSound()">
@Azoay
Azoay / README
Last active August 29, 2015 14:15
HTKのフォーマットにcsvデータを変換するスクリプト
とりあえず,使い方を忘れないようにメモしておく
このスクリプト(htk_convert.py)は特徴ファイルをHTKフォーマットに変換するスクリプトです.
コマンドライン引数で与えられたファイル名のcsvファイルを適当なHTKフォーマットに変換する.
その際,HTKフォーマットのヘッダーの値は以下のように生成されるように書かれている.
現状として,リニアメルフィルターバング(MELSPEC)の24次元用
nSample => number of samples in file (4-byte integer)はCSVから自動的に算出
sampPeriod => sample period in 100ns units (4-byte integer)はとりあえず10000 (10 msec)
sampSize => number of bytes per sample (2-byte integer)は4 byte(一つのデータのサイズ) * nCmops(次元数)で算出
@Azoay
Azoay / if_test.asm
Last active August 29, 2015 14:05
if-else分岐とswitch分岐の違い
004011a0 <_if_test>:
4011a0: 55 push %ebp
4011a1: 89 e5 mov %esp,%ebp
4011a3: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
4011a7: 75 07 jne 4011b0 <_if_test+0x10>
4011a9: b8 01 00 00 00 mov $0x1,%eax
4011ae: eb 53 jmp 401203 <_if_test+0x63>
4011b0: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
4011b4: 75 07 jne 4011bd <_if_test+0x1d>
4011b6: b8 02 00 00 00 mov $0x2,%eax