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
""" | |
An example of using PyWin32 and the win32com library to interact | |
Microsoft Excel from Python. | |
This can be used instead of Visual Basic for Applications (VBA) | |
(c) Michael Papasimeon | |
""" | |
import win32com.client |
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
from shapely.geometry import Point | |
from functools import partial | |
from shapely.ops import transform | |
import pyproj | |
def buffer_in_meters(lng, lat, radius): | |
proj_meters = pyproj.Proj(init='epsg:3857') | |
proj_latlng = pyproj.Proj(init='epsg:4326') | |
project_to_meters = partial(pyproj.transform, proj_latlng, proj_meters) |
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 sys | |
from PyQt5.QtCore import Qt | |
from PyQt5.QtGui import QPixmap | |
from PyQt5.QtWidgets import (QApplication, QDialog, QWidget, | |
QLabel, QLineEdit, QHBoxLayout, QVBoxLayout, QPushButton, | |
QButtonGroup, QStackedLayout) | |
class Dialog(QDialog): |
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 numpy | |
from PyQt5 import QtCore, QtWidgets, QtGui | |
Qt = QtCore.Qt | |
class NumpyModel(QtCore.QAbstractTableModel): | |
def __init__(self, narray, parent=None): | |
QtCore.QAbstractTableModel.__init__(self, parent) | |
self._array = narray.point | |
self.test = narray.enabled |
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
# !/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
class overlay(QWidget): | |
def __init__(self, parent=None): | |
super(overlay, self).__init__(parent) |