Skip to content

Instantly share code, notes, and snippets.

View 23Skidoo's full-sized avatar

Mikhail Glushenkov 23Skidoo

View GitHub Profile
@copumpkin
copumpkin / Prime.agda
Last active December 25, 2023 19:01
There are infinite primes
module Prime where
open import Coinduction
open import Data.Empty
open import Data.Nat
open import Data.Nat.Properties
open import Data.Nat.Divisibility
open import Data.Fin hiding (pred; _+_; _<_; _≤_; compare)
open import Data.Fin.Props hiding (_≟_)
@thoughtpolice
thoughtpolice / Codensity.hs
Created September 12, 2012 07:14
Codensity transformation, problem set, solutions, notes, and other stuff
-- Inspired by the writings of Edward Kmett, Edward Yang and Gabriel Gonzalez
-- concerning free monads and the codensity transformation.
--
-- http://comonad.com/reader/2011/free-monads-for-less/
-- http://blog.ezyang.com/2012/01/problem-set-the-codensity-transformation/
-- http://www.haskellforall.com/2012/06/you-could-have-invented-free-monads.html
--
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
@ymasory
ymasory / bay-scala-jobs
Last active February 18, 2020 20:48
Companies hiring Scala developers in the Bay Area.
Companies hiring Scala developers in the Bay Area.
Created in response to a thread on scala-base.
My favorites:
- CloudPhysics
- Wordnik
Unbiased list:
- 10Gen
- Audax Health
@swannodette
swannodette / notes.clj
Last active July 5, 2022 13:32
Generates lists of size M containing natural numbers which add up to N
;; list comprehensions are often used as a poor man's Prolog
;; consider the following, it has only one solution
;; [1 1 1 1 1 1 1 1 1 1] yet we actually consider 10^10 possibilities
(for [a (range 1 11)
b (range 1 11)
c (range 1 11)
d (range 1 11)
e (range 1 11)
f (range 1 11)
@romainguinot
romainguinot / checkgmail-2factor-support.patch
Last active December 14, 2015 09:50
checkgmail (http://checkgmail.sourceforge.net/) patch for two factor authentication (a.k.a two step) support (config, UI, integration), login refactoring (requests, UI), refactored kwallet integration, + additional refactoring/bugfixing. Applies against latest available revision (r47). Note : old version. Updated version with CSRF support here : h…
--- checkgmail 2013-02-28 14:24:44.614055113 +0100
+++ checkgmail.current 2013-03-01 22:22:30.211693526 +0100
@@ -33,13 +33,18 @@
# global variables (can't be set global in the BEGIN block)
my ($version, $silent, $nocrypt, $update, $notsexy, $profile, $disable_monitors_check,
- $private, $cookies, $popup_size, $hosted_tmp, $show_popup_delay,
- $popup_persistence, $usekwallet, $libsexy, $nologin, $mailno, $debug);
+ $private, $cookies, $two_factor_auth_switch, $popup_size, $hosted_tmp, $show_popup_delay,
+ $popup_persistence, $use_kwallet, $libsexy, $nologin, $mailno, $debug);
@NathanHowell
NathanHowell / curry.hs
Created May 31, 2013 23:36
A proof-of-concept demonstrating the use of Z3 to solve Cabal version constraints for Haskell packages
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
@debasishg
debasishg / gist:8172796
Last active March 15, 2024 15:05
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@michaelochurch
michaelochurch / 911-real-estate-boom
Last active January 2, 2016 04:19
Explanation of NYC's 9/11 Boom.
Real estate (like oil in the short term, cf. "oil shocks" of the 1970s) is extremely supply-inelastic,
such that a 1% loss of supply might cause prices to go up *a lot* more than 1%-- possibly 10%, 20%,
even 2x. The result of this is that a destruction of real estate supply will actually increase the
*total* market value: a cataclysmic loss of 5% of NYC's real estate would drive prices through the roof
and make the price level look "healthy" (from the buyer-centric perspective common in the US when it
comes to housing). But no value was created! Much was destroyed.
The 2000s run-up in NYC's housing costs was driven largely by speculation after 9/11. While we
*actually* had 12+ subsequent years with no major domestic terror attacks, there were a large number of
(esp. foreign) speculators who expected future attacks in major cities and bought lots of RE in
@david-christiansen
david-christiansen / FizzBuzzC.idr
Last active August 29, 2022 20:00
Dependently typed FizzBuzz, now with 30% more constructive thinking
module FizzBuzzC
%default total
-- Dependently typed FizzBuzz, constructively
-- A number is fizzy if it is evenly divisible by 3
data Fizzy : Nat -> Type where
ZeroFizzy : Fizzy 0
Fizz : Fizzy n -> Fizzy (3 + n)