Skip to content

Instantly share code, notes, and snippets.

View PALASH-BAJPAI's full-sized avatar
:electron:
Building some stuffs.

PALASH PALASH-BAJPAI

:electron:
Building some stuffs.
View GitHub Profile
@PALASH-BAJPAI
PALASH-BAJPAI / template.py
Created January 13, 2024 10:09
Competitive Coding python template
from collections import defaultdict
import math
ll = lambda : list(map(int,input().split()))
ls = lambda : list(map(str,input().split()))
for _ in range(int(input())):
n = int(input())
@PALASH-BAJPAI
PALASH-BAJPAI / namingConvention.txt
Last active June 4, 2024 05:05
Python naming conventions
Snake case for variable and function name. eg get_customer_name()
constants are uppercase. eg PI
class names are upperCamelCase. eg MyClass
module names are all lowercase. eg mymodule
@PALASH-BAJPAI
PALASH-BAJPAI / responsive.css
Created July 14, 2022 11:36
Make image responsive
<img src="nature.jpg" alt="Nature" class="responsive">
.responsive {
max-width: 100%;
height: auto;
}
@PALASH-BAJPAI
PALASH-BAJPAI / night_mode.css
Created July 14, 2022 06:33
Night Mode for website
body{
background:#000;
filter: invert(1) hue-rotate(360deg);
}
p{
color:pink;
}
//Invert 0 and background #FFF for again normal mode
@PALASH-BAJPAI
PALASH-BAJPAI / autosize.css
Last active June 28, 2022 10:49
Auto-size image according to div
.img{
height:100%;
width:100%;
object.fit:contain;
}