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
'use strict'; | |
var browserify = require('browserify'); | |
var config = require('../config'); | |
var gulp = require('gulp'); | |
var handleErrors = require('../util/handleErrors'); | |
var bundleLogger = require('../util/bundleLogger'); | |
var source = require('vinyl-source-stream'); | |
var notify = require("gulp-notify"); |
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
from __future__ import absolute_import | |
import datetime | |
from functools import wraps | |
from django.core.cache import cache | |
from django.core.exceptions import ImproperlyConfigured | |
from logging import getLogger | |
log = getLogger(__name__) |
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
'use strict'; | |
var browserify = require('browserify'); | |
var config = require('../config'); | |
var gulp = require('gulp'); | |
var handleErrors = require('../util/handleErrors'); | |
var bundleLogger = require('../util/bundleLogger'); | |
var source = require('vinyl-source-stream'); | |
var notify = require("gulp-notify"); |
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
/** @jsx React.DOM */ | |
var BootstrapModalMixin = function() { | |
var handlerProps = | |
['handleShow', 'handleShown', 'handleHide', 'handleHidden'] | |
var bsModalEvents = { | |
handleShow: 'show.bs.modal' | |
, handleShown: 'shown.bs.modal' | |
, handleHide: 'hide.bs.modal' |
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
MainView = React.createClass | |
mixins: [RouterHelpersMixin] | |
render: -> | |
<body> | |
<NavbarView | |
actions={@props.models.actions} | |
filters={@props.models.navbarFilters} |
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
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, print_function, unicode_literals | |
from six import string_types, integer_types | |
from itertools import chain | |
class EnumMetaclass(type): | |
"""Metaclass for enumerations. |
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
ActionBar = React.createClass | |
mixins: [ | |
React.BackboneMixin("actions") | |
] | |
render: -> | |
<ul className="nav navbar-nav"> | |
<li className="dropdown"> | |
<a className="dropdown-toggle" data-toggle="dropdown" href='#'> |
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
# object instances as default arguments are evil | |
def nevar_forget(constarg={}): | |
constarg[len(constarg)] = 'the catch' | |
print(constarg) | |
return constarg | |
assert(nevar_forget() == {0: 'the catch'}) | |
assert(nevar_forget() == {0: 'the catch', 1: 'the catch'}) | |
assert(nevar_forget() == {0: 'the catch', 1: 'the catch', 2: 'the catch'}) |