Also see the original Pieter Noordhuis's guide
You need:
- Raspberry Pi Model B (or B+) with a MicroSD Card $35-40
- An RTL-SDR dongle:
#!/usr/bin/env python | |
import os, os.path, stat, sys, base64 | |
# TOTP lib inlined | |
import time, hmac, base64, hashlib, struct | |
def pack_counter(t): | |
return struct.pack(">Q", t) |
# Inspired by https://gist.github.com/harel/9ced5ed51b97a084dec71b9595565a71 | |
from collections import namedtuple | |
import functools | |
import json | |
import six | |
Serialized = namedtuple('Serialized', 'json') |
Also see the original Pieter Noordhuis's guide
You need:
#!/bin/bash | |
docker ps --filter "label=com.docker.compose.project" -q | xargs docker inspect --format='{{index .Config.Labels "com.docker.compose.project"}}'| sort | uniq |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
#!/bin/sh | |
# Make sure to: | |
# 1) Name this file `backup.sh` and place it in /home/ubuntu | |
# 2) Run sudo apt-get install awscli to install the AWSCLI | |
# 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
# 4) Fill in DB host + name | |
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
# 6) Run chmod +x backup.sh | |
# 7) Test it out via ./backup.sh |
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "GlusterFS replicated volume CloudFormation template.", | |
"Parameters" : { | |
"DataNodeCount" : { | |
"Description" : "Number of data nodes to provision in cluster (2-18)", | |
"Type" : "Number", | |
"Default" : "2", |
#!/usr/bin/env python | |
# BB-8 Python driver by Alistair Buxton <a.j.buxton@gmail.com> | |
from bluepy import btle | |
import time | |
class BB8(btle.DefaultDelegate): | |
def __init__(self, deviceAddress): |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
""" | |
Simple proof of concept code to push data to Google Analytics. | |
Related blog post: | |
* https://medium.com/python-programming-language/80eb9691d61f | |
""" | |
from random import randint | |
from urllib import urlencode | |
from urllib2 import urlopen | |
from urlparse import urlunparse |