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
{-# 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 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 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 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 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 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 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 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) |
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
using LibraryManagement.Data.Interfaces; | |
using Microsoft.EntityFrameworkCore; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace LibraryManagement.Data.Repository | |
{ | |
// This class abstracts out the most common basic operations for |
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 turtle | |
import math | |
# даны 2 числа, берем 2 ближайшие к ним точки на ковре улама, считаем кратчайший путь | |
def prime(n): | |
if n == 2: | |
return True | |
if n % 2 == 0 or n <= 1: | |
return False |