Skip to content

Instantly share code, notes, and snippets.

View mortezaomidi's full-sized avatar
🙋
for task: tasks: coding; debugging; running; errors handling

morteza omidipoor mortezaomidi

🙋
for task: tasks: coding; debugging; running; errors handling
  • Tehran, iran
View GitHub Profile
@mortezaomidi
mortezaomidi / Landsat_Therm_to_LST.py
Created October 26, 2018 20:59 — forked from TDahlberg/Landsat_Therm_to_LST.py
Convert Landsat 5&7 Thermal band to LST using Python
#! /usr/bin/env python
#######################################
# GDALCalcNDVI.py
#
# A script using the GDAL Library to
# create a new image containing the LST
# of the original DN value from Landsat
# 5 or 7 imagery.
#
@mortezaomidi
mortezaomidi / kmeans.py
Created July 20, 2018 11:37 — forked from larsmans/kmeans.py
k-means clustering in pure Python
#!/usr/bin/python
#
# K-means clustering using Lloyd's algorithm in pure Python.
# Written by Lars Buitinck. This code is in the public domain.
#
# The main program runs the clustering algorithm on a bunch of text documents
# specified as command-line arguments. These documents are first converted to
# sparse vectors, represented as lists of (index, value) pairs.
from collections import defaultdict