pip3 install pipenv
pipenv shell
const obj = { | |
name: 'Player', | |
team: 'Barcelona', | |
role: 'Raphinha' | |
} | |
/** | |
* Rename the a key of an object | |
* @param {Object} object with the keys to be renamed | |
* @param {Object} keys an array [oldkey, newkey], you can send as many pairs as you wish |
import cv2 | |
import numpy as np | |
import base64 | |
image = "" # raw data with base64 encoding | |
decoded_data = base64.b64decode(image) | |
np_data = np.fromstring(decoded_data,np.uint8) | |
img = cv2.imdecode(np_data,cv2.IMREAD_UNCHANGED) | |
cv2.imshow("test", img) | |
cv2.waitKey(0) |
/* The date you wanna change */ | |
const date = '06/10/22' | |
const register = document.querySelector('#lb_DtRegistro') | |
const sent = document.querySelector('#lb_DtEnvio') | |
const destiny = document.querySelector('#lb_DtDestino') | |
register.innerText = date | |
sent.innerText = date | |
destiny.innerText = date |
{ | |
"emmet.syntaxProfiles" : { | |
"javascript" : "jsx" | |
}, | |
"workbench.startupEditor" : "newUntitledFile", | |
"editor.fontSize" : 16, | |
"javascript.suggest.autoImports" : true, | |
"javascript.updateImportsOnFileMove.enabled" : "always", | |
"editor.rulers" : [ | |
80, |
start(() => { | |
while(true) | |
{ | |
print("a"); | |
sleep(1000); | |
} | |
}) | |
while(true) | |
{ |
// Wrong away | |
const poolCountResponse = await api.get('http://localhost:3333/pools/count') | |
const guessCountResponse = await api.get('http://localhost:3333/guesses/count') | |
// Correct way | |
const [poolCountResponse, guessCountResponse] = await Promise.all([ | |
api.get('http://localhost:3333/pools/count'), | |
api.get('http://localhost:3333/guesses/count') | |
]) |
export default class ErrorCustom { | |
constructor(public message: string, public code: number){ | |
this.message = message | |
this.code = code | |
} | |
} |
// The "-r" flag allows you to preload a module when running Node, see https://www.stephenlewis.me/blog/node-dash-r | |
"scripts": { | |
"start": "CLIMEM=8999 node -r climem index.js", | |
"climem": "npx climem 8999", | |
"test": "npx autocannon -c 100 -d 30 -p 10 http://localhost:3000" | |
} |
#!/bin/bash | |
webpages=( | |
"https://dictionary.cambridge.org/dictionary/" | |
"https://www.oxfordlearnersdictionaries.com/us/" | |
"https://context.reverso.net/traducao/" | |
"https://synonyms.reverso.net/synonym/" | |
"https://tophonetics.com/" | |
"https://translate.google.com/" | |
) |