<?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 Alejandro Granados C on Medium]]></title>
        <description><![CDATA[Stories by Alejandro Granados C on Medium]]></description>
        <link>https://medium.com/@alejandro-gc?source=rss-af9d1c010209------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*unJCtEWStozpwhdS4X6_ug.jpeg</url>
            <title>Stories by Alejandro Granados C on Medium</title>
            <link>https://medium.com/@alejandro-gc?source=rss-af9d1c010209------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 18:09:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alejandro-gc/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[What does Spider-Man has in common with (500) Days of Summer?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://alejandro-gc.medium.com/learn-basic-nlp-building-a-movie-recommendation-engine-1d4b3c34cbe5?source=rss-af9d1c010209------2"><img src="https://cdn-images-1.medium.com/max/1984/1*G4AnNO3G34q13tqFqYE92g.png" width="1984"></a></p><p class="medium-feed-snippet">Today we are going to implement a simple movie recommendation system and explore how different tokenizers and feature selections can&#x2026;</p><p class="medium-feed-link"><a href="https://alejandro-gc.medium.com/learn-basic-nlp-building-a-movie-recommendation-engine-1d4b3c34cbe5?source=rss-af9d1c010209------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://alejandro-gc.medium.com/learn-basic-nlp-building-a-movie-recommendation-engine-1d4b3c34cbe5?source=rss-af9d1c010209------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d4b3c34cbe5</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[movies]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Alejandro Granados C]]></dc:creator>
            <pubDate>Mon, 21 Feb 2022 21:50:37 GMT</pubDate>
            <atom:updated>2022-03-05T14:46:59.953Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[A gaming laptop for Data Science and ML?]]></title>
            <link>https://alejandro-gc.medium.com/a-gaming-laptop-for-data-science-and-ml-7a2772ca987c?source=rss-af9d1c010209------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a2772ca987c</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Alejandro Granados C]]></dc:creator>
            <pubDate>Mon, 01 Feb 2021 00:42:17 GMT</pubDate>
            <atom:updated>2021-02-01T02:56:39.434Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UjvlcB2FfhNisfRnhCuMhA.png" /><figcaption>Gaming laptops now include super-powerful GPUs that could be just perfect for Deep Learning and Data Science. Image source: Future</figcaption></figure><p>For a long time, gaming laptops were known for being extravagant, expensive, large, noisy, prone to overheating, and expensive. Crafted for a specific market of consumers that value the video game experience more than reality, these powerful machines had really no other use. However, since the time of the first Alienware laptops, a lot has changed. We now find models such as the <strong>Asus Zephyrus</strong> series, the <strong>Razer 15</strong>, and the not-really-a-gaming-laptop Dell <strong>XPS 15</strong>, all of which actually deliver a lot of power in compact and somehow aesthetic designs. Did I mention they are expensive?</p><p>In a somehow unrelated field, Machine learning has become the standard to model large datasets. From business to academia, ML models are constantly proving to be extremely useful and everyone wants to use them (even if they are not necessary for specific data projects). Therefore, as a Data Scientist, one of the skills you definitely want to have is a good knowledge of Machine Learning methods. One of the most popular implementations for ML and Deep learning is <strong>Tensorflow</strong> along with its high-level wrapper Keras, which is intuitive and user-friendly. Running in both <strong>Python</strong> and <strong>R</strong>, Keras brings the power of Deep Learning to the people. So Data Science is now available for everyone, just read a few <em>Towards Data Science</em> tutorials, watch some YouTube videos of a professor from a university in India and you are ready to go! Wait, you still need a computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ObfLpVfNgUzvtukAXSU3Fg.png" /><figcaption>NVIDIA GPUs are the most common for Deep Learning since the setup for Tensorflow or Pytorch is straightforward. Image: nvidia.com</figcaption></figure><p>So what do Data Science and gaming gave in common? You guessed it right: linear algebra, parallel computations, and usage of Artificial Intelligence. This brings us to the most important component that you want in a laptop these days: a GPU. And not just any GPU but you might want to stick to <strong>Nvidia</strong>. Setting up a GPU for machine learning either in Ubuntu or Windows 10 is just easier with Nvidia as compared to AMD. If you are brave you can try AMD but you might have a hard time finding instructions on how to set up correctly and the community is smaller which means fewer Stack OverFlow posts to the rescue.</p><p>But Alejandro, what about the amazing <strong>MacBook Pro 16 </strong>with the new 9th gen Intel CPU processors and an AMD Graphics car…. Right. If you want a MacBook, the best you will get is an AMD graphics card. Though to be fair, it was about time Apple stepped up their game by adding dedicated graphics to their expensive pro laptops. So this is an important thing you have to consider, as an Apple user it might be hard to get those Deep Learning models to run on your AMD graphics card.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C2a-pBEBi3fbtzHO-ZCWEA.png" /><figcaption>AMD Ryzen CPUs are just killing it. Source: <a href="https://www.cpubenchmark.net/">cpubenchmark.net/</a></figcaption></figure><p>Having said that, a GPU might not be absolutely essential if you don’t work with large (and I mean large) datasets and complex models. A good CPU could in principle do the heavy lifting in a reasonable time. Especially if your gaming laptop has an<strong> AMD Ryzen CPU</strong> like the <strong>Lenovo Legion 5 </strong>or <strong>Asus ROG Zephyrus G14 </strong>(seriously, look at the benchmarks online, the Ryzen is just a beast). The M1 Apple CPUs are doing pretty well on benchmarks as well and could probably get your back when it comes to doing serious data work. On the other hand, the <strong>Dell XPS </strong>is powered by 10th gen Intel CPUs and includes an Nvidia GTX 1650 (which is not up for the task when it comes to serious gaming/Deep Learning but could complement the CPU). Again, think about the work you’ll be doing with this laptop and decide whether you need a GPU at all. However, if you want to do some gaming or video edition besides Data Science, then a GPU is a must.</p><p>A good combination of CPU and RAM memory could in principle do the job, right? RAM memory is usually overlooked when buying a computer. We think: “come on that there is no way I am going to use more than 16GB”. The next thing, you realized that you have 50 tabs of Chrome open, you are playing music on YouTube, training a neural network on Python, and doing some bioinformatics in R, and you have 0% available RAM. Your computer crashes and we all know how this ends. So for Data Science, I would advise getting 32Gb. Really, you never know when you will have to load a massive dataset on your laptop, and you want to be ready for that. Or perhaps multiple Jupyter notebooks, each one with a large dataset in it. Also, Windows 10 is not great at managing your RAM. Ubuntu would do a great job and you could probably be fine with 16GB, but if you want to use Windows 10, consider the upgrade.</p><p>If you are a Data Scientist, you are basically typing for money. Coding efficiently and happily requires entering the zone, which requires not only a great Cercle set playing in the background but also a great typing experience. No one wants a small, inaccurate keyboard with no feeling. So this part is very important: you want to try the keyboard before committing completely to the laptop. As for the screen, you will probably connect an external monitor anyway but, hey, it is always nice to be able to work or play directly on your laptop, when you are away or just want to sit on the couch as opposed to your desk. Gaming laptops usually come with a high refresh rate but not so high resolution (Full HD is the standard). I would say that if you are not a gamer and want the computer mostly for work try to get a higher resolution screen even at the cost of lower refresh rates.</p><p>A minor point that you also want to consider is the design. Bringing a Dell Area 51M R2 to the office (whenever that happens again) and using it to present your data analysis to your colleagues is just not… let’s say appropriate. One thing I don’t like about gaming laptops is their design. I don’t blame the manufacturers, they need to fit a GPU, fans, or maybe a vapor chamber and other multiple components. At the same time, gaming laptop manufactures seem to be obsessed with neon lights and spec-ship-inspired designs. Thus finding a discrete, elegant gaming laptop is probably out of the table. Or is it? Here is where Razer comes in to save the day. The <strong>Razer 15</strong> line provides a great trade-off between power and design, though at a high cost. Consider also the <strong>Asus Zephyrus G15</strong> which has a decent design as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AZkNY6Vz2SQwkWSahjPHTw.png" /><figcaption>My two top picks based on power and design: ASUS ROG Zephyrus G15 starts at $1,199 and the Razer Blade 15 starts at $1,429. Source: laptopvslaptop.com</figcaption></figure><p>Finally, you went for it and you decided to get a gaming laptop. Now what? Can I just work from Windows 10? Do I have to install Ubuntu as a partition? Well, you can actually do either or both. But an efficient way to do serious work from Windows 10 is to install the WSL so you can run Ubuntu from Windows. From Windows, you will have control over your GPU using the apps provided by Nvidia and your laptop manufacturer. So even though you do the partition and install Ubuntu (or any other Linux distro) keeping Windows 10 will bring out the full potential of your new machine. See my post on how to setup WSL2 on Windows 10 for Data Science.</p><h3>Conclusion</h3><p>If you are getting into Machine Learning, Deep learning, and large datasets, you need a powerful computer. While you can always put together a beast on your desktop, some people prefer the portability of a laptop (even if by portability you mean moving your laptop around from your desk to your couch and your bed). Gaming laptops offer serious computational power with a few drawbacks. Probably the main drawback is the price, the Razer 15 Advanced 2020 sells for around $3k, which is insane! The new Asus ROG Zephyrus G15 including an RTX 3080 (!) will cost you around $2,499. However, depending on the configuration, you can get a great gaming laptop for about $1,200. But if you want to invest in a powerful machine that will be able to handle all your Data needs, casual gaming, and creative tasks, consider getting a gaming (or an almost-gaming computer). My top selection (as you probably already know and in no particular order): <strong>Asus Zephyrus G15</strong>, <strong>Lenovo Legion 5</strong>, <strong>Razer 15</strong>, and <strong>Dell XPS 15</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a2772ca987c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bitcoin 2021: rally or crash? Scam or cycle? The 4th wave is here]]></title>
            <link>https://medium.com/coinmonks/bitcoin-2021-rally-or-crash-scam-or-cycle-the-4th-wave-is-here-82f79595e951?source=rss-af9d1c010209------2</link>
            <guid isPermaLink="false">https://medium.com/p/82f79595e951</guid>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Alejandro Granados C]]></dc:creator>
            <pubDate>Fri, 22 Jan 2021 00:00:04 GMT</pubDate>
            <atom:updated>2022-06-25T13:20:27.405Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bitcoin 2021: Scam or cycle? The 4th wave is happening</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U3vhg1guJCXv51NC0RLsNg.jpeg" /><figcaption>A summary of the Bitcoin cycling pattern. <a href="https://masterthecrypto.com/bitcoin-halving/">Source</a></figcaption></figure><p>Bitcoin is back on the news which means that the price is going crazy for months already which means that you are wondering: why is the price of bitcoin going up? I am not going to explain here how bitcoin works, there are already too many videos about that on YouTube. I am going to rather discuss what the current price action means in the context of Bitcoin’s past and possible future.</p><p>But Alejandro, why does Bitcoin have value in the first place if it is just a piece of code, thin air? Well Bitcoin works in the same way as money, in the sense that their value exist only in our imagination! The only reason money works is because we ALL agree that it has value. The day we don’t agree anymore that some pieces of green paper have value, the value will go down. Right?</p><p>Quoting Yuval Noah’s Sapiens</p><blockquote><em>“Money is the most universal and most efficient system of mutual trust ever devised.”</em></blockquote><p>Indeed, money represents a system of trust between you and the government, and between you and other consumers. As long as people trust each other and the Fed, everything is fine. The Aztecs, for example, used cocoa beans as currency! Why? Because chocolate is awesome, that’s why. They did have gold, but who cares about the shiny metal when you have cocoa beans!</p><p>So it does not matter if we are talking about a piece of paper, a piece of metal, cocoa beans or a mathematical abstraction beautifully designed and implemented by Satoshi Nakamoto, at the end of the day it is a system of trust. A system that allows us to exchange goods and services. A Kg of cocoa beans has an equivalent price in USD, gold and BTC as long as we agree on that.</p><p>One of the differences between normal money and bitcoin, however, is that money is green paper and green paper can be fabricated in the magic green paper factory (aka the Fed) whereas bitcoin -because of the way it is designed- has a finite limit! There will ever be only 21 M bitcoins. That’s it, no more, no less. Well actually maybe less since thousands or even millions are thought to be LOST in dead wallets (people that forgot their password, lost their computer or even forgot that they opened a Bitcoin wallet back in 2012 to buy… eh… pizza). So let’s do the math here: If we all want a piece of Bitcoin because we all agree that it has value, AND there is only a finite amount, the price can only go up in the long term. Again, as long as we agree that it has value but so far that seems to be the case.</p><h3>A play in three charts</h3><p>We all have a friend that always says “But Alejandro, bitcoin is a bubble, remember the crash from 2017? Lots of people lost their money. Bitcoin is a scam” That kind of statement is usually informed from the TV or the WSJ where they show and “analyze” charts like this one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UipCG6ADbuI1pDDXI7PUqQ.png" /><figcaption>Bitcoin price history as shown by Google</figcaption></figure><p>This is how Morningstar, Yahoo Finance, Financial Times, Robinhood and many other platforms display the price history of Bitcoin. From this chart, It seems that for many years Bitcoin was doing nothing — presumably because it is a scam — — and only around 2016 people started buying bitcoin out of nowhere for no reason at all. This buying pressure created a bubble that eventually burst at the end of 2017. Time at which people lost 80% of their money. Classic scam. <em>Right</em>. There is something clearly wrong with that narrative. Let’s talk about two basic lessons on data visualization. First, we need to show data that goes back to 2010, when BTC started. Robinhood, Google, yahoo Finance etc. only show the price of Bitcoin from 2015 as if it magically appeared one day with a price of $327.</p><p>Second, and most importantly: The scale of the chart is wrong. Because of the massive rally on 2017, the price history before that is obscured. When we have such extreme values in the data we need to use log scale. When we combine the longer price history with log scaling we get this chart:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1FBjKc4NpGBRfrsEjMRVQ.png" /><figcaption>A Log-scale chart of the price of Bitcoin reveals a cycling pattern. Credit: Cole Garner and @quantadelic</figcaption></figure><p>That looks extremely different. Now it is very clear that the price of bitcoin has been on a constant rally since its inception in 2010. It was trading at $10 around May 2011, it took then 2 years to reached $100 (that’s a 1000% increase in 2 years), and later in 2013 it was trading at $1000 dollars for the first time ever. Moreover, we can clearly see 3 waves when the price touched the upper yellow line, reaching a critical level and crashing later. For example, after the peak of $1000 in 2013, it took almost 3 years for the price to reach that level again (talk about bag holders!). Importantly, even after crashing, the price of Bitcoin was still higher than before the wave started! For all three waves this is true.</p><p>Traders of the Stock market find patters on the price charts and use them as a guide to know when to enter or exit a trade. Some of those patterns are pretty much lines on top of the stock price charts, representing summary statistics of the data, from which traders then make up “rules”. For example: “If the price touches the 50 day moving average, but it is above the 200 day moving average AND the RSI statistic is less than 40: enter the position”. Importantly, these “rules” or strategies (aka <em>technical analysis</em>) do work to some extent precisely because we are all drawing the same lines, and expecting the same patterns! So when the stock price reaches our imaginary lines, we all buy the stock and the price goes up from there. Therefore, patterns on price charts work as self-fulfilling prophecies, because we make them happen.</p><p>When we put Bitcoin on perspective (using the log axis), the 2017 peak and the current rally seem to be part of a consistent pattern that goes all the way to the inception of bitcoin! The yellow lines perfectly fit the price history, and the red lines indicate when Bitcoin breakouts from the previous high. It seems that Bitcoin traders are looking at those lines, because as soon as the price hits critical levels, things happen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o2Eygs594yXEy6OQtXjKxQ.jpeg" /><figcaption>A Bitcoin price chart colored by the time before the next halving. <a href="https://blog.cryptowat.ch/bitcoin-stock-to-flow-stf-indicator-live-cryptowatch/">Source</a></figcaption></figure><p>So why is Bitcoin doing this? Is this a conspiracy from the Illuminati? Is it perhaps Skynet taking control of the global economy? Actually, the pattern seems to correlate with the halving of Bitcoin mining. Every 4 years, the reward for mining new bitcoin is halved, such that miners receive 50% less Bitcoin for every transaction they verify. We can see that the cycles in the price action of Bitcoin correlate with the halving cycles. This means, that the behavior we see is to some extent programmed. People interested on Bitcoin are closely looking to all these variables before deciding when to start buying or selling Bitcoin, thus when the price hits critical levels (either high or low), the prophecies start to self-realize.</p><p>One more thing to consider is that back in 2017 most of the wave was fueled by retail investors like you and me. The interest in bitcoin as shown by Google trends implies that in 2017 a lot of people on the street wanted Bitcoin! However, financial institutions, funds, billionaires, Wall Street, and other members of the “smart money” community were not as interested. This time, however, they are on board. The Banks, Square, PayPal, Wall Street, Cathie Wood, they are bullish on Bitcoin, they were finally convinced, converted!</p><h3>Conclusion</h3><p>So, what does this all mean? The 4th wave of bitcoin price will be fueled by financial institutions, investors, Wall Street, as well as retail investors. If the chart is correct, the target price for the fourth wave is around 100k. Yes, 100k. Is that crazy? No. Yes. I mean, look at the chart! Several people are talking about $100k Bitcoin for a while now. So, do you trust the pattern? Do you believe in decentralized, programmable, instantaneous peer-to-peer monetary transactions that do not depend on a banking account? A middle man? A monthly fee? With no borders? For everyone? Mathematically designed and hack-proof? If so, my friend, you are a bitcoin believer and bitcoin believers buy bitcoin. In 300 years, will the humans of the future look back and think of Bitcoin in the same way we now think of cocoa beans? Possibly… but in the meantime, I’ll drink my chocolate, Aztec style.</p><blockquote>Join Coinmonks<a href="https://t.me/coincodecap"> Telegram Channel</a> and<a href="https://www.youtube.com/c/coinmonks/videos"> Youtube Channel</a> get daily <a href="http://coincodecap.com/">Crypto News</a></blockquote><h4>Also, Read</h4><ul><li><a href="https://medium.com/coinmonks/top-10-crypto-copy-trading-platforms-for-beginners-d0c37c7d698c">Copy Trading</a> | <a href="https://medium.com/coinmonks/crypto-tax-software-ed4b4810e338">Crypto Tax Software</a></li><li><a href="https://coincodecap.com/grid-trading">Grid Trading</a> | <a href="https://medium.com/coinmonks/the-best-cryptocurrency-hardware-wallets-of-2020-e28b1c124069">Crypto Hardware Wallet</a></li><li><a href="http://Top 4 Telegram Channels for Crypto Traders">Crypto Telegram Signals</a> | <a href="https://medium.com/coinmonks/crypto-trading-bot-c2ffce8acb2a">Crypto Trading Bot</a></li><li><a href="https://medium.com/coinmonks/crypto-exchange-dd2f9d6f3769">Best Crypto Exchange</a> | <a href="https://medium.com/coinmonks/bitcoin-exchange-in-india-7f1fe79715c9">Best Crypto Exchange in India</a></li><li><a href="https://medium.com/coinmonks/best-crypto-apis-for-developers-5efe3a597a9f">Best Crypto APIs</a> for Developers</li><li>Best <a href="https://medium.com/coinmonks/top-5-crypto-lending-platforms-in-2020-that-you-need-to-know-a1b675cec3fa">Crypto Lending Platform</a></li><li>An ultimate guide to <a href="https://medium.com/coinmonks/leveraged-token-3f5257808b22">Leveraged Token</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82f79595e951" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coinmonks/bitcoin-2021-rally-or-crash-scam-or-cycle-the-4th-wave-is-here-82f79595e951">Bitcoin 2021: rally or crash? Scam or cycle? The 4th wave is here</a> was originally published in <a href="https://medium.com/coinmonks">Coinmonks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Science Using WSL2 (Seamless Integration of Ubuntu and Windows 10)]]></title>
            <link>https://medium.com/swlh/data-science-using-wsl2-seamless-integration-of-ubuntu-and-windows-10-dbe94cbac2b6?source=rss-af9d1c010209------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbe94cbac2b6</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[windows-10]]></category>
            <dc:creator><![CDATA[Alejandro Granados C]]></dc:creator>
            <pubDate>Thu, 21 Jan 2021 02:59:36 GMT</pubDate>
            <atom:updated>2021-01-22T12:22:04.583Z</atom:updated>
            <content:encoded><![CDATA[<h3>WSL2 for Data Science: Seamless Integration of Ubuntu and Windows 10</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lPn7BVZiPmT_RNpy7TnZtg.png" /><figcaption>Ubuntu 20.04 LTS available on the Microsoft store (that’s right).</figcaption></figure><p>If you are the type of person that buys a PC and the first thing they do is partition the hard drive to install the latest Ubuntu, then this article is for you. In the latest version of Windows 10, Microsoft has integrated WSL2 (Windows subsystem for Linux 2) which enables you to have a full installation of Ubuntu running on Windows using Hyper-V virtual machine technology. <em>Note that your computer must support Hyper-V for WSL2 but not for WSL.</em></p><p>For installation of WSL2 follow <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">this steps</a>. And a more <a href="https://www.sitepoint.com/wsl2/">detailed guide </a>including some tricks.</p><p>After installing WSL2, installing Ubuntu 20.04 LTS is as simple as opening the Microsoft store (yes, Ubuntu is now available on a store as an app) and downloading the latest version. Once installed, you can open the Ubuntu terminal by typing “ubuntu” on the Windows search bar. From the terminal, you are in Linux world: you have git, sudo, ls, cat, apt-get, make, and all those beautiful things that come with Linux. According to Windows:</p><blockquote><em>WSL 2 uses the latest and greatest in virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM). However, WSL 2 is not a traditional VM experience.</em></blockquote><h3>Accessing files</h3><p>From the Windows file explorer you can type</p><pre>\\wsl$\Ubuntu\home\youUbuntuUserName\</pre><p>which will take you to your Ubuntu installation. From Ubuntu, type:</p><pre>cd /mnt/c/Users/yourWindowsUserName/</pre><p>and you will be able to access all your Windows files! It is so easy to access and copy files that you can run GIT on Ubuntu and create repositories from you Windows files without having to install GIT on Windows. You could also create a GIT project on Ubuntu, edit your code on Atom (installed in Windows) and running it on your Windows web browser using RStudio server.</p><h3>Running RStudio server on Ubuntu and Edge</h3><p>I know the words R, Ubuntu and Edge usually don’t come together in a sentence but let me explain. One of the downsides of WSL2 is that it does not have native support for graphics (you can enable graphics using X-server but that’s different story). On the other hand, RStudio server and Jupyter Notebook run on a web browser so what if we run R and python on Ubuntu, but stream the output on Windows using Edge or Chrome? Sounds great.</p><p>First thing would be to install RStudio server in Ubuntu. You want the server version, not the desktop version otherwise you won’t be able to send the output to the web browser. The RStudio team put together a great guide on<a href="https://support.rstudio.com/hc/en-us/articles/360049776974-Using-RStudio-Server-in-Windows-WSL2"> installation</a>.</p><p>Once installed, you can start the server on the Ubuntu terminal:</p><pre>sudo rstudio-server start</pre><p>Open your browser and go to <a href="http://localhost:8787/">http://localhost:8787/</a> Here you can log in using your Ubuntu credentials. RStudio server runs pretty smooth on Edge and Chrome. Here you can see a 3D scatterplot made with Plotly, which works out-of-the-box on Ubuntu, and now on Windows too!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OR0WqMHHGZfm5_H6GbVvdw.png" /><figcaption>RStudio server is running on the Ubuntu terminal but we can see the RStudio GUI using any web browser on Windows.</figcaption></figure><p>Something cool about RStudio server is that it automatically saves your session such that whenever you open RStudio you will start from where you left even if you close Ubuntu or turn off your laptop!</p><h3>Jupyter Notebooks and TensorFlow</h3><p>In principle, we can do exactly the same thing as we did with RStudio Server and run Jupyter from Ubuntu on Edge (or Chrome).</p><pre># Run from Ubuntu WSL2<br>jupyter lab --no-browser </pre><pre># then access the notebook with the address printed in the terminal <br># usually: [&lt;http://localhost:888&gt;](&lt;http://localhost:8889/lab&gt;)8/</pre><p>However, since Anaconda works pretty well on Windows 10, we can run Python directly on Windows 10. Moreover, we can set up our GPU to work with TensorFlow by leveraging the fact that Nvidia drivers work pretty well on Windows already. Check out<a href="https://alejandro-gc.medium.com/setting-up-your-gpu-for-tensorflow-2-4-2021-d98cac79a686"> my article on how to setup TensorFlow with CUDA on Windows 10 </a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XgjlH1thLEZV8Bmpcz_4bQ.png" /><figcaption>Python is running directly on Windows 10 from the anaconda terminal. Jupyter notebook is running on Edge.</figcaption></figure><p>Python 3.8 runs pretty well with TensorFlow 2.4 and CUDA 11.0. So far I haven’t got any problems (usually installing python libraries could be a nightmare because of compatibility issues).</p><h3>Conclusion</h3><p>This is a very brief description of the setup I am currently using. Being a long-time Ubuntu user, I can’t help but thinking that I should just go ahead and install Linux on a drive partition. However, the Windows 10 is overall good: window management is pretty smooth, the search bar is fast and find what you are looking for most of the times, you can install software such as Adobe, PowerPoint, Ableton Live, Think or Swim, Xbox games etc. And most importantly your laptop simply won’t work as well on Linux because not all of the drivers will be available or optimized. This last part is really important is you have a GPU, HD audio, or some nice — and completely unnecessary — lighting in your keyboard (Razer 15 user here). So while I am still thinking of making a partition for Ubuntu, it seems that you can have your Data Science startup kit (GIT, R, Python, TensorFlow) running on the WSL2 while having the benefits of your laptop running on Windows 10.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbe94cbac2b6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/data-science-using-wsl2-seamless-integration-of-ubuntu-and-windows-10-dbe94cbac2b6">Data Science Using WSL2 (Seamless Integration of Ubuntu and Windows 10)</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up your GPU for Tensorflow 2.4 (2021)]]></title>
            <link>https://alejandro-gc.medium.com/setting-up-your-gpu-for-tensorflow-2-4-2021-d98cac79a686?source=rss-af9d1c010209------2</link>
            <guid isPermaLink="false">https://medium.com/p/d98cac79a686</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Alejandro Granados C]]></dc:creator>
            <pubDate>Thu, 21 Jan 2021 00:52:04 GMT</pubDate>
            <atom:updated>2021-01-25T03:26:43.586Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*xVoiwVj99eDr7jA1X3hc3Q.png" /><figcaption>Setting up your GPU with Tensorflow does not have to be a nightmare. Image: nvidia.com</figcaption></figure><p>TensorFlow 2.4 is out now. Which means that you probably won’t update because you are afraid of going through the whole setting your GPU nightmare once again. You are probably using CUDA 10.1 and it just works, so why bother right? Well I have great news for you: <strong>setting up TensorFlow 2.4 on Windows 10</strong> with full CUDA 11.0 support is not that hard. Here I will provide a full guide on how to setup your GPU in no time (unless you are me and takes you 2 days because you could not find a good tutorial).</p><p>First, we need to understand that both CUDA and Tensorflow are dynamic, they update their releases and things might get broken once in a while. That is why is so important, and I can stress this enough, to match the correct version of TF and CUDA (if you stop reading at least take that message home).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xt54rQX3C9FYqnKQq_9GgQ.png" /><figcaption>System requirements from the TensorFlow.org (Jan 2021)</figcaption></figure><p>Based on those specification and previous experiences, I successfully used the following steps:</p><h3>1. Update the NVIDIA drivers to the latest version</h3><p>First things first: use your GPU to its full potential and update the drivers. For this tutorial I am using a Razer 15 Advanced with RTX 2080 Super Max Q. For updating to the most recent version, just go to the NVIDIA website and look for the latest drivers for your GPU. Restart your computer afterwards (please just restart as much as possible, because you know, Windows).</p><h3>2. Install the CUDA toolkit</h3><p>After updating the NVIDIA drivers we can install the CUDA toolkit which includes multiple libraries that tensorflow requires on loading. The most common error when trying to run TensorFlow with GPU is a complaint that CUDA .dll files could not be found. The Nvidia experience app gives you the latest version for your GPU card or just can just download manually from the drivers website.</p><p><strong>Important</strong>: For TensorFlow 2.4 you must download CUDA 11.0 (not 11.1 or 11.2, just don’t).</p><h4>2.2 Download cuDNN 8.0.4 for CUDA 11.0</h4><p><strong>cuDNN 8.0.4 works with TF 2.4 and CUDA 11.0</strong> (aka as the killer combo).</p><p>Since cuDNN does not really require installation, you have two options:</p><ol><li>Add the cuDNN to the Windows PATH (recommended)</li><li>Copy the cuDNN files to the corresponding folders in the CUDA 11.0 installation folder.</li></ol><h4>2.4 Add CUDA 11 to the Windows path</h4><p>To be on the safe side let’s add all environment variables to the Windows path.</p><p>Here we assume that you copied the contents of cuDNN to C:\tools\cuda</p><pre>SET PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\bin;%PATH%</pre><pre>SET PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\extras\\CUPTI\\lib64;%PATH%</pre><pre>SET PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\include;%PATH%</pre><pre>SET PATH=C:\\tools\\cuda\\bin;%PATH%</pre><h3>3. Install Tensorflow 2.4 with Anaconda</h3><p>Finally, we can get to business. Anaconda is probably the best way for using python in Windows. So let’s install Anaconda (or miniconda if you are resource limited). After installing, open the Anaconda terminal and create a new environment:</p><pre># check your python version! <br>conda create -c conda-forge python=3.8.5 -n tf</pre><pre>conda activate tf</pre><p>Create a new environment and install TF</p><pre>pip install tensorflow <br># will automatically install TF 2.4</pre><p>Open python on the Anaconda terminal and run:</p><pre>import tensorflow as tf <br>print(tf.reduce_sum(tf.random.normal([1000,1000])))</pre><p>The output should tell you that all libraries were loaded successfully!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xS-WgnxmCuT_khs2Jx96Vg.png" /></figure><p>And that’s that! Now you can go and train some beautiful deep learning models using your NVIDIA GPU.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d98cac79a686" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>