text:
------------- | ------------- | ------------- | -------------
 **body** | [**\Lnd\Rest\Model\LnrpcVerifyMessageRequest**](../Model/LnrpcVerifyMessageRequest.md)|  |

### Return type

[**\Lnd\Rest\Model\LnrpcVerifyMessageResponse**](../Model/LnrpcVerifyMessageResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **walletBalance**
> \Lnd\Rest\Model\LnrpcWalletBalanceResponse walletBalance()

lncli: `walletbalance` WalletBalance returns total unspent outputs(confirmed and unconfirmed), all confirmed unspent outputs and all unconfirmed unspent outputs under control of the wallet.

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Lnd\Rest\Api\LightningApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->walletBalance();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LightningApi->walletBalance: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**\Lnd\Rest\Model\LnrpcWalletBalanceResponse**](../Model/LnrpcWalletBalanceResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
permalink: /en/examples/example-ply
---

# PLY Format

<script setup>
import ExamplePly from 'docs/examples/components/example-ply.vue';
</script>

<ExamplePly />

@[code](./components/example-ply.vue)

gha_language: Vue

gha_license_id: MIT


text:
# Hello World

### Webservers

- serve a folder as a website
- look for the `index.html` file in the root directory
- reference subdirectories as paths in the website
  ie: `localhost:8000/hello-world` will go to the `hello-world` folder

### What is an API?

- Application Programming Interface:  the set of actions and methods
		eg:  console.log, console.debug, etc

### Objects and References

- console - *engine* of the browser
- document - actual page itself
- window - browser window and meta (contains console and document)

repository: MicTheSquid/js-practice

repo_name: MicTheSquid/js-practice


text:
# trust inspect

<!---MARKER_GEN_START-->
Return low-level information about keys and signatures

### Options

| Name       | Type | Default | Description                                      |
|:-----------|:-----|:--------|:-------------------------------------------------|
| `--pretty` |      |         | Print the information in a human friendly format |

<!---MARKER_GEN_END-->

## Description

`docker trust inspect` provides low-level JSON information on signed repositories.
This includes all image tags that are signed, who signed them, and who can sign
new tags.

## Examples

### Get low-level details about signatures for a single image tag

Use the `docker trust inspect` to get trust information about an image. The
following example prints trust information for the `alpine:latest` image:

```console
$ docker trust inspect alpine:latest
```

The output is in JSON format, for example:

```json
[
  {
    "Name": "alpine:latest",
    "SignedTags": [
      {
        "SignedTag": "latest",
        "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
        "Signers": [
          "Repo Admin"
        ]
      }
    ],
    "Signers": [],
    "AdministrativeKeys": [
      {
        "Name": "Repository",
        "Keys": [
            {
                "ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd"
            }
        ]
      },
      {
        "Name": "Root",
        "Keys": [
            {
                "ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce"
            }
        ]
      }
    ]
  }
]
```

The `SignedTags` key will list the `SignedTag` name, its `Digest`,
and the `Signers` responsible for the signature.

`AdministrativeKeys` will list the `Repository` and `Root` keys.

If signers are set up for the repository via other `docker trust`
commands, `docker trust inspect` includes a `Signers` key:

```console
$ docker trust inspect my-image:purple
```

The output is in JSON format, for example:

```json
[
  {
    "Name": "my-image:purple",
    "SignedTags": [
      {
        "SignedTag": "purple",
        "Digest": "941d3dba358621ce3c41ef67b47cf80f701ff80cdf46b5cc86587eaebfe45557",
        "Signers": [
          "alice",
          "bob",
          "carol"
        ]
      }
    ],
    "Signers": [
      {
        "Name": "alice",
        "Keys": [
            {
                "ID": "04dd031411ed671ae1e12f47ddc8646d98f135090b01e54c3561e843084484a3"
            },
            {
                "ID": "6a11e4898a4014d400332ab0e096308c844584ff70943cdd1d6628d577f45fd8"
            }
        ]
      },
      {
        "Name": "bob",
        "Keys": [
            {
                "ID": "433e245c656ae9733cdcc504bfa560f90950104442c4528c9616daa45824ccba"
            }
        ]
      },
      {
        "Name": "carol",
        "Keys": [
            {
                "ID": "d32fa8b5ca08273a2880f455fcb318da3dc80aeae1a30610815140deef8f30d9"
            },
            {
                "ID": "9a8bbec6ba2af88a5fad6047d428d17e6d05dbdd03d15b4fc8a9a0e8049cd606"
            }
        ]
      }
    ],
    "AdministrativeKeys": [
      {
        "Name": "Repository",
        "Keys": [
            {
                "ID": "27df2c8187e7543345c2e0bf3a1262e0bc63a72754e9a7395eac3f747ec23a44"
            }
        ]
      },
      {
        "Name": "Root",
        "Keys": [
            {
                "ID": "40b66ccc8b176be8c7d365a17f3e046d1c3494e053dd57cfeacfe2e19c4f8e8f"
            }
        ]
      }
    ]
  }
]
```

If the image tag is unsigned or unavailable, `docker trust inspect` does not
display any signed tags.

```console
$ docker trust inspect unsigned-img

no signatures or cannot access unsigned-img
```

However, if other tags are signed in the same image repository,
`docker trust inspect` reports relevant key information:

```console
$ docker trust inspect alpine:unsigned
```

The output is in JSON format, for example:

```json
[
  {
    "Name": "alpine:unsigned",
    "Signers": [],
    "AdministrativeKeys": [
      {
        "Name": "Repository",
        "Keys": [
          {
            "ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd"
          }
        ]
      },
      {
        "Name": "Root",
        "Keys": [
          {
            "ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce"
          }
        ]
      }
    ]
  }
]
```

### Get details about signatures for all image tags in a repository

If no tag is specified, `docker trust inspect` will report details for all
signed tags in the repository:

```console
$ docker trust inspect alpine
```

The output is in JSON format, for example:

```json
[
  {
    "Name": "alpine",
    "SignedTags": [
      {
        "SignedTag": "3.5",
        "Digest": "b007a354427e1880de9cdba533e8e57382b7f2853a68a478a17d447b302c219c",
        "Signers": [
          "Repo Admin"
        ]
      },
      {
        "SignedTag": "3.6",
        "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
        "Signers": [
          "Repo Admin"
        ]
      },
      {
        "SignedTag": "edge",
        "Digest": "23e7d843e63a3eee29b6b8cfcd10e23dd1ef28f47251a985606a31040bf8e096",
        "Signers": [
          "Repo Admin"
        ]
      },
      {
        "SignedTag": "latest",
        "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
        "Signers": [
          "Repo Admin"
        ]
      }
    ],
    "Signers": [],
    "AdministrativeKeys": [
      {
        "Name": "Repository",
        "Keys": [
          {
            "ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd"
          }
        ]
      },
      {
        "Name": "Root",
        "Keys": [
          {
            "ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce"
          }
        ]
      }
    ]
  }
]
```

### Get details about signatures for multiple images

`docker trust inspect` can take multiple repositories and images as arguments,
and reports the results in an ordered list:

```console
$ docker trust inspect alpine notary
```

The output is in JSON format, for example:

```json
[
  {
    "Name": "alpine",
    "SignedTags": [
      {
        "SignedTag": "3.5",
        "Digest": "b007a354427e1880de9cdba533e8e57382b7f2853a68a478a17d447b302c219c",
        "Signers": [
          "Repo Admin"
        ]
      },
      {
        "SignedTag": "3.6",
        "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
        "Signers": [
          "Repo Admin"
        ]
      },
      {
        "SignedTag": "edge",
        "Digest": "23e7d843e63a3eee29b6b8cfcd10e23dd1ef28f47251a985606a31040bf8e096",
        "Signers": [
          "Repo Admin"
        ]
      },
      {
        "SignedTag": "integ-test-base",
        "Digest": "3952dc48dcc4136ccdde37fbef7e250346538a55a0366e3fccc683336377e372",
        "Signers": [
          "Repo Admin"
        ]
      },
      {
        "SignedTag": "latest",
        "Digest": "d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478",
        "Signers": [
          "Repo Admin"
        ]
      }
    ],
    "Signers": [],
    "AdministrativeKeys": [
      {
        "Name": "Repository",
        "Keys": [
          {
            "ID": "5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd"
          }
        ]
      },
      {
        "Name": "Root",
        "Keys": [
          {
            "ID": "a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce"
          }
        ]
      }
    ]
  },
  {
    "Name": "notary",
    "SignedTags": [
      {
        "SignedTag": "server",
        "Digest": "71f64ab718a3331dee103bc5afc6bc492914738ce37c2d2f127a8133714ecf5c",
        "Signers": [
          "Repo Admin"
        ]
      },
      {
        "SignedTag": "signer",
        "Digest": "a6122d79b1e74f70b5dd933b18a6d1f99329a4728011079f06b245205f158fe8",
        "Signers": [
          "Repo Admin"
        ]
      }
    ],
    "Signers": [],
    "AdministrativeKeys": [
      {
        "Name": "Root",
        "Keys": [
          {
            "ID": "8cdcdef5bd039f4ab5a029126951b5985eebf57cabdcdc4d21f5b3be8bb4ce92"
          }
        ]
      },
      {
        "Name": "Repository",
        "Keys": [
          {
            "ID": "85bfd031017722f950d480a721f845a2944db26a3dc084040a70f1b0d9bbb3df"
          }
        ]
      }
    ]
  }
]
```

### Formatting

You can print the inspect output in a human-readable format instead of the default
JSON output, by using the `--pretty` option:

### Get details about signatures for a single image tag

```console
$ docker trust inspect --pretty alpine:latest

SIGNED TAG          DIGEST                                                             SIGNERS
latest              1072e499f3f655a032e88542330cf75b02e7bdf673278f701d7ba61629ee3ebe   (Repo Admin)

Administrative keys for alpine:latest:
Repository Key: 5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd
Root Key:       a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce
```

The `SIGNED TAG` is the signed image tag with a unique content-addressable
`DIGEST`. `SIGNERS` lists all entities who have signed.

The administrative keys listed specify the root key of trust, as well as
the administrative repository key. These keys are responsible for modifying
signers, and rotating keys for the signed repository.

If signers are set up for the repository via other `docker trust` commands,
`docker trust inspect --pretty` displays them appropriately as a `SIGNER`
and specify their `KEYS`:

```console
$ docker trust inspect --pretty my-image:purple

SIGNED TAG          DIGEST                                                              SIGNERS
purple              941d3dba358621ce3c41ef67b47cf80f701ff80cdf46b5cc86587eaebfe45557    alice, bob, carol

List of signers and their keys:

SIGNER              KEYS
alice               47caae5b3e61, a85aab9d20a4
bob                 034370bcbd77, 82a66673242c
carol               b6f9f8e1aab0

Administrative keys for my-image:
Repository Key: 27df2c8187e7543345c2e0bf3a1262e0bc63a72754e9a7395eac3f747ec23a44
Root Key:       40b66ccc8b176be8c7d365a17f3e046d1c3494e053dd57cfeacfe2e19c4f8e8f
```

However, if other tags are signed in the same image repository,
`docker trust inspect` reports relevant key information.

```console
$ docker trust inspect --pretty alpine:unsigned

No signatures for alpine:unsigned

Administrative keys for alpine:unsigned:
Repository Key: 5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd
Root Key:       a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce
```

### Get details about signatures for all image tags in a repository

```console
$ docker trust inspect --pretty alpine

SIGNED TAG          DIGEST                                                             SIGNERS
2.6                 9ace551613070689a12857d62c30ef0daa9a376107ec0fff0e34786cedb3399b   (Repo Admin)
2.7                 9f08005dff552038f0ad2f46b8e65ff3d25641747d3912e3ea8da6785046561a   (Repo Admin)
3.1                 d9477888b78e8c6392e0be8b2e73f8c67e2894ff9d4b8e467d1488fcceec21c8   (Repo Admin)
3.2                 19826d59171c2eb7e90ce52bfd822993bef6a6fe3ae6bb4a49f8c1d0a01e99c7   (Repo Admin)
3.3                 8fd4b76819e1e5baac82bd0a3d03abfe3906e034cc5ee32100d12aaaf3956dc7   (Repo Admin)
3.4                 833ad81ace8277324f3ca8c91c02bdcf1d13988d8ecf8a3f97ecdd69d0390ce9   (Repo Admin)
3.5                 af2a5bd2f8de8fc1ecabf1c76611cdc6a5f1ada1a2bdd7d3816e121b70300308   (Repo Admin)
3.6                 1072e499f3f655a032e88542330cf75b02e7bdf673278f701d7ba61629ee3ebe   (Repo Admin)
edge                79d50d15bd7ea48ea00cf3dd343b0e740c1afaa8e899bee475236ef338e1b53b   (Repo Admin)
latest              1072e499f3f655a032e88542330cf75b02e7bdf673278f701d7ba61629ee3ebe   (Repo Admin)

Administrative keys for alpine:
Repository Key: 5a46c9aaa82ff150bb7305a2d17d0c521c2d784246807b2dc611f436a69041fd
Root Key:       a2489bcac7a79aa67b19b96c4a3bf0c675ffdf00c6d2fabe1a5df1115e80adce
```

Here's an example with signers that are set up by `docker trust` commands:

```console
$ docker trust inspect --pretty my-image

SIGNED TAG          DIGEST                                                              SIGNERS
red                 852cc04935f930a857b630edc4ed6131e91b22073bcc216698842e44f64d2943    alice
blue                f1c38dbaeeb473c36716f6494d803fbfbe9d8a76916f7c0093f227821e378197    alice, bob
green               cae8fedc840f90c8057e1c24637d11865743ab1e61a972c1c9da06ec2de9a139    alice, bob
yellow              9cc65fc3126790e683d1b92f307a71f48f75fa7dd47a7b03145a123eaf0b45ba    carol
purple              941d3dba358621ce3c41ef67b47cf80f701ff80cdf46b5cc86587eaebfe45557    alice, bob, carol
orange              d6c271baa6d271bcc24ef1cbd65abf39123c17d2e83455bdab545a1a9093fc1c    alice

List of signers and their keys for my-image:

SIGNER              KEYS
alice               47caae5b3e61, a85aab9d20a4
bob                 034370bcbd77, 82a66673242c
carol               b6f9f8e1aab0

Administrative keys for my-image:
Repository Key: 27df2c8187e7543345c2e0bf3a1262e0bc63a72754e9a7395eac3f747ec23a44
Root Key:       40b66ccc8b176be8c7d365a17f3e046d1c3494e053dd57cfeacfe2e19c4f8e8f
```

repository: docker/cli

gha_language: Go

repo_name: docker/cli


text:
# AWS Kubernetes FPGA Plugin

## Note

The FPGA plugin in this folder is only for AWS running XRT prior 2019.2. In XRT 2019.2,
the normal plugin in the parent folder works also for AWS, and there is no limitation
mentioned below for this plugin.

## About

This kubernetes FPGA device plugin is created for cluster running on aws F1 nodes.

The FPGA cards in F1 are different to those Xilinx ones. The differences are in both hardware
and software, so the plugin created for Xilinx FPGA & XRT doesn't work for AWS.

In this dedicated plugin,

* Shell version is hard-coded in XRT for aws, and it is not exported to sysfs. so the
plugin also hard-codes the shell version as "xilinx_aws-vu9p-f1-04261818_dynamic_5_0"
* Shell timestamp is not being used. To keep the same FPGA resource format, the shell
timestamp info is set as "0"

## Limitations on user pods

The plugin itself only relies on a readonly sysfs, so the same to the plugin for Xilinx
FPGAs, this aws plugin is also deployed as normal container in which the sysfs is mounted
as readonly. While for user pods, in order to run awssak scan/list and/or aws specific
fpga- commands, root access has to be granted within the container, which means, in addtion
to the install of xrt/aws-xrt and aws fpga tools from https://github.com/aws/aws-fpga.git,
the user pods have to be deployed in 'privileged' mode.

## Quick start

Once the kubernetes cluster and XRT is being setup on aws, you can follow following step to install and test the kubernetes plugin.

### Step 1: Deploy the plugin as daemonset
Download plugin source:
```
#git clone  https://github.com/Xilinx/FPGA_as_a_Service.git
```
Deploy FPGA device plugin as daemonset:
```
#kubectl create -f ./FPGA_as_a_Service/k8s-fpga-device-plugin/trunk/fpga-device-plugin.yml
```
To check the status of daemonset:
```
#kubectl get pod -n kube-system
```
Get node name:
```
#kubectl get node
```
Check FPGA resource in the worker node:
```
#kubectl describe node nodename
```
You should get the FPGA resources name under the pods information.

### Step 2: deploy a user pod
```
#kubectl create -f mypod.yaml
```

For more details, please refer to the README file of the Xilinx FPGA plugin
### Step 3: Run the test in pod
After user pod status turns to Running, run hello world in the pod:
```
#kubectl exec -it my-pod /bin/bash
#my-pod>source /opt/xilinx/xrt/setup.sh
#my-pod>export INTERNAL_BUILD=1
#my-pod>xbutil scan
#my-pod>cd /opt/test/
#my-pod>./helloworld vector_addition_hw.awsxclbin
```
**Note:**  Need to set the INTERNAL_BUILD=1 if xbutil complain the version not match:

## Build plugin binary

```
#./build
```

The output is the binary 'aws-fpga-device-plugin' in the current folder


text:
# Launching Python on Windows
Links: [Github](https://github.com/irsbugs/examples/blob/master/windows_extensions/README.md) or [Website](https://irsbugs.github.io/examples/windows_extensions/)
## The .py and .pyw extensions

On the Windows platform python scripts may be saved with either `.py` or `.pyw`
extensions. Double-clicking on a python file will load the file and python will
commence executing the script.

If the extension is `.py` a console window is opened and the python script
executes within this window. Once the script completes the console window is
closed. So that any output to the console window may be observed before the
window closes, then a delay needs to be added to the program to prevent its
immediate termination. For example, at the end of the python script add...

```
input("Hit Return key to exit program")
```

If the python script produces a GUI window (e.g. uses tkinter), then save the
script with a `.pyw` extension. When this launches no console window will be
opened. Only the GUI window will be displayed. This window will remain open
until terminated with a mouse click to close the window.

While developing a GUI script, it may be helpful to have debugging information
sent to a console window. If the GUI program under development is given a `.py`
extension, then a console window is also provided when the program is launched
and the GUI window is displayed. This console window will display output from a
`print()` function.

The following programs are included to highlight these features when
double-clicking to launch the programs on a Windows platform.

* 01_fibonacci.py

  Launches console window, executes and closes window. This happens too quickly
  to be able to view the fibonacci series of numbers that are generated.

* 02_fibonacci_pause.py

  Launches console window, executes and then pauses, waiting for Return key to
  be hit before it closes.

* 03_fibonacci_tkinter.pyw

  Launches a tkinter GUI window. Clicking on a button generates and displays
  the fibonacci series in a label.

* 04_fibonacci_tkinter.py

  Launches the tkinter GUI window and a console terminal window. Clicking on a
  button displays the fibonacci series in a label, plus the `print()` function
  issues debugging information which is sent to the console terminal window.

The launchers are located in C:\Windows\ as the applications `py.exe` and
`pyw.exe`. For more information on Python Launcher for Windows, see [PEP 397](https://www.python.org/dev/peps/pep-0397/).

* Author: Ian Stewart.
* Date: 2016 July
* Scripts are licensed CC0 https://creativecommons.org/publicdomain/zero/1.0/

repository: irsbugs/examples

repo_name: irsbugs/examples


text:
# Faithlife.Ananke

A library to help .NET Core Console applications adhere to Docker conventions, named after the Greek goddess of inevitability.

[![Build status](https://ci.appveyor.com/api/projects/status/36q5usicy788pyes/branch/master?svg=true)](https://ci.appveyor.com/project/Faithlife/ananke/branch/master)
[![NuGet](https://img.shields.io/nuget/v/Faithlife.Ananke.svg)](https://www.nuget.org/packages/Faithlife.Ananke)

# Documentation

* https://faithlife.github.io/FaithlifeAnanke/
* License: [MIT](LICENSE)
* [Version History](VersionHistory.md)
* [Contributing Guidelines](CONTRIBUTING.md)

repository: StephenClearyFaithlife/FaithlifeAnanke

repo_name: StephenClearyFaithlife/FaithlifeAnanke


text:
# FCCategoryOCKit

[![CI Status](https://img.shields.io/travis/2585299617<EMAIL_ADDRESS>[![Version](https://img.shields.io/cocoapods/v/FCCategoryOCKit.svg?style=flat)](https://cocoapods.org/pods/FCCategoryOCKit)
[![License](https://img.shields.io/cocoapods/l/FCCategoryOCKit.svg?style=flat)](https://cocoapods.org/pods/FCCategoryOCKit)
[![Platform](https://img.shields.io/cocoapods/p/FCCategoryOCKit.svg?style=flat)](https://cocoapods.org/pods/FCCategoryOCKit)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

## Installation

FCCategoryOCKit is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'FCCategoryOCKit'
```

## Author

<EMAIL_ADDRESS><EMAIL_ADDRESS>
## License

FCCategoryOCKit is available under the MIT license. See the LICENSE file for more info.


text:
# Sha1-cracker

Sha1-cracker is a command-line tool that gives
the user to crack a provided hash. It is written in Python.

## Installation

Place `main.py` and `password_cracker.py` in the current working directory,
along with the data files `known-salts.txt` and `top-100000-passwords.txt`.
Your own salts and password content files may be provided but they must
have the given names and it must be one value per line.

## Usage

`python main.py`

## Testing

`python -m unittest test_module`

## Contributing

Please open an issue to discuss improvements to this software.

## License

[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)

branch_name: refs/heads/main


text:
# rubygems-update

A small cookbook that helps you to update system's and chef-client's rubygems version as they a rarely updated via the system updates.

It was created to mitigate problems like that one: https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/

## How to use

This cookbook just runs `gem update --system` for both system's and chef-client's embedded RubyGems setup.

Just add it to your `run_list`: `recipe[rubgems-update]`

If you do not want either system or chef-client gem to be updated you can set attributes:

```ruby
node['rubygems-update']['chef-client']['skip'] = true

# or

node['rubgems-update']['system']['skip'] = true
```

Or you can add only the desired recipe: `recipe[rubgems-update::system]` / `recipe[rubgems-update::chef-client]`

## Supported platforms

Tested on:

- Ubuntu 16.04
- Debian 8
- Debian 9
- Centos 6
- Centos 7
- Fedora 26
- Fedora 27

## TODO

* Run 'update' commands a bit rarer then during every chef run.

## Sponsor

[![Sponsored by Evil Martians](https://evilmartians.com/badges/sponsored-by-evil-martians.png)](https://evilmartians.com)

repository: vgadreau/demo

repo_name: vgadreau/demo


text:
# npm-audit-resolver and npm7

The main idea behind why ignoring issues using audit-resolver is the precision with which it works. The vulnerability is ignored not on the package level, but a specific path in dependency tree and if the same vulnerable package surfaces elsewhere - potentially as a dependency of a dependency where it does get called in production code. In that case the warning needs to come back.

npm7's audit output is not structured the way it used to in npm6, but it contains almost all of the necessary information. I can reindex it to produce paths in dependency tree that audit-resolver uses. The only thing that's missing is deduplication.

*Example:*
a depends on b which depends on c
c is vulnerable
npm7 lists all a,b and c on the top level and the references in `.via` let me produce the chains:
```
a>b>c
b>c
c
```
But I don't need all of them.
If only a is a direct dependency, I need the a>b>c in audit-resolve file.
If both a and b are installed, I need a>b>c AND b>c.
There's no way to tell which items in npm7 audit output are direct dependencies so I have to run `npm ls --depth=0 --json` to get that information.

**ASK1**: An indication of that fact with a simple boolean or `.depth` field would do a lot to help.
I thought of using the "nodes" field, but it seems with deduplication they often land at the top.

**RESULT**: I've added `isDirect` field to arborist output and it propagates to `npm audit --json`, so this is addressed.

Current audit doesn't seem to have enough information available in it to construct a valid fix command - install or update, dev dependency or not, depth, that's missing from the audit output in npm7 and audit-resolver doesn't have a command to run to fix an individual issue and record the fact it was fixed.

**ASK2**: add a `.command` field to fixAvailable or share/expose the algorithm with which npm audit fix decides what to do.

**RESULT**: there was no feasible way to get the commands. They didn't always work while they were originally available.

repository: naugtur/npm-audit-resolver

gha_language: JavaScript

repo_name: naugtur/npm-audit-resolver


text:
# Code Structure

Laravel Rocket uses common structure and design patterns of Laravel and adding some components ( Service, Repository, Helper, Presenter .. ) to make their responsibility more smaller.

You need to understand responsibilities of each components and follow the rules

## Component details

### Controller

Responsibilities of controllers are the following:

  * Input data validation ( Basic validation should be done by Request class)
  * Call multiple services' business logic methods
  * Build Response Data and return it

You MUST NOT do the following things on controllers

#### Must not generate Model instance directory

All controllers must use repositories to access ( get / create / update / delete ) models. Must not create model instance and/or use model's static method directly. Accessing constant of models are only exception to use Model in controllers.

#### Must not write business logics directory

Use service to write business logics. Repositoroes are not a place to write business logics. You need to use services to write business logics and

#### Only action handler methods allowed in the Controller.

Never add protected/private methods on the controllers even if the purpose is that to make the code DRY. You need to move these kind of code to service ( business logic ) layer.

### Services

Responsibilities of services are the following:

* Write business logics.

You can create new Service with the command `php artisan rocket:make:service [ServiceName]`. This command generate service, service interface, and unit test.

Call service from other service is allowed, but be careful with circler dependency.

You MUST NOT do the following things on services

#### Must not generate Model directory

All services must use repositories to access ( get / create / update / delete ) models same as controllers. Must not create model instance and/or use model's static method directly. Accessing constant of models are only exception to use Model in services.

#### Should not create service manually

Need to use `rocket:make:service` command to create new service.

### Repositories

Responsibilities of repositories are the following:

  * Interface to the Model and Service/Controller.
  * Provide the way to create/get/update/delete Model
  * One repository must only access to one target model. It means app has same number of repositories as models.

You can generate repositories with `rocket:generate:from-mwb` command along with models, presenters, admin CRUDs and all related tests.

* Must NOT do:
  * Must not access multiple models from one repository.
  * Must not access Service / Controller methods.
  * Must not access other repository's methods/properties.
* Only Repositories can access to the models directory.
  * All other classes must use repository to create/get/update/delete Models.
*
  * This command generate repository, repository interface, and unit test.
  * Should not create repository manually, should use this command to create.

### Models
* Responsibilities of models are the following:
  * Represents entities.
* Must NOT do:
  * Convert data to show on the view ( it is presenter's responsibility )
  * Must not access Repository / Service / Controller methods.
* Changed name space from default `App` to `App\Models`
* You can create new Model with the command `php artisan rocket:make:model [ModelName]`.
  * This command generate model, presenter, and unit test.
  * Should not create model manually, should use this command to create.
* And if model has some kind of "type" or "status" ( and variations are defined in the system and not stored in the table), need to have set of constants which include all variations of status/role.
  * `status` of `Reports` model can have the following constants:
    * STATUS_CREATED = 'created'
    * STATUS_SUBMITTED = 'submitted'
    * STATUS_APPROVED = 'approved'
    * STATUS_REJECTED = 'rejected'

### Presenters
* Responsibilities of Presenter are the following:
  * Presentation for Models
  * Provide methods which is used for views.
* You can create new Presenter with the command `php artisan rocket:make:model [ModelName]` accompany with Models
  * This command generate model, presenter, and unit test.
  * Should not create presenter manually, should use this command to create.
* Must NOT do:
  * Must not change any data in the Model.
  * Must not access Repository / Service / Controller methods.
* All methods in the presenters must be stateless. Should not store any state in the presenters.

### Helpers
* Responsibilities of Helper are the following:
  * Provide utility functions which can be called from every other classes ( Include Models/Responsibilities/Services/Controllers/Presenters/Views).
* All helpers have facade to access. So you can access like `\DatetimeHelper::now()`.
* You can create new Helper with the command `php artisan rocket:make:helper [HelperName]`.
  * This command generate helper, helper interface, unit test, and facade test.
  * Should not create helper manually, should use this command to create.

There are several helpers defined in the [laravel-rocket/foundation](https://github.com/laravel-rocket/foundation/tree/master/src/Helpers).

|Name|Purpose|
|:--|:--|
|ArrayHelper||
|CollectionHelper||
|DataHelper|Provide some functions to handle data stored in the system. Such as list of countries , currencies, languages|
|DateTimeHelper|Provide some functions to handle date & time|
|FileHelper||
|LocaleHelper||
|PaginationHelper||
|RedirectHelper||
|StringHelper||
|TypeHelper||
|URLHelper|Provide some functions to handle assets and urls|

## Interface and DI

All repositories/services/helpers must be provided with interface. And to use them ( except for helpers ), you should use DI( Dependency Injection) on constructor of each classes.

Be careful with circler dependency.

## DateTime and Timezone

All datetime handling, you must not directly create `DateTime` or `Carbon` classes, but use `DateTimeHelper`. Because `DateTimeHelper` is designed to handle Timezone properly.

In the app, there are 2 timezone. One is For Database, and another one is for presentation ( shown on the web pages ). If you use `DateTimeHelper`, all datetime are stored with proper timezone( UTC ) to the database, and shown in the user's timezone.

Timezone settings are stored in the app.php config.

gha_language: HTML


text:
# News List Feed

This is a single OpenSource Example News Reader Android APP.

The data is provide by [newsapi.org](https://newsapi.org)

## Android Features
- appcompat-v7
- AsyncTask & Loaders.
- JSON Parsing.
- OkHTTP3
- Glide

## Description

- Search news from more than 30 sources.
- Retrieves data from newsapi.org API.
- Displays the tilte, time, and newscover (optional) of the first 20 results.
- Can filter by languaje (Spanish and English), news source (5 selectable sources).

## Screenshot

![Phone Screenshot 2](https://user-images.githubusercontent.com/8432815/66333140-ac3bf280-e90c-11e9-9e8b-b48943bdfca5.jpg)

## License

This project was made by Miguel Manzo as part of the Nanodegree At Udacity.

As part of Udacity Honor code, your submissions must be your own work, hencesubmitting this project as yours will cause you to break the Udacity Honor Code and the suspension of your account.

Me, the author of the project, allow you to check the code as a reference, but if you submit it, it's your own responsibility if you get expelled.

Copyright (c) 2019 Miguel Manzo

Besides the above notice, the following license applies and this license notice must be included in all works derived from this project.

[MIT](https://choosealicense.com/licenses/mit/)

repository: miguelmanzo/NewsFeedApp

repo_name: miguelmanzo/NewsFeedApp


text:
# Vue.js 2 Web Development Projects
This is the code repository for [Vue.js 2 Web Development Projects](https://www.packtpub.com/web-development/vuejs-2-web-development-projects?utm_source=github&utm_medium=repository&utm_campaign=9781787127463), published by [Packt](https://www.packtpub.com/?utm_source=github). It contains all the supporting project files necessary to work through the book from start to finish.
## About the Book
Do you want to make your web application amazingly responsive? Are you unhappy with your app's performance and looking forward to trying out ways to make your app more powerful? Then Vue.js, a framework for building user interfaces, is a great choice, and this book is the ideal way to put it through its paces.

This book's project-based approach will get you to build six stunning applications from scratch and gain valuable insights in Vue.js 2.5. You'll start by learning the basics of Vue.js and create your first web app using directives along with rich and attractive user experiences. You will learn about animations and interactivity by creating a browser-based game. Using the available tools and preprocessor, you will learn how to create multi-page apps with plugins. You will create highly efficient and performant functional components for your app. Next, you will create your own online store and optimize it. Finally, you will integrate Vue.js with the real-time Meteor library and create a dashboard showing real-time data.

By the end of this book you will have enough skills and will have worked through enough examples of real Vue.js projects to create interactive professional web applications with Vue.js 2.5.

## Instructions and Navigation
All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter02.

The code will look like the following:
```
<top-bar :turn="turn" :current-player-index="currentPlayerIndex"
      :players="players" />
```

To follow this book, you will only need a text or code editor (Visual Studio Code and Atom are recommended) and a web browser (preferably the latest version of Firefox or Chrome for the development tools).

## Related Products
* [Vue.js 2 and Bootstrap 4 Web Development](https://www.packtpub.com/web-development/vuejs-2-and-bootstrap-4-web-development?utm_source=github&utm_medium=repository&utm_campaign=9781788290920)

* [Web development with Vue.js 2 [Video]](https://www.packtpub.com/web-development/web-development-vuejs-2-video?utm_source=github&utm_medium=repository&utm_campaign=9781788395298)

* [The Ultimate Vue JS 2 Developers Course [Video]](https://www.packtpub.com/application-development/ultimate-vue-js-2-developers-course-video?utm_source=github&utm_medium=repository&utm_campaign=9781788394086)


text:
## Code Checkin Process

1. A code change should be proceeded by entering an Issue into github.
2. Upon approval of the issue (e.g., bug scrub), an assignee can start working on the code change.
3. Development of new and changed code follows Test Driven Development (TDD).
4. A set of tests covering the new/changed code must be added.
5. The spec must be updated accordingly.
6. A pull request can then be made. Each pull request can cover only one issue.
7. The comment in the Issue must be updated summarizing what was changed, why and affirming that tests were added and spec updated.

*Thanks,
the Gap Team*

gha_language: Jupyter Notebook


text:
---
layout: post
title: Working on creating OpenHack - A hackathon management system.
date: 2019-02-12
categories: "updates"
tag: "#blog"
---

I have started working on developing a hackathon management system using Spring Framework as a project to be carried out under the course Enterprise Application Development. We'll be working to make use of various Spring modules like AOP, Data Access, IOC, MVC and many more.


text:
# fs-read-stream-over-http

**Deprecated in favor of [`stream-http`](https://github.com/jhiesey/stream-http).**

---

**Isomorphic [`fs.createReadStream`](https://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options).** Delegates to core [`fs`](https://nodejs.org/api/fs.html) in Node, uses the [Browserify](http://browserify.org/) [`http` shim](https://github.com/jhiesey/stream-http) in the browser.

[![npm version](https://img.shields.io/npm/v/fs-read-stream-over-http.svg)](https://www.npmjs.com/package/fs-read-stream-over-http)
[![build status](https://api.travis-ci.org/derhuerst/fs-read-stream-over-http.svg?branch=master)](https://travis-ci.org/derhuerst/fs-read-stream-over-http)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/fs-read-stream-over-http.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)

## Installing

```shell
npm install fs-read-stream-over-http
```

## Usage

You need to provide a function that maps local paths such as `./foo/bar.txt` to a URL:

```js
const path = require('path')

const pathToUrl = local => 'https://example.org' + path.resolve('/', local)
```

It will be used in the browser, to fetch the file over HTTP. In Node, the local path will be used.

```js
const fsCreateReadStream = require('fs-read-stream-over-http')

fsCreateReadStream('/foo/bar.txt', pathToUrl, {encoding: 'utf8'})
.on('data', console.log)
.once('end', () => console.log('end!'))
```

`fsCreateReadStream` will throw when called with options that can't be fulfilled in the browser (e.g. `flags`). Otherwise it will return a [stream](https://nodejs.org/api/stream.html#stream_readable_streams) of decoded data.

## Contributing

If you have a question or have difficulties using `fs-read-stream-over-http`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to [the issues page](https://github.com/derhuerst/fs-read-stream-over-http/issues).

license: ISC

repository: derhuerst/fs-read-stream-over-http

gha_license_id: ISC

repo_name: derhuerst/fs-read-stream-over-http


text:
# Hacker News to JSON #

Save 'saved stories' from a Hacker News account to a simple JSON format.

The script parses the saved stories page on HN (http://news.ycombinator.com) and, for each link on each page of the saved stories history it outputs an entry to a JSON document with information taken from the Hacker News API. (https://github.com/HackerNews/API)

The script is meant to be launched from the command line.

Originally developed on iPad by Luciano Fiandesio with the awesome Pythonista (http://omz-software.com/pythonista/)
and modified for JSON output by John David Pressman.

## How to use ##

`python hn2json.py [hn user] [hn password] -n [Number of pages to grab] -f [JSON filename]`

repository: JD-P/HackerNewsToJSON

repo_name: JD-P/HackerNewsToJSON


text:
# Memoization #

Memoization is an optimization technique that caches the result of expensive processes for the duration of the request. This type of caching is handled by the `Titon\Common\Cacheable` and `Titon\Common\StaticCacheable` traits.

```hack
class Foo {
    use Titon\Common\Cacheable;
}

// Static class
class Bar {
    use Titon\Common\StaticCacheable;
}
```

    The API for StaticCacheable is the same as Cacheable, excluding toggle support.

## Caching Data ##

There are 2 ways to cache data in the class -- the first being the preferred way, using `cache()`. The `cache()` method handles the automatic checking, fetching, and caching of data through a callback.

```hack
public function doExpensiveProcess(): mixed {
    return $this->cache(__METHOD__, ($self) ==> {
        // Expensive calculation
    });
}
```

In the example above, if the key defined by `__METHOD__` exists, then the cached result is returned, else it is set using the value from the defined callback.

    The class instance is passed as the 1st argument to the callback. This does not apply when using StaticCacheable.

The other way to cache data, is with the `setCache()` method. This method is useful when you want to manually handle the entire checking and fetching process using different steps. The following example is functionality equivalent to `cache()`.

```hack
public function doExpensiveProcess(): mixed {
    $key = $this->createCacheKey(__METHOD__);

    if ($this->hasCache($key)) {
        return $this->getCache($key);
    }

    // Expensive calculation

    return $this->setCache($key, $value);
}
```

## Retrieving Data ##

Besides the `cache()` method mentioned previously, the `getCache()` method is used for retrieving an item by a unique key. If the key does not exist, then `null` is returned.

```hack
$this->getCache('foo'); // Cached value or null
```

## Removing Cached Items ##

To remove a cached item, use the `removeCache()` method.

```hack
$this->removeCache('foo');
```

Or to remove all cached items, use `flushCache()`.

```hack
$this->flushCache();
```

## Toggling Caching ##

There may be times where caching needs to be disabled for a short duration. This can be achieved with the `toggleCache()` method. The method accepts a boolean, which either enables or disables caching.

```hack
$this->toggleCache(false); // Disable

// Do something that shouldn't be cached

$this->toggleCache(true); // Enable
```

To check the state of caching, use the `isCacheEnabled()` method.

## Creating Unique Keys ##

To create a unique cache key, one can use the `createCacheKey()` method. This method accepts scalar and traversable values. When a traversable is used, each item is separated with a `-` and optionally hashed.

```hack
$this->createCacheKey('foo'); // foo
$this->createCacheKey(['foo', 'bar']); // foo-bar
$this->createCacheKey(['foo', 'bar', ['nested', 'array']]); // foo-bar-d3e545e5b6dd7d1c9c7be76d5bb18241
```

    This method is automatically called within all the other methods.


text:
# Automate the Boring Stuff with Python
## Chapter 5 Projects

## Fantasy Game Inventory

You are creating a fantasy video game. The data structure to model the player’s
inventory will be a dictionary where the keys are string values describing the
item in the inventory and the value is an integer value detailing how many of
that item the player has.

For example, the dictionary value below means the player has `1` rope, `6`
torches, `42` gold coins, and so on.

```
{'rope': 1, 'torch': 6, 'gold coin': 42, 'dagger': 1, 'arrow': 12}
```

Write a function named `displayInventory()` that would take any possible
"inventory" and display it like the following:

> ```
> Inventory:
> 12 arrow
> 42 gold coin
> 1 rope
> 6 torch
> 1 dagger
> Total number of items: 62
> ```

Hint: You can use a for loop to loop through all the keys in a dictionary.

```
# inventory.py
stuff = {'rope': 1, 'torch': 6, 'gold coin': 42, 'dagger': 1, 'arrow': 12}
def displayInventory(inventory):
    print("Inventory:")
    item_total = 0
    for k, v in inventory.items():
        # FILL THIS PART IN
    print("Total number of items: " + str(item_total))
displayInventory(stuff)
```

## List to Dictionary Function for Fantasy Game Inventory

Imagine that a vanquished dragon’s loot is represented as a list of strings like
this:

```
dragonLoot = ['gold coin', 'dagger', 'gold coin', 'gold coin', 'ruby']
```

Write a function named `addToInventory(inventory, addedItems)`, where the
inventory parameter is a dictionary representing the player’s inventory (like
in the previous project) and the `addedItems` parameter is a list like
`dragonLoot`.
The `addToInventory()` function should return a dictionary that represents the
updated inventory.
Note that the `addedItems` list can contain multiples of the same item.
Your code could look something like this:

```
def addToInventory(inventory, addedItems):
    # your code goes here
inv = {'gold coin': 42, 'rope': 1}
dragonLoot = ['gold coin', 'dagger', 'gold coin', 'gold coin', 'ruby']
inv = addToInventory(inv, dragonLoot)
displayInventory(inv)
```

The previous program (with your displayInventory() function from the previous project) would output the following:

> ```
> Inventory:
> 45 gold coin
> 1 rope
> 1 ruby
> 1 dagger
> Total number of items: 48
> ```

repository: jakdept/pythonbook

repo_name: jakdept/pythonbook


text:
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: 'Cognitive Security: Securing Burgeoning Landscape of Mobile Network'
subtitle: ''
summary: ''
authors:
- Yao Zheng
- Assad Moini
- Wenjing Lou
- Y. Thomas Hou
- Yuichi Kawamoto
tags:
- mobile network
- behavior anaysis
- authentication
- machine learning
categories: []
date: '2016-07-01'
lastmod: 2020-12-29T17:41:08-10:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-12-30T03:41:06.750161Z'
publication_types:
- '2'
abstract: The rapid proliferation of personal wearable as well as embedded devices
  point to the emergence of networks of unprecedented size and complexity in the near
  future. Unfortunately, traditional network security solutions fall short of addressing
  the unique security requirements of the emerging environment given their general
  emphasis on administratively managed, preconfigured security context and strong
  physical security mechanisms. To cope with the security challenges of this emerging
  environment, novel cognitive-inspired security architectures have been proposed
  that emphasize dynamic, autonomous trust management. Cognitive security systems
  take advantage of sensing and computing capabilities of smart devices to analyze
  raw sensor data and apply machine learning techniques to make security decisions.
  In this article, we present a canonical representation of cognitive security architectures
  and examine the practicality of using these architectures to address the security
  challenges of rapidly growing networks of mobile/embedded autonomous devices including
  the ability to identify threats simply based on symptoms, without necessarily understanding
  attack methods. Using authentication as the main focus, we introduce our canonical
  representation and define various categories of contextual information commonly
  used by cognitive security architectures to handle authentication requirements,
  and highlight key advantages and disadvantages of each category. We then examine
  three grand challenges facing the cognitive security research including the tension
  between automation and security, the unintended consequences of using machine learning
  techniques as a basis for making security decisions, and the revocation problem
  in the context of cognitive security. We conclude by offering some insight into
  solution approaches to these challenges.
publication: '*IEEE Network*'
doi: 10.1109/MNET.2016.7513866

# Custom links (uncomment lines below)
# links:
# - name: Custom Link
#   url: http://example.org

links:
- name: PDF
  url: https://api.zotero.org/users/3468578/publications/items/RMDTWK39/file/view
---


text:
# Sanblasia L.Andersson GENUS

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Nordic J. Bot. 4: -. [21-23]

#### Original name
null

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Battleship

Battleship is a 2 player game that can be played locally. The ship locations are randomly generated and cannot be moved. When it is the user's turn, he/she clicks a square on the game board to shoot. Once a user wins, it will display the winner at the top of the page.

## Getting Started

In order to run a dev server on your local host, you will need to first install all the required npm packages.

`cd react-backend/client`

`npm install`

Next you will need to navigate to the client folder and execute:

`cd react-backend/client`

`npm start`

This will spin up a server on port 3000 for the frontend.

## Built With

* React
* Redux

## Authors

Austin Tackaberry

## License

This project is licensed under the MIT License - see the LICENSE.md file for details

repository: austintackaberry/battleship

repo_name: austintackaberry/battleship


text:
# [Sierpinski](https://de.wikipedia.org/wiki/Wac%C5%82aw_Sierpi%C5%84ski)

![Sierpinski Triangle](https://upload.wikimedia.org/wikipedia/commons/3/38/Sierpinski-zoom4-ani.gif)

## Sample Preview [Sierpinski triangle](https://en.wikipedia.org/wiki/Sierpinski_triangle)
![Sierpinski Triangle Sample](https://github.com/NoLogig/Sierpinski/blob/master/src/assets/sierpinksi.gif)

## Notes to Sierpinski & his contributions
*Wacław Franciszek Sierpiński (\*14 March 1882 – †21 October 1969)*
 was a Polish mathematician. He was known for contributions to **set theory** (research on the **axiom of choice** and the generalised **continuum hypothesis**), **number theory**, **theory of functions** and **topology**.

Well-known fractals are named after him (the **[Sierpinski triangle](https://en.wikipedia.org/wiki/Sierpinski_triangle)**, the **Sierpinski carpet** and the **Sierpinski curve**), as are **Sierpinski numbers** and the associated **Sierpiński problem**.

### [Sierpinski triangle](https://en.wikipedia.org/wiki/Sierpinski_triangle)

The **Sierpinski triangle**, also called the **Sierpinski gasket** or the **Sierpinski Sieve**, is a **fractal** and **attractive fixed set** with the overall *shape of an equilateral triangle, subdivided recursively into smaller equilateral triangles*. Originally constructed as a curve, this is one of the basic examples of *self-similar* sets, i.e., it is a mathematically generated pattern that is reproducible at any magnification or reduction.

repository: NoLogig/Inspiration-Station

gha_language: TypeScript

repo_name: NoLogig/Inspiration-Station


text:
# functions description

* 1. [ General functions](#Generalfunctions)
	* 1.1. [initPTB](#initPTB)
	* 1.2. [cleanUp](#cleanUp)
	* 1.3. [getExperimentStart](#getExperimentStart)
	* 1.4. [getExperimentEnd](#getExperimentEnd)
	* 1.5. [deg2Pix](#deg2Pix)
	* 1.6. [eyeTracker](#eyeTracker)
	* 1.7. [standByScreen](#standByScreen)
	* 1.8. [waitForTrigger](#waitForTrigger)
	* 1.9. [readAndFilterLogfile](#readAndFilterLogfile)
* 2. [Keyboard functions: response collection and aborting experiment](#Keyboardfunctions:responsecollectionandabortingexperiment)
	* 2.1. [testKeyboards](#testKeyboards)
	* 2.2. [getResponse](#getResponse)
	* 2.3. [pressSpace4me](#pressSpace4me)
* 3. [Fixations](#Fixations)
	* 3.1. [drawFixationCross](#drawFixationCross)
* 4. [Drawing dots](#Drawingdots)
* 5. [Drawing apertures](#Drawingapertures)
* 6. [Randomization](#Randomization)
	* 6.1. [shuffle](#shuffle)
	* 6.2. [setTargetPositionInSequence](#setTargetPositionInSequence)
	* 6.3. [repeatShuffleConditions](#repeatShuffleConditions)

##  1.  General functions

###  1.1. initPTB

This will initialize PsychToolBox

-   screen
-   the window opened takes the whole screen by default
-   set in debug mode with window transparency if necessary
-   can skip synch test if you ask for it (nicely)
-   gets the flip interval
-   computes the pixel per degree of visual angle
-   set font details
-   keyboard
-   sound

###  1.2. cleanUp

A wrapper function to close all windows, ports, show mouse cursor, close keyboard queues
and give access back to the keyboards.

###  1.3. getExperimentStart

Wrapper function that will show a fixation cross and collect a start timestamp in `cfg.experimentStart`

###  1.4. getExperimentEnd

Wrapper function that will show a fixation cross and display in the console the whole experiment's duration in minutes and seconds

###  1.5. deg2Pix

For a given field value in degrees of visual angle in the input `structure`,
this computes its value in pixel using the pixel per degree value of the `cfg` structure
and returns a structure with an additional field with Pix suffix holding that new value.

###  1.6. eyeTracker

This will handle the Eye Tracker (EyeLink set up) and can be called to initialize the connection and start the calibration, start/stop eye(s) movement recordings and save the `*.edf` file (named with BIDS specification from cpp-lln-lab/CPP_BIDS).

There are several actions to perform:

- Calibration: to initialize EyeLink and run calibration
  - 'default calibration' (default) will run a calibration with 6 points
  - 'custom calibration'  (cfg.eyeTracker.defaultCalibration = 'false') will run a calibration with 6 points but the experimenter can choose their position on the screen
- StartRecording: to start eye movements recording
- StopRecordings: to stop eye movements recornding
- Shutdown: to save the `.edf` file with BIDS compliant name, from cpp-lln-lab/CPP_BIDS, in the output folder and shut the connection between the stimulation computer and the EyeLink computer

###  1.7. standByScreen

It shows a basic one-page instruction stored in `cfg.task.instruction` and wait for `space` stroke.

###  1.8. waitForTrigger

Counts a certain number of triggers coming from the mri/scanner before returning.
Requires number of triggers to wait for.

###  1.9. readAndFilterLogfile

Displays in the command window part of the `*events.tsv` file filterd by an element (e.g. 'trigger'). It can take the last output produced (through `cfg`) or any output BIDS compatible (through file path).

##  2. Keyboard functions: response collection and aborting experiment

###  2.1. testKeyboards

Checks that the keyboards asked for properly connected.

If no key is pressed on the correct keyboard after the timeOut time this exits with an error.

###  2.2. getResponse

It is wrapper function to use `KbQueue` which is definitely what you should use to collect responses.

You can easily collect responses while running some other code at the same time.

It will only take responses from one device which can simply be the "main keyboard"
(the default device that PTB will find) or another keyboard connected to the computer
or the response box that the participant is using.

You can use it in a way so that it only takes responses from certain keys and ignore others (like
the triggers from an MRI scanner).

If you want to know more on how to use it check its help section and the `CPP_getResponseDemo.m`.

In brief, there are several actions you can execute with this function.

-   init: initialize the buffer for key presses on a given device (you can also specify the keys of interest that should be listened to).
-   start: start listening to the key presses (carefully insert into your script - where do you want to start buffering the responses).
-   check: till that point, it will check the buffer for all key presses.
    -   It only reports presses on the keys of interest mentioned at initialization.
    -   It **can** also check for presses on the escape key and abort if the escape key is part of the keys of interest.
-   flush: Empties the buffer of key presses in case you want to discard any previous key presses.
-   stop: Stops buffering key presses. You can still restart by calling "start" again.
-   release: Closes the buffer for good.

###  2.3. pressSpace4me

Use that to stop your script and only restart when the space bar is pressed.

##  3. Fixations

###  3.1. drawFixationCross

Define the parameters of the fixation cross in `cfg` and `expParameters` and this does the rest.

##  4. Drawing dots

##  5. Drawing apertures

##  6. Randomization

Functions that can be used to create random stimuli sequences.

###  6.1. shuffle

Is just there to replace the Shuffle function from PTB in case it is not in the path. Can be useful for testing or for continuous integration.

###  6.2. setTargetPositionInSequence

For a sequence of length `seqLength` where we want to insert `nbTarget` targets, this will return `nbTarget` random position in that sequence and make sure that they are not in consecutive positions.

###  6.3. repeatShuffleConditions

Given `baseConditionVector`, a vector of conditions (coded as numbers), this will create a longer vector made of `nbRepeats` of this base vector and make sure that a given condition is not repeated one after the other.


text:
# sclabor
scRNA-seq analysis of placental tissues at labor

### This code is associated with the paper from Pique-Regi et al., "Does the human placenta express the canonical cell entry mediators for SARSCoV-2?". eLife, 2020. http://dx.doi.org/10.7554/eLife.58716

repository: elifesciences-publications/sclabor

repo_name: elifesciences-publications/sclabor


text:
# PHP Message Queue
A simple php implementation of message queue (or message queue) which
can write messages and read messages in a FIFO manner.

[![Build Status](https://travis-ci.org/bozerkins/php-message-queue.svg?branch=master)](https://travis-ci.org/bozerkins/php-message-queue)
[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)

## Installation
```sh
composer require bozerkins/php-message-queue
```

## Creating a queue
To define a queue you first need to define some environment configurations.
An environment of a queue messaging system defined what folders will be used for operations.
```php
$queue = new \MessageQueue\Queue(
    new \MessageQueue\Environment(
        [
            'dir' => '/var/my-queue-folder',
            'queue' => 'my-queue'
        ]
    )
);
```

You can write to queue and read from queue. These are the basic operations.

> NOTE that you can use this with multiple processes. The Message Queue uses flock(), so there shouldn't be a problem.

```php
# write two messages
$queue->write(
    [
        'my message',
        'my second message'
    ]
);

# read two messages
print_r($queue->read(2));
```

For several optimization reasons the queue does not delete messages by itself.
To free some disk space from already read messages just run this command from time to time.
Please note that this operation is disk write heavy (when lot's of messages are being passed)
```php
$queue->recycle();
```

To optimize reads from the queue the library uses a caching construction.
Messages are added into file system based cache in chunks, by default single chunk size is 100 messages.
If you intend to read more than 100 messages from the queue at once please change the configuration option 'rotate_amount' to a bigger number.
```php
$queue = new \MessageQueue\Queue(
    new \MessageQueue\Environment(
        [
            'dir' => '/var/my-queue-folder',
            'queue' => 'my-queue',
            'rotate_amount' => 200
        ]
    )
);
```

## Contacts
If you wish to improve the library, feel free to submit merge request or contact me at<EMAIL_ADDRESS>

repository: bozerkins/php-message-queue

gha_language: PHP

repo_name: bozerkins/php-message-queue


text:
# Webreflection ecosystem

Some notes trying to pick apart and understand the webreflection ecosystem.

- [lit-html vs hyperHTML vs ligherhtml](https://medium.com/@WebReflection/lit-html-vs-hyperhtml-vs-lighterhtml-c084abfe1285): - lit is google.  hyperHTML is bigger and more compatable.  ligther is the next iteratino of hyperHTML... sort of.

- 3rd party walkthough of hyper: https://medium.com/easy-apps-with-hyperhtml/easy-apps-with-hyperhtml-1-4a56acad9327

## Module relationships

- [HyperHTML](https://github.com/WebReflection/hyperHTML) - browser implementation.  Older more robust.
- [ViperHTML](https://viperhtml.js.org/viper.html) - Node.js rendering engine for HyperHTML
- [lighterhtml](https://github.com/WebReflection/lighterhtml) - The newer version of hyperhtml
  - [neverland](https://github.com/WebReflection/neverland) - React hooks for ligher. Component state, insertions + updates (effects), dom reference.  Closure based components.
  - [Haunted](https://github.com/matthewp/haunted) - neverland for hyper / lit.  Basically neverland but for the other ecosystems.
- [HyperHTML Element](https://github.com/WebReflection/hyperHTML-Element) - Custom Elements based components for hyper.
- [regular-elements](https://github.com/WebReflection/regular-elements) - Component system, but attatches via CSS selectors.  Does not use custom elements.
- [wicked-elements](https://github.com/WebReflection/wicked-elements) - The same as regular elements but more.  I can't tell what the difference is.  See https://medium.com/@WebReflection/a-wicked-custom-elements-alternative-6d1504b5857f

## Submodules

These are the submodules that are used underneatht the main abstractions:

- [augmentor](https://github.com/WebReflection/augmentor): Generalized hooks implementation
- [dom-augmentor](https://github.com/webreflection/dom-augmentor): hooks implementation with browser `connected and disconnected` events.
- [disconnected](https://github.com/WebReflection/disconnected/): webreflections onload like module.  Provides `connected and disconnected` events with MutationObservers.  Uses CustomEvents which is interesting.
- [domdiff](https://github.com/WebReflection/domdiff): dom diffing algorithm.
- [attributechanged](https://github.com/WebReflection/attributechanged): Lets you update components when their 'attributechanged`.

## Ecosystem

- [hyperhtml-app](https://github.com/WebReflection/hyperhtml-app) router

## Interesting ideas

### Wiring

This ecosystem has the concept of a wire.  Whats a wire?  Good question, I knew at one point but then forgot because the name is rather nondescript, and I didn't get enough hands on time to really commit to memory..  "The persistent fragment like class used in hyperHTML."

- [hyperhtml-wire](https://github.com/WebReflection/hyperhtml-wire):  module version of wiring.

### Frozen template literal chunks

- [under the hood](https://viperhtml.js.org/hyperhtml/documentation/#introduction-1)

> If you have a generic function and place it in front of a template literal without invoking it, the function will be executed receiving an Array as its first argument which will contain the list of chunks between interpolations, the rest of the arguments will contain the interpolated values.

> Not only is the function invoked, its first parameter will be a frozen, unique, Array. In this way, even if a template generates different strings due to changed interpolated values, its chunks will always be the same.

> This native feature, even reflected when transpiled via Babel, is key to generating a DOM structure and parsing it once, creating a unique relationship between a template literal and a DOM template.

> What hyperHTML adds on top of this feature is a context to operate in, like a context you could use for any generic function or method call.

What this means (untested):  If your template doesn't change, updating the the context only costs the interpolated values calculaton + ...updating them.  (Diffing? SOmething else?)  AKA "smart DOM content".

> While using hyper`<p>runtime</p>` for one-off operations just works, binding a DOM node to create its own content or weakly relating generic objects are the best way to recycle the DOM and obtain best performance.

I think it works like this:

- When you 'wire' a template to an object, when it renders the dom node the first time, it weak maps the object to the dom node, unless that object is already weak mapped to an existing dom node.  Ok... say its already rendered.  What if the data changes?  Is it re-rendered?

Wiring a template lets you associate it with a rendered node.  How does it know if its needs updating or not though?

https://medium.com/easy-apps-with-hyperhtml/easy-apps-with-hyperhtml-2-1d60fd41bb67

repository: bcomnes/browser-spellbook

repo_name: bcomnes/browser-spellbook


text:
# mythinkpython2
Think Python 2 - Notes, exercises and solutions. In my opinion this is one of the best book to start learning python.

# Think Python 2 resources:
https://greenteapress.com/wp/think-python-2e/

# Allen Downey repository for the book:
https://github.com/AllenDowney/ThinkPython2


text:
---
layout: post
title: Reading List
subtitle:
---

# Books

- [Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems](https://www.amazon.com/Designing-Data-Intensive-Applications-Reliable-Maintainable/dp/1449373321) - Martin Kleppmann
- [Streaming Systems: The What, Where, When, and How of Large-Scale Data Processing](https://www.amazon.com/Streaming-Systems-Where-Large-Scale-Processing/dp/1491983876) - Tyler Akidau et. al.
- [A Philosophy Of Software Design](https://www.amazon.com/Philosophy-Software-Design-John-Ousterhout/dp/1732102201) - John Outsterhout
- [Site Reliability Engineering: How Google Runs Production Systems](https://www.amazon.com/Site-Reliability-Engineering-Production-Systems/dp/149192912X)
- [Database Internals: A Deep Dive into How Distributed Data Systems Work](https://www.amazon.com/Database-Internals-Deep-Distributed-Systems/dp/1492040347) - Alex Petrov
- [High performance in MySQL](https://www.amazon.com/High-Performance-MySQL-Optimization-Replication/dp/1449314287) - Baron Schwartz et. al.
- [Concurrency in Go: Tools and Techniques for Developers](https://www.amazon.com/Concurrency-Go-Tools-Techniques-Developers/dp/1491941197) - Katherine Cox-Buday
- [Effective Java](https://www.amazon.com/Effective-Java-Joshua-Bloch-ebook/dp/B078H61SCH) - Joshua Bloch
- [Java Puzzlers: Traps, Pitfalls, and Corner Cases](https://www.amazon.com/Java-Puzzlers-Traps-Pitfalls-Corner/dp/032133678X) - Joshua Bloch; Neal Gafter


text:
# sudoku
Learn golang, solve sudoku

[![Go Report Card](https://goreportcard.com/badge/github.com/nanw1103/sudoku)](https://goreportcard.com/report/github.com/nanw1103/sudoku)

[![Build Status](https://api.travis-ci.org/nanw1103/sudoku.svg?branch=master)](https://api.travis-ci.org/nanw1103/sudoku.svg?branch=master)

[![godoc](https://godoc.org/github.com/nanw1103/sudoku?status.svg)](https://godoc.org/github.com/nanw1103/sudoku)

Standard sudoku solution should be Exact Cover problem.

To learn go, the implemented algorithm adopts a straightforward backtracing with some prune and bitset tricks.

```
go build
sudoku [fileName]
```
or
```
go run sudoku.go main.go [fileName]
```


text:
# Amiibo Network [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/N4N8169NZ)

**Or you can [donate on PayPal](https://paypal.me/EdwynZN)**

An Amiibo collection app with a wishlist and personal collection, screenshot mode to save your collection and stats, so you can always show your amazing Amiibo collection!

Features:
- Owned collection and wishlist at top of the screen to always check your stats
- See your stats as you want, percentage or ratio switch button from the drawer
- Tap once on an amiibo to add it to your collection, again to your wished list, and last to remove it.
- Double tap to see the detail of any amiibo, release date, character name, game or add it directly to any list you want from there
- Lock button so you can avoid undesirable taps
- Category list drawer to show by All, Custom, Owned, Wished, Stats or by amiibo series split by figures and cards
- Long press on the Custom tile in the navigation drawer to open and select only the desired series you want to collect
- Personal stats split by All, Custom, figures and cards. Take a screenshot of your stat at any time and save it for later as a picture in your download folder
- Search bar improved, so you can search by name, game or amiibo series
- Order the list based on what you think it's more important, the release date of any of the 4 regions, your owned, wished or name
- Auto mode theme (only for some Android 9 and up) or manually select your preferred mode, light or dark
- Multiple light and dark themes to select from the drawer or settings. Tap the theme icon in the drawer to change between light, dark or auto mode or just long press the theme icon to visualize all the themes and select your preferred one or go to settings and select appearance
- Save your collection as a picture in your download folder, reset your collection or import/export your collection data (useful when changing device) all from settings

DISCLAIMER
Amiibo Network is an unofficial app for collectors and fans of amiibo and is intended to be used for informational and educational purposes only.

Amiibo Network is in no way affiliated with Nintendo. amiibo is a registered trademark of Nintendo. All items, names and other aspects are trademarked and owned by their respective owners.

## Screenshots

Light                      |             Dark
:-------------------------:|:-------------------------:
  |
  |
  |
  |
 |
 |

## Special Thanks
French translation by Michael Put (De Liège Belgium)

## Firebase Setup

Since the project uses Firebase, some additional files will be needed:

    lib/firebase_options.dart
    ios/Runner/GoogleService-Info.plist
    ios/firebase_app_id_file.json
    android/app/google-services.json

These files have been added to .gitignore, so you need to run this command to generate them using one of this options

##### 1.  Using CLI

**Make sure you have the Firebase CLI and FlutterFire CLI installed.**

These files have been added to .gitignore, so you need to run this command to generate them with the flutterfire CLI:

    firebase login
    flutterfire configure

##### 2.  Manually

If you don't want to use FlutterFire CLI, follow these steps instead:

- Register separate iOS, Android, and web apps in the Firebase project settings.
- On Android, use your package name (com.dartz.amiibo_network) as the package name.
- then, download and copy google-services.json into android/app.
- On iOS, use your package name (com.dartz.amiibo_network) as the bundle ID.
- then, download and copy GoogleService-Info.plist into iOS/Runner, and add it to the Runner target in Xcode.

## Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

gha_language: Dart


text:
# baseball-ruby

A library for baseball applications with Ruby.

## Installation

Add this line to your application's Gemfile:

    gem 'baseball'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install baseball

## Usage

```ruby
require "baseball"

player = Baseball::Player.new

player.out!
player.hit!
player.out!

p player.pb   #=> 3
p player.ab   #=> 3
p player.h    #=> 1
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

repository: myokoym/baseball-ruby

repo_name: myokoym/baseball-ruby


text:
# UNITY NOTES
started 20190909 at 1:01:36.868 pm =<PHONE_NUMBER>868.

## OUTLINE
list of elements:
- C# intro
- two

## KEY MOVES

## LINKS

- codecademy [C# tutorial](https://www.codecademy.com/learn/learn-c-sharp)
-

## MK SCRIPTING TUTORIAL PROSE

## UNITY SCRIPTING INTRO

Again--just the very basics.  This is a collection of some of the “moves” that might help you as a storyteller or game designer in Unity.  Most frequently, these are ways of determining how your environment will change in response to user activity or the passage of time.  While the world you construct is not, when conceived of as a whole, a linear narrative, there are going to be some linear micro-narratives that get triggered when certain conditions are met--like when you touch a box a video then plays, or when you jump you go up in the air and then fall, or if you arrive at a certain spot on the map you “level up.”  These conditionally triggered micro-narratives have this basic structure:

####     if ( some condition is met )

####     {

####         something happens

####     }

The game you’re building is made up of thousands and thousands of these little structures--most of which are “under the hood” and often pretty basic, low-level, and repetitive, so Unity hides them from you in a black box to let you focus on building your gameworld. But from time to time you will need to create some of these conditional micro-narratives yourself, and that’s where C# scripting[^1] comes in.

So, this probably goes without saying in TDM, but it should be clear that just as a theatrical script offers directors and actors and stagehands the set of instructions to follow to bring a play to life, so too does your collection of C# scripts offer the computer the instructions that will bring your VR world to life.

### BASIC MECHANICS

These are things you’ll have to do again and again and again.  All of this can be found at this website: [https://docs.unity3d.com/ScriptReference](https://docs.unity3d.com/ScriptReference).

### THE BASIC ELEMENTS

*   Variables
    *   public and private
    *   String
    *   Int
    *   Bool
    *   float
*   Functions Start() and Update()
*   Conditionals

### TRIGGERS

*   Everything in the Start()function executes when the scene launches
*   Everything in the Update() function executes once each frame.
    *   You can check to see if a key is pressed, for instance like so:

        ```
        public class KeyCodeExample : MonoBehaviour
        {
            void Update()
            {
                if (Input.GetKeyDown(KeyCode.Space))
                {
                    Debug.Log("Space key was pressed.");
                }
               if (Input.GetKeyUp(KeyCode.Space))
                {
                    Debug.Log("Space key was released.");
                }
            }
        }
        ```

*   Physics & Colliders (`OnTriggerEnter, OnTriggerExit`)

```
private void OnTriggerEnter(Collider other)
    {
       Debug.Log("entered");
    }
private void OnTriggerExit(Collider other)
    {
       Debug.Log("exited");
    }
```

### ACTIONS

*   Debug.Log("hello") will log a string to the console.
*   Play

    ```
    private AudioSource audio;
    audio.Play();
    ```
*   Scene change

```
  // at the top
  using UnityEngine.SceneManagement;

// then later to load scene 1 (or any other)
SceneManager.LoadScene(1);
```

### DETECT PLAYER CROSSING COLLIDER BOUNDARY

private void OnTriggerEnter(Collider other)
{
    if (other.CompareTag("Player"))
   {
       // do something, like . . .
   }
}

<!-- Footnotes themselves at the bottom. -->
## Notes

[^1]:
     There is clearly something thought-provoking in the fact that word “script” refers both to [the set of instructions we’ll be typing up for the computer to follow](https://en.wikipedia.org/wiki/Scripting_language) with our C# code to bring our story to life, AND that it refers to to the set of instructions we give to the set of people who bring a theatrical production to life.

repository: brendacec/the-resources

repo_name: brendacec/the-resources


text:
# The-Cryptographer-App

## Description:
Project consisting of 3 level cryptographic key-based encrypting\decrypting application in the C++ language with an aim to eliminate the pitfalls of traditional hashing algorithms when applied on predictable passwords and to enhance the security of authentication modules working with passwords, security pins, authentication keys, tokens, and cookies.

## About this Repository
This project was create with an aim of building a functional useful tool for enhancing the functionality of existing encrypting solutions.


text:
  ## Project discontinued, feel free to fork.

An open source Counter-Strike: Global Offensive cheat for GNU/Linux.

#

Ruvi is a **GNU/Linux** only CS:GO cheat that aims to be as simple as possible,
while keeping the amount of features available at the highest possible level.

#

### Features

Click on the dropdown to reveal complete feature list.

:bookmark_tabs: Feature list

Visuals:
- **ESP**
  - Box
  - Name
- **Chams**
- **Nightmode**
- **Low health warning**
- **Removals**
  - Disable post processing
  - Disable Panorama UI blur
  - Disable flashbang effect
  - Disable smoke effect
- **Engine radar**
- **Grenade prediction**
- **Thirdperson**

Miscellanous:
- **Bunnyhop**
  - Auto strafer
- **Instant bomb plant**
- **Force thirdperson while specating**
- **Mirror cam**

:construction: *more features soon...*

### Acknowledgments

Ruvi is available under the [MIT License](https://github.com/cristeigabriel/ruvi-csgo-linux-full/blob/master/LICENSE)

Written using
[fgui](https://github.com/iFloody/fgui) framework.

repository: cristeigabriel/ruvi-csgo-linux-full

repo_name: cristeigabriel/ruvi-csgo-linux-full


text:
# eeg-hdfstorage
Project to develop a easily accessible format for storing EEG in a way that is easy to access for machine learning.
- hdf5 based format
- looked at edf and neo formats, see NWB
- simplier than neo, but may need more of neo's strucures
- compare with fif format of mne project to evolve
- look to add fields for clinical report text
- look to add field for montages and electrode geometry

### To Do
- [x] code to write file, target initial release version is 1000
- [X] initial scripts to convert edf to eeghdf and floating point hdf5
- [ ] code to write back to edf
- [ ] more visualization code
- [ ] add study admin code to record info (do not seem to include this now, e.g. EEG No like V17-105)

repository: cleemesser/eeg-hdfstorage

repo_name: cleemesser/eeg-hdfstorage


text:
---
layout: post
title: "Oracle Hugepage Tips"
category: Oracle
tags: Oracle Hugepage Tips
---

* content
{:toc}

Oracle Hugepage Tips

Use the hugepages_settings.sh to recommond vm.nr_hugepages.

#### hugepages_settings.sh

- hugepages_settings.sh

```bash
#!/bin/bash
#
# hugepages_settings.sh
# HUGE PAGES are always implemented with SGA_TARGET or SGA values not with Automatic memory management
# Linux bash script to compute values for the recommended HugePages/HugeTLB configuration
# on Redhat Linux
#
# Note: This script does calculation for all shared memory
# segments available when the script is run, no matter it
# is an Oracle RDBMS shared memory segment or not.
#

# Welcome text
echo "
This script is intended to compute values for
the recommended HugePages/HugeTLB configuration for the current shared
memory segments on Redhat Linux or Oracle LInux. Before proceeding with the execution please note following:
 * For ASM instance, it needs to configure ASMM instead of AMM.
 * The 'pga_aggregate_target' is outside the SGA and
   you should accommodate this while calculating the overall size.
 * In case you changes the DB SGA size,
   as the new SGA will not fit in the previous HugePages configuration,
   it had better disable the whole HugePages,
   start the DB with new SGA size and run the script again. And make sure that:
 * Oracle Database instance(s) are up and running
 * Oracle Database 11g Automatic Memory Management (AMM) is not setup (See Doc ID 749851.1)
 * The shared memory segments can be listed by command:
     # ipcs -m
Press Enter to proceed..."

read

# Check for the kernel version
KERN=`uname -r | awk -F. '{ printf("%d.%d\n",$1,$2); }'`

# Find out the HugePage size
HPG_SZ=`grep Hugepagesize /proc/meminfo | awk '{print $2}'`
if [ -z "$HPG_SZ" ];then
    echo "The hugepages may not be supported in the system where the script is being executed."
    exit 1
fi

# Initialize the counter
NUM_PG=0

# Cumulative number of pages required to handle the running shared memory segments
for SEG_BYTES in `ipcs -m | cut -c44-300 | awk '{print $1}' | grep "[0-9][0-9]*"`
do
    MIN_PG=`echo "$SEG_BYTES/($HPG_SZ*1024)" | bc -q`
    if [ $MIN_PG -gt 0 ]; then
        NUM_PG=`echo "$NUM_PG+$MIN_PG+1" | bc -q`
    fi
done

RES_BYTES=`echo "$NUM_PG * $HPG_SZ * 1024" | bc -q`

# An SGA less than 100MB does not make sense
# Bail out if that is the case
if [ $RES_BYTES -lt 100000000 ]; then
    echo "***********"
    echo "** ERROR **"
    echo "***********"
    echo "Sorry! There are not enough total of shared memory segments allocated for
HugePages configuration. HugePages can only be used for shared memory segments
that you can list by command:
    # ipcs -m
of a size that can match an Oracle Database SGA. Please make sure that:
 * Oracle Database instance is up and running
 * Oracle Database 11g Automatic Memory Management (AMM) is not configured"
    exit 1
fi

# Finish with results
case $KERN in
    '2.4') HUGETLB_POOL=`echo "$NUM_PG*$HPG_SZ/1024" | bc -q`;
           echo "Recommended setting: vm.hugetlb_pool = $HUGETLB_POOL" ;;
    '2.6') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;;
    '3.8') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;;
    '3.10') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;;
    '4.1') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;;
    '4.14') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;;
    *) echo "Kernel version $KERN is not supported by this script (yet). Exiting." ;;
esac

# End
```

#### Reference

To be continue...

N/A

Have a good work&life! 2020/04 via LinHong


text:
# SLMX4 Module Documentation

## User Guides
 - [SLMX4 Health App](health_app.md)
 - [SLMX4 Firmware Update](insecure_fw_update.md)

## Downloads
- [SLMX4-Base Health Firmware](https://modules-release.s3-us-west-2.amazonaws.com/firmware/slmx4_base_usb_vcom_pb_dsp-epam0P1.s19)
- [SLMX4-Base MATLAB Firmware](https://modules-release.s3-us-west-2.amazonaws.com/firmware/slmx4_base_usb_vcom_xep_matlab_server.s19)

## App Downloads
- [SLMX4 Health App](https://modules-release.s3-us-west-2.amazonaws.com/health_windows_app/slmx4_health_ui_usb.zip)


text:
# phpmyadmin-configuration
#### whole php my admin configuration

PHPMYADMIN configuration and how to install it.
this file is created by Mehdi Filban ...

first of all

	apt update
	apt install phpmyadmin

	set all configurations in the setup
	if you cannot add a password dont worry about that.

	just ignore it.
	and do the following things.

	nano /etc/phpmyadmin/apache.conf
	make sure that you add the below changes

		<Directory /usr/share/phpmyadmin>
	        Options SymLinksIfOwnerMatch
                DirectoryIndex index.php
    	        (you have to add this line)AllowOverride All

	and then

	systemctl reload apache2.service

	and the next step is to create a .htaccess file by running the commands below

	sudo nano /usr/share/phpmyadmin/.htaccess

	and the you should add the content below and just save it

		AuthType Basic
		AuthName "Restricted Files"
		AuthUserFile /etc/phpmyadmin/.htpasswd
		Require valid-user

	and

	sudo apt-get install apache2-utils

	Finally, run the commands below to create an account for mehdi.

	sudo htpasswd -c /etc/phpmyadmin/.htpasswd mehdi

	and then

	sudo -H gedit /etc/apache2/apache2.conf

	and then add this line somewhere

	Include /etc/phpmyadmin/apache.conf

	and the last step is to run ...

	sudo service apache2 restart

repository: mehdifilban/phpmyadmin-configuration

repo_name: mehdifilban/phpmyadmin-configuration


text:
# Slack Themes (WIP)

Minimal & Modern React app documenting a collection of curated Slack Themes

Don't see a theme you're looking for? Open a pull request, an issue, or [Submit a Theme](https://forms.gle/ko6NiYzx6zEHiGb46)

![Slack Themes preview](preview.png)
---

## Usage
```bash
# Install dependencies

 $ yarn install

# Start webpack-dev-server at port 8080

 $ yarn run start

# Run linters

 $ yarn run test

# Build app for production (gets output in the 'dist' directory)

 $ yarn run build
```

repository: ryan-parag/slack-themes

repo_name: ryan-parag/slack-themes


text:
# Pepper

Pepper is an advanced Search and Analytics app. It is meant to be used as is, or taken as a starting point for a more complex project.

**Learn more on our [documentation website](https://sinequa.github.io/sba-angular/modules/pepper/pepper.html).**

![Pepper](/docs/assets/modules/pepper.png)


text:
---
layout: post
title: Week 2 and Rain
---

Vi: Today, again, was a cold and rainy day.  Sarah is off to yoga now and I’m on a new diet.  Have lost a few kilos being in Japan for the last few weeks and I like it, but being in Melbourne and especially in Redbubble is very tempting.  There are cupcakes, biscuits and heaps of food.  Today was a good day, I only ate one cupcake.  Will continue trying my best to avoid eating all 4 cupcakes in one day.  Redbubble is the company that keeps on giving, aside for providing us with an awesome place to work from, they provide breakfast and lunch.  Actually… they should be on BRW’s Best Workplaces.  A nomination is in order…
Ok, now that the scene is set… let’s go through what happened today in dottish point form.

##### Eloquent Javascript Chapter 3 Activity on Recursion

The 2nd eloquent javascript wanted us to write some code that would provide a true if a number was even and false if a number was not even using N-2.

Here’s the solution:

```
function isEven(n) {
  if (n == 0)
    return true;
  else if (n == 1)
    return false;
  else if (n < 0)
    return isEven(-n);
  else
    return isEven(n - 2);
}
```

I like this because any positive number is reduced to its the base case of n==0 or n==1 where there is a true/false designation based on the repeating -2 pattern.  This is different to using a remainder to determine if a number is even e.g.  number % 2 == 0.  Using the remainder way means that it will take the instance of the number there and apply that divisible property of that number and if it is divisible by 2, then it would be an even number and if it doesn’t meet this case then it would be false.  Whereas this isEven function, takes a number, say 9 as a point in a line and reduces it by -2 (9, 7, 5, 3, 1) until it reaches 0 or 1 and then it would be true/false.  So here, evenness is determined by reduction by pattern to either 0 or 1 and a number is just a figure in a continuum.

Anyway, I find this neat - and that’s my non-sensicle two-bob worth for today.

##### From Rails to Ember

I found this the most interesting difference from Rails to Ember.

> In any server rendered framework, page reloads clear state. Your app might have sections that contain a lot of AJAX, but for the most part you start with a fresh state every time a user clicks a link. Not so with a client-side framework.

I think this might affect an advertising plugin… (more to follow in a few months time).
Also getting used to the idea of ‘hooks’ in ember as opposed to the Rails controller handling a lot of the things that routes in Ember is managing.

##### Installing an Adsense Plugin
Tonight, we want to look at how an adsense plugin works and followed instructions found [here](https://github.com/discoursehosting/discourse-adsense) for the non-docker installation.  Installed it and have pushed these changes to github on a separate branch.
More updates to follow tomorrow...

------------------------------------------------------

Sarah: 4 things I did today

#####1. 15 minutes with Git and Reading up on Git

Rational: Lessening the chances of me breaking anything when pushing, pulling and merging to Github

![alt text](https://www.dropbox.com/sc/aztjt7u4sefsj8k/AAB13B2_GwRCdtyR8IuQd0AOa?dl=1)

Fun fact: [The difference between git pull, git fetch, git clone and git rebase](http://blog.mikepearce.net/2010/05/18/the-difference-between-git-pull-git-fetch-and-git-clone-and-git-rebase/)

![alt text](https://www.dropbox.com/sc/tjhmmnse0gnidcp/AACTjpr07rCBkEnH4EV3M78ja?dl=1)

![alt text](https://www.dropbox.com/sc/jna05qkrbvynbki/AAC17gpCLx3owXHhYLvBELLAa?dl=1)

*http://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell*

When you realise that understanding code is simply the same as reading a good story.

#####2. Fiddling around more with the Mac

Rational: This was unintentional. But I had to find out if double downloading NodeJS on different versions would be detrimental. As I explored further, I realised it probably wouldn't. The latest installation seemed to overwrite my first one.

Fun fact: You know Mac is great when even the Terminal line looks beautiful. It's always a horror story with my Windows - but that being said, both are great. [Here's to check what's been installed on your mac.](http://applehelpwriter.com/2013/05/21/how-to-check-whats-been-installed-on-your-mac/)

#####3. Meeting Jo for the first time!

Rational: Kick-off Meet-up!

Fun fact: This was my first time meeting our female coach, Jo. (All the girl power) She brought up topics such as unit testing and suggested we try Jasmine. Pretty cool to have a coach with these areas of expertise.

*- Reminder: Take a photo with her!*

##### 4. More about Ember

We tried to install Node.js but there're some administrative issues. Hoping to get it settled because I am itching to create a [ToDoMVC](https://todomvc.com/examples/emberjs/) app. I know, we should have done this a long time ago. But we've got a new laptop to work with - thus more things to install!

Signing Off,
Vi and Sarah

gha_language: CSS


text:
---
title: PWPR - The simple Playwright Pre-Render CLI
description:
  The simplicity of making an HTTP request with cURL but with the ability to run and render JS powered web pages
date: 2021-08-03T22:07:16.151Z
category: Projects
featuredImage: ../assets/uploads/pwpr.png
published: true
---

Recently, while working on automating the installation and setup of my computer I encountered an annoying situation. I
was trying to script out the installation of Dropbox, and I didn't want to hard code in an installer version - for all
other tools and applications that I "manually" install with scripts I've been able to obtain explicit version
information programmatically. For some I could get version information via dedicated webpages (e.g. `golang` which
provides its [current version here](https://golang.org/VERSION?m=text)). For others, which host their release assets on
GitHub I could use the GitHub Releases API (e.g. the `starship` shell prompt,
[which uses GitHub Releases](https://api.github.com/repos/starship/starship/releases/latest)). In fact, up until
Dropbox, the only tool which made this even _a little_ difficult was the `aws-cli` which required that I parse their
[CHANGELOG file](https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst) to figure out the latest version.

For Dropbox though, the only good way I could programmatically discover their latest installer version was via a link
present on the download page, which for me being on Linux ([Pop!\_OS specifically](https://pop.system76.com/)) is
[https://www.dropbox.com/install-linux](https://www.dropbox.com/install-linux). If you go there, you might think "_ok
seems easy enough, just curl/wget the page and grab the href for the .deb file download link with grep_" and that is
indeed what I tried at first....then I realized that this _incredibly simple and text-only_ page is completely
javascript rendered, meaning that curl-ing it is useless as I will only get back the pre-javascript-render page shell.

As annoying as this was, I didn't just settle for hard coding in the version for this one thing, and instead I looked
around for a CLI wrapper for either [Playwright](https://playwright.dev) or [Puppeteer](https://pptr.dev/) which are
tools I've used extensively before to do browser automation via headless chromium, firefox, and webkit. Either of these
would make it possible for me to visit the page, render the page with JS, then get the final page HTML. As it turns out,
Playwright does have a first-party CLI, but amazingly to me, it's mostly geared towards PDF creation and automation of
writing Playwright procedures - not prerendering...this seems like super low hanging fruit, but ahhhh well.

Aaaanyway, I decided just to make my own wrapper for Playwright, so here it is!

## 🎉 Announcing `PWPR - The simple Playwright Pre-Render CLI` 🎉

You can find it on NPM at [https://www.npmjs.com/package/pwpr](https://www.npmjs.com/package/pwpr). You don't need to
install it to use it (in fact, I don't recommend that you _do_ install it) - simply run:

```bash
npx pwpr --url=example.com --output=example.html
```

doing this will fetch `https://example.com`, wait for it to fully load, including running the page's javascript, then
output the rendered HTML of the page to `example.html` in your current working directory - it's like the simplicity of
cURL, but with the ability to run the JS of the page you're fetching.

> Of course, the source code is fully open source and `MIT` licensed, so check that out on GitHub -->
> [andrewbrey/pwpr](https://github.com/andrewbrey/pwpr)

With this, I've been able to keep my Dropbox install simple and programmatic, without any version hard coding. Hopefully
someone else out there finds it useful!

**Cheers!**


text:
# react-visual-timer
React component for visual time control clock

## Get Started
~~~~
    $ npm install react-visual-timer
~~~~
Import and use in your React component:
~~~~
    import {VisualTimer} from "react-visual-timer";
    ...
    <VisualTimer minutes={30} />
~~~~
You can further customize or control the component with additional props:
~~~~
    <VisualTimer
        minutes={5} seconds={30}
        showLabels={false}
        autoStart={true}
        alarmBefore={60}
        running={this.state.timerRunning}
        onEnd={() => console.log('You run out of time!')}
         />
~~~~
See full documentation on project website.

repository: sonbachmi/ReactVisualTimer

repo_name: sonbachmi/ReactVisualTimer