This blog post series has moved here.
You might also be interested in the 2016 version.
| #!/bin/bash -ex | |
| if [ "$(cat /mnt/var/lib/info/instance.json | jq -r .isMaster)" == "true" ]; then | |
| # Install Git | |
| sudo yum -y install git | |
| # Install Maven | |
| wget -P /tmp http://apache.mirrors.spacedump.net/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz | |
| sudo mkdir /opt/apache-maven | |
| sudo tar -xvzf /tmp/apache-maven-3.3.3-bin.tar.gz -C /opt/apache-maven |
This blog post series has moved here.
You might also be interested in the 2016 version.
| import json | |
| import urlparse | |
| from itertools import chain | |
| flatten = chain.from_iterable | |
| from nltk import word_tokenize | |
| from gensim.corpora import Dictionary | |
| from gensim.models.ldamodel import LdaModel | |
| from gensim.models.tfidfmodel import TfidfModel |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."
| /* | |
| * ==================================================================== | |
| * | |
| * Licensed to the Apache Software Foundation (ASF) under one or more | |
| * contributor license agreements. See the NOTICE file distributed with | |
| * this work for additional information regarding copyright ownership. | |
| * The ASF licenses this file to You 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 | |
| * |
| package test | |
| import org.apache.commons.compress.archivers.ArchiveStreamFactory | |
| import org.apache.commons.compress.archivers.ArchiveInputStream | |
| import org.apache.commons.compress.archivers.ArchiveEntry | |
| import org.apache.commons.compress.compressors.CompressorStreamFactory | |
| import scala.util.Try | |
| import scala.util.Success | |
| import scala.util.Failure | |
| import java.io.InputStream |
I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.
I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...
| execfile("/your/path/to/videomaker.py") | |
| videomaker( | |
| ts_min=1352261778000, # "from" timestamp.. | |
| ts_max=1352262378000, # .."to" timestamp | |
| frames=20, # number of images in the video. eg 200 frames for a video at 20 frames per seconds = 10 seconds of video | |
| output_prefix="/path/to/output/dir/frame_", # path where to write the png. images will be prefixed with "frame_" | |
| output_format=".png" # you probably want to leave png here | |
| ) |