Skip to content

Instantly share code, notes, and snippets.

@finomayato
finomayato / .vimrc
Last active December 23, 2018 12:25
set nocompatible
filetype off
set rtp+=~/.config/nvim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'klen/python-mode'
"""
handler.py
----------
Elasticsearch handler
"""
import logging
class ElasticsearchHandler(logging.Handler):
import tempfile
class ChunkWriter:
pass
class CSVChunkWriter:
def __init__(self, filename=None):
self.filename = filename
if filename:
self.file_ = open(filename, 'wb')
@finomayato
finomayato / binary_adding_machine.c
Created June 17, 2018 00:28
High-level implementation of binary adding machine
#include <stdio.h>
int main() {
unsigned int param_1 = 5, param_2 = 8;
unsigned int sum, carry;
sum = param_1 ^ param_2;
carry = param_1 & param_2;
for (int i = 0; i < sizeof(carry); i ++) {
carry <<= 1;
param_1 = sum;
@finomayato
finomayato / greenhouse_client.py
Created August 16, 2017 15:29
Client for interaction with Greenhouse API
import requests
GREENHOUSE_API_KEY = '<api_key>'
greenhouse_client = None
class GreenhouseClient:
activity_feed_url = ('https://harvest.greenhouse.io/v1/candidates/' +