<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>featured on Arunrocks</title>
    <link>https://arunrocks.com/tags/featured/</link>
    <description>Recent articles in featured on Arunrocks</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 09 Dec 2020 22:54:50 +0530</lastBuildDate><atom:link href="https://arunrocks.com/tags/featured/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Fitting a Django Application in One File</title>
      <link>https://arunrocks.com/django-application-in-one-file/</link>
      <pubDate>Wed, 09 Dec 2020 22:54:50 +0530</pubDate>
      
      <guid>https://arunrocks.com/django-application-in-one-file/</guid>
      <description>&lt;p&gt;Earlier this week, Anthony a french economics university student wanted to talk to me over Zoom about my &lt;a href=&#34;https://arunrocks.com/ray-tracer-in-python-1-points-in-3d-space-show-notes/&#34;&gt;ray tracer tutorials&lt;/a&gt;. He and his friend were new to Python but were excited to implement their own ray tracer after following my videos. One of the questions that popped up in the conversation was - &amp;ldquo;Can we put all the classes in one file instead of breaking it into individual files per class?&amp;rdquo;. I said, &amp;ldquo;Of course&amp;rdquo; and noticed a wave of relief in their faces. In fact, I explained, my earlier implementation was all in one file and later broken up for better pedagogy.&lt;/p&gt;
&lt;div data-pullquote=&#34;&amp;#34;It might be amusing to some Django developers that we will not start with the startproject command.&#34;&gt;
&lt;/div&gt;
&lt;p&gt;But the charm of an entire project in a single file is compelling. I remember seeing a Sinatra web application a few years ago containing the entire application and assets like HTML templates and CSS in a single file. Presenting all the components in the same file gave a complete high-level overview of the project by simply scrolling up and down.&lt;/p&gt;
&lt;p&gt;Normally, at this point, someone would suggest a microframework. But it is not that easy.&lt;/p&gt;
&lt;h2 id=&#34;microframeworks&#34;&gt;Microframeworks&lt;/h2&gt;
&lt;p&gt;Microframeworks take a minimalistic approach by omitting certain components or directing you to a few recommended components. For instance, &lt;a href=&#34;https://bottlepy.org/docs/dev/&#34;&gt;Bottle&lt;/a&gt; contains basic form handling capabilities but has no protection against &lt;a href=&#34;https://www.wikiwand.com/en/Cross-site_request_forgery&#34;&gt;CSRF&lt;/a&gt; or &lt;a href=&#34;https://www.wikiwand.com/en/Clickjacking&#34;&gt;clickjacking&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So the approach is generally to use another library like &lt;a href=&#34;https://pypi.org/project/bottle-utils-csrf/&#34;&gt;bottle-utils-csrf&lt;/a&gt;. This leaves the task of integration to the developer. This is not to pooh-pooh tiny web frameworks. I love the idea (especially Bottle which I think is really cute). But for public facing sites, I prefer the safety and convenience of Django.&lt;/p&gt;
&lt;p&gt;So I am tempted to try this one-file trick in Django. Let’s try to make a non-trivial web application with forms, templates and images. How does one go about doing something like that?&lt;/p&gt;
&lt;p&gt;Note: if you prefer to watch the video version, click on the video below:&lt;/p&gt;

&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
  &lt;iframe src=&#34;https://www.youtube.com/embed/7XNChGGoBf0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; allowfullscreen title=&#34;YouTube Video&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;h2 id=&#34;django-applications-in-one-file&#34;&gt;Django Applications in One File&lt;/h2&gt;
&lt;h3 id=&#34;minimal&#34;&gt;Minimal&lt;/h3&gt;
&lt;p&gt;Let’s start small by creating a minimal Hello World application in Django. It might be amusing to some Django developers that we will not start with the &lt;code&gt;startproject&lt;/code&gt; command. In fact, it is not necessary for Django to work at all. All that initial directory structure and files like settings.py are for your convenience.&lt;/p&gt;
&lt;p&gt;First, create a simple file called &lt;code&gt;app.py&lt;/code&gt; with the following:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sys&lt;/span&gt;

&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django.conf&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;settings&lt;/span&gt;
&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django.urls&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;path&lt;/span&gt;
&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django.http&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;HttpResponse&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;settings&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;configure&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;DEBUG&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;True&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# For debugging&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;SECRET_KEY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;a-bad-secret&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# Insecure! change this&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;ROOT_URLCONF&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;vm&#34;&gt;__name__&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;


&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;home&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
	&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;HttpResponse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Welcome!&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;


&lt;span class=&#34;n&#34;&gt;urlpatterns&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;path&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;home&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;

&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;vm&#34;&gt;__name__&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
	&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django.core.management&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;execute_from_command_line&lt;/span&gt;

	&lt;span class=&#34;n&#34;&gt;execute_from_command_line&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sys&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;argv&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Yes, that&amp;rsquo;s all you need. There are some bad practices like hard coding the secret key (easily fixed). But the sheer elegance of everything being in hardly a screenful is quite rewarding.&lt;/p&gt;
&lt;p&gt;The command to run this file is: &lt;code&gt;python app.py runserver 8080&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now we will skip a couple of steps (they are in the video) and move on to a simple &amp;ldquo;Coming Soon&amp;rdquo; landing page.&lt;/p&gt;
&lt;h3 id=&#34;coming-soon-application&#34;&gt;Coming Soon Application&lt;/h3&gt;
&lt;p&gt;The idea of a coming-soon page is to gauge interest in a product before it is released. Such pages must have a clear call to action (CTA) like asking for your email. Ideally it should have minimum friction and yet collect all the relevant information.&lt;/p&gt;
&lt;p&gt;Let’s look at my updated app.py:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;os&lt;/span&gt;
&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sys&lt;/span&gt;

&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django.conf&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;settings&lt;/span&gt;
&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django.urls&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;path&lt;/span&gt;
&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django.http&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;HttpResponse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;HttpResponseRedirect&lt;/span&gt;
&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django.core.wsgi&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;get_wsgi_application&lt;/span&gt;
&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django.template&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;RequestContext&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Template&lt;/span&gt;
&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;forms&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;CSV_LIST&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;thelist.csv&amp;#34;&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;settings&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;configure&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;DEBUG&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;os&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;environ&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;DEBUG&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;ALLOWED_HOSTS&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;*&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# Disable host header validation&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;ROOT_URLCONF&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;vm&#34;&gt;__name__&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;SECRET_KEY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;os&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;environ&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;SECRET_KEY&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;a-bad-secret&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;TEMPLATES&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[{&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;BACKEND&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;django.template.backends.django.DjangoTemplates&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}],&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;MIDDLEWARE_CLASSES&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
    	&lt;span class=&#34;s2&#34;&gt;&amp;#34;django.middleware.common.CommonMiddleware&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
    	&lt;span class=&#34;s2&#34;&gt;&amp;#34;django.middleware.csrf.CsrfViewMiddleware&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
    	&lt;span class=&#34;s2&#34;&gt;&amp;#34;django.middleware.clickjacking.XFrameOptionsMiddleware&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
	&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;


&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;EnlistForm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;forms&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Form&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;forms&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EmailField&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
    	&lt;span class=&#34;n&#34;&gt;required&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;True&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
    	&lt;span class=&#34;n&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;False&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
    	&lt;span class=&#34;n&#34;&gt;widget&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;forms&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EmailInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;attrs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;placeholder&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Email&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}),&lt;/span&gt;
	&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;referrer&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;forms&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CharField&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;required&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;False&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;widget&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;forms&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;HiddenInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;


&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;home&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
	&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;method&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;POST&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
    	&lt;span class=&#34;n&#34;&gt;form&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;EnlistForm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;POST&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
    	&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;is_valid&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;():&lt;/span&gt;
        	&lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cleaned_data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;email&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
        	&lt;span class=&#34;n&#34;&gt;referrer&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cleaned_data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;referrer&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
        	&lt;span class=&#34;n&#34;&gt;ip&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;META&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;REMOTE_ADDR&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
        	&lt;span class=&#34;k&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Got email of {email}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
        	&lt;span class=&#34;k&#34;&gt;with&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;open&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;CSV_LIST&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;a&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;as&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;csv&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
            	&lt;span class=&#34;n&#34;&gt;csv&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;{email},{referrer},{ip}&lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\n&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
        	&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;HttpResponseRedirect&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/thanks/&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
	&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
    	&lt;span class=&#34;n&#34;&gt;form&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;EnlistForm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;initial&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;referrer&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;META&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;HTTP_REFERER&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)})&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;context&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;RequestContext&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
    	&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;content&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Sign up for early access&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;form&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
	&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
	&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;HttpResponse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MAIN_HTML&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;render&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;


&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;thanks&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;context&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;RequestContext&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
    	&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
    	&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;content&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Thank you for signing up. We will contact you!&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;form&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;None&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
	&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
	&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;HttpResponse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MAIN_HTML&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;render&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;


&lt;span class=&#34;n&#34;&gt;urlpatterns&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;path&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;home&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
	&lt;span class=&#34;n&#34;&gt;path&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;thanks/&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;thanks&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;app&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;get_wsgi_application&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;


&lt;span class=&#34;n&#34;&gt;MAIN_HTML&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Template&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
	&lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;lt;html&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;  &amp;lt;head&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;	&amp;lt;title&amp;gt;Coming Soon | Flying Cars&amp;lt;/title&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;	&amp;lt;meta name=&amp;#34;viewport&amp;#34; content=&amp;#34;width=device-width, initial-scale=1.0&amp;#34;&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;	&amp;lt;style&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	@import url(&amp;#39;https://fonts.googleapis.com/css2?family=Exo:wght@400;500;600;700;800;900&amp;amp;display=swap&amp;#39;);
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	*{
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	margin: 0;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	padding: 0;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	box-sizing: border-box;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	font-family: &amp;#39;Exo&amp;#39;, sans-serif;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	html,body{
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	display: grid;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	height: 100%;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	width: 100%;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	place-items: center;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	background-color: #343434;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	/* Thanks to Hero Patterns for the background */
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	background-image: url(&amp;#34;data:image/svg+xml,%3Csvg xmlns=&amp;#39;http://www.w3.org/2000/svg&amp;#39; viewBox=&amp;#39;0 0 56 28&amp;#39; width=&amp;#39;56&amp;#39; height=&amp;#39;28&amp;#39;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;%3E&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;%3Cpath fill=&amp;#39;%23000000&amp;#39; fill-opacity=&amp;#39;0.4&amp;#39; d=&amp;#39;M56 26v2h-7.75c2.3-1.27 4.94-2 7.75-2zm-26 2a2 2 0 1 0-4 0h-4.09A25.98 25.98 0 0 0 0 16v-2c.67 0 1.34.02 2 .07V14a2 2 0 0 0-2-2v-2a4 4 0 0 1 3.98 3.6 28.09 28.09 0 0 1 2.8-3.86A8 8 0 0 0 0 6V4a9.99 9.99 0 0 1 8.17 4.23c.94-.95 1.96-1.83 3.03-2.63A13.98 13.98 0 0 0 0 0h7.75c2 1.1 3.73 2.63 5.1 4.45 1.12-.72 2.3-1.37 3.53-1.93A20.1 20.1 0 0 0 14.28 0h2.7c.45.56.88 1.14 1.29 1.74 1.3-.48 2.63-.87 4-1.15-.11-.2-.23-.4-.36-.59H26v.07a28.4 28.4 0 0 1 4 0V0h4.09l-.37.59c1.38.28 2.72.67 4.01 1.15.4-.6.84-1.18 1.3-1.74h2.69a20.1 20.1 0 0 0-2.1 2.52c1.23.56 2.41 1.2 3.54 1.93A16.08 16.08 0 0 1 48.25 0H56c-4.58 0-8.65 2.2-11.2 5.6 1.07.8 2.09 1.68 3.03 2.63A9.99 9.99 0 0 1 56 4v2a8 8 0 0 0-6.77 3.74c1.03 1.2 1.97 2.5 2.79 3.86A4 4 0 0 1 56 10v2a2 2 0 0 0-2 2.07 28.4 28.4 0 0 1 2-.07v2c-9.2 0-17.3 4.78-21.91 12H30zM7.75 28H0v-2c2.81 0 5.46.73 7.75 2zM56 20v2c-5.6 0-10.65 2.3-14.28 6h-2.7c4.04-4.89 10.15-8 16.98-8zm-39.03 8h-2.69C10.65 24.3 5.6 22 0 22v-2c6.83 0 12.94 3.11 16.97 8zm15.01-.4a28.09 28.09 0 0 1 2.8-3.86 8 8 0 0 0-13.55 0c1.03 1.2 1.97 2.5 2.79 3.86a4 4 0 0 1 7.96 0zm14.29-11.86c1.3-.48 2.63-.87 4-1.15a25.99 25.99 0 0 0-44.55 0c1.38.28 2.72.67 4.01 1.15a21.98 21.98 0 0 1 36.54 0zm-5.43 2.71c1.13-.72 2.3-1.37 3.54-1.93a19.98 19.98 0 0 0-32.76 0c1.23.56 2.41 1.2 3.54 1.93a15.98 15.98 0 0 1 25.68 0zm-4.67 3.78c.94-.95 1.96-1.83 3.03-2.63a13.98 13.98 0 0 0-22.4 0c1.07.8 2.09 1.68 3.03 2.63a9.99 9.99 0 0 1 16.34 0z&amp;#39;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;%3E&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;%3C/path&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;%3E&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;%3C/svg&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;%3E&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;);
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	::selection{
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	color: #fff;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	background: #FC4782;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	.wrapper{
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	color: #eee;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	max-width: 900px;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	text-align: center;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	padding: 0 50px;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	.signup {
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	margin-top: 30px;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	margin-bottom: 10px;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	.content {
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	margin-top: 40px;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   	margin-bottom: 10px;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 	}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;	&amp;lt;/style&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;  &amp;lt;/head&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;  &amp;lt;body&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;	&amp;lt;div class=&amp;#34;wrapper&amp;#34;&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;  	&amp;lt;svg width=&amp;#34;600&amp;#34; height=&amp;#34;300&amp;#34; version=&amp;#34;1.1&amp;#34; viewBox=&amp;#34;0 0 600 300&amp;#34; xmlns=&amp;#34;http://www.w3.org/2000/svg&amp;#34;&amp;gt;&amp;lt;g transform=&amp;#34;translate(0,312)&amp;#34;&amp;gt;&amp;lt;path d=&amp;#34;m218.36-289.66h163.29c29.039 0 52.417 23.378 52.417 52.417v45.564c0 29.039-23.378 52.417-52.417 52.417h-163.29c-29.039 0-52.417-23.378-52.417-52.417v-45.564c0-29.039 23.378-52.417 52.417-52.417z&amp;#34; fill=&amp;#34;#204a87&amp;#34; stop-color=&amp;#34;#000000&amp;#34; stroke=&amp;#34;#eeeeec&amp;#34; stroke-linecap=&amp;#34;round&amp;#34; stroke-linejoin=&amp;#34;round&amp;#34; stroke-width=&amp;#34;4&amp;#34;/&amp;gt;&amp;lt;g fill=&amp;#34;#729fcf&amp;#34; stroke=&amp;#34;#eeeeec&amp;#34; stroke-linejoin=&amp;#34;round&amp;#34; stroke-width=&amp;#34;4&amp;#34;&amp;gt;&amp;lt;path d=&amp;#34;m240.88-162.15c21.473-37.192 42.946-74.385 64.419-111.58&amp;#34; stop-color=&amp;#34;#000000&amp;#34;/&amp;gt;&amp;lt;g stroke-linecap=&amp;#34;round&amp;#34;&amp;gt;&amp;lt;path d=&amp;#34;m276.15-249.32h-72.081&amp;#34; stop-color=&amp;#34;#000000&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m259.9-221.32h-56.025&amp;#34; stop-color=&amp;#34;#000000&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m267.69-235.32h-63.714&amp;#34; stop-color=&amp;#34;#000000&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m370.37-162.15c-21.473-37.192-42.946-74.385-64.419-111.58&amp;#34; stop-color=&amp;#34;#000000&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m332-249.93h72.081&amp;#34; stop-color=&amp;#34;#000000&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m348.25-221.93h56.025&amp;#34; stop-color=&amp;#34;#000000&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m340.46-235.93h63.714&amp;#34; stop-color=&amp;#34;#000000&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m240.88-162.15c21.473-26.526 42.946-53.051 64.419-79.577&amp;#34; stop-color=&amp;#34;#000000&amp;#34;/&amp;gt;&amp;lt;/g&amp;gt;&amp;lt;path d=&amp;#34;m370.37-162.15c-21.473-26.526-42.946-53.051-64.419-79.577&amp;#34; stop-color=&amp;#34;#000000&amp;#34;/&amp;gt;&amp;lt;/g&amp;gt;&amp;lt;g fill=&amp;#34;#eeeeec&amp;#34;&amp;gt;&amp;lt;path d=&amp;#34;m183.74-116.06-6.3858 17.316h12.795zm-2.6568-4.6378h5.337l13.261 34.795h-4.8942l-3.1696-8.9261h-15.685l-3.1696 8.9261h-4.9641z&amp;#34; style=&amp;#34;text-decoration-color:#000000;text-decoration-line:none&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m222.66-120.7h4.7078v34.795h-4.7078z&amp;#34; style=&amp;#34;text-decoration-color:#000000;text-decoration-line:none&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m271.14-102.22q1.5149.51273 2.9365 2.1907 1.445 1.678 2.8899 4.6145l4.7777 9.5087h-5.0573l-4.4514-8.9261q-1.7246-3.4959-3.356-4.6378-1.6081-1.142-4.4048-1.142h-5.1273v14.706h-4.7078v-34.795h10.627q5.9663 0 8.9028 2.4937t2.9365 7.5278q0 3.2861-1.5382 5.4535-1.5149 2.1674-4.4281 3.0064zm-11.793-14.613v12.352h5.9196q3.4026 0 5.1273-1.5615 1.7479-1.5848 1.7479-4.6378t-1.7479-4.5912q-1.7246-1.5615-5.1273-1.5615z&amp;#34; style=&amp;#34;text-decoration-color:#000000;text-decoration-line:none&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m329.38-118.02v4.9641q-2.3772-2.214-5.0806-3.3094-2.6802-1.0954-5.7099-1.0954-5.9663 0-9.1358 3.659-3.1696 3.6357-3.1696 10.534 0 6.8752 3.1696 10.534 3.1696 3.6357 9.1358 3.6357 3.0297 0 5.7099-1.0954 2.7035-1.0954 5.0806-3.3094v4.9175q-2.4704 1.678-5.2438 2.517-2.7501.83901-5.8264.83901-7.9006 0-12.445-4.8243-4.5446-4.8476-4.5446-13.214 0-8.39 4.5446-13.214 4.5446-4.8476 12.445-4.8476 3.123 0 5.873.839 2.7734.8157 5.1972 2.4704z&amp;#34; style=&amp;#34;text-decoration-color:#000000;text-decoration-line:none&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m366.18-116.06-6.3858 17.316h12.795zm-2.6568-4.6378h5.337l13.261 34.795h-4.8942l-3.1696-8.9261h-15.685l-3.1696 8.9261h-4.9641z&amp;#34; style=&amp;#34;text-decoration-color:#000000;text-decoration-line:none&amp;#34;/&amp;gt;&amp;lt;path d=&amp;#34;m421.6-102.22q1.5149.51273 2.9365 2.1907 1.445 1.678 2.8899 4.6145l4.7777 9.5087h-5.0573l-4.4514-8.9261q-1.7246-3.4959-3.356-4.6378-1.6081-1.142-4.4048-1.142h-5.1272v14.706h-4.7078v-34.795h10.627q5.9663 0 8.9028 2.4937t2.9365 7.5278q0 3.2861-1.5382 5.4535-1.5149 2.1674-4.4281 3.0064zm-11.793-14.613v12.352h5.9196q3.4026 0 5.1272-1.5615 1.7479-1.5848 1.7479-4.6378t-1.7479-4.5912q-1.7246-1.5615-5.1272-1.5615z&amp;#34; style=&amp;#34;text-decoration-color:#000000;text-decoration-line:none&amp;#34;/&amp;gt;&amp;lt;/g&amp;gt;&amp;lt;/g&amp;gt;&amp;lt;/svg&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;  	&amp;lt;h1&amp;gt;All Your Traffic Problems Solved!&amp;lt;/h1&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;  	&amp;lt;h2&amp;gt;Feel the future with affordable levitating cars.&amp;lt;/h2&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;  	&amp;lt;div class=&amp;#34;content&amp;#34;&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;    	{{ content }}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;    	{&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;% i&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;f form %}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;      	&amp;lt;form action=&amp;#34;.&amp;#34; method=&amp;#34;post&amp;#34; class=&amp;#34;enlist_form&amp;#34;&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;        	{&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;% c&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;srf_token %}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;        	{{ form.non_field_errors }}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;        	{{ form.email.errors }}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;        	{{ form.referrer }}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;        	{{ form.referrer.errors }}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;        	{{ form.email }}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;        	&amp;lt;button type=&amp;#34;submit&amp;#34;&amp;gt;Add Me&amp;lt;/button&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;      	&amp;lt;/form&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;    	{&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;% e&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;ndif %}
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;  	&amp;lt;/div&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;	&amp;lt;/div&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;  &amp;lt;/body&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;lt;/html&amp;gt;
&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;


&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;vm&#34;&gt;__name__&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
	&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;django.core.management&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;execute_from_command_line&lt;/span&gt;

	&lt;span class=&#34;n&#34;&gt;execute_from_command_line&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sys&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;argv&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Except for the absence of individual files, most of the code should be familiar to a Django developer. There is a large HTML template (including two SVG images) embedded as a string.&lt;/p&gt;
&lt;p&gt;Note that I do not use the ORM here. Django does seem to need a directory structure for that (Unless any reader could show me how to do it in a single file).&lt;/p&gt;
&lt;p&gt;Hopefully this shows how minimal Django could be. You might be able to use your favourite framework in places which you didn’t think were possible.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Ray Tracer in Python (Part 1) - Show Notes of &#34;Points in 3D Space&#34;</title>
      <link>https://arunrocks.com/ray-tracer-in-python-1-points-in-3d-space-show-notes/</link>
      <pubDate>Fri, 01 Nov 2019 13:55:59 +0530</pubDate>
      
      <guid>https://arunrocks.com/ray-tracer-in-python-1-points-in-3d-space-show-notes/</guid>
      <description>

&lt;div class=&#34;series-box&#34;&gt;
  &lt;p&gt;You are reading a post from a multi-part series of articles&lt;/p&gt;
  &lt;ol&gt;
    
    &lt;li&gt;Ray Tracer in Python (Part 1) - Show Notes of &amp;#34;Points in 3D Space&amp;#34;&lt;/li&gt;
    
    &lt;li&gt;
      &lt;a href=&#34;https://arunrocks.com/ray-tracer-in-python-2-revealing-the-true-colors/&#34;&gt;Ray Tracer in Python (Part 2) - Show Notes of &amp;#34;Revealing the True Colors&amp;#34;&lt;/a&gt;
      &lt;/li&gt;
    
    &lt;li&gt;
      &lt;a href=&#34;https://arunrocks.com/ray-tracer-in-python-3-3d-balls-in-2d-space/&#34;&gt;Ray Tracer in Python (Part 3) - Show Notes of &amp;#34;3D Balls in 2D Space&amp;#34;&lt;/a&gt;
      &lt;/li&gt;
    
    &lt;li&gt;
      &lt;a href=&#34;https://arunrocks.com/ray-tracer-in-python-part-4-let-there-be-light/&#34;&gt;Ray Tracer in Python (Part 4) - Show Notes of &amp;#34;Let there be light&amp;#34;&lt;/a&gt;
      &lt;/li&gt;
    
    &lt;li&gt;
      &lt;a href=&#34;https://arunrocks.com/ray-tracing-a-coronavirus-in-puray-python/&#34;&gt;Ray Tracer in Python - Show Notes of &amp;#34;Ray Tracing a Coronavirus&amp;#34;&lt;/a&gt;
      &lt;/li&gt;
    
    &lt;li&gt;
      &lt;a href=&#34;https://arunrocks.com/ray-tracer-in-python-part-5-light-reflections/&#34;&gt;Ray Tracer in Python (Part 5) - Show Notes of &amp;#34;Some Light Reflections&amp;#34;&lt;/a&gt;
      &lt;/li&gt;
    
    &lt;li&gt;
      &lt;a href=&#34;https://arunrocks.com/ray-tracer-in-python-part-6-of-firing-all-cores/&#34;&gt;Ray Tracer in Python (Part 6) - Show Notes of &amp;#34;Firing All Cores&amp;#34;&lt;/a&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
&lt;/div&gt;

&lt;p&gt;I&amp;rsquo;m really excited to start a new video tutorial series on creating a ray tracer from scratch. This a set of intermediate-level Python tutorials. Recently realtime ray tracing became a hot topic in the gaming community after various Minecraft Ray tracing videos started popping up. Of course, you need a monster of a machine to get decent framerates. However, we will be making an non-realtime ray tracer entirely in Python.&lt;/p&gt;
&lt;p&gt;These are the topics we will cover in this episode:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Who should watch this tutorial?&lt;/li&gt;
&lt;li&gt;What will you cover?&lt;/li&gt;
&lt;li&gt;Ray tracing in a Nutshell&lt;/li&gt;
&lt;li&gt;Getting Familiarized with my Emacs&lt;/li&gt;
&lt;li&gt;First sub-problem: Points in 3D Space&lt;/li&gt;
&lt;li&gt;Coding the solution
&lt;ul&gt;
&lt;li&gt;TDD (Test Driven Development)&lt;/li&gt;
&lt;li&gt;Data Structures&lt;/li&gt;
&lt;li&gt;3D Vectors&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is the video:&lt;/p&gt;

&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
  &lt;iframe src=&#34;https://www.youtube.com/embed/KaCe63v4D_Q&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; allowfullscreen title=&#34;YouTube Video&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;Code for part one is tagged on the &lt;a href=&#34;https://github.com/arocks/puray/tree/episode01&#34;&gt;Puray Github project&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;show-notes&#34;&gt;Show Notes&lt;/h3&gt;
&lt;p&gt;Books I recommend for learning Python:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://amzn.to/32Yv2NW&#34;&gt;Learn Python 3 the Hard Way&lt;/a&gt; For a hands-on approach&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://amzn.to/32X0R9U&#34;&gt;Learning Python, 5th Edition&lt;/a&gt; More detailed intro&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.python.org/3/tutorial/&#34;&gt;Official Python Tutorial&lt;/a&gt; A quick tutorial for programmers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some links to learn the Vector math I cover, in more detail:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://chortle.ccsu.edu/VectorLessons/vectorIndex.html&#34;&gt;Vector Math for 3D Computer Graphics&lt;/a&gt; Excellent free tutorial&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://amzn.to/326VQdC&#34;&gt;3D Math Primer For Graphics and Game Development&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.khanacademy.org/math/linear-algebra&#34;&gt;Khan Academy on Linear algebra&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Note: References may contain affiliate links&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;a-dream-forever-in-making&#34;&gt;A Dream Forever in Making&lt;/h2&gt;
&lt;p&gt;I have been forever interested in Computer Graphics since creating computer games is what really got me interested in programming (or &amp;ldquo;coding&amp;rdquo; as it is the fashionable term now). In early days, ray traced images used to blow my mind compared to the blocky graphics that 3D games generated.&lt;/p&gt;
&lt;p&gt;But trying to learn the algorithms was frustrating for two reasons - the mathematics seemed too dense and it took a really long time for each render. In 2015, I spent a weekend playing with various algorithms to create a simple ray tracer in Python by heavily leveraging NumPy.&lt;/p&gt;
&lt;blockquote class=&#34;twitter-tweet&#34; data-lang=&#34;en&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;Wrote a toy raytracer over the weekend in Python and NumPy. ~200 lines. Render time about 10 mins. Shiny ✨😆 &lt;a href=&#34;http://t.co/ar0GDGXCWh&#34;&gt;pic.twitter.com/ar0GDGXCWh&lt;/a&gt;&lt;/p&gt;&amp;mdash; Arun &amp;#39;Rocks&amp;#39; Ravindran (@arocks) &lt;a href=&#34;https://twitter.com/arocks/status/587304954148163585?ref_src=twsrc%5Etfw&#34;&gt;April 12, 2015&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&#34;https://platform.twitter.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;
&lt;p&gt;I felt the NumPy parts looked &amp;ldquo;un-pythonic&amp;rdquo;, so I reimplemented it without NumPy. It hit a sweet spot between functionality and readability. You needn&amp;rsquo;t be a math guru to figure out how it worked. I had to share what a learnt not because there was a lack of ray tracing tutorials but I wanted to make an accessible tutorial with gentle learning curve.&lt;/p&gt;
&lt;p&gt;However the process of creating video tutorials have changed over the years. Gone are the days of a simple screen recording or screencasts. Now we have to have slick intros, animations and click-baity thumbnails with a face overlay having a shocked expression. But honestly I am in awe of how much time people spend on making each video (it is way, way more than you think) and how frequently they make them (&amp;ldquo;new video every week&amp;rdquo;).&lt;/p&gt;
&lt;div data-pullquote=&#34;&amp;#34;Gone are the days of a simple screen recording or screencasts. Now we have to have slick intros, animations and click-baity thumbnails with a face overlay having a shocked expression.&#34;&gt;
&lt;/div&gt;
&lt;p&gt;The challenge is even harder when you need to break down all that math and physics behind computer graphics into simple concepts in a logical flow. That also takes way more time than you would expect. Sometimes you find that one clear diagram would explain an idea perfectly but nobody has made one so far so you need to draw a fresh one. Or you need to cut down your explanation because listeners are getting lost in the details. Plus your real life slows you down with work deadlines and goof ups like out of focus video recordings. This process of iterating until my script (and code) became streamlined took me months.&lt;/p&gt;
&lt;p&gt;My approach has always been about posting higher quality stuff at low frequencies. So I am happy if the end result was worth the wait (and I hope it is). This could be a tutorial that might outlive many of my other videos and that is satisfying in itself. Hope you&amp;rsquo;ll enjoy this journey with me as much as I did.&lt;/p&gt;
&lt;p&gt;Check back for &lt;a href=&#34;https://arunrocks.com/ray-tracer-in-python-2-revealing-the-true-colors&#34;&gt;part 2&lt;/a&gt; (EDIT: it is out)!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Understanding Django Channels</title>
      <link>https://arunrocks.com/understanding-django-channels/</link>
      <pubDate>Tue, 03 Jul 2018 06:55:30 +0530</pubDate>
      
      <guid>https://arunrocks.com/understanding-django-channels/</guid>
      <description>&lt;div class=&#34;series-box&#34;&gt;
&lt;p&gt;You are reading a post from a two-part tutorial series on Django Channels&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;https://arunrocks.com/get-started-with-async-and-await/&#34;&gt;Part 1&lt;/a&gt;&lt;/li&gt;
    &lt;li class=&#34;active&#34;&gt;&lt;a href=&#34;https://arunrocks.com/understanding-django-channels/&#34;&gt;Part 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2 id=&#34;django-channels&#34;&gt;Django Channels&lt;/h2&gt;
&lt;p&gt;Django Channels was originally created to solve the problem of handling asynchronous communication protocols like say WebSockets. More and more web applications were providing realtime capabilities like chat and push notifications. Various workarounds were created to make Django support such requirements like running separate socket servers or proxy servers.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://channels.readthedocs.io/en/latest/&#34;&gt;Channels&lt;/a&gt; is an official Django project not just for handling WebSockets and other forms of bi-directional communication but also for running background tasks asynchronously. As of writing, Django Channels 2 is out which is a complete rewrite based on Python 3&amp;rsquo;s async/await based coroutines.&lt;/p&gt;
&lt;p&gt;This article covers the concepts of Django Channels and leads you to a video tutorial implementing a notifications application in Django.&lt;/p&gt;
&lt;p&gt;Here is a simplified block diagram of a typical Channels setup:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
    &lt;img loading=&#34;lazy&#34; src=&#34;https://arunrocks.com/static/images/blog/django-channels.png&#34; alt=&#34;Django Channels&#34;   width=1634 height=&#34;834&#34;  /&gt;
    
  &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;How a typical Django Channels infrastructure works&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;A client such as a web browser sends both HTTP/HTTPS and WebSocket traffic to an ASGI server like Daphene. Like WSGI, the ASGI (Asynchronous Server Gateway Interface) specification is a common way for applications servers and applications to interact with each other asynchronously.&lt;/p&gt;
&lt;p&gt;Like a typical Django application, HTTP traffic is handled synchronously i.e. when the browser sends a request, it waits until it is routed to Django and a response is sent back. However, it gets a lot more interesting when WebSocket traffic happens because it can be triggered from either direction.&lt;/p&gt;
&lt;div data-pullquote=&#34;&amp;#34;Ironically, you can write Channel applications without using Channels!&amp;#34;&#34;&gt;
&lt;/div&gt;
&lt;p&gt;Once a WebSocket connection is established, a browser can send or receive messages. A sent message reaches the Protocol type router that determines the next routing handler based on its transport protocol. Hence you can define a router for HTTP and another for WebSocket messages.&lt;/p&gt;
&lt;p&gt;These routers are very similar to Django&amp;rsquo;s URL mappers but map the incoming messages to a consumer (rather than a view). A &lt;strong&gt;consumer&lt;/strong&gt; is like an event handler that reacts to events. It can also send messages back to the browser, thereby containing the logic for a fully bi-directional communication.&lt;/p&gt;
&lt;p&gt;A consumer is a class whose methods you may choose to write either as normal Python functions (synchronous) or as awaitables (asynchronous). Asynchronous code should not mix with synchronous code. So there are conversion functions to convert from async to sync and back. Remember that the Django parts are synchronous. A consumer in fact a valid ASGI application.&lt;/p&gt;
&lt;p&gt;So far, we have not used the channel layer. Ironically, you can write Channel applications without using Channels! But they are not particularly useful as there is no easy communication path between application instances, other than polling a database. Channels provides exactly that, a fast point-to-point and broadcast messaging between application instances.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;channel&lt;/strong&gt; is like a pipe. A sender sends a message to this pipe from one end and it reaches a listener at the other end. A &lt;strong&gt;group&lt;/strong&gt; defines a group of channels who are all listening to a topic. Every consumer listens to own auto-generated channel accessed by its &lt;code&gt;self.channel_name&lt;/code&gt; attribute.&lt;/p&gt;
&lt;p&gt;In addition to transports, you can trigger a consumer listening to a channel by sending a message, thereby starting a background task. This works as a very quick and simple background worker system.&lt;/p&gt;
&lt;h2 id=&#34;building-a-channels-application-step-by-step&#34;&gt;Building a Channels Application Step-by-step&lt;/h2&gt;
&lt;p&gt;The following screencast covers the creation of a notification application using Django Channels. You can access the &lt;a href=&#34;https://github.com/arocks/channels-example/&#34;&gt;code on Github&lt;/a&gt;. The intermediate projects like the Echo Consumer can be accessed as branches of the git repository.&lt;/p&gt;

&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
  &lt;iframe src=&#34;https://www.youtube.com/embed/G_EM5WM_08Q&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; allowfullscreen title=&#34;YouTube Video&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;The &lt;a href=&#34;https://github.com/arocks/channels-example/blob/master/show-notes.md&#34;&gt;show notes can be accessed on Github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Check out the video tutorial and let me know if you found it useful! To know more, read the &lt;a href=&#34;https://channels.readthedocs.io/en/latest/&#34;&gt;Django Channels documentation&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;series-box&#34;&gt;
&lt;p&gt;This article contains an excerpt from &lt;a href=&#34;https://arunrocks.com/static/book/django-design-patterns-best-practices-2-ed/&#34;&gt;&#34;Django Design Patterns and Best Practices&#34;&lt;/a&gt; by Arun Ravindran&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Managing Creative Assets - 3: TortoiseHg Tutorial</title>
      <link>https://arunrocks.com/managing-creative-assets-3-tortoisehg-tutorial/</link>
      <pubDate>Tue, 15 Dec 2009 21:24:01 +0530</pubDate>
      
      <guid>https://arunrocks.com/managing-creative-assets-3-tortoisehg-tutorial/</guid>
      <description>&lt;p&gt;&lt;em&gt;Managing Creative Assets is a multi-part series on how you can manage your creative works such as a novel or even blog post without impairing your creativity. It highlights the importance of using a version control system as an integral part of one&amp;rsquo;s creative workflow. &lt;a href=&#34;https://arunrocks.com/blog/archives/2009/12/13/managing-creative-assets-1/&#34;&gt;Part 1&lt;/a&gt; gives a good introduction to the series which is aimed at technology novices&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;getting-started-with-mercurial-a-tutorial&#34;&gt;Getting started with Mercurial: A tutorial&lt;/h2&gt;
&lt;p&gt;The concluding part of this series will be the installation and typical usage of Tortoise Mercurial, a user friendly GUI front-end for Mercurial. It is commonly referred to as TortoiseHg (the chemical symbol for mercury).&lt;/p&gt;
&lt;p&gt;This will be a fairly simple tutorial to follow as each description is followed by a screenshot. These screenshots were taken on Windows XP, but they will be pretty similar in other OSes&lt;/p&gt;
&lt;p&gt;Download Tortoise mercurial from the &lt;a href=&#34;http://tortoisehg.bitbucket.org/&#34;&gt;Bitbucket site&lt;/a&gt;. There are installables for Windows as well as for Linux. Installation on Windows is fairly straightforward as it is wizard-based.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a new folder for keeping your art assets. This will be your project folder. In this screenshot (click for a larger image), I have created a project folder for the purpose of composing this series of blog posts. Simply right-click, and select &amp;lsquo;Create Repository here&amp;rsquo; under the TortoiseHg sub-menu:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181869236/&#34; title=&#34;010 - Create.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2717/4181869236_49236ff611.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;010 - Create.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The defaults in the &amp;lsquo;Create Repository&amp;rsquo; dialogs are fine. Just click Create.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181105481/&#34; title=&#34;020 - Create Dialog.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2533/4181105481_54e6cdc708.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;020 - Create Dialog.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The new repository has been created. That was easy, wasn&amp;rsquo;t it?&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181870162/&#34; title=&#34;030 - Created.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2561/4181870162_5930954fe5.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;030 - Created.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now, enter the project folder and view the changes. On some OSes, you might see nothing here. These files are not intended to be seen or modified, hence they might be hidden. You can safely ignore them.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181106163/&#34; title=&#34;040 - Project folder.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2593/4181106163_032fa85c9a.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;040 - Project folder.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This is a screenshot of a new file that I am editing (using Emacs editor) inside the project folder. I am ready to check-in this file.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181106501/&#34; title=&#34;050 - New File on Emacs.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2642/4181106501_2d51984a2b.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;050 - New File on Emacs.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now, you will need to add this new file to your repository. Let&amp;rsquo;s skip that and directly perform a commit. We will be later given a chance to add this file.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181107011/&#34; title=&#34;060 - First Commit.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2584/4181107011_abfcdcda18.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;060 - First Commit.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Here you can see our newly added file as unchecked. This means that this file is not yet under version control&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181107577/&#34; title=&#34;070 - Commit Dialog.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2640/4181107577_1b15f33da9.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;070 - Commit Dialog.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go ahead and mark the check box next to this file&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181872344/&#34; title=&#34;080 - Commit Dialog File Added.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2742/4181872344_85b8b75702.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;080 - Commit Dialog File Added.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the edit box above, you can add a short comment about this commit. Since this is the initial commit, my comment is simply &amp;lsquo;First Commit&amp;rsquo;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181872914/&#34; title=&#34;090 - Commit Dialog Comment Added.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2525/4181872914_5bb16f7ef4.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;090 - Commit Dialog Comment Added.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Mercurial acknowledges the successful commit with the name(s) of the committed files&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181873328/&#34; title=&#34;100 - Commited.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2787/4181873328_f9b5679aa6.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;100 - Commited.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol start=&#34;11&#34;&gt;
&lt;li&gt;Notice that your file has a green tick icon indicating a successful check-in&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181873800/&#34; title=&#34;110 - Overlay Icons Added.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2694/4181873800_a8dba47e66.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;110 - Overlay Icons Added.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol start=&#34;12&#34;&gt;
&lt;li&gt;Many hours and many check-ins later, my post is nearly close to completion. I commit this version as well.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181110111/&#34; title=&#34;115 - Emacs Final Screen.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm5.static.flickr.com/4046/4181110111_35e674f04e.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;115 - Emacs Final Screen.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol start=&#34;13&#34;&gt;
&lt;li&gt;In the commit dialog, notice the Repository Explorer in the menu.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181110473/&#34; title=&#34;120 - Going to repo explorer.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2782/4181110473_ea679486fb.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;120 - Going to repo explorer.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol start=&#34;14&#34;&gt;
&lt;li&gt;You can view the history of changes in reverse chronological order. You can right click on any of them to compare the changes or revert back to an earlier version.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181874988/&#34; title=&#34;130 - Repo explorer.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2717/4181874988_7862e514c3.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;130 - Repo explorer.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol start=&#34;15&#34;&gt;
&lt;li&gt;Simply clicking on each version will show the diff (in UNIX format) between the consecutive versions in the lower right window.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181111117/&#34; title=&#34;140 - Repo explorer shows changes.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm5.static.flickr.com/4037/4181111117_d14c136f13.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;140 - Repo explorer shows changes.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol start=&#34;16&#34;&gt;
&lt;li&gt;You can perform a revert by selecting the Revert option.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181111507/&#34; title=&#34;150 - Reverting.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm5.static.flickr.com/4047/4181111507_22932a06b3.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;150 - Reverting.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol start=&#34;17&#34;&gt;
&lt;li&gt;As indicated by the warning, your current file will be overwritten to an older version. But subsequently you can revert to the latest version as well, so this is not too much of an issue.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/arun_ravindran/4181111829/&#34; title=&#34;160 - Revert Confirm.png by ArunClickClick, on Flickr&#34;&gt;&lt;img src=&#34;https://farm3.static.flickr.com/2656/4181111829_873917d61a.jpg&#34; width=&#34;500&#34; height=&#34;307&#34; alt=&#34;160 - Revert Confirm.png&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s pretty much all you need to know to use Tortoise Hg. Hope you found this series informative!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Top 7 Inexpensive but Indispensible Things</title>
      <link>https://arunrocks.com/top-7-inexpensive-but-indispensible-things/</link>
      <pubDate>Tue, 01 Dec 2009 12:40:36 +0530</pubDate>
      
      <guid>https://arunrocks.com/top-7-inexpensive-but-indispensible-things/</guid>
      <description>&lt;p&gt;I was shifting to a new house in Mangalore recently. I realised that some of the things that I value the most were not the typical big screen home theatre system or a luxurious jacuzzi.&lt;/p&gt;
&lt;p&gt;Without sounding too cliched, let me say that some of the best things in life are not expensive. Here are some of the best things you can buy for less than Rs. 8K (around $160):&lt;/p&gt;
&lt;h2 id=&#34;wifi-router&#34;&gt;Wifi Router&lt;/h2&gt;
&lt;p&gt;This is a blessing for those with frequently off working hours calls or if you have multiple laptops. The convenience of being able to work near the balcony enjoying the quiet scenery and sipping tea is divine.&lt;/p&gt;
&lt;h2 id=&#34;small-water-heater&#34;&gt;Small Water Heater&lt;/h2&gt;
&lt;p&gt;This is a pet peeve of mine. Hot water is absolutely essential for a bath. Even in summer. Yep. Nothing gives you a better satisfaction that a hot bath after a warm day. And in Mangalore it&amp;rsquo;s either raining in buckets or it&amp;rsquo;s hot and humid. I would recommend that you go for a 8l one if you want a good tradeoff between heating time and power consumption.&lt;/p&gt;
&lt;h2 id=&#34;portable-harddisk&#34;&gt;Portable Harddisk&lt;/h2&gt;
&lt;p&gt;I am sure most of us have tried using CDs for backing up all those wonderful photos and songs we have. The problem is - CD are not really great for organising data. It is readonly and once you burn it, there is no way to go back and change it. There are, of course, other problems like limited space
and suceptibility to scratches.&lt;/p&gt;
&lt;p&gt;Harddisk prices have gone down&amp;hellip; a lot. So there is really no excuse for not getting one. There are sub-terrabyte ones at throwaway prices. I recommend the Western Digital&amp;rsquo;s handy Passport 500 GB.&lt;/p&gt;
&lt;h2 id=&#34;ebooks&#34;&gt;Ebooks&lt;/h2&gt;
&lt;p&gt;Can anyone guess what&amp;rsquo;s the most heaviest thing to transport? Yep, it is undoubtedly books. The weight of a carton of books can exceed that of a TV, Microwave or even a carton full of iron boxes. I think everyone who love books would have had to part with them if they have had to travel a lot. They would have given away most of it to friends or relatives, never to see them back again.&lt;/p&gt;
&lt;p&gt;This is sad. I don&amp;rsquo;t like giving away books. Neither do I want to kill my desire to create a personal library. I suggest an eco-friendly compromise - make a digital library. Do invest in Ebooks and Audio books. I have invested heavily in a collection that I am sure I can use anywhere once ebook readers
become more cheaper. For now, I don&amp;rsquo;t mind reading them on my laptop. And yes, my library weighs less than a kilo ;)&lt;/p&gt;
&lt;h2 id=&#34;gamepad&#34;&gt;Gamepad&lt;/h2&gt;
&lt;p&gt;I am a guy who is always tempted to buy game consoles. I have made up my mind a hundred times to buy a playstation or a nintendo, only to find that the latest PC is much better at it. And you know what PCs are always ahead in terms of sheer processing power. Except that they have clumsy input devices. Ever tried to play a racing game with a keyboard? Then you will know what I am talking about.&lt;/p&gt;
&lt;p&gt;This is easily fixable. A &lt;a href=&#34;http://www.arunrocks.com/blog/archives/2008/01/24/gamepad-brings-new-life-to-emulated-games/&#34; title=&#34;Full review of a Chinese gamepad available in India&#34;&gt;USB gamepad&lt;/a&gt; (which looks like a PS2 Gamepad) comes in for less than Rs. 500. It is a great value for money. It has all the 4 way controls, shoulder buttons and 2 joysticks. Plus it has a built-in vibrator (no batteries needed)! I am planning to go for a second one. Now you can safely give your PC to your 5-year old cousin to play Mario Kart without fearing that he with smash your keyboard to bits shouting &amp;lsquo;Maaario&amp;rsquo;:)&lt;/p&gt;
&lt;h2 id=&#34;decent-mattress&#34;&gt;Decent Mattress&lt;/h2&gt;
&lt;p&gt;Some one rightly said that we spend one-thirds of our life on a mattress. So why not in a really good one? There are cots in the market all the way from Rs 200 to branded mattresses worth several tens of thousands. Go for a really good branded mattress. It might cost a couple of grand, but you will not lose sleep over it ;)&lt;/p&gt;
&lt;h2 id=&#34;portable-home-kit&#34;&gt;Portable Home-kit&lt;/h2&gt;
&lt;p&gt;A briefcase sized kit that contains a small drill, spanners, measuring tape, pipe wrench, screwdriver set etc costs less that Rs. 2000 these days. I think it is well worth the price.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Those were, in my opinion, the best little things that don&amp;rsquo;t cost you a fortune. What are the ones you feel give you great value for money? Do add in your comments.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>PyCon India Talk 2009: Game Programming in Pyglet</title>
      <link>https://arunrocks.com/pycon-india-talk-2009-game-programming-in-pyglet/</link>
      <pubDate>Sun, 27 Sep 2009 18:37:59 +0530</pubDate>
      
      <guid>https://arunrocks.com/pycon-india-talk-2009-game-programming-in-pyglet/</guid>
      <description>&lt;p&gt;Thanks to everyone who enjoyed and commented on my talk today titled &amp;lsquo;Accelerate Your Game Development with Pyglet&amp;rsquo;. I am happy to see so much enthusiasm within the python community for game development. This was my first lightning talk (and the first one for the day as well) and though, I slightly overshot the timelimit, it was a great experience.&lt;/p&gt;
&lt;p&gt;The talk was about creating a simple casual game using Pyglet called &amp;lsquo;FruitCatch&amp;rsquo;. The source code is really small and very readable. I also compared Pyglet with Pygame and why I prefer Pyglet (in certain situations:)). The demo showed the working game in the end.&lt;/p&gt;
&lt;p&gt;You can download the &lt;a href=&#34;https://arunrocks.com/downloads/pyconindia2009/fruitcatch-0.1.tar.gz&#34;&gt;game source code&lt;/a&gt; and &lt;a href=&#34;https://arunrocks.com/downloads/pyconindia2009/Accelerate%20Your%20Game%20Development%20with%20Pyglet.pdf&#34;&gt;presentation slides (PDF)&lt;/a&gt; here. I&amp;rsquo;ve shared this with the organisers as well, so it will be put up at the &lt;a href=&#34;http://in.pycon.org/&#34;&gt;Pycon&lt;/a&gt; site as well&lt;/p&gt;
&lt;p&gt;UPDATE: The video of the &lt;a href=&#34;http://blip.tv/file/2690880&#34;&gt;lightning talk&lt;/a&gt; is now available and has been added below:&lt;/p&gt;
&lt;p&gt;UPDATE 2: Fruitcatch source code is on &lt;a href=&#34;https://github.com/arocks/fruitcatch&#34;&gt;github&lt;/a&gt; now.&lt;/p&gt;
&lt;p&gt;&lt;embed src=&#34;https://blip.tv/play/AYGlulYC&#34; type=&#34;application/x-shockwave-flash&#34; width=&#34;480&#34; height=&#34;390&#34; allowscriptaccess=&#34;always&#34; allowfullscreen=&#34;true&#34;&gt;&lt;/embed&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Decoding Google&#39;s First Tweet in Python</title>
      <link>https://arunrocks.com/decoding-googles-first-tweet-in-python/</link>
      <pubDate>Sat, 28 Feb 2009 14:40:29 +0530</pubDate>
      
      <guid>https://arunrocks.com/decoding-googles-first-tweet-in-python/</guid>
      <description>&lt;p&gt;Most of you must have read the news that &lt;a href=&#34;http://thenextweb.com/2009/02/26/googles-tweet-official-twitter-account/&#34; title=&#34;The news about google&#39;s tweet&#34;&gt;Google finally jumped into the Twitter Bandwagon&lt;/a&gt;. In their trademark style, they have chosen to announce this in a cryptic way. Their &lt;a href=&#34;http://twitter.com/google/status/1251523388&#34; title=&#34;Link to Google Twitter account&#34;&gt;first tweet&lt;/a&gt; was essentially this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I&amp;rsquo;m 01100110 01100101 01100101 01101100 01101001 01101110 01100111 00100000 01101100 01110101 01100011 01101011 01111001 00001010&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I will explain in this post how to crack this simple code with the help of some Python one-liners (Google&amp;rsquo;s favourite language). If you are a Google aspirant (who isn&amp;rsquo;t? ;) ), this might help you clear the interview. So pay attention.&lt;/p&gt;
&lt;p&gt;To most people it is immediately obvious that it is a text encoded in binary. Since each binary word is 8 characters long, it is most probably written in the extended 8-bit ASCII code. In fact, it is and you can read this with a simple &lt;a href=&#34;http://www.cdrummond.qc.ca/cegep/informat/Professeurs/Alain/files/ascii.htm&#34; title=&#34;ASCII chart&#34;&gt;ASCII chart&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But they have made it slightly difficult for you by writing in binary. Since most charts would provide you a lookup from decimal or hexadecimal numbers to ASCII representations only. So how do you convert from binary to decimal? It&amp;rsquo;s quite simple:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;n&#34;&gt;decimal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;lambda&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;sum&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;j&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;pow&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;j&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;enumerate&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;reversed&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This line defines a function &lt;code&gt;decimal&lt;/code&gt; which works in a manner similar to how we would manually convert binary numbers into decimal. Each position is multiplied by increasing powers of two from the right. Then, these numbers are added together. for e.g. &amp;lsquo;1010&amp;rsquo; will be 1 * 8 + 0 * 4 + 1 * 2 + 0 * 1 = 10.&lt;/p&gt;
&lt;p&gt;Next, we split the binary part of the tweet string and apply the &lt;code&gt;decimal&lt;/code&gt; function on each part&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;n&#34;&gt;tweet&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;01100110 01100101 01100101 01101100 01101001 01101110 01100111 00100000 01101100 01110101 01100011 01101011 01111001 00001010&amp;#34;&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;join&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;chr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;decimal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;tweet&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;split&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The result is something that you might have already guessed seeing the first 2 words:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;I&amp;rsquo;m feeling lucky\n&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hope you learnt some interesting python constructs. If there are other ways of decoding this in Python, please comment below.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Learning Pylons Through Tutorials</title>
      <link>https://arunrocks.com/learning-pylons-through-tutorials/</link>
      <pubDate>Thu, 26 Jun 2008 22:48:50 +0530</pubDate>
      
      <guid>https://arunrocks.com/learning-pylons-through-tutorials/</guid>
      <description>&lt;p&gt;Web Development is now getting dominated by frameworks. After the initial hype of Rails, Python based frameworks are getting more popularity especially after the release of Google App Engine. Nobody seems to be interested in building websites using PHP, even if they are highly experienced in PHP. This could mean two things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;There will be more demand in Indian IT companies for PHP skills similar to Perl scripting skills these days  :mrgreen:&lt;/li&gt;
&lt;li&gt;There will be soon be a viable competitor to the immensely popular Wordpress blogging platform from the Python/Ruby world&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have nothing against Wordpress. In fact, it is one of the easiest tools to deploy. But with tools like cPanel, deployment could be no longer a deciding factor for blogging platforms.&lt;/p&gt;
&lt;p&gt;Coming back to the topic of Python Web Frameworks, there is a multitude of options. I have used some of these framworks and found them to be &amp;lsquo;pythonic&amp;rsquo; in different ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Django&lt;/strong&gt; Well documented. Tightly Coupled and &amp;lsquo;Batteries Included&amp;rsquo;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pylons&lt;/strong&gt; Extremely flexibility to Plug and Play components. &amp;lsquo;Fun to Hack&amp;rsquo;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;web.py&lt;/strong&gt; Great for beginners. Entire framework &amp;lsquo;fits in your head&amp;rsquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Pylons looks most appealing to me. So far it looks like the underdog largely overshadowed by Django&amp;rsquo;s presence lacking the &lt;a href=&#34;http://www.jacobian.org/writing/2006/jan/27/why-django/&#34;&gt;marketing&lt;/a&gt; or &lt;a href=&#34;http://www.djangoproject.com/weblog/2006/aug/07/guidointerview/&#34;&gt;love&lt;/a&gt; it deserves. A few weeks back I would have complained about the lack of Pylons tutorials on the web. A google search brought up several links pointing to the wiki tutorial. As many have pointed out, the wiki tutorial is too long and complicated for beginners. It would easily put off a beginner. It took me quite some time to realise that the best place to start learning Pylons is the &lt;a href=&#34;http://bel-epa.com/pylonsdocs/&#34;&gt;Pylons Documentation&lt;/a&gt; itself and the best Pylons tutorial is the &lt;a href=&#34;http://bel-epa.com/pylonsdocs/tutorials/flickr_search_tutorial.html&#34;&gt;Flickr Search&lt;/a&gt;. Going through the documentation is almost feels like reading a book with every concept explained in detail.&lt;/p&gt;
&lt;p&gt;Pylons currently seems to the having an edge over Django for enterprise application due to its well tested interface with SQLAlchemy. Django seems to be having a fairly recent &lt;a href=&#34;http://code.google.com/p/django-sqlalchemy/&#34;&gt;branch&lt;/a&gt; for SQLAlchemy integration. Pylons typically uses Python eggs and VirtualEnv for deployment which is might seem a little complex to beginners, but once you try it once it is actually quite convenient. Most of the installation can be done from the command-line and it will be nearly an independent sandbox for Pylons development. However it might take sometime to understand other aspects of using python eggs such as uninstallation and creation of new eggs. I haven&amp;rsquo;t had much success with making a portable version of my Pylons installation on Windows though :(&lt;/p&gt;
&lt;p&gt;My favourite templating engine is Genshi because it is very designer friendly(which also means it works with the tools a Designer has, not just that it is easy for a Designer to learn). I can easily do all HTML designing directly on my Genshi templates because they are valid HTML or XML documents. Almost all of Genshi&amp;rsquo;s logic can be hidden away as attributes which is a great idea. In fact, the templates are even valid XML which makes the creation of valid HTML pages a much more natural experience. Almost all XML tools and even HTML tools like Tidy will work flawlessly on Genshi templates due to these reasons.&lt;/p&gt;
&lt;p&gt;Once you get used to Genshi&amp;rsquo;s templates, you might even use them for static web site designing. I am sure it will save you a lot of time whenever those last minute &amp;lsquo;sidebar redesigns for every page&amp;rsquo; pops up.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>5 Indispensable Tips for Emacs on Windows</title>
      <link>https://arunrocks.com/5-indespensible-tips-for-emacs-on-windows/</link>
      <pubDate>Wed, 20 Feb 2008 13:49:54 +0530</pubDate>
      
      <guid>https://arunrocks.com/5-indespensible-tips-for-emacs-on-windows/</guid>
      <description>&lt;p&gt;Emacs is generally not very popular on Windows based operating systems. The default installation of Emacs leaves you with a very spartan UI and a very basic editor. However, due to Emacs&#39; extendibility, you can create a very powerful editor by customizing your .emacs file and making some OS specific tweaks. We will be concentrating on the latter as there are plenty of .emacs files floating around for your reference.&lt;/p&gt;
&lt;p&gt;I have 5 simple yet useful tips below, which I have tested with a GNU Emacs 23.0.0.1 (i386-mingw-nt5.1.2600) running on Windows XP.&lt;/p&gt;
&lt;h4 id=&#34;tip-1-starting-off-with-a-prettier-emacs&#34;&gt;Tip 1: Starting off With a Prettier Emacs&lt;/h4&gt;
&lt;p&gt;Most of us customize the fonts, colours and window position of Emacs. In fact, I have found that dark backgrounds are much suited to Emacs than the default light background. However, when Emacs starts up, it annoyingly shows the default fonts and colours first. As your .emacs files load, it jumps around and changes colours quite noticeably.&lt;/p&gt;
&lt;p&gt;You can avoid this annoyance by making a simple registry modification. Create a new .reg file say &lt;code&gt;set-frame-and-fonts.reg&lt;/code&gt; and copy paste the following lines. Open the file to add the changes to the registry. Restart Emacs and enjoy the difference!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;REGEDIT4
[HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs]
&amp;quot;Emacs.Foreground&amp;quot;=&amp;quot;black&amp;quot;
&amp;quot;Emacs.Background&amp;quot;=&amp;quot;#f5f5f5&amp;quot;
&amp;quot;Emacs.Font&amp;quot;=&amp;quot;-outline-Consolas-normal-r-normal-normal-12-90-96-96-c-*-iso8859-1&amp;quot;
&amp;quot;Emacs.Geometry&amp;quot;=&amp;quot;100x35+0+0&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Caveat: The lines above are my preferred colours, fonts and window positions. Your&amp;rsquo;s could be different. Please customize to your taste.&lt;/p&gt;
&lt;h4 id=&#34;tip-2-add-open-in-emacs-option-to-all-files&#34;&gt;Tip #2: Add &amp;ldquo;Open In Emacs&amp;rdquo; option to all Files&lt;/h4&gt;
&lt;p&gt;This will be indispensable once you are more used to Emacs. You will feel like opening anything and everything with it. And being the one true swiss-army-chainsaw it is, you will be delighted at the enormous no: of filetypes that Emacs supports out of the box.&lt;/p&gt;
&lt;p&gt;This .reg file add an &amp;ldquo;Open in Emacs&amp;rdquo; option in Windows Explorer when you right click on any file. Copy the following lines to a .reg file say &lt;code&gt;Add-Emacs-To-Open-Any-File.reg&lt;/code&gt; and open it to add the changes to the registry. Make sure that you have modified the path below to point to your emacs installation path (mine is in D: drive). The &lt;code&gt;emacsclientw.exe&lt;/code&gt; resides in the same place where your &lt;code&gt;runemacs.exe&lt;/code&gt; resides (right-clicking on the emacs icon, generally shows you this).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Windows Registry Editor Version 5.00
 [HKEY_CLASSES_ROOT\*\Shell\Open In Emacs\Command]
@=&amp;quot;\&amp;quot;D:\\Program Files\\Emacs23\\bin\\emacsclientw.exe\&amp;quot; -a \&amp;quot;D:\\Program Files\\Emacs23\\bin\\runemacs.exe\&amp;quot; \&amp;quot;%1\&amp;quot;&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;tip-3-goodbye-capslock&#34;&gt;Tip #3: Goodbye Capslock&lt;/h4&gt;
&lt;p&gt;If you use Emacs a lot, you will find that you have to use the Ctrl key a lot. You might find your left thumb getting strained after prolonged use. The easiest solution for this is to reassign a less used key as the Ctrl key. Most people choose the Caps Lock key for this purpose. It is surprisingly not that much useful and soon you will forget that such a key ever existed.&lt;/p&gt;
&lt;img class=&#34;alignright&#34; src=&#34;https://farm1.static.flickr.com/77/166430479_6c71422feb_m_d.jpg&#34;&gt;
&lt;p&gt;Whenever I searched, I found that most people swap the Ctrl and Caps Lock keys. However, this is irritating as I might still want to use the old Ctrl key if I press it accidentally. Here is how to &lt;em&gt;replace&lt;/em&gt; Caps Lock with the Ctrl Key.&lt;/p&gt;
&lt;p&gt;Copy the following lines to a .reg file say &lt;code&gt;replace_caps.reg&lt;/code&gt; and open it to add the changes to the registry. Now just reboot and you are done!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
&amp;quot;Scancode Map&amp;quot;=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Yes, it takes some time to &amp;ldquo;unlearn&amp;rdquo; and &amp;ldquo;learn&amp;rdquo; the new key position, but trust me it&amp;rsquo;s worth the effort.&lt;/p&gt;
&lt;h4 id=&#34;tip-4-use-a-spell-checker&#34;&gt;Tip #4: Use a Spell Checker&lt;/h4&gt;
&lt;p&gt;A spell checker is something I feel should be a part of any editor. Here is how to enable on the fly spell checking in Emacs.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install &lt;a href=&#34;http://aspell.net/win32/&#34;&gt;aspell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Add the following lines to your .emacs file (adjust the path to aspell accordingly)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Elisp:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-scheme&#34; data-lang=&#34;scheme&#34;&gt;&lt;span class=&#34;c1&#34;&gt;;; aspell is the spell checker that works for me&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;setq-default&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;ispell-program-name&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;D:\\Arun\\Home\\bin\\aspell.exe&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;setq&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;text-mode-hook&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;lambda&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
                         &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;flyspell-mode&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;t&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;       &lt;span class=&#34;c1&#34;&gt;; spellchek (sic) on the fly&lt;/span&gt;
                         &lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;tip-5-setup-a-postscript-printer&#34;&gt;Tip #5: Setup a Postscript Printer&lt;/h4&gt;
&lt;p&gt;By default, you can pretty-print all your documents directly from emacs. But this requires configuring a postscript printer. There is a nice package called Ghostscript which takes care of doing this.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download and install &lt;a href=&#34;http://pages.cs.wisc.edu/~ghost/doc/GPL/gpl860.htm&#34;&gt;Ghostscript&lt;/a&gt; from &lt;a href=&#34;http://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs860/gs860w32.exe&#34;&gt;here&lt;/a&gt; say at D:\gs&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Download and install &lt;a href=&#34;http://pages.cs.wisc.edu/~ghost/gsview/get49.htm&#34;&gt;GSView&lt;/a&gt; from &lt;a href=&#34;http://mirror.cs.wisc.edu/pub/mirrors/ghost/ghostgum/gsv49w32.exe&#34;&gt;here&lt;/a&gt; say at D:\gs\gsview&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then add the following lines to your .emacs file:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Elisp:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-scheme&#34; data-lang=&#34;scheme&#34;&gt;
&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;string=&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;system-name&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;CORPLAPTP65&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;; Works in office only&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;progn&lt;/span&gt;
      &lt;span class=&#34;c1&#34;&gt;;;  Windows printer&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;setq-default&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;ps-lpr-command&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;expand-file-name&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;/gs/gsview/gsprint.exe&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;setq-default&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;ps-printer-name&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;t&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;setq-default&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;ps-printer-name-option&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;nil&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;setq&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;ps-lpr-switches&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;-query&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;; show printer dialog&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;setq&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;ps-right-header&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;/pagenumberstring load&amp;#34;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;ps-time-stamp-mon-dd-yyyy&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Caveat: Be sure to switch to a light background color scheme before you print, else your fonts will be so light that they won&amp;rsquo;t be readable!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Decaffeination:: A Short Story</title>
      <link>https://arunrocks.com/decaffeination-a-short-story/</link>
      <pubDate>Fri, 03 Mar 2006 13:54:47 +0530</pubDate>
      
      <guid>https://arunrocks.com/decaffeination-a-short-story/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m trying my hand at fiction after a long time and probably for the first time in this blog. Well, characters, events and places are fictional and the usual legal blah, blah ;)&lt;/p&gt;
&lt;h2 id=&#34;decaffeination&#34;&gt;Decaffeination&lt;/h2&gt;
&lt;p&gt;Her heavily mascaraed eyes flicked towards me across the cubicle barrier. I made a futile attempt to pretend that I didn&amp;rsquo;t notice it. Her blank glance meant only one thing - &amp;lsquo;Aren&amp;rsquo;t you ready, yet?&amp;rsquo; A meeting reminder has suddenly started flashing wildly on my computer screen. Just then somebody just slammed shut a printer tray diagonally behind me. Also the distinct soft thuds of a stilettos striding on the wooden floor again far behind me sounds like war drums. The typically inaudible chatter hundreds of fingers frantically tapping computer keys and depressing mouse buttons have suddenly become unbearably loud. A mixed feeling of sickness and growing anger is brewing in my tummy. I realize I have suddenly become perfectly still.&lt;/p&gt;
&lt;p&gt;She stands up from her seat in one slow lazy motion. Her usual aloof expression almost certainly didn&amp;rsquo;t convey intelligence as she presumed. Rather it smacks of snobbishness. This time I don&amp;rsquo;t make a futile pretence of ignoring her, on the contrary I decide to acknowledge it. To further affirm my stubbornness in this matter, my chin dips slightly lower down my chest and my eyes dart across its breadth of my computer screen like a skilled Bharatanatyam dancer. The 12 page report I need just a mouse click away. Yet, my hand is still waving the mouse like silly as if waiting for a cue. Then suddenly I got my cue.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;We have the weekly meeting now, right?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Hmm&amp;hellip;. Oh, right. Just a minute, Sonia&amp;rdquo;&lt;/p&gt;
&lt;p&gt;She tries one of her sly smiles which rather disappear in the flashes of her red glossy lips &amp;ldquo;Can you take the printouts? I&amp;rsquo;m too lazy to hunt for it&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Damn you why me? - I wonder. &amp;ldquo;Sure, no problem&amp;rdquo;&lt;/p&gt;
&lt;p&gt;You can call it the worst part of the day for a meeting or anything for that matter. At quarter past two just after lunch. Not that a BurgerKing bean burger meal is a particularly sumptuous or satisfying lunch. It just had to weigh down in my belly enough to trigger a mid-afternoon sleep. Not that this drowsy state would affect my performance in this meeting in any manner. In fact, sleep walking would be an ideal strategy to tackle the 15 odd weekly report meetings that I have these days. An impassive reading of the itemized colour coded action points, some vague summary of the tasks performed and a quiet nod to each speaker is all that is needed. No insights, no lateral thinking and god forbid no technical jargon. Paradoxically, being in charge of an IT project the last thing anyone would like to mention in such meetings is anything technical. The &amp;lsquo;tech&amp;rsquo; stuff is usually so low level that isn&amp;rsquo;t worth mentioning. It is at end of the chain, the operational level. It&amp;rsquo;s not that you would be scoffed at or even rebuked for talking &amp;lsquo;tech&amp;rsquo;. But it would be quite apparent that it is slipping through the tunnels between everyone&amp;rsquo;s ears. More importantly it would be a career suicide for an IT consultant like me.&lt;/p&gt;
&lt;p&gt;We never needed so many meetings. Originally there was just ONE. It was appropriately on a Wednesday morning. Everyone would promptly appear and we would kick off by reading out the consolidated 4 page report. But then Middle East project became our responsibility and they still wanted the same deadlines. We threw our hands up saying we simply didn&amp;rsquo;t have enough flack. It was true. Most of us Indians put in around 12 hours a day. We had drawn out things so tight that we would barely make it to the Haloween release. A certain German manager in fact didn&amp;rsquo;t quite appreciate this. Almost callously he claimed that we were underutilized. Like we were donkeys pulling a chariot when we could have actually galloped like horses. So he felt the best thing would be to track everything. From the code reviews to the lunch breaks. Every single bit of it. Perhaps it made him feel that he finally had the whip. Nonetheless, things were actually not improving in any manner.&lt;/p&gt;
&lt;p&gt;The report heavy with graphs slowly loads up on my screen. I&amp;rsquo;m just a key press away from printing it. I pickup up my dark hardbound notebook in one hand and my extra strong, extra sweetened cup of tea in the other. I will badly need the latter in the next one hour. In fact I&amp;rsquo;ll actually need 3 such cups. But for now - this will do. This one was freshly brewed a minute ago. A minute ago when I punched the code 53 on the machine for the eight time today. When a Styrofoam cup popped down from within and the machine started whirring loudly. The tiny nozzles above the cup started spurting some liquids and steam in a premeditated sequence. They built up a foam which made delicious noises as it rose to the brim. Without even looking I picked up the cup timed to perfection as the last drop dripped down to the cup. One minute later, I look at the cup now, the foam is still intact. Perfecto, I murmured.&lt;/p&gt;
&lt;p&gt;Then I catapult from my seat and press the print button and dash towards the printer. As the pages spew into the tray, my notebook appears like an enormous chainsaw and I&amp;rsquo;m mentally sawing down one big tree after another. I collect 24 pages of single sided print on bond quality paper for stapling. My stapler makes a vacant click reminding me that it was devoid of pins since last week. Without even thinking twice I pick up the nearest stapler and the deed is done.&lt;/p&gt;
&lt;p&gt;All the while Sonia was waiting armed with her spiral bound notebook, office supplied pen and the bloody same aloof expression. She had worn her usual black jumper and black trousers. As popular wisdom goes Black can be quite flattering for women wishing to look slim. Honestly, it hardly helped much on her 150 pound frame. I gave a tiny smile indicating that I&amp;rsquo;m ready. That smile got amplified, sugar coated, mixed with a hint of a yawn and flashed back to me in bright red lips. I tried to mildly joke something about the recently proliferation of reports. She chortled in her usually highly pitched tone, which almost startled me in mid motion.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Would anybody from CHIRP apps join us?&amp;rdquo; she mouthed in her heavily south Brit accent.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;I suppose not. Neither Jennifer or Kiran accepted the meeting request. I guess they have no outstanding tasks this week.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Hmmm, I suppose they don&amp;rsquo;t. But we can still dial them up from the conference room&amp;rdquo;&lt;/p&gt;
&lt;p&gt;I didn&amp;rsquo;t quite hear her last sentence. I guess her 3 inch heels rhythmically pounding the carpeted floor was drowning it. A short tuft of hair over her forehead kept vibrating in rhythm. Her exaggerated movement came to an abrupt stop. I reached out and punched the lift button.&lt;/p&gt;
&lt;p&gt;She kept watching impatiently at the LED display of the lift. I looked though the bright window at the end of the alley. It was a warm day in London today and a perfect time to be outdoors. I could see a group of young identically dressed balle dancers by the streets walking to the nearby park. Some were leaping and spinning with graceful ease. Further across, little chubby English children played hopscotch or sat on seesaws in the park. A pale thin young woman was sitting against a short cherry tree and was half amused by her over enthusiastic chestnut coloured Doberman. Her cheerful face couldn&amp;rsquo;t hide her longing, but right now, the sun and her life looked bright.&lt;/p&gt;
&lt;p&gt;The lift opened with a ring. As the doors slid open, a tall slender formally dressed black Brit rushed out. He was momentarily confused which way to turn. He chose right and decided to run. Sonia stepped in almost immediately. I dragged myself in. She lifted her manicured fingers all the way up to button 14. Thanks to the extra 3 inches she didn&amp;rsquo;t have to try too hard.&lt;/p&gt;
&lt;p&gt;&amp;lsquo;Kapil, going home for Diwali?&amp;rsquo;&lt;/p&gt;
&lt;p&gt;I could almost feel the nausea now. &amp;lsquo;No&amp;rsquo;, I replied.&lt;/p&gt;
&lt;p&gt;&amp;lsquo;Hmm&amp;hellip; why?&amp;rsquo;, she enquired&lt;/p&gt;
&lt;p&gt;In a low voice I replied, &amp;lsquo;Not that many leaves left actually&amp;rsquo;&lt;/p&gt;
&lt;p&gt;&amp;lsquo;Bummer. Don&amp;rsquo;t worry, we can celebrate it over here this time.&amp;rsquo;&lt;/p&gt;
&lt;p&gt;I looked at her face hoping she was joking. Hell, she wasn&amp;rsquo;t! After all it isn&amp;rsquo;t quite surprising actually. She looked unmistakable like any other Punjabi girl. Except perhaps for her bobbed silky looking hair dyed in psychedelic colours. Except perhaps for her near perfect south Brit accent. Except for her childhood, which perhaps had fleeting trips to Punjab once in a year, which would now be more of a repulsive memory of a poverty stricken country.&lt;/p&gt;
&lt;p&gt;Of course she wasn&amp;rsquo;t an Indian. She wouldn&amp;rsquo;t know what it is like to be home at Diwali. More importantly she wouldn&amp;rsquo;t know what it is like not to be home at Diwali. An ignoramus. A cross cultural freak. A word that&amp;rsquo;s stripped of its etymology. Pathetic!&lt;/p&gt;
&lt;p&gt;I tried to smile. She smiled back, this time more meaningfully. Did she actually peek into the mind of Kapil Sharma for a moment? I cannot say. Perhaps she did. Perhaps she did look a bit pretty now. She had wide telling eyes. I had forgotten.&lt;/p&gt;
&lt;p&gt;The lift pulled itself to a halt. As I stepped outside I heard a familiar voice to my left. It was my project manager, Hari. Meticulously dressed in a cream pinstripe shirt and black blazer, he was slowly pacing about the walkway. To a casual observer, he could be seen as loudly talking and gesturing to an invisible person, almost like a lunatic. But, a thin wire dangling in front of him is the sole proof of his sanity. He must be speaking via his hands-free to his offshore project manager over a teleconference. His voice is barely audible but one can sense that things are not quite happy there.&lt;/p&gt;
&lt;p&gt;As I walked the wire seemed more like a leash around Hari&amp;rsquo;s neck. The mobile he held in one hand seemed to have firmly held its other end. It seemed to have slowly tightened its grip on Hari, till his thickly mustached lips moved and muttered something out of sheer compulsion. He never saw me. I turned and realized Sonia was already entering the meeting room.&lt;/p&gt;
&lt;p&gt;I entered the tiny room with a circular table and few plush plastic chairs. I handed over Sonia&amp;rsquo;s copy of the report to her. I placed my black notebook and tea on the mahogany table just next to her. I opened my notebook and leaved through the notes of all my earlier meetings. I found a blank page and scribbled down the date at the upper left corner. As I&amp;rsquo;m about to write, I&amp;rsquo;m now aware of a familiar feeling in me. I&amp;rsquo;m still wondering - which meeting is this?&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
