<?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 Arjoonn Sharma on Medium]]></title>
        <description><![CDATA[Stories by Arjoonn Sharma on Medium]]></description>
        <link>https://medium.com/@arjoonn?source=rss-4b883766bfb9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*A-xlWUMjIYayd5R_3Yy8xw.jpeg</url>
            <title>Stories by Arjoonn Sharma on Medium</title>
            <link>https://medium.com/@arjoonn?source=rss-4b883766bfb9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:19:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arjoonn/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[Moving the blog]]></title>
            <link>https://medium.com/@arjoonn/moving-the-blog-8476278e3d03?source=rss-4b883766bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/8476278e3d03</guid>
            <dc:creator><![CDATA[Arjoonn Sharma]]></dc:creator>
            <pubDate>Fri, 04 Sep 2020 04:07:43 GMT</pubDate>
            <atom:updated>2020-09-04T04:07:43.145Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve moved my blog to <a href="https://www.arjoonn.com/blog.html">https://www.arjoonn.com/blog.html</a> mainly because:</p><ul><li>Medium keeps on irritating readers with various login walls.</li><li>The page size is HUGE! Each page load takes around 4 MiB. That’s a lot if you’re on a mobile connection and only want to read a little bit of text.</li><li>The new site has no paywalls/login walls and does not track you in any fashion whatsoever.</li><li>The new page sizes are SMALL. For example my longest article there is 190 KiB. Read away!</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8476278e3d03" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Miroku: A self modifying web server]]></title>
            <link>https://medium.com/@arjoonn/building-a-mini-heroku-2336f9204698?source=rss-4b883766bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/2336f9204698</guid>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[recursion]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[bottlepy]]></category>
            <dc:creator><![CDATA[Arjoonn Sharma]]></dc:creator>
            <pubDate>Thu, 28 Jun 2018 16:10:37 GMT</pubDate>
            <atom:updated>2018-06-29T16:39:08.838Z</atom:updated>
            <content:encoded><![CDATA[<p>We constantly develop APIs for various purposes. Computation, unless shared with others, is quiet useless. The HTTP protocol has become the fastest and easiest way to share your stuff with the rest of the world. One of the easiest ways to get an API up and running is with Heroku. One simply writes the server as needed in Python or another language and ends up with an API that we can call over the internet.</p><p>This ability is useful. To have automatic deployment of your code into an API. Let’s try and build such a service. The requirements being, I should be able to specify the URI, the logic of the code and that’s it. The API should be ready for calling.</p><p>With these requirements I set out to create one such system. To keep it bare bones I used the <a href="http://bottlepy.org/docs/dev/">bottle</a> framework in python. It’s a minimal framework which aims to let you use wsgi. The end product is a system that allows you to focus on the logic and gets out of your way for quick prototyping. The UI I put together is brutal and minimal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tNqcuPXvM2VJOSFRwyuOAA.png" /><figcaption>The default screen of the app.</figcaption></figure><p>What we do is type in an <strong>app name</strong> and an <strong>api endpoint path</strong> at which this logic needs to get served. The textbox below is where we put in the code we want. For example to build an app that squares numbers we could do something like the below image and click on add.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YX0XqlxIlCvCVIQwZ8jXww.png" /></figure><p>This creates a new api which is available at “/squarer/squareit” and it accepts a POST request with JSON of the form {“number”: 5}.</p><p>The API is ready to use. Fire away! Use postman, requests or anything else. That API is up and running. The apps and their APIs get listed on the left and clicking on one of them fills out the right hand side with the appropriate information. You can edit this information and click on “Add API” again to update the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*rH1KW6iSvEXjB3wzTHisiw.png" /><figcaption>Our squarer app is listed under the apps and apis.</figcaption></figure><p>What happened under the hood was that when we clicked the button, the server picked up the app name and the api route along with the code. It created a valid Python file under an “apps” folder.</p><p>Then it rewrote itself to use and serve that app. Once the rewrite was done, it reloaded itself. That’s how we are able to continuously add APIs.</p><p>Enough said though. Go read the code at <a href="https://github.com/thesage21/autoapi">https://github.com/thesage21/autoapi</a>. It’s only 112 lines long.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2336f9204698" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IIITM-K: The honest students' college]]></title>
            <link>https://medium.com/life-at-iiitm-k/honest-students-college-iiitmk-technopark-trivandrum-c4542ffbd1c3?source=rss-4b883766bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4542ffbd1c3</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Arjoonn Sharma]]></dc:creator>
            <pubDate>Tue, 26 Jun 2018 04:15:29 GMT</pubDate>
            <atom:updated>2018-06-26T04:15:29.446Z</atom:updated>
            <content:encoded><![CDATA[<h3>IIITM-K: The honest students’ college</h3><p>Having attended two institutes promising to provide education I’ve come to form an opinion on the Indian education social system. I’ll tell you about my second institute a little.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYiC3eatb_mWMEpRW5ecng.jpeg" /></figure><p>IIITM-K was where I did my masters. As many institutes as I have seen, this college has sharpened the concept of research freedom to such a degree that for the first few months I had a hard time believing the things I was allowed to do. I’ve learned more in those two years than I did in my three years of graduation and the years after.</p><p>You see, in India, education was a thing that only a few had access to. This made it a rare thing to have. As a result lots of places opened up promising to deliver this gem to you for a price. Now the problem was that there was little to no quality control on these institutions. Thus began the flood of sub-par teaching shops which gave you training which was worth less than the paper it’s certification was written on. There are a lot of factors which supported this flood which are beyond the scope of this story. These fakes were easily spotted if a little thought was put into it. Very easy entrance tests, promises of a golden future, slightly higher fees than government run colleges. All of these with sprawling campuses and riches that old institutes seldom see.</p><p>IIITM-K was not like that. They knew just how good they were and where their strengths and weaknesses lay. When I joined I did not get the “your life is going to be a bed of roses since you’ve come here now”. What was told to us was that the college was merely a catalyst. It was up to us to learn as much as we could in that short time. If we required something we had to ask the college. That’s all. There would be a set course but that was merely to be followed as a general guideline. We were to dive deep into any question that caught our fancy and as deep as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LyR_IBKAcEi76om72t0gGg.jpeg" /></figure><p>We were like a group of commandos. We put up requirements quickly and the college resolved them even faster. All you had to do was send in an email and the next day the equipment/software/permissions were ready to be used. This was the kind of free learning that Tagore had talked about. When we needed more books, one simply sent an amazon or flipkart link to the librarian and in the next few days the book would be brought in. If not then surely by the next month or so. Never did I face a situation where we were told that we could not do something. All we had to do was report our activities to the necessary people so that we did not get intro legal trouble.</p><p>The administration was abundantly supportive, though a few bad apples are often the norm. Requests for changes to the administrative structure were met with acceptance rather than the grumpy face which is the standard in government institutions.</p><p>IIITM-K however was never family to me. A family forgives your mistakes. It accepts you as you are and asks nothing for it. IIITM-K was a place where I could ask any question and spend any amount of resource/time on the pursuit of that answer. It was truly a place of learning where a free hand was given like no other institute I have seen. It expected you to ask questions though.</p><p>For those who followed the course like a lifeline in a crashing plane, it was also a graveyard. If you did not seek, nothing was given to you. Many dreary souls simply spent their days reading for exams while the rest of us were least worried about them. Like Dumbledore said</p><p>“Help will always be given at Hogwarts to those who ask for it.”</p><p>There’s another thing. Exams are a measurement. For the student to improve, there must be learning and not an effort to do better in the exam. If the metric becomes the goal then learning stagnates. IIITM-K was never afraid to let it’s students ignore a few bad scores in the pursuit of knowledge. Ultimately even though very few of us seriously studied for the exams most of us got a decent set of marks in them.</p><p>After leaving college I’ve sometimes missed those free pursuits of long term questions. Like how one misses the winds in summers past. Though most colleges offer learning, I’ve yet to come across a model of learning as free as IIITM-K.</p><p>Sometimes when I think back on my colleges, IIITM-K feels like the honest man’s college. It expects you to do your bit and rewards you generously if you do. You have to earn your learning here. Earn it by the questions you ask, by the problems you solve, by the things you discover you know nothing about.</p><p>This college is where you have to work like an honest man.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4542ffbd1c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/life-at-iiitm-k/honest-students-college-iiitmk-technopark-trivandrum-c4542ffbd1c3">IIITM-K: The honest students&#39; college</a> was originally published in <a href="https://medium.com/life-at-iiitm-k">Life at IIITM-K</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reading arxiv.org (any pdf) on Kindle]]></title>
            <link>https://medium.com/@arjoonn/reading-arxiv-org-any-pdf-on-kindle-bcd3b96c2eb2?source=rss-4b883766bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcd3b96c2eb2</guid>
            <category><![CDATA[pdf]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[arxiv]]></category>
            <category><![CDATA[kindle]]></category>
            <dc:creator><![CDATA[Arjoonn Sharma]]></dc:creator>
            <pubDate>Fri, 01 Jun 2018 17:25:54 GMT</pubDate>
            <atom:updated>2018-06-01T17:25:54.305Z</atom:updated>
            <content:encoded><![CDATA[<p>Reading papers on the kindle would be amazing! I’ve written a tool to do this for us now.</p><p>First, go to <a href="http://amazon.com/myk">amazon.com/myk</a> and go to your managed kindles. There find your kindle email address. Mine looks like arjoonn@kindle.com. While you are there, also figure out your accepted email addresses. This appears in the manage devices section. There’s a <a href="https://www.amazon.in/gp/help/customer/display.html?nodeId=201974220">whole tutorial</a> to guide you through finding this information by amazon. From this we obtain two addresses. <strong>Sender</strong> (arjoonn.xxxx@gmail.com) and <strong>Receiver </strong>(arjoonn@kindle.com).</p><p>Now we go to <a href="https://myaccount.google.com/apppasswords">https://myaccount.google.com/apppasswords</a> and register a new password for an app. Maybe call this app ‘SendArxivToKindle’. Copy down that password somewhere. This is the <strong>app password</strong>.</p><p>Now we go to this <a href="https://gist.github.com/theSage21/a19d68778c647a34c8ef21bf2f2a6c14">gist</a> and download the code there. We fill in the three things in the script, namely <a href="https://gist.github.com/theSage21/a19d68778c647a34c8ef21bf2f2a6c14#file-mailer-py-L20"><strong>sender</strong></a><strong>, </strong><a href="https://gist.github.com/theSage21/a19d68778c647a34c8ef21bf2f2a6c14#file-mailer-py-L22"><strong>receiver</strong></a><strong> </strong>and,<strong> </strong><a href="https://gist.github.com/theSage21/a19d68778c647a34c8ef21bf2f2a6c14#file-mailer-py-L21"><strong>app password</strong></a>. To install the dependencies we run</p><pre>pip install --user requests bs4</pre><p>Now to send arxiv papers to our kindle we simply need to run the following from a terminal.</p><pre>python mailer.py <a href="https://arxiv.org/abs/1805.12076">https://arxiv.org/abs/1805.12076</a></pre><p>That’s it! Now whenever we come across a paper that we really like, all we have to do is run that last command with the appropriate link and in a minute or so the paper appears on our kindle. Make sure it’s the ABS link and not the PDF link though. A sample run looks like this.</p><pre>python mailer.py <a href="https://arxiv.org/abs/1805.09786">https://arxiv.org/abs/1805.09786</a><br>Downloading <a href="https://arxiv.org/pdf/1805.09786.pdf">https://arxiv.org/pdf/1805.09786.pdf</a><br>Hyperbolic Attention Networks.pdf<br>Sending <a href="https://arxiv.org/pdf/1805.09786.pdf">https://arxiv.org/pdf/1805.09786.pdf</a><br>Email sent!<br>Removing temp file<br>Done</pre><p>You can specify the link to any pdf on the internet and it will work. For example I have a paper I need to read and so sending it to my Kindle looks as such:</p><pre>python mailer.py <a href="http://consc.net/papers/evolution.pdf">http://consc.net/papers/evolution.pdf</a><br>Downloading <a href="http://consc.net/papers/evolution.pdf">http://consc.net/papers/evolution.pdf</a><br>evolution.pdf<br>Sending <a href="http://consc.net/papers/evolution.pdf">http://consc.net/papers/evolution.pdf</a><br>Email sent!<br>Removing temp file<br>Done</pre><p>Happy reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcd3b96c2eb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Works everywhere! setup.py with Pipenv]]></title>
            <link>https://medium.com/@arjoonn/works-everywhere-setup-py-with-pipenv-bb28ee6ec28f?source=rss-4b883766bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb28ee6ec28f</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pipenv]]></category>
            <dc:creator><![CDATA[Arjoonn Sharma]]></dc:creator>
            <pubDate>Thu, 31 May 2018 17:50:09 GMT</pubDate>
            <atom:updated>2018-05-31T17:50:09.269Z</atom:updated>
            <content:encoded><![CDATA[<p>At work we have a few packages which we use internally. By package I mean a conventional Python package which is installed via pip and is listed in the setup.py files of other packages.</p><p>Using pipenv has great benefits for reproducible builds but you lose the ability to specify dependencies in setup.py. One solution to this problem is to specify dependencies in the setup file and to install the package with pipenv. The setup.py looks like so:</p><pre>from setuptools import setup</pre><pre>setup(name=&#39;mytool&#39;,<br>      ...<br>      ...<br>      install_requires=[&#39;requests&#39;, &#39;tqdm&#39;])</pre><p>Now to install everything for this tool, we do pipenv install -e . which installs the package and it’s dependencies while creating a proper Pipenv.lock file. To deploy we simply use pipenv install --deploy.</p><p>Now if this package was needed in another package, and was not something available via pypi (rather via something like private gitlab.com), we can then write the setup.py of the other package as such:</p><pre>from setuptools import setup</pre><pre>links = [&#39;git+ssh://git@gitlab.com/clapresearch/mytool.git@v0.5#egg=mytool-0.5&#39;]</pre><pre>setup(name=&#39;some_other_tool&#39;,<br>      ...<br>      ...<br>      install_requires=[&#39;mytool==0.5&#39;],<br>      dependency_links=links<br>      ...<br>      ...)</pre><p>Now when we can do PIP_PROCESS_DEPENDENCY_LINKS=1 pipenv install -e . and the proper dependencies will be obtained and installed (although it will complain about the use of --process-dependency-links ). In production we do the same thing but with PIP_PROCESS_DEPENDENCY_LINKS=1 pipenv install --deploy instead.</p><p>Without the --process-dependency-links Pipenv fails to find your private repo since pip fails to find it. There you have it! The good locking of Pipenv with old school dependency listing in packages. All of which are listable as dependencies in other packages.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb28ee6ec28f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>