Skip to content

Instantly share code, notes, and snippets.

Hayato Ito hayatoito

Block or report user

Report or block hayatoito

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View tsp.rs
extern crate csv;
#[macro_use]
extern crate log;
extern crate loggerv;
extern crate ordered_float;
extern crate rand;
extern crate rayon;
extern crate serde;
#[macro_use]
extern crate serde_derive;
View tsp.rs
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde_derive;
extern crate clap;
extern crate csv;
extern crate loggerv;
extern crate ordered_float;
extern crate rand;
extern crate rayon;
View calc.rs
mod calc {
use combine::*;
use combine::char::{digit, spaces};
use std;
enum Expr {
Add(Box<Expr>, Box<Expr>),
Sub(Box<Expr>, Box<Expr>),
Mul(Box<Expr>, Box<Expr>),
@hayatoito
hayatoito / my-step-tsp-4m.rs
Created Jul 8, 2016
For challenge 7 (multi threaded)
View my-step-tsp-4m.rs
#[macro_use]
extern crate log;
extern crate crossbeam;
extern crate csv;
extern crate env_logger;
extern crate num_cpus;
extern crate ordered_float;
extern crate rustc_serialize;
use std::collections::HashSet;
@hayatoito
hayatoito / my-step-tsp-speed.rs
Created Jul 8, 2016
For speed challenge (single thread)
View my-step-tsp-speed.rs
#[macro_use]
extern crate log;
extern crate csv;
extern crate env_logger;
extern crate ordered_float;
extern crate rustc_serialize;
use std::collections::HashSet;
use ordered_float::OrderedFloat;
@hayatoito
hayatoito / gist:f2df8e10cb8cc551f80c
Created Apr 22, 2015
"<shadow> as function" as "slots"
View gist:f2df8e10cb8cc551f80c
<!-- For base combo-box class -->
<template>
<style>… styles go here …</style>
<div id="topPortion">
<content select=".slot-inputElement">
<input type="text">
</content>
<button id="dropdownButton">
<content select=".slot-icon">
<img src="downArrow.png">
View speechserver.py
#!/usr/bin/env python3
import html
from http.server import (HTTPServer, SimpleHTTPRequestHandler)
import subprocess
import urllib.parse
def speech_server(port=8080):
class SpeechHandler(SimpleHTTPRequestHandler):
View wakame.py
#!/usr/bin/env python
# encoding: utf-8
import binascii
import sys
table = {'0': 'WA', '1': 'KA', '2': 'ME', '3': u'',
'4': 'wa', '5': 'ka', '6': 'me', '7': u'',
'8': 'Wa', '9': 'Ka', 'a': 'Me', 'b': u'',
'c': 'wA', 'd': 'kA', 'e': 'mE', 'f': u''}
@hayatoito
hayatoito / icfp2012.Main.scala
Created Jul 16, 2012
hayato @ ICFP Programming Contest 2012
View icfp2012.Main.scala
package icfp2012
import scala.io.Source
import scala.collection.mutable
import my.util.logging.Logger
import sun.misc.Signal
import sun.misc.SignalHandler
object Main extends App {
You can’t perform that action at this time.