EMPMYMIP seems to mostly kind of work for me. It might even do the same for you!
The implementation is kind of a huge hack, though, and it might very well
from math import sqrt | |
phi = (1 + sqrt(5))/2 | |
resphi = 2 - phi | |
# a and b are the current bounds; the minimum is between them. | |
# c is the center pointer pushed slightly left towards a | |
def goldenSectionSearch(f, a, c, b, absolutePrecision): | |
if abs(a - b) < absolutePrecision: | |
return (a + b)/2 | |
# Create a new possible center, in the area between c and b, pushed against c |
require 'formula' | |
# This formula for Python 2.6.4 | |
# Based on Python 2.7.1 formula at: | |
# https://github.com/mxcl/homebrew/blob/master/Library/Formula/python.rb | |
class Distribute < Formula | |
url 'http://pypi.python.org/packages/source/d/distribute/distribute-0.6.24.tar.gz' | |
md5 '17722b22141aba8235787f79800cc452' | |
end |
Apple has provided two very simple ways to change the default python on OS X 10.6 Snow Leopard and 10.7 Lion. It's all detailed in the Apple man page for python(1): | |
$ man python | |
$ which python | |
/usr/bin/python | |
$ python -V | |
Python 2.7.1 | |
# | |
# temporarily change version | |
# |
../configure --enable-unicode --enable-debug --disable-shared --with-osx_cocoa --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.5 |
# This LOOKS pretty straightforward, but it took awhile to sort out issues with | |
# py2cairo and pygobject, so I hope I've saved you some time :-) | |
# | |
# This assumes you already subscribe to a nice clean virtualenvwrapper workflow | |
# -- see https://gist.github.com/771394 if you need advice on getting there. | |
# There are some optional dependencies omitted, so if you're going to be doing | |
# heavy development with these libs, you may want to look into them. | |
# | |
# We go to some configure option pains to avoid polluting the system-level | |
# Python, and `brew link`ing Cairo which is keg-only by default. |
""" | |
Simple stupid utility to create RSA or DSA key keys | |
Just add the JSCH library to your classpath and things ought to work. | |
(JY25)~/Downloads > export CLASSPATH=./jsch-0.1.42.jar | |
(JY25)~/Downloads > jython | |
*sys-package-mgr*: processing new jar, '/Users/victorng/Downloads/jsch-0.1.42.jar' | |
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) | |
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_29 |
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
sudo apt-get update | |
sudo apt-get upgrade | |
#!/bin/bash | |
# node.js using PPA (for statsd) | |
sudo apt-get install python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install git to get statsd | |
sudo apt-get install git |
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
# NEW WAY / EASY WAY | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.6.deb | |
sudo dpkg -i elasticsearch-0.20.6.deb |