<?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 Gaurav Balyan on Medium]]></title>
        <description><![CDATA[Stories by Gaurav Balyan on Medium]]></description>
        <link>https://medium.com/@gaurav_scipub?source=rss-3e3692cc1e87------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hl5ws5xjWgb6hhpSJ9LniQ.jpeg</url>
            <title>Stories by Gaurav Balyan on Medium</title>
            <link>https://medium.com/@gaurav_scipub?source=rss-3e3692cc1e87------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:15:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gaurav_scipub/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[The New Era of Machine Intelligence:- HTM (Hierarchical Temporal Memory )]]></title>
            <link>https://medium.com/@gaurav_scipub/the-new-era-of-machine-intelligence-htm-hierarchical-temporal-memory-d46a67e4a446?source=rss-3e3692cc1e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/d46a67e4a446</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Gaurav Balyan]]></dc:creator>
            <pubDate>Sun, 04 Feb 2018 15:13:03 GMT</pubDate>
            <atom:updated>2018-02-09T05:23:10.382Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>HTM</strong> is a theoretical framework for machine intelligence and it is based on <strong>neuroscience</strong>and the <strong>pyramidal neurons </strong>in the <a href="https://en.wikipedia.org/wiki/Neocortex"><strong>neocortex</strong></a> of the human brain.</p><p>please read my article and if you have any question please ask-</p><p><a href="https://www.linkedin.com/pulse/new-era-machine-intelligence-htm-hierarchical-temporal-baliyan/">https://www.linkedin.com/pulse/new-era-machine-intelligence-htm-hierarchical-temporal-baliyan/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d46a67e4a446" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use mongoDB(nosql) with django without changing django ORM]]></title>
            <link>https://medium.com/@gaurav_scipub/using-mongodb-nosql-with-django-without-changing-django-orm-cefee6f94d37?source=rss-3e3692cc1e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/cefee6f94d37</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Gaurav Balyan]]></dc:creator>
            <pubDate>Sun, 31 Dec 2017 07:34:44 GMT</pubDate>
            <atom:updated>2017-12-31T07:35:07.593Z</atom:updated>
            <content:encoded><![CDATA[<p>MongoDB is an open-source document oriented database that provides high performance, high availability, and automatic scaling.</p><p>If you have already django ORM designed code with relational database and you want to use mongoDB database on exist ORM then it can be possible using <strong>djongo</strong> package.</p><p><strong>What is djongo?</strong></p><p>djongo is a SQL to mongodb query compiler. It translates a SQL query string into a mongoDB query document.</p><p><strong>How is use djongo in django project?</strong></p><p>Step 1. install djongo package</p><p>pip install djongo</p><p>Step 2. changes in setting.py</p><pre>DATABASES = {<br>    &#39;default&#39;: {<br>        &#39;ENGINE&#39;: &#39;djongo&#39;,<br>        &#39;NAME&#39;: &#39;database name&#39;,<br>    }`<br>}</pre><p>Step 3. perform migrations command</p><p>./manage.py makemigrations</p><p>./manage.py migrate</p><p>Step 5. Fun with django admin!</p><p><strong>Ref</strong>- <a href="https://github.com/nesdis/djongo">https://github.com/nesdis/djongo</a></p><p><strong>Note-</strong> Suggestions for improvements or issues, please raise a git-hub issue ticket. For questions and clarifications regarding usage, please put it up on stackoverflow instead.</p><p>For any query please write in comment box.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cefee6f94d37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A good use of asyncio in python and django.]]></title>
            <link>https://medium.com/@gaurav_scipub/a-good-use-of-asyncio-in-python-and-django-8aa7bc401e5f?source=rss-3e3692cc1e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/8aa7bc401e5f</guid>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[asynchronous]]></category>
            <dc:creator><![CDATA[Gaurav Balyan]]></dc:creator>
            <pubDate>Sun, 17 Dec 2017 16:38:48 GMT</pubDate>
            <atom:updated>2018-04-24T17:27:32.561Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, I pick a asynchronous programming concept from python which is launched in python 3.4. It provides infrastructure for writing single-threading concurrent code using coroutines and it is totally based on event loop.</p><p><strong>The basic terminology used-</strong></p><ol><li><strong>Coroutine :-</strong></li></ol><p>This is a sequence of instruction or a simply function which is used for specific task but difference between simple function and coroutine is that coroutine can pause and resume that’s why coroutine can be used for non-primitive multi-tasking.</p><p>In python, Coroutine like generator but difference between coroutine and generator is that generator produce data but coroutine consume data.</p><p>coroutine is define in two way -</p><p><strong>A.</strong> Using <strong>async def </strong>which is given in 3.5 -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*Ozfn5UbUCUxCV_t0y-h_Hg.png" /></figure><p><strong>B.</strong> By using <strong>@asyncio.coroutine </strong>decorator<strong> </strong>(generator based)<strong>-</strong></p><p>We have to use this decorator <strong>@asyncio.coroutine </strong>to define coroutine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*EiqNeVSTyzTlX5CZ_16cXA.png" /></figure><p><strong>2. Task -</strong></p><p>It is scheduler for coroutine. A <strong>Task</strong> is a subclass of <strong>Future</strong> that wraps a coroutine and <strong>Future</strong> is an object that is supposed to have a result in the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*dn18yfY4kVLODXAoj8zgKg.png" /></figure><p><strong>3. Event loop -</strong></p><p>It as the central executor in asyncio. It is like javascript, nodejs, nginx’s event loop etc.</p><p>something like -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*i3VYhsWBrW8Nviblcn_1ag.png" /></figure><p><strong>Simple use case :-</strong></p><ol><li><strong>web scraping -</strong></li></ol><p>Web scraping automatically extracts data and presents it in a format you can access easily.</p><p>Key Points to remember-</p><ol><li>Firstly, You should check website’s terms and condition before scrape.</li><li>Do not hit more request simultaneously because this may break the website. Below my example show only basic use, You can use asyncio for hit multiple website together.</li><li>The layout of a website may change from time to time, so make sure to revisit the site and rewrite your code as needed.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*dWkuNQM21kO149COivYYMA.png" /></figure><p><strong>Note:- </strong>This is only example how to use <strong>asyncio</strong>. you should not be used data for commercial purposes.</p><p><strong>2. In django project -</strong></p><p>Let suppose you want to send mail/bulk send then you never want toend users to have to wait unnecessarily. In this case we can use asyncio-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*0C1GaEaLmOzh5KzkQMuMFA.png" /></figure><p>Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8aa7bc401e5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>