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 golang:1.15.8 | |
WORKDIR /app | |
RUN mkdir -p /app/resources/db/mysql | |
RUN go get -v github.com/rubenv/sql-migrate/... | |
RUN git clone https://github.com/vishnubob/wait-for-it.git | |
RUN chmod -R 777 /app/wait-for-it | |
RUN chmod +x /app/wait-for-it/wait-for-it.sh | |
EXPOSE 9090 |
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
echo 'Formatting the code base...' | |
godep go fmt $(go list ./... | grep -v /vendor/) | |
echo 'Optimizing the imports...' | |
goimports -w $(go list -f {{.Dir}} ./... | grep -v /vendor/) | |
echo 'Installing dependencies. This might take some time...' | |
godep go install $(go list ./... | grep -v /vendor/) | |
echo "Executing test" |
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 main | |
import ( | |
"encoding/json" | |
"os" | |
"database/sql" | |
"gopkg.in/gorp.v1" | |
"log" | |
_ "github.com/go-sql-driver/mysql" | |
) |
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
[main] | |
logdir=/var/log/puppet | |
vardir=/var/lib/puppet | |
ssldir=/var/lib/puppet/ssl | |
rundir=/var/run/puppet | |
factpath=$vardir/lib/facter | |
templatedir=$confdir/templates | |
[master] | |
# These are needed when the puppetmaster is run by passenger |
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
<executionPlan xmlns="http://wso2.org/carbon/eventprocessor" name="isWithinCheckExePlan" statistics="enable" trace="enable"> | |
<description /> | |
<siddhiConfiguration> | |
<property name="siddhi.persistence.snapshot.time.interval.minutes">0</property> | |
<property name="siddhi.enable.distributed.processing">false</property> | |
</siddhiConfiguration> | |
<importedStreams> | |
<stream as="locationdatastream" name="locationDataInputStream" version="1.0.0" /> | |
</importedStreams> | |
<queryExpressions><![CDATA[from locationdatastream[geo:iswithin(lattitude,longitude,"{'type':'Polygon','coordinates':[[[79.85173402706208,6.909744100877063],[79.85442696491334,6.91094765233452],[79.85471664348692,6.9097654026993816],[79.85173402706208,6.908796168811299],[79.85173402706208,6.909744100877063]]]}")==true] select correlation_timeStamp,deviceId,lattitude,longitude, true as iswithin insert into iswithinstream;]]></queryExpressions> |
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
<eventFormatter xmlns="http://wso2.org/carbon/eventformatter" name="gpsOutputEventFormatter" statistics="enable" trace="enable"> | |
<from streamName="isWithinOutputStream" version="1.0.0" /> | |
<mapping customMapping="enable" type="json"> | |
<inline> | |
{ | |
"type": "Feature", | |
"geometry": { | |
"type": "Point", | |
"coordinates": [ | |
{{lattitude}}, |
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
<eventBuilder> | |
<from eventAdaptorName="httpInputAdaptor" eventAdaptorType="http"> | |
<property name="topic">locationInStream</property> | |
</from> | |
<mapping customMapping="enable" type="json"> | |
<property> | |
<from jsonPath="$.properties.timestamp" /> | |
<to default="0" name="correlation_timeStamp" type="string" /> | |
</property> | |
<property> |
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
<streamDefinitions> | |
<streamDefinition> | |
{ | |
"name": "locationDataInputStream", | |
"version": "1.0.0", | |
"nickName": "", | |
"description": "", | |
"correlationData": [ | |
{ | |
"name": "timeStamp", |
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
{ | |
"type": "Feature", | |
"geometry": { | |
"type": "Point", | |
"coordinates": [ | |
79.852452, | |
6.909472 | |
] | |
}, | |
"properties": { |
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 "opencv2/highgui/highgui.hpp" | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include <iostream> | |
#include <stdio.h> | |
#include <stdlib.h> | |
using namespace cv; | |
using namespace std; | |
Mat src; Mat src_gray; |
NewerOlder