Skip to content

Instantly share code, notes, and snippets.

View prasad83's full-sized avatar

Prasad prasad83

View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 13, 2026 05:05
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@tarruda
tarruda / micro_events.py
Last active December 25, 2025 23:33
Micro event loop library to teach the basic concepts of python coroutines and how event loop libraries might be implemented
"""
A micro event loop library implementation from scratch.
This library provides a minimal but feature-complete asynchronous event loop
implementation for educational purposes. It demonstrates the core concepts of
asynchronous programming including:
- Task scheduling and management
- I/O multiplexing with non-blocking sockets
- Timeouts and sleep functionality
@ddurham2
ddurham2 / psql-srv.py
Last active April 2, 2025 05:12 — forked from eatonphil/psql-srv.py
postgres "server" wire protocol example (ported python3)
# th30z@u1310:[Desktop]$ psql -h localhost -p 55432
# Password:
# psql (9.1.10, server 0.0.0)
# WARNING: psql version 9.1, server version 0.0.
# Some psql features might not work.
# Type "help" for help.
#
# th30z=> select foo;
# a | b
# ---+---
@prasad83
prasad83 / retro-games-sqlite.lisp
Created November 28, 2023 05:16
LispForTheWeb-RetroGames-InSqlite
; Port of Lisp.For.The.Web (Adam Tornhill)
; Retro Games on MongoDB to Sqlite
; Ensure QuickLoad dependencies
(load "~/.sbclrc") ; or (load "~/.quicklisp/setup.lisp")
(ql:quickload '(cl-who hunchentoot parenscript sqlite) :silent t)
(defpackage :retro-games-sqlite
(:use :cl :cl-who :hunchentoot :parenscript :sqlite))
@janakiramm
janakiramm / Oscar_bot.py
Created July 20, 2023 13:34
Implementing RAG with OpenAI
import openai
import tiktoken
from scipy import spatial
import pandas as pd
df=pd.read_csv('./data/oscars.csv')
print(df.head())
df=df.loc[df['year_ceremony'] == 2023]
df=df.dropna(subset=['film'])

"Don Knuth Plays with ChatGPT" but with ChatGPT-4

1. Tell me what Donald Knuth says to Stephen Wolfram about chatGPT.

I'm sorry for any confusion, but as an AI, I can't provide real-time updates or specific conversations between individuals beyond my last training cut-off in September 2021. I don't have access to the internet or any databases for real-time information or private communications. Therefore, I can't give you the details of a conversation between Donald Knuth and Stephen Wolfram about ChatGPT, if such a conversation has taken place after my training data.

However, it's worth noting that both Donald Knuth and Stephen Wolfram are significant figures in the fields of computer science and computational mathematics. Knuth is widely recognized for his multi-volume work "The Art of Computer Programming" and for creating the TeX computer typesetting system, while Wolfram is known for his work in developing Mathematica and Wolfram|Alpha, and for his contributions to cellular automata theory, outl

@rutcreate
rutcreate / README.md
Last active February 12, 2026 13:53
Install Python 3.10.x on Ubuntu 20.04

Prerequisite

sudo apt update
sudo apt install software-properties-common -y

Add custom APT repository

@bennadel
bennadel / index.htm
Created August 18, 2022 12:13
Rendering Wrapped Text To A Canvas In JavaScript
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>
Rendering Wrapped Text To A Canvas In JavaScript
</title>
<link rel="stylesheet" type="text/css" href="./main.css" />
</head>
<body>
@eatonphil
eatonphil / psql-srv.py
Last active November 22, 2025 15:02 — forked from matteobertozzi/psql-srv.py
postgres "server" wire protocol example (ported python3)
# th30z@u1310:[Desktop]$ psql -h localhost -p 55432
# Password:
# psql (9.1.10, server 0.0.0)
# WARNING: psql version 9.1, server version 0.0.
# Some psql features might not work.
# Type "help" for help.
#
# th30z=> select foo;
# a | b
# ---+---
@spdrman
spdrman / db.go
Created January 2, 2020 03:24
golang pattern for database access with cache layer
type Store interface {
GetFollowers(userID string) ([]models.User, error)
}
type DatabaseStore struct {
// wrap sql connection
// or any other driver that your database needs
}
func (s *DatabaseStore) GetFollowers(userID string) ([]models.User, error) {