text:
# Classify Song Genres

Streaming services categorize music to allow for personalized recommendations. They directly analyze the raw audio information and score the raw data on a variety of metrics. With this project, I have analyzed music steaming data compiled by a music intelligence and data platform known as '[The Echo Nest](https://en.wikipedia.org/wiki/The_Echo_Nest),' now part of Spotify.

## Goal
The goal of the project was to look through the dataset and classify the genre of a song and that too without listening to music.

## Dataset
The music steaming data is composed of two datasets: the first dataset is about the tracks alongside the track metrics, and the second dataset is about the musical features on a scale from -1 to 1. The two datasets are concatenated, and this is how the first 5 rows of the dataset look like:

![Image](https://github.com/heydibyendu/Classify-Song-Genres/blob/master/dataset_head.png)

## Modeling
I trained Logistic Regression as my baseline model and then added KNN, SVM and Random Forest. Unsurprisingly, Random Forest turned out to be the best model in the pack, leaving Logistic Regression behind by more than 3 percentage points in accuracy.

## Results
The model achieved 84.95% accuracy in predicting genres through parameter estimation in the training set. I used grid search with 10-fold cross-validation for tuning the parameters. In the held-out validation set, the model achieved an accuracy of 84.59%, which matches closely to the expectations estimated during the tuning.

repository: heydibyendu/Classify-Song-Genres

repo_name: heydibyendu/Classify-Song-Genres


text:
# Natural Object Query Language

The goal of the Natural Object Query Language (or NOQL) is to have an plain old
English representation of an object query

```rust
type QueryList<'a> = Vec<Query<'a>>;

enum Query<'a> {
  Index {
    index: usize,
    from_end: bool
  },
  Key(&'a str)
}
```

where an object can take a list of query segments and either index a list or get a key from a map

## Index

```
the ((first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|eleventh|twelfth|#st|#nd|#rd|#th) [to last]|last) item
```

where `#` is a positive integer

## Key

```
the [key|`key`|`multi word key`]
```

handlers of the key can choose to "dehumanize" the key however they want

## Query List

```
(index|key) [of (index|key) [of (index|key) ...]]
```

query segments are chained with `of`

license: MIT

repository: RiddleAndCode/nlsd

branch_name: refs/heads/master

extension: md

gha_language: Rust

gha_license_id: MIT

license_type: permissive

repo_name: RiddleAndCode/nlsd


text:
---
description: This is a by-OS breakdown of how you can install the software on your machine.
---

# ❓ Which installation method is best for me?

As LRR is a server app first and foremost, its setup is a bit more complex than your usual Desktop application.
However, a lot of work as been done behind the scenes to make it easy!

Look at the methods below for something that fits your OS and usage.

## Linux/macOS: _Homebrew_

[Homebrew](https://brew.sh) allows you to quickly setup LRR on macOS and Linux without relying on containers or modifying your preinstalled system libaries.

![brew](<../.screenshots/brew.jpg>)

{% content-ref url="macos.md" %}
[macos.md](macos.md)
{% endcontent-ref %}

## Windows 10/11: _LRR for Windows_

{% hint style="warning" %}
This method works on **64-bit** editions of Windows 10 only.
{% endhint %}

![win10](../.screenshots/karen.jpg)

I provide a dedicated installer for Windows machines as of 0.6.0, complete with a GUI and autostart.

{% content-ref url="windows.md" %}
[windows.md](windows.md)
{% endcontent-ref %}

## Linux/macOS/Windows 10: _Docker_

Taking a page from sysadmin books, you can easily install LRR as a **container** with Docker.
They're lightweight, easy to update, and automatically built/tested. I recommend this for NAS setups!

{% content-ref url="docker.md" %}
[docker.md](docker.md)
{% endcontent-ref %}

## Linux/macOS: _Installing from Source_

Installing from **source** is a more involved procedure, but it does put you in full control and able to hack up the app's files as you wish.

{% content-ref url="source.md" %}
[source.md](source.md)
{% endcontent-ref %}

## Linux/Community: _Community provided install packages_

Ready-to-install packages provided by voluntary maintainers or by a linux distribution itself.

{% content-ref url="community.md" %}
[community.md](community.md)
{% endcontent-ref %}

## FreeBSD/Jail

Similar to installing from source with an altered process for FreeBSD compatability.

{% content-ref url="jail.md" %}
[jail.md](jail.md)
{% endcontent-ref %}

## Windows 7 or 8: don't

![I really hope you guys don't do this](../.screenshots/shiggy.png)

Switch to 10 or Linux.

repository: Difegue/LANraragi

branch_name: refs/heads/dev

gha_language: Perl

repo_name: Difegue/LANraragi


text:
# Usage

Once you have a local installation working, you can use your local instance by querying its various endpoints on `localhost:3000`.

## The Front Page

If this is your first time using BTE and TRAPI, you might wish to familiarize yourself with the querying format first. BTE provides a front page to get you started, which can be found at [`http://localhost:3000`](http://localhost:3000).

You'll be able to run some example queries that might give you an idea of the TRAPI standard.

## Synchronous Querying

The simplest way BTE works is by accepting queries to its synchronous endpoint. You can POST a query to `http://localhost:3000/v1/query` and the response will contain the results.

### Testing on a specific SmartAPI API

By default, BTE queries all APIs specified in the the [config.js file](https://github.com/biothings/biothings_explorer/blob/main/src/routes/v1/config.js). In some cases, you may want to override that default to specifically query a single API. For example, the SmartAPI ID for the EBI Proteins API is [`43af91b3d7cae43591083bff9d75c6dd`](https://smart-api.info/registry?q=43af91b3d7cae43591083bff9d75c6dd). To instruct BTE to query that API only, you can POST your query to `http://localhost:3000/v1/smartapi/43af91b3d7cae43591083bff9d75c6dd/query`. The general format is `http://localhost:3000/v1/smartapi/{smartapi_id}/query`.

## Asynchronous queries

You can also use BTE's asynchronous query endpoint, which features both web callback and polling support.

POST to `http://localhost:3000/asyncquery`. This endpoint behaves similarly to the `http://localhost:3000/query` endpoint with the same query graph as the input, however it responds with a link.

#### Key differences in an async query

- Instead of waiting for the query to complete a job _id_ is returned which you can then use to check the query status.
- If an additional _callback_ parameter is provided, we will send the query result to this callback URL via POST (optional).

The returned response looks like this:

```
{
  "id": "<id>",
  "url": "http://localhost:3000/v1/check_query_status/<id>"
}
```

#### You can then retrieve query results in two ways:

1. **Checking the query status**

    You can perform a GET request to the `http://localhost:3000/check_async_query/<id>` to check the query status. When the query is finished, the example response will look like this (query result is returned in `returnvalue` field):

    ```
    {
      'id': '<id>',
      'state': 'completed',
      'returnvalue': {
        'response': { ... },
        'status': 200
      },
      'progress': 0
    }
    ```

2. **Return result via a callback URL**

   When a callback URL is provided in the input sent to `/v1/asyncquery`, like this:

   ```
   {
     "callback": "https://example.com/handle_query_result",
     "message": {
         "query_graph": {
                ...
             }
         }
     }
   }
   ```

   Once the query is executed, its query result will be sent to this callback URL via POST. The status can also be checked via `/check_async_query/<id>` endpoint:

   ```
   {
     'id': '<id>',
     'state': 'completed',
     'returnvalue': {
       'response': { ... },
       'status': 200
       'callback': 'Data sent to callback_url'
     },
     'progress': 0
   }
   ```

## Tracking queries

BTE exposes a dashboard to track the status of both synchronous and asynchronous queries. You can access it at [`http://localhost:3000/queues`](http://localhost:3000/queues).

## Testing with Alternate SmartAPI Specs (local or hosted)

### Using API Overrides

You may configure a set of API IDs to override from local files or URLs.

If the environment variable `API_OVERRIDE=true` is set (see example below), then [src/config/smartapi_overrides.json](../src/config/smartapi_overrides.json) is checked at server start and overrides are applied, as well as during subsequent `smartapi_specs.json` updates. Note that syncing must be enabled (`SMARTAPI_SYNC=true`) in order for `API_OVERRIDE` to take effect while BTE is running.

Starting BTE with API Overrides and automatic syncing enabled:

```bash
SMARTAPI_SYNC=true API_OVERRIDE=true npm run start
```

Alternatively, you may choose to only get `smartapi_specs.json` and apply overrides once, removing the requirement of enabling `SMARTAPI_SYNC` while running the server:

```bash
API_OVERRIDE=true npm run smartapi_sync
```

Override files may be specified as a URL which returns the expected yaml file or a `file:///` URI or arbitrary filepath, either of which must contain the absolute path to your override file. Override files are expected to be in yaml format. If overrides are specified with IDs not in the current SmartAPI spec, they will be appended as new API hits with a log warning.

You may also set `only_overrides` to `true` in the config to remove all other APIs and keep only the specified overrides.

### Example

Replace the latest [MyGene.info API](http://smart-api.info/registry?q=59dce17363dce279d389100834e43648) with a specific revision, and the [MyChem.info API](http://smart-api.info/registry?q=8f08d1446e0bb9c2b323713ce83e2bd3) with a local test version:

```json
{
  "conf": {
    "only_overrides": false
  },
  "apis": {
    "59dce17363dce279d389100834e43648": "https://raw.githubusercontent.com/NCATS-Tangerine/translator-api-registry/8b36f46d59c82d19b5cba40421a6ca9c2ed62e6b/mygene.info/openapi_full.yml",
    "8f08d1446e0bb9c2b323713ce83e2bd3": "file:///absolute/path/to/file/mychem_test.yaml"
  }
}
```

### API Overrides with Docker container

You may wish to use a container to test your custom API/annotations. After making changes to your override list (example above) you will need to rebuild the container:

```bash
docker build --rm --force-rm --compress -t biothings/bte-trapi .
```

To run the container with overrides and debug logging enabled:

```bash
docker run -it --rm -p 3000:3000 --name bte-trapi -e DEBUG="biomedical-id-resolver,bte*" -e API_OVERRIDE=true biothings/bte-trapi
```

branch_name: refs/heads/main

gha_language: Jupyter Notebook


text:
# Protocol buffer and JSON comparison for Pokédex of Pokémon GO

### JSON file source:

[https://github.com/Biuni/PokemonGO-Pokedex](https://github.com/Biuni/PokemonGO-Pokedex)

### Blur Library

[BlurDialogFragment](https://github.com/tvbarthel/BlurDialogFragment)


text:
# Integer Sparse Distributed Memory (ISDM)

This project provides an implementation of IntegerSDM as described by (Snaider, 2013).

Snaider, J., Franklin, S., Strain, S., & George, E. O. (2013). Integer sparse distributed memory: Analysis and results. Neural Networks, 46, 144-153.

repository: pulinagrawal/isdm

repo_name: pulinagrawal/isdm


text:
---
layout: page
title: Research
description: My past and current research.
mathjax: true
background: '/img/research.jpeg'
permalink: /research/
---

My current work is focused on combinatorics with a side interest in number theory. I am also interested in history of mathematics. For my publications, see below (arranged in reverse chronological order of publication).

[MathSciNet Profile](http://www.ams.org/mathscinet/search/author.html?mrauthid=962403) (needs subscription)
[ZbMath Profile](https://zbmath.org/authors/?q=ai:saikia.manjil-p)

Some of the papers here may not be the final version that appeared, if you want a latest version send me an email.

## Theses

3. *Topics on Alternating Sign Matrices and Aztec Rectangles*, Doctoral Thesis, University of Vienna (Vienna, Austria), 2019. (Supervisor: [Prof. Ilse Fischer](https://mat.univie.ac.at/~ifischer/)) ([pdf](/publ/Manjil-Thesis.pdf)).

2. *Representations of the Symmetric Group*, Diploma Thesis, The Abdus Salam International Centre for Theoretical Physics (Trieste, Italy), 2015. (Supervisor: [Prof. Fernando R. Villegas](https://users.ictp.it/~villegas/)) ([pdf](http://gonitsora.com/manjil/thesis/saikia-diploma-thesis.pdf)).

1. *A study of the crank function with special emphasis on Ramanujan’s Lost Notebook*, M.Sc Thesis, Tezpur University (Tezpur, India), 2014. (Supervisor: [Prof. Nayandeep Deka Baruah](http://www.tezu.ernet.in/dmaths/people/faculty-pages/ndb.html)) ([pdf](http://arxiv.org/pdf/1406.3299v1.pdf)).

## Preprints

5. *Ramanujan-type Congruences for Partition $k$-Tuples with $5$-Cores*, (with *[Abhishek Sarma](https://sites.google.com/view/abhishek-sarma/) and Pranjal Talukdar*), preprint, 2023. ([pdf](https://arxiv.org/pdf/2302.01750.pdf))

4. *On $k$-Facile Perfect Numbers*, (with *Flora S. Jeba and Anirban Roy*), preprint, 2022. (available on request)

3. *Conjectures on congruences of binomial coefficients modulo higher powers of a prime number*, preprint, 2022. ([pdf](/publ/papers/Conjecture.pdf))

2. *Extensions of some results of Jovovic and Dhar*, (with *[Pankaj Jyoti Mahanta](http://pankajjyoti.com/)*), preprint, 2022. ([pdf](/publ/papers/Partition_Vladeta.pdf))

1. *Biases in Non-Unitary Partitions*, (with *[Pankaj Jyoti Mahanta](http://pankajjyoti.com/) and [Abhishek Sarma](https://sites.google.com/view/abhishek-sarma/)*), preprint, 2022. ([pdf](/publ/papers/bias-new.pdf))

## Peer Reviewed Papers

23. *Some Missed Congruences modulo powers of $2$ for $t$-colored overpartitions*, *Boletín de la Sociedad Matemática Mexicana*, 2023, 29 (1), Article  15, 10 pp. ([pdf](/publ/papers/NNcong.pdf))

22. *Representing Even Perfect and Near-Perfect Numbers as Sums of Cubes*, (with *Padma Bhushan Borah and [Pankaj Jyoti Mahanta](http://pankajjyoti.com/)*), *Journal of the Assam Academy of Mathematics*, 2022, 12, 1-7. ([pdf](https://jaam.aamonline.org.in/ojs/index.php/j/article/view/57))

21. *Parity Biases in Partitions and Restricted Partitions*, (with *Koustav Banerjee, Sreerupa Bhattacharjee, Manosij Ghosh Dastidar and [Pankaj Jyoti Mahanta](http://pankajjyoti.com/)*), *Séminaire Lotharingien de Combinatoire (Proceedings of the 34th Conference on Formal Power Series and Algebraic Combinatorics 2022 (Bangalore))*, 86B.21, 2022. ([pdf](/publ/papers/FPSAC2022.pdf))

20. *Refinement of some partition identities of Merca and Yee*, (with *[Pankaj Jyoti Mahanta](http://pankajjyoti.com/)*), *International Journal of Number Theory*, 2022, 18 (5), 1131-1142. ([pdf](/publ/papers/PJM_MY.pdf))

19. *Some New and Old Gibonacci Identities*, (with *[Pankaj Jyoti Mahanta](http://pankajjyoti.com/)*), *Rocky Mountain Journal of Mathematics*, 2022, 52 (2), 645-665. ([pdf](/publ/papers/Gibonacci_Pankaj.pdf))

18. *Parity Biases in Partitions and Restricted Partitions*, (with *Koustav Banerjee, Sreerupa Bhattacharjee, Manosij Ghosh Dastidar and [Pankaj Jyoti Mahanta](http://pankajjyoti.com/)*), *European Journal of Combinatorics*, 2022, 103, 103522, 19 pp. ([pdf](/publ/papers/parity_Final.pdf))

17. *Refined Enumeration of Symmetry Classes of Alternating Sign Matrices*, (with *[Ilse Fischer](https://www.mat.univie.ac.at/~ifischer/)*), *Journal of Combinatorial Theory, Series A*, 2021, 178, 105350, 51 pp. ([pdf](https://arxiv.org/pdf/1906.07723.pdf))

16. *A family of lacunary recurrences for Lucas Numbers*, (with *[Pankaj Jyoti Mahanta](http://pankajjyoti.com/)*), *The Fibonacci Quarterly*, 2020, 58 (4), 356-360. ([pdf](/publ/papers/Lucas_Pankaj.pdf))

15. *Some properties of Zumkeller numbers and $k$-layered numbers*, (with *[Pankaj Jyoti Mahanta](http://pankajjyoti.com/) and Daniel Yaqubi*), *Journal of Number Theory*, 2020, 217, 218–236. ([pdf](/publ/papers/Zumkeller_Numbers.pdf))

14. *Hard and Easy Instances of L-Tromino Tilings*, (with *Javier T. Akagi, Carlos F. Gaona, Fabricio Mendoza and [Marcos Villagra](https://sites.google.com/site/marcosvillagrahome/home)*) *Theoretical Computer Science*, 2020, 815, 197-212. ([pdf](publ/papers/tcs.pdf))

13. *On Deficient Perfect Numbers with Four Distinct Prime Factors*, (with *Parama Dutta*) *Asian-European Journal of Mathematics*, 2020, 13 (7), 2050126, 13 pp. ([pdf](https://arxiv.org/pdf/1906.09947.pdf))

12. *Hard and Easy Instances of L-Tromino Tilings*, (with *Javier T. Akagi, Carlos F. Gaona, Fabricio Mendoza and [Marcos Villagra](https://sites.google.com/site/marcosvillagrahome/home)*) *Proceedings of the 13th International Conference and Workshops on Algorithms and Computation (WALCOM) 2019, Lecture Notes in Computer Science (LNCS)*, Volume 11355, Springer, 2019, 82-95. ([pdf](/publ/papers/paper_22.pdf))

11. *Enumeration of Domino Tilings of an Aztec Rectangle with boundary defects*, *Advances in Applied Mathematics*, 2017, 89, 41–66. ([pdf](http://gonitsora.com/manjil/papers/Aztec.pdf))

10. *Some Properties of Fibonacci Numbers, Generalized Fibonacci Numbers and Generalized Fibonacci Polynomial Sequences*, (with *Alexandre Laugier*) *Kyungpook Mathematical Journal*, 2017, 57 (1), 1–84. ([pdf](http://gonitsora.com/manjil/papers/kmj.pdf))

9. *Some Results on Generalized Multiplicative Perfect Numbers*, (with *Alexandre Laugier and Upam Sarmah*) *Annali Dell’Universita’ di Ferrara*, 2016, 62 (2), 293–312. ([pdf](http://arxiv.org/pdf/1603.04382.pdf))

8. *A combinatorial proof of a result on generalized Lucas Polynomials*, (with *Alexandre Laugier*) *Demonstratio Mathematica*, 2016, 49 (3), 266–270. ([pdf](http://gonitsora.com/manjil/papers/demmath.pdf))

7. *A study of the crank function in Ramanujan’s Lost Notebook*, *The Mathematics Student*, 2015, 84 (1-2), 105 — 121. ([pdf](https://arxiv.org/pdf/1406.3299.pdf))

6. *Some results about Linear Recurrence Relation Homomorphisms*, (with *Alexandre Laugier*) *Notes on Number Theory and Discrete Mathematics*, 2014, 20 (4), 58 — 68. ([pdf](http://arxiv.org/pdf/1305.5743.pdf))

5. *A characterization of a prime $p$ from the binomial coefficient ${n \choose p}$*, (with *Alexandre Laugier*), *The Mathematics Student*, 2014, 83 (1-4), 221 — 227. ([pdf](http://arxiv.org/pdf/1209.2373.pdf))

4. *Cranks in Ramanujan’s Lost Notebook*, *Journal of the Assam Academy of Mathematics*, 2013, 6, 59 — 63. ([pdf](http://arxiv.org/pdf/1402.6644.pdf))

3. *A new proof of Lucas’ Theorem*, (with *Alexandre Laugier*) *Notes on Number Theory and Discrete Mathematics*, 2012, 18 (4), 1 — 6. ([pdf](http://arxiv.org/pdf/1301.4250.pdf))

2. *Binomial Symbols and Prime Moduli*, (with *[Jure Vogrinc](https://warwick.ac.uk/fac/sci/statistics/staff/academic-research/vogrinc/)*) *Journal of the Indian Mathematical Society*, 2011, 79 (1-4), 137 — 143. ([pdf](http://arxiv.org/pdf/1209.2374))

1. *A Simple Number Theoretic Result*, (with *[Jure Vogrinc](https://warwick.ac.uk/fac/sci/statistics/staff/academic-research/vogrinc/)*) *Journal of the Assam Academy of Mathematics*, 2010, 3, 91 — 96. ([pdf](http://arxiv.org/pdf/1207.6707.pdf))

## Solutions to Problems

2. *Solution to Problem 4 of The Mathematics Student, 2015 (1-2)*, *The Mathematics Student*, July — December 2015, 84 (3-4), 181. ([pdf](http://gonitsora.com/manjil/publ/solutions/ms-4.pdf))

1. *Solution to Problem 1908 of Mathematics Magazine*, (with *Bishal Deb*), *The Mathematics Magazine*, December 2013, 86 (5), 384 — 385. ([pdf](http://gonitsora.com/manjil/publ/solutions/1908.pdf))

## Books

2. *Moha Moha Puruxor Sanekire Jibonor* (edited with *Pankaj Jyoti Mahanta*), Panchajanya Publishers, Guwahati, 2018.

1. *The Pursuit of Joy* (with *Pankaj Jyoti Mahanta*), LAP Lambert Academic Publishing, Germany, 2011. ([pdf](http://gonitsora.com/manjil/publ/books/the_pursuit_of_joy.pdf))

## Non Peer-Reviewed Papers

9. *Further congruences for $(4,8)$-regular bipartition quadruples modulo powers of $2$*, preprint, 2023. ([pdf](/publ/papers/quad-alg.pdf))

8. *Almost Circular Balancing Numbers*, *Advances in Mathematical Sciences* (Z. Ahmed (ed.)), Empyreal Publishing House, 2019, 61 — 67. ([pdf](http://www.editedbook.in/pdf/dr-zakir-ahmed-edited.pdf#%5B%7B%22num%22%3A72%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C73.441%2C696.959%2Cnull%5D))

7. *On Deficient Perfect Numbers with Four Distinct Prime Factors, II*, preprint, 2018. ([pdf](/publ/papers/saikia_deficient_7.pdf))

6. *The Perils of the Indian Education System*, (with *Madhurrya P. Talukdar*) *Pragyan, Tinisukia College Magazine*, 2019. ([pdf](/publ/papers/Tinisukia_Education.pdf))

5. *John Forbes Nash, Jr. – A Short Obituary*, *Asia Pacific Mathematics Newsletter*, September 2015, 5 (2), 42 — 43. ([pdf](http://gonitsora.com/manjil/papers/john-nash.pdf))

4. *The Pythagoras’ Theorem*, *Asia Pacific Mathematics Newsletter*, September 2015, 5 (2), 5 — 8. ([pdf](http://gonitsora.com/manjil/papers/pythagoras.pdf))

3. *Periodic Sequences modulo $m$*, (with *Alexandre Laugier*) *prepint*, 2015. ([pdf](http://arxiv.org/pdf/1209.2371v3.pdf))

2. *Gonit Sora-the two year journey*, (with *[Pankaj Jyoti Mahanta](http://pankajjyoti.com/)*), *Asia Pacific Mathematics Newsletter*, October 2013, 3 (4), 25 — 27. ([pdf](/publ/papers/gonit-sora-apmn.pdf))

1. *An interesting number theoretic problem*, *Ganit Bikash*, 2011. ([pdf](http://arxiv.org/pdf/1208.3125.pdf))

## Lecture Notes

1. [Probability Theory](http://gonitsora.com/downloads/probability_theory.pdf) (with Rupam Haloi)

## Projects

4. [Polya’s Theory of Counting](http://gonitsora.com/manjil/publ/projects/polya.pdf) (under [Prof. Fernando R. Villegas](https://users.ictp.it/~villegas/) at The Abdus Salam International Centre for Theoretical Physics, Trieste, Italy), October – December 2014.

3. [Some results in Additive Combinatorics and Analytic Number Theory](http://gonitsora.com/manjil/publ/projects/additive-combinatorics.pdf) (under [Prof. R. Balasubramanian](https://en.wikipedia.org/wiki/Ramachandran_Balasubramanian) at The Institute of Mathematical Sciences, Chennai, India), June – July 2012.

2. [A study of Kummer’s proof of Fermat’s Last Theorem for regular primes](http://gonitsora.com/manjil/publ/projects/kummerFLT.pdf) (under [Prof. Kapil Hari Paranjape](http://www.iisermohali.ac.in/faculty/dms/dr-kapil-hari-paranjape) at The Indian Institute of Science Education and Research, Mohali, India), June – July 2011.

1. [The irrationality of $\zeta(2)$ and $\zeta(3)$](http://gonitsora.com/manjil/publ/projects/zeta-3.pdf) (under [Dr. Purusottam Rath](https://www.cmi.ac.in/people/fac-profile.php?id=rath) at Chennai Mathematical Institute, Chennai, India), June – July 2010.


text:
# Contributing to Muter

## Getting a Feature to Work On
The three pinned issues within our issue tracker are the highest priority issues to work on. If all of these are taken, or if these don't feel like something you would want to work on, then feel free to open an issue stating you'd like to work on something and we'll point you to an issue you could pick up. We're constantly reprioritizing our backlog, so the best way to find out what to work on is to ask!

## Submitting a Feature Request
We're always open to feature requests. We may not be able to accommodate it in the next release, but it's super valuable for us to understand what you want.

To request a feature, simply open an issue.

When requesting a feature, please be descriptive in what you are asking for - examples are super helpful, and links to prior art are also very helpful. We also think it's very important to understand any pain you are experiencing by not having a feature. Based on this information, we can look at other users' feature requests and determine where it falls in our priorities.

## Submitting a Pull Request
When working on a feature or bug, fork Muter's repository and work on your own branch locally. Once you're ready to have it merged back in, open a pull request and tag whomever you've had conversation with about the issue.

Prefer rebasing over merging `master` into your PR branch if you need to bring it up-to-date. We're happy to work through any merge conflicts with you that you have difficulty understanding.

## Testing Philosophy
Given that Muter is intended to perform a form of automated testing, it's extremely important that it has its own test suite which is very thorough and rigorous. It has very high code coverage, a very high mutation score, and has been entirely test-driven. It's important that any new code added to the code base doesn't significantly and adversely affect these metrics. We also feel it's important (though not required) for any contributor to practice test-driven development when working on Muter's codebase.

Because of the above, any pull requests which are adding features or bug fixes and omit new or updated tests won't be merged. We'll provide feedback on the tests that you should add, as well as how you can effectively backfill them without compromising the tests' quality.

We want to avoid having this conversation, so if you feel uncertain or nervous about how to test something, feel free to ask on your issue. After all, the contributors working on this project are giant testing nerds, and we would love to help you get better at writing tests! :D

### Running Muter's Tests

#### Unit Tests
To run Muter's unit tests from the command line:

```make test```

Alternatively, you can generate an xcode project with the command:

```make project```

and then run them from within xcode. These should be run frequently as you're developing a feature or bug fix.

#### Acceptance and Regression Tests
You must run these tests from the commandline as they depend on certain files having been generated from a run of Muter - if you run them from within Xcode, they will likely fail. For these reasons, we recommend you disable the test targets if you are using Xcode to work on a change.

Additionally, these tests will overwrite any generated Xcode project you may be using as they rely on the project file to run the tests they focus on.

Run the acceptance tests with:

```make acceptance-test```

Run the regression tests with:

```make regression-test```

Run the acceptance tests often if you're making a change which impacts a user's workflow or journey through Muter's interface. Otherwise, you can get away with running them less frequently.

Run the regression tests often if you are making changes to Muter's test report. Otherwise, we want you to run them once prior to making a pull request.

Both of these test suites are lengthy (~5 minutes). Budget your time accordingly, perhaps to coincide with a bathroom or tea break. :)

#### Mutation Tests
It's possible (and encouraged!) to run Muter on itself. To do this with the version of the code you've been working on, run:

```
make install
make mutation-test
```

The `mutation-test` action expects Muter to be on your `PATH`, so if you've installed Muter via homebrew, it's possible for you to use that version as well if you would like. Which version it will use when you have both depends on how you have your `PATH` variable set up.

**Pro Tip:** If you're looking for an easy way to identify the between the two of them, we recommend updating `version.swift` with a development version string. However, don't commit this change.

repository: muter-mutation-testing/muter

gha_language: Swift

repo_name: muter-mutation-testing/muter


text:
title: Writing docs
category: a-pollo
id: 4

---

### How to write a CSS widget documentation?

A-pollo can read documentation tags inside **CSS**, **SASS** or **LESS** files, right now it works by grouping widgets by filename, so if you have [two SASS files][apollo_test_files] with multiple examples inside documentation tags each file, you'll see two example pages.

So you can have [a file with multiple examples][button_social_sass] like this and see everything inside it's widget page:

```
/*@pollo
    @name:  Social button
    @auth:  [Vittorio Vittori](http://vit.to)
    @category:  Buttons
    @date:  2015-12-01
    @text:  This should be used to connect social accounts to the project service.
            It requires [Font Awesome](http://fontawesome.github.io/) to be loaded as dependency.
            The code above will show the Facebook version.
    @html:  <a href="#" class="button-social button-social--facebook">
                <div class="button-social__icon">
                    <i class="fa fa-facebook"></i>
                </div>
                <div class="button-social__network">
                    facebook
                </div>
            </a>
*/

/*@pollo
    @name:  Twitter
    @auth:  [Vittorio Vittori](http://vit.to)
    @date:  2015-12-02
    @text:  This twitter version has also `button-social--with-effects` modifier to show drop shadow effects
    @html:  <a href="#" class="button-social button-social--twitter button-social--with-effects">
                <div class="button-social__icon">
                    <i class="fa fa-twitter"></i>
                </div>
                <div class="button-social__network">
                    twitter
                </div>
            </a>
*/

.button-social {
    // sass code here...
}
```

### CSS documentation tags list

This is the list of the a-pollo documentation tags for CSS widgets:

| Tag name         | Required | Type         | Description                 |
|---               |---       |---           |---                          |
| `@name`          | `true`   | `String`     | Title of the example |
| `@auth`          | `false`  | `Markdown`   | Author or authors of the widget of the example |
| `@date`          | `false`  | `YYYY-MM-DD` | Date of the example |
| `@category`      | `false`  | `String`     | Widgets will be grouped with this, it's `Uncategorized` by default |
| `@text`          | `false`  | `Markdown`   | Description of the example  |
| `@html`          | `false`  | `String`     | Code snippet of the example, can be copied with a click |

Next step is [how to generate the style guide][generate].

[button_social_sass]: https://github.com/vitto/a-pollo/blob/master/test/frontsize/themes/default/widgets/button-social.scss
[apollo_test_files]: https://github.com/vitto/a-pollo/tree/master/test/frontsize/themes/default/widgets
[generate]: /generate-style-guide.html

repository: vitto/a-pollo

gha_language: CSS

repo_name: vitto/a-pollo


text:
# 렌더러 처리

> Since Electron uses Chromium for displaying web pages, Chromium’s multi-process architecture is also used. Each web page in Electron runs in its own process, which is called the renderer process.
>
> In normal browsers, web pages usually run in a sandboxed environment and are not allowed access to native resources. Electron users, however, have the power to use Node.js APIs in web pages allowing lower level operating system interactions.

**From the **[**Electron Documentation**](http://electron.atom.io/docs/tutorial/quick-start/#renderer-process)

---

## `vue` 와 `vuex` 관련 주제

### vue 컴포넌트

If you are unfamiliar with Vue components, please give [this](http://vuejs.org/v2/guide/single-file-components.html) a read. Using components gives our large complex applications more organization. Each component has the ability to encapsulate its own CSS, template, and JavaScript functionality.

컴포넌트는 `src/renderer/components`에 저장된다.. When creating child components, a common organization practice is to place them inside a new folder with the name of its parent component. This is especially useful when coordinating different routes.

```
src/renderer/components
├─ 부모컴포넌트A
│  ├─ 자식컴포넌트A.vue
│  └─ 자식컴포넌트B.vue
└─ 부모컴포넌트A.vue
```

### vue 라우트

For more information about `vue-router` click [here](https://github.com/vuejs/vue-router). In short, it is encouraged to use `vue-router` as creating a Single Page Application is much more practical when making Electron applications.  Probably not.

라우트는 `src/renderer/router/index.js` 에 있고 다음처럼 정의된다..

```js
{
  path: '<라우트경로>',
  name: '<라우트이름>',
  component: require('@/components/<라우트이름>View')
}
```

... `<routePath>` 과 `<routeName>` 는 변수다. These routes are then attached to the component tree using the `<router-view>` directive in `src/renderer/App.vue`.

##### Notice

`vue-router`를 쓸 때는, [**HTML5 History Mode**](http://router.vuejs.org/en/essentials/history-mode.html)를 사용하지 마라. This mode is strictly meant for serving files over the `http` protocol and does not work properly with the `file` protocol that Electron serves files with in production builds. The default `hash` mode is just what we need.

### vuex 모듈

Describing `vuex` is not the easiest thing to do, so please read [this](http://vuex.vuejs.org/en/intro.html) for a better understanding of what problem it tries to solve and how it works.

electron-vue takes advantage of `vuex`'s module structure to create multiple data stores, which are saved in `src/renderer/store/modules`.

Having multiple data stores can be great for organization, but it can also be annoying to have to import each and every one. But don't fret, as `src/renderer/store/modules/index.js` does the dirty work for us! This little script lets `src/renderer/store/index.js` import all of our modules in a one-shot manner. If all that didn't make sense, just know you can easily duplicate the given `Counter.js` module and it will be loaded in "magically".

repository: mcdoyaji/electron-vue

repo_name: mcdoyaji/electron-vue


text:
data-map: easily create geojson-driven maps in HTML pages by using
data-* attributes, no coding required. data-map only supports using
point features as placemarks, but can show customized popups. Pull
requests for additional functionality welcome.

### Documentation

You create a map simply by adding a div to your page with class
`data-map', and setting the following attributes.

- `data-geojson`: the URL of a [GeoJSON](http://geojson.org/) file
  which contains your GeoJSON data (only points are supported for now)
- `data-popup`: the popup text for the placemarks. You can reference
  the fields in the GeoJSON using sprintf-style format strings, e.g.
  `%(name)s` would insert the field `name`
- `data-lat`, `data-lon` and `data-zoom`: the initial latitude,
  longitude and [zoom level](/2011/10/29/google-maps-tile-scales/) for
  the map.
- `data-basemap`: (optional, advanced) the URL of custom tiles to use;
  defaults to MapQuest OSM.
- `data-attribution`: (optional) any attribution you would like to
  display. If `data-basemap` is set, this will be used as the
  attribution; otherwise, the attribution for MapQuest tiles will be
  appended.

Additionally, you will need to set the map to be a particular size,
for instance by specifying `style="width: 600px; height: 600px"`. Bear
in mind also that if you specify any HTML in the popup or the
attribution, double quotes will need to be written as `&quot;`.

To use data-map, just include its JavaScript file in your page. You'll
need to have already loaded jQuery. On
[my blog](http://www.indicatrix.org), I load the script on every page;
it shouldn't hurt anything else.

Here is a working example, which you can [see in action](http://projects.indicatrix.org/data-map/).

`<div class="data-map" style="width: 700px; height: 400px" data-lat="38" data-lon="-97" data-zoom="4" data-geojson="demo.geojson" data-popup="<h2>%(name)s</h2>%(desc)s"></div>`

Portions from [sprintf.js](https://github.com/alexei/sprintf.js) by
Alexandru Marasteanu.

repository: mattwigway/data-map

repo_name: mattwigway/data-map


text:
About Trivial-Indent
--------------------
This allows you to define custom indentation hints for your macros if the one recognised by Slime automatically produces unwanted results.

How To
------
The only feature of this that you will really need to use is `DEFINE-INDENTATION`.

```
(define-indentation defmacro (4 &lambda &body))
(define-indentation something-more-complex (4 &rest (&whole 2 0 4 &body)))
```

For more information on how the indentation rule forms work, please refer to the Slime source and documentation.
Otherwise just faffing about until it produces the indentation you need works well too.

repository: Shinmera/trivial-indent

gha_language: HTML

gha_license_id: Zlib

repo_name: Shinmera/trivial-indent


text:
# Changelog
**4.0.3**
- openfire: upgrade to 4.0.3

**4.0.2**
- openfire: upgrade to 4.0.2
-
**4.0.1**
- openfire: upgrade to 4.0.1

**3.10.3**
- openfire: upgrade to 3.10.3

**3.10.2-1**
- persistent data volume moved to `/var/lib/openfire`

**3.10.2**
- openfire: upgrade to 3.10.2

**3.10.0**
- More directory structure reorganization
- openfire: upgrade to 3.10.0

**3.9.3-4**
- Redefined directory structure in data volume
- Create `VERSION` file in data volume

**3.9.3-3**
- base image update to fix SSL vulnerability

**3.9.3-2**
- upgrade to sameersbn/debian:jessie.20141001, plugs shellshock

**3.9.3-1**
- update to the sameersbn/ubuntu:14.04.20140818 baseimage
- initial version 3.9.3

repository: bunnyfu/docker-openfire

gha_language: Shell

repo_name: bunnyfu/docker-openfire


text:
# 2D/3D pose clustering

The following code are implemented:

To classify the 2D and 3D poses, we used an unsupervised clustering algorithm called PhenoGraph. Each 2D/3D pose matrix with N rows (each containing all joints from a frame) is partitioned into clusters by a graph that represents their similarity. The graph is built in two steps, first it finds k nearest neighbors for each pose (using Euclidean distance) resulting in N sets of k nearest neighbors. In the second step, a weighted graph is built such that the weight between nodes depends on the number of neighbors they share. Louvain community detection is then performed on this graph to partition the graph that maximizes modularity.

## Usage

Requirements:
- python3
- pytorch
- torchvision
- numpy
- scipy
- scikit-learn
- phenograph

To classify the 2D and 3D poses with coordinates in CSV file:

Run:

```
python 2D_3D_pose_cluster.py

```

Expected output: Color codeed cluster of  2D and 3D poses.
Expected run time for demo on a "normal" desktop computer: Several minutes.


text:
# Architecture

If you're reading this, I have died.

No, just kidding. But you're probably interested in how this module is put together. Perhaps you're looking for tips on how to structure your own React-based SilverStripe module, or you want to make improvements to this one. You've come to the right place. Unless I'm actually dead when you're reading this. Sorry about that...

## This is not Flux

That's probably the first question you were going to ask. This version does not use Flux. We decided not to as the scope of features and volume of moving parts is relatively low. That said, we are following many of the important concepts of Flux. Data flows in a single direction, and is treated as immutable. The code is clean and easy to reason about.

## Some details...

There are two main modes to the Gallery component. The first is a list of files for the current folder or the current filter. It's possible to filter files in a specific folder, too. That Gallery component talks to a single backend. This backend takes the place of a store. It serves as an Ajax proxy to the CMS field JSON backend. Through this backend, the Gallery component can search for files (top-level, by sub-folder, or by filter).

The Gallery component composes an Editor component. When a file is edited, then the Gallery component switches to edit mode. The Editor is a place where file and folder details can be modified. These are persisted through the backend.

When the Gallery component is mounted, it requests a list of files relative to the path set on the CMS field. Each file is rendered in a list of File components. Each File component instance has details about the individual file, and presents UI for entering edit mode, deleting the file/folder or navigating into folders. File components may also be selected (which allows for inserting file objects through TinyMCE).

The Gallery component sends event handlers down to the components it composes. Editor and File component instances have no knowledge of the backend. They decide when to call special event properties (like `onFileSave` or `onFileDelete`), and the Gallery decides what to do with that event. This way the data being rendered travels from the Gallery component down to File and Editor components. Events are triggered by the Gallery component, via property-methods in the File and Editor components.

## For example

When the Gallery component is mounted, it requests file data:

1. `ReactDOM.render(el, <GalleryComponent backend={backend} />);`
2. `GalleryComponent.componentWillMount` → `this.props.backend.search()`
3. `GalleryComponent.componentWillMount` → `this.props.backend.on('onSearchData', data => this.setState(data))`
4. `GalleryComponent.render` → `this.state.files.map(file => <File file={file} onFileEdit={this.onFileEdit} ... />)`

When a File component wants to enter edit mode:

1. `FileComponent.render` → `<button onClick={this.onFileEdit} />`
2. `FileComponent.onFileEdit` → `this.props.onFileEdit(this.props, event)`
3. `GalleryComponent.onFileEdit` → `this.setState({'editing': file})`
4. `GalleryComponent.render` → `if (this.state.editing) return <EditorComponent file={this.state.editing} ... />`

repository: blueo/silverstripe-asset-admin

repo_name: blueo/silverstripe-asset-admin


text:
# JavaScript Algorithm Practice

## Write a function or set of functions to return all possible permutations of a string and remove duplicates.

### Challenge:
Write a function that takes ...
- a string

And returns...
- an array with all possible unique permutations of the string in an array.

### Note:
- returned array should not include duplicates if duplicates are possible given the input string.


text:
---
layout: default
---

# 1993-06-26 - Int'l Conf on Signal Processing Apps & Tech, Santa Clara, 28Sep93

## Header Data

From: gnu (John Gilmore)

To: cypherpunks, gnu

Message Hash: bf9a81be0aef639a9c30afaf617b918ffadbb95783ca839a9687033f4748772d

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-06-26 20:40:32 UTC

Raw Date: Sat, 26 Jun 93 13:40:32 PDT

## Raw message

```
{% raw  %}From: gnu (John Gilmore)
Date: Sat, 26 Jun 93 13:40:32 PDT
To: cypherpunks, gnu
Subject: Int'l Conf on Signal Processing Apps & Tech, Santa Clara, 28Sep93
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Folks interested in DSP's, including voice compression and encryption,
fast exponentiation, etc, may want to attend this conference.  Particular
sessions of interest:

Workshop, 27 Sep:  Low Cost Speech Compression Technology for Consumer
	Applications.  (costs extra $150)

Digital Encryption System for Speech Communication over the Public
Switching Telephone Network, Sofi'a Moreno Pe'rez, Rafael Sarmiento de
Sotomayor, Luis Di'ez del Ri'o, Jose' Parera Bermu'dez, Marcelino
Veiga Pe'rez, and Ramo'n Garcia Go'mez, E.T.S.I. de Telecomunicacio'n,
Spain.

Real-Time Implementation of Variable Rate QCELP Codec using TMS320C30
DSP, Kyongo Han, Byungsik Yoon, Insung Lee, and Sangwon Kang,
Electronics & Telecom. Research Institute, Korea

Improving the Cryptanalysis Algorithms Based Upon the Multiple
Residues, S.J. Tabatabaian and G.P. Singh, University of Newcastle upon
Tyne, U.K.

three more papers on Speech Coding Algorithms
15 more papers on Speech Coding Implementation

and about 100 other papers.

Price: $495 before 25Aug93; $595 after.
Students: $350 before, $425 after.

DSP Associates
18 Peregrine Road
Newton Centre, MA  02159
USA
+1<PHONE_NUMBER>
+1<PHONE_NUMBER>
<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

+ Return to [June 1993](/archive/1993/06)

+ Return to "[gnu (John Gilmore)](/authors/gnu_john_gilmore_)"

+ 1993-06-26 (Sat, 26 Jun 93 13:40:32 PDT) - Int'l Conf on Signal Processing Apps & Tech, Santa Clara, 28Sep93 - _gnu (John Gilmore)_


text:
# Diversity and Inclusion

![](https://www.workday.com/content/dam/web/zz/images/illustrations/img-diversity-hero-group.png)

It’s no secret that there is a pronounced gender gap in technology fields. In 2014, 70% of the employees at the top tech companies in Silicon Valley, such as Google, Facebook, and Twitter, were male. In technical roles, this phenomenon is even more pronounced; for example, only 10% of the technical workforce at Twitter is female.

But things haven’t always been this way. The numbers of enrollments among men and women in computer science were on their way toward parity in the 1970s and early 1980s. In 1984, 37% of computer science graduates were women, but those numbers began to drop dramatically in the middle of the decade. By 2016, that number had been whittled down to 18%. This dip in the 1980s has created a chasm that the past 30 years hasn’t been able to overcome—and the dude-centric computer marketing campaigns of that time may be to blame.

<EMAIL_ADDRESS>
## Diverse teams are smarter and more creative
* According to Scott E. Page, professor of complex systems, political science and economics at the University of Michigan: “Diverse groups of people bring to organizations more and different ways of seeing a problem and, thus, faster/better ways of solving it.”

* At Intel, CEO Brian Krzanich has said: “A fully diverse and inclusive workplace is fundamental to our ability to innovate and deliver business results.”

## Why diversity in tech is important?
* Diverse teams are smarter and more creative.

* Diverse companies perform better.

* Companies are losing out on great talent (when they close themselves to one race/gender only).

* Diverse companies can better serve a diverse user base.

* It’s the right thing to do.


text:
# FlowManager

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

Flow manager is helper class for executing multiple synchronous or asynchronous actions in set order.

## Usage example:
```
FlowManagerFactory.newInstance()
          .addAction(new Action() {
              @Override
              public void execute(Flow flow) {
                  Log.d("FlowManager", "Action 1");
                  flow.nextAction();
              }
          })
          .addAction(new Action() {
              @Override
              public void execute(Flow flow) {
                  Log.d("FlowManager", "Action 2");
                  flow.nextAction();
              }
          })
          .setInterruptListener(new InterruptListener() {
              @Override
              public void onInterrupted(Throwable throwable, Flow flow) {
                  Log.e("FlowManager", "Flow interrupted", throwable);
              }
          })
          .setFinishListener(new FinishListener() {
              @Override
              public void onFinished(Flow flow) {
                  Log.d("FlowManager", "Flow finished");
              }
          })
          .start();
```

## Gradle:

Add it in your root build.gradle at the end of repositories:
```
allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}
```

Add the dependency:
```
dependencies {
        compile 'com.github.Lighture:FlowManager:0.2'
}
```

repository: Lighture/FlowManager

repo_name: Lighture/FlowManager


text:
# v1_tcp_socket_action_t

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**host** | **char \*** | Optional: Host name to connect to, defaults to the pod IP. | [optional]
**port** | **int_or_string_t \*** | IntOrString is a type that can hold an int32 or a string.  When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type.  This allows you to have, for example, a JSON field that can accept a name or number. |

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

repository: kubernetes-client/c

gha_language: C

repo_name: kubernetes-client/c


text:
# REDCap First Responder COVID-19 ETL Engine

This project provides extract, transform, and load (ETL) tools in support of the First Responders COVID-19 Testing project at the University of Florida. The ETL tools are RScripts run by a Docker container.

## Prerequisites

This script use R and these R packages:

    tidyverse
    dotenv
    REDCapR
    openxlsx
    sendmailR

To build the Docker container, you will need only Docker.

This project is designed to move data between two REDCap projects that work together to collect and curate the data in a COVID-19 testing workflow. The source project, referred to as the _results_ project in the code and configuration files, is provided as a REDCap project XML file at [`./examples/First_Responder_COVID19_Results_Upload.xml`](./examples/First_Responder_COVID19_Results_Upload.xml).  The target project, referred to as the _survey_ project in the code and configuration files, is available at as [`First_Responder_COVID19.xml`](https://github.com/ctsit/fr_covidata/blob/master/example/First_Responder_COVID19.xml) in the [fr_covidata REDCap module](https://github.com/ctsit/fr_covidata).

This script uses the REDCap API to move data between the two projects. The API must be enabled on the REDCap project and the host where this script runs will need to have access to it.

## Setup and Configuration

This script is configured entirely via the environment. An example `.env` file is provided as `./example.env`. To use this file, copy it to the name `.env` and customize according to your project needs. Follow these steps to build the required components and configure the script's `.env` file.

1. Create each of the REDCap projects from the project XML files. We will refer to these two projects as _survey_ and _results_ for the remainder of this document.
1. In both the survey and results projects, give a user User Rights of _Full Data Set_ for _Data Exports_
1. In each project, that user will need an API key in _each_ project.
1. Add the new API keys to the .env file taking care to not confuse the two keys.
1. Change the `*_PROJECT_TITLE` and `*_PROJECT_PID` fields to match the result and survey projects.
1. Set `TIME_ZONE` to assure that time stamps used in the file names and the email are accurate.
1. Revise the `EMAIL_*` and `SMTP_SERVER` settings to reflect your local needs.

## Running the ETL script

The primary ETL script is [`load_results_into_survey_project.R`](load_results_into_survey_project.R). It can be run at the command line, in RStudio, or by building and running the docker container. In each case the script will read its configuration from the `.env` file.

To build the image and run the report using docker within the project directory do:

`docker build -t <image_name> .`

and run the report using docker within the project directory like this:

`docker run --env-file .env -v path/from/host:/home/fr_covidata_engine <image_name>`

gha_license_id: NOASSERTION


text:
# Terminus\Models\Collections\Sites

### __construct
##### Description:
    Instantiates the collection, sets param members as properties

##### Parameters:
    [array] $options To be set to $this->key

##### Return:
    [Sites]

---

### addSite
##### Description:
    Creates a new site

##### Parameters:
    [string[]] $options Information to run workflow, with the following
    -keys:
    -- label
    -- name
    -- organization_id
    -- upstream_id

##### Return:
    [Workflow]

---

### addSiteToCache
##### Description:
    Adds site with given site ID to cache

##### Parameters:
    [string] $site_id UUID of site to add to cache
    [string] $org_id  UUID of org to which new site belongs

##### Return:
    [Site] The newly created site object

---

### deleteSiteFromCache
##### Description:
    Removes site with given site ID from cache

##### Parameters:
    [string] $site_name Name of site to remove from cache

##### Return:
    [void]

---

### fetch
##### Description:
    Fetches model data from API and instantiates its model instances

##### Parameters:
    [array] $options params to pass to url request

##### Return:
    [Sites]

---

### filterAllByTag
##### Description:
    Filters sites list by tag

##### Parameters:
    [string] $tag Tag to filter by
    [string] $org Organization which has tagged sites

##### Return:
    [Site[]]

---

### get
##### Description:
    Retrieves the site of the given UUID or name

##### Parameters:
    [string] $id UUID or name of desired site

##### Return:
    [Site]

---

### rebuildCache
##### Description:
    Clears sites cache

##### Return:
    [void]

---

repository: Deleriumdoll/cli

repo_name: Deleriumdoll/cli


text:
---
title: "06. Renaming Fields with GraphQL Aliases"
metaTitle: "06. Renaming Fields with GraphQL Aliases"
metaDescription: "Learn how to renaming fields with GraphQL aliases."
---

[Video Link](https://egghead.io/lessons/graphql-renaming-fields-with-graphql-aliases)

## Summary

In this lesson, we’ll show the problem with naming collisions in GraphQL queries and how they can be solved with aliases.

## Notes

Our query is telling us how many pets are checked out, but I also want to see how many pets are available. I'm going to add the `totalPets` query to line two, and I'll add the status `Available` as an argument.

```graphql
query {
  totalPets(status: AVAILABLE)
  totalPets(status: CHECKEDOUT)
  allPets {
    name
    weight
    category
    photo {
      thumb
      full
    }
  }
}
```

If we try to hit play on this, we're going to see some errors returned.

![](https://res.cloudinary.com/dg3gyk0gu/image/upload/v1563555709/transcript-images/renaming-fields-with-graphql-aliases-error.png)

If I scroll down a little further, we're going to see where this is happening, line two, column three, and line three, column three. We also see this little faint hit of red, letting us know that there's some sort of a problem.

We have a naming collision here. What we'll need to do is preface both of these queries with an alias. I can pick a new name for this field. I'll call it `available` and add a colon. Then I'll add `checkedOut` with a colon in front of that.

```graphql
query {
  available: totalPets(status: AVAILABLE)
  checkedOut: totalPets(status: CHECKEDOUT)
  allPets {
    name
    weight
    category
    photo {
      thumb
      full
    }
  }
}
```

I can hit play, and now, I see that `available` and `checkedOut` are returned. The query is successful, and I've renamed these fields in our JSON response.

![](https://res.cloudinary.com/dg3gyk0gu/image/upload/v1563555709/transcript-images/renaming-fields-with-graphql-aliases-queries-fiexed.png)

```graphql
query {
  available: totalPets(status: AVAILABLE)
  checkedOut: totalPets(status: CHECKEDOUT)
  total: totalPets
  allPets {
    name
    weight
    category
    photo {
      thumb
      full
    }
  }
}
```

This will tell us that 25 total pets are part of the library, all bundled in the same query. Aliases can be added to any field, so I added them to top-level queries, like `totalPets`, before. If you wanted to add them to more nested fields, you could do so.

I could rename the photo field with an alias called `petPhoto`, and this is going to rename that in the response in all cases.

```
query {
  available: totalPets (status: AVAILABLE)
  checkedOut: totalPets (status: CHECKEDOUT)
  total: totalPets
  allPets {
    name
    weight
    category
    petPhoto {
      thumb
      full
    }
  }
}
```

## Personal Take

It's important to understand the difference between fragmetns and Aliases:

- Fragments let you construct sets of fields, and then include them in queries where you need to.
- Aliases - they let you rename the result of a field to anything you want.

## Resources

- [How to use GraphQl aliases (blog)](https://atheros.ai/blog/how-to-use-graphql-aliases)


text:
[![compatibility](https://github.com/ctuning/ck-guide-images/blob/master/ck-compatible.svg)](https://github.com/ctuning/ck)
[![automation](https://github.com/ctuning/ck-guide-images/blob/master/ck-artifact-automated-and-reusable.svg)](http://cTuning.org/ae)
[![workflow](https://github.com/ctuning/ck-guide-images/blob/master/ck-workflow.svg)](http://cKnowledge.org)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

This repository contains experimental workflow and all related artifacts
as portable, customizable and reusable [Collective Knowledge components](https://github.com/ctuning/ck)
for image classification from the [1st ReQuEST tournament at ASPLOS'18](http://cknowledge.org/request-cfp-asplos2018.html)
on reproducible SW/HW co-design of deep learning (speed, accuracy, energy, costs).

Note that after the official release of VTA within TVM in July 2017,
we have moved main functionality from here to [ck-tvm](https://github.com/ctuning/ck-tvm) repository.
Please, follow this [ReadMe](https://github.com/ctuning/ck-mxnet#using-vta-deep-learning-accelerator-stack-via-ck) for more details.

## References

* **Title:** VTA: Open Hardware/Software Stack for Vertical Deep Learning System Optimization
* **Authors:** Thierry Moreau, Tianqi Chen, Luis Ceze

* [ACM paper](https://doi.org/10.1145/3229762.3229766)
* [ACM artifact](https://doi.org/10.1145/3229772)

* [arXiv ReQuEST goals](https://arxiv.org/abs/1801.06378)

* [ReQuEST submission and reviewing guidelines](http://cknowledge.org/request-cfp-asplos2018.html)
* [ReQuEST workflows](https://github.com/ctuning/ck-request-asplos18-results)
* [ReQuEST scoreboard](http://cKnowledge.org/request-results)

## Artifact check-list

Details: [Link](http://cTuning.org/ae/submission_extra.html)

* **Algorithm:** image classification (Deep Learning, Neural Networks, ResNet-18 inference, 2D convolutions)
* **Program:** image classification and accuracy validation (TVM/VTA)
* **Compilation:** NNVM, TVM, GCC and LLVM >=4
* **Transformations:** TVM Schedule Optimizations, loop splitting, loop reordering, tensorization, virtual threading
* **Binary:** FPGA bit-stream and RPC server executable
* **Data set:** ImageNet 2012 validation (50,000 images) and ResNet-18 8-bit
* **Run-time environment:** Ubuntu 15.04; Python2/3
* **Hardware:** Xilinx Pynq-Z1 FPGA development board, x86 host desktop/laptop
* **Run-time state:**
* **Execution:** remote execution via RPC
* **Metrics:** total execution time; top1/top5 accuracy over some (all) images from the data set
* **Output:** classification result; execution time; accuracy
* **Experiments:** automated via CK command line
* **How much disk space required (approximately)?** 200MB for VTA repo
* **How much time is needed to prepare workflow (approximately)?** 15 mins for inference only, 2 hours for hardware compilation of hardware artifact
* **How much time is needed to complete experiments (approximately)?** 20 mins for full Imagenet test dataset
* **Publicly available?:** Will be (not at the time of the publishing)
* **Code license(s)?:** Apache 2.0
* **CK workflow framework used?** Yes
* **CK workflow URL:** https://github.com/ctuning/ck-request-asplos18-resnet-tvm-fpga
* **CK results URL:** https://github.com/ctuning/ck-request-asplos18-results-resnet-tvm-fpga
* **Original artifact:** https://github.com/uwsaml/vta

## Installation: PYNQ-Z1 FPGA (connected via RPC from host)

Please follow this [getting started guide](https://docs.tvm.ai/vta/install.html#pynq-board-setup) to set up your Pynq board.

We used pynq_z1_image_2017_02_10.img with 16GB microSD card and Ubuntu 15.04.

Turn on your board. You should now be able to connect to it as follows:

```
$ ssh<EMAIL_ADDRESS>```

Use 'xilinx' as password.

### Install global prerequisites (Ubuntu)

Note that Ubuntu 15.04 is now outdated. You need to fix URLs of Ubuntu repos to be able to update it and install missing packages as follows:

```
$ sudo vim /etc/apt/sources.list.d/multistrap-wily.list
 deb [arch=armhf] http://old-releases.ubuntu.com/ubuntu wily universe main
 deb-src http://old-releases.ubuntu.com/ubuntu wily universe main
```

Then you should be able to upgrade your distribution as follows:
```
$ sudo apt update
$ sudo apt upgrade
```

Now you can install missing deps:
```
$ sudo apt install python-pip python3-pip
$ pip install wget

```

### Install minimal CK

The minimal installation requires:

* Python 2.7 or 3.3+ (limitation is mainly due to unitests)
* Git command line client.

You can install CK in your local user space as follows:

```
$ git clone http://github.com/ctuning/ck
$ export PATH=$PWD/ck/bin:$PATH
$ export PYTHONPATH=$PWD/ck:$PYTHONPATH
```

You can also install CK via PIP with sudo to avoid setting up environment variables yourself:

```
$ sudo pip install ck
```

### Install this CK repository with all dependencies (other CK repos to reuse artifacts)

```
$ ck pull repo:ck-request-asplos18-resnet-tvm-fpga
```

### Install this CK workflow from the ACM Digital Library snapshot

It is possible to install and test the snapshot of this workflow
from the ACM Digital Library without interfering with your current CK installation.
Download related file "request-asplos18-artifact-?-ck-workflow.zip"
to a temporary directory, unzip it and then execute the following commands:
```
$ . ./prepare_virtual_ck.sh
$ . ./start_virtual_ck.sh
```
All CK repositories will be installed in your current directory.
You can now proceed with further evaluation as described below.

### Install and run VTA RPC server via CK

```
$ ck install package:lib-tvm-runtime-master --env.PACKAGE_GIT_CHECKOUT=e4c2af9abdcb3c7aabafba8084414d7739c17c4c

  choose Python 3!

$ ck run program:vta-pynq-server --sudo

  during first execution other missing soft dependencies will be detected or installed including libdma.so and VTA server

```

If libdma.so is installed in an unusual directory and was not automatically found by CK (see #1),
you can register it manually as follows (and then restart above commands):
```
$ ck detect soft:lib.pynq.dma --search_dirs={path to libdma.so)
```

Note that by default this server will run on host '<IP_ADDRESS>' and port '9091'.

Now you can configure your host machine to classify images via this board.

## Installation: host machine (tested on Ubuntu or similar)

Install missing deps:
```
$ sudo apt install python-pip python3-pip
$ pip install wget

```

### Install Collective Knowledge and this repository with all deps
```
$ sudo pip install ck
$ ck pull repo:ck-request-asplos18-resnet-tvm-fpga
```

### Install TVM, NNVM and VTA

```
$ ck install package:lib-tvm-master-cpu --env.PACKAGE_GIT_CHECKOUT=e4c2af9abdcb3c7aabafba8084414d7739c17c4c
 Select Python 2.x
 LLVM > 4.x

$ ck install package:lib-nnvm-master --env.PACKAGE_URL=https://github.com/tqchen/nnvm --env.PACKAGE_GIT_CHECKOUT=qt

$ ck install package:lib-vta-python-master
```

### Set up RPC access to VTA server
```
$ ck add machine:pynq
```

Select "remote machine accessed via RPC", then enter hostname and port.

You can then check if VTA server running as follows:
```
$ ck show machine
```

### Run classification
You can now try to classify some image via VTA server as follows:
```
$ ck run program:request-tvm-vta-pynq --cmd_key=classify --target=pynq
```

### Test accuracy
Finally, you can test accuracy on IMAGENET as follows:
```
$ ck run program:request-tvm-vta-pynq --cmd_key=test target=pynq
```

Note that if board crahes, you can restart above program and it will continue aggregating statistics
via program/request-tvm-vta-pynq/tmp/aggregate-ck-timer.json file. You can delete it if you want to collect "fresh" stats.

### Run benchmarking in a unified ReQuEST way and record results

You can run performance benchmark and record experiments as follows:
```
$ cd `ck find script:benchmark-request-tvm-fpga`
$ python benchmarking.py
```

Your results will be recorded in local:experiment:ck-request-asplos18-tvm-fpga-performance-* entries:
```
$ ck ls local:experiment:ck-request-asplos18-tvm-fpga-performance-*
```

## Reviewers

This workflow was converted to CK and validated by the following reviewers:
* [Grigori Fursin](http://fursin.net/research.html)

## See accepted results on the live scoreboard

[Link](http://cKnowledge.org/request-results)

## Further discussions

* [Collective Knowledge mailing list](http://groups.google.com/group/collective-knowledge)
* [Collective Knowledge slack](https://collective-knowledge.slack.com)
* [Artifact evaluation mailing list](http://groups.google.com/group/artifact-evaluation)


text:
## What is this repository for?
**Coverage Insight** - is a software tool designed to help insurance agents get the most out of their book of business by making customer insurance review meetings as insightful as possible. The principles involved in Coverage Insight’s features focus on improving client retention, uncovering new policy sales, and ultimately making more money.

* Current Release: 3.0
* Next Release: 3.5

## How do I get set up? ##

 ## You will need the following development software tools installed:
   - [x] LAMP (Linux, Apache, MySQL, PHP)
   - [x] Code Editor  (Sublime Text, Webstorm use what you are most comfortable with)
   - [x] Node ([Install NPM Tool](https://nodejs.org))
   - [x] Composer (https://getcomposer.org)

 ## Configuration
  1. Before you can work to Coverage Insights Tool you need to "Clone" this repository
```
```

  2. After you cloned the project, go to project directory -> installer folder -> and extract the Yii framework and Node Modules that was compressed to **.tar**
```
     $ cd app.coverage-insight.local
     $ cd installer
     $ tar -xf node_modules.tar -C ../node_modules
     $ tar -xf yii16.tar -C ../yii16
```

 ## Dependencies
 ```
1. Yii v1.1.16
2. PHP 5.4+
3. MySQL
```

 ## Database configuration
   1. Edit the content of this configuration file `protected/config/development/main.php`, `protected/config/staging/main.php` and `protected/config/production/main.php`

 ## Deployment instructions
  1. The deployment can only be done by FTP, but before uploading your files you need to make sure that the VPN was running

repository: Skyrul/Coverage-Insight

repo_name: Skyrul/Coverage-Insight


text:
# Cordial

A EDSL to describe *System-on-Chip* (SoC) Architectures.

This work is a public alpha of the system as it stands.

Modern Systems-on-a-Chip (SoC) are constructed by composition of IP (Intellectual Property) cores.
The communication between IP Cores are governed by well described interaction protocols.
However, there is a disconnect between the machine readable specification of these protocols and the verification of their implementation in known hardware description languages.
Although tools can be written to address such a separation of concerns, such tooling is often hand written and used to check hardware designs *a posteriori*.
We have developed a dependent type-system and proof-of-concept modelling language to reason about the physical structure of hardware interfaces respective to user provided descriptions.
Our type-system provides correct-by-construction guarantees that the interfaces on an IP Core will be well-typed if they adhere to a specified standard.

Cordial comprises of a system of related statically typed models that reason about the structure of interfaces on a component respective to a given interface specification.
We build upon existing work from existing hardware description tooling, and utilise state-of-the-art concepts from programming language theory to provide correct-by-construction guarantees over construction of abstract interface descriptions and the adherence of concrete interfaces to said abstract descriptions.
The framework has been realised within the dependently typed language Idris [^1] as a proof-of-concept implementation, and it has been used to describe several well known IP communication protocols.
Namely: APB, LocalLink, and AXI3/4.

This work is constantly in progress and as such documentation may not be as readily available or polished as we would like.
Any questions or comments then please do get in touch.

[^1]: https://www.idris-lang.org

repository: border-patrol/cordial

repo_name: border-patrol/cordial


text:
# @truffle/dashboard-message-bus-common

:warning: **This is a middleware package and should only be used when developing integrations for the truffle dashboard** :warning:

This package serves as a set of common types to be shared between packages like `@truffle/dashboard-message-bus` and `@truffle/dashboard-message-bus-client`

## Installation

If you are building a package that needs to interface with the Dashboard or message bus, you can install this package from NPM.

```
npm install @truffle/dashboard-message-bus-common
```

```
yarn add @truffle/dashboard-message-bus-common
```

### Adding new message types

Right now there are very few message types. The most important one is `"provider"`, which sends RPC requests for the dashboard-provider. Other message types are `"invalidate"`, which can be sent to invalidate earlier messages, and `"log"`, which is sent by the message bus to send log messages over the wire. The interfaces of these messages are defined inside of this package, from where they can be imported by consumers.

To add additional message types, the interface for the new message type should be defined in this package under `lib/messages.ts`. To use these new messge formats, support needs to be added to any consuming packages such as `@truffle/dashboard` as well.

repository: trufflesuite/truffle

branch_name: refs/heads/develop

gha_language: TypeScript

repo_name: trufflesuite/truffle


text:
# glsl-basic-light

Minimal GLSL struct for a material. Designed for use as a shader component with [`glslify`](https://github.com/stackgl/glslify).

# install

To make avaialble in your project

```javascript
npm install glsl-basic-material --save
```

# example

Define 2 materials to use in your shader

```javascript
pragma glslify: BasicMaterial = require('glsl-basic-material')
uniform BasicMaterial materials[2];
```

Then set their properties on a `shader` created using `gl-shader`

```javascript
shader.uniforms.materials = [
	{
		emissive: [2.0, 2.0, 2.0],
		ambient: [0.0, 0.0, 0.0],
		diffuse: [0.5, 0.1, 0.1],
		specular: [0.9, 0.3, 0.3],
		shininess: 20.0,
		roughness: 0.5
	},
	{
		emissive: [0.0, 0.0, 0.0],
		ambient: [0.2, 0.2, 0.2],
		diffuse: [0.5, 0.5, 0.4],
		specular: [0.0, 0.0, 0.0],
		shininess: 20.0,
		roughness: 0.9
	}
]
```

# API

Inside your shader just declare the struct type with

```javascript
pragma glslify: BasicMaterial = require('glsl-basic-material')
```

and use as you like, e.g. to set a `uniform` or construct a variable.

The attributes and types on the struct are

```javascript
emissive // vec3
ambient // vec3
diffuse // vec3
specular // vec3
shininess // float
roughness // float
```

You can use these in your shader code however you want, but typically:
- `emissive` controls the color of the material independent of lighting
- `ambient` controls the color of the material scaled by the amount ambient light
- `diffuse` controls the color of the material scaled by the diffuse light component
- `specular` controls the color of the material scaled by the specular light component
- `shininess` controls the shine parameter of the specular component
- `roughness` controls the roughness parameter of the diffuse component

repository: freeman-lab/glsl-basic-material

repo_name: freeman-lab/glsl-basic-material


text:
# Burp Challenge
- This example walks you through some basic Burp functionality.

## Step 1
- The first step is outlined on the index page. Set up and turn the proxy on, then type in any username and password.
- The request should pop up in the intercept window and you can see what's being sent to the server.
- Here is an example request:
```
POST / HTTP/1.1
Host: localhost:5002
Content-Length: 28
Connection: close

username=admin1&password=admin_password
```

- You can see your username and password being sent at the bottom in the form `username=inputted_username&password=inputted_password`
- Sending the request to the repeater it will make it easier to continually make incremental changes and watch the response.
- There's a new header that pops up:
```
Try This In Your Browser For It To Work: Username: 'Rick' & Password = 'hunter2'
```

- If you try it in your browser you get redirected to 'Rick Astley Never Gonna Give You Up'
    - AKA you got Rick Rolled.
- This is a nice example of a couple things:
    1. CTF makers are big memers
    2. We also create things called 'red herrings'. These are fake hints to the solution to keep players on their toes.

## Step 2
- If you intercept the request after typing in the username and password, you get this page:
```html
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 631
Server: Werkzeug/1.0.0 Python/3.7.8
Date: Sat, 08 Aug 2020 03:13:10 GMT

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Burp Example</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link
      rel="stylesheet"
      href="/static/css/bootstrap.min.css"
    />
    <script>
      window.location.assign("https://www.youtube.com/watch?v=dQw4w9WgXcQ");    <--- Rick roll redirect here
    </script>
  </head>

  <body>
    <div class="jumbotron text-center">
      <h1 class="display-1">Burp Example</h1>
    </div>
    <div class="content">
      <div>
        <p>%62%30%63%74%66%7b%62%75%72%70%5f%72%6f%63%6b%73%21%7d</p>           <--- This is interesting
      </div>
    </div>
  </body>
</html>
```
- That looks like a url encoded string.

### Decoder
- We can copy that string to the Decoder, or select it, right click & send to decoder
- Decode as url to get the flag: `b0ctf{burp_rocks!}`

gha_language: TeX


text:
# Buffer

The `Napi::Buffer` class creates a projection of raw data that can be consumed by
script.

## Methods

### New

Allocates a new `Napi::Buffer` object with a given length.

```cpp
static Napi::Buffer<T> Napi::Buffer::New(napi_env env, size_t length);
```

- `[in] env`: The environment in which to create the `Napi::Buffer` object.
- `[in] length`: The number of `T` elements to allocate.

Returns a new `Napi::Buffer` object.

### New

Wraps the provided external data into a new `Napi::Buffer` object.

The `Napi::Buffer` object does not assume ownership for the data and expects it to be
valid for the lifetime of the object. Since the `Napi::Buffer` is subject to garbage
collection this overload is only suitable for data which is static and never
needs to be freed.

```cpp
static Napi::Buffer<T> Napi::Buffer::New(napi_env env, T* data, size_t length);
```

- `[in] env`: The environment in which to create the `Napi::Buffer` object.
- `[in] data`: The pointer to the external data to expose.
- `[in] length`: The number of `T` elements in the external data.

Returns a new `Napi::Buffer` object.

### New

Wraps the provided external data into a new `Napi::Buffer` object.

The `Napi::Buffer` object does not assume ownership for the data and expects it
to be valid for the lifetime of the object. The data can only be freed once the
`finalizeCallback` is invoked to indicate that the `Napi::Buffer` has been released.

```cpp
template <typename Finalizer>
static Napi::Buffer<T> Napi::Buffer::New(napi_env env,
                     T* data,
                     size_t length,
                     Finalizer finalizeCallback);
```

- `[in] env`: The environment in which to create the `Napi::Buffer` object.
- `[in] data`: The pointer to the external data to expose.
- `[in] length`: The number of `T` elements in the external data.
- `[in] finalizeCallback`: The function to be called when the `Napi::Buffer` is
  destroyed. It must implement `operator()`, accept a `T*` (which is the
  external data pointer), and return `void`.

Returns a new `Napi::Buffer` object.

### New

Wraps the provided external data into a new `Napi::Buffer` object.

The `Napi::Buffer` object does not assume ownership for the data and expects it to be
valid for the lifetime of the object. The data can only be freed once the
`finalizeCallback` is invoked to indicate that the `Napi::Buffer` has been released.

```cpp
template <typename Finalizer, typename Hint>
static Napi::Buffer<T> Napi::Buffer::New(napi_env env,
                     T* data,
                     size_t length,
                     Finalizer finalizeCallback,
                     Hint* finalizeHint);
```

- `[in] env`: The environment in which to create the `Napi::Buffer` object.
- `[in] data`: The pointer to the external data to expose.
- `[in] length`: The number of `T` elements in the external data.
- `[in] finalizeCallback`: The function to be called when the `Napi::Buffer` is
  destroyed. It must implement `operator()`, accept a `T*` (which is the
  external data pointer) and `Hint*`, and return `void`.
- `[in] finalizeHint`: The hint to be passed as the second parameter of the
  finalize callback.

Returns a new `Napi::Buffer` object.

### Copy

Allocates a new `Napi::Buffer` object and copies the provided external data into it.

```cpp
static Napi::Buffer<T> Napi::Buffer::Copy(napi_env env, const T* data, size_t length);
```

- `[in] env`: The environment in which to create the `Napi::Buffer` object.
- `[in] data`: The pointer to the external data to copy.
- `[in] length`: The number of `T` elements in the external data.

Returns a new `Napi::Buffer` object containing a copy of the data.

### Constructor

Initializes an empty instance of the `Napi::Buffer` class.

```cpp
Napi::Buffer::Buffer();
```

### Constructor

Initializes the `Napi::Buffer` object using an existing Uint8Array.

```cpp
Napi::Buffer::Buffer(napi_env env, napi_value value);
```

- `[in] env`: The environment in which to create the `Napi::Buffer` object.
- `[in] value`: The Uint8Array reference to wrap.

### Data

```cpp
T* Napi::Buffer::Data() const;
```

Returns a pointer the external data.

### Length

```cpp
size_t Napi::Buffer::Length() const;
```

Returns the number of `T` elements in the external data.

repository: holzschu/a-shell

repo_name: holzschu/a-shell


text:
---
layout: post
title: Data Compression and Flow-based Models
---

*Notes from Week 2 : Deep Unsupervised Learning, UC Berkeley*

## Compression (Pieter)

A prefix code is a type of code system (typically a variable-length code) distinguished by its possession of the “prefix property”, which requires that there is no whole code word in the system that is a prefix (initial segment) of any other code word in the system

Entropy$(H(X))$ refers to the expected encoding length when encoding each symbol i with $\log_2\frac{1}{p(x_i)}$ bits

$$H(X)=\sum_{i}p(x_i)\log_2\frac{1}{p(x_i)}$$

The above equation intuitively implies that entropy can be understood as the expected number of bits of the encoding scheme.

For an order 0 Markov model $P(X)$, Shannon's theorem states that any compression scheme must use $>=H(X)$ bits on average. Huffman later proved that using an optimal prefix code, this expected number could be $<=H(X)+1$.

If we don't know the actual probability distribution to be compressed ($p$) and use $\hat{p}$ instead, we incur an extra $KL(p||\hat{p})$ bits on average.

$$l_a = KL(p||\hat{p})+H(p)$$

The closer $\hat{p}$ is to $p$, the fewer bits we require to compress our data on average. However, if $p$ by itself has high entropy, we would have to employ other means to get better prefix codes.

We can decrease entropy by conditioning our distribution on previously known datapoints

$$H(X|C)=\sum_{c}p(c)\sum_{i}p(x|c)\log_2\frac{1}{p(x|c)}$$

$$\implies H(X|C)<=H(X)$$

This is what autoregressive models aim to do.

In scenarios where $H(X)$ is already small in comparison to the $+1$ that the Huffman code adds, we try to encode many symbols together to pay the $+1$ overhead less frequently. This is implemented in fax machines as Run-length Coding.

Arithmetic coding involves indexing into a distribution to avoid this $+1$ overhead (assumes that receiver knows the prior probabilities. Here, we have the line [0,1] broken down into intervals representing the probabilities of datapoints. Indexing into these would give rise to uniquely decodable symbols, assuming the decoder knows the probabilities.

Binary numbers correspond to intervals of all possible completions. This means that .00 would map to [0,0.25), .11 would map to [.75,1) and so on. It turns out that for an interval of size $s$, we can always find a codeword of length $\left \lceil{\log_2\frac{1}{s}}\right \rceil+1$

We can integrate autoregressive models into this setup by using different probabilities at each step while splitting the intervals. These updated probabilities at each step correspond to the autoreregressive model's estimation of conditioned probabilities. However, this neural network by itself could be massive overhead as the decoder would have to have the model too.

LZ algorithm is an example of an adaptive compression scheme where the estimated probability distribution is always changing to better fit the actual distribution. It is also nonparametric and only uses a sliding window to look forward/ahead to compress data.

## Flows (Johnathan)

Density models work with continuous data and try to fit probability density functions instead of probability mass functions. We could use Gaussian mixture models to estimate pdfs but adding Gaussian noise to real world data often results in poorly defined images. Cumulative distribution functions offer an invertible differentiable representation of continuous data.

A flow refers to an invertible differentiable function from x to z. The idea is to work with flows instead of pdfs for easier sampling. We fit flows with maximum likelihood

$$arg\min_{\theta}[-\log{p_{\theta}(x)}]$$

A flow $f_{\theta}$ defines a distribution over x via sampling

$$z\sim p(z), x=f_{\theta}^{-1}(z)$$

$$p_\theta(x)dx=p(z)dz=p(z)f'(x)dx$$

The more the defined flow 'stretches' space, the more likely that the sampled point corresponds to a given datapoint from the domain.

For a CDF flow,

$$\log{p(x)}=\log{p(z)}+\log{CDF'(x)}$$

$$=\log{PDF(x)}$$

For high dimensional data, the sampling process linearly transforms a small cube $dz$ to a parallelopiped $dx$, probability is conserved. However, instead of the derivative here we have to use the determinant of the Jacobian matrix, the computation of which is often prohibitively slow. To overcome this, we could use elementwise flows that produce diagonal matrices, the determinants of which are easy to compute.

We can also take many flows and compose them to take a new flow. This gives us a very easy way to increase expressiveness.

RealNVP - Flow-based model using affine coupling to split the data into two halves. The first half is passed through the identity flow while the second is an affine transformation, the parameters of which depend on the first. This gives rise to a triangular Jacobian and a determinant that is just the product of its diagonal entries. Coupling layers allow unrestricted neural nets to be used in flows, while preserving invertibility and tractability.


text:
# Build Agent

This is the image used by the build agent. It is built and bundled via a
separate packaging mechanism in order to provide local caching and to ensure
that there is better build provenance. Note that continuous integration system
will generally deploy new agents from the primary branch, and will only deploy
as instances are recycled. Updates to this image should be made carefully.

repository: google/gvisor

gha_language: Go

repo_name: google/gvisor


text:
# Meisler_Reading_FBA

To cite:
Steven Lee Meisler and John D.E. Gabrieli (2022). Fiber-specific structural properties relate to reading skills in children and adolescents. _eLife_ 11:e82088.
[![DOI](https://zenodo.org/badge/doi/10.7554/eLife.82088.svg)](https://doi.org/10.7554/eLife.82088)

Code used in the Meisler and Gabrieli 2022 paper on fixel based analyses relating to reading abilities. Please clone these folders to your BIDS code directory (you can delete the LICENSE and README files from there afterwards). For model and tract segmentation outputs that can be viewed with MRview, please visit https://osf.io/3ady4/.

For this study, we began with already preprocessed T1w and DWI data from the HBN-POD2 release (Richie-Halford et al., 2022; *Scientific Data* (https://www.nature.com/articles/s41597-022-01695-7)). These data are hosted on AWS as `s3://fcp-indi/data/Projects/HBN/BIDS_curated/derivatives/qsiprep/`.

This repository includes the code used to further preprocess the neuroimaging data (QSIPrep and sMRIPrep), prepare for fixel-based analyses (FBA, primarily using MRtrix3), run the FBA (ModelArray), and run the statistics/make figures. Much of the processing code is agnostic to the data set. That is, it can be run on **any BIDS** compliant dataset with T1w and diffusion data. Other parts of code, such as quality control, statistics, and phenotypic comparisons, are tailored to work with a Healthy Brain Network (HBN) phenotypic query, but can be adapted to work with another dataset.

**A NOTE ON RUNNING FBA SCRIPTS**: Due to the large size of the cohort, individual subject jobs (odd-numbered bash scripts) are parallelized for efficiency. To submit odd numbered jobs, navigate terminal to the `fba/bash_scripts` code folder, and run `./submit_job_array X` where "X" is the number of the bash script (e.g. 1,3,5,7,9). Even number scripts can be submitted by running `sbatch Y` where "Y" is the _full name_ of the scripts (e.g. "2_average_responses.sh"). The steps mostly mirror those described in MRtrix's FBA tutorial (https://mrtrix.readthedocs.io/en/latest/fixel_based_analysis/st_fibre_density_cross-section.html) and are also described in our paper.

If using this code, please also cite relevant papers to the software and methods employed here. See our paper or the software-specific documentation (bottom of this README) for these references.

## Requirements
### In general
- BIDS-compliant dataset with _at least_ T1w and DWI images
- Environment (Anaconda recommened) with ConFixel (https://github.com/PennLINC/ConFixel) and ModelArray (https://github.com/PennLINC/ModelArray) installed
  - You can also use a Singularity/Docker container
- Singularity / Docker with the following Docker images:
  - QSIPrep 0.15.3 (`singularity build qsiprep.simg docker://pennbbl/qsiprep:0.15.3`)
  - TractSeg 2.3 (`singularity build tractseg.simg docker://wasserth/tractseg_container:master`)
  - MrTrix 3.0.3 (`singularity build mrtrix.simg docker://mrtrix3/mrtrix3:3.0.3`)
  - Mrtrix3tissue 5.2.9 (`singularity build mrtrix3t.simg docker://kaitj/mrtrix3tissue:v5.2.9`)
  - FSL 6.0.4 (`singularity build fsl.simg docker://brainlife/fsl:6.0.4-patched`)
  - sMRIPrep 0.8.1 (`singularity build smriprep.simg docker://nipreps/smriprep:0.8.1`)
  - ModelArray 0.1.2 (`singularity build modelarray.simg docker://pennlinc/modelarray_confixel:0.1.2`)
  - Singularity 3.9.5 was used in this study. The images above were used in this study, but **more recent stable versions of these software may introduce improvements that should be used in future research.**
- SLURM job scheduler, used for parallelizing jobs. If you uses SGE/PBS to schedule jobs, the scripts can be adapted using tips from this webpage: https://www.msi.umn.edu/slurm/pbs-conversion
- Python environment with Jupyter capabilities and the following dependencies: numpy, scipy, scikit-learn, pandas, os, glob, matplotlib, json, filecmp, nilearn, fslpy, pingouin, statsmodels, seaborn, and statannotations (https://github.com/trevismd/statannotations)
- FreeSurfer license (https://surfer.nmr.mgh.harvard.edu/fswiki/License) - **ADD THIS FILE as "license.txt" in the "qsiprep" and "smriprep" folders**
### Additional requirements if downloading HBN data
- Data Usage Agreement (if working with Healthy Brain Network data), used to access neuroimaging and phenotypic data
- Amazon Web Services (AWS) Command Line version 2 (or any version with s3 capabilities), used to download neuroimaging data (https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)

## 0) Download and prepare HBN data (if using HBN)
- Obtain a Data Usage Agreement: http://fcon_1000.projects.nitrc.org/indi/cmi_healthy_brain_network/Pheno_Access.html#DUA, https://data.healthybrainnetwork.org/login/request-account/
- Using the AWS command line, `aws s3 cp` or `aws s3 sync` the HBN-POD2 repository (`s3://fcp-indi/data/Projects/HBN/BIDS_curated/derivatives/qsiprep/`) to your `BIDSROOT/derivatives/qsiprep` folder.
- Using the HBN Loris portal (https://data.healthybrainnetwork.org/main.php) make a phenotypic query with _at least_ the following fields: "Basic_Demos", "TOWRE", "EHQ", "WISC", "Barratt", and "Clinician Diagnoses"

## 1) Run DWI reconstruction and FreeSurfer (qsiprep and smriprep)
We ran NODDI and DKI/DTI reconstruction on these files with QSIPrep, and also used smriprep to run FreeSurfer - needed for intracranial volume estimation.
- Download the `qsiprep` and `smriprep` folders to your BIDS code folder. In them, add your FreeSurfer license as `license.txt` (case-sensitive).
- In the `submit_job_array.sh` scripts, udpate the variable `bids` in the beginning of the scripts to direct to your BIDS directory. Additionally, in the last line of the scripts, you can update the parameter after `%` to limit how many jobs can be active at a time. We set this to 100 as a default, but you can alter this or delete it to not set a limit.
- In the `ss_XXXX.sh` scripts, change the SBATCH headers to match your desired parameters (e.g. memory usage, walltime, etc). Then update the variable `IMG` to the path of the corresponding singularity images. Set the variable `scratch` to where you want intermediate files to be stored during the workflows. Review the command at the bottom of the script to make sure you understand how QSIPrep and sMRIprep are being run and change any parameters you would like.
- In terminal, navigate to the `qsiprep` or `smriprep` folder, and run `./submit_job_array.sh` to begin the workflow.

## 2) Run automated QC and first-level manual QC. Determine which subjects define population template
- Before beginning, save your HBN phenotypic data as `HBN_query.csv` and place it in your BIDS code directory.
- Run through Jupyter notebook 1. Read the comments in the notebook for notes and directions.

## 3) Begin Fixel Based Analysis Pipeline (up until manual QC is required again)
- Update fields in `fba/config` file to match your needs. These paths and softwares are used in FBA analyses.
- **UPDATE THE VARIABLE `config` IN EACH SBATCH SCRIPT TO THE PATH OF YOUR CONFIG FILE**
- Read the note above about running FBA jobs scripts, and then run bash scripts 1-5.

## 4) Second-level manual QC
- Run Jupyter notebook 2.
- Remove any poor quality subjects from the FBA derivatives directories

## 5) Finish FBA preparations
- Run bash scripts 6-9. 8a and 8b can be run concurrently.
- bash script S1 warps the voxel scalar maps from DTI, DKI, and NODDI, which is used in the secondary analyses.
- While the scripts are running, you can make the necessary files for running the ModelArray analyses and analyze phenotypic data in Jupyter noteboooks 3 and 4.

## 6) Run ModelArray analyses
- Using ConFixel, convert .mif to .h5 files (`bash convert_mif_to_h5.mif`)
- Run the models in the `fba/models` folder with `submit_gams.sh`
- Convert the ModelArray outputs back to mif form with `python convert_h5_to_mif.py /PATH/TO/BIDS/ROOT`
- Explore the results in MRtrix's MRView

## Questions? Feel free to either open an issue in this repository or email Steven Meisler<EMAIL_ADDRESS>with any problems, suggestions, or feedback!

## Extra documentation
- Healthy Brain Network Data Portal (http://fcon_1000.projects.nitrc.org/indi/cmi_healthy_brain_network/index.html)
- TractSeg Website (https://github.com/MIC-DKFZ/TractSeg)
- QSIPrep Website (https://qsiprep.readthedocs.io/en/latest/)
- sMRIPrep Website (https://www.nipreps.org/smriprep/)
- MRtrix3 Website (https://mrtrix.readthedocs.io/en/latest/)
- MRtrix3Tissue Website (https://3tissue.github.io/)
- ModelArray GitHub (https://github.com/PennLINC/ModelArray)

## License

MIT License

Copyright (c) 2022 Steven Meisler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


text:
---
title: random
description: Documentation of Meteor's `random` package.
---

The `random` package provides several functions for generating random
numbers. It uses a cryptographically strong pseudorandom number generator when
possible, but falls back to a weaker random number generator when
cryptographically strong randomness is not available (on older browsers or on
servers that don't have enough entropy to seed the cryptographically strong
generator).

{% apibox "Random.id" %}
{% apibox "Random.secret" %}
{% apibox "Random.fraction" %}
{% apibox "Random.choice" %}
{% apibox "Random.hexString" %}

repository: meteor/meteor

branch_name: refs/heads/devel

gha_language: JavaScript

repo_name: meteor/meteor


text:
Attributor
==========

Attributed Strings example app in iOS7. Covered in CS 193p Fall 13 Lecture 5.

Demonstrates:
- Attributed Strings
- View Controller Lifecycle
- NSNotificationCenter

![Screenshot](https://i.cloudup.com/RT4MF0y2WR-3000x3000.png)

repository: ryanjadhav/Attributor

repo_name: ryanjadhav/Attributor


text:
# Monio

[![Build Status](https://travis-ci.org/getify/monio.svg?branch=master)](https://travis-ci.org/getify/monio)
[![npm Module](https://badge.fury.io/js/monio.svg)](https://www.npmjs.org/package/monio)
[![Dependencies](https://david-dm.org/getify/monio.svg)](https://david-dm.org/getify/monio)
[![devDependencies](https://david-dm.org/getify/monio/dev-status.svg)](https://david-dm.org/getify/monio?type=dev)
[![Coverage Status](https://coveralls.io/repos/github/getify/monio/badge.svg?branch=master)](https://coveralls.io/github/getify/monio?branch=master)

Monio ('mo-neo') is an async-capable IO Monad (including "do" style) for JS, with several companion monads thrown in.

## See It In Action

* [Cancelable Countdown (demo)](https://codepen.io/getify/pen/abvjRRK?editors=0011)

* [Order Lookup (demo)](https://codepen.io/getify/pen/YzyJqZa?editors=1011)

* [Event Stream (demo)](https://codepen.io/getify/pen/WNrNYKx?editors=1011)

## Overview

Monio balances the power of monads -- often dismissed by the non-FP programmer as academic and convoluted -- while pragmatically embracing the reality of the vast majority of JS programs: paradigm mixture (some OO, some FP, and probably a lot of imperative procedural code).

The driving inspiration behind Monio is an IO monad -- useful for managing side-effects -- that additionally supports "do-style" syntax with JS-ergonomic asynchrony (based on promises) in the style of familiar `async..await` code. IOs are lazy, so their operations are not triggered until the `run(..)` method is called.

Monio's IO is a transformer over promises, which means that when promises are produced in an IO, they are automatically unwrapped; of course, that means subsequent IO operations are deferred. If any IO in a chain produces a promise, `run(..)`'s result will be "lifted" to a promise that resolves when the entire IO chain is complete. Otherwise, the IO instance and its `run(..)` call will operate synchronously and immediately produce the result.

Monio intentionally chooses to model asynchrony over promises instead of Task monads, because of its goal of balancing FP with pragmatic and idomatic non-FP JS. However, there's nothing that should prevent you from using a Task monad with Monio if you prefer.

IO "do-style" syntax is specified with the `do(..)` method (automatically lifts the IO to promise-producing asynchrony), which accepts JS generators (including "async generators": `async function *whatever(){ .. }`). `yield` is used for chaining IOs (which can produce promises to defer), whereas `await` is for explicitly deferring on a promise that's not already wrapped in an IO. The resulting style of code should be more broadly approachable for JS developers, while still benefitting from monads.

IO's `do(..)` is also JS-ergonomic for exception handling. Uncaught JS exceptions become promise rejections, and IO-produced promise rejections are `try..catch`'able. Monio also supports modeling exception handling through Either monads: `doEither(..)` transforms uncaught exceptions into *Either:Left* values, and recognizes IO-produced *Either:Left* values as `try..catch`'able exceptions.

Monio's IO is also a Reader monad, which carries side-effect read environments alongside IO operations.

Monio also includes several supporting monads/helpers in addition to `IO`:

* `Maybe` (including `Just` and `Nothing`)

* `Either`

* Monio-specific `AsyncEither` (same promise-transforming behavior as IO)

* `IOEventStream(..)`: creates an IO instance that produces an "event stream" -- an async-iterable consumable with a `for await..of` loop -- from an event emitter (ie, a DOM element, or a Node EventEmitter instance)

## Tests

A test suite is included in this repository, as well as the npm package distribution. The default test behavior runs the test suite using the files in `src/`.

1. The tests are run with QUnit.

2. To run the test utility with npm:

    ```
    npm test
    ```

3. To run the test utility directly without npm:

    ```
    qunit
    ```

### Test Coverage

[![Coverage Status](https://coveralls.io/repos/github/getify/monio/badge.svg?branch=master)](https://coveralls.io/github/getify/monio?branch=master)

If you have [NYC (Istanbul)](https://github.com/istanbuljs/nyc) already installed on your system (requires v14.1+), you can use it to check the test coverage:

```
npm run coverage
```

Then open up `coverage/lcov-report/index.html` in a browser to view the report.

**Note:** The npm script `coverage:report` is only intended for use by project maintainers. It sends coverage reports to [Coveralls](https://coveralls.io/).

## License

All code and documentation are (c) 2020 Kyle Simpson and released under the [MIT License](http://getify.mit-license.org/). A copy of the MIT License [is also included](LICENSE.txt).

repository: DrBoolean/monio

repo_name: DrBoolean/monio