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
| // 1. Watch source files for changes. | |
| // 2. When a change is detected, recompile. | |
| // 3. When assembly changes are detected, reload. (katana?) | |
| // 4. Allow editing of files in a gui (dropbox integration?) | |
| #if INTERACTIVE | |
| #r @"..\packages\FAKE.1.64.6\tools\FakeLib.dll" | |
| #endif | |
| open System |
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
| namespace Owin | |
| { | |
| public delegate void AppDelegate( | |
| IDictionary<string, object> env, | |
| ResultDelegate result, | |
| Action<Exception> fault); | |
| public delegate void ResultDelegate( | |
| string status, | |
| IDictionary<string, string[]> headers, |
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
| type HList = interface end | |
| and HNil = HNil with | |
| static member inline (|*|) (f, HNil) = f $ HNil | |
| interface HList | |
| and HCons<'a, 'b when 'b :> HList> = HCons of 'a * 'b with | |
| static member inline (|*|) (f, HCons(x, xs)) = f $ HCons(x, xs) | |
| interface HList | |
| type Peano = interface end | |
| and Zero = Zero with |
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
| //HANSEIとはprobabilistic programmingを行うためのtaglessなインタプリタのこと。 | |
| //確率モデルをプログラムの形で書くとパラメータの推論を自動で行なってくれる。 | |
| //oleg氏の論文だとreify/reflectを使ったdirect styleのモナドで記述されている。 | |
| //http://okmij.org/ftp/kakuritu | |
| //要はこちらのスライドで紹介されているものをmonadやHOASを使って内部DSLとして実装したもの。 | |
| //http://www.slideshare.net/tsubosaka/infernetlda | |
| //こちらの方の記事も参考になる。 | |
| //http://d.hatena.ne.jp/rst76/20100706/1278430517 |
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
| #include <iostream> | |
| #include <atomic> | |
| #include <vector> | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <cmath> | |
| #include <stdint.h> | |
| #include <limits.h> | |
| class bloom_filter |
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
| using UnityEngine; | |
| using System.Collections; | |
| using System.Security.Cryptography; | |
| using System; | |
| using System.Text; | |
| public class StackMob : MonoBehaviour | |
| { | |
| public const string acceptHeader = "application/vnd.stackmob+json; version=0"; // 0 = development, 1 = production | |
| public const string apiKey = "e78a2646-d479-47b1-9ae5-65732c5eabdc"; // nixApp |
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/env python | |
| # Generate 15,000 users in Enterprise Tester with admin permissions... | |
| import json | |
| import requests | |
| from requests.auth import HTTPBasicAuth | |
| server = 'http://localhost:8080/EnterpriseTester' | |
| proxyDict = { 'http': '127.0.0.1:8888'} # so we can capture requests in fiddler | |
| auth = HTTPBasicAuth('Administrator', 'password') |
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
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE TypeSynonymInstances #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| import Control.Applicative | |
| class Field a where | |
| fieldType :: a -> String | |
| fieldRead :: String -> a |
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 Entity | |
| trait User extends Entity | |
| trait Product extends Entity | |
| case class Id[T<:Entity](id:String) | |
| def buy(pId:Id[Product],uId:Id[User])="Bought product %s for user %s".format(pId.id,uId.id) | |
| val pId=new Id[Product]("1") |
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 -*- | |
| """ | |
| Go to Google Bookmarks: https://www.google.com/bookmarks/ | |
| On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en | |
| After downloading the html file, run this script on it to generate a KML. | |
| """ |