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
| << front >> | |
| 13 12 | |
| 4 5 | |
| 1 8 | |
| 16 9 | |
| back | |
| 11 14 | |
| 6 3 | |
| 7 2 | |
| 10 15 |
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
| package org.jmlspecs.samples.jmltutorial; | |
| public class Person { | |
| private /*@ spec_public non_null @*/ String name; | |
| private /*@ spec_public @*/ int weight; | |
| /*@ public invariant !name.equals("") | |
| @ && weight >= 0; @*/ | |
| /*@ also |
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
| {-# LANGUAGE DeriveFunctor #-} | |
| -- https://stackoverflow.com/questions/11406786/what-is-the-combinatory-logic-equivalent-of-intuitionistic-type-theory | |
| data SKUP = S | K | U | P deriving (Show, Eq) | |
| data Unty a | |
| = C SKUP | |
| | Unty a :. Unty a | |
| | V a |
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 cltk.corpus.utils.importer import CorpusImporter | |
| from cltk.stem.lemma import LemmaReplacer | |
| from cltk.tokenize.latin.sentence import SentenceTokenizer | |
| from nltk.tokenize.punkt import PunktLanguageVars | |
| from pystardict import Dictionary | |
| from open_words.parse import Parse | |
| import cltk.prosody.latin.string_utils as string_utils | |
| from cltk.lemmatize.latin.backoff import BackoffLatinLemmatizer | |
| from cltk.tag.pos import POSTag |
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
| import cv2 | |
| import numpy as np | |
| from math import sin, cos, pi, sqrt | |
| import random as rand | |
| from time import time | |
| def drawCuttedEllipse(frame, ellipse, cut_coeff, color): | |
| (cx, cy), (a, b), angle = ellipse | |
| if a > b: |
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
| #!/bin/bash | |
| COUNTER=1 | |
| PAGES=1168 | |
| while [ $COUNTER -lt $PAGES ]; do | |
| TO=$((COUNTER+100)) | |
| if [ $TO -gt $PAGES ] | |
| then | |
| let TO=$PAGES | |
| fi | |
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
| wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains thelatinlibrary.com --no-parent http://thelatinlibrary.com/christian.html | |
| ebook-convert index.html ../test.epub --max-levels 3 |
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
| import cv2 | |
| import numpy as np | |
| import itertools | |
| import random as rnd | |
| # TODO: | |
| # swap so that img1 always over img2 | |
| def fix_overlap(res, img1, x1, y1, img2, x2, y2): | |
| h1, w1, _ = img1.shape |
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
| encrypt :: Integer -> Integer -> String -> String | |
| encrypt 0 0 msg = | |
| let primes = take 90 $ filter isPrime [1..] | |
| p1 = last primes | |
| p2 = last $ init primes | |
| tot = totient p1 p2 | |
| e = myE tot | |
| n = p1 * p2 | |
| rsa_encoded = rsa_encode n e $ encode msg | |
| encrypted = show rsa_encoded |
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
| module BoolExpr where | |
| type BExpr | |
| = BTrue | |
| | BFalse | |
| | BAnd BExpr BExpr | |
| | BOr BExpr BExpr | |
| -- Example of (1 /\ (0 \/ 1)) AST: | |
| expr = BAnd BTrue (BOr BFalse BTrue) |