Skip to content

Instantly share code, notes, and snippets.

View Exlsunshine's full-sized avatar
🧱
Back to work!

Mark Exlsunshine

🧱
Back to work!
View GitHub Profile
@Exlsunshine
Exlsunshine / vgg.py
Created October 14, 2019 02:24
This script will demonstrate how to use a pretrained model, in PyTorch, to make predictions.
"""
This script will demonstrate how to use a pretrained model, in PyTorch,
to make predictions. Specifically, we will be using VGG16 with a cat
image.
References used to make this script:
PyTorch pretrained models doc:
http://pytorch.org/docs/master/torchvision/models.html
PyTorch image transforms example:
http://pytorch.org/tutorials/beginner/data_loading_tutorial.html#transforms
@Exlsunshine
Exlsunshine / main.go
Created November 5, 2018 06:32 — forked from xyproto/main.go
gzip compression/decompression example
package main
import (
"fmt"
"compress/gzip"
"io"
"io/ioutil"
"bytes"
"log"
)
@Exlsunshine
Exlsunshine / translate.go
Created August 30, 2018 10:49 — forked from hvoecking/translate.go
Golang reflection: traversing arbitrary structures
// Traverses an arbitrary struct and translates all stings it encounters
//
// I haven't seen an example for reflection traversing an arbitrary struct, so
// I want to share this with you. If you encounter any bugs or want to see
// another example please comment.
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Heye Vöcking
//
@Exlsunshine
Exlsunshine / install-oh-my-zsh.sh
Created April 13, 2018 13:23 — forked from hewerthomn/install-oh-my-zsh.sh
Offline install of oh-my-zsh on Ubuntu
main() {
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"