Skip to content

Instantly share code, notes, and snippets.

View tmalsburg's full-sized avatar

Titus von der Malsburg tmalsburg

View GitHub Profile
@tmalsburg
tmalsburg / psychling_journals.opml
Last active June 3, 2023 05:15
RSS feeds of journals publishing work in (psycho)linguistics
<?xml version="1.0"?>
<opml version="1.0">
<head>
<title>(Psycho)linguistics journals</title>
</head>
<body>
<outline title="Annual Rev Ling" xmlUrl="https://www.annualreviews.org/action/showFeed?ui=45mu4&amp;mi=3fndc3&amp;ai=6690&amp;jc=linguistics&amp;type=etoc&amp;feed=atom"/>
<outline title="Brain &amp; Language" xmlUrl="https://rss.sciencedirect.com/publication/science/0093934X"/>
<outline title="Cognition" xmlUrl="http://rss.sciencedirect.com/publication/science/00100277"/>
<outline title="Cognitive Science" xmlUrl="https://onlinelibrary.wiley.com/feed/15516709/most-recent"/>
@tmalsburg
tmalsburg / vcard2org-contacts.py
Last active August 13, 2023 00:02
A simple script for converting vCard files to org-contacts.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Written by Titus von der Malsburg <malsburg@posteo.de>, March 2014.
# This is a simple script for converting vCard files to
# org-contacts. There is one mandatory argument: the name of the
# vCard file. The result is printed to standard out.
# Usage:
@tmalsburg
tmalsburg / chinese_color_terms.R
Created September 27, 2023 10:15
Analysis of onset patters of basic Mandarin Chinese color terms
library(ggplot2)
library(dplyr)
options(scipen=999)
N <- 100000 # Number of simulations
# Data:
@tmalsburg
tmalsburg / confidence_intervals.R
Last active October 14, 2023 07:48
Quick simulation of 50 experiments and their means and 95% confidence intervals
set.seed(1)
mu <- 0
sigma <- 1
N.trials <- 20
N.sims <- 50
rnorm(N.trials*N.sims, mu, sigma) |>
matrix(nrow=N.sims) -> Y
d <- apply(Y, 1, \(y) c(mean(y), sd(y)/sqrt(length(y))))
@tmalsburg
tmalsburg / insert_bibtex_from_doi.el
Last active April 16, 2024 09:27
An Emacs command that takes the DOI in the clipboard and inserts the corresponding BibTeX entry at point.
(require 'url-http)
(defun insert-bibtex-from-doi ()
(interactive)
(let* ((doi (string-trim (gui-get-primary-selection)))
(url (if (string-prefix-p "https://doi.org/" doi)
doi
(concat "https://doi.org/" doi)))
(url-request-method "GET")
(url-mime-accept-string "application/x-bibtex"))