I hereby claim:
- I am salanki on github.
- I am salanki (https://keybase.io/salanki) on keybase.
- I have a public key ASCUTCgXmhpAZAGEASjr0WsQkx8a8xjqoaQiZF9lhfwvDgo
To claim this, I am signing this object:
# On how to build the pixelstreaming images yourself: https://adamrehn.com/articles/pixel-streaming-in-linux-containers/ | |
# and https://github.com/adamrehn/ue4-example-dockerfiles/tree/master/pixel-streaming. All images used in this YAML are public. | |
# Developed for Bare Metal Managed Kubernetes GPUs from http://www.coreweave.com | |
# Will work locally without any additional components if POD CIDRs are reachable from the clients computer. To work from the Internet, a STUN/TURN server needs to be setup. Hit me up for more info on that. | |
apiVersion: serving.knative.dev/v1 | |
kind: Service | |
metadata: | |
name: ue4-temple | |
spec: |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: folding-at-home | |
spec: | |
progressDeadlineSeconds: 25920000 | |
replicas: 1 | |
revisionHistoryLimit: 2 | |
selector: | |
matchLabels: |
I hereby claim:
To claim this, I am signing this object:
apiVersion: argoproj.io/v1alpha1 | |
kind: Workflow | |
metadata: | |
generateName: render-123-classroom | |
spec: | |
maxParallelism: 50 # Run maximum 50 tasks in parallel | |
retryStrategy: | |
limit: 2 # Retry each task max twice | |
entrypoint: render | |
templates: |
// lib/actions.js | |
import identity from 'lodash/identity'; | |
export const ActionType = { | |
REQUEST: 'REQUEST', | |
SUCCESS: 'SUCCESS', | |
FAILURE: 'FAILURE' | |
}; | |
function createActionCreatorFlat(prefix, type, requestPayloadCreator = identity) { |
function generator(baseType) { | |
// Need to handle variable length argument lists | |
const fun = (payload) => ({ | |
type: fun, | |
payload: payload, | |
baseType: baseType | |
}); | |
return fun; | |
} |
/* Actions.scala */ | |
package actions | |
trait Action // Trait ~= abstract class / interface. Can't be directly instantiated. | |
sealed trait Feed extends Actions // Sealing is not required but important as the compiler will know that this class can't be extended by any other code, meaning we can do static typechecking that anything that is supposed to handle all cases of Feed actually does so. More reading: http://underscore.io/blog/posts/2015/06/02/everything-about-sealed.html | |
/* Objects are often used similar to packages in Scala. In this case you can just think of them as a grouping, no other special meaning */ | |
object Feed { | |
class FetchRequest extends Feed |
import shapeless.{Poly1, Coproduct} | |
import shapeless.ops.coproduct.Folder | |
import argonaut.{_} | |
import argonaut.Argonaut._ | |
/** | |
* Generic encoder for Coproducts, will only resolve if all types in a Coproduct has an EncodeJson in scope | |
*/ | |
object CoproductToArgonautFolder extends Poly1 { |
import scalaz._ | |
import Scalaz._ | |
import scala.concurrent.Future | |
import scalaz.contrib.std.scalaFuture._ // typeclass instances for Scala Future | |
import scala.concurrent.ExecutionContext.Implicits.global // implicit execution context...you probably want a better one for real-world | |
type ErrorsOrT[M[+_], +A] = EitherT[M, NonEmptyList[String], A] // String could be your error type of choice | |
for { | |
thing1 <- EitherT(Future.successful(1.right)) |