Skip to content

Instantly share code, notes, and snippets.

View anshumankmr's full-sized avatar

Anshuman Kumar anshumankmr

View GitHub Profile
@anshumankmr
anshumankmr / index.js
Created January 2, 2023 17:21
Since the default cloud function for Dialogflow ES does not work anymore, I have created a minor modification that allows one to run it directly from your agent
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs
// for Dialogflow fulfillment library docs, samples, and to report issues
'use strict';
const functions = require('firebase-functions');
const {WebhookClient} = require('dialogflow-fulfillment');
const {Card, Suggestion} = require('dialogflow-fulfillment');
process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements
@anshumankmr
anshumankmr / index.html
Created February 13, 2022 07:10
FrontEnd Master's Project: HTML & CSS for COMPLETE INTRO TO WEB DEVELOPMENT
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./styles.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
import cv2
import numpy as np
def getTextOverlay(img):
pathname = "."
output = np.zeros(img.shape, dtype=np.uint8)
vis = img.copy()
channels = cv2.text.computeNMChannels(img)
# Append negative channels to detect ER- (bright regions over dark background)
cn = len(channels)-1