Skip to content

Instantly share code, notes, and snippets.

def boxes_iou(boxesA, boxesB):
boxesA = boxesA.astype(float)
boxesB = boxesB.astype(float)
boxesA[:, 2:] += boxesA[:, :2]
boxesB[:, 2:] += boxesB[:, :2]
N, M = len(boxesA), len(boxesB)
boxesA = np.broadcast_to(boxesA.reshape(N, 1, 4), (N, M, 4))
boxesB = np.broadcast_to(boxesB.reshape(1, M, 4), (N, M, 4))
x1 = np.maximum(boxesA[..., 0], boxesB[..., 0])
#include "../Externals/Include/Include.h"
#include "Object.hpp"
#define sz(x) (int(x.size()))
using namespace glm;
using namespace std;
#define SHADOW_MAP_SIZE 2048
Object quad;
#version 410 core
uniform sampler2D tex0;
uniform sampler2D tex1;
uniform sampler2D tex2;
out vec4 color;
in VS_OUT
{
#version 410
layout(location = 0) out vec4 fragColor;
uniform mat4 um4mv;
uniform mat4 um4p;
in VertexData
{
vec3 N; // eye space normal
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Mouse Button Remap
Comment=Exchanging Mouse Right & Middle Button
Exec=sh -c "xinput set-button-map $(xinput list --id-only 'pointer:Logitech USB Receiver') 1 3 2"
Terminal=false
import os
from sys import argv
from scipy.misc import imread, imresize, imsave
input_dir = argv[1]
output_dir = './out/'
os.makedirs(output_dir, exist_ok=True)
filenames = sorted(os.listdir(input_dir))
c.NotebookApp.ip = '*'
c.NotebookApp.password = 'sha1:704dbc0c1d89:2e2c09f31e89b252b374b483ed070c64126024f4'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Matlab
Exec=bash -c "~/Matlab/bin/matlab -desktop"
Icon=matlab_icon.png
Terminal=False
Categories=Development;Math;Science;Education;

Docker Usage

Start/Stop Docker

sudo systemctl start docker
sudo systemctl stop docker

Create f25 Container