Skip to content

Instantly share code, notes, and snippets.

"""
Fetches an umlgraph from a github wikipage and converts it into a
png using graphviz and UMLGraph.
The script searches on a given page for a pre+code compbination with the class
"uml", which is then converted into a png file.
Requirements:
* BeautifulSoup
* graphviz
@asenchi
asenchi / python.pp
Created February 20, 2010 14:56
Puppet manifest for installing Python and modules using pip
# Copyright (c) 2010 Curt Micol <[email protected]>
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# THE SOFTWARE IS PROVIDED 'AS IS' AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
@jmillerinc
jmillerinc / angel_sim.py
Created April 27, 2010 10:34
Monte Carlo simulation of the payoffs to angel investing
#!/usr/bin/python
#
# Monte Carlo simulation of the payoffs to angel investing.
#
# Assume a pool of N different investors, each investing in D deals,
# with a fixed time horizon and a fixed distribution of payoffs.
# Randomly simulate each investor's total payoff, then compute the
# mean and std dev of all IRRs in the overall pool.
#
# This gives an individual angel an idea of what kind of payoff &
@jacqui
jacqui / field.rb
Created June 3, 2010 13:58
Using embedded documents to store field data
class Field
include MongoMapper::EmbeddedDocument
key :name, String
key :label, String, :required => true
key :helper_text, String
key :required, Boolean, :default => false
key :widget, String, :required => true
key :options, Array # => [[value, label], [value, label], [value, label]]
key :selected, String
@joninvski
joninvski / bellman.py
Created November 16, 2010 11:31
Bellman ford python implementation
import pdb
"""
The Bellman-Ford algorithm
Graph API:
iter(graph) gives all nodes
iter(graph[u]) gives neighbours of u
graph[u][v] gives weight of edge (u, v)
"""
@mimeoconnect
mimeoconnect / CSS Polaroid Photo Layout
Created February 12, 2011 01:01
This provides a CSS template for layout out photos on a page and using for a print photo book.
<style type="text/css">
body{
background-color: #000;
}
#container{
width: 600px; margin: 40px auto;
}
ul.gallery {
@nstielau
nstielau / default.rb
Created May 18, 2011 16:22
A simple Chef recipe to install Jenkins
#
# Cookbook Name:: jenkins
# Recipe:: default
#
# https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
# This is super-simple, compared to the other Chef cookbook I found
# for Jenkins (https://github.com/fnichol/chef-jenkins).
#
# This doesn't include Chef libraries for adding Jenkin's jobs via
@chrisjacob
chrisjacob / README.md
Created September 1, 2011 12:08
Node.js Install + CoffeeScript + LESS (+TextMate Bundles)
@aemkei
aemkei / LICENSE.txt
Created October 27, 2011 17:16 — forked from 140bytes/LICENSE.txt
Lorenz Attractor - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@christophermanning
christophermanning / README.mkd
Last active August 28, 2023 00:46
Hamiltonian Graph Builder
<style type="text/css">p {text-align:center;width: auto}</style>

Created by Christopher Manning

Gallery

Axle Eight Fibbobaci Florets [![Star]