This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| import json | |
| import re | |
| import time | |
| import logging | |
| import click | |
| from elasticsearch import Elasticsearch | |
| from elasticsearch.helpers import reindex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from invenio_db import db | |
| from sqlalchemy import inspect | |
| from sqlalchemy.exc import ProgrammingError | |
| def check_col_seq_consistency(table, col): | |
| seq_id = get_seq_id(table, col) | |
| max_id = get_max_id(table, col) | |
| if max_id is not None and seq_id != max_id: | |
| print 'ERROR: {table}::{col} has a different seq={seq} than max={max}, please check.'.format( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import logging | |
| import re | |
| from collections import ( | |
| OrderedDict, | |
| deque, | |
| ) | |
| from functools import wraps | |
NewerOlder