Skip to content

Instantly share code, notes, and snippets.

View wnarifin's full-sized avatar

Wan Nor Arifin wnarifin

View GitHub Profile
@wnarifin
wnarifin / how_many_samples_covid19.md
Last active January 15, 2021 07:10
How many to sample among suspected population of COVID-19
title author date output
How many to sample among suspected population of COVID-19
Wan Nor Arifin
1/15/2021
html_document
keep_md
true
@wnarifin
wnarifin / covid_19_malaysia_recover_by_state_img_ocr.md
Last active November 30, 2020 14:31
Web scraping the number of COVID-19 daily recovered cases in Malaysia by OCR method

About

The Director General of Health Malaysia releases daily press statement in the website at https://kpkesihatan.com/. However, the number of recovered cases by state is not given in table format, making it impossible to scrape the data from the website directly as detailed in my gist here.

However, the number of recovered cases is presented in image format, so I describe here how to perform OCR to get the daily number of recovered cases by state using R. The example presented here is based on press statement on 24-11-2020.

You may also have a look at my scraped data sets and updated scripts at https://github.com/wnarifin/covid-19-malaysia.

Required Libraries

@wnarifin
wnarifin / covid_19_malaysia_webscraping.md
Last active February 7, 2021 12:58
Scraping data on Covid-19 in Malaysia from DG of Health daily press release

About

I find it tedious to manually update and maintain Excel files of Covid-19 situation in Malaysia. The Director General of Health releases daily press statement in the website, in text format (only some info in Table): https://kpkesihatan.com/

For data analysis, data in structured format is prefered, but this is not readily available from the source. Thus, the data must be updated manually everyday from the website or by listening to the press conference.

In this Gist, I share a method to scrape data from the web page of the daily update in R.

You may also have a look at my scraped data sets and updated scripts at https://github.com/wnarifin/covid-19-malaysia.

Required packages

@wnarifin
wnarifin / thinkpad_a485_linux.md
Last active May 23, 2020 13:36
Installing Linux on Lenovo ThinkPad A485

Why

I was unable to boot to live Linux distro to install Linux on my newly bought A485 ThinkPad laptop. Although I was initially dissapointed, I was not alone. This gist documents the information I gathered from the net to complete the installation.

At the time of posting this gist, the issue is still persistent. It might not be relevant anymore once Lenovo release a working BIOS update to resolve the issue. [Update 19/01/2019]: Updating to BIOS 1.14 worked for me.

Sources

The information in this short gist was compiled from several sources. Although most are for E series, it worked for A485:

  1. https://www.reddit.com/r/thinkpad/comments/9ia3e4/linux_on_thinkpad_a485/
  2. https://evilazrael.de/node/401
@wnarifin
wnarifin / libimobiledevice_ifuse_Ubuntu.md
Last active June 8, 2020 03:07 — forked from mmhobi7/libimobiledevice_ifuse_Ubuntu.md
Connecting iPhone (iOS 10) to Linux Mint 18

Why this document?

I was unable to import photos from my iPhone (using iOS 10) in Linux Mint 18. The libimobiledevice and ifuse that come with the distro didn't work.

The solution is to compile libimobiledevice and ifuse from source.

I forked this document from other Gists to document what works for me in Linux Mint 18. It worked for me on Linux Mint 18.3 with iOS 10.3.3.

Setup environment