lmari’s blog

Data analytics, machine learning & front end development

Entries from 2019-01-01 to 1 year

Responsive Bootstrap Website

CSS

Building Responsive Website with Bootstrap 4.1.2, HTML5 & CSS3 Bootstrap Cheatsheet Bootstrap - Copy CSS and JS Google Fonts Fontawesome - Icons <script src="https://kit.fontawesome.com/00dacea898.js" crossorigin="anonymous"></script> github.com Outline Button and Red Button

Lightbox Gallery

Responsive Image Gallery using HTML, CSS and Javascript. It shows up nicely in preview, but when I try to upload in blogger it become something entirely different... https://lokeshdhakar.com/projects/lightbox2/ Hosting CSS and Scripts in G…

Node.js, Express, MongoDB Book Project

Preparation MongoDB (64 bit) MongoDB Atlas: https://www.mongodb.com/cloud/atlas Heroku GitHub - SSH key. Find in id_rsa.pubDeploy images at separate server, not heroku. Heroku Filepond CDN <link href="https://unpkg.com/filepond/dist/filepond.css" rel="stylesheet"> </link>

React Project - E commerce store

Fixed: Line 14 in ProductList.js <div className="row">NOT <div className="row" />Now it's displaying in four rows instead of one. Resume Project cd desktopcd storecode .npm start Ctrl + C - stop and start server Structure -Create components in src - Navbar.js, Product.js, ProductLis</div></div>…

JavaScript Project - Search Filter Page

2019/06/01/125814 Overall site still very buggy Followup: Need to resize images, 72 dpi - hero-bcg: 1000 x 700 (52k)- product-1... product-8: 1280 x 720 (80k) Followup: Deploy contentful Contentful.js import { createClient } from "contentf…

Javascript Project - Beach Resort

1:01:27 - Finished App.js and Navbar.js npx create-react-app resortnpm install react-iconsnpm i react-router-dom --savenpm start React Router DOM Documentation App.js import React from "react";import "./App.css"; import Home from "./pages/…

Stock market forecasting with prophet

fb Open Anaconda Prompt and install fbprophet conda install -c conda-forge fbprophet If kernel error occured in jupyter notebook, open Anaconda prompt and view location. Open kernal.json, see if python editor have the same path jupyter ker…

React.js, Angular and Vue

React.js Lightweight, popular front-end framework, interactive user interface Virtual DOM, update blog post (instead of reload whole page) JSX is similar to HTML Reusable functionable components, familarize with ES6 Install node.js Install…

Heatmap in Seaborn

Using Python to find currency correlation. The correlation coefficient represents a statistical relationship between 2 variables. Near +1 or -1 means the currency pairs are highly correlated Useful in hedging and diversifying risk Official…

Javascript Project - Shopping Cart

I was reluctant to start a 4:14:26 video. 1:12:14 - HTML/CSS done, start working on app.js Tips: Useful extensions in Visual Studio (Bracker Pair Colorizer, ES7 React/Redux/GraphQL/React-Native snippets, Highlight Matching tags, indent-rai…

Continuous deployment on Netlify

www.gatsbyjs.org Followup: Gatsby with Contentful, Snipcart & Formspree Troubleshooting: cannot install gatsby plugin sharp, install Desktop development with C++ workflow Gatsby cannot install in x32 bit (require x64 bit node.js) Preparati…

Budget App with ES6

Followup: Adapt to calculating owner's earnings: Owners earning = Net Income*+ Depreciation & Amortization+ Net Change: Accounts Receivable*+ Net Change: Accounts Payable*+ Income Tax+ Maintenance Capital Expenditures** or Free Cash Flow N…

Scraping Financial Data with Selenium

Selenium with Python — Selenium Python Bindings 2 documentation Install Beautiful Soup 4 Followup: Unable to run in sublime text. Program ran in PyCharm Read xpath Getting FB stock data from yahoo finance from bs4 import BeautifulSoupimpor…

Creating candlestick chart with TA-Lib

Install python extension package (check version) TA-lib-0.4.17-cp37-cp37m-win32.whl cp37 = python 3.7, win32 = x32, amd64 = x64 mpl_finance Tutorial: https://ithelp.ithome.com.tw/articles/10206894 Go to Anaconda installed location pip inst…

Sphinx and Rinohtype

Followup: Generate epub, pdf file, display at lower left corner Find out why touch command doesn't work Sphinx Documentation medium.com www.xncoding.com Go to the root directory of the project. virtualenv -p python3 <name of virtualenv>source <name of virtualenv>/bin/activate pi</name></name>…

Moving Averages and Statistics for Stock Prices

1. Finding Historical Prices import requests In site url, period1 is starting time, period 2 is ending time site="https://query1.finance.yahoo.com/v7/finance/download/2330.TW?period1=0&period2=1549258857&interval=1d&events=history&crumb=hP…

Node.js & Stripe - Ebook Seller

Ebook seller Node.js & Stripe https://github.com/bradtraversy/ebookseller Visual Studio Account at https://stripe.com/ To delete all test data, go to Settings > Data > Delete all test data Publishable key, secret key Account at heroku Inst…

jQuery

jQuery Prerequisite: HTML, CSS3 (use same selectors, id, class), JavaScript DOM manipulation, Ajax (low, get, post) Download jQuery 3.4.1- https://jquery.com/download/ CDN without Internet, build simple UI Use selectors to grab headings. $…

Pandas Time Series

Download csv from finance.yahoo.com/quote/AAPL/history HK Stocks csv https://hk.finance.yahoo.com/quote/0012.HK/history?p=0012.HK Financial info https://finance.yahoo.com/quote/AAPL/financials?p=AAPL Lesson 1, Lesson 2, Lesson 3, Lesson 4,…

Javascript Cheatsheet

3 Hour 26 mins beginner's course var sum = 10+10; console.log(sum) var difference = 45 - 12; var product = 8 *10; var quotient = 66 / 0; myVar = myVar + 1 ----> myVar++; myVar = myVar - 1 -----> myVar-- var ourDecimal = 5.7 != not equal /*…

Panda Data Analytics

Jupyter Notebook: Lesson 6, Lesson 7, Lesson 8, Lesson 9, Lesson 10, Lesson 11, Lesson 12, Lesson 13, Lesson 14 Library https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.join.html Open documentation: Shift+Tab sho…

Pandas Data Frame

Data frame - main object in pandas, used to represent tabular data (rows and columns) Shortcut: B - insert new cell below / A - insert cell above Run cell - Ctrl + Enter Library: https://pandas.pydata.org/pandas-docs/stable/ Notes: Lesson …

Build an eCommerce Website

Install sublime text Run python commands from cmd Download get-pip.py to folder C:\User\Z\ python get-pip.py cd desktop pip install virtualenv virtualenv tryten cd tryten scripts\activate In the screen, you'll see <tryten> .\Scripts\activate pip i</tryten>…

Numpy, Matplotlib, Sklearn

Install numpy RUN pip install numpy scipy RUN pip install pandas sklearn (Restart program if it cannot find installed software) RUN jupyter notebook https://www.youtube.com/embed/HW29067qVWk Export as html File> Download as .html Download …

Creating Charts with MatPlotLib

First try at MatPlotLib. Created piechart and bar chart. Need to familarize the basics of MatPlotLib before moving forward. Tip: Can skip the part on specifying colors. Piechart.py import matplotlib.pyplot as plt plt.figure(figsize=(5,5)) …

Budget Automation Using Chrome

Selenium is browser automation. The default browser is firefox. Need to change the settings in amazon_bot.py to to run selenium webdriver in Chrome browser from selenium import webdriver chromedriver = "C:\\Users\\Z\\chromedriver"driver = …

Building Website with Django

http://127.0.0.1:8000/ http://127.0.0.1:8000/admin/ http://127.0.0.1:8000/products/ Followup: Angular, Firebase and Bootstrap 4 I was hoping it could morph into something like this later: Changing display of Product object Add ProductAdmin…

JavaScript Basics in 1 Hour

Install Microsoft Visual Studio Code Install nodejs for third party libraries Create new folder on desktop. Drag into VS Code Create index.html, index.js under folder Shortcut: ! + Tab = html boilerplate Ctrl + S = Save h1 + Tab = h1 tag j…

Table of Contents

Python & Data Analysis Building Website with django Budget Automation using chrome Creating charts with matplotlib Numpy, matplotlib, sklearn Building an eCommerce Website Pandas Data Frame Pandas Data Analytics Panda Time Series Moving Av…