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
[Desktop Entry] | |
Name=Zathura | |
GenericName=PDF file viewer | |
Exec=zathura %f | |
TryExec=zathura | |
Icon=zathura | |
Terminal=false | |
Type=Application | |
MimeType=application/pdf | |
Categories=Viewer;Graphics; |
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
let mapleader="," " leader is comma | |
set nocompatible | |
set background=dark " tell vim that we have a dark background | |
syntax enable " enable syntax | |
colorscheme badwolf " colorscheme | |
" Prevent colorscheme from changing background color (opacity) | |
" Background color of text | |
highlight Normal ctermbg=None |
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
let mapleader="," " leader is comma | |
set background=dark " tell vim that we have a dark background | |
syntax enable " enable syntax | |
colorscheme badwolf " colorscheme | |
" Prevent colorscheme from changing background color (opacity) | |
" Background color of text | |
highlight Normal ctermbg=None | |
" Background color of non-text (bottom of file) |
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
import re, os, subprocess, io | |
import requests | |
from bs4 import BeautifulSoup | |
from urllib.request import urlopen | |
cmd1 = r'''/bin/grep -E "([A-Z]\w+[[:space:]])?([A-Z]\w+[[:space:]])?[A-Z]\w+[[:space:]]+[A-Z]\w+[[:space:]]+est[[:space:]]+né(e)?[[:space:]](\w+[[:space:]]+)*(le[[:space:]][0-9]+[[:space:]]\w+[[:space:]][0-9]+|en[[:space:]]+[0-9]+)(([[:space:]]|,|\.)+(à|au|Au|À)[[:space:]]+\w+([[:space:]]|\.|,))?" -o /home/lulu/EPFL/BA6/SHS-BA6/data/express.json''' | |
cmd2 = r'''/bin/grep -E "([A-Z]\w+[[:space:]])?([A-Z]\w+[[:space:]])?[A-Z]\w+[[:space:]]+[A-Z]\w+[[:space:]]+est[[:space:]]+né(e)?[[:space:]](\w+[[:space:]]+)*(le[[:space:]][0-9]+[[:space:]]\w+[[:space:]][0-9]+|en[[:space:]]+[0-9]+)(([[:space:]]|,|\.)+(à|au|Au|À)[[:space:]]+\w+([[:space:]]|\.|,))?" -o /home/lulu/EPFL/BA6/SHS-BA6/data/gazette.json''' | |
temp1 = subprocess.check_output(cmd1, shell=True) | |
temp2 = subprocess.check_output(cmd2, shell=True) |
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
import stainless.collection._ | |
import stainless.lang._ | |
import stainless.proof._ | |
object InsertionSort { | |
import TotalOrderLaws.TotalOrder | |
def bag[T](list: List[T]): Bag[T] = list match { | |
case Nil() => Bag.empty[T] | |
case Cons(x, xs) => bag(xs) + 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
def lemma_leftIdentity(x: MMap[String, BigInt]): Boolean = { | |
(append(empty, x) == x) because { | |
assert(append(empty, x) == append(MMap.empty, x)) | |
assert(append(MMap.empty, x) == MMap.empty.merge(x)) | |
assert(MMap.empty.merge(x) == MMap{ k: String => | |
M.append(MMap.empty.apply(k), x.apply(k)) | |
}) | |
assert(MMap{ k: String => | |
M.append(MMap.empty.apply(k), x.apply(k)) | |
} == MMap{ k: String => |
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
import stainless.lang._ | |
import stainless.proof._ | |
import stainless.annotation._ | |
object WordCount { | |
import MonoidLaws._ | |
import MonoidMap._ | |
// How to use stainless's Map? | |
// It doesn't have map and it doesn't have postconditions |