Skip to content

Instantly share code, notes, and snippets.

View tschoonj's full-sized avatar

Tom Schoonjans tschoonj

View GitHub Profile
@mattupstate
mattupstate / put-s3-bucket-notification-configuration
Last active January 11, 2022 03:31
Example of how to configure S3 bucket notifications from the command line
#!/usr/bin/env python
import argparse
import sys
try:
import boto3
except ImportError:
print('Please install boto3 to use this tool')
sys.exit(1)
@jrprice
jrprice / kernel.metal
Last active August 6, 2020 09:29
Comparison of trivial vector addition in Metal and OpenCL
#include <metal_stdlib>
using namespace metal;
kernel void vecadd(const device float *a [[buffer(0)]],
const device float *b [[buffer(1)]],
device float *c [[buffer(2)]],
uint i [[thread_position_in_grid]])
{
c[i] = c[i] + a[i] + b[i];
}