Skip to content

Instantly share code, notes, and snippets.

Boston Spark Community Updates

  • This is Event #7 for this Meetup.
  • 850+ members; Meetup started in May 2014. Recently had our 1 year anniversary.
  • Speakers: We want you!
    • Feature talks or Lighting talks
  • Sponsors: You want us!
  • Host an event, pay for food and drink, or cover other event costs.
import asyncio
@asyncio.coroutine
def shleepy_time(seconds):
print("Shleeping for {s} seconds...".format(s=seconds))
yield from asyncio.sleep(seconds)
print("Done shleeping.")

Boston Spark Community Updates

  • This is Event #4 for this Meetup.
  • 570+ members; Meetup started in May 2014.
  • New talk format: Lightning Talks
    • 30 seconds to 5 minutes maximum.
    • Any topic relating to Spark.
  • Any skill or experience level--beginners welcome!

Boston Spark Community Updates

  • This is Event #3 for this Meetup.
  • 450+ members; Meetup started in May 2014.
  • New talk format: Lightning Talks
    • 30 seconds to 5 minutes maximum.
    • Any topic relating to Spark.
    • Any skill or experience level--beginners welcome!
  • Speakers: We want you!
@nchammas
nchammas / centos-spark-setup.sh
Created January 21, 2015 03:05
CentOS-based Spark development image
yum install -y java-1.7.0-openjdk-devel gcc gcc-c++ ant git
yum install -y wget tar unzip time
yum install -y python-devel
curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | python -
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python -
easy_install pip
@nchammas
nchammas / timer.sh
Last active August 29, 2015 14:08 — forked from esoupy/Timer.sh
A simple timer / stopwatch implemented as a bash function.
#!/bin/bash
# Display the duration between timer start and stop.
#
# Usage: timer {start|stop} [format]
#
# Example:
#
# timer start
# <script_commands>
@nchammas
nchammas / foldable date functions.sql
Created May 29, 2012 05:24
Date functions like GETDATE() and SYSUTCDATETIME() are folded by the optimizer.
SET NOCOUNT ON;
USE [tempdb];
GO
-- Try substituting GETDATE() for SYSUTCDATETIME() everywhere in this script
-- and you will get the same results.
CREATE TABLE a_table (
an_integer INT DEFAULT (1)
, a_string CHAR(10) DEFAULT ('ohmigodwut')
@nchammas
nchammas / child_parent_update_locking_demo.sql
Created March 23, 2012 15:52
Updating child row does not lock parent row in SQL Server
-- Tested on SQL Server 2008 R2
-- Isolation level is READ COMMITTED
--
-- Session 1
--
CREATE TABLE dbo.parent (
parent_id INT NOT NULL PRIMARY KEY
, value VARCHAR(50) NOT NULL
);
@nchammas
nchammas / TRUNCATE and DROP are both minimally logged.sql
Created November 8, 2011 21:32
Demonstration that TRUNCATE and DROP are logged and just as fast as one another.
SET NOCOUNT ON;
USE [tempdb];
CREATE TABLE a_farting_farthing (
an_integer INT DEFAULT (1)
);
INSERT INTO a_farting_farthing
DEFAULT VALUES;
@nchammas
nchammas / identity overflow check.sql
Created October 13, 2011 21:13
SQL Server IDENTITY overflow check
-- Author: Nicholas Chammas
-- Turbine / WB Games
-- 2011/10/13
-- Inspired by: http://vyaskn.tripod.com/sql_server_check_identity_columns.htm
-- Purpose: Find all IDENTITY columns on all databases on this instance
-- and show how much of their range they have exhausted.
--
-- CAVEATS
--
-- 1. Developed using SQL Server 2008 syntax.