toy story

October 11, 2019

“Toy Problems” are puzzles or illustrative devices.  they can be useful in discussing features supported by programming languages. it’s a bit of “mental gymnastics” or what can be oxymoronically  referred to as “recreational math”.

i started with something simple called a palindrome:  a word spelled the same backwards as forwards.  However, i extended it to detect “palindromic” strings instead: that is, it should also check multiple words, phrases, or sentences (that exclude a period or full stop).

Here’s the updated GitHub repository:

https://github.com/LinsAbadia/Python/tree/master/Problems/Toy

Advertisements

i couldn’t really think of a blog post title for tuples – so i “lazily” fell back on something from my AD&D days.

But if you want to get an overview of its etymology, you can visit this link:

https://en.m.wikipedia.org/wiki/Tuple

Here’s my updated Python repository on GitHub:

https://github.com/LinsAbadia/Python/tree/master/DataStructures

 

true blue

September 20, 2019

as a computing student. i blindly accepted the term Boolean in programming.  Just in case you’re also curious, i’ve included where it was derived. Here’s the updated Python repository:

shttps://github.com/LinsAbadia/Python/tree/master/DataStructures

I originally thought of doing both a presentation and blog post but due to time pressures opted for the latter. Here’s a concise version of what I ended up doing…

I’ve used a “structured” approach to impart more formality but being a blog post I decided to make it more “medium-friendly”.  =)

A.  Introduction

A.1 Description and Background

Since New York city had over 60 million visitors last year alone, it may be useful to recommend hotels based on their physical proximity to major attractions (such as Central Park – not Central Perk of Friends fame) or what I called Places of Interest (or POI for short)using the Haversine formula – it’s a technical way of measuring distance between points using Latitude & Longitude (I won’ bore you with the details as it uses a lot of Trigonometric functions).   Essentially, it was envisioned to help plan your trip to the Big Apple.

A.2 Data

It used “free” data to determine which hotels are in which neighbourhoods and in which boroughs (so I used an API called FourSquare to get some of the place information).  Unsurprisingly, the major hotels were clustered in and most POI were located in Manhattan.

B. Methodology

I used clustering to segment my data (thankfully, the hard bits are already implemented). Freakishly, the cluster of neighbourhoods corresponded to the NYC boroughs (you know somebody worked it out).  This was confirmed visually (after all, seeing is believing) by something called a Folium map (see below).

This is one of the “cool” tools available at your disposal.  This is not, in and of itself, conclusive proof but you can “go down a deep rabbit hole” of data to assert your claim.  This is, by no means, the only “weapon” available to you but it sure is pretty.

C. Results

Unremarkably, the data merely confirmed what we’ve always known:  hotels are near one another and sites are chosen for their proximity to popular landmarks and sought after amenities – it’s so obvious, duh.

D. Discussion

It’s not always about generating new insights.  It’s sometimes about “empirical”  confirmation of things we just take for granted as true.

E. Conclusion

I can talk until I’m blue in the face but you’ll probably pay me no mind and tune out (if you haven’t already). In short you can use Data Science (and its associated tools) can be powerful in uncovering secrets.

If you’d like to read a more detailed and “serious” document, the full  report can be dowloaded at

https://github.com/LinsAbadia/corsera/blob/master/ADSC_Report.pdf

If code is more your thing, a Jupyter notebook in Python can be obtained from:

https://github.com/LinsAbadia/corsera/blob/master/ADSC_Finalv7.ipynb

If you’re generally more interested in GitHub (and open source computing), you can go to the following address:

https://github.com/

This has mainly been about content but, in my experience, context can be just as, if not more, important – that’s how you should think about Data Science!

revengers

November 19, 2017

sorry, I couldn’t help myself.

Saw Thor: Ragnarok yesterday with my family and my son’s friend.  I liked it.   This wasn’t surprising given I’m such a fanboy of comic books (growing up I read a lot of Marvel and DC) and I enjoy the films of the New Zealand director, Taika Waititi.  Had to ask my wife given my bias if it was really good. Thankfully she agreed.

Like any superhero flick there was action and single-line quips but I found the humour quite refreshing.  Seeing as I found the movie franchise disappointing before this latest instalment, I didn’t have high hopes for this one.  It was inspired, if unexpected, to have the Kiwi direct it.

While the first feature was an amalgam with a love story and the second one tried desperately to be serious, I think the fusion with comedy really worked.  I knew that Chris Hemsworth was funny (maybe it’s the Aussie larikinism) but didn’t realise he had great comedic timing.  But for me, what I really enjoyed was the character of Korg voiced by the director – it was cue to not take the movie so seriously.  Sure it wasn’t the best film I ever saw (but it wasn’t trying to be) and it may not ‘pass’ certain tests or criteria.  It was simply and purely a popcorn film – a damn good one in my opinion.  When you watch  a film, it goes down to intent – sometimes you just want to entertained or distracted. It is what it is – one shouldn’t have to serious all the time.

almost famous

November 13, 2017

the other night I saw the 2015 dramatic film: “The End of the Tour” on SBS.  I wasn’t sure I was going to like it – it was essentially a conversation and given it’s difficult as medium skews heavily toward being visual- but I really enjoyed it.  It was an interview over several days by David Lipsky representing Rolling Stone magazine about the critically-acclaimed author David Foster Wallace (I must confess whose name I hadn’t heard before).

I found that actors cast, Jason Segel (for Wallace) and Jesse Eisenberg (for Lipsky) were well-thought choices.  They were both “smart” enough that neither performance seemed “wooden” (suffice it to say it wasn’t an enormous stretch to suspend disbelief).   This can be “tricky” given it was a mainly dialogue-driven plot.

Aside from the words, I think what drew me in was the shared “addiction” of watching too much television.  Moreover, I can relate to wanting a job where not too much thinking is required (as a respite of sorts) – it reminded me of a friend that once said that a “mindless” task was a welcome break for her from her usual job.  Furthermore, I liked that within it was featured an action movie that didn’t require a whole lot of mental horsepower to enjoy (to what I viewed as juxtaposition when the characters watched a black-and-white film on tv).

I found the scene meaningful when the proponents couldn’t find where they parked their rental car in the airport.  This just illustrates how there are different kinds of smarts and how book-smarts is not always preferable in accomplishing certain everyday tasks.  As the adage goes:  Common Sense is not that common.  This is a moment of levity that cuts the seriousness of an otherwise dry account.

I enjoyed the line:  “Nice but not real.” How some situations are artificial – one doesn’t have to look far for the often fabricated constructs of reality tv.  Don’t get me wrong; I’m not hating on the entire genre but, like all “entertainment”, some shows are more “watchable” given the individual’s purpose.

I’m now curios about Wallace’s opus of a novel:  Infinite Jest and Lipsky’s best-selling memoir: Although Of Course You End Up Becoming Yourself. Hopefully, I’ll eventually have time to read them.

heart and mind

October 24, 2017

saw an exhibit of an artist friend of mine who did a Ph.D.  My wife and I met her at the Adelaide Convention Centre – it’s been a couple of years since we last caught up but it feels like it was just yesterday that we met.

she said something of interest to me: the colour yellow sometimes indicates psychotic disturbance –   I had a feature wall at our home painted that hue.  I shared that when the lines on both palms (often referred to as the heart and head lines) align it is said that (I’m of course paraphrasing) that you’re either a genius or crazy – both of us share this rare trait while most of the populations’ lines do not meet.  It might be a case of self-aggrandisement but I subscribe to that belief.

That said, why can’t it be two sides of the same coin?  The traditional notion is either-or, binary thinking. Surely, the interstitial side (often with the grooves) is more interesting.

My upbringing and training often focused on the ‘how’ but psychology  and art has led me to believe the ‘why’ is just as important.