Skip to content

Instantly share code, notes, and snippets.

View jqk6's full-sized avatar

jqk6 jqk6

View GitHub Profile
@jqk6
jqk6 / mavlink_common.lua
Created August 14, 2024 01:59 — forked from dagar/mavlink_common.lua
Wireshark mavlink plugin
@jqk6
jqk6 / stable_diffusion_m1.py
Created March 17, 2023 08:52 — forked from madebyollin/stable_diffusion_m1.py
Stable Diffusion on Apple Silicon GPUs via CoreML; 2s / step on M1 Pro
# ------------------------------------------------------------------
# EDIT: I eventually found a faster way to run SD on macOS, via MPSGraph (~0.8s / step on M1 Pro):
# https://github.com/madebyollin/maple-diffusion
# The original CoreML-related code & discussion is preserved below :)
# ------------------------------------------------------------------
# you too can run stable diffusion on the apple silicon GPU (no ANE sadly)
#
# quick test portraits (each took 50 steps x 2s / step ~= 100s on my M1 Pro):
# * https://i.imgur.com/5ywISvm.png
@jqk6
jqk6 / needleman-wunsch.py
Created November 7, 2022 06:49 — forked from slowkow/needleman-wunsch.py
A simple version of the Needleman-Wunsch algorithm in Python.
#!/usr/bin/env python
"""
The Needleman-Wunsch Algorithm
==============================
This is a dynamic programming algorithm for finding the optimal alignment of
two strings.
Example
-------
@jqk6
jqk6 / alexa.js
Created June 2, 2021 09:20 — forked from chilts/alexa.js
Getting the Alexa top 1 million sites directly from the server, unzipping it, parsing the csv and getting each line as an array.
var request = require('request');
var unzip = require('unzip');
var csv2 = require('csv2');
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip')
.pipe(unzip.Parse())
.on('entry', function (entry) {
entry.pipe(csv2()).on('data', console.log);
})
;