Skip to content

Instantly share code, notes, and snippets.

View WaylonWalker's full-sized avatar
💌
waylonwalker.com/newsletter

Waylon Walker WaylonWalker

💌
waylonwalker.com/newsletter
View GitHub Profile
@WaylonWalker
WaylonWalker / Unittesting_Jupyter_Notebook.py
Created March 31, 2017 16:37
Unittesting_Jupyter_Notebook
import unittest
def plus_one(x):
"""
return x + 1 for numeric inputs
:numeric param x: input number to add one
:numeric return: x + 1
"""
return x + 1
//add to ~.jupyter/custom/custom.js
//full list of key bindings here --> https://codemirror.net/demo/sublime.html
//reference --> https://stackoverflow.com/questions/36384921/disable-ctrlenter-sublime-keymap-in-jupyter-notebook
require(["codemirror/keymap/sublime", "notebook/js/cell", "base/js/namespace"],
function(sublime_keymap, cell, IPython) {
cell.Cell.options_default.cm_config.keyMap = 'sublime'
cell.Cell.options_default.cm_config.extraKeys["Ctrl-Enter"] = function(cm) {}
var cells = IPython.notebook.get_cells()
for(var cl=0; cl< cells.length ; cl++){
@WaylonWalker
WaylonWalker / wsw_gulpfile.js
Created December 21, 2017 12:33
This is my base gulpfile that does everything I need. Not every project will need every component.
var gulp = require('gulp')
watch = require('gulp-watch')
pug = require('gulp-pug')
browserify = require('gulp-browserify')
sass = require('gulp-sass')
sourcemaps =
browserSync = require('browser-sync').create()
py_files = '**/*.py'
pug_files = 'templates/**/*.pug'
js_files = 'static/js/dev/**/*.js'
@WaylonWalker
WaylonWalker / wsw_gulpfile.js
Created December 21, 2017 12:33
This is my base gulpfile that does everything I need. Not every project will need every component.
var gulp = require('gulp')
watch = require('gulp-watch')
pug = require('gulp-pug')
browserify = require('gulp-browserify')
sass = require('gulp-sass')
sourcemaps =
browserSync = require('browser-sync').create()
py_files = '**/*.py'
pug_files = 'templates/**/*.pug'
js_files = 'static/js/dev/**/*.js'
<link href='https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css'
rel='stylesheet'
type='text/css'/>
<script src='https://d3js.org/d3.v3.min.js' charset='utf-8'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.js'></script>
@WaylonWalker
WaylonWalker / wsw_npm_global.sh
Last active January 6, 2018 20:34
My global npm installs for gulp
npm i -g gulp gulp-watch gulp-pug gulp-browserify gulp-sass browser-sync child_process pug
<!-- https://rawgit.com/WaylonWalker/61c7588e6033f03fa3481f84107d5cac/raw/3756ca5982aaeb598663322ec49ccbe82da5f078/MakeoverMonday_1.html -->
<!-- Essential META Tags -->
<meta property="og:title" content="Makeover Monday 1-1-2018">
<meta property="og:description" content="Poultry Consumption Overtakes Red Meat">
<meta property="og:image" content="https://pbs.twimg.com/media/DSj5YQxX4AATurl.jpg">
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
script(src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js')
link(rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css')
script.
hljs.initHighlightingOnLoad();
@WaylonWalker
WaylonWalker / wsw-markdown.css
Last active May 2, 2018 17:38
quick css styling
/*
HTML/Markdown
<style>@import url("https://goo.gl/RrPQm5")</style>
PUG
style.
@import url("https://goo.gl/RrPQm5")