def clean_tutorial_notes(): i = 0 for note in Note.objects.all(): if is_tutorial_note(note.contents): kill_note(note) i += 1 print "Deleted: ", i, " tutorial notes."
def clean_tutorial_notes(): i = 0 for note in Note.objects.all(): if is_tutorial_note(note.contents): kill_note(note) i+=1 print "Deleted: ", i, " tutorial notes."
def filter_notes(ns,english_only=True,min_length=3): assert type(ns[0]) == Note, "requires Notes not Note Values" from content_analysis import q from jv3.study.study import GLOBAL_STOP stop_owner = [x for x in User.objects.filter(email__in=GLOBAL_STOP)] return [x for x in ns if x.owner not in stop_owner and x.contents and len(x.contents.strip()) >= min_length and # note is non blank int(x.jid) >= 0 and # jid is not magic note q(english_only, is_english(x.contents), True) and # english if english only not is_tutorial_note(x.contents) and # not a tutorial not is_study1_note_contents(x.contents) # not a study1 note ]
def filter_notes(ns, english_only=True, min_length=3): assert type(ns[0]) == Note, "requires Notes not Note Values" from content_analysis import q from jv3.study.study import GLOBAL_STOP stop_owner = [x for x in User.objects.filter(email__in=GLOBAL_STOP)] return [ x for x in ns if x.owner not in stop_owner and x.contents and len(x.contents.strip()) >= min_length and # note is non blank int(x.jid) >= 0 and # jid is not magic note q(english_only, is_english(x.contents), True) and # english if english only not is_tutorial_note(x.contents) and # not a tutorial not is_study1_note_contents(x.contents) # not a study1 note ]
def is_note_interesting(n): from jv3.utils import is_tutorial_note from jv3.study.wClean import is_activity_log_fail c = n.contents return len(c.strip()) > 1 and not is_activity_log_fail(c) and not is_tutorial_note(n)
def is_note_interesting(n): from jv3.utils import is_tutorial_note from jv3.study.wClean import is_activity_log_fail c = n.contents return len(c.strip()) > 1 and not is_activity_log_fail( c) and not is_tutorial_note(n)