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
| #!/usr/bin/env ruby | |
| PENDING=2 | |
| NO_STATUS=3 | |
| return_txt = "" | |
| loop do | |
| return_txt = `hub ci-status -v` | |
| break unless [PENDING, NO_STATUS].include?($?.exitstatus) | |
| sleep(1) |
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 com.stripe.danielhfrank | |
| import com.twitter.algebird.Monoid | |
| import scala.annotation.tailrec | |
| import scala.collection.mutable | |
| class OverTimeMonoid[V: Monoid] extends Monoid[ Seq[(Long, V)]] { | |
| override def zero: Seq[(Long, V)] = Seq.empty |
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 typing import Generic, TypeVar | |
| import numpy as np | |
| from pydantic.fields import ModelField | |
| JSON_ENCODERS = { | |
| np.ndarray: lambda arr: arr.tolist() | |
| } | |
| DType = TypeVar('DType') |
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 asyncio | |
| import trio | |
| import sys | |
| async def fib(n: int) -> int: | |
| if n < 0: | |
| raise ValueError('boom') | |
| elif n in {0, 1}: |
OlderNewer