Skip to content

Instantly share code, notes, and snippets.

View shawnbot's full-sized avatar
🎹

Shawn Allen shawnbot

🎹
View GitHub Profile
@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links
@LeoColomb
LeoColomb / README.md
Last active January 15, 2023 19:42 — forked from morganrallen/_README.md
JankyBrowser

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
@tomchristie
tomchristie / put_as_create.py
Created November 3, 2014 11:55
PUT-as-create mixin class for Django REST framework.
class AllowPUTAsCreateMixin(object):
"""
The following mixin class may be used in order to support PUT-as-create
behavior for incoming requests.
"""
def update(self, request, *args, **kwargs):
partial = kwargs.pop('partial', False)
instance = self.get_object_or_none()
serializer = self.get_serializer(instance, data=request.data, partial=partial)
serializer.is_valid(raise_exception=True)
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@mbostock
mbostock / .block
Last active February 13, 2018 01:28
Map Pan & Zoom IV
license: gpl-3.0
@mbostock
mbostock / .block
Last active November 7, 2017 07:17
Gray Earth
license: gpl-3.0
@mbostock
mbostock / .block
Last active September 30, 2016 00:21 — forked from mbostock/.block
Blocky Counties
license: gpl-3.0
@mbostock
mbostock / .block
Last active January 10, 2024 01:25
World Tour
license: gpl-3.0
redirect: https://observablehq.com/@mbostock/world-tour
@tmcw
tmcw / index.html
Created November 27, 2012 21:04
d3 tag editing
<!DOCTYPE html>
<head>
<meta charset='utf-8'>
<title>d3 input table</title>
<style>
body {
font:normal 14px/20px 'Helvetica Neue', sans-serif;
}
</style>
</head>