View mbox2json.py
import mailbox
import argparse
import os
import json
def main():
parser = argparse.ArgumentParser()
parser.add_argument("mbox", type=str,
help="mbox file")
View vim plugins.md
View vimrc
"=====================================================
" Vundle settings
"=====================================================
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
filetype off " required
call vundle#begin()
Plugin 'gmarik/Vundle.vim' " let Vundle manage Vundle, required
Plugin 'scrooloose/syntastic'
View amname.sql
25743 (master) =# SELECT amname,opfname FROM pg_opfamily JOIN pg_am ON (pg_am.oid=pg_opfamily.opfmethod) ORDER BY amname;
Timing is on.
Time: 1.320 ms
┌────────┬───────────────────────┐
│ amname │ opfname │
├────────┼───────────────────────┤
│ brin │ bit_minmax_ops │
│ brin │ reltime_minmax_ops │
│ brin │ interval_minmax_ops │
View test.py
#!/usr/bin/env python
# ./test.py --test-file test_labels.csv --bayes-file NaiveBayes_pred.csv --log-file LogisticRegression_pred.csv
#
import argparse
import sys
labels = []
bayes = []
View psqlrc
\set QUIET 1
-- formatting
\x auto
\set VERBOSITY verbose
\set ON_ERROR_ROLLBACK interactive
-- show execution times
\timing
-- limit paging
\pset pager off
View cloudstack.py
# https://gist.github.com/vincentbernat/952e0ada1333f0e0a69f/
# https://www.dreamhost.com/blog/2015/09/22/how-to-launch-instances-using-python-and-apache-libcloud/
import os
import pytest
import cs
import hashlib
import time
import socket
import io
View Makefile
TEST = memtester
PKG_REQUIRED = memtester
LOOP = 1
AMOUNT != sysctl -n hw.physmem
REGRESS_LOG = ${.CURDIR}/${TEST}-`date +%Y-%m-%d-%MM-%SS`.log
REGRESS_TARGETS = run-regress-test-memtester
run-regress-test-memtester:
echo "Total RAM: ${AMOUNT}"
View bsd.autotest.mk
ARCH!=uname -m
DATE!=date +%Y-%m-%d_%H-%M
HOSTNAME!=hostname
CLEANFILES+=*.log
REGRESS_DIR ?= /home/sergeyb/source/openbsd-tests
_SHSCRIPT = sh ${REGRESS_DIR}/infrastructure/bin
# See http://www.openbsd.org/report.html
# TODO: packages version