Skip to content

Instantly share code, notes, and snippets.

View tomasn4a's full-sized avatar
🌸

Tomas Rojo tomasn4a

🌸
  • Nonagon Data
  • Madrid, Spain
View GitHub Profile
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])
@tomasn4a
tomasn4a / skimage.io.util.py
Created January 25, 2019 11:27
Modified skimage io util to prevent bug when trying to read a remote image with a long querystring
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