Skip to content

Instantly share code, notes, and snippets.

View mattstabeler's full-sized avatar

Matt Stabeler mattstabeler

View GitHub Profile
@mattstabeler
mattstabeler / keysExist.py
Last active November 14, 2016 08:50
Python check object keys exists
# Search an object heirarchy for the presence of the given keys
def keyExists(obj, keys):
first, rest = keys[0], keys[1:]
if first in obj or len(obj) > int(first):
if len(rest) == 0:
return True
return keyExists(obj[first], rest)
return False
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<a class="twitter-timeline" data-dnt="true" href="https://twitter.com/search?q=%23freeplay6%20%40Betfair" data-widget-id="707962088631758848">Tweets about #freeplay6 @Betfair</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>