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 networkx.readwrite import json_graph | |
from rest_framework.exceptions import ValidationError | |
from rest_framework.fields import IntegerField | |
from utility.generics import get_lazy_dict_from_queryset | |
def get_merged_rubric_tree(question, required_keys, evaluation=None): | |
""" | |
combines question.rubrics and injects other meta data for that evaluation in the tree which can be used | |
in GET evaluation details |
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
the_json.carts.forEach(function(cart) { | |
total_cost = cart.total_cost | 0 | |
cashback = cart.cashback.applied_value | 0 | |
refund = cart.refund.applied_value | 0 | |
total = total + total_cost - cashback - refund | |
}) |
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
{ | |
"sports" : { | |
"cricket" : "Rs 12000/day", | |
"tennis" : "Rs 300/hr", | |
"tt" : "Rs 150/hr", | |
"badminton" : "Rs 150/hr", | |
"basketball" : "Rs 150/hr", | |
"pool" : "Rs 100/frame", | |
"swimming" : "Rs 200/hr" | |
}, |
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 config = require('./config.js'); | |
var oio = require('orchestrate'); | |
oio.ApiEndPoint = config.db.region; | |
var db = oio(config.db.key); | |
var constants = require('./constants'); | |
var qbchat = require('./Chat/qbchat'); | |
/** | |
* Orchestrate query wrappers ----------------------------------> | |
* Query helpers to make life a lot, lot easier |
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
//kardo sab import, node only uses it once | |
var config = require('../config.js'); | |
var oio = require('orchestrate'); | |
oio.ApiEndPoint = config.db.region; | |
var db = oio(config.db.key); | |
var customUtils = require('../utils.js'); | |
var constants = require('../constants'); | |
var qbchat = require('../Chat/qbchat'); | |
var UserModel = require('../models/User'); | |
//var MatchModel = require('../models/Match'); |
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
/** | |
* TODO: switch to schema based validation | |
*/ | |
var express = require('express'); | |
global.mod = function (file){ | |
return require ("./" + file) | |
} | |
global.__base = __dirname + '/'; | |
var path = require('path'); | |
var fs = require('fs') |
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
String mimeType = conceptObject.getMimetype().toString(); | |
//Log.e("", "The mime type is" + mimeType); | |
Boolean openInGoogleDocs = false; | |
switch (mimeType) { | |
case "application/msword": | |
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": | |
case "application/vnd.openxmlformats-officedocument.wordprocessingml.template": | |
case "application/vnd.oasis.opendocument.text": | |
fileView.setImageResource(R.drawable.doc_file_type); |
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:1.1.0' | |
// NOTE: Do not place your application dependencies here; they belong |
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
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 21 | |
buildToolsVersion "22.0.0" | |
defaultConfig { | |
minSdkVersion 14 |
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
ankan@ankan-ad:~/AndroidStudioProjects/pyoopil_android$ ./gradlew assembleDebug --offline | |
Parallel execution is an incubating feature. | |
:app:preBuild | |
:library:compileLint UP-TO-DATE | |
:app:preDebugBuild UP-TO-DATE | |
:app:compileDebugNdk | |
:library:copyReleaseLint UP-TO-DATE | |
:library:preBuild UP-TO-DATE | |
:library:preReleaseBuild UP-TO-DATE | |
:library:checkReleaseManifest UP-TO-DATE |