Skip to content

Instantly share code, notes, and snippets.

@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

@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 March 25, 2024 17:01 — 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) {
use std::collections::HashMap;
use std::fmt;
use std::io;
use std::num::ParseFloatError;
/*
Types
*/
#[derive(Clone)]
wget -O /tmp/YaHei.Consolas.1.12.zip https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/uigroupcode/YaHei.Consolas.1.12.zip
unzip /tmp/YaHei.Consolas.1.12.zip
sudo mkdir -p /usr/share/fonts/consolas
sudo mv YaHei.Consolas.1.12.ttf /usr/share/fonts/consolas/
sudo chmod 644 /usr/share/fonts/consolas/YaHei.Consolas.1.12.ttf
cd /usr/share/fonts/consolas
sudo mkfontscale && sudo mkfontdir && sudo fc-cache -fv
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active April 18, 2024 18:48
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API