Student: Xavier Weber
Mentors: Vladimir Tyan & Yida Wang
Student on the same project: Fanny Monori
Link to accomplished work:
- PR in the opencv_contrib repository: opencv_contrib/pull/2231
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
# (Variant #4 for exercise 16.2 on EPI (Elements of Programming Interviews)) (September 2018 edition) | |
# The core idea is calculate the levenshtein distance, while taking into account the special cases of the regex expression | |
# *, +, ? and . were taken into account for the regex expression. Expression blocks are not supported | |
# This algorithm uses recursion with memoization (could be transposed to a DP solution), yielding a O(mn) time complexity, O(mn) auxiliary space for cache and O(max(m,n)) function call stack | |
# (m and n are the lengths of regex and target strings respectively) | |
# | |
# Version using dynamic programming: https://gist.github.com/lopespm/2362a77e7bd230a4622a43709c195826 | |
def regex_dist(regex: str, target: str): | |
def regex_dist_aux(r_i, t_i): |
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
# Cache sudo password | |
sudo -v | |
# Enable installation of 32-bit packages | |
sudo dpkg --add-architecture i386 | |
# Enable the Ubuntu partner repository (this doesn't seem to be necessary for 20.04) | |
if [ $(lsb_release -r | awk '{print $2}') == '18.04' ]; then | |
sudo sed -i 's/^# deb http:\/\/archive.canonical.com\/ubuntu/deb http:\/\/archive.canonical.com\/ubuntu/' /etc/apt/sources.list | |
sudo apt update |
Mermaid is a JavaScript based parsing engine that allows you to embed blocks of graph markup into a page. Markdown Monster supports two different approaches using either code block or HTML tag syntax to embed the mermaid blocks.
Note the MM internal preview can't properly display or refresh all chart types, but you can preview in your system browser via
Shift-F12
to see proper representation.
You can use a mermaid
code block:
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 | |
def deskew(im, max_skew=10): | |
height, width = im.shape | |
# Create a grayscale image and denoise it | |
im_gs = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) | |
im_gs = cv2.fastNlMeansDenoising(im_gs, h=3) |
You would think it would be easy to find this information, but none of the Github or Gandi documentation is clear so I have recorded the required steps here.
Create the following A records:
@ 1800 IN A 185.199.108.153
@ 1800 IN A 185.199.109.153
@ 1800 IN A 185.199.110.153
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
# use ImageMagick convert | |
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf | |
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf |
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
#include "InternetButton.h" | |
#include "math.h" | |
/** | |
* Sensor calibration data: | |
* Wet = 1520 | |
* Dry = 3120 | |
* (Calibrate this for yourself!) | |
*/ |
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
brew options ffmpeg | |
brew install ffmpeg \ | |
--with-chromaprint \ | |
--with-fdk-aac \ | |
--with-fontconfig \ | |
--with-freetype \ | |
--with-frei0r \ | |
--with-game-music-emu \ | |
--with-libass \ |