Skip to content

Instantly share code, notes, and snippets.

View jsanz's full-sized avatar
🗺️
Mapping

Jorge Sanz jsanz

🗺️
Mapping
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active April 23, 2024 16:03
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

@jeffvestal
jeffvestal / -elastic-nlp-load-huggingface-model-with-zero-shot-example.ipynb
Last active September 7, 2022 15:45
Elastic - NLP - Load HuggingFace Model with Zero Shot Example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
YT_VIDEO="https://www.youtube.com/watch?v=ydYDqZQpim8"
YT_URL="$(youtube-dl --get-url "$YT_VIDEO")"
OUTF="$HOME/.local/share/namibia/background.png"
mkdir -p "$(dirname -- "$OUTF")"
@jjimenezshaw
jjimenezshaw / mandelbrot.cpp
Created August 12, 2021 13:44
Mandelbrot Set in asciiart in 15 lines
#include <complex>
#include <iostream>
int main() {
const size_t limit = 1000, size = 400; // change 'size' to make it more detailed
const char letters[] = " 123456789abcdefghijklmnopqrstuvwxyz*";
for (size_t iy = 0; iy <= size; iy++) {
for (size_t ix = 0, count = 0; ix <= size; ix++, count = 0) {
std::complex<double> c(-2.0+ix*2.5/size, 1.15-iy*2.3/size), z(0.0, 0.0);
while (std::norm(z) < 4.0 && count++ < limit) z = z*z+c;
std::cout << ((count >= limit) ? letters[0] : letters[std::min(count, sizeof(letters)-2)]);
@joshuat
joshuat / Slack avatar-less sidebar.md
Last active January 19, 2021 08:25
Remove the avatars from your slack sidebar

Slack has listened to feedback and given us a way to toggle off the sidebar avatars.

(This only seems to be available in the Beta channel at the moment)

Display or hide profile photos

  1. From your desktop, click your profile picture in the top right.
  2. Select Preferences from the menu.
  3. Click Sidebar in the left-side column.
  4. Check or uncheck the boxes next to Show profile photos next to DMs.
@stevedodson
stevedodson / README.md
Last active July 18, 2022 14:24
Introduction to supervised machine learning in Elastic webinar - Tuesday, February 25, 2020

Introduction to supervised machine learning in Elastic webinar

Tuesday, February 25, 2020

Wednesday, May 27, 2020 - updated customer_churn.ipynb for version 7.7.0

Monday, November 16, 2020 - updated for version 7.10 and eland 7.10b

Monday, September 20, 2021 - updated customer_churn.ipynb for version 7.14

Monday, February 8, 2022 - updated customer_churn.ipynb for version 8.0

@thomasneirynck
thomasneirynck / geojson_to_index.js
Last active November 23, 2021 08:02
Ingest geojson file into Elasticsearch index. Each feature in the FeatureCollection corresponds to a document in Elasticsearch.
const fs = require("fs");
const elasticsearch = require('elasticsearch');
const oboe = require('oboe');
const geojsonInput = process.argv[2] || 'feature_collection.geojson';
const indexname = process.argv[3] || geojsonInput.split('.')[0] || 'feature_collection';
const geometryFieldName = 'geometry';
const shape_type = process.argv[4] || 'geo_shape';
if (shape_type !== 'geo_point' && shape_type !== 'geo_shape') {
@michellemho
michellemho / fake_911_calls.ipynb
Created September 17, 2018 21:48
Generating Emergency Call Data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg