<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aaditree Jaisswal on Medium]]></title>
        <description><![CDATA[Stories by Aaditree Jaisswal on Medium]]></description>
        <link>https://medium.com/@aaditreejaisswal06?source=rss-a37ffdc93a2f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*x5oYbUs93j3Hj2yG.jpg</url>
            <title>Stories by Aaditree Jaisswal on Medium</title>
            <link>https://medium.com/@aaditreejaisswal06?source=rss-a37ffdc93a2f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:55:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aaditreejaisswal06/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Things to Know Before, While, and After giving your GRE]]></title>
            <link>https://medium.com/@aaditreejaisswal06/things-to-know-before-while-and-after-giving-your-gre-5ca07020e0c1?source=rss-a37ffdc93a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ca07020e0c1</guid>
            <category><![CDATA[graduate]]></category>
            <category><![CDATA[exam]]></category>
            <category><![CDATA[gre-exam]]></category>
            <category><![CDATA[graduate-record-exam]]></category>
            <category><![CDATA[gre]]></category>
            <dc:creator><![CDATA[Aaditree Jaisswal]]></dc:creator>
            <pubDate>Mon, 14 Sep 2020 09:46:09 GMT</pubDate>
            <atom:updated>2020-09-14T17:14:06.959Z</atom:updated>
            <content:encoded><![CDATA[<p>There is a lot of mainstream advice that we get on different websites and portals but nobody really tells us what to look out for, or what is to be done. So I decided to write my experience with the GRE exam and how I had prepared for it and things to keep a note of.</p><h3>BEFORE GIVING THE GRE</h3><p>I had diligently started preparing around 40 days before giving my GRE. This was also the time that I had registered for the test. It seemed like a lot at that time but as the test date got closer, I wanted to reschedule and now, I am just glad I did not give in to the fear.</p><p>Feeling scared or doubtful is normal. However, you need to have a bit of trust in yourself. You have prepared really well and all you need to do is, just give your best, no matter the outcome.</p><h4>PREPARATION</h4><p>I started by clearing and understanding the basics. I had taken admission to a coaching center but it had been two months since I had touched any of the material or prepared anything. So I had to start at level 0.</p><p>There were two main resources that I used for preparing for the GRE:</p><ol><li><a href="https://drive.google.com/drive/mobile/folders/19jj86h3dKYAluo76zGUh5ST0g1QuILm7?usp=sharing"><em>Resource 1</em></a></li><li><a href="https://drive.google.com/folderview?id=1fq9ilTMv-4ulQCafaUv6hXC7p7v47C0P"><em>Resource 2</em></a></li></ol><p><strong>For Vocabulary,</strong> I used the Magoosh App and Barron’s 333 and 1100 High-Frequency Word List.</p><p><strong>For Verbal Prep</strong>, I used Verbal Grail and Manhattan’s 5LB Book. I also used an online resource called <a href="https://www.varsitytutors.com/gre_verbal-practice-tests">Varsity Tutors</a> for practice. Any online platform for practicing reading comprehension would work, as long as it is reliable and does not give you the incorrect answers.</p><p>I used to learn around 10–20 words a day for learning from Barron’s vocabulary list. My method of learning was simple. I took a word, repeated it and it’s synonyms 10 times, and then wrote it down and found out what kind of context and scenario it can be used in. Then I took the next word, I would repeat it 10 times, and then revise all the words up till that point. If I got all of them correct, I would move on to the next one, else mark it with a star. I would use this process only for the words I had learned that day. Any starred words would be added onto the list. After every 3 days, I would revise all of them, to the point I had reached.</p><p>This learning would be separate from the corrections I would do after solving from the Book: Verbal Grail and the Magoosh App.</p><p>Every time I got a word or meaning wrong in Verbal Grail, I would write it down, find the synonyms, find out the scenarios it can be used in, and learn it. The list would keep increasing as I kept solving so its a good idea to keep it all in one place, just in case you need to look back and revise again.</p><p>I used the Magoosh application when I was resting or just not doing anything. Since it is a flashcard application, it was super easy to navigate and I would learn new words just by marking them a couple of times.</p><p><strong>Reading Comprehension Advice :</strong></p><p>1. Read the paragraph before going to the questions.</p><p>2. Do not look at the obvious choices.</p><p>3. Cancel the options that seem like a fact but are not present in the passage.</p><p>4. Look for exaggerations in the options and cancel those as well.</p><p>5. If you do not fully understand what the answer wants, mark the best match, star it and move onto the next question.</p><p><strong>For Quantitative</strong>, I would suggest doing the 320 GRE Math Problems. It covers everything there is, with respect to Quant. For the formulae, you could refer to this<strong> </strong><a href="https://drive.google.com/drive/u/0/folders/1vWIfelVKbptwgnZkq0wXI0m07-Nt6ClS"><strong>link</strong></a>.</p><p>The main idea for this is to know how to solve the problems and this can only be done by understanding the concepts. This is why practicing is very important.</p><p>For AWA, I had a teacher who I had kept in touch with, from my coaching institute so I used to ask her to correct my mock essays whenever I wrote them. She would mark the areas that needed improvement and give a score. For this, if you do not have someone who can review, for you, you can check the Yocket App and ask for help.</p><p><strong>Argument essays</strong> are comparatively simpler because you just need to know the template.</p><p>So the basic template could be something like :</p><p>First paragraph: Rewrite the main statement and then write that there is no sufficient evidence to prove the conclusion.</p><p>Second paragraph onwards, you need to write the points in the essay given and why it is not valid or sufficient to be considered as evidence for something.</p><p>Your final paragraph just has to sum up the fact that their justifications are not enough.</p><p><strong>For issue essays</strong>, always justify a statement by giving an example. It could be a well-known event or something that may have happened to you. Do not try to fabricate an event. It has to be real else it would not look genuine.</p><p><strong><em>Finally</em></strong>, give a lot of tests. This is a must. Giving tests helps you to build the stamina of sitting and concentrating for 4 hours straight. These can be tests from books or online tests. You get two free tests from GRE while registering so make good use of those.</p><p>Other links for free tests :</p><ol><li><a href="https://www.mbacrystalball.com/gre/free-gre-practice-tests"><em>Test site 1</em></a></li><li><a href="https://crunchprep.com/gre/free-gre-practice-tests"><em>Test site 2</em></a></li><li><a href="https://magoosh.com/gre/2020/gre-sample-test-200-free-gre-videos/"><em>Test site 3</em></a></li></ol><p>Other resource links that I found on Telegram:</p><ol><li><a href="https://drive.google.com/drive/u/0/folders/0B6SRwGwCzirkenFjZ0lUTWJ6aDQ"><em>Link1</em></a></li><li><a href="https://drive.google.com/drive/u/0/folders/0B4I2krQSCsvUbFZaR0k1a0UxeXM"><em>Link2</em></a></li><li><a href="https://drive.google.com/drive/u/0/folders/1v7czDiGug_e3lNT0eArwKV7dGY-Nyh5u"><em>Link3</em></a></li><li><a href="https://drive.google.com/drive/u/0/folders/1khWjYtanNbmNuYkYxHW7QQ4iBRWG7Tj0"><em>Link4</em></a></li></ol><p>So I think that&#39;s about it for the preparation. Let’s move to GRE advice for the At-Home Test.</p><h3>THE GRE EXAM: WHILE AND AFTER</h3><p>My experience while giving the At-Home GRE test was really good. The proctor was really sweet and straightforward and the test went without any glitches or problems. So let&#39;s just get straight to the advice and pointers.</p><ol><li>When you download the ETS Browser for the test, open it to see it if it works. There is a high chance that it had not been downloaded completely. In such a case, switch off your antivirus and firewall and download it again. Do this a couple of times as well. Find out if you need to keep the antivirus and firewall off while opening and using the browser. I had to do it for mine.</li><li>Do the laptop requirement checks multiple times. In fact, do it once an hour before the test as well.</li><li>Make sure you have an alternate internet connection other than the Wifi just in case the light goes or it suddenly disconnects. You could just keep someone’s hotspot on and change their Phone Settings to forwarding.</li><li>Be in a well-lit room.</li><li>Earphones are not allowed.</li><li>Keep a hand mirror on the side because you will need to show your laptop to the Proctor using this. You can also use a phone but right after showing the screen, please keep the phone outside the room.</li><li>Do not look anywhere else except the whiteboard (or scratch paper) and your screen. If you do, they might consider it as you cheating and it could go in one of two ways. They will either close your test at that moment itself or your test scores will be put under review.</li><li>If there are any problems with the test or anything, get the Proctor’s attention immediately to solve it. Be polite but be direct.</li><li>Do not leave the room during your breaks without asking for anything, even if its to use the washroom or have water.</li><li>Do not wear jewelry of any kind at all.</li><li>If you have doubts, get them cleared. It can be anything from “ Are pens allowed?” to “ Can I keep a water bottle with me?”. If you are not sure, ask.</li><li>If there were issues that occurred during the test that caused you to lose out on time, call the office of testing integrity right after the test and let them know. This will help in case your scores get put on hold and you do not receive them even after 2 weeks.</li><li>If your scores do get put on hold, call the office of testing integrity once the deadline for receiving the scores has passed. If they ask you to wait or you get a mail stating that it will take four weeks, call them after the four weeks are up.</li><li>This one is like a last resort. If they aren&#39;t getting back to you and you need the scores urgently, tweet about it and tag ETS. Someone will help you out.</li></ol><h3>__________________________________________</h3><p>So this is it. I think I have covered all of it but if there is anything remaining, let me know. Also if you need any kind of help, you can always reach out to me here or on Twitter and LinkedIn.</p><p><strong>Twitter: AaditreeJ</strong></p><p><a href="https://www.linkedin.com/in/aaditree-jaisswal-961525164/"><strong>LinkedIn</strong></a></p><h3><strong>__________________________________________</strong></h3><h4>Thank you for reading!</h4><p><em>Please give it a clap if you found it helpful :D</em></p><h3>All the best for your exam!!</h3><h3><strong>__________________________________________</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ca07020e0c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning Bootcamp : Day 2]]></title>
            <link>https://medium.com/@aaditreejaisswal06/machine-learning-bootcamp-day-2-dcd401d50bd2?source=rss-a37ffdc93a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcd401d50bd2</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[opencv-python]]></category>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Aaditree Jaisswal]]></dc:creator>
            <pubDate>Mon, 13 Jul 2020 12:14:49 GMT</pubDate>
            <atom:updated>2020-07-13T12:14:49.437Z</atom:updated>
            <content:encoded><![CDATA[<h3>Machine Learning Bootcamp : Day 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/150/1*vY73UL6Y4QkvEWXZrWxkAw.png" /></figure><p>What I learnt :</p><ol><li>Numpy</li><li>Playing with Images</li><li>Face Detection</li><li>Face Detection via Webcam</li></ol><p>___________________________________________________________________</p><p><strong>DOWNLOADING ANACONDA</strong></p><ol><li>Windows : <a href="https://docs.anaconda.com/anaconda/install/hashes/win-3-64/">https://docs.anaconda.com/anaconda/install/hashes/win-3-64/</a></li><li>MacOS : <a href="https://docs.anaconda.com/anaconda/install/mac-os/">https://docs.anaconda.com/anaconda/install/mac-os/</a></li></ol><p>___________________________________________________________________</p><p><strong>NUMPY</strong></p><ol><li>Importing the library : import numpy as np</li><li>Creating arrays from lists</li></ol><p>lists=[3,6,7,11]<br>n =np.array(lists)</p><pre>array([ 3,  6,  7, 11])</pre><p>3. type(n)</p><pre>numpy.ndarray</pre><p>type(object) returns the class type of the argument which has been passed as a parameter.</p><p>4. You can also put a set instead of a list.</p><p>np.array({2 , 5 , 7})</p><pre>array({2, 5, 7}, dtype=object)</pre><p>5. d = {‘a’:’apple’,’b’:’mango’}<br>np.array(d)</p><pre>array({&#39;a&#39;: &#39;apple&#39;, &#39;b&#39;: &#39;mango&#39;}, dtype=object)</pre><p>6. twod = np.array ([[1 ,2] , [3,4]])</p><p>O/P :</p><pre>array([[1, 2],<br>       [3, 4]])</pre><p>7. Now, if the size of the lists were different , then it would be printed as lists only, and not as arrays.</p><pre>array([list([1, 2]), list([3, 4, 5])], dtype=object)</pre><p>8<strong>. dtype : </strong>It<strong> </strong>describes how the bytes in the fixed-size block of memory corresponding to an array item should be interpreted i.e. the type of the data.</p><p>9. Now, consider a list with two different datatypes:</p><p>y =np.array([1,2,”77&quot;])</p><pre>array([&#39;1&#39;, &#39;2&#39;, &#39;77&#39;], dtype=&#39;&lt;U11&#39;)</pre><p>Here, the elements change to string and not integers. This is because strings are more dominating.</p><p>8. n.shape : Returns the shape of the array</p><p>a = np.array([[1,3],[4,4]])<br>a.shape</p><pre>(2, 2)</pre><p>9. a.size : Returns the total number of items</p><pre>4</pre><p>10. list(range (9,16,2))</p><pre>[9, 11, 13, 15]</pre><p>Here, starting point = 9 is inclusive, ending point = 16 is exclusive and every element in the list should be separated by the jumping point = 2</p><p>11. arange : It is the range implementation of numpy. It gives a range for any numerical datatype.</p><p>np.arange(7,12,2)</p><pre>array([ 7,  9, 11])</pre><p><strong>Note : To find the documentation of any function , use ‘?’</strong></p><p><strong>Example : np.arange?</strong></p><pre><strong>Docstring:</strong><br>arange([start,] stop[, step,], dtype=None)<br><br>Return evenly spaced values within a given interval.<br><br>Values are generated within the half-open interval ``[start, stop)``<br>(in other words, the interval including `start` but excluding `stop`).<br>For integer arguments the function is equivalent to the Python built-in<br>`range` function, but returns an ndarray rather than a list.<br><br>When using a non-integer step, such as 0.1, the results will often not<br>be consistent.  It is better to use `numpy.linspace` for these cases.<br><br>Parameters<br>----------<br>start : number, optional<br>    Start of interval.  The interval includes this value.  The default<br>    start value is 0.<br>stop : number<br>    End of interval.  The interval does not include this value, except<br>    in some cases where `step` is not an integer and floating point<br>    round-off affects the length of `out`.<br>step : number, optional<br>    Spacing between values.  For any output `out`, this is the distance<br>    between two adjacent values, ``out[i+1] - out[i]``.  The default<br>    step size is 1.  If `step` is specified as a position argument,<br>    `start` must also be given.<br>dtype : dtype<br>    The type of the output array.  If `dtype` is not given, infer the data<br>    type from the other input arguments.<br><br>Returns<br>-------<br>arange : ndarray<br>    Array of evenly spaced values.<br><br>    For floating point arguments, the length of the result is<br>    ``ceil((stop - start)/step)``.  Because of floating point overflow,<br>    this rule may result in the last element of `out` being greater<br>    than `stop`.<br><br>See Also<br>--------<br>numpy.linspace : Evenly spaced numbers with careful handling of endpoints.<br>numpy.ogrid: Arrays of evenly spaced numbers in N-dimensions.<br>numpy.mgrid: Grid-shaped arrays of evenly spaced numbers in N-dimensions.<br><br>Examples<br>--------<br>&gt;&gt;&gt; np.arange(3)<br>array([0, 1, 2])<br>&gt;&gt;&gt; np.arange(3.0)<br>array([ 0.,  1.,  2.])<br>&gt;&gt;&gt; np.arange(3,7)<br>array([3, 4, 5, 6])<br>&gt;&gt;&gt; np.arange(3,7,2)<br>array([3, 5])<br><strong>Type:</strong>      builtin_function_or_method</pre><p>12. To resize an array :</p><p>np.arange(40).reshape(8,5)</p><pre>array([[ 0,  1,  2,  3,  4],<br>       [ 5,  6,  7,  8,  9],<br>       [10, 11, 12, 13, 14],<br>       [15, 16, 17, 18, 19],<br>       [20, 21, 22, 23, 24],<br>       [25, 26, 27, 28, 29],<br>       [30, 31, 32, 33, 34],<br>       [35, 36, 37, 38, 39]])</pre><p>The numbers will range from 0 to 39 with 8 rows and 5 columns.</p><p>We can also do np.arange(40).reshape(5,8)</p><pre>array([[ 0,  1,  2,  3,  4,  5,  6,  7],<br>       [ 8,  9, 10, 11, 12, 13, 14, 15],<br>       [16, 17, 18, 19, 20, 21, 22, 23],<br>       [24, 25, 26, 27, 28, 29, 30, 31],<br>       [32, 33, 34, 35, 36, 37, 38, 39]])<br></pre><p><strong>Important : The number of elements = number of rows x number of columns.</strong></p><p>We can also change the values in the array formed.</p><p>Example :</p><p>arr = np.arange(40).reshape(8,5)</p><p>arr[0] = 1000</p><p>arr</p><pre>array([[1000, 1000, 1000, 1000, 1000],<br>       [   5,    6,    7,    8,    9],<br>       [  10,   11,   12,   13,   14],<br>       [  15,   16,   17,   18,   19],<br>       [  20,   21,   22,   23,   24],<br>       [  25,   26,   27,   28,   29],<br>       [  30,   31,   32,   33,   34],<br>       [  35,   36,   37,   38,   39]])</pre><p>The value of arr[0] will change.</p><p><strong>Question : Is python call by value or call by reference? Technically, it is neither. It is call-by-object. To understand it better, please do click on this </strong><a href="https://jeffknupp.com/blog/2012/11/13/is-python-callbyvalue-or-callbyreference-neither/"><strong>link</strong></a><strong>.</strong></p><p>12. Consider this example:</p><p>arr1 = np.arange(40).reshape(8,5)</p><p>arr2 = np.arange(40).reshape(5,8)</p><p>arr1 is arr2</p><pre>False</pre><p>Why? Because even if the values are the same, the dimensions vary.</p><p>___________________________________________________________________</p><p><strong>PLAYING WITH IMAGES</strong></p><ol><li>from PIL import Image</li></ol><p>The <a href="https://pillow.readthedocs.io/en/stable/reference/Image.html#module-PIL.Image"><strong>Image</strong></a> module provides a class with the same name which is used to represent a PIL image. The module also provides a number of factory functions such as loading images from files, and to create new images.</p><p>Source : <a href="https://pillow.readthedocs.io/en/stable/reference/Image.html">https://pillow.readthedocs.io/en/stable/reference/Image.html</a></p><p>In case of an error in importing this package, refer to this <a href="https://stackoverflow.com/questions/8863917/importerror-no-module-named-pil">link.</a></p><p>2. To open an image,</p><p>pil = Image.open(r”C:\Users\Aaditree Jaisswal\Desktop\thor.jpg”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/140/1*Qoxnn4c6yZjVeQ7Xxz7fOg.png" /></figure><p>3. As every image is made of pixels, we can depict it in the form of an array.</p><p>arr = np.array(pil)</p><pre>array([[[ 67,  68,  60],<br>        [ 67,  68,  60],<br>        [ 68,  69,  61],<br>        ...,<br>        [ 79,  86,  70],<br>        [ 77,  83,  69],<br>        [ 75,  81,  67]],<br><br>       [[ 66,  67,  59],<br>        [ 67,  68,  60],<br>        [ 67,  68,  60],<br>        ...,<br>        [ 81,  88,  72],<br>        [ 79,  85,  71],<br>        [ 78,  84,  70]],<br><br>       [[ 66,  67,  59],<br>        [ 66,  67,  59],<br>        [ 67,  68,  60],<br>        ...,<br>        [ 82,  89,  73],<br>        [ 81,  87,  73],<br>        [ 80,  86,  72]],<br><br>       ...,<br><br>       [[139, 141, 119],<br>        [144, 146, 122],<br>        [138, 138, 112],<br>        ...,<br>        [ 54,  10,  11],<br>        [ 52,  10,  11],<br>        [ 51,   9,  10]],<br><br>       [[129, 131, 110],<br>        [137, 139, 117],<br>        [119, 119,  95],<br>        ...,<br>        [ 55,  11,  12],<br>        [ 54,  10,  11],<br>        [ 53,   9,  10]],<br><br>       [[108, 110,  89],<br>        [124, 126, 104],<br>        [107, 106,  85],<br>        ...,<br>        [ 55,  11,  12],<br>        [ 54,  10,  11],<br>        [ 53,   9,  10]]], dtype=uint8)</pre><p>4. To check the shape of this array:</p><p>arr.shape</p><pre>(246, 220, 3)</pre><p>5. To plot the image, we import :</p><p>import matplotlib.pyplot as plt</p><p>plt.imshow(pil)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*iWKI6A50Og4DixgbGMPPkg.png" /></figure><p>To show only a specific colour in the image, we use the following command:</p><p>col = arr[:,:,2]</p><p>plt.imshow(col)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/157/1*H1gGpb4RAsDjVz8dki7GMw.png" /></figure><p>6. You can also specify whether you want to view the whole image or a part of it.</p><p>Example:</p><p>col = arr[1:100,1:100,2]</p><p>plt.imshow(col)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/161/1*XyW7q1Zf05sRmyIJ7c5rCg.png" /></figure><p>7. To create a copy of the image, use the copy() function.</p><p>w = arr.copy()</p><p>8. Now ,suppose we switch the colour of the image like this:</p><p>w[:,:,[1,2]] = 0</p><p>Output of w:</p><pre>array([[[ 67,   0,   0],<br>        [ 67,   0,   0],<br>        [ 68,   0,   0],<br>        ...,<br>        [ 79,   0,   0],<br>        [ 77,   0,   0],<br>        [ 75,   0,   0]],<br><br>       [[ 66,   0,   0],<br>        [ 67,   0,   0],<br>        [ 67,   0,   0],<br>        ...,<br>        [ 81,   0,   0],<br>        [ 79,   0,   0],<br>        [ 78,   0,   0]],<br><br>       [[ 66,   0,   0],<br>        [ 66,   0,   0],<br>        [ 67,   0,   0],<br>        ...,<br>        [ 82,   0,   0],<br>        [ 81,   0,   0],<br>        [ 80,   0,   0]],<br><br>       ...,<br><br>       [[139,   0,   0],<br>        [144,   0,   0],<br>        [138,   0,   0],<br>        ...,<br>        [ 54,   0,   0],<br>        [ 52,   0,   0],<br>        [ 51,   0,   0]],<br><br>       [[129,   0,   0],<br>        [137,   0,   0],<br>        [119,   0,   0],<br>        ...,<br>        [ 55,   0,   0],<br>        [ 54,   0,   0],<br>        [ 53,   0,   0]],<br><br>       [[108,   0,   0],<br>        [124,   0,   0],<br>        [107,   0,   0],<br>        ...,<br>        [ 55,   0,   0],<br>        [ 54,   0,   0],<br>        [ 53,   0,   0]]], dtype=uint8)</pre><p>plt.imshow(w)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/160/1*h2AeKa_2Sh5Q98HXR7X43Q.png" /></figure><p>We can switch it to other colours too.</p><p>9. To show the image in a gray scale :</p><p>g = arr.mean(axis=2) #across depth</p><p>Here,</p><p>axis =0 #across rows</p><p>axis =1 #across columns</p><p>axis =2 #across depth</p><p>plt.imshow(g,cmap = “gray”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/203/1*QN6EM6VN6ymOLdBMyyEX4w.png" /></figure><p>If we do not use cmap, the image will show a multicolour grayscale picture. cmap basically controls the colour map.</p><p>___________________________________________________________________</p><p><strong>FACE DETECTION</strong></p><ol><li>import cv2 # This is used for Image processing.</li></ol><p>2. frame = cv2.imread(r”C:\Users\Aaditree Jaisswal\Desktop\thor.jpg”)</p><p>This helps us to read the image from the file chosen.</p><p>3. Now, the colour scheme of the image is bgr and we will be converting it to rgb.</p><p>rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)</p><p>4. Now we will be using CascadeClassifier() to detect specific objects in our image.</p><p>cv2.CascadeClassifier()</p><p>5. We will train our classifier using the <a href="https://github.com/opencv/opencv/tree/master/data/haarcascades">haar cascade algorithm xml file</a>.</p><p>classifier = cv2.CascadeClassifier(r”C:\Users\Aaditree Jaisswal\Desktop\haarcascade_frontalface_default.xml”)</p><p>6. face = classifier.detectMultiScale(rgb)</p><p>detectMultiscale: Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles; x,y,w,h where w and h are the width and height respectively.</p><p>The values are saved as :</p><p>x,y,w,h = face[0]</p><p>7. To give a part of the image, we do;</p><p>rgb[y:y+h,x:x+w]</p><p>Output:</p><pre>array([[[119, 114,  95],<br>        [119, 113,  91],<br>        [118, 110,  87],<br>        ...,<br>        [186, 166, 115],<br>        [221, 199, 150],<br>        [209, 188, 143]],<br><br>       [[116, 111,  92],<br>        [107, 101,  79],<br>        [ 94,  86,  63],<br>        ...,<br>        [181, 161, 111],<br>        [204, 182, 133],<br>        [184, 163, 118]],<br><br>       [[121, 116,  97],<br>        [113, 107,  85],<br>        [111, 100,  78],<br>        ...,<br>        [227, 206, 159],<br>        [209, 187, 140],<br>        [203, 182, 139]],<br><br>       ...,<br><br>       [[111, 105,  91],<br>        [ 99,  93,  79],<br>        [ 94,  87,  71],<br>        ...,<br>        [ 54,  43,  15],<br>        [ 33,  18,   0],<br>        [ 23,   8,   0]],<br><br>       [[104, 101,  86],<br>        [ 98,  92,  76],<br>        [100,  93,  75],<br>        ...,<br>        [ 33,  26,   0],<br>        [ 33,  22,   0],<br>        [ 39,  26,   9]],<br><br>       [[102, 101,  81],<br>        [ 98,  96,  75],<br>        [ 94,  86,  65],<br>        ...,<br>        [ 62,  56,  32],<br>        [ 62,  57,  37],<br>        [ 87,  80,  62]]], dtype=uint8)<br></pre><p>If we plot this: plt.imshow(rgb[y:y+h,x:x+w])</p><p>We will only get part of the image,containing only the face.</p><p>Now, for marking that area in the full image.</p><p>We do:</p><p>out =cv2.rectangle(rgb,(x,y),(x+w,y+h),(0,0,255),4)</p><p>and when we plot this : plt.imshow(out)</p><p>We get :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/1*_k9-RI3hPEhs3Y7P5jJ-Fw.png" /></figure><p>___________________________________________________________________</p><p><strong>FACE DETECTION VIA WEB CAM</strong></p><ol><li>Choose your webcam through which you wish to capture the video:</li></ol><p>cap = cv2.VideoCapture(0)</p><p>2. Train your model using the haar cascade frontal face file :</p><p>classifier = cv2.CascadeClassifier(r”C:\Users\Aaditree Jaisswal\Desktop\haarcascade_frontalface_default.xml”)</p><p>3. Now to set the frame to detect our face:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*b68w8abL5injUKAo9NaxHA.png" /></figure><p>The read() function reads one frame from the video source.</p><p>Then it will detect the objects in the image and return a list of rectangles as 4 values : x,y,w and h.</p><p>We go through every image and its set of values, specify the area of importance and then use cv2.rectangle to mark it.</p><p>To show the image frame, we use the cv2.imshow() function.</p><p>This will go on and keep detecting faces till ‘q’ key is pressed. If it is, we exit the script.</p><p>___________________________________________________________________</p><p><strong>BROADCASTING</strong></p><p>There are two rules :</p><ol><li>The shapes of the two structures should be the same, and we check from right to left.</li><li>If it has a 1 in it, then it will still work despite the values not matching.</li></ol><p>___________________________________________________________________</p><p>This was it for today’s webinar. You can access it through this <a href="https://www.youtube.com/watch?v=FAposp6k-lA">link</a>.</p><p>A big thank you to the mentors, <strong>Kunal Kushwaha </strong>and <strong>Anuj Garg.</strong></p><h4>Link to my handwritten notes :</h4><p><a href="https://github.com/Aaditree/Machine-Learning-BootCamp/tree/master/ML%20Day%202">Aaditree/Machine-Learning-BootCamp</a></p><p>___________________________________________________________________</p><p><strong>Quote for the day :</strong></p><p>“Do one thing every day that scares you.”</p><p>― Eleanor Roosevelt</p><p>Happy Learning :)</p><p>___________________________________________________________________</p><p>Do give a clap so I get motivated enough to write everyday :D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcd401d50bd2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning Bootcamp : Day 1]]></title>
            <link>https://medium.com/@aaditreejaisswal06/machine-learning-bootcamp-day-1-2f669054fb3a?source=rss-a37ffdc93a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f669054fb3a</guid>
            <category><![CDATA[30daysofml]]></category>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Aaditree Jaisswal]]></dc:creator>
            <pubDate>Sat, 11 Jul 2020 19:58:15 GMT</pubDate>
            <atom:updated>2020-07-11T19:58:15.896Z</atom:updated>
            <content:encoded><![CDATA[<p>Machine Learning Bootcamp : Day 1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/150/1*vY73UL6Y4QkvEWXZrWxkAw.png" /></figure><p>What I learnt :</p><p>___________________________________________________________________</p><ol><li><strong>Mathematics Essentials</strong> : Linear Algebra, Probability, Statistics</li><li><strong>Resources</strong> : 3Blue1Brown — YouTube, Coursera</li></ol><p>___________________________________________________________________</p><ol><li>We started with the basic model of every ML process:</li><li>Corpus → Input →model → Output → (back to Corpus)- and the process repeats.</li><li>Corpus is basically the collection of anything. In this case, it is a collection of data. The data serves as an input to the model,i.e. our mathematical equation . Then the algorithm of the model releases an output corresponding to it. We check if this data corresponds with our data. If it does not, then the model changes accordingly to perform better in the next run.</li><li>So, when we talk about Machine Learning,it is basically making algorithms learn from past experiences and improve their model accordingly. It is also very much dependent on data.</li><li>Artificial Intelligence, is somewhat achieved by Machine Learning.</li><li>So a proper Machine Learning Model would be :</li><li>Training data → Some algorithm → model (← test data ) → output</li><li>We need two separate types of data. Why? We need the training data to teach our model how to do some sort of work. Then we use our test data to check whether it knows how to do it properly.</li><li>If we use the same data as training for testing, it is basically showing you what was served as data to it already. There is no learning in the process. So it is somewhat useless.</li></ol><p>___________________________________________________________________</p><p><strong>TYPES OF MACHINE LEARNING :</strong></p><p>There are mainly four types :</p><ol><li>Supervised Learning</li><li>Unsupervised Learning</li><li>Reinforcement Learning</li><li>Semi-Supervised Learning</li></ol><p>___________________________________________________________________</p><p><strong>SUPERVISED LEARNING</strong></p><p>In this , whatever action we perform is monitored. So when we do it wrong, we are asked to correct it.</p><p>We are given both the input and the output for training and testing the data.</p><p>So it learns based on the given data and performs the same action for any other input given later on.</p><p>There are two types :</p><p>Regression and Classification</p><p>Regression gives continuous values. Example: Predicting house prices.</p><p>Classification gives discrete values like 0 or 1. Example : Differentiate between cat and dog, spam or not spam.</p><p>___________________________________________________________________</p><p><strong>UNSUPERVISED LEARNING</strong></p><p>In this, we only have our input and no output.So we can say that it has unlabelled data. It differentiates and learns based on the similarities and differences between the elements in the dataset.</p><p>We could say it forms clusters. Every cluster contains elements of similar nature and all the clusters differ from the other because of their differences.</p><p>So here, we create a model which helps us to form these clusters.</p><p>___________________________________________________________________</p><p>Let us take an example : <strong><em>The Pizza Problem</em></strong></p><p>So let us assume that there are three plazas which are equidistant from each other, forming a triangle. Now you want to open a pizza place. What would be the most optimal position where you are within reach of all three plazas ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*HdwVHk7Zliao73Foxu152Q.png" /><figcaption>Location of the 3 Plazas</figcaption></figure><p>So here, we can guess that the most optimal position would be its centroid because that position would be equi-distant from all the three plazas.</p><p>Now this one was easy. What if we wanted to build two pizza places?</p><p>Now, one would think that we could just keep it on the midpoints of either AB,AC or AB,BC or even BC,AC.</p><p>But that would mean that there is one plaza that has access to both the pizza places which seems unnecessary. So instead, what we could do is, keep one pizza place at the midpoint of either AB,BC or AC and the second one on the remaining vertex. That would make the places optimal.</p><p>Now, What if there are three? This one is easy, keep one in all the plazas. Simple.</p><p>Okay, the last one would be four pizza places. What would one do in this case?</p><p>Now, there is one extra pizza place even if we put one in each plaza. In this case, we look at the size i.e. the number of people in the plaza. So whichever plaza has the most number of people, we would build two pizza places there, and the other two would be built in the other two plazas.</p><p>___________________________________________________________________</p><p>Another example : <strong><em>Let us take a scenario of Cancer and Cancer Free</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*cZbN2qeBDCP-x4TBx63roA.jpeg" /><figcaption>Cancer vs Cancer Free</figcaption></figure><p>Consider all the points to the left of the line to be labelled as “Cancer”, and the one to the right of the line as “Cancer Free”. Here, if we have to label a new point, we would just do it based on the cluster it is closest to.</p><p>Here, the axes given do not show any coordinates. Instead, they stand for the features , say x1 and x2,with which we classify our data. There can be multiple features on which we regulate our model.</p><p>___________________________________________________________________</p><p><strong>SEMI SUPERVISED LEARNING</strong></p><p>All this does is combine algorithms together to form a bigger algorithm. Part of the data on which it works is labelled and the rest is unlabelled. So we can train our data accordingly and then test it to find outputs.</p><p>___________________________________________________________________</p><p><strong>REINFORCEMENT LEARNING</strong></p><p>Here, the data undergoes the following process:</p><p>Environment → State → Agent → (performing action) → result goes back to Environment.</p><p>And the process repeats.</p><p>So here the model learns based on its actions in the given scenario. If it works correctly, it is given a reward but if it works incorrectly, then the necessary correction is sent back to the environment to improve the model.</p><p>___________________________________________________________________</p><p>This was it for today’s webinar. You can access it through this <a href="https://youtu.be/ycvSMpsg7qk">link</a>.</p><p>A big thank you to the mentors, <strong>Kunal Kushwaha </strong>and <strong>Anuj Garg.</strong></p><p>Link to my handwritten notes :</p><p><a href="https://github.com/Aaditree/Machine-Learning-BootCamp">Aaditree/Machine-Learning-BootCamp</a></p><p>___________________________________________________________________</p><p><strong>Quote for the day :</strong></p><p>“It’s hard to beat a person who never gives up.”</p><p>— Babe Ruth</p><p>Happy Learning :)</p><p>___________________________________________________________________</p><p>Do give a clap so I get motivated enough to write everyday :D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f669054fb3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Days of Coding : Day 2]]></title>
            <link>https://medium.com/@aaditreejaisswal06/100-days-of-coding-day-2-b7e49b654023?source=rss-a37ffdc93a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7e49b654023</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[hashmap]]></category>
            <category><![CDATA[100daysofcode]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[100daychallenge]]></category>
            <dc:creator><![CDATA[Aaditree Jaisswal]]></dc:creator>
            <pubDate>Tue, 30 Jun 2020 08:18:14 GMT</pubDate>
            <atom:updated>2020-06-30T08:22:27.278Z</atom:updated>
            <content:encoded><![CDATA[<h3>100 Days of Coding : Day 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/150/1*vY73UL6Y4QkvEWXZrWxkAw.png" /></figure><p>This was a pretty lazy day but I felt like I deserved it because it was my birthday? I still tried doing a little bit of what I had planned from day 1 and finish that off.</p><p>So I started off with watching the Python videos on Dictionaries. This is because there was a need to revisit this topic and its concepts.</p><p>___________________________________________________________________</p><p><em>What I learnt</em> :</p><p><strong>Create an empty dictionary :</strong></p><p>dct =dict() or dct={}</p><p><strong>To get a value through its key</strong>:</p><p>dct.get(key,0)</p><p>If the key exists, then the value of the key is returned.</p><p>If the key does not exist, then the default value 0 is returned.</p><p><strong>dct.keys()</strong></p><p>This gets all the keys in the dictionary.</p><p><strong>dct.values()</strong></p><p>This gets all the values of the keys in the dictionary.</p><p><strong>dct.items()</strong></p><p>Now, this returns a list of tuples.</p><p>Each tuple contains the key and the value separated by a comma.</p><p>Example : [(1,”A”),(2,”B”)]</p><p><strong>In dictionaries, you can use two iteration variables.</strong></p><p>Example:</p><p>for k,v in dct.items():</p><p>print(v,k)</p><p>This will print all the keys and values but the values will be printed before the keys since we have switched their places in the print statement.</p><p>___________________________________________________________________</p><p>Next up is Tuples:</p><p>Okay, so there was a lot I did not know about this topic so the videos helped a lot.</p><p>___________________________________________________________________</p><p><em>What I learnt:</em></p><p><strong>Firstly</strong>, they are immutable. This is one of the main differences between tuples and lists. It makes it more beneficial for programmer to use tuples if he or she needs to use it without any modifications.</p><p><strong>Secondly</strong>, they cannot be:</p><ol><li>Sorted</li><li>Appended</li><li>Reversed</li></ol><p><strong>Third</strong> :</p><p>Suppose we write,</p><p>(x,y) = (4,fred)</p><p>print(x)</p><p>O/P : 4</p><p>print(y)</p><p>O/P : fred</p><p>We cannot, on the other hand, write:</p><p>(x,y)=9 // This is wrong</p><p><strong>Fourth:</strong></p><p>Tuples are comparable.</p><p><em>Example 1:</em></p><p>(0,1,2)&lt;(5,1,2)</p><p>Here, the comparison between the first elements of the two tuples is True. So it ignores the rest and prints the output as True.</p><p><em>Example 2:</em></p><p>(0,1,2000) &lt; (0,3,5)</p><p>Here, the first elements in both tuples are the same, so it goes on to check the next element and since 1&lt; 3, it ignores the rest and returns True.</p><p>In the case that it been had been the opposite i.e. 3&lt;1 , it would have returned False.</p><p><strong>Sorting a dictionary:</strong></p><p>If you wish to sort a dictionary, you need to first change it into a list and then sort it.</p><p>i.e. sorted(dct.items())</p><p>This will sort the list w.r.t. the keys in the dictionary.</p><p><strong>If you want to sort the elements w.r.t. their values:</strong></p><ol><li>Create the List</li><li>Append into a new list by reversing (k,v) to (v,k). You can do so by using a for loop.</li><li>Then sort it.</li><li>To sort it in reverse, put reverse = True in the parameters.</li></ol><p>Now, another important topic is <strong>List Comprehension.</strong></p><p>This is used for creating dynamic lists.</p><p>For the same algorithm that we talked about, just before this, we can simply write :</p><p>lst = sorted([(v,k) for (k,v) in dct.items()],reverse=True)</p><p>Then again, this needs a lot of practice. So, for beginners, it is always better to write the full code.</p><p>___________________________________________________________________</p><p>Finally, I did Hashmaps. At this point, I am literally completing all the pending work from yesterday.</p><p>I learnt about the basic usage of Hashmaps and how to implement it.</p><ol><li>Fetching values.</li><li>Putting values in the hashmap.</li><li>Iterating through the hashmap.</li><li>Removing values from the hashmap.</li><li>Using another class in the hashmap.</li><li>Fail Fast condition : Concurrent modification exception</li></ol><p>You can access the basics of Hashmap through this<a href="https://medium.com/@aaditreejaisswal06/basics-of-hashmap-what-you-need-to-know-3eda5d373197?sk=166ec912ea9ba900c13c2bee783fe321"> link</a>.</p><p>(I wrote about it separately because this post was getting longer than I intended it to be.)</p><p>___________________________________________________________________</p><p>And that’s it. Day 2 is complete.</p><p>Video Links :</p><p><a href="https://www.coursera.org/learn/python-data/home/welcome">Python Data Structures</a></p><p><a href="https://www.youtube.com/watch?v=EFAbTZWbaAg">Hashmaps</a></p><p>My To Do list for Day 3 currently includes Interview prep. I’’ll add on more things to it as I go on.</p><p>Side Note:</p><p>I encourage others to join this challenge! Why? Because a 100 days from now, you will be thanking yourself for taking that first step.</p><p><strong>Quote for the day :</strong></p><p>“The secret of getting ahead is getting started.”</p><p>— Mark Twain</p><p>Happy Learning :)</p><p>___________________________________________________________________</p><p>Do give a clap so I get motivated enough to write everyday :D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7e49b654023" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basics of Hashmap : What you need to know]]></title>
            <link>https://medium.com/@aaditreejaisswal06/basics-of-hashmap-what-you-need-to-know-3eda5d373197?source=rss-a37ffdc93a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3eda5d373197</guid>
            <category><![CDATA[hashmap]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[100daychallenge]]></category>
            <category><![CDATA[100daysofcode]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Aaditree Jaisswal]]></dc:creator>
            <pubDate>Tue, 30 Jun 2020 08:13:05 GMT</pubDate>
            <atom:updated>2020-06-30T08:20:08.711Z</atom:updated>
            <content:encoded><![CDATA[<h3>Basics of Hashmap : What you need to know</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/150/1*vY73UL6Y4QkvEWXZrWxkAw.png" /></figure><p><em>This is a continuation of my Day 2 post on 100 Days of Coding.</em></p><p>To read the full post of Day 2, use this <a href="https://medium.com/@aaditreejaisswal06/100-days-of-coding-day-2-b7e49b654023"><em>link</em></a>.</p><p>So, to begin, a brief summary of what I learnt :</p><ol><li>Fetching values.</li><li>Putting values in the hashmap.</li><li>Iterating through the hashmap.</li><li>Removing values from the hashmap.</li><li>Using another class in the hashmap.</li><li>Fail Fast condition : Concurrent modification exception</li></ol><p>___________________________________________________________________</p><p><strong>Introduction :</strong></p><ol><li>Hashmap extends the abstract map class.</li><li>It implements the map interface.</li><li>It uses key-value pairs.</li><li>It can only contain unique elements.</li><li>In hashmaps, only one null key is allowed, whereas multiple null values can exist.</li><li><strong>Syntax :</strong></li></ol><p>HashMap &lt; Integer,String&gt;map = new HashMap&lt;Integer,String&gt;();</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong><em>Inputting values in Hashmap :</em></strong><br>map.put(1,”A”);</p><p>map.put(2,”B”);</p><p>map.put(3,”C”);</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong><em>Fetching values in HashMap :</em></strong></p><p>map.get(1)</p><p>O/P : A</p><p>map.get(4)</p><p>O/P : null</p><p>Here, if the key does not exist, it will not show an exception. Instead, it’ll return a null value.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong><em>To iterate through the Hashmap:</em></strong></p><p>for(Entry m : map.entrySet())</p><p>{</p><p>System.out.println(m.getKey()+” “+m.getValue());</p><p>}</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong><em>To remove a pair from the Hashmap:</em></strong></p><p>map.remove(2)</p><p>System.out.println(map);</p><p>O/P: {1=”A”,3=”C”}</p><p>The order does not change and remains unaffected.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong><em>Using another class in the Hashmap:</em></strong></p><p>Consider a class called Student :</p><p>It has , say 2 parameters, name and age.</p><p>So, when you<strong> create the Hashmap</strong>:</p><p>HashMap &lt;Integer,Student&gt; stu =new HashMap&lt;Integer,Student&gt;();</p><p>Student s1 =new Student(“Aadi”,21);</p><p>Student s2 = new Student(“Neil”,24);</p><p>and so on.</p><p>To <strong>put the elements</strong> in the Hashmap:</p><p>stu.put(1,s1);</p><p>stu.put(2,s2);</p><p>To <strong>iterate</strong> through the Hashmap :<br>for (Entry m: stu.entrySet())</p><p>{</p><p>int s= m.getKey();</p><p>Student s =m.getValue();</p><p>System.out.println(“Info of Student : “+s);</p><p>System.out.println(s.name+” ”+s.age);</p><p>}</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>HashMaps are non-synchronised. This means that there can be multiple threads accessing, using and modifying the same hashmap. So it is used in multithreading. This increases efficiency.</p><p>What is the problem?</p><p>Consider five threads, say A,B,C,D and E acccessing the same hashmap.</p><p>This hashmap contains a key-value pair : (1,”neet”)</p><p>Suppose one thread, say A, updates the value of key =1 to “Boat” and now C wants to access that data. It will receive the updated version containing the value “Boat” and not “neet”.</p><p>This is called <strong>Fail Fast condition</strong>. It is also called a concurrent modification exception because a modification is trying to be made when the collection is active, or in use.</p><p>___________________________________________________________________</p><p>That’s it! I hope this was helpful and if you wish to watch the video, just click on this <a href="https://www.youtube.com/watch?v=EFAbTZWbaAg">link</a>.</p><p>Happy Learning :)</p><p>___________________________________________________________________</p><p>Do give a clap so I get motivated enough to write everyday :D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3eda5d373197" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 days of Coding : Day 1]]></title>
            <link>https://medium.com/@aaditreejaisswal06/100-days-of-coding-day-1-e465c98b6071?source=rss-a37ffdc93a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e465c98b6071</guid>
            <category><![CDATA[100daychallenge]]></category>
            <category><![CDATA[100daysofcode]]></category>
            <category><![CDATA[100daysofwriting]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Aaditree Jaisswal]]></dc:creator>
            <pubDate>Mon, 29 Jun 2020 09:06:14 GMT</pubDate>
            <atom:updated>2020-06-29T19:02:05.760Z</atom:updated>
            <content:encoded><![CDATA[<h3>100 days of Coding : Day 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/150/1*vY73UL6Y4QkvEWXZrWxkAw.png" /></figure><p>So I finally decided to start the 100 day challenge. This was after reading a lot of inspiring posts on LinkedIn about the positive impact it had made on those people !</p><p>My first day was actually pretty basic. I started off by doing the first two courses in the <a href="https://www.coursera.org/learn/python-data/home/welcome">Python Specialisation by the University of Michigan,offered by COURSERA.</a></p><p>I know what you are thinking. Two courses? How did you watch all the videos? The thing is, I didn’t. I looked through the contents to see if there was a topic I did not already know, or wanted to revise , and did only those topics. Other than that, I focused on doing all the assignments and submissions properly. This way, I did not waste time re-learning the same concepts and was able to revise through them through the quizzes and the assignments.</p><p>I solved till the Dictionaries assignment of the second course, Python Data Structures, and will be completing the rest on the 29th of June, 2020.</p><p>After that, I decided to read through the book “Cracking through the Coding Interview”. I started reading a chapter called Arrays and this is what I learnt while reading through it.</p><p>So despite what people might think, Hash Maps is a lot more useful than the recognition given to it. There are so many problems that could be solved just by using a simple Hash Map.</p><p>The algorithm for it :</p><p>public Hashmap&lt;Integer,Student&gt;buildMap(Student []stu)</p><p>{</p><p>Hashmap&lt;Integer,Student&gt;map = new Hashmap &lt;Integer, Student&gt;();</p><p>for(Student s:stu ) map.put( s.getId() , s);</p><p>return map;</p><p>}</p><p>This is it! It‘s that simple. Now applying it is obviously a different thing because just knowing the algorithm is not enough. So I searched on YouTube and found a good link to learn more about its implementation.</p><p><a href="https://www.youtube.com/watch?v=EFAbTZWbaAg"><strong>Link for HashMap</strong></a></p><p>I am also going to go with the Algorithms course on Coursera for this to understand it deeply and check if I missed out on something!</p><p><a href="https://www.coursera.org/learn/algorithms-part1/home/welcome"><strong>Link for Algorithms</strong></a></p><p>I also revised the Dynamically resizing arrays concept which basically involved a simple merging of two lists into a new ArrayList.</p><p>Finally,</p><p>One question in the chapter list that I could not answer and so had to search for an explanation:</p><ol><li><strong>How to rotate an image by 90 degrees if each pixel is 4 bytes?</strong></li></ol><p><em>Answer</em> :</p><ol><li><a href="https://www.geeksforgeeks.org/turn-an-image-by-90-degree/">https://www.geeksforgeeks.org/turn-an-image-by-90-degree/</a></li></ol><p>__________________________________________________________________</p><p>And that’s it. Day 1 is complete. I seem to have set up quite a bit of work for Day 2 along with the one I already have. Hopefully I’ll be able to complete it!</p><p>I encourage others to join this challenge! Why? Because a 100 days from now, you will be thanking yourself for taking that first step.</p><p><strong>Quote for the day :</strong></p><p>“Be strong. Even when you can’t be.”<br>― <strong>Saim .A. Cheeda</strong></p><p>Happy Learning :)</p><p>___________________________________________________________________</p><p>Do give a clap so I get motivated enough to write everyday :D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e465c98b6071" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Instagram Bot to upload a picture everyday using the NASA API]]></title>
            <link>https://medium.com/@aaditreejaisswal06/instagram-bot-to-upload-a-picture-everyday-using-the-nasa-api-65449e340028?source=rss-a37ffdc93a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/65449e340028</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[instabot]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[nasa]]></category>
            <dc:creator><![CDATA[Aaditree Jaisswal]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 20:45:25 GMT</pubDate>
            <atom:updated>2020-06-08T20:47:29.102Z</atom:updated>
            <content:encoded><![CDATA[<p>About a week ago ,I was scrolling through Instagram and I saw a post talking about the NASA APOD API. I looked it up and I found out that I could use it to download a live picture of space every single day! So I decided to make a mini project using this API and then upload this picture on Instagram using a bot.</p><p>Now these are actually two different topics that I decided to learn about, and then combine for this project.</p><p>___________________________________________________________________</p><p>So first, we need to understand what the NASA APOD API does. APOD stands for Astronomy Picture of the Day. This gives a life picture of space every single day for your use, for free. This was one of the many APIs that have been given by NASA and are completely accessible to application developers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*eIHLdWbIE1rw4B6xIOtJjQ.png" /></figure><p><a href="https://api.nasa.gov/">You can check it out here</a></p><p>___________________________________________________________________</p><p><em>Let’s get on with the first step!</em></p><p><strong>Step 1</strong> : Generate an API Key.</p><p>We need an API key through which we can call the APOD API. To generate it, scroll down on the same page shown above, type in your details, and sign up. That’s it! You will be shown the key on your page and the information will be sent to you on your email ID as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*4WDX_1xaryeHdZ7TM7kTzQ.png" /><figcaption>API key generator</figcaption></figure><p><strong>Step 2 </strong>: The Coding Part</p><p>We will be using python for coding. I used <strong>Spyder</strong> as my IDE but a different one won’t make any difference, so long as you put in the right code!</p><p><strong>Code</strong>:</p><p>1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/1*wI7kRIeCwpt-yOq65tGaEg.png" /></figure><p>Requests allows you to send HTTP/1.1 requests easily.</p><p>To understand requests better, check out this <a href="https://pypi.org/project/requests/">link</a>.</p><p>2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*ZMeDf6AA8GKZ7tMjw6t0AQ.png" /></figure><p>We will be using<strong> instabot</strong> to connect our python script to our Instagram profile.</p><p>To understand <strong>instabot</strong> better, check out this <a href="https://pypi.org/project/instabot/">link</a>.</p><p><em>Note</em> : While trying out this project, it is better to use a new account rather than your own because the library is not completely safe.</p><p>3. <strong>url = “http://……/YOUR_API_KEY”;</strong></p><p>//this will be provided when you generate your API key.</p><p>Note : This key differs for every individual so please do not upload your key on GITHUB or any other platform because somebody might use your API for something that might not be legal, and since the API is in your name, it’ll track back to you.</p><p>4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*-EH6Yjghw3_Pfdh4bqaJAg.png" /></figure><p>This will get us all the information we need from the URL we have provided.</p><p>5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*Ii3fdOOOtnk_vdWTJ2G9Bg.png" /></figure><p>Now, we use an if-condition to check if we can actually get something from the URL we have provided. If not, it’ll simply print “ERROR”.</p><p>If there is data, we will save it in “A”.</p><p>The “get” function: allows us to get the data we have stored in “A” i.e. our image.</p><p>allow_redirects=True : allows the page to redirect to the one containing the image that we will be downloading.</p><p>The second “if” checks if the data on the page is in .jpg format or not. If not, the script just does not save anything.</p><p>Now, we store the image in a file that we have opened and write pic.content in it.</p><p>Okay, so now we have downloaded the picture. Now for the uploading part.</p><p>We had already imported instabot which will help us log in to our Instagram account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*GqI4G8p-941f27SKd5Ybhw.png" /></figure><p>So log into the account using bot. login and put in your username and password in double quotes.</p><p>To upload, use <strong>bot.upload_photo</strong> and add a <strong>.jpg</strong> at the end of the image path. You can also add a caption with your post using <strong>caption</strong> as a parameter.</p><p>This is it! Now you can run your program and upload a picture of space everyday using your very own python script.</p><p>You can also automate and run it every day at a certain time by creating a basic task on your computer and setting it up to run everyday.</p><p><a href="https://datatofish.com/python-script-windows-scheduler/">Link to the steps</a></p><p>___________________________________________________________________</p><p><strong>To get the code directly, just click on this</strong><a href="https://github.com/Aaditree/Upload-picture-using-APOD-API-and-Instabot"><strong> link</strong></a><strong> </strong>.</p><p>The Instagram account I used for this project : <em>space__everyday</em></p><p><em>Links I used for learning:</em></p><ol><li><a href="https://pypi.org/project/instabot/">https://pypi.org/project/instabot/</a></li><li><a href="https://pypi.org/project/requests/">https://pypi.org/project/requests/</a></li><li><a href="https://bigl.es/tooling-tuesday-nasa-api-and-python/">https://bigl.es/tooling-tuesday-nasa-api-and-python/</a></li><li><a href="https://www.geeksforgeeks.org/post-a-picture-automatically-on-instagram-using-python/">https://www.geeksforgeeks.org/post-a-picture-automatically-on-instagram-using-python/</a></li></ol><p>___________________________________________________________________</p><p>Do give a clap ! It’ll motivate me a lot ! Thank you :)</p><p>___________________________________________________________________</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65449e340028" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Science Specialisation : John Hopkin’s University]]></title>
            <link>https://medium.com/@aaditreejaisswal06/data-science-specialisation-john-hopkins-university-debf8f177686?source=rss-a37ffdc93a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/debf8f177686</guid>
            <category><![CDATA[data-science-courses]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[coursera]]></category>
            <category><![CDATA[r-programming]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Aaditree Jaisswal]]></dc:creator>
            <pubDate>Thu, 28 May 2020 08:34:36 GMT</pubDate>
            <atom:updated>2020-05-28T09:45:50.483Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Data Science Specialisation : John Hopkin’s University</strong></h3><h3>Part 1 — Data Scientist’s Toolbox</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F4FQMuOKR6zQRO%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F4FQMuOKR6zQRO%2Fgiphy.mp4&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F4FQMuOKR6zQRO%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/8cbc37cdc39b59bad6637a6528989b58/href">https://medium.com/media/8cbc37cdc39b59bad6637a6528989b58/href</a></iframe><p><a href="https://www.coursera.org/learn/data-scientists-tools/home/welcome"><em>LINK FOR COURSE</em></a></p><p>When we talk about data science,there are a few things we imply it revolves around; Statistics, Data Cleaning, Computer Science etc and when we talk about data, it is basically any information helpful in decision making. It can be values or numbers or facts. There is no limitation.</p><p>There are mainly six fields of analysis in data science :</p><p>1. Descriptive : summarises the data.</p><p>2. Exploratory : examine the data and find relationships.</p><p><strong>Note</strong>: Correlation does not imply causation.</p><p>3. Inferential : use a small sample of data and make a conclusion for a large population.</p><p>4. Predictive : Use current and historical data to make predictions about the future.</p><p>5. Causal : See what happens to one variable when we manipulate another variable.</p><p>6. Mechanistic : understand the exact changes that take place in one variable that lead to the exact changes in another variable.</p><p>___________________________________________________________________</p><p>In this course, the language that has been used is R. The platform is R studio and along with that, we use version control.</p><p>R is mainly used for two things : <em>Statistical analysis and graphing</em>.</p><p>A few functions of R include:</p><p>1.<strong>install.packages(“ggplot2”)</strong> — to install a single package called “ggplot2”.</p><p>2.<strong> install.packages(“ggplot2”,”devtools”….)</strong> — To install multiple packages together.</p><p>3. <strong>bioclite()</strong> — to get Bioconductor packages</p><p>4. <strong>install_github(“author/package”)</strong></p><p>It’s not just enough to install the package. To use it, we need to load it into R studio.</p><p><strong>Install package -&gt; load[library() ==&gt; library(package_name)]</strong></p><p>To check if all the packages have been installed , we use either <strong>installed.packages() </strong>or<strong> library()</strong>.</p><p>To update a package, we use <strong>update.packages()</strong>.</p><p>To check an old package : <strong>old.packages().</strong></p><p>Consider in a hypothetical situation, the updated package of ggplot2 doesn’t do what we want it to do. Now we need to revert back to the old package. For this , we use: <strong>detach(“package:ggplot2”,unload=True)</strong></p><p>To remove a package completely , we use : <strong>remove.packages(“package_name”)</strong></p><p>To check a version : <strong>version</strong></p><p>To go through information about what you did : <strong>SessionInfo()</strong></p><p>To know information about a certain package : <strong>help( package_name)</strong></p><p><strong>Note</strong>: No inverted commas here</p><p>To understand how to use a particular function, with clear instructions : <strong>browseVignettes()</strong></p><p>___________________________________________________________________</p><p><strong>PROJECTS IN R:</strong></p><p>Every project in R should have 3 main folders to store and organise all the data.</p><p><em>1.Data</em></p><p><em>2.Scripts</em></p><p><em>3.Output</em></p><p>___________________________________________________________________</p><p><strong>VERSION CONTROL</strong></p><p>Version Control records all the changes we make in our project with a timestamp. This helps when we do not understand or remember a particular change we had made in the past and want to go back through it.</p><p>Now we know about R and RStudio and projects, there is one very important thing that one must do, and that is upload the code on Github. This helps to store the code and distribute it as well.</p><p>In Github, a repository is equivalent to a project.</p><p>A few functions of Github:</p><p><strong>commit</strong> : saves all the edited work.</p><p><strong>Push</strong> : updates the repository.</p><p><strong>Pull</strong> : updates the local version of the repository to the current repository.</p><p><strong>Staging</strong> : act of preparing a file for editing.</p><p><strong>Branch</strong> : copies of the main repository .</p><p>Three things that help while updating a repository :</p><p><em>1. Single issue commits.</em></p><p><em>2. Informative message commits.</em></p><p><em>3.Push and pull often, to keep the repository updated.</em></p><p>___________________________________________________________________</p><p><strong>CONFIGURING GIT WITH R</strong></p><p><strong>1. Terminal</strong> :</p><p>Step 1: git config — global user.name=”NAME”</p><p>Step 2: git config — global user.email “xxx@gmail.com”</p><p>then click exit .</p><p>Note : Both of these should match with the information on your Github account.</p><p><strong>2. R STUDIO </strong>:</p><p>Step 1: Open R.</p><p>Step 2: Go to Tools.</p><p>Step 3 : Go to Options.</p><p>Step 4 : Git/SVN.</p><p>Step 5 : Create RSA key.</p><p>Step 6 : View public key and copy.</p><p>Step 7 : Close.</p><p><strong>3. GITHUB ACCOUNT :</strong></p><p>Step 1 : Personal Settings</p><p>Step 2 : SSH and GPG keys.</p><p>Step 3 : Paste the public key here.</p><p>Step 4 : Create a repository.</p><p><strong>4. R STUDIO:</strong></p><p>Step 1 : Select Version control as GIT.</p><p>Step 2 : Put the repository URL .</p><p>Step 3 : Create Project.</p><p>Step 4: Create a new file.</p><p>Step 5 : Make some changes. For example : print(“HELLO WORLD”)</p><p>Step 6 : Commit.</p><p>Step 7 : Push.</p><p><strong>5.TO PUT PROJECTS UNDER VERSION CONTROL</strong></p><p>Step 1 : git init</p><p>Step 2 : git add .</p><p>Step 3 : git status // shows the state of the working directory i.e. whether the files have been added or not.</p><p>Step 4 : git commit -m “Initial Commit”</p><p>___________________________________________________________________</p><p><strong>R MARKDOWN</strong></p><p>This helps in reproducibility .</p><p>To install in R studio : <strong>install.packages(“rmarkdown”)</strong></p><p><strong>Tips </strong>:</p><p>To make text bold : <strong>**text**</strong></p><p>To make text italic : <em>*text*</em></p><p>comments : ‘’’ { }’’’</p><p>___________________________________________________________________</p><p><strong>END NOTE :</strong></p><p>For more such posts, do check out the DSC Cummins Blog : <a href="https://dscccoew.blogspot.com/">https://dscccoew.blogspot.com/</a></p><p>Also do clap! It encourages me to write better!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=debf8f177686" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>