Skip to content

Instantly share code, notes, and snippets.

View AbhiOnGithub's full-sized avatar
🎯
Focusing

Abhishek Gupta AbhiOnGithub

🎯
Focusing
View GitHub Profile
@AbhiOnGithub
AbhiOnGithub / pulumi.go
Created March 8, 2023 08:18
Using Pulumi and GoLang
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a policy document that allows access to a specific S3 bucket
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision;
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
namespace TestVisionAPI
{
class Program
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
// NOTE: Install the Newtonsoft.Json NuGet package.
@AbhiOnGithub
AbhiOnGithub / bing.html
Last active August 22, 2018 15:22
Code to Showcase Bing Search APIs - Reference Microsoft Documentation
<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<!-- the above Mark of the Web lets IE run this page in the Internet security zone,
avoiding the permission prompt for running active content such as JavaScript -->
<html>
<head>
<meta charset="UTF-8">
<title>Bing Web Search API Demo</title>
<base target="_blank">
<style type="text/css">
<#
.DESCRIPTION
An example runbook which gets all the ARM resources using the Run As Account (Service Principal)
.NOTES
AUTHOR: Azure Automation Team
LASTEDIT: Mar 14, 2016
#>
$connectionName = "AzureRunAsConnection"
@AbhiOnGithub
AbhiOnGithub / VMDeployARMTemplate.js
Created July 30, 2018 09:36
ARM Template to deploy 1 vm 2 nics 2subnets and 1vnet
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"virtualMachineSize": {
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.ML;
using Microsoft.ML.Data;
using Microsoft.ML.Models;
using Microsoft.ML.Trainers;
using Microsoft.ML.Transforms;
internal class TestSentimentData
{
internal static readonly IEnumerable<SentimentData> Sentiments = new[]
{
new SentimentData
{
SentimentText = "Contoso's 11 is a wonderful experience",
Sentiment = 0
},
new SentimentData
public class SentimentPrediction
{
[ColumnName("PredictedLabel")]
public bool Sentiment;
}
public class SentimentData
{
[Column("0")]
public string SentimentText;
[Column("1", name: "Label")]
public float Sentiment;
}