Skip to content

Instantly share code, notes, and snippets.

View pvarsh's full-sized avatar

Peter Varshavsky pvarsh

View GitHub Profile
@pvarsh
pvarsh / README.md
Last active October 30, 2026 21:01
Getting started with Circuit Python on Circuit Playground Bluefruit

Setting up Circuit Python

The best way to get started is to follow instructions on https://learn.adafruit.com/adafruit-circuit-playground-bluefruit/overview

If you haven't used the board before it probably has an outdated boot loader version. Follow instructions to update the boot loader, install Circuit Python and libraries.

adafruit_circuitplayground library is a great way to get started, but is pretty limited. I recommend working through all of the pages on https://learn.adafruit.com/adafruit-circuit-playground-bluefruit/creating-and-editing-code including

@pvarsh
pvarsh / .vimrc
Created February 6, 2019 19:19
.vimrc
"""" Basic Behavior
set number " show line numbers
set relativenumber " show relative line numbers
set wrap " wrap lines
set encoding=utf-8 " set encoding to UTF-8 (default was "latin1")
set lazyredraw " redraw screen only when we need to
set showmatch " highlight matching parentheses / brackets [{()}]
set laststatus=2 " always show statusline (even with only single window)
set ruler " show line and column number of the cursor on right side of statusline
Name Age
Jesus 2016
@pvarsh
pvarsh / .bashrc
Created December 22, 2015 13:55
CSV Row Count
alias csvrowcount='for i in `find . -name "*.csv"`; do echo "$i"; csvstat --count $i; done'
alias csvfilecount='find . -name "*.csv" | wc -l'
@pvarsh
pvarsh / csv_decorator.py
Created November 20, 2015 01:25
Decorator: csv reader
import csv
import string
def make_csv():
with open('data.csv', 'wb') as fh:
writer = csv.writer(fh)
for i in range(10):
writer.writerow([i, string.lowercase[i:i+5]])
def process_line(line):
@pvarsh
pvarsh / .vimrc
Last active August 29, 2015 14:21
My rcs
" Syntax highlighting
syntax on
filetype indent plugin on
" ghlight lines over 79 columns (PEP8)
highlight OverLength ctermbg=red ctermfg=white guibg=#351818
match OverLength /\%79v.\+/
" Convert tabs to 4 spaces
set tabstop=4
### Removes all rows that are identically ''
import parsekit
class FilterEmptyRows(parsekit.Step):
def run(self, record, metadata):
criterion = {'', None}
if not set(record).issubset(criterion):
return record, metadata
from datetime import datetime
import parsekit
class FilterRows(parsekit.Step):
start_row = parsekit.Argument(
"The row to start emitting from.",
required=True,
type=int)
import parsekit
class FilterEmptyRows(parsekit.Step):
def run(self, record, metadata):
criterion = {'', None}
if not set(record).issubset(criterion):
return record, metadata
import parsekit
class FilterRow(parsekit.Step):
start_row = parsekit.Argument(
"The row to start emitting from.",
required=True,
type=int)
def configure(self, options):