This file contains hidden or 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
{ | |
"bindings": [ | |
{ | |
"name": "inputBlob", | |
"type": "blobTrigger", | |
"direction": "in", | |
"path": "samples-workitems/input/{name}", | |
"connection": "AzureWebJobsDashboard" | |
}, | |
{ |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title></title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="style.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div class="container"> |
This file contains hidden or 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
void Main() | |
{ | |
int outRate = 16000; | |
var inFile = @"E:\example input file.mp3"; | |
var outFile = @"E:\Input Driven Resampled.wav"; | |
using (var reader = new AudioFileReader(inFile)) | |
using (var writer = new WaveFileWriter(outFile, WaveFormat.CreateIeeeFloatWaveFormat(outRate, reader.WaveFormat.Channels))) | |
{ | |
var read = 0; |
This file contains hidden or 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
version: '2.2' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.1 | |
container_name: elasticsearch | |
environment: | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
ulimits: |
This file contains hidden or 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
{ | |
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"voteReplicaCount":{ | |
"defaultValue": "1", | |
"type": "string", | |
"metadata": { | |
"description": "The number of service replicas for the vote service." | |
} |
This file contains hidden or 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
$location = "West Europe" | |
$resGroupName = "RunFromPackageDemo" | |
az group create -n $resGroupName -l $location | |
$random = Get-Random -Minimum 10000 -Maximum 99999 | |
$storageAccountName = "runfrompackage$random" | |
az storage account create -n $storageAccountName -g $resGroupName --sku "Standard_LRS" | |
$connectionString = az storage account show-connection-string -n $storageAccountName -g $resGroupName --query "connectionString" -o tsv | |
$env:AZURE_STORAGE_CONNECTION_STRING = $connectionString |
This file contains hidden or 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
<Query Kind="Statements"> | |
<Namespace>System.Collections.Concurrent</Namespace> | |
<Namespace>System.Threading.Tasks</Namespace> | |
<Namespace>System.Threading.Tasks.Dataflow</Namespace> | |
</Query> | |
var produceSpeed = TimeSpan.FromSeconds(0.5); | |
var produceCount = 20; | |
var consumeSpeed = TimeSpan.FromSeconds(2); | |
var maxParallelConsume = 4; |
This file contains hidden or 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
string[] SizeSuffixes = { "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" }; | |
string SizeSuffix(long value, int decimalPlaces = 0) | |
{ | |
if (value < 0) | |
{ | |
throw new ArgumentException("Bytes should not be negative", "value"); | |
} | |
var mag = (int)Math.Max(0, Math.Log(value, 1024)); | |
var adjustedSize = Math.Round(value / Math.Pow(1024, mag), decimalPlaces); | |
return $"{adjustedSize} {SizeSuffixes[mag]}"; |
OlderNewer