Skip to content

Instantly share code, notes, and snippets.

View Weiyuan-Lane's full-sized avatar
🐈
Code. Code! CODE! CODE!!!!!!

Weiyuan Liu Weiyuan-Lane

🐈
Code. Code! CODE! CODE!!!!!!
View GitHub Profile
@Weiyuan-Lane
Weiyuan-Lane / remote_configuration.md
Last active March 19, 2022 09:25
Tools used in this task

Required tools

Tool Description
Angular Web framework. See here to find out more
npm Package manager for node modules.
GrowthBook Open source feature flagging and experimentation platform. See here for more.
growthbook-remote-config An library that I wrote to support the use of GrowthBook in Angular applications. See here for more.

Miscellanous tools (used for this sharing only)

| Tool | Description |

@Weiyuan-Lane
Weiyuan-Lane / imperative-vs-declarative.md
Created March 13, 2022 12:09
Imperative vs declarative
Imperative Declarative
Description Instructions for performing a task The desired end state of a task
Example "Please help me to purchase eggs, vegetables, and chicken, and place them in the fridge " "Please ensure that there are eggs, vegetables, and chicken meat in the fridge."
Outcome Errors arising from conflict can occur. Using the ex
@Weiyuan-Lane
Weiyuan-Lane / trust.py
Created February 27, 2022 12:31
Plotty representation
# import chart_studio.plotly as py
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import numpy as np
# Initialize figure with 4 3D subplots
fig = make_subplots(
rows=1, cols=1,
specs=[[{'type': 'surface'}]])
Category Info Other comments
Planned Distance 11.3 km Intended distance from Google Maps
Measured Walked Distance 12.58 km Measured with Runkeeper
Duration 3:23 (hr:min)
Average Pace (per km) ~16:00 min Measured with Runkeeper
Elevation 4 - 83 m Measured with Runkeeper
Calories Burned 751 Measured with Runkeeper
Category Info Other comments
Planned Distance 13.2 km Intended distance from Google Maps
Measured Walked Distance 14.5 km Measured with Runkeeper, slight increase of 400m from getting lost and backtracking slightly
Duration 3:45 (hr:min) Started at ~2:45pm, ended around 6:45pm
Average Pace (per km) 15:40 min Measured with Runkeeper
Elevation -5 - 74 m Measured with Runkeeper. There are several overhead bridges that contributed to the elevation
Calories Burned 862 Measured with Runkeeper
The Mister final comment Still no otters :(

But still a fun challenge to do weekly if I live this same distance from where I work, possibly on Fridays.
Category Info Other comments
Planned Distance 12.4 km Intended distance from Google Maps
Measured Walked Distance 15.92 km Measured with Runkeeper (though there seems to be GPS issues along the way)
Duration 3:31:41 (hr:min:sec) Started at 9:00am, ended around 12:00nm
Average Pace (per km) 13:18 min Measured with Runkeeper
Elevation -5 - 21 m Measured with Runkeeper. Crossed the road from MRT station connector, only one causing the high elevation measure
Calories Burned 834 Measured with Runkeeper
The Mister final comment Interesting smells in Tuas
The Missus final comment Ok, you need to go home and mop the floor now.
Category Info Other comments
Distance 9 km Intended distance from Google Maps, without any detours
Actual Walked Distance 14.99 km Measured with Runkeeper
Duration 3:20:56 (hr:min:sec) Started at 5:00am, ended around 7:30am
Average Pace (per km) 13:24 min Measured with Runkeeper
Elevation -5 - 47 m Measured with Runkeeper. Helix bridge was likely the highest point in this journey
Calories Burned 855 Measured with Runkeeper
Verdict Sunrise is really great. We walked at a brisk pace, allowing us to catch the sunrise just at the right moment. If we had started just 10 mins later, things might have been very different.It was also quite interesting to finally know where the canal from Clark Quay ends (or rather, where it begins).
Category Info Other comments
Distance 9.01 km Measured with Runkeeper
Duration 2:30:59 (hr:min:sec) Started at 8:30am, ended at 11am
Average Pace (per km) 16:46 min Measured with Runkeeper
Elevation 1 - 13 m Measured with Runkeeper. Staircase and bridges likely contribute to those, but they are few and far between.
Calories Burned 534 Measured with Runkeeper
Shadiness
Sunblock might not be a bad idea as not all of the areas are shaded by trees (give or take 50% of the way). Just don't walk in the afternoon when it will be blistering hot. Mornings or evenings are good

Accessibility
Four MRT stations along the whole path! (and one more in progress!) Convenience stores and washrooms always seem to be quite close by, at least during the earlier part of the route

Verdict 9km is pretty ok for a family walk. The entire walk is pretty e
@Weiyuan-Lane
Weiyuan-Lane / Dockerfile
Created September 5, 2021 09:14
Docker file for test automation
FROM alpine:3.14.2
COPY ./run-test-automation.sh /usr/bin/run-test-automation
RUN apk --no-cache add curl jq bash
ENTRYPOINT ["/usr/bin/run-test-automation"]
@Weiyuan-Lane
Weiyuan-Lane / run-test-automation.sh
Last active September 5, 2021 08:56
For running autify test plan
#!/bin/bash
# Run regression tests on Autify
response=$(\
curl -XPOST -s -H "Authorization: Bearer ${AUTIFY_PERSONAL_ACCESS_TOKEN}" \
"https://app.autify.com/api/v1/schedules/${AUTIFY_TEST_PLAN_ID}" \
)
# Get test plan result URL
test_plan_result_id=$(echo ${response} | jq -r .data.id)