Featured

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the of Linux users. 1. Found out i had to set the date like this: ...

Thursday, January 4, 2024

Golden rule of Programming - Don’t code today what you can’t debug tomorrow.

 One of the golden rule of programming is :


💡 Don’t code today what you can’t debug tomorrow.

Below some advices to improve yourself every day :

👉Master Your Tools: Become proficient in the programming languages, frameworks, and tools relevant to your field.

👉Problem-Solving Skills: Develop strong problem-solving skills to efficiently tackle coding challenges.

👉Debugging Proficiency: Sharpen your debugging skills to identify and fix issues quickly.

👉Algorithmic Understanding: Develop a strong understanding of algorithms and data structures for efficient problem-solving.

👉Code Readability: Write clean and readable code; it helps you and others understand and maintain it.

👉Time Management: Prioritize tasks, set deadlines, and manage your time effectively to stay productive.

👉Continuous Learning: Stay updated with industry trends, new technologies, and best practices to enhance your skills.

👉Testing: Embrace testing methodologies to ensure the reliability and correctness of your code.

👉Communication Skills: Effectively communicate with team members, stakeholders, and document technical decisions.

👉Collaboration: Foster a collaborative mindset, sharing knowledge and learning from your peers.

👉Stay Organized: Keep your codebase organized, use consistent naming conventions, and structure your projects logically.

👉Attention to Detail: Pay attention to details to avoid introducing errors and to produce high-quality code.

Efficiency comes from a combination of technical expertise, good practices, and effective collaboration.

Source - Linkedin post

Sunday, September 10, 2023

Sony WH-1000XM4 Headphones ಸೋನಿ WH-1000XM4: ಸೌಂಡ್ ಮೇಷ್ಟ್ರುಗಳ ಆತ್ಮಶಾಂತಿ


ಸೋನಿ WH-1000XM4: ಸೌಂಡ್ ಮೇಷ್ಟ್ರುಗಳ ಆತ್ಮಶಾಂತಿ

ಧ್ವನಿ ಕೇಳುವ ಅನುಭವ ಯಾರಿಗೆ ಅತ್ಯಂತ ಮುಖ್ಯವಾಗಿದೆಯೇನು? ಧ್ವನಿ ತಂಪುಗೊಳಿಸುವುದರ ಮೂಲಕ ಆತ್ಮಶಾಂತಿ ಹೆಚ್ಚಿಸುವ ಯಾವುದಾದರೂ ಸಾಧನೆಗೆ ಬಂದರೆ ಅದು ಅದೇ ಸ್ಪೆಕ್ಟ್ರಮಿನ ಇನ್ನೊಂದು ಕಡೆಗೆ ಸಾಗುವುದು. ಈಗ, ಸೋನಿ ನಿರ್ಮಿಸಿದ್ದ ಆ ಅದ್ವಿತೀಯ ಧ್ವನಿ ಅನುಭವವನ್ನು ನಾವು ಪಡೆಯಬಹುದಾದ ಸಂದರ್ಭ ಬಂದಿದೆ. ಸೋನಿ ಹೆಸರಿನ WH-1000XM4 ವಾಯಸ್-ವಯಸ್ಕ ಪ್ರೀಮಿಯಂ ವೈಫೈ ಆಪ್ಟಿವ್ ಕ್ಯಾನ್ಸೆಲ್ಲಿಂಗ್ ಹೆಡ್‌ಫೋನ್ಸ್ ಗಳು. ಈ ಲೇಖನದಲ್ಲಿ, ನಾವು ಸೋನಿ WH-1000XM4 ಹೆಡ್‌ಫೋನ್ಸ್‌ಗೆ ಸಂಬಂಧಪಟ್ಟ ಸುದ್ದಿಗಳನ್ನು ಮತ್ತು ಅದರ ವಿಶೇಷತೆಗಳನ್ನು ಅವಲೋಚಿಸೋಣ.

**ಧ್ವನಿ ಅನುಭವ:**
ಸೋನಿ WH-1000XM4 ವೈಫೈ ಹೆಡ್‌ಫೋನ್ಸ್ ನ ಧ್ವನಿ ಅನುಭವ ಅದ್ಭುತವಾಗಿದೆ. ಇದು ಹೈ-ರೆಸೊಲ್೯ಷನ್ ಆಡಿಯೋ ತಂತ್ರಜ್ಞಾನದಿಂದ ಹೊರಡಿದ್ದು, ಆಲಾಪನಾ ಮತ್ತು ಸಂಗೀತ ಇವುಗಳ ಮದ್ಧತೆಯನ್ನು ಸಾಧಿಸುವುದರಲ್ಲಿ ಪ್ರಬಲವಾಗಿದೆ. ದ್ವಿತೀಯ ಸ್ತರ ಧ್ವನಿ ಅನುಭವವು ನಿಮ್ಮನ್ನು ಸುತ್ತಲು ಉಳಿಸುವುದು ಮತ್ತು ನೀವು ಧ್ವನಿಯ ವಿವಿಧ ಮಟ್ಟಗಳನ್ನು ಸಹಿಸಬಹುದು. ಸಂಗೀತ ಶ್ರವಣಗಾರರಿಗೆ ಮತ್ತು ವೈದ್ಯುತ ಶ್ರವಣಗಾರರಿಗೆ ಇದು ಅದ್ವಿತೀಯ ಧ್ವನಿ ಅನುಭವವನ್ನು ಒದಗಿಸುತ್ತದೆ.

**ಸಾಮರ್ಥ್ಯ:**
WH-1000XM4 ಅತ್ಯಂತ ಸಾಮರ್ಥ್ಯವನ್ನು ಹೊಂದಿದೆ. ಬ್ಯಾಟರಿ ಸಾವಧಾನವಾಗಿ ಬಳಸುವುದರ ಮೂಲಕ ನೀವು ದಿನದ ಪ್ರಾರಂಭದಿಂದ ಕೊನೆಯವರೆ ಅದ್ವಿತೀಯ ಧ್ವನಿಯನ್ನು ಅನುಭವಿಸಬಹುದು. ಆದರೆ, ಸಾಮರ್ಥ್ಯ ಮಾತ್ರ ಅಲ್ಲ, ಸೋನಿ ನಡೆಸುತ್ತಿರುವ ಸ್ಮಾರ್ಟ್ ಟೆಕ್ನೋಲಾಜಿ ನಿಮ್ಮ ವಾಯಿಸ್-ಆಪ್ ಕ್ಯಾನ್ಸೆಲ್ಲಿಂಗ್ ಸ್ವಿಚ್ ಆಫ್ ಮತ್ತು ಸ್ವಿಚ್ ಆನ್ ಹೇಗೆ ಪ್ರಯೋಗಿಸಬೇಕೆಂಬುದನ್ನು ಸುಲಭವಾಗಿ ನಿಯಂತ್ರಿಸುತ್ತದೆ.

**ಕಾಳಜಿ ಮತ್ತು ರಾಜಿ:**
ಸೋನಿ WH-1000XM4 ಶಿಶು ವಯಸ್ಕರೆಲ್ಲರಿಗೂ ಹೊರಗೆ ಬಳಸಲು ಅನುವದಿಸುತ್ತದೆ. ಹೆಡ್‌ಫೋನ್ ಸ್ಟೈಲಿಷ್ ಮತ್ತು ಕಾಲಜಿಯ ಡಿಜೈನ್ ನನ್ನ ರಾಜಿಗೆ ಬಹುಮಟ್ಟಿಗೆ ಹಿತಕರವಾಗಿದೆ. ಲಾಂಗ್‌ಟ್ರಿಪ್ ನ ವೇಳೆ ಆವಶ್ಯಕವಿದ್ದಾಗ ಈ ಹೆಡ್‌ಫೋನ್‌ನ್ನು ಕಾಸಿದ್ದರೆ ಸಂರಕ್ಷಿಸಲು ಸುಲಭವಾಗಿ ಕಳೆದುಕೊಳ್ಳಬಹುದು.

**ನಿಯಂತ್ರಣ ಮತ್ತು ಅನುಸಂಧಾನ:**
ನಿಯಂತ್ರಣ ಮತ್ತು ಅನುಸಂಧಾನ ಸೋನಿ ಹೆಡ್‌ಫೋನ್‌ನ ಇನ್ನೊಂದು ಹೆಚ್ಚು ಸುಖಕರ ವಿಶೇಷತೆಯೇ. ನೀವು ವೈಯಕ್ತಿಕಗೊಳಿಸಬಹುದಾದ ಆಪ್ ನಿಯಂತ್ರಣ ಮತ್ತು ಸಾಕ್ಷರಣೆ ಸಾಧಿಸಲು ಅನುವಾಗುತ್ತದೆ. ಅದರಲ್ಲಿ ಇತರ ಸಾಕ್ಷರಣೆಯನ್ನು ನಿಲ್ಲಿಸಿ ಧ್ವನಿಯ ಮಟ್ಟವನ್ನು ನಿಯಂತ್ರಿಸಲು ಸೋನಿ ಆಪ್‌ನಿಯಂತ್ರಣ ಪ್ರದಾನ ಮಾಡುತ್ತದೆ.

**ಕೊನೆಗೆ:**
ಸೋನಿ WH-1000XM4 ವಾಯಸ್-ವಯಸ್ಕ ಪ್ರೀಮಿಯಂ ವೈಫೈ ಹೆಡ್‌ಫೋನ್‌ಗಳು ಧ್ವನಿ ಅನುಭವ, ಸ

ಾಮರ್ಥ್ಯ, ಕಾಳಜಿ ಮತ್ತು ರಾಜಿ, ನಿಯಂತ್ರಣ ಮತ್ತು ಅನುಸಂಧಾನ ಮೂರು ಮುಖ್ಯ ವಿಶೇಷತೆಗಳನ್ನು ಒದಗಿಸುತ್ತವೆ. ಯಾರು ಧ್ವನಿಯ ಅನುಭವವನ್ನು ಮಹಿತಪಡಿಸಿಕೊಳ್ಳುವುದು ಅಥವಾ ಸಿಗುವ ಸಾಮರ್ಥ್ಯದ ಆವಶ್ಯಕತೆಯಿದೆಯೋ ಅವರು ಈ ಹೆಡ್‌ಫೋನ್‌ನ್ನು ಆಲೋಚಿಸಬೇಕು. ಸೋನಿ WH-1000XM4 ವೈಫೈ ಹೆಡ್‌ಫೋನ್‌ಗಳು ಧ್ವನಿ ಪ್ರೇಮಿಗಳ ಹೃದಯದಲ್ಲಿ ಸ್ಥಾನವಿಡುತ್ತವೆ ಮತ್ತು ಧ್ವನಿ ಅನುಭವವನ್ನು ಸರಿಯಾಗಿ ಆತ್ಮನೇವಿಕೆ ಮಾಡಬೇಕೆಂದಿದ್ದರೆ ಅವರ ಸಂಜೆಗಳನ್ನು ಉತ್ತಮಗೊಳಿಸುವುದು.

Sunday, July 30, 2023

how to setup password for an AWS EC2 running instance

The AWS EC2 Linux instance uses a .pem private key file to authenticate the default ubuntu user account.

Let us learn about how to set up a password on your running EC2 instance,

Prerequisites

  • You have ec2 instance running
  • You have root access to ec2 instance

Step 1

Connect to your Linux ec2 instance via putty (/ssh).

Step 2

Login to your running instance

Step 3

Execute below command:

sudo passwd ec2-user

And write the password

Step 4

Now it’s time to go to the directory

/etc/ssh

and follow below command

sudo vim sshd_config 

Step 5

After you apply the command, 

Press “i” and

Now go to the “passwordauthentication” and write “yes”

After change, it please save it

Perfect

Step 6

Last command is

sudo service sshd restart

and disconnect and login again using username and password 

Friday, April 28, 2023

How to debug Python code in VS Code with arguments passed from command line

 Debugging Python code in VS Code with arguments passed from the command line is a straightforward process. Here are the steps you can follow:


1. Open the Python file that you want to debug in VS Code.

2. Set breakpoints in the code where you want to pause and inspect variables.

3. Open the Debug panel in VS Code by clicking on the Debug icon in the Activity Bar or by pressing `Ctrl+Shift+D` on Windows or `Cmd+Shift+D` on Mac.

4. Click on the "create a launch.json file" button and select "Python" as the environment.

5. In the launch.json file that opens, modify the "args" attribute to include the command-line arguments you want to pass to the Python script. For example:


   ```

   "args": ["arg1", "arg2"]

   ```


   Replace "arg1" and "arg2" with the actual arguments you want to pass.

NOTE: Add the below property in the launch.json file.   

"purpose": ["debug-in-terminal"]

6. Save the launch.json file.

7. Start the debugging process by clicking on the "Start Debugging" button in the Debug panel or by pressing `F5`.

8. The code execution will pause at the first breakpoint. Use the Debug Console to inspect variables, and use the Debug toolbar to step through the code and continue the execution.


That's it! You can now debug your Python code with arguments passed from the command line in VS Code.

Thursday, March 30, 2023

Regular Expressions



Regular Expressions
List of meta characters:

. ---> Any one character
? ---> Zero or one
+ ---> One or more
* ---> zero or more
^ ---> at the beginning of the string
$ ---> at the end of the string
[abc] ---> any one of a b c
{m} ---> 'm' times
{m,n} ---> at least m times, at most n times
| ---> or
\ ---> escape sequence character
\s ---> a space
\d ---> a digit
\w ---> a word
\b ---> a word boundary

examples:
\d ---> a single digit number (0 to 9)
\d\d ---> a two digit number (0 to 99)
\d\d\d ---> a three digit number (000 to 999)

NOTE: ?, +, *, {} are used as Quantifiers (to represent quantity)

\d{3} ---> same as above
\d{3,5} ---> either 3 digit or 5 digit number

hell?o ---> helo | hello
hell+o ---> hello | helllo | helllllo | ...
hrll*o ---> helo | hello | helllo | helllllo | ...
he(ll)+o ---> hello | hellllo | hellllllo | ...

S = "hi hello how are hello"

hello ---> Yes
^hello ---> No
hello$ ---> Yes
\d+ ---> a number
[0123456789]+ ---> a number
[0-9]+ ---> a number
\d{3} ---> a 4 digit ODD number

\d+\s\w+ ---> a number then a space then a word
\d+\s[a-z]+ ---> a number then a space then lowercase word
\d+\s[A-K764]{5,10} ---> a number then a space then min 5 max 10 char uppercase word between A - K 764
\d{3}:\d{2}:\d{4} --->
(ABC)?\d{3}:\d{4}[XYZ]? --->

Popular Posts