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
declare global { | |
interface Window { | |
Intercom?: any; | |
intercomSettings?: any; | |
attachEvent?: any; | |
} | |
} | |
import { useEffect } from 'react'; | |
import { useRouter } from 'next/router'; |
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 sys | |
import matplotlib.pyplot as plt | |
def get_test_name(test): | |
try: | |
return test["name"].split("/")[-1].split(".")[0] | |
except: | |
return test["name"] |
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 sys | |
import matplotlib.pyplot as plt | |
def get_test_name(test): | |
try: | |
return test["name"].split("/")[-1].split(".")[0] | |
except: | |
return test["name"] |
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
{ | |
"statusCode": 200, | |
// if multi-value headers is not enabled, you can use just: | |
// headers: {"Content-Type": "application/json"} | |
"multiValueHeaders": {"Content-Type": ["application/json"]}, | |
"isBase64Encoded": false, | |
"body": "body" | |
} |
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
{ | |
"Open Weather Map": "https://openweathermap.org/api", | |
"Currency Convertor": "https://exchangeratesapi.io/", | |
"Sky Scanner": "https://skyscanner.github.io/slate", | |
"IMDB": "https://rapidapi.com/apidojo/api/imdb8" | |
} |
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
{ | |
"supplier": "Workwear Express Ltd", | |
"amount": "105.35", | |
"currencyCode": "GBP", | |
"taxAmount": "17.56", | |
"dueDate": "", | |
"expenseDate": "", | |
"billReference": "", | |
"category": "", | |
"lines": [ |
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
{ | |
"bookFileName": "1234567808-201804-KB-000000", | |
"bookFileXml": "PGVkZWZ0ZXI6YmVyYXQgeG1sbnM6ZWRlZnRlcj0iaHR0cDovL3d3dy5lZGVmdGVyLmdvdi50ciIgeG1sbnM6ZHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiIHhtbG5zOnhhZGVzPSJodHRwOi8vdXJpLmV0c2kub3JnLzAxOTAzL3YxLjMuMiMiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTpzY2hlbWFMb2NhdGlvbj0iaHR0cDovL3d3dy5lZGVmdGVyLmdvdi50ciAuLi94c2QvZWRlZnRlci54c2QiPgoJPHhicmxpOnhicmwgeG1sbnM6Z2wtYnVzPSJodHRwOi8vd3d3Lnhicmwub3JnL2ludC9nbC9idXMvMjAwNi0xMC0yNSIgeG1sbnM6Z2wtY29yPSJodHRwOi8vd3d3Lnhicmwub3JnL2ludC9nbC9jb3IvMjAwNi0xMC0yNSIgeG1sbnM6Z2wtcGx0PSJodHRwOi8vd3d3Lnhicmwub3JnL2ludC9nbC9wbHQvMjAwNi0xMC0yNSIgeG1sbnM6aXNvNDIxNz0iaHR0cDovL3d3dy54YnJsLm9yZy8yMDAzL2lzbzQyMTciIHhtbG5zOmlzbzYzOT0iaHR0cDovL3d3dy54YnJsLm9yZy8yMDA1L2lzbzYzOSIgeG1sbnM6bGluaz0iaHR0cDovL3d3dy54YnJsLm9yZy8yMDAzL2xpbmtiYXNlIiB4bWxuczp4YnJsaT0iaHR0cDovL3d3dy54YnJsLm9yZy8yMDAzL2luc3RhbmNlIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CgkJPGxpbms6c2NoZW1hUmVmIHhsaW5rOmh |
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
from collections import defaultdict | |
def dfs(visited_dfs, graph_dfs, node, l_c): | |
# This is the usual dfs algorithm | |
# just we need to keep count of the length of our component (l_c) | |
if node not in visited_dfs: | |
l_c += 1 | |
visited_dfs.add(node) | |
for neighbour in graph_dfs[node]: | |
l_c = dfs(visited_dfs, graph_dfs, neighbour, l_c) |
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
{ | |
"parameters": [ | |
{ | |
"key": "", | |
"value": "" | |
} | |
], | |
"requestHeader": { | |
"channelId": "", | |
"channelType": "MOBILE", |
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
class File: | |
def __init__(self, id, name) -> None: | |
self.id = id | |
self.name = name | |
def __eq__(self, other): | |
return self.id == other | |
def __repr__(self): | |
return f"Name: {self.name} ID: {self.id}" |
NewerOlder