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
| # Windmill: Relative Imports & wmill.runScript Examples | |
| Two patterns for reusing scripts in Windmill — **relative imports** (inlined, same job) and **wmill.runScript** (separate child job). | |
| --- | |
| ## Python | |
| ### `f/common/send_email.py` — reusable unit |
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 bash | |
| # ============================================================================ | |
| # Windmill Doctor - Diagnose LSP, Debugger, and Multiplayer issues | |
| # ============================================================================ | |
| # | |
| # Usage: | |
| # ./windmill-doctor.sh [OPTIONS] | |
| # | |
| # Options: | |
| # --base-url URL Windmill base URL (default: http://localhost) |
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 spatial.dsl._ | |
| import org.virtualized._ | |
| import spatial.SpatialCompiler | |
| import spatial.interpreter.Interpreter | |
| import spatial.interpreter.Streams | |
| import spatial.metadata._ | |
| trait ParticleFilter extends SpatialStream { | |
| val N: scala.Int = 10 |
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 __future__ import print_function | |
| from keras import layers | |
| from keras.layers import Activation | |
| from keras.layers.normalization import BatchNormalization | |
| from keras import models | |
| from keras.datasets import cifar10 | |
| from keras.utils import np_utils | |
| from keras.callbacks import CSVLogger |
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 keras import layers | |
| from keras.layers import Activation | |
| from keras import models | |
| def residual_network(x): | |
| def resnet_conv(channels, kernel_size, strides, y): |
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 com.scalakata._ | |
| import scala.reflect._ | |
| @instrument class Playground { | |
| Prog.main() | |
| } |
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 com.scalakata._ | |
| @instrument class Playground { | |
| Prog.main() | |
| } | |
| trait Expr { | |
| sealed trait Exp[T] |
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 com.scalakata._ | |
| @instrument class Playground { | |
| Prog.main() | |
| } | |
| trait Expr { | |
| sealed trait Exp[T] |
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
| case class Lambda[A:Rep, B:Rep](f: A => B) extends (A => B) { | |
| val rA = rep[A] | |
| val rB = rep[B] | |
| type InternalB = rB.Internal | |
| lazy val lambda: Exp[rA.Internal => InternalB] = doLambdaDef(f)(rA, rB) | |
| def apply(arg:A):B = { |
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
| case class Lambda[A:Rep, B:Rep](f: A => B) extends (A => B) { | |
| val rA = rep[A] | |
| val rB = rep[B] | |
| type InternalB = rB.Internal | |
| lazy val lambda: Exp[rA.Internal => InternalB] = doLambdaDef(f)(rA, rB) | |
| def apply(arg:A):B = { |
NewerOlder