This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'subr-x) | |
(require 'projectile) | |
(defvar ivy--switch-buffer-name-max-length 40) | |
(defvar ivy--switch-buffer-mode-max-length 18) | |
(defvar ivy--switch-buffer-project-max-length 15) | |
(defvar ivy--switch-buffer-delimiter "") | |
(defun ivy--switch-buffer-pad (str len) | |
(concat str (make-string (- len (length str)) ? ))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXTS=( 3GP ASF AVI FLV M4V MKV MOV MP4 MPEG MPG MPG2 MPG4 RMVB WMV MTS ) | |
brew install duti | |
for ext in ${EXTS[@]} | |
do | |
lower=$(echo $ext | awk '{print tolower($0)}') | |
duti -s io.mpv $ext all | |
duti -s io.mpv $lower all | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import tensorflow as tf | |
_INT = tf.int32 | |
_FLOAT = tf.float32 | |
class SkipThought(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import torch | |
import torch.nn.functional as F | |
from torch import nn | |
from torch.autograd import Variable | |
np.random.seed(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Illustrating pytorch's padding API | |
import torch | |
import numpy as np | |
vocab_size = 20 | |
max_len = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import tensorflow as tf | |
import numpy as np | |
def load_data(size, | |
min_len=5, | |
max_len=15, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install gnutls texinfo libxml2 | |
cd ~/Downloads | |
git clone --branch work --depth 1 https://bitbucket.org/mituharu/emacs-mac.git | |
cd emacs-mac | |
./autogen.sh | |
export PATH=/usr/local/opt/texinfo/bin/:$PATH | |
export PKG_CONFIG_PATH=/usr/local/opt/libxml2/lib/pkgconfig | |
./configure --with-mac \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir emacs | |
cd emacs | |
git init | |
git remote add origin https://github.com/emacs-mirror/emacs.git | |
git fetch --depth 1 origin emacs-26 | |
git reset --hard FETCH_HEAD | |
sudo apt install autoconf make gcc texinfo libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff5-dev libgnutls-dev libncurses5-dev | |
./autogen.sh | |
./configure | |
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Export All Safari Tabs in All Open Windows to a Markdown File | |
July 13, 2015 | |
// SCRIPT PAGE | |
http://hegde.me/urlsafari | |
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT | |
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file |
OlderNewer