Skip to content

Instantly share code, notes, and snippets.

View frozar's full-sized avatar
🧊
Working from the KUB

ROZAR Fabien frozar

🧊
Working from the KUB
View GitHub Profile
@ThomasG77
ThomasG77 / standalone-qgis3.py
Last active November 16, 2023 01:00
QGIS 3 standalone application sample
# Code borrowed from https://subscription.packtpub.com/book/application_development/9781783984985/1/ch01lvl1sec18/creating-a-standalone-application
# and upgraded for QGIS 3.0
import os
import sys
import shutil
import tempfile
import urllib.request
from zipfile import ZipFile
from glob import glob
@CatherineH
CatherineH / text_to_svg_path.py
Last active December 5, 2023 13:41
Convert a text character to an SVG path.
from svgpathtools import wsvg, Line, QuadraticBezier, Path
from freetype import Face
def tuple_to_imag(t):
return t[0] + t[1] * 1j
face = Face('./Vera.ttf')
@Conaws
Conaws / motion.svg.foreign.cljs
Created July 18, 2016 07:37
An example of using reagent to embed a foreign object in an SVG, and making that object draggable
(ns motion.svg.foreign
(:require [reagent.core :refer [atom]])
(:require-macros
[devcards.core :as dc
:refer [defcard defcard-doc defcard-rg deftest]]))
(defonce position1
(atom {:state {:x 1 :y 1} :rwidth 200 :rheight 100 :moving false :start {:x 1 :y 1}}))