Skip to content

Instantly share code, notes, and snippets.

View iftekharchowdhury's full-sized avatar
🏠
Working from home

Iftekhar Chowdhury iftekharchowdhury

🏠
Working from home
  • Dhaka
View GitHub Profile
@iftekharchowdhury
iftekharchowdhury / python_decorator_guide.md
Created May 4, 2021 01:43 — forked from Zearin/python_decorator_guide.md
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@iftekharchowdhury
iftekharchowdhury / django doc
Last active June 11, 2019 09:02
Django doc
create virtual environment
python3 -m venv myvenv
pip install django
If templates outside of folder then and you write down in settings file then no need to use templates/index.html like this in views.py
just use the index.html in render function second parameter
Using a FileField or an ImageField (see below) in a model takes a few steps:
@iftekharchowdhury
iftekharchowdhury / pythonIntermiadate.txt
Last active June 12, 2019 06:22
python intermiadate learning
join function = The join() method takes iterable – objects capable of returning its members one at a time. Some examples are List, Tuple, String, Dictionary and Set
myDict = {"name": "John", "country": "Norway"}
mySeparator = "TEST"
x = mySeparator.join(myDict)
print(x)
output: nameTESTcountry
javascript client side library
export const name = 'joe'
import {name} from './file2.js'
sudo npm install -g create-react-app
create-react-app contactmanager
everything is components