Skip to content

Instantly share code, notes, and snippets.

View tikluganguly's full-sized avatar

Tiklu Ganguly tikluganguly

View GitHub Profile
import can
import iothub_client
from iothub_client import *
from can.interfaces.interface import Bus
#global vars
message_timeout = 10000
protocol = IoTHubTransportProvider.AMQP
connection_string = "[add your connection string here]"
@tikluganguly
tikluganguly / Vector+Test.ipynb
Created October 9, 2017 16:29
A simple test file to test the performance of vector function execution in any infrastructure
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tikluganguly
tikluganguly / AsyncHelper.cs
Created May 23, 2017 15:43
Async Helper to run async method in synchronizied context of c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Utils
{
public static class AsyncHelper
<#
.SYNOPSIS
Provides an option to startup selected VMs
.DESCRIPTION
This runbook can be used for starting up a set of Azure RM VMs mentioned in the parameter
.PARAMETER connectionName
String value for Azure Runbook Connection Name. The default value of this should be AzureRunAsConnection
<#
.SYNOPSIS
Provides an option to shutdown selected VMs
.DESCRIPTION
This runbook can be used for shutting down a set of Azure RM VMs mentioned in the parameter
.PARAMETER connectionName
String value for Azure Runbook Connection Name. The default value of this should be AzureRunAsConnection
<!DOCTYPE html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script src="http://documentcloud.github.io/underscore/underscore-min.js"></script>
<script src="http://documentcloud.github.io/backbone/backbone-min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body ng-controller="Controller1">
@tikluganguly
tikluganguly / fizzbuzz.py
Created March 30, 2012 15:40
FizzBuzz in Pythong
for x in range(100): print x%3/2*'Fizz'+x%5/4*'Buzz' or x+1
@tikluganguly
tikluganguly / FizzBuzz.cs
Created March 30, 2012 15:39
FizzBuzz in LINQ
Enumerable.Range(1, 100).ToList().ForEach(i => Console.WriteLine((i % 3 == 0 && i % 5 == 0) ? "FizzBuzz" : (i % 5 == 0) ? "Buzz" : (i % 3 == 0) ? "Fizz" : i.ToString()));