Skip to content

Instantly share code, notes, and snippets.

@gka
gka / .gitignore
Last active August 31, 2023 14:44
covid19 berlin cases
.Rhistory
.Rproj.user
covid19-berlin.Rproj
.Renviron
@ElToro1966
ElToro1966 / r_ubuntu_18_04.sh
Last active October 1, 2023 18:29 — forked from pachadotdev/r_ubuntu_17_10.sh
Install R and RStudio on Ubuntu 18.04 with essential libraries for data science. Based on pachamaltese/r_ubuntu_17_10.sh (for Ubuntu 17.10). Note: You need to make sure the default library location - /usr/local/lib/R/site-packages - is writable .
# Install R
sudo apt update
sudo apt install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev
# Install RStudio
cd ~/Downloads
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5001-amd64.deb
sudo gdebi rstudio-1.2.5001-amd64.deb
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile
@joffilyfe
joffilyfe / README.md
Last active April 3, 2023 01:38
GITEA + Drone (0.7|0.8)

Compose file to setup and host a Gitea and Drone environment

This environment is dependent off a common network for docker/git plugin and gitea-server, so for this work fine in closed networks we have to create a custom network before run this composefile.

First create your network:

docker network create gitea-network
@timelyportfolio
timelyportfolio / code.R
Last active July 4, 2019 03:48
R sf simple features with quakes data, st_make_grid, dplyr, mapview zcol
library(sf)
library(dplyr)
library(mapview)
library(mapedit)
qk_mx <- data.matrix(quakes[,2:1])
qk_mp <- st_multipoint(qk_mx)
qk_sf <- st_sf(st_cast(st_sfc(qk_mp), "POINT"), quakes, crs=4326)
grd <- st_sf(geom=st_make_grid(qk_sf), crs=4326)
@irees
irees / README.md
Last active December 10, 2020 11:50

Transitland Frequency Visualization

Accompanies blog post: Transit dimensions: Transitland Schedule API

The frequency.py script:

  • Fetches all trips on a given date, between a start time and end time, inside of a bounding box
  • Calculates the number of connections between every stop
  • Uses a colormap and line width to show more frequent service
  • Outputs a GeoJSON map as output.geojson
@hrbrmstr
hrbrmstr / bom.R
Last active July 16, 2019 09:40
test for and/or remove byte order mark in R
#' Tests whether a raw httr response or character vector has a byte order mark (BOM)
#'
#' \href{https://en.wikipedia.org/wiki/Byte_order_mark}{What is a byte order mark?}
#'
#' @param resp \code{httr} response object or a character vector
#' @param encoding can be one of \code{UTF-8}, \code{UTF-16} or \code{UTF-16BE}.
#' Although a BOM could be used with UTF-32 and other encodings, such
#' encodings are rarely used for data transmission and the three supported
#' encodings are the most likely ones folks in R will be working with from
#' web APIs.\cr\cr
@Cadair
Cadair / pr.md
Last active March 31, 2016 13:51 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "upstream"]
	fetch = +refs/heads/*:refs/remotes/upstream/*
	url = git@github.com:sunpy/sunpy.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/upstream/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@rothgar
rothgar / install-tmux
Last active April 5, 2023 06:53 — forked from ekiara/how_to_install_tmux_on_centos
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
@kalxas
kalxas / 00-README.rst
Last active March 6, 2019 18:48
CSW Testing Suite

Testing suite to test CSW endpoints

Instructions

  1. Install the suite:
anonymous
anonymous / README.md
Created February 28, 2014 17:47
Integrating D3 with a CouchDB database

Part 1

Proof of concept

Say, you want to save your D3 application in a CouchDB database. This is just a proof of concept that this is possible. I use the »Focus + Context« diagram by Mike Bostock (http://bl.ocks.org/1667367) as an example.

Prerequisites: