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
- install k8s env (node, master) | |
- Customaze docker path |
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
# based from twisted doc | |
# https://twistedmatrix.com/documents/16.5.0/core/howto/defer.html | |
from twisted.internet import reactor, defer | |
def getDeferredObj(inputData): | |
print('getDeferredObj called') | |
deferred = defer.Deferred() | |
# simulate a delayed result by asking the reactor to fire the | |
# Deferred in 2 seconds time with the result inputData * 3 |
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 main | |
import "fmt" | |
// Seq is an iterator over sequences of individual values. | |
// When called as seq(yield), seq calls yield(v) for each value v | |
// in the sequence, stopping early if yield returns false. | |
// type Seq[V any] func(yield func(V) bool) | |
// our iterator function takes in a value and returns a func |
OlderNewer