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
| function isPrivateIPv4(ip) { | |
| // Regular expression for IPv4 validation | |
| const ipv4Regex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/; | |
| // Check if IP matches IPv4 format | |
| if (!ipv4Regex.test(ip)) { | |
| return `${ip} : is not a valid IPv4 address`; | |
| } | |
| const ipParts = ip.split('.').map(part => parseInt(part)); |
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
| {"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]} |
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
| apiVersion: crds.voicestreams.com/v1 | |
| kind: Text | |
| metadata: | |
| name: text-1 | |
| spec: | |
| to: "Amith Nambiar" | |
| phoneNumber: "+614XXXXXXX" | |
| message: "Welcome to the world of Custom Resource Definition in Kubernetes" |
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
| apiVersion: crds.voicestreams.com/v1 | |
| kind: Call | |
| metadata: | |
| name: call-1 | |
| spec: | |
| callee: "Amith Nambiar" | |
| phoneNumber: "+6142XXXXXXX" | |
| # Message to be played to the callee | |
| message: "Welcome to the world of Custom Resource Definitions in Kubernetes" |
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
| # Configure the Microsoft Azure Provider | |
| provider "azurerm" { | |
| # The "feature" block is required for AzureRM provider 2.x. | |
| # If you're using version 1.x, the "features" block is not allowed. | |
| version = "=2.0.0" | |
| features {} | |
| subscription_id = var.subscription_id | |
| tenant_id = var.tenant_id | |
| client_id = var.client_id |
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
| package com.voicestreams.app | |
| import org.apache.spark.{SparkConf, SparkContext} | |
| object CharacterCount extends App { | |
| val sparkConf = new SparkConf().setAppName("Character Count Job") | |
| .setMaster("local[4]") | |
| val sc = new SparkContext(sparkConf) |
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
| package com.voicestreams.spark; | |
| import org.apache.commons.io.FileUtils; | |
| import org.apache.spark.SparkConf; | |
| import org.apache.spark.api.java.JavaPairRDD; | |
| import org.apache.spark.api.java.JavaRDD; | |
| import org.apache.spark.api.java.JavaSparkContext; | |
| import org.apache.spark.api.java.function.Function2; | |
| import org.apache.spark.api.java.function.PairFunction; |
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
| package spark.poc; | |
| import org.apache.commons.io.FileUtils; | |
| import org.apache.spark.SparkConf; | |
| import org.apache.spark.api.java.JavaRDD; | |
| import org.apache.spark.api.java.JavaSparkContext; | |
| import org.apache.spark.api.java.function.FlatMapFunction; | |
| import org.apache.spark.api.java.function.Function2; | |
| import org.apache.spark.api.java.function.PairFunction; |