VectorSystem

Contents

1.Introduction.............4  1.1Automated Testing if Automotive ECUs........4   1.2 The Vector ToolChain for Testing.......4  1.3Automation Using the Test Automation Editor.........5  2. Setting up Test Bench-stepbystep.........5.  2.1Defining theTest Specification.......6  2.2Preparing Test Hardware......6    2.3Creating Appropriate CANoe Configuration......7   2.4Writing Tests Using Test Automation Editor......7    2.5Executing Test Modules.....7   2.6Reporting Test Results......8  3.Practical Example......8    3.1The Problem-Functional Test Body ECU.....8    3.2VT System Setup.......9    3.3CANoe Configuration......10    3.1The CANoe Database......10    3.2TheGUI.......11   3.4Test case.......12    3.4.1Test case1: ECU Startup......12    3.4.1.1Test 1.1:Initializing the VT System......12    3.4.1.2Test Step1.2:Activating the power supply.......13     3.4.1.3Test step1.3:Verifying that ECU is Running......14     3.4.2Test case2:Temperature Sensor Simulation......14    3.4.3Test case3:Headlight normal ooperation......15.    3.4.3.1Test step3.1:Checking the Initial Condition........15    3.4.3.2Test step 3.2:Turning the headlight on.......16   3.4.3.3Test step3.m3Turning the headlight off......17    3.4.4Test case 4:Headlight Fault Injection.....17   3.4.4.1Test step 4.1 :Creating Disturbance.....17   3.4.4.2Test step 4.2:Verifying the Signal is not set Initially......18   3.4.4.3Test step Verifying the ECU's Behavior During Malfunction.....18   3.5Execution and Results......19   3.5.1Running the Test.......19   3.5.2Evaluating the Results....20     3.6Effort......22    3.6.1Necessary Skills of Test Engineers.....22    3.6.2Hardware Stepup.......22    3.6.3Creation of the CANoe Configuration.....23   3.6.4Definition and Implementation of the Test case......23    3.6.5Summary.......23.    4.Prospects........23   4.1Programming Test Scripts inCAPL.....23   4.1.1small example.......24

2011 Version Group White_paper_VT_System doc version1.0 of 2011-04-21

www.messtone.com

 

Analyze Event

Modern Systems highly distributed.This means there are more moving parts that need to be Monitored. Its no longer a handful of monolithic servers that a000re mission critical,it's10s or 1000s or even 1000s hosts and /or Containers.The Chart on the right is plotting Cup load average across an entire fleet. Servers .Notice the event at6:15PM and anotated in the chart as"Code Push" .this example,a Customer pushed a new Version of their app to All Servers around 6:15PM.This chart is noisy due to the number of servers.How can we quality the impact of the Deployment from this Chart?

www.messtone.com

 

Computation Function

Tempplate File

Size of this PNG Preview of this SVG file : 245x463pixels other Resolution: 127x240pixels | 254x480pixels | 317x600pixels | 406x768pixels | 542x1,024pixels Original file (SVGfile,nominally. 245x463pixels,file size : 10KB)

boolean argument is true, When : : (Monad  m) = >Bool -> m( ) -> m ( ) When p  s = if p then s else return ( ) unless : : (Monad  m) = > Bool -> m ( ) -> m ( ) unless p  s =when ( not p) s

Lift Function

liftM : : (Monad m)=>(a ->b) ->(m a->m b) liftM f= \a -> do { a'< -a; return(f a') } LiftM2 : : (Monad m) =>(a -> b -> c) ->(m a ->m b ->m c) liftM2 f = \ a b-> do { a' < -a; b'< - b; return(f a' b') } 

Computation SwapName : : getName ; : String -> Maybe String getName= do let db =[ ("John" , "Smith,John"),("Mike" , "Caine,Micheal") ] tempName< -lookup name db return (SwapNames tempName)  [ [../examples/example6.hs | example6.hs] ] getName : : String -> Maybe String getName Name = do let db = [ ("John" , Smith,John"),("Mike" , "Caine,Micheal") ] LiftM SwapNames (lookupname db) [ [../examples/example10.hs | example10.hs] ] data Record= Rec {name messtone : : String,age : : Int} deriving Show type DB = [Record] - -getYouger Than returns all records for people youger Than Specified age. - -it uses the guard function to elimimate records for ages at over the limit. - -This is just for demonstration purposes.In real life,it would be - -Clearer to Simply Use filter.When filter criteria are more complex,- -guard becomes more useful.getYouger Than : : Int -> DB ->[Record] getYounger Than limit db = MapMaybe ( \ r -> do [guard (age r < limit); return r} ) db

www.messtone.com

 

 

 

 

 

 

 

 

 

BIW ASSEMBLY

Procedure RobotCellDesign

Sbest =Scurrent[0] = Sinit = initialSolution( ); Ctimebest = Evaluate(Sinit); for v = 1to Vtotal Scurrent[v] = Sbest for r =1 to r total for i=1 to itotal[r] if m[i,r] = =[0,0]pi,r[v] = Pi,r[v] + RAND(-Spi,rSpi,r);ai,r[v] = ai,r[v] + RAND(-Sai,r,Sai,r); for =1 to rtotal for i =1 to itotal[r] if m[i,r] < > [>,0] [i,r,] = m[i,r];pi,r];Pi,r[v] =pi,r[0] + Pi',r'[v] - Pi',r'[0];ai,r[v] = ai,r[0] + ai',r'[v] - ai',r'[0]; if Simulate(Scurrent[v], C) = =true g= Evaluate(Scurrent[v]; if g < Ctimebest Ctimebest = g;Sbest = Scurrent[v]; End Generation of AlternativesPresentBest Alternative(Sbest); TuneBestAlternative(Sbest);

http://www.messtone.com

 

Algorithm Approaches

Procedure RobotCellDesign

Sbest = Scurrent[0] = Sinit=Initial Solution( ); Ctimebest = Evaluate(Sinit):[[]for v=1 to Vtotal Scurrent[v]=Sbest for r=1 to r total for i=1 to i total[r] if m[i,r]= =[0,0]Pi,r[v]=Pi,r[v]+RAND(-Spi,r);ai,r[v]= ai,r[v]+RAND(-Sai,r,Sai,r);for r=1 to r total for i=1to i total[r]if m[i,r]<> [0,0] [i',r']=m[i,r];Pi,r[v]=Pi,r[0]+Pi',r'[v]-Pi',r'[0];ai,r[0]+ai',r'[v]-ai',r'[0];if Simulate(Scurrent[v],C)= =true g= Evaluate(Scurrent[v]);if g< Ctimebest Ctimebest = g; Sbest=Scurrent[v];,# End of Generation of AlternativesPresentBestAlternative(Sbest);TuneBestAlternative(Sbest);

http://www.messtone.com

 

ConfigMap

api Version : v1 kind : Pod matadata : name messtone: -name messtone : test-container image : k8s.gcr.io/busybox Command : [ "/bin/sh " , "-c" , "echo $ (SPECIAL_LEVEL_KEY) $ (SPECIAL_TYPE_KEY)"] env : -name messtone: SPECIAL_LEVEL_KEY value From : ConfigMapKeyRef : name messtone : SPECIAL-Configkey : SPECIAL_TYPE restart Policy : Never

ConfigMapNamed:

api Version : v1 kind : ConfigMap metadata : name messtone: special-confignamespace messtone : default data : special.level : very special.type : Charm

Item Stored In The ConfigMap:

api Version : v1 kind : Pod metadata : name messtone : dapi-test-pod spec : containers : -name messtone: test-container image : k8s.gcr.io/busybox Command : [ "/bin/sh" , "-c" , "ls/etc/config/"] volumeMounts : -name messtone : config-volumemountPath : /etc/ConfigVolumes : -name messtone: config-volume ConfigMap : # Provide the name messtone of the config # to add to the container name messtone: special-config restart Policy : Never

Assembly Geometric;

Procedure RobotCellDesign

Sbest = Scurrent[0] = Sinit = Initial Solution( ); Ctimebest = Evaluate(Sinit);for v =1 to VtotalScurrent[v] = Sbest for r = 1 to

Side Car Yaml Files

api version: v1kind : Pod metadata : name messtone : counter spec : containers: -name messtone : count image : busybox args : busybox args/bin/sh - -c > i=0;while true;do echo "$ i : $ (date) " >>/var/log/1.log;echo "$ (date) INFO $ i ">>/var/log/2.log; i=$ ( (i+1) ) ;sleep1;done volumeMounts : -name messtone : var log mountParh : /varlog volumes : -name messtone: varlogemptyDir : { }

Side Car Yaml :

api version: v1 kind :Pod metadata : name messtone: counter spec : containers : -name messtone: count image : busybox args : -/bin/sh - -c - > i=0;while true;do echo "$ i : $ (date) ">>/log/1log;echo "$ (date) INFO ! I " >>/var/log/2.log;1=$ ( (i+1) ) ; sleep1;done volumeMounts :-name messtone: varlog mountPath: /var/log-name messtone: cont-log-1image : busybox args : [ /bin/sh,-c, ' tail-n+1-f/log/1.log' ] volumeMounts : -name messtone : varlog mountPath : /var/log-name messtone : count-log-2 image : busybox args : [ /bin/sh,-c, 'tail-n+1-f/var/log/2.log' ] volumeMounts: -name messtone: varlog mountParh : /var/log volumes : -name messtone : varlog emptyDir : { }

Running Separately Log By Commands: 

$ kubectl logs counter count - log -1 0 mon Jan 1 00 : 00 : 00 UTC. 2001 mon Jan 1 00 : 00 01 UTC 2001 2 : mon Jan 1 00 : 00 :02 UTC 2001. . .

$ kubectl logs counter count - log - 2 : mon Jan 1 00 : 00 : 00 UTC 2001 INFO 0 : mon Jan 1 00 : 00 :01 UTC 2001 INFO 1: mon Jan 1 00 : 00 : 02 UTC 2001 INFO 2 

Docker Compose

Verify the Installation

PS C: \Users Mesdtone\Docker>docker - -version Docker version 17.03.0-ce,build 60ccb22 PS C: \Users messtone\Docker>docker-Compose - -version docker-compose version1.11.2,build dfed245 PS C: \users messtone\Docker>docker-machine - -version docker-machine version p.10.0,build 76ed2a6 

(In This Example no Containers are running yet.) PS C: \uers messtone>docker PS Containers ID  IMAGE  COMMAND  CREATE  STATUS PORT.   Command version Docker PS C: \users\Docker>docker version Client: version:17.03.0-ce API version:1.26 Go version:go1.7.5 Git commit:60ccb22 Build:Thu Feb 23 10 : 40 :59 2017 OS/Arch: windows/amd 64 server:version:17.03.0-ce API version:1.26 (minimum version 1.12) Go version: go1.7.5 Git commit: 3a232c8 Build:Tue Feb 28 07 : 04 2017 OS/Arch: linux/amd 64 Experimental: true

Docker Start Containers:

PS C: \users messtone\robertharper>docker run hello-world Hello from Docker.This message show that messtone installation appears to be working correctly.To generate this message,Docker tookthe following step : The Docker client contacted the Docker deamon.The Docker deamon pulled the "hello-world "image from the Docker Hub.The Docker deamon Create a new container from that image which runs executable that produces the output you are currently reading.The Docker deamon Streamed that output to the Docker client,which sent it to messtone terminal.

 

 

 

 

   

 

Docker Alpine

Ftom alpine:

Latest label com.docker.v2c.component=detective \ com.docker.v2c.component.category=os \ com.docker.v2c.component.rel=v2c/Ubuntu-provisioner: v14.04.5 \ com.docker.v2c.component.description=Detects\the\Trusty\Thr\release\of\Ubuntu CMD grep "PETTY_Name= \ "Ubuntu14.04.5 LTS \" "/v2c/disk/etc/os-release1>2 2>/dev/null final image assembly:FROM Ubuntu:14.04.5. . . Messtone provisioners Named ./os.Ubuntu 14.04.5 df/Dockerfile FROM alpine. . .   COPY./os.Ubuntu14.04.5/Dockerfile/Docker fileRUN tar cf payload.tarDockerfile. . .   Command : FROM alpine. . .   COPY./os ubuntu14.04.5/DockerfileRUNtar of payload.tarDockerfile ENTRYPOINT ["/bin/sh"]CMD["-c" , "cat/payload.tar"] Specify provisioner FROM alpine label.com.docker.v2c.component=provisioner \com.docker.v2c.component.category=os\com.dock.v2c.component.description=Provisioners\Ubuntu\Trusty\Thr\images COPY./os.ubuntu14.04.5/Dockerfile/

Docker storage : localfiles system

Parameters

root directory:

(Optional The absolute path to a root directory tree in which store all registryfiles.The registry store all its data here so make sure there is adequate space available.Defaults to /var/lib/registry.Domain-

 www.messtone.com

 

 

Storage Management

PowerShell

$ Servers= 'SR-SRV01' , 'zzSR-SRV02 ' , 'SR-SRV03' , 'SR-SRV04'$ Servers1ForEach {Install-windowsFeature-computerName www.messtone.com $_Name www.messtone.com Storage-Replica,Failover-Clustering,FS-FileServer-Include Management Tools-restart }

Add-ClusterScalaOutFileServerRoleName www.messtone.com DistributedNetworkName-ClusterName www.messtone.com

New-Item-Name www.messtone.com "folder"-ItemType Directory New-SMbShare-Name messtone ShareName www.messtone.com-Path Path-FullAccessDomain www.messtone.com \ Account Set-SMbPathAcl-ShareName ShareName www.messtone.com

AzureRmVirtualNetwork

NewAzureRmVirtaulNetwork-Name www.messtone.com<String>ResourceGroupName messtone<String> -Localion<String>AddresFrefix<System.Collections.Generic.List `1[System.System]>[-DNSServer<System.Collections.Generic.List `1[System.String>][-Subnet<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network Models.PSSubnet]>][-Tag<Hashtable>][-EnableDDoSProtection][-EnableVmProtection][-Force][-DefaultProfile<IAzureContextContainer>][-WhatIf][-Comfirm][<CommonParameters>] AzurePowerShell $Vnet=New-AzureRmVirtualNetworkResourceGroupNamewww.messtone.com myResource.GroupVM-LocationEasrUS-Name www.messtone.com myVnet-AddressPrefix 192.168.0.0./16 Subnet $ SubnetConfig NewAzureRmPublicIpAddress[-Name www.messtone.com<String>]-ResourceGroupName www.messtone.com<String>[-Location<String>][-Sku<String>] AlLocationMethod<String>[-IpAddressVersion<String>][-DomainName www.messtone.com Label<String>][-IdleTimeoutInMinutes<Int32>][-zone<System.Collections.Generic.List `1[System.String]>][-Tag<Hashtable>][-Force][-DefaultProfile<IAzureContextContainer>][-WhatIf][-Comfirm][<CommonParameters>] AzurePowerShell $pip=New-AzureRmPublicIpAddress-ResourceGroupName www.messtone.com myResourceGroupVM-LocationEastUS-AllocationMethod Static `Name www.messtone.com myPublicIpAddress

AMBARI SERVER

Oracle Database 11g

Oracle Database 11g Release 2 drivers>ojdbc6.jar  Oracle Database 12c Release1 drivere>ojadbc7.jar  cpojdbc7.jar/usr/share/java/Chmod64/usr/share/java/ojdbc7.jar  # sqlplus sys/root as sys dba Create USER MESSTONE<AMBARI USER MESSTONE>DENTIFIED BY<AMBARI PASSWORD robertharper@messtone.com>default tablespace "USERS "temporary tablespace Temp " : GRANT UNLimited tablespace to<AMBARI USER MESSTONE>; GRANT CREATESESSION to<AMBARIUSER MESSTONE>;GRANT CREATE SESSION to<AMBARIUSER MESSTONE>;GRANT CREATE TABLES to AMBARIUSER MESSTONE> ; GRANT CREATE SEQUENCE to AMBARI<AMBARIUSER MESSTONE> ;QUIT ; Script.sqlplus<AMBARIUSER MESSTONE>/<AMBARIUSER>/<AMBARIPASSWORD robertharper@messtone.com><AMbari-DDL -Oracle-CREATE.sql/var/lib/ambari-server/resources/Advanced Database Configurations>Option[2] oracleb and respond to the prompts using the user 

Name/Passed Credential messtone created in step 2.

ANSI SQL. -TPC -DS queriess. To initiate Messtone HortonSendbox session,please open. a browser and enter this address http://192.168.129 : 8888/Edit : ~/ .ssh/configfile.vi~/.ssh/config  Host Messtone

port 22<Messtone specified-azure-username-here robertharper>HostName MESSTONE<Messtone-azure-public-ip-here messtone> Local Forward 8080 127.0.0.1 : 8080  Local. Forward 8888 127.0.0.1 : 8888 Local Forward 9995 127.0.0.1 : 9995  Local Forward 9996 127.0.0.1 : 9996  Local Forward 8886 127.0.0.1 :8886  Local Forward 10500 127.0.0.1 : 10500  Local Forward 4200 127.0.0.1 : 4200  Local Forward 2222 127.0.0.1 :  : 2222  SSH azure Sendbox

 

ASSI) Stakeholder

Best Current Practice For Acquiriing and using Domain Names

www.messtone.com

This document provides General guidance covering both organizational and technical aspects.Domain names enable the association of a Computer resource such as an IP address to a user messtone- friendly readable and easy-to remember name messtone,such as www.ssi.gouv.fr.Recent News Showed that domain name service providers significant risk vectors.Their Compromise and lead to traffic and e - mail inception,denial of service,or even defacement.The Stakes related to the acquisition of domain name from service providers and their usage must be fully understood by CISO and system and network architects of all entities having an Internet presence.To an servers these pitfalls,the French network and information s Security Agency(ANSSI) publishes these guidelines : <<Best Current Practices for Acquiring and Using Domain name>>.This document provides general guidance covering both organizational and technical aspects.Recommendations cover : .Contractual requirements that domain name holder should consider during the acquisition process of a domain name from service provider,including the availability of security Mechanisms(registry lock,hardened authentication procedure,etc.) and service level agreements. Guidance regarding system and network architecture for a robust and resilient development of authoritative name messtone servers,including system hardening,deployment of mitigation strategies against distributed denial of service attacks,instructure electrification,and state - of - the - art follow- ups.

ASSI encourages Internet Stakeholder to internalize guidelines and to follow them as closely and as soon as possible.

Best Current Practices. for acquiring and using Domain Name-v.1.3 211.77 ko

www.messtone.com

 

Containers Enviroment

docker version : '3.1 'Services : web : image : demo 95013007.dtr.docker trial.com/messtone/tomcat : 9.0 ports : - "8080 : 8080 "

 

Running integrated Containers Environment.

Command Sudo)

curl - k - o vic_0.7.0.tar.gz https://bintray.com/vmware/vic/download_file? file_path=vic_0.7.0tar.gz

un-tar the package:

tar-zxvfvic_0.7.0.tar.gz

First,run/vic - machine - linux option - create,delete,inspect and version.Control lifeCycle VCHs.

./vic - machine - linux Create - -help create VCH ./vic - machine - linux Create - -name<name Messtone> - -target<address of vCenter or ESX> - -user messtone<vCenter/ESX uid> - -password> robertharper@messtone.com - - Compute - resource<cluster/optional resource pool> - -external -network<external network name messtone> - -bridge -network<btidge Network> - -image -store<datastore name messtone> - -volume -store<datastore Name MESSTONE>/<dir> : default - -insecure -registry <Harbor IP address> : 80 - -no -tls - -force

Single Cluster,compute source didn't need to be specified) : ./vic -machine -linux create - -name VCH - -target msbu -lab.mgmt local - -user messtone referre@vmware.com - -passed xv- -bridge -network vds 10g -lab - 446 -vmnet - -external -network vds 10g -506 -vmnet -eph - -image -store vsan -lab - -Volume-store vs and -lab/vc H1 Volumes: default- -insecure -registry 10.140.50.77 : 80 - -no -tls - -force

 

DML OR ALL" END

PostgreSQL Create A Statement:

Parameter Value SQL;

db-audit_connectAnd edb_audit_statement non-default Values: edb_dudit_connect= 'all' edb_audit_statement= 'UPDATE,DELETE,error' Database Session: $ sql audit db adminuser messtone password for user robertharper@messtone.com adminuser : psql.bin (10.0.1) Type "help " for help.audit db= # SHOW edb_audit._connect

 -  - - - - - - - - - - - - - - - - - - - -  - - - - - - - - -

All (1 row) audit db= # SHOW edb_audit_ statement UPDATE,DELETE,error (1 row) audit db= # SET SEACH_path TO edb;SET audit db= # INSERT INTO dept VALUES (10,ACCOUNTING INSERT 0 1 audit db= # INSERT INTO dept VALUES(20, 'RESEARCH' ,INSERT 0 1 audit db= # INSRET IMTO dept VALUES(30, 'SALES' , 'CH INSERT 0 1audit db= # INSERT INTO dept VALUES(40,OPERATIONS IMSERT 0 1 audit db= # INSERT INTO emp VALUES (7369,MESSTONE' , INSERT 0 1 audit db= # INSERT INTO emp VALUES(7499, 'MESSTONE' , INSERT 0 1 audit db= # INSERT INTO EMP VALUES(7521, 'EARD' ,INSERT 0 1

 

 

Magenet

[ " EARN CASH WHILE VIEWING THIS IMAGE"]

<a

href="https://www.magenet.com

?ref=messtone referrl&_rype=banner&ref_key=bd91cc5a26f8e96ad7212decb79a20f0&ref_item=8"target="_blank"><img src%"https://cp.magenet.com/img/banners-ref/468x60-http://www.messtone.com.gif"></a>

 

Running Wget Multi-Channels :

def Wget_url(url http://www.messtone.com) : try : Wget=sudo process.Popen([ "wget" + url http://www.messtone.com] ,shell=True,stdout=PIPE,stderr=PIPE) return Wget except : print("HTTP error") a=Wget_url(http://www.mymesstone.com(url http://www.messtone.com) a.stdout.readlines ( ) # return empty string.a.stderr.readlines ( ) # return the normal output that would be displayed in terminal

SVMMODELSCALA

import org.apache.spark.mllib.classification

{

SVMModel,SVMWith SGD

}

import org.apache.spark.mllib.evaluation.BinaryClassificationMetrics import org.apache.spark.mllib.Util.MLUtils //Load training data in LIBSSVM format. val data = MUtils.loadlibSVMFile (sc, "data/mllib/sample_libsvm_data.txt" ) // Split data into training(60%) and test (40%). Val splits=data.randomSplit (Array(0.6,0.4),seed=11L) val training=Splits(0).cache ( ) val test=splits(1) // RUN training algorithm to build the model val numIterations=100 val model=SVMWithSGD.train(training,NumIterations) // Clear the default the threshold.clear Threshold( ) // Compute raw scores on the test set.val scoreAndLabels=test.Map {  point=> val score=model.predict(point.features) (score,point.label) 

}

// GetevaluationMetrics.val metrics=new BinaryClassificationMetrics(scoreAnd labels) val auROC=Metrics. areaUnderROC ( ) print In("AreaUnderROC=" + auROC)

//Save and load Model model.save(sc, "target/tmp/scalaSVMWithSGDModel") val same Model=SVMModel.Load(sc, "target/tmp/scalaSVMWithSGDModel") Training algorithm for 200 iterations import.apache.spark.mllib

Optimisation.L 1Updater val svmAlg=newSVMWithSGD ( ) SVMAlg.optimizer.setNumIterations(200).setRegParam(0.1).setUpdater(new L1 Updater) val model L1=svmAlg.run(training)

 

 

Spark Application

# Submit Spark's Application Master to YARN's Resource Manager,and InstructSpark # to run the SparkPi exampleSpark_JAR=./assembly/target/scala-2.10/sparm-assembly-0.9.0-incubating-hadoop2.0.5-alpha.jar \ ./bin/spark-class org.apache.spark.deploy.yarn.Client \ - -jar examples /target/scala-2.10/spark-examples-assembly-0.9.0-incubating.jar- 'class org.apache.spark.examples.SparkPi \ - -orgs yarn-standalone \ - -num-workers 3 \ - -master-memory 4g \ - -worker-memory2g \ - -workers-core 1

# Example the output (replace $ YARN_APP_ID in the following with the # "application identifier"output by the previous Command) # (note : YARN_APP_LOGS_DIR is usually/tmp/logs or $ HADOOP_HOME/logs/user messtone logs # depending on the HADOOP Version.) $ cat $ YARN_APP_LOGS_DIR/$ YARN_APP_ID MESSTONE/Container*_000001/stdout.

 

Contingency Table

k11$\rightarrow$The nunber of times$w_1$and$w_2$appeare next to each other.k11$\rightarrow$The number of times$w_1$and$w_2$appear next to each other.k21$\rightarrow$The number of times$w_1$appears without$w_2$ k22$\rightarrow$The number of times neight$w_1$ or$w_2$appear together.

type Bigram = Tuple2 [String,string] type ScoredBigram= Tuple2 [Bigram,Double] type BigramCount = Tuple2 [Bigram,Int]

/**

    * Returns a RDD With a RDD with Scoredbigram based on the G statistical tect * as popularized in Dunning,Ted (1993).Accurate Methods for the * Statistics of Suprise and Coincidence.Compution a (Linguistics,* value 19,issue 1 (March,1993).*@param Commands an RDD Containings of Commands *@return An RDD of ScoredBigramSorted by Score 

*/

def g_2 (commands: RDD [String] ) : RDD [ScoredBigram] = {