Posts

Showing posts from March, 2022

Create and read QR code

QR codes are machine readable 2 dimensional pixelated barcodes which can be used to store some information.  QR = quick response Let see some of usecase.  1. online payments 2.  check hotel menu, 3. wifi password sharing  People carry their mobile all the time, it's part of life now. QR provide option to scan a code and get information in your mobile. Is it cool.  Steps to generate QR code.  Install qrcode package using below command.  pip install qrcode Code to create QR code.  import qrcode qr_code = qrcode.make('Hi, I am from Code Adhyayana team.'  ) qr_code.save('intro_qr.png') Additional properties of qrcode module. 1. Version : there are 40 version available, starting from smallest 1 to largest 40. 2. error_correction : ERROR_CORRECT_L, M, Q, H 3. box_size 4. border 5. add data 6. make 7 . make image qr_object = qrcode.QRCode(     version=2,     error_correction=qrcode.constants.ERROR_CORRECT_L,     box_siz...

Git Command

1. git clone -b branchName url Copy url from git clone option from repository.  2. git status  To check if git there is any new file or not and basic git status.  3. git branch  To get details about git branches. If star ⭐ is in front then it's currently points to that branch.  4. git branch branchName  Create a new branch.  5. git checkout branchName Points to branch name specified.  6. git add .  All the files from local to staging.  7. git add fileName Add a particular file. 8. git commit -m "first commit" Commit all files in staging so that it will be ready for migration. 9. git config --get remote.origin.url Just to verify if code is pointing to right repository.  10. git push -u origin branchName Move code to git repository. 11. Create a pull request to merge code from branchName to master branch. Error 1. Some of the files are not moving to staging area in git add .  Files were in state modified/ Untracked  Structur...