Skip to content

Commit

Permalink
restarted dev es6
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasalmeida committed Dec 11, 2024
1 parent 0b4ae85 commit 2d52a8c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
17 changes: 16 additions & 1 deletion fminsearch.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
<html>
<head>
<link href="https://episphere.github.io/gps/gps.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="index.js"></script>
<hr>
<h1>
<b style="font-family:arial">SeroHub</b>
<sup style="font-size:small;font-weight:bold">
[<a href="https://github.com/jonasalmeida/fminsearch" target="_blank">code</a>
] [<a href="https://observablehq.com/@jonasalmeida/fminsearch" target="_blank">notebook</a>
] [<a href="https://github.com/jonasalmeida/fminsearch/issues" target="_blank">issues</a>
] [<a href="https://github.com/jonasalmeida/fminsearch/wiki" target="_blank">documentation</a>
]
</sup>
</h1>
<script src="fminsearch.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
</head>
<body>
fminsearch :-)
ES6 feminsearch module
<div id="plot"></div>
<script>
google.load("visualization", "1", {packages:["corechart"]});
Expand Down
15 changes: 11 additions & 4 deletions fminsearch.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
// moving fminsearch to ES6 - under development!
console.log(`fminsearch.mjs loaded ${Date()}`)
console.log(`fminsearch.mjs imported \n${Date()}`);

const loaded = Date()
// illustrative examples of fun

export{
loaded
function logistic(x,P){
return x.map(
xi => 1 / (1 + Math.exp(-(P[0] + (P[1] * xi))))
)
}


export {
logistic
}
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
console.log(`index.js loaded \n${Date()}`);

(async function(){
const fms = await import('./fminsearch.mjs')
logistic = fms.logistic
})()

0 comments on commit 2d52a8c

Please sign in to comment.