start new:
tmux
start new with session name:
tmux new -s myname
| /* Adapted from Tom Cunningham's 'Data Warehousing with MySql' (www.meansandends.com/mysql-data-warehouse) */ | |
| ###### small-numbers table | |
| DROP TABLE IF EXISTS numbers_small; | |
| CREATE TABLE numbers_small (number INT); | |
| INSERT INTO numbers_small VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); | |
| ###### main numbers table | |
| DROP TABLE IF EXISTS numbers; | |
| CREATE TABLE numbers (number BIGINT); |
| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # @kyletcarlson | |
| # | |
| # This skeleton also assumes you're using the following gems: |
| # Importing the libraries | |
| from scipy.stats.stats import pearsonr | |
| import pandas as pd | |
| import numpy as np | |
| import json | |
| data = pd.read_csv("../../Downloads/data_books.csv", sep = ",", header=None, | |
| names=['Reviewer', 'Book', 'Rating']) | |
| # Picking 2 books |
| import math | |
| import random | |
| import csv | |
| import cProfile | |
| import numpy as np | |
| import hashlib | |
| memoization = {} |
| class ClusteringQuality: | |
| """ | |
| Instances of this class implement the two measures of clustering quality discussed in the article, namely the davies | |
| bouldin index and the silhouette index. It also implements a number of useful helper methods. | |
| :param solution: the clustering solution of type Clustering | |
| :param minimum: the minimum distance allowable | |
| """ | |
| def __init__(self, solution, minimum): | |
| """ |
| look process: | |
| `lsof -i :<PORT NUMBER> | |
| kill process | |
| `kill -9 <PID>` |
| #add 'node_modules' to .gitignore file | |
| git rm -r --cached node_modules | |
| git commit -m 'Remove the now ignored directory node_modules' | |
| git push origin master |
| # Railscast | |
| http://railscasts.com/episodes/308-oh-my-zsh | |
| # Install Zsh | |
| sudo apt-get update && sudo apt-get install zsh | |
| # Install Oh-my-zsh | |
| wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh | |
| # Make ZSH default shell |
| git filter-branch -f --env-filter 'if [[ "$GIT_COMMIT" = "119900cd7054c64f2b8e4774e59afbfc39a28e73" ]]; then export GIT_COMMITTER_NAME="Lee Treveil" GIT_AUTHOR_NAME="Lee Treveil" GIT_COMMITTER_EMAIL="[email protected]" GIT_AUTHOR_EMAIL="[email protected]"; fi' HEAD |