Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from bias import bias_after_setup; bias_after_setup(celery.conf); from lexdb.model.motion import dump_motions_for_case; from bias.models import LexSession; from lexdb.model import * ; import logging; logging.basicConfig(level=logging.DEBUG); from bias.tasks.annotate import *;
from lexdb.model.patent import recalculate
case_id=7550; pnum='6245648'
c = LexSession.query(Case).filter(Case.id == case_id).one()
pc = LexSession.query(PatentCitation).filter(PatentCitation.case_id == case_id).filter(PatentCitation.patent_number == pnum).all()
p = LexSession.query(Patent).filter(Patent.number == pnum).one()
recalculate(c, p, pc)
transaction.commit()
[(LexSession.query(Case).filter(Case.id == c).one()).__es__ for c in [case_id]]
case_id=13115
for pnum in [5352605, 5633435, 4490853, 4940835, 4490835,4490853]:
pnum = str(pnum)
c = LexSession.query(Case).filter(Case.id == case_id).one()
pc = LexSession.query(PatentCitation).filter(PatentCitation.case_id == case_id).filter(PatentCitation.patent_number == pnum).all()
p = LexSession.query(Patent).filter(Patent.number == pnum).one()
recalculate(c, p, pc)
transaction.commit()
[(LexSession.query(Case).filter(Case.id == c).one()).__es__ for c in [case_id]]
case_id=2000003774
for pnum in ['6847969', 'D433679', 'D451916', 'D455515',]:
c = LexSession.query(Case).filter(Case.id == case_id).one()
pc = LexSession.query(PatentCitation).filter(PatentCitation.case_id == case_id).filter(PatentCitation.patent_number == pnum).all()
p = LexSession.query(Patent).filter(Patent.number == pnum).one()
recalculate(c, p, pc)
transaction.commit()
[(LexSession.query(Case).filter(Case.id == c).one()).__es__ for c in [case_id]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment