Created
June 6, 2019 10:41
-
-
Save deanshub/4cfd0424dd8e60b5cf8edafbf2f9dd5e to your computer and use it in GitHub Desktop.
This file contains 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 Strim from 'strim-js' | |
new Strim() | |
.pipe({ | |
module: 'dom', | |
func: 'getDataFromElements', | |
args: ['#userInput1','#userInput2','#userInput3','#userInput4'], | |
}) | |
.toWorker() | |
.pipe({ | |
module: 'dataCrunch', | |
func: 'sum', | |
}) | |
.toServer() | |
.pipe({ | |
module: 'dataCrunch', | |
func: 'avgWithOtherResults', | |
}) | |
.toWorker() | |
.pipe({ | |
module: 'dataCrunch', | |
func: 'otherMlStuff', | |
args: {weights: 0.3, dropout: 0.7}, | |
}) | |
.toClient() | |
.subscribe({ | |
next: result => { | |
console.log(`the result is:${result}`) | |
}, | |
error: err => { | |
throw new Error(err) | |
}, | |
complete: () => { | |
console.log('strim completed') | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment