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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import os | |
import shutil | |
import math | |
import psycopg2 | |
from flask import Flask, render_template, make_response | |
app = Flask(__name__) |
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 os | |
import shutil | |
import logging | |
import psycopg2 | |
from django.conf import settings | |
from django.shortcuts import render, render_to_response | |
from django.http import HttpResponse | |
import mercantile as mc |
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 | |
import os | |
import sys | |
from optparse import OptionParser | |
from collections import OrderedDict | |
from osgeo import gdal | |
import numpy as np | |
from PIL import Image | |
from matplotlib.colors import LinearSegmentedColormap |
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
#EventID|Time|Latitude|Longitude|Depth/Km|Author|Catalog|Contributor|ContributorID|MagType|Magnitude|MagAuthor|EventLocationName|web_id_locator(deprecated) | |
4730151|2014-12-20T22:37:25.350000|43.6097|11.2563|6.7|SURVEY-INGV||||ML|2.6|SURVEY-INGV|Firenze|4004730151 | |
4730041|2014-12-20T22:35:09.980000|43.5848|11.2553|10.2|SURVEY-INGV||||ML|2.0|SURVEY-INGV|Firenze|4004730041 | |
4729881|2014-12-20T22:25:33.310000|43.6218|11.2432|7.4|SURVEY-INGV||||ML|2.2|SURVEY-INGV|Firenze|4004729881 | |
4729581|2014-12-20T21:39:40.560000|43.6218|11.2445|5.7|SURVEY-INGV||||ML|2.3|SURVEY-INGV|Firenze|4004729581 |
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
##Geometry=group | |
##Export WKT to file=name | |
##Input_Layer=vector | |
##Output_File=output file | |
from qgis.core import * | |
from PyQt4.QtCore import * | |
import processing | |
v_in = processing.getObject(Input_Layer) |
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 QtQuick 2.0 | |
import QtWebKit 3.0 | |
Rectangle { | |
width: 800 | |
height: 600 | |
WebView { | |
url: "http://stemkoski.github.io/Three.js/Model-Animation.html"; | |
anchors.fill: parent | |
} |
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
# -*- coding: utf-8 -*- | |
# | |
# Copyright © 2012 Giovanni Allegri (Gis3W s.a.s.) | |
# Licensed under the terms of the LGPLv2 License | |
from qgis.core import * | |
import math | |
def pointInterpolate(geom,point): | |
geomType = geom.wkbType () |
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
curl -s "http://webservices.rm.ingv.it/fdsnws/event/1/query?lat=43.587007&lon=11.316179&maxradiuskm=30&starttime=2014-12-19T00:00:00&endtime=2014-12-20T23:59:59&minmag=2&maxmag=5" | xml2json | jq "[.\"q$quakeml\".eventParameters.event[] | {latitude:.origin.latitude.value[],longitude:.origin.longitude.value[],magnitude:.magnitude.mag.value[]}]" | in2csv -f json | csvjson --lat latitude --lon longitude | jq . > output.json |
NewerOlder