<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>dgplug member blogs Reader</title>
    <link>https://blogs.dgplug.org</link>
    <description>Read the latest posts from dgplug member blogs.</description>
    <pubDate>Thu, 23 Apr 2026 12:21:14 +0000</pubDate>
    <item>
      <title>The Degenerate Way to Count in Binary</title>
      <link>https://blogs.dgplug.org/titas/the-degenerate-way-to-count-in-binary</link>
      <description>&lt;![CDATA[I don&#39;t know if it&#39;s worth it to know how to count in binary. Irrespective of it I&#39;ll share some observations I made a year back.&#xA;&#xA;How Numbers are Written ....&#xA;Radix(orBase) :  The number of unique symbols or digits in a system. If a system has a radix R, the allowable digits are 0 through R-1.&#xA;i.e. radix 5 means, digits from 0 to 4 .&#xA;&#xA;  Counting is done recursively , here for radix 5 the numbers will be written as:&#xA;  0,1,2,3,4,10,11,12,13,14,20,21,22,23,24,30... so on&#xA;    0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15.... This is for decimal numbers&#xA;&#xA;We can observe (10) in base 5 == (5) in base 10&#xA;&#xA;The maximum unique digits in base 5 is five, so counting from 0-4 we exhaust all our options , to write the next number we need another digit. Hence we bring a 1 ahead and reset the numbers right of it.&#xA;The numbers after 4 becomes 10,11,12,13,14 again we exhaust all the options with 1 fixed , so we make it 2 and reset the numbers in right of it to 0, now we&#39;ll have five more numbers 20,21,22,23,24 this goes on till 44. Here we&#39;ve exhausted all numbers that can be created with 2 spaces so we&#39;ll need another space and the next number will be (100)base5.&#xA;&#xA;The main observation is :&#xA;For Radix (N) the maximum unique numbers by r digits == N^r&#xA;eg. Maximum unique numbers in decimal number system by 2 digits ==  10^2 = 100&#xA;0 to 99&#xA;For Radix (N) a number written in the format (N-1) (N-1) (N-1) (N-1) ...for r terms  = N^r - 1&#xA;(N-1) 00000.... upto r zeros = N^r&#xA;&#xA;eg. (444) base 5 = (5^3-1) i.e 124 in decimal&#xA;eg. (1000) base 9 = 9^3 = 729&#xA;&#xA;Counting in Binary&#xA;Now that we&#39;re clear with the basics&#xA;&#xA;1  consecutive 1&#39;s written r times = 2^r-1&#xA;eg. (1111)sub2/sub =  2^4-1 = 15&#xA;&#xA;2  1 followed by r zeros = 2^r&#xA;eg. (100000)sub2/sub =  2^5 = 32&#xA;&#xA;3  Sticking 1 zero after a number means multiplying with 2&#xA;eg. (10)sub2/sub = 2&#xA;then (100)sub2/sub = 2*2 = 4&#xA;&#xA;4  Sticking one 1 after a number means multiplying with 2 + 1&#xA;eg. (111)sub2/sub = 7&#xA;then (1111)sub2/sub = 7 X 2 +1 = 15&#xA;&#xA;5  Memorise the first 4 binary numbers&#xA;(0)sub2/sub = 0&#xA;(1)sub2/sub = 1&#xA;(10)sub2/sub = 2&#xA;(11)sub2/sub = 3&#xA;&#xA;Some Examples:&#xA;&#xA;eg.1) Say we have (11001)sub2/sub,&#xA;  we know 11 = 3 then the number = ((3 x 2) x 2)x2+1 = 25&#xA;&#xA;eg.2) (11110110)sub2/sub&#xA;  we know 1111 = 15 (i.e 2^4-1) , the number will be ((((15x2)x2+1)x2+1)x2) = 246&#xA;&#xA;eg.3) Convert 211 to binary&#xA;  we can think 211 = 255-44&#xA;  The 255 = 2^8-1 , so 8 consecutive 1s, and we remove 44 i.e(32+8+4) from it ,&#xA;  (11111111)sub2/sub is 255, now we remove the 1s from 2^5 , 2^3, 2^2 s places and leave them with 0s&#xA;  (11010011)sub2/sub is 211&#xA;&#xA;Thats it&#xA;Thats pretty much it. These are just patterns , once you see them you can&#39;t unsee them.&#xA;Whether it&#39;s actually useful , I still don&#39;t know.&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I don&#39;t know if it&#39;s worth it to know how to count in binary. Irrespective of it I&#39;ll share some observations I made a year back.</p>

<h2 id="how-numbers-are-written">How Numbers are Written ....</h2>

<p><strong>Radix(orBase)</strong> :  The number of unique symbols or digits in a system. If a system has a radix <em>R</em>, the allowable digits are <em>0</em> through <em>R-1</em>.
i.e. radix 5 means, digits from 0 to 4 .</p>

<blockquote><p>Counting is done recursively , here for radix 5 the numbers will be written as:
0,1,2,3,4,10,11,12,13,14,20,21,22,23,24,30... so on</p>

<p>0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15.... This is for decimal numbers</p></blockquote>

<p>We can observe (10) in base 5 == (5) in base 10</p>

<p>The maximum unique digits in base 5 is five, so counting from 0-4 we exhaust all our options , to write the next number we need another digit. Hence we bring a 1 ahead and reset the numbers right of it.
The numbers after 4 becomes 10,11,12,13,14 again we exhaust all the options with 1 fixed , so we make it 2 and reset the numbers in right of it to 0, now we&#39;ll have five more numbers 20,21,22,23,24 this goes on till 44. Here we&#39;ve exhausted all numbers that can be created with 2 spaces so we&#39;ll need another space and the next number will be (100)base5.</p>

<p>The main observation is :
<strong>For Radix (N) the maximum unique numbers by r digits == N^r</strong>
eg. Maximum unique numbers in decimal number system by 2 digits ==&gt; 10^2 = 100
0 to 99
<strong>For Radix (N) a number written in the format (N-1) (N-1) (N-1) (N-1) ...for r terms  = N^r – 1</strong>
<strong>(N-1) 00000.... upto r zeros = N^r</strong></p>

<p>eg. (444) base 5 = (5^3-1) i.e 124 in decimal
eg. (1000) base 9 = 9^3 = 729</p>

<h2 id="counting-in-binary">Counting in Binary</h2>

<p>Now that we&#39;re clear with the basics</p>

<p><strong>1&gt; consecutive 1&#39;s written r times = 2^r-1</strong>
eg. (1111)<sub>2</sub> =&gt; 2^4-1 = 15</p>

<p><strong>2&gt; 1 followed by r zeros = 2^r</strong>
eg. (100000)<sub>2</sub> =&gt; 2^5 = 32</p>

<p><strong>3&gt; Sticking 1 zero after a number means multiplying with 2</strong>
eg. (10)<sub>2</sub> = 2
then (100)<sub>2</sub> = 2*2 = 4</p>

<p><strong>4&gt; Sticking one 1 after a number means multiplying with 2 + 1</strong>
eg. (111)<sub>2</sub> = 7
then (1111)<sub>2</sub> = 7 X 2 +1 = 15</p>

<p><strong>5&gt; Memorise the first 4 binary numbers</strong>
– (0)<sub>2</sub> = 0
– (1)<sub>2</sub> = 1
– (10)<sub>2</sub> = 2
– (11)<sub>2</sub> = 3</p>

<p>Some Examples:</p>

<p>eg.1) Say we have (11001)<sub>2</sub>,
&gt; we know 11 = 3 then the number = ((3 x 2) x 2)x2+1 = 25</p>

<p>eg.2) (11110110)<sub>2</sub>
&gt; we know 1111 = 15 (i.e 2^4-1) , the number will be ((((15x2)x2+1)x2+1)x2) = 246</p>

<p>eg.3) Convert 211 to binary
&gt; we can think 211 = 255-44
&gt; The 255 = 2^8-1 , so 8 consecutive 1s, and we remove 44 i.e(32+8+4) from it ,
&gt; (11111111)<sub>2</sub> is 255, now we remove the 1s from 2^5 , 2^3, 2^2 s places and leave them with 0s
&gt; (11010011)<sub>2</sub> is 211</p>

<h2 id="thats-it">Thats it</h2>

<p>Thats pretty much it. These are just patterns , once you see them you can&#39;t unsee them.
Whether it&#39;s actually useful , I still don&#39;t know.</p>
]]></content:encoded>
      <author>Titas Dey</author>
      <guid>https://blogs.dgplug.org/read/a/qzhy2vrrf4</guid>
      <pubDate>Sat, 07 Mar 2026 00:42:38 +0000</pubDate>
    </item>
    <item>
      <title>Asymptotic Analysis : Big-Oh Notation</title>
      <link>https://blogs.dgplug.org/titas/asymptotic-analysis-big-oh-notation</link>
      <description>&lt;![CDATA[Been learning about asymptotic analysis.&#xA;&#xA;Definition: Asymptotic analysis is the study of the growth of an algorithm’s running time or space requirement as a function of the input size n, for large values of n, while ignoring constant factors and lower-order terms.&#xA;&#xA;In other words, we analyze how the resource consumption of an algorithm scales as the problem size becomes large.&#xA;&#xA;Time Complexity != Time taken by the algorithm to run&#xA;&#xA;Time complexity is a function f(n) that represents the number of elementary operations performed by an algorithm as a function of input size n ∈ ℕ.&#xA;&#xA;T(n) = number of primitive steps executed for input size n&#xA;&#xA;Asymptotic analysis is independent of&#xA;&#xA;  Hardware specifications&#xA;  Programming language&#xA;  Operating system and runtime environment&#xA;  Input distribution (for a fixed n)&#xA;&#xA;---&#xA;Big-Oh Notation (O-notation)&#xA;Definition: Let f(n) and g(n) be functions mapping positive integers to positive real numbers. We say that g(n) is O(f(n)) (read &#34;g of n is big-oh of f of n&#34;) if there exist positive constants c ∈ ℝ⁺ and n₀ ∈ ℕ such that:&#xA;&#xA;g(n) ≤ c·f(n) ∀ n ≥ n₀&#xA;&#xA;The function f(n) is called an asymptotic upper bound for g(n). Intuitively, this means that g(n) grows no faster than f(n), up to a constant multiplicative factor, for sufficiently large values of n.&#xA;&#xA;Visually , if we plot both g(n) and f(n) and can find some point n₀ in the input axis beyond which c·f(n) always stays above g(n). Then g(n) is O(f(n)).&#xA;i.e We use Big-Oh if we are concerned with the worst case performance of the algorithm&#xA;&#xA;eg:&#xA;&#xA;Say f(n) = 3n² + 5n + 10 , g(n) = n². g(n) = O(f(n)) &amp; f(n) = O(g(n))&#xA;&#xA;If we analyse this &#xA;&#xA;We need to find constants c ∈ ℝ⁺ and n₀ ∈ ℕ such that:&#xA;&#xA;f(n) ≤ c·g(n) ∀ n ≥ n₀&#xA;&#xA;Substituting:&#xA;3n² + 5n + 10 ≤ c·n²&#xA;&#xA;For n ≥ 1:&#xA;5n ≤ 5n²&#xA;10 ≤ 10n²&#xA;&#xA;Therefore:&#xA;3n² + 5n + 10 ≤ 3n² + 5n² + 10n² = 18n²&#xA;&#xA;Conclusion: Choose c = 18 and n₀ = 1. Then f(n) ≤ 18·g(n) ∀ n ≥ 1.&#xA;&#xA;Hence, f(n) = O(g(n)) or more specifically, f(n) = O(n²).&#xA;&#xA;Again &#xA;(n) ≤ c·f(n) ∀ n ≥ n₀&#xA;&#xA;Substituting:&#xA;n² ≤ c(3n² + 5n + 10)&#xA;&#xA;Since f(n) = 3n² + 5n + 10   3n² for all n ≥ 1, we have:&#xA;&#xA;n² ≤ 3n² + 5n + 10&#xA;&#xA;This is clearly true for all n ≥ 1.&#xA;&#xA;Conclusion: Choose c = 1 and n₀ = 1. Then g(n) ≤ 1·f(n) ∀ n ≥ 1.&#xA;&#xA;Hence, g(n) = O(f(n)).&#xA;&#xA;Big-Oh Represents a Set of Functions&#xA;&#xA;Say , some T(n) = n³ then   &#xA;3n² + 5n + 10 = O(T(n))..................i    &#xA;5n+7 = O(T(n)).........................ii     &#xA;log(n) = O(T(n))____iii  &#xA;&#xA;if we analytically approach eq(i),eq(ii),eq(iii). All 3 are True&#xA;But eq(i) != eq(ii) != eq(iii)&#xA;&#xA;When we write f(n) = O(g(n)), the &#34;=&#34; is not a true equality.&#xA;&#xA;More Precisely: O(g(n)) represents an infinite set of all functions that grow no faster than g(n). So f(n) = O(g(n)) really means f(n) ∈ O(g(n))&#xA;&#xA;Example: O(n²) is the set containing functions like:&#xA;n²&#xA;3n² + 5n + 10&#xA;n² + 100n&#xA;50n + 1000&#xA;5 (constant)&#xA;log n&#xA;&#xA;All these functions belong to the set O(n²) because they all grow no faster than n².&#xA;&#xA;When we write O(n²), we&#39;re saying that as the input size n becomes very large, the running time grows at most proportionally to n². The constant factors and lower-order terms become negligible in comparison to the dominant term, which is why we drop them in Big-Oh notation. For instance, an algorithm that takes 3n² + 5n + 10 operations is simply O(n²) because the n² term dominates as n approaches infinity.&#xA;&#xA;i.e: We simply ignore the lower order and constant terms when were trying to find the time complexity in Big-Oh&#xA;---&#xA;&#xA;Some Commonly Seen Cases &#xA;&#xA;O(1) - Constant Time: These operations take the same amount of time regardless of input size. Accessing an array element by index, performing arithmetic operations, and returning a value are all O(1) operations. No matter if our array has 10 elements or 10 million elements, accessing the element at index 5 takes the same time.  &#xA;&#xA;O(log n) - Logarithmic Time: Algorithms that repeatedly divide the problem space in half exhibit logarithmic complexity. Binary search is the classic example, where we eliminate half of the remaining elements with each comparison. As n doubles, the running time increases by only a constant amount.  &#xA;&#xA;O(n) - Linear Time: When we must examine every element exactly once, we have linear complexity. A simple loop that processes each element in an array demonstrates O(n) behavior. If we double the input size, the running time doubles as well.  &#xA;&#xA;O(n log n) - Linearithmic Time: Efficient sorting algorithms like merge sort and heap sort operate in O(n log n) time. This complexity arises when we perform a logarithmic number of linear operations or divide-and-conquer with linear merging.  &#xA;&#xA;O(n²) - Quadratic Time: Nested loops where each loop runs n times typically result in quadratic complexity. Simple sorting algorithms like bubble sort and selection sort fall into this category. Doubling the input size quadruples the running time.  &#xA;&#xA;O(n³) - Cubic Time: Triple-nested loops often produce cubic complexity. Matrix multiplication using the naive algorithm is a prime example.  &#xA;&#xA;O(2ⁿ) - Exponential Time: The recursive Fibonacci function is a classic example, where each call branches into two more calls. The running time doubles with each increment of n, making it impractical for even moderately sized inputs.  &#xA;&#xA;O(n!) - Factorial Time: Generating all permutations of n elements produces factorial complexity. For n = 10, that&#39;s 3,628,800 operations. Yes calculated that in my head,absolutely did not google.&#xA;&#xA;O(1) &lt; O(log n) &lt; O(n) &lt; O(n log n) &lt; O(n²) &lt; O(n³) &lt; O(2ⁿ) &lt; O(n!)&#xA;&#xA;---&#xA;&#xA;Analyzing Some Algorithms&#xA;&#xA;Example 1: Array Sum&#xA;&#xA;def arraysum(arr):&#xA;    total = 0&#xA;    for element in arr:&#xA;        total += element&#xA;    return total&#xA;&#xA;The loop runs once per element. Each iteration does constant work.&#xA;Time complexity: O(n).&#xA;&#xA;---&#xA;&#xA;Example 2: Finding Maximum Element&#xA;&#xA;def findmax(arr):&#xA;    if len(arr) == 0:&#xA;        return None&#xA;    maxval = arr[0]&#xA;    for i in range(1, len(arr)):&#xA;        if arr[i]   maxval:&#xA;            maxval = arr[i]&#xA;    return maxval&#xA;&#xA;Single pass through the array with constant-time operations per iteration.&#xA;Time complexity: O(n).&#xA;&#xA;---&#xA;&#xA;Example 3: Bubble Sort&#xA;&#xA;def bubblesort(arr):&#xA;    n = len(arr)&#xA;    for i in range(n):&#xA;        for j in range(n - i - 1):&#xA;            if arr[j]   arr[j + 1]:&#xA;                arr[j], arr[j + 1] = arr[j + 1], arr[j]&#xA;&#xA;Nested loops result in roughly n² comparisons.&#xA;Time complexity: O(n²).&#xA;&#xA;---&#xA;&#xA;Analyzing a Slightly More Complex Program&#xA;&#xA;Example 4: Binary Search&#xA;&#xA;def binary_search(arr, target):&#xA;    left = 0&#xA;    right = len(arr) - 1&#xA;    &#xA;    while left &lt;= right:&#xA;        mid = (left + right) // 2&#xA;        if arr[mid] == target:&#xA;            return mid&#xA;        elif arr[mid] &lt; target:&#xA;            left = mid + 1&#xA;        else:&#xA;            right = mid - 1&#xA;    return -1&#xA;Initially, the search space has size n. After each iteration:&#xA;1st iteration: n elements&#xA;2nd iteration: n/2 elements&#xA;3rd iteration: n/4 elements&#xA;kth iteration: n/2^(k-1) elements&#xA;&#xA;The loop continues until the search space is reduced to 1 element or becomes empty. We need to find k such that:&#xA;&#xA;n/2^(k-1) ≤ 1&#xA;&#xA;Solving for k:&#xA;n ≤ 2^(k-1)   &#xA;&#xA;log₂(n) ≤ k - 1   &#xA;  &#xA;k ≥ log₂(n) + 1&#xA;&#xA;Therefore, the loop executes at most ⌈log₂(n)⌉ + 1 times (ceiling of log₂(n) plus 1).&#xA;&#xA;Since each iteration performs O(1) operations (comparisons, assignments, arithmetic), the total time complexity is : T(n) = O(1) + O(log n)·O(1) + O(1) = O(log n) . &#xA;&#xA;i.e T(n) = O(log(n)) for Binary Search&#xA;&#xA;Conclusion:&#xA;Big-Oh gives an upper bound on how an algorithm scales as input size increases&#xA;We analyse for n → ∞&#xA;Constant terms and lower order terms are ignored&#xA;&#xA;print(&#34;Titas,Signing Out!&#34;)&#xA;---&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Been learning about asymptotic analysis.</p>

<p><strong>Definition</strong>: Asymptotic analysis is the study of the growth of an algorithm’s running time or space requirement as a function of the input size <strong>n</strong>, for large values of <strong>n</strong>, while ignoring constant factors and lower-order terms.</p>

<p>In other words, we analyze <strong>how the resource consumption of an algorithm scales as the problem size becomes large</strong>.</p>

<p><strong>Time Complexity != Time taken by the algorithm to run</strong></p>

<p>Time complexity is a function <strong>f(n)</strong> that represents the number of elementary operations performed by an algorithm as a function of input size <strong>n ∈ ℕ</strong>.</p>

<h4 id="t-n-number-of-primitive-steps-executed-for-input-size-n">T(n) = number of primitive steps executed for input size n</h4>
<ul><li><p><strong>Asymptotic analysis is independent of</strong></p>
<ul><li>Hardware specifications</li>
<li>Programming language</li>
<li>Operating system and runtime environment</li>
<li>Input distribution (for a fixed <strong>n</strong>)</li></ul></li></ul>

<hr>

<h2 id="big-oh-notation-o-notation">Big-Oh Notation (O-notation)</h2>

<p><strong>Definition:</strong> Let f(n) and g(n) be functions mapping positive integers to positive real numbers. We say that g(n) is O(f(n)) (read “g of n is big-oh of f of n”) if there exist positive constants c ∈ ℝ⁺ and n₀ ∈ ℕ such that:</p>

<p>g(n) ≤ c·f(n) ∀ n ≥ n₀</p>

<p>The function f(n) is called an asymptotic upper bound for g(n). Intuitively, this means that g(n) grows no faster than f(n), up to a constant multiplicative factor, for sufficiently large values of n.</p>

<p>Visually , if we plot both g(n) and f(n) and can find some point n₀ in the input axis beyond which c·f(n) always stays above g(n). Then g(n) is O(f(n)).
i.e We use Big-Oh if we are concerned with the <strong>worst case</strong> performance of the algorithm</p>

<p>eg:</p>

<p>Say f(n) = 3n² + 5n + 10 , g(n) = n². g(n) = O(f(n)) &amp; f(n) = O(g(n))</p>

<p>If we analyse this</p>

<p>We need to find constants c ∈ ℝ⁺ and n₀ ∈ ℕ such that:</p>

<p>f(n) ≤ c·g(n) ∀ n ≥ n₀</p>

<p>Substituting:
3n² + 5n + 10 ≤ c·n²</p>

<p>For n ≥ 1:
– 5n ≤ 5n²
– 10 ≤ 10n²</p>

<p>Therefore:
3n² + 5n + 10 ≤ 3n² + 5n² + 10n² = 18n²</p>

<p><strong>Conclusion:</strong> Choose c = 18 and n₀ = 1. Then f(n) ≤ 18·g(n) ∀ n ≥ 1.</p>

<p>Hence, f(n) = O(g(n)) or more specifically, f(n) = O(n²).</p>

<p>Again
(n) ≤ c·f(n) ∀ n ≥ n₀</p>

<p>Substituting:
n² ≤ c(3n² + 5n + 10)</p>

<p>Since f(n) = 3n² + 5n + 10 &gt; 3n² for all n ≥ 1, we have:</p>

<p>n² ≤ 3n² + 5n + 10</p>

<p>This is clearly true for all n ≥ 1.</p>

<p><strong>Conclusion:</strong> Choose c = 1 and n₀ = 1. Then g(n) ≤ 1·f(n) ∀ n ≥ 1.</p>

<p>Hence, g(n) = O(f(n)).</p>

<h2 id="big-oh-represents-a-set-of-functions">Big-Oh Represents a Set of Functions</h2>

<p>Say , some T(n) = n³ then<br>
3n² + 5n + 10 = O(T(n))..................i<br>
5n+7 = O(T(n)).........................ii<br>
log(n) = O(T(n))_____iii</p>

<p>if we analytically approach eq(i),eq(ii),eq(iii). All 3 are <strong>True</strong>
But eq(i) != eq(ii) != eq(iii)</p>

<p>When we write <strong>f(n) = O(g(n))</strong>, the <strong>”=”</strong> is <strong>not</strong> a true equality.</p>

<p><strong>More Precisely:</strong> O(g(n)) represents an <strong>infinite set</strong> of all functions that grow no faster than g(n). So <strong>f(n) = O(g(n))</strong> really means <strong>f(n) ∈ O(g(n))</strong></p>

<p><strong>Example:</strong> O(n²) is the set containing functions like:
– n²
– 3n² + 5n + 10
– n² + 100n
– 50n + 1000
– 5 (constant)
– log n</p>

<p>All these functions belong to the set O(n²) because they all grow no faster than n².</p>

<p>When we write O(n²), we&#39;re saying that as the input size n becomes very large, the running time grows at most proportionally to n². The constant factors and lower-order terms become negligible in comparison to the dominant term, which is why we drop them in Big-Oh notation. For instance, an algorithm that takes 3n² + 5n + 10 operations is simply O(n²) because the n² term dominates as n approaches infinity.</p>

<p>i.e: We simply ignore the lower order and constant terms when were trying to find the time complexity in Big-Oh</p>

<hr>

<h4 id="some-commonly-seen-cases">Some Commonly Seen Cases</h4>

<p><strong>O(1) – Constant Time</strong>: These operations take the same amount of time regardless of input size. Accessing an array element by index, performing arithmetic operations, and returning a value are all O(1) operations. No matter if our array has 10 elements or 10 million elements, accessing the element at index 5 takes the same time.</p>

<p><strong>O(log n) – Logarithmic Time</strong>: Algorithms that repeatedly divide the problem space in half exhibit logarithmic complexity. Binary search is the classic example, where we eliminate half of the remaining elements with each comparison. As n doubles, the running time increases by only a constant amount.</p>

<p><strong>O(n) – Linear Time</strong>: When we must examine every element exactly once, we have linear complexity. A simple loop that processes each element in an array demonstrates O(n) behavior. If we double the input size, the running time doubles as well.</p>

<p><strong>O(n log n) – Linearithmic Time</strong>: Efficient sorting algorithms like merge sort and heap sort operate in O(n log n) time. This complexity arises when we perform a logarithmic number of linear operations or divide-and-conquer with linear merging.</p>

<p><strong>O(n²) – Quadratic Time</strong>: Nested loops where each loop runs n times typically result in quadratic complexity. Simple sorting algorithms like bubble sort and selection sort fall into this category. Doubling the input size quadruples the running time.</p>

<p><strong>O(n³) – Cubic Time</strong>: Triple-nested loops often produce cubic complexity. Matrix multiplication using the naive algorithm is a prime example.</p>

<p><strong>O(2ⁿ) – Exponential Time</strong>: The recursive Fibonacci function is a classic example, where each call branches into two more calls. The running time doubles with each increment of n, making it impractical for even moderately sized inputs.</p>

<p><strong>O(n!) – Factorial Time</strong>: Generating all permutations of n elements produces factorial complexity. For n = 10, that&#39;s 3,628,800 operations. Yes calculated that in my head,absolutely did not google.</p>

<p><strong>O(1) &lt; O(log n) &lt; O(n) &lt; O(n log n) &lt; O(n²) &lt; O(n³) &lt; O(2ⁿ) &lt; O(n!)</strong></p>

<hr>

<h2 id="analyzing-some-algorithms">Analyzing Some Algorithms</h2>

<h3 id="example-1-array-sum">Example 1: Array Sum</h3>

<pre><code class="language-python">def array_sum(arr):
    total = 0
    for element in arr:
        total += element
    return total
</code></pre>

<p>The loop runs once per element. Each iteration does constant work.
<strong>Time complexity: O(n)</strong>.</p>

<hr>

<h3 id="example-2-finding-maximum-element">Example 2: Finding Maximum Element</h3>

<pre><code class="language-python">def find_max(arr):
    if len(arr) == 0:
        return None
    max_val = arr[0]
    for i in range(1, len(arr)):
        if arr[i] &gt; max_val:
            max_val = arr[i]
    return max_val
</code></pre>

<p>Single pass through the array with constant-time operations per iteration.
<strong>Time complexity: O(n)</strong>.</p>

<hr>

<h3 id="example-3-bubble-sort">Example 3: Bubble Sort</h3>

<pre><code class="language-python">def bubble_sort(arr):
    n = len(arr)
    for i in range(n):
        for j in range(n - i - 1):
            if arr[j] &gt; arr[j + 1]:
                arr[j], arr[j + 1] = arr[j + 1], arr[j]
</code></pre>

<p>Nested loops result in roughly n² comparisons.
<strong>Time complexity: O(n²)</strong>.</p>

<hr>

<h2 id="analyzing-a-slightly-more-complex-program">Analyzing a Slightly More Complex Program</h2>

<h3 id="example-4-binary-search">Example 4: Binary Search</h3>

<pre><code class="language-python">def binary_search(arr, target):
    left = 0
    right = len(arr) - 1
    
    while left &lt;= right:
        mid = (left + right) // 2
        if arr[mid] == target:
            return mid
        elif arr[mid] &lt; target:
            left = mid + 1
        else:
            right = mid - 1
    return -1
</code></pre>

<p>Initially, the search space has size n. After each iteration:
– 1st iteration: n elements
– 2nd iteration: n/2 elements
– 3rd iteration: n/4 elements
– kth iteration: n/2^(k-1) elements</p>

<p>The loop continues until the search space is reduced to 1 element or becomes empty. We need to find k such that:</p>

<p>n/2^(k-1) ≤ 1</p>

<p>Solving for k:
– n ≤ 2^(k-1)</p>
<ul><li><p>log₂(n) ≤ k – 1</p></li>

<li><p>k ≥ log₂(n) + 1</p></li></ul>

<p>Therefore, the loop executes at most <strong>⌈log₂(n)⌉ + 1</strong> times (ceiling of log₂(n) plus 1).</p>

<p>Since each iteration performs O(1) operations (comparisons, assignments, arithmetic), the total time complexity is : <strong>T(n) = O(1) + O(log n)·O(1) + O(1) = O(log n)</strong> .</p>

<p>i.e <strong>T(n) = O(log(n)) for Binary Search</strong></p>

<h3 id="conclusion">Conclusion:</h3>
<ul><li><strong>Big-Oh gives an upper bound on how an algorithm scales as input size increases</strong></li>
<li><strong>We analyse for n → ∞</strong></li>
<li><strong>Constant terms and lower order terms are ignored</strong></li></ul>

<pre><code class="language-python">print(&#34;Titas,Signing Out!&#34;)
</code></pre>

<hr>
]]></content:encoded>
      <author>Titas Dey</author>
      <guid>https://blogs.dgplug.org/read/a/i9nqy0271u</guid>
      <pubDate>Fri, 09 Jan 2026 19:59:56 +0000</pubDate>
    </item>
    <item>
      <title>Git Worktree</title>
      <link>https://blogs.dgplug.org/sandeepk/git-worktree</link>
      <description>&lt;![CDATA[A few days ago, during our office knowledge-sharing meeting, someone introduced the git worktree command. It lets you create a new branch parallel to your current working branch so you can start something new — or handle a hotfix — without stashing or committing your unfinished changes.&#xA;&#xA;It turned out to be incredibly useful. With git worktree, you can maintain multiple working directories linked to the same Git repository with almost no friction.&#xA;&#xA;---&#xA;&#xA;Why use worktrees?&#xA;&#xA;Imagine you&#39;re working on a long-running feature — say, an optimization — and suddenly you’re assigned an urgent production bug.&#xA;Typically, you would stash your changes or make a temporary commit, switch branches, fix the bug, then restore everything. It&#39;s annoying and error-prone.&#xA;&#xA;With worktrees, you can directly spin up a parallel working directory:&#xA;&#xA;git worktree add path&#xA;Example:&#xA;git worktree add ../hotfix&#xA;&#xA;This creates a new linked worktree, associated with your current repository, with its own metadata and branch checkout. Your original work remains untouched.&#xA;&#xA;---&#xA;&#xA;Removing a worktree&#xA;&#xA;Once you&#39;re done with the hotfix (or any task), removing the worktree is just as simple:&#xA;&#xA;git worktree remove path&#xA;&#xA;If you delete the directory manually, Git will eventually clean up its administrative files automatically (based on gc.worktreePruneExpire in git-config).&#xA;You can also remove stale entries explicitly:&#xA;&#xA;git worktree prune&#xA;&#xA;---&#xA;&#xA;Other useful worktree commands&#xA;&#xA;1. Create a throwaway worktree (detached HEAD)&#xA;&#xA;Perfect for quick experiments:&#xA;&#xA;git worktree add -d path&#xA;&#xA;2. Create a worktree for an existing branch&#xA;&#xA;git worktree add path branch&#xA;&#xA;This checks out the given branch into a new, isolated working directory.&#xA;&#xA;---&#xA;&#xA;Further reading&#xA;&#xA;To dive deeper into git worktree:&#xA;&#xA;Official docs: https://git-scm.com/docs/git-worktree&#xA;Or simply run:&#xA;&#xA;    git help worktree&#xA;  &#xA;&#xA;Cheers!&#xA;&#xA;#Git #TIL #Worktree]]&gt;</description>
      <content:encoded><![CDATA[<p>A few days ago, during our office knowledge-sharing meeting, someone introduced the <code>git worktree</code> command. It lets you create a new branch <em>parallel</em> to your current working branch so you can start something new — or handle a hotfix — <strong>without stashing or committing your unfinished changes</strong>.</p>

<p>It turned out to be incredibly useful. With <code>git worktree</code>, you can maintain multiple working directories linked to the same Git repository with almost no friction.</p>

<hr>

<h2 id="why-use-worktrees">Why use worktrees?</h2>

<p>Imagine you&#39;re working on a long-running feature — say, an optimization — and suddenly you’re assigned an urgent production bug.
Typically, you would stash your changes or make a temporary commit, switch branches, fix the bug, then restore everything. It&#39;s annoying and error-prone.</p>

<p>With worktrees, you can directly spin up a parallel working directory:</p>

<pre><code class="language-bash">git worktree add &lt;path&gt;
# Example:
git worktree add ../hotfix
</code></pre>

<p>This creates a <strong>new linked worktree</strong>, associated with your current repository, with its own metadata and branch checkout. Your original work remains untouched.</p>

<hr>

<h2 id="removing-a-worktree">Removing a worktree</h2>

<p>Once you&#39;re done with the hotfix (or any task), removing the worktree is just as simple:</p>

<pre><code class="language-bash">git worktree remove &lt;path&gt;
</code></pre>

<p>If you delete the directory manually, Git will eventually clean up its administrative files automatically (based on <code>gc.worktreePruneExpire</code> in <code>git-config</code>).
You can also remove stale entries explicitly:</p>

<pre><code class="language-bash">git worktree prune
</code></pre>

<hr>

<h2 id="other-useful-worktree-commands">Other useful worktree commands</h2>

<h3 id="1-create-a-throwaway-worktree-detached-head">1. Create a throwaway worktree (detached HEAD)</h3>

<p>Perfect for quick experiments:</p>

<pre><code class="language-bash">git worktree add -d &lt;path&gt;
</code></pre>

<h3 id="2-create-a-worktree-for-an-existing-branch">2. Create a worktree for an existing branch</h3>

<pre><code class="language-bash">git worktree add &lt;path&gt; &lt;branch&gt;
</code></pre>

<p>This checks out the given branch into a new, isolated working directory.</p>

<hr>

<h2 id="further-reading">Further reading</h2>

<p>To dive deeper into <code>git worktree</code>:</p>
<ul><li>Official docs: <a href="https://git-scm.com/docs/git-worktree" rel="nofollow">https://git-scm.com/docs/git-worktree</a></li>
<li>Or simply run:</li></ul>

<pre><code class="language-bash">  git help worktree
</code></pre>

<p>Cheers!</p>

<p>#Git #TIL #Worktree</p>
]]></content:encoded>
      <author>sandeepk</author>
      <guid>https://blogs.dgplug.org/read/a/jb3viye61k</guid>
      <pubDate>Sun, 30 Nov 2025 13:27:11 +0000</pubDate>
    </item>
    <item>
      <title>How to do polymorphism in C ?</title>
      <link>https://blogs.dgplug.org/titas/how-to-do-polymorphism-in-c</link>
      <description>&lt;![CDATA[Well the title is a clickbait,but it’s true in a limited sense.&#xA;&#xA;If you&#39;ve written some C code you&#39;ve probably used most of the features in C like structure,functions,pointers,arrays and perhaps even the preprocessor.&#xA;&#xA;However, I will talk about one of the lesser used features in C  - union&#xA;&#xA;---&#xA;&#xA;The Union&#xA;&#xA;A union allocates a single shared block of memory, large enough to hold its largest member (with some padding, depending on alignment).&#xA;Unlike a struct, which allocates distinct memory for each member, a union allows multiple members to occupy the same memory space.&#xA;&#xA;For example:&#xA;&#xA;includestdio.h&#xA;includestring.h&#xA;&#xA;struct xyz {&#xA;    int x;&#xA;    float y;&#xA;    char z[10];&#xA;};&#xA;&#xA;union tuv {&#xA;    int t;&#xA;    float u;&#xA;    char v[10];&#xA;};&#xA;&#xA;int main(void) {&#xA;    struct xyz steg;&#xA;    union tuv uneg;&#xA;&#xA;    printf(&#34;%d\n&#34;, sizeof(steg)); // O/P: 20 bytes (4 + 4 + 10 + 2 bytes padding)&#xA;    printf(&#34;%d\n&#34;, sizeof(uneg)); // O/P: 12 bytes (10 bytes for v + 2 bytes padding)&#xA;&#xA;    strcpy(&amp;uneg.v, &#34;HelloWorld&#34;);&#xA;&#xA;    printf(&#34;%s\n&#34;, uneg.v);  // O/P: HelloWorld &#xA;    printf(&#34;%f\n&#34;, uneg.u);  // O/P: 1143139122437582505939828736.000000&#xA;&#xA;    return 0;&#xA;}&#xA;&#xA;Here, both the integer, float, and character array occupy the same memory region.&#xA;When &#34;HelloWorld&#34; is copied into the character array v, reading that memory as a float outputs the string &#34;HelloWorld&#34; typecasted into float &#xA;a short essay on union.&#xA;&#xA;---&#xA;But why do we need union ? &#xA;Why to allocate memory for only the largest member and not all of them using struct ?&#xA;&#xA;A union is valuable when you want different interpretations of the same memory.&#xA;&#xA;---&#xA;&#xA;Example 1: Storing an IPv4 Address&#xA;&#xA;includestdio.h&#xA;&#xA;typedef union {&#xA;    unsigned int ipadd;&#xA;    unsigned char bytes[4];&#xA;} ipv4add;&#xA;&#xA;int main(void) {&#xA;    ipv4add myaddress = {0};&#xA;&#xA;    myaddress.bytes[0] = 127;&#xA;    myaddress.bytes[1] = 55;&#xA;    myaddress.bytes[2] = 115;&#xA;    myaddress.bytes[3] = 0;&#xA;&#xA;    printf(&#34;%x\n&#34;, myaddress.ipadd); // O/P: 73377f&#xA;    return 0;&#xA;}&#xA;&#xA;Explanation&#xA;&#xA;Using a union, we can store both the integer representation and the byte-wise representation of an IPv4 address within the same space.&#xA;This approach eliminates the need for explicit bit-shifting or manual conversions.&#xA;---&#xA;&#xA;Example 2: Unions in Embedded Programming&#xA;&#xA;Unions are widely used in embedded systems to represent hardware registers that can be accessed both as a whole and as individual fields.&#xA;&#xA;includestdio.h&#xA;&#xA;union HWRegister {&#xA;    struct { // annonymous structure&#xA;        unsigned char parity;&#xA;        unsigned char control;&#xA;        unsigned char stopbits;&#xA;        unsigned char direction;&#xA;    };&#xA;    unsigned int reg;&#xA;};&#xA;&#xA;int main(void) {&#xA;    union HWRegister gpioa;&#xA;&#xA;    gpioa.reg = 0x14424423;&#xA;    printf(&#34;%x\n&#34;, gpioa.stopbits); // O/P: 14&#xA;&#xA;    return 0;&#xA;}&#xA;&#xA;In this example, the same memory can be accessed as a single 32-bit register or through specific bit fields.&#xA;This design improves clarity while maintaining memory efficiency — a common requirement in low-level programming.&#xA;&#xA;---&#xA;&#xA;Example 3: A Glimpse of Polymorphism in C&#xA;&#xA;Now coming back to the title , we can do something similar to OOP in C: &#xA;&#xA;includestdio.h&#xA;&#xA;typedef enum {&#xA;    JSONSTR,&#xA;    JSONBYTE,&#xA;    JSONINT,&#xA;} jsontypet;&#xA;&#xA;define JSONMAXSTR 64&#xA;&#xA;typedef struct {&#xA;   jsontypet type;&#xA;   union {&#xA;       char str[JSONMAXSTR];&#xA;       char byte;&#xA;       int number;&#xA;   };&#xA;} jsont;&#xA;&#xA;void printJSON(jsont json) {&#xA;    switch (json-  type) {&#xA;        case JSONSTR:&#xA;            printf(&#34;%s\n&#34;, json-  str);&#xA;            break;&#xA;        case JSONBYTE:&#xA;            printf(&#34;%c\n&#34;, json-  byte);&#xA;            break;&#xA;        case JSONINT:&#xA;            printf(&#34;%d\n&#34;, json-  number);&#xA;            break;&#xA;    }&#xA;}&#xA;&#xA;int main(void) {&#xA;    jsont myJSON;&#xA;    myJSON.type = JSONINT;&#xA;    myJSON.number = 97;&#xA;&#xA;    printJSON(&amp;myJSON);&#xA;    return 0;&#xA;}&#xA;&#xA;Here, the structure jsont can hold one of several possible data types — a string, a single byte, or an integer.&#xA;The active type is determined at runtime using the type field.&#xA;&#xA;There are some issues in this , in C the types are not tightly enforced by the compiler* , so if we do  &#xA;&#xA;myJSON.type = JSONSTR;// // instead of JSONINT&#xA;myJSON.number = 97;&#xA;printJSON(&amp;myJSON); // O/P: a &#xA;&#xA;The output will be : a (the ascii charector of value 97)&#xA;&#xA;---&#xA;&#xA;And that&#39;s all.&#xA;print(&#34;Titas , signing out &#34;)&#xA;`]]&gt;</description>
      <content:encoded><![CDATA[<p>Well the title is a clickbait,but it’s true in a limited sense.</p>

<p>If you&#39;ve written some C code you&#39;ve probably used most of the features in C like <code>structure</code>,<code>functions</code>,<code>pointers</code>,<code>arrays</code> and perhaps even the <code>preprocessor</code>.</p>

<p>However, I will talk about one of the lesser used features in C  – <strong>union</strong></p>

<hr>

<h2 id="the-union">The Union</h2>

<p>A <code>union</code> allocates a single shared block of memory, large enough to hold its <strong>largest member</strong> (with some padding, depending on alignment).
Unlike a <code>struct</code>, which allocates distinct memory for each member, a <code>union</code> allows multiple members to occupy the same memory space.</p>

<p>For example:</p>

<pre><code class="language-c">#include&lt;stdio.h&gt;
#include&lt;string.h&gt;

struct xyz {
    int x;
    float y;
    char z[10];
};

union tuv {
    int t;
    float u;
    char v[10];
};

int main(void) {
    struct xyz st_eg;
    union tuv un_eg;

    printf(&#34;%d\n&#34;, sizeof(st_eg)); // O/P: 20 bytes (4 + 4 + 10 + 2 bytes padding)
    printf(&#34;%d\n&#34;, sizeof(un_eg)); // O/P: 12 bytes (10 bytes for v + 2 bytes padding)

    strcpy(&amp;un_eg.v, &#34;HelloWorld&#34;);

    printf(&#34;%s\n&#34;, un_eg.v);  // O/P: HelloWorld 
    printf(&#34;%f\n&#34;, un_eg.u);  // O/P: 1143139122437582505939828736.000000

    return 0;
}
</code></pre>

<p>Here, both the integer, float, and character array occupy the <strong>same memory region</strong>.
When <code>&#34;HelloWorld&#34;</code> is copied into the character array <code>v</code>, reading that memory as a float outputs the string <code>&#34;HelloWorld&#34;</code> typecasted into float
a short essay on <strong>union</strong>.</p>

<hr>
<ul><li><strong>But why do we need union ?</strong></li>
<li><strong>Why to allocate memory for only the largest member and not all of them using struct ?</strong></li></ul>

<p>A union is valuable when you want <strong>different interpretations of the same memory</strong>.</p>

<hr>

<h2 id="example-1-storing-an-ipv4-address">Example 1: Storing an IPv4 Address</h2>

<pre><code class="language-c">#include&lt;stdio.h&gt;

typedef union {
    unsigned int ip_add;
    unsigned char bytes[4];
} ipv4_add;

int main(void) {
    ipv4_add my_address = {0};

    my_address.bytes[0] = 127;
    my_address.bytes[1] = 55;
    my_address.bytes[2] = 115;
    my_address.bytes[3] = 0;

    printf(&#34;%x\n&#34;, my_address.ip_add); // O/P: 73377f
    return 0;
}
</code></pre>

<h3 id="explanation">Explanation</h3>

<p>Using a union, we can store both the <strong>integer representation</strong> and the <strong>byte-wise representation</strong> of an IPv4 address within the same space.
This approach eliminates the need for explicit bit-shifting or manual conversions.</p>

<hr>

<h2 id="example-2-unions-in-embedded-programming">Example 2: Unions in Embedded Programming</h2>

<p>Unions are widely used in embedded systems to represent <strong>hardware registers</strong> that can be accessed both as a whole and as individual fields.</p>

<pre><code class="language-c">#include&lt;stdio.h&gt;

union HWRegister {
    struct { // annonymous structure
        unsigned char parity;
        unsigned char control;
        unsigned char stopbits;
        unsigned char direction;
    };
    unsigned int reg;
};

int main(void) {
    union HWRegister gpioa;

    gpioa.reg = 0x14424423;
    printf(&#34;%x\n&#34;, gpioa.stopbits); // O/P: 14

    return 0;
}
</code></pre>

<p>In this example, the same memory can be accessed as a single 32-bit register or through specific bit fields.
This design improves clarity while maintaining memory efficiency — a common requirement in low-level programming.</p>

<hr>

<h2 id="example-3-a-glimpse-of-polymorphism-in-c">Example 3: A Glimpse of Polymorphism in C</h2>

<p>Now coming back to the title , we can do something similar to OOP in C:</p>

<pre><code class="language-c">#include&lt;stdio.h&gt;

typedef enum {
    JSON_STR,
    JSON_BYTE,
    JSON_INT,
} json_type_t;

#define JSON_MAX_STR 64

typedef struct {
   json_type_t type;
   union {
       char str[JSON_MAX_STR];
       char byte;
       int number;
   };
} json_t;

void printJSON(json_t *json) {
    switch (json-&gt;type) {
        case JSON_STR:
            printf(&#34;%s\n&#34;, json-&gt;str);
            break;
        case JSON_BYTE:
            printf(&#34;%c\n&#34;, json-&gt;byte);
            break;
        case JSON_INT:
            printf(&#34;%d\n&#34;, json-&gt;number);
            break;
    }
}

int main(void) {
    json_t myJSON;
    myJSON.type = JSON_INT;
    myJSON.number = 97;

    printJSON(&amp;myJSON);
    return 0;
}
</code></pre>

<p>Here, the structure <code>json_t</code> can hold one of several possible data types — a string, a single byte, or an integer.
The active type is determined at runtime using the <code>type</code> field.</p>

<p>There are some issues in this , in C the types are not <em>tightly enforced by the compiler</em> , so if we do</p>

<pre><code class="language-c">myJSON.type = JSON_STR;// // instead of JSON_INT
myJSON.number = 97;
printJSON(&amp;myJSON); // O/P: a 
</code></pre>
<ul><li>The output will be : a (the ascii charector of value 97)</li></ul>

<hr>

<p><strong>And that&#39;s all.</strong></p>

<pre><code class="language-python">print(&#34;Titas , signing out &#34;)
</code></pre>
]]></content:encoded>
      <author>Titas Dey</author>
      <guid>https://blogs.dgplug.org/read/a/fo762jkbt9</guid>
      <pubDate>Thu, 06 Nov 2025 14:31:29 +0000</pubDate>
    </item>
    <item>
      <title>Arrow Function vs Regular Function in JavaScript</title>
      <link>https://blogs.dgplug.org/titas/arrow-function-vs-regular-function-in-javascript</link>
      <description>&lt;![CDATA[Arrow Function vs Regular Function in JavaScript&#xA;&#xA;Yeah, everyone already knows the syntax is different. No need to waste time on that.&#xA;&#xA;Let’s look at what actually matters — how they behave differently.&#xA;&#xA;---&#xA;&#xA;1. arguments&#xA;&#xA;Regular functions come with this built-in thing called arguments object. Even if you don’t define any parameters, you can still access whatever got passed when the function was called.&#xA;&#xA;Arrow functions? Nope. No arguments object. Try using it, and it’ll just throw an error.&#xA;&#xA;Regular function:&#xA;function test() {&#xA;  console.log(arguments);&#xA;}&#xA;&#xA;test(1, &#34;hello world&#34;, true); &#xA;// o/p&#xA;// { &#39;0&#39;: 1, &#39;1&#39;: &#39;hello world&#39;, &#39;2&#39;: true }&#xA;Arrow function:&#xA;const test = () =  {&#xA;  console.log(arguments); &#xA;};&#xA;&#xA;test(1, &#34;hello world&#34;, true); // Throws ReferenceError&#xA;&#xA;2. return&#xA;&#xA;Arrow functions have implicit return but regular functions don&#39;t.&#xA;i.e We can return the result automatically if we write it in a single line , inside a parenthesis in arrow functions. Regular functions always require the return keyword.&#xA;&#xA;Regular function:&#xA;function add(a, b) {&#xA; const c = a + b;&#xA;}&#xA;&#xA;console.log(add(5, 10)); // o/p : undefined &#xA;Arrow function:&#xA;const add = (a, b) =  (a + b);&#xA;&#xA;console.log(add(5, 10)); // o/p : 15&#xA;&#xA;3. this&#xA;Arrow functions do not have their own this binding. Instead, they lexically inherit this from the surrounding (parent) scope at the time of definition. This means the value of this inside an arrow function is fixed and cannot be changed using .call(), .apply(), or .bind().&#xA;&#xA;Regular functions, on the other hand, have dynamic this binding — it depends on how the function is invoked. When called as a method, this refers to the object; when called standalone, this can be undefined (in strict mode) or refer to the global object (in non-strict mode).&#xA;&#xA;Because of this behavior, arrow functions are commonly used in cases where you want to preserve the outer this context, such as in callbacks or within class methods that rely on this from the class instance.&#xA;&#xA;Regular function :&#xA;const obj = {&#xA;  name: &#34;Titas&#34;,&#xA;  sayHi: function () {&#xA;    console.log(this.name);&#xA;  }&#xA;};&#xA;&#xA;obj.sayHi(); // o/p : Titas&#xA;Arrow function :&#xA;const obj = {&#xA;  name: &#34;Titas&#34;,&#xA;  sayHi: () =  {&#xA;    console.log(this.name);&#xA;  }&#xA;};&#xA;&#xA;obj.sayHi(); // o/p :  undefined&#xA;---&#xA;print(&#34;Titas signing out !&#34;)&#xA;`]]&gt;</description>
      <content:encoded><![CDATA[<h2 id="arrow-function-vs-regular-function-in-javascript">Arrow Function vs Regular Function in JavaScript</h2>

<p>Yeah, everyone already knows the syntax is different. No need to waste time on that.</p>

<p>Let’s look at what actually <em>matters</em> — how they behave differently.</p>

<hr>

<h3 id="1-arguments">1. <code>arguments</code></h3>

<p>Regular functions come with this built-in thing called <code>arguments</code> object. Even if you don’t define any parameters, you can still access whatever got passed when the function was called.</p>

<p>Arrow functions? Nope. No <code>arguments</code> object. Try using it, and it’ll just throw an error.</p>

<h4 id="regular-function">Regular function:</h4>

<pre><code class="language-javascript">function test() {
  console.log(arguments);
}

test(1, &#34;hello world&#34;, true); 
// o/p
// { &#39;0&#39;: 1, &#39;1&#39;: &#39;hello world&#39;, &#39;2&#39;: true }
</code></pre>

<h4 id="arrow-function">Arrow function:</h4>

<pre><code class="language-javascript">const test = () =&gt; {
  console.log(arguments); 
};

test(1, &#34;hello world&#34;, true); // Throws ReferenceError

</code></pre>

<h3 id="2-return">2. <code>return</code></h3>

<p>Arrow functions have implicit return but regular functions don&#39;t.
i.e We can return the result automatically if we write it in a single line , inside a parenthesis in arrow functions. Regular functions always require the <code>return</code> keyword.</p>

<h4 id="regular-function-1">Regular function:</h4>

<pre><code class="language-javascript">function add(a, b) {
 const c = a + b;
}

console.log(add(5, 10)); // o/p : undefined 
</code></pre>

<h4 id="arrow-function-1">Arrow function:</h4>

<pre><code class="language-javascript">const add = (a, b) =&gt; (a + b);

console.log(add(5, 10)); // o/p : 15
</code></pre>

<h3 id="3-this">3. <code>this</code></h3>

<p>Arrow functions do not have their own this binding. Instead, they lexically inherit this from the surrounding (parent) scope at the time of definition. This means the value of this inside an arrow function is fixed and cannot be changed using .call(), .apply(), or .bind().</p>

<p>Regular functions, on the other hand, have dynamic this binding — it depends on how the function is invoked. When called as a method, this refers to the object; when called standalone, this can be undefined (in strict mode) or refer to the global object (in non-strict mode).</p>

<p>Because of this behavior, arrow functions are commonly used in cases where you want to preserve the outer this context, such as in callbacks or within class methods that rely on this from the class instance.</p>

<h4 id="regular-function-2">Regular function :</h4>

<pre><code class="language-javascript">const obj = {
  name: &#34;Titas&#34;,
  sayHi: function () {
    console.log(this.name);
  }
};

obj.sayHi(); // o/p : Titas
</code></pre>

<h4 id="arrow-function-2">Arrow function :</h4>

<pre><code class="language-javascript">const obj = {
  name: &#34;Titas&#34;,
  sayHi: () =&gt; {
    console.log(this.name);
  }
};

obj.sayHi(); // o/p :  undefined
</code></pre>

<hr>

<pre><code class="language-python">print(&#34;Titas signing out !&#34;)
</code></pre>
]]></content:encoded>
      <author>Titas Dey</author>
      <guid>https://blogs.dgplug.org/read/a/fqpdzntwnl</guid>
      <pubDate>Wed, 23 Jul 2025 19:20:14 +0000</pubDate>
    </item>
    <item>
      <title>Debugging maxlocksper_transaction: A Journey into Pytest Parallelism</title>
      <link>https://blogs.dgplug.org/sandeepk/debugging-max_locks_per_transaction-a-journey-into-pytest-parallelism</link>
      <description>&lt;![CDATA[So I was fixing some slow tests, and whenever I ran them through the pytest command, I was greeted with the dreaded maxlockspertransaction error.&#xA;&#xA;My first instinct? Just crank up the maxlockspertransaction from 64 to 1024.&#xA;&#xA;But... that didn’t feel right. I recreate my DB frequently, which means I’d have to set that value again and again. It felt like a hacky workaround rather than a proper solution.&#xA;&#xA;Then, like any developer, I started digging around — first checking the Confluence page for dev docs to see if anyone else had faced this issue. No luck. Then I moved to Slack, and that’s where I found this command someone had shared:&#xA;&#xA;pytest -n=0&#xA;&#xA;This was new to me. So, like any sane dev in 2025, I asked ChatGPT what this was about. That’s how I came across pytest-xdist.&#xA;&#xA;What is pytest-xdist?&#xA;&#xA;  The pytest-xdist plugin extends pytest with new test execution modes — the most common one is distributing tests across multiple CPUs to speed up test execution.&#xA;&#xA;What does pytest-xdist do?&#xA;&#xA;  Runs tests in parallel using numprocesses workers (Python processes), which is a game changer when:&#xA;  - You have a large test suite  &#xA;  - Each test takes a significant amount of time  &#xA;  - Your tests are independent (i.e., no shared global state)&#xA;&#xA;---&#xA;&#xA;That’s pretty much it — I plugged in pytest -n=0 and boom, no more transaction locks errors.  &#xA;&#xA;Cheers!&#xA;&#xA;References&#xA;https://pytest-xdist.readthedocs.io/en/stable/&#xA;https://docs.pytest.org/en/stable/reference/reference.html&#xA;&#xA;#pytest #Python #chatgpt #debugging&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>So I was fixing some slow tests, and whenever I ran them through the <code>pytest</code> command, I was greeted with the dreaded <code>max_locks_per_transaction</code> error.</p>

<p>My first instinct? Just crank up the <code>max_locks_per_transaction</code> from 64 to 1024.</p>

<p>But... that didn’t feel right. I recreate my DB frequently, which means I’d have to set that value again and again. It felt like a hacky workaround rather than a proper solution.</p>

<p>Then, like any developer, I started digging around — first checking the Confluence page for dev docs to see if anyone else had faced this issue. No luck. Then I moved to Slack, and that’s where I found this command someone had shared:</p>

<pre><code class="language-bash">pytest -n=0
</code></pre>

<p>This was new to me. So, like any sane dev in 2025, I asked ChatGPT what this was about. That’s how I came across <code>pytest-xdist</code>.</p>

<h2 id="what-is-pytest-xdist">What is <code>pytest-xdist</code>?</h2>

<blockquote><p>The <code>pytest-xdist</code> plugin extends pytest with new test execution modes — the most common one is distributing tests across multiple CPUs to <strong>speed up test execution</strong>.</p></blockquote>

<h2 id="what-does-pytest-xdist-do">What does <code>pytest-xdist</code> do?</h2>

<blockquote><p>Runs tests in <strong>parallel</strong> using <code>&lt;numprocesses&gt;</code> workers (Python processes), which is a game changer when:
– You have a large test suite<br>
– Each test takes a significant amount of time<br>
– Your tests are independent (i.e., no shared global state)</p></blockquote>

<hr>

<p>That’s pretty much it — I plugged in <code>pytest -n=0</code> and boom, no more transaction locks errors.</p>

<p>Cheers!</p>

<p>References
– <a href="https://pytest-xdist.readthedocs.io/en/stable/" rel="nofollow">https://pytest-xdist.readthedocs.io/en/stable/</a>
– <a href="https://docs.pytest.org/en/stable/reference/reference.html" rel="nofollow">https://docs.pytest.org/en/stable/reference/reference.html</a></p>

<p>#pytest #Python #chatgpt #debugging</p>
]]></content:encoded>
      <author>sandeepk</author>
      <guid>https://blogs.dgplug.org/read/a/ne3agr5tsp</guid>
      <pubDate>Wed, 16 Jul 2025 17:07:59 +0000</pubDate>
    </item>
    <item>
      <title>I&#39;m cooked</title>
      <link>https://blogs.dgplug.org/titas/im-cooked</link>
      <description>&lt;![CDATA[The college is really gonna teach us Data Structures and Algorithms in C . And make me write 100 line codes in paper for lab manuals .]]&gt;</description>
      <content:encoded><![CDATA[<p>The college is really gonna teach us Data Structures and Algorithms in C . And make me write 100 line codes in paper for lab manuals .</p>
]]></content:encoded>
      <author>Titas Dey</author>
      <guid>https://blogs.dgplug.org/read/a/hgfrlza6n1</guid>
      <pubDate>Fri, 11 Jul 2025 19:19:48 +0000</pubDate>
    </item>
    <item>
      <title>ChatGPT and Images</title>
      <link>https://blogs.dgplug.org/sandeepk/chatgpt-and-images</link>
      <description>&lt;![CDATA[I’ve been working on a few side projects and using ChatGPT for ideation and brainstorming around ideas and features for the MVP. As part of this, I needed a logo for my app. Naturally, I turned to AI to help me generate one.&#xA;&#xA;However, I noticed that when generating images, ChatGPT doesn’t always follow the guidelines perfectly. Each time I asked for a new version, it would create a completely different image, which made it difficult to iterate or make small tweaks.&#xA;&#xA;But I found a better way.&#xA;&#xA;Instead of generating a brand new image every time, I first explained my app idea and the name. ChatGPT generated an image I liked.&#xA;&#xA;So I asked ChatGPT to generate the JSON for the image instead. I then manually tweaked the JSON file to adjust things exactly the way I wanted. When I asked ChatGPT to generate the image based on the updated JSON, it finally created the image as per my request — no random changes, just the specific adjustments I needed.&#xA;&#xA;Exploration Phase&#xA;&#xA;SplitX logo&#xA;&#xA;{&#xA;  &#34;image&#34;: {&#xA;    &#34;filename&#34;: &#34;splitXiconwithtext.png&#34;,&#xA;    &#34;backgroundcolor&#34;: &#34;black&#34;,&#xA;    &#34;elements&#34;: [&#xA;      {&#xA;        &#34;type&#34;: &#34;text&#34;,&#xA;        &#34;content&#34;: &#34;SplitX&#34;,&#xA;        &#34;fontstyle&#34;: &#34;bold&#34;,&#xA;        &#34;fontcolor&#34;: &#34;white&#34;,&#xA;        &#34;position&#34;: &#34;center&#34;,&#xA;        &#34;fontsize&#34;: &#34;large&#34;&#xA;      },&#xA;      {&#xA;        &#34;type&#34;: &#34;shape&#34;,&#xA;        &#34;shapetype&#34;: &#34;X&#34;,&#xA;        &#34;style&#34;: &#34;geometric split&#34;,&#xA;        &#34;colors&#34;: [&#xA;          {&#xA;            &#34;section&#34;: &#34;top-left&#34;,&#xA;            &#34;gradient&#34;: [&#34;#FF4E50&#34;, &#34;#F9D423&#34;]&#xA;          },&#xA;          {&#xA;            &#34;section&#34;: &#34;bottom-left&#34;,&#xA;            &#34;gradient&#34;: [&#34;#F9D423&#34;, &#34;#FC913A&#34;]&#xA;          },&#xA;          {&#xA;            &#34;section&#34;: &#34;top-right&#34;,&#xA;            &#34;gradient&#34;: [&#34;#24C6DC&#34;, &#34;#514A9D&#34;]&#xA;          },&#xA;          {&#xA;            &#34;section&#34;: &#34;bottom-right&#34;,&#xA;            &#34;gradient&#34;: [&#34;#514A9D&#34;, &#34;#E55D87&#34;]&#xA;          }&#xA;        ],&#xA;        &#34;position&#34;: &#34;center behind text&#34;,&#xA;        &#34;stylenotes&#34;: &#34;Each quadrant of the X has a distinct gradient, giving a modern and vibrant look. The X is split visually in the middle, aligning with the &#39;Split&#39; theme.&#34;&#xA;      }&#xA;    ]&#xA;  }&#xA;}&#xA;Final Design&#xA;&#xA;SplitX logo&#xA;Updated JSON&#xA;{&#xA;  &#34;image&#34;: {&#xA;    &#34;filename&#34;: &#34;splitXiconwithtext.png&#34;,&#xA;    &#34;backgroundcolor&#34;: &#34;transparent&#34;,&#xA;    &#34;elements&#34;: [&#xA;      {&#xA;        &#34;type&#34;: &#34;shape&#34;,&#xA;        &#34;shapetype&#34;: &#34;X&#34;,&#xA;        &#34;style&#34;: &#34;geometric split&#34;,&#xA;        &#34;colors&#34;: [&#xA;          {&#xA;            &#34;section&#34;: &#34;top-left&#34;,&#xA;            &#34;gradient&#34;: [&#xA;              &#34;#FF4E50&#34;,&#xA;              &#34;#F9D423&#34;&#xA;            ]&#xA;          },&#xA;          {&#xA;            &#34;section&#34;: &#34;bottom-left&#34;,&#xA;            &#34;gradient&#34;: [&#xA;              &#34;#F9D423&#34;,&#xA;              &#34;#FC913A&#34;&#xA;            ]&#xA;          },&#xA;          {&#xA;            &#34;section&#34;: &#34;top-right&#34;,&#xA;            &#34;gradient&#34;: [&#xA;              &#34;#24C6DC&#34;,&#xA;              &#34;#514A9D&#34;&#xA;            ]&#xA;          },&#xA;          {&#xA;            &#34;section&#34;: &#34;bottom-right&#34;,&#xA;            &#34;gradient&#34;: [&#xA;              &#34;#514A9D&#34;,&#xA;              &#34;#E55D87&#34;&#xA;            ]&#xA;          }&#xA;        ],&#xA;        &#34;position&#34;: &#34;center &#34;,&#xA;        &#34;stylenotes&#34;: &#34;Each quadrant of the X has a distinct gradient, giving a modern and vibrant look. The X is split visually in the middle, aligning with the &#39;Split&#39; theme.&#34;&#xA;      }&#xA;    ]&#xA;  }&#xA;}&#xA;&#xA;If you want to tweak or refine an image, first generate the JSON, make your changes there, and then ask ChatGPT to generate the image using your updated JSON. This gives you much more control over the final result.&#xA;&#xA;Cheers!&#xA;&#xA;P.S. Feel free to check out the app — it&#39;s live now at https://splitx.org/. Would love to hear what you think!]]&gt;</description>
      <content:encoded><![CDATA[<p>I’ve been working on a few side projects and using ChatGPT for ideation and brainstorming around ideas and features for the MVP. As part of this, I needed a logo for my app. Naturally, I turned to AI to help me generate one.</p>

<p>However, I noticed that when generating images, ChatGPT doesn’t always follow the guidelines perfectly. Each time I asked for a new version, it would create a completely different image, which made it difficult to iterate or make small tweaks.</p>

<p>But I found a better way.</p>

<p>Instead of generating a brand new image every time, I first explained my app idea and the name. ChatGPT generated an image I liked.</p>

<p>So I asked ChatGPT to generate the JSON for the image instead. I then manually tweaked the JSON file to adjust things exactly the way I wanted. When I asked ChatGPT to generate the image based on the updated JSON, it finally created the image as per my request — no random changes, just the specific adjustments I needed.</p>

<h3 id="exploration-phase">Exploration Phase</h3>

<p><img src="https://raw.githubusercontent.com/Skchoudhary/blog-asset/master/dgplug-blog/slpitX_icon_with_text.png" alt="SplitX logo"></p>

<pre><code class="language-json">{
  &#34;image&#34;: {
    &#34;file_name&#34;: &#34;splitX_icon_with_text.png&#34;,
    &#34;background_color&#34;: &#34;black&#34;,
    &#34;elements&#34;: [
      {
        &#34;type&#34;: &#34;text&#34;,
        &#34;content&#34;: &#34;SplitX&#34;,
        &#34;font_style&#34;: &#34;bold&#34;,
        &#34;font_color&#34;: &#34;white&#34;,
        &#34;position&#34;: &#34;center&#34;,
        &#34;font_size&#34;: &#34;large&#34;
      },
      {
        &#34;type&#34;: &#34;shape&#34;,
        &#34;shape_type&#34;: &#34;X&#34;,
        &#34;style&#34;: &#34;geometric split&#34;,
        &#34;colors&#34;: [
          {
            &#34;section&#34;: &#34;top-left&#34;,
            &#34;gradient&#34;: [&#34;#FF4E50&#34;, &#34;#F9D423&#34;]
          },
          {
            &#34;section&#34;: &#34;bottom-left&#34;,
            &#34;gradient&#34;: [&#34;#F9D423&#34;, &#34;#FC913A&#34;]
          },
          {
            &#34;section&#34;: &#34;top-right&#34;,
            &#34;gradient&#34;: [&#34;#24C6DC&#34;, &#34;#514A9D&#34;]
          },
          {
            &#34;section&#34;: &#34;bottom-right&#34;,
            &#34;gradient&#34;: [&#34;#514A9D&#34;, &#34;#E55D87&#34;]
          }
        ],
        &#34;position&#34;: &#34;center behind text&#34;,
        &#34;style_notes&#34;: &#34;Each quadrant of the X has a distinct gradient, giving a modern and vibrant look. The X is split visually in the middle, aligning with the &#39;Split&#39; theme.&#34;
      }
    ]
  }
}
</code></pre>

<h3 id="final-design">Final Design</h3>

<p><img src="https://raw.githubusercontent.com/Skchoudhary/blog-asset/master/dgplug-blog/ChatGPT%20Image%20Jul%201,%202025,%2011_07_23%20PM.png" alt="SplitX logo">
Updated JSON</p>

<pre><code class="language-json">{
  &#34;image&#34;: {
    &#34;file_name&#34;: &#34;splitX_icon_with_text.png&#34;,
    &#34;background_color&#34;: &#34;transparent&#34;,
    &#34;elements&#34;: [
      {
        &#34;type&#34;: &#34;shape&#34;,
        &#34;shape_type&#34;: &#34;X&#34;,
        &#34;style&#34;: &#34;geometric split&#34;,
        &#34;colors&#34;: [
          {
            &#34;section&#34;: &#34;top-left&#34;,
            &#34;gradient&#34;: [
              &#34;#FF4E50&#34;,
              &#34;#F9D423&#34;
            ]
          },
          {
            &#34;section&#34;: &#34;bottom-left&#34;,
            &#34;gradient&#34;: [
              &#34;#F9D423&#34;,
              &#34;#FC913A&#34;
            ]
          },
          {
            &#34;section&#34;: &#34;top-right&#34;,
            &#34;gradient&#34;: [
              &#34;#24C6DC&#34;,
              &#34;#514A9D&#34;
            ]
          },
          {
            &#34;section&#34;: &#34;bottom-right&#34;,
            &#34;gradient&#34;: [
              &#34;#514A9D&#34;,
              &#34;#E55D87&#34;
            ]
          }
        ],
        &#34;position&#34;: &#34;center &#34;,
        &#34;style_notes&#34;: &#34;Each quadrant of the X has a distinct gradient, giving a modern and vibrant look. The X is split visually in the middle, aligning with the &#39;Split&#39; theme.&#34;
      }
    ]
  }
}
</code></pre>

<p>If you want to tweak or refine an image, first generate the JSON, make your changes there, and then ask ChatGPT to generate the image using your updated JSON. This gives you much more control over the final result.</p>

<p>Cheers!</p>

<p>P.S. Feel free to check out the app — it&#39;s live now at <a href="https://splitx.org/" rel="nofollow">https://splitx.org/</a>. Would love to hear what you think!</p>
]]></content:encoded>
      <author>sandeepk</author>
      <guid>https://blogs.dgplug.org/read/a/6n53ehmr76</guid>
      <pubDate>Thu, 03 Jul 2025 13:28:47 +0000</pubDate>
    </item>
    <item>
      <title>Blog Questions Challenge 2025</title>
      <link>https://blogs.dgplug.org/sandeepk/blog-questions-challenge-2025</link>
      <description>&lt;![CDATA[1. Why did you make the blog in the first place?&#xA;This blog initially started as part of the summer training by DGPLUG, where the good folks emphasize the importance of blogging and encourage everyone to write—about anything! That motivation got me into the habit, and I’ve been blogging on and off ever since.&#xA;2. What platform are you using to manage your blog and why did you choose it?&#xA;I primarily write on WriteFreely, hosted by Kushal, who was kind enough to host an instance. I also occasionally write on my WordPress blog. So yeah, I have two blogs.&#xA;3. Have you blogged on other platforms before?&#xA;I started with WordPress because it was a simple and fast way to get started. Even now, I sometimes post there, but most of my recent posts have moved to the WriteFreely instance.&#xA;4. How do you write your posts?&#xA;I usually just sit down and write everything in one go. Followed by editing part—skimming through it once, making quick changes, and then hitting publish. &#xA;5. When do you feel most inspired to write?&#xA;Honestly, I don’t wait for inspiration. I write whenever I feel like it—sometimes in a diary, sometimes on my laptop. A few of those thoughts end up as blog posts, while the rest get lost in random notes and files.&#xA;6. Do you publish immediately after writing or do you let it simmer a bit as a draft?&#xA;It depends. After reading a few books and articles on writing, I started following a simple process: finish a draft in one sitting, come back to it later for editing, and then publish.&#xA;7. Your favorite post on your blog?&#xA;Ahh! This blog post on Google Cloud IAM is one I really like because people told me it was well-written! :)&#xA;8. Any future plans for your blog? Maybe a redesign, changing the tag system, etc.?&#xA;Nope! I like it as it is. Keeping it simple for now.&#xA;&#xA;A big thanks to Jason for mentioning me in the challenge! &#xA;&#xA;Cheers!]]&gt;</description>
      <content:encoded><![CDATA[<h2 id="1-why-did-you-make-the-blog-in-the-first-place">1. Why did you make the blog in the first place?</h2>

<p>This blog initially started as part of the summer training by DGPLUG, where the good folks emphasize the importance of blogging and encourage everyone to write—about anything! That motivation got me into the habit, and I’ve been blogging on and off ever since.</p>

<h2 id="2-what-platform-are-you-using-to-manage-your-blog-and-why-did-you-choose-it">2. What platform are you using to manage your blog and why did you choose it?</h2>

<p>I primarily write on WriteFreely, hosted by <a href="https://kushaldas.in/" rel="nofollow">Kushal</a>, who was kind enough to host an instance. I also occasionally write on my WordPress blog. So yeah, I have two blogs.</p>

<h2 id="3-have-you-blogged-on-other-platforms-before">3. Have you blogged on other platforms before?</h2>

<p>I started with WordPress because it was a simple and fast way to get started. Even now, I sometimes post there, but most of my recent posts have moved to the <a href="https://blogs.dgplug.org/" rel="nofollow">WriteFreely instance</a>.</p>

<h2 id="4-how-do-you-write-your-posts">4. How do you write your posts?</h2>

<p>I usually just sit down and write everything in one go. Followed by editing part—skimming through it once, making quick changes, and then hitting publish.</p>

<h2 id="5-when-do-you-feel-most-inspired-to-write">5. When do you feel most inspired to write?</h2>

<p>Honestly, I don’t wait for inspiration. I write whenever I feel like it—sometimes in a diary, sometimes on my laptop. A few of those thoughts end up as blog posts, while the rest get lost in random notes and files.</p>

<h2 id="6-do-you-publish-immediately-after-writing-or-do-you-let-it-simmer-a-bit-as-a-draft">6. Do you publish immediately after writing or do you let it simmer a bit as a draft?</h2>

<p>It depends. After reading a few books and articles on writing, I started following a simple process: finish a draft in one sitting, come back to it later for editing, and then publish.</p>

<h2 id="7-your-favorite-post-on-your-blog">7. Your favorite post on your blog?</h2>

<p>Ahh! This <a href="https://sandeepchoudharyme.wordpress.com/2019/07/08/google-cloud-iam-identity-and-access-management/" rel="nofollow">blog post</a> on Google Cloud IAM is one I really like because people told me it was well-written! :)</p>

<h2 id="8-any-future-plans-for-your-blog-maybe-a-redesign-changing-the-tag-system-etc">8. Any future plans for your blog? Maybe a redesign, changing the tag system, etc.?</h2>

<p>Nope! I like it as it is. Keeping it simple for now.</p>

<p>A big thanks to <a href="https://janusworx.com" rel="nofollow">Jason</a> for mentioning me in the <a href="https://janusworx.com/work/blog-questions-challenge-2025/" rel="nofollow">challenge</a>!</p>

<p>Cheers!</p>
]]></content:encoded>
      <author>sandeepk</author>
      <guid>https://blogs.dgplug.org/read/a/i21zlswowf</guid>
      <pubDate>Sat, 29 Mar 2025 05:32:42 +0000</pubDate>
    </item>
    <item>
      <title>✈️ Aero India 2025 Experience 🚀</title>
      <link>https://blogs.dgplug.org/mrinalraj/aero-india-2025-experience</link>
      <description>&lt;![CDATA[Hey there! 👋 Welcome to my personal insights from the incredible Aero India 2025 event held at Yelahanka Air Base, Bengaluru! 🇮🇳✨ Buckle up, and let’s dive into this high-flying adventure! 🛩️🔥&#xA;&#xA;---&#xA;&#xA;🌅 Early Bird Adventures&#xA;&#xA;Woke up super early ⏰ to beat the traffic towards Yelahanka ✨  &#xA;Quickly grabbed some breakfast 🥪☕ and rushed to the bus stop 🚌  &#xA;Took a connection via Hebbal ➡️ and then headed straight to Yelahanka Air Base 🚏🛫&#xA;&#xA;---&#xA;&#xA;👫 New Friends &amp; Quick Access&#xA;&#xA;Met some amazing people on the way 👋 — especially Shelja from HAL 👩‍🔧 who helped me get into the ADVA area swiftly 🔐💨  &#xA;Such warmth and camaraderie! ❤️&#xA;&#xA;---&#xA;&#xA;🪑 Perfect Spot for Viewing&#xA;&#xA;There were special seating arrangements 🎟️ with a direct view of the majestic birds in the sky 🛫🦅  &#xA;There was a major buzz around:&#xA;&#xA;🇷🇺 Su-57&#xA;🇺🇸 F-35&#xA;🇮🇳 Hansa-S performing jaw-dropping aerobatics 🔄🎯&#xA;&#xA;The sky was on 🔥 with excitement!&#xA;&#xA;---&#xA;&#xA;📅 How You Can Experience It Too!&#xA;&#xA;🗓️ Dates: 10th – 14th Feb 2025  &#xA;🎫 Single-Day Entry Passes Only&#xA;&#xA;💼 Business Pass&#xA;Access to: Exhibitions (IDEX), Seminars, and Air Show (ADVA)  &#xA;❌ Excludes invite-only events (like Raksha Mantri Dinner, CEO Meet)  &#xA;💸 Cost: ₹5000/day&#xA;&#xA;🎟️ ADVA Pass&#xA;Access to: Air Show and select exhibitions  &#xA;❌ May not include halls with foreign exhibitors (🇮🇱 Israel, 🇫🇷 Safran, 🇬🇧 Rolls-Royce, etc.)  &#xA;💸 Cost: ₹1000/day&#xA;&#xA;🧑‍🤝‍🧑 General Pass&#xA;Access to: ADVA + Exhibitions  &#xA;Only valid on: 4th &amp; 5th day of the event  &#xA;🚸 Expect it to be crowded  &#xA;💸 Cost: ₹2500/day&#xA;&#xA;---&#xA;&#xA;🎫 My Experience with the Business Pass&#xA;&#xA;Got myself a Business Pass 😎  &#xA;Went straight to ADVA after a thorough bag check 🧳🔍  &#xA;💡 Pro Tip: You can carry your own water bottle &amp; snacks (chips, etc.) 💦🍿&#xA;&#xA;By 11:45 AM, the air show was done 💥  &#xA;I dashed over to the Exhibition Hall 🏛️ where I saw:&#xA;&#xA;The mighty 🇮🇳 Kaveri Engine&#xA;Cutting-edge defense tech usually not open to public 👀📸&#xA;&#xA;And yes, photography was allowed! 📷✨&#xA;&#xA;---&#xA;&#xA;🎤 Tech Talks &amp; Seminars&#xA;&#xA;After a bit of a hunt 🧭 I found the Seminar Hall  &#xA;Was warmly welcomed 🤝 and walked into a room filled with:&#xA;&#xA;🪖 Top military generals&#xA;💼 Business leaders from GE, Rolls-Royce, Safran&#xA;&#xA;It was just wow — an incredible energy of innovation and strategy in the room! 🌐⚙️&#xA;&#xA;---&#xA;&#xA;🏁 Conclusion&#xA;&#xA;This was a once-in-a-lifetime event 💫  &#xA;I met brilliant minds 🧠, saw next-gen tech 🔧, and watched thrilling air stunts in real-time 🛩️💨&#xA;&#xA;Highly recommend not missing this epic celebration of India&#39;s aviation might 🇮🇳✈️&#xA;&#xA;---&#xA;&#xA;💬 Got questions or want to connect?  &#xA;📧 Reach me at: reach.mrinalraj@gmail.com  &#xA;Let the skies inspire you! 🌤️🇮🇳&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Hey there! 👋 Welcome to my personal insights from the incredible <strong>Aero India 2025</strong> event held at <strong>Yelahanka Air Base, Bengaluru</strong>! 🇮🇳✨ Buckle up, and let’s dive into this high-flying adventure! 🛩️🔥</p>

<hr>

<h2 id="early-bird-adventures">🌅 Early Bird Adventures</h2>

<p>Woke up <strong>super early</strong> ⏰ to <strong>beat the traffic</strong> towards Yelahanka ✨<br>
Quickly grabbed some breakfast 🥪☕ and rushed to the <strong>bus stop</strong> 🚌<br>
Took a connection via <strong>Hebbal</strong> ➡️ and then headed straight to <strong>Yelahanka Air Base</strong> 🚏🛫</p>

<hr>

<h2 id="new-friends-quick-access">👫 New Friends &amp; Quick Access</h2>

<p>Met some amazing people on the way 👋 — especially <strong>Shelja from HAL</strong> 👩‍🔧 who helped me <strong>get into the ADVA area swiftly</strong> 🔐💨<br>
Such warmth and camaraderie! ❤️</p>

<hr>

<h2 id="perfect-spot-for-viewing">🪑 Perfect Spot for Viewing</h2>

<p>There were <strong>special seating arrangements</strong> 🎟️ with a direct view of the <strong>majestic birds in the sky</strong> 🛫🦅<br>
There was a <strong>major buzz</strong> around:</p>
<ul><li>🇷🇺 <strong>Su-57</strong></li>
<li>🇺🇸 <strong>F-35</strong></li>
<li>🇮🇳 <strong>Hansa-S</strong> performing jaw-dropping <strong>aerobatics</strong> 🔄🎯</li></ul>

<p>The sky was on 🔥 with excitement!</p>

<hr>

<h2 id="how-you-can-experience-it-too">📅 How <em>You</em> Can Experience It Too!</h2>

<p>🗓️ <strong>Dates</strong>: 10th – 14th Feb 2025<br>
🎫 <strong>Single-Day Entry Passes Only</strong></p>

<h3 id="business-pass">💼 Business Pass</h3>
<ul><li>Access to: <strong>Exhibitions (IDEX)</strong>, <strong>Seminars</strong>, and <strong>Air Show (ADVA)</strong><br></li>
<li>❌ Excludes invite-only events (like <strong>Raksha Mantri Dinner</strong>, <strong>CEO Meet</strong>)<br></li>
<li>💸 <strong>Cost</strong>: ₹5000/day</li></ul>

<h3 id="adva-pass">🎟️ ADVA Pass</h3>
<ul><li>Access to: <strong>Air Show</strong> and <strong>select exhibitions</strong><br></li>
<li>❌ May <em>not</em> include halls with foreign exhibitors (🇮🇱 Israel, 🇫🇷 Safran, 🇬🇧 Rolls-Royce, etc.)<br></li>
<li>💸 <strong>Cost</strong>: ₹1000/day</li></ul>

<h3 id="general-pass">🧑‍🤝‍🧑 General Pass</h3>
<ul><li>Access to: <strong>ADVA + Exhibitions</strong><br></li>
<li>Only valid on: <strong>4th &amp; 5th day</strong> of the event<br></li>
<li>🚸 Expect it to be <strong>crowded</strong><br></li>
<li>💸 <strong>Cost</strong>: ₹2500/day</li></ul>

<hr>

<h2 id="my-experience-with-the-business-pass">🎫 My Experience with the Business Pass</h2>

<p>Got myself a <strong>Business Pass</strong> 😎<br>
Went straight to <strong>ADVA</strong> after a thorough <strong>bag check</strong> 🧳🔍<br>
💡 <strong>Pro Tip</strong>: You <em>can</em> carry your <strong>own water bottle &amp; snacks</strong> (chips, etc.) 💦🍿</p>

<p>By <strong>11:45 AM</strong>, the <strong>air show was done</strong> 💥<br>
I dashed over to the <strong>Exhibition Hall</strong> 🏛️ where I saw:</p>
<ul><li>The mighty 🇮🇳 <strong>Kaveri Engine</strong></li>
<li>Cutting-edge defense tech usually not open to public 👀📸</li></ul>

<p>And yes, <strong>photography was allowed</strong>! 📷✨</p>

<hr>

<h2 id="tech-talks-seminars">🎤 Tech Talks &amp; Seminars</h2>

<p>After a bit of a hunt 🧭 I found the <strong>Seminar Hall</strong><br>
Was warmly welcomed 🤝 and walked into a room filled with:</p>
<ul><li>🪖 <strong>Top military generals</strong></li>
<li>💼 <strong>Business leaders from GE, Rolls-Royce, Safran</strong></li></ul>

<p>It was just <strong>wow</strong> — an incredible energy of innovation and strategy in the room! 🌐⚙️</p>

<hr>

<h2 id="conclusion">🏁 Conclusion</h2>

<p>This was a <strong>once-in-a-lifetime event</strong> 💫<br>
I met brilliant minds 🧠, saw next-gen tech 🔧, and watched <strong>thrilling air stunts</strong> in real-time 🛩️💨</p>

<p>Highly recommend <strong>not missing</strong> this epic celebration of India&#39;s aviation might 🇮🇳✈️</p>

<hr>

<p><strong>💬 Got questions or want to connect?</strong><br>
📧 Reach me at: <strong>reach.mrinalraj@gmail.com</strong><br>
Let the skies inspire you! 🌤️🇮🇳</p>
]]></content:encoded>
      <author>mrinalraj</author>
      <guid>https://blogs.dgplug.org/read/a/ytikzyhba8</guid>
      <pubDate>Tue, 11 Feb 2025 09:15:35 +0000</pubDate>
    </item>
    <item>
      <title>How to get Free URL for your ever changing Router&#39;s Public IP?</title>
      <link>https://blogs.dgplug.org/mrinalraj/how-to-get-free-url-for-your-ever-changing-routers-public-ip</link>
      <description>&lt;![CDATA[Scenario&#xA;Folks! Have you ever wondered how to create a URL that always points to your router, even when its public IP address changes? It might sound complex and costly, but it&#39;s actually free!&#xA;&#xA;Concept&#xA;This involves setting up Dynamic DNS (DDNS).&#xA;&#xA;What you need&#xA;A Wi-Fi Router supporting NO-IP as DDNS&#xA;An account on NO-IP website&#xA;&#xA;Steps for creating hostname in NO IP:&#xA;Login to NO-IP website. Make sure to avoid use  of special character in the password.&#xA;Create a hostname.&#xA;We are Done!!!&#xA;&#xA;Steps for configuring DDNS in router:&#xA;Login to your router with credentials.&#xA;Navigate to DDNS which would possibly under Internet tab.&#xA;Configuring DDNS.&#xA;3.1 Keep WAN Connection as &#39;auto&#39;.&#xA;3.2 Provider: &#39;No-IP&#39;&#xA;3.3 Username: Email ID of NO IP account&#xA;3.4 Password: Password of NO IP account&#xA;3.5 Hostname: Give the newly created hostname&#xA;We are Done!!!&#xA;&#xA;Testing&#xA;Reboot your router and verify if NO IP website is showing the recent router&#39;s public IP.&#xA;&#xA;Result &#xA;Now every time your router public IP changes it would reflect the recent IP on the website. &#xA;&#xA;Usage&#xA;NO-IP provides a free DDNS hostname that can be used in projects instead of the router&#39;s public IP address. Simply confirm the renewal email after 30 days.&#xA;&#xA;Thank you !!!&#xA;Follow Mrinal&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<h3 id="scenario">Scenario</h3>

<p>Folks! Have you ever wondered how to create a URL that always points to your router, even when its public IP address changes? It might sound complex and costly, but it&#39;s actually free!</p>

<h3 id="concept">Concept</h3>

<p>This involves setting up Dynamic DNS (DDNS).</p>

<h3 id="what-you-need">What you need</h3>
<ol><li>A Wi-Fi Router supporting NO-IP as DDNS</li>
<li>An account on NO-IP website</li></ol>

<h3 id="steps-for-creating-hostname-in-no-ip">Steps for creating hostname in NO IP:</h3>
<ol><li>Login to <a href="https://www.noip.com/" rel="nofollow">NO-IP website</a>. Make sure to avoid use  of special character in the password.</li>
<li>Create a hostname.</li>
<li>We are Done!!!</li></ol>

<h3 id="steps-for-configuring-ddns-in-router">Steps for configuring DDNS in router:</h3>
<ol><li>Login to your router with credentials.</li>
<li>Navigate to DDNS which would possibly under <strong>Internet</strong> tab.</li>
<li>Configuring DDNS.
3.1 Keep WAN Connection as &#39;auto&#39;.
3.2 Provider: &#39;No-IP&#39;
3.3 Username: 
3.4 Password: 
3.5 Hostname: Give the newly created hostname</li>
<li>We are Done!!!</li></ol>

<h3 id="testing">Testing</h3>

<p>Reboot your router and verify if NO IP website is showing the recent router&#39;s public IP.</p>

<h3 id="result">Result</h3>

<p>Now every time your router public IP changes it would reflect the recent IP on the website.</p>

<h3 id="usage">Usage</h3>

<p>NO-IP provides a free DDNS hostname that can be used in projects instead of the router&#39;s public IP address. Simply confirm the renewal email after 30 days.</p>

<p>Thank you !!!
Follow <a href="https://www.linkedin.com/in/mrinal-raj/" rel="nofollow">Mrinal</a></p>
]]></content:encoded>
      <author>mrinalraj</author>
      <guid>https://blogs.dgplug.org/read/a/zk124klr3q</guid>
      <pubDate>Fri, 22 Mar 2024 06:24:42 +0000</pubDate>
    </item>
    <item>
      <title>You won&#39;t believe - The Port Forwarding concept</title>
      <link>https://blogs.dgplug.org/mrinalraj/you-wont-believe-the-port-forwarding-concept</link>
      <description>&lt;![CDATA[Scenario&#xA;Imagine wanting to stream video from a device behind your home router to your personal phone over the internet. This may sound like a complex task, but with port forwarding, it&#39;s simpler than you think.&#xA;&#xA;What you need:&#xA;A Wi-Fi Router &#xA;A computer displaying the video feed connected to the Wi-Fi router&#xA;A VNC viewer on your remote mobile device&#xA;&#xA;The Solution:&#xA;Port forwarding is the secret sauce that makes this setup seamless. Here&#39;s how you can do it:&#xA;&#xA;Steps:&#xA;&#xA;Router -  Computer -  Display&#xA;|&#xA;Internet -  Mobile -  VNC&#xA;&#xA;Lets Visualize the network diagram as above.&#xA;Be physically near your router.&#xA;Login your Wi-Fi router with credentials.&#xA;Navigate to Port Forwarding section. It must be in the Security section.&#xA;Set the Port forwarding rules&#xA;5.1. Service Name: Give the port forwarding rule a descriptive name.&#xA;5.2. Port Range: Specify the range of ports you want to forward (e.g., 5900-&#xA;5901 for a single port). &#xA;5.3. Local IP Address: Enter the IP address of the device on your local network &#xA;that you want to forward the ports to. Refer my previous post on How to make a connected device static.&#xA;5.4. Protocol: Select the protocol for the port forwarding rule (TCP, UDP, or both). &#xA;5.5 Keep WAN HOST IP as 0.0.0.0&#xA;&#xA;We are done here!!! See its that simple. &#xA;Lets now test it over is my port open? website.&#xA;&#xA;On Personal Mobile over Internet&#xA;Install VNC over mobile phone&#xA;Enter the router public IP followed by port number&#xA;eg. 24.57.121.123:5900&#xA;Suppose you don&#39;t have a router public IP address handy &#xA;you can get it from what&#39;s my IP address? website.&#xA;Above IP means that in the router public IP, connect to device at port 5900&#xA;Enter credentials and we are done!!!&#xA;&#xA;Limitation&#xA;Since your router IP changes after reboot. Refer my previous post on How to get free url for Router&#39;s public IPs&#xA;If the local device streaming feed is not static. It me loose the IP after device restart. Making device static is better solution. Refer my previous post on How to make a connected device static.&#xA;&#xA;Thank you !!!&#xA;Follow Mrinal&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<h3 id="scenario">Scenario</h3>

<p>Imagine wanting to stream video from a device behind your home router to your personal phone over the internet. This may sound like a complex task, but with port forwarding, it&#39;s simpler than you think.</p>

<h3 id="what-you-need">What you need:</h3>
<ol><li>A Wi-Fi Router</li>
<li>A computer displaying the video feed connected to the Wi-Fi router</li>
<li>A VNC viewer on your remote mobile device</li></ol>

<h3 id="the-solution">The Solution:</h3>

<p>Port forwarding is the secret sauce that makes this setup seamless. Here&#39;s how you can do it:</p>

<h3 id="steps">Steps:</h3>

<p>Router –&gt; Computer –&gt; Display
|
Internet –&gt; Mobile –&gt; VNC</p>
<ol><li>Lets Visualize the network diagram as above.</li>
<li>Be physically near your router.</li>
<li>Login your Wi-Fi router with credentials.</li>
<li>Navigate to Port Forwarding section. It must be in the Security section.</li>
<li>Set the Port forwarding rules
5.1. Service Name: Give the port forwarding rule a descriptive name.
5.2. Port Range: Specify the range of ports you want to forward (e.g., 5900-
5901 for a single port).
5.3. Local IP Address: Enter the IP address of the device on your local network
that you want to forward the ports to. Refer my previous post on <a href="https://blogs.dgplug.org/mrinalraj/how-to-make-your-ip-static" rel="nofollow">How to make a connected device static</a>.
5.4. Protocol: Select the protocol for the port forwarding rule (TCP, UDP, or both).
5.5 Keep WAN HOST IP as 0.0.0.0</li></ol>

<p>We are done here!!! See its that simple.
Lets now test it over <a href="https://ismyportopen.com/" rel="nofollow">is my port open?</a> website.</p>

<h3 id="on-personal-mobile-over-internet">On Personal Mobile over Internet</h3>
<ol><li>Install VNC over mobile phone</li>
<li>Enter the router public IP followed by port number
eg. 24.57.121.123:5900</li>
<li>Suppose you don&#39;t have a router public IP address handy
you can get it from <a href="https://whatismyipaddress.com/" rel="nofollow">what&#39;s my IP address?</a> website.</li>
<li>Above IP means that in the router public IP, connect to device at port 5900</li>
<li>Enter credentials and we are done!!!</li></ol>

<h1 id="limitation">Limitation</h1>
<ol><li>Since your router IP changes after reboot. Refer my previous post on <a href="https://blogs.dgplug.org/mrinalraj/how-to-get-free-url-for-your-ever-changing-routers-public-ip" rel="nofollow">How to get free url for Router&#39;s public IPs</a></li>
<li>If the local device streaming feed is not static. It me loose the IP after device restart. Making device static is better solution. Refer my previous post on <a href="https://blogs.dgplug.org/mrinalraj/how-to-make-your-ip-static" rel="nofollow">How to make a connected device static</a>.</li></ol>

<p>Thank you !!!
Follow <a href="https://www.linkedin.com/in/mrinal-raj/" rel="nofollow">Mrinal</a></p>
]]></content:encoded>
      <author>mrinalraj</author>
      <guid>https://blogs.dgplug.org/read/a/99iybnjkdb</guid>
      <pubDate>Thu, 21 Mar 2024 15:33:00 +0000</pubDate>
    </item>
    <item>
      <title>How to Set a Static IP for Your Python Project</title>
      <link>https://blogs.dgplug.org/mrinalraj/how-to-make-your-ip-static</link>
      <description>&lt;![CDATA[Scenario&#xA;I recently needed to establish a static IP for my Python project to facilitate SSH access. The issue I faced was that DHCP kept assigning a new IP every time my system rebooted.&#xA;&#xA;I discovered that we can set the IP address to be static, and the steps for doing so are outlined below:&#xA;&#xA;About:&#xA;dhcpcd.conf: &#xA;Location: /etc/dhcpcd.conf&#xA;Usage: DHCP client daemon is used towards the client side to configure the interfaces. &#xA;&#xA;while &#xA;dhcpd.conf &#xA;Location: /etc/dhcp/dhcpd.conf&#xA;Usage: It acts as server for dynamically assigning IPs to devices in the network&#xA;Step 0: Setup dhcpcd:&#xA;Install:&#xA; Enable: &#xA;sudo systemctl start dhcpcd Verify: &#xA;Step 1: Open the dhcpcd.conf file&#xA;&#xA;If your project uses Wi-Fi, proceed with the following steps; otherwise, replace the interface name accordingly.&#xA;static ipaddress=yourdesiredstaticip/24&#xA;static routers=yourrouterip&#xA;static domainnameservers=yourdnsserveripor &#xA;static ipaddress=yourdesiredstaticip/24&#xA;static routers=192.168.0.1&#xA;static domainnameservers=192.168.0.1 8.8.8.8&#xA;&#xA;Replace &#34;your\desired\static\ip&#34;, &#34;your\router\ip&#34;, and &#34;your\dns\server\_ip&#34; with the appropriate values for your network. Ensure you choose an IP address that is not already in use on your network.&#xA;&#xA;How to get router ip: Refer whats my ip address?&#xA;How to get the dns server: On terminal do &#xA;Note: you need to have package &#39;dnsutils&#39; installed. (&#xA;Step 2: Restart the dhcp service&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<h2 id="scenario">Scenario</h2>

<p>I recently needed to establish a static IP for my Python project to facilitate SSH access. The issue I faced was that DHCP kept assigning a new IP every time my system rebooted.</p>

<p>I discovered that we can set the IP address to be static, and the steps for doing so are outlined below:</p>

<h2 id="about">About:</h2>

<h3 id="dhcpcd-conf">dhcpcd.conf:</h3>

<p>Location: /etc/dhcpcd.conf
Usage: DHCP client daemon is used towards the client side to configure the interfaces.</p>

<p>while</p>

<h3 id="dhcpd-conf">dhcpd.conf</h3>

<p>Location: /etc/dhcp/dhcpd.conf
Usage: It acts as server for dynamically assigning IPs to devices in the network</p>

<h2 id="step-0-setup-dhcpcd">Step 0: Setup dhcpcd:</h2>

<p>Install:
 <code>sudo apt-get install dhcpcd</code>
Enable:
<code>sudo systemctl enable dhcpcd
sudo systemctl start dhcpcd</code>
Verify:
<code>sudo systemctl status dhcpcd</code></p>

<h2 id="step-1-open-the-dhcpcd-conf-file">Step 1: Open the dhcpcd.conf file</h2>

<p><code>sudo nano /etc/dhcpcd.conf</code></p>

<p>If your project uses Wi-Fi, proceed with the following steps; otherwise, replace the interface name accordingly.
<code>interface wlan0
static ip_address=your_desired_static_ip/24
static routers=your_router_ip
static domain_name_servers=your_dns_server_ip</code>
or
<code>interface wlan0
static ip_address=your_desired_static_ip/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8</code></p>

<p>Replace “your_desired_static_ip”, “your_router_ip”, and “your_dns_server_ip” with the appropriate values for your network. Ensure you choose an IP address that is not already in use on your network.</p>

<h4 id="how-to-get-router-ip-refer-whats-my-ip-address-https-whatismyipaddress-com">How to get router ip: Refer <a href="https://whatismyipaddress.com/" rel="nofollow">whats my ip address?</a></h4>

<h4 id="how-to-get-the-dns-server-on-terminal-do-nslookup-google-com">How to get the dns server: On terminal do <code>nslookup google.com</code></h4>

<p>Note: you need to have package &#39;dnsutils&#39; installed. (<code>sudo apt-get install dnsutils</code>)</p>

<h2 id="step-2-restart-the-dhcp-service">Step 2: Restart the dhcp service</h2>

<p><code>sudo service dhcpcd restart</code> or do <code>sudo reboot</code></p>
]]></content:encoded>
      <author>mrinalraj</author>
      <guid>https://blogs.dgplug.org/read/a/w584cojmr8</guid>
      <pubDate>Wed, 31 Jan 2024 05:52:38 +0000</pubDate>
    </item>
    <item>
      <title>How to Initiate a Program Automatically Upon System Startup?</title>
      <link>https://blogs.dgplug.org/mrinalraj/how-to-initiate-a-program-automatically-upon-system-startup</link>
      <description>&lt;![CDATA[Scenario&#xA;I recently wanted my Python program to execute right after the system boots up. I discovered several options to achieve this, eliminating the need for manual intervention to run the program.&#xA;&#xA;Option 1: Editing through Crontab&#xA;Open a terminal with elevated privileges: Edit the crontab configuration: Add the following command to start the Python program (assuming you want to run it on a Raspberry Pi terminal):&#xA;   &#xA;Option 2: Editing through services using systemd&#xA;Create a script, name it as &#34;myscript.sh&#34;&#xA;Make the script executable: Navigate to the systemd directory: Create a service file named &#34;myscript.service&#34; inside the systemd directory. &#xA;And below lines using &#xA;Description=My Script&#xA;&#xA;[Service]&#xA;ExecStart=/path/to/myscript.sh&#xA;WorkingDirectory=/path/to/&#xA;StandardOutput=inherit&#xA;StandardError=inherit&#xA;Restart=always&#xA;User=replace_username&#xA;&#xA;[Install]&#xA;WantedBy=multi-user.target&#xA;Reload systemd: Enable the service: Start the service: To check the service status:&#xA;&#xA;Option 3: Autostart using lxsession&#xA;Edit the autostart configuration file: Add the following line to automatically start the Python script: Save the file and initiate a system reboot:  ]]&gt;</description>
      <content:encoded><![CDATA[<h2 id="scenario">Scenario</h2>

<p>I recently wanted my Python program to execute right after the system boots up. I discovered several options to achieve this, eliminating the need for manual intervention to run the program.</p>

<h3 id="option-1-editing-through-crontab">Option 1: Editing through Crontab</h3>
<ol><li>Open a terminal with elevated privileges: <code>sudo su -</code></li>
<li>Edit the crontab configuration: <code>crontab -e</code></li>
<li>Add the following command to start the Python program (assuming you want to run it on a Raspberry Pi terminal):
```bash</li>
<li><code>@reboot /usr/bin/python3 /path/to/your/script.py</code></li></ol>

<h2 id="option-2-editing-through-services-using-systemd">Option 2: Editing through services using systemd</h2>
<ul><li>Create a script, name it as “myscript.sh”</li>
<li>Make the script executable: <code>chmod +x myscript.sh</code></li>
<li>Navigate to the systemd directory: <code>cd /etc/systemd/system/</code></li>
<li>Create a service file named “myscript.service” inside the systemd directory.</li>
<li>And below lines using <code>nano myscript.sh</code></li></ul>

<pre><code class="language-[Unit]">Description=My Script

[Service]
ExecStart=/path/to/myscript.sh
WorkingDirectory=/path/to/
StandardOutput=inherit
StandardError=inherit
Restart=always
User=&lt;replace_username&gt;

[Install]
WantedBy=multi-user.target
</code></pre>
<ul><li>Reload systemd: <code>sudo systemctl daemon-reload</code></li>
<li>Enable the service: <code>sudo systemctl enable myscript.service</code></li>
<li>Start the service: <code>sudo systemctl start myscript.service</code></li>
<li>To check the service status:
<code>sudo systemctl status myscript.service</code></li></ul>

<h2 id="option-3-autostart-using-lxsession">Option 3: Autostart using lxsession</h2>
<ul><li>Edit the autostart configuration file: <code>nano ~/.config/lxsession/LXDE-pi/autostart</code></li>
<li>Add the following line to automatically start the Python script: <code>@lxterminal -e python3 /path/to/your/script.py</code></li>
<li>Save the file and initiate a system reboot:  <code>sudo reboot</code></li></ul>
]]></content:encoded>
      <author>mrinalraj</author>
      <guid>https://blogs.dgplug.org/read/a/dxrz3ya9h7</guid>
      <pubDate>Wed, 31 Jan 2024 05:27:26 +0000</pubDate>
    </item>
    <item>
      <title>CSS: Combinators </title>
      <link>https://blogs.dgplug.org/sandeepk/css-combinators</link>
      <description>&lt;![CDATA[In CSS, combinators are used to select content by combining selectors in specific relationships. There are different types of relationships that can be used to combine selectors.&#xA; &#xA;Descendant combinator&#xA;The descendant combinator is represented by a space &#34; &#34;  and typically used between two selectors. It selects the second selector if the first selector is the ancestor (parent, parent parent&#39;s) element. These selectors are called the descendant selectors.&#xA;&#xA;.cover p {&#xA;    color: red;&#xA;}&#xA;div class=&#34;cover&#34;pText in .cover/p/div&#xA;pText not in .cover/p&#xA;In this example, the text &#34;Text in .cover&#34; will be displayed in red.&#xA;&#xA;Child combinators&#xA;The child combinator is represented by &#34;  &#34; and is used between two selectors. In this, an element is only selected if the second selector is the direct child of the first selector element. This means there should not be any other selector between the first selector element and second element selector.&#xA;&#xA;ul   li {&#xA;    border-top: 5px solid red;&#xA;} &#xA;ul&#xA;    liUnordered item/li&#xA;    liUnordered item&#xA;        ol&#xA;            liItem 1/li&#xA;            liItem 2/li&#xA;        /ol&#xA;    /li&#xA;/ul&#xA;In this example, the li element with the text &#34;Unordered item&#34; will have a red top border.&#xA;&#xA;Adjacent sibling combinator&#xA;The adjacent sibling combinator is represented by &#34;+&#34;  is placed between the two CSS selector. In this element is selected if the selector element is directly followed by the first element selector or only the adjacent sibling&#xA;h1 + span {&#xA;    font-weight: bold;&#xA;    background-color: #333;&#xA;    color: #fff;&#xA;    padding: .5em;&#xA;}&#xA;div&#xA;    h1A heading/h1&#xA;    spanVeggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo&#xA;            melon azuki bean garlic./span&#xA;&#xA;    spanGumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts fava bean collard&#xA;            greens dandelion okra wakame tomato. Dandelion cucumber earthnut pea peanut soko zucchini./span&#xA;/div&#xA;In this example, the first span element will have the given CSS properties.&#xA;&#xA;General sibling combinator&#xA;The general sibling combinator is represented by &#34;~&#34;.  It selects all the sibling element, not only the direct sibling element, then we use the general sibling combinator.&#xA;h1 ~ h2 {&#xA;    font-weight: bold;&#xA;    background-color: #333;&#xA;    color: #fff;&#xA;    padding: .5em;&#xA;}&#xA;article&#xA;    h1A heading/h1&#xA;    h2I am a paragraph./h2&#xA;    divI am a div/div&#xA;    h2I am another paragraph./h2&#xA;/article&#xA;In this example, every h2 element will have the given CSS properties.&#xA;&#xA;CSS combinators provide powerful ways to select and style content based on their relationships in the HTML structure. By understanding combinators, we can create clean, maintainable, and responsive web designs.&#xA;&#xA;Cheers!&#xA;&#xA;References&#xA;MDN Web Docs&#xA;&#xA;CSS&#xA;Combinators&#xA;WebDevelopment&#xA;FrontendDev &#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>In CSS, combinators are used to select content by combining selectors in specific relationships. There are different types of relationships that can be used to combine selectors.</p>

<h2 id="descendant-combinator">Descendant combinator</h2>

<p>The descendant combinator is represented by a space “ ”  and typically used between two selectors. It selects the second selector if the first selector is the ancestor (parent, parent parent&#39;s) element. These selectors are called the descendant selectors.</p>

<pre><code class="language-css">.cover p {
    color: red;
}
</code></pre>

<pre><code class="language-html">&lt;div class=&#34;cover&#34;&gt;&lt;p&gt;Text in .cover&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Text not in .cover&lt;/p&gt;
</code></pre>

<p><em>In this example, the text “Text in .cover” will be displayed in red.</em></p>

<h2 id="child-combinators">Child combinators</h2>

<p>The child combinator is represented by “&gt;” and is used between two selectors. In this, an element is only selected if the second selector is the direct child of the first selector element. This means there should not be any other selector between the first selector element and second element selector.</p>

<pre><code class="language-css">ul &gt; li {
    border-top: 5px solid red;
} 
</code></pre>

<pre><code class="language-html">&lt;ul&gt;
    &lt;li&gt;Unordered item&lt;/li&gt;
    &lt;li&gt;Unordered item
        &lt;ol&gt;
            &lt;li&gt;Item 1&lt;/li&gt;
            &lt;li&gt;Item 2&lt;/li&gt;
        &lt;/ol&gt;
    &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p><em>In this example, the <code>&lt;li&gt;</code> element with the text “Unordered item” will have a red top border.</em></p>

<h2 id="adjacent-sibling-combinator">Adjacent sibling combinator</h2>

<p>The adjacent sibling combinator is represented by “+”  is placed between the two CSS selector. In this element is selected if the selector element is directly followed by the first element selector or only the adjacent sibling</p>

<pre><code class="language-css">h1 + span {
    font-weight: bold;
    background-color: #333;
    color: #fff;
    padding: .5em;
}
</code></pre>

<pre><code class="language-html">&lt;div&gt;
    &lt;h1&gt;A heading&lt;/h1&gt;
    &lt;span&gt;Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo
            melon azuki bean garlic.&lt;/span&gt;

    &lt;span&gt;Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts fava bean collard
            greens dandelion okra wakame tomato. Dandelion cucumber earthnut pea peanut soko zucchini.&lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p><em>In this example, the first <span> element will have the given CSS properties.</em></p>

<h2 id="general-sibling-combinator">General sibling combinator</h2>

<p>The general sibling combinator is represented by “~“.  It selects all the sibling element, not only the direct sibling element, then we use the general sibling combinator.</p>

<pre><code class="language-css">h1 ~ h2 {
    font-weight: bold;
    background-color: #333;
    color: #fff;
    padding: .5em;
}
</code></pre>

<pre><code class="language-html">&lt;article&gt;
    &lt;h1&gt;A heading&lt;/h1&gt;
    &lt;h2&gt;I am a paragraph.&lt;/h2&gt;
    &lt;div&gt;I am a div&lt;/div&gt;
    &lt;h2&gt;I am another paragraph.&lt;/h2&gt;
&lt;/article&gt;
</code></pre>

<p><em>In this example, every <code>&lt;h2&gt;</code> element will have the given CSS properties.</em></p>

<p>CSS combinators provide powerful ways to select and style content based on their relationships in the HTML structure. By understanding combinators, we can create clean, maintainable, and responsive web designs.</p>

<p>Cheers!</p>

<p><strong>References</strong>
– <a href="https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors/Combinators" rel="nofollow">MDN Web Docs</a></p>

<p>#CSS
#Combinators
#WebDevelopment
#FrontendDev</p>
]]></content:encoded>
      <author>sandeepk</author>
      <guid>https://blogs.dgplug.org/read/a/gedc5nqalb</guid>
      <pubDate>Sun, 28 May 2023 14:42:23 +0000</pubDate>
    </item>
    <item>
      <title>Variables and Memory Management in Python</title>
      <link>https://blogs.dgplug.org/abbisk/variables-and-memory-management-in-python</link>
      <description>&lt;![CDATA[Variable&#xA;Variable is a way to refer to memory locations being accessed by a computer program. In languages like C, C++, Java, a variable is a name given to a memory location. So when we say:&#xA;int x;&#xA;float y;&#xA;This small piece of code asks the compiler to create memory space for the variables, 4 bytes each (the size depends on the compiler and programming language). The variables are basically names assigned to the memory location, if the variable is defined for a particular data type then only declared type data can be stored in it. &#xA;But in python, we do not need to declare a variable beforehand like int x, we can straightaway move to define the variable and start using it like x = 10. &#xA;alt text&#xA;&#xA;Now the point is, how does Python know what is the type of the variable and how to access it?&#xA;In Python, data types (integer, list, string, functions, etc. ) are objects and every object has a unique id that is assigned to it, at the time of object creation. Variables are references (pointers) to these objects. What happens when we say :&#xA;x = 10&#xA;Python executes the right-hand side of the code&#xA;Identifies 10 to be an integer&#xA;Creates an object of Integer class&#xA;Assigns x to refer to the integer object 10&#xA;alt text&#xA;&#xA;Now if we create new variable y which is equal to x, what do you think happens internally?&#xA;y=x&#xA;y now refers to the same object as x.&#xA;alt text&#xA;&#xA;How do we know that?&#xA;It can be verified by checking the id of the object that these two variables x and y are pointing to.&#xA;id(y) == id(x)&#xA;output&#xA;True&#xA;We can also print the id of the object&#xA;print(f&#34;id of the object pointed by x:{id(x)}&#34;)&#xA;print(f&#34;id of the object pointed by y:{id(y)}&#34;) &#xA;&#xA;output&#xA;your id value might be different from mine but the two ids printed must be the same&#xA;id of the object pointed by x:140733799282752 &#xA;id of the object pointed by y:140733799282752&#xA;Now, what if we assign a different value to y?&#xA;y=40&#xA;This will create another integer object with the value 40 and y will now refer to 40 instead of 10.&#xA;alt text&#xA;How to check&#xA;Again, we will use id() to see the ids of the objects.&#xA;print(x) # outputs 10&#xA;print(y) # outputs 40&#xA;print(f&#34;id of the object pointed by x:{id(x)}&#34;)&#xA;print(f&#34;id of the object pointed by y:{id(y)}&#34;)  &#xA;&#xA;output&#xA;id of the object pointed by x:140733799282752&#xA;id of the object pointed by y:140733799283712&#xA;As we can see from above, the two ids are now different which means a new object with value 40 is created and y refers to that object now.&#xA;&#xA;If we wish to assign some other value to variable x&#xA;x = &#34;python&#34;&#xA;print(id(x))&#xA;&#xA;output&#xA;1783541430128&#xA;We will get an object id that is different from the id &#34;140733799282752&#34; printed by id(x) for integer object 10 previously.&#xA;&#xA;So what happened to the integer object 10?&#xA;The integer object 10 now remains unreferenced and can no longer be accessed. Python has a smart garbage collection system that looks out for objects that are no longer accessible and reclaims the memory so that it can be used for some other purpose.&#xA;alt text&#xA;One last question: What if we create two integer objects with the same value?&#xA;p = 100&#xA;q = 100&#xA;Before I answer this question. Let&#39;s check their ids:&#xA;print(f&#34;id of the object pointed by x:{id(p)}&#34;)&#xA;print(f&#34;id of the object pointed by y:{id(q)}&#34;) &#xA;output&#xA;id of object pointed by x:140733799285632&#xA;id of object pointed by y:140733799285632&#xA;So what python does is optimize memory allocation by creating a single integer object with value 100 and then points both the variables p and q towards it.&#xA;&#xA;Let&#39;s check one more example-&#xA;m = 350&#xA;n = 350&#xA;&#xA;print(f&#34;id of object pointed by x:{id(m)}&#34;)&#xA;print(f&#34;id of object pointed by y:{id(n)}&#34;) &#xA;&#xA;output&#xA;id of the object pointed by x:1783572881872&#xA;id of the object pointed by y:1783572881936&#xA;To our surprise the ids of the integer object 300 referred to by m and n are different. &#xA;What is going on here??&#xA;Python allocates memory for integers in the range [-5, 256] at startup, i.e., integer objects for these values are created and ids are assigned. This process is also known as integer caching. So whenever an integer is referenced in this range, python variables point to the cached value of that object. That is why the object id for integer object 100 referenced by p and q print the same ids. For integers outside the range [-5, 256], their objects are created as and when they are defined during program implementation. This is the reason why the ids for integer object 350 referenced by m and n are different.&#xA;As mentioned earlier, variables point to the objects stored in memory. Hence variables are free to point to object of any type.&#xA;x = 10 # x points to an object of &#39;int&#39; type&#xA;x = [&#34;python&#34;, 20, &#34;apple&#34;] # x now points to an object of type &#39;list&#39;&#xA;x = &#34;python&#34; # x now points to a string type object&#xA;I hope you enjoyed reading it. Feel free to suggest improvements to the article or any other topic that you would like to know more about.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<h3 id="variable">Variable</h3>

<p>Variable is a way to refer to memory locations being accessed by a computer program. In languages like C, C++, Java, a variable is a name given to a memory location. So when we say:</p>

<pre><code>int x;
float y;
</code></pre>

<p>This small piece of code asks the compiler to create memory space for the variables, 4 bytes each (the size depends on the compiler and programming language). The variables are basically names assigned to the memory location, if the variable is defined for a particular data type then only declared type data can be stored in it.
But in python, we do not need to declare a variable beforehand like int x, we can straightaway move to define the variable and start using it like x = 10.
<img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t6porgHV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1620278475715/PwxYlz4bD.png" alt="alt text"></p>

<p><strong>Now the point is, how does Python know what is the type of the variable and how to access it?</strong>
In Python, data types (integer, list, string, functions, etc. ) are objects and every object has a unique id that is assigned to it, at the time of object creation. Variables are references (pointers) to these objects. What happens when we say :</p>

<pre><code>x = 10
</code></pre>
<ul><li>Python executes the right-hand side of the code</li>
<li>Identifies 10 to be an integer</li>
<li>Creates an object of Integer class</li>
<li>Assigns x to refer to the integer object 10
<img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WsuZzUns--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1620229572746/6HB3asCAl.png" alt="alt text"></li></ul>

<p><strong>Now if we create new variable y which is equal to x, what do you think happens internally?</strong></p>

<pre><code>y=x
</code></pre>

<p>y now refers to the same object as x.
<img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Tf5zre4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1620234533788/r8xAr_zZy.png" alt="alt text"></p>

<p><strong>How do we know that?</strong>
It can be verified by checking the id of the object that these two variables x and y are pointing to.</p>

<pre><code>id(y) == id(x)
# output
True
</code></pre>

<p>We can also print the id of the object</p>

<pre><code>print(f&#34;id of the object pointed by x:{id(x)}&#34;)
print(f&#34;id of the object pointed by y:{id(y)}&#34;) 

# output
#your id value might be different from mine but the two ids printed must be the same
id of the object pointed by x:140733799282752 
id of the object pointed by y:140733799282752
</code></pre>

<p><strong>Now, what if we assign a different value to y?</strong></p>

<pre><code>y=40
</code></pre>

<p>This will create another integer object with the value 40 and y will now refer to 40 instead of 10.
<img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4Wk7DC-C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1620236608813/Ax4Wtgn2J.png" alt="alt text">
<strong>How to check</strong>
Again, we will use id() to see the ids of the objects.</p>

<pre><code>print(x) # outputs 10
print(y) # outputs 40
</code></pre>

<pre><code>print(f&#34;id of the object pointed by x:{id(x)}&#34;)
print(f&#34;id of the object pointed by y:{id(y)}&#34;)  

# output
id of the object pointed by x:140733799282752
id of the object pointed by y:140733799283712
</code></pre>

<p>As we can see from above, the two ids are now different which means a new object with value 40 is created and y refers to that object now.</p>

<p>If we wish to assign some other value to variable x</p>

<pre><code>x = &#34;python&#34;
print(id(x))

# output
1783541430128
</code></pre>

<p>We will get an object id that is different from the id “140733799282752” printed by id(x) for integer object 10 previously.</p>

<p><strong>So what happened to the integer object 10?</strong>
The integer object 10 now remains unreferenced and can no longer be accessed. Python has a smart garbage collection system that looks out for objects that are no longer accessible and reclaims the memory so that it can be used for some other purpose.
<img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bwqO5xh_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1620238788124/1zB6g7FmK.png" alt="alt text">
<strong>One last question: What if we create two integer objects with the same value?</strong></p>

<pre><code>p = 100
q = 100
</code></pre>

<p>Before I answer this question. Let&#39;s check their ids:</p>

<pre><code>print(f&#34;id of the object pointed by x:{id(p)}&#34;)
print(f&#34;id of the object pointed by y:{id(q)}&#34;) 
# output
id of object pointed by x:140733799285632
id of object pointed by y:140733799285632
</code></pre>

<p>So what python does is optimize memory allocation by creating a single integer object with value 100 and then points both the variables p and q towards it.</p>

<p>Let&#39;s check one more example-</p>

<pre><code>m = 350
n = 350

print(f&#34;id of object pointed by x:{id(m)}&#34;)
print(f&#34;id of object pointed by y:{id(n)}&#34;) 

# output
id of the object pointed by x:1783572881872
id of the object pointed by y:1783572881936
</code></pre>

<p>To our surprise the ids of the integer object 300 referred to by m and n are different.
<strong>What is going on here??</strong>
Python allocates memory for integers in the range [-5, 256] at startup, i.e., integer objects for these values are created and ids are assigned. This process is also known as integer caching. So whenever an integer is referenced in this range, python variables point to the cached value of that object. That is why the object id for integer object 100 referenced by p and q print the same ids. For integers outside the range [-5, 256], their objects are created as and when they are defined during program implementation. This is the reason why the ids for integer object 350 referenced by m and n are different.
As mentioned earlier, variables point to the objects stored in memory. Hence variables are free to point to object of any type.</p>

<pre><code>x = 10 # x points to an object of &#39;int&#39; type
x = [&#34;python&#34;, 20, &#34;apple&#34;] # x now points to an object of type &#39;list&#39;
x = &#34;python&#34; # x now points to a string type object
</code></pre>

<p>I hope you enjoyed reading it. Feel free to suggest improvements to the article or any other topic that you would like to know more about.</p>
]]></content:encoded>
      <guid>https://blogs.dgplug.org/read/a/cbb402x6pd</guid>
      <pubDate>Sun, 23 May 2021 16:36:37 +0000</pubDate>
    </item>
    <item>
      <title>Free and Open-Source Software</title>
      <link>https://blogs.dgplug.org/abbisk/free-and-open-source-software</link>
      <description>&lt;![CDATA[Free Software&#xA;“Free” software “is software that can be used, studied, and modified,” copied, changed with little or no restriction, and which can be copied and redistributed in modified or unmodified form. Free software is available gratis (free of charge) in most cases.&#xA;“In practice, for software to be distributed as free software, the human-readable form of the program (the source code) must be made available” along “ with a notice granting the” user permission to further adapt the code and continue its redistribution for free.&#xA;This notice either grants a &#34;free software license&#34;, or releases the source code into the public domain.&#xA;Open-Source Software&#xA;In the beginning, all software was free&#xA;in the 1960s, when IBM and others sold the first large-scale computers, these machines came with software which was free.&#xA;This software could be freely shared among users,&#xA;The software came written in a programming language (source code available), and it could be improved and modified. Manufacturers were happy that people were writing software that made their machines useful.&#xA;Then proprietary software dominated the software landscape as manufacturers removed access to the source code.&#xA;IBM and others realized that most users couldn’t or didn’t want to “fix” their own software and&#xA;There was money to be made in leasing or licensing software.&#xA;By the mid-1970s almost all software was proprietary&#xA;“Proprietary software is software that is owned by an individual or a company (usually the one that developed it). There are almost always major restrictions on its use, and its source code is almost always kept secret.” users were not allowed to redistribute it,&#xA;source code is not available&#xA;users cannot modify the programs.&#xA;Software is an additional product that was for sale&#xA;In 1980 US copyright law was modified to include software&#xA;In late 1970s and early 1980s, two different groups started what became known as the open-source software movement:&#xA;East coast, Richard Stallman (1985), formerly a programmer at the MIT AI Lab, launched the GNU Project and the Free Software Foundation.&#xA;“to satisfy the need for and give the benefit of ‘software freedom’ to computer users ultimate goal of the GNU Project was to build a free operating system&#xA;the GNU General Public License (GPL) was designed to ensure that the software produced by GNU will remain free, and to promote the production of more and more free software.]]&gt;</description>
      <content:encoded><![CDATA[<h2 id="free-software">Free Software</h2>

<p>“Free” software “is software that can be used, studied, and modified,” copied, changed with little or no restriction, and which can be copied and redistributed in modified or unmodified form. Free software is available gratis (free of charge) in most cases.
“In practice, for software to be distributed as free software, the human-readable form of the program (the source code) must be made available” along “ with a notice granting the” user permission to further adapt the code and continue its redistribution for free.
This notice either grants a “free software license”, or releases the source code into the public domain.</p>

<h2 id="open-source-software">Open-Source Software</h2>

<p>In the beginning, all software was free
in the 1960s, when IBM and others sold the first large-scale computers, these machines came with software which was free.
This software could be freely shared among users,
The software came written in a programming language (source code available), and it could be improved and modified. Manufacturers were happy that people were writing software that made their machines useful.
Then proprietary software dominated the software landscape as manufacturers removed access to the source code.
IBM and others realized that most users couldn’t or didn’t want to “fix” their own software and
There was money to be made in leasing or licensing software.
By the mid-1970s almost all software was proprietary
“Proprietary software is software that is owned by an individual or a company (usually the one that developed it). There are almost always major restrictions on its use, and its source code is almost always kept secret.” users were not allowed to redistribute it,
source code is not available
users cannot modify the programs.
Software is an additional product that was for sale
In 1980 US copyright law was modified to include software
In late 1970s and early 1980s, two different groups started what became known as the open-source software movement:
East coast, Richard Stallman (1985), formerly a programmer at the MIT AI Lab, launched the GNU Project and the Free Software Foundation.
“to satisfy the need for and give the benefit of ‘software freedom’ to computer users ultimate goal of the GNU Project was to build a free operating system
the GNU General Public License (GPL) was designed to ensure that the software produced by GNU will remain free, and to promote the production of more and more free software.</p>
]]></content:encoded>
      <guid>https://blogs.dgplug.org/read/a/hozafw25mv</guid>
      <pubDate>Tue, 07 Jan 2020 17:44:51 +0000</pubDate>
    </item>
    <item>
      <title>My first PyCon!</title>
      <link>https://blogs.dgplug.org/darshna/my-first-pycon</link>
      <description>&lt;![CDATA[A few months ago I came to know that pycon was happening in &#xA;Chennai on the month of October, and I realized that attending this year&#39;s PyCon is necessary. Deep down I knew &#xA;that after returning from Pycon I&#39;ll not only make new &#xA;connection and potential people but also it&#39;ll change my perspective about the open-source world(in a good way). Also this was my first time that I&#39;ll be moving out from my home town, I asked mom that this will be a great opportunity for my exposure of life and experience, as unfortunately there&#39;s not much stuff happening in my college(except mass bunking and unnecessary gossip). And my Durga puja was over, packed my bags and left for Chennai. After 27 hours of a long journey, I reached the station, where communicating with people was a bit tough, but my ecstasy was unlimited of meeting that part of India(South). &#xA;  I couldn&#39;t sleep that night, I woke up early morning and &#xA;  got ready and reached the venue with one of my folks &#xA;  (@priyankasaggu) from dgplug. When I reached there I was amazed at the crowd which gathered there, I took my id card, and went in the venue, people were everywhere are. Earlier I didn&#39;t notice that goodies were being distributed if you play quiz from the respective booths of sponsors. At the evening after the event got over we (dgplug) members went to beach and spent some good time together. &#xA; It was day 2 and coincidently I met some new friends who were from Kerala and thet were of my same batch and of same stream. So, I attended the keynote speaker who was Ines Montani, and yeah I did not understand everything as clear as water but yes, I did get an idea. And at the end of the day, we all the folks of dgplug went for dinner and enjoyed our meals and some quality time together.&#xA;&#xA; Overall, my experience if I rate out of 10, it will 10/10...yeah every penny i spent to come here, every hour of my journey I spent to come here was worth it...Before coming to PyCon 2k19, I asked myself that none of my friends came from my college.. will it be worth it?&#xA;Now I know yes it was worth it! &#xA; ]]&gt;</description>
      <content:encoded><![CDATA[<p>A few months ago I came to know that pycon was happening in
Chennai on the month of October, and I realized that attending this year&#39;s PyCon is necessary. Deep down I knew
that after returning from Pycon I&#39;ll not only make new
connection and potential people but also it&#39;ll change my perspective about the open-source world(in a good way). Also this was my first time that I&#39;ll be moving out from my home town, I asked mom that this will be a great opportunity for my exposure of life and experience, as unfortunately there&#39;s not much stuff happening in my college(except mass bunking and unnecessary gossip). And my Durga puja was over, packed my bags and left for Chennai. After 27 hours of a long journey, I reached the station, where communicating with people was a bit tough, but my ecstasy was unlimited of meeting that part of India(South).
  I couldn&#39;t sleep that night, I woke up early morning and
  got ready and reached the venue with one of my folks
  (@priyankasaggu) from dgplug. When I reached there I was amazed at the crowd which gathered there, I took my id card, and went in the venue, people were everywhere are. Earlier I didn&#39;t notice that goodies were being distributed if you play quiz from the respective booths of sponsors. At the evening after the event got over we (dgplug) members went to beach and spent some good time together.
 It was day 2 and coincidently I met some new friends who were from Kerala and thet were of my same batch and of same stream. So, I attended the keynote speaker who was Ines Montani, and yeah I did not understand everything as clear as water but yes, I did get an idea. And at the end of the day, we all the folks of dgplug went for dinner and enjoyed our meals and some quality time together.</p>

<p> Overall, my experience if I rate out of 10, it will 10/10...yeah every penny i spent to come here, every hour of my journey I spent to come here was worth it...Before coming to PyCon 2k19, I asked myself that none of my friends came from my college.. will it be worth it?
Now I know yes it was worth it!</p>
]]></content:encoded>
      <author>darshna</author>
      <guid>https://blogs.dgplug.org/read/a/aephx42gzs</guid>
      <pubDate>Thu, 17 Oct 2019 16:57:46 +0000</pubDate>
    </item>
    <item>
      <title>wotw, leisure</title>
      <link>https://blogs.dgplug.org/jason/wotw-leisure</link>
      <description>&lt;![CDATA[wotw, leisure&#xA;&#xA;And to tell the truth I  &#xA;don&#39;t want to let go of  &#xA;the wrists of idleness, I  &#xA;don&#39;t want to sell my life  &#xA;for money, I don&#39;t even  &#xA;want to come in out of  &#xA;the rain.&#xA;&#xA;And with this delightful Mary Oliver quote, this little blog, bids you adieu awhile.  &#xA;I want to go and play in the rain :)]]&gt;</description>
      <content:encoded><![CDATA[<p>wotw, leisure</p>

<p>And to tell the truth I<br>
don&#39;t want to let go of<br>
the wrists of idleness, I<br>
don&#39;t want to sell my life<br>
for money, I don&#39;t even<br>
want to come in out of<br>
the rain.</p>

<p>And with this delightful <a href="https://www.poetryfoundation.org/poets/mary-oliver" rel="nofollow">Mary Oliver</a> quote, this little blog, bids you adieu awhile.<br>
I want to go and play in the rain :)</p>
]]></content:encoded>
      <author>jason’s wotw blog</author>
      <guid>https://blogs.dgplug.org/read/a/u9bgim2722</guid>
      <pubDate>Wed, 02 Oct 2019 00:30:00 +0000</pubDate>
    </item>
    <item>
      <title>wotw,  APROSDOKETON</title>
      <link>https://blogs.dgplug.org/jason/wotw-aprosdoketon</link>
      <description>&lt;![CDATA[wotw,  APROSDOKETON&#xA;is a figure of speech in which an expected word in an idiom is replaced with an unexpected one - e.g. “Rome wasn&#39;t built in a teacup”&#xA;&#xA;have fun with the thread&#xA;&#xA;https://twitter.com/qikipedia/status/1176149224326483970]]&gt;</description>
      <content:encoded><![CDATA[<p>wotw,  APROSDOKETON
is a figure of speech in which an expected word in an idiom is replaced with an unexpected one – e.g. “Rome wasn&#39;t built in a teacup”</p>

<p>have fun with the thread</p>

<p><a href="https://twitter.com/qikipedia/status/1176149224326483970" rel="nofollow">https://twitter.com/qikipedia/status/1176149224326483970</a></p>
]]></content:encoded>
      <author>jason’s wotw blog</author>
      <guid>https://blogs.dgplug.org/read/a/fdqm7wv8u1</guid>
      <pubDate>Wed, 25 Sep 2019 13:45:38 +0000</pubDate>
    </item>
    <item>
      <title>wotw, gut punch</title>
      <link>https://blogs.dgplug.org/jason/wotw-gut-punch</link>
      <description>&lt;![CDATA[wotw, gut punch&#xA;&#xA;means something knocks the wind out of you&#xA;literally a punch to the gut.&#xA;means to be suddenly be emotionally wound up, because of something you see or hear. &#xA;&#xA;like I am about to do to you …&#xA;&#xA;---  &#xA;&#xA;iframe width=&#34;560&#34; height=&#34;315&#34; src=&#34;https://www.youtube-nocookie.com/embed/TRL7o2kPqw0&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&#34; allowfullscreen/iframe&#xA;  &#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>wotw, gut punch</p>

<p>means something knocks the wind out of you
literally a punch to the gut.
means to be suddenly be emotionally wound up, because of something you see or hear.</p>

<p>like I am about to do to you …</p>

<hr>

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/TRL7o2kPqw0" frameborder="0" allowfullscreen=""></iframe>
  
]]></content:encoded>
      <author>jason’s wotw blog</author>
      <guid>https://blogs.dgplug.org/read/a/v6hmewd0zt</guid>
      <pubDate>Wed, 18 Sep 2019 00:30:00 +0000</pubDate>
    </item>
    <item>
      <title>Python Continuation!</title>
      <link>https://blogs.dgplug.org/darshna/python-continuation</link>
      <description>&lt;![CDATA[Here we will get to know about the If-else, control flow.&#xA; &#xA; As the name says (if) it simply applies the condition applied to it. If the value of the expression is true, the command works according to it.&#xA;`&#xA;!usr/bin/env/ python 3&#xA; number= int(input(&#34;Enter a number:&#34;))&#xA;            if number&lt;100&#xA;            print(&#34;the number is less than 100&#34;)&#xA;`&#xA;Else statement:- This is used when the (if)statement is not fulfilled.&#xA; &#xA;`&#xA;  #!usr/bin/env python3&#xA;   number= int(input(&#34;Enter a number:&#34;)&#xA;           if number&lt;100&#xA;             print(&#34;The number is less than 100&#34;);&#xA;           else&#xA;             print(&#34;The number is greater than 100&#34;);&#xA;`&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Here we will get to know about the If-else, control flow.</p>

<p> As the name says (<code>if</code>) it simply applies the condition applied to it. If the value of the expression is true, the command works according to it.
<code>
#!usr/bin/env/ python 3
 number= int(input(&#34;Enter a number:&#34;))
            if number&lt;100
            print(&#34;the number is less than 100&#34;)
</code></p>

<h2 id="else-statement-this-is-used-when-the-if-statement-is-not-fulfilled">Else statement:– This is used when the <code>(if</code>)statement is not fulfilled.</h2>

<p><code>
  #!usr/bin/env python3
   number= int(input(&#34;Enter a number:&#34;)
           if number&lt;100
             print(&#34;The number is less than 100&#34;);
           else
             print(&#34;The number is greater than 100&#34;);
</code></p>
]]></content:encoded>
      <author>darshna</author>
      <guid>https://blogs.dgplug.org/read/a/rcnazyibt0</guid>
      <pubDate>Mon, 16 Sep 2019 18:46:02 +0000</pubDate>
    </item>
    <item>
      <title>wotw, antifragile</title>
      <link>https://blogs.dgplug.org/jason/wotw-antifragile</link>
      <description>&lt;![CDATA[wotw, antifragile&#xA;&#xA;to be someone, who is more than resilient.&#xA;to be someone, who thrives when the world breaks you!&#xA;&#xA;to learn how, spend an hour and watch the videos below.  &#xA;&#xA;---  &#xA;&#xA; iframe width=&#34;560&#34; height=&#34;315&#34; src=&#34;https://www.youtube-nocookie.com/embed/-MMLea-_ifw&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&#34; allowfullscreen/iframe   &#xA;&#xA;---  &#xA;&#xA;iframe width=&#34;560&#34; height=&#34;315&#34; src=&#34;https://www.youtube-nocookie.com/embed/iTcEDyXkOSw&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&#34; allowfullscreen/iframe&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>wotw, antifragile</p>

<p>to be someone, who is more than resilient.
to be someone, who <a href="https://ryanholiday.net/how-to-recover-when-the-world-breaks-you/" rel="nofollow">thrives when the world breaks you</a>!</p>

<p>to learn how, spend an hour and watch the videos below.</p>

<hr>

<p> <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/-MMLea-_ifw" frameborder="0" allowfullscreen=""></iframe></p>

<hr>

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/iTcEDyXkOSw" frameborder="0" allowfullscreen=""></iframe>
]]></content:encoded>
      <author>jason’s wotw blog</author>
      <guid>https://blogs.dgplug.org/read/a/4am59aolbk</guid>
      <pubDate>Wed, 11 Sep 2019 00:30:00 +0000</pubDate>
    </item>
    <item>
      <title>Accepting yourself!</title>
      <link>https://blogs.dgplug.org/darshna/accepting-yourself</link>
      <description>&lt;![CDATA[Be who you are, not who others tell you to be.&#xA;The above quote clearly replicates confidence and self-love.&#xA;We somehow get affected by the negative comments and judgments passing by and try to change ourself so that people would accept us the way we are. Finally, when we arrange ourselves for the people to accept us there is again a judgment passing by and yet again we try to change ourselves. In the end, we forget the real us and be a toy for people&#39;s satisfaction. as we grow old we realize that we have left the true selves way back and been another person.&#xA;    Fat-shaming or Body shaming, being a dark-skinned girl or being extra bold even wearing a dark lipstick at daytime, or wearing clothes of your own choice attracts people&#39;s attention more than taking care of social and devastating issues happening day-to-day. Have you ever heard someone saying that look at the person who threw the packets on the side of a road or look at the person who is pissing at a public place, why aren&#39;t they ashamed?&#xA;Yes, I am healthy and have a unique body shape that maybe most girls don&#39;t have or most guys make fun of it. So what? yes I am like this and I am proud of it but you will ignore it once or twice or maybe thrice. Ignorance is not a solution the mentality should be changed, and it can only change if people start teaching their children the value of respect and acceptance, acceptance of people as they are. That obviously doesn&#39;t include the acceptance of wrongdoings and violent nature of some people, but accepting the things to make this a society and a better place to live. Only then we can stand together and build a healthy community.]]&gt;</description>
      <content:encoded><![CDATA[<h2 id="be-who-you-are-not-who-others-tell-you-to-be">Be who you are, not who others tell you to be.</h2>

<p>The above quote clearly replicates confidence and self-love.
We somehow get affected by the negative comments and judgments passing by and try to change ourself so that people would accept us the way we are. Finally, when we arrange ourselves for the people to accept us there is again a judgment passing by and yet again we try to change ourselves. In the end, we forget the real us and be a toy for people&#39;s satisfaction. as we grow old we realize that we have left the true selves way back and been another person.
    Fat-shaming or Body shaming, being a dark-skinned girl or being extra bold even wearing a dark lipstick at daytime, or wearing clothes of your own choice attracts people&#39;s attention more than taking care of social and devastating issues happening day-to-day. Have you ever heard someone saying that look at the person who threw the packets on the side of a road or look at the person who is pissing at a public place, why aren&#39;t they ashamed?
Yes, I am healthy and have a unique body shape that maybe most girls don&#39;t have or most guys make fun of it. So what? yes I am like this and I am proud of it but you will ignore it once or twice or maybe thrice. Ignorance is not a solution the mentality should be changed, and it can only change if people start teaching their children the value of respect and acceptance, acceptance of people as they are. That obviously doesn&#39;t include the acceptance of wrongdoings and violent nature of some people, but accepting the things to make this a society and a better place to live. Only then we can stand together and build a healthy community.</p>
]]></content:encoded>
      <author>darshna</author>
      <guid>https://blogs.dgplug.org/read/a/pjq2aat701</guid>
      <pubDate>Tue, 10 Sep 2019 08:36:36 +0000</pubDate>
    </item>
    <item>
      <title>wotw, myth</title>
      <link>https://blogs.dgplug.org/jason/wotw-myth</link>
      <description>&lt;![CDATA[wotw, myth&#xA;&#xA;the stories we tell ourselves as a culture, to explain what we could not really explain.  &#xA;&#xA;to help use make sense of the world, so that we’d not fuss over the unexplained and let us get on with our lives and make progress with the things we do understand.  &#xA;&#xA;---  &#xA;&#xA;iframe width=&#34;560&#34; height=&#34;315&#34; src=&#34;https://www.youtube-nocookie.com/embed/HeX6CX5LEj0&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&#34; allowfullscreen/iframe]]&gt;</description>
      <content:encoded><![CDATA[<p>wotw, myth</p>

<p>the stories we tell ourselves as a culture, to explain what we could not really explain.</p>

<p>to help use make sense of the world, so that we’d not fuss over the unexplained and let us get on with our lives and make progress with the things we <em>do</em> understand.</p>

<hr>

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/HeX6CX5LEj0" frameborder="0" allowfullscreen=""></iframe>
]]></content:encoded>
      <author>jason’s wotw blog</author>
      <guid>https://blogs.dgplug.org/read/a/qo3p952115</guid>
      <pubDate>Wed, 04 Sep 2019 00:30:00 +0000</pubDate>
    </item>
    <item>
      <title>Continuing Python!</title>
      <link>https://blogs.dgplug.org/darshna/continuing-python</link>
      <description>&lt;![CDATA[After so many days I am continuing with Python again. Yes, I was not able to maintain the series properly, but let&#39;s get back to work and know what I read next in Python from the book of PYM.&#xA;In Python most of the lines will have expressions and these expressions are made of operators and operands.&#xA;&#xA;Operators&#xA; These are the symbols which tells the python interpretor to do the mathematical operation.&#xA;&#xA;2+3&#xA;5&#xA;22.0/12&#xA;1.83333&#xA;&#xA;To get floating results we need to use the division using any of operand as the floating number. To do modular operation use % operator.&#xA;&#xA;!/usr/bin/envv python3&#xA;days= int(input(&#34;Enter days:&#34;))&#xA;&#xA;month= days/30&#xA;days= days%30&#xA;print(&#34;Months= %d days= %d %(month, days))&#xA;&#xA;Relational operators&#xA;&#xA;## operator  ## meaning&#xA;&#xA;   &lt;           is less than&#xA;     is greater than&#xA;   &lt;=          is less than or equal to&#xA;     =          is greater than or equal&#xA;   ==          is equal to&#xA;   !=          is not equal to&#xA;&#xA; Note: // operator gives floor division result.&#xA;4.0//3&#xA;1.0&#xA;&#xA;4.0/3&#xA;1.33333&#xA;&#xA;Logical operator&#xA;&#xA;To do a logical AND, OR we use these keywords.]]&gt;</description>
      <content:encoded><![CDATA[<p>After so many days I am continuing with Python again. Yes, I was not able to maintain the series properly, but let&#39;s get back to work and know what I read next in Python from the book of PYM.
In Python most of the lines will have expressions and these expressions are made of operators and operands.</p>

<h2 id="operators">Operators</h2>

<p> These are the symbols which tells the python interpretor to do the mathematical operation.</p>

<pre><code>2+3
5
22.0/12
1.83333

</code></pre>

<p><em>To get floating results we need to use the division using any of operand as the floating number. To do modular operation use % operator.</em></p>

<pre><code>
#!/usr/bin/envv python3
days= int(input(&#34;Enter days:&#34;))

month= days/30
days= days%30
print(&#34;Months= %d days= %d %(month, days))

</code></pre>

<h2 id="relational-operators">Relational operators</h2>

<h2 id="operator-meaning">operator  ## meaning</h2>

<p>   &lt;           is less than
   &gt;           is greater than
   &lt;=          is less than or equal to
   &gt;=          is greater than or equal
   ==          is equal to
   !=          is not equal to</p>

<p> <em>Note:</em> <code>//</code> operator gives floor division result.</p>

<pre><code>4.0//3
1.0

4.0/3
1.33333
</code></pre>

<h1 id="logical-operator">Logical operator</h1>

<p>To do a logical AND, OR we use these keywords.</p>
]]></content:encoded>
      <author>darshna</author>
      <guid>https://blogs.dgplug.org/read/a/mv72b52bl3</guid>
      <pubDate>Tue, 03 Sep 2019 18:10:11 +0000</pubDate>
    </item>
    <item>
      <title>Getting to know Linux</title>
      <link>https://blogs.dgplug.org/darshna/getting-to-know-linux</link>
      <description>&lt;![CDATA[I am reading the book Linux for you and me, and some of the commands I got to know and it&#39;s work!!&#xA;Gnome Terminal&#xA;Here in this terminal, we write the commands.&#xA;For example: [darshna@localhost~]&#xA;&#xA;Here Darshna is the username, localhost is the hostname and this symbol `#~ is the directory name.&#xA;&#xA; Following some commands are:&#xA;date command= tells us about current time and date in IST(Indian standard time) &#xA;cal command= displays the default present calendar.&#xA;whoami command= tells which user account you are using in this system.&#xA;id command=displays real user id.&#xA;pwd comma= helps to find the absolute path of the current directory.&#xA;cd command= this command helps you to change your current directory.&#xA; &#xA; ]]&gt;</description>
      <content:encoded><![CDATA[<p>I am reading the book Linux for you and me, and some of the commands I got to know and it&#39;s work!!
<strong>Gnome Terminal</strong>
Here in this terminal, we write the commands.</p>

<pre><code>For example: [darshna@localhost~]

</code></pre>

<p>Here Darshna is the username, localhost is the hostname and this symbol `#~ is the directory name.</p>

<p> <em>Following some commands are</em>:
* date command= tells us about current time and date in IST(Indian standard time)
* cal command= displays the default present calendar.
* whoami command= tells which user account you are using in this system.
* id command=displays real user id.
* pwd comma= helps to find the absolute path of the current directory.
* cd command= this command helps you to change your current directory.</p>
]]></content:encoded>
      <author>darshna</author>
      <guid>https://blogs.dgplug.org/read/a/c9hiuawa8y</guid>
      <pubDate>Mon, 19 Aug 2019 15:38:32 +0000</pubDate>
    </item>
    <item>
      <title>File handing in Python</title>
      <link>https://blogs.dgplug.org/nileshpatra/file-handing-in-python</link>
      <description>&lt;![CDATA[I recently started reading the pym book suggested by folks at #dgplug. Since I have been programming in Python since an year and a half, I could go through the basics fairly quick.&#xA;Here are the topics I covered:&#xA;&#xA;Variable and Datatypes&#xA;Operators&#xA;Conditionals&#xA;Loops&#xA;Python Datastructures&#xA;Strings &#xA;Functions&#xA;&#xA;However, file handling is something I have rarely used till now. This blog talks about the it and some of the great takeaways.&#xA;&#xA;Opening a file&#xA;A file can be opened in three modes:&#xA;  ### Read: Opens the file in read-only mode. The file cannot be edited or           added content to. The syntax for the same is :&#xA;      f = open(&#39;requirements.txt&#39; , &#39;r&#39;)&#xA; ### Write: Opens the file in write, you can make desired changes to the file.&#xA;The syntax for the same is:&#xA;      f = open(&#39;requirements.txt&#39; , &#39;r&#39;)&#xA; ### Append: Opens file in append mode. You can append further content, but cannot change or modify past content. The syntax for the same is:&#xA;      f = open(&#39;requirements.txt&#39; , &#39;a&#39;)&#xA;Reading a file&#xA;When a file is openened in read mode, the file pointer is at the beginning of the file. There are different functions for reading the file:&#xA;&#xA;read() &#xA;It reads the entire file at once. The file pointer traverses the entire file on calling this function. Therefore, calling this function again will have no effect, since the file pointer is already at EOF. Syntax for the same is:&#xA;      f.read()&#xA;&#39;selenium   = 3.141.0\npython-telegram-bot   = 11.1.0\ndatetime   = 4.3\nargparse   = 1.4.0\nwebdriver-manager   = 1.7\nplaysound   = 1.2.2&#39;&#xA;readline() &#xA;This function moves the file pointer to the beginning of the next line hence outputting one line at a time. Syntax for readline() function is :&#xA;      f.readline()&#xA;&#39;selenium   = 3.141.0\n&#39;&#xA;      f.readline()&#xA;&#39;python-telegram-bot   = 11.1.0\n&#39;&#xA;readlines() &#xA;Reads all the lines in a file and returens a list.&#xA;      f.readlines()&#xA;[&#39;selenium   = 3.141.0\n&#39;, &#39;python-telegram-bot   = 11.1.0\n&#39;, &#39;datetime   = 4.3\n&#39;, &#39;argparse   = 1.4.0\n&#39;, &#39;webdriver-manager   = 1.7\n&#39;, &#39;playsound   = 1.2.2&#39;]&#xA;&#xA;Now, we should always close a file we opened when not in use. Not closing it increases memory usage and degrades the quality of code.&#xA;Python offers nice functionality to take care of file closing by itself:&#xA;&#xA;with keyword&#xA;`with keyword can be used as follows:&#xA;      with open(&#39;requirements.txt&#39; , &#39;r&#39;) as f:&#xA;...     f.read()&#xA;... &#xA;&#39;selenium   = 3.141.0\npython-telegram-bot   = 11.1.0\ndatetime   = 4.3\nargparse   = 1.4.0\nwebdriver-manager   = 1.7\nplaysound   = 1.2.2&#39;&#xA;Writing into a file&#xA;The .write() function can be easily used to write into a file. This will place the file pointer to the beginning and over-write the file completely. Here&#39;s how that works:&#xA;      f = open(&#39;requirements.txt&#39; , &#39;w&#39;)&#xA;      f.write(&#39;tgbot\n&#39;)&#xA;6&#xA;The return value &#39;6&#39; denotes the number of characters written into the file&#xA;&#xA;Hope you enjoyed reading the blog, :)&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I recently started reading the pym book suggested by folks at #dgplug. Since I have been programming in Python since an year and a half, I could go through the basics fairly quick.
Here are the topics I covered:</p>
<ul><li>Variable and Datatypes</li>
<li>Operators</li>
<li>Conditionals</li>
<li>Loops</li>
<li>Python Datastructures</li>
<li>Strings</li>
<li>Functions</li></ul>

<p>However, file handling is something I have rarely used till now. This blog talks about the it and some of the great takeaways.</p>

<h2 id="opening-a-file">Opening a file</h2>

<p>A file can be opened in three modes:
  ### Read: Opens the file in read-only mode. The file cannot be edited or           added content to. The syntax for the same is :</p>

<pre><code>&gt;&gt;&gt; f = open(&#39;requirements.txt&#39; , &#39;r&#39;)
</code></pre>

<p> ### Write: Opens the file in write, you can make desired changes to the file.
The syntax for the same is:</p>

<pre><code>&gt;&gt;&gt; f = open(&#39;requirements.txt&#39; , &#39;r&#39;)
</code></pre>

<p> ### Append: Opens file in append mode. You can append further content, but cannot change or modify past content. The syntax for the same is:</p>

<pre><code>&gt;&gt;&gt; f = open(&#39;requirements.txt&#39; , &#39;a&#39;)
</code></pre>

<h3 id="reading-a-file">Reading a file</h3>

<p>When a file is openened in read mode, the file pointer is at the beginning of the file. There are different functions for reading the file:</p>

<h3 id="read">read()</h3>

<p>It reads the entire file at once. The file pointer traverses the entire file on calling this function. Therefore, calling this function again will have no effect, since the file pointer is already at EOF. Syntax for the same is:</p>

<pre><code>&gt;&gt;&gt; f.read()
&#39;selenium &gt;= 3.141.0\npython-telegram-bot &gt;= 11.1.0\ndatetime &gt;= 4.3\nargparse &gt;= 1.4.0\nwebdriver-manager &gt;= 1.7\nplaysound &gt;= 1.2.2&#39;
</code></pre>

<h3 id="readline">readline()</h3>

<p>This function moves the file pointer to the beginning of the next line hence outputting one line at a time. Syntax for <code>readline()</code> function is :</p>

<pre><code>&gt;&gt;&gt; f.readline()
&#39;selenium &gt;= 3.141.0\n&#39;
&gt;&gt;&gt; f.readline()
&#39;python-telegram-bot &gt;= 11.1.0\n&#39;
</code></pre>

<h3 id="readlines">readlines()</h3>

<p>Reads all the lines in a file and returens a list.</p>

<pre><code>&gt;&gt;&gt; f.readlines()
[&#39;selenium &gt;= 3.141.0\n&#39;, &#39;python-telegram-bot &gt;= 11.1.0\n&#39;, &#39;datetime &gt;= 4.3\n&#39;, &#39;argparse &gt;= 1.4.0\n&#39;, &#39;webdriver-manager &gt;= 1.7\n&#39;, &#39;playsound &gt;= 1.2.2&#39;]

</code></pre>

<p>Now, we should always close a file we opened when not in use. Not closing it increases memory usage and degrades the quality of code.
Python offers nice functionality to take care of file closing by itself:</p>

<h2 id="with-keyword">with keyword</h2>

<p>`with keyword can be used as follows:</p>

<pre><code>&gt;&gt;&gt; with open(&#39;requirements.txt&#39; , &#39;r&#39;) as f:
...     f.read()
... 
&#39;selenium &gt;= 3.141.0\npython-telegram-bot &gt;= 11.1.0\ndatetime &gt;= 4.3\nargparse &gt;= 1.4.0\nwebdriver-manager &gt;= 1.7\nplaysound &gt;= 1.2.2&#39;
</code></pre>

<h2 id="writing-into-a-file">Writing into a file</h2>

<p>The <code>.write()</code> function can be easily used to write into a file. This will place the file pointer to the beginning and over-write the file completely. Here&#39;s how that works:</p>

<pre><code>&gt;&gt;&gt; f = open(&#39;requirements.txt&#39; , &#39;w&#39;)
&gt;&gt;&gt; f.write(&#39;tgbot\n&#39;)
6
</code></pre>

<p>The return value &#39;6&#39; denotes the number of characters written into the file</p>

<p>Hope you enjoyed reading the blog, :)</p>
]]></content:encoded>
      <author>nileshpatra</author>
      <guid>https://blogs.dgplug.org/read/a/un8u1tc3jj</guid>
      <pubDate>Sat, 17 Aug 2019 13:19:13 +0000</pubDate>
    </item>
    <item>
      <title>Making a pull request</title>
      <link>https://blogs.dgplug.org/nileshpatra/making-a-pull-request</link>
      <description>&lt;![CDATA[Contributing to open source is one of the best ways to hone up programming skills. Along with writing quality code, using a version control tool plays a crucial role while contributing.&#xA;There are a lot of source control management platforms such as github , gitlab , phabricator etc.&#xA;This blog discusses about making code contributions via github.&#xA;&#xA;So what Is a Pull Request?&#xA;Pull request, as the name suggests is a patch of code that is sent to original code base to be merged into the source code after review. Usually, maintainers of the project will review the PR(pull request) and merge it into original code base if everything looks okay.&#xA;&#xA;How to make a PR?&#xA;1. Fork the Repository and clone&#xA;First off, there should be a fork of the upstream repository. Fork is nothing but a copy of the upstream repository onto your own github. This is where you will be pushing your changes. (Since you own it :D)&#xA;Then, clone of repository so as to do the changes locally and testing them before sending a patch. This should be fairly simple using&#xA;&#xA;2. Make a new branch&#xA;Now, if we want to make a change to the source code, we should always ensure that the master/development branch to be always in sync with upstream. You would definitely not like messing the master branch , and if in case the issue&#39;s priority is not high, the PR will be pending with the changes in master branch.&#xA;&#xA;Other than that, the master branch is &#39;supposed&#39; to  have the updated code(or the production code), the rest of the features are supposed to be done on separate branches before being pushed into production. &#xA;&#xA;Thus, it it is always a good practice to make new branches for each pull request to be opened. To do this use&#xA;This will make the branch in sync with the upstream. If upstream is not added, you can manually add it to remote using &#xA;&#xA;Or alternatively, you can just create a branch and fetch from upstream using:&#xA;   git checkout -b branch_name&#xA;   git fetch upstream&#xA;&#xA;3. Make changes in the created branch and push&#xA;make the required changes and commit them via git add and git commit commands&#xA;After the changes are done, push to your code via&#xA;&#xA;4. Make a pull request&#xA;Usually, just after pushing to github, you would button when you open your repository(on github) clicking on which a PR will be made. It should look something as follows:&#xA;&#xA;PR image&#xA;&#xA;If that doesn&#39;t show automatically, navigate to the branch(on github) and make a PR. &#xA;&#xA;That is it! Now keeps doing the requested changes(if asked) locally and keep pushing code on the created branch till the point it is fit for merging.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Contributing to open source is one of the best ways to hone up programming skills. Along with writing quality code, using a version control tool plays a crucial role while contributing.
There are a lot of source control management platforms such as <a href="https://github.com/" rel="nofollow">github</a> , <a href="https://about.gitlab.com/" rel="nofollow">gitlab</a> , <a href="https://www.phacility.com/" rel="nofollow">phabricator</a> etc.
This blog discusses about making code contributions via github.</p>

<h2 id="so-what-is-a-pull-request">So what Is a Pull Request?</h2>

<p>Pull request, as the name suggests is a patch of code that is sent to original code base to be merged into the source code after review. Usually, maintainers of the project will review the PR(pull request) and merge it into original code base if everything looks okay.</p>

<h2 id="how-to-make-a-pr">How to make a PR?</h2>

<h3 id="1-fork-the-repository-and-clone">1. Fork the Repository and clone</h3>

<p>First off, there should be a fork of the upstream repository. Fork is nothing but a copy of the upstream repository onto your own github. This is where you will be pushing your changes. (Since you own it :D)
Then, clone of repository so as to do the changes locally and testing them before sending a patch. This should be fairly simple using
<code>git clone &lt;repository URL&gt;</code></p>

<h3 id="2-make-a-new-branch">2. Make a new branch</h3>

<p>Now, if we want to make a change to the source code, we should always ensure that the master/development branch to be always in sync with upstream. You would definitely not like messing the master branch , and if in case the issue&#39;s priority is not high, the PR will be pending with the changes in master branch.</p>

<p>Other than that, the master branch is &#39;supposed&#39; to  have the updated code(or the production code), the rest of the features are supposed to be done on separate branches before being pushed into production.</p>

<p>Thus, it it is always a good practice to make new branches for each pull request to be opened. To do this use
<code>git checkout -b &lt;branch_name&gt; -t upstream/master</code>
This will make the branch in sync with the upstream. If upstream is not added, you can manually add it to remote using
<code>git remote add upstream &lt;upstream_URL&gt;</code></p>

<p>Or alternatively, you can just create a branch and fetch from upstream using:</p>

<pre><code>   git checkout -b &lt;branch_name&gt;
   git fetch upstream
</code></pre>

<h3 id="3-make-changes-in-the-created-branch-and-push">3. Make changes in the created branch and push</h3>

<p>make the required changes and commit them via <code>git add</code> and <code>git commit commands</code>
After the changes are done, push to your code via
<code>git push origin &lt;branch_name&gt;</code></p>

<h3 id="4-make-a-pull-request">4. Make a pull request</h3>

<p>Usually, just after pushing to github, you would button when you open your repository(on github) clicking on which a PR will be made. It should look something as follows:</p>

<p><img src="https://raw.githubusercontent.com/nileshpatra/Blogs/master/04.Making%20a%20Pull%20Request/PRimage.png" alt="PR image"></p>

<p>If that doesn&#39;t show automatically, navigate to the branch(on github) and make a PR.</p>

<p>That is it! Now keeps doing the requested changes(if asked) locally and keep pushing code on the created branch till the point it is fit for merging.</p>
]]></content:encoded>
      <author>nileshpatra</author>
      <guid>https://blogs.dgplug.org/read/a/43yq03zhnv</guid>
      <pubDate>Wed, 14 Aug 2019 18:26:11 +0000</pubDate>
    </item>
    <item>
      <title>Lession 3</title>
      <link>https://blogs.dgplug.org/raydeeam/lession-3</link>
      <description>&lt;![CDATA[After resuming my study I&#39;ve learned about File handling (I can recall file handling in C).&#xA;&#xA;File handling&#xA;Python gives us an easy way to manipulate files. We can divide files in two parts, one is test file which contain simple text, and another one is binary file which contain binary data which is only readable by computer.&#xA;&#xA;  File opening&#xA;The key function for working with files in Python is the open() function. The open() function takes two parameters; filename, and mode. There are four different methods (modes) for opening a file: &#xA;&#34;r&#34; - Read - Default value. Opens a file for reading, error if the file does  not exist&#xA;&#34;w&#34; - Write - Opens a file for writing, creates the file if it does not exist&#xA;&#34;a&#34; - Append - Opens a file for appending, creates the file if it does not exist&#xA;&#34;x&#34; - Create - Creates the specified file, returns an error if the file exists&#xA;&#xA;  Creating a file&#xA;To create a new empty file:&#xA;      f = open(&#34;file.txt&#34;, &#34;x&#34;)&#xA;&#xA;  To Create a new file if it does not exist:&#xA;      f = open(&#34;file.txt&#34;, &#34;w&#34;)&#xA;&#xA;  Opening a file&#xA;To open a file we use open() function. It requires two arguments, first the file path or file name, second which mode it should open.&#xA;If we don&#39;t mention any mode then it will open the file as read only.&#xA;      f = open (&#34;file.txt&#34;)&#xA;      f&#xA;io.TextIOWrapper name=&#39;file.txt&#39; mode=&#39;r&#39; encoding=&#39;UTF-8&#39;&#xA;&#xA;  Closing a file&#xA;After opening a file one should always close the opened file. We use method close() for this.&#xA;      f = open (&#34;file.txt&#34;)&#xA;      f&#xA;io.TextIOWrapper name=&#39;file.txt&#39; mode=&#39;r&#39; encoding=&#39;UTF-8&#39;&#xA;      f.close()&#xA;&#xA;  Reading a file&#xA;To read the whole file at once use the read() method.&#xA;      f = open(&#34;sample.txt&#34;)&#xA;      f.read()&#xA;&#39;I am Rayan\nI live in Bangalore\nI am from West Bengal\n&#39;&#xA;If we call read() again it will return empty string as it already read the whole file. readline() can help you to read one line each time from the file.&#xA;      f = open(&#34;sample.txt&#34;)&#xA;      f.readline()&#xA;&#39;I am Rayan\n&#39;&#xA;      f.readline()&#xA;&#39;I live in Bangalore\n&#39;&#xA;To read all the lines in a list we use readlines() method.&#xA;      f = open(&#34;sample.txt&#34;)&#xA;      f.readlines()&#xA;[&#39;I am Rayan\n&#39;, &#39;I live in Bangalore\n&#39;, &#39;I am from West Bengal\n&#39;]&#xA;We can loop through the lines in a file object.&#xA;      f = open(&#34;sample.txt&#34;)&#xA;      for x in f:&#xA;...     print(x, end=&#39; &#39;)&#xA;...&#xA;I am Rayan&#xA;I live in Bangalore&#xA;I am from West Bengal&#xA;Example:&#xA;      f = open(&#34;sample.txt&#34;, &#34;w&#34;)&#xA;      f.write(&#34;I am Rayan\nI live in Bangalore\nI am from West Bengal&#34;)&#xA;      f.close()&#xA;      f = open(&#34;sample.txt&#34;, &#34;r&#34;)&#xA;      print(f.read())&#xA;I am Rayan&#xA;I live in Bangalore&#xA;I am from West Bengal&#xA;  Using the with statement (which I found so cool)&#xA;In real life scenarios we should try to use with statement. It will take care of closing the file for us.&#xA;&#xA;---&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>After resuming my study I&#39;ve learned about File handling (I can recall file handling in C).</p>
<ul><li><p>File handling
Python gives us an easy way to manipulate files. We can divide files in two parts, one is test file which contain simple text, and another one is binary file which contain binary data which is only readable by computer.</p>
<ul><li><p>File opening
The key function for working with files in Python is the open() function. The open() function takes two parameters; filename, and mode. There are four different methods (modes) for opening a file:</p>

<pre><code>&#34;r&#34; - Read - Default value. Opens a file for reading, error if the file does  not exist
&#34;w&#34; - Write - Opens a file for writing, creates the file if it does not exist
&#34;a&#34; - Append - Opens a file for appending, creates the file if it does not exist
&#34;x&#34; - Create - Creates the specified file, returns an error if the file exists
</code></pre></li>

<li><p>Creating a file
To create a new empty file:</p>

<pre><code class="language-python">&gt;&gt;&gt; f = open(&#34;file.txt&#34;, &#34;x&#34;)
</code></pre></li>

<li><p>To Create a new file if it does not exist:</p>

<pre><code class="language-python">&gt;&gt;&gt; f = open(&#34;file.txt&#34;, &#34;w&#34;)
</code></pre></li>

<li><p>Opening a file
To open a file we use open() function. It requires two arguments, first the file path or file name, second which mode it should open.
If we don&#39;t mention any mode then it will open the file as read only.</p>

<pre><code class="language-python">&gt;&gt;&gt; f = open (&#34;file.txt&#34;)
&gt;&gt;&gt; f
&lt;_io.TextIOWrapper name=&#39;file.txt&#39; mode=&#39;r&#39; encoding=&#39;UTF-8&#39;&gt;
</code></pre></li>

<li><p>Closing a file
After opening a file one should always close the opened file. We use method close() for this.</p>

<pre><code class="language-python">&gt;&gt;&gt; f = open (&#34;file.txt&#34;)
&gt;&gt;&gt; f
&lt;_io.TextIOWrapper name=&#39;file.txt&#39; mode=&#39;r&#39; encoding=&#39;UTF-8&#39;&gt;
&gt;&gt;&gt; f.close()
</code></pre></li>

<li><p>Reading a file
To read the whole file at once use the read() method.</p>

<pre><code class="language-python">&gt;&gt;&gt; f = open(&#34;sample.txt&#34;)
&gt;&gt;&gt; f.read()
&#39;I am Rayan\nI live in Bangalore\nI am from West Bengal\n&#39;
</code></pre>

<p>If we call read() again it will return empty string as it already read the whole file. readline() can help you to read one line each time from the file.</p>

<pre><code class="language-python">&gt;&gt;&gt; f = open(&#34;sample.txt&#34;)
&gt;&gt;&gt; f.readline()
&#39;I am Rayan\n&#39;
&gt;&gt;&gt; f.readline()
&#39;I live in Bangalore\n&#39;
</code></pre>

<p>To read all the lines in a list we use readlines() method.</p>

<pre><code class="language-python">&gt;&gt;&gt; f = open(&#34;sample.txt&#34;)
&gt;&gt;&gt; f.readlines()
[&#39;I am Rayan\n&#39;, &#39;I live in Bangalore\n&#39;, &#39;I am from West Bengal\n&#39;]
</code></pre>

<p>We can loop through the lines in a file object.</p>

<pre><code class="language-python">&gt;&gt;&gt; f = open(&#34;sample.txt&#34;)
&gt;&gt;&gt; for x in f:
...     print(x, end=&#39; &#39;)
...
I am Rayan
I live in Bangalore
I am from West Bengal
</code></pre>

<p>Example:</p>

<pre><code class="language-python">&gt;&gt;&gt; f = open(&#34;sample.txt&#34;, &#34;w&#34;)
&gt;&gt;&gt; f.write(&#34;I am Rayan\nI live in Bangalore\nI am from West Bengal&#34;)
&gt;&gt;&gt; f.close()
&gt;&gt;&gt; f = open(&#34;sample.txt&#34;, &#34;r&#34;)
&gt;&gt;&gt; print(f.read())
I am Rayan
I live in Bangalore
I am from West Bengal
</code></pre></li>

<li><p>Using the with statement (which I found so cool)
In real life scenarios we should try to use with statement. It will take care of closing the file for us.</p></li></ul></li></ul>

<hr>
]]></content:encoded>
      <author>Stories of raydeeam</author>
      <guid>https://blogs.dgplug.org/read/a/34m1jnshtg</guid>
      <pubDate>Tue, 13 Aug 2019 21:37:59 +0000</pubDate>
    </item>
    <item>
      <title>Lesson 2 </title>
      <link>https://blogs.dgplug.org/raydeeam/lesson-2</link>
      <description>&lt;![CDATA[Today I read about few things those are listed below:&#xA;&#xA; Data Structures in Python&#xA;   Data structures is a way to store and organize data. Obviously, some data structures are good in one set of problems, but terrible in other ones. The right choice of data structure can make your code faster, more efficient with memory and even more readable for other human beings. Python has few in-built data structures. &#xA;  Lists&#xA;List is a sequence of elements. It can store anything: numbers, strings, other lists, functions and etc. The fact that it can store anything is great but it has a disadvantage. This kind of list will require more memory.&#xA;Let’s take a look at a basic example of list:&#xA;create list&#xA;      list= [&#39;Noname&#39;, &#39;Rayan&#39;, &#39;xyz&#39;, 100, 42, 55]&#xA;      list&#xA;[&#39;Noname&#39;, &#39;Rayan&#39;, &#39;xyz&#39;, 100, 42, 55]&#xA;check if element is in list&#xA;      42 in list&#xA;True&#xA;  Tuples&#xA;Another way to store a sequence of elements is to use tuples. Tuple is basically the same thing as list but with one difference. You can’t add or remove elements from tuples after initialization. It’s immutable data structure.&#xA;      a = (&#39;Noname&#39;, &#39;Rayan&#39;, &#39;xyz&#39;, 100, 42, 55)&#xA;a&#xA;      (&#39;Noname&#39;, &#39;Rayan&#39;, &#39;xyz&#39;, 100, 42, 55)&#xA;  Dictionary&#xA;nother important data structure is dictionary. The difference between dictionary and list is that you access elements in dictionary by key, not by index.&#xA;      dict = {&#39;Rayan&#39;: &#39;Das&#39;,&#39;Kushal&#39;: &#39;Das&#39;,&#39;Sayan&#39;: &#39;Chowdhury&#39;}&#xA;      dict&#xA;{&#39;Rayan&#39;: &#39;Das&#39;, &#39;Kushal&#39;: &#39;Das&#39;, &#39;Sayan&#39;: &#39;Chowdhury&#39;}&#xA;  Sets&#xA;Set stores only unique elements.&#xA;      letters = {&#39;a&#39;, &#39;b&#39;, &#39;c&#39;}&#xA;      &#39;c&#39; in letters&#xA;True&#xA;      letters.add(&#39;d&#39;)&#xA;      letters&#xA;{&#39;c&#39;, &#39;b&#39;, &#39;d&#39;, &#39;a&#39;}&#xA;Strings&#xA;In Python we declare strings in between “” or ‘’ or ‘’’ ‘’’ or “”” “”“&#xA;There are different methods available for strings.&#xA;  Strip a String&#xA;Got to know how to strip a string.&#xA;Functions&#xA;A function is a block of code which only runs when it is called. You can pass data, known as parameters, into a function. A function can return data as a result.&#xA;   Defining a function&#xA;This way we can define a function.&#xA;      def func(params):&#xA;...     statement1&#xA;...     statement2&#xA;&#xA;  Calling a function&#xA;      def func():&#xA;...     print(&#34;hello from func&#34;)&#xA;... &#xA;      func()&#xA;hello from func&#xA;  Local and Global variables&#xA;  Keyward only arguments&#xA;We can also mark the arguments of function as keyword only. That way while calling the function, the user will be forced to use correct keyword for each parameter.&#xA;  Docstrings&#xA;We use docstrings in Python to explain how to use the code, it will be useful in interactive mode and to create auto-documentation.&#xA;  Got to know about Higher-order function.&#xA;It does at least one of the following step inside:&#xA;        -Takes one or more functions as argument.&#xA;        -Returns another function as output.&#xA;  Map function&#xA;map is a very useful higher order function in Python. It takes one function and an iterator as input and then applies the function on each value of the iterator and returns a list of results.&#xA;&#xA;---]]&gt;</description>
      <content:encoded><![CDATA[<p>Today I read about few things those are listed below:</p>
<ul><li><p>Data Structures in Python
Data structures is a way to store and organize data. Obviously, some data structures are good in one set of problems, but terrible in other ones. The right choice of data structure can make your code faster, more efficient with memory and even more readable for other human beings. Python has few in-built data structures.</p>
<ul><li><p>Lists
List is a sequence of elements. It can store anything: numbers, strings, other lists, functions and etc. The fact that it can store anything is great but it has a disadvantage. This kind of list will require more memory.
Let’s take a look at a basic example of list:</p>

<pre><code class="language-python"># create list
&gt;&gt;&gt; list= [&#39;Noname&#39;, &#39;Rayan&#39;, &#39;xyz&#39;, 100, 42, 55]
&gt;&gt;&gt; list
[&#39;Noname&#39;, &#39;Rayan&#39;, &#39;xyz&#39;, 100, 42, 55]
# check if element is in list
&gt;&gt;&gt; 42 in list
True
</code></pre></li>

<li><p>Tuples
Another way to store a sequence of elements is to use tuples. Tuple is basically the same thing as list but with one difference. You can’t add or remove elements from tuples after initialization. It’s immutable data structure.</p>

<pre><code class="language-python">&gt;&gt;&gt; a = (&#39;Noname&#39;, &#39;Rayan&#39;, &#39;xyz&#39;, 100, 42, 55)
a
&gt;&gt;&gt; (&#39;Noname&#39;, &#39;Rayan&#39;, &#39;xyz&#39;, 100, 42, 55)
</code></pre></li>

<li><p>Dictionary
nother important data structure is dictionary. The difference between dictionary and list is that you access elements in dictionary by key, not by index.</p>

<pre><code class="language-python">&gt;&gt;&gt; dict = {&#39;Rayan&#39;: &#39;Das&#39;,&#39;Kushal&#39;: &#39;Das&#39;,&#39;Sayan&#39;: &#39;Chowdhury&#39;}
&gt;&gt;&gt; dict
{&#39;Rayan&#39;: &#39;Das&#39;, &#39;Kushal&#39;: &#39;Das&#39;, &#39;Sayan&#39;: &#39;Chowdhury&#39;}
</code></pre></li>

<li><p>Sets
Set stores only unique elements.</p>

<pre><code class="language-python">&gt;&gt;&gt; letters = {&#39;a&#39;, &#39;b&#39;, &#39;c&#39;}
&gt;&gt;&gt; &#39;c&#39; in letters
True
&gt;&gt;&gt; letters.add(&#39;d&#39;)
&gt;&gt;&gt; letters
{&#39;c&#39;, &#39;b&#39;, &#39;d&#39;, &#39;a&#39;}
</code></pre></li></ul></li>

<li><p>Strings
In Python we declare strings in between “” or ‘’ or ‘’’ ‘’’ or “”” “”“
There are different methods available for strings.</p>
<ul><li>Strip a String
Got to know how to strip a string.</li></ul></li>

<li><p>Functions
A function is a block of code which only runs when it is called. You can pass data, known as parameters, into a function. A function can return data as a result.</p>
<ul><li><p>Defining a function
This way we can define a function.</p>

<pre><code class="language-python">&gt;&gt;&gt; def func(params):
...     statement1
...     statement2
</code></pre></li>

<li><p>Calling a function</p>

<pre><code class="language-python">&gt;&gt;&gt; def func():
...     print(&#34;hello from func&#34;)
... 
&gt;&gt;&gt; func()
hello from func
</code></pre></li>

<li><p>Local and Global variables</p></li>

<li><p>Keyward only arguments
We can also mark the arguments of function as keyword only. That way while calling the function, the user will be forced to use correct keyword for each parameter.</p></li>

<li><p>Docstrings
We use docstrings in Python to explain how to use the code, it will be useful in interactive mode and to create auto-documentation.</p></li>

<li><p>Got to know about Higher-order function.
It does at least one of the following step inside:
-Takes one or more functions as argument.
-Returns another function as output.</p></li>

<li><p>Map function
map is a very useful higher order function in Python. It takes one function and an iterator as input and then applies the function on each value of the iterator and returns a list of results.</p></li></ul></li></ul>

<hr>
]]></content:encoded>
      <author>Stories of raydeeam</author>
      <guid>https://blogs.dgplug.org/read/a/ghcrwzxn2e</guid>
      <pubDate>Sun, 11 Aug 2019 17:53:54 +0000</pubDate>
    </item>
    <item>
      <title>Lesson 1</title>
      <link>https://blogs.dgplug.org/raydeeam/lesson-1</link>
      <description>&lt;![CDATA[I&#39;ve started Python again from Pym book by Kushal&#xA;&#xA;Read about following topic and solved few basic problems.&#xA;&#xA;Data types&#xA;f-string ( Which I found so cool)&#xA;Type conversion&#xA;Conditional statements&#xA;Loops&#xA;  When I started Python back in college I found it so confusing but then I got to know how it works. &#xA;&#xA;I&#39;ve paused here. Cleared all my basics again till now. Basics are the key ingredients in long run I believe. &#xA;---&#xA;About me&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>I&#39;ve started Python again from <a href="https://pymbook.readthedocs.io/en/latest/" rel="nofollow">Pym book</a> by <a href="https://kushaldas.in" rel="nofollow">Kushal</a></p>

<p>Read about following topic and solved few basic problems.</p>
<ul><li>Data types</li>
<li>f-string ( Which I found so cool)</li>
<li>Type conversion</li>
<li>Conditional statements</li>
<li>Loops
<ul><li>When I started Python back in college I found it so confusing but then I got to know how it works.</li></ul></li></ul>

<p>I&#39;ve paused here. Cleared all my basics again till now. Basics are the key ingredients in long run I believe.</p>

<hr>

<p><a href="https://ryand91.github.io/whoami/" rel="nofollow">About me</a></p>
]]></content:encoded>
      <author>Stories of raydeeam</author>
      <guid>https://blogs.dgplug.org/read/a/ei1z0ucium</guid>
      <pubDate>Fri, 09 Aug 2019 17:45:02 +0000</pubDate>
    </item>
    <item>
      <title>Learning Is Never Easy</title>
      <link>https://blogs.dgplug.org/raydeeam/learning-is-never-easy</link>
      <description>&lt;![CDATA[As I said learning is never easy. At least for me. When I first started learning Python from youtube back in my college, Every time tutorials starts with Variables, Operators and Expressions. I thought it&#39;s more like C/C++ and then I used to pause the tutorial and procrastinate. I procrastinate so much that I procrastinate the actual procrastination. &#xA;&#xA;Well later I realized that I&#39;ve wasted the time. But then I&#39;ve started again and this time through docs. Yes from PYM book and blogs. I think docs gave me a better picture. I&#39;m still learning. It&#39;s not that thing that you can complete within a week. Better things take time.&#xA;Here are few things for beginners who is getting started with Python.&#xA;&#xA;Whitespaces and indentation:&#xA;Whitespace and indentation in Python is important. Whitespace in the beginning of the line called indentation. For wrong indentation Python throws an error. Example:&#xA;&#xA;      a=10&#xA;      b=20&#xA;  File &#34;stdin&#34;, line 1&#xA;    b=20&#xA;    ^&#xA;IndentationError: unexpected indent&#xA;There are more places where we should be following the same type of whitespace rules:&#xA;&#xA;Add a space after “,” in dicts, lists, tuples, and argument lists and after “:” in dicts.&#xA;Spaces around assignments and comparisons (except in argument list)&#xA;No spaces just inside parentheses.&#xA;&#xA;Comments:&#xA;Comments are simple English to explain what this code does. It&#39;s easier to understand your code if you follow proper commenting for every code snippets. Comment line starts with # and everything after is considered as a comment. Example:&#xA;&#xA;This is a comment&#xA;a = 10&#xA;b=20&#xA;This line will add two numbers&#xA;a+b&#xA;Multi Line Comments:&#xA;&#xA;This is a comment&#xA;written in&#xA;more than just one line&#xA;print(&#34;Hey there&#34;)&#xA;or we can add a multiline string (triple quotes) in our code, and place our comment inside it.&#xA;&#xA;&#39;&#39;&#39;&#xA;This is a comment&#xA;written in&#xA;more than just one line&#xA;&#39;&#39;&#39;&#xA;print(&#34;Hey there&#34;) &#xA;&#xA;Modules:&#xA;Consider a module to be the same as a code library. A file containing a set of functions you want to include in your application. To create a module just save the code you want in a file with the file extension .py To use a module you have to import it first. Example:&#xA;      import math&#xA;      math.sqrt(16)&#xA;4.0&#xA;Keywords and Identifiers:&#xA;Following identifiers are used as a keywords and these can not be used as an ordinary identifiers. &#xA;False         class          finally          is                     return&#xA;None        continue     for               lambda            try&#xA;True          def            from             nonlocal          while&#xA;and           del              global          not                 with&#xA;as              elif             if                  or                    yield&#xA;assert       else             import         pass&#xA;break        except         in                raise&#xA;&#xA;In Python we don’t specify what kind of data we are going to put in a variable. So you can directly write abc = 1 and abc will become an integer datatype. If you write abc = 1.0 abc will become of floating type. Example:&#xA;      a=10&#xA;      b=20.0&#xA;      type(a)&#xA;type &#39;int&#39;&#xA;      type(b)&#xA;type &#39;float&#39;&#xA;From the above example you can understand that to declare a variable in Python , what you need is just to type the name and the value. Python can also manipulate strings They can be enclosed in single quotes or double quotes like:&#xA;      &#39;Python is not a snake&#39;&#xA;&#39;Python is not a snake&#39;&#xA;      &#34;Python is a programming language&#34;&#xA;&#39;Python is a programming language&#39;&#xA;Input from Keyboard:&#xA;Generally the real life Python codes do not need to read input from the keyboard. In Python we use input function to do input. &#xA;$ vim hello.py&#xA;&#xA;number = int(input(&#34;Enter an integer: &#34;))&#xA;if number &lt; 100:&#xA;    print(&#34;Your number is smaller than 100&#34;)&#xA;else:&#xA;    print(&#34;Your number is greater than 100&#34;)&#xA;Output:&#xA;$ ./hello.py&#xA;Enter an integer: 229&#xA;Your number is greater than 100&#xA;$ ./hello.py&#xA;Enter an integer: 1&#xA;Your number is smaller than 100&#xA;Multiple assignments in a single line:&#xA;We can assign values to multiple variables in a single line:&#xA;      i, j = 100, 200&#xA;      a&#xA;100&#xA;      b&#xA;200&#xA;&#xA;Operators and Expressions:&#xA;&#xA;Operators are used to perform operations on variables and values. Python provides few operators which are below listed:&#xA;&#xA;Arithmetic operators&#xA;Assignment operators&#xA;Comparison operators&#xA;Logical operators&#xA;Identity operators&#xA;Membership operators&#xA;Bitwise operators&#xA;&#xA;Arithmetic operator:&#xA;Arithmetic operators are used with numeric values to perform common mathematical operations:&#xA;      x=10&#xA;      y=10&#xA;      x+y #Addition&#xA;20&#xA;      x-y #Subtraction&#xA;0&#xA;      xy #Multiplication&#xA;100&#xA;      x/y #Division&#xA;1.0&#xA;      x%y #Modulus&#xA;0&#xA;      xy #Exponentiation&#xA;10000000000&#xA;      x//y #Floor division&#xA;1&#xA;Assignment operator:&#xA;Assignment operators are used to assign values to variables:&#xA;      x = 5&#xA;      x += 5&#xA;      x -= 5&#xA;      x = 5&#xA;      x /= 5&#xA;Comparison operator:&#xA;Comparison operators are used to compare two values:&#xA;      x == y&#xA;      x != y&#xA;      x   y&#xA;      x &lt; y&#xA;      x   = y&#xA;      x&lt;= y&#xA;Logical operator:&#xA;and #Returns True if both statements are true&#xA;or #Returns True if one of the statements is true&#xA;not #Reverse the result, returns False if the result is true&#xA;Identity operator:&#xA;is #Returns true if both variables are the same object&#xA;is not #Returns true if both variables are not the same object&#xA;Membership operator:&#xA;in #Returns True if a sequence with the specified value is present in the object&#xA;not in #Returns True if a sequence with the specified value is not present in the object&#xA;Bitwise operator:&#xA;&amp; #AND- Sets each bit to 1 if both bits are 1&#xA;| #OR- Sets each bit to 1 if one of two bits is 1&#xA;^ #XOR- Sets each bit to 1 if only one of two bits is 1&#xA;~ #NOR- Inverts all the bits&#xA;&lt;&lt; #Zero fill lest shift (Shift left by pushing zeros in from the right and let the leftmost bits fall off)&#xA;    #Signed fill right shift (Shift right by pushing copies of the leftmost bit in from the left, and let the rightmost bits fall off)&#xA;&#xA;---]]&gt;</description>
      <content:encoded><![CDATA[<p>As I said learning is never easy. At least for me. When I first started learning Python from youtube back in my college, Every time tutorials starts with Variables, Operators and Expressions. I thought it&#39;s more like C/C++ and then I used to pause the tutorial and procrastinate. I procrastinate so much that I procrastinate the actual procrastination.</p>

<p>Well later I realized that I&#39;ve wasted the time. But then I&#39;ve started again and this time through docs. Yes from PYM book and blogs. I think docs gave me a better picture. I&#39;m still learning. It&#39;s not that thing that you can complete within a week. Better things take time.
Here are few things for beginners who is getting started with Python.</p>

<h3 id="whitespaces-and-indentation">Whitespaces and indentation:</h3>

<p>Whitespace and indentation in Python is important. Whitespace in the beginning of the line called indentation. For wrong indentation Python throws an error. Example:</p>

<pre><code class="language-python">&gt;&gt;&gt; a=10
&gt;&gt;&gt;    b=20
  File &#34;&lt;stdin&gt;&#34;, line 1
    b=20
    ^
IndentationError: unexpected indent
</code></pre>

<p>There are more places where we should be following the same type of whitespace rules:</p>
<ul><li>Add a space after “,” in dicts, lists, tuples, and argument lists and after “:” in dicts.</li>
<li>Spaces around assignments and comparisons (except in argument list)</li>
<li>No spaces just inside parentheses.</li></ul>

<h3 id="comments">Comments:</h3>

<p>Comments are simple English to explain what this code does. It&#39;s easier to understand your code if you follow proper commenting for every code snippets. Comment line starts with # and everything after is considered as a comment. Example:</p>

<pre><code class="language-python">#This is a comment
a = 10
b=20
#This line will add two numbers
a+b
</code></pre>

<p>Multi Line Comments:</p>

<pre><code class="language-python">#This is a comment
#written in
#more than just one line
print(&#34;Hey there&#34;)
</code></pre>

<p>or we can add a multiline string (triple quotes) in our code, and place our comment inside it.</p>

<pre><code class="language-python">&#39;&#39;&#39;
This is a comment
written in
more than just one line
&#39;&#39;&#39;
print(&#34;Hey there&#34;) 
</code></pre>

<h3 id="modules">Modules:</h3>

<p>Consider a module to be the same as a code library. A file containing a set of functions you want to include in your application. To create a module just save the code you want in a file with the file extension .py To use a module you have to import it first. Example:</p>

<pre><code class="language-python">&gt;&gt;&gt; import math
&gt;&gt;&gt; math.sqrt(16)
4.0
</code></pre>

<h4 id="keywords-and-identifiers">Keywords and Identifiers:</h4>

<p>Following identifiers are used as a keywords and these can not be used as an ordinary identifiers.
False         class          finally          is                     return
None        continue     for               lambda            try
True          def            from             nonlocal          while
and           del              global          not                 with
as              elif             if                  or                    yield
assert       else             import         pass
break        except         in                raise</p>

<p>In Python we don’t specify what kind of data we are going to put in a variable. So you can directly write abc = 1 and abc will become an integer datatype. If you write abc = 1.0 abc will become of floating type. Example:</p>

<pre><code class="language-python">&gt;&gt;&gt; a=10
&gt;&gt;&gt; b=20.0
&gt;&gt;&gt; type(a)
&lt;type &#39;int&#39;&gt;
&gt;&gt;&gt; type(b)
&lt;type &#39;float&#39;&gt;
</code></pre>

<p>From the above example you can understand that to declare a variable in Python , what you need is just to type the name and the value. Python can also manipulate strings They can be enclosed in single quotes or double quotes like:</p>

<pre><code class="language-python">&gt;&gt;&gt; &#39;Python is not a snake&#39;
&#39;Python is not a snake&#39;
&gt;&gt;&gt; &#34;Python is a programming language&#34;
&#39;Python is a programming language&#39;
</code></pre>

<h4 id="input-from-keyboard">Input from Keyboard:</h4>

<p>Generally the real life Python codes do not need to read input from the keyboard. In Python we use input function to do input.</p>

<pre><code class="language-python">$ vim hello.py

number = int(input(&#34;Enter an integer: &#34;))
if number &lt; 100:
    print(&#34;Your number is smaller than 100&#34;)
else:
    print(&#34;Your number is greater than 100&#34;)
</code></pre>

<p>Output:</p>

<pre><code class="language-shell">$ ./hello.py
Enter an integer: 229
Your number is greater than 100
$ ./hello.py
Enter an integer: 1
Your number is smaller than 100
</code></pre>

<h4 id="multiple-assignments-in-a-single-line">Multiple assignments in a single line:</h4>

<p>We can assign values to multiple variables in a single line:</p>

<pre><code class="language-python">&gt;&gt;&gt; i, j = 100, 200
&gt;&gt;&gt; a
100
&gt;&gt;&gt; b
200
</code></pre>

<h3 id="operators-and-expressions">Operators and Expressions:</h3>

<p>Operators are used to perform operations on variables and values. Python provides few operators which are below listed:</p>
<ul><li>Arithmetic operators</li>
<li>Assignment operators</li>
<li>Comparison operators</li>
<li>Logical operators</li>
<li>Identity operators</li>
<li>Membership operators</li>
<li>Bitwise operators</li></ul>

<h4 id="arithmetic-operator">Arithmetic operator:</h4>

<p>Arithmetic operators are used with numeric values to perform common mathematical operations:</p>

<pre><code class="language-python">&gt;&gt;&gt; x=10
&gt;&gt;&gt; y=10
&gt;&gt;&gt; x+y #Addition
20
&gt;&gt;&gt; x-y #Subtraction
0
&gt;&gt;&gt; x*y #Multiplication
100
&gt;&gt;&gt; x/y #Division
1.0
&gt;&gt;&gt; x%y #Modulus
0
&gt;&gt;&gt; x**y #Exponentiation
10000000000
&gt;&gt;&gt; x//y #Floor division
1
</code></pre>

<h4 id="assignment-operator">Assignment operator:</h4>

<p>Assignment operators are used to assign values to variables:</p>

<pre><code class="language-python">&gt;&gt;&gt; x = 5
&gt;&gt;&gt; x += 5
&gt;&gt;&gt; x -= 5
&gt;&gt;&gt; x *= 5
&gt;&gt;&gt; x /= 5
</code></pre>

<h5 id="comparison-operator">Comparison operator:</h5>

<p>Comparison operators are used to compare two values:</p>

<pre><code class="language-python">&gt;&gt;&gt; x == y
&gt;&gt;&gt; x != y
&gt;&gt;&gt; x &gt; y
&gt;&gt;&gt; x &lt; y
&gt;&gt;&gt; x &gt;= y
&gt;&gt;&gt; x&lt;= y
</code></pre>

<h4 id="logical-operator">Logical operator:</h4>

<pre><code class="language-python">and #Returns True if both statements are true
or #Returns True if one of the statements is true
not #Reverse the result, returns False if the result is true
</code></pre>

<h4 id="identity-operator">Identity operator:</h4>

<pre><code class="language-python">is #Returns true if both variables are the same object
is not #Returns true if both variables are not the same object
</code></pre>

<h4 id="membership-operator">Membership operator:</h4>

<pre><code class="language-python">in #Returns True if a sequence with the specified value is present in the object
not in #Returns True if a sequence with the specified value is not present in the object
</code></pre>

<h4 id="bitwise-operator">Bitwise operator:</h4>

<pre><code class="language-python">&amp; #AND- Sets each bit to 1 if both bits are 1
| #OR- Sets each bit to 1 if one of two bits is 1
^ #XOR- Sets each bit to 1 if only one of two bits is 1
~ #NOR- Inverts all the bits
&lt;&lt; #Zero fill lest shift (Shift left by pushing zeros in from the right and let the leftmost bits fall off)
&gt;&gt; #Signed fill right shift (Shift right by pushing copies of the leftmost bit in from the left, and let the rightmost bits fall off)
</code></pre>

<hr>
]]></content:encoded>
      <author>Stories of raydeeam</author>
      <guid>https://blogs.dgplug.org/read/a/4cxbtjt4ar</guid>
      <pubDate>Fri, 09 Aug 2019 09:31:03 +0000</pubDate>
    </item>
    <item>
      <title>A GitHub PR</title>
      <link>https://blogs.dgplug.org/raydeeam/a-github-pr</link>
      <description>&lt;![CDATA[This will guide you through making a pull request to a Git repository through the terminal so that you can make your life easier while working on a project.&#xA;&#xA;How it works:&#xA;    A developer creates the feature in a dedicated branch in their local repo.&#xA;    The developer pushes the branch to a public GitHub repository.&#xA;    The developer files a pull request&#xA;    The rest of the team reviews the code, discusses it, and alters it.&#xA;    The project maintainer merges the feature into the official repository and closes the pull request.&#xA;&#xA;Fork a Repository:&#xA;To create a pull request you need to have made your code changes on a separate branch or forked repository. To fork a repository you need to open the repository and click on the fork button. You&#39;ll get a copy of the repository after fork. You can work with forked repository made your code changes then create a PR.&#xA;&#xA;Clone the Repository:&#xA;To make your own local copy of the repository you would like to contribute to, let&#39;s fire up the terminal.&#xA;We&#39;ll use git clone command with the URL that points to your fork of the repository. &#xA;&#xA;$  git clone https://github.com/username/repository.git&#xA;&#xA;Create a Branch:&#xA;To avoid trouble later, let&#39;s create a new branch in our repo so that the work you&#39;ll do is sorted separately. &#xA;&#xA;$ git checkout -b [branch-name]&#xA;&#xA;This command will create a new branch in your repo and switch to it.&#xA;&#xA;Make changes locally:&#xA;This is where you&#39;ll add your features. If you create a new file remember to add it with git add command and commit them by git commit -m&#xA;&#xA;$  git add [file-name]&#xA;$  git commit -m [commit-message] &#xA;&#xA;At this point you can use git push command to push the changes to the current branch of your forked repo.&#xA;&#xA;$  git push origin [new-branch]&#xA;&#xA;Make the Pull Request:&#xA;This is the most simple step if till now you&#39;ve done correctly. Now click on the New pull request button in your forked repo. Write down a nice report explaining why these changes should be included in the official source of your project and then confirm. Project author will get a notification that you submitted a PR. They will review your code and you&#39;ll get notification for their further actions. They may reject your PR or they may suggest something for changes. Go back, edit it and push again. PR will be automatically updated. If the maintainer is want to integrate your contributions to the project, the maintainer have to click Merge and your code will become a part of the original repo.&#xA;---]]&gt;</description>
      <content:encoded><![CDATA[<p>This will guide you through making a pull request to a Git repository through the terminal so that you can make your life easier while working on a project.</p>

<h2 id="how-it-works">How it works:</h2>

<p>    1. A developer creates the feature in a dedicated branch in their local repo.
    2. The developer pushes the branch to a public GitHub repository.
    3. The developer files a pull request
    4. The rest of the team reviews the code, discusses it, and alters it.
    5. The project maintainer merges the feature into the official repository and closes the pull request.</p>

<h2 id="fork-a-repository">Fork a Repository:</h2>

<p>To create a pull request you need to have made your code changes on a separate branch or forked repository. To fork a repository you need to open the repository and click on the fork button. You&#39;ll get a copy of the repository after fork. You can work with forked repository made your code changes then create a PR.</p>

<h2 id="clone-the-repository">Clone the Repository:</h2>

<p>To make your own local copy of the repository you would like to contribute to, let&#39;s fire up the terminal.
We&#39;ll use <code>git clone</code> command with the URL that points to your fork of the repository.</p>

<p><code>$  git clone https://github.com/username/repository.git</code></p>

<h2 id="create-a-branch">Create a Branch:</h2>

<p>To avoid trouble later, let&#39;s create a new branch in our repo so that the work you&#39;ll do is sorted separately.</p>

<p><code>$ git checkout -b [branch-name]</code></p>

<p>This command will create a new branch in your repo and switch to it.</p>

<h2 id="make-changes-locally">Make changes locally:</h2>

<p>This is where you&#39;ll add your features. If you create a new file remember to add it with git add command and commit them by <code>git commit -m</code></p>

<p><code>$  git add [file-name]</code>
<code>$  git commit -m [commit-message]</code></p>

<p>At this point you can use <code>git push</code> command to push the changes to the current branch of your forked repo.</p>

<p><code>$  git push origin [new-branch]</code></p>

<h2 id="make-the-pull-request">Make the Pull Request:</h2>

<p>This is the most simple step if till now you&#39;ve done correctly. Now click on the <code>New pull request</code> button in your forked repo. Write down a nice report explaining why these changes should be included in the official source of your project and then confirm. Project author will get a notification that you submitted a PR. They will review your code and you&#39;ll get notification for their further actions. They may reject your PR or they may suggest something for changes. Go back, edit it and push again. PR will be automatically updated. If the maintainer is want to integrate your contributions to the project, the maintainer have to click <code>Merge</code> and your code will become a part of the original repo.</p>

<hr>
]]></content:encoded>
      <author>Stories of raydeeam</author>
      <guid>https://blogs.dgplug.org/read/a/7iitrk683t</guid>
      <pubDate>Thu, 08 Aug 2019 09:32:28 +0000</pubDate>
    </item>
    <item>
      <title>Yeah!, Finally I am writing my first blog</title>
      <link>https://blogs.dgplug.org/abbisk/yeah-finally-i-am-writing-my-first-blog</link>
      <description>&lt;![CDATA[I was thinking to note down my thoughts so that I can share my experience. So here it is, about how I joined &#39;dgplug&#39; and get to know about Open-Source.&#xA;&#xA;During my B.Tech 3rd semester somehow I got to know about the word &#39;Open-Source&#39;. After a year when I was a fifth semester student, I met &#39;Ratnadeep(rtnpro)&#39; in a tech-talk at my college,talk was over Open-Source , Its opportunities and freedom.Open Source culture was a myth in my college, very few people knew about Open-Source and its freedom of learning. In my batch, hardly fifty percent people know about Open-Source and Communities. During the talk &#39;Ratnadeep debnath(rtnpro)&#39; mentioned about &#39;dgplug&#39; summer training program and also told about &#39;Kushal das(kushal)&#39; and other &#39;dgplug&#39; operators, in those days I was learning python so after the talk a name was coming again and again in my mind that was &#39;Kushal das(kushal)&#39;, there were many questions and doubts were in my mind e.g. how to start, where to start then I decided to ping &#39;Ratnadeep debnath(rtnpro)&#39; and he helped me a lot. I was a hindi background student till my 12th standard so I was a little bit shy to talk ans also I was a window user in those days then &#39;Ratnadeep debnath(rtnpro)&#39; suggested me to shift over fedora, and also suggest to join IRC to get enrolled in &#39;dgplug&#39; where masterminds like Kushal, Ratnadeep(rtnpro), Sayan, Chandan , Jasonbraganza were there. Summer training program had been started 15 days before i joined. &#39;Kushal das&#39; suggested me to go through the logs, I did that. Kushal das(kushal) provided his book for python named &#39;Python you and me&#39;, book helped me a lot to understand python with a decent practice.&#xA;https://pymbook.readthedocs.io/en/latest/&#xA;I started digging more about Open-Source and i got my interests in it. At the beginning, after trying on my own, I lost hope because I was struggling to learn to contribute and thought that it&#39;s impossible ,I started staying on &#39;dgplug&#39; after sessions and listened to people what they are taking and used to ask questions frequently whenever doubt appeared in my mind as time passed thing became easier, it&#39;s just start for me many thing to go. Jasonbraganza&#39;s sessions over reading and writing importance was amazing and encouraged me and many more to write, I am very much thankful to him for his kind help.&#xA;That&#39;s how it all started for me.]]&gt;</description>
      <content:encoded><![CDATA[<p>I was thinking to note down my thoughts so that I can share my experience. So here it is, about how I joined &#39;dgplug&#39; and get to know about Open-Source.</p>

<p>During my B.Tech 3rd semester somehow I got to know about the word &#39;Open-Source&#39;. After a year when I was a fifth semester student, I met &#39;Ratnadeep(rtnpro)&#39; in a tech-talk at my college,talk was over Open-Source , Its opportunities and freedom.Open Source culture was a myth in my college, very few people knew about Open-Source and its freedom of learning. In my batch, hardly fifty percent people know about Open-Source and Communities. During the talk &#39;Ratnadeep debnath(rtnpro)&#39; mentioned about &#39;dgplug&#39; summer training program and also told about &#39;Kushal das(kushal)&#39; and other &#39;dgplug&#39; operators, in those days I was learning python so after the talk a name was coming again and again in my mind that was &#39;Kushal das(kushal)&#39;, there were many questions and doubts were in my mind e.g. how to start, where to start then I decided to ping &#39;Ratnadeep debnath(rtnpro)&#39; and he helped me a lot. I was a hindi background student till my 12th standard so I was a little bit shy to talk ans also I was a window user in those days then &#39;Ratnadeep debnath(rtnpro)&#39; suggested me to shift over fedora, and also suggest to join IRC to get enrolled in &#39;dgplug&#39; where masterminds like Kushal, Ratnadeep(rtnpro), Sayan, Chandan , Jasonbraganza were there. Summer training program had been started 15 days before i joined. &#39;Kushal das&#39; suggested me to go through the logs, I did that. Kushal das(kushal) provided his book for python named &#39;Python you and me&#39;, book helped me a lot to understand python with a decent practice.
<a href="https://pymbook.readthedocs.io/en/latest/" rel="nofollow">https://pymbook.readthedocs.io/en/latest/</a>
I started digging more about Open-Source and i got my interests in it. At the beginning, after trying on my own, I lost hope because I was struggling to learn to contribute and thought that it&#39;s impossible ,I started staying on &#39;dgplug&#39; after sessions and listened to people what they are taking and used to ask questions frequently whenever doubt appeared in my mind as time passed thing became easier, it&#39;s just start for me many thing to go. Jasonbraganza&#39;s sessions over reading and writing importance was amazing and encouraged me and many more to write, I am very much thankful to him for his kind help.
That&#39;s how it all started for me.</p>
]]></content:encoded>
      <guid>https://blogs.dgplug.org/read/a/ak3qtmdmg5</guid>
      <pubDate>Sat, 03 Aug 2019 16:17:14 +0000</pubDate>
    </item>
    <item>
      <title>Amazing git commands and facts</title>
      <link>https://blogs.dgplug.org/nileshpatra/amazing-git-commands-and-facts</link>
      <description>&lt;![CDATA[I have been using git from quite some time, but there are certain amazing things about git that I learnt just recently.&#xA;&#xA;1. Blaming with git blame&#xA;git blame gives the commit hash, author and time for every line in a file. This can be used to know who are the people who have contributed to that particular code and the commit hash too! It can also help figure out who added a particular line in a project which broke it, and then go blame them :P&#xA;&#xA;2. Rectifying via git commit --amend&#xA;Ever been in a hurry and made a spelling mistake? That&#39;s exactly what is command is for! This can change the commit message for the last commit.&#xA;Just type git commit --amend that would open the file in the default terminal text editor. Change the message, save and quit, and done!&#xA;&#xA;3. Squashing&#xA;Squash is not a command, but definitely a concept in itself. Imagine having changes in a file multiple times, which would make a lot of unnecessary commits. Now if any point of time, one needs to go back in history, doing that would be just plain painful with several commits cluttered. Squashing here comes to rescue!&#xA;Squashing means convert related commits to one commit. It&#39;s nothing but a kind of interactive rebase. for last n commits you can do git rebase -i HEAD~n. Here&#39;s how it goes: &#xA;squash1&#xA;&#xA;This will open the commits in the default text editor. Instead of pick in front of commit, type squash for those commits you wish to squash.&#xA;&#xA;file&#xA;&#xA;Save and exit, you will get another file which asks the user to choose final commit messages. Type the appropriate message and delete other messages. Save an quit, it&#39;s squashed! \o/&#xA;&#xA;4. Stashing&#xA;While working on projects, things are in a messy state and you want to switch branches for a bit to work on something else. Now, you do not want to commit things half done(you need to commit everything before switching). git stash comes to rescue! &#xA;Stashing takes the current state of your working directory and pushes it onto a stack of unfinished changes. Now you can switch branches! You can also apply the unfinished changes any time with git stash apply&#xA;&#xA;5. Tagging&#xA;Tagging is a feature in git. For every software there are releases, now imagine if a software is released and development team is working for the next release. Meanwhile, there is a bug report with severe priority. Now, hat needs to be fixed in the previous version! Remembering the last commit for each release is not a good idea. Git here offers the functionality! &#xA;It has the ability to tag specific points in a repository’s history as being important(releases). There are five basic commands:&#xA;&#xA;git tag - will list all the tags in the project.&#xA;git checkout tagversion - jumps to the repository&#39;s state with the particular tag version.&#xA;git tag -a version -m &#39;commit message - creates a tag with the version number and commit message.&#xA;git tag -d tagname - deletes the tag from the list&#xA;&#39;git push origin --tags` - pushes tags to the origin&#xA;&#xA;6. Applying patches&#xA;A lot of open source work is done via mailing list. The kernel mailing list comes at the top of my head. A lot of commits are mailed as patches. These patches contain the diffs(git diff). They can be easily applied via git apply filename. Now the code can be tested with the patch applied.&#xA;&#xA;7. Short git status&#xA;Git has a short status flag so you can see your changes in a more compact way. If you run git status -s or git status –short you get a more simplified output from the command.&#xA;status-short&#xA;The ?? indicates the file hasn&#39;t been staged. D indicates deleted file and there are a few other tags too.&#xA;&#xA;8. Cloning can be done under a different name&#xA;You don&#39;t need to have a weird name that the upstream would have to your repository. You can always rename the directory while cloning. The syntax is:&#xA; git clone upstream URL directory name &#xA;&#xA;Git is indeed a wonderful tool in itself. There&#39;s so much to learn. Hope you enjoyed reading the blog, :)]]&gt;</description>
      <content:encoded><![CDATA[<p>I have been using git from quite some time, but there are certain amazing things about git that I learnt just recently.</p>

<h2 id="1-blaming-with-git-blame">1. Blaming with git blame</h2>

<p><code>git blame</code> gives the commit hash, author and time for every line in a file. This can be used to know who are the people who have contributed to that particular code and the commit hash too! It can also help figure out who added a particular line in a project which broke it, and then go blame them :P</p>

<h2 id="2-rectifying-via-git-commit-amend">2. Rectifying via git commit —amend</h2>

<p>Ever been in a hurry and made a spelling mistake? That&#39;s exactly what is command is for! This can change the commit message for the last commit.
Just type <code>git commit --amend</code> that would open the file in the default terminal text editor. Change the message, save and quit, and done!</p>

<h2 id="3-squashing">3. Squashing</h2>

<p>Squash is not a command, but definitely a concept in itself. Imagine having changes in a file multiple times, which would make a lot of unnecessary commits. Now if any point of time, one needs to go back in history, doing that would be just plain painful with several commits cluttered. Squashing here comes to rescue!
Squashing means convert related commits to one commit. It&#39;s nothing but a kind of interactive rebase. for last <code>n</code> commits you can do <code>git rebase -i HEAD~n</code>. Here&#39;s how it goes:
<img src="https://raw.githubusercontent.com/nileshpatra/Blogs/master/03.%20Awesome%20git%20commands/squash-1.png" alt="squash1"></p>

<p>This will open the commits in the default text editor. Instead of <code>pick</code> in front of commit, type <code>squash</code> for those commits you wish to squash.</p>

<p><img src="https://raw.githubusercontent.com/nileshpatra/Blogs/master/03.%20Awesome%20git%20commands/nano_file_edit.png" alt="file"></p>

<p>Save and exit, you will get another file which asks the user to choose final commit messages. Type the appropriate message and delete other messages. Save an quit, it&#39;s squashed! \o/</p>

<h2 id="4-stashing">4. Stashing</h2>

<p>While working on projects, things are in a messy state and you want to switch branches for a bit to work on something else. Now, you do not want to commit things half done(you need to commit everything before switching). <code>git stash</code> comes to rescue!
Stashing takes the current state of your working directory and pushes it onto a stack of unfinished changes. Now you can switch branches! You can also apply the unfinished changes any time with <code>git stash apply</code></p>

<h2 id="5-tagging">5. Tagging</h2>

<p>Tagging is a feature in git. For every software there are releases, now imagine if a software is released and development team is working for the next release. Meanwhile, there is a bug report with <code>severe</code> priority. Now, hat needs to be fixed in the previous version! Remembering the last commit for each release is not a good idea. Git here offers the functionality!
It has the ability to tag specific points in a repository’s history as being important(releases). There are five basic commands:</p>
<ul><li><code>git tag</code> – will list all the tags in the project.</li>
<li><code>git checkout &lt;tag_version&gt;</code> – jumps to the repository&#39;s state with the particular tag version.</li>
<li><code>git tag -a &lt;version&gt; -m &#39;&lt;commit message&gt;</code> – creates a tag with the version number and commit message.</li>
<li><code>git tag -d &lt;tag_name&gt;</code> – deletes the tag from the list</li>
<li>&#39;git push origin —tags` – pushes tags to the origin</li></ul>

<h2 id="6-applying-patches">6. Applying patches</h2>

<p>A lot of open source work is done via mailing list. The kernel mailing list comes at the top of my head. A lot of commits are mailed as patches. These patches contain the diffs(git diff). They can be easily applied via <code>git apply &lt;filename&gt;</code>. Now the code can be tested with the patch applied.</p>

<h2 id="7-short-git-status">7. Short git status</h2>

<p>Git has a short status flag so you can see your changes in a more compact way. If you run <code>git status -s</code> or <code>git status –short</code> you get a more simplified output from the command.
<img src="https://raw.githubusercontent.com/nileshpatra/Blogs/master/03.%20Awesome%20git%20commands/sstatus.png" alt="status-short">
The <code>??</code> indicates the file hasn&#39;t been staged. <code>D</code> indicates deleted file and there are a few other tags too.</p>

<h2 id="8-cloning-can-be-done-under-a-different-name">8. Cloning can be done under a different name</h2>

<p>You don&#39;t need to have a weird name that the upstream would have to your repository. You can always rename the directory while cloning. The syntax is:
<code>git clone &lt;upstream URL&gt; &lt;directory name&gt;</code></p>

<p>Git is indeed a wonderful tool in itself. There&#39;s so much to learn. Hope you enjoyed reading the blog, :)</p>
]]></content:encoded>
      <author>nileshpatra</author>
      <guid>https://blogs.dgplug.org/read/a/7532nm5fcn</guid>
      <pubDate>Thu, 25 Jul 2019 11:03:16 +0000</pubDate>
    </item>
    <item>
      <title>X-Forwarding using SSH</title>
      <link>https://blogs.dgplug.org/nileshpatra/x-forwarding-using-ssh</link>
      <description>&lt;![CDATA[Ever wondered to get a GUI application from another machine get rendered onto yours? If not, Linux offers that to you :P&#xA;Let&#39;s see how:&#xA;First of all we shall discus some basic terminologies before moving ahead:&#xA;&#xA;The display server&#xA;The display server is very similar to a web-server. So Imagine that you have an apache server. Now when a client requests a service, the server would send a few instructions accordingly to the client over http/https protocol. The client(which here is the web browser) will render those instructions and display the content requested.&#xA;The display server in Linux works almost the same way. The server here interacts with the hardware (CPU) and sends instructions over a protocol known as the &#39;X&#39; protocol. The latest version of the same is 11, and hence it&#39;s called X11.&#xA;&#xA;X-Forwarding&#xA;Think what would happen if the display-server is on one machine and client on the other machine? Yes! that would render the graphical applications onto the client machine. That&#39;s is exactly what X-forwarding is - render the application on one machine while it runs on a different machine.&#xA;&#xA;Okay, enough of terminologies, let&#39;s get to implementing it now.&#xA;&#xA;On the server, configure /etc/ssh/sshdconfig to contain the following:&#xA;X11Forwarding yes&#xA;X11DisplayOffset 10&#xA;These two are usually commented out, ensure that the sshdconfig contains these. &#xA;You may need to restart ssh for the changes to be picked up.&#xA;You can run this if the ssh server doesn&#39;t pick that up and then restart the server:&#xA;cat /var/run/sshd.pid | xargs kill -1&#xA;&#xA;Next, start ssh on both the machines. On Debian or Debian derivatives you can do so by doing:&#xA;sudo service ssh start&#xA;Now we will connect the client to the server. On the client machine type:&#xA;ssh -X server name@server ip&#xA;If you are facing trouble finding out ip, you can do so via:&#xA;nmcli -p device show&#xA;And it&#39;s done! You have SSH&#39;d into the server machine. Now you can render GUI apps on the client machine, while it runs on the server. &#xA;&#xA;firefox&#xA;&#xA;Here&#39;s me rendering firefox on the client :D]]&gt;</description>
      <content:encoded><![CDATA[<p>Ever wondered to get a GUI application from another machine get rendered onto yours? If not, Linux offers that to you :P
Let&#39;s see how:
First of all we shall discus some basic terminologies before moving ahead:</p>

<h2 id="the-display-server">The display server</h2>

<p>The display server is very similar to a web-server. So Imagine that you have an apache server. Now when a client requests a service, the server would send a few instructions accordingly to the client over http/https protocol. The client(which here is the web browser) will render those instructions and display the content requested.
The display server in Linux works almost the same way. The server here interacts with the hardware (CPU) and sends instructions over a protocol known as the &#39;X&#39; protocol. The latest version of the same is 11, and hence it&#39;s called X11.</p>

<h2 id="x-forwarding">X-Forwarding</h2>

<p>Think what would happen if the display-server is on one machine and client on the other machine? Yes! that would render the graphical applications onto the client machine. That&#39;s is exactly what X-forwarding is – render the application on one machine while it runs on a different machine.</p>

<p>Okay, enough of terminologies, let&#39;s get to implementing it now.</p>

<p>On the server, configure <code>/etc/ssh/sshd_config</code> to contain the following:</p>

<pre><code>X11Forwarding yes
X11DisplayOffset 10
</code></pre>

<p>These two are usually commented out, ensure that the <code>sshd_config</code> contains these.
You may need to restart ssh for the changes to be picked up.
You can run this if the ssh server doesn&#39;t pick that up and then restart the server:</p>

<pre><code>cat /var/run/sshd.pid | xargs kill -1
</code></pre>

<p>Next, start ssh on both the machines. On Debian or Debian derivatives you can do so by doing:</p>

<pre><code>sudo service ssh start
</code></pre>

<p>Now we will connect the client to the server. On the client machine type:</p>

<pre><code>ssh -X &lt;server name&gt;@&lt;server ip&gt;
</code></pre>

<p>If you are facing trouble finding out ip, you can do so via:</p>

<pre><code>nmcli -p device show
</code></pre>

<p>And it&#39;s done! You have SSH&#39;d into the server machine. Now you can render GUI apps on the client machine, while it runs on the server.</p>

<p><img src="https://raw.githubusercontent.com/nileshpatra/Blogs/master/02.%20X11-Forwarding/ximg.png" alt="firefox"></p>

<p>Here&#39;s me rendering firefox on the client :D</p>
]]></content:encoded>
      <author>nileshpatra</author>
      <guid>https://blogs.dgplug.org/read/a/dc91zk4jju</guid>
      <pubDate>Mon, 22 Jul 2019 07:14:08 +0000</pubDate>
    </item>
    <item>
      <title>Types of Encryption</title>
      <link>https://blogs.dgplug.org/ritik5049/types-of-encryption</link>
      <description>&lt;![CDATA[Nowdays these two types of encryption methods are widely used.&#xA;Symmetric encryption&#xA;Asymmetric encryption&#xA;&#xA;Symmetric Encryption&#xA;In symmetric encryption single key is used by both sender and receiver for encryption and decryption. Therefore both the parties have to exchange the key and thus trust issues arise here a lot. Some of symmetric key algorithms are  DES(Data Encryption Standard), Triple DES, AES(Advanced Encryption Standard).&#xA;&#xA;symmetric&#xA;&#xA;Suppose there are two-person A and B, A wants to send his/her data from an insecure network to B. A will encrypt the data with key and B will have to decrypt it with the same key.&#xA;&#xA;Asymmetric Encryption&#xA;In asymmetric encryption pair of the key are used, one is called public key and the other is private key. The private key is kept secret by the owner and the public key is shared. Data encrypted with the recipient&#39;s public key can only be decrypted by the corresponding private key.&#xA;&#xA;asymmetric &#xA;&#xA;Suppose A wants to send data to B, so A must have B&#39;s public key to encrypt the data then B decrypt the same with his/her corresponding private key.]]&gt;</description>
      <content:encoded><![CDATA[<p>Nowdays these two types of encryption methods are widely used.
* <a href="https://en.wikipedia.org/wiki/Symmetric-key_algorithm" rel="nofollow">Symmetric encryption</a>
* <a href="https://en.wikipedia.org/wiki/Public-key_cryptography" rel="nofollow">Asymmetric encryption</a></p>

<h3 id="symmetric-encryption">Symmetric Encryption</h3>

<p>In symmetric encryption single key is used by both sender and receiver for encryption and decryption. Therefore both the parties have to exchange the key and thus trust issues arise here a lot. Some of symmetric key algorithms are  <a href="https://en.wikipedia.org/wiki/Data_Encryption_Standard" rel="nofollow">DES</a>(Data Encryption Standard), <a href="https://simple.wikipedia.org/wiki/Triple_DES" rel="nofollow">Triple DES</a>, <a href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard" rel="nofollow">AES</a>(Advanced Encryption Standard).</p>

<p><img src="https://ico.org.uk/media/images/other/2260256/symmetric.gif" alt="symmetric"></p>

<p>Suppose there are two-person A and B, A wants to send his/her data from an insecure network to B. A will encrypt the data with key and B will have to decrypt it with the same key.</p>

<h3 id="asymmetric-encryption">Asymmetric Encryption</h3>

<p>In asymmetric encryption pair of the key are used, one is called <a href="https://en.wikipedia.org/wiki/Public-key_cryptography" rel="nofollow">public key</a> and the other is <a href="https://koolspan.com/private-key-encryption/" rel="nofollow">private key</a>. The private key is kept secret by the owner and the public key is shared. Data encrypted with the recipient&#39;s public key can only be decrypted by the corresponding private key.</p>

<p><img src="https://ico.org.uk/media/images/other/2260261/asymmetric.gif" alt="asymmetric"></p>

<p>Suppose A wants to send data to B, so A must have B&#39;s public key to encrypt the data then B decrypt the same with his/her corresponding private key.</p>
]]></content:encoded>
      <author>ritik5049</author>
      <guid>https://blogs.dgplug.org/read/a/nv8x2smk20</guid>
      <pubDate>Sun, 14 Jul 2019 18:43:03 +0000</pubDate>
    </item>
    <item>
      <title>Hey everyone if you want to view information about CPU in Linux you can use the...</title>
      <link>https://blogs.dgplug.org/ritik5049/hey-everyone-if-you-want-to-view-information-about-cpu-in-linux-you-can-use-the</link>
      <description>&lt;![CDATA[Hey everyone if you want to view information about CPU in Linux you can use the command cat /proc/cpuinfo in terminal it will display what type of processor your system is running and the number of CPUs present and much more.&#xA;Here is an example.&#xA;cpuinfo]]&gt;</description>
      <content:encoded><![CDATA[<p>Hey everyone if you want to view information about CPU in Linux you can use the command <code>cat /proc/cpuinfo</code> in terminal it will display what type of processor your system is running and the number of CPUs present and much more.
Here is an example.
<img src="http://sirlagz.net/wp-content/uploads/2016/10/proc-cpu.png" alt="cpuinfo"></p>
]]></content:encoded>
      <author>ritik5049</author>
      <guid>https://blogs.dgplug.org/read/a/ryd3erklsv</guid>
      <pubDate>Wed, 10 Jul 2019 16:59:26 +0000</pubDate>
    </item>
    <item>
      <title>My first blog ever</title>
      <link>https://blogs.dgplug.org/ritik5049/my-first-blog-ever</link>
      <description>&lt;![CDATA[Hello folks, my self Ritik Raushan. This is my first blog ever written by me. I`ll be going to publish much more technical kinds of stuff in upcoming posts. &#xA;Here we will learn and grow together. See you again.&#xA;  ]]&gt;</description>
      <content:encoded><![CDATA[<p>Hello folks, my self Ritik Raushan. This is my first blog ever written by me. I`ll be going to publish much more technical kinds of stuff in upcoming posts.
Here we will learn and grow together. See you again.</p>
]]></content:encoded>
      <author>ritik5049</author>
      <guid>https://blogs.dgplug.org/read/a/bpudqsmxty</guid>
      <pubDate>Sun, 07 Jul 2019 20:05:01 +0000</pubDate>
    </item>
    <item>
      <title>My Experience Reading: ‘i want 2 do project. tell me wat 2 do.’ by Shakthi Kannan</title>
      <link>https://blogs.dgplug.org/nileshpatra/my-experience-reading-i-want-2-do-project</link>
      <description>&lt;![CDATA[I recently started interacting on #dgplug channel using my matrix ID and I’m also attending the dgplug summer training, in-turn learning a lot of new stuff. As all of us(dgplug summer trainees) were learning about mailing list etiquette and FOSS, we were suggested by mbuf (Shakthi Kannan) to go ahead and read his book ‘i want 2 do project. tell me wat 2 do.’ to get better insights for FOSS, mailing etiquette, how FOSS works etc.&#xA;&#xA;The book then showed up at my door after a couple of days. This book presents valuable insights on open-source software and the equally important communication side related to it, which a newbie wouldn’t pay much attention to in the beginning.&#xA;&#xA;The book starts with Mailing list etiquette and explains it in detail – it explains the importance of trimmed, ‘interleaved, bottom-posting’, not writing HTML mails, no overquoting , really well. It also made me realize how important adding additional details are. When I delved in further, I learnt about the tools that can be used for effective communication(mailing lists, IRC, SMS, Voice Calls) and when to use the right tool, with right people at the right time.&#xA;&#xA;Next up, I learnt about the details for starting in open-source software development, how to effectively read README.md/important docs to proceed with the code-base. Then, in chapter-5, the whole process of creating a patch and e-mailing it is explained. A few days back I too had to merge a mailed patch to my repository so I could very well relate to the process of generating a patch via Version Control System(VCS) Tool and submit the patch via mail.&#xA;&#xA;As I read further, I came across one of the most important take away from the book – Bug Triaging. It’s nothing but, reproducing the same bug from the mail/description and work upon it. It thus, also means that the mail/description should contain as much detail as possible for the debugging to be smooth. &#xA;&#xA;The last three chapters focus on reading /writing, presentation and sustenance and have nice pointers to follow. The chapter-9 on presentation made me look back at the mistakes that I made while delivering talks at past meetups. I took a note of all the points that I missed so that I can deliver my next talk as perfectly as I can, 🙂&#xA;&#xA;That’s about it. Thank you Shakthi Kannan , for this amazing book! &#xA;Here&#39;s my photo with the book:&#xA;&#xA;bookphoto]]&gt;</description>
      <content:encoded><![CDATA[<p>I recently started interacting on <a href="https://dgplug.org/" rel="nofollow">#dgplug</a> channel using my matrix ID and I’m also attending the dgplug summer training, in-turn learning a lot of new stuff. As all of us(dgplug summer trainees) were learning about mailing list etiquette and FOSS, we were suggested by <a href="http://www.shakthimaan.com/" rel="nofollow">mbuf</a> (Shakthi Kannan) to go ahead and read his book ‘i want 2 do project. tell me wat 2 do.’ to get better insights for FOSS, mailing etiquette, how FOSS works etc.</p>

<p>The book then showed up at my door after a couple of days. This book presents valuable insights on open-source software and the equally important communication side related to it, which a newbie wouldn’t pay much attention to in the beginning.</p>

<p>The book starts with Mailing list etiquette and explains it in detail – it explains the importance of trimmed, ‘interleaved, bottom-posting’, not writing HTML mails, no overquoting , really well. It also made me realize how important adding additional details are. When I delved in further, I learnt about the tools that can be used for effective communication(mailing lists, IRC, SMS, Voice Calls) and when to use the right tool, with right people at the right time.</p>

<p>Next up, I learnt about the details for starting in open-source software development, how to effectively read README.md/important docs to proceed with the code-base. Then, in chapter-5, the whole process of creating a patch and e-mailing it is explained. A few days back I too had to merge a mailed patch to my repository so I could very well relate to the process of generating a patch via Version Control System(VCS) Tool and submit the patch via mail.</p>

<p>As I read further, I came across one of the most important take away from the book – Bug Triaging. It’s nothing but, reproducing the same bug from the mail/description and work upon it. It thus, also means that the mail/description should contain as much detail as possible for the debugging to be smooth.</p>

<p>The last three chapters focus on reading /writing, presentation and sustenance and have nice pointers to follow. The chapter-9 on presentation made me look back at the mistakes that I made while delivering talks at past meetups. I took a note of all the points that I missed so that I can deliver my next talk as perfectly as I can, 🙂</p>

<p>That’s about it. Thank you <a href="http://www.shakthimaan.com/" rel="nofollow">Shakthi Kannan</a> , for this amazing book!
Here&#39;s my photo with the book:</p>

<p><img src="https://raw.githubusercontent.com/nileshpatra/Blogs/master/01.%20Book%20reading%20experience/photo_2019-07-08_14-15-38.jpg" alt="book_photo"></p>
]]></content:encoded>
      <author>nileshpatra</author>
      <guid>https://blogs.dgplug.org/read/a/15gvucpucx</guid>
      <pubDate>Fri, 05 Jul 2019 16:15:54 +0000</pubDate>
    </item>
    <item>
      <title>How to create account in this service?</title>
      <link>https://blogs.dgplug.org/kushal/how-to-create-account-in-this-service</link>
      <description>&lt;![CDATA[Come to the #dgplug channel on freenode, and ask for an account. If you are regular member of dgplug, any of the admins will provide you an account.&#xA;&#xA;Happy blogging!]]&gt;</description>
      <content:encoded><![CDATA[<p>Come to the <code>#dgplug</code> channel on freenode, and ask for an account. If you are regular member of dgplug, any of the admins will provide you an account.</p>

<p>Happy blogging!</p>
]]></content:encoded>
      <author>kushal</author>
      <guid>https://blogs.dgplug.org/read/a/zx12ee76rw</guid>
      <pubDate>Fri, 05 Jul 2019 15:15:14 +0000</pubDate>
    </item>
  </channel>
</rss>