Skip to content

Instantly share code, notes, and snippets.

View okjodom's full-sized avatar
:octocat:
octocatin

okjodom

:octocat:
octocatin
View GitHub Profile
@okjodom
okjodom / anagram_checker.py
Last active March 22, 2017 04:48
Finding Anagrams
""" 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::
@okjodom
okjodom / Quotes.json
Created January 5, 2017 13:22 — forked from dmakk767/Quotes.json
Enlightened Quotes
[
{
"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"
},
{
@okjodom
okjodom / geonode2.4.x - Install in development mode
Created December 28, 2016 17:02
this bug when installing geonode 2.4.x, both in dev mode and in admin/deploy mode
(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
<!-- 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>
@okjodom
okjodom / filter.py
Last active November 16, 2016 19:14
## 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):
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 = ''
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@okjodom
okjodom / template_b_loader
Created November 2, 2016 17:45
Template bootleaf layer loader
/* 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]
@okjodom
okjodom / layer_loader.txt
Last active November 2, 2016 17:42
Bootleaf layer loader
/* 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]