Skip to content

Instantly share code, notes, and snippets.

https://github.com/tdunning/MiA/blob/mahout-0.7/src/main/java/mia/clustering/ch07/SimpleKMeansClustering.java#L24
@terrancesnyder
terrancesnyder / gist:5565050
Created May 12, 2013 21:52
hbase shell commands
# create our table
create 'impressions', { NAME => 'event', COMPRESSION => 'LZO' }
# see what's inside it
describe 'impressions'
# add some data
put 'impressions', '20130512', 'event:type', 'click'
put 'impressions', '20130512', 'event:ad', '1234'
put 'impressions', '20130512', 'event:campaign', '9283372'
@terrancesnyder
terrancesnyder / charts.js
Created April 4, 2013 01:40
Google Charts for C/I
function drawVisualization() {
// Create and populate the data table.
// sum total distinct rows and then take each group % of share of total distinct
var data = google.visualization.arrayToDataTable([
['Year', 'Group A', 'Group B', 'Group C', 'Group D'],
['Group A', 100, 100, 100, 100],
['Group B', 100, 100, 100, 100],
]);
// Create and draw the visualization.
@terrancesnyder
terrancesnyder / auto
Created March 31, 2013 18:50
Automated install of Ubuntu
http://askubuntu.com/questions/183132/automated-installation-using-preseeding-from-url-failed-from-within-virtualbox
@terrancesnyder
terrancesnyder / install.cmd
Last active December 15, 2015 08:59
VeeWee Windows 7
# install ruby http://rubyinstaller.org/downloads/
http://rubyforge.org/frs/download.php/76798/rubyinstaller-1.9.3-p392.exe
# download and configure devkit for windows @http://rubyinstaller.org/downloads/
https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe
cd <DEVKIT_INSTALL_DIR>
ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
@terrancesnyder
terrancesnyder / web.config
Created February 14, 2013 01:10
Example WCF config for content type negotation with JSON/XML AND SOAP
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="Service.HelloWorldService" behaviorConfiguration="wsdl">
<endpoint address="soap" binding="basicHttpBinding" contract="Service.IHelloWorldService" />
<endpoint address="xml" binding="webHttpBinding" behaviorConfiguration="restBehavior" contract="Service.IHelloWorldServicee" />
@terrancesnyder
terrancesnyder / hadoop.sh
Created February 8, 2013 23:12
Example of hadoop bash init.d
#!/bin/bash
#
#
# Starts a Hadoop Master
#
# chkconfig: 2345 90 10
# description: Hadoop master
. /etc/rc.d/init.d/functions
@terrancesnyder
terrancesnyder / hadoop-defaults
Created February 7, 2013 13:36
Default ports for hadoop
http://10.192.25.122:50070/dfshealth.jsp
http://10.192.25.122:50030/jobtracker.jsp
http://10.192.25.122:50060/tasktracker.jsp
@terrancesnyder
terrancesnyder / gist:4730959
Created February 7, 2013 13:35
Convert all files from dos to Unix
find . -name "*" -type f -exec dos2unix {} \;