open-index/open-npm huggingface dataset:
npm package: @living-room/database-js
Description: A Datalog-style database that enables programmers to represent facts in natural language.
Author: Alex Warth
Latest version: 0.6.20

# living-room database-js

living-room database-js is a Datalog-style database inspired by the implementation of the [Dynamicland][] project. It enables programmers to represent facts using natural language, with a syntax adapted from [alexwarth][]'s [NL-Datalog project][].

See [tests][] for examples of what can be done

# todo

samples vs. wishes

> create a distinction between the state of the world, and things we want changed (input, and output)

evidence

> how can we see the 'call stack' of how a fact came to be

include "world time" in samples

> do we need this?

be more careful with client IDs

> prevent multiple clients from having the same id

consider space-insensitive matching for facts

> (would need a canonical representation to use as keys for factMap)

think about "primary keys"?

> like #ids


[Dynamicland]: https://dynamiclang.org
[NL-Datalog project]: https://github.com/harc/nl-datalog
[alexwarth]: https://github.com/alexwarth
[RoomDB]: https://github.com/alexwarth/RoomDB
[tests]: ./tests
npm package: @living-room/parser-js
Description: A datalog-style grammar and parser for the living room language
Author: Alex Warth
Latest version: 0.4.0

# parser-js

[![Build Status](https://travis-ci.org/living-room/parser-js.svg?branch=master)](https://travis-ci.org/living-room/parser-js)

This is a JS parser implementation of the [Living Room][1] DSL.

The syntax is adapted from the [NL-Datalog project][2].

[1]: https://github.com/living-room/living-room
[2]: https://github.com/harc/nl-datalog
npm package: @living-room/service-js
Description: http, eventstream, socketio, and osc server for livingroom
Author: Jonathan Dahan
Latest version: 0.6.20

# service-js

<img src="images/npmstart.png" width="345" align="right" />

Creates a living room that you can connect to over HTTP, eventstreams, socket.io, and osc!

You can test it out by running `npm start` after installing the dependencies with `npm install`

For a better example with more context, processes and displays, see https://github.com/living-room/lovelace

For a nice javascript client, check out https://github.com/living-room/client-js

## installing

    npm install
    npm start
    npm test

## example http

    $ curl -d 'facts=curl is an app at (20, 30)' localhost:3000/assert
    OK

    $ curl -d 'facts=$who is an app at ($x, $y)' localhost:3000/select
    {"assertions":[{"who":{"word":"curl"},"x":{"value":20},"y":{"value":30}}]}%

## example socket.io

    npm run serve:examples && open http://localhost:5000

from [examples/browser.html](examples/browser.html)

```javascript
const socket = io.connect(`http://localhost:3000`)

// The pattern we want to match on
const pattern = 'ping $number'

let pong = 0

// To subscribe pass in the JSON of an array of patterns
const patternsString = JSON.stringify([pattern])

// We will get back an object, we just care about new assertions
socket.on(patternsString, ({assertions}) => {
  assertions.forEach(({number}) => {
    const value = parseInt(number.value)
    if (value > pong) pong = value
    console.log(`<- pong ${pong}`)
    pong++
  })
})
socket.emit('subscribe', patternsString)

// Start pinging from highest previous ping
setInterval(() => {
  socket.emit('assert', `ping ${pong}`, data => {
    console.log(`-> ${data[0]}`)
  })
}, 1500)
```

## example opensoundcontrol

from [examples/osc/osc.pde](examples/osc/osc.pde)

```processing
import oscP5.*;
import netP5.*;

OscP5 oscP5;
NetAddress myRemoteLocation;

void setup() {
  size(400,400);
  frameRate(25);
  oscP5 = new OscP5(this, 12000);

  myRemoteLocation = new NetAddress("127.0.0.1",41234);
}


void draw() {
  background(0);
}

void mousePressed() {
  OscMessage assertMessage = new OscMessage("/assert");
  assertMessage.add("processing is a program at (0.2, 0.3)");
  oscP5.send(assertMessage, myRemoteLocation);

  OscMessage assert2Message = new OscMessage("/assert");
  assert2Message.add("coolprocessing is a notherprogram at (0.4, 0.4)");
  oscP5.send(assert2Message, myRemoteLocation);

  OscMessage selectMessage = new OscMessage("/select");
  selectMessage.add("$name is a $type at ($x, $y)");
  oscP5.send(selectMessage, myRemoteLocation);
}
```

## api

The http, socketio, and osc endpoints are all the same
HTTP uses POST unless otherwise stated.

Add some facts

    /assert facts=['some', 'facts', 'here']

Remove some facts

    /retract facts=['some', 'facts', 'here']

Batch add and remove facts from the database

    / facts=[{assert: 'some'}, {retract: 'facts'}, {assert: 'here'}]

Find some facts that match a pattern

    /select `facts='$what'`

Get all the facts

    GET /facts
npm package: @livingdata/keyv-sqlite
Description: SQLite storage adapter for Keyv
Author: Luke Childs
Latest version: 2.1.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @keyv/sqlite [<img width="100" align="right" src="https://rawgit.com/lukechilds/keyv/master/media/logo.svg" alt="keyv">](https://github.com/lukechilds/keyv)

> SQLite storage adapter for Keyv

[![Build Status](https://travis-ci.org/lukechilds/keyv-sqlite.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-sqlite)
[![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-sqlite/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-sqlite?branch=master)
[![npm](https://img.shields.io/npm/v/@keyv/sqlite.svg)](https://www.npmjs.com/package/@keyv/sqlite)

SQLite storage adapter for [Keyv](https://github.com/lukechilds/keyv).

## Install

```shell
npm install --save keyv @keyv/sqlite
```

## Usage

```js
const Keyv = require('keyv');

const keyv = new Keyv('sqlite://path/to/database.sqlite');
keyv.on('error', handleConnectionError);
```

You can specify the `table` and [`busyTimeout`](https://sqlite.org/c3ref/busy_timeout.html) option.

e.g:

```js
const keyv = new Keyv('sqlite://path/to/database.sqlite', {
  table: 'cache',
  busyTimeout: 10000
});
```

## License

MIT © Luke Childs
npm package: @livingdocs/angular-slider
Description: Slider directive implementation for AngularJS, without jQuery dependencies.
Author: POPSUGAR
Latest version: 0.2.3

angular-slider
==============

Slider directive implementation for AngularJS, without jQuery dependencies. Requires AngularJS v1.1.4 or higher (optional isolate scope bindings support).

### Added in this fork:

- drag-end hook:
```
<slider floor="100" ceiling="1000" step="50" precision="2" ng-model="item.cost" drag-end="calculateCostViability()"></slider>

# in your controller
calculateCostViability: ->
  # do some crazy calculations
```

- value decorator (display of printed values):

```
<slider floor="100" ceiling="1000" step="50" precision="2" ng-model="item.cost" value-decorator="seeThemDollars(value)"></slider>

# in your controller
seeThemDollars: (value) ->
  "$#{value}"

```

### Example:

    <ul>
        <li ng-repeat="item in items">
            <p>Name: {{item.name}}</p>
            <p>Cost: {{item.cost}}</p>
            <slider floor="100" ceiling="1000" step="50" precision="2" ng-model="item.cost"></slider>
        </li>
    </ul>

### Range:

    <ul>
        <li ng-repeat="position in positions">
            <p>Name: {{position.name}}</p>
            <p>Minimum Age: {{position.minAge}}</p>
            <p>Maximum Age: {{position.maxAge}}</p>
            <slider floor="10" ceiling="60" ng-model-low="position.minAge" ng-model-high="position.maxAge"></slider>
        </li>
    </ul>

### Usage:

Make sure to load AngularJS first, and then `slider.js`. Also include the related `slider.css`.

The module is named `ui.slider`. To enable it, you must simply list it as a dependency in your app. Example:

    var app = angular.module('app', ['ui.slider', 'ngResource', ...]);

You can then use it in your templates like so:

    <html ng-app='app'>
        ...
        <body>
            ...
            <slider ...></slider>
        </body>
    </html>


### Known issues:

1. When applying filters or orders within an ng-repeat directive, the element can abruptly change its position when the value attached to the slider causes a filter to activate or the order to change.
Example: In the above snippet, it would be a very bad idea to order the list by item.cost.


### License: MIT
npm package: @livingdocs/fastify-webpack
Description: More details will follow
Author: Marc Bachmann
Latest version: 5.1.0

# @livingdocs/fastify-webpack

More details will follow

```
npm install fastify @livingdocs/fastify-webpack
npm install --save-dev fastify-webpack-hmr
```

```js
const fastify = require('fastify')
const fastifyWebpack = require('@livingdocs/fastify-webpack')

const watch = process.argv.slice(2).includes('watch')
const optimized = process.argv.slice(2).includes('optimize')

fastify.register(fastifyWebpack, {
  watch,
  // Force the expiration when `watch` isn't true
  maxAge: '1y',
  // we can define the cdnurl
  cdnUrl: 'https://somecdn.yourproject.com',
  // optional, by default it uses webpack.config.js
  webpackConfig: require('./custom-webpack-config')
})

fastify.get('/', fastify.webpackHtml({
  body: '<h1>Hello</h1>'
}))
```


```js
const fastifyWebpack = require('@livingdocs/fastify-webpack')
module.exports = {
  context: __dirname,
  mode: optimized ? 'production' : 'development',
  stats: false,
  entry: {
    index: './src/index.js'
  },
  output: {
    // make sure that there's no `/` in the front, so all the assets
    // are referenced using relative urls.
    // This allows us to host the files anywhere on any url, even subdirectories
    publicPath: 'assets/',
    filename: optimized ? '[name].[contenthash].js' : '[name].[hash].js',
    chunkFilename: optimized ? '[name].[contenthash].js' : '[name].[hash].js'
  },
  plugins: [new fastifyWebpack.AssetManifestPlugin()]
}
```