<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Burton on Medium]]></title>
        <description><![CDATA[Stories by David Burton on Medium]]></description>
        <link>https://medium.com/@trvlingteacher?source=rss-1991ff9b75d7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SoqVm6U_Q-VNWXx01gNogQ.jpeg</url>
            <title>Stories by David Burton on Medium</title>
            <link>https://medium.com/@trvlingteacher?source=rss-1991ff9b75d7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 02:40:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@trvlingteacher/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Monty Hall Problem]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Some statistical problems are more intuitive than others. The Monty Hall problem is fun because it seems to defy logic, at first glance&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@trvlingteacher/the-monty-hall-problem-4f942a330207?source=rss-1991ff9b75d7------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@trvlingteacher/the-monty-hall-problem-4f942a330207?source=rss-1991ff9b75d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f942a330207</guid>
            <dc:creator><![CDATA[David Burton]]></dc:creator>
            <pubDate>Sun, 07 Jun 2020 23:48:27 GMT</pubDate>
            <atom:updated>2020-06-07T23:48:27.411Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Some of the Most Useful Python Add-ons]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">The libraries that I will import for most projects.</p><p class="medium-feed-link"><a href="https://medium.com/@trvlingteacher/some-of-the-most-useful-python-add-ons-6b5fb582f992?source=rss-1991ff9b75d7------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@trvlingteacher/some-of-the-most-useful-python-add-ons-6b5fb582f992?source=rss-1991ff9b75d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b5fb582f992</guid>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[David Burton]]></dc:creator>
            <pubDate>Mon, 01 Jun 2020 02:53:49 GMT</pubDate>
            <atom:updated>2020-06-01T02:53:49.984Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Use Jupyter Notebooks as Modules]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@trvlingteacher/how-to-use-jupyter-notebooks-as-modules-4ee099d7b34?source=rss-1991ff9b75d7------2"><img src="https://cdn-images-1.medium.com/max/1318/1*B9OHWLF0KT-TmrteJD_x1Q.png" width="1318"></a></p><p class="medium-feed-snippet">Jupyter notebooks makes it extremely easy to make and maintain reusable code. I&#x2019;ve spent the last few days going through old data science&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@trvlingteacher/how-to-use-jupyter-notebooks-as-modules-4ee099d7b34?source=rss-1991ff9b75d7------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@trvlingteacher/how-to-use-jupyter-notebooks-as-modules-4ee099d7b34?source=rss-1991ff9b75d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ee099d7b34</guid>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[David Burton]]></dc:creator>
            <pubDate>Mon, 18 May 2020 01:24:10 GMT</pubDate>
            <atom:updated>2020-05-18T01:24:10.855Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Prioritizing Processes On Your Mac Within Terminal]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/macoclock/prioritizing-processes-on-your-mac-within-terminal-ecb8c2fdebd3?source=rss-1991ff9b75d7------2"><img src="https://cdn-images-1.medium.com/max/1290/1*loqcv4cGRCB1bAI7Bm24lQ.png" width="1290"></a></p><p class="medium-feed-snippet">Why</p><p class="medium-feed-link"><a href="https://medium.com/macoclock/prioritizing-processes-on-your-mac-within-terminal-ecb8c2fdebd3?source=rss-1991ff9b75d7------2">Continue reading on Mac O’Clock »</a></p></div>]]></description>
            <link>https://medium.com/macoclock/prioritizing-processes-on-your-mac-within-terminal-ecb8c2fdebd3?source=rss-1991ff9b75d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecb8c2fdebd3</guid>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[David Burton]]></dc:creator>
            <pubDate>Sun, 10 May 2020 22:39:33 GMT</pubDate>
            <atom:updated>2020-05-18T15:21:56.725Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Creating a Mosaic Photo from Instagram Photos]]></title>
            <link>https://medium.com/@trvlingteacher/creating-a-mosaic-photo-from-instagram-photos-9969483e7228?source=rss-1991ff9b75d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9969483e7228</guid>
            <dc:creator><![CDATA[David Burton]]></dc:creator>
            <pubDate>Mon, 04 May 2020 00:41:36 GMT</pubDate>
            <atom:updated>2020-05-04T00:41:36.708Z</atom:updated>
            <content:encoded><![CDATA[<h4>Using Instaloader and Jupyter</h4><p><a href="https://github.com/instaloader/instaloader">Instaloader</a>: Currently compatible with Python 3.5–3.8</p><pre>pip3 install instaloader</pre><p>The next step depends on what information you’d like to scrape from Instagram. If you are wanting to make a mosaic image, then you will not need to provide login details because you will just want lower quality images.</p><pre># replace profile_name with the profile&#39;s name (no @ symbol)<br>instaloader --post-filter=&quot;not is_video&quot; profile_name</pre><p>This will take a few minutes to collect all of the photos and store them within a directory automatically named as the profile you have scraped.</p><p><strong>Processing the images:</strong></p><p>The images scraped are fairly large for creating a mosaic; therefore, you may wish to reduce their size before the mix, match, and stitching begins. Python’s image library, PIL, or pillow works extremely well when downsizing images.</p><p>Within the created directory of scraped images, run the following code.</p><pre># go to directory of scraped images<br>os.chdir(&quot;/path/to/scraped_images/&quot;)</pre><pre># Compress images into smaller tiles <br># Save the compressed file&#39;s location to a list<br>images =[]</pre><pre>for file in tqdm(glob.glob(&quot;*.jpg&quot;)):<br>    im=Image.open(file)                                        </pre><pre># Instantiate each image<br>    tiny_image = im.resize((90,90),resample=PIL.Image.LANCZOS) </pre><pre># save the image to a local directory called tiles<br>    tiny_image.save(f&#39;../tiles/profile_name{file}&#39;,)<br>    images.append(tiny_image)</pre><ul><li>tqdm is completely optional, it displays a progress bar within a jupyter notebook and I find it really helpful in knowing if a process is actually running or my aging computer has frozen.</li><li>PIL has several filters to choose from, I used LANCZOS as the resample box because it maintains the quality at the cost of performance.</li><li>Save the smaller tiles into a separate directory for the mix and match process.</li></ul><p><strong>Next, choose a source image that you want to replicate with tiles.</strong> In nerdy celebration of the US government officially releasing some declassified UFO videos this week I thought it would be fun to create an image that blends science fiction with reality.</p><p>If you have watched the X-files before you will recognize this image as the poster agent Mulder had hanging in his cubical/office space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IUFiBSjrJA7tAuCkpwRaMQ.jpeg" /></figure><p>The following Instagram accounts were used to compile the mosaic images and are well worth a follow:</p><ul><li>@<a href="http://instagram.com/explorenasa">explorenasa</a></li><li><a href="http://instagram.com/nasajohnson">@nasajohnson</a></li><li><a href="http://instagram.com/nasa_es">@nasa_es</a></li><li><a href="http://instagram.com/hubbleesa">@hubbleesa</a></li><li>@<a href="http://instagram.com/nasa">nasa</a></li><li><a href="http://instagram.com/nasasolarsystem">@nasasolarsystem</a></li><li><a href="http://instagram.com/nasaearth">@nasaearth</a></li><li><a href="http://instagram.com/nasagoddard">@nasagoddard</a></li><li><a href="http://instagram.com/nasawebb">@nasawebb</a></li><li><a href="http://instagram.com/nasamarshall">@nasamarshall</a></li><li><a href="http://instagram.com/nasaames">@nasaames</a></li><li><a href="http://instagram.com/nasakennedy">@nasakennedy</a></li><li><a href="http://instagram.com/iss">@iss</a></li><li><a href="http://instagram.com/nasaaero">@nasaaero</a></li><li><a href="http://instagram.com/nasajuno">@nasajuno</a></li><li><a href="http://instagram.com/nasachandraxray">@nasachandraxray</a></li></ul><p>In total, 20,000 images were collected to create an 11,025 tile mosaic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZnY7OWFMCJcF4xxxLjcBAg.png" /><figcaption>Creating a mosaic from Instagram photos</figcaption></figure><p>Step 1) Break apart the original image into equally spaced tiles. These tiles should stay in order or have their index value stored as a key: value pair with the value including the cartesian coordinates. (0,0,0,0) denoting the top left tile.</p><p>Step 2) Compare the original tiles against the collected tiles and make a note of their degree of similarity. Mean Squared Error is the most popular method and the skimage.metrics library includes a basic MSE and way cooler normalized_root_mse which allows you to adjust the denominator while evaluating an averaged difference between 2 images. While I have seen decent results using the euclidean option, your results may vary. It is also possible to use KNN to compare tiles and make the best match. <a href="https://link.springer.com/chapter/10.1007/978-3-662-46248-5_34">Here is an article on using that process</a>.</p><p>Step3) Replace the scraped tile with the least different original tile (key) and assign it to the canvas using the coordinates (value).</p><p>Step4) Find a nice cool place for your computer to process the project. Image processing is expensive and the above image shows what an average macbook was able to do in 4 hours. The completed image can be seen on my <a href="https://www.instagram.com/dgo20209/">Instagram</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9969483e7228" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@trvlingteacher/sql-par1-5923c8f3cfe?source=rss-1991ff9b75d7------2"><img src="https://cdn-images-1.medium.com/max/600/1*n5ILqryXzMVXctpYg9Ju7w.jpeg" width="600"></a></p><p class="medium-feed-snippet">Getting Started</p><p class="medium-feed-link"><a href="https://medium.com/@trvlingteacher/sql-par1-5923c8f3cfe?source=rss-1991ff9b75d7------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@trvlingteacher/sql-par1-5923c8f3cfe?source=rss-1991ff9b75d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5923c8f3cfe</guid>
            <category><![CDATA[simple-start]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[David Burton]]></dc:creator>
            <pubDate>Mon, 27 Apr 2020 01:16:51 GMT</pubDate>
            <atom:updated>2020-04-27T01:16:51.986Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[BASH (a high-level introduction)]]></title>
            <link>https://medium.com/@trvlingteacher/bash-a-high-level-introduction-5a50c6546f0a?source=rss-1991ff9b75d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a50c6546f0a</guid>
            <dc:creator><![CDATA[David Burton]]></dc:creator>
            <pubDate>Sun, 12 Apr 2020 21:16:37 GMT</pubDate>
            <atom:updated>2020-04-12T21:16:37.788Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>B</strong>ourne-<strong>A</strong>gain <strong>SH</strong>ell</p><p>BASH is the language we input into a terminal, which is then carried out as a program. It is a basic scripting language that can be carried out interactively or as a pre-written script. The terminal is basically what most people consider to be a computer. If you were to go back in time and build a computer from Radioshack, the concept of a terminal might become easier to grasp. You’d have a computer that could run a single process at a time and your outputs were physical wires you probably only had a single set of. Seeing the results of what you type on a black and yellow monitor having the program print a document became a choice that required physical wires to be connected.</p><p>That black and yellow monitor is now a virtual monitor (emulator) and it is what pops up when you open a terminal. It does not have the pretty graphics that slow down the processors. When you type a command into a terminal and hit run. The computer carries out that command just as if it were a regular, store-bought, program like Microsoft Excel or Photoshop. It is worth noting how powerful using a shell language is. You were using a computer as if it were a plane engine and you will now use that same engine to power a <a href="https://en.wikipedia.org/wiki/Aero-engined_car">car</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lj_J3WZZpHi-IcdCaEHI1g.jpeg" /></figure><p>It is also worth noting that with modern computers it is entirely possible to run several of these emulators simultaneously without a significant decrease in overall performance. However, until you get more comfortable its best practice to only work with a single terminal at a time.</p><p>Bash is the language you should probably start using a terminal with. While newer operating systems probably have ZSH and you will eventually want to start using ZSH and oh-my-zsh, a lot of the documentation for these programs assumes you already know BASH and there are a lot more resources available to learn BASH. Plus, if you know bash you will know enough to use ZSH with slight modifications.</p><p>BASH</p><p>You will write a program in bash that is ran by your computer kernel. The program runs a single process at a time. So, once you understand how a command is written it is fairly easy to understand that you can string these commands together to carry out more complicated tasks.</p><pre><br>[var=value]name[arguments][redirection]</pre><p>The core component of what you type into the terminal is going to be “<strong>name</strong>”. <strong>Name </strong>is the <strong>name</strong> of a program you are telling the computer to look at and run. The extra words in brackets [var=value],[arguments] and [redirection] are parameters telling the kernel how to use the program and where to send the output of the program once the process has ended.</p><p>Bash will search for a matching <strong>name</strong> to perform in this order, once it finds a match it will carry out that process and stop looking.</p><ul><li>Bash first looks for a function called <strong>name.</strong></li><li>Bash then looks for a built-in command called <strong>name.</strong></li><li>Bash then looks for an External Command (a program) called <strong>name</strong> within your systems configured PATH.</li></ul><blockquote>(Note that if you used aliasing the alias replaces that name before this entire process begins. Also, if you type / before name bash will assume you are providing the actual path to the program and it does not carry out a search along PATH. It simply looks at the location you have provided.)</blockquote><p>Aliases should probably be avoided. However, when running a command Aliases are put into place before a command looks for a name.</p><pre># means home directory<br>~</pre><p>[args…] is a single unit or token represented by a string literal. Filename, variable name, the name of a program or the name of an argument is separated by a space. A literal’s stop and start can (and should) be marked by enclosing single or double-quotes and a backslash \ is used for escaping characters.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a50c6546f0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Scientists Can Save the World]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@trvlingteacher/data-scientists-can-save-the-world-c1f587aa441?source=rss-1991ff9b75d7------2"><img src="https://cdn-images-1.medium.com/max/1280/1*XcyQ4CKsYDQt112dhe0rlA.jpeg" width="1280"></a></p><p class="medium-feed-snippet">But, we are going to need to forget about the apex of novel-coronavirus cases and get to work, now.</p><p class="medium-feed-link"><a href="https://medium.com/@trvlingteacher/data-scientists-can-save-the-world-c1f587aa441?source=rss-1991ff9b75d7------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@trvlingteacher/data-scientists-can-save-the-world-c1f587aa441?source=rss-1991ff9b75d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1f587aa441</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[covid-19-crisis]]></category>
            <dc:creator><![CDATA[David Burton]]></dc:creator>
            <pubDate>Mon, 06 Apr 2020 02:06:05 GMT</pubDate>
            <atom:updated>2020-04-06T02:06:05.094Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Get Started Creating a Django App]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@trvlingteacher/get-started-creating-a-django-app-6465e8945024?source=rss-1991ff9b75d7------2"><img src="https://cdn-images-1.medium.com/max/1154/1*nPR_rAEOe0pOQs-mVzV0ug.png" width="1154"></a></p><p class="medium-feed-snippet">Supplemental Resources:</p><p class="medium-feed-link"><a href="https://medium.com/@trvlingteacher/get-started-creating-a-django-app-6465e8945024?source=rss-1991ff9b75d7------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@trvlingteacher/get-started-creating-a-django-app-6465e8945024?source=rss-1991ff9b75d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6465e8945024</guid>
            <dc:creator><![CDATA[David Burton]]></dc:creator>
            <pubDate>Mon, 30 Mar 2020 01:26:21 GMT</pubDate>
            <atom:updated>2020-03-30T01:26:21.178Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Learn Another Language than Python to Become Better at Python]]></title>
            <link>https://medium.com/@trvlingteacher/learn-another-language-than-python-to-become-better-at-python-3ded47a14ddd?source=rss-1991ff9b75d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ded47a14ddd</guid>
            <dc:creator><![CDATA[David Burton]]></dc:creator>
            <pubDate>Mon, 23 Mar 2020 01:52:12 GMT</pubDate>
            <atom:updated>2020-03-23T01:52:12.793Z</atom:updated>
            <content:encoded><![CDATA[<p>At least this has been my experience. When starting the journey towards data science almost 2 years ago. I learned basic data science languages; Python, R, SQL and was told to focus only on these languages as those are the languages I will need to know and use daily. However, I recently went through my first Elixir tutorials and have noticed an immediate improvement in my daily projects which are conducted within a Jupyter Notebook using ipython.</p><p>I attend the weekly python project night and absolutely love the Python community, I regularly contributing to projects on github and attending hackathons around the city. However, learning python as a first language has made it so I really have not appreciated the versatility of the language. In Python you can do a lot, it is a dynamic language with high-level data types. And, the significance of this was lost on somebody like me, who knew no other way. I was a kid that was born on third and felt like they could hit nothing but homers.</p><p>Thanks to the Covid-19 lockdown I’ve had time to branch out a bit. I recently began learning Elixir and the importance of pattern matching within Elixir. The language is nowhere near as friendly with data analysis as Python. However, it is incredible when building responsive web applications. And, through learning this language I have learned 1 way to solve a problem well as opposed to Python’s method of 4 different ways which will get me there.</p><p>While there are some similarities between the language. It is the differences that have helped me understand Python’s nature and improved the speed at which I am able to solve coding challenges. It seems paradoxical to tell somebody to study something else in order to understand more. But this is a way many people learn and it is the quickest way to gain an understanding. An investor does not need to know everything about a company, they simply need to know what makes a company different than the others. Once you know the differences of a language, you know the aptitudes and this will usually show the best way to solve a problem.</p><p>I hope this has been informative, but since the above was purely anecdotal I’d like to hear what others have to say. Was there a moment in your journey towards learning to code where everything just clicked?</p><p>If you’d like to give elixir a try Udemy is full of great courses and they usually have courses on sale for less than $20. I’d also suggest using Atom as the IDE of choice. As it is easy to work with and customize to fit your needs without requiring a lot of setup. Simply install the themes and packages you need/want as you need them! I was used to using PyCharm before this week, and while I like the way PyCharm manages projects I may not go back after customizing the atom ide and installing Kite.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ded47a14ddd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>