Skip to content

Instantly share code, notes, and snippets.

@gotnix
gotnix / .emacs
Created July 11, 2012 09:11
Emacs 配置,包含Auto Complete 和Yasnippet
;;========================================
;; 外观设置
;;========================================
;;禁用工具栏
(tool-bar-mode -1)
;;禁用菜单栏,F10 开启关闭菜单
(menu-bar-mode -1)
@ngn999
ngn999 / gist:3168642
Last active April 27, 2017 08:23
Emacs 常用Mode

学会基本操作后,值得细究的Mode:

  • CC Mode, 写C/C++代码, 管理缩进,高亮
  • Cperl Mode, 写Perl代码, 比Perl Mode更强.
  • Python Mode
  • eshell, M-x shell RET
  • Diff Mode / Ediff Mode, 看diff, 做merge操作.
  • VC, 与版本管理系统相接合,支持CVS, SVN, Git etc.
  • Hippie Expand, M-/
  • Dired Mode, 文件, 目录管理. copy, mv, rename. create
@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