pip3 install pipenv
pipenv shell
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) |
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 |
module.exports = { | |
presets: [ | |
[ | |
'@babel/preset-env', | |
{ | |
targets: { | |
node: 'current' | |
} | |
} | |
], |
{ | |
"scripts": { | |
"test": "jest --watch --verbose", | |
"test-coverage": "jest --coverage" | |
}, | |
"devDependencies": { | |
"@faker-js/faker": "...", | |
"factory-girl": "...", | |
"faker": "...", |
{ | |
"env": { | |
"es2021": true, | |
"node": true, | |
"jest": true | |
}, | |
"extends": "standard-with-typescript", | |
"overrides": [ | |
], | |
"parserOptions": { |
{ | |
"scripts": { | |
"dev": "ts-node-dev -r tsconfig-paths/register --respawn --transpile-only --ignore-watch node_modules --no-notify bin/www.ts" | |
} | |
} |
#!/bin/bash | |
FINISHED=false | |
while ! $FINISHED; do | |
echo 'Enter the files you want to commit: ' | |
read FILES | |
if [ $FILES == '.' ]; then | |
git add $FILES | |
FINISHED=true | |
else |
See how a minor change to your commit message style can make a difference. Examples
Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs
<script src="./js/jquery-3.6.0.js"></script> | |
<script> | |
$(function () { | |
const includes = $('[data-include]') | |
$.each(includes, function(){ | |
let file = 'includes/' + $(this).data('include') + '.html' | |
$(this).load(file) | |
}) | |
}) |