Skip to content

Instantly share code, notes, and snippets.

View zhuchen115's full-sized avatar

zhuchen115

  • Sony China Ltd
  • Shanghai
View GitHub Profile
@zhuchen115
zhuchen115 / waseda-wpa.bat
Last active March 11, 2019 07:42
Connect to the network both in wired ad wireless
@echo off
REM Use this script After wire is connected
netsh wlan disconnect
route delete 0.0.0.0
netsh wlan connect waseda-wpa2
route add 133.9.0.0 mask 255.255.0.0 192.168.11.1
@zhuchen115
zhuchen115 / gpumon.py
Created June 11, 2019 23:51
A GPU training monitor, to prevent the process stop respond.
import os
import subprocess
import time
import psutil
nvtask = {}
while True:
nvrescmd = subprocess.run(['nvidia-smi','pmon','-c','1'], stdout=subprocess.PIPE)
@zhuchen115
zhuchen115 / rs2options.cpp
Created June 13, 2019 04:56
Reterive all the options of Realsense using librealsense2
#include <iostream>
#include <librealsense2/rs.hpp>
using namespace std;
using namespace rs2;
const char* rs2_option_enum_name(int i);
int main()
{
@zhuchen115
zhuchen115 / CMakeLists.txt
Created July 2, 2019 08:13
CMAKE for JBIG-KIT
cmake_minimum_required(VERSION 3.6)
project(jbigkit)
set(JBIG_SRC libjbig/jbig.c libjbig/jbig_ar.c)
set(JBIG85_SRC libjbig/jbig85.c libjbig/jbig_ar.c libjbig/jbig_ar.h)
add_library(libjbig STATIC ${JBIG_SRC})
set_target_properties(libjbig PROPERTIES PUBLIC_HEADER "libjbig/jbig_ar.h;libjbig/jbig.h")
add_library(libjbig85 STATIC ${JBIG85_SRC})