Skip to content

Instantly share code, notes, and snippets.

[ {
"id" : "12",
"fields" : [ {
"name" : "url",
"value" : [ {
"name" : "url",
"value" : "https://lucidimagination.zendesk.com/api/v2/tickets/12.json"
} ]
}, {
"name" : "id",
@mumrah
mumrah / weather.gs
Created February 19, 2015 15:08
Script used in David's Garden Planner spreadsheet
function get_weather_conditions(year, month, day, query, apikey, cache_buster) {
if(month < 10) {
month = "0" + month;
}
if(day < 10) {
day = "0" + day;
}
var ymd = year + "" + month + "" + day;
var url = "http://api.wunderground.com/api/" + apikey + "/history_" + ymd + "/q/" + query + ".json";
@mumrah
mumrah / README.md
Last active September 15, 2015 14:35 — forked from enjalot/README.md
cosine similarity

Click on the various examples

Each example is a random vector in the same "space" as the sample in the top left.

Drag on individual rows

Each row represents one dimension of our vectors. You can drag them back and forth to change the value of our vector for that dimension.

Watch how the similarity bar changes

The bar below each vector is a measure of how similar it is to the sample in the top left.

Whats going on?

@mumrah
mumrah / RegexFilterConfig.java
Created October 27, 2015 19:12
Things that must match up:
package com.lucidworks.fusion.pipeline.index.config;
import com.lucidworks.apollo.pipeline.schema.Annotations.Schema;
import com.lucidworks.apollo.pipeline.schema.Annotations.SchemaProperty;
import com.lucidworks.apollo.pipeline.schema.validation.RESTValidationError;
import com.lucidworks.apollo.pipeline.schema.validation.SchemaValidator;
import com.lucidworks.fusion.pipeline.Configuration;
import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.annotate.JsonTypeName;
package com.lucidworks.apollo;
import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
import com.google.inject.TypeLiteral;
import com.google.inject.assistedinject.FactoryModuleBuilder;
import com.google.inject.multibindings.MapBinder;
import com.lucidworks.apollo.common.pipeline.PipelineDocument;
import com.lucidworks.apollo.component.ItemStore;
import com.lucidworks.fusion.pipeline.*;
#!/usr/bin/python
from __future__ import print_function
from json import loads
from io import BytesIO
from urllib import urlopen
from time import strptime, strftime
import os
from appscript import app, mactypes
|
|
|
|
|
|
|
| antenna
|
..|
@mumrah
mumrah / rotary.ino
Created November 6, 2017 02:44
Sketch for a KY-040 rotary encoder
/**
* Sketch for KY-040 Encoders
*
* SW pin _must_ have a pull up resistor on it.
*
* CLK and DT _should_ have a ~0.1uF for hardware debounce.
*/
int pinSW = 2;
int pinCLK = 3; // Connected to CLK on KY-040
@mumrah
mumrah / run.py
Created November 9, 2017 18:11
Python script to decode AX.25 from KISS frames over a serial TNC
import hexdump
import kiss
import struct
def decode_addr(data, cursor):
(a1, a2, a3, a4, a5, a6, a7) = struct.unpack("<BBBBBBB", data[cursor:cursor+7])
hrr = a7 >> 5
ssid = (a7 >> 1) & 0xf
ext = a7 & 0x1
#include <font6x8.h>
#include <nano_gfx.h>
#include <nano_gfx_types.h>
#include <sprite_pool.h>
#include <ssd1306.h>
#include <tiny_buffer.h>
#include <tiny_ssd1306.h>