Skip to content

Instantly share code, notes, and snippets.

View CunningDJ's full-sized avatar

David Cunningham CunningDJ

View GitHub Profile
@CunningDJ
CunningDJ / ios_motion_test.py
Created September 5, 2016 05:12
ios_motion_test.py
# coding: utf-8
import motion
from time import sleep
from motion import *
import canvas as cv
from math import pi
''' Playing with attitude tracking(roll/pitch/yaw). Changes the color of the circle based on rotation around all 3 axes.'''
@CunningDJ
CunningDJ / keys.json
Created April 19, 2018 17:50
keys.json file template for MarvelApp
{
"marvel": {
"key": [Marvel API public key],
"secretKey": [Marvel API private key]
}
}
/*
* master index (App wrapper)
*/
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import allReducers from './reducers'
@CunningDJ
CunningDJ / unitedFlightStats.js
Created March 27, 2019 00:11
United Flight Stats - use on United Inflight Website
/**
*
* % United Flight Stats %
* Paste into your browser after loading the inflight website (https://unitedwifi.com)
*
*/
// flight data API - used in the demo video
(function() {
const flightdataUrl = "https://services.inflightpanasonic.aero/inflight/services/flightdata/v1/flightdata";
@CunningDJ
CunningDJ / apache-notes.md
Created May 16, 2020 03:06
Apache Config & HTTPS/SSL Notes
@CunningDJ
CunningDJ / leetcode.number-of-islands.py
Last active June 17, 2024 16:35
Leetcode: Number of Islands, with algorithm for grouping the islands by ID
'''
This solves the Number of Islands problem in Leetcode, but also creates unique
incrementing integer IDs for each island, and tracks all the coordinates that
make up each.
To solve the problem, you just return current_island_id + 1
To see the grouped islands by ID, return islands
Problem: https://leetcode.com/problems/number-of-islands
'''
class Solution: