<commit_before>#!/usr/bin/env python

import sys, os

import couchdb

"""
from memopol2.main.models import Mep, Position

print "Deleting existing django meps"
Mep.objects.all().delete()

#django_meps = Mep.objects.all()
#print "Existing meps in django db:", len(django_meps)
#existing_id_set = set([x.couchid for x in django_meps])
existing_id_set = set()

server = couchdb.Server(os.getenv("COUCH_URL_ROOT"))
meps = server["meps"]

print "Meps in couch db:", len(meps)

for mepid in meps:
    if mepid not in existing_id_set:
        newmep = Mep(couchid=mepid)
        newmep.save()
"""<commit_msg>deactivate migration script part 6 for now<commit_after>#!/usr/bin/env python

import sys, os

# This is not needed anymore
print "part-06-django-import.py is not needed at this time"
sys.exit(0)



import couchdb

from memopol2.main.models import Mep, Position

print "Deleting existing django meps"
Mep.objects.all().delete()

#django_meps = Mep.objects.all()
#print "Existing meps in django db:", len(django_meps)
#existing_id_set = set([x.couchid for x in django_meps])
existing_id_set = set()

server = couchdb.Server(os.getenv("COUCH_URL_ROOT"))
meps = server["meps"]

print "Meps in couch db:", len(meps)

for mepid in meps:
    if mepid not in existing_id_set:
        newmep = Mep(couchid=mepid)
        newmep.save()

{'fraction_non_alphanumeric': 0.12198795180722892, 'fraction_numerical': 0.004518072289156626, 'mean_word_length': 4.514522821576763, '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': '5917666', 'n_tokens_mistral': 499, 'n_tokens_neox': 490, 'n_words': 134}