Module Import alias Import alias Import alias Import alias alias ImportFrom alias Import alias Import alias Import alias Import alias FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Str attr GeneratorExp NameLoad comprehension NameStore NameLoad CompareNotEq SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Str attr ListComp NameLoad comprehension NameStore NameLoad CompareLtLt Num Call NameLoad NameLoad Num decorator_list Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Num Assign NameStore Dict Assign NameStore Dict Assign NameStore Dict Assign NameStore Dict Assign NameStore Dict Assign NameStore Dict Assign NameStore ListLoad TupleLoad Str Str NameLoad TupleLoad Str Str NameLoad TupleLoad Str Str NameLoad TupleLoad Str Str NameLoad TupleLoad Str Str NameLoad TupleLoad Str Str NameLoad With Call NameLoad SubscriptLoad NameLoad Index Str Str NameStore body Assign NameStore Dict Assign SubscriptStore NameLoad Index Str Num Assign SubscriptStore NameLoad Index Str Str Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore NameLoad body Assign NameStore Dict Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Dict Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Str With Call NameLoad SubscriptLoad NameLoad Index Str NameStore body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Str If UnaryOpNot BoolOpOr CompareIn NameLoad NameLoad CompareIn Str NameLoad body If CompareIn NameLoad NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad BinOpAdd SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad Num orelse Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad Num For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Num Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore SubscriptLoad NameLoad Slice Num NameLoad Assign NameStore ListComp Call NameLoad SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Assign SubscriptStore NameLoad Index NameLoad ListComp Call NameLoad SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad With Call NameLoad SubscriptLoad NameLoad Index Str NameStore body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot BoolOpOr CompareIn Str NameLoad CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Slice Num NameLoad If CompareGt Call NameLoad NameLoad Num body For NameStore NameLoad body If CompareIn NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Call AttributeLoad NameLoad attr orelse Assign SubscriptStore NameLoad Index NameLoad ListLoad Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str If NameLoad body Assign NameStore ListLoad Assign NameStore Num For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str If NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Str attr attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num If CompareGtE NameLoad Num body Break If CompareGt Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index NameLoad NameLoad If CompareIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad BinOpAdd SubscriptLoad NameLoad Index NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore ListLoad If BoolOpAnd NameLoad CompareGt Call NameLoad NameLoad Num body If UnaryOpNot CompareIs Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Str attr attr Str Str Assign SubscriptStore NameLoad Index NameLoad NameLoad If CompareIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad BinOpAdd SubscriptLoad NameLoad Index NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore ListLoad If CompareGt Call NameLoad NameLoad Num body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Str attr attr Str Str If CompareIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad BinOpAdd SubscriptLoad NameLoad Index NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore NameLoad With Call NameLoad SubscriptLoad NameLoad Index Str NameStore body For NameStore NameLoad body If NameLoad body Assign NameStore NameLoad Continue Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad ListLoad NameLoad With Call NameLoad SubscriptLoad NameLoad Index Str NameStore body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad ListLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareIn NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad decorator_list With Call NameLoad SubscriptLoad NameLoad Index Str Str NameStore body Assign NameStore BinOpAdd ListLoad Str Str ListComp Call NameLoad SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr With Call NameLoad SubscriptLoad NameLoad Index Str NameStore body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Dict Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad For TupleStore NameStore NameStore NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad
N/A N/A time N/A datetime N/A sys N/A getopt argparse collections defaultdict N/A unicodedata N/A operator N/A json N/A unicodecsv remove_control_characters N/A N/A s N/A N/A N/A N/A N/A join N/A ch N/A ch s N/A N/A N/A N/A unicodedata category ch N/A 0 C N/A stripped N/A N/A x N/A N/A N/A N/A N/A join N/A i N/A i x N/A 31 N/A ord i 127 N/A N/A parser N/A N/A argparse ArgumentParser prog combine_item_data_sources.py N/A N/A N/A parser add_argument -movielens-movies help Movielens 10 million movies file required True N/A N/A N/A parser add_argument -movielens-tags help Movielens 10 million tags file required True N/A N/A N/A parser add_argument -hetrec-movies help Hetrec 2011 movies file required True N/A N/A N/A parser add_argument -freebase-movies help Freebase movies file required True N/A N/A N/A parser add_argument -csv help csv file to write to required True N/A N/A N/A parser add_argument -item-attr-json help json file to write item attributes required True N/A opts N/A vars N/A N/A parser parse_args N/A num_freebase_genres 1 N/A num_top_movielens_tags 2 N/A tagMap N/A N/A topTags N/A N/A actorMap N/A N/A directorMap N/A N/A imgUrl N/A N/A titleMap N/A N/A attrs N/A N/A string title titleMap N/A string img_url imgUrl N/A text top_tags topTags N/A text movielens_tags_full tagMap N/A string actors actorMap N/A string directors directorMap N/A N/A open N/A opts N/A item_attr_json w jsonFile N/A N/A j N/A N/A N/A j N/A type_id 1 N/A N/A j N/A type_name movie N/A attrList N/A N/A N/A atype name amap attrs N/A N/A attrJson N/A N/A N/A attrJson N/A name name N/A N/A attrJson N/A value_type atype N/A N/A N/A attrList append attrJson N/A N/A j N/A type_attrs attrList N/A topj N/A N/A tyList N/A N/A N/A N/A tyList append j N/A N/A topj N/A types tyList N/A jstr N/A N/A json dumps topj sort_keys True N/A N/A N/A jsonFile write jstr N/A N/A N/A jsonFile close N/A ignoreTags N/A set N/A N/A N/A ignoreTags add less_than_300_ratings N/A N/A open N/A opts N/A movielens_tags textfile1 N/A N/A line textfile1 N/A N/A line N/A N/A line rstrip N/A N/A user item tag time N/A N/A line split :: N/A item N/A int item N/A tag N/A N/A tag replace " ' N/A tag N/A N/A tag replace , N/A tag N/A N/A tag replace \n N/A tag N/A stripped tag N/A tag N/A N/A tag lower N/A tag N/A N/A tag strip N/A tag N/A N/A tag replace _ N/A N/A N/A N/A tag ignoreTags N/A nudity tag N/A N/A N/A item tagMap N/A N/A N/A N/A tagMap N/A item N/A tag N/A N/A N/A tagMap N/A item N/A tag 1 N/A N/A N/A tagMap N/A item N/A defaultdict int N/A N/A N/A tagMap N/A item N/A tag 1 N/A key tagMap N/A N/A map N/A tagMap N/A key N/A sorted_x N/A sorted N/A N/A map items key N/A N/A operator itemgetter 1 N/A sorted_x N/A sorted_x N/A -1 N/A topList N/A sorted_x N/A 0 num_top_movielens_tags N/A tags N/A N/A str N/A i N/A 0 N/A i topList N/A N/A tagMap N/A key N/A N/A str N/A i N/A 0 N/A i sorted_x N/A N/A topTags N/A key tags N/A N/A open N/A opts N/A freebase_movies textfile1 N/A N/A line textfile1 N/A N/A line N/A N/A line rstrip N/A j N/A N/A json loads line N/A N/A N/A N/A result j N/A error j N/A N/A id N/A j N/A movielens_id N/A id N/A int id N/A genres N/A N/A j N/A genre N/A 0 num_freebase_genres N/A N/A N/A len genres 0 N/A N/A genre genres N/A N/A N/A id topTags N/A N/A N/A N/A N/A topTags N/A id append N/A N/A genre lower N/A N/A N/A topTags N/A id N/A N/A N/A genre lower N/A starring N/A j N/A starring N/A starring N/A N/A actors N/A N/A c 0 N/A star starring N/A N/A actor N/A star N/A actor N/A actor N/A N/A actor N/A N/A N/A N/A N/A N/A N/A N/A actor replace ' replace " lower replace _ N/A N/A N/A actors append actor N/A c 1 N/A N/A c 3 N/A N/A N/A N/A N/A len actors 0 N/A N/A N/A actorMap N/A id actors N/A N/A id topTags N/A N/A N/A topTags N/A id N/A N/A topTags N/A id actors N/A N/A N/A topTags N/A id actors N/A directed_by N/A j N/A directed_by N/A directors N/A N/A N/A directed_by N/A N/A len directed_by 0 N/A N/A N/A N/A N/A type directed_by list N/A N/A directed_by N/A directed_by N/A director directed_by N/A N/A N/A N/A directors append N/A N/A N/A N/A N/A N/A N/A N/A director replace ' replace " lower replace _ N/A N/A directorMap N/A id directors N/A N/A id topTags N/A N/A N/A topTags N/A id N/A N/A topTags N/A id directors N/A N/A N/A topTags N/A id directors N/A subjects_raw N/A j N/A subjects N/A subjects N/A N/A N/A N/A len subjects_raw 0 N/A N/A subject subjects_raw N/A N/A N/A N/A subjects append N/A N/A N/A N/A N/A N/A N/A N/A subject replace ' replace " lower replace _ N/A N/A id topTags N/A N/A N/A topTags N/A id N/A N/A topTags N/A id subjects N/A N/A N/A topTags N/A id subjects N/A first True N/A N/A open N/A opts N/A hetrec_movies textfile1 N/A N/A line textfile1 N/A N/A first N/A N/A first False N/A N/A line N/A N/A line rstrip N/A N/A id title imdbID spanishTitle imdbPictureURL year rtID rtAllCriticsRating rtAllCriticsNumReviews rtAllCriticsNumFresh rtAllCriticsNumRotten rtAllCriticsScore rtTopCriticsRating rtTopCriticsNumReviews rtTopCriticsNumFresh rtTopCriticsNumRotten rtTopCriticsScore rtAudienceRating rtAudienceNumRatings rtAudienceScore rtPictureURL N/A N/A line split N/A id N/A int id N/A N/A imgUrl N/A id N/A imdbPictureURL N/A N/A open N/A opts N/A movielens_movies textfile1 N/A N/A line textfile1 N/A N/A line N/A N/A line rstrip N/A N/A id title tags N/A N/A line split :: N/A id N/A int id N/A N/A titleMap N/A id N/A title addFeature N/A N/A fmap id name dmap N/A N/A N/A N/A id dmap N/A N/A v N/A N/A , join N/A dmap N/A id N/A N/A fmap N/A name v N/A N/A N/A open N/A opts N/A csv w csvfile N/A N/A fieldnames N/A N/A id name N/A N/A str N/A i N/A 1 N/A i attrs N/A writer N/A N/A unicodecsv DictWriter csvfile encoding utf-8 fieldnames fieldnames N/A N/A N/A writer writeheader N/A N/A open N/A opts N/A movielens_movies textfile1 N/A N/A line textfile1 N/A N/A line N/A N/A line rstrip N/A N/A id title tags N/A N/A line split :: N/A id N/A int id N/A features N/A N/A N/A features N/A id id N/A N/A features N/A name title N/A N/A atype name amap attrs N/A N/A N/A addFeature features id name amap N/A N/A N/A writer writerow features