sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
| ## Python: | |
| # create venv | |
| python -m venv venv | |
| # python -m virtualenv . | |
| # activate venv | |
| source venv/bin/activate | |
| # deactivate venv |
| ##Command line instructions## | |
| #Git global setup | |
| git config --global user.name "Mahmud Al Hasan" | |
| git config --global user.email "[email protected]" | |
| #Create a new repository | |
| git clone https://gitlab.com/zero.fighter/test.git | |
| cd test | |
| touch README.md |
Getting started:
Related tutorials:
| # recursive abacus | |
| def inc(x,n=0): return inc(x^(1<<n),inc(0,n)) if x&(1<<n) else x|x^(1<<n) | |
| # there are 10 type of coders ... | |
| lambda i: i++ (lambda j: j()**j())(type(i)) #halike | |
| # dyslexia | |
| lambda i: (sum(range(x))*2)/x # decrement #halike | |
| # it's all about the context |
| a = int(input()) # direct input with casting | |
| a,b=input().split() # input a and b | |
| a,b=map(int,input().split()) # input a and b with casting |
| import os | |
| import configparser # configparser to read the profiles.ini file in to determine which folder to use | |
| mozilla_profile = os.path.join(os.getenv('APPDATA'), r'Mozilla\Firefox') | |
| mozilla_profile_ini = os.path.join(mozilla_profile, r'profiles.ini') | |
| profile = configparser.ConfigParser() | |
| profile.read(mozilla_profile_ini) | |
| data_path = os.path.normpath(os.path.join(mozilla_profile, profile.get('Profile0', 'Path'))) | |
| # os.path.normpath() is used to ensure backslashes are used. |
| def pow(a, n): # a^n --- O(log n) | |
| if n == 0: return 1 | |
| if n == 1: return a | |
| if n % 2 == 1: | |
| return a * pow(a, n-1) | |
| else: | |
| p = pow(a, n/2) | |
| return p * p | |
| print(pow(2, 2)) |