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
{ | |
"fields": [ | |
{ | |
"id": "a", | |
"label": "STATE/UT", | |
"type": "string" | |
}, | |
{ | |
"id": "b", | |
"label": "DISTRICT", |
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
/* | |
* heatmap.js gmaps overlay | |
* | |
* Copyright (c) 2014, Patrick Wied (http://www.patrick-wied.at) | |
* Dual-licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) | |
* and the Beerware (http://en.wikipedia.org/wiki/Beerware) license. | |
*/ | |
function HeatmapOverlay(map, cfg){ | |
this.setMap(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
/* | |
* heatmap.js v2.0.0 | JavaScript Heatmap Library | |
* | |
* Copyright 2008-2014 Patrick Wied <heatmapjs@patrick-wied.at> - All rights reserved. | |
* Dual licensed under MIT and Beerware license | |
* | |
* :: 2014-08-05 01:42 | |
*/ | |
(function(a){var b={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}};var c=function i(){var a=function d(a){this._coordinator={};this._data=[];this._radi=[];this._min=0;this._max=1;this._xField=a["xField"]||a.defaultXField;this._yField=a["yField"]||a.defaultYField;this._valueField=a["valueField"]||a.defaultValueField;if(a["radius"]){this._cfgRadius=a["radius"]}};var c=b.defaultRadius;a.prototype={_organiseData:function(a,b){var d=a[this._xField];var e=a[this._yField];var f=this._radi;var g=this._data;var h=this._max;var i=this._min;var j=a[this._valueField]||1;var k=a.radius||this._cf |
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
{ | |
"objects": [ | |
{ | |
"resource_uri": "#", | |
"id": 2, | |
"name": "Software", | |
"slug": "software" | |
}, | |
{ | |
"resource_uri": "#", |
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 random import choice | |
name = raw_input("Enter your name : ") | |
rps = ['r','p','s'] | |
u = 0 | |
c = 0 | |
while 1: | |
print "R: Rock, P: Paper, S: Scissor" |
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 rest_framework import viewsets | |
from vendors.serializers import OrganisationSerializer | |
class OraganisationViewSet(viewsets.ModelViewSet): | |
queryset = Organisation.objects.all() | |
serializer_class = OrganisationSerializer | |
paginate_by = 10 | |
paginate_by_param = "page_size" |
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 .models import Organisation | |
from rest_framework import serializers | |
class OrganisationSerializer(serializers.HyperlinkedModelSerializer): | |
class Meta: | |
model = Organisation | |
fields = ('name', 'service_type', 'address', 'city', 'contact', 'logo', 'description') |
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 vendors import views | |
from rest_framework.routers import DefaultRouter | |
router = DefaultRouter() | |
router.register(r'organisations', views.OraganisationViewSet) | |
urlpatterns = patterns('', | |
url(r'^api/', include(router.urls)), | |
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), |
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
<Response> | |
<Dial callerId="919035162272"> | |
<User>sip:shashisp140702194927@phone.plivo.com</User> | |
</Dial> | |
</Response> |
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
{% extends "base.html" %} | |
{% block content %} | |
<hr/> | |
<center> | |
<form action="/adddata/" class="form-vertical" method="post"> {% csrf_token %} | |
<p> | |
{{ form.as_p }} |
NewerOlder