LD_LIBRARY_PATH: RStudio-server, Shiny-server and Tensorflow

I used to create a shiny-app to conduct image classification using Tensorflow on DigitalOcean, however it didn’t work on my own PC station. The main problem is: RStudio-server and Shiny-server can’t find the shared object: libcudart.so.8.0 which located under /usr/local/cuda/lib64...

Read More

multiprocessing could even slower than single thread

I have been always using multiprocessing in my web crawlers to accelerate the processing. Today, I want test how much fast the storageEngine WiredTiger vs MMAPV1 in MongoDB. The result is what expected for inserting document using single thread: 20%...

Read More

Add second hard disk (3TB) to Ubuntu 16.04

I need more disk space of my computer, so I bought a 3TB hard disk. I want the new disk to be one partion, so I can easily distinguish it from others.

After connecting the hard disk to computer and...

Read More

shiny app for CPU bound project

R is a single thread program, which can use only one CPU core, for multiple concurrent requests, it will conduct one by one until the last one was finished. Modern computers generally have several cores CPU, a simple way to...

Read More

Multiprocessing Web crawler with proxies

Multiprocessing is used to accelerate the scraping of web pages, while using proxies can hide your IP address, and avoid the server ban your crawlers. This post take an example to show you how to write such a crawler in...

Read More

Web scrape using proxies

Though, Ryan Mitchell said web scraping is legal in his book: Web Scraping with Python Collecting Data from the Modern Web, we still can read some reports that companies lose the court cases due to they scraped huge data from...

Read More

Install mongodb on ubuntu 16.04 LTS

The official instruction for install MongoDB on Ubuntu system can be found here.

In the Overview part, it said:

While Ubuntu includes its own MongoDB packages, the official MongoDB Community Edition packages are generally more up-to-date.

I...

Read More

Remote Desktop Access to my Acer G3-710

I decided to learn some knowledge about Machine Learning or Artificial Intelligence though I have no idea what I can use it for. I believe a Data Scientist can’t keep his competence in next 10 years if he was not...

Read More

Read PowerPoint shape figure into R.

Unarguably, PowerPoint is still the most widely used presentation tool. And I do admit that PowerPoint is good at many tasks, such like drawing any kind of shapes. But, we all know “point-and-click” is not efficient when there are many...

Read More

Get access to PEAP WiFi from Raspberry pi 3

Most of the tutorials available are for EAP WiFi, which require just a password. PEAP WiFi network used generally for company, and each user has an ID and a password. To access this kind of WiFi network is also very...

Read More

Git commit regularly to GitLab

This post shows how to configure an autocommit environment for GitLab (an internal version of Github).

Suppose you have a project under folder: myproject, you want to save each version of your project and save it on GitLab for security...

Read More

Install Shiny Server on Raspberry Pi

Several people asked me if I ever installed Shiny Server on Raspberry Pi (RPi) because I introduce myself as a “R and Raspberry Pi fan” on my blogs. Though I don’t think RPi is suitable to hold a Shiny...

Read More

Setup Shiny Server on Ubuntu 14.04

I have set up a Shiny Server on Ubuntu 12.04 in 2013. Shiny package has been under active development, and current version has reached 0.11 while the one on my server is still 0.8. I should keep update with...

Read More

Design A Bilingual Shiny Application

It’s a common requirement that your Shiny application should be bilingual. I have tried several methods and finally I got one which is not so difficult to maintain.

My idea is:

  • Create a bilingual dictionary or a lookup table...
Read More

Generate Distinct Colors

When plot with R (or some other software), it doesn’t bother you a lot for choosing colors if you have only several data series. For example, if I want to create a figure for 5 data series, I can easily...

Read More

A Shiny-app Serves as Shiny-server Load Balancer

The Shiny-app on open-source edition Shiny-server has only one concurrent, which means it can run only for one user at a time point. But it can host multiple Shiny-apps, which can run synchronously. So, if we create severl Shiny-apps with...

Read More

Set Up Shiny-server on www.digitalocean.com

RStudio supplies several servers for hosting user’s apps, e.g. http://www.shinyapps.io/, http://spark.rstudio.com, http://glimmer.rstudio.com. Thanks a lot to RStudio who has contributed many excellent R libraries! I want to set my shiny-server on a virtual private server (VPS), because I...

Read More

Shiny-server Open Source Edition: Solution for CPU Bound Apps

Shiny-server integrates the statistic power of R with web, convenients the statistical analysis through web. Users can do complecate statistical anlysis through their web browsers. However, most of statistical analysis of R are CPU bound computation, that means CPU utilization...

Read More

Encrypt user's password with md5 for you Shiny-app

In a previous blog, I post a simple authentication method for Shiny-app, and received several comments mainly concerning that I should encrypt user password. I agree, user’s password can be intercepted when it was transferring. To secure users’ personal...

Read More

Who Touched My Shiny-app?

When we created a Shiny-app, deployed it on a server and open it to public, we must have interesting of who visited our app, and if possible, where they from and what they have done. To achieve this, we need...

Read More

Schedule tasks under Linxu for R

Frequently encountered, we need to schedule tasks: run task automatically! To schedule your R task, edit /etc/crontab like this:

sudo nano /etc/crontab 

At the end of the opened file, add such...

Read More

Understand Encoding Garbed Text of R

I have shown how to set character encoding through configuring system locale for R in previous post. But to find the correct encoding could be an not easy task if you don’t know some basic knowledge of encoding. I would...

Read More

One R Fortune A Day!

Just found this interesting package fortunes though it have been built for 9 years! I wrote a simple application and deployed it on Rstudio server, So you can read those wisdom where you have internet connection.

...
Read More

Flexible upload data to Shiny-server

There is a function called fileInput comes with Shiny-server, which can upload data to server. In this post, I would like to share my experience of uploading different kind of data (.txt, .csv, .xls, .xlsx, etc.) to Shiny-server.

The...

Read More

Configure Shiny-server Under Virtual Machine

In previous post, I listed the issues of how to configure Shiny-server under Ubuntu which installed as parellel operation system with Windows. There are two shortcomings for that: I need to restart the computer to switch between the two...

Read More

Fishing Map in Oslo

This year, I fell in love with fly fishing. Lucky for me, there are a lot of nice places for fishing in Oslo forest. There is website called OFA listed what kind of fishes and their population density in...

Read More