Skip to content

Instantly share code, notes, and snippets.

View vingkan's full-sized avatar

Vinesh Kannan vingkan

  • Ambience
  • San Francisco, California
View GitHub Profile
@vingkan
vingkan / prompt-create-analytics-website.md
Created January 4, 2026 04:43
Cursor Plan prompt for analytics website.

Create Website for Analytics

I completed some fantasy football data analytics research in this repository.

Help me create a static HTML page to show off my results.

  • The HTML files should be under the /docs directory, which I will host using GitHub Pages.
  • The pages must be static HTML pages. We can load data by fetching files like images or JSON from /docs/assets.
  • There will be a /docs/index.html that acts as a portfolio of all articles and then individual sub-folders for each article.
  • Right now there is only one article, which will be at /docs/workloadnews/index.html.

Clinic Appointment Feed Normalization

A clinic receives a stream of appointment updates. Time is discrete: T = 0, 1, 2, ....

Each update happens at a time index t. Each appointment has a scheduled start time start.

type Status = "BOOKED" | "CANCELLED" | "CHECKED_IN";

type AppointmentId = string;

Patient Monitor Event Cleanup

The event stream is an array of strings. Each string is one token:

  • "H" = Heart-rate sample
  • "O" = SpO₂ sample
  • "B" = Blood-pressure sample
  • "A" = Alarm marker
  • "X" = Corrupted token
@vingkan
vingkan / README.md
Created August 23, 2024 19:18
Split and combine a SQLite database file into smaller parts to stay under GitHub size limits.

Combine and Split a SQLite Database File

The first time you use this script, you will have to give it permissions:

chmod 0777 split_database.sh
chmod 0777 combine_database.sh

Then you can run the scripts like this:

@vingkan
vingkan / starter.html
Created June 8, 2022 07:58
Example starter code to try out frontend development on CoderPad (React, Vue, or HTML/CSS/JS).
<html>
<head>
<meta charset="UTF-8">
<title>App</title>
<script src="https://unpkg.com/react@17.0.2/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@17.0.2/umd/react-dom.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="https://unpkg.com/@babel/standalone@7.13.12/babel.min.js"></script>
<style>
@vingkan
vingkan / example_discord_cat_bot.py
Last active January 9, 2022 01:19
Example Discord bot to send you cat pictures.
import discord
import os
import requests
from discord.ext import commands
DISCORD_BOT_TOKEN = os.environ["DISCORD_BOT_TOKEN"]
RANDOM_CAT_URL = "https://cataas.com"
@vingkan
vingkan / README.md
Last active June 12, 2019 04:41
Spectral Clustering Demo

Spectral Clustering Demo

Run the Jupyter notebook in your browser with Binder:

Binder

@vingkan
vingkan / assessor_solutions.sql
Created May 1, 2019 01:29
Solution queries for two truths and a lie with the Cook County Assessor's modeling data.
-- The only properties with 10 or more full bathrooms are apartments.
SELECT class
WHERE fbath >= 10
-- On average, properties designed from an architect's plan sold for twice as much as properties designed from a stock plan.
SELECT tp_plan, AVG(sale_price)
WHERE tp_plan IN (1, 2)
GROUP BY tp_plan
@vingkan
vingkan / rideshare_solutions.sql
Last active February 24, 2021 03:03
Solution queries for two truths and a lie with the rideshare dataset.
-- Most rides start and end in the Near North Side community area.
SELECT
pickup_community_area,
COUNT(*) as trips
GROUP BY pickup_community_area
ORDER BY trips DESC
-- On average, riders picked up in the Lincoln Square community area tip better than riders picked up in the Loop.
@vingkan
vingkan / fields.md
Created April 7, 2019 19:54
Night at Lyft - Trip Field Names

Trip Fields

Each trip has the following fields. See the descriptions below.

  • trip_id
  • taxi_id
  • trip_start_timestamp
  • trip_end_timestamp
  • trip_seconds
  • trip_miles
  • pickup_community_area
  • dropoff_community_area