Skip to content

Instantly share code, notes, and snippets.

FROM ubuntu:18.04 as debbuilder
ENV DEBIAN_FRONTEND=noninteractive
# install the deps to pull ubuntu development sources from launchpad
RUN apt-get update && apt-get install -y debhelper gnupg ubuntu-dev-tools apt-file build-essential
# Ubuntu 20.04 (Focal Fossa): released (1.1.1d-2ubuntu1)
# this is the version given on
# https://people.canonical.com/~ubuntu-security/cve/2019/CVE-2019-1547.html
ShapeFactory sf;
sf.shapeName = "Circle";
Shape myShape = sf.build();
myShape.process();
myShape.draw();
class ShapeFactory() {
Shape build() {
// ??
}
@stevesta
stevesta / sympyq
Created September 8, 2014 17:13
sympy question
{
"metadata": {
"name": "scratch-Copy0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "week1"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 1 column, instead of 2 in line 2.
Start Time End Time Activity Duration (min) Quantity Extra data Text Notes
2014-Sep-02 19:45:00 2014-Sep-02 19:45:00 Sleep Start Alexander starts sleeping
2014-Sep-02 19:24:00 2014-Sep-02 19:42:00 Nursing 14 Alexander nursed (9min left, 5min right)
2014-Sep-02 19:38:00 2014-Sep-02 19:38:00 Medicine 0.3 ml Pedia Care Gas Relief Drops : .3 ml
2014-Sep-02 17:03:00 2014-Sep-02 17:17:00 Nursing 14 Alexander nursed (10min right)
2014-Sep-02 17:13:00 2014-Sep-02 17:13:00 Diaper BM+Wet Alexander had a BM and wet diaper (medium)
2014-Sep-02 16:49:00 2014-Sep-02 16:49:00 Diaper Wet Alexander had a wet diaper
2014-Sep-02 15:13:00 2014-Sep-02 15:27:00 Nursing 13 Alexander nursed (6min left, 6min right)
2014-Sep-02 14:37:00 2014-Sep-02 14:37:00 Diaper BM+Wet Alexander had a BM and wet diaper (small)
2014-Sep-02 13:26:00 2014-Sep-02 13:38:00 Nursing 12 Alexander nursed (12min left)
import csv
from datetime import datetime, date
from matplotlib import pyplot as ppl
t0 = datetime(2014,8,1,0,0,0)
r = csv.DictReader(open('data.csv','rb'))
sleep_start_x = []
sleep_start_y = []