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
<!-- http://jsbin.com/utucah/1 In free form --> | |
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%> | |
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%> | |
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui"%> | |
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet"%> | |
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%> | |
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%> | |
<%@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util"%> |
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
package com.nokia.oss; | |
/* | |
* JBoss, Home of Professional Open Source | |
* Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual | |
* contributors by the @authors tag. See the copyright.txt in the | |
* distribution for a full listing of individual contributors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. |
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
__author__ = 'acp' | |
import re | |
import fileinput | |
import operator | |
import sys | |
objectschanged={} | |
def create_object_list(line2,mapofObjects,instance): |
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
# Testing simlation of generating random points | |
from __future__ import division | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.axes_grid1 import host_subplot | |
import mpl_toolkits.axisartist as AA | |
def create_random_point(x0,y0,distance): | |
""" | |
Utility method for simulation of the points |
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 __future__ import division | |
import numpy as np | |
RADIUS_OF_EARTH_IN_KM = 6371.01 | |
def haversine(lat1, lon1, lat2, lon2): | |
""" | |
Utility to calcutlate distance between two pointtodo explain regarding height | |
coverting from geodisc co-ordinate to cartestian gives errors when distances are further apart |
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
# Gevent Queue | |
from gevent import queue | |
import gevent | |
from enum import Enum | |
import time | |
import threading | |
class EventId(Enum): | |
event_added = 1 |
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
# http://stackoverflow.com/questions/390250/elegant-ways-to-support-equivalence-equality-in-python-classes | |
# http://stackoverflow.com/questions/4352244/python-implementing-ne-operator-based-on-eq/30676267#30676267 | |
class Test1(object): | |
""" | |
Proper way to override equality | |
""" | |
def __init__(self, str1, str2, num1): | |
self.str1 = str1 |
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 collections import namedtuple | |
from operator import itemgetter | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.axes_grid1 import host_subplot | |
fig =plt.figure(figsize=(10, 8), dpi=80) | |
ax = plt.gca() | |
def parse_tree(node,prev_node=None,label='Root'): | |
# Helper utility to display the KD tree graphically to understand the spatial split |
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
package run | |
import java.io.File | |
import akka.actor.{Actor, ActorRef, ActorSelection, ActorSystem, Props} | |
import com.typesafe.config.ConfigFactory | |
import org.slf4j.LoggerFactory | |
/** | |
* Created by acp on 25-08-2016. |
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
#include "stdafx.h" | |
#include <iostream> | |
#include <time.h> | |
#include "opencv2/objdetect.hpp" | |
#include "opencv2/highgui.hpp" | |
#include "opencv2/imgproc.hpp" | |
#include "opencv2/cudaobjdetect.hpp" | |
#include "opencv2/cudaimgproc.hpp" | |
#include "opencv2/cudawarping.hpp" |
OlderNewer