Skip to content

Instantly share code, notes, and snippets.

Adam Hyland Protonk

  • New England
Block or report user

Report or block Protonk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Evaluate an article

Handout: Evaluating Wikipedia

  • Review pages 4-7 of the Evaluating Wikipedia brochure. This will give you a good, brief overview of what to look for in other articles, and what other people will look for in your own.
  • Evaluate an existing Wikipedia article related to the class, and leave suggestions for improving it on the article's talk page.
    • A few questions to consider (don't feel limited to these):
      • Is each fact referenced with an appropriate, reliable reference?
      • Is everything in the article relevant to the article topic? Is there anything that distracted you?
      • Is the article neutral? Are there any claims, or frames, that appear heavily biased toward a particular position?
      • Where does the information come from? Are these neutral sources? If biased, is that bias noted?
      • Are there viewpoints that are overrepresented, or underrepresented?

"He was a seaman, but he was a wanderer, too, while most seamen lead, if one may so express it, a sedentary life. Their minds are of the stay-at-home order, and their home is always with them—the ship; and so is their country—the sea. One ship is very much like another, and the sea is always the same. In the immutability of their surroundings the foreign shores, the foreign faces, the changing immensity of life, glide past, veiled not by a sense of mystery but by a slightly disdainful ignorance; for there is nothing mysterious to a seaman unless it be the sea itself, which is the mistress of his existence and as inscrutable as Destiny. For the rest, after his hours of work, a casual stroll or a casual spree on shore suffices to unfold for him the secret of a whole continent, and generally he finds the secret not worth knowing. The yarns of seamen have a direct simplicity, the whole meaning of which lies within the shell of a cracked nut."

Heart of Darkness, Joseph Conrad.

Protonk /
Last active Aug 29, 2015
draft ideas


Establishing feminist critique as pushing against cultural resentment

"Prominent feminist critique — present in every other relevant medium, but new to games — has elicited massive backlash and threats to women working in the field."

View Hylang blog posts
By hylang core devs:
Defining Function Arguments in Hy
Hy a Lisp on Python
Programming Can Be Fun with Hy
d3.quantile = function(values, p) {
  var H = (values.length - 1) * p + 1,
      h = Math.floor(H),
      v = +values[h - 1],
      e = H - h;
  return e ? v + e * (values[h] - v) : v;
View xorshift.js
//Webkit2's crazy invertible mapping generator
// Theory is here:
var xorshift = (function(seed) {
// We can't reach the maximal period inside JS because numbers above
// 2^53 aren't 'safe'
seed = seed || Math.round(Math.random() * Math.pow(2, 32));
return {
rand : function() {
// creates randomness...somehow...
View gbm.R
# Read in Girl before a Mirror from somewhere
# readJPEG only accepts a path, so give it one without much tomfoolery
picasso.path <- tempfile('girl_before_a_mirror.jpg')
download.file('', picasso.path)
gbm <- readJPEG(picasso.path)
Protonk / fxn2json.R
Last active Dec 25, 2015
View R function bodies as JSON Objects
View fxn2json.R
## Once you've loaded the dependencies you don't have to load them again in a session
## May have to install them via `install.packages(c('RJSONIO', 'plyr'))` first and only once per device
# Uses C parser for faster results compared to rjson
# Get a quick non-trivial function example
# body(x) extracts the function body for x (also could set the function body of x)
ddBody <- as.list(body(ddply))
Protonk / better.R
Created Aug 16, 2013
A smarter solution to matching many to many
View better.R
# For each element, match against the data frame of longer vectors
compSlightlySmarter <- function(element, table) {
matches <- sapply(table, function(x) {
# finds exact matches of element to the 'table' (one column in the longer df)
locations <- match(element, as.character(x))
# if there are no unbroken or unordered sequences, it's a match!
return(!any( & !is.unsorted(locations))
if(any(matches)) {
# unlike the dumb version, we return matches
Protonk / dumbest.R
Created Aug 16, 2013
The dumbest solution to the problem
View dumbest.R
long <- data.frame(c("foo","qux","baz","quux"),c("baz","bar","foo","corge"))
shrt <- data.frame(c("foo","bar","baz"),c("baz","bar","foo"))
concatDumb <- function(data) {
listed <- sapply(data, function(x) {
# concatenate the character vectors to use substring matching
paste0('$', paste(unname(x), collapse = '$'), '$')
You can’t perform that action at this time.