this should be a mention @wcdolphin
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
function [ output_args ] = saveFigure( handle, fileName ) | |
% saveFigure | |
% Saves figure specified by `handle` as `fileName` in fullscreen | |
% as to get around the stupid behavior. | |
screen_size = get(0, 'ScreenSize'); | |
origSize = get(handle, 'Position'); % grab original on screen size | |
set(handle, 'Position', [0 0 screen_size(3) screen_size(4) ] ); %set to scren size | |
set(handle,'PaperPositionMode','auto') %set paper pos for printing | |
saveas(handle, fileName) % save figure |
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 flask import Flask | |
from flask.json import JSONEncoder | |
from bson import json_util | |
from mongoengine.base import BaseDocument | |
from mongoengine.queryset.base import BaseQuerySet | |
class MongoEngineJSONEncoder(JSONEncoder): | |
def default(self,obj): | |
if isinstance(obj,BaseDocument): | |
return json_util._json_convert(obj.to_mongo()) |
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
#!/usr/bin/env python | |
""" | |
mailmanToMBox.py: Inserts line feeds to create mbox format from Mailman Gzip'd | |
Text archives | |
Usage: ./to-mbox.py dir | |
Where dir is a directory containing .txt.gz files pulled from mailman Gzip'd Text | |
""" | |
import sys | |
import os | |
def makeMBox(fIn,fOut): |
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
# Libraries Included: | |
# Numpy, Scipy, Scikit, Pandas | |
import re | |
from itertools import chain | |
from sets import Set | |
from itertools import islice | |
def chunk(it, size): | |
it = iter(it) | |
return iter(lambda: tuple(islice(it, size)), ()) | |
inputs = ''' |
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
"""distutils.msvc9compiler | |
Contains MSVCCompiler, an implementation of the abstract CCompiler class | |
for the Microsoft Visual Studio 2008. | |
The module is compatible with VS 2005-2012. You can find legacy support | |
for older versions of VS in distutils.msvccompiler. | |
""" | |
# Written by Perry Stoll hacked by Cory Dolphin to support VS 2012+ |
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
My parents impressed on me the value of that you work hard for what you want in life. That your word is your bond and you do what you say and keep your promise. That you treat people with respect. Show the values and morals in in the daily life. That is the lesson that we continue to pass on to our son. | |
We need to pass those lessons on to the many generations to follow. [Cheering] Because we want our children in these nations to know that the only limit to your achievement is the strength of your dreams and your willingness to work for them. |
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
My parents impressed on me the value of that you work hard for what you want in life. That your word is your bond and you do what you say and keep your promise. That you treat people with respect. Show the values and morals in in the daily life. That is the lesson that we continue to pass on to our son. | |
We need to pass those lessons on to the many generations to follow. [Cheering] Because we want our children in these nations to know that the only limit to your achievement is the strength of your dreams and your willingness to work for them. |
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 github import Github, EmptyRepositoryException | |
import datetime | |
import time | |
import argparse | |
def main(username, password, organization): | |
g = Github(username, password, timeout=1) | |
org = g.get_organization(organization) | |
file_set = set() |
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
var cheerio = require('cheerio') | |
, request = require('request'); | |
var example_url = 'http://boston.craigslist.org/gbs/sub/3779053559.html'; | |
var parsePage = function(url, callback){ | |
request(url, function(err, resp, body) { | |
if (err){ | |
callback(err); | |
return |
NewerOlder