Skip to content

Instantly share code, notes, and snippets.

View Yevgnen's full-sized avatar
🔥

Yevgnen Yevgnen

🔥
View GitHub Profile
(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)) ? )))
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

Articles

2014 - Word2vec Explained: Deriving Mikolov Et Al.’s Negative-Sampling Word-Embedding Method

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import tensorflow as tf
_INT = tf.int32
_FLOAT = tf.float32
class SkipThought(object):
@Yevgnen
Yevgnen / seq2seq
Last active September 4, 2021 16:17
PyTorch seq2seq.
#!/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)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Illustrating pytorch's padding API
import torch
import numpy as np
vocab_size = 20
max_len = 10
@Yevgnen
Yevgnen / test_tf.py
Created October 31, 2017 01:34
test_tf.py
#!/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,
@Yevgnen
Yevgnen / install-emacs26.sh
Last active October 26, 2018 06:59
Emacs 26 installation
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 \
@Yevgnen
Yevgnen / emacs26.sh
Created June 3, 2018 11:09 — forked from kissge/emacs26.sh
Compile Emacs 26 on Ubuntu 16.04
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
@Yevgnen
Yevgnen / urlsafari
Created September 5, 2019 23:57 — forked from kshiteesh/urlsafari
This AppleScript saves all the tabs open in all Safari windows to a Markdown file.
(*
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