Posts

http://www.panhidhalyrics.com/ Change Log

Image
This article highlights the milestones in approach in developing www.panhidhalyrics.com. Anyone researching in the same area can use the following as a guideline to improve their approach.  2020: Dec Deprication of the probabilistic basic model of song generations developed using Django  2021 : Jan  RNN based raw impleneration for predict sinhala words using larger sample of data (not pre-prossed) fushenkao - https://github.com/fushenkao/Sinhala-Lyrics-Gen  minimaxir - https://github.com/minimaxir/textgenrnn  පසුතලය : කැටපත් පවුර, සීගිරිය (Sigiri Graffiti) http://thenationaltrust.lk/wp-content/uploads/2018/06/nds-nt-sigiriya.pdf when the dataset becomes bigger training conducted using the GoogleColab to generate the model (refer following notebook) :  https://colab.research.google.com/drive/1YlooyHnyhK8BcmrHF87resDT8O1FAppf?usp=sharing 2021 : Feb Approach to adopt LSTM assuming the relationship between stanzas in a sequence. The basis of the following Notebook adopted as the inception.

Impact of sampling and interpolation for time series

Image
  The raw data recorded when a change detected in the stream enables more realistic data recording comparison to time based sampling.Thus, sampling and interpolation required for most of the comparative analysis using time series, limit the usage of raw data for extended analysis. However, you might wonder how it can distort the realistic nature of the data (except the probable anomalies) and leading to false interpretation.Lets focus on our theme. For the analysis I am using fe w  selected variables from water quality dataset recorded from  Baffle Creek   and  Byrnett River .  First I will combine the two datasets into single dataset without sampling using panads merge function. The Pearson Correlation Coefficient (PCC) calculated for the combined dataset and the heat-map of the results given below. Figure 1 : PCC between variables in two un-sampled datasets From the results, it is obvious that the two datasets may have correlations in-between the variable inside the dateset, thus, no

Grab Google Analytics Data in remote account from Firebase Functions

Image
Although Google analytics Login is isolated from other Google services, you can easily access the analytics data from another service.  I am going to demonstrate how to retrieve google analytics data from firebase functions. You need to use googleAPI node package as an assistant. In coding, you have to use  JWT authentication in order to avoid async await issue in Google Cloud functions. Currently stable version of cloud functions is Nodejs 6. You have to download the service-account.json from Firebase or google cloud. In firebase, it is located at the following link. You have to generate a new private key. https://console.firebase.google.com/u/0/project/<project-id>/settings/serviceaccounts/adminsdk Make sure it contains the client email. That email need to be added in Analytics >>admin >> User Management Section as a user. https://analytics.google.com/analytics/web/ The code block in the batchGet fuctions will execute in firebase functions no

Google Cloud Scheduler using Firebase Functions

Image
Google recently released a beta version of Google Cloud Scheduler . It makes much easier to schedule a task in firebase. https://cloud.google.com/scheduler/docs/tut-pub-sub You should enable APIs before proceed. Sorry, you have to have a billable account for continue. https://cloud.google.com/scheduler/docs/quickstart gcloud config list  gcloud config set project <projectname> gcloud components update gcloud pubsub topics create cron-job . *** name of the pub sub cron-job gcloud pubsub subscriptions create cron-sub --topic cron-job After creating that , you have to go to shecdular https://console.cloud.google.com/cloudscheduler Select the project and create a scheduled task . In target select pub sub and give the topic as the same name given in pub-sub generation above (cron-job ). After creating the job you can define the code to execute in the firebase functions. The code in the firebases function will be like below for pub sub job name "cr

react-quill Integrate quill-image-resize-module

Image
React-qill  is a great free package which can be used for design editors. However, if you are using the image upload feature, there is a problem of integrating resize package. This was discussed in may treads and I was able to find the best approach integrate it with react-starter-app. https://www.npmjs.com/package/quill-image-resize-module If you use the following code, import Quill from ' quill ' ; import { ImageResize } from ' quill-image-resize-module ' ; Quill . register ( ' modules/imageResize ' , ImageResize); const quill = new Quill (editor, { // ... modules : { // ... imageResize : { // See optional "config" below } } }); The following error is common. TypeError: Cannot read property 'imports' of undefined var d = window.Quill.imports.parchment In order to overcome the issue , you have to update the node_modules/react-scripts/config/webpack.config.

xe.com api integrate with postman:authentication

Image
According to xe.com document we have to use the basic auth and they not provide information about the credentials. curl –i -u account_id:api_key "https://xecdapi.xe.com/v1/account_info/"  But in order to login you should provide the  Account ID   for username and the  Account API KEY   for password for login, which is given after creating the account. 

React JS Tabs Add and Close Tabs

https://ctxhou.github.io/react-tabtab/#add-close In order to use Tabtab we have to downgrade the version of the styled component  to 3.4.10 in order to use   "react-tabtab": "^1.8.2".