Skip to content

Instantly share code, notes, and snippets.

@kern
kern / save-sqs-queue.py
Created February 22, 2016 20:59
Saves all messages from an AWS SQS queue into a folder
import argparse
import boto.sqs
import json
import os
parser = argparse.ArgumentParser(description='Saves all messages from an AWS SQS queue into a folder.')
parser.add_argument(
'-q', '--queue', dest='queue', type=str, required=True,
help='The name of the AWS SQS queue to save.')
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:Qmbbi1towwdoMfTpQPZPqbcFTGQFVoDk51hewka2qLuVVS ✅
Create your profile today to start building social connection and trust online at https://3Box.io/

Kubernetes + AWS ECR = ❤️

Makefile and YAML templates for automating the use of AWS Elastic Container Registry with Kubernetes.

Based off of this awesome Redsaid blog post.

Requirements

  • Amazon ECR, along with your AWS account ID and the region your ECR is in
  • AWS CLI

Startup@Berkeley Posting Guidelines

Anything relating to startups, entrepreneurship, innovation, technology, hacking, design, business, or related fields is fair game for discussion in the group. The focus is on the Bay Area and Berkeley specifically, so please make sure events are accessible to students at UC Berkeley.

We require that all posts must be approved by moderators to maintain a high standard of content. Comment as much as you'd like, however!

  • First and foremost, be kind to one another.
  • Please don't post job listings. This is not a recruiting platform. You may, however, recruit for your campus organization.
  • Moderators may remove posts and comments that are of low quality or are deemed harmful to the community.
  • Avoid prejudice in all its forms. Racism, sexism, homophobia, and any other demeaning behavior will not be tolerated.

Keybase proof

I hereby claim:

  • I am kern on github.
  • I am alexkern (https://keybase.io/alexkern) on keybase.
  • I have a public key whose fingerprint is 1EAE 7AA9 B3A6 8788 F601 48E8 86E2 0E73 35B2 9F6F

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am kern on github.
  • I am alexkern (https://keybase.io/alexkern) on keybase.
  • I have a public key whose fingerprint is 1EAE 7AA9 B3A6 8788 F601 48E8 86E2 0E73 35B2 9F6F

To claim this, I am signing this object:

@kern
kern / tensorflow-cuda-30.patch
Last active August 22, 2016 05:08
Patch to allow TensorFlow to run on CUDA Compute 3.0
diff --git a/tensorflow/core/common_runtime/gpu/gpu_device.cc b/tensorflow/core/common_runtime/gpu/gpu_device.cc
index 26d3464..286123f 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_device.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_device.cc
@@ -607,7 +607,7 @@ void BaseGPUDeviceFactory::GetValidDeviceIds(std::vector<int>* ids) {
}
// Only consider GPUs with compute capability >= 3.5 (Kepler or
// higher)
- if (major < 3 || (major == 3 && minor < 5)) {
+ if (major < 3 /*|| (major == 3 && minor < 5)*/) {
@kern
kern / README.md
Last active January 6, 2016 02:09
TensorFlow + CUDA 7.0 AWS g2 instance installation script.

First, install all of TensorFlow and CUDA's dependencies:

$ # When prompted: Keep the local version currently installed
$ curl https://gist.githubusercontent.com/kern/ab56600768b9f4fc1f72/raw/8d0b86a678d1398be2b82ac6e4ab1f8ad0698f01/install_deps.sh | sh

Wait for reboot, then run:

$ # When prompted: Scroll all the way down > accept > y > y > y > default (/usr/local/cuda-7.0) > y > n
$ curl https://gist.githubusercontent.com/kern/ab56600768b9f4fc1f72/raw/8d0b86a678d1398be2b82ac6e4ab1f8ad0698f01/install_nvidia.sh | sh

$ curl https://gist.githubusercontent.com/kern/ab56600768b9f4fc1f72/raw/8d0b86a678d1398be2b82ac6e4ab1f8ad0698f01/install_tensorflow.sh | sh

@kern
kern / slow_virtus_spec.rb
Created October 17, 2012 10:05
How would you test Person in isolation?
require "virtus"
require "rspec/autorun"
class Address < Virtus::Attribute::Object
primitive String
def coerce(value)
# Simulate a slow call to an external service that normalizes the
# address's format.
sleep 1
@kern
kern / gist:1910457
Created February 25, 2012 20:32
Problem Report for iWebInspector (XCode 4.3, Lion)
Process: iWebInspector [83536]
Path: /Applications/iWebInspector.app/Contents/MacOS/iWebInspector
Identifier: mobi.firt.iWebInspector
Version: 0.9 (1)
Code Type: X86-64 (Native)
Parent Process: launchd [300]
Date/Time: 2012-02-25 12:28:36.535 -0800
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9