Skip to content

Instantly share code, notes, and snippets.

View robbitt07's full-sized avatar

Robert robbitt07

  • Kansas City, MO
View GitHub Profile
<script type = "text/javascript">
$(document).ready(function(){
$(".<id-click>").click(function(event){
event.preventDefault();
$(this).next(".<id>").fadeToggle();
})
})
</script>
@robbitt07
robbitt07 / dict_merge.py
Created February 7, 2017 04:26 — forked from angstwad/dict_merge.py
Recursive dictionary merge in Python
import collections
def dict_merge(dct, merge_dct):
""" Recursive dict merge. Inspired by :meth:``dict.update()``, instead of
updating only top-level keys, dict_merge recurses down into dicts nested
to an arbitrary depth, updating keys. The ``merge_dct`` is merged into
``dct``.
:param dct: dict onto which the merge is executed
:param merge_dct: dct merged into dct
@robbitt07
robbitt07 / python_resources.md
Last active September 8, 2015 18:31 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@robbitt07
robbitt07 / 0_reuse_code.js
Last active September 8, 2015 11:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
A
ACO
AA
ACOM
AAN
ACOR
AAON
ACPW
AAP
ACTG
@robbitt07
robbitt07 / intra_day.R
Created January 22, 2015 05:56
robbitttrader
require(data.table) || install.packages('data.table')
require(fractalrock) || install.packages("fractalrock")
require(jsonlite) || install.packages("jsonlite")
require(lubridate) || install.packages("lubridate")
require(data.table)
require(fractalrock)
require(jsonlite)
require(lubridate)
### --- Importing Bid/Ask and Trade Data from Netfonds ------------------------
@robbitt07
robbitt07 / garchAuto.R
Last active August 29, 2015 14:13 — forked from ivannp/garchAuto.R
garchAutoTryFit = function(
ll,
data,
trace=FALSE,
forecast.length=1,
with.forecast=TRUE,
ic="AIC",
garch.model="garch" )
{
formula = as.formula( paste( sep="",