Skip to content

Instantly share code, notes, and snippets.

@georgeblck
georgeblck / figure.html
Last active Sep 18, 2021 — forked from cpbotha/figure.html
Drop-in replacement for Hugo figure shortcode with img srcset support
View figure.html
{{/*
- Change viewport sizes, lazy-loading,async & width,alt,link,caption in the shortcode call
- Hardcode sizes in this file
- If an image should not be resized or changed - e.g. because it is low quality -
simply dont put it in the page bundle but in /static
Example call: {{<figure src="image.jpg" alt="Alt Text" viewport="(max-width:720px) 80vw, (max-width: 1260px) 40vw, 30vw">}}
figure with auto-resizing, webp-conversion and srcset v2021-06-27
@georgeblck
georgeblck / crawl_windzone.ipynb
Last active Apr 26, 2021
Download "Windzone" for all german zipcodes
View crawl_windzone.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@georgeblck
georgeblck / index.ipynb
Created Nov 20, 2019
Comparison of openCV Interpolation methods by Anthony Tanbakuchi (Backup because his site is down)
View index.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@georgeblck
georgeblck / getBundeslandKlima.R
Last active Jul 8, 2019
Downloads and cleans most recent climate data on german Bundesländer
View getBundeslandKlima.R
# Clear workspace
rm(list = ls())
# load Packages
library(reshape2)
library(stringr)
#### Load data ####
# Get the URLs of the Regional Monthly Averages
@georgeblck
georgeblck / getGermanSentiments.R
Last active Jul 8, 2019
This code downloads and cleans the most recent German Sentiment Corpus in R (March 2019)
View getGermanSentiments.R
# Ich habe bis jetzt keine Quelle gefunden die:
# a) den aktuellsten v2.0-Datensatz benutzt (Stand: März 2019) und
# b) die Wort-Inflektionen zusammenführt.
# Ich hoffe Menschen die Deutsche Sentiment-Analyse machen wollen können diesen Code gebrauchen
# Source/Quelle: http://wortschatz.uni-leipzig.de/de/download
# Load Packages/Pakete laden
library(readr)
library(reshape2)
@georgeblck
georgeblck / batch-lstm.R
Created Feb 14, 2017
An efficient, batched LSTM in R
View batch-lstm.R
###
### This is a batched LSTM forward and backward pass. Written by Andrej Karpathy (@karpathy)
### BSD License
### Re-written in R by @georgeblck
###
rm(list=ls(all=TRUE))
LSTM.init <- function(input_size, hidden_size, fancy_forget_bias_init = 3){
# Initialize parameters of the LSTM (both weights and biases in one matrix)
@georgeblck
georgeblck / min-char-rnn.R
Created Feb 7, 2017
Minimal character-level language model with a Vanilla Recurrent Neural Network, in R
View min-char-rnn.R
###
### Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
### BSD License
### Re-written in R by @georgeblck
###
rm(list=ls(all=TRUE))
options(digits=10)