Skip to content

Instantly share code, notes, and snippets.

View theikkila's full-sized avatar

Teemu Heikkilä theikkila

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[{
"event": "account.updated",
"description": "Occurs whenever an account status or property has changed.",
"object_description": "describes an account",
"objects": ["#account_object"]
}, {
"event": "account.application.authorized",
"description": "Occurs whenever a user authorizes an application. Sent to the related application only.Show child attributes",
"object_description": "describes an \"application\"",
"objects": []
from keras.layers import Input, Conv2D, Lambda, merge, Dense, Flatten, MaxPooling2D
from keras.models import Model, Sequential
from keras.regularizers import l2
from keras import backend as K
from keras.optimizers import SGD, Adam
from keras.losses import binary_crossentropy
import numpy.random as rng
import numpy as np
import os
import matplotlib.pyplot as plt
@theikkila
theikkila / filelist.txt
Created February 8, 2019 08:05
Kubernetes meetup raw video urls
https://f001.backblazeb2.com/file/theikkila-tmp/kube_jan19/GH011272.MP4
https://f001.backblazeb2.com/file/theikkila-tmp/kube_jan19/GH021272.MP4
https://f001.backblazeb2.com/file/theikkila-tmp/kube_jan19/GH031272.MP4
https://f001.backblazeb2.com/file/theikkila-tmp/kube_jan19/GH041272.MP4
https://f001.backblazeb2.com/file/theikkila-tmp/kube_jan19/GH051272.MP4
https://f001.backblazeb2.com/file/theikkila-tmp/kube_jan19/GH061272.MP4
https://f001.backblazeb2.com/file/theikkila-tmp/kube_jan19/GH071272.MP4
https://f001.backblazeb2.com/file/theikkila-tmp/kube_jan19/GH081272.MP4
https://f001.backblazeb2.com/file/theikkila-tmp/kube_jan19/GH091272.MP4
https://f001.backblazeb2.com/file/theikkila-tmp/kube_jan19/GH101272.MP4
pub fn split_to_set(raw: String) -> HashSet<String> {
raw
.split(",")
.map(|member| member.trim().to_string())
.collect()
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>state-management-by-perkele</title>
</head>
<body>
<button id="click">c++</button>
<div id="state">
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
// How does this work:
// https://github.com/nginx/nginx/blob/master/src/http/ngx_http_parse.c#L634
#define BYTE_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c"
#define BYTE_TO_BINARY(byte) \
(byte & 0x80 ? '1' : '0'), \
logs = spark.read.json("in/logs/*.json.gz").createOrReplaceTempView('logs')
users = spark.read.json('in/user_hostname_mapping.json').createOrReplaceTempView('users')
billing_stats = spark.sql("""
SELECT user,
sum(size) as total_bandwidth
FROM logs
INNER JOIN users ON logs.hostname = users.hostname
GROUP BY user""")
apiVersion: v1
kind: Namespace
metadata:
name: kube-lego
{"date":"2018-01-01","month":1,"day":1,"rise_h":9.392777777777777,"rise_s":33814,"set_h":15.404722222222222,"set_s":55457}
{"date":"2018-01-02","month":1,"day":2,"rise_h":9.383055555555556,"rise_s":33779,"set_h":15.429722222222223,"set_s":55547}
{"date":"2018-01-03","month":1,"day":3,"rise_h":9.372222222222222,"rise_s":33740,"set_h":15.456111111111111,"set_s":55642}
{"date":"2018-01-04","month":1,"day":4,"rise_h":9.359722222222222,"rise_s":33695,"set_h":15.483611111111111,"set_s":55741}
{"date":"2018-01-05","month":1,"day":5,"rise_h":9.345833333333333,"rise_s":33645,"set_h":15.5125,"set_s":55845}
{"date":"2018-01-06","month":1,"day":6,"rise_h":9.330555555555556,"rise_s":33590,"set_h":15.542222222222222,"set_s":55952}
{"date":"2018-01-07","month":1,"day":7,"rise_h":9.313888888888888,"rise_s":33530,"set_h":15.573333333333334,"set_s":56064}
{"date":"2018-01-08","month":1,"day":8,"rise_h":9.296111111111111,"rise_s":33466,"set_h":15.605277777777777,"set_s":56179}
{"date":"2018-01-09","month":1,"day":9,"rise_h":9.2