Skip to content

Instantly share code, notes, and snippets.

@Sh4kE
Sh4kE / main.py
Created October 1, 2015 15:56
back to code @codinggame
import sys
import math
opponent_count = int(input()) # Opponent count
claimed_by_me = set()
claimed_by_opponent = {}
for opp in range(opponent_count):
claimed_by_opponent[opp] = set()
@Sh4kE
Sh4kE / update_docker_container.sh
Created October 12, 2016 09:56
Bash script to update docker containers to a new image
#!/usr/bin/env bash
set -e
REGISTRY="wischlabs"
BASE_IMAGE="ofm_helper"
IMAGE="$REGISTRY/$BASE_IMAGE"
CID=$(docker ps | grep $BASE_IMAGE | awk '{print $1}')
docker pull $IMAGE
for im in $CID
do
(env_ofm) [ 11:26 ] [ sh4ke@Beteigeuze:~/repos/ofm_helper(master✗) ]
$ py.test --mccabe -m mccabe --ignore=env_ofm
==================================================================== test session starts =====================================================================
platform linux -- Python 3.5.2, pytest-3.0.4, py-1.4.31, pluggy-0.4.0
Django settings: ofm_helper.settings.dev (from environment variable)
rootdir: /home/sh4ke/repos/ofm_helper, inifile: pytest.ini
plugins: mccabe-0.1, django-3.1.2
collected 257 items
gunicorn_conf.py .
@Sh4kE
Sh4kE / .gitignore
Last active February 2, 2017 17:48
python scripts for extracting player prices from ofm transfer xls'
# Created by .ignore support plugin (hsz.mobi)
### VirtualEnv template
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
.Python
[Bb]in
[Ii]nclude
[Ll]ib
[Ll]ib64
[Ll]ocal