Skip to content

Instantly share code, notes, and snippets.

View ryosuzuki's full-sized avatar

Ryo Suzuki ryosuzuki

View GitHub Profile
@ryosuzuki
ryosuzuki / index.xml
Created September 2, 2015 23:08
craftml
<craft name="table">
<param name="length" type="int" default="50"/>
<param name="width" type="int" default="60"/>
<param name="legHeight" type="int" default="20"/>
<stack color="blue">
<!-- Top -->
<!--<sphere size="{{length}} {{width}} 5"></sphere> -->
<cylinder radius="{{length}}" height="3"/>
@ryosuzuki
ryosuzuki / index.xml
Created August 31, 2015 20:41
craftml
<craft>
<info>
<title><!-- Add a title here --></title>
</info>
<cube></cube>
</craft>
@ryosuzuki
ryosuzuki / lda.py
Last active August 29, 2015 14:23
Classification of CNN articles with LDA
import feedparser
import re
import json
import os.path
from gensim import corpora, models, similarities
from newspaper import Article
texts = []
if not os.path.isfile('data.json'):
<html class="ocks-org do-not-copy"><head><meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script><style type="text/css"></style>
<body>
<script>(function() {
var n = 243;
var duration = 750;
var now = new Date(Date.now() - duration);
var count = 0;
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,
.axis line {
<!DOCTYPE html>
<meta charset="utf-8">
<style>
svg {
font: 10px sans-serif;
}
.line {
fill: none;
@ryosuzuki
ryosuzuki / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
> brew install node
> npm install -g express
> express node-app
> cd node-app && npm install
> node app.js
@ryosuzuki
ryosuzuki / rbenv.sh
Last active December 18, 2015 13:39
> brew update
> ruby-build --definition
> brew install rbenv
> brew install ruby-build
> brew install rbenv-vars
> brew install ctags
> brew install openssl
> brew upgrade readline
> git ls-tree HEAD
> git cat-file blob :sha
> git diff --name-only
> git rev-parse --show-toplevel