Skip to content

Instantly share code, notes, and snippets.

;; pcavs's solution to Gus' Quinundrum
;; https://4clojure.com/problem/125
(fn []
(let [a ["(fn [] (let [a "
"] (apply str (a 0) a (a 1))))"]] (apply str (a 0) a (a 1))))
@mrflip
mrflip / datasets.md
Created August 9, 2012 20:01
Overview of Datasets

== Overview of Datasets ==

The examples in this book use the "Chimpmark" datasets: a set of freely-redistributable datasets, converted to simple standard formats, with traceable provenance and documented schema. They are the same datasets as used in the upcoming Chimpmark Challenge big-data benchmark. The datasets are:

  • Wikipedia English-language Article Corpus (wikipedia_corpus; 38 GB, 619 million records, 4 billion tokens): the full text of every English-language wikipedia article, in

  • Wikipedia Pagelink Graph (wikipedia_pagelinks; ) --

  • Wikipedia Pageview Stats (wikipedia_pageviews; 2.3 TB, about 250 billion records (FIXME: verify num records)) -- hour-by-hour pageview

@fbmnds
fbmnds / Levenshtein
Created February 23, 2013 20:10
Levenshtein Distance - 4clojure #101
(fn f [a b]
(letfn [(clear-string [a]
(cond (string? a) a
(vector? a) (clojure.string/join (map str a))
:else (clojure.string/join
(filter #(not (= % \:))
(clojure.string/join (map str a))))))
(make-ls-d []
(with-local-vars
[ls-d (memoize
@ejackson
ejackson / gist:5203517
Last active March 14, 2020 08:09
Non-fiction, Non-textbook stories on How the West was Won, and where it got us
-----------= Tales of Yore =-----------
* Hackers: Heroes of the Computer Revolution
(http://www.amazon.co.uk/Hackers-Heroes-Computer-Revolution-Anniversary/dp/1449388396)
* The soul of a new machine
(http://www.amazon.co.uk/Soul-New-Machine-Tracy-Kidder/dp/0140062491/ref=sr_1_2?s=books&ie=UTF8&qid=1363772696&sr=1-2)
* The brainmakers
(http://www.amazon.co.uk/Brainmakers-Scientists-Moving-Beyond-Computers/dp/067151055X/ref=sr_1_1?s=books&ie=UTF8&qid=1363772724&sr=1-1)
@Thorium
Thorium / gulpfile.js
Last active August 29, 2015 14:11
JavaScript minifier for FunScript
// Put this file to your FunScript output folder.
var gulp = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
sourcemaps = require('gulp-sourcemaps');
var jsfile = {
targetPath: '',
//This is your FunScript-generated .js-file:
sources: ['generated.js']
@latkin
latkin / README.md
Last active August 29, 2015 14:12
Extended 'for' loops for F#

Backing code and examples for two different mini-frameworks adding extended imperative-style for loops in F#.

Discussed in blog post here.

Git Cheat Sheet

Commands

Getting Started

git init

or

@swlaschin
swlaschin / ConstrainedTypesExamples.fsx
Last active January 7, 2026 17:22
Examples of creating constrained types in F#
// General hints on defining types with constraints or invariants
//
// Just as in C#, use a private constructor
// and expose "factory" methods that enforce the constraints
//
// In F#, only classes can have private constructors with public members.
//
// If you want to use the record and DU types, the whole type becomes
// private, which means that you also need to provide:
// * a constructor function ("create").
@Lanchon
Lanchon / stm32cubemx-linux.md
Last active September 18, 2025 06:42
Installing STM32CubeMX on Linux

Installing STM32CubeMX on Linux

The STM32CubeMX tool is written in portable java, but unfortunately it is distributed as a Windows executable embedded in a Windows installer.

To install it on Linux:

  1. sudo java -jar SetupSTM32CubeMX-4.11.0.exe
  2. install the tool somewhere in your home, eg: /home/you/stm32/cubemx
  3. sudo chown -R you:you /home/you/stm32/cubemx