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
# Create a base Conda environment with Python 3.9 and the aqueduct-ml package. | |
# These steps sit outside of the critical path of running a function. | |
conda create -n aqueduct_py39 python==3.9 | |
conda run -n aqueduct_py39 pip install aqueduct-ml | |
# Since the Python 3.9 runtime was already downloaded and cached when building | |
# the base image, this step now only takes 5 seconds. | |
conda create -n my_workflow_env python==3.9 | |
# This command adds the site package path of aqueduct_py39 to the PYTHONPATH of |
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
# Create a Conda environment my_workflow_env with Python 3.9. | |
# This step takes 16 seconds. | |
conda create -n my_workflow_env python==3.9 | |
# Install aqueduct-ml and scikit-learn in this environment; Aqueduct is | |
# required in order to orchestrate the execution of Python functions. | |
# This is just an example but would likely include other library | |
# dependencies depending on the use case in question. | |
# Installing aqueduct-ml takes 42 seconds. | |
# Installing scikit-learn takes another 4 seconds. |
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
# Create new dataflow with Cloudflow. | |
flow = cloudflow.Dataflow([(‘url’, str)]) | |
# First, apply img_preproc, then apply three models in parallel. | |
img = flow.map(img_preproc) | |
p1 = img.map(resnet_101) | |
p2 = img.map(vgg_16) | |
p3 = img.map(inception_v3) | |
# Combine the results with union, create a group for each input, and pick the highest confidence prediction. |
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
<0xffffff80402b1400>(0x0)::listenerCallback - Thunderbolt HPD packet for route = 0x0 port = 12 unplug = 0 | |
mcache: 4 CPU(s), 64 bytes CPU cache line size | |
mbinit: done [96 MB total pool size, (64/32) split] | |
rooting via boot-uuid from /chosen: 7B5646BD-13B6-3CBE-8C35-DF1A62C08FBD | |
Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict> | |
com.apple.AppleFSCompressionTypeZlib kmod start | |
com.apple.AppleFSCompressionTypeDataless kmod start | |
com.apple.AppleFSCompressionTypeZlib load succeeded | |
com.apple.AppleFSCompressionTypeDataless load succeeded | |
AppleIntelCPUPowerManagementClient: ready |
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
# print_msg function takes three arguments and is equivalent to | |
# snprintf(“Move disk %d from %d to %d.”, $a0, $a1, $a2); | |
hanoi: | |
slti $t0, $a0, 2 | |
bne $t0, $0, caseOne | |
addiu $sp, $sp, -20 | |
sw $a0, 0($sp) | |
sw $a1, 4($sp) |