Skip to content

Instantly share code, notes, and snippets.

@johnhw
johnhw / umap_sparse.py
Last active February 26, 2025 10:50
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
#include <utility>
#include <iostream>
#include <cstddef>
namespace atch { namespace {
template<class Tag>
struct meta_counter {
using size_type = std::size_t;
template<size_type N>
@tomhut
tomhut / Civic.dvtcolortheme
Created June 14, 2016 09:11
Xcode 7 version of the Civic theme from Xcode 8, place it in ~/Library/Developer/Xcode/UserData/FontAndColorThemes/ and restart Xcode. You will first need to acquire the SF Mono font family.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 1 1 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>SFMono-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
@btroncone
btroncone / ngrxintro.md
Last active March 5, 2025 20:40
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@bkaradzic
bkaradzic / orthodoxc++.md
Last active April 25, 2025 00:16
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@DmitrySoshnikov
DmitrySoshnikov / LL1-parser-first-follow-sets.js
Last active March 27, 2024 07:24
LL(1) Parser. Parsing table, part 1: First and Follow sets.
/**
* LL(1) parser. Building parsing table, part 1: First and Follow sets.
*
* NOTICE: see full implementation in the Syntax tool, here:
* https://github.com/DmitrySoshnikov/syntax/blob/master/src/sets-generator.js
*
* by Dmitry Soshnikov <[email protected]>
* MIT Style License
*
* An LL(1)-parser is a top-down, fast predictive non-recursive parser,
@Osse
Osse / gist:debdb53074b377bf784c
Created September 29, 2014 09:13
qmake variables
message("QMAKE: $$QMAKE")
message("QMAKESPEC: $$QMAKESPEC")
message("QMAKE_AR_CMD: $$QMAKE_AR_CMD")
message("QMAKE_BUNDLE_DATA: $$QMAKE_BUNDLE_DATA")
message("QMAKE_BUNDLE_EXTENSION: $$QMAKE_BUNDLE_EXTENSION")
message("QMAKE_CC: $$QMAKE_CC")
message("QMAKE_CFLAGS_DEBUG: $$QMAKE_CFLAGS_DEBUG")
message("QMAKE_CFLAGS_RELEASE: $$QMAKE_CFLAGS_RELEASE")
message("QMAKE_CFLAGS_SHLIB: $$QMAKE_CFLAGS_SHLIB")
message("QMAKE_CFLAGS_THREAD: $$QMAKE_CFLAGS_THREAD")
@staltz
staltz / introrx.md
Last active May 4, 2025 15:01
The introduction to Reactive Programming you've been missing
@ashanbrown
ashanbrown / jquery.ajax.queue.coffee
Last active August 29, 2015 14:02 — forked from maccman/jquery.ajax.queue.coffee
queued ajax requests with a queueMaxConcurrency option that can be set on each request
$ = jQuery
queues = {}
queue = (name) ->
name = 'default' if name is true
queues[name] or= {entries: [], running: 0}
next = (name, done) ->
list = queue(name)
@d3noob
d3noob / datatips.csv
Last active January 13, 2022 22:59
d3.js tool tips with links in data
date close link
1-May-12 58.13 http://bl.ocks.org/d3noob/c37cb8e630aaef7df30d
30-Apr-12 53.98 http://bl.ocks.org/d3noob/11313583
27-Apr-12 67.00 http://bl.ocks.org/d3noob/11306153
26-Apr-12 89.70 http://bl.ocks.org/d3noob/11137963
25-Apr-12 99.00 http://bl.ocks.org/d3noob/10633856
24-Apr-12 130.28 http://bl.ocks.org/d3noob/10633704
23-Apr-12 166.70 http://bl.ocks.org/d3noob/10633421
20-Apr-12 234.98 http://bl.ocks.org/d3noob/10633192
19-Apr-12 345.44 http://bl.ocks.org/d3noob/10632804