Skip to content

Instantly share code, notes, and snippets.

View rasher's full-sized avatar

Jonas Häggqvist rasher

  • Horsens, Denmark
View GitHub Profile
@rasher
rasher / latest_rideon.ps1
Last active April 15, 2021 10:08
Monitor your Zwift log file and outputs the latest Ride On
# Copyright 2020 Jonas Häggqvist <rasher@rasher.dk>
#
# Usage of the works is permitted provided that this instrument is retained with the
# works, so that any entity that uses the works is notified of this instrument.
#
# DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
# This script monitors your Zwift log file and outputs the latest Ride On to a given
# output file. The output file is updated at most every N ms (6000), to try and follow
@rasher
rasher / 2019 NFL Draft - Drafted Players Hometowns.kml
Last active April 28, 2019 01:54
Shows the hometown of all players drafted in the 2019 NFL Draft
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by KMLtools -->
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>2019 Draft Players</name>
<LookAt>
<longitude>-97.11747665273776</longitude>
<latitude>37.51855478397822</latitude>
<altitude>0</altitude>
<heading>0.1366419803128703</heading>
"""
Copyright (c) 2018, Jonas Häggqvist <rasher@rasher.dk>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
#!/usr/bin/python
import sys
import csv
colors = {
'none': '#eee',
'other': '#aaa',
'vikings': '#4F2683',
'jaguars': '#006778',
'panthers': '#0085CA',
@rasher
rasher / flairstats.py
Created December 4, 2012 20:47
Subreddit flair stats
#!/usr/bin/env python
import sys
from datetime import datetime
from praw import Reddit
user = 'rasherdk'
password = 'PASSWORDGOESHERE'
srname = 'nfl'
r = Reddit('flairstats/0.1')
@rasher
rasher / playpredictor.py
Created September 7, 2012 18:11
Predict plays
#!/usr/bin/env python
from nflgame.statmap import idmap
from sqlalchemy import Column, String, Integer, Boolean
from sqlalchemy import create_engine
from sqlalchemy import func
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
import nflgame
import simplejson
import sys