Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| name := "project" | |
| version := "1.0" | |
| scalaVersion := "2.9.1" | |
| seq(webSettings: _*) | |
| // If using JRebel | |
| scanDirectories := Nil |
| package models | |
| import akka.actor._ | |
| import akka.util.duration._ | |
| import play.api._ | |
| import play.api.libs.json._ | |
| import play.api.libs.iteratee._ | |
| import play.api.libs.concurrent._ |
| class Graph(dict) | |
| def __init__(self, v=[], es=[]) | |
| """create a ew graph. (vs) is a list of vertices, (es) is a list of of edges""" | |
| for v in vs: | |
| self.add_vertex(v) | |
| for e in es: | |
| self.add_edge(e) | |
| def add_vertex(self, v): |
| package com.gumtrail; | |
| import android.R; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.widget.TextView; | |
| import android.app.Fragment; | |
| belongs_to :user | |
| has_many :categorizations | |
| has_many :categories, :through => :categorizations | |
| # accepts_nested_attributes_for :categories, | |
| # :reject_if => lambda { |a| a[:content].blank? }, | |
| # :allow_destroy => true |
| class Categorization < ActiveRecord::Base | |
| attr_accessor :category_name | |
| belongs_to :product | |
| belongs_to :category | |
| def category_name | |
| category.try(:name) | |
| end |
| #!/usr/bin/python | |
| ''' | |
| InFB - Information Facebook | |
| Usage: infb.py user@domain.tld password | |
| http://ruel.me | |
| Copyright (c) 2011, Ruel Pagayon | |
| All rights reserved. |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| web: python app.py runserver |
| package com.example | |
| import unfiltered.request._ | |
| import unfiltered.response._ | |
| import unfiltered.netty._ | |
| /** Asynchronous plan that gets the time in a ridiculous fashion. | |
| * (But imagine that it's using a vital external HTTP service to | |
| * inform its response--this is a fine way to do that.) */ |