Skip to content

Instantly share code, notes, and snippets.

View akaihola's full-sized avatar
🌇
Working from home

Antti Kaihola akaihola

🌇
Working from home
  • Wärtsilä Oyj
  • Espoo, Finland
View GitHub Profile
@akaihola
akaihola / onename.io_verification.txt
Created August 29, 2014 18:55
onename.io verification
Verifying that +akaihola is my Bitcoin username. You can send me #bitcoin here: https://onename.io/akaihola
"""
An experimental extension for an IPython magic command to show object graphs.
Strongly based on tkf's code for the extension itself
and mine for turning a Python namespace into a GraphViz DOT source:
- https://github.com/tkf/ipython-hierarchymagic
- http://pypi.python.org/pypi/pyrels/0.1.1
Read respective copyrights there!
@akaihola
akaihola / .gitignore
Created February 20, 2009 09:57
Test project to verify that django.test.client populates request.user
*.pyc
@akaihola
akaihola / README.txt
Created May 13, 2009 14:32
fapws3 issue attachments
akaihola's attachments to http://github.com/william-os4y/fapws3/issues/#issue/2
@akaihola
akaihola / tracwiki2html.py
Created September 9, 2009 12:07
Trac wiki markup to HTML
#!/usr/bin/env python
"""
tracwiki2html.py v1.0 (c) 2009 Antti Kaihola <akaihol+trac@ambitone.com>
This script converts Trac wiki markup to HTML.
Usage:
tracwiki2html.py file1.txt [file2.txt ...]
#!/usr/bin/env python
# -*- coding: utf-8 -*-
VERSION = '0.03'
__doc__ = """
SYNOPSIS
setskypestatus.py [-h,--help] [-v,--verbose] [--version] [ONLINE|DND|AWAY [mood text]]
from django.core import validators
from django.forms import MultiValueField
from django.forms.util import ErrorList
from django.core.exceptions import ValidationError
class ProperMultiValueField(MultiValueField):
"""django.forms.fields.MultiValueField with a validation fix
If a MultiValueField is ``required=True``, it should still be
valid even if one or more of the sub-fields are empty. In Django
"""
An inline formset which deletes objects when all visible fields are empty or
all-whitespace instead of using the delete checkbox.
See
http://groups.google.com/group/django-users/browse_thread/thread/23539f5e085e62b0
for discussion.
"""
from django.forms import HiddenInput, ValidationError
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This is a script which runs and parses the output of various Python code
checking and unit test runner programs to work with flymake. It has lots of
issues, one being that flymake does not seem to show more than one error
message per line of code, meaning that an error or warning which is
intentionally left unfixed can mask an error or warning that would get more
attention.
@akaihola
akaihola / gist:321180
Created March 3, 2010 23:17
Profile part of a template. Proposed for inclusion to django-extensions. Save into django_extensions/templatetags/template_profiling.py. See http://groups.google.com/group/django-extensions/browse_thread/thread/d09a32c99e7414f7
We couldn’t find that file to show.