Skip to content

Instantly share code, notes, and snippets.

View ttpro1995's full-sized avatar
💭
meowingful

Thai Thien ttpro1995

💭
meowingful
View GitHub Profile
@andrewjong
andrewjong / pytorch_image_folder_with_file_paths.py
Last active October 31, 2024 11:13
PyTorch Image File Paths With Dataset Dataloader
import torch
from torchvision import datasets
class ImageFolderWithPaths(datasets.ImageFolder):
"""Custom dataset that includes image file paths. Extends
torchvision.datasets.ImageFolder
"""
# override the __getitem__ method. this is the method that dataloader calls
def __getitem__(self, index):
@kevinzakka
kevinzakka / data_loader.py
Last active April 19, 2024 23:42
Train, Validation and Test Split for torchvision Datasets
"""
Create train, valid, test iterators for CIFAR-10 [1].
Easily extended to MNIST, CIFAR-100 and Imagenet.
[1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4
"""
import torch
import numpy as np
@simurai
simurai / README.md
Last active November 28, 2019 05:39
Atom for minimalists

For minimalist ❤️ ers

minimalist

Just you, your code and nothing else.... :meditatingbuddha:

@scott1028
scott1028 / Howl's Moving Castle.markdown
Last active December 30, 2019 04:29
Howl's Moving Castle

Howl's Moving Castle

This is a tribute to Studio Ghibli's Exhibition in Paris.

While walking through the exhibit, I learned that the castle in howl's moving castle was actually animated with a computer. I was surprised, and inspired to recreate this famous scene using web technologies that I'm familiar with, allowing the user to control the castle's movement.

I ended up biting off more than I could chew, and spending much longer than I had initially intended.

To achieve it, I cut all of the elements out of the film itself using photoshop to crop certain frames. I then inserted all of the elements directly to the DOM (no canvas) and animated them using GSAP and an epic amount of timelines. The legs' walk cycle were by far the most difficult part. I did not use any other software for the animation, just good old sublime text!

@xero
xero / irc.md
Last active October 29, 2024 15:25
irc cheat sheet
@igordcard
igordcard / pastebin.sh
Last active June 12, 2018 10:50 — forked from yevgenko/pastebin.sh
Updated to the latest Pastebin.com API.
#!/bin/bash
# Paste at Pastebin.com using command line (browsers are slow, right?)
# coder : Anil Dewani
# date : November 7, 2010
# forker : Igor Duarte Cardoso
# date : March 12, 2014
# Don't forget to set your Unique Developer API Key here
# http://pastebin.com/api#1
API_KEY=
@nlothian
nlothian / Penn Treebank II Tags.md
Last active June 11, 2024 19:06
Penn Treebank II Tags