Skip to content

Instantly share code, notes, and snippets.

View markus-beuckelmann's full-sized avatar

Markus Beuckelmann markus-beuckelmann

View GitHub Profile
@markus-beuckelmann
markus-beuckelmann / gp.py
Created November 24, 2017 17:10
Gaussian Process Regression
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# Gaussian Process regression (one–dimensional)
# Can easily be adjusted to deal with noisy data, too.
import numpy as np
class GaussianProcess(object):
''' A simple Gaussian Process model. '''
@markus-beuckelmann
markus-beuckelmann / keybase.md
Created May 7, 2017 10:25
Verifying myself on keybase.io

Keybase proof

I hereby claim:

  • I am markus-beuckelmann on github.
  • I am markus_ (https://keybase.io/markus_) on keybase.
  • I have a public key ASA6debOwrqIM4PgCdrlGauQ4pimmvTi8UX0GxBA3RLFRgo

To claim this, I am signing this object:

@markus-beuckelmann
markus-beuckelmann / numpy-benchmark.py
Created April 30, 2017 13:06
A short Python script to benchmark NumPy and show your BLAS setup
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Roughly based on: http://stackoverflow.com/questions/11443302/compiling-numpy-with-openblas-integration
from __future__ import print_function
import numpy as np
from time import time
@markus-beuckelmann
markus-beuckelmann / wikipedia_articles_in_category.py
Created December 6, 2013 19:31
Get a list of all articles in a Wikipedia (sub-)category.
def wikipedia_articles_in_category(baseurl, subcategories = False, prefix = ''):
''' Returns a tuple of (title, url, category). '''
from lxml import html
from requests import get
page = get(baseurl)
tree = html.fromstring(page.text)
articles, category = [], prefix + ''.join(tree.xpath('//h1[@id="firstHeading"]/span/text()')).split(':')[-1]
seperator = '::'