Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View xunge's full-sized avatar
🎯
Focusing

xunge xunge

🎯
Focusing
View GitHub Profile
@joedborg
joedborg / launch_vm.sh
Last active April 18, 2024 07:54
LXD Ubuntu VM launch and disk resize
#!/bin/env bash
set -e
readonly VM="banana"
readonly CPU="8"
readonly MEM="8GB"
readonly DSK="120GB"
lxc init images:ubuntu/focal ${VM} -p default -p vm --vm
@xunge
xunge / pytorch_imagenet.py
Last active July 20, 2022 14:15
using pytorch to train and validate imagenet dataset
import time
import shutil
import os
import torch
import torch.nn as nn
import torchvision.datasets as datasets
import torchvision.transforms as transforms
import torchvision.models as models
import torch.backends.cudnn as cudnn
@jbpyn
jbpyn / pptx2pdf.scpt
Created July 26, 2017 23:34
pptx2pdf
on run {input, parameters}
set theOutput to {}
tell application "Microsoft PowerPoint" -- work on version 15.15 or newer
launch
set theDial to start up dialog
set start up dialog to false
repeat with i in input
open i
set pdfPath to my makeNewPath(i)
save active presentation in pdfPath as save as PDF -- save in same folder