Skip to content

Instantly share code, notes, and snippets.

Avatar
🐲

Tomás Rojo tomasn4a

🐲
  • Nonagon Data
  • London, UK
View GitHub Profile
@tomasn4a
tomasn4a / skimage.io.util.py
Created Jan 25, 2019
Modified skimage io util to prevent bug when trying to read a remote image with a long querystring
View skimage.io.util.py
try:
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
View 259.py
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])