Skip to content

Instantly share code, notes, and snippets.

import json
def flatten(n):
if isinstance(n, bool):
return
while True:
changed = False
for k, v in n.iteritems():
if isinstance(v, bool):
#include <ShiftRegister74HC595.h>
#define LATCH_PIN 3
#define CLOCK_PIN 4
#define DATA_PIN 2
#define OE_PIN 5
#define RESET_PIN 6
#define NUMBER_OF_SHIFTERS 30
// ==UserScript==
// @name Facebook Remove Like
// @namespace http://edisdead.com
// @author quatrix
// @description removes like buttons and indicators from facebook, sick.
// @version 0.1
// @run-at document-start
// @include htt*://*.facebook.com/*
// @exclude htt*://apps.facebook.com/*
// @exclude htt*://www.facebook.com/checkpoint/*
const _ = require('lodash')
const Graph = require('node-dijkstra')
/*
problem:
we want to paint a series of buildings
each building can be one of 3 colors (red, green, blue)
each building has its own cost per color
using JSON
function create_data(n::Int)
r = fill([], n, n)
for i in eachindex(r)
r[i] = rand(1000:5000, rand(0:3))
end
return r
const toChunks = (input: string, chunkSize) => {
const i = Math.ceil(Math.random() * Math.min(chunkSize, input.length))
if (!input.length) {
return []
}
const head = input.slice(0, i)
const tail = input.slice(i, input.length)
/*
Test for successful dynamic linkage with Tensorflow, either as an API, or as a 'main' exec
*/
#include <vector>
#include <tensorflow/core/public/session.h>
resource "aws_sns_topic" "pagerduty_service" {
name = "pagerduty_service"
}
resource "aws_sns_topic_subscription" "pagerduty_service" {
topic_arn = aws_sns_topic.pagerduty_service.arn
protocol = "https"
endpoint = "https://events.pagerduty.com/integration/{your-integration-key}/enqueue"
}
data "archive_file" "dead_man_switch" {
type = "zip"
output_path = "${path.module}/files/dead_man_switch.zip"
source_file = "lambdas/dead_man_switch.js"
}
data "archive_file" "authorizer" {
type = "zip"
output_path = "${path.module}/files/authorizer.zip"
source_file = "lambdas/authorizer.js"