In [1]:
import pandas as pd
import numpy as np
import os
import glob
import nltk.data
from __future__ import division  # Python 2 users only
import nltk, re, pprint
from nltk import word_tokenize
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics.pairwise import linear_kernel
from nltk.corpus import stopwords
from sklearn.feature_extraction.text import TfidfVectorizer
from collections import Counter
%matplotlib inline

In [2]:
translations = glob.glob('/Users/sheldon/completed_podcasts/*/*.txt')

In [3]:
translations = filter(lambda x: 'DONE' not in x, translations)
translations = filter(lambda x: 'speech_notebook' not in x, translations)

In [4]:
translations


Out[4]:
['/Users/sheldon/completed_podcasts/2DopeQueens/dopequeens040516_cms591992_pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/2DopeQueens/dopequeens040716_cms592303_pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/2DopeQueens/dopequeens041216_cms593915_pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/2DopeQueens/dopequeens041916_cms596223_pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/2DopeQueens/dopequeens042616_cms598229_pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/2DopeQueens/dopequeens050316_cms600651_pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/2DopeQueens/dopequeens051016_cms602605_pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/2DopeQueens/dopequeens051716_cms619373_pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/2DopeQueens/dopequeens052416_cms621397_pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/CriminalShow/Criminal.Ep14.FifthSuspectFINAL.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/CriminalShow/Episode_13__The_Big_Sleep.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/CriminalShow/Episode_16_Poster_Boy.mp3_m_reK.tmp_translation.txt',
 '/Users/sheldon/completed_podcasts/CriminalShow/Episode_21__Bloodlines.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/CriminalShow/Episode_23__Triassic_Park.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/CriminalShow/Episode_28__P.D.I.D..mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/CriminalShow/Episode_30__The_Agreement.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/CriminalShow/Episode_5__Dropping_Like_Flies.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_mppodcast071012.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_mppodcast100511.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_mppodcast103112.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_mppodcast112812.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_mppodcast121212.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast010213.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast011812.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast022615.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast032713.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast032714.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast061115.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast061715.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast080113.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast103113.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast111115.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast111815.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast121814.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/freakonomics/freakonomics_podcast122514.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT1997277266.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT2399727069.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT3729464097.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT4156421709.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT4372469350.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT4547523086.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT6036164557.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT6431860932.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT7182154429.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT7317894781.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/hearreplyall/GLT9813019209.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4019946-1-4-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4077439-1-18-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4151917-2-5-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4205309-2-19-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4245343-2-29-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4278049-3-8-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4351605-3-25-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4399611-4-6-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4513041-5-2-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4574251-5-16-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MLAR/4579716-5-17-16-mark-levin-audio-rewind.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/22_Joan_50_Shades_of_Awkward.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/23_Retta_The_Academic.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/29_Mortifieds_Tribute_to_Neurotic-Teens.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/35_Colin_Dont_Tell_Anyone_I_Like_You.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/38_Kids_On_The_Campaign_Trail_FINAL.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/41_Jackie_How_Not_To_Be_Thankful.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/43_Boys_DO_Cry_w_Chvrches.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/51-How-Not-To-Win-An-Oscar.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/52_The_Period_Piece_FINAL-edited.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/54_Dont_F_ck_With_Emiko.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/MortifiedPod/58-Forbidden_Crushes_Part-3_I_Like_A_Girl.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm010816pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm012916pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm020516pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm021216pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm030916podextra.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm031816pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm032416podextra.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm032516pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm042916pod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm052516podextra.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/onthemedia/otm121015podextra.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/Alleged-cult-leader-plays-shell-game-with-US-foreign-aid_PODCAST_master.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/Assault-on-justice-R.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/Confronting-love-and-oppression-in-Afghanistan.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/Disposable-workers-in-Asia.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/Exposing-the-horrors-on-The-Mountain.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/From-detention-to-detainment-in-Virginia.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/Matching-the-lost-and-the-found.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/Pumped-on-Trump_podcast.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/The-long-tale-of-the-short-handled-hoe.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/The-Pentagon-Papers_-Secrets-lies-and-leaks_podcast-v2.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/revealpodcast/Water-bills-bleeding-them-dry.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s01-day02.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s01-day03.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s01-e01.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s01-e03.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s01-e04.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s01-e05.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s01-e12.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s02-e04.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s02-e05.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s02-e09.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/serial/serial-s02-e10.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/Snap505_ThePact.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/Snap618_CampfireTales2.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/Snap_Special_TheStoryteller.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/snapjudgment010716_snap701_highcrimesandmisdemeanors.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/snapjudgment012116_snap702_fullcircle.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/snapjudgment012816_snap607_infamous.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/snapjudgment021816_snap605_simpatico.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/snapjudgment032516_snap606_proof.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/snapjudgment051916_snap714_manofsteel.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/snapjudgment081415_snap621_crashandburnt.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/snapjudgment082715_snap622_unspoken.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/snapjudgment-wnyc/snapjudgment092415_snap624_brassring.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/01 Ep. 12_ Judd Apatow.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/10115_BSPod-WesleyMorris.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/101315_BSPod.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/BS_Pod_111116.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/BS_Pod_111615.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/BS_Pod_111815.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/BS_Pod_112315.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/BS_Pod_12016_WesleyMorrisFinal.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/BS_Pod_121415.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/BSTeaser v01.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/TheBillSimmonsPodcast/Ep 77 Jim Lampley .mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20150612.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20150703.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20150710.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20150724.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20151016.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20151204.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20160122.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20160318.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20160408.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20160429.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/ThePulse/thepulse20160513.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/05-Tim_Ferriss_Show-Chase_Jarvis_128.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/Ep_39_Maria_Popova.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/Productivity_Hacks_for_Neurotic_and_Crazy_People.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/TFS_M4_Stanley.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/Tim_Ferriss_Show_-_Alain_de_Botton.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/Tim_Ferriss_Show_-_Brene_Brown.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/Tim_Ferriss_Show_-_Daymond_John.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/Tim_Ferriss_Show_-_Dominic_DAgostino.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/Tim_Ferriss_Show_-_Ed_Cooke_Part_1.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/Tim_Ferriss_Show_-_Naval_Ravikant_1.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/TIMFERRISSSHOW019.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/thetimferrissshow/TIMFERRISSSHOW028KELLYpt3.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/wrestling_soup/WS012516.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/wrestling_soup/WS030416.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/wrestling_soup/WS052616.mp3_translation.txt',
 '/Users/sheldon/completed_podcasts/wrestling_soup/WS091715.mp3_translation.txt']

In [5]:
episode = [i.split('/')[5] for i in translations]
series = [i.split('/')[4] for i in translations]
locations = translations
transcribed = [open(i).read() for i in translations]

In [6]:
df = pd.DataFrame(data={'episode':episode,'series':series,'locations':locations,'transcribed':transcribed})

In [7]:
df['id'] = df.index

In [132]:
stop = set(stopwords.words('english'))

def tokenize_and_lower(textfile):
    tokens = word_tokenize(textfile)
    lower = [w.lower() for w in tokens]
    filtered_words = [word for word in lower if word not in stop]
    remove_contractions = [word for word in filtered_words if "'" not in word]
    remove_periods = [word for word in remove_contractions if "." not in word]
    count = Counter(remove_periods)
    return count
    
#df['trans_token'] = df.transcribed.apply(tokenize_and_lower)
df['removed_stop_transcribed'] = df.transcribed.apply(tokenize_and_lower)
tf = TfidfVectorizer(stop_words=stop)
tfidf_matrix = tf.fit_transform(df['transcribed'])

In [133]:
tfidf_matrix


Out[133]:
<151x35028 sparse matrix of type '<type 'numpy.float64'>'
	with 264535 stored elements in Compressed Sparse Row format>

In [134]:
from sklearn.metrics.pairwise import linear_kernel
cosine_similarities = linear_kernel(tfidf_matrix, tfidf_matrix)

In [143]:
def get_related_podcasts(podcast_number,number_of_similarities):
    cosine_similarities = linear_kernel(tfidf_matrix, tfidf_matrix)
    related_pod_index = cosine_similarities.argsort()[podcast_number][::-1]
    pod_dict = dict(zip(range(0, len(related_pod_index)),related_pod_index))
    pod_dict = pd.DataFrame({'rank':pod_dict.keys()},index=pod_dict.values())
    related_podcasts_df = pd.DataFrame.join(pod_dict, df, how='inner')
    final_df = related_podcasts_df.sort_values('rank')[0:number_of_similarities+1][['rank','episode','series']]
    return final_df

def get_related_podcasts_query(query, number_of_similarities):
    query = query.lower()
    query = query.split()
    tfidf_matrix_test = tf.fit_transform(query)
    tfidf_matrix_train = tf.transform(df['transcribed'])
    tfidf_matrix_train.todense()
    tfidf_matrix_test.todense()
    query_similarities = linear_kernel(tfidf_matrix_test, tfidf_matrix_train)
    query_similarities = query_similarities.argsort()[0][::-1]
    pod_dict = dict(zip(range(0, len(query_similarities)),query_similarities))
    pod_dict = pd.DataFrame({'rank':pod_dict.keys()},index=pod_dict.values())
    related_podcasts_df = pd.DataFrame.join(pod_dict, df, how='inner')
    final_df = related_podcasts_df.sort_values('rank')[0:number_of_similarities+1][['rank','episode','series']]
    return final_df

In [144]:
get_related_podcasts_query('economics math statistics',5)


Out[144]:
rank episode series
20 0 freakonomics_mppodcast112812.mp3_translation.txt freakonomics
53 1 4399611-4-6-16-mark-levin-audio-rewind.mp3_tra... MLAR
22 2 freakonomics_podcast010213.mp3_translation.txt freakonomics
21 3 freakonomics_mppodcast121212.mp3_translation.txt freakonomics
18 4 freakonomics_mppodcast100511.mp3_translation.txt freakonomics
27 5 freakonomics_podcast061115.mp3_translation.txt freakonomics

In [122]:
get_related_podcasts(17,5)


Out[122]:
rank episode series
17 0 freakonomics_mppodcast071012.mp3_translation.txt freakonomics
148 1 WS030416.mp3_translation.txt wrestling_soup
150 2 WS091715.mp3_translation.txt wrestling_soup
32 3 freakonomics_podcast111815.mp3_translation.txt freakonomics
135 4 05-Tim_Ferriss_Show-Chase_Jarvis_128.mp3_trans... thetimferrissshow
149 5 WS052616.mp3_translation.txt wrestling_soup

Compute for queries


In [124]:
query = ['python tim ferris']
vectorizer = TfidfVectorizer(stop_words='english')
tfidf_matrix_test = tf.fit_transform(query)
tfid_matrix_train = tfidf_matrix.todense()
tfidf_matrix_test.todense()
cosine_similarities = linear_kernel(tfidf_matrix_test, tfidf_matrix_train)
cosine_similarities= cosine_similarities.argsort()[::-1]
cosine_similarities


Out[124]:
array([[  0,  98,  97,  96,  95,  94,  93,  92,  91,  90,  89,  88,  87,
         86,  85,  83,  82,  81,  80,  79,  78,  77,  76, 149,  74,  73,
         72,  71,  70,  69,  99, 100, 101, 102, 146, 145, 144, 143, 142,
        138, 133, 132, 131, 129, 128, 127, 126, 125,  68, 124, 122, 120,
        117, 115, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 123,
         67,  75,  65,  30,  29,  28,  27,  26,  66,  24,  23,  22,  21,
         20,  19,  18,  17,  16,  15,  14,  13,  12,  11,  10,   9,   8,
          7,   6,   5,   4,   2,   1,  33,  34,  25,  36,  57,  58,  49,
         59,  60,  48,  61,  47,  53,  46,  56,  44,  43,  64,  41,  40,
         39,  38,  37,  63,  62, 141, 134, 147, 148, 130,   3,  52,  54,
         32,  31,  42,  45, 113, 114, 116, 118,  55, 150,  84,  50,  51,
         35, 119, 136, 135, 140, 137, 121, 139]])