Skip to content

Instantly share code, notes, and snippets.

View novica's full-sized avatar

Novica Nakov novica

View GitHub Profile
@novica
novica / package-r-bundled.sh
Last active September 3, 2026 10:47
Bundle INLA binary in ready-made R package
#!/usr/bin/env bash
## Build a standalone R-INLA package -- source tarball AND Linux binary
## tarball -- with the matching precompiled Linux `inla` binary already
## bundled inside, instead of relying on the `inla.binary.install()` call
## that normally fetches it at install/first-use time.
##
## Typical use case: publishing INLA to a custom repository (e.g. a Posit
## Package Manager internal repo) for environments that install packages
## from a private mirror with no route to inla.r-inla-download.org, or that
## want the binary version pinned and reproducible rather than resolved at
@novica
novica / git-status.sh
Created August 12, 2026 13:08
git-status — run a quick audit of folder with many git projects
#!/usr/bin/env bash
# git-status — run a quick audit of folder with many git projects
#!/usr/bin/env bash
#!/usr/bin/env bash
RED=$'\033[31m'
GREEN=$'\033[32m'
YELLOW=$'\033[33m'
CYAN=$'\033[36m'
library("duckdb")
#### Creating the Ducklake
con <- dbConnect(duckdb(), dbdir=":memory:")
dbExecute(con, "INSTALL ducklake;")
dbExecute(con, "ATTACH 'ducklake:metadata.ducklake' AS r_ducklake;")
dbExecute(con, "USE r_ducklake;")
#dbDisconnect(con)
@novica
novica / 01_week.sql
Last active January 23, 2022 18:12
dezoomcamp exercises
/*
* There are two question before these that don not require much code,
* so only the SQL related answers are written below.
*/
/* See the data */
SELECT
*
@novica
novica / bilans_na_rashodi.R
Created March 22, 2021 20:11
R script to create a clean csv from the municipal expenses budget pdf
box::use(
tabulizer[locate_areas, extract_tables],
purrr[reduce],
dplyr[mutate, across, select, bind_rows, if_else, glimpse, lag, `%>%`],
stringr[str_remove, str_remove_all],
tidyr[extract, fill],
readr[write_csv]
)
@novica
novica / bilans_na_prihodi.R
Last active March 22, 2021 18:36
R script to create a clean csv from the municipal income budget pdf
box::use(
tabulizer[locate_areas, extract_tables],
purrr[reduce],
dplyr[mutate, across, select, bind_rows, if_else, glimpse, `%>%`],
stringr[str_remove, str_remove_all],
readr[write_csv]
)
# bilans na prihodi
---
title: "Two-letter MK domain names"
output:
html_document:
df_print: paged
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}