Skip to content

Instantly share code, notes, and snippets.

View jorgejesus's full-sized avatar
😺

Jorge Samuel Mendes de Jesus jorgejesus

😺
View GitHub Profile
@jorgejesus
jorgejesus / gist:e033febe68150ed8495060322d0a5c3f
Last active December 7, 2023 09:03
sqlite3 build and integration into python 3.10.8 using pyenv
# using zsh bash on Ubuntu 22.04.2 LTS
export PYENV_PYTHON_VERSION=3.10.8
export SQLITE_VERSION=3410000
export SQLITE_INSTALL_PATH=/opt/sqlite3
cd ~
test -f sqlite-autoconf-$SQLITE_VERSION.tar.gz || wget https://sqlite.org/2023/sqlite-autoconf-$SQLITE_VERSION.tar.gz
tar zxvf sqlite-autoconf-$SQLITE_VERSION.tar.gz
cd sqlite-autoconf-$SQLITE_VERSION
CFLAGS="-march=native -g -O3" CXXFLAGS=${CFLAGS} ./configure --prefix=$SQLITE_INSTALL_PATH --enable-readline
@jorgejesus
jorgejesus / lxm_ns.py
Created November 30, 2022 14:30
lxml namespace map example using OWSLib
# python version 3.10.7
from owslib.wms import WebMapService # owslib.__version__ == '0.27.2'
from lxml import etree # lxml.__version__== '4.9.1'
parser = etree.XMLParser(resolve_entities = False, strip_cdata = True, recover=True, ns_clean=True)
url = 'https://maps.isric.org/mapserv?map=/map/wrb.map'
wms = WebMapService(url, version='1.3.0')
service_xml = wms.getServiceXML()
@jorgejesus
jorgejesus / python-optimization.sh
Created January 7, 2022 07:58
python optimization with spatialsqlite
#!/usr/bin/env bash
# Credit https://giters.com/decuser
# packages needed Ubuntu 20.04.3 LTS
# libsqlite3-dev lib3-mod-spatialite zlib1g-dev
set +x
PY_VERSION=3.10.1
export MAKE_OPTS="-j8"
export PYTHON_CONFIGURE_OPTS="$PYTHON_CONFIGURE_OPTS --enable-loadable-sqlite-extensions"
@jorgejesus
jorgejesus / keybase.md
Created December 17, 2021 06:58
keybase.md

Keybase proof

I hereby claim:

  • I am jorgejesus on github.
  • I am dovtov (https://keybase.io/dovtov) on keybase.
  • I have a public key ASC7TIAkj21oc4ydbamSyjCG1U4d2wkAFIgYkmNVNf46bAo

To claim this, I am signing this object:

{
"openapi":"3.0.2",
"info":{
"title":"GeoServer Web Feature Service",
"description":"This is the reference implementation of WFS 1.0.0 and WFS 1.1.0, supports all WFS operations including Transaction.",
"contact":{
"name":"Jorge - pygeoapi",
"email":"foo@protonmail.com"
},
"version":"2.18-SNAPSHOT"
@jorgejesus
jorgejesus / gist:ba60a4f609f000e0b43363a984812b9f
Created June 28, 2020 06:16
openapi.get_oas_30_ .config
{
'server': {
'bind': {
'host': '0.0.0.0',
'port': 5000
},
'url': 'http://localhost:5000/',
'mimetype': 'application/json; charset=UTF-8',
'encoding': 'utf-8',
'language': 'en-US',
{
'openapi': '3.0.2',
'tags': [
{
'name': 'server',
'description': 'pygeoapi provides an API to geospatial data',
'externalDocs': {
'description': 'information',
'url': 'http://example.org'
}