Skip to content

Instantly share code, notes, and snippets.

SECTION |
2022-23
=e
~~,
epee nie SS
. a
/**
* @OnlyCurrentDoc Limits the script to only accessing the current presentation.
*/
/**
* Create a open translate menu item.
* @param {Event} event The open event.
*/
function onOpen(event) {
SlidesApp.getUi().createAddonMenu()
<?php
session_start();
require_once('response.php');
$kk = new Response();
if (isset($_REQUEST['event']) && ($_REQUEST['event'] == 'NewCall')){
/*New Call Request */
$kk->addPlayText("please enter or say ten digits mobile number to which amount is to be transffered. after the beep",'2','best');
$kk->addRecognize('indybol','digits_hi',5,15,'en',10);
$_SESSION['block'] = 'menu1_output';
}
@nutanc
nutanc / face_replace.py
Created July 11, 2016 05:59
Face Replace
#!/usr/bin/python
# face_replace.py
# Usage: python face_replace.py <image_file> [face index]
import sys
import cv2
def detectObjects(image):
"""Converts an image to grayscale and returns the locations of any faces found"""
grayscale = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
@nutanc
nutanc / overlay.py
Last active July 11, 2016 06:16
Overlay one image over another
import sys
import cv2
import argparse
def detectObjects(image):
"""Converts an image to grayscale and returns the locations of any faces found"""
grayscale = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cascade = cv2.CascadeClassifier(
'haarcascade_frontalface_alt2.xml')
#!/bin/sh
#
# Add a Google Analytics tag to static website files
# @see http://adambuchanan.me/post/26345221717/updating-google-analytics-code-on-many-static-pages
# Tested on MacOS 10.8.X
#
# Usage:
# Set the GA parameters below
# Execute the script from the top-level of the static site
#
@nutanc
nutanc / GmailHelper.java
Created July 14, 2014 04:27
Helper class for Gmail API to send and receive mails
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.auth.oauth2.TokenResponse;
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow;
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeRequestUrl;
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
import com.google.api.client.googleapis.auth.oauth2.GoogleTokenResponse;
import com.google.api.client.http.GenericUrl;
import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpRequestFactory;
import com.google.api.client.http.HttpTransport;