Skip to content

Instantly share code, notes, and snippets.

View im-noob's full-sized avatar
🎯
I'm Iron man

Amritesh kumar im-noob

🎯
I'm Iron man
View GitHub Profile
@im-noob
im-noob / ChangeWhatsappBackground.js
Created January 9, 2022 07:37
Change Whatsapp Background.js
let interval = setInterval(function(){
if(document.getElementsByClassName('_1PzAL').length != 0){
document.getElementsByClassName('_1PzAL')[0].style.backgroundImage = 'url("https://source.unsplash.com/random/952x512?sig=1")';
document.getElementsByClassName('_1PzAL')[0].style.opacity = '1';
//clearInterval(interval)
}
},1000);
@im-noob
im-noob / Downlaod Viemo Video.js
Created December 19, 2021 17:13
Downlaod Viemo Video.js
/*
Steps to download
1. Open the console
2. Select vimeo-player iframe
3. paste the code enjoy :)
*/
@im-noob
im-noob / Find Best Model .py
Last active October 16, 2021 08:55
Find Best Model ML
# Liner Regression
models = {
'LinearRegression' : LinearRegression(),
'Ridge' : Ridge(alpha=1.0),
'Lasso' : Lasso(),
'DecisionTreeRegressor' : DecisionTreeRegressor(),
'KNeighborsRegressor' : KNeighborsRegressor(),
'SVR' : SVR(),
@im-noob
im-noob / Grid Search CV.py
Last active October 16, 2021 08:02
Grid Search CV
param_grid = {
'weights' : ['uniform', 'distance'],
'algorithm' : ['auto', 'ball_tree', 'kd_tree', 'brute'],
'leaf_size' : [30, 40, 50],
'n_neighbors' : [5, 10, 15],
}
gridSearchCV = GridSearchCV(KNeighborsRegressor(),param_grid=param_grid,n_jobs=-1)
-----------------------------------------------------------------------------------------------
param_grid = {
@im-noob
im-noob / turtle.py
Last active October 11, 2021 20:10
turtle Example
from turtle import *
from time import sleep
import random
bgcolor('black')
speed(0)
line_width = 2
@im-noob
im-noob / TwiiterTrend.py
Created August 7, 2021 06:38
Record 1st trending tweet count in every minute
import json
import os
from datetime import datetime
from time import sleep
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import TimeoutException
@im-noob
im-noob / twitter_trend_analyser.py
Created August 2, 2021 19:09
Twitter Trend Analyser in Python
import json
import os
from datetime import datetime
from time import sleep
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import TimeoutException
@im-noob
im-noob / selenium_starter3.py
Last active December 13, 2021 15:16
Selenium Starter 3 Python
# !apt-get update
# !apt install chromium-chromedriver
# !cp /usr/lib/chromium-browser/chromedriver /content/drive/MyDrive/Colab\ Notebooks
# !pip install selenium
# !chmod 0777 chromedriver
import json
import os
from time import sleep
@im-noob
im-noob / DatableSorting.js
Created July 21, 2021 12:32
Data table Sorting on hidden column from different related table
columns: [
{data: "check_box", mData: "check_box", orderable: false},
{data: "profile_pic_and_name", mData: "profile_pic_and_name"},
{data: "user.custom_user_id", mData: "user.custom_user_id"},
{data: "role", mData: "role"},
{data: "company_name", mData: "company_name"},
{data: "status", mData: "status"},
{data: "created_at", mData: "created_at"},
{data: "user.first_name", mData: "user.first_name","visible": false,},
@im-noob
im-noob / AddPaginatinTOCollection.php
Created June 24, 2021 14:38
AddPaginatinSuportTOCollection Laravel .php
Collection::macro('paginate', function($perPage, $total = null, $page = null, $pageName = 'page') {
$page = $page ?: LengthAwarePaginator::resolveCurrentPage($pageName);
return new LengthAwarePaginator(
$this->forPage($page, $perPage),
$total ?: $this->count(),
$perPage,
$page,
[
'path' => LengthAwarePaginator::resolveCurrentPath(),