Follow the installation and activation instructions for the U.S. Custom keyboard layout.
If you’re using macOS Sierra (10.12), install
| Examples for some pyqgis common functions. | |
| Some may be outdated as things can be done easier in qgis3 now but they should just be an example | |
| for some functions that were use to make life easier during the development of QGIS plugins: | |
| examples from https://github.com/boundlessgeo/lib-qgis-commons/blob/master/qgiscommons2/layers.py | |
| def load_layer(filename, name = None): | |
| ''' | |
| Tries to load a layer from the given file | |
| :param filename: the path to the file to load. |
Follow the installation and activation instructions for the U.S. Custom keyboard layout.
If you’re using macOS Sierra (10.12), install
| import shapely | |
| import fiona | |
| from fiona import collection | |
| import csv | |
| star_csv = csv.reader(open('hygxyz.csv', 'rb')) | |
| header = star_csv.next() | |
| max_x = 10000000 |
| (ns ignacio.tfidf (:require [clojure.contrib.string :as string])) ;; Simple tfidf in clojure, for fun. | |
| (def stopwords (set (string/split #"\n" (slurp "./stopwords.txt")))) | |
| (defn tokenize [raw-text] ;; Lowercases and splits on non-letters, non-numbers. | |
| (remove stopwords (string/split #"[^a-z0-9äöüáéíóúãâêîôûàèìòùçñ]+" (string/lower-case raw-text)))) | |
| (defn idf2 [n-docs match] (Math/pow (Math/log (/ n-docs (count (keys match)))) 2)) | |
| (defn index-one [fname] ;; Index for one file. Given an fname, returns a map of token -> map of (fname, count) |