Skip to content

Instantly share code, notes, and snippets.


Tomás Rojo tomasn4a

  • Nonagon Data
  • London, UK
View GitHub Profile
tomasn4a /
Created Jan 25, 2019
Modified skimage io util to prevent bug when trying to read a remote image with a long querystring
import urllib.parse # Python 3
except ImportError:
from urllib2 import urlopen # Python 2
import os
import re
import tempfile
from contextlib import contextmanager
import six
import math
def distance(str):
li_str = list(str)
result = 0
for i in range(1,len(li_str)):
row_prev = get_row(li_str[i-1])
col_prev = get_col(li_str[i-1])
row = get_row(li_str[i])
col = get_col(li_str[i])