The expression below captures the first group match and adds its to a list for later use.
let t =[] | '<,'>s/\v\\code\{([^}]+)}\zs/\=add(t, submatch(1))[1:0]/g
We can then place the list into another section of the file with.
put = t
docker inspect container | jq -r '..|.Mounts? |select(.!=null) | map(.Source)[]' |
defaults write com.apple.safari "NSWindow Frame BrowserWindowFrame" "0 0 1280 685 0 0 1280 777" |
" from https://github.com/suy/vim-context-commentstring/blob/master/doc/context-commentstring.txt | |
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') |
import psycopg2 | |
from rasterio.io import MemoryFile | |
conn = pscopg2.connect("<connection string>") | |
cur = conn.cursor() | |
# ensure that the GTiff driver is available, | |
# see https://postgis.net/docs/postgis_gdal_enabled_drivers.html | |
cur.execute(''' | |
SET postgis.gdal_enabled_drivers TO 'GTiff'; | |
SELECT ST_AsGDALRaster(rast, 'GTiff') FROM raster.table; |
The expression below captures the first group match and adds its to a list for later use.
let t =[] | '<,'>s/\v\\code\{([^}]+)}\zs/\=add(t, submatch(1))[1:0]/g
We can then place the list into another section of the file with.
put = t
function! VimtexLabelRename(oldtag, newtag) | |
" Change figure tag in tex and move the corresponding | |
" file. | |
exe '%s/\v\{(fig:)?' . a:oldtag . '\}/{fig:' . a:newtag . '}/g' | |
exe '%s/\v\{' . a:oldtag . '(_.*)?\.png\}/{' . a:newtag . '\1.png}/g' | |
exe '!for i in `find assets -name 'a:oldtag.'*`; do mv $i ${i/'.a:oldtag.'/'.a:newtag.'}; done' | |
"exe '!mv' 'assets/'.a:oldtag.'.png' 'assets/'.a:newtag.'.png' | |
endfunction | |
command! -nargs=* VimtexLabelRename call VimtexLabelRename(<f-args>) |
docker run --name <container_name> --rm -i -t <image> <shell, eg. /bin/bash> |
is:open is:pr assignee:<username> |
pyenv
was failing to install python due the inexistence of the pyexpat
library.
In order to solve this problem, I upgraded brew
, installed and uninstalled openssl
with brew
and installed the HEAD version of pyenv
.
Before installing the required python versions I exported the following flags:
CFLAGS="-I$(brew --prefix openssl)/include"
LDFLAGS="-L$(brew --prefix openssl)/lib"
library('magrittr') | |
library('memisc') | |
# get all .sav files from directory | |
files <- list.files('.', pattern='.sav$', recursive=FALSE) | |
# get the dataframes | |
dfs <- list.files('.', pattern='.sav$', recursive=FALSE) %>% | |
lapply(spss.system.file) %>% | |
lapply(as.data.set) %>% |