전체 글
-
[node] How to send remind-push to customersBackend/NodeJS 2019. 11. 27. 17:21
What is the remind-push? It is push notifications that leads users to access PLANT app service. So, We expect more connection & active users. When should I send it? 하루 중, 자주 접속 했던 시간이 지났는 데도 접속을 하지 않았을때 During a day, When they didn't connect until the time they frequently connect. How? I use data selectivity, histogram. 작업 프로세스 Step 1. 사용자들의 활동에 대한 날짜를 수집한다. Get timestamp that user activity. 2. ..
-
[node] How to double co-routine in promise & loopBackend/NodeJS 2019. 11. 26. 17:06
비동기 작업의 동기화, 코루틴 각 회원들의 프로필과 친구리스트를 회원별로 새로운 객체에 담고 싶을때 co-routine과 promise를 활용하여 DB 작업은 비동기로 처리하고 베이스 루틴은 동기적으로 처리하여 만들어진 객체를 반환한다. 이 작업은 코루틴 안에서 작업을 비동기적으로 하면서, 모든 작업이 완료되었을 때 반환한다. When all jobs are done, this funtion is return and the main tasks are processed asyncronously. const cofunc = bPromise.coroutine(function* () { try { ... const members = yield getMembers();// get DB // [{"id":"", "..
-
[data statistics] Data distributionPrograming/python 2019. 11. 26. 14:10
content: https://datascienceschool.net/view-notebook/69b85ec9afb7415d8da4c8cd5e46d22e/ Data Science School Data Science School is an open space! datascienceschool.net lib: Matplotlib Matplotlib: Python plotting — Matplotlib 3.1.1 documentation Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across..
-
[javascript] histogram modulesPrograming/javascript 2019. 11. 26. 14:01
1.Plotly https://github.com/plotly/plotly.js plotly/plotly.js Open-source JavaScript charting library behind Plotly and Dash - plotly/plotly.js github.com https://plot.ly/javascript/histograms/ Histograms How to make a D3.js-based histogram in JavaScript. Seven examples of colored, horizontal, and normal histogram bar charts. plot.ly 2.d3 https://github.com/d3/d3 d3/d3 Bring data to life with SV..
-
[typescript] histogram algorithmPrograming/javascript 2019. 11. 26. 13:54
LINK const histogram = (data: any, size: number = 1) => { const length = data.length; let min = data[0]; let max = data[1]; data.forEach((item: number) => { if (item max) max = item; }); const bins = Math.ceil((max - min + 1) / size); const histogram = new Array(bins); for (let i = 0; i < bins; i++) histogram[i] = 0; for (let i = 0; i < length; i++) histogram[M..
-
[node] Excel file exportPrograming/javascript 2019. 11. 21. 17:52
I need to get the excel data which is the result of db query. And I've got it successfully by using 'node-excel-export' module. [Source Code] main.js const exportExcel = require('./excel_export').exportExcel; ... function run() { ... const qData = getLogs();// QUERY exportExcel(qData); ... } run(); excel_export.js const excel = require('node-excel-export'); ... const exportExcel = (dataset) => {..