Skip to content

Instantly share code, notes, and snippets.

View kamwoh's full-sized avatar

Ng Kam Woh kamwoh

View GitHub Profile
@kamwoh
kamwoh / Dockerfile
Last active July 7, 2025 15:22
My dockerfile for pytorch
FROM pytorch/pytorch:1.9.0-cuda11.1-cudnn8-devel
RUN apt-get update & apt-get -y install bc unzip git htop vim ffmpeg libsm6 libxext6 libgl1-mesa-glx
RUN pip install jupyterlab
RUN pip install matplotlib
RUN pip install opencv-python
RUN pip install scikit-image
RUN pip install scikit-learn
RUN pip install seaborn
@kamwoh
kamwoh / pub_scholar.py
Created June 15, 2021 05:57
a python script to search publication record based on publication names
from scholarly import scholarly
listpubs = """
Embedding watermarks into deep neural networks
Turning your weakness into a strength: Watermarking deep neural networks by backdooring
DeepMarks: A Digital Fingerprinting Framework for Deep Neural Networks
Protecting intellectual property of deep neural networks with watermarking
DeepSigns: A Generic Watermark- ing Framework for IP Protection of Deep Learning Models
Adversarial Frontier Stitching for Remote Neural Network Watermarking
Watermarking deep neural networks for embedded systems
@kamwoh
kamwoh / extract_ILSVRC.sh
Created April 13, 2021 01:25 — forked from BIGBALLON/extract_ILSVRC.sh
script for ImageNet data extract.
#!/bin/bash
#
# script to extract ImageNet dataset
# ILSVRC2012_img_train.tar (about 138 GB)
# ILSVRC2012_img_val.tar (about 6.3 GB)
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory
#
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md
#
# train/
@kamwoh
kamwoh / author_scholar.py
Created March 12, 2021 09:42
a python script to search author with related background
from scholarly import scholarly, ProxyGenerator
import os
import json
import pandas as pd
# if proxy
pg = ProxyGenerator()
pg.SingleProxy(http = 'http://localhost:7890')
scholarly.use_proxy(pg)
@kamwoh
kamwoh / snipping-tools.sh
Last active August 13, 2019 09:43
A Window-like Snipping Tools in Ubuntu
#!/bin/bash
wget https://upload.wikimedia.org/wikipedia/en/9/94/Snipping_Tool_10_Icon.png ~/Pictures/snipping.png
cd ~/.local/share/applications/
echo "[Desktop Entry]" > snipping-tools.desktop
echo "Version=1.0" >> snipping-tools.desktop
echo "Name=Snipping Tools" >> snipping-tools.desktop
echo "Comment=A shortcut like Window Snipping Tools" >> snipping-tools.desktop
echo "Exec=/usr/bin/gnome-screenshot -a -i" >> snipping-tools.desktop