Jekyll2023-06-26T11:55:24+00:00https://ananthrn.github.io/feed.xmlAnanth NarayanA small insight into my thoughts and interests.New York Sock Exchange2017-11-10T22:44:00+00:002017-11-10T22:44:00+00:00https://ananthrn.github.io/exchange<h2 id="summary">Summary</h2> <p>An intelligent trading system, written in Java, that trades socks. Yes. Socks.</p> <h2 id="links">Links</h2> <p>A full report on the project can be found <a href="https://drive.google.com/open?id=18wTOr9eG7wcXOk5AisJkzrgYKP1lmIDZ">here</a>.</p> <p>The <a href="https://github.com/ananthrn/New-York-Sock-Exchange">Github repo</a>.</p> <hr /> <h2 id="the-problem">The Problem</h2> <p>The New York Sock exchange is a turn based simulation of a hypothetical scenario involving traders trying to trade socks, in order to get socks that match in color as much as possible.</p> <p>Each player inherits a collection of ‘2n’ socks, and each sock has a color determined by an (R,G,B) triple. Here, R, G, and B are integers between 0 and 255 and the collection of (R,G,B) values is random. A player will likely be ‘embarrassed’ to wear two socks of different colors, hence the aim of the game is to pair up socks of similar colors.</p> <p>The ‘sock exchange’ has been developed with players in a similar situation. In the exchange, players publicly post two socks they would like to trade, ranked as first and second. The auction house then exchanges socks between players based on compatibility and rank, and the game proceeds.</p> <p>The project was a part of the Programming and Problem Solving(<a href="http://www.cs.columbia.edu/~kar/4444f17/">COMS 4444</a>) course taught at Columbia University in Fall 2017.</p> <hr /> <h2 id="our-strategy-an-overview">Our Strategy: An Overview</h2> <p>Our strategy is broken into two phases:</p> <h3 id="the-matching-phase">The Matching phase</h3> <p>In this phase, we employed a combination of Edmond’s Blossom algorithm to come up with an optimal matching for the socks we had. The Blossom algorithm converts the sock set into a weighted graph, before finding an optimal perfect matching on the graph. To read more about the algorithm refer to <a href="https://brilliant.org/wiki/blossom-algorithm/">Blossom Algorithm</a>.</p> <h3 id="the-trading-phase">The Trading phase</h3> <p>For our trading strategy, we deployed a strategy that involved two facets.</p> <p>First, we built a knowledge graph, that estimated the market value of all the socks on the market, giving our trader a good idea of what socks were “hot” on the market.</p> <p>Second, we had an estimator for which socks were best for us to request i.e the socks that would decrease our embarrassment the most.</p> <p>Finally, we combined both facets using a hyper-parameter tuning algorithm that found the optimal balance between these two strategies.</p> <hr /> <h2 id="how-we-built-it">How we built it</h2> <p>Our bot is written in Java. All strategies were implemented from scratch by us.</p> <hr /> <h3 id="accomplishments-that-were-proud-of">Accomplishments that we’re proud of</h3> <p>Apart from doing excellently in the tournaments run in class, we are also extremely proud of the fact that our bot is efficient and our unique approach to building the knowledge graph.</p> <hr /> <h2 id="what-we-learned">What we learned</h2> <p>In the process of developing our strategy, we learned about matching algorithms, where they are used in practice, and how to approximate matching algorithms efficiently.</p> <p>In addition, we also learned about different real world market strategies and came up with some on our own. We learned how difficult it is to predict the market value even in a toy setting such as ours.</p> <hr /> <h2 id="real-world-inspiration">Real World Inspiration</h2> <p>While the problem seems abstract at first, it manifests itself in numerous real world situations.</p> <p>The sock matching problem can be abstracted to finding a minimum weight perfect matching in a graph. This is a problem that comes up in a lot of applications, including protein matching simulations in biology, traffic routes in cities etc.</p> <p>Our market value knowledge graph aims to solve the online version of an important problem in machine learning, about learning from sparse partial information.</p> <hr /> <h2 id="whats-next-for-new-york-sock-exchange">What’s next for New York Sock Exchange</h2> <p>While we believe we made significant strides towards developing a fully functional and optimal trader, we do believe there is scope for improvements that we plan to incorporate in the near future.</p> <h3 id="maintaining-trade-histories">Maintaining Trade Histories</h3> <p>Using this information, we could sophisticate our offer strategy, catering our offers to players whom we know possess certain socks that could improve our embarrassment.</p> <h3 id="player-specific-market-value">Player Specific Market Value</h3> <p>This could definitely provide an improved market value strategy since different players could be demanding different socks and this would allow us to discern those requests.</p> <hr /> <h2 id="links-1">Links</h2> <p>A full report on the project can be found <a href="https://drive.google.com/open?id=18wTOr9eG7wcXOk5AisJkzrgYKP1lmIDZ">here</a>.</p> <p>The <a href="https://github.com/ananthrn/New-York-Sock-Exchange">Github repo</a>.</p> <hr />ananthSummaryLumos2017-11-10T22:44:00+00:002017-11-10T22:44:00+00:00https://ananthrn.github.io/Lumos<h2 id="summary">Summary</h2> <p>A lightweight aid for the visually impaired.</p> <hr /> <h2 id="inspiration">Inspiration</h2> <p>Coming from the crowded cities of Bangalore and Mumbai, we reflected on how incredibly difficult it must be for a visually challenged person to navigate the world around them.</p> <p>This thought grew into an idea for a product to help the blind to interact with the environment around them, at minimal cost.</p> <p>We built Lumos, an android application that assists the visually impaired by describing their surroundings in a meaningful manner.</p> <hr /> <h2 id="what-it-does">What it does</h2> <p>Lumos helps visually impaired people experience the world around them, seamlessly.</p> <p>The user points their camera at any object in their surroundings. Lumos records an image, analyzes it, and outputs a small description of the image in the form of audio.</p> <p>If there is something that the user needs to be particularly aware of, such as traffic or a stairway, Lumos will warn them of it.</p> <hr /> <h2 id="how-we-built-it">How we built it</h2> <p>Our front-end consists of a lightweight android application listening for a click. Once a picture is taken, the image processing and analysis is handled by our backend infrastructure.</p> <p>Using the Google Cloud Vision API, we detect relevant objects in the image before assigning our own relevance score to them. Post this, we generate a relevant phrase that we predict might be useful to the user and make use of Text to Speech APIs to relay this information back to the user in the form of a short audio clip.</p> <h3 id="accomplishments-that-were-proud-of">Accomplishments that we’re proud of</h3> <p>When we started the project, we decided to keep two broad concepts in mind: efficiency and simplicity.</p> <p>We’re proud to say this is reflected in our entire application. Our application runs with minimal latency and has an extremely simple and intuitive user experience.</p> <p>We accomplished the first by using compression algorithms for the images that are taken, thus reducing the time for API calls. We also store nothing on the user’s phone.</p> <p>The second we accomplished by sticking to our minimal and simple design principles, only having one screen and no complex sequence of commands, thereby creating a lightweight and user-friendly application.</p> <h2 id="what-we-learned">What we learned</h2> <p>We learned that building an application that uses external APIs and must work in real time is an incredibly challenging task. It is a careful balance between an enhanced user experience and an app that’s just to cumbersome to use.</p> <p>Toeing this line, is something that we learned was not only an engineering challenge, but a design challenge as well. We learnt the importance of simplistic,logical design that meets the user’s needs.</p> <hr /> <h2 id="whats-next-for-lumos">What’s next for Lumos</h2> <p>We believe that Lumos has a lot of potential for growth and that is why it was so important for us to build a basic working prototype.</p> <p>We plan to incorporate a more sophisticated backend infrastructure for detecting objects in images as well as rendering and organizing this information more effectively. We are also thinking about ways to pre-process data in a better way, thus keeping latency time low and preserving as much useful information in the data as possible.</p> <p>Another huge addition we hope to incorporate soon, is to make Lumos more personalized to the user, detecting faces of friends and family that the user meets etc. We also want to include text detection, so a user pointing the camera at text, can have it read out to them.</p> <hr /> <h2 id="links">Links</h2> <p>The devpost link can be found <a href="https://devpost.com/software/lumos-l6xh3z">here</a>.</p> <p>The <a href="https://github.com/ananthrn/Lumos">Github repo</a>.</p> <hr />ananthSummaryMarkdown Extra Components2016-02-24T22:48:00+00:002016-02-24T22:48:00+00:00https://ananthrn.github.io/markdown-extra-components<h2 id="summary">Summary:</h2> <p>You can pick as item to see how to apply in markdown.</p> <h4 id="especial-elements">Especial Elements</h4> <ul> <li><a href="#evidence">Evidence</a></li> <li><a href="#side-by-side">Side-by-Side</a></li> <li><a href="#star">Star</a></li> <li><a href="#especial-breaker">Especial Breaker</a></li> <li><a href="#spoiler">Spoiler</a></li> </ul> <h4 id="external-elements">External Elements</h4> <ul> <li><a href="#gist">Gist</a></li> <li><a href="#codepen">Codepen</a></li> <li><a href="#slideshare">Slideshare</a></li> <li><a href="#videos">Videos</a></li> </ul> <hr /> <h2 id="evidence">Evidence</h2> <p>You can try the evidence!</p> <p><span class="evidence">Paragraphs can be written like so. A paragraph is the basic block of Markdown. A paragraph is what text will turn into when there is no reason it should become anything else.</span></p> <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">"evidence"</span><span class="nt">&gt;</span>Paragraphs can be written like so. A paragraph is the basic block of Markdown. A paragraph is what text will turn into when there is no reason it should become anything else.<span class="nt">&lt;/span&gt;</span></code></pre></figure> <hr /> <h2 id="side-by-side">Side-by-side</h2> <p>Like the <a href="https://medium.com/">Medium</a> component.</p> <p><strong>Image</strong> on the left and <strong>Text</strong> on the right:</p> <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"side-by-side"</span><span class="nt">&gt;</span> <span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"toleft"</span><span class="nt">&gt;</span> <span class="nt">&lt;img</span> <span class="na">class=</span><span class="s">"image"</span> <span class="na">src=</span><span class="s">"https://ananthrn.github.io/assets/images/profile.jpg"</span> <span class="na">alt=</span><span class="s">"Alt Text"</span><span class="nt">&gt;</span> <span class="nt">&lt;figcaption</span> <span class="na">class=</span><span class="s">"caption"</span><span class="nt">&gt;</span>Photo by John Doe<span class="nt">&lt;/figcaption&gt;</span> <span class="nt">&lt;/div&gt;</span> <span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"toright"</span><span class="nt">&gt;</span> <span class="nt">&lt;p&gt;</span>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<span class="nt">&lt;/p&gt;</span> <span class="nt">&lt;/div&gt;</span> <span class="nt">&lt;/div&gt;</span></code></pre></figure> <div class="side-by-side"> <div class="toleft"> <img class="image" src="https://ananthrn.github.io/assets/images/profile.jpg" alt="Alt Text" /> <figcaption class="caption">Photo by John Doe</figcaption> </div> <div class="toright"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div> </div> <p><strong>Text</strong> on the left and <strong>Image</strong> on the right:</p> <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"side-by-side"</span><span class="nt">&gt;</span> <span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"toleft"</span><span class="nt">&gt;</span> <span class="nt">&lt;p&gt;</span>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<span class="nt">&lt;/p&gt;</span> <span class="nt">&lt;/div&gt;</span> <span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"toright"</span><span class="nt">&gt;</span> <span class="nt">&lt;img</span> <span class="na">class=</span><span class="s">"image"</span> <span class="na">src=</span><span class="s">"https://ananthrn.github.io/assets/images/profile.jpg"</span> <span class="na">alt=</span><span class="s">"Alt Text"</span><span class="nt">&gt;</span> <span class="nt">&lt;figcaption</span> <span class="na">class=</span><span class="s">"caption"</span><span class="nt">&gt;</span>Photo by John Doe<span class="nt">&lt;/figcaption&gt;</span> <span class="nt">&lt;/div&gt;</span> <span class="nt">&lt;/div&gt;</span></code></pre></figure> <div class="side-by-side"> <div class="toleft"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div> <div class="toright"> <img class="image" src="https://ananthrn.github.io/assets/images/profile.jpg" alt="Alt Text" /> <figcaption class="caption">Photo by John Doe</figcaption> </div> </div> <hr /> <h2 id="star">Star</h2> <p>You can give evidence to a post. Just add the tag to the markdown file.</p> <figure class="highlight"><pre><code class="language-raw" data-lang="raw">star: true</code></pre></figure> <hr /> <h2 id="especial-breaker">Especial Breaker</h2> <p>You can add a especial <em>hr</em> to your text.</p> <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"breaker"</span><span class="nt">&gt;&lt;/div&gt;</span></code></pre></figure> <div class="breaker"></div> <hr /> <h2 id="spoiler">Spoiler</h2> <p>You can add an especial hidden content that appears on hover.</p> <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"spoiler"</span><span class="nt">&gt;&lt;p&gt;</span>your content<span class="nt">&lt;/p&gt;&lt;/div&gt;</span></code></pre></figure> <div class="spoiler"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></div> <hr /> <h2 id="gist">Gist</h2> <p>You can add Gists from github.</p> <figure class="highlight"><pre><code class="language-raw" data-lang="raw">{ % gist sergiokopplin/91ff4220480727b47224245ee2e9c291 % }</code></pre></figure> <script src="https://gist.github.com/sergiokopplin/91ff4220480727b47224245ee2e9c291.js"> </script> <hr /> <h2 id="codepen">Codepen</h2> <p>You can add Pens from Codepen.</p> <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;p</span> <span class="na">data-height=</span><span class="s">"268"</span> <span class="na">data-theme-id=</span><span class="s">"0"</span> <span class="na">data-slug-hash=</span><span class="s">"gfdDu"</span> <span class="na">data-default-tab=</span><span class="s">"result"</span> <span class="na">data-user=</span><span class="s">"chriscoyier"</span> <span class="na">class=</span><span class="s">'codepen'</span><span class="nt">&gt;</span> See the Pen <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">'http://codepen.io/chriscoyier/pen/gfdDu/'</span><span class="nt">&gt;</span>Crappy Recreation of the Book Cover of *The Flame Alphabet*<span class="nt">&lt;/a&gt;</span> by Chris Coyier (<span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">'http://codepen.io/chriscoyier'</span><span class="nt">&gt;</span>@chriscoyier<span class="nt">&lt;/a&gt;</span>) on <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">'http://codepen.io'</span><span class="nt">&gt;</span>CodePen<span class="nt">&lt;/a&gt;</span>. <span class="nt">&lt;/p&gt;</span> <span class="nt">&lt;script </span><span class="na">async</span> <span class="na">src=</span><span class="s">"//assets.codepen.io/assets/embed/ei.js"</span><span class="nt">&gt;&lt;/script&gt;</span></code></pre></figure> <p data-height="268" data-theme-id="0" data-slug-hash="gfdDu" data-default-tab="result" data-user="chriscoyier" class="codepen">See the Pen <a href="http://codepen.io/chriscoyier/pen/gfdDu/">Crappy Recreation of the Book Cover of *The Flame Alphabet*</a> by Chris Coyier (<a href="http://codepen.io/chriscoyier">@chriscoyier</a>) on <a href="http://codepen.io">CodePen</a>.</p> <script async="" src="//assets.codepen.io/assets/embed/ei.js"></script> <hr /> <h2 id="slideshare">Slideshare</h2> <p>Add your presentations here!</p> <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;iframe</span> <span class="na">src=</span><span class="s">"//www.slideshare.net/slideshow/embed_code/key/hqDhSJoWkrHe7l"</span> <span class="na">width=</span><span class="s">"560"</span> <span class="na">height=</span><span class="s">"310"</span> <span class="na">frameborder=</span><span class="s">"0"</span> <span class="na">marginwidth=</span><span class="s">"0"</span> <span class="na">marginheight=</span><span class="s">"0"</span> <span class="na">scrolling=</span><span class="s">"no"</span> <span class="na">style=</span><span class="s">"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;"</span> <span class="na">allowfullscreen</span><span class="nt">&gt;</span> <span class="nt">&lt;/iframe&gt;</span></code></pre></figure> <iframe src="//www.slideshare.net/slideshow/embed_code/key/hqDhSJoWkrHe7l" width="560" height="310" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen=""> </iframe> <hr /> <h2 id="videos">Videos</h2> <p>Do you want some videos? Youtube, Vimeo or Vevo? Copy the embed code and paste on your post!</p> <p><strong>Example</strong></p> <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;iframe</span> <span class="na">width=</span><span class="s">"560"</span> <span class="na">height=</span><span class="s">"310"</span> <span class="na">src=</span><span class="s">"https://www.youtube.com/embed/r7XhWUDj-Ts"</span> <span class="na">frameborder=</span><span class="s">"0"</span> <span class="na">allowfullscreen</span><span class="nt">&gt;&lt;/iframe&gt;</span></code></pre></figure> <iframe width="560" height="310" src="https://www.youtube.com/embed/r7XhWUDj-Ts" frameborder="0" allowfullscreen=""></iframe>ananthSummary:Markdown Common Elements2016-02-24T22:44:00+00:002016-02-24T22:44:00+00:00https://ananthrn.github.io/markdown-common-elements<h2 id="summary">Summary:</h2> <p>You can pick as item to see how to apply in markdown.</p> <h3 id="comum-elements">Comum Elements</h3> <ul> <li><a href="#basic-formatting">Basic formatting</a></li> <li><a href="#headings">Headings</a></li> <li><a href="#lists">Lists</a></li> <li><a href="#paragraph-modifiers">Paragraph Modifiers</a></li> <li><a href="#urls">Urls</a></li> <li><a href="#horizontal-rule">Horizontal Rule</a></li> <li><a href="#images">Images</a></li> <li><a href="#code">Code</a></li> </ul> <hr /> <h2 id="basic-formatting">Basic formatting</h2> <p>This note <strong>demonstrates</strong> some of what <a href="http://daringfireball.net/projects/markdown/">Markdown</a> is <em>capable of doing</em>.</p> <p>And that’s how to do it.</p> <figure class="highlight"><pre><code class="language-html" data-lang="html">This note **demonstrates** some of what [Markdown][some/link] is *capable of doing*.</code></pre></figure> <hr /> <h2 id="headings">Headings</h2> <p>There are six levels of headings. They correspond with the six levels of HTML headings. You’ve probably noticed them already in the page. Each level down uses one more hash character. But we are using just 4 of them.</p> <h1 id="headings-can-be-small">Headings can be small</h1> <h2 id="headings-can-be-small-1">Headings can be small</h2> <h3 id="headings-can-be-small-2">Headings can be small</h3> <h4 id="headings-can-be-small-3">Headings can be small</h4> <figure class="highlight"><pre><code class="language-raw" data-lang="raw"># Heading ## Heading ### Heading #### Heading</code></pre></figure> <hr /> <h2 id="lists">Lists</h2> <h3 id="ordered-list">Ordered list</h3> <ol> <li>Item 1</li> <li>A second item</li> <li>Number 3</li> </ol> <figure class="highlight"><pre><code class="language-raw" data-lang="raw">1. Item 1 2. A second item 3. Number 3</code></pre></figure> <h3 id="unordered-list">Unordered list</h3> <ul> <li>An item</li> <li>Another item</li> <li>Yet another item</li> <li>And there’s more…</li> </ul> <figure class="highlight"><pre><code class="language-raw" data-lang="raw">* An item * Another item * Yet another item * And there's more...</code></pre></figure> <hr /> <h2 id="paragraph-modifiers">Paragraph modifiers</h2> <h3 id="quote">Quote</h3> <blockquote> <p>Here is a quote. What this is should be self explanatory. Quotes are automatically indented when they are used.</p> </blockquote> <figure class="highlight"><pre><code class="language-raw" data-lang="raw">&gt; Here is a quote. What this is should be self explanatory.</code></pre></figure> <hr /> <h2 id="urls">URLs</h2> <p>URLs can be made in a handful of ways:</p> <ul> <li>A named link to <a href="http://www.markitdown.net/">Mark It Down</a>.</li> <li>Another named link to <a href="http://markitdown.net/">Mark It Down</a></li> <li>Sometimes you just want a URL like <a href="http://markitdown.net/">http://markitdown.net/</a>.</li> </ul> <figure class="highlight"><pre><code class="language-raw" data-lang="raw">* A named link to [MarkItDown][3]. * Another named link to [MarkItDown](http://markitdown.net/) * Sometimes you just want a URL like &lt;http://markitdown.net/&gt;.</code></pre></figure> <hr /> <h2 id="horizontal-rule">Horizontal rule</h2> <p>A horizontal rule is a line that goes across the middle of the page. It’s sometimes handy for breaking things up.</p> <figure class="highlight"><pre><code class="language-raw" data-lang="raw">---</code></pre></figure> <hr /> <h2 id="images">Images</h2> <p>Markdown can also contain images. I’ll need to add something here sometime.</p> <figure class="highlight"><pre><code class="language-raw" data-lang="raw">![Markdowm Image][/image/url]</code></pre></figure> <p><img src="http://kune.fr/wp-content/uploads/2013/10/ghost-blog.jpg" alt="Markdowm Image" /></p> <p><em>Figure Caption</em>?</p> <figure class="highlight"><pre><code class="language-raw" data-lang="raw">![Markdowm Image][/image/url] &lt;figcaption class="caption"&gt;Photo by John Doe&lt;/figcaption&gt;</code></pre></figure> <p><img src="http://kune.fr/wp-content/uploads/2013/10/ghost-blog.jpg" alt="Markdowm Image" /></p> <figcaption class="caption">Photo by John Doe</figcaption> <p><em>Bigger Images</em>?</p> <figure class="highlight"><pre><code class="language-raw" data-lang="raw">![Markdowm Image][/image/url]{: class="bigger-image" }</code></pre></figure> <p><img src="http://kune.fr/wp-content/uploads/2013/10/ghost-blog.jpg" alt="Markdowm Image" class="bigger-image" /></p> <hr /> <h2 id="code">Code</h2> <p>A HTML Example:</p> <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="cp">&lt;!DOCTYPE html&gt;</span> <span class="nt">&lt;html</span> <span class="na">lang=</span><span class="s">"en"</span><span class="nt">&gt;</span> <span class="nt">&lt;head&gt;</span> <span class="nt">&lt;meta</span> <span class="na">charset=</span><span class="s">"UTF-8"</span><span class="nt">&gt;</span> <span class="nt">&lt;title&gt;</span>Document<span class="nt">&lt;/title&gt;</span> <span class="nt">&lt;/head&gt;</span> <span class="nt">&lt;body&gt;</span> <span class="nt">&lt;h1&gt;</span>Just a test<span class="nt">&lt;/h1&gt;</span> <span class="nt">&lt;/body&gt;</span> <span class="nt">&lt;/html&gt;</span></code></pre></figure> <p>A CSS Example:</p> <figure class="highlight"><pre><code class="language-css" data-lang="css"><span class="nt">pre</span> <span class="p">{</span> <span class="nl">padding</span><span class="p">:</span> <span class="m">10px</span><span class="p">;</span> <span class="nl">font-size</span><span class="p">:</span> <span class="m">.8em</span><span class="p">;</span> <span class="nl">white-space</span><span class="p">:</span> <span class="n">pre</span><span class="p">;</span> <span class="p">}</span> <span class="nt">pre</span><span class="o">,</span> <span class="nt">table</span> <span class="p">{</span> <span class="nl">width</span><span class="p">:</span> <span class="m">100%</span><span class="p">;</span> <span class="p">}</span> <span class="nt">code</span><span class="o">,</span> <span class="nt">pre</span><span class="o">,</span> <span class="nt">tt</span> <span class="p">{</span> <span class="nl">font-family</span><span class="p">:</span> <span class="n">Monaco</span><span class="p">,</span> <span class="n">Consolas</span><span class="p">,</span> <span class="n">Inconsolata</span><span class="p">,</span> <span class="nb">monospace</span><span class="p">,</span> <span class="nb">sans-serif</span><span class="p">;</span> <span class="nl">background</span><span class="p">:</span> <span class="n">rgba</span><span class="p">(</span><span class="m">0</span><span class="p">,</span><span class="m">0</span><span class="p">,</span><span class="m">0</span><span class="p">,</span><span class="m">.05</span><span class="p">);</span> <span class="p">}</span></code></pre></figure> <p>A JS Example:</p> <figure class="highlight"><pre><code class="language-js" data-lang="js"><span class="c1">// Sticky Header</span> <span class="nx">$</span><span class="p">(</span><span class="nb">window</span><span class="p">).</span><span class="nx">scroll</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span> <span class="k">if</span> <span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="nb">window</span><span class="p">).</span><span class="nx">scrollTop</span><span class="p">()</span> <span class="o">&gt;</span> <span class="mi">900</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">body</span><span class="dl">"</span><span class="p">).</span><span class="nx">hasClass</span><span class="p">(</span><span class="dl">'</span><span class="s1">show-menu</span><span class="dl">'</span><span class="p">))</span> <span class="p">{</span> <span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">#hamburguer__open</span><span class="dl">'</span><span class="p">).</span><span class="nx">fadeOut</span><span class="p">(</span><span class="dl">'</span><span class="s1">fast</span><span class="dl">'</span><span class="p">);</span> <span class="p">}</span> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">$</span><span class="p">(</span><span class="dl">"</span><span class="s2">body</span><span class="dl">"</span><span class="p">).</span><span class="nx">hasClass</span><span class="p">(</span><span class="dl">'</span><span class="s1">show-menu</span><span class="dl">'</span><span class="p">))</span> <span class="p">{</span> <span class="nx">$</span><span class="p">(</span><span class="dl">'</span><span class="s1">#hamburguer__open</span><span class="dl">'</span><span class="p">).</span><span class="nx">fadeIn</span><span class="p">(</span><span class="dl">'</span><span class="s1">fast</span><span class="dl">'</span><span class="p">);</span> <span class="p">}</span> <span class="p">});</span></code></pre></figure>ananthSummary: