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
# encoding: utf-8 | |
# Derived from Piotr Maliński's example with a few modifications to use logging and : | |
# http://www.rkblog.rk.edu.pl/w/p/profiling-django-object-size-and-memory-usage-pympler/ | |
from pympler import muppy | |
from pympler.muppy import summary | |
from pympler.asizeof import asizeof | |
from django.conf import settings | |
import logging |
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
import datetime | |
from django.conf import settings | |
from django.contrib.auth import logout | |
from django.contrib.auth.models import User | |
from django.contrib.sessions.models import Session | |
from django.core.management.base import NoArgsCommand | |
from django.http import HttpRequest | |
from django.utils.importlib import import_module |
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 can be used in unit tests to simulate a DOM document. | |
I have implemented the bare minimum. Feel free to add more, or to change my implementation. | |
Sample Usage: | |
import 'jasmine'; | |
import { MockElement } from './support/mock-element'; |
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
/** | |
* WkHtmlToPdf table vertically-splitting hack | |
* Script to automatically split wide HTML tables that doesn't fit the width of the PDF page generated | |
* by WkHtmlToPdf (or equivalent) | |
* | |
* The general idea come from Florin Stancu <niflostancu@gmail.com> and his script wkhtmltopdf.tablesplit.js | |
* The implementation is quite different because the splitting is done vertically on a excessive | |
* wide table, while the original script was meant to split horizontally an excessive long table | |
* | |
* To use, you must adjust pdfPage object's contents to reflect your PDF's |