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
extern crate num; | |
//use std::num::One; | |
use num::traits::One; | |
use std::cmp::PartialOrd; | |
use std::ops::{Add, Sub}; | |
fn fib<T>(n: T) -> T where | |
T: One + PartialOrd + Add<Output=T> + Sub<Output=T> + Clone { | |
if n < T::one() + T::one() { |
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
mongo: | |
image: mongo:latest | |
app: | |
image: sdelements/lets-chat | |
links: | |
- mongo | |
ports: | |
- 8080:8080 | |
- 5222:5222 | |
environment: |
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
# Connection plugin for configuring docker containers | |
# Author: Lorin Hochstein | |
# | |
# Based on the chroot connection plugin by Maykel Moya | |
import os | |
import subprocess | |
import time | |
from ansible import errors | |
from ansible.callbacks import vvv |
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
caption always "%{= wk} %-w%{=bu dr}%n %t%{-}%+w %= %{=b wb}%y/%m/%d(%D) %{=b wb}%c" |
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
{:user | |
{:plugins [[lein-marginalia "0.8.0"] | |
[lein-cloverage "1.0.2"] | |
[jonase/eastwood "0.2.1"] | |
[lein-cljfmt "0.1.10"]]}} |
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
" neo bundle | |
set nocompatible | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
endif | |
call neobundle#begin(expand('~/.vim/bundle/')) | |
" generic |
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
# -*- coding: utf-8 -*- | |
import datetime as dt | |
import numpy | |
import matplotlib | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as md | |
import locale | |
from functools import reduce | |
locale.setlocale(locale.LC_ALL, "") | |
matplotlib.rcParams['font.family']='IPAPGothic' |
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
abstract sig Board { | |
maxadjs: Int | |
} | |
abstract sig Side {} | |
one sig Inside, Outside extends Side {} | |
abstract sig Cell { | |
adjacent: some Cell, | |
num: Int, |
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
package t | |
import scalaz._ | |
import Scalaz._ | |
import scala.collection.immutable._ | |
object rwse { | |
type ErrMsg = String | |
abstract sealed class Err | |
case class EmptyErr() extends Err |
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
;;; Monad | |
(defprotocol [m] Monad | |
([a] return [ctx, v :- a] :- (m a)) | |
([a b] bind [ctx, mv :- (m a), f :- [a -> (m b)]] :- (m b))) | |
(defalias TFn1 (TFn [[x :variance :covariant]] Any)) | |
;;; Identity Monad |
NewerOlder