Skip to content

Instantly share code, notes, and snippets.

View amul047's full-sized avatar

Aamir Mulla amul047

  • Auckland, New Zealand
  • 12:21 (UTC +12:00)
  • LinkedIn in/aamirmulla
View GitHub Profile
@amul047
amul047 / samplefruits.cs
Created January 21, 2025 04:54
Using Azure OpenAI and Semantic Kernel to Analyze Citrus Fruits with Confidence Scores
using Azure.Identity;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using OpenAI.Chat;
using System.Text.Json;
using table.lib;
Kernel kernel = Kernel.CreateBuilder()
.AddAzureOpenAIChatCompletion(
deploymentName: "gpt-4o", // Specify your deployment name
@amul047
amul047 / RAGWithAzureAiOpenAi2Beta2
Created July 4, 2024 22:25
RAG with `Azure Search` (Retrieval) and (Augmented) `Azure OpenAI` (Generation) using `Microsoft.SemanticKernel.Connectors.OpenAI` `1.15.1` and `Azure.AI.OpenAI` `2.0.0-beta2`
using Azure;
using Azure.AI.OpenAI;
using Azure.AI.OpenAI.Chat;
using OpenAI.Chat;
var prompt = "..";
var azureOpenaiEndpoint = "https://...openai.azure.com/";
var azureOpenaiApiKey= "..";
var azureOpenAiDeploymentName = "..";
@amul047
amul047 / RAG1.cs
Last active July 4, 2024 02:41
RAG with `Azure Search` (Retrieval) and (Augmented) `Azure OpenAI` (Generation) using `Microsoft.SemanticKernel.Connectors.OpenAI` `1.15.1`
using Azure;
using Azure.AI.OpenAI;
var prompt = "..";
var azureOpenaiEndpoint = "https://...openai.azure.com/";
var azureOpenaiApiKey= "..";
var azureOpenAiDeploymentName = "..";
@amul047
amul047 / github_org_stats.py
Last active March 6, 2024 21:56 — forked from carsongee/github_org_stats.py
Grab Contributor Statistics for a Given GitHub Organization
#!/usr/bin/env python
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
@amul047
amul047 / JS-LINQ.js
Last active February 23, 2025 07:07 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
{ name: "Judy", age: 42 },
{ name: "Tim", age: 8 }