Skip to content

Instantly share code, notes, and snippets.

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "$sessionid=((quser $env:USERNAME | select -Skip 1) -split '\s+')[2]; tscon $sessionid /dest:console"
import json,sys
import numpy as np
# Make sure that caffe is on the python path:
caffe_root = '../' # this file is expected to be in {caffe_root}/examples
import os
os.chdir(caffe_root)
import sys
sys.path.insert(0, 'python')
#!/usr/bin/python2
import json, sys
from PIL import Image
import xml.etree.cElementTree as ET
import xml.dom.minidom
types = "i2 i4 i5 il100 il60 il80 io ip p10 p11 p12 p19 p23 p26 p27 p3 p5 p6 pg ph4 ph4.5 ph5 pl100 pl120 pl20 pl30 pl40 pl5 pl50 pl60 pl70 pl80 pm20 pm30 pm55 pn pne po pr40 w13 w32 w55 w57 w59 wo".split()
oriAnnotation = "data/annotations.json"
with open(oriAnnotation) as data_file:
@xiw9
xiw9 / Dockerfile
Created October 20, 2016 13:02
Dockerfile-cntk
FROM xiw9/archlinux
MAINTAINER Xi Wang <xiwfdu@gmail.com>
LABEL com.nvidia.volumes.needed="nvidia_driver"
ENV CUDA_VERSION 8.0
LABEL com.nvidia.cuda.version="8.0"
RUN echo 'Server = http://mirrors.163.com/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist
RUN echo $' \n\
@xiw9
xiw9 / Dockerfile
Created October 18, 2016 09:23
Dockerfile-tensorflow
FROM xiw9/archlinux
MAINTAINER Xi Wang <xiwfdu@gmail.com>
LABEL com.nvidia.volumes.needed="nvidia_driver"
ENV CUDA_VERSION 8.0
LABEL com.nvidia.cuda.version="8.0"
RUN echo 'Server = http://mirrors.163.com/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist
RUN echo $' \n\
#!/bin/sh
error_count=0
while true
do
wget --spider --quiet --tries=1 --timeout=2 www.twitter.com
if [ "$?" == "0" ]; then
error_count=0
else
error_count=`expr $error_count + 1`
echo 'check_connective.sh: Problem decteted, ['$error_count'] times.'