This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import os | |
import sequtils | |
import strutils | |
const libmecab = "libmecab.2.dylib" | |
type mecab_node_t = object | |
prev: ptr mecab_node_t | |
next: ptr mecab_node_t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns markov | |
(:require [cljs.nodejs :as nodejs] | |
[clojure.string :refer [join replace]])) | |
(def kuromoji (nodejs/require "kuromoji")) | |
(defn wakachi [tokenizer sentence] | |
(->> (js->clj (.tokenize tokenizer sentence) :keywordize-keys true) | |
(map :surface_form))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate time; | |
fn main() { | |
let now = time::now(); | |
let year = now.tm_year as uint + 1900; | |
let month = now.tm_mon as uint + 1; | |
let first_wday = { | |
let mut t = now.clone(); | |
t.tm_mday = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub mod cv { | |
extern crate libc; | |
use self::libc::{c_char, c_double, c_int, c_schar, c_void}; | |
#[repr(C)] | |
pub struct HaarClassifierCascade; | |
#[repr(C)] | |
pub struct MemStorage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://ja.wikipedia.org/wiki/%E3%82%B7%E3%83%BC%E3%82%AF%E3%83%AE%E3%83%BC%E3%82%B5%E3%83%BC#.E8.A1.A8.E8.A8.98 | |
require 'pp' | |
shikwasa = { | |
'シ' => ['ィ', 'イ', 'ー1'], | |
'ィ' => ['ー1', 'ク'], | |
'イ' => ['ー1', 'ク'], | |
'ー1' => ['ク'], | |
'ク' => ['ァ', 'ア', 'ヮ', 'ワ'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; http://www2.oninet.ne.jp/mazra/math104.htm | |
(ns grape | |
(:refer-clojure :exclude [record? ==]) | |
(:require [clojure.core.logic.fd :as fd]) | |
(:use [clojure.core.logic])) | |
(clojure.pprint/pprint | |
(run* [q] | |
(fresh [a0 a1 a2 a3 a4 b0 b1 b2 b3 c0 c1 c2 d0 d1 e0 xs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <string> | |
#include <iostream> | |
int main() { | |
std::ifstream stream{"fujiyama.txt"}; | |
std::string buffer{std::istreambuf_iterator<char>(stream), std::istreambuf_iterator<char>()}; | |
std::cout << buffer << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in the view controller | |
UIWindow* window = [[UIApplication sharedApplication] keyWindow]; | |
UINavigationController* navigationController = (UINavigationController *)[window rootViewController]; | |
[UIView transitionWithView:self.view | |
duration:UINavigationControllerHideShowBarDuration | |
options:UIViewAnimationOptionCurveLinear | |
animations:^{ | |
[navigationController setNavigationBarHidden:YES animated:NO]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Rouge 0.0.15 | |
(require "glut") | |
(require "opengl") | |
(def vertex-shader " | |
attribute vec3 position; | |
attribute vec4 color; | |
varying vec4 vertex_color; | |