Skip to content

Instantly share code, notes, and snippets.

View Himujjal's full-sized avatar
🏠
Working from home

Himujjal Upadhyaya Himujjal

🏠
Working from home
View GitHub Profile
Cereal Name Manufacturer Type Calories Protein (g) Fat Sodium Dietary Fiber Carbs Sugars Display Shelf Potassium Vitamins and Minerals Serving Size Weight Cups per Serving
100%_Bran Nabisco C 70 4 1 130 10 5 6 3 280 25 1 0.33
100%_Natural_Bran Quaker Oats C 120 3 5 15 2 8 8 3 135 0 1 -1
All-Bran Kelloggs C 70 4 1 260 9 7 5 3 320 25 1 0.33
All-Bran_with_Extra_Fiber Kelloggs C 50 4 0 140 14 8 0 3 330 25 1 0.5
Almond_Delight Ralston Purina C 110 2 2 200 1 14 8 3 -1 25 1 0.75
Apple_Cinnamon_Cheerios General Mills C 110 2 2 180 1.5 10.5 10 1 70 25 1 0.75
Apple_Jacks Kelloggs C 110 2 0 125 1 11 14 2 30 25 1 1
Basic_4 General Mills C 130 3 2 210 2 18 8 3 100 25 1.33 0.75
Bran_Chex Ralston Purina C 90 2 1 200 4 15 6 1 125 25 1 0.67
x y value
France Apricot 2.3129545439964723
France Avocado 3.1610140317890965
France Lemon 0.9075695440623942
France Date 1.1296454803177811
France Strawberry
France Mandarin 2.6193568568512493
France Chestnut 0.08748279136251946
France Nuts 2.943858242639327
France Olive 1.3356914547843943
@Himujjal
Himujjal / simple-regression-A.html
Last active November 24, 2017 17:06
Making a function which takes in an array and then creates a table out of it
<html>
<head>
<title>Simple Linear Regression</title>
</head>
<body style="text-align:center;">
<h1>Simple Linear Regression</h1>
<table id="original-dataset"></table>
</body>
<script src="simple-regression-A.js"></script>
</html>
@Himujjal
Himujjal / header.ejs:
Last active November 27, 2017 04:36
Settting up boilerplate for machine learning tutorial.
<div class="header">
<!--Start writing your HTML here-->
<p><a href="index.html">Go to Home Page</a></p>
<h1><%= title %></h1>
<hr/><hr>
</div>
@Himujjal
Himujjal / index.ejs
Last active November 27, 2017 04:45
Setting up boilerplate for machine learning tutorial
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Machine Learning using JavaScript</title>
<style>
.index {text-align:center;}
</style>
@Himujjal
Himujjal / a-simple-linear-regression.ejs
Last active November 27, 2017 05:41
Linear Regression start
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>a-simple-linear-regression</title>
</head>
<body class="a-simple-linear-regression">
@Himujjal
Himujjal / a-simple-linear-regression.js
Last active November 27, 2017 06:04
Add the following to Creating table function and creating chart
import "../styles/a-simple-linear-regression.less";
// Start Writing Javascript below this line
import math from 'mathjs'
import FusionCharts from 'fusioncharts'
require("fusioncharts/fusioncharts.charts")(FusionCharts);
// This is where we will write the algorithms
const $ = (id) => document.getElementById(id),
cE = (ele) => document.createElement(ele),
// importing electron
const electron = require('electron')
const url = require('url')
const path = require('path')
// app is the main app
// BrowserWindow is basically the window that loads your HTML file
const {app, BrowserWindow, ipcMain } = electron;
@Himujjal
Himujjal / guide-to-freelancing.md
Last active May 3, 2021 15:34
This guide intends to provide the process of learning Programming (Web and mobile) so that anyone willing to start with freelancing can get started
@Himujjal
Himujjal / VectorAdditionGPU.js
Last active May 6, 2018 12:10
Vector Addition program for node-cl ()
const CL = require("node-cl");
const context = CL.getBestContext();
const queue = CL.createCommandQueue();
function VectorAdditionGPU (array1, array2) {
const kernel = CL.createKernel({
name: "vecadd",
args: [
{ arg: "A", type: "array", prop: array1 },