Skip to content

Instantly share code, notes, and snippets.

View Keshav13142's full-sized avatar
๐Ÿš€

Keshav S Keshav13142

๐Ÿš€
View GitHub Profile
@Keshav13142
Keshav13142 / ContestInviteJoin.tsx
Created December 17, 2024 09:17
Contest invite
"use client"
import { useState } from "react"
import { Button } from "@/components/ui/button"
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
import { Input } from "@/components/ui/input"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
import { CalendarIcon, UsersIcon, TrophyIcon } from 'lucide-react'
@Keshav13142
Keshav13142 / start.bat
Created October 29, 2024 11:37
zebar start bat file
@echo off
@REM Start hidden powershell script, which runs `zebar open bar --args ...` for every monitor.
powershell -WindowStyle hidden -Command ^
taskkill -f -im zebar.exe; ^
$monitors = zebar monitors; ^
foreach ($monitor in $monitors) { Start-Process -WindowStyle Hidden -FilePath \"zebar\" -ArgumentList \"open bar --args $monitor\" };
@Keshav13142
Keshav13142 / config.yaml
Created September 16, 2024 11:36
Glazewm config
general:
# Commands to run when the WM has started (e.g. to run a script or launch
# another application). Here we are running a batch script to start Zebar.
startup_commands: ["shell-exec %userprofile%/.glzr/zebar/start.bat"]
focus_follows_cursor: false
toggle_workspace_on_refocus: false
cursor_jump:
enabled: true
# Trigger for cursor jump:
@Keshav13142
Keshav13142 / config.yaml
Created September 16, 2024 11:36
Zebar config
# Yaml is white-space sensitive (use 2 spaces to indent).
###
# Define a new window with an id of 'bar'. This window can then be opened
# via the Zebar cli by running 'zebar open bar --args <ARGS...>'.
#
# Docs regarding window: https://some-future-docs-link.com
window/bar:
providers: ["self"]
# Width of the window in physical pixels.

app.py

import os
import pickle
import sqlite3

import google.generativeai as genai
import markdown
import numpy as np
import os
import sqlite3
from datetime import datetime, timedelta
import requests
from datasets import DatasetDict, load_dataset
from dotenv import load_dotenv
from flask import Flask, jsonify, redirect, render_template, request
from transformers import (
DataCollatorForLanguageModeling,
@Keshav13142
Keshav13142 / prompt.md
Last active July 11, 2024 10:05
LLM prompt

Question

I want you to generate a prompt which I will use to query a LLM to generate care plan data in JSON format using certain parameters I will pass in the query such as weight, height, spo2, avg_heartrate, stepCount, calories_burnt, sleep_duration_in_minutes which is the the average a daily data collected over a week. The output json format should be as follows: { "name": "<careplan_name>", "careplanItems": [ { "title": "careplan_item_title1", "description": "careplan_item_description1"

@Keshav13142
Keshav13142 / app.py
Last active July 10, 2024 13:10
Gitlab stuff
import os
import sqlite3
import requests
from datasets import DatasetDict, load_dataset
from dotenv import load_dotenv
from flask import Flask, jsonify, redirect, render_template, request
from transformers import (
DataCollatorForLanguageModeling,
GPT2LMHeadModel,
@Keshav13142
Keshav13142 / .ideavimrc
Created June 6, 2024 06:22
Idea Vim config
"source ~/.vimrc
" Find more examples here: https://jb.gg/share-ideavimrc
let mapleader=" "
" Don't use Ex mode, use Q for formatting.
map Q gq
set number relativenumber
set clipboard+=unnamed
@Keshav13142
Keshav13142 / git-demo.md
Last active April 4, 2024 10:28
Git basics

Git basics

  • Setup Git

    • Install git
    • Configure name, email for commits
       git config --global user.name "Your name"
       git config --global user.email [email protected]