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
| hello |
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
| Hello, World! |
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
| print('hello world') |
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
| print('hello world') |
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
| print('hello world') |
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 | |
| if [[ -z $1 ]] | |
| then | |
| echo "Usage: $0 <env>" | |
| echo "" | |
| echo "Allowed env values: p1, d1, sl-loki, sl-cdfw" | |
| echo "" | |
| elif [[ "$1" = "p1" ]] | |
| then | |
| sl aws session generate --profile p1 --role-name engineer --account-id 067346688434 --region eu-west-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
| import csv | |
| import MySQLdb | |
| from pprint import pprint | |
| mydb = MySQLdb.connect(host='127.0.0.1', | |
| user='root', | |
| passwd='pa55word', | |
| db='metro') | |
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
| from flask import Blueprint, session, url_for, jsonify, request, g | |
| from app import app | |
| from app import oauth, oauth_client | |
| from app.database import connection | |
| from app.blueprints.auth import require_login | |
| sprava = Blueprint('sprava', __name__) | |
| sprava_app = oauth_client.remote_app( | |
| 'sprava', |
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
| lists:foldl(fun(El, Acc) -> | |
| case El of | |
| "10001" -> Acc + 1; | |
| _ -> Acc | |
| end, | |
| 0, List); |
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
| %% | |
| %% Convert seconds, minutes etc. to milliseconds. | |
| %% | |
| -spec seconds(Seconds) -> MilliSeconds when | |
| Seconds :: non_neg_integer(), | |
| MilliSeconds :: non_neg_integer(). | |
| seconds(Seconds) -> | |
| 1000*Seconds. | |
| -spec minutes(Minutes) -> MilliSeconds when | |
| Minutes :: non_neg_integer(), |
NewerOlder