open-index/open-npm huggingface dataset:
npm package: @reside-ic/dfoptim
Description: Derivative-Free Optimisation
Author: Rich FitzJohn
Latest version: 1.0.0

## Derivative-free optimisation in javascript

[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![build-and-test](https://github.com/reside-ic/dfoptim/actions/workflows/ci.yml/badge.svg)](https://github.com/reside-ic/dfoptim/actions/workflows/ci.yml)
[![codecov.io](https://codecov.io/github/reside-ic/dfoptim/coverage.svg?branch=main)](https://codecov.io/github/reside-ic/dfoptim?branch=main)

Very simple optimisation, using the [Simplex (Nelder-Mead) method](https://en.wikipedia.org/wiki/Nelder%E2%80%93Mead_method) or [Brent's method](https://github.com/osveliz/numerical-veliz/wiki/Brent's-Minimization-Method) (for single-variable functions).

We provide two interfaces. In the first, you can dfoptim a function in a single go:

```
const point = dfoptim.fitSimplex(target, start);
```

which will look for the minimum of the vector-valued function `target`, starting from location `start`.

Running the optimisation may take a while, and no information can be retrieved while it runs, so we also provide a more stateful interface. The function above can be implemented as:

```
const opt = new dfoptim.Simplex(target, start)
while (!opt.step()) {
  // do something
}
const point = opt.result();
```

Where

* `opt` is our optimiser. At this point, it has done basic set up (creating the first simplex) but not taken any steps
* The `step()` method advances the algorithm one step, which will take one or two evaluations of the target function and may or may not find a better point than our current best. It returns `true` if we have converged.
* The `result()` method returns information about the best point.

The same pair of interfaces is provided for the Brent's method via `dfoptim.fitBrent` and `dfoptim.Brent`.

## Example

Run

```
npm run build
npm run webpack
```

Then open `example/index.html` for a simple example.

## Licence

MIT © Imperial College of Science, Technology and Medicine

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.
npm package: @reside-ic/dopri
Description: Dormand–Prince methods
Author: Rich FitzJohn
Latest version: 1.0.1

## Dormand–Prince method in JavaScript

[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![build-and-test](https://github.com/mrc-ide/dopri-js/actions/workflows/ci.yml/badge.svg)](https://github.com/mrc-ide/dopri-js/actions/workflows/ci.yml)
[![codecov.io](https://codecov.io/github/mrc-ide/dopri-js/coverage.svg?branch=master)](https://codecov.io/github/mrc-ide/dopri-js?branch=master)

A simple adaptive ordinary differential equation (ODE) and delay differential equation (DDE) solver in TypeScript, based on the 5th order Dormand-Prince method.

## Licence

MIT © Imperial College of Science, Technology and Medicine

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.
npm package: @reside-ic/interpolate
Description: Function Interpolation
Author: Rich FitzJohn
Latest version: 0.0.1

## Function interpolation in javascript

[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![build-and-test](https://github.com/reside-ic/interpolate/actions/workflows/ci.yml/badge.svg)](https://github.com/reside-ic/interpolate/actions/workflows/ci.yml)
[![codecov.io](https://codecov.io/github/reside-ic/interpolate/coverage.svg?branch=main)](https://codecov.io/github/reside-ic/interpolate?branch=main)

Function interpolation - piecewise constant, linear and spline interpolation. There are many interpolation packages out there. This one is tailored to our needs in [odin-js](https://github.com/mrc-ide/odin-js)

* Support interpolating over several series at once (for a single domain)
* Same interface for piecewise-constant, piecewise-linear and spline interpolation
* Same behaviour as R's `approx` function so that output matches other [odin](https://github.com/mrc-ide/odin) targets

See [cinterpolate](https://github.com/mrc-ide/cinterpolate) for a similar package written in C.

## Licence

MIT © Imperial College of Science, Technology and Medicine

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.
npm package: @reside-ic/odinjs
Description: odin js/ts support
Author: Rich FitzJohn
Latest version: 0.1.3

## odin JavaScript support

[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![build-and-test](https://github.com/mrc-ide/odin-js/actions/workflows/ci.yml/badge.svg)](https://github.com/mrc-ide/odin-js/actions/workflows/ci.yml)
[![codecov.io](https://codecov.io/github/mrc-ide/odin-js/coverage.svg?branch=main)](https://codecov.io/github/mrc-ide/odin-js?branch=main)

Support for running [odin](https://mrc-ide.github.io/odin) models from JavaScript - this is used by odin itself for running models via [V8](https://github.com/jeroen/v8) and by [wodin](https://github.com/mrc-ide/wodin), the web interface.

## Licence

MIT © Imperial College of Science, Technology and Medicine

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.
npm package: @reside-ic/random
Description: Random numbers
Author: Rich FitzJohn
Latest version: 1.0.0

## Random number distributions in JavaScript

[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![build-and-test](https://github.com/reside-ic/random-js/actions/workflows/ci.yml/badge.svg)](https://github.com/reside-ic/random-js/actions/workflows/ci.yml)
[![codecov.io](https://codecov.io/github/reside-ic/random-js/coverage.svg?branch=main)](https://codecov.io/github/reside-ic/random-js?branch=main)

Random number distributions in JavaScript

Random numbers are slippery things, particularly if you want to use them. This package provides a slightly different take on random number generation to many other similar javascript packages:

**We focus on access to distributions where the expectation is that subsequent calls may use different parameters**. Many packages focus on efficient generation of numbers from a single distribution (e.g., a binomial distribution with fixed `n` and `p`) but we assume that each call to generate binomial may have a different `n` and `p` and so don't try and be clever about caching.

**We include different underlying generators, and a simple interface that can adapt to new generators**. We provide a abstract `RngState` class and several different concrete versions of this.

The distribution support is currently poor (binomial, exponential, normal, Poisson and uniform) but will expand this as we need them. We try and reference the underlying papers clearly so that these algorithms are as clear as possible.

## Licence

MIT © Imperial College of Science, Technology and Medicine

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.
npm package: @reside-ic/random-xoshiro256
Description: Xoshiro256 RNG in WASM
Latest version: 0.1.0

# random-xoshiro

Rust to WASM random number generator

## Prerequisites

Get a working rust toolchain. The easiest way is to use [rustup](https://rustup.rs/) and run

```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Also need to install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)

```
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
```

You'll also need a working copy of node/npm (we're using 16.x/8.x).

## Build the project

Run

```
wasm-pack build
```

This may take a long time the first time, and will require internet access as it downloads crates.

This will produce a bunch of things, among them `pkg` which holds the js package with typescript definitions, wrapper javascript and the wasm itself.

## Bring up the web testing

Following from the setup in the [rustwasm book](https://rustwasm.github.io/docs/book) there's a small example project that uses this package in `www`; from within that directory run:

```
npm install
npm run start
```

then navigate to https://localhost:8080

## Licence

MIT © Imperial College of Science, Technology and Medicine

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.
npm package: @reside-ic/vue-nested-multiselect
Description: This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
Author: reside-ic
Latest version: 0.0.15

# Vue 3 + TypeScript + Vite

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).

## Type Support For `.vue` Imports in TS

TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:

1. Disable the built-in TypeScript Extension
   1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
   2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
npm package: @residently/react-zendesk
Description: A component enable Zendesk in your React application
Author: Shuying Lin
Latest version: 0.1.11

# react-zendesk

> A component simplifies Zendesk widget usage in your React application

## Introduction

This component applies to Zendesk Web Widget including contact form, live chat, talk, answer bot and help center. For more information on widget and API, please check [Zendesk official documentation](https://developer.zendesk.com/embeddables/docs/widget/introduction)

## Installation

```sh
npm i react-zendesk --save
```

## Component Usage

```js
import React from "react";
import ReactDOM from "react-dom";
import Zendesk from "react-zendesk";
const ZENDESK_KEY = "your zendesk embed key";

// Take contact form as an example
// Let's customise our contact form appearance, launcher and add prefill content
const setting = {
  color: {
    theme: "#000"
  },
  launcher: {
    chatLabel: {
      "en-US": "Need Help"
    }
  },
  contactForm: {
    fields: [
      { id: "description", prefill: { "*": "My pre-filled description" } }
    ]
  }
};

const App = () => {
  return <Zendesk defer zendeskKey={ZENDESK_KEY} {...setting} onLoaded={() => console.log('is loaded')} />;
};

ReactDOM.render(<App />, document.getElementById("#app"));
```

## Zendesk API usage

```js
import { ZendeskAPI } from "react-zendesk";
...
// Set Zendesk widgets in German
ZendeskAPI("webWidget", "setLocale", "de");
...

```

## Resources

[Zendesk Widget Documentation](https://developer.zendesk.com/embeddables/docs/widget)

## License

MIT
npm package: @residualeffect/rereactor
Description: React hooks for @residualeffect/reactor
Author: ResidualEffect
Latest version: 3.0.0

# rereactor

React hooks for @residualeffect/reactor

![Node.js CI](https://github.com/residualeffect/rereactor/workflows/Node.js%20CI/badge.svg?branch=main)

[Changelog](CHANGELOG.md)

# Installation

Installation can be accomplished using npm:

`npm install @residualeffect/rereactor`

# Documentation

Implement your application logic using reactor.  For example:

```ts
import { Observable, Computed } from "@residualeffect/reactor";

export const t = new Observable(3);
export const c = new Computed(() => t.Value * 2);

export function DoSomething() {
	t.Value = t.Value + 1;
}
```

And then utilize your application logic in a react component:

```tsx
import { useObservable, useComputed } from "@residualeffect/rereactor";

const ExampleComponent: React.FC = () => {
	const observedValue = useObservable(t);
	const observedComputed = useObservable(c);
	const inlineComputed = useComputed(() => t.Value + 1);

	return (
		<>
			<div>Value: {observedValue}</div>
			<div>Computed Value: {observedComputed}</div>
			<div>Generated Computed: {inlineComputed}</div>
			<button onClick={DoSomething}>Go</button>
		</>
	);
};
```

# License

rereactor is freely distributable under the terms of the [MIT License](LICENSE).