Generate placeholder PDFs for hardcover books you own, so they show up in your ebook library as a reminder that a physical copy exists.
- Enter books in the text field, one per line:
Generate placeholder PDFs for hardcover books you own, so they show up in your ebook library as a reminder that a physical copy exists.
| #!/bin/bash | |
| # Sets EXIF date on an image based on YYYY-MM-DD pattern in filename or manual date. | |
| set -euo pipefail | |
| show_help() { | |
| cat <<EOF | |
| Usage: $(basename "$0") [OPTIONS] <image> | |
| Sets EXIF date on an image file. Extracts date from YYYY-MM-DD pattern in | |
| filename, or uses manually specified date. Skips if EXIF date already exists. |
| ''' | |
| Taken from: https://code.djangoproject.com/ticket/17561#comment:7 | |
| ''' | |
| from django.db import models | |
| class EmailField(models.EmailField): | |
| def get_prep_value(self, value): | |
| value = super(EmailField, self).get_prep_value(value) |
| from django.db.models import Q | |
| from django.db.models.sql.query import get_order_dir | |
| # Taken from: https://gist.github.com/dokterbob/1004216 | |
| def get_next_or_previous(qs, item, next=True): | |
| """ | |
| Get the next or previous object in the queryset, with regards to the | |
| item specified. | |
| """ |
| (function ($) { | |
| var updateElementIndex = function(el, prefix, ndx) { | |
| var id_regex = new RegExp("(" + prefix + "-(\\d+|__prefix__))"); | |
| var replacement = prefix + "-" + ndx; | |
| if ($(el).attr("for")) { | |
| $(el).attr("for", $(el).attr("for").replace(id_regex, replacement)); | |
| } | |
| if (el.id) { | |
| el.id = el.id.replace(id_regex, replacement); | |
| } |
| import re | |
| from django.core.exceptions import ValidationError | |
| from django.utils.translation import ugettext_lazy as _ | |
| class FileTypeValidator(object): | |
| error_message = _(u'Please upload a file of the correct type.') | |
| def __init__(self, regex, error_message=None): | |
| self.regex = re.compile(regex) |
| wopp = map sayIt [1..] | |
| where woppln n | (mod n 7 == 0) = True | |
| | ('7' `elem` show n) = True | |
| | otherwise = False | |
| sayIt n = (if woppln n then "wopp" else show n, if direction n > 0 then "right" else "left") | |
| direction 1 = 1 | |
| direction n | woppln n = (-1) * direction (n-1) | |
| | otherwise = direction (n-1) | |
| main = do |
| # -*- coding: utf-8 -*- | |
| import os | |
| from django.core.mail import get_connection | |
| from django.core.mail.message import EmailMessage | |
| from django.conf import settings | |
| from django.contrib.sites.models import Site | |
| from django.template import Context, RequestContext | |
| from django.template.loader import get_template |
Hi my name is Gregor Müllegger. I'm a Computer Science student in Germany at the University of Augsburg currently in the fourth year of my studies. I first came to django shortly before 0.96 was released and a lots of awesomeness was introduced with the magic removal branch.
I'm also doing some django freelancing work since 2008 to finance my studies and attended DjangoCon EU in 2010. This year I would like to apply to