- Reactive Manifesto 2.0 -> http://www.reactivemanifesto.org/
- Akka -> http://akka.io/
- Spray.io -> http://spray.io/
- Functional Programing -> http://learnyouahaskell.com/chapters
- Streams -> http://www.reactive-streams.org/
- Spark -> http://spark.apache.org/
- Samza -> http://samza.incubator.apache.org/
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 server = require('net').createServer(); | |
server.on('connection', function (s) { | |
s.write("HTTP/1.1 200 OK\n"); | |
s.write("Content-type: text/html\n\n"); | |
s.write("<h1>Honey, I <span style=\"color: red;\"><3</span> U!</h1>\n"); | |
s.end(); | |
}); | |
server.listen(1337); |
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
# Description: | |
# Anyone can have voice or op | |
# | |
# Commands: | |
# hubot make me an op | |
# hubot make <name> an op | |
# hubot give me voice | |
# hubot give <name> voice | |
module.exports = (robot) -> |
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
// StatusesWithIds finds all condition statuses that match the given ids. | |
func StatusesWithIds(in []*cpb.ConditionStatus, ids []*cpb.ConditionId) []*cpb.ConditionStatus { | |
// create our filter set | |
set := map[string]bool{} | |
for _, id := range ids { | |
set[util.StringifyID(id)] = true | |
} | |
// i.e. ids.map(util.StringifyID).toSet |
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
OwnerName | |
DCAS/DEPARTMENT OF ED 1.820269e+10 | |
PORT AUTHORITY NY & N 1.801034e+10 | |
PARKS AND RECREATION 1.163104e+10 | |
NYC HOUSING AUTHORITY 9.589786e+09 | |
HEALTH AND HOSPITALS 2.717476e+09 | |
JOINTLY OWNED PLAYGRO 2.424863e+09 | |
DEPT OF PARKS AND REC 2.386076e+09 | |
NEW YORK UNIVERSITY 2.260595e+09 | |
RCPI HOLDCO LCC 1.923597e+09 |
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
/** | |
* An util that provides synchronization using value equality rather than referential equality | |
* It is guaranteed that if two objects are value-equal, their corresponding blocks are invoked mutually exclusively. | |
* But the converse may not be true i.e. if two objects are not value-equal, they may be invoked exclusively too | |
* Note: Typically, no need to create instances of this class. The default instance in the companion object can be safely reused | |
* | |
* @param size There is a 1/size probability that two invocations that could be invoked concurrently is invoked sequentially | |
* | |
* Example usage: | |
* import EquivalenceLock.{defaultInstance => lock} |
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
import com.amazonaws.HttpMethod | |
import com.amazonaws.services.s3.AmazonS3Client | |
import com.amazonaws.services.s3.model._ | |
... | |
val s3Client = new AmazonS3Client | |
private def getFlow(pathRaw: String, method: HttpMethod) = { | |
// clean the path | |
val path = pathRaw.dropWhile(_ == '/').trim |
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
case object DateCoercionViolation extends ValueCoercionViolation("Date value expected") | |
def parseDate(s: String) = Try(new DateTime(s, DateTimeZone.UTC)) match { | |
case Success(date) => Right(date) | |
case Failure(_) => Left(DateCoercionViolation) | |
} | |
val DateTimeType = ScalarType[DateTime]("DateTime", | |
coerceOutput = date => ast.StringValue(ISODateTimeFormat.dateTime().print(date)), | |
coerceUserInput = { |
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
instances: | |
- host: localhost | |
port: 7199 | |
# user: username | |
# password: password | |
# name: cassandra_instance | |
# #trust_store_path: /path/to/trustStore.jks # Optional, should be set if ssl is enabled | |
# #trust_store_password: password | |
# #java_bin_path: /path/to/java #Optional, should be set if the agent cannot find your java executable |
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
/** | |
* Example of T-Digest plus method with Algebird Semigroup | |
*/ | |
import com.tdunning.math.stats.TDigest | |
import com.twitter.algebird.{Group, Semigroup} | |
import io.koff.t_digest._ | |
case object TDigestSemigroup extends Semigroup[TDigest] { |
OlderNewer