Skip to content

Instantly share code, notes, and snippets.

View ryosuzuki's full-sized avatar

Ryo Suzuki ryosuzuki

View GitHub Profile
@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
<!DOCTYPE html>
<meta charset="utf-8">
<style>
svg {
font: 10px sans-serif;
}
.line {
fill: none;
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,
.axis line {
<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;
@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'):
@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 / 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
Last active September 2, 2015 23:39
craftml
<craft name="chair">
<param name="length" type="int" default="15"/>
<param name="legHeight" type="int" default="14"/>
<stack l="alignX(0%)" color="peru">
<!-- Back -->
<stack spacing="-13">
<stack spacing="-4">
<cylinder height="1" radius="6"
t="rotateY(90)
@ryosuzuki
ryosuzuki / index.xml
Created October 16, 2015 22:02
craftml
<craft>
<info>
<title>Gear</title>
</info>
<craft name="sun-layout" module="sun-layout"/>
<param name="diameter" default="10" type="int"/>
<param name="teeth" default="10" type="int"/>
<param name="center_diameter" default="1.5" type="int"/>
@ryosuzuki
ryosuzuki / index.xml
Created October 16, 2015 22:03
craftml
<craft>
<info>
<title>Untitled</title>
</info>
<param name="h" type="int" default="20"
label="height of the cylinder"/>
<param name="n" type="int" default="3"
label="number of spheres"/>