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
https://github.com/app-sre/qontract-reconcile.git 30af65af14a2dce962df923446afff24dd8f123e | |
https://github.com/app-sre/container-images.git c260deaf135fc0efaab365ea234a5b86b3ead404 | |
https://github.com/Gaikanomer9/rasa-docker-bot.git 3aa0e32f68631cdcd0f757d0f6be4ee486f1a693 | |
https://github.com/Gaikanomer9/cloud-build-notifiers.git 2f9eebce378bf38964345d674e0969b9afe9ccbc | |
https://github.com/Gaikanomer9/rasa-docker-bot.git invalid_sha | |
https://github.com/Gaikanomer9/rasa-docker-bot.asdgit invalid_sha |
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
# время (O(n1)), память O(n1+2*n2) | |
# Данное решение использует hash таблицу и позволяет быстро определять - находится ли элементов во втором списке | |
# Из минусов - выделение дополнительной памяти для сета второго списка | |
arr1=[1,2,3,4,5] | |
arr2=[3,4,5,6,7] | |
def process_list(arr1, arr2): | |
arr2_s = set(arr2) | |
return list(filter(lambda x: x not in arr2_s, arr1)) |
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 | |
from flask import request | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/", methods=["GET"]) | |
def hello_there(): | |
return "Hello Cloud Run", 200 |
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
<!-- Script for extracting url params --> | |
<script type="text/javascript"> | |
function setupCookie(cookieName, cookieValue) { | |
var cookiePath = '/' | |
var expirationTime = 2592000 //time the cookie should expire in seconds | |
expirationTime = expirationTime * 1000 //Convert expirationtime to milliseconds | |
var date = new Date() //Create new date | |
var dateTimeNow = date.getTime() //What is the current time in milliseconds | |
date.setTime(dateTimeNow + expirationTime) //Set expiration time | |
var expirationTime = date.toUTCString() //Convert milliseconds to UTC time string |
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
# -*- coding: utf-8 -*- | |
from flask import Flask, request, make_response, jsonify | |
app = Flask(__name__) | |
@app.route('/webhook', methods=['POST']) | |
def webhook(): | |
req = request.get_json(force=True) | |
intent = req.get('queryResult').get('intent').get('displayName') |