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 | |
DOCKER_PS_LINE=`docker ps | awk '{print $1,$2,$NF}' | grep -m 1 $1` | |
CONTAINER_NAME=`echo $DOCKER_PS_LINE | awk '{print $2}'` | |
CONTAINER_ID=`echo $DOCKER_PS_LINE | awk '{print $1}'` | |
if [ -n "$CONTAINER_ID" ]; then | |
echo "Logged in: $CONTAINER_NAME" | |
docker exec -it $CONTAINER_ID bash | |
else | |
echo "No container found for query: '$1'" |
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
# coding=UTF-8 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |