<?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 Darren He on Medium]]></title>
        <description><![CDATA[Stories by Darren He on Medium]]></description>
        <link>https://medium.com/@darren-he?source=rss-ece101de4154------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*13NWNO4X1k5YuGzT.</url>
            <title>Stories by Darren He on Medium</title>
            <link>https://medium.com/@darren-he?source=rss-ece101de4154------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 11:01:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@darren-he/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[Making a Weightlifting Timer]]></title>
            <link>https://darren-he.medium.com/making-a-weightlifting-timer-5ce7267256e8?source=rss-ece101de4154------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ce7267256e8</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[time]]></category>
            <category><![CDATA[weightlifting]]></category>
            <category><![CDATA[diy]]></category>
            <category><![CDATA[cheap]]></category>
            <dc:creator><![CDATA[Darren He]]></dc:creator>
            <pubDate>Mon, 01 Feb 2021 04:10:16 GMT</pubDate>
            <atom:updated>2021-02-01T05:19:09.839Z</atom:updated>
            <content:encoded><![CDATA[<p>Part 1: Simple Timer Script in Python Notebook</p><h3><strong>The Bullet Point Summary for Consultants:</strong></h3><ol><li>Saw a bunch of fitness ads, including expensive timers</li><li>These timers are nice, but don’t meet my needs</li><li>I’ll build my own timer, starting with a simple proof-of-concept</li></ol><p>If you’ve made it this far in the article, congratulations! Now stay tuned for the long version.</p><h3><strong>Background / Inspiration / Disappointment</strong></h3><p>Lately my social feeds have been flooded with advertisements for fitness equipment, no doubt from my browsing habits. Retailers have been hawking everything, from traditional equipment and apparel to nutrition and niche products.</p><p>Just a few examples:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*nHfZwFTfFQRA6EpLvgo82g.png" /><figcaption>Sample Fitness Ads. Not an endorsement, though those boots look cool.</figcaption></figure><p>I would love to own a full set of kettlebells, get my meals in boxes, and lie around on the floor wearing giant recovery boots. Unfortunately, I’ve already done my share of stimulating the economy by purchasing my home gym equipment early in the pandemic, when prices went through the roof.</p><p>That is, until I saw this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ps4fbxykhiN0CJjYa70RpA.png" /><figcaption>Not compatible with voice assistants.</figcaption></figure><p>Yes, that is a $300 alarm clock. Titan Fitness, which tends to have similar but cheaper products than Rogue, still charges $200 for theirs.</p><p>What makes these alarm clocks special?</p><ul><li><strong>Special Niche</strong>: They are meant for high intensity interval workouts, namely CrossFit. This means that they have <strong>special settings</strong> for <strong>special torture</strong>: periods of intense exertion followed by extremely short rest periods, repeated endlessly. They are large, meant to be visible across an entire gym. For meeting the exact list of CrossFit training requirements, there’s nothing better out there.</li></ul><p>There’s only one problem — I don’t do CrossFit. My strength training focuses on the major barbell lifts, and my conditioning consists of stationary bike and weight-vest hill walks.</p><h3>My Timer Requirements</h3><p>For strength training, my typical workout involves:</p><ul><li><strong>Heavy:</strong> 1 or 2 major barbell compound lifts for the day (squat, deadlift, bench press, overhead press)</li><li><strong>Volume:</strong> Lower weight, higher repetition sets of the major compound lifts, or variations of them</li><li><strong>Isolation/Accessory</strong>: A mix of exercises using dumbbells, bodyweight, barbell, and/or weight vest. May include isolateral exercises.</li></ul><p>As a result, my timer requirements are much simpler:</p><ol><li>Countdown a rest period, usually between 30 seconds to 3 minutes.</li><li>Repeat on-demand. The lifting period is not timed.</li></ol><h3>Making a Timer in Python Notebook</h3><p>A hardware timer is nice, but it’s easier and cheaper to start out with some software. And the easiest way to code a timer is to write a few lines of code in Jupyter Notebook.</p><p>In the world of programming, this would qualify as a something you teach to your elementary school STEM class as an introductory homework assignment. In my defense, I wrote it while lifting weights.</p><h4>Importing basic dependencies.</h4><pre>import time<br>from IPython.display import clear_output</pre><ul><li>The <em>time </em>library is self-evident: it provides basic time-related functions.</li><li>iPython is the organization that produces <a href="https://jupyter.org/about">Jupyter Notebook</a>. I’m importing the clear_output function so I can display a time counter within the notebook. By clearing the output, I can make it look like the timer is counting in place every second.</li></ul><h4>Function to count time.</h4><pre>def run_timer(seconds):<br>    start=time.monotonic()</pre><pre>    try:<br>        end=start+seconds<br>    except:<br>        end=start</pre><pre>    while end&gt;time.monotonic():<br>        print(&quot;Remaining:&quot;,round(end-time.monotonic()),<br>              &quot; Elapsed:&quot;,round(time.monotonic()-start))<br>        time.sleep(1)<br>        clear_output(wait=True)</pre><pre>    print(&quot;Time&#39;s Up!&quot;)</pre><p>This function:</p><ul><li>Takes <em>seconds </em>as an input variable.</li><li>Sets current time as <em>start</em> using time.monotonic().</li><li>Sets the target end time as <em>end</em> by adding <em>seconds </em>to <em>end</em>. I have a basic error-handling try/except block, which is fine for this first version of the timer.</li><li>A while loop that displays the time remaining and time elapsed every second until time is up.</li><li>Output <em>“Time’s Up!”</em> when the timer is up.</li></ul><h4>Add forgotten dependencies.</h4><p>Never believe a developer who tells you he imports all his dependencies correctly the first time around. I realized that I forgot a very important feature: a noise at the end of the time!</p><p>First, finding an appropriate sound to indicate the end of a rest period, and the start of new weightlifting set.</p><p>This one seems appropriate: <a href="https://www.soundjay.com/misc/sounds/bulb-horn-02.mp3">bulb-horn-02.wav</a></p><p>Additional dependencies, and updated run_timer() function:</p><pre>from IPython.display import Audio<br>sound_file = &#39;bulb-horn-02.wav&#39;</pre><pre>def run_timer(seconds):<br>    start=time.monotonic()<br>    try:<br>        end=start+seconds<br>    except:<br>        end=start<br>    while end&gt;time.monotonic():<br>        print(&quot;Remaining:&quot;,round(end-time.monotonic()),<br>              &quot; Elapsed:&quot;,round(time.monotonic()-start))<br>        time.sleep(1)<br>        clear_output(wait=True)<br>    display(Audio(sound_file, autoplay=True))<br>    print(&quot;Time&#39;s Up!&quot;)</pre><h4>Create function to gather user input.</h4><p>Next, a function to request an input from the user, which is the timer duration.</p><pre>def get_request():<br>    try:<br>        x = float(input(&quot;How Long? &quot;))<br>    except:<br>        print(&quot;Invalid Input&quot;)<br>        return None<br>    if x&gt;1000:<br>        print(&quot;Invalid Input&quot;)<br>        return None<br>    elif x&lt;=0:<br>        print(&quot;Invalid Input&quot;)<br>        return None<br>    elif x&gt;15:<br>        return(x)<br>    elif x&lt;=15 and x&gt;0:<br>        return(x*60)<br>    else:<br>        return None</pre><p>I’m keeping it simple here, with some rudimentary error-handling. I want to be able to input just a single number, instead of indicating “seconds” or “minutes”, so any input over 15 is assumed to be seconds, and any input less than or equal to 15 is assumed to be minutes. Realistically, the longest rest period between sets that I would have is about 5 minutes after my heaviest top set for the day.</p><h4>Putting it all together. Ta-dah!</h4><pre>run_timer(get_request())</pre><p>The get_request() function collects the input from the user, and parses it appropriately into seconds, and puts it into the run_timer() function. The run_timer() function counts down the seconds and then honks.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fselfreliantimmediatebarasinga&amp;display_name=Gfycat&amp;url=https%3A%2F%2Fgfycat.com%2Fselfreliantimmediatebarasinga-screenshot-python-timer&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FSelfreliantImmediateBarasinga-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="548" height="316" frameborder="0" scrolling="no"><a href="https://medium.com/media/79b22d48c6c46786aaf3832ee6fcdb49/href">https://medium.com/media/79b22d48c6c46786aaf3832ee6fcdb49/href</a></iframe><p>There we go! A simple timer in Jupyter notebook.</p><h4>Why time.monotonic()?</h4><p>There’s numerous options for counting time, including other modules besides the <em>time </em>library. Within the <em>time </em>library, there are:</p><ul><li>time.monotonic()</li><li>time.perf_counter()</li><li>time.process_time()</li><li>time.time()</li></ul><p>Nat Dunn has listed out the differences and the relative performance of each in a basic time test in his blog post <a href="https://www.webucator.com/blog/2015/08/python-clocks-explained/">here</a>, so I’ll spare you a rehash.</p><p>Basically, I’ve used monotonic() because a gym timer doesn’t need very high time resolution (fractions of a second). A lower time resolution gives monotonic() slightly better performance. But practically speaking, any of the options above would work just fine.</p><h4>What’s next?</h4><p>I’d love to do a few more things in the near term:</p><ol><li>Build this as a web app so I can click buttons on a screen to start my timer instead of executing a notebook line. This would allow for more interactive features, which is not worth building in Jupyter notebook. There are ways to get it to work in Jupyter, but notebooks are not really designed for a lot of interactivity.</li><li>Deploy the web app on the web.</li><li>Build a hardware timer!?</li></ol><h4>What does my Jupyter notebook look like?</h4><p>Nothing fancy. You can also use <a href="https://colab.research.google.com/">Google Colab</a> instead of installing Jupyter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l1Bi9_UyKYZpVDw-pMXxSA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ce7267256e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Big Data, Big Risks, Big Opportunities]]></title>
            <link>https://medium.com/excardo/big-data-big-risks-big-opportunities-7dd82b7abdc0?source=rss-ece101de4154------2</link>
            <guid isPermaLink="false">https://medium.com/p/7dd82b7abdc0</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[risk-management]]></category>
            <category><![CDATA[service-operations]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[healthcare]]></category>
            <dc:creator><![CDATA[Darren He]]></dc:creator>
            <pubDate>Mon, 06 Nov 2017 02:39:04 GMT</pubDate>
            <atom:updated>2017-11-06T02:39:04.549Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rbce4MDFWqzBsMgI.jpg" /></figure><p>Big Data is an area of data analytics and research that is increasingly popular. Big Data has been used to predict the spread of disease with greater accuracy, forecast weather patterns in fine detail, identify false Medicaid claims, optimize trading algorithms, and much more. Countless Big Data startups are in the news, and Crunchbase lists nearly 4,000 companies under the category “Big Data”, ranging from software companies to venture capital firms to accounting firms and more. Despite Gartner dropping Big Data from its “Hype Cycle for Emerging Technologies,” it’s clear that Big Data is here to stay, and that more and more companies of all sizes and from all industries are looking to Big Data for insights and competitive advantages. Big Data has huge potential for increasing our understanding of complex issues, but there are key strategic and security pitfalls that companies need to carefully manage.</p><h3>What Exactly is Big Data?</h3><p>Big Data refers to large, complex datasets. Today it is often used to describe data that:</p><ul><li>Is significant in Volume (terabytes), has Variety (different types), and is high Velocity (generated in real-time);</li></ul><p><strong><em>or,</em></strong></p><ul><li>Is technically not “big” enough to be called big data, but reflects an organization’s desire for greater, faster, and more efficient decision-making and insights.</li></ul><p>Regardless of the technicalities, Big Data is having a big impact on organizational effectiveness, efficiency, and insights into consumer behavior, supply chain and logistics, financial markets, and more.</p><h3>Examples of Big Data Analytical Techniques</h3><p>In the International Journal for Information Management, Gandomi and Haider provide commonly used methods of data analysis in Big Data [<a href="http://ac.els-cdn.com/S0268401214001066/1-s2.0-S0268401214001066-main.pdf?_tid=035654c4-5ce8-11e7-a4f7-00000aab0f01&amp;acdnat=1498753901_7c1768a65a351d74a2fba149a462b624">PDF</a>], summarized in the table below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oa2i0j5kRN81KC0UVmIoNA.png" /><figcaption>Examples of Big Data Analytical Techniques [<a href="http://ac.els-cdn.com/S0268401214001066/1-s2.0-S0268401214001066-main.pdf?_tid=035654c4-5ce8-11e7-a4f7-00000aab0f01&amp;acdnat=1498753901_7c1768a65a351d74a2fba149a462b624">Gandomi and Haider</a>]</figcaption></figure><h3>Simplified Sample Scenario — Insurance Company Customer Service Call</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/0*yIEw_yV2y6NswX2F.png" /></figure><p>In this simplified scenario, a customer service agent is on the phone with a current customer, say, to renew her auto insurance policy. There are multiple potential touchpoints for big data analytical applications:</p><ul><li>Speech analytics using a tool like <a href="https://vokaturi.com/">Vokaturi </a>to detect customer emotions, and then provide live guidance to the customer service agent (e.g., phrases to defuse situation if customer is upset).</li><li>Text analytics using a tool like <a href="https://www.ibm.com/watson/services/natural-language-understanding/">IBM Watson</a> to identify key concepts in the transcribed speech, and then provide live guidance (e.g., the customer mentioned “boat,” the system can ask the agent to inquire if she needs boat insurance).</li><li>Predictive analytics for management reporting and decision making (e.g., likelihood of hitting specific sales targets, best prospects to pursue, etc.).</li></ul><h3>Simplified Big Data Opportunity Example — Point-of-Care Intervention Opportunities</h3><p>Similarly, the insights drawn from big data provide significant opportunities to improve healthcare outcomes, increasingly at the point-of-care, as shown in four simplified examples here.</p><p>Additionally, solutions like <a href="https://www.sas.com/en_us/industry/health-insurance.html">SAS</a> can help with fraud prevention and risk adjustment. Other analytics providers, such as <a href="http://www.nice.com/protecting/what-we-do">NICE Systems</a>, can even help with ensuring broader population well-being with public safety solutions based on audio analytics and more. IBM’s <a href="https://www.ibm.com/watson/health/">Watson Health</a> initiative spans numerous related technology disciplines including A.I. and machine learning, but at its core relies on Big Data as the source of its insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/0*st755yst9L9uAtOs.png" /></figure><h3>Big Data Technology Landscape</h3><p>The Big Data landscape is diverse and fragmented, with companies providing a variety of related services:</p><ul><li>Infrastructure</li><li>Analytics</li><li>User Applications</li><li>Data Sources and Interfaces</li></ul><p>Many of the larger companies, such as SAS, Oracle, IBM, Microsoft, Google, and Amazon, are seeking to build a comprehensive ecosystem of data, analytics, machine learning, and business intelligence products.</p><p>Matt Turck from Firstmark provides a large overview of the industry players by category, shown here. [<a href="http://mattturck.com/wp-content/uploads/2017/05/Matt-Turck-FirstMark-2017-Big-Data-Landscape.png">PNG</a>]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wYSgp52y9DwKbdGv.png" /><figcaption><strong>Disclaimer:</strong> Diagram may be illegible, but is meant to illustrate the complexity of the Big Data landscape, not to point to specific solution providers.</figcaption></figure><p>The companies featured in Turck’s diagram span the spectrum of early-stage and mature companies, both in their overall company existence as well as their development of Big Data solutions and services. Others, such as Knowre in the Education Application space, are on the fringes of Big Data, focusing more on machine learning algorithms with smaller data sets.</p><h3>Big Risks?</h3><p>The risks of Big Data are manifold, and organizations need to carefully plan for their use of Big Data solutions. These risks include strategic and business risks, such as operational impacts and cost overruns, as well as technical risks, such as data quality and security. Six of the key risks are highlighted in the table below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*7dbR-hX8fmLGKr-XgG8ZEQ.png" /><figcaption>Six Key Risks in Big Data Implementation</figcaption></figure><p>These risks can apply to just about any Big Data project, and are not intended to be comprehensive. Depending on the specific industry, purpose, or niche, there may be additional considerations to ensure that Big Data solutions positively impact an organization. Fortunately, a growing body of knowledge and expertise exists that can help to ensure successful projects and investments.</p><h3>The Importance of Project Execution in Big Data</h3><p>The title of this section seems fundamentally contradictory: Big Data is an exciting and young field of interest, especially for enterprise applications, while Project Management is the mundane province of Gantt charts and issue trackers. However, Big Data implementations and data analytics capabilities must fit into the overall organizational strategy, business processes, and business constraints.</p><p>With a strong focus on program governance, data governance, and effective project management, Big Data projects can become integrated into the overall business, rather than silos. As with any project, there are several core components of project management required for success:</p><ul><li>Program/Project Governance</li><li>Scope Management</li><li>Schedule Management</li><li>Budget Management</li><li>Risk Management</li><li>Issue Management</li><li>Decision and Change Management</li><li>Data Governance and Management</li><li>Quality Management</li><li>Communications Planning</li><li>Other, as required for the project (e.g., Procurement, Organizational Change Management, etc.)</li></ul><p>More information about can be found in Excardo’s feature articles about Project Management (<a href="http://excardo.com/">excardo.com</a>).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7dd82b7abdc0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/excardo/big-data-big-risks-big-opportunities-7dd82b7abdc0">Big Data, Big Risks, Big Opportunities</a> was originally published in <a href="https://medium.com/excardo">excardo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>