Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| import numpy as np | |
| import pandas as pd | |
| from collections import defaultdict | |
| from scipy.stats import hmean | |
| from scipy.spatial.distance import cdist | |
| from scipy import stats | |
| import numbers | |
| def weighted_hamming(data): |
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 sqlalchemy import Column, Integer, String, ForeignKey, create_engine | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import relationship, backref, sessionmaker, joinedload | |
| # For this example we will use an in-memory sqlite DB. | |
| # Let's also configure it to echo everything it does to the screen. | |
| engine = create_engine('sqlite:///:memory:', echo=True) | |
| # The base class which our objects will be defined on. | |
| Base = declarative_base() |