This file contains hidden or 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
# load Dates module | |
import Base.Dates: AbstractTime, Month, Millisecond, Year, TimeType, Day, Hour, Minute, Second, Period, periodisless, yearmonthday, days, hour, minute, second, millisecond, default | |
import Base.Dates: DelimitedSlot, Slot, DayOfWeekSlot, slotparse | |
import Base.Dates: DateFormat, duplicates | |
Base.show(io::IO,x::DateTime) = print(io,string(x)) | |
DateTime(dt::AbstractString,df::DateFormat=ISODateTimeFormat) = DateTime(parse(dt,df)...) | |
function getslot(x,slot::DelimitedSlot,df,cursor) |
This file contains hidden or 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
# https://mrkulk.github.io/www_cvpr15/1999.pdf | |
function PROGRAM(MU, PC, EV, VERTEX_ORDER) | |
# Scene Language: Stochastic Scene Gen | |
face=Dict(); | |
shape = []; | |
texture = []; | |
for S in ["shape", "texture"] | |
for p in ["nose", "eyes", "outline", "lips"] | |
coeff = MvNormal(0,1,1,99) |
This file contains hidden or 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://www.codewars.com/kata/unary-function-chainer | |
# http://stackoverflow.com/questions/28713934/how-to-implement-unary-function-chainer-using-python | |
f1 = (x) -> x*2 | |
f2 = (x) -> x+2 | |
f3 = (x) -> x^2 | |
chained(funcs) = reduce((f,g)->(n)->n|>f|>g, funcs) | |
@assert 4 == chained([f1 f2 f3])(0) |
This file contains hidden or 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
$ brew cask install basictex | |
$ sudo tlmgr update --self | |
$ sudo tlmgr install latexmk |
This file contains hidden or 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
class Prize { | |
var winners: List[Int] = List.empty | |
def play(list: List[Int]) : List[List[Int]] = { | |
var w = List[Int]() | |
var l = List[Int]() | |
for (idx <- 0 until list.length/2) { | |
val i = idx*2 | |
if (list(i) < list(i+1)) { | |
w :+= list(i) |
This file contains hidden or 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
trait UnitTest { | |
def assert_equal(expected :Int, got :Int) { | |
expected==got match { | |
case true => | |
println("passed: " + expected) | |
case _ => | |
println("Assertion failed\nExpected: " + expected + "\nGot: " + got) | |
} | |
} | |
} |
This file contains hidden or 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
// | |
// test_hangul.swift | |
// Hangul | |
// | |
// Created by WooKyoung Noh on 12/1/2014. | |
// Copyright (c) 2014 factorcat. All rights reserved. | |
// | |
@objc(TestHangul) | |
class TestHangul : NSObject { |
This file contains hidden or 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
#!/usr/bin/python | |
#-- coding: utf-8 -- | |
# textutil -convert txt Journal*.docx | |
import numpy as np | |
import pandas as pd | |
def regul(s): |
This file contains hidden or 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
$ julia | |
_ | |
_ _ _(_)_ | A fresh approach to technical computing | |
(_) | (_) (_) | Documentation: http://docs.julialang.org | |
_ _ _| |_ __ _ | Type "help()" for help. | |
| | | | | | |/ _` | | | |
| | |_| | | | (_| | | Version 0.4.0-dev+1148 (2014-10-20 05:03 UTC) | |
_/ |\__'_|_|_|\__'_| | Commit 6290d34* (0 days old master) | |
|__/ | x86_64-apple-darwin13.4.0 |
This file contains hidden or 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
#! /bin/sh | |
# Guess values for system-dependent variables and create Makefiles. | |
# Generated by GNU Autoconf 2.69 for mecab-ko-dic 1.6.1. | |
# | |
# | |
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
# | |
# | |
# This configure script is free software; the Free Software Foundation | |
# gives unlimited permission to copy, distribute and modify it. |