javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})();
This file contains hidden or 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
| # Python3 program to extract and save video frame | |
| # using OpenCV Python | |
| #import computer vision module | |
| import cv2 | |
| # define the video path | |
| file = 'IMG_4329.mov' | |
| # capture the video |
This file contains hidden or 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
| -- Accepted answer from here: https://stackoverflow.com/questions/5408156/how-to-drop-a-postgresql-database-if-there-are-active-connections-to-it | |
| SELECT pg_terminate_backend(pg_stat_activity.pid) | |
| FROM pg_stat_activity | |
| WHERE pg_stat_activity.datname = '[your database name goes here]' | |
| AND pid <> pg_backend_pid(); |
This file contains hidden or 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 sys | |
| import os , os.path | |
| import shutil | |
| import math | |
| import time | |
| from pathlib import Path | |
| import uuid | |
| import datetime | |
| from rembg import remove | |
| from PIL import Image |
This file contains hidden or 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 django.conf import settings | |
| from django.conf.urls.static import static | |
| urlpatterns = [ | |
| # Project url patterns... | |
| ] | |
| if settings.DEBUG: | |
| urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol) | |
| pragma solidity ^0.8.0; | |
| import "./IERC20.sol"; | |
| import "./extensions/IERC20Metadata.sol"; | |
| import "../../utils/Context.sol"; | |
| /** |
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol) | |
| pragma solidity ^0.8.0; | |
| import "./IERC20.sol"; | |
| import "./extensions/IERC20Metadata.sol"; | |
| import "../../utils/Context.sol"; | |
| /** |