Skip to content

Instantly share code, notes, and snippets.

View tspannhw's full-sized avatar
💭
Unstructured Data, Vector Database, Cloud, AI, Edge, Streaming, SQL

Timothy Spann tspannhw

💭
Unstructured Data, Vector Database, Cloud, AI, Edge, Streaming, SQL
View GitHub Profile
@brikis98
brikis98 / Average page views by industry
Created November 2, 2011 03:57
Apache Pig Script Example
pv_by_industry = GROUP profile_view by viewee_industry_id
pv_avg_by_industry = FOREACH pv_by_industry
GENERATE group as viewee_industry_id, AVG(profie_view) AS average_pv;
@emk
emk / apache-logs-hive.sql
Created January 3, 2012 18:01
Apache log analysis with Hadoop, Hive and HBase
-- This is a Hive program. Hive is an SQL-like language that compiles
-- into Hadoop Map/Reduce jobs. It's very popular among analysts at
-- Facebook, because it allows them to query enormous Hadoop data
-- stores using a language much like SQL.
-- Our logs are stored on the Hadoop Distributed File System, in the
-- directory /logs/randomhacks.net/access. They're ordinary Apache
-- logs in *.gz format.
--
-- We want to pretend that these gzipped log files are a database table,
@groundwater
groundwater / HBaseTest.scala
Created April 20, 2012 09:32
HBase Coprocessor Test with Mocked HTableInterface and CoprocessorEnvironment
import org.specs2.mutable._
import org.specs2.mock._
import ca.underflow.MyApp
import org.apache.hadoop.hbase.util.Bytes
import org.apache.hadoop.hbase.CoprocessorEnvironment
import org.apache.hadoop.hbase.client.{ HTableInterface, Put }
class HelloWorldSpec extends Specification with Mockito {
@darwin
darwin / index.html
Last active May 1, 2022 20:40
Welcome to comix!
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">A Comix Sample</tspan>
</label>
<actor t="translate(131,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59">
@willurd
willurd / web-servers.md
Last active November 18, 2025 14:46
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@edmonds
edmonds / dnstap.txt
Last active February 29, 2024 16:55
example formatted output from dnstap command-line tool
21:08:07.858612 CQ 127.0.0.1 UDP 40b "dnstap.info." IN A
21:08:07.858604 RQ 192.5.5.241 UDP 28b "." IN NS
21:08:07.872825 RR 192.5.5.241 UDP 857b "." IN NS
21:08:07.872825 RQ 192.5.5.241 UDP 40b "dnstap.info." IN A
21:08:07.901990 RR 192.5.5.241 UDP 686b "dnstap.info." IN A
21:08:07.901990 RQ 199.254.49.1 UDP 40b "dnstap.info." IN A
21:08:07.964484 RR 199.254.49.1 UDP 596b "dnstap.info." IN A
21:08:07.964484 RQ 192.5.5.241 UDP 48b "ns7.dnsmadeeasy.com." IN AAAA
21:08:07.964484 RQ 192.5.5.241 UDP 48b "ns7.dnsmadeeasy.com." IN A
21:08:07.979984 RR 192.5.5.241 UDP 743b "ns7.dnsmadeeasy.com." IN AAAA
@thom-nic
thom-nic / cx_oracle_instructions.md
Created July 16, 2013 19:14
Installing CX Oracle for Python & Mac OS X. Instructions exist around the web, but they seem to be piecemeal and incomplete.
@sankars
sankars / coprocessor.rb
Created August 12, 2013 11:15
Hbase shell commands to load/unload coprocessors
## To load
disable 'Table'
alter 'Table', METHOD => 'table_att', 'COPROCESSOR' => '/path/to/coprocessors.jar|com.org.xxxx.Coprocessorclass|3|'
enable 'Table'
## To check coprocessor is loaded
describe 'Table'
@hofmannsven
hofmannsven / README.md
Last active October 2, 2025 20:17
Git CLI Cheatsheet
@mapmeld
mapmeld / southwest.json
Created October 13, 2013 18:22
Southwest Airlines free in-flight tracker data at http://getconnected.southwestwifi.com/current.json
{"wth_fc1_icon": "", "orig_code": "HOU", "headingAbbrStr": "W", "altitude_f": "38 002 ft", "altitude_m": "11 583 m", "wth_fc2_lowf": "61", "wth_fc3_condition": "Sunny", "wth_fc4_condition": "Sunny", "image_white": "night_partly_cloudy_white.png", "wth_fc3_dow": "Mon", "gspeed_m": "457 mph", "wth_tempf": "64", "ttg": "223", "lochist": [["29.645419", "-95.278889"], ["32.573", "-108.072"], ["33.176", "-111.203"], ["33.222", "-111.456"], ["33.279", "-111.772"], ["33.502", "-112.582"], ["33.634", "-113.021"], ["33.689", "-113.206"], ["33.708", "-113.268"], ["33.743", "-113.391"], ["33.780", "-113.515"], ["33.798", "-113.577"], ["33.817", "-113.640"], ["33.852", "-113.764"], ["33.870", "-113.827"], ["33.907", "-113.953"], ["33.943", "-114.079"], ["33.961", "-114.142"], ["33.979", "-114.204"], ["33.997", "-114.268"], ["34.015", "-114.330"], ["34.032", "-114.393"], ["34.050", "-114.456"], ["34.068", "-114.520"]], "gspeed_k": "736 km/h", "wth_fc2_highc": "25", "dest_code": "LAX", "wth_fc4_highf": "94", "wth_fc2_highf"