- Jeunet/caro (delicatessen, TS spivet, etc)
- Pulp fiction
- Cornetto's (Hot fuzz, shaun of the dead, etc)
- Zombieland
- District 9
- Kill bill (1 & 2)
- Grand budapest hotel
- Reservoir dogs
- Inglourious Basterds
- ExistenZ
This file contains hidden or 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
from django.forms import SelectMultiple | |
from django.db import models | |
from django.contrib import admin | |
class EmailOperationAdmin(admin.ModelAdmin): | |
list_display = ('store', 'date', 'mail_object') | |
formfield_overrides = { | |
models.ManyToManyField: { | |
'widget': SelectMultiple(attrs={'size': '15', 'style': 'width:600px;'}) |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
from django.contrib import admin | |
from django.db import models | |
from django.forms import SelectMultiple | |
from gpdis.intranet.apps.commerce.models import Promotions, StoreAdmin | |
class PromotionsAdmin(admin.ModelAdmin): | |
list_display = ('network', 'platform', 'start', 'end', 'source_code', 'attached_file') | |
list_filter = ('platform', 'network', 'start', 'end') |
This file contains hidden or 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
if(location.href.search('paginate_by') > 0){ | |
regExp = /paginate_by=(\d+)/; | |
location.href = location.href.replace(regExp, 'paginate_by='+val); | |
} |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
from django.db import models | |
from django.core.cache import cache | |
from django.db.models.query import QuerySet | |
from utils import key_for_instance | |
class CachedQuerySet(QuerySet): | |
def get_pk(self, kwargs): |
This file contains hidden or 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
SELECT nspname || '.' || relname AS "relation", | |
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
AND C.relkind <> 'i' | |
AND nspname !~ '^pg_toast' | |
ORDER BY pg_total_relation_size(C.oid) DESC | |
LIMIT 20; |
Consider having a cow that gives a child every year from her fourth year of life on and all her subsequent children do the same.
After n years how many cows will you have?
count_cows(0) # should equal 1
count_cows(1) # should equal 1
count_cows(3) # should equal 2
count_cows(4) # should equal 3
count_cows(10) # should equal 28
Create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "goto_definition"
The drawing below gives an idea of how to cut a given "true" rectangle into squares ("true" rectangle meaning that the two dimensions are different).
Can you translate this drawing into an algorithm?
You will be given two dimensions
a positive integer length (parameter named lng
)
a positive integer width (parameter named wdth
)
This file contains hidden or 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 subprocess | |
import time | |
import os | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
class WatchMeDo(FileSystemEventHandler): | |
""" |
OlderNewer