Skip to content

Instantly share code, notes, and snippets.

View wayofnumbers's full-sized avatar

Michael Li wayofnumbers

View GitHub Profile
@wayofnumbers
wayofnumbers / FMNIST-import.py
Created October 22, 2019 21:53
FMNIST-Import
# import standard PyTorch modules
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.tensorboard import SummaryWriter # TensorBoard support
# import torchvision module to handle image manipulation
import torchvision
import torchvision.transforms as transforms
@wayofnumbers
wayofnumbers / download-file-from-kaggle-kernel.py
Last active September 12, 2019 15:27
Download files from Kaggle Kernels
# Put this snippet into your Kaggle kernel, make sure the file is under kaggle/working/
import os
os.chdir(r'kaggle/working/')
from IPython.display import FileLink
FileLink(r'export.pkl')
@wayofnumbers
wayofnumbers / collect_images_from_baidu_search_results.py
Last active December 9, 2021 17:16
collect images from Baidu search results
# -*- coding: utf-8 -*-
import json
import itertools
import urllib
import requests
import os
import re
import sys
print("hah")
@wayofnumbers
wayofnumbers / collect_images_urls_from_google_search
Created September 11, 2019 04:07
JavaScript command to download images from Google Images search results