open-index/open-npm huggingface dataset:
npm package: @mitchallen/lsystem
Description: L-System package 
Author: Mitch Allen
Latest version: 0.25.8

@mitchallen/lsystem
==
L-System Generator
--
<p>
  <a href="https://npmjs.org/package/@mitchallen/lsystem">
    <img src="https://img.shields.io/github/actions/workflow/status/mitchallen/drawing-kit/check.yaml" alt="Build">
  </a>

  <a href="https://npmjs.org/package/@mitchallen/lsystem">
    <img src="http://img.shields.io/npm/dt/@mitchallen/lsystem.svg?style=flat-square" alt="Downloads">
  </a>

  <a href="https://npmjs.org/package/@mitchallen/lsystem">
    <img src="http://img.shields.io/npm/v/@mitchallen/lsystem.svg?style=flat-square" alt="Version">
  </a>
  
  <a href="https://npmjs.org/package/@mitchallen/lsystem">
    <img src="https://img.shields.io/github/license/mitchallen/drawing-kit.svg">
  </a>

  <br />

  <a href='https://ko-fi.com/A0A0KEIOY' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi3.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
  
</p>

* * *

## Installation

```sh
$ npm init
$ npm install @mitchallen/lsystem --save
```

* * *

<img src="https://raw.githubusercontent.com/mitchallen/drawing-kit/main/packages/lsystem/__tests__/output/kock-island.svg" />

* * *

## Usage

```js
const factory = require('@mitchallen/lsystem');
const penTurtleFactory = require('@mitchallen/pen-turtle');
const svgFactory = require("@mitchallen/pen-svg")

function kochIsland() {
    let width = 1024,
        height = 1024;
    let writer = svgFactory.create({});
    let lsys = factory.create();
    // setup turtle
    let turtle = penTurtleFactory.create({
        color: 0x000000,
        width: 1,
    });
    // setup lsystem
    // add pen turtle to lsystem
    lsys.turtle = turtle;
    // define lsystem
    lsys.distance = 4;
    lsys.depth = 4;
    lsys.angle = 60;
    lsys.addRule("F", "F-F++F-F");
    lsys.axiom = "F++F++F";
    lsys.run();
    // write to svg
    writer
        .addPen(lsys.turtle,
            {
                color: 0x000000,
                fill: 0xFF0000,
                width: 1,
                transform: {
                    scale: { x: 2.0, y: 2.0 },
                    translate: { x: 140, y: 400 },
                }
            });
    let filename = 'koch-island.svg'
    let svg = writer.writeSVG({
        width,
        height,
        filename,
    });

    // print the SVG markup to the screen

    console.log(svg)

    console.log(`\n\nOpen ${filename} in your drawing program or browser.\n\n`)

}

kochIsland()

```

## Documentation

* [LSYSTEM-DOC.md](https://github.com/mitchallen/drawing-kit/blob/main/packages/lsystem/LSYSTEM-DOC.md)

## Buy me a coffee!

If you like this package and find it useful, please show your appreciation and buy me a coffee!

<a href='https://ko-fi.com/A0A0KEIOY' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
npm package: @mitchallen/pen-turtle
Description: Turtle based vector path generator
Author: Mitch Allen
Latest version: 0.33.0

@mitchallen/pen-turtle
==
Turtle pen drawing tool
--
<p>

<a href="https://npmjs.org/package/@mitchallen/pen-turtle">
    <img src="https://img.shields.io/github/actions/workflow/status/mitchallen/drawing-kit/check.yaml" alt="Build">
</a>

<a href="https://npmjs.org/package/@mitchallen/pen-turtle">
    <img src="http://img.shields.io/npm/dt/@mitchallen/pen-turtle.svg?style=flat-square" alt="Downloads">
</a>

  <a href="https://npmjs.org/package/@mitchallen/pen-turtle">
    <img src="http://img.shields.io/npm/v/@mitchallen/pen-turtle.svg?style=flat-square" alt="Version">
  </a>
  
  <a href="https://npmjs.org/package/@mitchallen/pen-turtle">
    <img src="https://img.shields.io/github/license/mitchallen/drawing-kit.svg">
  </a>

  <br />

  <a href='https://ko-fi.com/A0A0KEIOY' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi3.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
  
</p>

* * *

## Installation

```sh
$ npm init
$ npm install @mitchallen/pen-turtle --save
```

* * *

## Usage

```js
const factory = require('@mitchallen/pen-turtle');
const svgFactory = require("@mitchallen/pen-svg")

let width = 1024,
    height = 1024,
    cx = width / 2,
    cy = height / 2,
    writer = svgFactory.create({})

// create a pen

let pen1 = factory.create({
    x: cx * 1.5,
    y: cy * 1.5,
    color: 0xFF0000,    // red pen
    width: 4,           // pen width 
    alpha: 0.8          // pen alpha value
});

// create another pen

let pen2 = factory.create({
    x: cx * 0.5,
    y: cy * 0.5,
    color: 0x0000FF,    // blue pen
    width: 4,           // pen width 
    alpha: 0.8          // pen alpha value
});

let d1 = width / 4;

// put the pen down, move and turn multiple times

pen1.down();
for (let i = 0; i < 12; i++) {
    pen1
        .forward(d1)
        .turn(165)
}

let d2 = width / 5;

// put the other pen down, move and turn multiple times

pen2
    .down()
for (let i = 0; i < 5; i++) {
    pen2
        .forward(d2)
        .turn(145)
}

// add the pens to the writer

writer
    .addPen(pen1)
    .addPen(pen2)

// generate an svg and write it to a file

filename = "demo-pen-turtle.svg";

let svg = writer.writeSVG({
    width,
    height,
    filename,
});

// print the SVG markup to the screen

console.log(svg)

console.log(`\n\nOpen ${filename} in your favorite drawing program or browser.\n\n`)

```

## Documentation

* [PEN-TURTLE-DOC.md](https://github.com/mitchallen/drawing-kit/blob/main/packages/pen-turtle/PEN-TURTLE-DOC.md)

## Buy me a coffee!

If you like this package and find it useful, please show your appreciation and buy me a coffee!

<a href='https://ko-fi.com/A0A0KEIOY' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
npm package: @mitchallen/react-s3-cognito-get-text
Description: Get a Cognito protected text file from an S3 bucket
Author: Mitch Allen
Latest version: 0.2.0

@mitchallen/react-s3-cognito-get-text
==
Get a Cognito protected text file from an S3 bucket
--

<p align="left">
  <a href="https://circleci.com/gh/mitchallen/react-s3-cognito-get-text">
    <img src="https://img.shields.io/circleci/project/github/mitchallen/react-s3-cognito-get-text.svg" alt="Continuous Integration">
  </a>
  <a href="https://codecov.io/gh/mitchallen/react-s3-cognito-get-text">
    <img src="https://codecov.io/gh/mitchallen/react-s3-cognito-get-text/branch/master/graph/badge.svg" alt="Coverage Status">
  </a>
  <a href="https://npmjs.org/package/@mitchallen/react-s3-cognito-get-text">
    <img src="http://img.shields.io/npm/dt/@mitchallen/react-s3-cognito-get-text.svg?style=flat-square" alt="Downloads">
  </a>
  <a href="https://npmjs.org/package/@mitchallen/react-s3-cognito-get-text">
    <img src="http://img.shields.io/npm/v/@mitchallen/react-s3-cognito-get-text.svg?style=flat-square" alt="Version">
  </a>
  <a href="https://npmjs.com/package/@mitchallen/react-s3-cognito-get-text">
    <img src="https://img.shields.io/github/license/mitchallen/react-s3-cognito-get-text.svg" alt="License"></a>
  </a>
</p>

## Installation

    $ npm init
    $ npm install @mitchallen/react-s3-cognito-get-text --save
  
* * *

## Usage

Here is an example of retrieving a Cognito secured JSON file from S3:

```
import S3CognitoGetText from '@mitchallen/react-s3-cognito-get-text';

export default async function S3GetJsonFile( params ) {
    return S3CognitoGetText( params )
    .then( data => JSON.parse(data) );
}
```

How to call the method above:

```
import AWS from "aws-sdk";
import authUser from "@mitchallen/react-cognito-auth-user";
const testJsonFile = 'cognito/private/demo.json'

S3GetJsonFile({ 
    AWS: AWS,
    authUser: authUser,
    bucket: BUCKET,
    file: testJsonFile, 
    userPoolId: USER_POOL_ID,
    clientId: APP_CLIENT_ID,
    region: REGION, 
    identyPoolId: IDENTITY_POOL_ID
})
.then((data) => {
    alert(JSON.stringify(data));
})
.catch(function(err) {
    alert(err);
});
```

* * *

### Securing an S3 Bucket for Cognito

For information on how to secure a bucket for Cognito access, see:
* [@mitchallen/react-s3-connect](https://www.npmjs.com/package/@mitchallen/react-s3-connect)
   
* * *
 
## Repo(s)

* [bitbucket.org/mitchallen/react-s3-cognito-get-text.git](https://bitbucket.org/mitchallen/react-s3-cognito-get-text.git)
* [github.com/mitchallen/react-s3-cognito-get-text.git](https://github.com/mitchallen/react-s3-cognito-get-text.git)

* * *

## Contributing

In lieu of a formal style guide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.

* * *

## Version History

#### Version 0.2.0

* updated to version of s3 connector that passes AWS to authUser

#### Version 0.1.0 

* initial release

* * *
npm package: @mitchallen/three-maze-generator
Description: ThreeJS Maze Generator --
Author: Mitch Allen
Latest version: 0.1.2

# @mitchallen/three-maze-generator
ThreeJS Maze Generator
--

* * * 

<p align="left">
  <a href="https://npmjs.com/package/@mitchallen/three-maze-generator">
    <img src="http://img.shields.io/npm/dt/@mitchallen/three-maze-generator.svg?style=flat-square" alt="Downloads">
  </a>
  <a href="https://npmjs.org/package/@mitchallen/three-maze-generator">
    <img src="http://img.shields.io/npm/v/@mitchallen/three-maze-generator.svg?style=flat-square" alt="Version">
  </a>
  <a href="https://npmjs.com/package/@mitchallen/three-maze-generator">
    <img src="https://img.shields.io/npm/l/@mitchallen/three-maze-generator.svg?style=flat-square" alt="License">
  </a>
  <a href="https://www.jsdelivr.com/package/npm/@mitchallen/three-maze-generator">
    <img src="https://data.jsdelivr.com/v1/package/npm/@mitchallen/three-maze-generator/badge" alt="jsdelivr">
  </a>
</p>

# Usage

## Include maze generator dependency

```html
<html>
  <head>
  <title>threejs map generator</title>
  <link rel="stylesheet" href="./css/app.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r123/three.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@mitchallen/maze-generator@0.1.25/dist/maze-generator.min.js"></script>    
</head>
  <body>
    <script type="module" src="./app.js"></script>
  </body>
</html>
```

## Get from npm via jsdelivr 

For example, from within your **app.js** file:

```js
import {
  MAZEGEN,
} from 'https://cdn.jsdelivr.net/npm/@mitchallen/three-maze-generator@0.1.2/dist/three-maze-generator.modern.js'
```

* * *

# Example code

See the repo examples folder. 

## To run the example code

To run the example code go to the root of this project and run:

```
npm run web-server
```

Then browse to:

* http://localhost:8000/examples/demo-maze/

* * *

# Publishing

To publish your version of the package you must first setup an account and project in NPM.

This will boost the version number, push and publish:

```sh
git add .
git commit -m "updated code"
npm run pub:patch
```

As an alternative:

```sh
git add .
git commit -m "updated code"
npm version patch -m "Upgrade to %s for reasons"
```

* * * 

# References

* https://www.jsdelivr.com/
npm package: @mitchallen/three-xr-controller
Description: @mitchallen/three-xr-controller == ThreeJS XR Controller Library --
Author: Mitch Allen
Latest version: 0.1.4


@mitchallen/three-xr-controller
==
ThreeJS XR Controller Library
--

* * * 

<p align="left">
  <a href="https://npmjs.com/package/@mitchallen/three-xr-controller">
    <img src="http://img.shields.io/npm/dt/@mitchallen/three-xr-controller.svg?style=flat-square" alt="Downloads">
  </a>
  <a href="https://npmjs.org/package/@mitchallen/three-xr-controller">
    <img src="http://img.shields.io/npm/v/@mitchallen/three-xr-controller.svg?style=flat-square" alt="Version">
  </a>
  <a href="https://npmjs.com/package/@mitchallen/three-xr-controller">
    <img src="https://img.shields.io/npm/l/@mitchallen/three-xr-controller.svg?style=flat-square" alt="License">
  </a>
  <a href="https://www.jsdelivr.com/package/npm/@mitchallen/three-xr-controller">
    <img src="https://data.jsdelivr.com/v1/package/npm/@mitchallen/three-xr-controller/badge" alt="jsdelivr">
  </a>
</p>

# Usage

## Get from npm via jsdelivr 

```js
import {
  XRCONTROLLER,
} from 'https://cdn.jsdelivr.net/npm/@mitchallen/three-xr-controller@0.1.4/dist/three-xr-controller.modern.js'
```

* * *

# Example code

See the repo examples folder.

# Video Demo

A video of the example code, recorded on an Oculus Quest 2 can be found here:

* https://www.youtube.com/watch?v=hD2eemFEOMs

# Live VR demos

To see live VR demos using this package, browse to:

* https://vrmitch.com
* https://vrmitch.com/demo/threejs-quest-thumbstick-vr/src/ 
  * Oculus Quest Thumbstick Demo based on the project in the repo **examples/demo-controller-vr** folder
* The demo is also listed here:
  * https://vrmitch.com/demo/

If you browse to this site in your VR headset you can click the **Enter VR** button.

This package has been tested on:

* Oculus Go - the current demo only works on the Quest
* Oculus Quest 2

* * *

# WebXR Chrome Extension Issues

Please note that at the time of this writing there are issue with the button mapping of the WebXR Chrome Extension.

The button mappings in this package were confirmed on actual devices.

* * *

# Publishing

To publish your version of the package you must first setup an account and project in NPM.

This will boost the version number, push and publish:

```sh
git add .
git commit -m "updated code"
npm run pub:patch
```

As an alternative:

```sh
git add .
git commit -m "updated code"
npm version patch -m "Upgrade to %s for reasons"
```

* * * 

# References

* https://www.jsdelivr.com/
npm package: @mitchallen/three-xr-kit
Description: ThreeJS XR Kit --
Author: Mitch Allen
Latest version: 1.0.14

# @mitchallen/three-xr-kit
ThreeJS XR Kit
--

* * * 

<p align="left">
  <a href="https://npmjs.com/package/@mitchallen/three-xr-kit">
    <img src="http://img.shields.io/npm/dt/@mitchallen/three-xr-kit.svg?style=flat-square" alt="Downloads">
  </a>
  <a href="https://npmjs.org/package/@mitchallen/three-xr-kit">
    <img src="http://img.shields.io/npm/v/@mitchallen/three-xr-kit.svg?style=flat-square" alt="Version">
  </a>
  <a href="https://npmjs.com/package/@mitchallen/three-xr-kit">
    <img src="https://img.shields.io/npm/l/@mitchallen/three-xr-kit.svg?style=flat-square" alt="License">
  </a>
  <a href="https://www.jsdelivr.com/package/npm/@mitchallen/three-xr-kit">
    <img src="https://data.jsdelivr.com/v1/package/npm/@mitchallen/three-xr-kit/badge" alt="jsdelivr">
  </a>
</p>

# Usage

## Get from npm via jsdelivr 

```js
import {
  XRKIT,
} from 'https://cdn.jsdelivr.net/npm/@mitchallen/three-xr-kit@1.0.14/dist/three-xr-kit.modern.js'
```

* * *

# Example code

See the repo examples folder.

# Live demos

To see live demos using this package, browse to:

* https://vrmitch.com

If you browse to this site in your VR headset you can click the **Enter VR** button.

This code has been tested on:

* Oculus Go
* Oculus Quest 2

* * *

# Publishing

To publish your version of the package you must first setup an account and project in NPM.

This will boost the version number, push and publish:

```sh
git add .
git commit -m "updated code"
npm run pub:patch
```

As an alternative:

```sh
git add .
git commit -m "updated code"
npm version patch -m "Upgrade to %s for reasons"
```

* * * 

# References

* https://www.jsdelivr.com/
npm package: @mitchallen/uptime
Description: Returns process uptime as a string
Author: Mitch Allen
Latest version: 0.0.8

@mitchallen/uptime
==
Returns process uptime as a string
--

<p align="left">
  <a href="https://circleci.com/gh/mitchallen/uptime">
    <img src="https://img.shields.io/circleci/project/github/mitchallen/uptime.svg" alt="Continuous Integration">
  </a>
  <a href="https://codecov.io/gh/mitchallen/uptime">
    <img src="https://codecov.io/gh/mitchallen/uptime/branch/master/graph/badge.svg" alt="Coverage Status">
  </a>
  <a href="https://npmjs.org/package/@mitchallen/uptime">
    <img src="http://img.shields.io/npm/dt/@mitchallen/uptime.svg?style=flat-square" alt="Downloads">
  </a>
  <a href="https://npmjs.org/package/@mitchallen/uptime">
    <img src="http://img.shields.io/npm/v/@mitchallen/uptime.svg?style=flat-square" alt="Version">
  </a>
  <a href="https://npmjs.com/package/@mitchallen/uptime">
    <img src="https://img.shields.io/npm/l/@mitchallen/uptime.svg?style=flat-square" alt="License"></a>
  </a>

</p>

## Installation

    $ npm init
    $ npm install @mitchallen/uptime --save
  
* * *

## Testing

To test, go to the root folder and type (sans __$__):

    $ npm test
   
* * * 

<a name="module_uptime"></a>

## uptime
Module

<a name="module_uptime.toHHMMSS"></a>

### uptime.toHHMMSS() ⇒ <code>string</code>
Factory method

**Kind**: static method of <code>[uptime](#module_uptime)</code>  
**Returns**: <code>string</code> - that returns uptime as a string in the form of HH:MM:SS  
**Example** *(Usage example)*  
```js
    var uptime = require("@mitchallen/uptime");
 
    console.log(uptime.toHHMMSS())
```

* * *
 
## Repo(s)

* [github.com/mitchallen/uptime.git](https://github.com/mitchallen/uptime.git)

* * *

## Contributing

In lieu of a formal style guide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.
npm package: @mitchcivic/phan-wallet-mock
Description: Mock version of Phantom Wallet. ONLY USE FOR TESTING!!!
Author: Thorsten Lorenz
Latest version: 0.1.1

# phan-wallet-mock [![Build and Test](https://github.com/thlorenz/phan-wallet-mock/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/thlorenz/phan-wallet-mock/actions/workflows/build-and-test.yml)

Mock version of Phantom Wallet. **ONLY USE FOR TESTING!!!**

```ts
export async function setupWithPayer(
  payer = Keypair.generate(),
  net = LOCALNET
): Promise<{ payer: Keypair; wallet: PhantomWalletMock }> {
  const wallet = PhantomWalletMock.create(net, payer, 'confirmed')

  // NOTE: no user approval needed
  await wallet.connect()
  const signature = await wallet.connection.requestAirdrop(
    payer.publicKey,
    LAMPORTS_PER_SOL * 5
  )
  // NOTE: no user approval needed here either
  await wallet.connection.confirmTransaction(signature)

  return { payer, wallet }
}

const { wallet, payer } = await setupWithPayer()

// NOTE: this only works when no actual Phantom extension is present as then `window.solana`
// cannot be overwritten
window.solana = wallet
```

![assets/cypress.png](assets/cypress.png)

## API

[API documentation](https://thlorenz.github.io/phan-wallet-mock/docs/index.html)

## How it Works

Unlike with real wallets `phan-wallet-mock` requires the user to provide a full `Keypair` which
it uses under the hood to sign transactions and messages.

To do that it never requires the user's approval like the original does in order to ease
testing.

**THEREFORE MAKE SURE TO ONLY USE THIS WHILE RUNNING TESTS WITH FRESHLY GENERATED KEYPAIRS!!!**

## Apps using phan-wallet-mock

- [example app based on phantom wallet
  sandbox](https://github.com/thlorenz/phan-wallet-mock-react-example)

## LICENSE

MIT
npm package: @mitche50/solidity-parser-antlr
Description: A Solidity parser built from a robust ANTLR 4 grammar
Author: Federico Bond
Latest version: 0.4.11-alpha.0

solidity-parser-antlr
=====================

[![npm](https://img.shields.io/npm/v/solidity-parser-antlr.svg)](https://www.npmjs.com/package/solidity-parser-antlr)
[![Build Status](https://travis-ci.org/federicobond/solidity-parser-antlr.svg?branch=master)](https://travis-ci.org/federicobond/solidity-parser-antlr)

A Solidity parser built on top of a robust [ANTLR4 grammar](https://github.com/solidityj/solidity-antlr4).

### Usage

```javascript
import parser from 'solidity-parser-antlr';

var input = `
    contract test {
        uint256 a;
        function f() {}
    }
`
try {
    parser.parse(input)
} catch (e) {
    if (e instanceof parser.ParserError) {
        console.log(e.errors)
    }
}
```

The `parse` method also accepts a second argument which lets you specify the
following options, in a style similar to the _esprima_ API:

| Key      | Type    | Default | Description                                                                                                                                                                                          |
|----------|---------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| tolerant | Boolean | false   | When set to `true` it will collect syntax errors and place them in a list under the key `errors` inside the root node of the returned AST. Otherwise, it will raise a `parser.ParserError`.          |
| loc      | Boolean | false   | When set to `true`, it will add location information to each node, with start and stop keys that contain the corresponding line and column numbers. Column numbers start from 0, lines start from 1. |
| range    | Boolean | false   | When set to `true`, it will add range information to each node, which consists of a two-element array with start and stop character indexes in the input.                                            |


#### Example with location information

```javascript
parser.parse('contract test { uint a; }', { loc: true })

// { type: 'SourceUnit',
//   children:
//    [ { type: 'ContractDefinition',
//        name: 'test',
//        baseContracts: [],
//        subNodes: [Array],
//        kind: 'contract',
//        loc: [Object] } ],
//   loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 24 } } }

```

#### Example using a visitor to walk over the AST

```javascript
var ast = parser.parse('contract test { uint a; }')

// output the path of each import found
parser.visit(ast, {
  ImportDirective: function(node) {
    console.log(node.path)
  }
})
```

### Author

Federico Bond ([@federicobond](https://github.com/federicobond))

### License

MIT