This file contains 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 os | |
import subprocess | |
# replace with id of your template | |
template_id_string = '{ "scriptId": "1emazMPaUkLHXbgbEF0nOKwU275gL7H5cwue909bVMtkp2czm_tB5XYwH" }' | |
def run_update(id): | |
new_clasp_string = f'{{ "scriptId": "{id}" }}' | |
# overwrite the clasp file |
This file contains 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
function getStatusCode(url) { | |
var url_trimmed = url.trim(); | |
// Check if script cache has a cached status code for the given url | |
var cache = CacheService.getScriptCache(); | |
var result = cache.get(url_trimmed); | |
// If value is not in cache/or cache is expired fetch a new request to the url | |
if (!result) { | |
var options = { |
This file contains 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
var myapp = { | |
id:window.application.id, | |
name:window.application.name, | |
tables:[] | |
}; | |
for (let table of window.application.tables){ | |
var mytable = { | |
id:table.id, |
This file contains 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
[run] | |
omit = *tests*, *venv*, */usr/local/lib*, config.py | |
[report] | |
exclude_lines = | |
if __name__ == .__main__.: |
This file contains 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 os | |
import boto3 | |
import pytest | |
from moto import mock_dynamodb2 | |
from flow import Flow, FlowDynamoDB | |
flow = Flow(name="test", database=FlowDynamoDB()) | |
def create_table(): |
This file contains 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
# git only | |
git rm -r --cached .env | |
# commit and push to delete (but still in previous history) | |
# remove from Github history | |
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD | |
git push --force | |
# file still there but content will be empty |
This file contains 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
dicts = [{...},{...}, {...}] | |
with open('output.json', 'w') as f: | |
json_data = json.dumps(dicts) | |
f.write(json_listings) |
This file contains 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
r"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" |
This file contains 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
r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+" |
This file contains 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
r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)" |
NewerOlder