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
cluster_boxes_data = get_cluster_box_info(frame, box_info) | |
task_batches = [] | |
cluster_boxes_data.sort(key=lambda x : (x[2] - x[0]) * (x[3] - x[1])) | |
# student's code here | |
for i in range(len(cluster_boxes_data)): | |
task = TaskEntity(image_path=frame.path, coord=cluster_boxes_data[i][:4], depth=cluster_boxes_data[i][4]) | |
task_batch = TaskBatch([task], task.img_width, task.img_height, priority=i) |
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
from scheduling.misc import * | |
from scheduling.TaskEntity import * | |
# read the input bounding box data from file | |
box_info = read_json_file('../dataset/waymo_ground_truth_flat.json') | |
def process_frame(frame): | |
"""Process frame for scheduling. |
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
from scheduling.misc import * | |
from scheduling.TaskEntity import * | |
# read the input bounding box data from file | |
box_info = read_json_file('../dataset/waymo_ground_truth_flat.json') | |
frame_num = 0 | |
boxes = {} |
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
/** | |
* LED Music Visualizer | |
* by Daman Mulye | |
* adapted from: https://github.com/hansjny/Natural-Nerd/tree/master/SoundReactive2 | |
* using the FastLED library: http://fastled.io/ | |
* June 9, 2019 | |
*/ | |
#include <FastLED.h> | |
#include "reactive_commons.h" |
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
/** | |
* LED Music Visualizer | |
* by Daman Mulye | |
* adapted from: https://github.com/hansjny/Natural-Nerd/tree/master/SoundReactive2 | |
* using the FastLED library: http://fastled.io/ | |
* June 9, 2019 | |
*/ | |
#include <FastLED.h> | |
#include "reactive_commons.h" |
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
let promiseURL = function(searchTerm) { | |
return new Promise(function(resolve, reject) { | |
$http.get('https://api.cognitive.microsoft.com/bing/v5.0/images/search?q=' + searchTerm + '&count=1&offset=0&mkt=en-us&safeSearch=Strict', { | |
headers: { | |
'Ocp-Apim-Subscription-Key': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
} | |
}).success(function(response) { | |
resolve(response); | |
}).error(function(err, status) { | |
reject(err); |
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
function NewPollCtrl($scope, $http, $location, $q) { | |
$scope.poll = { | |
options: [{ | |
text: '' | |
}, { | |
text: '' | |
}] | |
}; | |
$scope.cbstate = "not-pressed"; |