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
package controllers | |
import play.api._ | |
import play.api.mvc._ | |
import scala.concurrent._ | |
import scala.concurrent.Future._ | |
//import play.api.libs.concurrent.Execution.Implicits._ |
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
var http = require('http'); | |
var Q = require('q'); | |
var IntensiveFunctions = (function(){ | |
var self = {}; | |
self.randomWalk = function(i){ | |
return Q.fcall(function(){ | |
var total = 0; |
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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Monad.Trans (lift) | |
import Control.Parallel (par, pseq) | |
import Data.Text.Lazy (pack) | |
import System.Random (StdGen, newStdGen, random) | |
import Web.Scotty (get, scotty, text) |