Skip to content

Instantly share code, notes, and snippets.

View parmarsuraj99's full-sized avatar

Suraj Parmar parmarsuraj99

View GitHub Profile
@uchidama
uchidama / mnist_to_jpg.py
Last active March 14, 2022 01:25
Convert mnist binary on keras datasets to jpeg images.
import keras
from keras.datasets import mnist
import numpy as np
from PIL import Image, ImageOps
import os
def save_image(filename, data_array):
im = Image.fromarray(data_array.astype('uint8'))
im_invert = ImageOps.invert(im)
@wingrime
wingrime / yeti_rank.py
Created June 22, 2018 12:42
Catboost with yeti-rank
import mmh3
import pandas as pd
def get_positive_hash(x):
s = " ".join(get_unique_tokens(x))
return mmh3.hash(s) % 2**31
df['group_id'] = df['query_string'].apply(get_positive_hash )
query_groups = df.groupby("group_id")
@aditya-malte
aditya-malte / smallberta_pretraining.ipynb
Created February 22, 2020 13:41
smallBERTa_Pretraining.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jeethu
jeethu / evaluation.py
Created August 25, 2020 17:01
Numerai Model Evaluation
import functools
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import matplotlib.table as table
import numpy as np
import pandas as pd
from scipy.stats import spearmanr
TOURNAMENT_NAME = "kazutsugi"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@veekaybee
veekaybee / normcore-llm.md
Last active July 21, 2024 13:28
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