This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "An Haskell application"; | |
inputs = { | |
nixpkgs.url = github:NixOS/nixpkgs; | |
flake-utils.url = github:numtide/flake-utils; | |
easy-hls-src.url = github:jkachmar/easy-hls-nix; | |
}; | |
outputs = { self, nixpkgs, flake-utils, easy-hls-src }: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from sys import exit, stdin | |
from argparse import ArgumentParser, RawDescriptionHelpFormatter, FileType | |
from types import CodeType | |
from dis import dis, opmap | |
import marshal | |
from importlib.util import MAGIC_NUMBER | |
from textwrap import dedent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
/* Roba relativa alla gestione della memoizzazione, in teoria riutilizzabile per | |
* diverse funzioni */ | |
#define LUNGHEZZA 1000 | |
struct { //Memoria globale, cioe' vettore di coppie input/output | |
int in, out; | |
} memoria[LUNGHEZZA]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var triTable = [ | |
[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], | |
[0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], | |
[0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], | |
[1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], | |
[1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], | |
[0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], | |
[9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], | |
[2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1], | |
[3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use Start key as $mod | |
set $mod Mod4 | |
# Font for window titles. | |
font pango:DejaVu Sans Mono 8 | |
# Use Mouse+$mod to drag floating windows to their wanted position | |
floating_modifier $mod | |
# Set colors palette |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const T = (x) => ((y) => x) | |
const F = (x) => ((y) => y) | |
const ifThenElse = (cond) => ((a) => ((b) => cond(a)(b))) | |
const cons = (a) => ((b) => ((c) => c(a)(b))) | |
const car = (l) => l(T) | |
const cdr = (l) => l(F) | |
const nil = cons(T)(T) | |
const isNil = car | |
const node = (x) => cons(F)(x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct pila_nodo { | |
char valore; | |
struct pila_nodo * prossimo; | |
}; | |
typedef struct pila_nodo elemento; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct lista_nodo { | |
char valore; | |
struct lista_nodo * prossimo; | |
}; | |
typedef struct lista_nodo elemento; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
from colorsys import hsv_to_rgb | |
hue2rgb = lambda hue: tuple([int(color * 255) for color in hsv_to_rgb(hue, 1, 1)]) | |
width, height = 300, 300 | |
image = Image.new(mode="RGB", size=(width, height), color=(0, 0, 0)) | |
xa, xb = -1.5, 1.5 | |
ya, yb = -1.5, 1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
from colorsys import hsv_to_rgb | |
hue2rgb = lambda hue: tuple([int(color * 255) for color in hsv_to_rgb(hue, 1, 1)]) | |
width, height = 500, 500 | |
image = Image.new(mode="RGB", size=(width, height), color=(0, 0, 0)) | |
xa, xb = -2.0, 1.0 | |
ya, yb = -1.5, 1.5 |
NewerOlder