Skip to content

Instantly share code, notes, and snippets.

@sjev
sjev / combobox.py
Last active August 29, 2015 14:14 — forked from MarshallChris/combobox.py
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 17 10:50:56 2013
@author: cmarshall
"""
import sip
sip.setapi('QString', 1)
sip.setapi('QVariant', 1)
@sjev
sjev / getData.py
Last active July 23, 2019 09:00
Download historic data from Interactive Brokers
# -*- coding: utf-8 -*-
"""
Script to get historic data for data subfolders
"""
from tradingWithPython.lib.csvDatabase import HistDataCsv
from tradingWithPython.lib.interactiveBrokers.helpers import createContract
@sjev
sjev / git_cheatsheet.md
Last active November 1, 2017 09:48
git cheat sheet

Revert changes

git reset

$ git reset --hard

Branching

# Gist example of IB wrapper ...
#
# 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:

Markdown reference

This is a quick overview of markdown synthax that can be used in a Jupyter notebook

**note:** Notes should work with div

bold text

@sjev
sjev / InstallCinnamonCrouton
Last active May 16, 2018 21:45 — forked from sohjsolwin/InstallCinnamonCrouton
Steps to install and setup a cinnamon flavored crouton on a Chromebook Pixel
# The next command will install a [raring] based ubuntu
# chroot, named [cinnamon] into the default directory
# with the targets [core], [cli-extra], [touch], and [keyboard]
sudo crouton -n cinnamon -r raring -t core,cli-extra,touch,keyboard
# Supply your new username and password like normal, and
# once that finishes, enter the chroot with:
sudo enter-chroot -n cinnamon
@sjev
sjev / vim_cheatsheet.md
Last active January 16, 2019 10:40
vim reference

Navigation

goto line     :   <nr>    
end of line       GA
start of file     gg
end of file       G

Inserting

@sjev
sjev / test_multicore.py
Last active September 26, 2018 14:24
multicore processing
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time
import os
import multiprocessing
import numpy as np
@sjev
sjev / .vimrc
Last active October 12, 2020 23:35
Setup development environment
" see tutorial on https://realpython.com/vim-and-python-a-match-made-in-heaven/
set encoding=utf-8
set nocompatible " required
filetype off " required
"show line numbers
set nu
@sjev
sjev / .gitignore
Last active February 22, 2023 20:55
venv/