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 click.testing | |
import os | |
import snowtool.cli | |
import unittest | |
from unittest import mock | |
from ..mocks import MOCK_ENV, MOCK_SNOWFLAKE_VERSION, MockSnowflakeServer | |
@mock.patch.dict(os.environ, MOCK_ENV) |
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/python | |
import os, sys, random, string | |
length = int(sys.argv[1]) if len(sys.argv) > 1 else 4 | |
if length < 8: | |
with open('/usr/share/dict/words', 'r') as f: | |
choice_list = [l.strip() for l in f.readlines()] | |
ch = ' ' |
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
#!/bin/bash | |
set -o errexit | |
eliot_cmd="eliot-prettyprint" | |
eliot_args=() | |
papertrail_args=("--json") | |
jq_term=".events[].message" | |
grep_cmd="cat" | |
grep_args=("-") |
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
class SqlFileQuery: | |
"""Utility class to load a named SQL file and use as a query.""" | |
def __init__(self, filename): | |
self.filename = filename | |
@property | |
def dirpath(self): | |
return os.path.dirname(os.path.realpath(__file__)) | |
@property | |
def filepath(self): | |
return os.path.join(self.dirpath, self.filename) |