Skip to content

Commit

Permalink
Various python updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazen committed Jan 16, 2018
1 parent a649656 commit fb607f2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
2 changes: 2 additions & 0 deletions aliases
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ alias gp='git pull'
alias gP='git push'
alias ga='git add'
alias fabric='fab -H $H'
alias pbc='pbcopy'
alias pbp='pbpaste'
alias jbc='$JBOSS_HOME/bin/jboss-cli.sh -c $JBOSS_URL'
title() {
echo -ne "\e]0;$1\a"
Expand Down
5 changes: 3 additions & 2 deletions bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ function __git_prompt {
echo -en $P
fi
}
PS1='\[\e[1;31m\]\u\[\e[0m\]@\[\e[1;34m\]\h\[\e[0m\] [\[\e[0;37m\]\W\[\e[0m\]] $(__git_prompt)\n$ '
#PS1='\[\e[1;31m\]\u\[\e[0m\]@\[\e[1;34m\]\h\[\e[0m\] [\[\e[0;37m\]\W\[\e[0m\]] $(__git_prompt)\n$ '
PS1='[\[\e[1;31m\]\W\[\e[0m\]]$(__git_prompt)$ '

source ~/.aliases

HISTSIZE=1000

export GOPATH="/usr/local/go"
export PYTHONSTARTUP=~/.pythonrc.py
export PYTHONPATH=$PYTHONPATH:~/Workspace/lib
export PATH=~/Workspace/bin:$GOPATH/bin:$PATH

if [ -f ~/.bashlocal ]; then
Expand All @@ -49,3 +49,4 @@ fi
if [ -f ~/.todo ]; then
cat ~/.todo
fi
unset PYTHONPATH
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ function pysetup() {
rm ~/.pythonrc.py
fi
ln -s $DOTFILES/pythonrc.py ~/.pythonrc.py
sudo pip3 install numpy scapy-python3 paramiko boto3 urllib3 netaddr PyYaml requests flask
sudo pip3 install numpy scapy-python3 paramiko boto3 urllib3 netaddr PyYaml requests flask unqlite
unqlite
}

function vimsetup() {
Expand Down
12 changes: 12 additions & 0 deletions pythonrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import paramiko
import xml.etree.ElementTree as ET
import json
import csv
import boto3
import requests
import urllib3
Expand All @@ -22,6 +23,10 @@
from ctypes import *
import numpy as np
import heapq
import bz2
import gzip
import sqlite3
from unqlite import UnQlite

#PS1 variable
sys.ps1 = "$ "
Expand Down Expand Up @@ -61,6 +66,13 @@ def save_history(histPath=histPath):
region_name='us-west-1', aws_access_key_id='any',
aws_secret_access_key='any')

#SQLite db
sdb = sqlite3.connect("main.db")
sdbc = sdb.cursor()

#UnQlite db
udb = UnQlite("umain.db")

#Mylock
def mylock():
subprocess.Popen('mylock')
Expand Down
4 changes: 2 additions & 2 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
Plugin 'fatih/vim-go'

set background=dark
colorscheme solarized
colorscheme Benokai

highlight LiteralTabs ctermbg=darkgreen guibg=darkgreen
match LiteralTabs /\s\ /
Expand Down Expand Up @@ -102,7 +102,7 @@ nmap <C-B> :ConqueTermTab bash<CR>
nmap <C-Y> :ConqueTermTab python3<CR>
nmap <C-G> :TagbarToggle<CR>
nnoremap <F1> za
nnoremap <C-F> za
nnoremap <C-R> :call <SID>compile_and_run()<CR>
Expand Down

0 comments on commit fb607f2

Please sign in to comment.