Skip to content

Instantly share code, notes, and snippets.

View hadisinaee's full-sized avatar
:octocat:
I may be slow to respond.

Hadi hadisinaee

:octocat:
I may be slow to respond.
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active June 7, 2024 05:10
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@MarioCarrion
MarioCarrion / go.vim
Last active November 17, 2023 22:20
Nvim Go configuration
"-- vim-go specific configuration
" run :GoBuild or :GoTestCompile based on the go file
function! s:build_go_files()
let l:file = expand('%')
if l:file =~# '^\f\+_test\.go$'
call go#test#Test(0, 1)
elseif l:file =~# '^\f\+\.go$'
call go#cmd#Build(0)
endif
package main
type FuncIntInt func(int) int
func memorized(fn FuncIntInt) FuncIntInt {
cache := make(map[int]int)
return func(input int) int {
if val, found := cache[input]; found {
println("Read from cache")
@citrusui
citrusui / dropdown.md
Last active June 7, 2024 12:47
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@koseki
koseki / ISO639-1.txt
Last active February 1, 2022 21:41
ISO 639-1 Code => English Name text list / http://www.loc.gov/standards/iso639-2/ascii_8bits.html
aa Afar
ab Abkhazian
af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
an Aragonese
hy Armenian
as Assamese
@KyleAMathews
KyleAMathews / lambda.md
Last active May 13, 2022 00:49
Using Kafka and a Samza-like node.js architecture

Disclaimer

I'm still very new to Kafka, eventsourcing, stream processing, etc. I'm in the middle of building my first production system with this stuff and am writing this at the request of a few folks on Twitter. So if you do have experience, please do me and anyone else reading this a favor by pointing out things I get wrong :)

Inspirations

@nolanlawson
nolanlawson / protips.js
Last active February 4, 2024 18:06
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@pasupulaphani
pasupulaphani / after_res_hooks.js
Last active May 1, 2024 20:37
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups
@m2mIO-gister
m2mIO-gister / SimpleMqttClient.java
Last active June 3, 2022 05:40
Example MQTT Messaging in Java
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.MqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.eclipse.paho.client.mqttv3.MqttTopic;
public class SimpleMqttClient implements MqttCallback {