Skip to content

Instantly share code, notes, and snippets.

View sreekanthgoud's full-sized avatar

Sreekanth Goud sreekanthgoud

View GitHub Profile
@sreekanthgoud
sreekanthgoud / puppeteer.sh
Created April 18, 2024 19:07
Install Docker pupter puppeteer
sudo apt-get update && sudo apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release xdg-utils wget ca-certificates
#https://stackoverflow.com/questions/58134793/error-while-loading-shared-libraries-libnss3-so-while-running-gtlab-ci-job-to
@sreekanthgoud
sreekanthgoud / docker_mogodb.cmd
Created January 19, 2024 11:42
docker mongodb
docker pull mongo
docker run --name my_mongo -p 27017:27017 -d mongo
@sreekanthgoud
sreekanthgoud / timer.js
Created August 18, 2023 04:48
Javascript time format HH:MM:SS:SSS
function get_otp_timer() {
const now = new Date();
const hours = ("0" + now.getHours()).slice(-2);
const minutes = ("0" + now.getMinutes()).slice(-2);
const seconds = ("0" + now.getSeconds()).slice(-2);
const milliseconds = ("0" + now.getMilliseconds()).slice(-3);
return hours + minutes + seconds + milliseconds;
}
exit($stmt->debugDumpParams());
@sreekanthgoud
sreekanthgoud / alertbox_read.js
Created July 6, 2023 09:31
Javascript get alertbox
// Wrap the original window.alert function...
const windowAlert = window.alert;
window.alert = function(message) {
console.log(`window.alert called with message: ${message}`);
return windowAlert(message);
};
alert('FOO');
// Console Output:
// window.alert called with message: FOO
@sreekanthgoud
sreekanthgoud / raandss.py
Created February 29, 2020 20:10
random shapes
import numpy as np, random
from PIL import Image
dX, dY = 512, 512
xArray = np.linspace(0.0, 1.0, dX).reshape((1, dX, 1))
yArray = np.linspace(0.0, 1.0, dY).reshape((dY, 1, 1))
def randColor():
return np.array([random.random(), random.random(), random.random()]).reshape((1, 1, 3))
def getX(): return xArray
@sreekanthgoud
sreekanthgoud / raand.py
Created February 29, 2020 20:03
random picss
import random
import uuid
from PIL import Image, ImageDraw
def generate_random_image(width=128, height=128):
rand_pixels = [random.randint(0, 255) for _ in range(width * height * 3)]
rand_pixels_as_bytes = bytes(rand_pixels)
text_and_filename = str(uuid.uuid4())
@sreekanthgoud
sreekanthgoud / random.py
Created February 29, 2020 20:01
random pics
import numpy, Image
for n in xrange(10):
a = numpy.random.rand(30,30,3) * 255
im_out = Image.fromarray(a.astype('uint8')).convert('RGBA')
im_out.save('out%000d.jpg' % n)
@sreekanthgoud
sreekanthgoud / train.py
Created December 8, 2019 04:43
sample training for deep learning
import numpy as np
import os
import numpy
from tensorflow.python.keras.layers import Dense
from tensorflow.python.keras import optimizers
from keras import regularizers
from keras.regularizers import l2
from keras.layers import Dropout
from keras.applications.mobilenet import MobileNet
from keras.layers import GlobalAveragePooling2D, Dense, Dropout, Flatten, BatchNormalization
@sreekanthgoud
sreekanthgoud / Mongodb_merge.js
Created September 27, 2019 22:26
Mongodb merge two collections
db.productsTrousers.find().forEach(function(obj){
db.products.insert(obj)
});