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 collector.model.meta import Base | |
# Using SQLAlchemy 0.5 optional declarative syntax | |
# More info here: http://pylonshq.com/docs/en/0.9.7/models/ | |
# and here: http://pylonshq.com/pasties/1000 | |
class Keyphrases(Base): | |
__tablename__ = "keyphrases" | |
__table_args__ = {'schema':'algo'} |
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
python -m smtpd -n -c DebuggingServer localhost:1025 |
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
def __before__(self): | |
self.q = Session.query(Keyphrases) | |
@jsonify | |
def index(self): | |
"""GET /keyphrases: All items in the collection""" | |
# url('keyphrases') | |
result = [] |
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 sqlalchemy import * | |
from migrate import * | |
from sqlalchemy.ext.declarative import declarative_base | |
meta = MetaData(migrate_engine) | |
Base = declarative_base(metadata=meta) | |
class Pageviews(Base): | |
__tablename__ = "pageviews" |
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
# Find connection string from config | |
eng = meta.engine | |
conn = str(eng).lstrip('Engine(').rstrip(')') |
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
#!/bin/sh | |
# lowerit | |
# convert all file names in the current directory to lower case | |
# only operates on plain files--does not change the name of directories | |
# will ask for verification before overwriting an existing file | |
# Copied from: | |
# http://www.linuxjournal.com/content/convert-filenames-lowercase | |
for x in `ls` |
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
require 'rubygems' | |
require 'open-uri' | |
require 'aws/s3' | |
require 'json' | |
AWS::S3::Base.establish_connection!( | |
:access_key_id => '', | |
:secret_access_key => '' | |
) |
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
require "test/unit" | |
require "rubygems" | |
require "sauce" | |
# This should go in your test_helper.rb file if you have one | |
Sauce.config do |config| | |
config.browser_url = "http://www.suite101.com/" | |
config.browsers = [ | |
#["Linux", "firefox", "3.6."], | |
["Windows 2003", "firefox", "3.6."] |
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
# Setup Git completion | |
source ~/.git-completion.bash | |
# Define bash colours | |
source ~/.bash_colors.bash | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
# aliases |
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
colorscheme darkblue | |
set guifont=Menlo:h14 | |
set gcr=n:blinkon0 | |
autocmd vimenter * NERDTree |
OlderNewer