This file contains hidden or 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 |
This file contains hidden or 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
| HISTFILE=~/.histfile | |
| HISTSIZE=1000 | |
| SAVEHIST=1000 | |
| setopt HIST_IGNORE_DUPS | |
| bindkey -v | |
| export BROWSER='chromium' | |
| export EDITOR='vim' | |
| export PAGER='vimpager' | |
| export PATH='/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl:/opt/sdk/tools:/opt/sdk/platform-tools' |
This file contains hidden or 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
| "filetype off | |
| call pathogen#infect() | |
| call pathogen#helptags() | |
| filetype plugin indent on | |
| syntax on | |
| set smartindent | |
| set shiftwidth=4 |
This file contains hidden or 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 <stdlib.h> | |
| #include <stdio.h> | |
| #include <time.h> | |
| #define height_max 1000 | |
| #define width_max 1000 | |
| typedef enum {false, true} bool; |
This file contains hidden or 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 | |
| import matplotlib.pyplot as plt | |
| gg = 365 | |
| fattoriale = lambda n: 1 if n == 0 else fattoriale(n-1)*n | |
| prob_comp = lambda n: 1-(fattoriale(gg)/(fattoriale(gg-n)*gg**n)) | |
| if __name__ == '__main__': | |
| x = list(range(1, 100)) | |
| y = list(map(prob_comp, x)) |
NewerOlder