Skip to content

Instantly share code, notes, and snippets.

@Gijs-Koot
Gijs-Koot / gist:e4210e38e575dae16f19
Created July 4, 2014 14:02
brew liblas install problem; conflicting types for '_GTIFcalloc'
$ brew install -v liblas
==> Downloading http://download.osgeo.org/liblas/libLAS-1.7.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/liblas-1.7.0.tar.gz
==> Verifying liblas-1.7.0.tar.gz checksum
tar xf /Library/Caches/Homebrew/liblas-1.7.0.tar.gz
==> cmake .. -DWITH_GEOTIFF=ON -DWITH_GDAL=ON -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/liblas/1.7.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev
-- The C compiler identification is AppleClang 5.1.0.5030040
-- The CXX compiler identification is AppleClang 5.1.0.5030040
-- Check for working C compiler: /usr/local/Library/ENV/4.3/clang
-- Check for working C compiler: /usr/local/Library/ENV/4.3/clang -- works
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

I hereby claim:

  • I am gijs-koot on github.
  • I am gijskoot (https://keybase.io/gijskoot) on keybase.
  • I have a public key ASCpvk5-58h7ioVTS37qBVtpJg1YOrunTMH-egtNhJEl4go

To claim this, I am signing this object:

{

http://andrewgelman.com/wp-content/uploads/2012/11/frequentists_vs_bayesians.png

Question 1

There are three types of coins which have different probabilities of landing heads when tossed.

  • Type A coins are fair, with probability .5 of heads
  • Type B coins are bent and have probability .6 of heads
  • Type C coins are bent and have probability .9 of heads
@Gijs-Koot
Gijs-Koot / check_ov_bikes.gist
Last active February 2, 2017 15:59
"Oneliner" voor het bekijken van het beschikbaar aantal OV-fietsen op alle stations in Nederland.
## Dependencies:
* httpie
* csvkit
* jq
* json2csv
## Dit is de regel (filtert op utrecht en amsterdam, pas aan naar wens)
http http://fiets.openov.nl/locaties.json | jq '[.locaties[] | {loc: .description, bikes: (try .extra.rentalBikes | tonumber), date: .extra.fetchTime | todate}] | sort_by(-.bikes)' | json2csv | csvsql --query "SELECT * FROM stdin WHERE loc LIKE 'Ams%' OR loc LIKE 'Utr%' LIMIT 100" | csvlook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Gijs-Koot
Gijs-Koot / parse_knvb_scores.py
Created February 13, 2017 14:22
Download and parse current year KNVB eredivisie results and schedule from their site.
from bs4 import BeautifulSoup
import requests
import dateparser
import pandas as pd
uitslagen_url = "http://www.knvb.nl/competities/eredivisie/uitslagen"
programma_url = "http://www.knvb.nl/competities/eredivisie/programma"
uitslagen_soup = BeautifulSoup(requests.get(uitslagen_url).content, "lxml")
programma_soup = BeautifulSoup(requests.get(programma_url).content, "lxml")
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.