Skip to content

Instantly share code, notes, and snippets.

View tanyaschlusser's full-sized avatar

Tanya Schlusser tanyaschlusser

  • United States
View GitHub Profile
@tanyaschlusser
tanyaschlusser / Ruby-Notes.md
Last active June 10, 2019 13:12
Ruby notes

Summarizing the [core Ruby docs][1] and the [Ruby koans][2]

Note

  • use gem environment to show all of the search paths
  • Use ri <thing> in the rails console to get documentation on <thing>.
  • Or help "string-version of <thing>" Help so far seems quite good
  • The return value of a function is its last statement unless there is a specific return statement
  • Top level constants are referenced by double colons ::top_level_const which is useful if you have a local variable with the same name.

Style

@tanyaschlusser
tanyaschlusser / example.html
Created January 7, 2019 02:04
Toggle between a chart and table showing chart data
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
</head>
<body>
<button class="img-table-toggler" id="example_png">Show data</button><br/>
<img src="img/example.png"
class="example_png"
alt="Bar chart of group membership. Click 'Show data' button for table."/>
@tanyaschlusser
tanyaschlusser / LICENSE.txt
Created September 17, 2018 15:43
The unlicense applies to all public gists https://gist.github.com/tanyaschlusser
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@tanyaschlusser
tanyaschlusser / .env
Last active October 27, 2018 14:32
Virtualenvwrapper postactivate and predeactivate (python)
ENVVAR1=value
ENVVAR2="value 2"
#COMMENTED="Lines starting with hash will be skipped."
@tanyaschlusser
tanyaschlusser / index.js.map
Last active June 13, 2018 23:42
vega3 minified for attempted use on Kaggle
This file has been truncated, but you can view the full file.
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/vega-util/src/accessor.js","webpack:///./node_modules/vega-util/src/error.js","webpack:///./node_modules/vega-util/src/splitAccessPath.js","webpack:///./node_modules/vega-util/src/isArray.js","webpack:///./node_modules/vega-util/src/isObject.js","webpack:///./node_modules/vega-util/src/isString.js","webpack:///./node_modules/vega-util/src/stringValue.js","webpack:///./node_modules/vega-util/src/field.js","webpack:///./node_modules/vega-util/src/accessors.js","webpack:///./node_modules/vega-util/src/logger.js","webpack:///./node_modules/vega-util/src/peek.js","webpack:///./node_modules/vega-util/src/toNumber.js","webpack:///./node_modules/vega-util/src/transform.js","webpack:///./node_modules/vega-util/src/array.js","webpack:///./node_modules/vega-util/src/isFunction.js","webpack:///./node_modules/vega-util/src/compare.js","webpack:///./node_modules/vega-util/src/constant.js","webpack:///./node_modules/vega-util/src/debounce.js",
@tanyaschlusser
tanyaschlusser / world.json
Last active June 2, 2018 03:50
World map using Bjorn Sandvik's shapefile at http://thematicmapping.org/downloads/world_borders.php and D3.js
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tanyaschlusser
tanyaschlusser / README.md
Created December 15, 2016 22:44
Daemonizing national-voter-file process

'Daemonizing' adapted for a Docker container

When you detach a process in your Docker container, the container dies. Instead you can run docker-compose run -d <container> <script>, and leave the entire container running in the background.

Logistics

This setup works with the December 15th version of the [national-voter-file][nvf] containers, if you follow their instructions.

@tanyaschlusser
tanyaschlusser / Python Callback using mpld3.ipynb
Last active March 20, 2017 20:17
Callbacks: Python + mpld3 + Jupyter 4
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tanyaschlusser
tanyaschlusser / sample-data.json
Created May 30, 2015 08:57
lightning-viz boxplot
[{
"name": "ANNUAL",
"data": [ {
"pct75": 38910,
"pct50": 29370,
"pct10": 17700,
"pct90": 52070,
"YEAR": 2008,
"pct25": 22060
},
@tanyaschlusser
tanyaschlusser / README.md
Last active August 29, 2015 14:21
Clickable U.S. Map

Mike Bostock's example with US counties is modified for states, adding a state ID indicator on hover and a click response: the beginnings of a map-based user interface. For accessibility, a supplementary alphabetized list of states is also provided.

Where to get the map

Mike Bostock has a github repo with code