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 math | |
import zipfile | |
from PIL import Image, ImageOps, ImageDraw | |
import pytesseract | |
import cv2 as cv | |
import numpy as np | |
face_cascade = cv.CascadeClassifier('readonly/haarcascade_frontalface_default.xml') | |
parsed_img_src = {} |
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 org.apache.spark.util.AccumulatorV2 | |
import scala.collection.mutable | |
class TupleAccumulator extends AccumulatorV2[((String, String), Long), Map[(String, String), Long]] { | |
private val underlying: mutable.HashMap[(String, String), Long] = mutable.HashMap.empty | |
override def isZero: Boolean = underlying.isEmpty | |
override def copy(): AccumulatorV2[((String, String), Long), Map[(String, String), Long]] = { |
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
package main | |
import ( | |
"fmt" | |
"time" | |
"strconv" | |
"os" | |
) | |
func main() { |
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
curl -X PUT "http://localhost:9200/_ingest/pipeline/reqlog-monthly-index" -H 'Content-Type: application/json' -d' | |
{ | |
"description": "monthly index naming for reqlog", | |
"processors" : [ | |
{ |
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
scala> java.util.Arrays.asList("1", "2").toArray.foreach(println) | |
1 | |
2 |
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
# read file and apply foreach. | |
# example - (curl ) | |
for i in $(cat file); do | |
curl -X GET "http://localhost/api/v1/orders/$i" -H "accept: application/json;charset=UTF-8" | |
sleep 1 | |
done |