This file contains 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
from django.db import models | |
from django.contrib.auth import User | |
from mycompany.models import Client | |
from userprofiles.models import Profile | |
class External(Profile): | |
#External-specific models | |
client = models.ForeignKey(Client) | |
def __unicode__(self): |
This file contains 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
if exists("+relativenumber") | |
set relativenumber " show relative line numbers | |
set numberwidth=3 " narrow number column | |
" cycles between relative / absolute / no numbering | |
function! RelativeNumberToggle() | |
if (&relativenumber == 1) | |
set number number? | |
elseif (&number == 1) | |
set nonumber number? | |
else |
This file contains 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
# Download API from http://interactivebrokers.github.io/# | |
# | |
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install | |
# | |
# Note: The test cases, and the documentation refer to a python package called IBApi, | |
# but the actual package is called ibapi. Go figure. | |
# | |
# Get the latest version of the gateway: | |
# https://www.interactivebrokers.com/en/?f=%2Fen%2Fcontrol%2Fsystemstandalone-ibGateway.php%3Fos%3Dunix | |
# (for unix: windows and mac users please find your own version) |
This file contains 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
# Download API from http://interactivebrokers.github.io/# | |
# | |
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install | |
# | |
# Note: The test cases, and the documentation refer to a python package called IBApi, | |
# but the actual package is called ibapi. Go figure. | |
# | |
# Get the latest version of the gateway: | |
# https://www.interactivebrokers.com/en/?f=%2Fen%2Fcontrol%2Fsystemstandalone-ibGateway.php%3Fos%3Dunix | |
# (for unix: windows and mac users please find your own version) |
This file contains 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 DIRSTACK_MAX=15 | |
DS=() | |
function eecho | |
{ | |
echo $@ 1>&2 | |
} | |
function shiftStackUp | |
{ |
This file contains 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
(require 's) | |
(require 'request) | |
(require 'seq) | |
(require 'jabber) | |
(defvar hipchat--user-info-for-completion nil) | |
(defcustom hipchat-nickname "Full name" "Hipchat real name (see see https://hipchat.com/account/xmpp)." | |
:type '(string) |
This file contains 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
#!/bin/sh | |
# ########################################################## # | |
# wrapper for mosh to work with ssh's proxycommand directive # | |
# this only makes sense if the machine is directly reachable # | |
# from the internet using udp. # | |
# ########################################################## # | |
THISSCRIPT="`basename \"$0\"`" | |
REMOTE="$1" |
This file contains 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
--- | |
title: A replication of the Practical Application section in 'The Probability of Backtest | |
Overfitting' - Bailey et al. | |
output: | |
html_notebook: | |
# html_document: | |
# df_print: paged | |
--- | |
In their paper "The Probability of Backtest |
This file contains 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
====================================================== | |
Setting up Django using Apache/mod_wsgi on Ubuntu 8.10 | |
====================================================== | |
This article will cover setting up Django using Apache/mod_wsgi on Ubuntu | |
8.10. The article is targeted at a production environment, but keep in mind | |
this is a more generalized environment. You may have different requirements, | |
but this article should at least provide the stepping stones. | |
The article will use distribution packages where nesscary. As of 8.10 the |
This file contains 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
;; Connect using jabber-connect | |
;; My username from the HipChat configuration | |
;; from https://www.hipchat.com/account/xmpp | |
(setq jabber-account-list '(("10804_81219@chat.hipchat.com"))) | |
;; To join HipChat rooms easily | |
(defvar hipchat-number "10804") | |
(defvar hipchat-nickname "Brian McKenna") | |
(defun hipchat-join (room) |
OlderNewer