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
#!/bin/sh | |
# 1) Install Xcode 12 | |
# 2) Install command line tools: `xcode-select --install` | |
# 3) Install Homebrew | |
# 4) brew install zlib bzip2 xz | |
CFLAGS="-I$(brew --prefix zlib)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix xz)/include" \ | |
LDFLAGS="-L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib -L$(brew --prefix xz)/lib" \ | |
pyenv install 3.8.6 |
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
# Setup HomeBrew: https://brew.sh/ | |
brew install openblas | |
pip download --no-binary :all: --no-deps numpy | |
unzip numpy-1.18.2.zip # (you may have newer version) | |
cd numpy-1.18.2 | |
cat > site.cfg <<EOF | |
[openblas] | |
libraries = openblas | |
library_dirs = $(brew --prefix openblas)/lib |
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
from copy import deepcopy | |
from functools import reduce | |
def deep_merge(*dicts, update=False): | |
""" | |
Merges dicts deeply. | |
Parameters | |
---------- |
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
#!/bin/sh | |
# 1) Install Xcode 11 | |
# 2) Install command line tools: `xcode-select --install` | |
# 3) Install HomeBrew | |
# 4) brew tap cartr/qt4 && brew install cartr/qt4/[email protected] subversion rbenv | |
# 5) Setup rbenv | |
# 6) Run this command | |
PKG_CONFIG_PATH="$(brew --prefix cartr/qt4/[email protected])/lib/pkgconfig" \ |
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
snippet pd | |
abbr preventDefault() | |
options word | |
preventDefault() | |
snippet render | |
abbr render() {...} | |
options head | |
render() { | |
return ( |
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
#!/bin/bash | |
sleep_sec=0 | |
usage() { | |
echo "Usage: $0 [-s sleep_sec] <num>" | |
} | |
while getopts :s:h OPT; do | |
case $OPT in |
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
from glob import glob | |
import os | |
import sys | |
os.environ['SPARK_HOME'] = 'C:\\Users\\MyName\\Documents\\spark-1.4.0-bin-hadoop2.6' | |
spark_home = os.environ.get('SPARK_HOME') | |
pyspark_path = os.path.join(spark_home, 'python') | |
sys.path.insert(0, pyspark_path) | |
for z in glob(os.path.join(pyspark_path, 'lib', 'py4j*.zip')): | |
sys.path.insert(0, z) |
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
Doorkeeper.configure do | |
resource_owner_authenticator do |routes| | |
current_user || warden.authenticate!(:scope => :user) # Devise | |
end | |
admin_authenticator do |routes| | |
authenticate_admin_user! | |
end | |
use_refresh_token |
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
/* This is a template command */ | |
CmdUtils.CreateCommand({ | |
names: [ "markdown-copy" ], | |
homepage: "http://ubiquity.s21g.com/296703", | |
author: { name: "Masaki Yatsu", email: "[email protected]"}, | |
license: "MIT", | |
description: "Copy url, title and selected text in Markdown format", | |
help: "Copy url, title and selected text in Markdown format", | |
arguments: [{ role: 'object', nountype: noun_arb_text, label: 'text' }], |