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
| ~ locale | |
| LANG=en_US.utf8 | |
| LC_CTYPE=en_US.utf8 | |
| LC_NUMERIC="en_US.utf8" | |
| LC_TIME="en_US.utf8" | |
| LC_COLLATE="en_US.utf8" | |
| LC_MONETARY="en_US.utf8" | |
| LC_MESSAGES="en_US.utf8" | |
| LC_PAPER="en_US.utf8" | |
| LC_NAME="en_US.utf8" |
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 | |
| import json | |
| import random | |
| import string | |
| ADDRESSES = ["ahost{}".format(e) for e in range(10000)] | |
| GROUPS = ["agroup{}".format(e) for e in range(500)] | |
| def main(): | |
| print(json.dumps(inventory(), sort_keys=True, indent=2)) |
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
| fib_seq=[0,1] | |
| for x in range(40): | |
| fib_seq.append(fib_seq[-1]+fib_seq[-2]) | |
| print(fib_seq) |
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
| SELECT | |
| events.repo.name AS events_repo_name, | |
| COUNT(DISTINCT events.actor.id) AS events_actor_count | |
| FROM ( | |
| SELECT | |
| * | |
| FROM TABLE_DATE_RANGE([githubarchive:day.],TIMESTAMP('2015-09-01'),TIMESTAMP('2016-08-31'))) AS events | |
| WHERE | |
| events.type = 'PullRequestReviewCommentEvent' | |
| AND events.org.login IS NOT NULL |
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
| SELECT | |
| COUNT(DISTINCT events.actor.id) AS events_actor_count | |
| FROM ( | |
| SELECT | |
| * | |
| FROM TABLE_DATE_RANGE([githubarchive:day.],TIMESTAMP('2015-09-01'),TIMESTAMP('2016-08-31'))) AS events | |
| WHERE | |
| (events.repo.name = 'ansible/ansible' | |
| or events.repo.name = 'ansible/ansible-modules-extras' | |
| or events.repo.name = 'ansible/ansible-modules-core') AND |
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
| SELECT | |
| events.repo.name AS events_repo_name, | |
| COUNT(DISTINCT events.actor.id) AS events_actor_count | |
| FROM ( | |
| SELECT | |
| * | |
| FROM TABLE_DATE_RANGE([githubarchive:day.],TIMESTAMP('2015-09-01'),TIMESTAMP('2016-08-31'))) AS events | |
| WHERE | |
| events.type = 'PushEvent' | |
| OR events.type = 'PullRequestEvent' |
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
| SELECT | |
| COUNT(DISTINCT events.actor.id) AS events_actor_count | |
| FROM ( | |
| SELECT | |
| * | |
| FROM TABLE_DATE_RANGE([githubarchive:day.],TIMESTAMP('2015-09-01'),TIMESTAMP('2016-08-31'))) AS events | |
| WHERE | |
| (events.repo.name = 'ansible/ansible' | |
| or events.repo.name = 'ansible/ansible-modules-extras' | |
| or events.repo.name = 'ansible/ansible-modules-core') AND |
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
| SELECT | |
| events.repo.name AS events_repo_name, | |
| COUNT(DISTINCT events.actor.id) AS events_actor_count | |
| FROM ( | |
| SELECT | |
| * | |
| FROM TABLE_DATE_RANGE([githubarchive:day.],TIMESTAMP('2015-09-01'),TIMESTAMP('2016-08-31'))) AS events | |
| WHERE | |
| events.type = 'CommitCommentEvent' | |
| OR events.type = 'PushEvent' |
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 | |
| from flask import Flask, request, abort, jsonify | |
| app = Flask(__name__) | |
| @app.route('/push', methods=['POST']) | |
| def handle_push(): | |
| if not request.json: | |
| abort(400) | |
| if 'AnsibleTower' in request.headers and request.headers['AnsibleTower'] == 'xSecretx': | |
| # Trigger some other external action |
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
| use 'strict' | |
| exports.hellohttp = function (context, data) { | |
| console.log(data.message); | |
| context.success('My GCF Function: ' + data.message); | |
| }; |