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
/* Empty layer placeholder to add to layer control for listening when to add/remove theaters to markerClusters layer */ | |
var tweetLayer = L.geoJson(null); | |
var tweets = L.geoJson(null, { | |
pointToLayer: function (feature, latlng) { | |
return L.marker(latlng, { | |
icon: L.icon({ | |
iconUrl: "assets/img/tweet.png", | |
iconSize: [24, 28], | |
iconAnchor: [12, 28], | |
popupAnchor: [0, -25] |
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
/* Empty layer placeholder to add to layer control for listening when to add/remove theaters to markerClusters layer */ | |
var theaterLayer = L.geoJson(null); | |
var theaters = L.geoJson(null, { | |
pointToLayer: function (feature, latlng) { | |
return L.marker(latlng, { | |
icon: L.icon({ | |
iconUrl: "assets/img/theater.png", | |
iconSize: [24, 28], | |
iconAnchor: [12, 28], | |
popupAnchor: [0, -25] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 os | |
import requests | |
import json | |
import tweepy | |
from tweepy import Stream, StreamListener, OAuthHandler | |
# add keys from yout twitter app. create your app at http://apps.twitter.com/ | |
consumer_key = '' | |
consumer_secret = '' |
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
## some calls from the collector are refered here | |
#our data will be cached here | |
geo_data = { | |
"type": "FeatureCollection", | |
"features" : [] | |
} | |
# a function to save the data | |
def saveGeoData(self, geo_data): |
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
<!-- guess why I called this saurus, the eye --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
Happy Map | |
</title> | |
<link rel="stylesheet" href="https://npmcdn.com/leaflet@1.0.0-rc.2/dist/leaflet.css" /> | |
<script src="https://npmcdn.com/leaflet@1.0.0-rc.2/dist/leaflet.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> |
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
(geonode) jdev@linux /home/geonode/dev/geonode $ python manage.py migrate | |
Not enabling BingMaps base layer as a BING_API_KEY is not defined in local_settings.py file. | |
Traceback (most recent call last): | |
File "manage.py", line 28, in <module> | |
execute_from_command_line(sys.argv) | |
File "/home/geonode/dev/.venvs/geonode/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line | |
utility.execute() | |
File "/home/geonode/dev/.venvs/geonode/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/home/geonode/dev/.venvs/geonode/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv |
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
[ | |
{ | |
"quote" : "Life isn’t about getting and having, it’s about giving and being.", | |
"name": "Kevin Kruse" | |
}, | |
{ | |
"quote" : "Whatever the mind of man can conceive and believe, it can achieve.", | |
"name" : "Napoleon Hill" | |
}, | |
{ |
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
""" check if two words are anagrams """ | |
def anagramIst(fword, sword): | |
""" fword and sword are the first_word and the second_word respectively """ | |
# messages | |
negative = "The two words are not anagrams" | |
positive = "The two words" + str(fword) + " , " + str(sword) +" are anagrams" | |
#my interview implementation:: |
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 betterAnagramIst(fword, sword): | |
""" fword and sword are the first_word and the second_word respectively """ | |
# messages | |
negative = "The two words are not anagrams" | |
positive = "The two words " + str(fword) + " , " + str(sword) +" are anagrams" | |
#my interview implementation:: | |
#first, do a check to compare the lengths: | |
if len(fword) != len(sword): |
OlderNewer