Skip to content

Instantly share code, notes, and snippets.

@njdart
njdart / hollsrobot.py
Created January 13, 2016 13:48
Example Project Layout for Hills Road Robotics
import communications
import solution_set
import SR
"""
Hills Robot (Hobo) Class, this should be the end point for all competition code
"""
class Hobo(object):
@njdart
njdart / Brief.md
Last active May 6, 2016 08:02
Image decoding for the #SETIDecryptChallenge

This brief is a copy of the #SETIDecryptChallenge challenge was taken from http://phl.upr.edu/library/notes/SETIChallenge:

Suppose a telescope on Earth receives a series of pulses from a fixed, unresolved source beyond the solar system. The source is a star about 50 light years from Earth. The pulses are in the form of short/long signals and they are received in a very narrow band around an electromagnetic frequency of 452.12919 MHz. A computer algorithm identifies the artificial nature of the pulses. It turns out the pulses carry a message. The pulses signify binary digits. Suppose further that you were, by whatsoever reason, put in charge of decoding this message.

Rules

  1. No restrictions on collaborations.
  2. Open discussion (social networks etc.) of possible solutions strongly encouraged.
  3. Three hints to the solutions can be offered as per request.
  4. Send your solutions to Dr. René
import uuid
class Foo():
def __init__(self, id=uuid.uuid4()):
self.id = id
class Bar():
def __init__(self, id=uuid.uuid4()):
self.id = id
@njdart
njdart / extractProjects.js
Last active October 26, 2016 21:33
Aber CS Major Projects
(function() {
var projects = [];
var supervisors = [];
var keywords = {};
$('#supervisor').children().eq(4).children().each(function(index, s) {
var supervisorBlock = $(s);
var supervisorInitials = supervisorBlock.find('h3').attr('id');
@Relation Cleveland
@Attribute age REAL
@Attribute sex REAL
@Attribute chestPain REAL
@Attribute RestingBloodPress REAL
@Attribute SerumCholesterol REAL
@Attribute FastingBloodSugar REAL
@Attribute RestingECGResult REAL
@Attribute MaxHeartRate REAL
'use babel';
import MarkdownParser from 'extensible-markdown';
import fs from 'fs';
import bunyan from 'bunyan';
import Os from 'os';
import Path from 'path';
let logger = bunyan.createLogger({
name: 'markings-extensible-markdown-parser',
{
"focusedMonitorId": 8388610,
"primaryMonitorId": 8388612,
"clientsCount": 2,
"monitors": [
{
"name": "right",
"id": 8388610,
"randrId": 447,
"wired": true,
@njdart
njdart / 3hopsOfEdgeType
Last active July 25, 2018 20:48
Arangodb index query explains
I gave up on this query after 5 minutes of waiting
Query string:
FOR v,e,p in 1..3 OUTBOUND "vertices/14773828" edges FILTER p.edges[*].type ALL == "a" RETURN p
Execution plan:
Id NodeType Est. Comment
1 SingletonNode 1 * ROOT
2 TraversalNode 1000000000 - FOR v /* vertex */, p /* paths */ IN 1..3 /* min..maxPathDepth */ OUTBOUND 'vertices/14773828' /* startnode */ edges
5 ReturnNode 1000000000 - RETURN p
// this program is a simple implementation of a reverse polish calculator using an array as a simple stack
// see https://en.wikipedia.org/wiki/Reverse_Polish_notation
package main
import (
"fmt"
"reflect"
)
@njdart
njdart / Reactive-page-builder.html
Created July 3, 2019 10:37
Browser Tools Bookmarks
# Provides two divs, one at the top to input content, one below which has its `innerHTML` set to the content of the top.
# This allows easily building simple tools quickly
data:text/html, <html>
<head>
<style>
.halfBox {
width: 100%;
height: 50%;