@@ -0,0 +1,1098 @@
+#!/usr/bin/python%0A%0A# CSV to CSDL tags social profiling script%0A#%09Justin @ DataSift%0A#%0A# Usage: profiling_script.py %5Bcustomer_ids%5D.csv %5Bnew_file%5D.txt%0A%0A# The format of the .csv file needs to be %5Bcustomer id%5D %5Btwitter.user.id%5D %5Bfacebook.author.id%5D%0A# This script is fully extensible and future iterations will allow for the targets to be%0A# automatically generated based on the headers.%0A%0Aimport csv%0Aimport sys%0A%0Aif len(sys.argv) != 3:%0A    print %22Usage:$ profiling_script.py %5Bcustomer_ids%5D.csv %5Bnew_file%5D.txt%22%0A    sys.exit(%22please follow proper function usage%22)%0A    pass%0A%0Acustomer_ids = open(sys.path%5B0%5D+'/'+sys.argv%5B1%5D,'U')%0Acsv_reader = csv.reader(customer_ids)%0ACSDL_output = open(sys.path%5B0%5D+'/'+sys.argv%5B2%5D,'w')%0A%0Afor counter,row in enumerate(csv_reader):%0A%09if counter == 0:%0A%09%09header_keys = %5B%5D%0A%09%09for i,value in enumerate(row):%0A%09%09%09header_keys.insert(i,value)%0A%09%09%09continue%0A%09%09continue%0A%09if counter %3E= 1:%0A%09%09CSDL_output.write(%22tag.customer_id %5C%22%22 + row%5B0%5D + %22%5C%22 %7Btwitter.user.id in %5B%22 + row%5B1%5D + %22%5D OR twitter.retweet.user.id in %5B%22 + row%5B1%5D + %22%5D OR facebook.author.id in %5C%22%22 + row%5B2%5D + %22%5C%22%7D%5Cn%22)%0A%09else:%0A%09%09continue%0A

Create customer_csdl_tags.py