Skip to content

Instantly share code, notes, and snippets.

View brianspiering's full-sized avatar

Brian Spiering brianspiering

  • San Francisco, CA, USA
View GitHub Profile
@brianspiering
brianspiering / Markdown.sublime-settings
Last active March 17, 2019 15:37
Sublime Text 3 Markdown Settings Word Wrap
{
"color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme",
"draw_centered": false,
"word_wrap": "auto",
"wrap_width": 0,
}
@brianspiering
brianspiering / python_nlp_packages.md
Last active April 8, 2024 20:48
A Hacker's Guide to Python string and Natural Language Processing (NLP) packages

A Hacker's Guide to Python string and Natural Language Processing (NLP) packages

Extraction

  • textract - Extract text from any document.
  • camelot - Extract text from PDF.

Preprocessing

@brianspiering
brianspiering / template.r
Created March 17, 2019 15:27
Template for R files
#! /usr/bin/env Rscript
# File description -------------------------------------------------------------
#
#
# Setup packages ---------------------------------------------------------------
# List of packages for session
.packages = c("devtools",
"stringr",
@brianspiering
brianspiering / load_packages.r
Created March 17, 2019 15:27
Elegant loading of R packages
# Setup Packages ---------------------------------------------------------------
# List of packages for session
.packages <- c("devtools", "dplyr", "ggplot2", "markdown")
# Install CRAN packages (if not already installed)
.inst <- .packages %in% installed.packages()
if(length(.packages[!.inst]) > 0) install.packages(.packages[!.inst])
# Load packages for session
lapply(.packages, require, character.only=TRUE)
@brianspiering
brianspiering / data_science_principles.md
Last active June 9, 2019 22:28
Brian Spiering's Data Science Principles

Brian Spiering's Data Science Principles

  1. All the data, all the time.

  2. Data is its own best model.

  3. End-to-end solution, first. Then iterate.

  4. Simple working system then add complexity (if needed).

@brianspiering
brianspiering / methods_for_technical_mastery.md
Created April 21, 2019 16:46
Methods for Technical Mastery

Know

  1. Define in your own words.
  2. Construct an analogy.
  3. Identify a practical example.
  4. Define in technical terms and mathematically.

DO

@brianspiering
brianspiering / environment.yml
Created April 29, 2019 17:22
Base Conda Environment
# I shouldn't install packages into `base` env. But I do. Here they are:
name: base
channels:
- pytorch
- conda-forge
- defaults
dependencies:
- _ipyw_jlab_nb_ext_conf=0.1.0=py36_0
- _r-mutex=1.0.0=anacondar_1
- _tflow_select=2.3.0=mkl
@brianspiering
brianspiering / brian_spiering_writing_tips.md
Last active June 3, 2019 15:36
Brian Spiering's Writing Tips

Brian Spiering's Writing Tips

  1. Write down all ideas. You don't need to develop all ideas.
  2. Start by editing previous work. It sets the context.
  3. Write, write, write. Bad first drafts done quickly are the best drafts.
  4. Quit when you start making mistakes.
@brianspiering
brianspiering / photo_guidelines.md
Last active October 23, 2020 13:55
Workplace profile photo guidelines

Workplace profile photo guidelines

Criteria for workplace profile photo:

  • Simple - Only you, no one else. Should not have a busy background or outfit.
  • The photo should be clear, in focus, and with good contrast.
  • You should look friendly and directly at the camera. You should be square to the camera.
  • Your face should take up a majority of the frame. Your entire face should be visible. Your hands should not be visible.
  • Should look like the best version of yourself on a daily basis.
@brianspiering
brianspiering / Understanding `_` in Python.ipynb
Last active July 14, 2019 17:17
Understanding `_` in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.