This file contains hidden or 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
# Detailed explanation at http://hitesh.in/2011/running-a-bottle-py-app-on-dreamhost/ | |
#1. Add current directory to path, if isn't already | |
import os, sys | |
cmd_folder = os.path.dirname(os.path.abspath(__file__)) | |
if cmd_folder not in sys.path: | |
sys.path.insert(0, cmd_folder) | |
import bottle | |
from bottle import route, run |
This file contains hidden or 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 bash | |
# Use this one-liner to produce a JSON literal from the Git log: | |
git log \ | |
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \ | |
$@ | \ | |
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
perl -pe 's/},]/}]/' |
This file contains hidden or 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
""" | |
Redactorjs: http://redactorjs.com/ | |
django-redactorjs: https://github.com/TigorC/django-redactorjs | |
""" | |
from django.contrib import admin | |
from django.contrib.flatpages.models import FlatPage | |
from django.contrib.flatpages.admin import FlatPageAdmin as OldFlatPageAdmin | |
from django.contrib.flatpages.admin import FlatpageForm as OldFlatpageForm |
This file contains hidden or 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
import logging | |
import facepy as facebook | |
from django.conf import settings | |
from django.contrib.auth.signals import user_logged_in | |
from django.db import models | |
from django.contrib.auth import logout | |
from django.contrib.auth.models import User | |
class FBAuthMiddleware(object): | |
def __init__(self): |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
import os | |
import webbrowser | |
from threading import Timer | |
os.environ["DJANGO_SETTINGS_MODULE"] = "webapp.settings" | |
import cherrypy |
This file contains hidden or 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
#!/bin/bash | |
echo "Installing sublime-text2..." | |
sudo add-apt-repository -y ppa:webupd8team/sublime-text-2 | |
sudo apt-get update | |
sudo apt-get -y install sublime-text | |
# patch it | |
# http://menteleal.blogspot.com.ar/2012/12/sublime-text-2-full-license-key-en.html | |
echo "Applying the medicine..." |
This file contains hidden or 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
// ==UserScript== | |
// @name GitHub IPynb rendering | |
// @namespace ghipynb | |
// @version 0.3.1 | |
// @description Renders raw IPython notebooks on GitHub using nbviewer and Frames! | |
// @license WTFPL | |
// @match *://*.github.com/* | |
// @match *://github.com/* | |
// @match *://gist.github.com/* | |
// @grant none |
This file contains hidden or 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
# iPython Notebook with per-user storage and config | |
# | |
# Based on crosbymichael/ipython | |
# Creates a Docker image with IPython Notebook installed. | |
# | |
# It expects to be run like this: | |
# | |
# docker run -v /home/eduard/notebooks/eduard:/notebooks benthoo/ipython-user | |
# | |
# You provide a folder per user on the host system. This folder will hold the users notebooks and also needs to contain the |
This file contains hidden or 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
import time | |
import re | |
import unicodedata | |
''' | |
listado de palabras que quiero descartar | |
''' | |
pal_comunes = ['los','las','sin','con','tan','por'] | |
lista_categorias = ['lacteos','comestibles','auto','hogar'] | |
lista_productos = ['leche','huevo','aceite','yerba'] |
OlderNewer