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
( | |
~ = . ( , . . +/+ " . "); | |
~ = . ( , . . +/+ " . "); | |
(\ , | |
{ | |
| = , = , = , = , = , = . , = , = , = | | |
; | |
= . ( | |
: , |
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
# download corpus from https://www.ngrams.info | |
corpus = open('5-grams non case sensitive.txt') | |
corpus = [' '.join(line.split()[1:]) for line in corpus] | |
love = 'i love you' | |
lines = [line for line in corpus if line.find(love) >= 0] | |
lines = [line.rjust(len(line) - line.find(love) + max([line.find(love) for line in lines])) for line in lines] | |
lines = [line.replace(love, ' ' * len(love)) for line in lines] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>space invaders</title> | |
<style> | |
body { | |
margin: 0; | |
width: 100vw; | |
height: 100vh; |
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 settings = { | |
resolution : { | |
x : 180, | |
y : 120, | |
}, | |
margin : 5, | |
color : { | |
foreground : [0, 255, 0], |