Todo: Self Host Blog

At some point, I really hope to migrate this blog from WordPress to a fully self hosted, designed and written implementation of this humble blog. My ambition to accomplish this is probably just a manifestation of my OCD and desire to have more control over the content and how it’s presented.

If you’ve ever done this, I would love to hear about the process and method by which you ultimately did it. I have thought about using a static site hosted on S3 or some of the Django packages for CMS / blog hosting, but have so far failed to settle on either.

The front end is often something I shy away from, but I’m hoping when I eventually take on this project, it will hit a critical mass and allow me to break out of my hesitation and into continued progress as a developer.

Ordinary Data Structures: Python3’s deque to Store Recent Emojis

Recent Emojis

if the implementation is simply the most recently used 30 emojis, then some sort of ordered iterable array-like structure would be best suited to the problem. Since 0 index insertions are an important requirement, Python’s built in deque data structure would be a good candidate to use here.

deque is found in the collections library and accepts an array-like input of values along with an optional keyword argument named maxlen which specifies the maximum length of the data structure. This last part is ideal for this application, as Apple’s implementation limits the recently used emojis to 30.

from collections import deque

recent_emojis = deque([], maxlen=30)

def update_recent_emojis(emoji_used, recent_emojis : deque):
    if emoji_used in recent_emojis:
        recent_emojis.remove(emoji_used)

    recent_emojis.appendleft(emoji_used)
    return recent_emojis


Summarize Text Feature High Sierra OSX

Usually I disdain doing the Software Updates on my Mac / iPhone (although, the experience is far better than the process on Windows), but after updating to High Sierra 10.13.4, I was really impressed with a niche new feature: text selection summary.

Here’s a quick walkthrough of where to find it and how to use it:

  1. Select multiple sentences / paragraphs of text (from a website, a document, email, etc). Then right click and enter the submenu for “Services” at the bottom.

Screen Shot 2018-05-24 at 10.16.36 AM.png

2. After selecting “Summarize”, a program called “Summary Service” will pop up in a new window. When it first pops up, it will show the entire selection, but you can toggle the controls below.

Screen Shot 2018-05-24 at 10.29.09 AM.png

3. Summary Size slider

 

Screen Shot 2018-05-24 at 10.51.25 AM.png

Now if only Apple would release a text expand slider so that students can make it to the word count on their essays.

Falcon Heavy Launch

Last week I went to the Falcon Heavy Demo Flight at the Kennedy Space Center in Cape Canaveral, Florida, (USA Earth for future / Mars settled readers). Elon Musk launched his cherry red Tesla Roadster to Mars orbit. It was the most inspirational and incredible thing that I’ve ever witnessed.

I made a conscious decision to be “in the moment” (as prescribed to the crowd by the ever-wise, Bill Nye The Science Guy), so as an unfortunate side effect I do not have very many original photos of the experience. In fact, here is one of the only relevant photos that I have which was taken after most of the significant events had occurred. My heart was racing and nothing could eclipse the triumph felt by me and everyone else in attendance. IMG_9689.jpg

 

Below are some impressive photos (all sourced from SpaceX’s flicker account).

Here is a really cool animation of the demo flight.

Here is another really cool video taken of the boosters landing:

First Post

This is the first blog post I have written. I plan to document some of the new languages / frameworks / methodologies that I learn through work and elsewhere. Currently, I am a software developer at Huguenot Fuels where I work primarily in Python / Django. My role also involves designing, configuring, deploying and maintaining resources on AWS as well as Heroku. I do a lot of ETL workloads along with data analysis / reporting via pandas / numpy / bokeh. I’m working to learn more Javascript, particularly AngularJS (to consume and build upon the Django REST API I’ve built. I also have general interests in automation, space exploration, arbitrage and natural language processing. Checkout my Github or follow me on Twitter to learn more!

 

–  Graham

2018-01-26