Skip to content

Instantly share code, notes, and snippets.

View prombouts's full-sized avatar
🏠
Working from home

Peter Rombouts prombouts

🏠
Working from home
View GitHub Profile
{
"data": [
{
"datetime": "2016-10-01 00:15:00+02:00",
"feed-in": 0,
"reading": 5073078,
"usage": 56
},
{
"datetime": "2016-10-01 00:30:00+02:00",
@prombouts
prombouts / Example.cs
Created October 22, 2017 19:00
Azure Function Example
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
namespace SogetiBotFunctions
{
public static class Test
{
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"_artifactsLocation": {
"type": "string"
},
"_artifactsLocationSasToken": {
"type": "securestring"
},
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"configurationParameters": {
"value": {
"logicAppSkuName": "Standard",
"logicAppOneName": "LogicAppOne",
"logicAppTwoName": "LogicAppTwo"
}
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": {
"value": "LogicAppOne"
},
"NewLogicAppName": {
"value": "LogicAppTwo"
}
using System;
using System.Configuration;
using Microsoft.ProjectOxford.Text.Sentiment;
using System.Xml;
using System.ServiceModel.Syndication;
using System.Collections.Generic;
using System.Linq;
namespace TextAnalysis
{
public void DoWork()
{
var tmpfile = SaveImageCapture((BitmapSource)player.Source);
var emotions = await MakeRequest(tmpfile);
if (emotions == null ||
!emotions.Any())
{
txtNoFaces.Text = $"Detected faces: none";
return;