コード例 #1
0
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."
コード例 #2
0
ファイル: wClean.py プロジェクト: haystack/listit-server
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."
コード例 #3
0
ファイル: ca_load.py プロジェクト: haystack/listit-server
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
            ]
コード例 #4
0
ファイル: ca_load.py プロジェクト: kinow/listit-server
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
    ]
コード例 #5
0
ファイル: note_labels.py プロジェクト: haystack/listit-server
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)
コード例 #6
0
ファイル: note_labels.py プロジェクト: kinow/listit-server
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)