Skip to content

Instantly share code, notes, and snippets.

View JohnCEarls's full-sized avatar

John C. Earls JohnCEarls

View GitHub Profile
@bllchmbrs
bllchmbrs / Pyspark_ipython_startup.py
Last active August 29, 2015 14:18
Pyspark IPython Start up File
import os
import sys
spark_home = os.environ.get('SPARK_HOME', None)
# check if it exists
if not spark_home:
raise ValueError('SPARK_HOME environment variable is not set')
# check if it is a directory
@keo
keo / bootstrap.sh
Last active January 25, 2024 15:49
Setup encrypted partition for Docker containers
#!/bin/sh
# Setup encrypted disk image
# For Ubuntu 14.04 LTS
CRYPTFS_ROOT=/cryptfs
apt-get update
apt-get -y upgrade
apt-get -y install cryptsetup
@lebedov
lebedov / test_pinned_prealloc.py
Created November 8, 2012 02:48
Compare performance of using preallocated pinned and unpinned host memory
#!/usr/bin/env python
"""
Compare performance of using pinned and unpinned host memory.
"""
import numpy as np
import pycuda.autoinit
import pycuda.driver as drv