(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
// Website you intended to retrieve for users. | |
const upstream = 'api.openai.com' | |
// Custom pathname for the upstream website. | |
const upstream_path = '/' | |
// Website you intended to retrieve for users using mobile devices. | |
const upstream_mobile = upstream | |
// Countries and regions where you wish to suspend your service. |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: jupyter | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start jupyter | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
time mysqlimport --use-threads 10 --fields-terminated-by , -uroot -proot --local kaggle events.csv |
dz-h@dzh-H:~/Desktop/kaggle_test/csv_data$ time mysqlimport --use-threads 10 --fields-terminated-by , -uroot -proot --local kaggle app_events.csv | |
mysqlimport: [Warning] Using a password on the command line interface can be insecure. | |
kaggle.app_events: Records: 32473068 Deleted: 0 Skipped: 0 Warnings: 3 | |
real 2m28.837s | |
user 0m0.084s | |
sys 0m0.568s |
#!/bin/bash | |
#author: haiy | |
#date: Mon Mar 30 17:01:00 CST 2015 | |
src=$1 | |
dst=$2 | |
tmp=$dst"_tmp" | |
red=$'\e[31m' | |
reset=$'\e[0m' | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: clone_table source_table_name target_table_name" |
import java.util | |
import org.scalatest.FunSuite | |
import scala.util.parsing.json._ | |
import org.json.JSONObject | |
import scala.collection.JavaConverters._ | |
/** | |
* Created by haiy on 5/21/15. | |
*/ |
def merge(m1: Map[String, Int], m2: Map[String, Int]): Map[String, Int] = | |
m1 ++ m2.map { case (k, v) => k -> (v + m1.getOrElse(k, 0)) } |