a
: after cursori
: before cursorA
: after lineI
: before lineo
: add a new line belowO
: add a new line above
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
See the Vertica Programmer's Guide for information on available commands. | |
General | |
\c[onnect] [DBNAME|- [USER]] | |
connect to new database (currently "localdev") | |
\cd [DIR] change the current working directory | |
\q quit vsql | |
\set [NAME [VALUE]] | |
set internal variable, or list all if no parameters | |
\timing toggle timing of commands (currently off) |
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
import logging | |
import time | |
from celery import shared_task as orig_shared_task | |
def timeit(func): | |
"""A decorator used to log the function execution time.""" | |
logger = logging.getLogger('tasks') |
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
-- Export | |
\a -- Disable alignment | |
\t -- Disable column header | |
\o output.txt -- Set output filename | |
SELECT * FROM table; -- Select the data to export | |
-- Import | |
COPY table FROM '/path/to/output.txt' DELIMITER '|'; |
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
# Forked from https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/arrow.zsh-theme | |
git_describe() { | |
echo $(git describe --tag 2> /dev/null) | |
} | |
my_git_prompt_info() { | |
prompt=$(git_prompt_info) | |
if [ ! -z "$prompt" ]; then | |
echo "$(git_describe) ($(git_prompt_info))" |
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
# ~/.ipython/profile_default/startup/00_common.py | |
import base64 | |
import codecs | |
import cPickle as pickle | |
import cStringIO as StringIO | |
import csv | |
import hashlib | |
import importlib | |
import json | |
import math |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
SleekXMPP: The Sleek XMPP Library | |
Copyright (C) 2010 Nathanael C. Fritz | |
This file is part of SleekXMPP. | |
See the file LICENSE for copying permission. | |
""" |
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
sudo apt-get install -y gcc python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev build-essential |