<commit_before>from getpass import getpass
import json
import os
import sys

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pyportify.settings")
import django
django.setup()

from pyportify import views as app

try:
    input = raw_input
except NameError:
    pass


def main():

    google_email = input("Enter Google email address: ")
    google_pass = getpass("Enter Google password: ")

    app.user_scope.google_login(google_email, google_pass)
    if not app.user_scope.google_loggedin():
        print "Invalid Google username/password"
        sys.exit(1)

    spotify_user = input("Enter Spotify username: ")
    spotify_pass = getpass("Enter Spotify password: ")

    app.user_scope.spotify_login(spotify_user, spotify_pass)
    if not app.user_scope.spotify_loggedin():
        print "Invalid Spotify username/password"
        sys.exit(1)

    ps = app.user_scope.googleapi.get_all_playlists()
    for p in ps:
        app.user_scope.googleapi.delete_playlist(p["id"])

    playlists = app.spotify_playlists(None)
    playlists = json.loads(playlists.content)["data"]

    app.transfer_playlists(playlists)


if __name__ == '__main__':
    main()<commit_msg>Dont delete playlists before copy<commit_after>from getpass import getpass
import json
import os
import sys

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pyportify.settings")
import django
django.setup()

from pyportify import views as app

try:
    input = raw_input
except NameError:
    pass


def main():

    google_email = input("Enter Google email address: ")
    google_pass = getpass("Enter Google password: ")

    app.user_scope.google_login(google_email, google_pass)
    if not app.user_scope.google_loggedin():
        print "Invalid Google username/password"
        sys.exit(1)

    spotify_user = input("Enter Spotify username: ")
    spotify_pass = getpass("Enter Spotify password: ")

    app.user_scope.spotify_login(spotify_user, spotify_pass)
    if not app.user_scope.spotify_loggedin():
        print "Invalid Spotify username/password"
        sys.exit(1)

    playlists = app.spotify_playlists(None)
    playlists = json.loads(playlists.content)["data"]

    app.transfer_playlists(playlists)


if __name__ == '__main__':
    main()
{'fraction_non_alphanumeric': 0.09758281110116383, 'fraction_numerical': 0.0017905102954341987, 'mean_word_length': 3.966666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5152795', 'n_tokens_mistral': 717, 'n_tokens_neox': 703, 'n_words': 160}