Skip to content

Instantly share code, notes, and snippets.

View nikitalpopov's full-sized avatar
📷
watchin' you

Nikita Popov nikitalpopov

📷
watchin' you
View GitHub Profile
from sklearn.feature_extraction.text import CountVectorizer
import numpy as np
import pandas as pd
import scipy as sp
posts = pd.read_csv('posts.csv')
# Create vectorizer for function to use
vectorizer = CountVectorizer(binary=False)
y = posts["score"].values.astype(np.float32)
@NigelEarle
NigelEarle / Knex-Migrations-Seeding.md
Last active June 25, 2026 20:56
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@stollcri
stollcri / c41lab
Last active November 5, 2024 11:24
A script which uses ImageMagick to develop scans of C-41 film negatives into color-corrected positive images
#!/bin/bash
# ====================================================================================================================
#
# Converted for bash by @stollcri (stollcri at gmail dot com), 2020-07-28
#
# Originally downloaded from: https://sites.google.com/site/c41digitallab/the-complexity
#
# ====================================================================================================================
# C41LAB - Version 1.2
#
@robertefreeman
robertefreeman / familysearch_export.md
Created June 7, 2025 02:44
Family Search export methods

FamilySearch Data Export Guide

Last Updated: June 7, 2025

Overview

FamilySearch.com is one of the world's largest genealogy platforms, but it doesn't offer a direct, built-in GEDCOM export feature. This guide provides comprehensive methods to export and preserve your family history data.

Why Export Your Data?

  • Backup Protection: Safeguard against data loss or changes
  • Data Portability: Use your research in other genealogy software
  • Offline Access: Work without internet connection
@karpathy
karpathy / microgpt.py
Last active October 7, 2026 02:17
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp