Skip to content

Instantly share code, notes, and snippets.

@neggert
neggert / inception_v3.py
Created April 6, 2016 17:35
Inception-v3 implementation in Keras
from keras.models import Model
from keras.layers import (
Input,
Dense,
Flatten,
merge,
Lambda
)
from keras.layers.convolutional import (
Convolution2D,
@tibbiyelininja
tibbiyelininja / django_wsgi.py
Created July 2, 2014 13:34
Possible fix to gunicorn's Django 1.7 bug: No module named django.core.management.validation
# -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
""" module used to build the django wsgi application """
import os
import re
import sys
@mtigas
mtigas / gist:1304751
Created October 21, 2011 19:44 — forked from ryanpitts/gist:1304725
GROUP BY and Select MAX from each group in Django, 2 queries
'''
given a Model with:
category = models.CharField(max_length=32, choices=CATEGORY_CHOICES)
pubdate = models.DateTimeField(default=datetime.now)
<other fields>
Fetch the item from each category with the latest pubdate.
'''
@ryanpitts
ryanpitts / gist:1304725
Created October 21, 2011 19:34
GROUP BY and Select MAX from each group in Django, 2 queries
'''
given a Model with:
category = models.CharField(max_length=32, choices=CATEGORY_CHOICES)
pubdate = models.DateTimeField(default=datetime.now)
<other fields>
Fetch the item from each category with the latest pubdate.
'''