This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import time | |
| import requests | |
| input_file = open('liquid_matches.json') | |
| matches = json.load(input_file) | |
| input_file.close() | |
| print('Loading {} matches\n'.format(len(matches))) | |
| f = open('liquid_match_data.txt', 'w') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <section> | |
| <section id="kubernetes-cli-basics-with-kubectl"> | |
| <h2>Google Container Engine (GKE) Basics</h2> | |
| <p><a href="http://kubernetes.io/"><img src="https://pbs.twimg.com/profile_images/511909265720614913/21_d3cvM.png" alt="kubernetes" style='width:30%;'></a><br/>with <a href="https://kubernetes.io/docs/user-guide/kubectl/"><code>kubectl</code></a></p> | |
| <h4 class='fragment grow'><a href="http://bit.ly/k8s-kubectl"><code>bit.ly/k8s-kubectl</code></a></h4> | |
| </section> | |
| <section id='presented-by' data-markdown> | |
| presented by | |
| [](https://coreos.com) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <section> | |
| <section id="a-modular-workshop-series-for-learning-kubernetes"> | |
| <h2><code>k8s-workshops</code></h2> | |
| <p><a href="http://kubernetes.io/"><img src="https://pbs.twimg.com/profile_images/511909265720614913/21_d3cvM.png" alt="kubernetes" style='width:30%;'></a><br/>a modular workshop series for <a href="http://kubernetes.io/">Kubernetes</a></p> | |
| <h3 class='fragment grow'><a href="http://bit.ly/k8s-workshops"><code>bit.ly/k8s-workshops</code></a></h3> | |
| </section> | |
| <section id='presented-by' data-markdown> | |
| presented by | |
| [](https://coreos.com) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CACHES = { | |
| ‘default’: { | |
| ‘BACKEND’: ‘redis_cache.RedisCache’, | |
| ‘LOCATION’: [ | |
| ‘%s:%s’ % (os.getenv(‘REDIS_MASTER_SERVICE_HOST’, ‘127.0.0.1’), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Normal person mode | |
| def next_server_number(l): | |
| if len(l) < 1: | |
| return 1 | |
| for i in xrange(1, max(l)): | |
| if i not in l: | |
| return i | |
| return max(l) + 1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # usage ./verify_splunk_coverage.py <log_file> | |
| # set these from splunk-apps/apps/<service-name>/default/props.conf | |
| BREAK_ONLY_BEFORE_REGEX=r'^\d\d:\d\d:\d\d\s\[[^\]]+\]' | |
| EXTRACT_REGEX=r'^\d?\d:\d\d:\d\d\s\[(?P<thread>[^\]]+)\]\s\[(?P<loglevel>\w+)\]\s\[(?P<class>[^\]]+)\]\s\[(?P<username>[^\]]*)\](?P<message>.*)$' | |
| import re,sys | |
| f = open(sys.argv[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fileinput | |
| x = "" | |
| for line in fileinput.input(): | |
| x += line | |
| s = "" | |
| i = 1 | |
| while i < len(x): | |
| if x[i] == '"': | |
| i += 1 |
NewerOlder