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
julia> function f(x) | |
for i=1:length(x) | |
@inbounds x[i] *= 2 | |
end | |
end | |
f (generic function with 1 method) | |
julia> code_llvm(f, (Matrix{Float64},)) | |
define internal void @julia_f(%jl_value_t*) { |
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
Fitted linear SVM | |
* Non-zero weights: 100 | |
* Accuracy: 0.963000 | |
* Iterations: 100 | |
* Converged: true | |
Computing Raw scores | |
-------------------- | |
vectorized julia | |
elapsed time: 0.641106641 seconds (80048000 bytes allocated) |
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
#include <wand/magick_wand.h> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int main(int argc, char* argv[]) | |
{ | |
MagickWand *mw_in = NewMagickWand(); | |
MagickWand *mw_out = NewMagickWand(); |
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 battery widget on laptops | |
mybattery = nil | |
mybattery_timer = nil | |
if lucasb.file_exists("/sys/class/power_supply/BAT0/status") then | |
mybattery = awful.widget.progressbar() | |
mybattery:set_width(13) | |
mybattery:set_vertical(true) | |
mybattery_tip = awful.tooltip({objects = {mybattery}}) | |
lastalarm = 0 |
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
{ | |
"n02112350": 148, | |
"n04344873": 311, | |
"n01692333": 470, | |
"n03459775": 725, | |
"n04133789": 751, | |
"n01871265": 214, | |
"n04366367": 681, | |
"n03891332": 527, | |
"n03085013": 543, |
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
class Dummy(): | |
def __init__(self, *a, **kw): | |
pass | |
def __setstate__(self, *a, **kw): | |
pass | |
def __getstate__(self, *a, **kw): | |
pass |
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
# count number of posters | |
wget -O - http://www.eccv2016.org/main-conference/ | grep -i 'pdf_icon' | wc -l | |
# == 504 | |
# number of deep-learning ones | |
wget -O - http://www.eccv2016.org/main-conference/ | grep -i 'deep\|convolutional\|network\|cnn\|neural' | wc -l | |
# == 127 | |
# Note the numbers are approximates because some posters are present twice, there's a legend on the icons, etc. |
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 collections import defaultdict | |
import numpy as np | |
from scipy.optimize import linear_sum_assignment | |
from scipy.spatial.distance import cdist | |
from sklearn.metrics import auc | |
def prec_rec_2d(det_scores, det_coords, det_frames, gt_coords, gt_frames, gt_radii): | |
""" Computes full precision-recall curves at all possible thresholds. | |
Arguments: |
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
# Commands can be sent in lists of arbitrary length, allowing for arbitrarily complex instructions per frame. The user must explicitly request output data: | |
from tdw.controller import Controller | |
from tdw.tdw_utils import TDWUtils | |
from tdw.librarian import ModelLibrarian | |
from tdw.output_data import OutputData, Bounds, Images | |
c = Controller(launch_build=True) | |
lib = ModelLibrarian("models_core.json") |
OlderNewer