Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
import datetime | |
def Easter(year): | |
""" | |
Gregorian Calendar | |
http://en.wikipedia.org/wiki/Computus | |
""" | |
a = year % 19 |
# You have your csv data and it looks like so... It's in a file named "my_data.csv" and we want to import it into a table named "my_things". | |
"1", "Something", "0.50", "2013-05-05 10:00:00" | |
"2", "Another thing", "1.50", "2013-06-05 10:30:00" | |
# Now you want to import it, go to the command line and type: | |
$ PGPASSWORD=PWHERE psql -h HOSTHERE -U USERHERE DBNAMEHERE -c "\copy my_things FROM 'my_data.csv' WITH CSV;" | |
# Voila! It's impoted. Now if you want to wipe it out and import a fresh one, you would do this: |
import sys, string, urllib | |
GROUPS = dict([('ags','ftp://ftp.cmegroup.com/pub/settle/stlags'), | |
('rates','ftp://ftp.cmegroup.com/pub/settle/stlint'), | |
('fx','ftp://ftp.cmegroup.com/pub/settle/stlcur'), | |
('nymex','ftp://ftp.cmegroup.com/pub/settle/stlnymex'), | |
('comex','ftp://ftp.cmegroup.com/settle/stlcomex'), | |
('clearport','ftp://ftp.cmegroup.com/settle/stlcpc')]) | |
# month codes |
Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
This document will walk you through compiling your own scientific python distribution from source,
without sudo
, on a linux machine. The core numpy
and scipy
libraries will be linked against
Intel MKL for maximum performance.
This procedure has been tested with Rocks Cluster Linux 6.0 (Mamba) and CentOS 6.3.
// This is a peek behind the curtain at @zaarly's epic-fantasy-heavy-metal-themed internal styleguide, better known as Hammer. | |
// | |
// With this, you can add the .fancy class to a symbolset span inside of a heading tag to add a nice circular background. | |
// Some adjustments to the positioning of a particular glyph may be necessary. | |
// Each :before is set to postion: relative, so fine-tuning a .fancy glyph is simple, and won't affect the position of the circle. | |
// | |
// Example markup (in HAML): | |
// %h1 | |
// %span.ss-check.fancy | |
// Cool Guy Settings™ saved! |
from flask import Flask, render_template_string, request | |
app = Flask(__name__) | |
app.config['DEBUG'] = True | |
@app.route("/") | |
def index(): | |
#of course you would put these into files | |
jinja_template = """ | |
{# this is a jinja2 comment #} |
from numpy.random import rand | |
from numpy import r_, ix_, uint8, roll | |
import matplotlib.pyplot as plt | |
import time | |
size = 200 | |
GRID = (rand(size,size) > 0.75).astype(uint8) | |
# Rotate indices because the world is round | |
indx = r_[0:size] | |
up = roll(indx, -1) |