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
// http://expressjs.com/api.html#cookieSession | |
var express = require('express'); | |
var app = express(); | |
// ignore GET /favicon.ico | |
app.use(express.favicon()); | |
// pass a secret to cookieParser() for signed cookies | |
app.use(express.cookieParser('manny is cool')); |
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 _ = require('lodash'); | |
var arr = [ | |
{"name":"my2child1","title":"My 2 Child 1","parent":"my2"}, | |
{"name":"my2child2","title":"My 2 Child 2","parent":"my2"}, | |
{"name":"parent","title":"A single parent"}, | |
{"name":"child-parent","title":"A child parent","parent":"child1"}, | |
{"name":"my","title":"My"}, | |
{"name":"my2","title":"My2"}, | |
{"name":"child1","title":"Child 1","parent":"my"}, |
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
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="redirect all requests" stopProcessing="true"> | |
<match url="^(.*)$" ignoreCase="false" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" /> | |
</conditions> | |
<action type="Rewrite" url="index.html" appendQueryString="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 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) |