Skip to content

Instantly share code, notes, and snippets.

View pacoespinoza's full-sized avatar
🙃
success is a choice! #blessed #unstoppable

Paco Espinoza pacoespinoza

🙃
success is a choice! #blessed #unstoppable
View GitHub Profile
@Prasad9
Prasad9 / add_gaussian_noise.py
Last active March 14, 2024 10:28
Python code to add random Gaussian noise on images
import cv2
def add_gaussian_noise(X_imgs):
gaussian_noise_imgs = []
row, col, _ = X_imgs[0].shape
# Gaussian distribution parameters
mean = 0
var = 0.1
sigma = var ** 0.5
@MichaelLawton
MichaelLawton / deleteAmazonSavedItems.js
Last active June 12, 2024 15:38
Removes all Amazon saved for later items on the cart page. It will only remove visible items. You might want to scroll first to make more items visible. To use paste code in developer console (Ctrl+Shift+J or Cmd+Opt+J in Chrome) then press enter.
function deleteSavedItems() {
var query = document.querySelectorAll("#sc-saved-cart input[value=Delete]")
if (query.length) {
query[0].click();
}
if (query.length > 1) {
setTimeout(deleteSavedItems,100);
}
else {
console.log('Finished');