Skip to content

Instantly share code, notes, and snippets.

@amul047
amul047 / JS-LINQ.js
Last active July 20, 2020 03:12 — 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 }
@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 / 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 / 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 = "..";