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
npm install azure-iot-device-mqtt |
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
'use strict'; | |
var clientFromConnectionString = require('azure-iot-device-mqtt').clientFromConnectionString; | |
var Message = require('azure-iot-device').Message; | |
function azcall() | |
{ | |
var connectionString = 'YOUR CONNECTION STRING'; | |
var client = clientFromConnectionString(connectionString); |
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
{ | |
"frameworks": { | |
"net46":{ | |
"dependencies": { | |
"Newtonsoft.Json": "10.0.3", | |
"System.ServiceModel.Primitives":"4.4.0", | |
"MongoDB.Bson": "2.4.0", | |
"MongoDB.Driver": "2.4.0", | |
"MongoDB.Driver.Core": "2.4.0" | |
} |
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
using System; | |
using System.Runtime.Serialization; | |
using System.ServiceModel.Description; | |
using MongoDB.Bson.IO; | |
using MongoDB.Bson; | |
using MongoDB; | |
using MongoDB.Driver; | |
using System.Security.Authentication; | |
using System.Text; | |
using Newtonsoft.Json; |
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
using System; | |
using System.Runtime.Serialization; | |
using System.ServiceModel.Description; | |
using MongoDB.Bson.IO; | |
using MongoDB.Bson; | |
using MongoDB; | |
using MongoDB.Driver; | |
using System.Security.Authentication; | |
using System.Text; | |
using Newtonsoft.Json; |
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 print_function | |
import sys | |
import os | |
from argparse import ArgumentParser | |
import cv2 | |
import time | |
import logging as log | |
import numpy as np | |
import io | |
from openvino.inference_engine import IENetwork, IEPlugin |
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
class Detectors(object): | |
#Constructor | |
def __init__(self, device, model, cpu_extension, plugin_dir,is_async_mode): | |
self.cpu_extension = cpu_extension | |
self.plugin_dir = plugin_dir | |
self.is_async_mode = is_async_mode | |
self.device=device | |
self.model=model | |
def initialise_inference(self): |
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
class Processor(object): | |
#Constructor | |
def __init__(self,exec_net,input_blob,out_blob,n,c,h,w): | |
self.exec_net=exec_net | |
self.input_blob=input_blob | |
self.out_blob=out_blob | |
self.n=n | |
self.c=c | |
self.h=h | |
self.w=w |
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 print_function | |
import sys | |
import os | |
from argparse import ArgumentParser | |
import cv2 | |
import time | |
import logging as log | |
import numpy as np | |
import io | |
import detect as dt |
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 initialise_inference(self): | |
model_xml=self.model | |
model_bin = os.path.splitext(model_xml)[0] + ".bin" | |
# Plugin initialization for specified device and load extensions library if specified | |
log.info("Initializing plugin for {} device...".format(self.device)) | |
plugin = IEPlugin(device=self.device, plugin_dirs=self.plugin_dir) | |
if self.cpu_extension and 'CPU' in self.device: | |
log.info("Loading plugins for {} device...".format(self.device)) |
OlderNewer