Skip to content

Instantly share code, notes, and snippets.

@fenimore
fenimore / scan.py
Last active August 11, 2018 00:58
luigi scanner
import inspect
import pkgutil
import sys
import bob.tasks
from datetime import date
from luigi.task import Task
from datetime import datetime
def explore_package(module_name):
@fenimore
fenimore / keybase.md
Created February 26, 2018 04:03
keybase.md

Keybase proof

I hereby claim:

  • I am fenimore on github.
  • I am nevermore (https://keybase.io/nevermore) on keybase.
  • I have a public key ASBl4ZbI4mCSOCc9mRwDMRbCLClfWplFeaK2LR36sDQKwgo

To claim this, I am signing this object:

@fenimore
fenimore / install.md
Last active December 20, 2017 15:29
Post install help

Install homebrew: https://brew.sh/

run this: (I just pasted this from the site)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

/usr/bin is a directory where a lot of binaries are located

brew is the application one uses (among others) for Mac to download and install packages -- it's called a package manager. It's pretty

conky.config = {
-- -- Conky settings -- #
background = true,
update_interval = 1,
cpu_avg_samples = 2,
net_avg_samples = 2,
override_utf8_locale = true,
@fenimore
fenimore / shrug.sh
Created December 11, 2017 21:26
shrug to cliboard
#!/bin/bash
echo "¯\_(ツ)_/¯" | xclip -selection c
[core]
excludesfile = /home/fenimore/.gitignore_global
[user]
email = #####
name = Fenimore Love
[alias]
st = status
ci = commit
mg = !git remote update --prune && git merge --ff-only @{u}%
@fenimore
fenimore / emacs config
Created December 4, 2017 21:00
Emacs Config
;; Fix color console output
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
;; Anaconda mode?
(setq python-shell-interpreter "python")
;; Fuck highlihgtin current line
(global-hl-line-mode -1)
@fenimore
fenimore / vector.py
Created November 15, 2017 21:37
linear algebra
class Vector(object):
def __init__(self, coords):
self.coordinates = coords
self.dimensions = len(coords)
def __str__(self):
return "Vector: {}".format(self.coordinates)
def __eq__(self, v):
@fenimore
fenimore / hash function for hash table
Created August 24, 2017 16:18
Hash Function for Hash Table
var TABLE_SIZE = 512
func hash(s string) int {
hash := 0
length := len(s)
prime := 233
for i := 0; i < length; i++ {
hash += prime^(length-i+1) * int(s[i])
@fenimore
fenimore / fizzbuzz.go
Created January 12, 2017 16:16
FizzBuzz iteratively and recursively https://play.golang.org/p/NAl_rTcCxe
// fizzbuzz see the goplayground for output
// https://play.golang.org/p/NAl_rTcCxe
package main
import (
"fmt"
)
// recursiveFizzBuzz returns a string
// of every FizzBuzz output from the original