Skip to content

Instantly share code, notes, and snippets.

View jalotra's full-sized avatar

ShivamJalotra jalotra

View GitHub Profile
@jalotra
jalotra / human_eval_test_data.txt
Created July 8, 2021 18:24
Human Eval Human Readable Tests(Total of 164) (Test Data Repo : https://github.com/openai/human-eval)
---------------------------------------WRITING INFO ABOUT TEST 0----------------------------------------
-------------PROMPT----------------
from typing import List
def has_close_elements(numbers: List[float], threshold: float) -> bool:
""" Check if in given list of numbers, are any two numbers closer to each other than
given threshold.
#include <stdio.h>
#include <stdlib.h>
typedef struct Node {
size_t size;
struct Node* next;
} Node;
typedef struct {
void* pool_start;
def get_prompt_from_azure(message: str):
# Create an openAI connection every time the request is sent !
AZURE_API_ENDPOINT = os.environ.get("AZURE_API_ENDPOINT")
AZURE_API_KEY = os.environ.get("AZURE_API_KEY")
AZURE_API_DEPLOYMENT_NAME = "gpt-35-turbo-france"
AZURE_API_VERSION = "2023-05-15"
url = f"{AZURE_API_ENDPOINT}/openai/deployments/{AZURE_API_DEPLOYMENT_NAME}/chat/completions?api-version={AZURE_API_VERSION}"
var form = document.querySelector("form");
var nextBtn = form.querySelector(".nextBtn");
var backBtn = form.querySelector(".backBtn");
var allInput = form.querySelectorAll(".input-field");
nextBtn.addEventListener("click", () => {
allInput.forEach(input => {
if(input.value !== ""){
form.classList.add('secActive');
}else{
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IEne=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Regisration Form </title>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body{
min-height: 100vh;
display: flex;
align-items: center;
@jalotra
jalotra / CVP SQL gist
Last active September 26, 2023 03:45
CREATE TABLE Org
(
id INT NOT NULL AUTO_INCREMENT,
marketplace VARCHAR NOT NULL,
created_at DATE NOT NULL,
updated_at DATE NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE Surveyor
@jalotra
jalotra / sample_code.py
Last active May 10, 2024 07:48
Example Code to generate Tree out of RAPTOR
from .tree_structures import Tree, Node
from igraph import Graph, EdgeSeq
import plotly.graph_objects as go
import pickle
from ..routes.DocumentRoutes import read_redis_document
from ..routes.DocumentRoutes import get_redis_db
# Formats data so that plotly can plot it better,
# each line should have less than 80 characters and
{
"company_data": {
"company": {
"business_challenges": "Here are the top three business challenges discussed in the OKTA earnings call:\n\n1. **Security Incident and Its Aftermath**:\n - The company experienced a security incident in October, which required significant effort to manage and mitigate. Although the incident is now behind them, it had some unquantifiable impact on Q4 results. The company is using the learnings from this incident to reassess and strengthen its security infrastructure and customer policies through initiatives like the Okta Secure Identity Commitment and Project Bedrock.\n\n2. **Reigniting Growth**:\n - OKTA is focused on reigniting growth, which has decelerated. This involves improving go-to-market operational excellence, increasing competitiveness in core markets, and enhancing growth vectors in key industries and newly introduced products. Specific strategies include shifting the direct sales team to a hunter-farmer model to drive new customer acquisition and ups
{
"status": "success",
"data": {
"conversation": {
"uuid": "CONV-b0e2bcf4-f909-4bfa-a361-d1ffeac2a604",
"workspaceId": 13262382,
"createdAt": "2024-05-22T13:13:43.379Z",
"projectId": 38877338,
"context": {}
},