- 2 eggs
- 3/2 cup sugar
- 2 cups flour
- 1/2 cup canola oil
- 1/2 cup milk
- 3/4 tsp baking soda
- 3/2 tsp baking powder
- 2 mashed bananas
- lemon peel
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
import sys | |
import itertools as it | |
stateCount = 4 | |
transitionCount = stateCount ** 2 | |
taxonCount = 92 | |
f = lambda m, n, i, j: (m + n * (n - 1) // 2) * transitionCount + stateCount * i + j | |
for l in sys.stdin: |
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
f = lambda x: (x - 8) / 3 + 4 | |
g = lambda x: (x - 4) * 3 + 8 |
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
implicit def JetIsReal[T : IsReal : Semiring : ClassTag](implicit jd: JetDim) = new IsReal[Jet[T]] { | |
override def ceil(a: Jet[T]): Jet[T] = Jet(IsReal[T].ceil(a.real)) | |
override def toDouble(a: Jet[T]): Double = IsReal[T].toDouble(a.real) | |
override def toReal(a: Jet[T]): Real = IsReal[T].toReal(a.real) | |
override def round(a: Jet[T]): Jet[T] = Jet(IsReal[T].round(a.real)) |
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
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Arman Bilge | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
""" | |
tree69.py | |
A tree utility library for COMPSCI 369. | |
""" | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2016 Arman Bilge and Stuart Bradley | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
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
from functools import lru_cache | |
import itertools as it | |
from scipy.misc import comb | |
@lru_cache(None) | |
def f(k, n): | |
if k == 0: | |
return 0 | |
return k ** n - sum(int(comb(k, i)) * f(i, n) for i in range(k)) |
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
for y in {1952..2016}; do | |
wget --post-data "method=loadAwardeeList&awardYear=$y&awardType=A&action=Search" https://www.fastlane.nsf.gov/grfp/AwardeeList.do -O "awardees_$y.txt" | |
done |
I hereby claim:
- I am armanbilge on github.
- I am arman (https://keybase.io/arman) on keybase.
- I have a public key ASCDQkGP1zR4y5DZ1GZ0dWzd770b0L3NjcZdIEqeApX7Pwo
To claim this, I am signing this object:
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
package bf | |
import java.util.Scanner | |
import scala.annotation.tailrec | |
object Main extends App { | |
@tailrec | |
def f(p: List[Char], i: Int = 0, c: Vector[Int] = Vector.fill(10000)(0), st: List[List[Char]] = Nil, ex: List[Boolean] = List(true)): Unit = if (ex.head) p match { case Nil => case '+' :: pp => f(pp, i, c.updated(i, c(i) + 1), st, ex) case '-' :: pp => f(pp, i, c.updated(i, c(i) - 1), st, ex) case '>' :: pp => f(pp, i + 1, c, st, ex) case '<' :: pp => f(pp, i - 1, c, st, ex) case '.' :: pp => print(c(i).asInstanceOf[Char]); f(pp, i, c, st, ex) case ',' :: pp => f(pp, i, c.updated(i, new Scanner(System.in).nextByte().asInstanceOf[Int]), st, ex) case '[' :: pp => f(pp, i, c, p :: st, (c(i) != 0) :: ex) case ']' :: pp => f(st.head, i, c, st.tail, ex.tail) case _ :: pp => f(pp, i, c, st, ex) } else p match { case Nil => case '[' :: pp => f(pp, i, c, p :: st, false :: ex) case ']' :: pp => f(pp, i, c, st.tail, ex.tail) case _ :: pp => f(pp, i, c, st, ex) } |