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
def get(self, request): | |
return { | |
"rooms": [ | |
{attrName: attrVal for attrName, attrVal in model_to_dict(x).items() | |
if attrName in RoomView.ROOM_PUBLIC_FIELDS} | |
for x in Room.objects.all() | |
] | |
} |
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 nose | |
import functools | |
_either_or_map = dict() | |
def either_or(key='default', expected_failures=1): | |
def either_or_decorator(test): | |
global _either_or_map |
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
define([ | |
'jquery', | |
'jqueryui', | |
'jquery_cookie', | |
'underscore', | |
'backbone', | |
'app/views/tapEngage.view', | |
// Using the Require.js text! plugin, we are loaded raw text | |
// which will be used as our views primary template |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
using RFIDeas_pcProxAPI; | |
using System.Net; | |
using System.Threading; | |
using System.IO; |
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
class _Singleton(type): | |
"""Singleton class from Stack Overflow: | |
http://stackoverflow.com/a/6798042 | |
""" | |
_instances = {} | |
def __call__(cls, *args, **kwargs): | |
if cls not in cls._instances: | |
cls._instances[cls] = super(_Singleton, cls).__call__(*args, **kwargs) |
NewerOlder