$ export ECS_CLUSTER_NAME={YOUR_ECS_CLUSTER_NAME}
$ export ECS_SERVICE_NAME={YOUR_ECS_SERVICE_NAME}
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/python | |
import os | |
import sys | |
import requests | |
schema_registry_url = sys.argv[1] | |
topic = sys.argv[2] | |
schema_file = sys.argv[3] |
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
# These should go in ~/.bashrc or an equivalent area that is sourced into your shell environmemnt | |
# Remove all docker containers running and exited | |
alias docker-rma='__drma() { docker ps -aq "$@" | xargs -r docker rm -f; }; __drma' | |
# Remove all docker images | |
alias docker-rmia='__drmia() { docker images -q "$@" | xargs -r docker rmi -f; }; __drmia' | |
# Remove all custom docker networks | |
alias docker-rmnet='__drmnet() { docker network ls -q -f type=custom "$@" | xargs -r docker network rm; }; __drmnet' | |
# Remove all unused volumes | |
alias docker-rmvol='__drmvol() { docker volume ls -q "$@" | xargs -r docker volume rm; }; __drmvol' |
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
val n = 9 | |
val s = Math.sqrt(n).toInt | |
type Board = IndexedSeq[IndexedSeq[Int]] | |
def solve(board: Board, cell: Int = 0): Option[Board] = (cell%n, cell/n) match { | |
case (r, `n`) => Some(board) | |
case (r, c) if board(r)(c) > 0 => solve(board, cell + 1) | |
case (r, c) => | |
def guess(x: Int) = solve(board.updated(r, board(r).updated(c, x)), cell + 1) | |
val used = board.indices.flatMap(i => Seq(board(r)(i), board(i)(c), board(s*(r/s) + i/s)(s*(c/s) + i%s))) |
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
# Twitter Topic Modeling Using R | |
# Author: Bryan Goodrich | |
# Date Created: February 13, 2015 | |
# Last Modified: April 3, 2015 | |
# | |
# Use twitteR API to query Twitter, parse the search result, and | |
# perform a series of topic models for identifying potentially | |
# useful topics from your query content. This has applications for | |
# social media, research, or general curiosity | |
# |