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
// run with node: | |
// node getQuakes.js 3.5 | |
// to get all quakes over M3.5 | |
async function getQuakesFromMetoffice(minimumQuakeSize) { | |
const axios = require('axios'); | |
let pageHtml = await axios.get('https://vedur.is/skjalftar-og-eldgos/jardskjalftar/reykjanesskagi/#view=table'); | |
lines = pageHtml.data.split('\r\n'); | |
let VI = {quakeInfo: undefined}; |
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
live_loop :first do | |
play :c3 | |
sleep 0.25 | |
end | |
live_loop :second do | |
play :e3 | |
sync :first | |
end |
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 asyncio | |
from collections import namedtuple | |
Event = namedtuple('Event',['source','data']) | |
observers = {} | |
def register(source, callback): | |
observers.setdefault(source,[]).append(callback) |
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
.vscode | |
Include | |
Lib | |
Scripts | |
tcl |
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
library(shiny) | |
library(lubridate) | |
dateStr1="2015/02/08" | |
dateStr2="2015 Feb 8" | |
# Uncomment to make it work on windows if not on english locale | |
# Perhaps each shinyapps.io app should have a locale configuration? | |
# Sys.setlocale("LC_TIME","English") |
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 time | |
import http.server | |
import picamera | |
import datetime as dt | |
import shutil | |
from fractions import Fraction | |
HOST_NAME = 'raspiplus.lan' | |
PORT_NUMBER = 9000 |
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
local M = { | |
a=function(self,msg) | |
self:b(msg) | |
end, | |
b=function(self,msg) | |
print(msg) | |
end | |
} | |
describe("Description", function() |
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
// This can be compiled with a recent g++ (version > 4.5 I belive) by issuing | |
// $ g++ -std=c++0x -o foo find_if_test.cpp | |
#include<iostream> | |
#include<vector> | |
#include<algorithm> | |
struct Record | |
{ | |
int a; |