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 math | |
from qgis.core import * | |
from processing.core.VectorWriter import VectorWriter | |
##degspacing=number 30 | |
##distance=number 5000000 | |
##numrings=number 4 | |
##centerx=number 0.0 | |
##centery=number 0.0 |
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
lass DataObject(object): | |
def to_html(self, updated_station): | |
self.html = "whatever" | |
self.on_html_update.callback(self.html) | |
def update(self, updated_stations): | |
self.json = self.to_json(updated_stations) | |
self.on_json_update.callback(self.json) | |
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
def render(self, request): | |
# Encapsulate the function call we wish to make into a partial object. | |
# Now if we change the function name or arguments we only change them | |
# in ONE place, instead of the two places this function is called from. | |
f = functools.partial(self.dlstatus.stn_to_json, self.id) | |
try: | |
request.setHeader("content-type", "application/json") | |
if request.args.has_key('callback'): | |
request.setHeader("content-type", "application/javascript") | |
return request.args['callback'][0] + '(' + |
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 | |
from pprint import pprint | |
from ctypes import CDLL, create_string_buffer, string_at | |
from ctypes import c_bool, c_char, c_wchar, c_byte, c_ubyte, c_short, c_ushort | |
from ctypes import c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong | |
from ctypes import c_float, c_double, c_longdouble, c_char_p, c_wchar_p | |
from ctypes import c_void_p, POINTER, pointer, byref | |
__all__ = ['orbreap_timeout'] |
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 | |
# | |
# Copyright 2012 by Jeff Laughlin Consulting LLC | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
NewerOlder