Skip to content

Instantly share code, notes, and snippets.

View ifeLight's full-sized avatar

Ifedayo Karim ifeLight

View GitHub Profile
@ifeLight
ifeLight / linear_regression.js
Created May 5, 2020 12:47 — forked from uhho/linear_regression.js
Simple linear regression in JS
/**
* Simple linear regression
*
* @param {Array.<number>} data
* @return {Function}
*/
function regression(data) {
var sum_x = 0, sum_y = 0
, sum_xy = 0, sum_xx = 0
, count = 0
@ifeLight
ifeLight / dosu.php
Created June 12, 2019 15:59 — forked from karthikax/dosu.php
PHP Download file to server from URL
<html>
<p style="width: 70%;margin: auto;margin-top: 5%;font-size:larger;text-align:center">
Download a file from any URL</p>
<form method="post" style="width: 70%;margin: auto;margin-top: 10%;">
<input name="url" size="50" placeholder="Source URL" style="width: 100%;height: 10%;font-size: 1.5em;padding:10px" required>
<input name="submit" type="submit" value="Download" style="width: 30%;height: 10%;margin: 5% auto; display: block;">
<p style="width: 70%;margin: auto;margin-top: 10%;font-size:larger;text-align:center">
To <?php echo getcwd(); ?></p>
<p style="width: 70%;margin: auto;font-size: smaller;text-align: center;position: fixed;bottom: 0;background: #fff;">
Powered by: <a href="https://karthikbhat.net/portfolio" target="_blank" style="color:#f60;text-decoration:none;">Karthik</a></p>