Skip to content

Instantly share code, notes, and snippets.

View petermeissner's full-sized avatar
💻
githubbing

Peter Meissner petermeissner

💻
githubbing
View GitHub Profile
@benjaminjack
benjaminjack / cuda_config.md
Last active April 2, 2018 05:38
Configuring linux for hardware-accelerated deep learning in R

This is a collection of notes that explains how to configure linux for hardware-accelerated deep learning in R. The goal is to have linux drive the main display from an Intel integrated GPU, while reserving an Nvidia GPU strictly for computation using CUDA. It skips some of the more straightforward steps while detailing any "gotchas" I ran into.

What we'll install

  • ElementaryOS Loki 0.4.1 (an Ubuntu 16.04 LTS derivative; so these notes apply to Ubuntu as well)
  • Latest Nvidia drivers
  • CUDA Toolkit
  • cuDNN
  • R/Rstudio
  • R Keras (which includes tensorflow)
@jeroenjanssens
jeroenjanssens / config.md
Last active June 8, 2018 08:39
Sensitive information in R scripts

If your R script uses senstive information such as a password, then it's best to keep this in a seperate file (and perhaps outside the project's repository). Moreover, if you're giving a live demo using RStudio, then you should avoid putting this senstive information in your global environment.

If you put it in a YAML file, say .my_project.yaml, which may look as follows:

---
api_service:
  username: foo
  password: bar123!
recode <- function(df, ..., match = c("first", "last")) {
match <- match.arg(match)
cases <- lapply(list(...), as.case)
if (identical(match, "last")) cases <- rev(cases)
n <- nrow(df)
out <- rep(NA, length(n)) # logical will be upcast as needed
# Simple loop-y implementation
@puppe
puppe / absender.lco
Last active July 30, 2023 20:14
Deutsche Briefvorlage für LaTeX (scrlttr2) (ACHTUNG: Aktualisierte Version jetzt unter https://codeberg.org/puppe/german-latex-letter-template/)
\ProvidesFile{absender.lco}
\KOMAoptions{%
% fromemail=true, % Email wird im Briefkopf angezeigt
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt
% fromfax=true, % Faxnummer wird im Briefkopf angezeit
% fromurl=true, % URL wird im Briefkopf angezeigt
% fromlogo=true, % Logo wird im Briefkopf angezeigt
% subject=titled, % Druckt "Betrifft: " vor dem Betreff
locfield=wide, % Breite Absenderergänzung (location)