Skip to content

Instantly share code, notes, and snippets.

View siscia's full-sized avatar

Simone Mosciatti siscia

View GitHub Profile
@siscia
siscia / HSEurope.md
Last active December 18, 2015 02:09
Hacker school Europe
@siscia
siscia / prova.md
Last active December 18, 2015 20:29
(def a 3)
(println a)
(def b 8)
(+ a b)
(map a b)
(ns asciidoc-to-markdown.core
(:use [clojure.tools.cli :only [cli]]))
(def titles-regex
(sorted-map-by #(> (count %1) (count %2))
"###### $1" #"====== +([^ \t\n\r\f\v].*?)"
"##### $1" #"===== +([^ \t\n\r\f\v].*?)"
"#### $1" #"==== +([^ \t\n\r\f\v].*?)"
"### $1" #"=== +([^ \t\n\r\f\v].*?)"
"## $1" #"== +([^ \t\n\r\f\v].*?)"
(ns base-conversion.core)
(def characters
(concat (map char (range 48 58)) (map char (range 65 91))))
(def conversion-table
(zipmap
characters
(range)))
;; I would be very surprised if it works...
(go
(loop []
(let [c (chan)
tok (do
(reify MqttCallback
(deliveryComplete [_ tok]
(when-let 1
(go (>! c :arrived))
(swap! tok->chan dissoc tok))))
(defn subset
([s]
(subset [] s))
([tot r]
(if (seq r)
(lazy-cat
(subset (conj tot (first r)) (next r))
(subset tot (next r)))
[tot])))
simo@simo:~$ sudo apt-get install emacs-snapshot
[sudo] password for simo:
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
Alcuni pacchetti non possono essere installati. Questo può voler dire
che è stata richiesta una situazione impossibile oppure, se si sta
usando una distribuzione in sviluppo, che alcuni pacchetti richiesti
non sono ancora stati creati o sono stati rimossi da Incoming.
Le seguenti informazioni possono aiutare a risolvere la situazione:
#include <stdio.h>
#include <stdlib.h>
struct listnode
{
void * element;
struct Node * next;
};
typedef struct listnode ListNode;
import random
from math import sqrt
location = [(random.randint(0,10), random.randint(0,10))
for i in xrange(20)]
location = set(location)
def distanza(first, second):
(ns solution
(:gen-class))
(defn make-fibonaccis [a b]
(lazy-seq
(cons a (make-fibonaccis b (+ a b)))))
(defn make-primes [numbers]
(cons (first numbers)
(lazy-seq