Skip to content

Instantly share code, notes, and snippets.

@f0ster
f0ster / retryable.scala
Created June 28, 2019 22:21
Recursive Retryables in scala
import scala.concurrent.{ExecutionContext, Future}
trait Retryable {
// Returning T, throwing the exception on failure
@annotation.tailrec
final def retryDangerously[T](n: Int)(fn: => T): T = {
util.Try { fn } match {
case util.Success(x) => x
case _ if n > 1 => retryDangerously(n - 1)(fn)
case util.Failure(e) => throw e
@f0ster
f0ster / main.py
Created August 17, 2020 14:40
quantconnect wheel strategy example
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@f0ster
f0ster / comfyui_colab.ipynb
Created January 16, 2024 00:47
comfyui_colab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@f0ster
f0ster / comfyui_colab.ipynb
Created January 16, 2024 15:44
comfyui_colab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@f0ster
f0ster / basic-llm-call.json
Last active February 15, 2024 20:32
comfyUI-llama basic LLM worfklow
{
"last_node_id": 3,
"last_link_id": 2,
"nodes": [
{
"id": 2,
"type": "Call LLM Basic",
"pos": [
42,
190