Skip to content

Instantly share code, notes, and snippets.

Avatar

Markus Beuckelmann markus-beuckelmann

View GitHub Profile
@markus-beuckelmann
markus-beuckelmann / gp.py
Created Nov 24, 2017
Gaussian Process Regression
View gp.py
#!/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
Verifying myself on keybase.io
View keybase.md

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 Apr 30, 2017
A short Python script to benchmark NumPy and show your BLAS setup
View numpy-benchmark.py
#!/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 Dec 6, 2013
Get a list of all articles in a Wikipedia (sub-)category.
View wikipedia_articles_in_category.py
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 = '::'