Skip to content

Instantly share code, notes, and snippets.

View p16i's full-sized avatar
💭
TDDing

Pattarawat Chormai p16i

💭
TDDing
View GitHub Profile
@yoavg
yoavg / LLMs.md
Last active February 17, 2024 18:39

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 imressed 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!". We

@YoEight
YoEight / improve_fonts.md
Created January 15, 2021 10:11 — forked from j1cs/improve_fonts.md
Improve fonts archlinux

Improve Fonts

Newest

Make your Arch fonts beautiful easily! This is what I do when I install Arch Linux to improve the fonts.

You may consider the following settings to improve your fonts for system-wide usage without installing a patched font library packages (eg. Infinality):

Install some fonts, for example:
sudo pacman -S ttf-dejavu ttf-liberation noto-fonts

@polonez
polonez / add_margin_to_pdf.py
Created December 3, 2019 12:12
pdf add margin using pypdf2
from PyPDF2 import PdfFileReader, PdfFileWriter
from PyPDF2.pdf import PageObject
from tqdm import tqdm
def get_info(path):
with open(path, 'rb') as f:
p = PdfFileReader(f)
info = p.getDocumentInfo()
number_of_pages = p.getNumPages()
@mikelane
mikelane / game_of_life.py
Last active March 21, 2022 22:52
Conway's Game of Life implemented using a 2d convolution.
import click
import difflib
import numpy as np
import random
import sys
import time
from os import name, system
from scipy.ndimage import convolve
@chr5tphr
chr5tphr / cudamemstat.c
Last active February 9, 2022 10:33
Print CUDA-info in JSON using the Nvidia Management Library (NVML) to avoid parsing of nvidia-smi
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include <nvml.h>
#include <time.h>
#define MAXINFO 32
#define MAXCBUF 64
// compile with:
@chrislaughlin
chrislaughlin / travis.md
Created March 31, 2018 16:20
Using Travis CI with Gatsby

First set out your build scripts In your package.json scripts and install the gh-pages npm module

"build": "gatsby build",
"test": "echo \"no test specified\" && exit 0",
"preDeploy": "gatsby build --prefix-paths",
"deploy": "npm run preDeploy && gh-pages -d public"

Connect Travis CI to your repo and in the repo settings add an enviroment var call GITHUB_TOKEN with the value of your github token from:

@Jarino
Jarino / cs_divergence.py
Created August 30, 2017 12:39
Cauchy-Schwarz divergence
from math import sqrt
from math import log
from scipy.stats import gaussian_kde
def cs_divergence(p1, p2):
"""
Calculates the Cauchy-Schwarz divergence between two probabilities distribution. CS divergence is symmetrical,
hence the order of the arguments does not matter. The result is from interval [0, infinity],
where 0 is obtained when the two probabilities distributions are same.
@brunogaspar
brunogaspar / README.md
Last active October 7, 2022 09:08
Install wkhtmltopdf on Ubuntu (14.04 64-bit) or (16.04 64-bit)

Install wkhtmltopdf on Ubuntu

This was tested on:

  • Ubuntu 14.04 x64
  • Ubuntu 16.04 x64

Installation

@EmilienDupont
EmilienDupont / LICENSE
Last active March 29, 2024 08:21
Optimization Algorithms Visualization
The MIT License (MIT)
Copyright (c) 2016 Emilien Dupont
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@wenchy
wenchy / Makefile
Last active January 16, 2024 15:36
Compile all .cpp files into one target under the current directory.
CC := g++
CFLAGS := -Wall -g
TARGET := test
# $(wildcard *.cpp /xxx/xxx/*.cpp): get all .cpp files from the current directory and dir "/xxx/xxx/"
SRCS := $(wildcard *.cpp)
# $(patsubst %.cpp,%.o,$(SRCS)): substitute all ".cpp" file name strings to ".o" file name strings
OBJS := $(patsubst %.cpp,%.o,$(SRCS))
all: $(TARGET)