Technical

Essential setup steps to use React-Leaflet

Using Leaflet in a React project, especially a create-react-app project can be tricky. In a React app, the UI are composed by components. Each component encapsulate some logic and states to itself. This is different from traditional ways of writing HTML + CSS + JavaScript. This is why many traditional JS libraries like Bootstrap and Semantic-UI have React-specific counterparts (React-Bootstrap and Semantic-UI React) to allow using them in the React way.

Git Setup for Hugo Blog With Github Pages

This is a short tutorial on how to use Git to manage Hugo blog contents, themes, and generated static files that will be hosted on GitHub Pages. Initialize the Blog and the GitHub repo First, you need to initialize a Hugo blog, and enter the site folder: hugo new site <sitename> cd <sitename> This creates an empty site with name sitename, the site has a structure like this: Then you initialize a local Git repository in this folder with:

Resources to make a fancy GitHub README profile

GitHub is a wonderful place for developers to showcase their projects and works. It is also a mythical place where a lot of secret techniques can be utilized, combined to make it more useful. GitHub pages As many of you know, GitHub has a GitHub Pages function that a user can use to create their user or organization sites conveniently. Basically, you just need to put source codes in a repo named username.

Combine MODIS Terra and Aqua Products on GEE

The Moderate Resolution Imaging Spectroradiometer (MODIS) has been providing high temporal resolution images since the first launch of Terra satellite in 1999 followed by the Aqua satellite in 2002. The Terra satellite passes from north to south in the morning at around 10:30 a.m. local time. The Aqua satellite passes from south to north in the afternoon at around 1:30 p.m. Since MODIS has a revisiting time of one or two days, for any given day, there are most likely be images from both Terra and Aqua satellites.

Install and Troubleshoot Docker Toolbox on Windows 10 Home

As the Docker for Windows only works on Windows 10 Pro and Enterprise editions, I cannot install it on my laptop which comes with a pre-installed Windows 10 Home. Fortunately, Docker has another product called Docker toolbox. It is specifically released for legacy desktop operating system versions. (Somehow windows 10 home is considered as legacy…) However, there are some caveats during the installation and configuration of the Docker toolbox on my laptop, so here are the problems and solutions I found useful:

Solve LunarLander-v2 with Deep Q-learning

the LL environ- ment is a simulated environment where the agent needs to successfully and safely land the aircraft in the designated area. The lunar lander has 4 discrete actions, do nothing, fire the left orientation engine, fire the main engine, and fire the right orientation engine. The states of the lander are represented as 8-dimensional vectors: (x, y, vx, vy, θ, vθ, lef tleg, rightleg), x and y are the x and y-coordinates of the lunar lander’s position on the screen.

Memory Ownership in C Explained

The memory ownership problem or pointer ownership problem is a problem generally seen in C and C++ programs. The problem is generally violating a simple assumption that there should be only one pointer to a given piece of memory, so that when the memory is freed, no other pointers will point to an address that has already been freed. For example, you have a main function, in which a pointer gfcontext_t *ctx to a struct gfcontext_t is created.

'Undefined Symbol: PySlice_Unpack' error in Pytorch

Problem: ‘Undefined Symbol: PySlice_Unpack’ Environment: Pytorch = 1.0.1 Python = 3.6.0 Solution: Upgrade Python to 3.6.3. Seems like this is the only solution. Update by conda install python==3.6.3 command if using Miniconda in CLI.