Skip to content

Instantly share code, notes, and snippets.

@jargnar
jargnar / cars_research_2025_prompt.md
Created August 3, 2025 06:02
A prompt for ChatGPT Agent to gather car information

Objective

Generate a CSV file cars_bangalore_2025.csv containing ≥50 unique passenger car variants officially sold in Bengaluru, Karnataka, India for Model Year 2025, with complete specifications matching the CarSpec Pydantic schema.

Requirements

Data Quality Standards

  • No missing data: Every field must contain valid values (no blanks, nulls, or "N/A")
  • Unit compliance: All numeric values must use exact units specified in schema
  • Source verification: Each row must cite ≥2 independent, publicly accessible sources
@jargnar
jargnar / TempleOfRails.sublime-syntax
Last active July 17, 2025 04:08
A sublime syntax file hand crafted and tuned perfectly for Ruby on Rails
%YAML 1.2
---
name: TempleOfRails
file_extensions: [rb]
scope: source.ruby.rails
contexts:
main:
# comments
- match: '#.*$'
@jargnar
jargnar / bsky_list_maker.py
Last active January 9, 2025 16:30
Bluesky: Add all users followed by a particular user to a list
from atproto import Client, models
from datetime import datetime
import time
# =============================
# -- Update these constants --
# =============================
BSKY_HANDLE = '' # Your handle
BSKY_PASSWORD = '' # Your password or app password
@jargnar
jargnar / bioprocess_neural_ode_jax_claude.py
Last active November 14, 2024 08:50
A simple Neural ODE for learning bioprocess dilution, growth and production rates. Generated by Claude 3.5 Sonnet.
"""
I'm building a simple hybrid model to predict growth rate and production rate for a bioprocess.
Can you give me the most simplest form of Neural ODE in JAX.
My ODE im trying to solve is a growth rate and production rate in context of bioprocess run data.
Here are my model equations:
I want to first solve the ODE
D = dV/dt = f(t) + b
@jargnar
jargnar / bioprocess_neural_ode_o1.py
Last active November 16, 2024 05:16
A simple Neural ODE for learning bioprocess dilution, growth and production rates. Generated by OpenAI o1.
"""
I'm building a simple hybrid model to predict
growth rate and production rate for a bioprocess.
My Neural ODE solves for growth rate and
production rate in context of bioprocess run data.
Here are my model equations:
First
D = dV/dt = f(t) + b
@jargnar
jargnar / api.py
Created June 18, 2024 13:06
Fictional PR review
from flask import Flask, jsonify
import sqlite3
app = Flask(__name__)
DATABASE = 'movies.db'
def get_db_connection():
conn = sqlite3.connect(DATABASE)
conn.row_factory = sqlite3.Row
@jargnar
jargnar / news_sim.dart
Last active March 13, 2021 12:02
Android/Flutter simple news feed sim
import 'dart:typed_data';
import 'package:firebase_core/firebase_core.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
import 'dart:convert';
import 'package:intl/intl.dart';
class ArticleModel {
String title;
String body;
// MIT
// Suhas Guruprasad, jargnar@gmail.com
const puppeteer = require("puppeteer");
const fetch = require("node-fetch");
const imagemin = require("imagemin");
const imageminMozjpeg = require("imagemin-mozjpeg");
const fs = require("fs").promises;
@jargnar
jargnar / edit_distance.rs
Created January 26, 2021 14:56
The minimum edit distance between two strings in Rust, LeetCode #72: https://leetcode.com/problems/edit-distance/
use std::collections::HashMap;
use std::cmp::min;
impl Solution {
pub fn min_distance(word1: String, word2: String) -> i32 {
let mut D: HashMap<(i32, i32), i32> = HashMap::new();
let m = word1.len() as i32;
let n = word2.len() as i32;
let w1: Vec<char> = word1.chars().collect();
@jargnar
jargnar / climbing_stairs.rs
Created January 26, 2021 08:02
Climbing Stairs
use std::collections::HashMap;
impl Solution {
pub fn fib(n: i32, cache: &mut HashMap<i32, i32>) -> i32 {
if n <= 2 { return n; }
else if !cache.contains_key(&(n-1)) && !cache.contains_key(&(n-2)) {
let a = Self::fib(n - 1, cache);
let b = Self::fib(n - 2, cache);
cache.insert(n - 1, a);