- Web Server: Play (framework) or http4s (library)
- Actors: akka
- Asynchronous Programming: monix (for tasks, reactors, observables, scheduler etc)
- Authentication: Silhouette
- Authorization: Deadbolt
- Command-line option parsing: case-app
- CSV Parsing: kantan.csv
- DB: doobie (for PostgreSQL)
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 half | |
import scala.math.{pow, round, signum} | |
import scala.util.Random.nextInt | |
import java.lang.{Float => JFloat} | |
/** | |
* Float16 represents 16-bit floating-point values. | |
* | |
* This type does not actually support arithmetic directly. The |
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
#include <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <xmmintrin.h> // SSE | |
#include <immintrin.h> // AVX | |
#ifdef _WIN32 | |
#include <intrin.h> // for __movsb, __movsd, __movsq |
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
object Transducer { | |
type RF[R, A] = (R, A) => R | |
def apply[A, B](f: A => B) = | |
new Transducer[B, A] { | |
def apply[R](rf: RF[R, B]) = (r, a) => rf(r, f(a)) | |
} | |
} | |
import Transducer.RF |
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
#!/usr/bin/python | |
""" | |
Author: Jeremy M. Stober | |
Program: GP.PY | |
Date: Thursday, July 17 2008 | |
Description: Example of Gaussian Process Regression. | |
""" | |
from numpy import * | |
import pylab |
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
// Just an example of some code I ended up not using, but which is kinda neat. | |
object Utils { | |
def linesFromFile(file: File) = { | |
io.Source.fromInputStream(getMemoryMappedFileInputStream(file)).getLines | |
} | |
def getMemoryMappedFileInputStream(file: File): InputStream = { |
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
""" | |
(C) Mathieu Blondel - 2010 | |
License: BSD 3 clause | |
Implementation of the collapsed Gibbs sampler for | |
Latent Dirichlet Allocation, as described in | |
Finding scientifc topics (Griffiths and Steyvers) | |
""" |
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
require 'rubygems' | |
require "builder" | |
require "benchmark" | |
require 'nokogiri' | |
require 'erb' | |
require 'erubis' | |
ITERATIONS = 1_000 | |
ERB_TEMPLATE = <<-EOL |
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
require 'benchmark' | |
require 'yaml' | |
def encode(msg, format) | |
case format | |
when :yaml | |
str = msg.to_yaml | |
when :binary | |
str = Marshal.dump(msg) | |
end |