<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = 'boye'

from boye import Spotify
from time import sleep
import HTMLParser
from flask import Flask, url_for, redirect, render_template, request, Response
from gevent.wsgi import WSGIServer

app = Flask(__name__)


@app.route('/')
def home():
    pl = [
        'spotify:user:lars_93:playlist:17dahvTFovxEqqEJLsDoNQ',
        'spotify:user:pumazz:playlist:2e3fd32clPYmADf809LrM6',
        'spotify:user:pumazz:playlist:7dD8A6HTNUYW6kgs9yvh28',
        'spotify:user:lars_93:playlist:1cURhgTeJBdZFuurOcjFRg',
        'spotify:user:pumazz:playlist:2Qn3V38vhATTp1M7wzYG0p',
        'spotify:user:pumazz:playlist:6wnTPemhthfpExS1W8jklx'
    ]

    playlists = list()
    for uri in pl:
        playlist = spotify.get_playlist(uri)
        images = list()
        for track in playlist.tracks:
            track.load()
            if not track.availability == 1:
                continue
            try:
                url = track.album.load().cover_link(2).url
                images.append(url)
            except AssertionError:
                pass
            if len(images) >= 4:
                break

        while len(images) < 4:<commit_msg>added a playlist by magnus<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = 'boye'

from boye import Spotify
from time import sleep
from flask import Flask, url_for, redirect, render_template, request, Response

app = Flask(__name__)


@app.route('/')
def home():
    pl = [
        'spotify:user:lars_93:playlist:17dahvTFovxEqqEJLsDoNQ',
        'spotify:user:pumazz:playlist:2e3fd32clPYmADf809LrM6',
        'spotify:user:pumazz:playlist:7dD8A6HTNUYW6kgs9yvh28',
        'spotify:user:lars_93:playlist:1cURhgTeJBdZFuurOcjFRg',
        'spotify:user:pumazz:playlist:2Qn3V38vhATTp1M7wzYG0p',
        'spotify:user:pumazz:playlist:6wnTPemhthfpExS1W8jklx',
        'spotify:user:magnode:playlist:5NLNeYg2ZMM8Zb1KR2mtBl'
    ]

    playlists = list()
    for uri in pl:
        playlist = spotify.get_playlist(uri)
        images = list()
        for track in playlist.tracks:
            track.load()
            if not track.availability == 1:
                continue
            try:
                url = track.album.load().cover_link(2).url
                images.append(url)
            except AssertionError:
                pass
            if len(images) >= 4:
                break

        while len(images) < 4:
{'fraction_non_alphanumeric': 0.10462287104622871, 'fraction_numerical': 0.03203568532035685, 'mean_word_length': 2.469760900140647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5223649', 'n_tokens_mistral': 943, 'n_tokens_neox': 882, 'n_words': 148}