Automata in Scala is moved to https://github.com/everpeace/scalamata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Store messages in a Maildir into a couchdb database.""" | |
import couchdb | |
from mailbox import Maildir | |
from optparse import OptionParser | |
import os | |
from pprint import pprint | |
import sys | |
from uuid import uuid4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, os, glob | |
from datetime import datetime | |
sys.path.append(os.environ.get("MAHOUT_CORE")) | |
for jar in glob.glob(os.environ.get("MAHOUT_JAR_DIR") + "/*.jar"): | |
sys.path.append(jar) | |
from org.apache.mahout.common import RandomUtils | |
from org.apache.mahout.cf.taste.common import TasteException | |
from org.apache.mahout.cf.taste.eval import * |
Let's use Terraform to easily get a CoreOS cluster up on Digital Ocean. In this example we will get a 5 node CoreOS cluster up and running on the Digital Ocean 8GB size.
Grab a copy of Terraform for your platform from http://www.terraform.io/downloads.html. Follow the instructions at http://www.terraform.io/intro/getting-started/install.html by getting Terraform in your PATH
and testing that it works.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# set -eo pipefail | |
export CONSUL_NUM_INSTANCES=${CONSUL_NUM_INSTANCES:-3} | |
echo " => stopping consul" | |
fleetctl stop -block-attempts=10 \ | |
$(eval echo "consul-server@{1..$CONSUL_NUM_INSTANCES}.service") \ | |
consul-agent.service | |
# FIXME: sometimes it takes awhile for systemd to stop things... |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.