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 { Compilation, sources } from 'webpack'; | |
/** | |
* This is a basic Webpack plugin producing an asset map similar to what WebpackManifestPlugin does, | |
* except instead of emitting a manifest.json, it inlines the manifest in the source, replacing a | |
* variable by name in the source. | |
* It was written to only cover our basic use case of referencing some "internally public" chunks by | |
* their basic name and map that to their built name with a hash. | |
* | |
* @example With an appropriate `filter` option, replaces a variable `__BUNDLING_MANIFEST__` with: |
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
/** | |
* Fetches and constructs the breadcrumb of modules, starting from the last opened on the stack (startModuleId), | |
* tracing back to the root module, thanks to each module's parentId. | |
* | |
* @param startModuleId The last module you want to be opened in the breadcrumb. | |
*/ | |
private fetchModules(startModuleId: AuditModule['_id']): Observable<AuditModule[]> { | |
//=> Each time we need to fetch a new module, we emit the wanted module id on this subject | |
const fetchIdSubject = new BehaviorSubject(startModuleId); |
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 numpy as np | |
import argparse | |
import glob | |
import cv2 | |
import json | |
def auto_canny(image, sigma=0.33): | |
otsu_thresh_val, ret = cv2.threshold(image, 0, 255, cv2.THRESH_BINARY|cv2.THRESH_OTSU) | |
lower = otsu_thresh_val * 0.3 |