Skip to content

Instantly share code, notes, and snippets.

@aparrish
aparrish / spacy_intro.ipynb
Last active April 30, 2026 08:59
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.
@peterforgacs
peterforgacs / Windows10AWSEC2.md
Last active October 27, 2025 08:09
Running Windows 10 on AWS EC2

Running Windows 10 on AWS EC2

Downloading the image

Download the windows image you want.

AWS vmimport supported versions: Microsoft Windows 10 (Professional, Enterprise, Education) (US English) (64-bit only)

So Home wont work.

@aparrish
aparrish / understanding-word-vectors.ipynb
Last active June 17, 2026 10:31
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.
@wassname
wassname / geojson2shapely.ipynb
Last active November 3, 2021 07:49
Convert any geojson to shapely
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@voluntas
voluntas / openssl_speed_aes_gcm_chacha20_poly1305.md
Last active January 6, 2026 03:20
$ openssl speed -evp aes-gcm | chacha20-poly1305 の結果を集めるスレ

$ openssl speed -evp aes-128-gcm | chacha20-poly1305 の結果を集めるスレ

AES-CBC が早いけど、AES-GCM/AES-CTR が遅かったり、Ryzen が爆速だったり、 ChaCha20-Poly1305 が ARM で早かったりするという噂の真相が知りたいです。コメントに適当にべたべた結果を貼ってください。

ちなみに Apple M2 おかしいくらい早いです。

CPU 情報はできれば詳細なのがほしいです。

OpenSSL のバージョンは 3.1 系の最新版でお願いします。

@gorayni
gorayni / largest_inscribed_isothetic_rectangle.py
Created August 9, 2017 19:56
Example of computing the largest inscribed isothetic rectangle. Originally presented by H. Alt, D. Hsu, and J. Snoeyink. Computing the largest inscribed isothetic rectangle. In Proc. 7th Canadian Conf. Comput. Geom., Universit'e Laval, Qu'ebec, August 1995, pp. 67--72. Based on the code by Daniel Sud.
from __future__ import division
import numpy as np
class Edge(object):
def __init__(self, p, q):
self.xmin = np.min((p[0], q[0]))
self.xmax = np.max((p[0], q[0]))
self.ymin = np.min((p[1], q[1]))
@matejb
matejb / pipe_executor.go
Created August 10, 2017 08:27
simple Go pipe executor
package main
import (
"bytes"
"fmt"
"log"
"os/exec"
"strings"
)
@arielzn
arielzn / ssh_run.py
Last active December 12, 2017 06:40
Running commands with paramiko on remote hosts defined on ssh_config
#!/usr/bin/env python
import os
import paramiko
import argparse
import socket
import logging
def create_ssh_client(hostname):
proxy_cache_path /var/nginx/cache/aws/trueniu levels=2:2:2 use_temp_path=off keys_zone=aws_3:500m inactive=30d max_size=10g;
server {
listen 80;
server_name trueniu.com www.trueniu.com;
if ( $scheme = http ) {
return 301 https://www.trueniu.com$request_uri;
}
}
@mbinna
mbinna / effective_modern_cmake.md
Last active June 29, 2026 20:50
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft