Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Written by Bowei Liu 05/27/16
# repo at https://gist.github.com/01142bc0ab45e754afbd554b8e0072b5
# gist -u 01142bc0ab45e754afbd554b8e0072b5 convert-yahoo-data.sh
# Goal: convert the corpii of answers and yahoo data into 3 files:
# train.csv, test.csv, real_test.csv
# suitable for feeding into tensorflow.
# categories files already ahve all the answers/yahoo hierarchy
'use strict'
const fs = require('fs'),
knox = require('knox'),
Promise = require('bluebird'),
request = Promise.promisify(require('request')),
_ = require('lodash')
Promise.promisifyAll(fs)
Promise.promisifyAll(knox)
@boweiliu
boweiliu / sc-dl.js
Created November 16, 2015 06:58 — forked from pheuter/sc-dl.js
Bookmarklet that generates download link for a Soundcloud upload
(function(d) {
var dl = d.createElement('a');
dl.innerText = 'Download MP3';
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1];
dl.download = d.querySelector('em').innerText+".mp3";
d.querySelector('.primary').appendChild(dl);
dl.style.marginLeft = '10px';
dl.style.color = 'red';
dl.style.fontWeight = 700;
})(document);