Skip to content

Instantly share code, notes, and snippets.

View smartkiwi's full-sized avatar

Vladimir Vladimirov smartkiwi

View GitHub Profile
@smartkiwi
smartkiwi / example.py
Last active February 10, 2016 17:32
Using sentry for debugging spark code running on executirs
from raven import Client
from raven.context import Context
# copy from your project
# in future can be passed with spark app options
dsn="https://[email protected]/34960"
environment="dev"
client = Client(dsn)
def some_mapper_function(e):
@smartkiwi
smartkiwi / example.py
Created February 20, 2016 06:26
Report exceptions to Sentry
import logging
from pyspark import SparkContext, SparkConf, BasicProfiler
from raven import Client
from raven.context import Context
class RavenContextProfiler(BasicProfiler):
raven_client = None
@smartkiwi
smartkiwi / faiss_memory_leak.py
Last active March 4, 2020 21:33
faiss_memory_leak.py
import sys
import faiss
import numpy as np
# import psutil
import os
import platform
import time
@smartkiwi
smartkiwi / init.lua
Created January 25, 2022 04:34
Griffin Powermate Mute with the LED
--- based on https://github.com/cedstrom/powermate-osx
--- https://raw.githubusercontent.com/cedstrom/powermate-osx/main/knob.lua
--- https://github.com/Hammerspoon/Spoons/blob/master/Source/MicMute.spoon/init.lua#L28
hs.loadSpoon("MicMute")
spoon.MicMute:bindHotkeys(
{
toggle = {
{"cmd", "shift"}, "M"