Skip to content

Instantly share code, notes, and snippets.

View arossouw's full-sized avatar

Arno Rossouw arossouw

  • Anonymous
View GitHub Profile
WITH RECURSIVE traversed (id, name, path, `left`, `right`) AS (
SELECT id,
name,
CAST(JSON_ARRAY(id) AS JSON),
`left`,
`right`
FROM binary_tree
WHERE id = 1
UNION
SELECT b.id,
WITH RECURSIVE fizz_buzz (sequence, modulo_3, modulo_5) AS (
SELECT 1, CAST('' AS CHAR(4)), CAST('' AS CHAR(5))
UNION ALL
SELECT sequence + 1,
IF(MOD(sequence + 1, 3) = 0, 'Fizz', ''),
IF(MOD(sequence + 1, 5) = 0, 'Buzz', '')
FROM fizz_buzz
WHERE sequence < 100
)
#! /usr/bin/env python3
import string
import sys
import re
from PyQt5.QtCore import QByteArray, QUrl
from PyQt5.QtGui import QFont, QTextDocument
from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest
from PyQt5.QtWidgets import *
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'Monthly Average Rainfall'
},
subtitle: {
text: 'Source: WorldClimate.com'
},
$(function () {
Highcharts.chart('container', {
chart: {
type: 'bar'
},
title: {
text: 'Events by Monitoring Server'
},
subtitle: {
text: 'January 2017'
@arossouw
arossouw / decorator.clj
Created January 25, 2017 12:59 — forked from Seberius/decorator.clj
dev/reno - Decorator pattern in Clojure/script
(ns patterns.decorator.core
(:require [clojure.data.json :as json]
[clojure.string :as str]
[patterns.util :refer [to-xml]]))
;; Record impl
(defprotocol IRenderable
(render [this]))
(defrecord WebService [data]