Skip to content

Instantly share code, notes, and snippets.

@aflaxman
aflaxman / gist:287370
Created January 26, 2010 23:34
networkx-osm import open street map data as a networkx graph
"""
Read graphs in Open Street Maps osm format
Based on osm.py from brianw's osmgeocode
http://github.com/brianw/osmgeocode, which is based on osm.py from
comes from Graphserver:
http://github.com/bmander/graphserver/tree/master and is copyright (c)
2007, Brandon Martin-Anderson under the BSD License
"""
@mbostock
mbostock / .block
Last active April 23, 2024 12:30
Hierarchical Edge Bundling
license: gpl-3.0
height: 960
border: no
redirect: https://observablehq.com/@d3/hierarchical-edge-bundling
@phillro
phillro / gist:1193227
Created September 4, 2011 17:59
Elasticsearch autocomplete example with cross origin resource sharing
<html>
<head>
<link rel="stylesheet" href="/examples/stylesheets/ui-lightness/jquery-ui-1.8.16.custom.css" type="css">
<script type="text/javascript" src="/examples/javascripts/jquery.min.js"></script>
<script type="text/javascript" src="/examples/javascripts/jquery.base64.min.js"></script>
<script type="text/javascript" src="/examples/javascripts/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="/examples/javascripts/jquery.tmpl.min.js"></script>
</head>
<body>
@jedi4ever
jedi4ever / gist:1216529
Created September 14, 2011 13:20
Quick gist on getting vsphere and vcenter and fog/vsphere going
Quick gist on getting vsphere and vcenter and fog/vsphere going
# Things to download
- Download free evaluation version of window 2008
- Download free evaluation of esxi v5
- Download free evaluation of esxi vsphere (control center) iso
# Install esxi in vmware fusion
1)Install esxi in vmware (select vmware/esx as host)
create a user root/pipopopo
@vanquishregret
vanquishregret / install_python.sh
Created November 17, 2011 04:25 — forked from jgumbley/install_python.sh
setup python 2.7.2 on CENTOS 5.* server
# wget -O install_python.sh https://gist.github.com/raw/777001/install_python.sh
# chmod +x install_python.sh
# ./install_python.sh
#!/bin/sh
echo "******************************************"
echo "Configure Centos box with a recent version"
echo "of Python. "
echo " - jgumbley 12/jan/11"
@diogojc
diogojc / cf.py
Created December 28, 2011 23:10
Regression based collaborative filtering
import numpy as np
from scipy.optimize import fmin_cg
def cost(p, Y, R, alpha):
"""
Calculates collaborative filtering cost function.
Arguments
@handyman5
handyman5 / add_to_cobbler.py
Created March 19, 2012 19:54
Use of the Cobbler API
cobbler_api = ServerProxy("http://cobbler/cobbler_api")
token = cobbler_api.login("USERNAME", "PASSWORD")
asset_list = ["server01", "server02"]
for system in asset_list:
print "Managing system %s" % system
print "System name is %s" % a
try:
handle = cobbler_api.get_system_handle(a, token)
@stoermerjp
stoermerjp / dronemapper_buildgdalmosaic.sh
Created July 12, 2012 13:30
DroneMapper.com: Basic Geo-referenced Mosaic Construction w/ GDAL (projection)
#!/bin/bash
###
### JP Stoermer
### DroneMapper.com
###
### Clean up
rm -rf ./*._tif
rm -rf ./mosaic.tif
@amueller
amueller / ml_with_sklearn_notebook.ipynb
Created October 29, 2012 15:55
Teaser on machine learning with scikit-learn
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jimfdavies
jimfdavies / test-vsphere.rb
Last active September 28, 2018 14:06
Quick example for Fog VSphere provider. Lists VMs in a given folder in a given DC.
#!/usr/bin/env ruby
require 'rubygems'
require 'pp'
require 'fog'
require 'highline/import'
def get_password(prompt="Enter password:")
ask(prompt) {|q| q.echo = false}
end