Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Wittig Sh4kE

View GitHub Profile
@Sh4kE
Sh4kE / .gitignore
Last active Feb 2, 2017
python scripts for extracting player prices from ofm transfer xls'
View .gitignore
# 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
View pytest.log
(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 / update_docker_container.sh
Created Oct 12, 2016
Bash script to update docker containers to a new image
View update_docker_container.sh
#!/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
View main.py
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()
You can’t perform that action at this time.