Skip to content

Instantly share code, notes, and snippets.

View jastice's full-sized avatar
🤗

Justin Kaeser jastice

🤗
View GitHub Profile
@jastice
jastice / allaboutthatbayes.md
Last active September 20, 2021 20:59
All about that Bayes

Because you know I'm all about that Bayes,
'Bout that Bayes, low frequentist
I'm all 'bout that Bayes, 'bout that Bayes, low frequentist
I'm all 'bout that Bayes, 'bout that Bayes, low frequentist
I'm all 'bout that Bayes, 'bout that Bayes

Yeah it's pretty clear I can't count to two
But I can calculate odds like I'm supposed to do

Cause I got priors that beat your stats to the chase

@jastice
jastice / integrations-bsp-intellij-bloop.md
Last active June 28, 2019 11:48 — forked from jvican/integrations-bsp-intellij-bloop.md
Instructions to try the BSP IntelliJ-Bloop integration out.

Installation instructions

  1. Install bloop 1.0.0-M11 by following the Bloop installation instructions. Then, make sure you start up the bloop server on the background and to generate the configuration files by running bloopInstall in your build tool.
  2. Install IntelliJ 2018.2 EAP and then enable the nightly version of the Scala Plugin by opening Preferences | Languages & Frameworks | Scala | Updates tab and selecting the Nightly plugin update channel: intellij-eap
  3. check for updates and download the Scala plugin Nightly release.
  4. Reboot IntelliJ. The Scala plugin should now have version 2018.2.277 or higher (check in Preferences | Plugins)
  5. Open the "Find Action" search box (usual hotkey Shift+Ctrl+A or shift+cmd+A) and search for "bsp". The search box will show the full action name: "Enable experime
@jastice
jastice / bubblephysics.elm
Created August 5, 2014 15:34
Bubble Physics engine in Elm
-- based roughly on http://gamedevelopment.tutsplus.com/tutorials/gamedev-6331
module BubblePhysics where
-- plain old pair for coordinates, vectors
type Vec2 = (Float,Float)
type Body b = { b |
velocity: Vec2, -- direction and speed
inverseMass: Float, -- we usually use only inverse mass for calculations
restitution: Float -- bounciness factor
@jastice
jastice / kaeserkuchen.md
Last active August 6, 2016 20:42
Käserkuchen

Käserkuchen

Zutaten

Hauptmasse

  • 4 Eier, Eigelb
  • 1 kg Quark
  • 60 g Stärke
  • 1 Limette
[warn] Run 'evicted' to see detailed eviction warnings
[info] Update report:
[info] Resolve time: 163 ms, Download time: 7 ms, Download size: 0 bytes
[info] compile:
[info] com.lihaoyi:scalarx_2.11
[info] - 0.3.0
[info] status: release
[info] publicationDate: Sat Jan 23 05:34:42 CET 2016
[info] resolver: sbt-chain
[info] artifactResolver: sbt-chain
object Attribute {
case class Attributed[Thing, Attribute](val thing: Thing, val attributes: Set[Attribute] = Set[Attribute]()) {
/** Add an attribute. */
def +(a: Attribute) = copy(attributes = attributes+a)
/** Change attributes for which the partial function is defined. */
def change(pf: PartialFunction[Attribute,Attribute]) =
def sleepForTimes(ms: Long, times: Long) = {
var n = 0
() => {
n+=1
if (n <= times) {
Thread.sleep(ms)
true
} else {
false
}
class IntegrationSuite extends FunSuite with ShouldMatchers {
test("infinit actor") {
val actor= ActorSystem("tail").actorOf(Props[MrActor])
Thread.sleep(10000)
actor ! Interrupt
Thread.sleep(40054)
}
class LineAggregator extends Actor {
var v = ""
override def receive = {
case Exit => context.stop(self)
case Put(line) => v = v + line + "\n"
case Get => sender ! v
}
@jastice
jastice / pizza-sauce.md
Created May 14, 2015 10:17
A Fine Pizza Sauce

Pizza Sauce

Ingredients

  • 500g tomato purée
  • 4 Tbsp concentrated tomato
  • 2 cloves garlic
  • 2 Tbsp olice oil
  • 2 tsp basil
  • 2 tsp oregano