Skip to content

Instantly share code, notes, and snippets.

@CorcovadoMing
CorcovadoMing / map_clsloc.txt
Created October 16, 2017 15:43 — forked from aaronpolhamus/map_clsloc.txt
Image net classes + labels
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
@CorcovadoMing
CorcovadoMing / LMDB_val_patches.txt
Created December 4, 2016 17:48 — forked from bearpaw/LMDB_val_patches.txt
Read LMDB in python
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000001.jpg 1
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000002.jpg 1823
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000003.jpg 2903
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000004.jpg 4470
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000005.jpg 4698
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000006.jpg 4797
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000007.jpg 4917
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000008.jpg 5072
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000009.jpg 5177
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000010.jpg 5271
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
case "$WINDOWMANAGER" in
*gnome*)
if [ -e /etc/SuSE-release ]; then
PATH=$PATH:/opt/gnome/bin
FROM ubuntu:15.10
WORKDIR /root
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get upgrade -y \
&& apt-get install -y tightvncserver vncviewer twm xterm x11-xserver-utils firefox
ADD xstartup /root/.vnc/
ENV USER root
#!/bin/bash
IP=`echo $1 | cut -d '@' -f 2`
echo "Start Bandwidth measurement ..."
fish -c "sshpass -p $2 ssh -o 'StrictHostKeyChecking no' $1 iperf3 -s -D -1"
fish -c "iperf3 -c $IP"
echo "Start Delay measurement ..."
PING=`ping -c 100 -i 0.2 $IP | grep icmp | cut -d = -f 4 | cut -d " " -f 1`
@CorcovadoMing
CorcovadoMing / dockerfile
Last active February 28, 2016 08:16
tigervnc
FROM ubuntu:15.10
WORKDIR /root
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get upgrade -y \
&& apt-get install -y build-essential git wget \
&& git clone https://github.com/TigerVNC/tigervnc.git \
&& wget ftp://ftp.x.org/pub/individual/xserver/xorg-server-1.17.2.tar.bz2 \
&& apt-get install -y cmake xserver-xorg-dev xserver-xorg-input-all libjpeg-turbo8-dev libfltk1.3-dev libgnutls-dev libxtst-dev libxdamage-dev x11proto-xcmisc-dev x11proto-bigreqs-dev x11proto-composite-dev libxfont-dev autoconf xutils-dev pkg-config libtool gettext xfonts-utils twm xterm x11-xserver-utils firefox \
@CorcovadoMing
CorcovadoMing / dockerfile
Last active February 28, 2016 08:13
opencv
FROM ubuntu:14.04
RUN apt-get update && \
apt-get install -y \
build-essential \
cmake \
git \
wget \
unzip \
pkg-config \
@CorcovadoMing
CorcovadoMing / Vagrantfile
Created November 30, 2015 07:47 — forked from leifg/Vagrantfile
Add a second disk to system using vagrant
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
//
// RandomRange.h
//
// Created by Ming on 10/6/14.
// Copyright (c) 2014 Ming. All rights reserved.
//
#ifndef __LIBRARY__RandomRange__
#define __LIBRARY__RandomRange__