Skip to content

Instantly share code, notes, and snippets.

View VlasovKirill's full-sized avatar
🐌
slow as a snail

Кирилл VlasovKirill

🐌
slow as a snail
View GitHub Profile

How to install dlib v19.9 or newer (w/ python bindings) from github on macOS and Ubuntu

Pre-reqs:

  • Have Python 3 installed. On macOS, this could be installed from homebrew or even via standard Python 3.6 downloaded installer from https://www.python.org/download. On Linux, just use your package manager.
  • On macOS:
    • Install XCode from the Mac App Store (or install the XCode command line utils).
    • Have homebrew installed
  • On Linux:
@mblondel
mblondel / letor_metrics.py
Last active September 19, 2024 06:13
Learning to rank metrics.
# (C) Mathieu Blondel, November 2013
# License: BSD 3 clause
import numpy as np
def ranking_precision_score(y_true, y_score, k=10):
"""Precision at rank k
Parameters