├── .aliases
├── .aws
├── config
└── credentials
├── .bash_profile
├── .bash_prompt
├── .bashrc
├── .curlrc
├── .dots
├── .editorconfig
├── .exports
├── .functions
├── .gdbinit
├── .gitattributes
├── .gitconfig
├── .gitignore
├── .gvimrc
├── .hgignore
├── .hushlogin
├── .inputrc
├── .mrjob.conf
├── .s3cfg
├── .screenrc
├── .vim
├── backups
│ └── .gitignore
├── colors
│ └── solarized.vim
├── swaps
│ └── .gitignore
├── syntax
│ └── json.vim
└── undo
│ └── .gitignore
├── .vimrc
├── .wgetrc
├── CREDITS.md
├── LICENSE
├── README.md
├── android.sh
├── aws.sh
├── bin
├── bash
├── httpcompression
└── subl
├── bootstrap.sh
├── brew.sh
├── datastores.sh
├── init
├── Preferences.sublime-settings
├── Solarized Dark xterm-256color.terminal
├── Solarized Dark.itermcolors
├── profile_default
│ ├── startup
│ │ └── README
│ └── static
│ │ └── custom
│ │ ├── custom.css
│ │ └── custom.js
└── profile_pyspark
│ ├── history.sqlite
│ ├── ipython_config.py
│ ├── ipython_nbconvert_config.py
│ ├── ipython_notebook_config.py
│ ├── ipython_qtconsole_config.py
│ ├── startup
│ ├── 00-pyspark-setup.py
│ └── README
│ └── static
│ └── custom
│ ├── custom.css
│ └── custom.js
├── osx.sh
├── osxprep.sh
├── pydata.sh
└── web.sh
/.aliases:
--------------------------------------------------------------------------------
1 | # Easier navigation: .., ..., ...., ....., ~ and -
2 | alias ..="cd .."
3 | alias ...="cd ../.."
4 | alias ....="cd ../../.."
5 | alias .....="cd ../../../.."
6 | alias ~="cd ~" # `cd` is probably faster to type though
7 | alias -- -="cd -"
8 |
9 | # Shortcuts
10 | alias d="cd ~/Documents/Dropbox"
11 | alias dl="cd ~/Downloads"
12 | alias dt="cd ~/Desktop"
13 | alias p="cd ~/projects"
14 | alias g="git"
15 | alias h="history"
16 | alias j="jobs"
17 |
18 | # Detect which `ls` flavor is in use
19 | if ls --color > /dev/null 2>&1; then # GNU `ls`
20 | colorflag="--color"
21 | else # OS X `ls`
22 | colorflag="-G"
23 | fi
24 |
25 | # List all files colorized in long format
26 | alias l="ls -lF ${colorflag}"
27 |
28 | # List all files colorized in long format, including dot files
29 | alias la="ls -laF ${colorflag}"
30 |
31 | # List only directories
32 | alias lsd="ls -lF ${colorflag} | grep --color=never '^d'"
33 |
34 | # Always use color output for `ls`
35 | alias ls="command ls ${colorflag}"
36 | export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
37 |
38 | # Enable aliases to be sudo’ed
39 | alias sudo='sudo '
40 |
41 | # Get week number
42 | alias week='date +%V'
43 |
44 | # Stopwatch
45 | alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
46 |
47 | # Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
48 | alias update='sudo softwareupdate -i -a; brew update; brew upgrade --all; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update'
49 |
50 | # IP addresses
51 | alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
52 | alias localip="ipconfig getifaddr en0"
53 | alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
54 |
55 | # Flush Directory Service cache
56 | alias flush="dscacheutil -flushcache && killall -HUP mDNSResponder"
57 |
58 | # Clean up LaunchServices to remove duplicates in the “Open With” menu
59 | alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder"
60 |
61 | # View HTTP traffic
62 | alias sniff="sudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'"
63 | alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\""
64 |
65 | # Canonical hex dump; some systems have this symlinked
66 | command -v hd > /dev/null || alias hd="hexdump -C"
67 |
68 | # OS X has no `md5sum`, so use `md5` as a fallback
69 | command -v md5sum > /dev/null || alias md5sum="md5"
70 |
71 | # OS X has no `sha1sum`, so use `shasum` as a fallback
72 | command -v sha1sum > /dev/null || alias sha1sum="shasum"
73 |
74 | # JavaScriptCore REPL
75 | jscbin="/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc";
76 | [ -e "${jscbin}" ] && alias jsc="${jscbin}";
77 | unset jscbin;
78 |
79 | # Trim new lines and copy to clipboard
80 | alias c="tr -d '\n' | pbcopy"
81 |
82 | # Recursively delete `.DS_Store` files
83 | alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
84 |
85 | # Empty the Trash on all mounted volumes and the main HDD
86 | # Also, clear Apple’s System Logs to improve shell startup speed
87 | alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
88 |
89 | # Show/hide hidden files in Finder
90 | alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
91 | alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
92 |
93 | # Hide/show all desktop icons (useful when presenting)
94 | alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
95 | alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
96 |
97 | # URL-encode strings
98 | alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"'
99 |
100 | # Merge PDF files
101 | # Usage: `mergepdf -o output.pdf input{1,2,3}.pdf`
102 | alias mergepdf='/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py'
103 |
104 | # Disable Spotlight
105 | alias spotoff="sudo mdutil -a -i off"
106 | # Enable Spotlight
107 | alias spoton="sudo mdutil -a -i on"
108 |
109 | # PlistBuddy alias, because sometimes `defaults` just doesn’t cut it
110 | alias plistbuddy="/usr/libexec/PlistBuddy"
111 |
112 | # Ring the terminal bell, and put a badge on Terminal.app’s Dock icon
113 | # (useful when executing time-consuming commands)
114 | alias badge="tput bel"
115 |
116 | # Intuitive map function
117 | # For example, to list all directories that contain a certain file:
118 | # find . -name .gitattributes | map dirname
119 | alias map="xargs -n1"
120 |
121 | # One of @janmoesen’s ProTip™s
122 | for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
123 | alias "$method"="lwp-request -m '$method'"
124 | done
125 |
126 | # Make Grunt print stack traces by default
127 | command -v grunt > /dev/null && alias grunt="grunt --stack"
128 |
129 | # Stuff I never really use but cannot delete either because of http://xkcd.com/530/
130 | alias stfu="osascript -e 'set volume output muted true'"
131 | alias pumpitup="osascript -e 'set volume 7'"
132 |
133 | # Kill all the tabs in Chrome to free up memory
134 | # [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
135 | alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
136 |
137 | # Lock the screen (when going AFK)
138 | alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
139 |
140 | # Reload the shell (i.e. invoke as a login shell)
141 | alias reload="exec $SHELL -l"
142 |
--------------------------------------------------------------------------------
/.aws/config:
--------------------------------------------------------------------------------
1 | [default]
2 | region = us-east-1
3 |
--------------------------------------------------------------------------------
/.aws/credentials:
--------------------------------------------------------------------------------
1 | [default]
2 | aws_access_key_id = YOURACCESSKEY
3 | aws_secret_access_key = YOURSECRETKEY
4 |
--------------------------------------------------------------------------------
/.bash_profile:
--------------------------------------------------------------------------------
1 | # Add `~/bin` to the `$PATH`
2 | export PATH="$HOME/bin:$PATH";
3 |
4 | # Load the shell dotfiles, and then some:
5 | # * ~/.path can be used to extend `$PATH`.
6 | # * ~/.extra can be used for other settings you don’t want to commit.
7 | for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do
8 | [ -r "$file" ] && [ -f "$file" ] && source "$file";
9 | done;
10 | unset file;
11 |
12 | # Case-insensitive globbing (used in pathname expansion)
13 | shopt -s nocaseglob;
14 |
15 | # Append to the Bash history file, rather than overwriting it
16 | shopt -s histappend;
17 |
18 | # Autocorrect typos in path names when using `cd`
19 | shopt -s cdspell;
20 |
21 | # Enable some Bash 4 features when possible:
22 | # * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
23 | # * Recursive globbing, e.g. `echo **/*.txt`
24 | for option in autocd globstar; do
25 | shopt -s "$option" 2> /dev/null;
26 | done;
27 |
28 | # Add tab completion for many Bash commands
29 | if which brew > /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
30 | source "$(brew --prefix)/share/bash-completion/bash_completion";
31 | elif [ -f /etc/bash_completion ]; then
32 | source /etc/bash_completion;
33 | fi;
34 |
35 | # Enable tab completion for `g` by marking it as an alias for `git`
36 | if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then
37 | complete -o default -o nospace -F _git g;
38 | fi;
39 |
40 | # Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
41 | [ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh;
42 |
43 | # Add tab completion for `defaults read|write NSGlobalDomain`
44 | # You could just use `-g` instead, but I like being explicit
45 | complete -W "NSGlobalDomain" defaults;
46 |
47 | # Add `killall` tab completion for common apps
48 | complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall;
49 |
--------------------------------------------------------------------------------
/.bash_prompt:
--------------------------------------------------------------------------------
1 | # Shell prompt based on the Solarized Dark theme.
2 | # Screenshot: http://i.imgur.com/EkEtphC.png
3 | # Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
4 | # iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
5 |
6 | if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
7 | export TERM='gnome-256color';
8 | elif infocmp xterm-256color >/dev/null 2>&1; then
9 | export TERM='xterm-256color';
10 | fi;
11 |
12 | prompt_git() {
13 | local s='';
14 | local branchName='';
15 |
16 | # Check if the current directory is in a Git repository.
17 | if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then
18 |
19 | # check if the current directory is in .git before running git checks
20 | if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then
21 |
22 | # Ensure the index is up to date.
23 | git update-index --really-refresh -q &>/dev/null;
24 |
25 | # Check for uncommitted changes in the index.
26 | if ! $(git diff --quiet --ignore-submodules --cached); then
27 | s+='+';
28 | fi;
29 |
30 | # Check for unstaged changes.
31 | if ! $(git diff-files --quiet --ignore-submodules --); then
32 | s+='!';
33 | fi;
34 |
35 | # Check for untracked files.
36 | if [ -n "$(git ls-files --others --exclude-standard)" ]; then
37 | s+='?';
38 | fi;
39 |
40 | # Check for stashed files.
41 | if $(git rev-parse --verify refs/stash &>/dev/null); then
42 | s+='$';
43 | fi;
44 |
45 | fi;
46 |
47 | # Get the short symbolic ref.
48 | # If HEAD isn’t a symbolic ref, get the short SHA for the latest commit
49 | # Otherwise, just give up.
50 | branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \
51 | git rev-parse --short HEAD 2> /dev/null || \
52 | echo '(unknown)')";
53 |
54 | [ -n "${s}" ] && s=" [${s}]";
55 |
56 | echo -e "${1}${branchName}${blue}${s}";
57 | else
58 | return;
59 | fi;
60 | }
61 |
62 | if tput setaf 1 &> /dev/null; then
63 | tput sgr0; # reset colors
64 | bold=$(tput bold);
65 | reset=$(tput sgr0);
66 | # Solarized colors, taken from http://git.io/solarized-colors.
67 | black=$(tput setaf 0);
68 | blue=$(tput setaf 33);
69 | cyan=$(tput setaf 37);
70 | green=$(tput setaf 64);
71 | orange=$(tput setaf 166);
72 | purple=$(tput setaf 125);
73 | red=$(tput setaf 124);
74 | violet=$(tput setaf 61);
75 | white=$(tput setaf 15);
76 | yellow=$(tput setaf 136);
77 | else
78 | bold='';
79 | reset="\e[0m";
80 | black="\e[1;30m";
81 | blue="\e[1;34m";
82 | cyan="\e[1;36m";
83 | green="\e[1;32m";
84 | orange="\e[1;33m";
85 | purple="\e[1;35m";
86 | red="\e[1;31m";
87 | violet="\e[1;35m";
88 | white="\e[1;37m";
89 | yellow="\e[1;33m";
90 | fi;
91 |
92 | # Highlight the user name when logged in as root.
93 | if [[ "${USER}" == "root" ]]; then
94 | userStyle="${red}";
95 | else
96 | userStyle="${orange}";
97 | fi;
98 |
99 | # Highlight the hostname when connected via SSH.
100 | if [[ "${SSH_TTY}" ]]; then
101 | hostStyle="${bold}${red}";
102 | else
103 | hostStyle="${yellow}";
104 | fi;
105 |
106 | # Set the terminal title to the current working directory.
107 | PS1="\[\033]0;\w\007\]";
108 | PS1+="\[${bold}\]\n"; # newline
109 | PS1+="\[${userStyle}\]\u"; # username
110 | PS1+="\[${white}\] at ";
111 | PS1+="\[${hostStyle}\]\h"; # host
112 | PS1+="\[${white}\] in ";
113 | PS1+="\[${green}\]\w"; # working directory
114 | PS1+="\$(prompt_git \"${white} on ${violet}\")"; # Git repository details
115 | PS1+="\n";
116 | PS1+="\[${white}\]\$ \[${reset}\]"; # `$` (and reset color)
117 | export PS1;
118 |
119 | PS2="\[${yellow}\]→ \[${reset}\]";
120 | export PS2;
121 |
--------------------------------------------------------------------------------
/.bashrc:
--------------------------------------------------------------------------------
1 | [ -n "$PS1" ] && source ~/.bash_profile;
2 |
--------------------------------------------------------------------------------
/.curlrc:
--------------------------------------------------------------------------------
1 | # Disguise as IE 9 on Windows 7.
2 | user-agent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
3 |
4 | # When following a redirect, automatically set the previous URL as referer.
5 | referer = ";auto"
6 |
7 | # Wait 60 seconds before timing out.
8 | connect-timeout = 60
9 |
--------------------------------------------------------------------------------
/.dots:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | function runDots() {
4 | # Ask for the administrator password upfront
5 | sudo -v
6 |
7 | # Keep-alive: update existing `sudo` time stamp until the script has finished
8 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
9 |
10 | # Run sections based on command line arguments
11 | for ARG in "$@"
12 | do
13 | if [ $ARG == "bootstrap" ] || [ $ARG == "all" ]; then
14 | echo ""
15 | echo "------------------------------"
16 | echo "Syncing the dev-setup repo to your local machine."
17 | echo "------------------------------"
18 | echo ""
19 | cd ~ && curl -#L https://github.com/donnemartin/dev-setup/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,LICENSE}
20 | fi
21 | if [ $ARG == "osxprep" ] || [ $ARG == "all" ]; then
22 | # Run the osxprep.sh Script
23 | echo ""
24 | echo "------------------------------"
25 | echo "Updating OSX and installing Xcode command line tools"
26 | echo "------------------------------"
27 | echo ""
28 | ./osxprep.sh
29 | fi
30 | if [ $ARG == "brew" ] || [ $ARG == "all" ]; then
31 | # Run the brew.sh Script
32 | # For a full listing of installed formulae and apps, refer to
33 | # the commented brew.sh source file directly and tweak it to
34 | # suit your needs.
35 | echo ""
36 | echo "------------------------------"
37 | echo "Installing Homebrew along with some common formulae and apps."
38 | echo "This might take a while to complete, as some formulae need to be installed from source."
39 | echo "------------------------------"
40 | echo ""
41 | ./brew.sh
42 | fi
43 | if [ $ARG == "osx" ] || [ $ARG == "all" ]; then
44 | # Run the osx.sh Script
45 | # I strongly suggest you read through the commented osx.sh
46 | # source file and tweak any settings based on your personal
47 | # preferences. The script defaults are intended for you to
48 | # customize. For example, if you are not running an SSD you
49 | # might want to change some of the settings listed in the
50 | # SSD section.
51 | echo ""
52 | echo "------------------------------"
53 | echo "Setting sensible OSX defaults."
54 | echo "------------------------------"
55 | echo ""
56 | ./osx.sh
57 | fi
58 | if [ $ARG == "pydata" ] || [ $ARG == "all" ]; then
59 | # Run the pydata.sh Script
60 | echo "------------------------------"
61 | echo "Setting up Python data development environment."
62 | echo "------------------------------"
63 | echo ""
64 | ./pydata.sh
65 | fi
66 | if [ $ARG == "aws" ] || [ $ARG == "all" ]; then
67 | # Run the aws.sh Script
68 | echo "------------------------------"
69 | echo "Setting up AWS development environment."
70 | echo "------------------------------"
71 | echo ""
72 | ./aws.sh
73 | fi
74 | if [ $ARG == "datastores" ] || [ $ARG == "all" ]; then
75 | # Run the datastores.sh Script
76 | echo "------------------------------"
77 | echo "Setting up data stores."
78 | echo "------------------------------"
79 | echo ""
80 | ./datastores.sh
81 | fi
82 | if [ $ARG == "web" ] || [ $ARG == "all" ]; then
83 | # Run the web.sh Script
84 | echo "------------------------------"
85 | echo "Setting up JavaScript web development environment."
86 | echo "------------------------------"
87 | echo ""
88 | ./web.sh
89 | fi
90 | if [ $ARG == "android" ] || [ $ARG == "all" ]; then
91 | # Run the android.sh Script
92 | echo "------------------------------"
93 | echo "Setting up Android development environment."
94 | echo "------------------------------"
95 | echo ""
96 | ./android.sh
97 | fi
98 | done
99 |
100 | echo "------------------------------"
101 | echo "Completed running .dots, restart your computer to ensure all updates take effect"
102 | echo "------------------------------"
103 | }
104 |
105 | read -p "This script may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
106 | echo "";
107 | if [[ $REPLY =~ ^[Yy]$ ]]; then
108 | runDots $@
109 | fi;
110 |
111 | unset runDots;
112 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = tab
6 | end_of_line = lf
7 | insert_final_newline = true
8 | trim_trailing_whitespace = true
9 |
10 | # 4 space indentation (pep8)
11 | [*.py]
12 | indent_style = space
13 | indent_size = 4
14 |
15 | [Makefile]
16 | indent_style = tab
17 |
--------------------------------------------------------------------------------
/.exports:
--------------------------------------------------------------------------------
1 | # Make vim the default editor.
2 | export EDITOR='vim';
3 |
4 | # Enable persistent REPL history for `node`.
5 | NODE_REPL_HISTORY_FILE=~/.node_history;
6 | # Allow 32³ entries; the default is 1000.
7 | NODE_REPL_HISTORY_SIZE='32768';
8 |
9 | # Increase Bash history size. Allow 32³ entries; the default is 500.
10 | export HISTSIZE='32768';
11 | export HISTFILESIZE="${HISTSIZE}";
12 | # Omit duplicates and commands that begin with a space from history.
13 | export HISTCONTROL='ignoreboth';
14 |
15 | # Prefer US English and use UTF-8.
16 | export LANG='en_US.UTF-8';
17 | export LC_ALL='en_US.UTF-8';
18 |
19 | # Highlight section titles in manual pages.
20 | export LESS_TERMCAP_md="${yellow}";
21 |
22 | # Don’t clear the screen after quitting a manual page.
23 | export MANPAGER='less -X';
24 |
25 | # Always enable colored `grep` output.
26 | export GREP_OPTIONS='--color=auto';
27 |
--------------------------------------------------------------------------------
/.functions:
--------------------------------------------------------------------------------
1 | # Simple calculator
2 | function calc() {
3 | local result="";
4 | result="$(printf "scale=10;$*\n" | bc --mathlib | tr -d '\\\n')";
5 | # └─ default (when `--mathlib` is used) is 20
6 | #
7 | if [[ "$result" == *.* ]]; then
8 | # improve the output for decimal numbers
9 | printf "$result" |
10 | sed -e 's/^\./0./' `# add "0" for cases like ".5"` \
11 | -e 's/^-\./-0./' `# add "0" for cases like "-.5"`\
12 | -e 's/0*$//;s/\.$//'; # remove trailing zeros
13 | else
14 | printf "$result";
15 | fi;
16 | printf "\n";
17 | }
18 |
19 | # Create a new directory and enter it
20 | function mkd() {
21 | mkdir -p "$@" && cd "$_";
22 | }
23 |
24 | # Change working directory to the top-most Finder window location
25 | function cdf() { # short for `cdfinder`
26 | cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')";
27 | }
28 |
29 | # Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression
30 | function targz() {
31 | local tmpFile="${@%/}.tar";
32 | tar -cvf "${tmpFile}" --exclude=".DS_Store" "${@}" || return 1;
33 |
34 | size=$(
35 | stat -f"%z" "${tmpFile}" 2> /dev/null; # OS X `stat`
36 | stat -c"%s" "${tmpFile}" 2> /dev/null # GNU `stat`
37 | );
38 |
39 | local cmd="";
40 | if (( size < 52428800 )) && hash zopfli 2> /dev/null; then
41 | # the .tar file is smaller than 50 MB and Zopfli is available; use it
42 | cmd="zopfli";
43 | else
44 | if hash pigz 2> /dev/null; then
45 | cmd="pigz";
46 | else
47 | cmd="gzip";
48 | fi;
49 | fi;
50 |
51 | echo "Compressing .tar using \`${cmd}\`…";
52 | "${cmd}" -v "${tmpFile}" || return 1;
53 | [ -f "${tmpFile}" ] && rm "${tmpFile}";
54 | echo "${tmpFile}.gz created successfully.";
55 | }
56 |
57 | # Determine size of a file or total size of a directory
58 | function fs() {
59 | if du -b /dev/null > /dev/null 2>&1; then
60 | local arg=-sbh;
61 | else
62 | local arg=-sh;
63 | fi
64 | if [[ -n "$@" ]]; then
65 | du $arg -- "$@";
66 | else
67 | du $arg .[^.]* *;
68 | fi;
69 | }
70 |
71 | # Use Git’s colored diff when available
72 | hash git &>/dev/null;
73 | if [ $? -eq 0 ]; then
74 | function diff() {
75 | git diff --no-index --color-words "$@";
76 | }
77 | fi;
78 |
79 | # Create a data URL from a file
80 | function dataurl() {
81 | local mimeType=$(file -b --mime-type "$1");
82 | if [[ $mimeType == text/* ]]; then
83 | mimeType="${mimeType};charset=utf-8";
84 | fi
85 | echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')";
86 | }
87 |
88 | # Create a git.io short URL
89 | function gitio() {
90 | if [ -z "${1}" -o -z "${2}" ]; then
91 | echo "Usage: \`gitio slug url\`";
92 | return 1;
93 | fi;
94 | curl -i http://git.io/ -F "url=${2}" -F "code=${1}";
95 | }
96 |
97 | # Start an HTTP server from a directory, optionally specifying the port
98 | function server() {
99 | local port="${1:-8000}";
100 | sleep 1 && open "http://localhost:${port}/" &
101 | # Set the default Content-Type to `text/plain` instead of `application/octet-stream`
102 | # And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files)
103 | python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port";
104 | }
105 |
106 | # Start a PHP server from a directory, optionally specifying the port
107 | # (Requires PHP 5.4.0+.)
108 | function phpserver() {
109 | local port="${1:-4000}";
110 | local ip=$(ipconfig getifaddr en1);
111 | sleep 1 && open "http://${ip}:${port}/" &
112 | php -S "${ip}:${port}";
113 | }
114 |
115 | # Compare original and gzipped file size
116 | function gz() {
117 | local origsize=$(wc -c < "$1");
118 | local gzipsize=$(gzip -c "$1" | wc -c);
119 | local ratio=$(echo "$gzipsize * 100 / $origsize" | bc -l);
120 | printf "orig: %d bytes\n" "$origsize";
121 | printf "gzip: %d bytes (%2.2f%%)\n" "$gzipsize" "$ratio";
122 | }
123 |
124 | # Syntax-highlight JSON strings or files
125 | # Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json`
126 | function json() {
127 | if [ -t 0 ]; then # argument
128 | python -mjson.tool <<< "$*" | pygmentize -l javascript;
129 | else # pipe
130 | python -mjson.tool | pygmentize -l javascript;
131 | fi;
132 | }
133 |
134 | # Run `dig` and display the most useful info
135 | function digga() {
136 | dig +nocmd "$1" any +multiline +noall +answer;
137 | }
138 |
139 | # UTF-8-encode a string of Unicode symbols
140 | function escape() {
141 | printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u);
142 | # print a newline unless we’re piping the output to another program
143 | if [ -t 1 ]; then
144 | echo ""; # newline
145 | fi;
146 | }
147 |
148 | # Decode \x{ABCD}-style Unicode escape sequences
149 | function unidecode() {
150 | perl -e "binmode(STDOUT, ':utf8'); print \"$@\"";
151 | # print a newline unless we’re piping the output to another program
152 | if [ -t 1 ]; then
153 | echo ""; # newline
154 | fi;
155 | }
156 |
157 | # Get a character’s Unicode code point
158 | function codepoint() {
159 | perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))";
160 | # print a newline unless we’re piping the output to another program
161 | if [ -t 1 ]; then
162 | echo ""; # newline
163 | fi;
164 | }
165 |
166 | # Show all the names (CNs and SANs) listed in the SSL certificate
167 | # for a given domain
168 | function getcertnames() {
169 | if [ -z "${1}" ]; then
170 | echo "ERROR: No domain specified.";
171 | return 1;
172 | fi;
173 |
174 | local domain="${1}";
175 | echo "Testing ${domain}…";
176 | echo ""; # newline
177 |
178 | local tmp=$(echo -e "GET / HTTP/1.0\nEOT" \
179 | | openssl s_client -connect "${domain}:443" -servername "${domain}" 2>&1);
180 |
181 | if [[ "${tmp}" = *"-----BEGIN CERTIFICATE-----"* ]]; then
182 | local certText=$(echo "${tmp}" \
183 | | openssl x509 -text -certopt "no_aux, no_header, no_issuer, no_pubkey, \
184 | no_serial, no_sigdump, no_signame, no_validity, no_version");
185 | echo "Common Name:";
186 | echo ""; # newline
187 | echo "${certText}" | grep "Subject:" | sed -e "s/^.*CN=//" | sed -e "s/\/emailAddress=.*//";
188 | echo ""; # newline
189 | echo "Subject Alternative Name(s):";
190 | echo ""; # newline
191 | echo "${certText}" | grep -A 1 "Subject Alternative Name:" \
192 | | sed -e "2s/DNS://g" -e "s/ //g" | tr "," "\n" | tail -n +2;
193 | return 0;
194 | else
195 | echo "ERROR: Certificate not found.";
196 | return 1;
197 | fi;
198 | }
199 |
200 | # `s` with no arguments opens the current directory in Sublime Text, otherwise
201 | # opens the given location
202 | function s() {
203 | if [ $# -eq 0 ]; then
204 | subl .;
205 | else
206 | subl "$@";
207 | fi;
208 | }
209 |
210 | # `a` with no arguments opens the current directory in Atom Editor, otherwise
211 | # opens the given location
212 | function a() {
213 | if [ $# -eq 0 ]; then
214 | atom .;
215 | else
216 | atom "$@";
217 | fi;
218 | }
219 |
220 | # `v` with no arguments opens the current directory in Vim, otherwise opens the
221 | # given location
222 | function v() {
223 | if [ $# -eq 0 ]; then
224 | vim .;
225 | else
226 | vim "$@";
227 | fi;
228 | }
229 |
230 | # `o` with no arguments opens the current directory, otherwise opens the given
231 | # location
232 | function o() {
233 | if [ $# -eq 0 ]; then
234 | open .;
235 | else
236 | open "$@";
237 | fi;
238 | }
239 |
240 | # `tre` is a shorthand for `tree` with hidden files and color enabled, ignoring
241 | # the `.git` directory, listing directories first. The output gets piped into
242 | # `less` with options to preserve color and line numbers, unless the output is
243 | # small enough for one screen.
244 | function tre() {
245 | tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX;
246 | }
247 |
--------------------------------------------------------------------------------
/.gdbinit:
--------------------------------------------------------------------------------
1 | set disassembly-flavor intel
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Automatically normalize line endings for all text-based files
2 | #* text=auto
3 | # Disabled because of https://github.com/mathiasbynens/dotfiles/issues/149 :(
4 |
--------------------------------------------------------------------------------
/.gitconfig:
--------------------------------------------------------------------------------
1 | [alias]
2 |
3 | # View abbreviated SHA, description, and history graph of the latest 20 commits
4 | l = log --pretty=oneline -n 20 --graph --abbrev-commit
5 |
6 | # View the current working tree status using the short format
7 | s = status -s
8 |
9 | # Show the diff between the latest commit and the current state
10 | d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
11 |
12 | # `git di $number` shows the diff between the state `$number` revisions ago and the current state
13 | di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
14 |
15 | # Pull in remote changes for the current repository and all its submodules
16 | p = !"git pull; git submodule foreach git pull origin master"
17 |
18 | # Clone a repository including all submodules
19 | c = clone --recursive
20 |
21 | # Commit all changes
22 | ca = !git add -A && git commit -av
23 |
24 | # Switch to a branch, creating it if necessary
25 | go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
26 |
27 | # Show verbose output about tags, branches or remotes
28 | tags = tag -l
29 | branches = branch -a
30 | remotes = remote -v
31 |
32 | # Amend the currently staged files to the latest commit
33 | amend = commit --amend --reuse-message=HEAD
34 |
35 | # Credit an author on the latest commit
36 | credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
37 |
38 | # Interactive rebase with the given number of latest commits
39 | reb = "!r() { git rebase -i HEAD~$1; }; r"
40 |
41 | # Remove the old tag with this name and tag the latest commit with it.
42 | retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r"
43 |
44 | # Find branches containing commit
45 | fb = "!f() { git branch -a --contains $1; }; f"
46 |
47 | # Find tags containing commit
48 | ft = "!f() { git describe --always --contains $1; }; f"
49 |
50 | # Find commits by source code
51 | fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
52 |
53 | # Find commits by commit message
54 | fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
55 |
56 | # Remove branches that have already been merged with master
57 | # a.k.a. ‘delete merged’
58 | dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
59 |
60 | # List contributors with number of commits
61 | contributors = shortlog --summary --numbered
62 |
63 | # Merge GitHub pull request on top of the `master` branch
64 | mpr = "!f() { \
65 | if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \
66 | git fetch origin refs/pull/$1/head:pr/$1 && \
67 | git rebase master pr/$1 && \
68 | git checkout master && \
69 | git merge pr/$1 && \
70 | git branch -D pr/$1 && \
71 | git commit --amend -m \"$(git log -1 --pretty=%B)\n\nCloses #$1.\"; \
72 | fi \
73 | }; f"
74 |
75 | [apply]
76 |
77 | # Detect whitespace errors when applying a patch
78 | whitespace = fix
79 |
80 | [core]
81 |
82 | # Use custom `.gitignore` and `.gitattributes`
83 | excludesfile = ~/.gitignore
84 | attributesfile = ~/.gitattributes
85 |
86 | # Treat spaces before tabs and all kinds of trailing whitespace as an error
87 | # [default] trailing-space: looks for spaces at the end of a line
88 | # [default] space-before-tab: looks for spaces before tabs at the beginning of a line
89 | whitespace = space-before-tab,-indent-with-non-tab,trailing-space
90 |
91 | # Make `git rebase` safer on OS X
92 | # More info:
93 | trustctime = false
94 |
95 | # Prevent showing files whose names contain non-ASCII symbols as unversioned.
96 | # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html
97 | precomposeunicode = false
98 |
99 | [color]
100 |
101 | # Use colors in Git commands that are capable of colored output when
102 | # outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.)
103 | ui = auto
104 |
105 | [color "branch"]
106 |
107 | current = yellow reverse
108 | local = yellow
109 | remote = green
110 |
111 | [color "diff"]
112 |
113 | meta = yellow bold
114 | frag = magenta bold # line info
115 | old = red # deletions
116 | new = green # additions
117 |
118 | [color "status"]
119 |
120 | added = yellow
121 | changed = green
122 | untracked = cyan
123 |
124 | [diff]
125 |
126 | # Detect copies as well as renames
127 | renames = copies
128 |
129 | [help]
130 |
131 | # Automatically correct and execute mistyped commands
132 | autocorrect = 1
133 |
134 | [merge]
135 |
136 | # Include summaries of merged commits in newly created merge commit messages
137 | log = true
138 |
139 | [push]
140 |
141 | # Use the Git 1.x.x default to avoid errors on machines with old Git
142 | # installations. To use `simple` instead, add this to your `~/.extra` file:
143 | # `git config --global push.default simple`. See http://git.io/mMah-w.
144 | default = matching
145 | # Make `git push` push relevant annotated tags when pushing branches out.
146 | followTags = true
147 |
148 | # URL shorthands
149 |
150 | [url "git@github.com:"]
151 |
152 | insteadOf = "gh:"
153 | pushInsteadOf = "github:"
154 | pushInsteadOf = "git://github.com/"
155 |
156 | [url "git://github.com/"]
157 |
158 | insteadOf = "github:"
159 |
160 | [url "git@gist.github.com:"]
161 |
162 | insteadOf = "gst:"
163 | pushInsteadOf = "gist:"
164 | pushInsteadOf = "git://gist.github.com/"
165 |
166 | [url "git://gist.github.com/"]
167 |
168 | insteadOf = "gist:"
169 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # IntelliJ IDEA IDE
2 | .idea
3 |
4 | # Compiled Python files
5 | *.pyc
6 |
7 | # Folder view configuration files
8 | .DS_Store
9 | Desktop.ini
10 |
11 | # Thumbnail cache files
12 | ._*
13 | Thumbs.db
14 |
15 | # Files that might appear on external disks
16 | .Spotlight-V100
17 | .Trashes
18 |
19 | # Files that contain credentials or personal info
20 | .extra
21 | .boto
22 | .mrjob.conf
23 | .s3cfg
24 | .aws/
25 |
26 | # Repo scratch directory
27 | scratch/
28 |
--------------------------------------------------------------------------------
/.gvimrc:
--------------------------------------------------------------------------------
1 | " Use the Solarized Dark theme
2 | set background=dark
3 | colorscheme solarized
4 | " Use 14pt Monaco
5 | set guifont=Monaco:h14
6 | " Don’t blink cursor in normal mode
7 | set guicursor=n:blinkon0
8 | " Better line-height
9 | set linespace=8
10 |
--------------------------------------------------------------------------------
/.hgignore:
--------------------------------------------------------------------------------
1 | # Use shell-style glob syntax
2 | syntax: glob
3 |
4 | # Compiled Python files
5 | *.pyc
6 |
7 | # Folder view configuration files
8 | .DS_Store
9 | Desktop.ini
10 |
11 | # Thumbnail cache files
12 | ._*
13 | Thumbs.db
14 |
15 | # Files that might appear on external disks
16 | .Spotlight-V100
17 | .Trashes
18 |
19 | # Files that contain credentials or personal info
20 | .extra
21 | .boto
22 | .mrjob.conf
23 | .s3cfg
24 | .aws/
25 |
26 | # Repo scratch directory
27 | scratch/
28 |
--------------------------------------------------------------------------------
/.hushlogin:
--------------------------------------------------------------------------------
1 | # The mere presence of this file in the home directory disables the system
2 | # copyright notice, the date and time of the last login, the message of the
3 | # day as well as other information that may otherwise appear on login.
4 | # See `man login`.
5 |
--------------------------------------------------------------------------------
/.inputrc:
--------------------------------------------------------------------------------
1 | # Make Tab autocomplete regardless of filename case
2 | set completion-ignore-case on
3 |
4 | # List all matches in case multiple possible completions are possible
5 | set show-all-if-ambiguous on
6 |
7 | # Immediately add a trailing slash when autocompleting symlinks to directories
8 | set mark-symlinked-directories on
9 |
10 | # Use the text that has already been typed as the prefix for searching through
11 | # commands (i.e. more intelligent Up/Down behavior)
12 | "\e[B": history-search-forward
13 | "\e[A": history-search-backward
14 |
15 | # Do not autocomplete hidden files unless the pattern explicitly begins with a dot
16 | set match-hidden-files off
17 |
18 | # Show all autocomplete results at once
19 | set page-completions off
20 |
21 | # If there are more than 200 possible completions for a word, ask to show them all
22 | set completion-query-items 200
23 |
24 | # Show extra file information when completing, like `ls -F` does
25 | set visible-stats on
26 |
27 | # Be more intelligent when autocompleting by also looking at the text after
28 | # the cursor. For example, when the current line is "cd ~/src/mozil", and
29 | # the cursor is on the "z", pressing Tab will not autocomplete it to "cd
30 | # ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the
31 | # Readline used by Bash 4.)
32 | set skip-completed-text on
33 |
34 | # Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456'
35 | set input-meta on
36 | set output-meta on
37 | set convert-meta off
38 |
39 | # Use Alt/Meta + Delete to delete the preceding word
40 | "\e[3;3~": kill-word
41 |
--------------------------------------------------------------------------------
/.mrjob.conf:
--------------------------------------------------------------------------------
1 | runners:
2 | emr:
3 | aws_access_key_id: YOURACCESSKEY
4 | aws_secret_access_key: YOURSECRETKEY
5 | aws_region: us-east-1
6 | ec2_key_pair: YOURKEYPAIR
7 | ec2_key_pair_file: ~/.ssh/YOURKEYPAIR.pem
8 | ssh_tunnel_to_job_tracker: true
9 | ec2_master_instance_type: m1.small
10 | ec2_instance_type: m1.small
11 | num_ec2_instances: 5
12 | s3_scratch_uri: s3://YOURBUCKETSCRATCH
13 | s3_log_uri: s3://YOURBUCKETLOG
14 | enable_emr_debugging: True
15 | bootstrap:
16 | - sudo apt-get install -y python-pip
17 | - sudo pip install --upgrade simplejson
18 |
--------------------------------------------------------------------------------
/.s3cfg:
--------------------------------------------------------------------------------
1 | [default]
2 | access_key = YOURACCESSKEY
3 | secret_key = YOURSECRETKEY
4 | bucket_location = US
5 | cloudfront_host = cloudfront.amazonaws.com
6 | cloudfront_resource = /2010-07-15/distribution
7 | default_mime_type = binary/octet-stream
8 | delete_removed = False
9 | dry_run = False
10 | encoding = UTF-8
11 | encrypt = False
12 | follow_symlinks = False
13 | force = False
14 | get_continue = False
15 | gpg_command = /usr/local/bin/gpg
16 | gpg_decrypt = %(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
17 | gpg_encrypt = %(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
18 | gpg_passphrase = YOURPASSPHRASE
19 | guess_mime_type = True
20 | host_base = s3.amazonaws.com
21 | host_bucket = %(bucket)s.s3.amazonaws.com
22 | human_readable_sizes = False
23 | list_md5 = False
24 | log_target_prefix =
25 | preserve_attrs = True
26 | progress_meter = True
27 | proxy_host =
28 | proxy_port = 0
29 | recursive = False
30 | recv_chunk = 4096
31 | reduced_redundancy = False
32 | send_chunk = 4096
33 | simpledb_host = sdb.amazonaws.com
34 | skip_existing = False
35 | socket_timeout = 300
36 | urlencoding_mode = normal
37 | use_https = True
38 | verbosity = WARNING
39 |
--------------------------------------------------------------------------------
/.screenrc:
--------------------------------------------------------------------------------
1 | # Disable the startup message
2 | startup_message off
3 |
4 | # Set a large scrollback buffer
5 | defscrollback 32000
6 |
7 | # Always start `screen` with UTF-8 enabled (`screen -U`)
8 | defutf8 on
9 |
--------------------------------------------------------------------------------
/.vim/backups/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donnemartin/dev-setup/d86102d761afa5cc1853078200b844212f99e234/.vim/backups/.gitignore
--------------------------------------------------------------------------------
/.vim/swaps/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donnemartin/dev-setup/d86102d761afa5cc1853078200b844212f99e234/.vim/swaps/.gitignore
--------------------------------------------------------------------------------
/.vim/syntax/json.vim:
--------------------------------------------------------------------------------
1 | " Vim syntax file
2 | " Language: JSON
3 | " Maintainer: Jeroen Ruigrok van der Werven
4 | " Last Change: 2009-06-16
5 | " Version: 0.4
6 | " {{{1
7 |
8 | " Syntax setup {{{2
9 | " For version 5.x: Clear all syntax items
10 | " For version 6.x: Quit when a syntax file was already loaded
11 |
12 | if !exists("main_syntax")
13 | if version < 600
14 | syntax clear
15 | elseif exists("b:current_syntax")
16 | finish
17 | endif
18 | let main_syntax = 'json'
19 | endif
20 |
21 | " Syntax: Strings {{{2
22 | syn region jsonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=jsonEscape
23 | " Syntax: JSON does not allow strings with single quotes, unlike JavaScript.
24 | syn region jsonStringSQ start=+'+ skip=+\\\\\|\\"+ end=+'+
25 |
26 | " Syntax: Escape sequences {{{3
27 | syn match jsonEscape "\\["\\/bfnrt]" contained
28 | syn match jsonEscape "\\u\x\{4}" contained
29 |
30 | " Syntax: Strings should always be enclosed with quotes.
31 | syn match jsonNoQuotes "\<\a\+\>"
32 |
33 | " Syntax: Numbers {{{2
34 | syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>"
35 |
36 | " Syntax: An integer part of 0 followed by other digits is not allowed.
37 | syn match jsonNumError "-\=\<0\d\.\d*\>"
38 |
39 | " Syntax: Boolean {{{2
40 | syn keyword jsonBoolean true false
41 |
42 | " Syntax: Null {{{2
43 | syn keyword jsonNull null
44 |
45 | " Syntax: Braces {{{2
46 | syn match jsonBraces "[{}\[\]]"
47 |
48 | " Define the default highlighting. {{{1
49 | " For version 5.7 and earlier: only when not done already
50 | " For version 5.8 and later: only when an item doesn't have highlighting yet
51 | if version >= 508 || !exists("did_json_syn_inits")
52 | if version < 508
53 | let did_json_syn_inits = 1
54 | command -nargs=+ HiLink hi link
55 | else
56 | command -nargs=+ HiLink hi def link
57 | endif
58 | HiLink jsonString String
59 | HiLink jsonEscape Special
60 | HiLink jsonNumber Number
61 | HiLink jsonBraces Operator
62 | HiLink jsonNull Function
63 | HiLink jsonBoolean Boolean
64 |
65 | HiLink jsonNumError Error
66 | HiLink jsonStringSQ Error
67 | HiLink jsonNoQuotes Error
68 | delcommand HiLink
69 | endif
70 |
71 | let b:current_syntax = "json"
72 | if main_syntax == 'json'
73 | unlet main_syntax
74 | endif
75 |
--------------------------------------------------------------------------------
/.vim/undo/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donnemartin/dev-setup/d86102d761afa5cc1853078200b844212f99e234/.vim/undo/.gitignore
--------------------------------------------------------------------------------
/.vimrc:
--------------------------------------------------------------------------------
1 | " Use the Solarized Dark theme
2 | set background=dark
3 | colorscheme solarized
4 | let g:solarized_termtrans=1
5 |
6 | " Make Vim more useful
7 | set nocompatible
8 | " Use the OS clipboard by default (on versions compiled with `+clipboard`)
9 | set clipboard=unnamed
10 | " Enhance command-line completion
11 | set wildmenu
12 | " Allow cursor keys in insert mode
13 | set esckeys
14 | " Allow backspace in insert mode
15 | set backspace=indent,eol,start
16 | " Optimize for fast terminal connections
17 | set ttyfast
18 | " Add the g flag to search/replace by default
19 | set gdefault
20 | " Use UTF-8 without BOM
21 | set encoding=utf-8 nobomb
22 | " Change mapleader
23 | let mapleader=","
24 | " Don’t add empty newlines at the end of files
25 | set binary
26 | set noeol
27 | " Centralize backups, swapfiles and undo history
28 | set backupdir=~/.vim/backups
29 | set directory=~/.vim/swaps
30 | if exists("&undodir")
31 | set undodir=~/.vim/undo
32 | endif
33 |
34 | " Don’t create backups when editing files in certain directories
35 | set backupskip=/tmp/*,/private/tmp/*
36 |
37 | " Respect modeline in files
38 | set modeline
39 | set modelines=4
40 | " Enable per-directory .vimrc files and disable unsafe commands in them
41 | set exrc
42 | set secure
43 | " Enable line numbers
44 | set number
45 | " Enable syntax highlighting
46 | syntax on
47 | " Highlight current line
48 | set cursorline
49 | " Make tabs as wide as two spaces
50 | set tabstop=2
51 | " Show “invisible” characters
52 | set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_
53 | set list
54 | " Highlight searches
55 | set hlsearch
56 | " Ignore case of searches
57 | set ignorecase
58 | " Highlight dynamically as pattern is typed
59 | set incsearch
60 | " Always show status line
61 | set laststatus=2
62 | " Enable mouse in all modes
63 | set mouse=a
64 | " Disable error bells
65 | set noerrorbells
66 | " Don’t reset cursor to start of line when moving around.
67 | set nostartofline
68 | " Show the cursor position
69 | set ruler
70 | " Don’t show the intro message when starting Vim
71 | set shortmess=atI
72 | " Show the current mode
73 | set showmode
74 | " Show the filename in the window titlebar
75 | set title
76 | " Show the (partial) command as it’s being typed
77 | set showcmd
78 | " Use relative line numbers
79 | if exists("&relativenumber")
80 | set relativenumber
81 | au BufReadPost * set relativenumber
82 | endif
83 | " Start scrolling three lines before the horizontal window border
84 | set scrolloff=3
85 |
86 | " Strip trailing whitespace (,ss)
87 | function! StripWhitespace()
88 | let save_cursor = getpos(".")
89 | let old_query = getreg('/')
90 | :%s/\s\+$//e
91 | call setpos('.', save_cursor)
92 | call setreg('/', old_query)
93 | endfunction
94 | noremap ss :call StripWhitespace()
95 | " Save a file as root (,W)
96 | noremap W :w !sudo tee % > /dev/null
97 |
98 | " Automatic commands
99 | if has("autocmd")
100 | " Enable file type detection
101 | filetype on
102 | " Treat .json files as .js
103 | autocmd BufNewFile,BufRead *.json setfiletype json syntax=javascript
104 | " Treat .md files as Markdown
105 | autocmd BufNewFile,BufRead *.md setlocal filetype=markdown
106 | endif
107 |
--------------------------------------------------------------------------------
/.wgetrc:
--------------------------------------------------------------------------------
1 | # Use the server-provided last modification date, if available
2 | timestamping = on
3 |
4 | # Do not go up in the directory structure when downloading recursively
5 | no_parent = on
6 |
7 | # Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. (The default read timeout is 15 minutes!)
8 | timeout = 60
9 |
10 | # Retry a few times when a download fails, but don’t overdo it. (The default is 20!)
11 | tries = 3
12 |
13 | # Retry even when the connection was refused
14 | retry_connrefused = on
15 |
16 | # Use the last component of a redirection URL for the local file name
17 | trust_server_names = on
18 |
19 | # Follow FTP links from HTML documents by default
20 | follow_ftp = on
21 |
22 | # Add a `.html` extension to `text/html` or `application/xhtml+xml` files that lack one, or a `.css` extension to `text/css` files that lack one
23 | adjust_extension = on
24 |
25 | # Use UTF-8 as the default system encoding
26 | # Disabled as it makes `wget` builds that don’t support this feature unusable.
27 | # Does anyone know how to conditionally configure a wget setting?
28 | # http://unix.stackexchange.com/q/34730/6040
29 | #local_encoding = UTF-8
30 |
31 | # Ignore `robots.txt` and ``
32 | robots = off
33 |
34 | # Print the HTTP and FTP server responses
35 | server_response = on
36 |
37 | # Disguise as IE 9 on Windows 7
38 | user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
39 |
--------------------------------------------------------------------------------
/CREDITS.md:
--------------------------------------------------------------------------------
1 | Credits
2 | ============
3 |
4 | This repo builds on the awesome work from the following repos:
5 |
6 | * [dotfiles](https://github.com/mathiasbynens/dotfiles) by Mathias Bynens
7 | * [mac-dev-setup](https://github.com/nicolashery/mac-dev-setup) by Nicolas Hery
8 |
9 | #### Image Credits
10 |
11 | * [Xcode](http://www.playfripp.com/wp-content/uploads/2012/12/xcode_command_line.jpg)
12 | * [Terminal](http://cloudstudio.ethz.ch/comcom/img/terminal_icon.png)
13 | * [OSX](http://icons.iconarchive.com/icons/osullivanluke/orb-os-x/512/OSX-icon.png)
14 | * [Homebrew](http://blogs.alfresco.com/wp/developer/files/2012/12/homebrew.png)
15 | * [PyData](http://pydata.org/static/base/includes/images/pydatalogo-generic.png)
16 | * [AWS](http://aws.amazon.com)
17 | * [Data Stores](http://inwallspeakers1.com/wp-content/uploads/2014/10/database-symbol-png.png)
18 | * [Web Dev](http://html5beginners.com/wp-content/uploads/2014/09/js.png)
19 | * [Chrome](https://upload.wikimedia.org/wikipedia/commons/thumb/e/e2/Google_Chrome_icon_(2011).svg/1024px-Google_Chrome_icon_(2011).svg.png)
20 | * [iTerm2](https://upload.wikimedia.org/wikipedia/en/d/d7/ITerm2-icon.png)
21 | * [Atom](https://raw.githubusercontent.com/zeke/atom-icon/master/old-icon/2.png)
22 | * [Git](https://git-scm.com/images/logos/logomark-orange@2x.png)
23 | * [VirtualBox](http://www.discoposse.com/wp-content/uploads/2013/07/virtualbox-logo.png)
24 | * [Vagrant](https://hashicorp.com/images/blog/a-new-look-for-vagrant/logo_wide-fbb6c6e8.png)
25 | * [Docker](https://msopentech.com/wp-content/uploads/dockericon.png)
26 | * [Python](https://www.python.org/)
27 | * [Anaconda](https://store.continuum.io/static/img/anaconda_logo_web.png)
28 | * [NumPy](http://www.numpy.org/)
29 | * [Pandas](http://pandas.pydata.org/)
30 | * [Matplotlib](http://matplotlib.org/)
31 | * [Seaborn](http://i.stack.imgur.com/pDYIh.png)
32 | * [Scikit-learn](http://scikit-learn.org/)
33 | * [SciPy](http://www.scipy.org/)
34 | * [Flask](http://flask.pocoo.org/static/logo/flask.png)
35 | * [Bokeh](http://bokeh.pydata.org/en/latest/_static/bokeh-transparent.png)
36 | * [Spark](http://spark.apache.org/)
37 | * [Hadoop](https://hadoop.apache.org/)
38 | * [Mrjob](https://github.com/Yelp/mrjob)
39 | * [AWS S3](http://aws.amazon.com)
40 | * [AWS EMR](http://aws.amazon.com)
41 | * [AWS Redshift](http://aws.amazon.com)
42 | * [AWS Kinesis](http://aws.amazon.com)
43 | * [AWS Lambda](http://aws.amazon.com)
44 | * [AWS Machine Learning](http://aws.amazon.com)
45 | * [Heroku](https://www.heroku.com/)
46 | * [MySQL](https://upload.wikimedia.org/wikipedia/en/thumb/6/62/MySQL.svg/1280px-MySQL.svg.png)
47 | * [MySQL Workbench](http://www.orcsweb.com/wp-content/uploads/2013/05/mysqlWorkbench.png)
48 | * [MongoDB](http://s3.amazonaws.com/info-mongodb-com/_com_assets/media/mongodb-logo-rgb.jpeg)
49 | * [Redis](https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/467px-Redis_Logo.svg.png)
50 | * [Elasticsearch](https://www.joyent.com/content/02-public-cloud/02-benchmarks/01-elasticsearch/header.png?v=1433286522)
51 | * [Node.js](https://nodejs.org/images/logos/nodejs.png)
52 | * [JSHint](http://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2015/03/1425566554jshint-logo.png)
53 | * [Ruby](http://www.unixstickers.com/image/cache/data/stickers/ruby/ruby.sh-600x600.png)
54 | * [less](http://www.endertech.com/wp-content/uploads/2014/10/LESSLogo.jpeg)
55 | * [Java](http://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/50fd97744110dcbce1acde889c0870599c9d5584/icons/java.svg)
56 | * [Android](http://www.android.com/media/android_vector.jpg)
57 | * [Android SDK](http://geckobrosradio.com/wp-content/uploads/2014/06/android-logo-png.png)
58 | * [Android Studio](http://www.eightbitdreams.com/wp-content/uploads/2015/05/android-studio-logo.png)
59 | * [IntelliJ IDEA](http://www.jetbrains.com/img/logos/intellijIdea.png)
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | This repository contains a variety of content; some developed by Donne Martin,
2 | and some from third-parties. The third-party content is distributed under the
3 | license provided by those parties.
4 |
5 | The content developed by Donne Martin is distributed under the following license:
6 |
7 | I am providing code and resources in this repository to you under an open source
8 | license. Because this is my personal repository, the license you receive to my
9 | code and resources is from me and not my employer (Facebook).
10 |
11 | Copyright 2015 Donne Martin
12 |
13 | Licensed under the Apache License, Version 2.0 (the "License");
14 | you may not use this file except in compliance with the License.
15 | You may obtain a copy of the License at
16 |
17 | http://www.apache.org/licenses/LICENSE-2.0
18 |
19 | Unless required by applicable law or agreed to in writing, software
20 | distributed under the License is distributed on an "AS IS" BASIS,
21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | See the License for the specific language governing permissions and
23 | limitations under the License.
--------------------------------------------------------------------------------
/android.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Install command-line tools using Homebrew.
4 |
5 | # Ask for the administrator password upfront.
6 | sudo -v
7 |
8 | # Keep-alive: update existing `sudo` time stamp until the script has finished.
9 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
10 |
11 | # Check for Homebrew,
12 | # Install if we don't have it
13 | if test ! $(which brew); then
14 | echo "Installing homebrew..."
15 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
16 | fi
17 |
18 | # Make sure we’re using the latest Homebrew.
19 | brew update
20 |
21 | brew cask install --appdir="~/Applications" java
22 | brew cask install --appdir="~/Applications" intellij-idea-ce
23 | brew cask install --appdir="~/Applications" android-studio
24 |
25 | brew install android-sdk
26 |
27 | # Remove outdated versions from the cellar.
28 | brew cleanup
29 |
--------------------------------------------------------------------------------
/aws.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # ~/aws.sh
4 |
5 | # Removed user's cached credentials
6 | # This script might be run with .dots, which uses elevated privileges
7 | sudo -K
8 |
9 | echo "------------------------------"
10 | echo "Setting up AWS."
11 | echo "This script requires pip and virtualenvwrapper to be installed."
12 | echo "See the pydata.sh script."
13 |
14 | echo "------------------------------"
15 | echo "Source virtualenvwrapper from ~/.extra"
16 | source ~/.extra
17 |
18 | ###############################################################################
19 | # Python 2 Virtual Enviroment #
20 | ###############################################################################
21 |
22 | echo "------------------------------"
23 | echo "Updating py2-data virtual environment with AWS modules."
24 |
25 | # Create a Python2 data environment
26 | # If this environment already exists from running pydata.sh,
27 | # it will not be overwritten
28 | mkvirtualenv py2-data
29 | workon py2-data
30 |
31 | pip install boto
32 | pip install awscli
33 | pip install mrjob
34 | pip install s3cmd
35 |
36 | EXTRA_PATH=~/.extra
37 | echo $EXTRA_PATH
38 | echo "" >> $EXTRA_PATH
39 | echo "" >> $EXTRA_PATH
40 | echo "# Configure aws cli autocomplete, added by aws.sh" >> $EXTRA_PATH
41 | echo "complete -C '~/.virtualenvs/py2-data/bin/aws_completer' aws" >> $EXTRA_PATH
42 | source $EXTRA_PATH
43 |
44 | ###############################################################################
45 | # Python 3 Virtual Enviroment #
46 | ###############################################################################
47 |
48 | echo "------------------------------"
49 | echo "Updating py3-data virtual environment with AWS modules."
50 |
51 | # Create a Python3 data environment
52 | # If this environment already exists from running pydata.sh,
53 | # it will not be overwritten
54 | mkvirtualenv --python=/usr/local/bin/python3 py3-data
55 | workon py3-data
56 |
57 | pip install boto
58 | pip install awscli
59 | #pip install mrjob # Python 2 only
60 | #pip install s3cmd # Python 2 only
61 |
62 | # Uncomment if you want to hook up the aws cli autocomplete for Python 3
63 | #EXTRA_PATH=~/.extra
64 | #echo $EXTRA_PATH
65 | #echo "" >> $EXTRA_PATH
66 | #echo "" >> $EXTRA_PATH
67 | #echo "# Configure aws cli autocomplete, added by aws.sh" >> $EXTRA_PATH
68 | #echo "complete -C '~/.virtualenvs/py3-data/bin/aws_completer' aws" >> $EXTRA_PATH
69 | #source $EXTRA_PATH
70 |
71 | ###############################################################################
72 | # System-Wide Packages #
73 | ###############################################################################
74 |
75 | # Check for Homebrew,
76 | # Install if we don't have it
77 | if test ! $(which brew); then
78 | echo "Installing homebrew..."
79 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
80 | fi
81 |
82 | # Make sure we’re using the latest Homebrew.
83 | brew update
84 |
85 | brew install apache-spark
86 |
87 | ###############################################################################
88 | # Install IPython Notebook Spark Integration
89 | ###############################################################################
90 |
91 | echo "------------------------------"
92 | echo "Installing IPython Notebook Spark integration"
93 |
94 | # Add the pyspark IPython profile
95 | cp -r init/profile_pyspark/ ~/.ipython/profile_pyspark
96 |
97 | BASH_PROFILE_PATH=~/.bash_profile
98 | echo $BASH_PROFILE_PATH
99 | echo "" >> $BASH_PROFILE_PATH
100 | echo "" >> $BASH_PROFILE_PATH
101 | echo "# IPython Notebook Spark integration, added by aws.sh" >> $BASH_PROFILE_PATH
102 | # Run $ brew info apache-spark to determine the Spark install location
103 | echo "export SPARK_HOME='/usr/local/Cellar/apache-spark/1.4.1'" >> $BASH_PROFILE_PATH
104 | echo "# Appending pyspark-shell is needed for Spark 1.4+" >> $BASH_PROFILE_PATH
105 | echo "export PYSPARK_SUBMIT_ARGS='--master local[2] pyspark-shell'" >> $BASH_PROFILE_PATH
106 | echo "" >> $BASH_PROFILE_PATH
107 | source $BASH_PROFILE_PATH
108 |
109 | echo "------------------------------"
110 | echo "TODO: Update .aws/ with your AWS credentials and region, or run aws --configure."
111 | echo "TODO: Update .mrjob.conf with your credentials, keypair, keypair location, region, and bucket info."
112 | echo "TODO: Update .s3cfg with your credentials, location, and passphrase or run s3cmd --configure."
113 | echo "Script completed."
--------------------------------------------------------------------------------
/bin/bash:
--------------------------------------------------------------------------------
1 | /usr/local/opt/bash/bin/bash
--------------------------------------------------------------------------------
/bin/httpcompression:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # DESCRIPTION:
4 | #
5 | # Provides the content encoding the specified
6 | # resources are served with.
7 | #
8 | # USAGE:
9 | #
10 | # httpcompression URL ...
11 | #
12 | # USEFUL LINKS:
13 | #
14 | # * HTTP/1.1 (RFC 2616) - Content-Encoding
15 | # https://tools.ietf.org/html/rfc2616#section-14.11
16 | #
17 | # * SDCH Specification:
18 | # https://lists.w3.org/Archives/Public/ietf-http-wg/2008JulSep/att-0441/Shared_Dictionary_Compression_over_HTTP.pdf
19 |
20 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
21 |
22 | declare -r -a CURL_DEFAULT_OPTIONS=(
23 | --connect-timeout 30
24 | --header "Accept-Encoding: gzip, deflate, sdch"
25 | --header "Cache-Control: no-cache" # Prevent intermediate proxies
26 | # from caching the response
27 |
28 | --location # If the page was moved to a
29 | # different location, redo the
30 | # request
31 | --max-time 150
32 | --show-error
33 | --silent
34 | --user-agent "Mozilla/5.0 Gecko" # Send a fake UA string for sites
35 | # that sniff it instead of using
36 | # the Accept-Encoding header
37 | )
38 |
39 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
40 |
41 | check_for_sdch() {
42 |
43 | declare availDicts=""
44 | declare currentHeaders="$1"
45 | declare dict=""
46 | declare dictClientID=""
47 | declare dicts=""
48 | declare i=""
49 | declare url="$2"
50 |
51 | # Check if the server advertised any dictionaries
52 | dicts="$( printf "%s" "$currentHeaders" |
53 | grep -i 'Get-Dictionary:' |
54 | cut -d':' -f2 |
55 | sed s/,/\ /g )"
56 |
57 | # If it does, check to see if it really supports SDCH
58 | if [ -n "$dicts" ]; then
59 | for i in $dicts; do
60 |
61 | dict=""
62 |
63 | # Check if the dictionary location is specified as a path,
64 | # and if it is, construct it's URL from the host name of the
65 | # referrer URL
66 |
67 | [[ "$i" != http* ]] \
68 | && dict="$( printf "%s" "$url" |
69 | sed -En 's/([^/]*\/\/)?([^/]*)\/?.*/\1\2/p' )"
70 |
71 | dict="$dict$i"
72 |
73 | # Request the dictionaries from the server and
74 | # construct the `Avail-Dictionary` header value
75 | #
76 | # [ The user agent identifier for a dictionary is defined
77 | # as the URL-safe base64 encoding (as described in RFC
78 | # 3548, section 4 [RFC3548]) of the first 48 bits (bits
79 | # 0..47) of the dictionary's SHA-256 digest ]
80 |
81 | dictClientID="$( curl "${CURL_DEFAULT_OPTIONS[@]}" "$dict" |
82 | openssl dgst -sha256 -binary |
83 | openssl base64 |
84 | cut -c 1-8 |
85 | sed -e 's/\+/-/' -e 's/\//_/' )"
86 |
87 | [ -n "$availDicts" ] && availDicts="$availDicts,$dictClientID" \
88 | || availDicts="$dictClientID"
89 |
90 | done
91 |
92 | # Redo the request (advertising the available dictionaries)
93 | # and replace the old resulted headers with the new ones
94 |
95 | printf "$( curl "${CURL_DEFAULT_OPTIONS[@]}" \
96 | -H "Avail-Dictionary: $availDicts" \
97 | --dump-header - \
98 | --output /dev/null \
99 | "$url" )"
100 |
101 | else
102 | printf "%s" "$currentHeaders"
103 | fi
104 | }
105 |
106 | get_content_encoding() {
107 |
108 | declare currentHeaders=""
109 | declare encoding=""
110 | declare headers=""
111 | declare indent=""
112 | declare tmp=""
113 | declare url="$1"
114 |
115 | headers="$(curl "${CURL_DEFAULT_OPTIONS[@]}" \
116 | --dump-header - \
117 | --output /dev/null \
118 | "$url" )" \
119 | && ( \
120 |
121 | # Iterate over the headers of all redirects
122 | while [ -n "$headers" ]; do
123 |
124 | # Get headers for the "current" URL
125 | currentHeaders="$( printf "%s" "$headers" | sed -n '1,/^HTTP/p' )"
126 |
127 | # Remove the headers for the "current" URL
128 | headers="${headers/"$currentHeaders"/}"
129 |
130 | currentHeaders="$(check_for_sdch "$currentHeaders" "$url")"
131 |
132 | # Get the value of the `Content-Encoding` header
133 | encoding="$( printf "%s" "$currentHeaders" |
134 | grep -i 'Content-Encoding:' |
135 | cut -d' ' -f2 |
136 | tr "\r" "," |
137 | tr -d "\n" |
138 | sed 's/,$//' )"
139 |
140 | # Print the output for the "current" URL
141 | [ -n "$encoding" ] && encoding="[$encoding]"
142 |
143 | if [ "$url" != "$1" ]; then
144 | printf "$indent$url $encoding\n"
145 | indent=" $indent"
146 | else
147 | printf "\n * $1 $encoding\n"
148 | indent=" ↳ "
149 | fi
150 |
151 | # Get the next URL from the series of redirects
152 | tmp="$url"
153 | url="$( printf "%s" "$currentHeaders" |
154 | grep -i 'Location' |
155 | sed -e 's/Location://' |
156 | sed 's/^ *//' |
157 | tr -d '\r' )"
158 |
159 | # In case the `Location` header is specified as a path
160 | [[ "$url" != http* ]] && url="$tmp$url"
161 |
162 | done
163 | )
164 | }
165 |
166 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
167 |
168 | main() {
169 |
170 | # Check if cURL is installed
171 | if [ -x "$(command -v "curl")" ]; then
172 | while [ $# -ne 0 ]; do
173 | get_content_encoding "$1"
174 | shift
175 | done
176 | printf "\n"
177 | else
178 | printf "cURL is required, please install it!\n"
179 | fi
180 |
181 | }
182 |
183 | main $@
184 |
--------------------------------------------------------------------------------
/bin/subl:
--------------------------------------------------------------------------------
1 | /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl
--------------------------------------------------------------------------------
/bootstrap.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | cd "$(dirname "${BASH_SOURCE}")";
4 |
5 | git pull origin master;
6 |
7 | function doIt() {
8 | rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" \
9 | --exclude "README.md" --exclude "LICENSE" -avh --no-perms . ~;
10 | source ~/.bash_profile;
11 | }
12 |
13 | if [ "$1" == "--force" -o "$1" == "-f" ]; then
14 | doIt;
15 | else
16 | read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
17 | echo "";
18 | if [[ $REPLY =~ ^[Yy]$ ]]; then
19 | doIt;
20 | fi;
21 | fi;
22 | unset doIt;
23 |
--------------------------------------------------------------------------------
/brew.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Install command-line tools using Homebrew.
4 |
5 | # Ask for the administrator password upfront.
6 | sudo -v
7 |
8 | # Keep-alive: update existing `sudo` time stamp until the script has finished.
9 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
10 |
11 | # Check for Homebrew,
12 | # Install if we don't have it
13 | if test ! $(which brew); then
14 | echo "Installing homebrew..."
15 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
16 | fi
17 |
18 | # Make sure we’re using the latest Homebrew.
19 | brew update
20 |
21 | # Upgrade any already-installed formulae.
22 | brew upgrade --all
23 |
24 | # Install GNU core utilities (those that come with OS X are outdated).
25 | # Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
26 | brew install coreutils
27 | sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum
28 |
29 | # Install some other useful utilities like `sponge`.
30 | brew install moreutils
31 | # Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed.
32 | brew install findutils
33 | # Install GNU `sed`, overwriting the built-in `sed`.
34 | brew install gnu-sed
35 | # Install Bash 4.
36 | brew install bash
37 | brew install bash-completion2
38 | # We installed the new shell, now we have to activate it
39 | echo "Adding the newly installed shell to the list of allowed shells"
40 | # Prompts for password
41 | sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
42 | # Change to the new shell, prompts for password
43 | chsh -s /usr/local/bin/bash
44 |
45 | # Install `wget` with IRI support.
46 | brew install wget --with-iri
47 |
48 | # Install RingoJS and Narwhal.
49 | # Note that the order in which these are installed is important;
50 | # see http://git.io/brew-narwhal-ringo.
51 | brew install ringojs
52 | brew install narwhal
53 |
54 | # Install Python
55 | brew install python
56 | brew install python3
57 |
58 | # Install ruby-build and rbenv
59 | brew install ruby-build
60 | brew install rbenv
61 | LINE='eval "$(rbenv init -)"'
62 | grep -q "$LINE" ~/.extra || echo "$LINE" >> ~/.extra
63 |
64 | # Install more recent versions of some OS X tools.
65 | brew install vim --override-system-vi
66 | brew install homebrew/dupes/grep
67 | brew install homebrew/dupes/openssh
68 | brew install homebrew/dupes/screen
69 | brew install homebrew/php/php55 --with-gmp
70 |
71 | # Install font tools.
72 | brew tap bramstein/webfonttools
73 | brew install sfnt2woff
74 | brew install sfnt2woff-zopfli
75 | brew install woff2
76 |
77 | # Install some CTF tools; see https://github.com/ctfs/write-ups.
78 | brew install aircrack-ng
79 | brew install bfg
80 | brew install binutils
81 | brew install binwalk
82 | brew install cifer
83 | brew install dex2jar
84 | brew install dns2tcp
85 | brew install fcrackzip
86 | brew install foremost
87 | brew install hashpump
88 | brew install hydra
89 | brew install john
90 | brew install knock
91 | brew install netpbm
92 | brew install nmap
93 | brew install pngcheck
94 | brew install socat
95 | brew install sqlmap
96 | brew install tcpflow
97 | brew install tcpreplay
98 | brew install tcptrace
99 | brew install ucspi-tcp # `tcpserver` etc.
100 | brew install homebrew/x11/xpdf
101 | brew install xz
102 |
103 | # Install other useful binaries.
104 | brew install ack
105 | brew install dark-mode
106 | #brew install exiv2
107 | brew install git
108 | brew install git-lfs
109 | brew install git-flow
110 | brew install git-extras
111 | brew install hub
112 | brew install imagemagick --with-webp
113 | brew install lua
114 | brew install lynx
115 | brew install p7zip
116 | brew install pigz
117 | brew install pv
118 | brew install rename
119 | brew install rhino
120 | brew install speedtest_cli
121 | brew install ssh-copy-id
122 | brew install tree
123 | brew install webkit2png
124 | brew install zopfli
125 | brew install pkg-config libffi
126 | brew install pandoc
127 |
128 | # Lxml and Libxslt
129 | brew install libxml2
130 | brew install libxslt
131 | brew link libxml2 --force
132 | brew link libxslt --force
133 |
134 | # Install Heroku
135 | brew install heroku/brew/heroku
136 | heroku update
137 |
138 | # Core casks
139 | brew cask install --appdir="/Applications" alfred
140 | brew cask install --appdir="~/Applications" iterm2
141 | brew cask install --appdir="~/Applications" java
142 | brew cask install --appdir="~/Applications" xquartz
143 |
144 | # Development tool casks
145 | brew cask install --appdir="/Applications" sublime-text
146 | brew cask install --appdir="/Applications" atom
147 | brew cask install --appdir="/Applications" virtualbox
148 | brew cask install --appdir="/Applications" vagrant
149 | brew cask install --appdir="/Applications" macdown
150 |
151 | # Misc casks
152 | brew cask install --appdir="/Applications" google-chrome
153 | brew cask install --appdir="/Applications" firefox
154 | brew cask install --appdir="/Applications" skype
155 | brew cask install --appdir="/Applications" slack
156 | brew cask install --appdir="/Applications" dropbox
157 | brew cask install --appdir="/Applications" evernote
158 | brew cask install --appdir="/Applications" 1password
159 | #brew cask install --appdir="/Applications" gimp
160 | #brew cask install --appdir="/Applications" inkscape
161 |
162 | #Remove comment to install LaTeX distribution MacTeX
163 | #brew cask install --appdir="/Applications" mactex
164 |
165 | # Install Docker, which requires virtualbox
166 | brew install docker
167 | brew install boot2docker
168 |
169 | # Install developer friendly quick look plugins; see https://github.com/sindresorhus/quick-look-plugins
170 | brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json qlprettypatch quicklook-csv betterzip qlimagesize webpquicklook suspicious-package quicklookase qlvideo
171 |
172 | # Remove outdated versions from the cellar.
173 | brew cleanup
174 |
--------------------------------------------------------------------------------
/datastores.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Install command-line tools using Homebrew.
4 |
5 | # Ask for the administrator password upfront.
6 | sudo -v
7 |
8 | # Keep-alive: update existing `sudo` time stamp until the script has finished.
9 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
10 |
11 | # Check for Homebrew,
12 | # Install if we don't have it
13 | if test ! $(which brew); then
14 | echo "Installing homebrew..."
15 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
16 | fi
17 |
18 | # Make sure we’re using the latest Homebrew.
19 | brew update
20 |
21 | # Install data stores
22 | brew install mysql
23 | brew install postgresql
24 | brew install mongo
25 | brew install redis
26 | brew install elasticsearch
27 |
28 | # Install mysql workbench
29 | # Install Cask
30 | brew install caskroom/cask/brew-cask
31 | brew cask install --appdir="/Applications" mysqlworkbench
32 |
33 | # Remove outdated versions from the cellar.
34 | brew cleanup
--------------------------------------------------------------------------------
/init/Preferences.sublime-settings:
--------------------------------------------------------------------------------
1 | {
2 | "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
3 | "default_encoding": "UTF-8",
4 | "default_line_ending": "unix",
5 | "detect_indentation": false,
6 | "draw_white_space": "all",
7 | "ensure_newline_at_eof_on_save": false,
8 | "file_exclude_patterns":
9 | [
10 | ".DS_Store",
11 | "Desktop.ini",
12 | "*.pyc",
13 | "._*",
14 | "Thumbs.db",
15 | ".Spotlight-V100",
16 | ".Trashes"
17 | ],
18 | "folder_exclude_patterns":
19 | [
20 | ".git",
21 | "node_modules"
22 | ],
23 | "font_face": "Monaco",
24 | "font_size": 10,
25 | "highlight_modified_tabs": true,
26 | "hot_exit": true,
27 | "line_padding_bottom": 5,
28 | "match_brackets": true,
29 | "match_brackets_angle": true,
30 | "remember_open_files": true,
31 | "rulers":
32 | [
33 | 80
34 | ],
35 | "show_encoding": true,
36 | "show_line_endings": true,
37 | "tab_size": 4,
38 | "theme": "Soda Dark 3.sublime-theme",
39 | "translate_tabs_to_spaces": true,
40 | "trim_trailing_white_space_on_save": true,
41 | "word_wrap": true,
42 | "always_show_minimap_viewport": true
43 | }
44 |
--------------------------------------------------------------------------------
/init/Solarized Dark xterm-256color.terminal:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BackgroundColor
6 |
7 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
8 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECgw
9 | LjAxNTkyNDQwNTMxIDAuMTI2NTIwOTE2OCAwLjE1OTY5NjAxMjcAEAGAAtIQERITWiRj
10 | bGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVjdF8QD05TS2V5ZWRBcmNo
11 | aXZlctEXGFRyb290gAEIERojLTI3O0FITltijY+RlqGqsrW+0NPYAAAAAAAAAQEAAAAA
12 | AAAAGQAAAAAAAAAAAAAAAAAAANo=
13 |
14 | BlinkText
15 |
16 | CursorColor
17 |
18 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
19 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
20 | LjQ0MDU4MDI0ODggMC41MDk2MjkzMDkyIDAuNTE2ODU3OTgxNwAQAYAC0hAREhNaJGNs
21 | YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
22 | dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA
23 | AAAZAAAAAAAAAAAAAAAAAAAA2Q==
24 |
25 | Font
26 |
27 | YnBsaXN0MDDUAQIDBAUGGBlYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
28 | AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QVk5TU2l6ZVhOU2ZGbGFnc1ZOU05hbWVWJGNs
29 | YXNzI0AqAAAAAAAAEBCAAoADXU1lbmxvLVJlZ3VsYXLSExQVFlokY2xhc3NuYW1lWCRj
30 | bGFzc2VzVk5TRm9udKIVF1hOU09iamVjdF8QD05TS2V5ZWRBcmNoaXZlctEaG1Ryb290
31 | gAEIERojLTI3PEJLUltiaXJ0dniGi5afpqmyxMfMAAAAAAAAAQEAAAAAAAAAHAAAAAAA
32 | AAAAAAAAAAAAAM4=
33 |
34 | FontAntialias
35 |
36 | FontHeightSpacing
37 | 1.1000000000000001
38 | FontWidthSpacing
39 | 1
40 | ProfileCurrentVersion
41 | 2.02
42 | SelectionColor
43 |
44 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
45 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECgw
46 | LjAzOTM4MDczNjY1IDAuMTYwMTE2NDYzOSAwLjE5ODMzMjc1NjgAEAGAAtIQERITWiRj
47 | bGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVjdF8QD05TS2V5ZWRBcmNo
48 | aXZlctEXGFRyb290gAEIERojLTI3O0FITltijY+RlqGqsrW+0NPYAAAAAAAAAQEAAAAA
49 | AAAAGQAAAAAAAAAAAAAAAAAAANo=
50 |
51 | ShowWindowSettingsNameInTitle
52 |
53 | TerminalType
54 | xterm-256color
55 | TextBoldColor
56 |
57 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
58 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECYw
59 | LjUwNTk5MTkzNTcgMC41NjQ4NTgzNzcgMC41NjM2MzY1NDE0ABABgALSEBESE1okY2xh
60 | c3NuYW1lWCRjbGFzc2VzV05TQ29sb3KiEhRYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2
61 | ZXLRFxhUcm9vdIABCBEaIy0yNztBSE5bYouNj5SfqLCzvM7R1gAAAAAAAAEBAAAAAAAA
62 | ABkAAAAAAAAAAAAAAAAAAADY
63 |
64 | TextColor
65 |
66 | YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
67 | AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
68 | LjQ0MDU4MDI0ODggMC41MDk2MjkzMDkyIDAuNTE2ODU3OTgxNwAQAYAC0hAREhNaJGNs
69 | YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
70 | dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA
71 | AAAZAAAAAAAAAAAAAAAAAAAA2Q==
72 |
73 | UseBrightBold
74 |
75 | blackColour
76 |
77 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
78 | ZmZmg7JNIT2DkvUjPoO+F0s+AYY=
79 |
80 | blueColour
81 |
82 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
83 | ZmZmgyqcAj6DtOHsPoO+RUg/AYY=
84 |
85 | brightBlackColour
86 |
87 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
88 | ZmZmg+ZzgjyDs44BPoNahyM+AYY=
89 |
90 | brightBlueColour
91 |
92 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
93 | ZmZmg7yT4T6DEXcCP4POUAQ/AYY=
94 |
95 | brightCyanColour
96 |
97 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
98 | ZmZmg7CIAT+Dj5oQP4N8ShA/AYY=
99 |
100 | brightGreenColour
101 |
102 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
103 | ZmZmgzyujT6DFZy2PoOYFsQ+AYY=
104 |
105 | brightMagentaColour
106 |
107 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
108 | ZmZmgxMjsj6D+uazPoNkyTc/AYY=
109 |
110 | brightRedColour
111 |
112 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
113 | ZmZmgyfkPT+D/15aPoMgl5Y9AYY=
114 |
115 | brightWhiteColour
116 |
117 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
118 | ZmZmg49LfT+D0Dt1P4MGM10/AYY=
119 |
120 | brightYellowColour
121 |
122 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
123 | ZmZmg1MTpj6DeHnQPoPQg+A+AYY=
124 |
125 | cyanColour
126 |
127 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
128 | ZmZmg4VRFj6DfyESP4PkZwY/AYY=
129 |
130 | greenColour
131 |
132 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
133 | ZmZmg9lI5j6DIYkKP4PVjKU8AYY=
134 |
135 | magentaColour
136 |
137 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
138 | ZmZmg/4CRz+DBTzdPYMgzt4+AYY=
139 |
140 | name
141 | Solarized Dark xterm-256color
142 | redColour
143 |
144 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
145 | ZmZmg6i7UT+DUATePYMl2hA+AYY=
146 |
147 | type
148 | Window Settings
149 | whiteColour
150 |
151 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
152 | ZmZmgzqGaj+D2tdjP4NYPUw/AYY=
153 |
154 | yellowColour
155 |
156 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
157 | ZmZmg0DAJT+DB17vPoM4Y8A8AYY=
158 |
159 |
160 |
161 |
--------------------------------------------------------------------------------
/init/Solarized Dark.itermcolors:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Ansi 0 Color
7 |
8 | Blue Component
9 | 0.19370138645172119
10 | Green Component
11 | 0.15575926005840302
12 | Red Component
13 | 0.0
14 |
15 | Ansi 1 Color
16 |
17 | Blue Component
18 | 0.14145714044570923
19 | Green Component
20 | 0.10840655118227005
21 | Red Component
22 | 0.81926977634429932
23 |
24 | Ansi 10 Color
25 |
26 | Blue Component
27 | 0.38298487663269043
28 | Green Component
29 | 0.35665956139564514
30 | Red Component
31 | 0.27671992778778076
32 |
33 | Ansi 11 Color
34 |
35 | Blue Component
36 | 0.43850564956665039
37 | Green Component
38 | 0.40717673301696777
39 | Red Component
40 | 0.32436618208885193
41 |
42 | Ansi 12 Color
43 |
44 | Blue Component
45 | 0.51685798168182373
46 | Green Component
47 | 0.50962930917739868
48 | Red Component
49 | 0.44058024883270264
50 |
51 | Ansi 13 Color
52 |
53 | Blue Component
54 | 0.72908437252044678
55 | Green Component
56 | 0.33896297216415405
57 | Red Component
58 | 0.34798634052276611
59 |
60 | Ansi 14 Color
61 |
62 | Blue Component
63 | 0.56363654136657715
64 | Green Component
65 | 0.56485837697982788
66 | Red Component
67 | 0.50599193572998047
68 |
69 | Ansi 15 Color
70 |
71 | Blue Component
72 | 0.86405980587005615
73 | Green Component
74 | 0.95794391632080078
75 | Red Component
76 | 0.98943418264389038
77 |
78 | Ansi 2 Color
79 |
80 | Blue Component
81 | 0.020208755508065224
82 | Green Component
83 | 0.54115492105484009
84 | Red Component
85 | 0.44977453351020813
86 |
87 | Ansi 3 Color
88 |
89 | Blue Component
90 | 0.023484811186790466
91 | Green Component
92 | 0.46751424670219421
93 | Red Component
94 | 0.64746475219726562
95 |
96 | Ansi 4 Color
97 |
98 | Blue Component
99 | 0.78231418132781982
100 | Green Component
101 | 0.46265947818756104
102 | Red Component
103 | 0.12754884362220764
104 |
105 | Ansi 5 Color
106 |
107 | Blue Component
108 | 0.43516635894775391
109 | Green Component
110 | 0.10802463442087173
111 | Red Component
112 | 0.77738940715789795
113 |
114 | Ansi 6 Color
115 |
116 | Blue Component
117 | 0.52502274513244629
118 | Green Component
119 | 0.57082360982894897
120 | Red Component
121 | 0.14679534733295441
122 |
123 | Ansi 7 Color
124 |
125 | Blue Component
126 | 0.79781103134155273
127 | Green Component
128 | 0.89001238346099854
129 | Red Component
130 | 0.91611063480377197
131 |
132 | Ansi 8 Color
133 |
134 | Blue Component
135 | 0.15170273184776306
136 | Green Component
137 | 0.11783610284328461
138 | Red Component
139 | 0.0
140 |
141 | Ansi 9 Color
142 |
143 | Blue Component
144 | 0.073530435562133789
145 | Green Component
146 | 0.21325300633907318
147 | Red Component
148 | 0.74176257848739624
149 |
150 | Background Color
151 |
152 | Blue Component
153 | 0.15170273184776306
154 | Green Component
155 | 0.11783610284328461
156 | Red Component
157 | 0.0
158 |
159 | Bold Color
160 |
161 | Blue Component
162 | 0.56363654136657715
163 | Green Component
164 | 0.56485837697982788
165 | Red Component
166 | 0.50599193572998047
167 |
168 | Cursor Color
169 |
170 | Blue Component
171 | 0.51685798168182373
172 | Green Component
173 | 0.50962930917739868
174 | Red Component
175 | 0.44058024883270264
176 |
177 | Cursor Text Color
178 |
179 | Blue Component
180 | 0.19370138645172119
181 | Green Component
182 | 0.15575926005840302
183 | Red Component
184 | 0.0
185 |
186 | Foreground Color
187 |
188 | Blue Component
189 | 0.51685798168182373
190 | Green Component
191 | 0.50962930917739868
192 | Red Component
193 | 0.44058024883270264
194 |
195 | Selected Text Color
196 |
197 | Blue Component
198 | 0.56363654136657715
199 | Green Component
200 | 0.56485837697982788
201 | Red Component
202 | 0.50599193572998047
203 |
204 | Selection Color
205 |
206 | Blue Component
207 | 0.19370138645172119
208 | Green Component
209 | 0.15575926005840302
210 | Red Component
211 | 0.0
212 |
213 |
214 |
215 |
--------------------------------------------------------------------------------
/init/profile_default/startup/README:
--------------------------------------------------------------------------------
1 | This is the IPython startup directory
2 |
3 | .py and .ipy files in this directory will be run *prior* to any code or files specified
4 | via the exec_lines or exec_files configurables whenever you load this profile.
5 |
6 | Files will be run in lexicographical order, so you can control the execution order of files
7 | with a prefix, e.g.::
8 |
9 | 00-first.py
10 | 50-middle.py
11 | 99-last.ipy
12 |
--------------------------------------------------------------------------------
/init/profile_default/static/custom/custom.css:
--------------------------------------------------------------------------------
1 | /*
2 | Placeholder for custom user CSS
3 |
4 | mainly to be overridden in profile/static/custom/custom.css
5 |
6 | This will always be an empty file in IPython
7 | */
--------------------------------------------------------------------------------
/init/profile_default/static/custom/custom.js:
--------------------------------------------------------------------------------
1 | // leave at least 2 line with only a star on it below, or doc generation fails
2 | /**
3 | *
4 | *
5 | * Placeholder for custom user javascript
6 | * mainly to be overridden in profile/static/custom/custom.js
7 | * This will always be an empty file in IPython
8 | *
9 | * User could add any javascript in the `profile/static/custom/custom.js` file.
10 | * It will be executed by the ipython notebook at load time.
11 | *
12 | * Same thing with `profile/static/custom/custom.css` to inject custom css into the notebook.
13 | *
14 | *
15 | * The object available at load time depend on the version of IPython in use.
16 | * there is no guaranties of API stability.
17 | *
18 | * The example below explain the principle, and might not be valid.
19 | *
20 | * Instances are created after the loading of this file and might need to be accessed using events:
21 | * define([
22 | * 'base/js/namespace',
23 | * 'base/js/events'
24 | * ], function(IPython, events) {
25 | * events.on("app_initialized.NotebookApp", function () {
26 | * IPython.keyboard_manager....
27 | * });
28 | * });
29 | *
30 | * __Example 1:__
31 | *
32 | * Create a custom button in toolbar that execute `%qtconsole` in kernel
33 | * and hence open a qtconsole attached to the same kernel as the current notebook
34 | *
35 | * define([
36 | * 'base/js/namespace',
37 | * 'base/js/events'
38 | * ], function(IPython, events) {
39 | * events.on('app_initialized.NotebookApp', function(){
40 | * IPython.toolbar.add_buttons_group([
41 | * {
42 | * 'label' : 'run qtconsole',
43 | * 'icon' : 'icon-terminal', // select your icon from http://fortawesome.github.io/Font-Awesome/icons
44 | * 'callback': function () {
45 | * IPython.notebook.kernel.execute('%qtconsole')
46 | * }
47 | * }
48 | * // add more button here if needed.
49 | * ]);
50 | * });
51 | * });
52 | *
53 | * __Example 2:__
54 | *
55 | * At the completion of the dashboard loading, load an unofficial javascript extension
56 | * that is installed in profile/static/custom/
57 | *
58 | * define([
59 | * 'base/js/events'
60 | * ], function(events) {
61 | * events.on('app_initialized.DashboardApp', function(){
62 | * require(['custom/unofficial_extension.js'])
63 | * });
64 | * });
65 | *
66 | * __Example 3:__
67 | *
68 | * Use `jQuery.getScript(url [, success(script, textStatus, jqXHR)] );`
69 | * to load custom script into the notebook.
70 | *
71 | * // to load the metadata ui extension example.
72 | * $.getScript('/static/notebook/js/celltoolbarpresets/example.js');
73 | * // or
74 | * // to load the metadata ui extension to control slideshow mode / reveal js for nbconvert
75 | * $.getScript('/static/notebook/js/celltoolbarpresets/slideshow.js');
76 | *
77 | *
78 | * @module IPython
79 | * @namespace IPython
80 | * @class customjs
81 | * @static
82 | */
83 |
84 | IPython.Cell.options_default.cm_config.lineNumbers = true;
85 |
--------------------------------------------------------------------------------
/init/profile_pyspark/history.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donnemartin/dev-setup/d86102d761afa5cc1853078200b844212f99e234/init/profile_pyspark/history.sqlite
--------------------------------------------------------------------------------
/init/profile_pyspark/ipython_config.py:
--------------------------------------------------------------------------------
1 | # Configuration file for ipython.
2 |
3 | c = get_config()
4 |
5 | #------------------------------------------------------------------------------
6 | # InteractiveShellApp configuration
7 | #------------------------------------------------------------------------------
8 |
9 | # A Mixin for applications that start InteractiveShell instances.
10 | #
11 | # Provides configurables for loading extensions and executing files as part of
12 | # configuring a Shell environment.
13 | #
14 | # The following methods should be called by the :meth:`initialize` method of the
15 | # subclass:
16 | #
17 | # - :meth:`init_path`
18 | # - :meth:`init_shell` (to be implemented by the subclass)
19 | # - :meth:`init_gui_pylab`
20 | # - :meth:`init_extensions`
21 | # - :meth:`init_code`
22 |
23 | # Execute the given command string.
24 | # c.InteractiveShellApp.code_to_run = ''
25 |
26 | # Run the file referenced by the PYTHONSTARTUP environment variable at IPython
27 | # startup.
28 | # c.InteractiveShellApp.exec_PYTHONSTARTUP = True
29 |
30 | # lines of code to run at IPython startup.
31 | # c.InteractiveShellApp.exec_lines = []
32 |
33 | # Enable GUI event loop integration with any of ('glut', 'gtk', 'gtk3', 'none',
34 | # 'osx', 'pyglet', 'qt', 'qt4', 'tk', 'wx').
35 | # c.InteractiveShellApp.gui = None
36 |
37 | # Pre-load matplotlib and numpy for interactive use, selecting a particular
38 | # matplotlib backend and loop integration.
39 | # c.InteractiveShellApp.pylab = None
40 |
41 | # Configure matplotlib for interactive use with the default matplotlib backend.
42 | # c.InteractiveShellApp.matplotlib = None
43 |
44 | # If true, IPython will populate the user namespace with numpy, pylab, etc. and
45 | # an ``import *`` is done from numpy and pylab, when using pylab mode.
46 | #
47 | # When False, pylab mode should not import any names into the user namespace.
48 | # c.InteractiveShellApp.pylab_import_all = True
49 |
50 | # A list of dotted module names of IPython extensions to load.
51 | # c.InteractiveShellApp.extensions = []
52 |
53 | # Run the module as a script.
54 | # c.InteractiveShellApp.module_to_run = ''
55 |
56 | # Should variables loaded at startup (by startup files, exec_lines, etc.) be
57 | # hidden from tools like %who?
58 | # c.InteractiveShellApp.hide_initial_ns = True
59 |
60 | # dotted module name of an IPython extension to load.
61 | # c.InteractiveShellApp.extra_extension = ''
62 |
63 | # List of files to run at IPython startup.
64 | # c.InteractiveShellApp.exec_files = []
65 |
66 | # A file to be run
67 | # c.InteractiveShellApp.file_to_run = ''
68 |
69 | #------------------------------------------------------------------------------
70 | # TerminalIPythonApp configuration
71 | #------------------------------------------------------------------------------
72 |
73 | # TerminalIPythonApp will inherit config from: BaseIPythonApplication,
74 | # Application, InteractiveShellApp
75 |
76 | # Run the file referenced by the PYTHONSTARTUP environment variable at IPython
77 | # startup.
78 | # c.TerminalIPythonApp.exec_PYTHONSTARTUP = True
79 |
80 | # Pre-load matplotlib and numpy for interactive use, selecting a particular
81 | # matplotlib backend and loop integration.
82 | # c.TerminalIPythonApp.pylab = None
83 |
84 | # Create a massive crash report when IPython encounters what may be an internal
85 | # error. The default is to append a short message to the usual traceback
86 | # c.TerminalIPythonApp.verbose_crash = False
87 |
88 | # Run the module as a script.
89 | # c.TerminalIPythonApp.module_to_run = ''
90 |
91 | # The date format used by logging formatters for %(asctime)s
92 | # c.TerminalIPythonApp.log_datefmt = '%Y-%m-%d %H:%M:%S'
93 |
94 | # Whether to overwrite existing config files when copying
95 | # c.TerminalIPythonApp.overwrite = False
96 |
97 | # Execute the given command string.
98 | # c.TerminalIPythonApp.code_to_run = ''
99 |
100 | # Set the log level by value or name.
101 | # c.TerminalIPythonApp.log_level = 30
102 |
103 | # lines of code to run at IPython startup.
104 | # c.TerminalIPythonApp.exec_lines = []
105 |
106 | # Suppress warning messages about legacy config files
107 | # c.TerminalIPythonApp.ignore_old_config = False
108 |
109 | # Path to an extra config file to load.
110 | #
111 | # If specified, load this config file in addition to any other IPython config.
112 | # c.TerminalIPythonApp.extra_config_file = u''
113 |
114 | # Should variables loaded at startup (by startup files, exec_lines, etc.) be
115 | # hidden from tools like %who?
116 | # c.TerminalIPythonApp.hide_initial_ns = True
117 |
118 | # dotted module name of an IPython extension to load.
119 | # c.TerminalIPythonApp.extra_extension = ''
120 |
121 | # A file to be run
122 | # c.TerminalIPythonApp.file_to_run = ''
123 |
124 | # The IPython profile to use.
125 | # c.TerminalIPythonApp.profile = u'default'
126 |
127 | # Configure matplotlib for interactive use with the default matplotlib backend.
128 | # c.TerminalIPythonApp.matplotlib = None
129 |
130 | # If a command or file is given via the command-line, e.g. 'ipython foo.py',
131 | # start an interactive shell after executing the file or command.
132 | # c.TerminalIPythonApp.force_interact = False
133 |
134 | # If true, IPython will populate the user namespace with numpy, pylab, etc. and
135 | # an ``import *`` is done from numpy and pylab, when using pylab mode.
136 | #
137 | # When False, pylab mode should not import any names into the user namespace.
138 | # c.TerminalIPythonApp.pylab_import_all = True
139 |
140 | # The name of the IPython directory. This directory is used for logging
141 | # configuration (through profiles), history storage, etc. The default is usually
142 | # $HOME/.ipython. This options can also be specified through the environment
143 | # variable IPYTHONDIR.
144 | # c.TerminalIPythonApp.ipython_dir = u''
145 |
146 | # Whether to display a banner upon starting IPython.
147 | # c.TerminalIPythonApp.display_banner = True
148 |
149 | # Whether to install the default config files into the profile dir. If a new
150 | # profile is being created, and IPython contains config files for that profile,
151 | # then they will be staged into the new directory. Otherwise, default config
152 | # files will be automatically generated.
153 | # c.TerminalIPythonApp.copy_config_files = False
154 |
155 | # List of files to run at IPython startup.
156 | # c.TerminalIPythonApp.exec_files = []
157 |
158 | # Enable GUI event loop integration with any of ('glut', 'gtk', 'gtk3', 'none',
159 | # 'osx', 'pyglet', 'qt', 'qt4', 'tk', 'wx').
160 | # c.TerminalIPythonApp.gui = None
161 |
162 | # A list of dotted module names of IPython extensions to load.
163 | # c.TerminalIPythonApp.extensions = []
164 |
165 | # Start IPython quickly by skipping the loading of config files.
166 | # c.TerminalIPythonApp.quick = False
167 |
168 | # The Logging format template
169 | # c.TerminalIPythonApp.log_format = '[%(name)s]%(highlevel)s %(message)s'
170 |
171 | #------------------------------------------------------------------------------
172 | # TerminalInteractiveShell configuration
173 | #------------------------------------------------------------------------------
174 |
175 | # TerminalInteractiveShell will inherit config from: InteractiveShell
176 |
177 | # auto editing of files with syntax errors.
178 | # c.TerminalInteractiveShell.autoedit_syntax = False
179 |
180 | # Use colors for displaying information about objects. Because this information
181 | # is passed through a pager (like 'less'), and some pagers get confused with
182 | # color codes, this capability can be turned off.
183 | # c.TerminalInteractiveShell.color_info = True
184 |
185 | # A list of ast.NodeTransformer subclass instances, which will be applied to
186 | # user input before code is run.
187 | # c.TerminalInteractiveShell.ast_transformers = []
188 |
189 | #
190 | # c.TerminalInteractiveShell.history_length = 10000
191 |
192 | # Don't call post-execute functions that have failed in the past.
193 | # c.TerminalInteractiveShell.disable_failing_post_execute = False
194 |
195 | # Show rewritten input, e.g. for autocall.
196 | # c.TerminalInteractiveShell.show_rewritten_input = True
197 |
198 | # Set the color scheme (NoColor, Linux, or LightBG).
199 | # c.TerminalInteractiveShell.colors = 'LightBG'
200 |
201 | # Autoindent IPython code entered interactively.
202 | # c.TerminalInteractiveShell.autoindent = True
203 |
204 | #
205 | # c.TerminalInteractiveShell.separate_in = '\n'
206 |
207 | # Deprecated, use PromptManager.in2_template
208 | # c.TerminalInteractiveShell.prompt_in2 = ' .\\D.: '
209 |
210 | #
211 | # c.TerminalInteractiveShell.separate_out = ''
212 |
213 | # Deprecated, use PromptManager.in_template
214 | # c.TerminalInteractiveShell.prompt_in1 = 'In [\\#]: '
215 |
216 | # Make IPython automatically call any callable object even if you didn't type
217 | # explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
218 | # The value can be '0' to disable the feature, '1' for 'smart' autocall, where
219 | # it is not applied if there are no more arguments on the line, and '2' for
220 | # 'full' autocall, where all callable objects are automatically called (even if
221 | # no arguments are present).
222 | # c.TerminalInteractiveShell.autocall = 0
223 |
224 | # Number of lines of your screen, used to control printing of very long strings.
225 | # Strings longer than this number of lines will be sent through a pager instead
226 | # of directly printed. The default value for this is 0, which means IPython
227 | # will auto-detect your screen size every time it needs to print certain
228 | # potentially long strings (this doesn't change the behavior of the 'print'
229 | # keyword, it's only triggered internally). If for some reason this isn't
230 | # working well (it needs curses support), specify it yourself. Otherwise don't
231 | # change the default.
232 | # c.TerminalInteractiveShell.screen_length = 0
233 |
234 | # Set the editor used by IPython (default to $EDITOR/vi/notepad).
235 | # c.TerminalInteractiveShell.editor = 'vi'
236 |
237 | # Deprecated, use PromptManager.justify
238 | # c.TerminalInteractiveShell.prompts_pad_left = True
239 |
240 | # The part of the banner to be printed before the profile
241 | # c.TerminalInteractiveShell.banner1 = 'Python 2.7.8 |Anaconda 2.1.0 (x86_64)| (default, Aug 21 2014, 15:21:46) \nType "copyright", "credits" or "license" for more information.\n\nIPython 2.2.0 -- An enhanced Interactive Python.\nAnaconda is brought to you by Continuum Analytics.\nPlease check out: http://continuum.io/thanks and https://binstar.org\n? -> Introduction and overview of IPython\'s features.\n%quickref -> Quick reference.\nhelp -> Python\'s own help system.\nobject? -> Details about \'object\', use \'object??\' for extra details.\n'
242 |
243 | #
244 | # c.TerminalInteractiveShell.readline_parse_and_bind = ['tab: complete', '"\\C-l": clear-screen', 'set show-all-if-ambiguous on', '"\\C-o": tab-insert', '"\\C-r": reverse-search-history', '"\\C-s": forward-search-history', '"\\C-p": history-search-backward', '"\\C-n": history-search-forward', '"\\e[A": history-search-backward', '"\\e[B": history-search-forward', '"\\C-k": kill-line', '"\\C-u": unix-line-discard']
245 |
246 | # The part of the banner to be printed after the profile
247 | # c.TerminalInteractiveShell.banner2 = ''
248 |
249 | #
250 | # c.TerminalInteractiveShell.separate_out2 = ''
251 |
252 | #
253 | # c.TerminalInteractiveShell.wildcards_case_sensitive = True
254 |
255 | #
256 | # c.TerminalInteractiveShell.debug = False
257 |
258 | # Set to confirm when you try to exit IPython with an EOF (Control-D in Unix,
259 | # Control-Z/Enter in Windows). By typing 'exit' or 'quit', you can force a
260 | # direct exit without any confirmation.
261 | # c.TerminalInteractiveShell.confirm_exit = True
262 |
263 | #
264 | # c.TerminalInteractiveShell.ipython_dir = ''
265 |
266 | #
267 | # c.TerminalInteractiveShell.readline_remove_delims = '-/~'
268 |
269 | # Start logging to the default log file.
270 | # c.TerminalInteractiveShell.logstart = False
271 |
272 | # The name of the logfile to use.
273 | # c.TerminalInteractiveShell.logfile = ''
274 |
275 | # The shell program to be used for paging.
276 | # c.TerminalInteractiveShell.pager = 'less'
277 |
278 | # Enable magic commands to be called without the leading %.
279 | # c.TerminalInteractiveShell.automagic = True
280 |
281 | # Save multi-line entries as one entry in readline history
282 | # c.TerminalInteractiveShell.multiline_history = True
283 |
284 | #
285 | # c.TerminalInteractiveShell.readline_use = True
286 |
287 | # Enable deep (recursive) reloading by default. IPython can use the deep_reload
288 | # module which reloads changes in modules recursively (it replaces the reload()
289 | # function, so you don't need to change anything to use it). deep_reload()
290 | # forces a full reload of modules whose code may have changed, which the default
291 | # reload() function does not. When deep_reload is off, IPython will use the
292 | # normal reload(), but deep_reload will still be available as dreload().
293 | # c.TerminalInteractiveShell.deep_reload = False
294 |
295 | # Start logging to the given file in append mode.
296 | # c.TerminalInteractiveShell.logappend = ''
297 |
298 | #
299 | # c.TerminalInteractiveShell.xmode = 'Context'
300 |
301 | #
302 | # c.TerminalInteractiveShell.quiet = False
303 |
304 | # Enable auto setting the terminal title.
305 | # c.TerminalInteractiveShell.term_title = False
306 |
307 | #
308 | # c.TerminalInteractiveShell.object_info_string_level = 0
309 |
310 | # Deprecated, use PromptManager.out_template
311 | # c.TerminalInteractiveShell.prompt_out = 'Out[\\#]: '
312 |
313 | # Set the size of the output cache. The default is 1000, you can change it
314 | # permanently in your config file. Setting it to 0 completely disables the
315 | # caching system, and the minimum value accepted is 20 (if you provide a value
316 | # less than 20, it is reset to 0 and a warning is issued). This limit is
317 | # defined because otherwise you'll spend more time re-flushing a too small cache
318 | # than working
319 | # c.TerminalInteractiveShell.cache_size = 1000
320 |
321 | # 'all', 'last', 'last_expr' or 'none', specifying which nodes should be run
322 | # interactively (displaying output from expressions).
323 | # c.TerminalInteractiveShell.ast_node_interactivity = 'last_expr'
324 |
325 | # Automatically call the pdb debugger after every exception.
326 | # c.TerminalInteractiveShell.pdb = False
327 |
328 | #------------------------------------------------------------------------------
329 | # PromptManager configuration
330 | #------------------------------------------------------------------------------
331 |
332 | # This is the primary interface for producing IPython's prompts.
333 |
334 | # Output prompt. '\#' will be transformed to the prompt number
335 | # c.PromptManager.out_template = 'Out[\\#]: '
336 |
337 | # Continuation prompt.
338 | # c.PromptManager.in2_template = ' .\\D.: '
339 |
340 | # If True (default), each prompt will be right-aligned with the preceding one.
341 | # c.PromptManager.justify = True
342 |
343 | # Input prompt. '\#' will be transformed to the prompt number
344 | # c.PromptManager.in_template = 'In [\\#]: '
345 |
346 | #
347 | # c.PromptManager.color_scheme = 'Linux'
348 |
349 | #------------------------------------------------------------------------------
350 | # HistoryManager configuration
351 | #------------------------------------------------------------------------------
352 |
353 | # A class to organize all history-related functionality in one place.
354 |
355 | # HistoryManager will inherit config from: HistoryAccessor
356 |
357 | # Should the history database include output? (default: no)
358 | # c.HistoryManager.db_log_output = False
359 |
360 | # Write to database every x commands (higher values save disk access & power).
361 | # Values of 1 or less effectively disable caching.
362 | # c.HistoryManager.db_cache_size = 0
363 |
364 | # Path to file to use for SQLite history database.
365 | #
366 | # By default, IPython will put the history database in the IPython profile
367 | # directory. If you would rather share one history among profiles, you can set
368 | # this value in each, so that they are consistent.
369 | #
370 | # Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts.
371 | # If you see IPython hanging, try setting this to something on a local disk,
372 | # e.g::
373 | #
374 | # ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
375 | # c.HistoryManager.hist_file = u''
376 |
377 | # Options for configuring the SQLite connection
378 | #
379 | # These options are passed as keyword args to sqlite3.connect when establishing
380 | # database conenctions.
381 | # c.HistoryManager.connection_options = {}
382 |
383 | # enable the SQLite history
384 | #
385 | # set enabled=False to disable the SQLite history, in which case there will be
386 | # no stored history, no SQLite connection, and no background saving thread.
387 | # This may be necessary in some threaded environments where IPython is embedded.
388 | # c.HistoryManager.enabled = True
389 |
390 | #------------------------------------------------------------------------------
391 | # ProfileDir configuration
392 | #------------------------------------------------------------------------------
393 |
394 | # An object to manage the profile directory and its resources.
395 | #
396 | # The profile directory is used by all IPython applications, to manage
397 | # configuration, logging and security.
398 | #
399 | # This object knows how to find, create and manage these directories. This
400 | # should be used by any code that wants to handle profiles.
401 |
402 | # Set the profile location directly. This overrides the logic used by the
403 | # `profile` option.
404 | # c.ProfileDir.location = u''
405 |
406 | #------------------------------------------------------------------------------
407 | # PlainTextFormatter configuration
408 | #------------------------------------------------------------------------------
409 |
410 | # The default pretty-printer.
411 | #
412 | # This uses :mod:`IPython.lib.pretty` to compute the format data of the object.
413 | # If the object cannot be pretty printed, :func:`repr` is used. See the
414 | # documentation of :mod:`IPython.lib.pretty` for details on how to write pretty
415 | # printers. Here is a simple example::
416 | #
417 | # def dtype_pprinter(obj, p, cycle):
418 | # if cycle:
419 | # return p.text('dtype(...)')
420 | # if hasattr(obj, 'fields'):
421 | # if obj.fields is None:
422 | # p.text(repr(obj))
423 | # else:
424 | # p.begin_group(7, 'dtype([')
425 | # for i, field in enumerate(obj.descr):
426 | # if i > 0:
427 | # p.text(',')
428 | # p.breakable()
429 | # p.pretty(field)
430 | # p.end_group(7, '])')
431 |
432 | # PlainTextFormatter will inherit config from: BaseFormatter
433 |
434 | #
435 | # c.PlainTextFormatter.type_printers = {}
436 |
437 | #
438 | # c.PlainTextFormatter.newline = '\n'
439 |
440 | #
441 | # c.PlainTextFormatter.float_precision = ''
442 |
443 | #
444 | # c.PlainTextFormatter.verbose = False
445 |
446 | #
447 | # c.PlainTextFormatter.deferred_printers = {}
448 |
449 | #
450 | # c.PlainTextFormatter.pprint = True
451 |
452 | #
453 | # c.PlainTextFormatter.max_width = 79
454 |
455 | #
456 | # c.PlainTextFormatter.singleton_printers = {}
457 |
458 | #------------------------------------------------------------------------------
459 | # IPCompleter configuration
460 | #------------------------------------------------------------------------------
461 |
462 | # Extension of the completer class with IPython-specific features
463 |
464 | # IPCompleter will inherit config from: Completer
465 |
466 | # Instruct the completer to omit private method names
467 | #
468 | # Specifically, when completing on ``object.``.
469 | #
470 | # When 2 [default]: all names that start with '_' will be excluded.
471 | #
472 | # When 1: all 'magic' names (``__foo__``) will be excluded.
473 | #
474 | # When 0: nothing will be excluded.
475 | # c.IPCompleter.omit__names = 2
476 |
477 | # Whether to merge completion results into a single list
478 | #
479 | # If False, only the completion results from the first non-empty completer will
480 | # be returned.
481 | # c.IPCompleter.merge_completions = True
482 |
483 | # Instruct the completer to use __all__ for the completion
484 | #
485 | # Specifically, when completing on ``object.``.
486 | #
487 | # When True: only those names in obj.__all__ will be included.
488 | #
489 | # When False [default]: the __all__ attribute is ignored
490 | # c.IPCompleter.limit_to__all__ = False
491 |
492 | # Activate greedy completion
493 | #
494 | # This will enable completion on elements of lists, results of function calls,
495 | # etc., but can be unsafe because the code is actually evaluated on TAB.
496 | # c.IPCompleter.greedy = False
497 |
498 | #------------------------------------------------------------------------------
499 | # ScriptMagics configuration
500 | #------------------------------------------------------------------------------
501 |
502 | # Magics for talking to scripts
503 | #
504 | # This defines a base `%%script` cell magic for running a cell with a program in
505 | # a subprocess, and registers a few top-level magics that call %%script with
506 | # common interpreters.
507 |
508 | # Extra script cell magics to define
509 | #
510 | # This generates simple wrappers of `%%script foo` as `%%foo`.
511 | #
512 | # If you want to add script magics that aren't on your path, specify them in
513 | # script_paths
514 | # c.ScriptMagics.script_magics = []
515 |
516 | # Dict mapping short 'ruby' names to full paths, such as '/opt/secret/bin/ruby'
517 | #
518 | # Only necessary for items in script_magics where the default path will not find
519 | # the right interpreter.
520 | # c.ScriptMagics.script_paths = {}
521 |
522 | #------------------------------------------------------------------------------
523 | # StoreMagics configuration
524 | #------------------------------------------------------------------------------
525 |
526 | # Lightweight persistence for python variables.
527 | #
528 | # Provides the %store magic.
529 |
530 | # If True, any %store-d variables will be automatically restored when IPython
531 | # starts.
532 | # c.StoreMagics.autorestore = False
533 |
--------------------------------------------------------------------------------
/init/profile_pyspark/ipython_nbconvert_config.py:
--------------------------------------------------------------------------------
1 | # Configuration file for ipython-nbconvert.
2 |
3 | c = get_config()
4 |
5 | #------------------------------------------------------------------------------
6 | # NbConvertApp configuration
7 | #------------------------------------------------------------------------------
8 |
9 | # This application is used to convert notebook files (*.ipynb) to various other
10 | # formats.
11 | #
12 | # WARNING: THE COMMANDLINE INTERFACE MAY CHANGE IN FUTURE RELEASES.
13 |
14 | # NbConvertApp will inherit config from: BaseIPythonApplication, Application
15 |
16 | # The IPython profile to use.
17 | # c.NbConvertApp.profile = u'default'
18 |
19 | # The export format to be used.
20 | # c.NbConvertApp.export_format = 'html'
21 |
22 | # Set the log level by value or name.
23 | # c.NbConvertApp.log_level = 30
24 |
25 | # List of notebooks to convert. Wildcards are supported. Filenames passed
26 | # positionally will be added to the list.
27 | # c.NbConvertApp.notebooks = []
28 |
29 | # Path to an extra config file to load.
30 | #
31 | # If specified, load this config file in addition to any other IPython config.
32 | # c.NbConvertApp.extra_config_file = u''
33 |
34 | # PostProcessor class used to write the results of the conversion
35 | # c.NbConvertApp.postprocessor_class = u''
36 |
37 | # Whether to create profile dir if it doesn't exist
38 | # c.NbConvertApp.auto_create = False
39 |
40 | # overwrite base name use for output files. can only be use when converting one
41 | # notebook at a time.
42 | # c.NbConvertApp.output_base = ''
43 |
44 | # The name of the IPython directory. This directory is used for logging
45 | # configuration (through profiles), history storage, etc. The default is usually
46 | # $HOME/.ipython. This options can also be specified through the environment
47 | # variable IPYTHONDIR.
48 | # c.NbConvertApp.ipython_dir = u''
49 |
50 | # Whether to install the default config files into the profile dir. If a new
51 | # profile is being created, and IPython contains config files for that profile,
52 | # then they will be staged into the new directory. Otherwise, default config
53 | # files will be automatically generated.
54 | # c.NbConvertApp.copy_config_files = False
55 |
56 | # The date format used by logging formatters for %(asctime)s
57 | # c.NbConvertApp.log_datefmt = '%Y-%m-%d %H:%M:%S'
58 |
59 | # The Logging format template
60 | # c.NbConvertApp.log_format = '[%(name)s]%(highlevel)s %(message)s'
61 |
62 | # Create a massive crash report when IPython encounters what may be an internal
63 | # error. The default is to append a short message to the usual traceback
64 | # c.NbConvertApp.verbose_crash = False
65 |
66 | # Writer class used to write the results of the conversion
67 | # c.NbConvertApp.writer_class = 'FilesWriter'
68 |
69 | # Whether to overwrite existing config files when copying
70 | # c.NbConvertApp.overwrite = False
71 |
72 | #------------------------------------------------------------------------------
73 | # NbConvertBase configuration
74 | #------------------------------------------------------------------------------
75 |
76 | # Global configurable class for shared config
77 | #
78 | # Useful for display data priority that might be use by many transformers
79 |
80 | # An ordered list of preferred output type, the first encountered will usually
81 | # be used when converting discarding the others.
82 | # c.NbConvertBase.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
83 |
84 | # default highlight language
85 | # c.NbConvertBase.default_language = 'ipython'
86 |
87 | #------------------------------------------------------------------------------
88 | # ProfileDir configuration
89 | #------------------------------------------------------------------------------
90 |
91 | # An object to manage the profile directory and its resources.
92 | #
93 | # The profile directory is used by all IPython applications, to manage
94 | # configuration, logging and security.
95 | #
96 | # This object knows how to find, create and manage these directories. This
97 | # should be used by any code that wants to handle profiles.
98 |
99 | # Set the profile location directly. This overrides the logic used by the
100 | # `profile` option.
101 | # c.ProfileDir.location = u''
102 |
103 | #------------------------------------------------------------------------------
104 | # Exporter configuration
105 | #------------------------------------------------------------------------------
106 |
107 | # Class containing methods that sequentially run a list of preprocessors on a
108 | # NotebookNode object and then return the modified NotebookNode object and
109 | # accompanying resources dict.
110 |
111 | # Extension of the file that should be written to disk
112 | # c.Exporter.file_extension = 'txt'
113 |
114 | # List of preprocessors, by name or namespace, to enable.
115 | # c.Exporter.preprocessors = []
116 |
117 | # List of preprocessors available by default, by name, namespace, instance, or
118 | # type.
119 | # c.Exporter.default_preprocessors = ['IPython.nbconvert.preprocessors.coalesce_streams', 'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor', 'IPython.nbconvert.preprocessors.ExtractOutputPreprocessor', 'IPython.nbconvert.preprocessors.CSSHTMLHeaderPreprocessor', 'IPython.nbconvert.preprocessors.RevealHelpPreprocessor', 'IPython.nbconvert.preprocessors.LatexPreprocessor', 'IPython.nbconvert.preprocessors.HighlightMagicsPreprocessor']
120 |
121 | #------------------------------------------------------------------------------
122 | # HTMLExporter configuration
123 | #------------------------------------------------------------------------------
124 |
125 | # Exports a basic HTML document. This exporter assists with the export of HTML.
126 | # Inherit from it if you are writing your own HTML template and need custom
127 | # preprocessors/filters. If you don't need custom preprocessors/ filters, just
128 | # change the 'template_file' config option.
129 |
130 | # HTMLExporter will inherit config from: TemplateExporter, Exporter
131 |
132 | #
133 | # c.HTMLExporter.jinja_variable_block_start = ''
134 |
135 | #
136 | # c.HTMLExporter.jinja_variable_block_end = ''
137 |
138 | # formats of raw cells to be included in this Exporter's output.
139 | # c.HTMLExporter.raw_mimetypes = []
140 |
141 | # Name of the template file to use
142 | # c.HTMLExporter.template_file = u'default'
143 |
144 | # List of preprocessors available by default, by name, namespace, instance, or
145 | # type.
146 | # c.HTMLExporter.default_preprocessors = ['IPython.nbconvert.preprocessors.coalesce_streams', 'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor', 'IPython.nbconvert.preprocessors.ExtractOutputPreprocessor', 'IPython.nbconvert.preprocessors.CSSHTMLHeaderPreprocessor', 'IPython.nbconvert.preprocessors.RevealHelpPreprocessor', 'IPython.nbconvert.preprocessors.LatexPreprocessor', 'IPython.nbconvert.preprocessors.HighlightMagicsPreprocessor']
147 |
148 | #
149 | # c.HTMLExporter.template_path = ['.']
150 |
151 | # Extension of the file that should be written to disk
152 | # c.HTMLExporter.file_extension = 'txt'
153 |
154 | #
155 | # c.HTMLExporter.jinja_comment_block_end = ''
156 |
157 | # Dictionary of filters, by name and namespace, to add to the Jinja environment.
158 | # c.HTMLExporter.filters = {}
159 |
160 | #
161 | # c.HTMLExporter.jinja_comment_block_start = ''
162 |
163 | #
164 | # c.HTMLExporter.jinja_logic_block_end = ''
165 |
166 | #
167 | # c.HTMLExporter.jinja_logic_block_start = ''
168 |
169 | #
170 | # c.HTMLExporter.template_extension = '.tpl'
171 |
172 | # List of preprocessors, by name or namespace, to enable.
173 | # c.HTMLExporter.preprocessors = []
174 |
175 | #------------------------------------------------------------------------------
176 | # LatexExporter configuration
177 | #------------------------------------------------------------------------------
178 |
179 | # Exports to a Latex template. Inherit from this class if your template is
180 | # LaTeX based and you need custom tranformers/filters. Inherit from it if you
181 | # are writing your own HTML template and need custom tranformers/filters. If
182 | # you don't need custom tranformers/filters, just change the 'template_file'
183 | # config option. Place your template in the special "/latex" subfolder of the
184 | # "../templates" folder.
185 |
186 | # LatexExporter will inherit config from: TemplateExporter, Exporter
187 |
188 | #
189 | # c.LatexExporter.jinja_variable_block_start = '((('
190 |
191 | #
192 | # c.LatexExporter.jinja_variable_block_end = ')))'
193 |
194 | # formats of raw cells to be included in this Exporter's output.
195 | # c.LatexExporter.raw_mimetypes = []
196 |
197 | # Name of the template file to use
198 | # c.LatexExporter.template_file = u'default'
199 |
200 | # List of preprocessors available by default, by name, namespace, instance, or
201 | # type.
202 | # c.LatexExporter.default_preprocessors = ['IPython.nbconvert.preprocessors.coalesce_streams', 'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor', 'IPython.nbconvert.preprocessors.ExtractOutputPreprocessor', 'IPython.nbconvert.preprocessors.CSSHTMLHeaderPreprocessor', 'IPython.nbconvert.preprocessors.RevealHelpPreprocessor', 'IPython.nbconvert.preprocessors.LatexPreprocessor', 'IPython.nbconvert.preprocessors.HighlightMagicsPreprocessor']
203 |
204 | #
205 | # c.LatexExporter.template_path = ['.']
206 |
207 | # Extension of the file that should be written to disk
208 | # c.LatexExporter.file_extension = 'txt'
209 |
210 | #
211 | # c.LatexExporter.jinja_comment_block_end = '=))'
212 |
213 | # Dictionary of filters, by name and namespace, to add to the Jinja environment.
214 | # c.LatexExporter.filters = {}
215 |
216 | #
217 | # c.LatexExporter.jinja_comment_block_start = '((='
218 |
219 | #
220 | # c.LatexExporter.jinja_logic_block_end = '*))'
221 |
222 | #
223 | # c.LatexExporter.jinja_logic_block_start = '((*'
224 |
225 | #
226 | # c.LatexExporter.template_extension = '.tplx'
227 |
228 | # List of preprocessors, by name or namespace, to enable.
229 | # c.LatexExporter.preprocessors = []
230 |
231 | #------------------------------------------------------------------------------
232 | # MarkdownExporter configuration
233 | #------------------------------------------------------------------------------
234 |
235 | # Exports to a markdown document (.md)
236 |
237 | # MarkdownExporter will inherit config from: TemplateExporter, Exporter
238 |
239 | #
240 | # c.MarkdownExporter.jinja_variable_block_start = ''
241 |
242 | #
243 | # c.MarkdownExporter.jinja_variable_block_end = ''
244 |
245 | # formats of raw cells to be included in this Exporter's output.
246 | # c.MarkdownExporter.raw_mimetypes = []
247 |
248 | # Name of the template file to use
249 | # c.MarkdownExporter.template_file = u'default'
250 |
251 | # List of preprocessors available by default, by name, namespace, instance, or
252 | # type.
253 | # c.MarkdownExporter.default_preprocessors = ['IPython.nbconvert.preprocessors.coalesce_streams', 'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor', 'IPython.nbconvert.preprocessors.ExtractOutputPreprocessor', 'IPython.nbconvert.preprocessors.CSSHTMLHeaderPreprocessor', 'IPython.nbconvert.preprocessors.RevealHelpPreprocessor', 'IPython.nbconvert.preprocessors.LatexPreprocessor', 'IPython.nbconvert.preprocessors.HighlightMagicsPreprocessor']
254 |
255 | #
256 | # c.MarkdownExporter.template_path = ['.']
257 |
258 | # Extension of the file that should be written to disk
259 | # c.MarkdownExporter.file_extension = 'txt'
260 |
261 | #
262 | # c.MarkdownExporter.jinja_comment_block_end = ''
263 |
264 | # Dictionary of filters, by name and namespace, to add to the Jinja environment.
265 | # c.MarkdownExporter.filters = {}
266 |
267 | #
268 | # c.MarkdownExporter.jinja_comment_block_start = ''
269 |
270 | #
271 | # c.MarkdownExporter.jinja_logic_block_end = ''
272 |
273 | #
274 | # c.MarkdownExporter.jinja_logic_block_start = ''
275 |
276 | #
277 | # c.MarkdownExporter.template_extension = '.tpl'
278 |
279 | # List of preprocessors, by name or namespace, to enable.
280 | # c.MarkdownExporter.preprocessors = []
281 |
282 | #------------------------------------------------------------------------------
283 | # PythonExporter configuration
284 | #------------------------------------------------------------------------------
285 |
286 | # Exports a Python code file.
287 |
288 | # PythonExporter will inherit config from: TemplateExporter, Exporter
289 |
290 | #
291 | # c.PythonExporter.jinja_variable_block_start = ''
292 |
293 | #
294 | # c.PythonExporter.jinja_variable_block_end = ''
295 |
296 | # formats of raw cells to be included in this Exporter's output.
297 | # c.PythonExporter.raw_mimetypes = []
298 |
299 | # Name of the template file to use
300 | # c.PythonExporter.template_file = u'default'
301 |
302 | # List of preprocessors available by default, by name, namespace, instance, or
303 | # type.
304 | # c.PythonExporter.default_preprocessors = ['IPython.nbconvert.preprocessors.coalesce_streams', 'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor', 'IPython.nbconvert.preprocessors.ExtractOutputPreprocessor', 'IPython.nbconvert.preprocessors.CSSHTMLHeaderPreprocessor', 'IPython.nbconvert.preprocessors.RevealHelpPreprocessor', 'IPython.nbconvert.preprocessors.LatexPreprocessor', 'IPython.nbconvert.preprocessors.HighlightMagicsPreprocessor']
305 |
306 | #
307 | # c.PythonExporter.template_path = ['.']
308 |
309 | # Extension of the file that should be written to disk
310 | # c.PythonExporter.file_extension = 'txt'
311 |
312 | #
313 | # c.PythonExporter.jinja_comment_block_end = ''
314 |
315 | # Dictionary of filters, by name and namespace, to add to the Jinja environment.
316 | # c.PythonExporter.filters = {}
317 |
318 | #
319 | # c.PythonExporter.jinja_comment_block_start = ''
320 |
321 | #
322 | # c.PythonExporter.jinja_logic_block_end = ''
323 |
324 | #
325 | # c.PythonExporter.jinja_logic_block_start = ''
326 |
327 | #
328 | # c.PythonExporter.template_extension = '.tpl'
329 |
330 | # List of preprocessors, by name or namespace, to enable.
331 | # c.PythonExporter.preprocessors = []
332 |
333 | #------------------------------------------------------------------------------
334 | # RSTExporter configuration
335 | #------------------------------------------------------------------------------
336 |
337 | # Exports restructured text documents.
338 |
339 | # RSTExporter will inherit config from: TemplateExporter, Exporter
340 |
341 | #
342 | # c.RSTExporter.jinja_variable_block_start = ''
343 |
344 | #
345 | # c.RSTExporter.jinja_variable_block_end = ''
346 |
347 | # formats of raw cells to be included in this Exporter's output.
348 | # c.RSTExporter.raw_mimetypes = []
349 |
350 | # Name of the template file to use
351 | # c.RSTExporter.template_file = u'default'
352 |
353 | # List of preprocessors available by default, by name, namespace, instance, or
354 | # type.
355 | # c.RSTExporter.default_preprocessors = ['IPython.nbconvert.preprocessors.coalesce_streams', 'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor', 'IPython.nbconvert.preprocessors.ExtractOutputPreprocessor', 'IPython.nbconvert.preprocessors.CSSHTMLHeaderPreprocessor', 'IPython.nbconvert.preprocessors.RevealHelpPreprocessor', 'IPython.nbconvert.preprocessors.LatexPreprocessor', 'IPython.nbconvert.preprocessors.HighlightMagicsPreprocessor']
356 |
357 | #
358 | # c.RSTExporter.template_path = ['.']
359 |
360 | # Extension of the file that should be written to disk
361 | # c.RSTExporter.file_extension = 'txt'
362 |
363 | #
364 | # c.RSTExporter.jinja_comment_block_end = ''
365 |
366 | # Dictionary of filters, by name and namespace, to add to the Jinja environment.
367 | # c.RSTExporter.filters = {}
368 |
369 | #
370 | # c.RSTExporter.jinja_comment_block_start = ''
371 |
372 | #
373 | # c.RSTExporter.jinja_logic_block_end = ''
374 |
375 | #
376 | # c.RSTExporter.jinja_logic_block_start = ''
377 |
378 | #
379 | # c.RSTExporter.template_extension = '.tpl'
380 |
381 | # List of preprocessors, by name or namespace, to enable.
382 | # c.RSTExporter.preprocessors = []
383 |
384 | #------------------------------------------------------------------------------
385 | # SlidesExporter configuration
386 | #------------------------------------------------------------------------------
387 |
388 | # Exports HTML slides with reveal.js
389 |
390 | # SlidesExporter will inherit config from: HTMLExporter, TemplateExporter,
391 | # Exporter
392 |
393 | #
394 | # c.SlidesExporter.jinja_variable_block_start = ''
395 |
396 | #
397 | # c.SlidesExporter.jinja_variable_block_end = ''
398 |
399 | # formats of raw cells to be included in this Exporter's output.
400 | # c.SlidesExporter.raw_mimetypes = []
401 |
402 | # Name of the template file to use
403 | # c.SlidesExporter.template_file = u'default'
404 |
405 | # List of preprocessors available by default, by name, namespace, instance, or
406 | # type.
407 | # c.SlidesExporter.default_preprocessors = ['IPython.nbconvert.preprocessors.coalesce_streams', 'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor', 'IPython.nbconvert.preprocessors.ExtractOutputPreprocessor', 'IPython.nbconvert.preprocessors.CSSHTMLHeaderPreprocessor', 'IPython.nbconvert.preprocessors.RevealHelpPreprocessor', 'IPython.nbconvert.preprocessors.LatexPreprocessor', 'IPython.nbconvert.preprocessors.HighlightMagicsPreprocessor']
408 |
409 | #
410 | # c.SlidesExporter.template_path = ['.']
411 |
412 | # Extension of the file that should be written to disk
413 | # c.SlidesExporter.file_extension = 'txt'
414 |
415 | #
416 | # c.SlidesExporter.jinja_comment_block_end = ''
417 |
418 | # Dictionary of filters, by name and namespace, to add to the Jinja environment.
419 | # c.SlidesExporter.filters = {}
420 |
421 | #
422 | # c.SlidesExporter.jinja_comment_block_start = ''
423 |
424 | #
425 | # c.SlidesExporter.jinja_logic_block_end = ''
426 |
427 | #
428 | # c.SlidesExporter.jinja_logic_block_start = ''
429 |
430 | #
431 | # c.SlidesExporter.template_extension = '.tpl'
432 |
433 | # List of preprocessors, by name or namespace, to enable.
434 | # c.SlidesExporter.preprocessors = []
435 |
436 | #------------------------------------------------------------------------------
437 | # TemplateExporter configuration
438 | #------------------------------------------------------------------------------
439 |
440 | # Exports notebooks into other file formats. Uses Jinja 2 templating engine to
441 | # output new formats. Inherit from this class if you are creating a new
442 | # template type along with new filters/preprocessors. If the filters/
443 | # preprocessors provided by default suffice, there is no need to inherit from
444 | # this class. Instead, override the template_file and file_extension traits via
445 | # a config file.
446 | #
447 | # - citation2latex - highlight2html - filter_data_type - markdown2html -
448 | # markdown2rst - get_lines - ansi2latex - strip_ansi - add_prompts -
449 | # comment_lines - ascii_only - markdown2latex - escape_latex - add_anchor -
450 | # ipython2python - posix_path - highlight2latex - path2url - ansi2html -
451 | # wrap_text - indent - strip_dollars - html2text - strip_files_prefix
452 |
453 | # TemplateExporter will inherit config from: Exporter
454 |
455 | #
456 | # c.TemplateExporter.jinja_variable_block_start = ''
457 |
458 | #
459 | # c.TemplateExporter.jinja_variable_block_end = ''
460 |
461 | # formats of raw cells to be included in this Exporter's output.
462 | # c.TemplateExporter.raw_mimetypes = []
463 |
464 | # Name of the template file to use
465 | # c.TemplateExporter.template_file = u'default'
466 |
467 | # List of preprocessors available by default, by name, namespace, instance, or
468 | # type.
469 | # c.TemplateExporter.default_preprocessors = ['IPython.nbconvert.preprocessors.coalesce_streams', 'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor', 'IPython.nbconvert.preprocessors.ExtractOutputPreprocessor', 'IPython.nbconvert.preprocessors.CSSHTMLHeaderPreprocessor', 'IPython.nbconvert.preprocessors.RevealHelpPreprocessor', 'IPython.nbconvert.preprocessors.LatexPreprocessor', 'IPython.nbconvert.preprocessors.HighlightMagicsPreprocessor']
470 |
471 | #
472 | # c.TemplateExporter.template_path = ['.']
473 |
474 | # Extension of the file that should be written to disk
475 | # c.TemplateExporter.file_extension = 'txt'
476 |
477 | #
478 | # c.TemplateExporter.jinja_comment_block_end = ''
479 |
480 | # Dictionary of filters, by name and namespace, to add to the Jinja environment.
481 | # c.TemplateExporter.filters = {}
482 |
483 | #
484 | # c.TemplateExporter.jinja_comment_block_start = ''
485 |
486 | #
487 | # c.TemplateExporter.jinja_logic_block_end = ''
488 |
489 | #
490 | # c.TemplateExporter.jinja_logic_block_start = ''
491 |
492 | #
493 | # c.TemplateExporter.template_extension = '.tpl'
494 |
495 | # List of preprocessors, by name or namespace, to enable.
496 | # c.TemplateExporter.preprocessors = []
497 |
498 | #------------------------------------------------------------------------------
499 | # CSSHTMLHeaderPreprocessor configuration
500 | #------------------------------------------------------------------------------
501 |
502 | # Preprocessor used to pre-process notebook for HTML output. Adds IPython
503 | # notebook front-end CSS and Pygments CSS to HTML output.
504 |
505 | # CSSHTMLHeaderPreprocessor will inherit config from: Preprocessor,
506 | # NbConvertBase
507 |
508 | # default highlight language
509 | # c.CSSHTMLHeaderPreprocessor.default_language = 'ipython'
510 |
511 | # CSS highlight class identifier
512 | # c.CSSHTMLHeaderPreprocessor.highlight_class = '.highlight'
513 |
514 | #
515 | # c.CSSHTMLHeaderPreprocessor.enabled = False
516 |
517 | # An ordered list of preferred output type, the first encountered will usually
518 | # be used when converting discarding the others.
519 | # c.CSSHTMLHeaderPreprocessor.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
520 |
521 | #------------------------------------------------------------------------------
522 | # ConvertFiguresPreprocessor configuration
523 | #------------------------------------------------------------------------------
524 |
525 | # Converts all of the outputs in a notebook from one format to another.
526 |
527 | # ConvertFiguresPreprocessor will inherit config from: Preprocessor,
528 | # NbConvertBase
529 |
530 | # default highlight language
531 | # c.ConvertFiguresPreprocessor.default_language = 'ipython'
532 |
533 | # Format the converter writes
534 | # c.ConvertFiguresPreprocessor.to_format = u''
535 |
536 | #
537 | # c.ConvertFiguresPreprocessor.enabled = False
538 |
539 | # Format the converter accepts
540 | # c.ConvertFiguresPreprocessor.from_format = u''
541 |
542 | # An ordered list of preferred output type, the first encountered will usually
543 | # be used when converting discarding the others.
544 | # c.ConvertFiguresPreprocessor.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
545 |
546 | #------------------------------------------------------------------------------
547 | # ExtractOutputPreprocessor configuration
548 | #------------------------------------------------------------------------------
549 |
550 | # Extracts all of the outputs from the notebook file. The extracted outputs
551 | # are returned in the 'resources' dictionary.
552 |
553 | # ExtractOutputPreprocessor will inherit config from: Preprocessor,
554 | # NbConvertBase
555 |
556 | # default highlight language
557 | # c.ExtractOutputPreprocessor.default_language = 'ipython'
558 |
559 | #
560 | # c.ExtractOutputPreprocessor.output_filename_template = '{unique_key}_{cell_index}_{index}{extension}'
561 |
562 | #
563 | # c.ExtractOutputPreprocessor.extract_output_types = set(['svg', 'application/pdf', 'jpeg', 'png'])
564 |
565 | #
566 | # c.ExtractOutputPreprocessor.enabled = False
567 |
568 | # An ordered list of preferred output type, the first encountered will usually
569 | # be used when converting discarding the others.
570 | # c.ExtractOutputPreprocessor.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
571 |
572 | #------------------------------------------------------------------------------
573 | # HighlightMagicsPreprocessor configuration
574 | #------------------------------------------------------------------------------
575 |
576 | # Detects and tags code cells that use a different languages than Python.
577 |
578 | # HighlightMagicsPreprocessor will inherit config from: Preprocessor,
579 | # NbConvertBase
580 |
581 | # Syntax highlighting for magic's extension languages. Each item associates a
582 | # language magic extension such as %%R, with a pygments lexer such as r.
583 | # c.HighlightMagicsPreprocessor.languages = {}
584 |
585 | #
586 | # c.HighlightMagicsPreprocessor.enabled = False
587 |
588 | # default highlight language
589 | # c.HighlightMagicsPreprocessor.default_language = 'ipython'
590 |
591 | # An ordered list of preferred output type, the first encountered will usually
592 | # be used when converting discarding the others.
593 | # c.HighlightMagicsPreprocessor.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
594 |
595 | #------------------------------------------------------------------------------
596 | # LatexPreprocessor configuration
597 | #------------------------------------------------------------------------------
598 |
599 | # Preprocessor for latex destined documents.
600 | #
601 | # Mainly populates the `latex` key in the resources dict, adding definitions for
602 | # pygments highlight styles.
603 |
604 | # LatexPreprocessor will inherit config from: Preprocessor, NbConvertBase
605 |
606 | # default highlight language
607 | # c.LatexPreprocessor.default_language = 'ipython'
608 |
609 | #
610 | # c.LatexPreprocessor.enabled = False
611 |
612 | # An ordered list of preferred output type, the first encountered will usually
613 | # be used when converting discarding the others.
614 | # c.LatexPreprocessor.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
615 |
616 | #------------------------------------------------------------------------------
617 | # Preprocessor configuration
618 | #------------------------------------------------------------------------------
619 |
620 | # A configurable preprocessor
621 | #
622 | # Inherit from this class if you wish to have configurability for your
623 | # preprocessor.
624 | #
625 | # Any configurable traitlets this class exposed will be configurable in profiles
626 | # using c.SubClassName.attribute = value
627 | #
628 | # you can overwrite :meth:`preprocess_cell` to apply a transformation
629 | # independently on each cell or :meth:`preprocess` if you prefer your own logic.
630 | # See corresponding docstring for informations.
631 | #
632 | # Disabled by default and can be enabled via the config by
633 | # 'c.YourPreprocessorName.enabled = True'
634 |
635 | # Preprocessor will inherit config from: NbConvertBase
636 |
637 | # default highlight language
638 | # c.Preprocessor.default_language = 'ipython'
639 |
640 | #
641 | # c.Preprocessor.enabled = False
642 |
643 | # An ordered list of preferred output type, the first encountered will usually
644 | # be used when converting discarding the others.
645 | # c.Preprocessor.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
646 |
647 | #------------------------------------------------------------------------------
648 | # RevealHelpPreprocessor configuration
649 | #------------------------------------------------------------------------------
650 |
651 | # RevealHelpPreprocessor will inherit config from: Preprocessor, NbConvertBase
652 |
653 | # The URL prefix for reveal.js. This can be a a relative URL for a local copy of
654 | # reveal.js, or point to a CDN.
655 | #
656 | # For speaker notes to work, a local reveal.js prefix must be used.
657 | # c.RevealHelpPreprocessor.url_prefix = 'reveal.js'
658 |
659 | # default highlight language
660 | # c.RevealHelpPreprocessor.default_language = 'ipython'
661 |
662 | #
663 | # c.RevealHelpPreprocessor.enabled = False
664 |
665 | # An ordered list of preferred output type, the first encountered will usually
666 | # be used when converting discarding the others.
667 | # c.RevealHelpPreprocessor.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
668 |
669 | #------------------------------------------------------------------------------
670 | # SVG2PDFPreprocessor configuration
671 | #------------------------------------------------------------------------------
672 |
673 | # Converts all of the outputs in a notebook from SVG to PDF.
674 |
675 | # SVG2PDFPreprocessor will inherit config from: ConvertFiguresPreprocessor,
676 | # Preprocessor, NbConvertBase
677 |
678 | # Format the converter accepts
679 | # c.SVG2PDFPreprocessor.from_format = u''
680 |
681 | # default highlight language
682 | # c.SVG2PDFPreprocessor.default_language = 'ipython'
683 |
684 | #
685 | # c.SVG2PDFPreprocessor.enabled = False
686 |
687 | # Format the converter writes
688 | # c.SVG2PDFPreprocessor.to_format = u''
689 |
690 | # The command to use for converting SVG to PDF
691 | #
692 | # This string is a template, which will be formatted with the keys to_filename
693 | # and from_filename.
694 | #
695 | # The conversion call must read the SVG from {from_flename}, and write a PDF to
696 | # {to_filename}.
697 | # c.SVG2PDFPreprocessor.command = u''
698 |
699 | # An ordered list of preferred output type, the first encountered will usually
700 | # be used when converting discarding the others.
701 | # c.SVG2PDFPreprocessor.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
702 |
703 | # The path to Inkscape, if necessary
704 | # c.SVG2PDFPreprocessor.inkscape = u''
705 |
706 | #------------------------------------------------------------------------------
707 | # FilesWriter configuration
708 | #------------------------------------------------------------------------------
709 |
710 | # Consumes nbconvert output and produces files.
711 |
712 | # FilesWriter will inherit config from: WriterBase, NbConvertBase
713 |
714 | # List of the files that the notebook references. Files will be included with
715 | # written output.
716 | # c.FilesWriter.files = []
717 |
718 | # An ordered list of preferred output type, the first encountered will usually
719 | # be used when converting discarding the others.
720 | # c.FilesWriter.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
721 |
722 | # default highlight language
723 | # c.FilesWriter.default_language = 'ipython'
724 |
725 | # Directory to write output to. Leave blank to output to the current directory
726 | # c.FilesWriter.build_directory = ''
727 |
728 | #------------------------------------------------------------------------------
729 | # StdoutWriter configuration
730 | #------------------------------------------------------------------------------
731 |
732 | # Consumes output from nbconvert export...() methods and writes to the stdout
733 | # stream.
734 |
735 | # StdoutWriter will inherit config from: WriterBase, NbConvertBase
736 |
737 | # List of the files that the notebook references. Files will be included with
738 | # written output.
739 | # c.StdoutWriter.files = []
740 |
741 | # An ordered list of preferred output type, the first encountered will usually
742 | # be used when converting discarding the others.
743 | # c.StdoutWriter.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
744 |
745 | # default highlight language
746 | # c.StdoutWriter.default_language = 'ipython'
747 |
748 | #------------------------------------------------------------------------------
749 | # WriterBase configuration
750 | #------------------------------------------------------------------------------
751 |
752 | # Consumes output from nbconvert export...() methods and writes to a useful
753 | # location.
754 |
755 | # WriterBase will inherit config from: NbConvertBase
756 |
757 | # List of the files that the notebook references. Files will be included with
758 | # written output.
759 | # c.WriterBase.files = []
760 |
761 | # An ordered list of preferred output type, the first encountered will usually
762 | # be used when converting discarding the others.
763 | # c.WriterBase.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
764 |
765 | # default highlight language
766 | # c.WriterBase.default_language = 'ipython'
767 |
768 | #------------------------------------------------------------------------------
769 | # PDFPostProcessor configuration
770 | #------------------------------------------------------------------------------
771 |
772 | # Writer designed to write to PDF files
773 |
774 | # PDFPostProcessor will inherit config from: PostProcessorBase, NbConvertBase
775 |
776 | # Filename extensions of temp files to remove after running.
777 | # c.PDFPostProcessor.temp_file_exts = ['.aux', '.bbl', '.blg', '.idx', '.log', '.out']
778 |
779 | # Whether or not to display the output of the compile call.
780 | # c.PDFPostProcessor.verbose = False
781 |
782 | # Shell command used to run bibtex.
783 | # c.PDFPostProcessor.bib_command = [u'bibtex', u'{filename}']
784 |
785 | # default highlight language
786 | # c.PDFPostProcessor.default_language = 'ipython'
787 |
788 | # An ordered list of preferred output type, the first encountered will usually
789 | # be used when converting discarding the others.
790 | # c.PDFPostProcessor.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
791 |
792 | # How many times pdflatex will be called.
793 | # c.PDFPostProcessor.latex_count = 3
794 |
795 | # Whether or not to open the pdf after the compile call.
796 | # c.PDFPostProcessor.pdf_open = False
797 |
798 | # Shell command used to compile PDF.
799 | # c.PDFPostProcessor.latex_command = [u'pdflatex', u'{filename}']
800 |
801 | #------------------------------------------------------------------------------
802 | # PostProcessorBase configuration
803 | #------------------------------------------------------------------------------
804 |
805 | # PostProcessorBase will inherit config from: NbConvertBase
806 |
807 | # An ordered list of preferred output type, the first encountered will usually
808 | # be used when converting discarding the others.
809 | # c.PostProcessorBase.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
810 |
811 | # default highlight language
812 | # c.PostProcessorBase.default_language = 'ipython'
813 |
814 | #------------------------------------------------------------------------------
815 | # ServePostProcessor configuration
816 | #------------------------------------------------------------------------------
817 |
818 | # Post processor designed to serve files
819 | #
820 | # Proxies reveal.js requests to a CDN if no local reveal.js is present
821 |
822 | # ServePostProcessor will inherit config from: PostProcessorBase, NbConvertBase
823 |
824 | # The IP address to listen on.
825 | # c.ServePostProcessor.ip = '127.0.0.1'
826 |
827 | # URL prefix for reveal.js
828 | # c.ServePostProcessor.reveal_prefix = 'reveal.js'
829 |
830 | # default highlight language
831 | # c.ServePostProcessor.default_language = 'ipython'
832 |
833 | # port for the server to listen on.
834 | # c.ServePostProcessor.port = 8000
835 |
836 | # An ordered list of preferred output type, the first encountered will usually
837 | # be used when converting discarding the others.
838 | # c.ServePostProcessor.display_data_priority = ['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg', 'text']
839 |
840 | # Should the browser be opened automatically?
841 | # c.ServePostProcessor.open_in_browser = True
842 |
843 | # URL for reveal.js CDN.
844 | # c.ServePostProcessor.reveal_cdn = 'https://cdn.jsdelivr.net/reveal.js/2.5.0'
845 |
--------------------------------------------------------------------------------
/init/profile_pyspark/ipython_notebook_config.py:
--------------------------------------------------------------------------------
1 | # Configuration file for ipython-notebook.
2 |
3 | c = get_config()
4 |
5 | c.NotebookApp.ip = '*'
6 | c.NotebookApp.open_browser = False
7 | c.NotebookApp.port = 8889
8 |
9 | #------------------------------------------------------------------------------
10 | # NotebookApp configuration
11 | #------------------------------------------------------------------------------
12 |
13 | # NotebookApp will inherit config from: BaseIPythonApplication, Application
14 |
15 | # The url for MathJax.js.
16 | # c.NotebookApp.mathjax_url = ''
17 |
18 | # Supply extra arguments that will be passed to Jinja environment.
19 | # c.NotebookApp.jinja_environment_options = {}
20 |
21 | # The IP address the notebook server will listen on.
22 | # c.NotebookApp.ip = 'localhost'
23 |
24 | # DEPRECATED use base_url
25 | # c.NotebookApp.base_project_url = '/'
26 |
27 | # Create a massive crash report when IPython encounters what may be an internal
28 | # error. The default is to append a short message to the usual traceback
29 | # c.NotebookApp.verbose_crash = False
30 |
31 | # The random bytes used to secure cookies. By default this is a new random
32 | # number every time you start the Notebook. Set it to a value in a config file
33 | # to enable logins to persist across server sessions.
34 | #
35 | # Note: Cookie secrets should be kept private, do not share config files with
36 | # cookie_secret stored in plaintext (you can read the value from a file).
37 | # c.NotebookApp.cookie_secret = ''
38 |
39 | # The number of additional ports to try if the specified port is not available.
40 | # c.NotebookApp.port_retries = 50
41 |
42 | # Whether to open in a browser after starting. The specific browser used is
43 | # platform dependent and determined by the python standard library `webbrowser`
44 | # module, unless it is overridden using the --browser (NotebookApp.browser)
45 | # configuration option.
46 | # c.NotebookApp.open_browser = True
47 |
48 | # The notebook manager class to use.
49 | # c.NotebookApp.notebook_manager_class = 'IPython.html.services.notebooks.filenbmanager.FileNotebookManager'
50 |
51 | # The date format used by logging formatters for %(asctime)s
52 | # c.NotebookApp.log_datefmt = '%Y-%m-%d %H:%M:%S'
53 |
54 | # The port the notebook server will listen on.
55 | # c.NotebookApp.port = 8888
56 |
57 | # Whether to overwrite existing config files when copying
58 | # c.NotebookApp.overwrite = False
59 |
60 | # Set the Access-Control-Allow-Origin header
61 | #
62 | # Use '*' to allow any origin to access your server.
63 | #
64 | # Takes precedence over allow_origin_pat.
65 | # c.NotebookApp.allow_origin = ''
66 |
67 | # Whether to enable MathJax for typesetting math/TeX
68 | #
69 | # MathJax is the javascript library IPython uses to render math/LaTeX. It is
70 | # very large, so you may want to disable it if you have a slow internet
71 | # connection, or for offline use of the notebook.
72 | #
73 | # When disabled, equations etc. will appear as their untransformed TeX source.
74 | # c.NotebookApp.enable_mathjax = True
75 |
76 | # Use a regular expression for the Access-Control-Allow-Origin header
77 | #
78 | # Requests from an origin matching the expression will get replies with:
79 | #
80 | # Access-Control-Allow-Origin: origin
81 | #
82 | # where `origin` is the origin of the request.
83 | #
84 | # Ignored if allow_origin is set.
85 | # c.NotebookApp.allow_origin_pat = ''
86 |
87 | # The full path to an SSL/TLS certificate file.
88 | # c.NotebookApp.certfile = u''
89 |
90 | # The base URL for the notebook server.
91 | #
92 | # Leading and trailing slashes can be omitted, and will automatically be added.
93 | # c.NotebookApp.base_url = '/'
94 |
95 | # The directory to use for notebooks and kernels.
96 | # c.NotebookApp.notebook_dir = u'/Users/dmartin/Desktop/Dev/Vectorworks/Engineering/Nebula/Mainline/Servers/analytics/ipython-data-notebooks'
97 |
98 | #
99 | # c.NotebookApp.file_to_run = ''
100 |
101 | # The IPython profile to use.
102 | # c.NotebookApp.profile = u'default'
103 |
104 | # paths for Javascript extensions. By default, this is just
105 | # IPYTHONDIR/nbextensions
106 | # c.NotebookApp.nbextensions_path = []
107 |
108 | # The Logging format template
109 | # c.NotebookApp.log_format = '[%(name)s]%(highlevel)s %(message)s'
110 |
111 | # The name of the IPython directory. This directory is used for logging
112 | # configuration (through profiles), history storage, etc. The default is usually
113 | # $HOME/.ipython. This options can also be specified through the environment
114 | # variable IPYTHONDIR.
115 | # c.NotebookApp.ipython_dir = u''
116 |
117 | # Set the log level by value or name.
118 | # c.NotebookApp.log_level = 30
119 |
120 | # Hashed password to use for web authentication.
121 | #
122 | # To generate, type in a python/IPython shell:
123 | #
124 | # from IPython.lib import passwd; passwd()
125 | #
126 | # The string should be of the form type:salt:hashed-password.
127 | # c.NotebookApp.password = u''
128 |
129 | # Set the Access-Control-Allow-Credentials: true header
130 | # c.NotebookApp.allow_credentials = False
131 |
132 | # Path to an extra config file to load.
133 | #
134 | # If specified, load this config file in addition to any other IPython config.
135 | # c.NotebookApp.extra_config_file = u''
136 |
137 | # Extra paths to search for serving static files.
138 | #
139 | # This allows adding javascript/css to be available from the notebook server
140 | # machine, or overriding individual files in the IPython
141 | # c.NotebookApp.extra_static_paths = []
142 |
143 | # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-
144 | # For headerssent by the upstream reverse proxy. Necessary if the proxy handles
145 | # SSL
146 | # c.NotebookApp.trust_xheaders = False
147 |
148 | # Whether to install the default config files into the profile dir. If a new
149 | # profile is being created, and IPython contains config files for that profile,
150 | # then they will be staged into the new directory. Otherwise, default config
151 | # files will be automatically generated.
152 | # c.NotebookApp.copy_config_files = False
153 |
154 | # The full path to a private key file for usage with SSL/TLS.
155 | # c.NotebookApp.keyfile = u''
156 |
157 | # Supply overrides for the tornado.web.Application that the IPython notebook
158 | # uses.
159 | # c.NotebookApp.webapp_settings = {}
160 |
161 | # Specify what command to use to invoke a web browser when opening the notebook.
162 | # If not specified, the default browser will be determined by the `webbrowser`
163 | # standard library module, which allows setting of the BROWSER environment
164 | # variable to override it.
165 | # c.NotebookApp.browser = u''
166 |
167 | #------------------------------------------------------------------------------
168 | # IPKernelApp configuration
169 | #------------------------------------------------------------------------------
170 |
171 | # IPython: an enhanced interactive Python shell.
172 |
173 | # IPKernelApp will inherit config from: BaseIPythonApplication, Application,
174 | # InteractiveShellApp
175 |
176 | # Run the file referenced by the PYTHONSTARTUP environment variable at IPython
177 | # startup.
178 | # c.IPKernelApp.exec_PYTHONSTARTUP = True
179 |
180 | # The importstring for the DisplayHook factory
181 | # c.IPKernelApp.displayhook_class = 'IPython.kernel.zmq.displayhook.ZMQDisplayHook'
182 |
183 | # Set the IP or interface on which the kernel will listen.
184 | # c.IPKernelApp.ip = u''
185 |
186 | # Pre-load matplotlib and numpy for interactive use, selecting a particular
187 | # matplotlib backend and loop integration.
188 | # c.IPKernelApp.pylab = None
189 |
190 | # Create a massive crash report when IPython encounters what may be an internal
191 | # error. The default is to append a short message to the usual traceback
192 | # c.IPKernelApp.verbose_crash = False
193 |
194 | # The Kernel subclass to be used.
195 | #
196 | # This should allow easy re-use of the IPKernelApp entry point to configure and
197 | # launch kernels other than IPython's own.
198 | # c.IPKernelApp.kernel_class = 'IPython.kernel.zmq.ipkernel.Kernel'
199 |
200 | # Run the module as a script.
201 | # c.IPKernelApp.module_to_run = ''
202 |
203 | # The date format used by logging formatters for %(asctime)s
204 | # c.IPKernelApp.log_datefmt = '%Y-%m-%d %H:%M:%S'
205 |
206 | # set the shell (ROUTER) port [default: random]
207 | # c.IPKernelApp.shell_port = 0
208 |
209 | # set the control (ROUTER) port [default: random]
210 | # c.IPKernelApp.control_port = 0
211 |
212 | # Whether to overwrite existing config files when copying
213 | # c.IPKernelApp.overwrite = False
214 |
215 | # Execute the given command string.
216 | # c.IPKernelApp.code_to_run = ''
217 |
218 | # set the stdin (ROUTER) port [default: random]
219 | # c.IPKernelApp.stdin_port = 0
220 |
221 | # Set the log level by value or name.
222 | # c.IPKernelApp.log_level = 30
223 |
224 | # lines of code to run at IPython startup.
225 | # c.IPKernelApp.exec_lines = []
226 |
227 | # Path to an extra config file to load.
228 | #
229 | # If specified, load this config file in addition to any other IPython config.
230 | # c.IPKernelApp.extra_config_file = u''
231 |
232 | # The importstring for the OutStream factory
233 | # c.IPKernelApp.outstream_class = 'IPython.kernel.zmq.iostream.OutStream'
234 |
235 | # Whether to create profile dir if it doesn't exist
236 | # c.IPKernelApp.auto_create = False
237 |
238 | # set the heartbeat port [default: random]
239 | # c.IPKernelApp.hb_port = 0
240 |
241 | #
242 | # c.IPKernelApp.transport = 'tcp'
243 |
244 | # redirect stdout to the null device
245 | # c.IPKernelApp.no_stdout = False
246 |
247 | # Should variables loaded at startup (by startup files, exec_lines, etc.) be
248 | # hidden from tools like %who?
249 | # c.IPKernelApp.hide_initial_ns = True
250 |
251 | # dotted module name of an IPython extension to load.
252 | # c.IPKernelApp.extra_extension = ''
253 |
254 | # A file to be run
255 | # c.IPKernelApp.file_to_run = ''
256 |
257 | # The IPython profile to use.
258 | # c.IPKernelApp.profile = u'default'
259 |
260 | #
261 | # c.IPKernelApp.parent_appname = u''
262 |
263 | # kill this process if its parent dies. On Windows, the argument specifies the
264 | # HANDLE of the parent process, otherwise it is simply boolean.
265 | # c.IPKernelApp.parent_handle = 0
266 |
267 | # JSON file in which to store connection info [default: kernel-.json]
268 | #
269 | # This file will contain the IP, ports, and authentication key needed to connect
270 | # clients to this kernel. By default, this file will be created in the security
271 | # dir of the current profile, but can be specified by absolute path.
272 | # c.IPKernelApp.connection_file = ''
273 |
274 | # If true, IPython will populate the user namespace with numpy, pylab, etc. and
275 | # an ``import *`` is done from numpy and pylab, when using pylab mode.
276 | #
277 | # When False, pylab mode should not import any names into the user namespace.
278 | # c.IPKernelApp.pylab_import_all = True
279 |
280 | # The name of the IPython directory. This directory is used for logging
281 | # configuration (through profiles), history storage, etc. The default is usually
282 | # $HOME/.ipython. This options can also be specified through the environment
283 | # variable IPYTHONDIR.
284 | # c.IPKernelApp.ipython_dir = u''
285 |
286 | # Configure matplotlib for interactive use with the default matplotlib backend.
287 | # c.IPKernelApp.matplotlib = None
288 |
289 | # ONLY USED ON WINDOWS Interrupt this process when the parent is signaled.
290 | # c.IPKernelApp.interrupt = 0
291 |
292 | # Whether to install the default config files into the profile dir. If a new
293 | # profile is being created, and IPython contains config files for that profile,
294 | # then they will be staged into the new directory. Otherwise, default config
295 | # files will be automatically generated.
296 | # c.IPKernelApp.copy_config_files = False
297 |
298 | # List of files to run at IPython startup.
299 | # c.IPKernelApp.exec_files = []
300 |
301 | # Enable GUI event loop integration with any of ('glut', 'gtk', 'gtk3', 'none',
302 | # 'osx', 'pyglet', 'qt', 'qt4', 'tk', 'wx').
303 | # c.IPKernelApp.gui = None
304 |
305 | # A list of dotted module names of IPython extensions to load.
306 | # c.IPKernelApp.extensions = []
307 |
308 | # redirect stderr to the null device
309 | # c.IPKernelApp.no_stderr = False
310 |
311 | # The Logging format template
312 | # c.IPKernelApp.log_format = '[%(name)s]%(highlevel)s %(message)s'
313 |
314 | # set the iopub (PUB) port [default: random]
315 | # c.IPKernelApp.iopub_port = 0
316 |
317 | #------------------------------------------------------------------------------
318 | # ZMQInteractiveShell configuration
319 | #------------------------------------------------------------------------------
320 |
321 | # A subclass of InteractiveShell for ZMQ.
322 |
323 | # ZMQInteractiveShell will inherit config from: InteractiveShell
324 |
325 | # Use colors for displaying information about objects. Because this information
326 | # is passed through a pager (like 'less'), and some pagers get confused with
327 | # color codes, this capability can be turned off.
328 | # c.ZMQInteractiveShell.color_info = True
329 |
330 | # A list of ast.NodeTransformer subclass instances, which will be applied to
331 | # user input before code is run.
332 | # c.ZMQInteractiveShell.ast_transformers = []
333 |
334 | #
335 | # c.ZMQInteractiveShell.history_length = 10000
336 |
337 | # Don't call post-execute functions that have failed in the past.
338 | # c.ZMQInteractiveShell.disable_failing_post_execute = False
339 |
340 | # Show rewritten input, e.g. for autocall.
341 | # c.ZMQInteractiveShell.show_rewritten_input = True
342 |
343 | # Set the color scheme (NoColor, Linux, or LightBG).
344 | # c.ZMQInteractiveShell.colors = 'LightBG'
345 |
346 | #
347 | # c.ZMQInteractiveShell.separate_in = '\n'
348 |
349 | # Deprecated, use PromptManager.in2_template
350 | # c.ZMQInteractiveShell.prompt_in2 = ' .\\D.: '
351 |
352 | #
353 | # c.ZMQInteractiveShell.separate_out = ''
354 |
355 | # Deprecated, use PromptManager.in_template
356 | # c.ZMQInteractiveShell.prompt_in1 = 'In [\\#]: '
357 |
358 | # Enable deep (recursive) reloading by default. IPython can use the deep_reload
359 | # module which reloads changes in modules recursively (it replaces the reload()
360 | # function, so you don't need to change anything to use it). deep_reload()
361 | # forces a full reload of modules whose code may have changed, which the default
362 | # reload() function does not. When deep_reload is off, IPython will use the
363 | # normal reload(), but deep_reload will still be available as dreload().
364 | # c.ZMQInteractiveShell.deep_reload = False
365 |
366 | # Make IPython automatically call any callable object even if you didn't type
367 | # explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
368 | # The value can be '0' to disable the feature, '1' for 'smart' autocall, where
369 | # it is not applied if there are no more arguments on the line, and '2' for
370 | # 'full' autocall, where all callable objects are automatically called (even if
371 | # no arguments are present).
372 | # c.ZMQInteractiveShell.autocall = 0
373 |
374 | #
375 | # c.ZMQInteractiveShell.separate_out2 = ''
376 |
377 | # Deprecated, use PromptManager.justify
378 | # c.ZMQInteractiveShell.prompts_pad_left = True
379 |
380 | #
381 | # c.ZMQInteractiveShell.readline_parse_and_bind = ['tab: complete', '"\\C-l": clear-screen', 'set show-all-if-ambiguous on', '"\\C-o": tab-insert', '"\\C-r": reverse-search-history', '"\\C-s": forward-search-history', '"\\C-p": history-search-backward', '"\\C-n": history-search-forward', '"\\e[A": history-search-backward', '"\\e[B": history-search-forward', '"\\C-k": kill-line', '"\\C-u": unix-line-discard']
382 |
383 | # Enable magic commands to be called without the leading %.
384 | # c.ZMQInteractiveShell.automagic = True
385 |
386 | #
387 | # c.ZMQInteractiveShell.debug = False
388 |
389 | #
390 | # c.ZMQInteractiveShell.object_info_string_level = 0
391 |
392 | #
393 | # c.ZMQInteractiveShell.ipython_dir = ''
394 |
395 | #
396 | # c.ZMQInteractiveShell.readline_remove_delims = '-/~'
397 |
398 | # Start logging to the default log file.
399 | # c.ZMQInteractiveShell.logstart = False
400 |
401 | # The name of the logfile to use.
402 | # c.ZMQInteractiveShell.logfile = ''
403 |
404 | #
405 | # c.ZMQInteractiveShell.wildcards_case_sensitive = True
406 |
407 | # Save multi-line entries as one entry in readline history
408 | # c.ZMQInteractiveShell.multiline_history = True
409 |
410 | # Start logging to the given file in append mode.
411 | # c.ZMQInteractiveShell.logappend = ''
412 |
413 | #
414 | # c.ZMQInteractiveShell.xmode = 'Context'
415 |
416 | #
417 | # c.ZMQInteractiveShell.quiet = False
418 |
419 | # Deprecated, use PromptManager.out_template
420 | # c.ZMQInteractiveShell.prompt_out = 'Out[\\#]: '
421 |
422 | # Set the size of the output cache. The default is 1000, you can change it
423 | # permanently in your config file. Setting it to 0 completely disables the
424 | # caching system, and the minimum value accepted is 20 (if you provide a value
425 | # less than 20, it is reset to 0 and a warning is issued). This limit is
426 | # defined because otherwise you'll spend more time re-flushing a too small cache
427 | # than working
428 | # c.ZMQInteractiveShell.cache_size = 1000
429 |
430 | # 'all', 'last', 'last_expr' or 'none', specifying which nodes should be run
431 | # interactively (displaying output from expressions).
432 | # c.ZMQInteractiveShell.ast_node_interactivity = 'last_expr'
433 |
434 | # Automatically call the pdb debugger after every exception.
435 | # c.ZMQInteractiveShell.pdb = False
436 |
437 | #------------------------------------------------------------------------------
438 | # KernelManager configuration
439 | #------------------------------------------------------------------------------
440 |
441 | # Manages a single kernel in a subprocess on this host.
442 | #
443 | # This version starts kernels with Popen.
444 |
445 | # KernelManager will inherit config from: ConnectionFileMixin
446 |
447 | # The Popen Command to launch the kernel. Override this if you have a custom
448 | # kernel. If kernel_cmd is specified in a configuration file, IPython does not
449 | # pass any arguments to the kernel, because it cannot make any assumptions about
450 | # the arguments that the kernel understands. In particular, this means that the
451 | # kernel does not receive the option --debug if it given on the IPython command
452 | # line.
453 | # c.KernelManager.kernel_cmd = []
454 |
455 | # Set the kernel's IP address [default localhost]. If the IP address is
456 | # something other than localhost, then Consoles on other machines will be able
457 | # to connect to the Kernel, so be careful!
458 | # c.KernelManager.ip = u''
459 |
460 | #
461 | # c.KernelManager.transport = 'tcp'
462 |
463 | # Should we autorestart the kernel if it dies.
464 | # c.KernelManager.autorestart = False
465 |
466 | #------------------------------------------------------------------------------
467 | # ProfileDir configuration
468 | #------------------------------------------------------------------------------
469 |
470 | # An object to manage the profile directory and its resources.
471 | #
472 | # The profile directory is used by all IPython applications, to manage
473 | # configuration, logging and security.
474 | #
475 | # This object knows how to find, create and manage these directories. This
476 | # should be used by any code that wants to handle profiles.
477 |
478 | # Set the profile location directly. This overrides the logic used by the
479 | # `profile` option.
480 | # c.ProfileDir.location = u''
481 |
482 | #------------------------------------------------------------------------------
483 | # Session configuration
484 | #------------------------------------------------------------------------------
485 |
486 | # Object for handling serialization and sending of messages.
487 | #
488 | # The Session object handles building messages and sending them with ZMQ sockets
489 | # or ZMQStream objects. Objects can communicate with each other over the
490 | # network via Session objects, and only need to work with the dict-based IPython
491 | # message spec. The Session will handle serialization/deserialization, security,
492 | # and metadata.
493 | #
494 | # Sessions support configurable serialization via packer/unpacker traits, and
495 | # signing with HMAC digests via the key/keyfile traits.
496 | #
497 | # Parameters ----------
498 | #
499 | # debug : bool
500 | # whether to trigger extra debugging statements
501 | # packer/unpacker : str : 'json', 'pickle' or import_string
502 | # importstrings for methods to serialize message parts. If just
503 | # 'json' or 'pickle', predefined JSON and pickle packers will be used.
504 | # Otherwise, the entire importstring must be used.
505 | #
506 | # The functions must accept at least valid JSON input, and output *bytes*.
507 | #
508 | # For example, to use msgpack:
509 | # packer = 'msgpack.packb', unpacker='msgpack.unpackb'
510 | # pack/unpack : callables
511 | # You can also set the pack/unpack callables for serialization directly.
512 | # session : bytes
513 | # the ID of this Session object. The default is to generate a new UUID.
514 | # username : unicode
515 | # username added to message headers. The default is to ask the OS.
516 | # key : bytes
517 | # The key used to initialize an HMAC signature. If unset, messages
518 | # will not be signed or checked.
519 | # keyfile : filepath
520 | # The file containing a key. If this is set, `key` will be initialized
521 | # to the contents of the file.
522 |
523 | # Username for the Session. Default is your system username.
524 | # c.Session.username = u'dmartin'
525 |
526 | # The name of the unpacker for unserializing messages. Only used with custom
527 | # functions for `packer`.
528 | # c.Session.unpacker = 'json'
529 |
530 | # Threshold (in bytes) beyond which a buffer should be sent without copying.
531 | # c.Session.copy_threshold = 65536
532 |
533 | # The name of the packer for serializing messages. Should be one of 'json',
534 | # 'pickle', or an import name for a custom callable serializer.
535 | # c.Session.packer = 'json'
536 |
537 | # The maximum number of digests to remember.
538 | #
539 | # The digest history will be culled when it exceeds this value.
540 | # c.Session.digest_history_size = 65536
541 |
542 | # The UUID identifying this session.
543 | # c.Session.session = u''
544 |
545 | # The digest scheme used to construct the message signatures. Must have the form
546 | # 'hmac-HASH'.
547 | # c.Session.signature_scheme = 'hmac-sha256'
548 |
549 | # execution key, for extra authentication.
550 | # c.Session.key = ''
551 |
552 | # Debug output in the Session
553 | # c.Session.debug = False
554 |
555 | # The maximum number of items for a container to be introspected for custom
556 | # serialization. Containers larger than this are pickled outright.
557 | # c.Session.item_threshold = 64
558 |
559 | # path to file containing execution key.
560 | # c.Session.keyfile = ''
561 |
562 | # Threshold (in bytes) beyond which an object's buffer should be extracted to
563 | # avoid pickling.
564 | # c.Session.buffer_threshold = 1024
565 |
566 | # Metadata dictionary, which serves as the default top-level metadata dict for
567 | # each message.
568 | # c.Session.metadata = {}
569 |
570 | #------------------------------------------------------------------------------
571 | # InlineBackend configuration
572 | #------------------------------------------------------------------------------
573 |
574 | # An object to store configuration of the inline backend.
575 |
576 | # The figure format to enable (deprecated use `figure_formats` instead)
577 | # c.InlineBackend.figure_format = u''
578 |
579 | # A set of figure formats to enable: 'png', 'retina', 'jpeg', 'svg', 'pdf'.
580 | # c.InlineBackend.figure_formats = set(['png'])
581 |
582 | # Extra kwargs to be passed to fig.canvas.print_figure.
583 | #
584 | # Logical examples include: bbox_inches, quality (for jpeg figures), etc.
585 | # c.InlineBackend.print_figure_kwargs = {'bbox_inches': 'tight'}
586 |
587 | # Close all figures at the end of each cell.
588 | #
589 | # When True, ensures that each cell starts with no active figures, but it also
590 | # means that one must keep track of references in order to edit or redraw
591 | # figures in subsequent cells. This mode is ideal for the notebook, where
592 | # residual plots from other cells might be surprising.
593 | #
594 | # When False, one must call figure() to create new figures. This means that
595 | # gcf() and getfigs() can reference figures created in other cells, and the
596 | # active figure can continue to be edited with pylab/pyplot methods that
597 | # reference the current active figure. This mode facilitates iterative editing
598 | # of figures, and behaves most consistently with other matplotlib backends, but
599 | # figure barriers between cells must be explicit.
600 | # c.InlineBackend.close_figures = True
601 |
602 | # Subset of matplotlib rcParams that should be different for the inline backend.
603 | # c.InlineBackend.rc = {'font.size': 10, 'figure.figsize': (6.0, 4.0), 'figure.facecolor': (1, 1, 1, 0), 'savefig.dpi': 72, 'figure.subplot.bottom': 0.125, 'figure.edgecolor': (1, 1, 1, 0)}
604 |
605 | #------------------------------------------------------------------------------
606 | # MappingKernelManager configuration
607 | #------------------------------------------------------------------------------
608 |
609 | # A KernelManager that handles notebook mapping and HTTP error handling
610 |
611 | # MappingKernelManager will inherit config from: MultiKernelManager
612 |
613 | #
614 | # c.MappingKernelManager.root_dir = u'/Users/dmartin/Desktop/Dev/Vectorworks/Engineering/Nebula/Mainline/Servers/analytics/ipython-data-notebooks'
615 |
616 | # The kernel manager class. This is configurable to allow subclassing of the
617 | # KernelManager for customized behavior.
618 | # c.MappingKernelManager.kernel_manager_class = 'IPython.kernel.ioloop.IOLoopKernelManager'
619 |
620 | #------------------------------------------------------------------------------
621 | # NotebookManager configuration
622 | #------------------------------------------------------------------------------
623 |
624 | # Glob patterns to hide in file and directory listings.
625 | # c.NotebookManager.hide_globs = [u'__pycache__']
626 |
627 | #------------------------------------------------------------------------------
628 | # FileNotebookManager configuration
629 | #------------------------------------------------------------------------------
630 |
631 | # FileNotebookManager will inherit config from: NotebookManager
632 |
633 | # The directory name in which to keep notebook checkpoints
634 | #
635 | # This is a path relative to the notebook's own directory.
636 | #
637 | # By default, it is .ipynb_checkpoints
638 | # c.FileNotebookManager.checkpoint_dir = '.ipynb_checkpoints'
639 |
640 | # Glob patterns to hide in file and directory listings.
641 | # c.FileNotebookManager.hide_globs = [u'__pycache__']
642 |
643 | # Automatically create a Python script when saving the notebook.
644 | #
645 | # For easier use of import, %run and %load across notebooks, a .py script will be created next to any .ipynb on each
647 | # save. This can also be set with the short `--script` flag.
648 | # c.FileNotebookManager.save_script = False
649 |
650 | #
651 | # c.FileNotebookManager.notebook_dir = u'/Users/dmartin/Desktop/Dev/Vectorworks/Engineering/Nebula/Mainline/Servers/analytics/ipython-data-notebooks'
652 |
653 | #------------------------------------------------------------------------------
654 | # NotebookNotary configuration
655 | #------------------------------------------------------------------------------
656 |
657 | # A class for computing and verifying notebook signatures.
658 |
659 | # The secret key with which notebooks are signed.
660 | # c.NotebookNotary.secret = ''
661 |
662 | # The file where the secret key is stored.
663 | # c.NotebookNotary.secret_file = u''
664 |
665 | # The hashing algorithm used to sign notebooks.
666 | # c.NotebookNotary.algorithm = 'sha256'
667 |
--------------------------------------------------------------------------------
/init/profile_pyspark/ipython_qtconsole_config.py:
--------------------------------------------------------------------------------
1 | # Configuration file for ipython-qtconsole.
2 |
3 | c = get_config()
4 |
5 | #------------------------------------------------------------------------------
6 | # IPythonQtConsoleApp configuration
7 | #------------------------------------------------------------------------------
8 |
9 | # IPythonQtConsoleApp will inherit config from: BaseIPythonApplication,
10 | # Application, IPythonConsoleApp, ConnectionFileMixin
11 |
12 | # Set the kernel's IP address [default localhost]. If the IP address is
13 | # something other than localhost, then Consoles on other machines will be able
14 | # to connect to the Kernel, so be careful!
15 | # c.IPythonQtConsoleApp.ip = u''
16 |
17 | # Create a massive crash report when IPython encounters what may be an internal
18 | # error. The default is to append a short message to the usual traceback
19 | # c.IPythonQtConsoleApp.verbose_crash = False
20 |
21 | # Start the console window maximized.
22 | # c.IPythonQtConsoleApp.maximize = False
23 |
24 | # The date format used by logging formatters for %(asctime)s
25 | # c.IPythonQtConsoleApp.log_datefmt = '%Y-%m-%d %H:%M:%S'
26 |
27 | # set the shell (ROUTER) port [default: random]
28 | # c.IPythonQtConsoleApp.shell_port = 0
29 |
30 | # The SSH server to use to connect to the kernel.
31 | # c.IPythonQtConsoleApp.sshserver = ''
32 |
33 | # set the stdin (DEALER) port [default: random]
34 | # c.IPythonQtConsoleApp.stdin_port = 0
35 |
36 | # Set the log level by value or name.
37 | # c.IPythonQtConsoleApp.log_level = 30
38 |
39 | # Path to the ssh key to use for logging in to the ssh server.
40 | # c.IPythonQtConsoleApp.sshkey = ''
41 |
42 | # Path to an extra config file to load.
43 | #
44 | # If specified, load this config file in addition to any other IPython config.
45 | # c.IPythonQtConsoleApp.extra_config_file = u''
46 |
47 | # Whether to create profile dir if it doesn't exist
48 | # c.IPythonQtConsoleApp.auto_create = False
49 |
50 | # path to a custom CSS stylesheet
51 | # c.IPythonQtConsoleApp.stylesheet = ''
52 |
53 | # set the heartbeat port [default: random]
54 | # c.IPythonQtConsoleApp.hb_port = 0
55 |
56 | # Whether to overwrite existing config files when copying
57 | # c.IPythonQtConsoleApp.overwrite = False
58 |
59 | # set the iopub (PUB) port [default: random]
60 | # c.IPythonQtConsoleApp.iopub_port = 0
61 |
62 | # The IPython profile to use.
63 | # c.IPythonQtConsoleApp.profile = u'default'
64 |
65 | # JSON file in which to store connection info [default: kernel-.json]
66 | #
67 | # This file will contain the IP, ports, and authentication key needed to connect
68 | # clients to this kernel. By default, this file will be created in the security-
69 | # dir of the current profile, but can be specified by absolute path.
70 | # c.IPythonQtConsoleApp.connection_file = ''
71 |
72 | # Set to display confirmation dialog on exit. You can always use 'exit' or
73 | # 'quit', to force a direct exit without any confirmation.
74 | # c.IPythonQtConsoleApp.confirm_exit = True
75 |
76 | # The name of the IPython directory. This directory is used for logging
77 | # configuration (through profiles), history storage, etc. The default is usually
78 | # $HOME/.ipython. This options can also be specified through the environment
79 | # variable IPYTHONDIR.
80 | # c.IPythonQtConsoleApp.ipython_dir = u''
81 |
82 | # Whether to install the default config files into the profile dir. If a new
83 | # profile is being created, and IPython contains config files for that profile,
84 | # then they will be staged into the new directory. Otherwise, default config
85 | # files will be automatically generated.
86 | # c.IPythonQtConsoleApp.copy_config_files = False
87 |
88 | # Connect to an already running kernel
89 | # c.IPythonQtConsoleApp.existing = ''
90 |
91 | # Use a plaintext widget instead of rich text (plain can't print/save).
92 | # c.IPythonQtConsoleApp.plain = False
93 |
94 | # Start the console window with the menu bar hidden.
95 | # c.IPythonQtConsoleApp.hide_menubar = False
96 |
97 | # The Logging format template
98 | # c.IPythonQtConsoleApp.log_format = '[%(name)s]%(highlevel)s %(message)s'
99 |
100 | #
101 | # c.IPythonQtConsoleApp.transport = 'tcp'
102 |
103 | #------------------------------------------------------------------------------
104 | # IPythonWidget configuration
105 | #------------------------------------------------------------------------------
106 |
107 | # A FrontendWidget for an IPython kernel.
108 |
109 | # IPythonWidget will inherit config from: FrontendWidget, HistoryConsoleWidget,
110 | # ConsoleWidget
111 |
112 | # The type of completer to use. Valid values are:
113 | #
114 | # 'plain' : Show the available completion as a text list
115 | # Below the editing area.
116 | # 'droplist': Show the completion in a drop down list navigable
117 | # by the arrow keys, and from which you can select
118 | # completion by pressing Return.
119 | # 'ncurses' : Show the completion as a text list which is navigable by
120 | # `tab` and arrow keys.
121 | # c.IPythonWidget.gui_completion = 'ncurses'
122 |
123 | # Whether to process ANSI escape codes.
124 | # c.IPythonWidget.ansi_codes = True
125 |
126 | # A CSS stylesheet. The stylesheet can contain classes for:
127 | # 1. Qt: QPlainTextEdit, QFrame, QWidget, etc
128 | # 2. Pygments: .c, .k, .o, etc. (see PygmentsHighlighter)
129 | # 3. IPython: .error, .in-prompt, .out-prompt, etc
130 | # c.IPythonWidget.style_sheet = u''
131 |
132 | # The height of the console at start time in number of characters (will double
133 | # with `vsplit` paging)
134 | # c.IPythonWidget.height = 25
135 |
136 | #
137 | # c.IPythonWidget.out_prompt = 'Out[%i]: '
138 |
139 | #
140 | # c.IPythonWidget.input_sep = '\n'
141 |
142 | # Whether to draw information calltips on open-parentheses.
143 | # c.IPythonWidget.enable_calltips = True
144 |
145 | #
146 | # c.IPythonWidget.in_prompt = 'In [%i]: '
147 |
148 | # The width of the console at start time in number of characters (will double
149 | # with `hsplit` paging)
150 | # c.IPythonWidget.width = 81
151 |
152 | # A command for invoking a system text editor. If the string contains a
153 | # {filename} format specifier, it will be used. Otherwise, the filename will be
154 | # appended to the end the command.
155 | # c.IPythonWidget.editor = ''
156 |
157 | # If not empty, use this Pygments style for syntax highlighting. Otherwise, the
158 | # style sheet is queried for Pygments style information.
159 | # c.IPythonWidget.syntax_style = u''
160 |
161 | # The font family to use for the console. On OSX this defaults to Monaco, on
162 | # Windows the default is Consolas with fallback of Courier, and on other
163 | # platforms the default is Monospace.
164 | # c.IPythonWidget.font_family = u''
165 |
166 | # The pygments lexer class to use.
167 | # c.IPythonWidget.lexer_class =
168 |
169 | #
170 | # c.IPythonWidget.output_sep2 = ''
171 |
172 | # Whether to automatically execute on syntactically complete input.
173 | #
174 | # If False, Shift-Enter is required to submit each execution. Disabling this is
175 | # mainly useful for non-Python kernels, where the completion check would be
176 | # wrong.
177 | # c.IPythonWidget.execute_on_complete_input = True
178 |
179 | # The maximum number of lines of text before truncation. Specifying a non-
180 | # positive number disables text truncation (not recommended).
181 | # c.IPythonWidget.buffer_size = 500
182 |
183 | #
184 | # c.IPythonWidget.history_lock = False
185 |
186 | #
187 | # c.IPythonWidget.banner = u''
188 |
189 | # The type of underlying text widget to use. Valid values are 'plain', which
190 | # specifies a QPlainTextEdit, and 'rich', which specifies a QTextEdit.
191 | # c.IPythonWidget.kind = 'plain'
192 |
193 | # Whether to ask for user confirmation when restarting kernel
194 | # c.IPythonWidget.confirm_restart = True
195 |
196 | # The font size. If unconfigured, Qt will be entrusted with the size of the
197 | # font.
198 | # c.IPythonWidget.font_size = 0
199 |
200 | # The editor command to use when a specific line number is requested. The string
201 | # should contain two format specifiers: {line} and {filename}. If this parameter
202 | # is not specified, the line number option to the %edit magic will be ignored.
203 | # c.IPythonWidget.editor_line = u''
204 |
205 | # Whether to clear the console when the kernel is restarted
206 | # c.IPythonWidget.clear_on_kernel_restart = True
207 |
208 | # The type of paging to use. Valid values are:
209 | #
210 | # 'inside'
211 | # The widget pages like a traditional terminal.
212 | # 'hsplit'
213 | # When paging is requested, the widget is split horizontally. The top
214 | # pane contains the console, and the bottom pane contains the paged text.
215 | # 'vsplit'
216 | # Similar to 'hsplit', except that a vertical splitter is used.
217 | # 'custom'
218 | # No action is taken by the widget beyond emitting a
219 | # 'custom_page_requested(str)' signal.
220 | # 'none'
221 | # The text is written directly to the console.
222 | # c.IPythonWidget.paging = 'inside'
223 |
224 | #
225 | # c.IPythonWidget.output_sep = ''
226 |
227 | #------------------------------------------------------------------------------
228 | # IPKernelApp configuration
229 | #------------------------------------------------------------------------------
230 |
231 | # IPython: an enhanced interactive Python shell.
232 |
233 | # IPKernelApp will inherit config from: BaseIPythonApplication, Application,
234 | # InteractiveShellApp
235 |
236 | # Run the file referenced by the PYTHONSTARTUP environment variable at IPython
237 | # startup.
238 | # c.IPKernelApp.exec_PYTHONSTARTUP = True
239 |
240 | # The importstring for the DisplayHook factory
241 | # c.IPKernelApp.displayhook_class = 'IPython.kernel.zmq.displayhook.ZMQDisplayHook'
242 |
243 | # Set the IP or interface on which the kernel will listen.
244 | # c.IPKernelApp.ip = u''
245 |
246 | # Pre-load matplotlib and numpy for interactive use, selecting a particular
247 | # matplotlib backend and loop integration.
248 | # c.IPKernelApp.pylab = None
249 |
250 | # Create a massive crash report when IPython encounters what may be an internal
251 | # error. The default is to append a short message to the usual traceback
252 | # c.IPKernelApp.verbose_crash = False
253 |
254 | # The Kernel subclass to be used.
255 | #
256 | # This should allow easy re-use of the IPKernelApp entry point to configure and
257 | # launch kernels other than IPython's own.
258 | # c.IPKernelApp.kernel_class = 'IPython.kernel.zmq.ipkernel.Kernel'
259 |
260 | # Run the module as a script.
261 | # c.IPKernelApp.module_to_run = ''
262 |
263 | # The date format used by logging formatters for %(asctime)s
264 | # c.IPKernelApp.log_datefmt = '%Y-%m-%d %H:%M:%S'
265 |
266 | # set the shell (ROUTER) port [default: random]
267 | # c.IPKernelApp.shell_port = 0
268 |
269 | # set the control (ROUTER) port [default: random]
270 | # c.IPKernelApp.control_port = 0
271 |
272 | # Whether to overwrite existing config files when copying
273 | # c.IPKernelApp.overwrite = False
274 |
275 | # Execute the given command string.
276 | # c.IPKernelApp.code_to_run = ''
277 |
278 | # set the stdin (ROUTER) port [default: random]
279 | # c.IPKernelApp.stdin_port = 0
280 |
281 | # Set the log level by value or name.
282 | # c.IPKernelApp.log_level = 30
283 |
284 | # lines of code to run at IPython startup.
285 | # c.IPKernelApp.exec_lines = []
286 |
287 | # Path to an extra config file to load.
288 | #
289 | # If specified, load this config file in addition to any other IPython config.
290 | # c.IPKernelApp.extra_config_file = u''
291 |
292 | # The importstring for the OutStream factory
293 | # c.IPKernelApp.outstream_class = 'IPython.kernel.zmq.iostream.OutStream'
294 |
295 | # Whether to create profile dir if it doesn't exist
296 | # c.IPKernelApp.auto_create = False
297 |
298 | # set the heartbeat port [default: random]
299 | # c.IPKernelApp.hb_port = 0
300 |
301 | #
302 | # c.IPKernelApp.transport = 'tcp'
303 |
304 | # redirect stdout to the null device
305 | # c.IPKernelApp.no_stdout = False
306 |
307 | # Should variables loaded at startup (by startup files, exec_lines, etc.) be
308 | # hidden from tools like %who?
309 | # c.IPKernelApp.hide_initial_ns = True
310 |
311 | # dotted module name of an IPython extension to load.
312 | # c.IPKernelApp.extra_extension = ''
313 |
314 | # A file to be run
315 | # c.IPKernelApp.file_to_run = ''
316 |
317 | # The IPython profile to use.
318 | # c.IPKernelApp.profile = u'default'
319 |
320 | #
321 | # c.IPKernelApp.parent_appname = u''
322 |
323 | # kill this process if its parent dies. On Windows, the argument specifies the
324 | # HANDLE of the parent process, otherwise it is simply boolean.
325 | # c.IPKernelApp.parent_handle = 0
326 |
327 | # JSON file in which to store connection info [default: kernel-.json]
328 | #
329 | # This file will contain the IP, ports, and authentication key needed to connect
330 | # clients to this kernel. By default, this file will be created in the security
331 | # dir of the current profile, but can be specified by absolute path.
332 | # c.IPKernelApp.connection_file = ''
333 |
334 | # If true, IPython will populate the user namespace with numpy, pylab, etc. and
335 | # an ``import *`` is done from numpy and pylab, when using pylab mode.
336 | #
337 | # When False, pylab mode should not import any names into the user namespace.
338 | # c.IPKernelApp.pylab_import_all = True
339 |
340 | # The name of the IPython directory. This directory is used for logging
341 | # configuration (through profiles), history storage, etc. The default is usually
342 | # $HOME/.ipython. This options can also be specified through the environment
343 | # variable IPYTHONDIR.
344 | # c.IPKernelApp.ipython_dir = u''
345 |
346 | # Configure matplotlib for interactive use with the default matplotlib backend.
347 | # c.IPKernelApp.matplotlib = None
348 |
349 | # ONLY USED ON WINDOWS Interrupt this process when the parent is signaled.
350 | # c.IPKernelApp.interrupt = 0
351 |
352 | # Whether to install the default config files into the profile dir. If a new
353 | # profile is being created, and IPython contains config files for that profile,
354 | # then they will be staged into the new directory. Otherwise, default config
355 | # files will be automatically generated.
356 | # c.IPKernelApp.copy_config_files = False
357 |
358 | # List of files to run at IPython startup.
359 | # c.IPKernelApp.exec_files = []
360 |
361 | # Enable GUI event loop integration with any of ('glut', 'gtk', 'gtk3', 'none',
362 | # 'osx', 'pyglet', 'qt', 'qt4', 'tk', 'wx').
363 | # c.IPKernelApp.gui = None
364 |
365 | # A list of dotted module names of IPython extensions to load.
366 | # c.IPKernelApp.extensions = []
367 |
368 | # redirect stderr to the null device
369 | # c.IPKernelApp.no_stderr = False
370 |
371 | # The Logging format template
372 | # c.IPKernelApp.log_format = '[%(name)s]%(highlevel)s %(message)s'
373 |
374 | # set the iopub (PUB) port [default: random]
375 | # c.IPKernelApp.iopub_port = 0
376 |
377 | #------------------------------------------------------------------------------
378 | # ZMQInteractiveShell configuration
379 | #------------------------------------------------------------------------------
380 |
381 | # A subclass of InteractiveShell for ZMQ.
382 |
383 | # ZMQInteractiveShell will inherit config from: InteractiveShell
384 |
385 | # Use colors for displaying information about objects. Because this information
386 | # is passed through a pager (like 'less'), and some pagers get confused with
387 | # color codes, this capability can be turned off.
388 | # c.ZMQInteractiveShell.color_info = True
389 |
390 | # A list of ast.NodeTransformer subclass instances, which will be applied to
391 | # user input before code is run.
392 | # c.ZMQInteractiveShell.ast_transformers = []
393 |
394 | #
395 | # c.ZMQInteractiveShell.history_length = 10000
396 |
397 | # Don't call post-execute functions that have failed in the past.
398 | # c.ZMQInteractiveShell.disable_failing_post_execute = False
399 |
400 | # Show rewritten input, e.g. for autocall.
401 | # c.ZMQInteractiveShell.show_rewritten_input = True
402 |
403 | # Set the color scheme (NoColor, Linux, or LightBG).
404 | # c.ZMQInteractiveShell.colors = 'LightBG'
405 |
406 | #
407 | # c.ZMQInteractiveShell.separate_in = '\n'
408 |
409 | # Deprecated, use PromptManager.in2_template
410 | # c.ZMQInteractiveShell.prompt_in2 = ' .\\D.: '
411 |
412 | #
413 | # c.ZMQInteractiveShell.separate_out = ''
414 |
415 | # Deprecated, use PromptManager.in_template
416 | # c.ZMQInteractiveShell.prompt_in1 = 'In [\\#]: '
417 |
418 | # Enable deep (recursive) reloading by default. IPython can use the deep_reload
419 | # module which reloads changes in modules recursively (it replaces the reload()
420 | # function, so you don't need to change anything to use it). deep_reload()
421 | # forces a full reload of modules whose code may have changed, which the default
422 | # reload() function does not. When deep_reload is off, IPython will use the
423 | # normal reload(), but deep_reload will still be available as dreload().
424 | # c.ZMQInteractiveShell.deep_reload = False
425 |
426 | # Make IPython automatically call any callable object even if you didn't type
427 | # explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
428 | # The value can be '0' to disable the feature, '1' for 'smart' autocall, where
429 | # it is not applied if there are no more arguments on the line, and '2' for
430 | # 'full' autocall, where all callable objects are automatically called (even if
431 | # no arguments are present).
432 | # c.ZMQInteractiveShell.autocall = 0
433 |
434 | #
435 | # c.ZMQInteractiveShell.separate_out2 = ''
436 |
437 | # Deprecated, use PromptManager.justify
438 | # c.ZMQInteractiveShell.prompts_pad_left = True
439 |
440 | #
441 | # c.ZMQInteractiveShell.readline_parse_and_bind = ['tab: complete', '"\\C-l": clear-screen', 'set show-all-if-ambiguous on', '"\\C-o": tab-insert', '"\\C-r": reverse-search-history', '"\\C-s": forward-search-history', '"\\C-p": history-search-backward', '"\\C-n": history-search-forward', '"\\e[A": history-search-backward', '"\\e[B": history-search-forward', '"\\C-k": kill-line', '"\\C-u": unix-line-discard']
442 |
443 | # Enable magic commands to be called without the leading %.
444 | # c.ZMQInteractiveShell.automagic = True
445 |
446 | #
447 | # c.ZMQInteractiveShell.debug = False
448 |
449 | #
450 | # c.ZMQInteractiveShell.object_info_string_level = 0
451 |
452 | #
453 | # c.ZMQInteractiveShell.ipython_dir = ''
454 |
455 | #
456 | # c.ZMQInteractiveShell.readline_remove_delims = '-/~'
457 |
458 | # Start logging to the default log file.
459 | # c.ZMQInteractiveShell.logstart = False
460 |
461 | # The name of the logfile to use.
462 | # c.ZMQInteractiveShell.logfile = ''
463 |
464 | #
465 | # c.ZMQInteractiveShell.wildcards_case_sensitive = True
466 |
467 | # Save multi-line entries as one entry in readline history
468 | # c.ZMQInteractiveShell.multiline_history = True
469 |
470 | # Start logging to the given file in append mode.
471 | # c.ZMQInteractiveShell.logappend = ''
472 |
473 | #
474 | # c.ZMQInteractiveShell.xmode = 'Context'
475 |
476 | #
477 | # c.ZMQInteractiveShell.quiet = False
478 |
479 | # Deprecated, use PromptManager.out_template
480 | # c.ZMQInteractiveShell.prompt_out = 'Out[\\#]: '
481 |
482 | # Set the size of the output cache. The default is 1000, you can change it
483 | # permanently in your config file. Setting it to 0 completely disables the
484 | # caching system, and the minimum value accepted is 20 (if you provide a value
485 | # less than 20, it is reset to 0 and a warning is issued). This limit is
486 | # defined because otherwise you'll spend more time re-flushing a too small cache
487 | # than working
488 | # c.ZMQInteractiveShell.cache_size = 1000
489 |
490 | # 'all', 'last', 'last_expr' or 'none', specifying which nodes should be run
491 | # interactively (displaying output from expressions).
492 | # c.ZMQInteractiveShell.ast_node_interactivity = 'last_expr'
493 |
494 | # Automatically call the pdb debugger after every exception.
495 | # c.ZMQInteractiveShell.pdb = False
496 |
497 | #------------------------------------------------------------------------------
498 | # KernelManager configuration
499 | #------------------------------------------------------------------------------
500 |
501 | # Manages a single kernel in a subprocess on this host.
502 | #
503 | # This version starts kernels with Popen.
504 |
505 | # KernelManager will inherit config from: ConnectionFileMixin
506 |
507 | # The Popen Command to launch the kernel. Override this if you have a custom
508 | # kernel. If kernel_cmd is specified in a configuration file, IPython does not
509 | # pass any arguments to the kernel, because it cannot make any assumptions about
510 | # the arguments that the kernel understands. In particular, this means that the
511 | # kernel does not receive the option --debug if it given on the IPython command
512 | # line.
513 | # c.KernelManager.kernel_cmd = []
514 |
515 | # Set the kernel's IP address [default localhost]. If the IP address is
516 | # something other than localhost, then Consoles on other machines will be able
517 | # to connect to the Kernel, so be careful!
518 | # c.KernelManager.ip = u''
519 |
520 | #
521 | # c.KernelManager.transport = 'tcp'
522 |
523 | # Should we autorestart the kernel if it dies.
524 | # c.KernelManager.autorestart = False
525 |
526 | #------------------------------------------------------------------------------
527 | # ProfileDir configuration
528 | #------------------------------------------------------------------------------
529 |
530 | # An object to manage the profile directory and its resources.
531 | #
532 | # The profile directory is used by all IPython applications, to manage
533 | # configuration, logging and security.
534 | #
535 | # This object knows how to find, create and manage these directories. This
536 | # should be used by any code that wants to handle profiles.
537 |
538 | # Set the profile location directly. This overrides the logic used by the
539 | # `profile` option.
540 | # c.ProfileDir.location = u''
541 |
542 | #------------------------------------------------------------------------------
543 | # Session configuration
544 | #------------------------------------------------------------------------------
545 |
546 | # Object for handling serialization and sending of messages.
547 | #
548 | # The Session object handles building messages and sending them with ZMQ sockets
549 | # or ZMQStream objects. Objects can communicate with each other over the
550 | # network via Session objects, and only need to work with the dict-based IPython
551 | # message spec. The Session will handle serialization/deserialization, security,
552 | # and metadata.
553 | #
554 | # Sessions support configurable serialization via packer/unpacker traits, and
555 | # signing with HMAC digests via the key/keyfile traits.
556 | #
557 | # Parameters ----------
558 | #
559 | # debug : bool
560 | # whether to trigger extra debugging statements
561 | # packer/unpacker : str : 'json', 'pickle' or import_string
562 | # importstrings for methods to serialize message parts. If just
563 | # 'json' or 'pickle', predefined JSON and pickle packers will be used.
564 | # Otherwise, the entire importstring must be used.
565 | #
566 | # The functions must accept at least valid JSON input, and output *bytes*.
567 | #
568 | # For example, to use msgpack:
569 | # packer = 'msgpack.packb', unpacker='msgpack.unpackb'
570 | # pack/unpack : callables
571 | # You can also set the pack/unpack callables for serialization directly.
572 | # session : bytes
573 | # the ID of this Session object. The default is to generate a new UUID.
574 | # username : unicode
575 | # username added to message headers. The default is to ask the OS.
576 | # key : bytes
577 | # The key used to initialize an HMAC signature. If unset, messages
578 | # will not be signed or checked.
579 | # keyfile : filepath
580 | # The file containing a key. If this is set, `key` will be initialized
581 | # to the contents of the file.
582 |
583 | # Username for the Session. Default is your system username.
584 | # c.Session.username = u'dmartin'
585 |
586 | # The name of the unpacker for unserializing messages. Only used with custom
587 | # functions for `packer`.
588 | # c.Session.unpacker = 'json'
589 |
590 | # Threshold (in bytes) beyond which a buffer should be sent without copying.
591 | # c.Session.copy_threshold = 65536
592 |
593 | # The name of the packer for serializing messages. Should be one of 'json',
594 | # 'pickle', or an import name for a custom callable serializer.
595 | # c.Session.packer = 'json'
596 |
597 | # The maximum number of digests to remember.
598 | #
599 | # The digest history will be culled when it exceeds this value.
600 | # c.Session.digest_history_size = 65536
601 |
602 | # The UUID identifying this session.
603 | # c.Session.session = u''
604 |
605 | # The digest scheme used to construct the message signatures. Must have the form
606 | # 'hmac-HASH'.
607 | # c.Session.signature_scheme = 'hmac-sha256'
608 |
609 | # execution key, for extra authentication.
610 | # c.Session.key = ''
611 |
612 | # Debug output in the Session
613 | # c.Session.debug = False
614 |
615 | # The maximum number of items for a container to be introspected for custom
616 | # serialization. Containers larger than this are pickled outright.
617 | # c.Session.item_threshold = 64
618 |
619 | # path to file containing execution key.
620 | # c.Session.keyfile = ''
621 |
622 | # Threshold (in bytes) beyond which an object's buffer should be extracted to
623 | # avoid pickling.
624 | # c.Session.buffer_threshold = 1024
625 |
626 | # Metadata dictionary, which serves as the default top-level metadata dict for
627 | # each message.
628 | # c.Session.metadata = {}
629 |
630 | #------------------------------------------------------------------------------
631 | # InlineBackend configuration
632 | #------------------------------------------------------------------------------
633 |
634 | # An object to store configuration of the inline backend.
635 |
636 | # The figure format to enable (deprecated use `figure_formats` instead)
637 | # c.InlineBackend.figure_format = u''
638 |
639 | # A set of figure formats to enable: 'png', 'retina', 'jpeg', 'svg', 'pdf'.
640 | # c.InlineBackend.figure_formats = set(['png'])
641 |
642 | # Extra kwargs to be passed to fig.canvas.print_figure.
643 | #
644 | # Logical examples include: bbox_inches, quality (for jpeg figures), etc.
645 | # c.InlineBackend.print_figure_kwargs = {'bbox_inches': 'tight'}
646 |
647 | # Close all figures at the end of each cell.
648 | #
649 | # When True, ensures that each cell starts with no active figures, but it also
650 | # means that one must keep track of references in order to edit or redraw
651 | # figures in subsequent cells. This mode is ideal for the notebook, where
652 | # residual plots from other cells might be surprising.
653 | #
654 | # When False, one must call figure() to create new figures. This means that
655 | # gcf() and getfigs() can reference figures created in other cells, and the
656 | # active figure can continue to be edited with pylab/pyplot methods that
657 | # reference the current active figure. This mode facilitates iterative editing
658 | # of figures, and behaves most consistently with other matplotlib backends, but
659 | # figure barriers between cells must be explicit.
660 | # c.InlineBackend.close_figures = True
661 |
662 | # Subset of matplotlib rcParams that should be different for the inline backend.
663 | # c.InlineBackend.rc = {'font.size': 10, 'figure.figsize': (6.0, 4.0), 'figure.facecolor': (1, 1, 1, 0), 'savefig.dpi': 72, 'figure.subplot.bottom': 0.125, 'figure.edgecolor': (1, 1, 1, 0)}
664 |
--------------------------------------------------------------------------------
/init/profile_pyspark/startup/00-pyspark-setup.py:
--------------------------------------------------------------------------------
1 | # Configure the necessary Spark environment
2 | import os
3 | import sys
4 |
5 |
6 | # Note: Some Spark installations do not need the extra libexec path
7 | spark_home = os.environ.get('SPARK_HOME', None)
8 | sys.path.insert(0, spark_home + "/libexec/python")
9 |
10 | # Add the py4j to the path.
11 | # You may need to change the version number to match your install
12 | sys.path.insert(0, os.path.join(spark_home, 'libexec/python/lib/py4j-0.8.2.1-src.zip'))
13 |
14 | # Initialize PySpark to predefine the SparkContext variable 'sc'
15 | execfile(os.path.join(spark_home, 'libexec/python/pyspark/shell.py'))
--------------------------------------------------------------------------------
/init/profile_pyspark/startup/README:
--------------------------------------------------------------------------------
1 | This is the IPython startup directory
2 |
3 | .py and .ipy files in this directory will be run *prior* to any code or files specified
4 | via the exec_lines or exec_files configurables whenever you load this profile.
5 |
6 | Files will be run in lexicographical order, so you can control the execution order of files
7 | with a prefix, e.g.::
8 |
9 | 00-first.py
10 | 50-middle.py
11 | 99-last.ipy
12 |
--------------------------------------------------------------------------------
/init/profile_pyspark/static/custom/custom.css:
--------------------------------------------------------------------------------
1 | /*
2 | Placeholder for custom user CSS
3 |
4 | mainly to be overridden in profile/static/custom/custom.css
5 |
6 | This will always be an empty file in IPython
7 | */
--------------------------------------------------------------------------------
/init/profile_pyspark/static/custom/custom.js:
--------------------------------------------------------------------------------
1 | // leave at least 2 line with only a star on it below, or doc generation fails
2 | /**
3 | *
4 | *
5 | * Placeholder for custom user javascript
6 | * mainly to be overridden in profile/static/custom/custom.js
7 | * This will always be an empty file in IPython
8 | *
9 | * User could add any javascript in the `profile/static/custom/custom.js` file
10 | * (and should create it if it does not exist).
11 | * It will be executed by the ipython notebook at load time.
12 | *
13 | * Same thing with `profile/static/custom/custom.css` to inject custom css into the notebook.
14 | *
15 | * Example :
16 | *
17 | * Create a custom button in toolbar that execute `%qtconsole` in kernel
18 | * and hence open a qtconsole attached to the same kernel as the current notebook
19 | *
20 | * $([IPython.events]).on('app_initialized.NotebookApp', function(){
21 | * IPython.toolbar.add_buttons_group([
22 | * {
23 | * 'label' : 'run qtconsole',
24 | * 'icon' : 'icon-terminal', // select your icon from http://fortawesome.github.io/Font-Awesome/icons
25 | * 'callback': function () {
26 | * IPython.notebook.kernel.execute('%qtconsole')
27 | * }
28 | * }
29 | * // add more button here if needed.
30 | * ]);
31 | * });
32 | *
33 | * Example :
34 | *
35 | * Use `jQuery.getScript(url [, success(script, textStatus, jqXHR)] );`
36 | * to load custom script into the notebook.
37 | *
38 | * // to load the metadata ui extension example.
39 | * $.getScript('/static/notebook/js/celltoolbarpresets/example.js');
40 | * // or
41 | * // to load the metadata ui extension to control slideshow mode / reveal js for nbconvert
42 | * $.getScript('/static/notebook/js/celltoolbarpresets/slideshow.js');
43 | *
44 | *
45 | * @module IPython
46 | * @namespace IPython
47 | * @class customjs
48 | * @static
49 | */
50 |
--------------------------------------------------------------------------------
/osxprep.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Ask for the administrator password upfront
4 | sudo -v
5 |
6 | # Keep-alive: update existing `sudo` time stamp until `osxprep.sh` has finished
7 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
8 |
9 | # Step 1: Update the OS and Install Xcode Tools
10 | echo "------------------------------"
11 | echo "Updating OSX. If this requires a restart, run the script again."
12 | # Install all available updates
13 | sudo softwareupdate -ia --verbose
14 | # Install only recommended available updates
15 | #sudo softwareupdate -ir --verbose
16 |
17 | echo "------------------------------"
18 | echo "Installing Xcode Command Line Tools."
19 | # Install Xcode command line tools
20 | xcode-select --install
21 |
--------------------------------------------------------------------------------
/pydata.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # ~/pydata.sh
4 |
5 | # Removed user's cached credentials
6 | # This script might be run with .dots, which uses elevated privileges
7 | sudo -K
8 |
9 | echo "------------------------------"
10 | echo "Setting up pip."
11 |
12 | # Install pip
13 | easy_install pip
14 |
15 | ###############################################################################
16 | # Virtual Enviroments #
17 | ###############################################################################
18 |
19 | echo "------------------------------"
20 | echo "Setting up virtual environments."
21 |
22 | # Install virtual environments globally
23 | # It fails to install virtualenv if PIP_REQUIRE_VIRTUALENV was true
24 | export PIP_REQUIRE_VIRTUALENV=false
25 | pip install virtualenv
26 | pip install virtualenvwrapper
27 |
28 | echo "------------------------------"
29 | echo "Source virtualenvwrapper from ~/.extra"
30 |
31 | EXTRA_PATH=~/.extra
32 | echo $EXTRA_PATH
33 | echo "" >> $EXTRA_PATH
34 | echo "" >> $EXTRA_PATH
35 | echo "# Source virtualenvwrapper, added by pydata.sh" >> $EXTRA_PATH
36 | echo "export WORKON_HOME=~/.virtualenvs" >> $EXTRA_PATH
37 | echo "source /usr/local/bin/virtualenvwrapper.sh" >> $EXTRA_PATH
38 | echo "" >> $BASH_PROFILE_PATH
39 | source $EXTRA_PATH
40 |
41 | ###############################################################################
42 | # Python 2 Virtual Enviroment #
43 | ###############################################################################
44 |
45 | echo "------------------------------"
46 | echo "Setting up py2-data virtual environment."
47 |
48 | # Create a Python2 data environment
49 | mkvirtualenv py2-data
50 | workon py2-data
51 |
52 | # Install Python data modules
53 | pip install numpy
54 | pip install scipy
55 | pip install matplotlib
56 | pip install pandas
57 | pip install sympy
58 | pip install nose
59 | pip install unittest2
60 | pip install seaborn
61 | pip install scikit-learn
62 | pip install "ipython[all]"
63 | pip install bokeh
64 | pip install Flask
65 | pip install sqlalchemy
66 | pip install mysql-python
67 |
68 | ###############################################################################
69 | # Python 3 Virtual Enviroment #
70 | ###############################################################################
71 |
72 | echo "------------------------------"
73 | echo "Setting up py3-data virtual environment."
74 |
75 | # Create a Python3 data environment
76 | mkvirtualenv --python=/usr/local/bin/python3 py3-data
77 | workon py3-data
78 |
79 | # Install Python data modules
80 | pip install numpy
81 | pip install scipy
82 | pip install matplotlib
83 | pip install pandas
84 | pip install sympy
85 | pip install nose
86 | pip install unittest2
87 | pip install seaborn
88 | pip install scikit-learn
89 | pip install "ipython[all]"
90 | pip install bokeh
91 | pip install Flask
92 | pip install sqlalchemy
93 | #pip install mysql-python # Python 2 only, use mysqlclient instead
94 | pip install mysqlclient
95 |
96 | ###############################################################################
97 | # Install IPython Profile
98 | ###############################################################################
99 |
100 | echo "------------------------------"
101 | echo "Installing IPython Notebook Default Profile"
102 |
103 | # Add the IPython profile
104 | mkdir -p ~/.ipython
105 | cp -r init/profile_default/ ~/.ipython/profile_default
106 |
107 | echo "------------------------------"
108 | echo "Script completed."
109 | echo "Usage: workon py2-data for Python2"
110 | echo "Usage: workon py3-data for Python3"
--------------------------------------------------------------------------------
/web.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Install command-line tools using Homebrew.
4 |
5 | # Ask for the administrator password upfront.
6 | sudo -v
7 |
8 | # Keep-alive: update existing `sudo` time stamp until the script has finished.
9 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
10 |
11 | # Check for Homebrew,
12 | # Install if we don't have it
13 | if test ! $(which brew); then
14 | echo "Installing homebrew..."
15 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
16 | fi
17 |
18 | # Make sure we’re using the latest Homebrew.
19 | brew update
20 |
21 | brew install node
22 |
23 | # Remove outdated versions from the cellar.
24 | brew cleanup
25 |
26 | npm install -g coffee-script
27 | npm install -g grunt-cli
28 | npm install -g jshint
29 | npm install -g less
30 |
31 | #gem install jekyll
32 |
--------------------------------------------------------------------------------