This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User: | |
def __init__(self, email, first_name, last_name): | |
self.email = email | |
self.first_name = first_name | |
self.last_name = last_name | |
def greeting(self): | |
return f'Hi {self.first_name} {self.last_name}' | |
class AdminUser(User): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<meta charset='UTF-8'> | |
<title></title> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print(__doc__) | |
# Code source: Jaques Grobler | |
# License: BSD 3 clause | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from sklearn import datasets, linear_model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Website: | |
title = 'My site title' | |
ws = Website() | |
ws.title = 'Updated title' | |
print(ws.__dict__) | |
class SecondWebsite: | |
def __init__(self, title): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
010000100111010101110100001000000100100100100000011001000110111101101110001001110111010000100000011101000110100001101001011011100110101100100000011011110110011000100000011110010110111101110101 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias -g subl=subl | |
PATH=$PATH:/usr/local/bin/; export PATH | |
export PATH=/usr/local/heroku/bin | |
# Exports {{{ | |
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin # Reorder PATH so local bin is first | |
export PATH=$PATH:$HOME/anaconda/bin | |
export GREP_OPTIONS='--color=auto' | |
export GREP_COLOR='1;32' | |
export MANPAGER="less -X" # Don’t clear the screen after quitting a manual page |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unbind C-b | |
set -g prefix C-s | |
bind-key -r C-s send-prefix | |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/.vim/bundle | |
git clone https://github.com/scrooloose/nerdtree.git | |
git clone https://github.com/ervandew/supertab.git | |
git clone git://github.com/tpope/vim-bundler.git | |
git clone https://github.com/tpope/vim-rails.git | |
vim -u NONE -c "helptags vim-rails/doc" -c q | |
git clone git://github.com/tpope/vim-rake.git | |
git clone git://github.com/tpope/vim-projectionist.git | |
git clone git://github.com/tpope/vim-endwise.git | |
git clone https://github.com/tpope/vim-fugitive.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" source ~/.vimrc.before if it exists. | |
if filereadable(expand("~/.vimrc.before")) | |
source ~/.vimrc.before | |
endif | |
" ================ General Config ==================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" pathogen.vim - path option manipulation | |
" Maintainer: Tim Pope <http://tpo.pe/> | |
" Version: 2.4 | |
" Install in ~/.vim/autoload (or ~\vimfiles\autoload). | |
" | |
" For management of individually installed plugins in ~/.vim/bundle (or | |
" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your | |
" .vimrc is the only other setup necessary. | |
" |