ssh-keygen -t rsa -f ~/.ssh/your_key_name -C 'yourname@example.com'
- パスフレーズはプロンプトから入力
これで
/Applications/Inkscape.app/Contents/Resources/bin/inkscape \
--without-gui --export-width={{ WIDTH }} \
--file {{ INPUT }}.svg --export-png={{ OUTPUT }}.png
// 行列累乗を使ってフィボナッチ数列を求めてみる | |
// 参考 | |
// http://blog.scala4java.com/2011/12/matrix-multiplication-in-scala-single.html | |
import annotation.tailrec | |
import scala.util.control.Exception._ | |
object FibonacciMatrix { | |
type Matrix = Array[Array[BigInt]] | |
def mul(m1: Matrix, m2: Matrix) = { |
object FizzBuzz { | |
private val divs = List((3, "Fizz"), (5, "Buzz")) | |
def fizzBuzz(n: Int): String = { | |
val ret = (divs map {case (i, s) => if (n % i == 0) s else ""}).mkString | |
if (ret.isEmpty) n.toString else ret | |
} | |
def main(args: Array[String]) { | |
def printAll(n: Int) { (1 to n) foreach {n => println(fizzBuzz(n))} } |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import struct | |
from bitarray import bitarray | |
def double_to_bitstring(d): | |
b = bitarray() | |
b.frombytes(struct.pack('!d', d)) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Combinatorial Optimization - B.Korte, J.Vygen | |
Algorithm 1.1 | |
Path Enumeration Algorithm | |
""" | |
def back_track(n): |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Combinatorial Optimization - B.Korte, J.Vygen | |
Algorithm 1.2 | |
Merge-Sort Algorithm | |
""" | |
def merge_sort(a): |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Check if the graph is bipartite. | |
""" | |
import collections | |
class Graph(object): |
for(i<-1 to'd')println(Seq("Fizz"*(1-i%3)+"Buzz"*(1-i%5),""+i)max) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""" | |
Bipartite graph matching algorithm | |
""" | |
import collections | |
class Graph(object): |