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 | |
import random | |
def roll(dice, tn): | |
successes = 0 | |
result = feat = random.randint(0, 11) | |
for i in range(0, dice): | |
r = random.randint(1, 6) | |
result += r |
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
""" | |
This generic view displays a list of objects and a simple ModelForm to add a new | |
object to the list. | |
Just subclass this view and override the attributes and methods that you need. You | |
will probably need to override at least 'model', 'form_class' and 'success_url'. | |
See the documentation of the used mixins and ProcessFormView in | |
https://docs.djangoproject.com/en/1.4/ref/class-based-views/ | |
""" | |
from django.views.generic.list import MultipleObjectMixin, MultipleObjectTemplateResponseMixin | |
from django.views.generic.edit import ModelFormMixin, ProcessFormView |
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 | |
## Just for fun, a little script to show a colored output of df | |
## to get a prettier view of disk usage | |
HIGH=80 | |
MEDIUM=50 | |
FIRST=0 |