This file contains 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
# !pip install requests urllib3 geopy pandas folium | |
# partially taken from: | |
# https://towardsdatascience.com/pythons-geocoding-convert-a-list-of-addresses-into-a-map-f522ef513fd6\ | |
import requests | |
import json | |
import urllib | |
from geopy.geocoders import Nominatim, GoogleV3 | |
import pandas as pd | |
import folium |
This file contains 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
# extracted from: https://github.com/scikit-learn/scikit-learn/blob/0fb307bf3/sklearn/metrics/_classification.py#L1825 | |
def classification_report(data_dict): | |
"""Build a text report showing the main classification metrics. | |
Read more in the :ref:`User Guide <classification_report>`. | |
Parameters | |
---------- | |
report : string | |
Text summary of the precision, recall, F1 score for each class. | |
Dictionary returned if output_dict is True. Dictionary has the |
This file contains 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
5a6,8 | |
> import json | |
> | |
> import sklearn.metrics as metrics | |
6a10,11 | |
> from sklearn.metrics import precision_recall_curve | |
> from dvc.api import make_checkpoint | |
10c15 | |
< if len(sys.argv) != 3: | |
--- |
This file contains 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
// requires canvas, npm i canvas | |
var Canvas = require('canvas') | |
var fs = require('fs') | |
// Constants | |
var DIM = { width : 24, border : 1.3, font : 14 } | |
var COLOR = { light: '#ec9a97', text:'#3189cc' , border:'#e13d35' } | |
function paintCircularText(filePath=null, text=null, fill=false, border=true, callback=null){ |
This file contains 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
"""Official evaluation script for SQuAD version 2.0. | |
In addition to basic functionality, we also compute additional statistics and | |
plot precision-recall curves if an additional na_prob.json file is provided. | |
This file is expected to map question ID's to the model's predicted probability | |
that a question is unanswerable. | |
""" | |
import argparse | |
import collections | |
import json |
This file contains 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 os | |
import sys | |
import json | |
languages = dict( | |
python=dict(ext='py', comment='#'), | |
javascript=dict(ext='js', comment='//') | |
) | |
if len(sys.argv) < 2: |
NewerOlder