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
Ext.define('My.mvc.ViewController', { | |
extend: 'Deft.mvc.ViewController', | |
constructor: function () { | |
var me = this; | |
me.control = me.control ? Ext.clone(me.control) : {}; | |
me.mergeBehaviors(me); |
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
''' | |
Created on Oct 29, 2012 | |
@author: jacobg | |
''' | |
from django.contrib.auth.decorators import login_required | |
from django.shortcuts import render_to_response | |
from django.template import RequestContext | |
from django.views.decorators.http import require_GET |
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
<html> | |
<head> | |
{% if next_url != None %} | |
<meta http-equiv="refresh" content="0;url={{ next_url }}"/> | |
{% endif %} | |
</head> | |
<body> | |
<h3>Queue tasks for {{ task_name }}</h3> | |
<ul> | |
<li>Started at: {{ item_id }}</li> |
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
var Https = require('https'), | |
Querystring = require('querystring'), | |
result = [], | |
token = '{{ MY API KEY }}', | |
params = { | |
'from': '2013-05-31', | |
'to': '2013-05-31', | |
//'paylocation': 0, | |
//'clocklocation': 0, | |
//'employee': 0, |
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 httplib import HTTPSConnection | |
from urllib import urlencode | |
token = '{{ MY API KEY }}' | |
params = { | |
'from': '2013-05-31', | |
'to': '2013-05-31', | |
#'paylocation': 0, | |
#'clocklocation': 0, | |
#'employee': 0, |
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
using System; | |
using System.Net.Http; | |
namespace ConsoleApplication2 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string token = "{{ MY API KEY }}"; |
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 datetime import date, datetime, time, timedelta | |
today= date.today() | |
sunrise = datetime.combine(today, time(7,3,56)) | |
sunset = datetime.combine(today, time(17,46,35)) | |
dawn = sunrise - timedelta(minutes=72) | |
dusk = sunset + timedelta(minutes=72) | |
earliest_time = min(dawn + (dusk-dawn)*5/12, sunrise + (sunset-sunrise)*5/12) | |
print('Earliest time = %s' % earliest_time.isoformat()) |
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
# | |
# Based on this patch: https://github.com/craigds/django-rest-framework/compare/writable-dotted-field-source | |
# The purpose of this patch is to support writable fields using dotted source. It lets you do stuff like this: | |
# class UserProfileSerializer(ModelSerializer): | |
# | |
# user = PrimaryKeyRelatedField(read_only=True) | |
# | |
# active = BooleanField(source='user.is_active') | |
# first_name = CharField(source='user.first_name') | |
# last_name = CharField(source='user.last_name') |
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.conf import settings | |
from django.core.exceptions import ImproperlyConfigured | |
from django.db import connection, models | |
from django.db.models import permalink, get_model | |
from django.utils.translation import ugettext_lazy as _ | |
from django_extensions.db.fields import AutoSlugField | |
from django_extensions.db.models import TimeStampedModel | |
from organizations.managers import OrgManager, ActiveOrgManager |
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
package com.googlecode.cqengine; | |
import com.googlecode.cqengine.attribute.SimpleAttribute; | |
import com.googlecode.cqengine.index.navigable.NavigableIndex; | |
import com.googlecode.cqengine.index.unique.UniqueIndex; | |
import com.googlecode.cqengine.quantizer.DoubleQuantizer; | |
import com.googlecode.cqengine.query.Query; | |
import com.googlecode.cqengine.query.option.QueryOptions; | |
import com.googlecode.cqengine.resultset.ResultSet; |
OlderNewer