npm i express
npm i -D nodemon
package.json
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "attach", | |
"protocol": "inspector", |
Run all tests in directory
ruby -Itest tests/tests.rb
var junction_font = new FontFace('Junction Regular', 'url(fonts/junction-regular.woff)'); | |
junction_font.load().then(function(loaded_face) { | |
document.fonts.add(loaded_face); | |
document.body.style.fontFamily = '"Junction Regular", Arial'; | |
}).catch(function(error) { | |
// error occurred | |
}); |
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Debugpy attach", | |
"type": "python", | |
"request": "attach", |
import io | |
import cv2 | |
import base64 | |
import numpy as np | |
from PIL import Image | |
# Take in base64 string and return PIL image | |
def string_to_image(base64_string): | |
imgdata = base64.b64decode(base64_string) | |
return Image.open(io.BytesIO(imgdata)) |
"workbench.colorCustomizations": { | |
"[Default Dark+]": { | |
"titleBar.activeBackground": "#3954ee", | |
"titleBar.activeForeground": "#fff", | |
"statusBar.background": "#3954ee", | |
"statusBar.foreground": "#fff", | |
"tab.activeBorderTop": "#fbff00" | |
}, | |
}, | |
"window.titleBarStyle": "custom", |
function clearNextInterest(){ | |
const selector = "div > input[type='checkbox']:checked"; | |
const next = document.querySelector(selector); | |
if(next){ | |
next.scrollIntoView(); | |
next.click(); | |
setTimeout(clearNextInterest,500) | |
}; | |
}; | |
clearNextInterest(); |
export class HttpMethod { | |
static GET = "GET"; | |
static POST = "POST"; | |
static PUT = "PUT"; | |
static DELETE = "DELETE"; | |
} | |
const request = async ({endpoint, params, method = HttpMethod.GET}) { |
# Reference: https://adamj.eu/tech/2021/05/13/python-type-hints-how-to-fix-circular-imports/ | |
from __future__ import annotations | |
from typing import TYPE_CHECKING | |
if TYPE_CHECKING: | |
from models import Book | |