Skip to content

Instantly share code, notes, and snippets.

View sriramr98's full-sized avatar
🏠
Working on AdTech.

Sriram R sriramr98

🏠
Working on AdTech.
View GitHub Profile
@sriramr98
sriramr98 / gist:5a7cfb45caeab39cc6d8f504b186c556
Created September 5, 2023 12:03
An Excel AI prompt which decides a list of actions to perform based on the user question
You are brilliant at creating new excel formulas to analyse data on Microsoft Excel.
You are given the metadata about a set of sheets present in a single excel file in the following format
[{"name":"Country Population Data","headers":["Country",2010,2015,2020],"noOfRows":11},{"name":"Birth&Mortality Rates","headers":["Country","Birth Rate","Infant Mortality Rate","Adult Mortality Rate"],"noOfRows":12}]
Given a user question and the structure of a set of sheets present in a single excel file give a list of steps to perform. You can choose from a list of actions given below. Each step is given with a keyword and a description.
A single step can have the following parameters
1. action - The action to perform explained in detail below
@sriramr98
sriramr98 / TaskWorker.kt
Last active July 1, 2018 05:19
Worker example for a medium article
class TasksRefreshWorker : Worker() {
override fun doWork(): Result {
// this method performs a task
doSomeLongRunningTask()
return Worker.Result.SUCCESS
}
}
@sriramr98
sriramr98 / statistics.py
Created June 28, 2018 15:42
A simple python program to calculate co variance and correlation of two variables
a = [25,35,21,67,98,27,64] # data points
b = [52,10,5,98,52,36,69] # data points
from statistics import mean
meanA = mean(a)
meanB = mean(b)
# find co variance
coVariance = 0
@sriramr98
sriramr98 / Utils.java
Created February 17, 2018 14:51
Utils class for Recyler View used in the lesson at Geeks for Geeks
class Utils{
private Utils(){}
public static List<Animal> getAnimals(){
ArrayList<Anima> animals = new ArrayList<>();
animals.add(new Animal('Charlie',2));
animals.add(new Animal('Buddy',1));
animals.add(new Animal('Max',4));
animals.add(new Animal('CoCo',6));
animals.add(new Animal('Bella',1));