Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View elmerehbi's full-sized avatar

Ibrahim El Merehbi elmerehbi

View GitHub Profile
sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt upgrade
sudo apt install gdal-bin libgdal-dev
pip3 install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
import numpy as np
from dataclasses import dataclass
from earth_models import EarthModel, WGS84, GRS80
@dataclass
class GeoPoint(Datum):
lon: LatLonType = field(default_factory=LatLonType)
lat: LatLonType = field(default_factory=LatLonType)
import enum
from dataclasses import dataclass
class EarthModel(enum.Enum):
WGS84 = "WGS84"
GRS80 = "GRS80"
@dataclass
# http://EditorConfig.org
# top-most EditorConfig file
root = true
# Apply to all code files
[*]
# A newline ending every file
insert_final_newline = true
# https://pre-commit.com | https://pre-commit.com/hooks.html
default_language_version:
python: python3.7
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: detect-private-key
- id: trailing-whitespace
@elmerehbi
elmerehbi / install_tex.sh
Last active February 11, 2018 18:37
Latex & Texstudio
#!/bin/bash
sudo apt-get install --yes texlive
sudo apt-get install --yes texlive-math-extra texlive-science # texlive-bibtex-extra
sudo apt-get install texlive-latex-recommended #
sudo apt-get install texlive-latex-extra
sudo apt-get install --yes texlive-xetex # for fontspec
sudo apt-get install --yes texlive-luatex # for unicode-math
sudo apt-get install --yes texlive-lang-latin
sudo apt-get install --yes lmodern latexmk # needed for LaTeX
#!/bin/bash
# run as follows:
# chmod u+x install_R_esac.sh
# ./install_R_esac.sh
rm -rf install_R.sh*
rm -rf r-customize.R*
rm -rf .Rprofile*
rm -rf mro.tar.gz
# temporary Rprofile to hardcode a CRAN mirror
# needed to install R packages (r-customize.R)
# You may replace this profile before or after installtion
# & customization.
.First <- function() {
options(
# repos = c(CRAN = "https://cran.rstudio.com/"),
repos = c(CRAN = "https://mran.microsoft.com/."),
#!/usr/bin/Rscript
install.packages("INLA", repos="https://inla.r-inla-download.org/R/stable", dep=TRUE)
install.packages(c("SparseM"))
install.packages(c("sp", "rgeos", "quantreg", "circular", "rgl", "matrixcalc", "ellipse", "primer"))
#!/bin/bash
## R
## Note that you will still need to confirm some installations at the terminal
## Packages needed for R
sudo apt-get install --yes libmysqlclient-dev # RMySQL
sudo apt-get install --yes libxml2-dev # XML package, or
sudo apt-get install --yes r-cran-xml
sudo R CMD javareconf # to check java