Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
namespace SchedulerApi.Filters
{
/// <inheritdoc />
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage.Blob;
namespace ConsoleApp
//Script GUID:58510d92-ebdf-40e0-a6bf-edf02736c276
//Used for tracking history
MODULE @"/shares/AzureAnalytics.Prod/Sdk/AzureAnalytics1.3.module" AS AzureAnalytics;
AzureAnalytics.Initialize
(
entity = "Microsoft.Cloud.ailxbeft"
);
using Microsoft.SCOPE.Types;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using ScopeRuntime;
public class IngestionLatencyDataProcessor : Processor
{
/// <summary>
"use strict";
let aws = require('aws-sdk'),
fs = require('fs'),
q = require('q'),
s3 = new aws.S3({signatureVersion: 'v4'}),
Logger = require('pretty-logger'),
log = new Logger(),
lambda = new aws.Lambda({region: 'us-east-1'});
let path = require('path');
let aws = require('aws-sdk');
let s3Client = new aws.S3();
let zlib = require('zlib');
let s3s = require('s3-streams');
const output_bucket = "stackoverflow-bucket";
exports.handler = (event, context, callback) => {
context.callbackWaitsForEmptyEventLoop = false;
@johnib
johnib / gist:14b090d0883ee2d2fb56dd3ac3c82f9b
Last active January 25, 2023 18:30
Copy S3 data to DynamoDB
let path = require('path');
let aws = require('aws-sdk');
let s3 = new aws.S3();
let zlib = require('zlib');
let docClient = new aws.DynamoDB.DocumentClient();
exports.handler = (event, context, callback) => {
context.callbackWaitsForEmptyEventLoop = false;
event.Records.forEach(record => {
class Program
{
static void Main(string[] args)
{
var someClassInstance = new SomeClass();
someClassInstance.DoSomething();
}
}
class Retry : Attribute
@retry(wait_exponential_multiplier=250,
wait_exponential_max=4500,
stop_max_attempt_number=8,
retry_on_result=lambda failures_count: failures_count > 0)
def put():
global non_delivered_tweets
logger.info("Executing Firehose put_batch command on {} tweets".format(len(non_delivered_tweets)))
response = firehose.put_record_batch(DeliveryStreamName=firehose_stream_name, Records=non_delivered_tweets)
[PlusPlus]
public int ReturnOne()
{
return 1;
}
ReturnOne(); // returns '2';