This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated on 2013-03-01 using generator-webapp 0.1.5 | |
'use strict'; | |
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
var pushStateHook = function (url) { | |
var path = require('path'); | |
var request = require('request'); // Need to be added into package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#global portviz:false, _:false | |
# | |
# * 0-1 knapsack solution, recursive, memoized, approximate. | |
# * | |
# * credits: | |
# * | |
# * the Go implementation here: | |
# * http://rosettacode.org/mw/index.php?title=Knapsack_problem/0-1 | |
# * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ = require 'underscore' | |
class BlackMagic | |
dp: null | |
dpMax: null | |
maxTotalWeight: 0 | |
minTotalWeight: 0 | |
minWeight: Number.MAX_VALUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node | |
constructor: (@data, @prev, @next) -> | |
@prev.next = this if @prev | |
@next.prev = this if @next | |
class LoopyBuffer | |
_head: null | |
_tail: null | |
_cursor: 0 | |
size: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../topeka-elements/category-images.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Bounce2.h> | |
#include <FastLED.h> | |
#define BRIGHTNESS_PIN A6 | |
#define NUM_LEDS 15 | |
#define DATA_PIN 7 | |
#define BUTTON_PIN 8 | |
#define COLUMNS 6 | |
#define ROWS 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const extractSubNodeModules = async function*( | |
dir: string, | |
): AsyncGenerator<string, void, void> { | |
const files = await readdir(dir); | |
for (let i = 0; i < files.length; i++) { | |
const filepath = join(dir, files[i]); | |
const stats = await stat(filepath); | |
if (stats.isDirectory()) { | |
if (files[i] === 'node_modules') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import sys | |
import os | |
import argparse | |
os.environ["OPENCV_IO_ENABLE_OPENEXR"] = "true" | |
def generate_histogram(image_path, num_bins, y_scale, percentile, x_min, x_max): |