Skip to content

Instantly share code, notes, and snippets.

@jaysridhar
jaysridhar / CSV.java
Last active March 1, 2023 16:17
Java CSV Reader module. Drop into any project and use. Supports Excel compatible CSV (multi-line columns, etc).
package sample;
import java.io.InputStream;
import java.io.PushbackInputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.BufferedReader;
import java.util.List;
import java.util.ArrayList;
@aparrish
aparrish / spacy_intro.ipynb
Last active March 14, 2025 21:43
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active May 8, 2025 14:50
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@matcap
matcap / KillerDaemon.cpp
Created May 30, 2017 13:25
A simple process killer for Windows.
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <chrono>
#include <iomanip>
#include <map>
#include <Windows.h>
#include <TlHelp32.h>
using namespace std;
@giacomoran
giacomoran / dlib_opencv_android.md
Last active January 22, 2020 18:01
How to create an Android Studio project with OpenCV and dlib.
@fosterdill
fosterdill / optimize_images.sh
Last active October 17, 2017 16:57
Find png files that don't have transparency and convert to jpg, also recompress all jpg files for the web
#!/bin/sh
echo You should have the project tracked by version control in case something goes wrong.
printf 'Press any key to continue...'
read -r
path=${1:-.}
echo Optimizing images in "$path"
if [ -z "$(command -v jpeg-recompress)" ] || [ -z "$(command -v ladon)" ] || [ -z "$(command -v mogrify)" ]; then
@adambene
adambene / merge-two-arrays.js
Last active March 7, 2018 19:27
Merge two arrays in JavaScript
// merge two arrays a and b
const merge = (a, b) => a.reduce(
(acc, curr, i) => [
...acc, // copy all previous elements
curr, // current element of a
b[i] // current element of b
],
[] // initial value
);
@nadavrot
nadavrot / Matrix.md
Last active April 20, 2025 12:59
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

javascript:!function(){var e,t,n;try{var o=document.querySelectorAll("div[data-name='Active Items'] div[data-asin]"),r=[["ProductID","Price","Quantity","Description","Link"].join(",")];o.forEach(function(e){var t=e.getAttribute("data-price"),n=e.getAttribute("data-quantity"),o=e.getAttribute("data-asin"),c=e.querySelector(".sc-product-link").href,a='"'+e.querySelector(".sc-product-title").textContent.replace(/"/g,'""').trim()+'"';r.push([o,t,n,a,c].join(","))}),e=r.join("\n"),t=document.createElement("textarea"),n=document.getSelection(),t.textContent=e,document.body.appendChild(t),n.removeAllRanges(),t.select(),document.execCommand("copy"),n.removeAllRanges(),document.body.removeChild(t)}catch(e){return void alert("Copy failed: "+e)}alert("Copy Successful, csv in in your clipboard")}();
@zacjszewczyk
zacjszewczyk / webS
Created October 4, 2019 23:15
A syllable dictionary I built with Python. See https://zacs.site/blog/building-a-syllable-dictionary-with-python.html for the full writeup.
This file has been truncated, but you can view the full file.
# A syllable dictionary I built with Python. See https://zacs.site/blog/building-a-syllable-dictionary-with-python.html for the full writeup.
#
# This work is licensed under a Creative Commons Attribution 4.0 International License
# See https://zacs.site/disclaimers.html for more information.
# © 2012-2019 Zachary Szewczyk.
a,1
a,1
aa,1
aal,-1