<s> '''<STR_LIT>''' <EOL> import os <EOL> import django <EOL> os . environ . setdefault ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> django . setup ( ) <EOL> from neurovault . apps . statmaps . models import Similarity , Comparison , Image <EOL> from neurovault . apps . statmaps . tasks import save_voxelwise_pearson_similarity <EOL> from django . db import IntegrityError <EOL> import errno <EOL> pearson_metric = Similarity ( similarity_metric = "<STR_LIT>" , <EOL> transformation = "<STR_LIT>" , <EOL> metric_ontology_iri = "<STR_LIT>" , <EOL> transformation_ontology_iri = "<STR_LIT>" ) <EOL> try : <EOL> pearson_metric . save ( ) <EOL> except IntegrityError as exc : <EOL> print "<STR_LIT>" % ( pearson_metric ) <EOL> pass <EOL> for image1 in Image . objects . filter ( collection__private = False ) : <EOL> for image2 in Image . objects . filter ( collection__private = False ) : <EOL> if image1 . pk < image2 . pk : <EOL> print "<STR_LIT>" % ( image1 , image2 ) <EOL> save_voxelwise_pearson_similarity ( image1 . pk , image2 . pk ) </s>
