Skip to content

Instantly share code, notes, and snippets.

View ishank-dev's full-sized avatar
:copilot:
Gitting it!

Ishank Sharma ishank-dev

:copilot:
Gitting it!
View GitHub Profile
@ishank-dev
ishank-dev / plot.py
Created October 31, 2024 00:36
Plot Gantt Chart Using JSON
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from datetime import datetime
import pandas as pd
task_data = {
"Task Name": [
"Project Setup and Environment Configuration", "Design UI and Dashboard",
"Develop Home Screen and Dashboard", "Implement Navigation Logic",
"Develop Program Management Module", "Develop Area Management Module",
@ishank-dev
ishank-dev / connection_pool_fb.py
Created February 25, 2025 06:20
Connection Pool Simulation FB
"""
simulate_firebolt_pooling_varied.py
This script performs the following steps:
1. Runs a dummy query (SELECT 1) to warm up the Firebolt engine.
2. Runs two simulations (each for 10 seconds):
- WITHOUT connection pooling: A new connection is created for every query.
- WITH connection pooling: A pre-warmed pool of connections is used.
For each query, the script cycles through different severity filters (using numeric values)
import io
import datetime
import statistics
from warcio.warcwriter import WARCWriter
from warcio.statusandheaders import StatusAndHeaders
from warcio.archiveiterator import ArchiveIterator
from bs4 import BeautifulSoup
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse
@ishank-dev
ishank-dev / submit.sql
Created May 27, 2025 10:22
Solution to SQL Puzzle
WITH
/* Step 1 Leaf level – every City that appears in the hierarchy
gets a row, if there is no matching entry in the sales
table we treat its sales as 0. */
city_sales AS (
SELECT g.country ,
g.state ,
g.city ,
COALESCE(s.sales,0) AS sales
FROM geo_hierarchy AS g