Skip to content

Instantly share code, notes, and snippets.

@iolalla
iolalla / Makefile
Created May 8, 2022 16:06
Golang Makefile
help: ## show help message
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[$$()% a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
build: ## "Building a valid production binary"
echo "Building a valid production binary"
go build -o play
bu: ## "Looks like we have a binary ready to debug"
echo "Looks like we have a binary ready to debug"
go build -gcflags="all=-N -l" -o play
@iolalla
iolalla / splitter.go
Last active August 11, 2022 08:22
I used this code to split a big file into chunks and upload it to Google Cloud Storage . The use case is "How to upload a huge file to GCS in parts so you can overcome the 5 Tb limits in GCS and then join it back with cat or gcloud cat.
package main
import (
"bufio"
"cloud.google.com/go/storage"
"context"
"flag"
"fmt"
"os"
"strings"
@iolalla
iolalla / LLMs.md
Last active January 4, 2023 18:32 — forked from yoavg/LLMs.md

Some remarks on Large Language Models

Yoav Goldberg, January 2023

Audience: I assume you heard of chatGPT, maybe played with it a little, and was impressed by it (or tried very hard not to be). And that you also heard that it is "a large language model". And maybe that it "solved natural language understanding". Here is a short personal perspective of my thoughts of this (and similar) models, and where we stand with respect to language understanding.

Intro

Around 2014-2017, right within the rise of neural-network based methods for NLP, I was giving a semi-academic-semi-popsci lecture, revolving around the story that achieving perfect language modeling is equivalent to being as intelligent as a human. Somewhere around the same time I was also asked in an academic panel "what would you do if you were given infinite compute and no need to worry about labour costs" to which I cockily responded "I would train a really huge language model, just to show that it doesn't solve everything!". W

@iolalla
iolalla / bigquery_export_to_emulator.go
Created January 29, 2024 09:10
This snippet of code is here to load data from a Bigquery dataset to the Bigquery Emulator [https://github.com/goccy/bigquery-emulator]
package main
import (
"cloud.google.com/go/bigquery"
"context"
"flag"
"fmt"
"google.golang.org/api/iterator"
"os"
)
@iolalla
iolalla / perc.go
Created August 16, 2024 08:48
Simple, how can we calculate the what percentage of the year is gone.
package main
/** how to calculate the percentage of the year in go */
import (
"fmt"
"time"
)
func main() {