Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Doing new things

Wil Gieseler wilg

🚀
Doing new things
View GitHub Profile
@wilg
wilg / parallel_map.swift
Last active Jan 12, 2022 — forked from DougGregor/parallel_map.swift
Swift async/await implementation of a parallel map
View parallel_map.swift
import Foundation
// https://gist.github.com/DougGregor/92a2e4f6e11f6d733fb5065e9d1c880f
extension Collection {
func parallelMap<T>(
parallelism requestedParallelism: Int? = nil,
_ transform: @escaping (Element) async throws -> T
) async rethrows -> [T] {
let defaultParallelism = 2
let parallelism = requestedParallelism ?? defaultParallelism
@wilg
wilg / index.js
Last active Oct 31, 2018 — forked from tommoor/index.js
requirebin sketch
View index.js
const React = require('react');
const ReactDOM = require ('react-dom');
const Render = require('react-emoji-render');
// try swapping the commented lines below and hit "Run Code" in the top right
// to see another rendering style!
const Emoji = Render.Emojione;
//const Emoji = Render.Twemoji;
View indiana_county_topojson_v3.topo.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.