Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
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 = { |
Fibers are an abstraction over sequential computation, similar to threads but at a higher level. There are two ways to think about this model: by example, and abstractly from first principles. We'll start with the example.
(credit here is very much due to Fabio Labella, who's incredible Scala World talk describes these ideas far better than I can)
Consider the following three functions
import asyncio | |
import base64 | |
import json | |
import os | |
import pyaudio | |
from websockets.asyncio.client import connect | |
class SimpleGeminiVoice: | |
def __init__(self): |