Skip to content

Instantly share code, notes, and snippets.

View carlosescri's full-sized avatar

Carlos Escribano carlosescri

View GitHub Profile
@carlosescri
carlosescri / xls2csv
Created October 21, 2013 11:17
Requires the xlrd library to read Excel 97 .xls files.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from os import path
from optparse import OptionParser
from xlrd import open_workbook
@carlosescri
carlosescri / gist:6363927
Created August 28, 2013 09:11
Create a datetime from a string in a given format.
import time
from datetime import datetime
def str_to_datetime(str_date, str_format="%Y-%m-%d %H:%M"):
""" Creates a datetime from a string in a given format. """
dt = time.strptime(str_date, str_format)
dt = time.mktime(dt)
@carlosescri
carlosescri / gist:5848477
Created June 24, 2013 08:10 — forked from paulirish/gist:2926904
SublimeLinter User Config (from Paul Irish)
{
"// my options for SublimeLinter " : "//",
"jshint_options" : {
"boss": true,
"browser": true,
"curly": false,
"devel": true,
"eqeqeq": false,
"eqnull": true,
"expr": true,