WordPress to Hugo to WordPress to Hugo

I moved all my blogs back to Hugo. I have gone back and forth between Wordpress and Hugo several times. WordPress makes it really easy to write and publish content. On this domain, I was using WordPress as a bookmarking service. With PressThis plugin, I was able to use a bookmarklet and publish a new post from any page on the web. But that plugin has not been updated in a while and it seems with every new WordPress release something would break. A few times, I was able to hack it to keep going. But lately, I cannot keep up with it. I will have to figure out a better way to bookmark but for now, I didn’t want to deal with WordPress. And easy bookmarking was the only reason why I was using WordPress.

My other blogs were on WordPress as it is not a lot of work to host additional blogs on an existing server. But now that I don’t really need WordPress, I didn’t want the additional overhead of maintaining a server. So I migrated all blogs back to Hugo. I will slowly work on updating theme and everything.

New Focus in 2021

Over last few weeks, I have been doing a lot of leet code and learning data science. I will focus this blog on basically what I am learning. Which is basically what my bookmarks were. Now I am thinking maybe once a week, I summarize and post here what I have learned or read in that week.

I am also very impressed with Part-time Larry, and want emulate him. Trading and algorithmic tradings are some of my favorite hobbies, and I have following his tutorials as fun way to learn python and algotrading. The main topics of this blog will be:

  1. LeetCode (JavaScript and Python)
  2. Data Science
  3. Algorithmic Trading
  4. Trading

I want to make it a resource for learning especially for those who don’t like to watch videos.


This column will change your life: just sit down and think | Health & wellbeing | The Guardian

https://www.theguardian.com/lifeandstyle/2014/jul/19/change-your-life-sit-down-and-think


marketstream.io

https://marketstream.io/


All 149 Combined Ark Invest ETF Holdings

Data updated daily

Source: All 149 Combined Ark Invest ETF Holdings


Leetcode #13: Roman to Integers

class Solution {

    private $v = ['M' => 1000, 'D' => 500, 'C' => 100, 'L' => 50, 'X' => 10, 'V' => 5, 'I' => 1];
    /**
     * @param String $s
     * @return Integer
     */
    function romanToInt($s) {
        $n = 0;
        $last = '';
        for ($i=0;$i<strlen($s); $i++) {
            $n += $this->v[$s[$i]];
            if (($s[$i] == 'V' || $s[$i] == 'X') && $last == 'I') { 
                $n = $n - 2;
            } elseif (($s[$i] == 'L' || $s[$i] == 'C') && $last == 'X') {
                $n -= 20;
            } elseif (($s[$i] == 'D' || $s[$i] == 'M') && $last == 'C') {
                $n -= 200;
            }
            $last = $s[$i];
        }
        
        return $n;
    }
}

Hawaii Remote Workers program

https://amp-cnn-com.cdn.ampproject.org/c/s/amp.cnn.com/cnn/2020/12/05/business/hawaii-free-trip-remote-workers-trnd/index.html


Part Time Larry – Learn Algo Trading with Python

Looks like a great channel to get started with algorithmic trading using Python

Source: Part Time Larry


Leetcode 690 Employee Importance Solution

This is my solution in PHP.

/**
* Definition for Employee.
* class Employee {
*     public $id = null;
*     public $importance = null;
*     public $subordinates = array();
*     function __construct($id, $importance, $subordinates) {
*         $this->id = $id;
*         $this->importance = $importance;
*         $this->subordinates = $subordinates;
*     }
* }
*/

class Solution {
/**
 * @param Employee[] $employees
 * @param Integer $id
 * @return Integer
 */

function getImportance($employees, $id) {
  if (empty($employees)) return 0;
  $emap = [];
  foreach ($employees as $e) {
    $emap[$e->id] = $e;
  }

  return $this->recurse($emap, $id);
 }

function recurse($emap, $id) {
  $e = $emap[$id];
  $ans = $e->importance;
  foreach ($e->subordinates as $sub) {
    $ans += $this->recurse($emap, $sub);
  }
  return $ans;
 }
}

My Writing & Coding Workflow | the cedar ledge

http://jacobzelko.com/workflow/

This is awesome. I need to emulate this because I enjoy working in shell more than in gui.


LeetCode 42. Trapping Rain Water