Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥

Yevgnen Yevgnen

🔥
View GitHub Profile
@Yevgnen
Yevgnen / build_pytorch_openmp_mkl_macOS.sh
Created Jan 12, 2022 — forked from rfeinman/build_pytorch_openmp_mkl_macOS.sh
Build PyTorch with MKL & OpenMP threading on macOS
View build_pytorch_openmp_mkl_macOS.sh
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# This install used the following development environment:
# - We have installed xcode command line tools
# - We have installed cmake via homebrew (my version is 3.20.2)
# - We have created a fresh conda environment "pytorch-dev" and installed
# python=3.8 and all of the packages from pytorch/README.md except cmake
# (including the torch.distributed deps)
# - We have copied the relevant OpenMP header files into a fresh directory at ~/openmp
# - We have cloned the pytorch github repo to ~/pytorch
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
View Hyperlinks_in_Terminal_Emulators.md
View gist:f2b1a3a3822ba40ef266be3819c34d40
[tool.poetry]
name = "venv"
version = "0.1.0"
description = "Virtual Env."
authors = ["Yevgnen Koh <wherejoystarts@gmail.com>"]
[[tool.poetry.source]]
name = "default"
url = "https://pypi.org/simple/"
default = true
View export_safari_reading_list.py
#!/usr/bin/env python
"""
export_safari_reading_list.py
~~~~~~~~~~~~~~
This script gets a list of all the URLs in Safari Reading List, and
writes them all to a file.
Requires Python 3.
"""
@Yevgnen
Yevgnen / urlsafari
Created Sep 5, 2019 — forked from kshiteesh/urlsafari
This AppleScript saves all the tabs open in all Safari windows to a Markdown file.
View urlsafari
(*
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
@Yevgnen
Yevgnen / emacs26.sh
Created Jun 3, 2018 — forked from kissge/emacs26.sh
Compile Emacs 26 on Ubuntu 16.04
View emacs26.sh
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 / install-emacs26.sh
Last active Oct 26, 2018
Emacs 26 installation
View install-emacs26.sh
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 \
View 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,
View test_pad.py
#!/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 / seq2seq
Last active Sep 4, 2021
PyTorch seq2seq.
View 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)