Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
# -*- coding: utf-8 -*- | |
import unicodedata | |
""" Normalise (normalize) unicode data in Python to remove umlauts, accents etc. """ | |
data = u'naïve café' | |
normal = unicodedata.normalize('NFKD', data).encode('ASCII', 'ignore') | |
print normal | |
function loadImage(url, callback) { | |
var image = new Image(); | |
image.onload = function() { | |
callback(null, image); | |
}; | |
image.onerror = function() { | |
callback(new Error('Could not load image at ' + url)); | |
}; | |
image.src = url; | |
} |
library("tmap") | |
library("sp") | |
# read crime data, downloaded from https://data.police.uk/data/ | |
tmpdir <- tempdir() | |
unzip("crimes_in_Greater_London_2016-08.zip", exdir = tmpdir) | |
crimes <- rbind(read.csv(file.path(tmpdir, "2016-08/2016-08-city-of-london-street.csv")), | |
read.csv(file.path(tmpdir, "2016-08/2016-08-metropolitan-street.csv"))) | |
# create SpatialPointsDataFrame of known locations |
library("tmap") | |
library("readxl") | |
library("maptools") | |
library("grid") | |
# ers.usda.gov is undergoing change. found the file here: | |
download.file("http://www.ers.usda.gov/webdocs/DataFiles/Food_Atlas_Data_Access_and_Documentation_Downloads__18030//DataDownload.xls", destfile = "DataDownload.xls", mode="wb") | |
df <- read_excel("DataDownload.xls", sheet = "HEALTH") | |
# download data --- use link above as site is under construction |
Homebrew build logs for neovim/neovim/neovim on macOS 10.11.6 | |
Build date: 2016-11-17 07:31:16 |
# 'Item*' it the pattern to look for | |
# sed "s/I/i/g" is the replacement pattern | |
for f in Item*; mv $f (echo {$f} | sed "s/I/i/g"); end |
# /r/rugbyunion flair numbers | |
library(tidyverse) | |
flair <- read_csv('_r_rugbyunion_user_flair - Sheet1.csv') | |
flair | |
british_isles <- filter(flair, Flair_Code %in% c('england', 'ireland', 'wales', 'scotland')) | |
british_isles |
Homebrew build logs for homebrew/science/paraview on macOS 10.13.2 | |
Build date: 2017-12-20 09:53:13 |