sudo systemctl start docker
sudo systemctl status docker
sudo systemctl enable docker
sudo usermod -aG docker $(whoami)
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 java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.ObjectInputStream; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.HashMap; |
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 info = traintest(opts, imdb, psi) | |
% ------------------------------------------------------------------------- | |
% Train using verification or not | |
verificationTask = isfield(imdb, 'pairs'); | |
if verificationTask, | |
% Verification using SVMs (Jeff's idea). | |
% For each of the templates in IJB-A, we can train a one-vs-rest |
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
#!/usr/bin/python | |
import pandas as pd | |
import numpy as np | |
import random | |
FILENAME = '../data/scores_artificial_vs_real.csv' | |
N_FOLDS = 5 |
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
HANDY ONE-LINE SCRIPTS FOR AWK 30 April 2008 | |
Compiled by Eric Pement - eric [at] pement.org version 0.27 | |
Latest version of this file (in English) is usually at: | |
http://www.pement.org/awk/awk1line.txt | |
This file will also be available in other languages: | |
Chinese - http://ximix.org/translation/awk1line_zh-CN.txt | |
USAGE: |
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
def _initialize_weights(self): | |
for m in self.modules(): | |
if isinstance(m, nn.Conv2d): | |
pass # leave the default PyTorch init | |
# m.weight.data.zero_() | |
# if m.bias is not None: | |
# m.bias.data.zero_() | |
if isinstance(m, nn.ConvTranspose2d): | |
assert m.kernel_size[0] == m.kernel_size[1] | |
initial_weight = get_upsampling_weight( |
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
n02119789 1 kit_fox | |
n02100735 2 English_setter | |
n02110185 3 Siberian_husky | |
n02096294 4 Australian_terrier | |
n02102040 5 English_springer | |
n02066245 6 grey_whale | |
n02509815 7 lesser_panda | |
n02124075 8 Egyptian_cat | |
n02417914 9 ibex | |
n02123394 10 Persian_cat |
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
# Example code to demonstrate parallel for loop implementation using joblib | |
from joblib import Parallel, delayed | |
import multiprocessing | |
# Vars | |
my_list = range(10) | |
squares = [] | |
# Function to parallelize | |
def find_square(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
# Displays a set of images in a particular format in an HTML page | |
# Can be easily modified for custom use-cases, especially visualizing experiment results. | |
# | |
# Consider image existing in the following folder structure: | |
# DATA_PATH | |
# image01.jpg | |
# im_det0.jpg | |
# im_det1.jpg | |
# im_det2.jpg ... |
OlderNewer