Skip to content

Instantly share code, notes, and snippets.

View Hunsin's full-sized avatar

Hsiao-Chieh Tsai Hunsin

View GitHub Profile
@Hunsin
Hunsin / router.go
Last active August 26, 2023 16:23
The package wraps julienschmidt's httprouter, making it support functions such as middlewares, sub/group routing with same prefix. Written in Go (Golang).
package router
import (
"context"
"net/http"
gpath "path"
"github.com/julienschmidt/httprouter"
)
@Hunsin
Hunsin / zipper.go
Last active January 5, 2018 15:03
Tar and Un-tar Gzip files in Golang
package main
import (
"archive/tar"
"compress/gzip"
"io"
"io/ioutil"
"log"
"os"
"strings"
@Hunsin
Hunsin / jupytorch-cuda.Dockerfile
Last active May 14, 2019 06:33
A Jupyter Dockerfile with PyTorch installed
FROM continuumio/anaconda3:2019.03
RUN /opt/conda/bin/conda install pytorch torchvision cudatoolkit=10.0 -y --quiet -c pytorch
RUN /opt/conda/bin/conda install jupyter -y --quiet
RUN mkdir /opt/notebooks
EXPOSE 80