text:
# geoip-native-lite

__!! NOT MAINTAINED !!__

This project is no longer maintained. Please use [geoip-lite](https://github.com/bluesmoon/node-geoip) instead.

__!! NOT MAINTAINED !!__

## Goals

* Fast IP address to country lookup:
  * 1,000,000+ ops/second for IPv4 addresses
  * 500,000+ ops/second for IPv6 addresses
* Minimal RAM usage
* Native JavaScript implementation for ease-of-use and portability

## Installation

Add to your application via `npm`:
```
npm install geoip-native-lite --save
```
This will install `geoip-native-lite` and add it to your application's `package.json` file.

## Update Data Files

This module ships with pre-built data files. If you'd like to update the data files for yourself, run the update script like this:
```
npm run updatedata
```

## How to Use

* [lookup](#lookup)
* [loadData](#loaddata)
* [loadDataSync](#loaddatasync)

### lookup

`lookup(ip)`

Lookup the country in which the IP address is located. Supports both ipv4 and ipv6.

Usage:
```js
var GeoIpNativeLite = require('geoip-native-lite');

// Must load data before lookups can be performed.
GeoIpNativeLite.loadDataSync();

// Data loaded successfully.
// Ready for lookups.
var ip = '<IP_ADDRESS>';
var country = GeoIpNativeLite.lookup(ip);

if (country) {
	console.log(ip, 'is geo-located in', country.toUpperCase());
} else {
	console.log('Failed to geo-locate the IP address:', ip);
}
```

### loadData

`loadData([options, ]cb)`

Asynchronously loads geoip data.

Usage:
```js
var GeoIpNativeLite = require('geoip-native-lite');

GeoIpNativeLite.loadData(options, function(error, data) {

	if (error) {
		// Something went wrong.
	} else {
		// Data loaded successfully.
		// Ready for lookups.
	}
});
```

Options:
```js
var options = {

	/*
		Set to TRUE to load ipv4 geoip data.

		Default value is TRUE.
	*/
	ipv4: true,

	/*
		Set to TRUE to load ipv6 geoip data.

		Default value is FALSE.
	*/
	ipv6: false,

	/*
		Set to TRUE to cache data in memory.

		Default value is TRUE.
	*/
	cache: true
};
```

### loadDataSync

`loadDataSync([options])`

Synchronously loads geoip data.

Usage:
```js
var GeoIpNativeLite = require('geoip-native-lite');

GeoIpNativeLite.loadDataSync(options);

var country = GeoIpNativeLite.lookup('<IP_ADDRESS>');
```

Options:
```js
var options = {

	/*
		Set to TRUE to load ipv4 geoip data.

		Default value is TRUE.
	*/
	ipv4: true,

	/*
		Set to TRUE to load ipv6 geoip data.

		Default value is FALSE.
	*/
	ipv6: false,

	/*
		Set to TRUE to cache data in memory.

		Default value is TRUE.
	*/
	cache: true
};
```

## Contributing

There are a number of ways you can contribute:

* **Improve or correct the documentation** - All the documentation is in this `readme.md` file. If you see a mistake, or think something should be clarified or expanded upon, please [submit a pull request](https://github.com/chill117/geoip-native-lite/pulls/new)
* **Report a bug** - Please review [existing issues](https://github.com/chill117/geoip-native-lite/issues) before submitting a new one; to avoid duplicates. If you can't find an issue that relates to the bug you've found, please [create a new one](https://github.com/chill117/geoip-native-lite/issues).
* **Request a feature** - Again, please review the [existing issues](https://github.com/chill117/geoip-native-lite/issues) before posting a feature request. If you can't find an existing one that covers your feature idea, please [create a new one](https://github.com/chill117/geoip-native-lite/issues).
* **Fix a bug** - Have a look at the [existing issues](https://github.com/chill117/geoip-native-lite/issues) for the project. If there's a bug in there that you'd like to tackle, please feel free to do so. I would ask that when fixing a bug, that you first create a failing test that proves the bug. Then to fix the bug, make the test pass. This should hopefully ensure that the bug never creeps into the project again. After you've done all that, you can [submit a pull request](https://github.com/chill117/geoip-native-lite/pulls/new) with your changes.

## Tests

To run all tests (except benchmarks):
```
npm test
```

To run benchmarks:
```
npm run test:benchmarks
```

To run only unit tests:
```
npm run test:unit
```

To run only code-style checks:
```
npm run lint
```

## Licensing

All the code in this project is [MIT licensed](https://github.com/chill117/geoip-native-lite/blob/master/LICENSE).

The geoip data used in this project is [licensed separately](https://github.com/chill117/geoip-native-lite/blob/master/data/LICENSE.txt).


text:
---
title: Leaderboards
---

## Leaderboards

Leaderboards are a system which rank players based upon their scores.

Playing I/O provides realtime leaderboards which are automatically updated as and when there is any player activity. No extra calls are required to update leaderboards.

### Use Cases

At Playing I/O, we love leaderboards. It's a great way of getting a social element into the game, and driving competetive behaviour. Our detailed leaderboards can also provide insight on player activity and let players know how they can improve their performance.

Leaderboards fit well in almost all scenarios, but lets just take an example of a sales and marketing team. If you want to track the overall performance of a sales executive, the various metrics that you might be interested are the total revenue generated, sales calls made, number of new clients, etc. You can have different leaderboards tracking each of these metrics, but Playing I/O can also let you make a leaderboard track a compound metric that depends on these metrics. This gives a better overall pricture. The leaderboards can also be extended to teams, where teams compete against each other and take things to another level.

## Base Metric

Leaderboards are set to calculate rankings on a preset Base Metric. Players with a higher score on the base metric will have a higher rank. The base metric can be a point or a compound metric.

## Team Leaderboards

You can have leaderboards on teams too. To create a team leaderboard, set the This Leaderboard is for field to Teams (this corresponds to the entity_type key in the design). In team leaderboards, a team's score is updated when any of its members score points. Only the scores which a member earns after joining the team are counted.

> A team's score on the leaderboard is not the sum of all the scores of its members.

## Leaderboard Cycles

With cycles, leaderboards can be reset at regular intervals which lets you find the top performers in a cycle.

## Leaderboard Scopes

The scope of a leaderboard defines who all will be tracked on the leaderboard. If the scope type is team_definition or team_instance, then an additional scope.id field is required which tells which team definition you want the leaderboard for.

For player leaderboards, there can be 4 scopes:

* Game: Leaderboard is game-wide.
* Across All Teams of Type(team_definition): Leaderboard is across all instances of a team definition.
* Within Each Team of Type(team_instance): Leaderboard is restricted to each instance of a team definition.
* Custom: Leaderboard is free-form. You can decide what contributions you want to count on the leaderboard.

For team leaderboards, there can be only 3 scopes:

* Game: Leaderboard is game-wide.
* Across All Teams of Type(Team Definition): Leaderboard is across all instances of a team definition.
* Custom: Leaderboard is free-form. You can decide what contributions you want to count on the leaderboard.

## Custom Scoped Leaderboards

Regular leaderboards track a player or team's metric, regardless of how they are accumulated. While this is enough in most use cases, there are some scenarios where you'd desire something more flexible. Say, you want a leaderboard which is updated only when certain activities are performed, then you can use our Custom leaderboards. Lets try understanding it better with an example.

If your application has many sub-challenges, like courses on a learning platform, you might want to have leaderboards within each course. Now each course has challenges that you mapped to Playing I/O's Actions and the player is awarded some points on its completion. With normal leaderboards, points scored from all courses would be included, which is fine for overall leaderboards but not for course-level leaderboards. So, to get course- level leaderboards, all we need to do is pass a scope when performing the action. This scope can be the course ID for instance which would automatically create a leaderboard that will track score changes only when actions are performed or rules executed with that scope. You can pass scopes when triggering actions or executing custom rules.

> One Custom leaderboard can be used to track a lot of separate scopes, each having a unique identifier.

With this example, hope you got a better picture of what custom scoped leaderboards can do.

## Detailed Leaderboards

With detailed leaderboards, we can look into every player's activity and get details of how the players earned their score. This can be useful for players in figuring out their strengths and weeknesses in comparison to others.

> Detailed leaderboards are only available for player leaderboards

## Merged Leaderboards

Playing I/O offers a Merged Leaderboard feature, which allows you to visualize data across multiple leaderboards by merging them into a single leaderboard. To merge leaderboards, all you have to do is pass the merge_with query parameter while reading a leaderboard. The query string needs to be a comma-separated string in the following format:

```code
[leaderboard_definition_id]{/[scope]}|[cycle]|{[timestamp]}
```

Here the leaderboard_definition_id is the ID of the leaderboard's definition. If the leaderboard is a custom scoped leaderboard, you need to pass its scope separated by a /. You then need to specify the leaderboard cycle (one of alltime, yearly, monthly, weekly or daily).

In case of cycles other than alltime, a timestamp is required to find out exactly which cycle is to be merged. As indicated in the above format, the leaderboard definition ID, cycle and timestamp information need to be separated by a pipe |.

The ranking of the leaderboard will still be done based on the original leaderboard. You can pretty much merge any leaderboard, only limitation is that the leaderboards being merged need to have the same entity type.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
title: "Are jellyfish increasing in response to ocean acidification?"
date: 2008-09-01
publishDate: 2020-05-05T23:38:55.066127Z
authors: ["Anthony J. Richardson", "Mark J. Gibbons"]
publication_types: ["2"]
abstract: "Ocean acidification may negatively affect calcifying plankton, opening ecological space for noncalcifying species. Recently, a study of climate-forcing of jellyfish reported the first analysis suggesting that there were more jellyfish (generally considered a noncalcifying group) when conditions were more acidic (lower pH) from one area within the North Sea. We examine this suggestion for a number of areas in the North Sea and beyond in the Northeast Atlantic using coelenterate records from the Continuous Plankton Recorder and pH data from the International Council for the Exploration of the Sea for the period 1946–2003. We could find no significant relationships between jellyfish abundance and acidic conditions in any of the regions investigated. We conclude that the role of pH in structuring zooplankton communities in the North Sea and further afield at present is tenuous."
featured: false
publication: "*Limnology and Oceanography*"
url_pdf: "http://doi.wiley.com/10.4319/lo.2<IP_ADDRESS>0"
doi: "10.4319/lo.2<IP_ADDRESS>0"
---


text:
---
title: Unboxing the Avistar Elite .46 a timelapse video
author: end2end
date: 2015-04-04T06:20:22+00:00
url: /unboxing-the-avistar-elite-46-a-timelapse-video/
images:
  - src: /wp-content/uploads/2015/04/Great-Planes-Avistar-Elite-Unboxing-featured-image.jpg
hits:
  - 62
french_post_id:
  - 856
Snippet Title:
  - Other languages
Snippet:
  - '[otherlanguage]'
categories:
  - Model Aeronautics
  - Photography
tags:
  - avistar elite
  - english
  - multilingual
  - time lapse

---
Hi.

For those interested, here is the first sequence of images I captured with my Canon EOS SL1 in order to make a timelapse video of the unpacking of the aircraft RC Avistar Elite .46.<!--more-->

At the time, I didn't know the basic principles that were required to capture good pictures for a timelapse video. So I proceeded with the exact opposite of what was required: Auto Focus, auto exposure adjustment, automatic white balance, use of the flash and capture with low batteries. In short, I was a beginner.

I have since gained experience and I wrote a guide that describes timelapse good practices and the steps to achieve a good timelapse video: [How to make a time-lapse video with free tools and a DSLR camera](/how-to-make-a-time-lapse-video-with-free-tools-and-a-dslr-camera/ "How to make a time-lapse video with free tools and a DSLR camera").

I decided to share the video anyway. I hope you appreciate...
Antoine

Captured June 13th, 2014 between 3:49 p.m. and 10:00 p.m. with 556 photos and 15 second interval between each picture displayed at 10 frames per second.

branch_name: refs/heads/main


text:
# FirmSmith

Randomly generates FIRM graphs and applies libFirm optimizations
to check if they break.

Inspired by [CSmith](https://embed.cs.utah.edu/csmith/)
and implemented by Jeff Wagner in his
[bachelor thesis](http://pp.ipd.kit.edu/thesis.php?id=276).

## Requirements

Requires a C compiler and Make for building.
Uses LLDB via Python for investigating crashes.

For Ubuntu 16.04 the following works:

    sudo apt install build-essential liblldb-3.8 python-lldb-3.8

Unfortunately, the symlinks of the `python-lldb-3.8` are broken.
See [bug report](https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-3.8/+bug/1674926).
Fixing it with more symlinks:

    sudo ln -s ../../x86_64-linux-gnu/liblldb-3.8.so.1 /usr/lib/llvm-3.8/lib/liblldb.so
    sudo ln -s ../../x86_64-linux-gnu /usr/lib/llvm-3.8/lib/x86_64-linux-gnu

## Building

    make

This builds the `firmsmith` binary.

## Executing

You can simply run it:

    ./run-fuzzer.py

Usually, you want to test a single optimization like `-fthread-jumps`.
In this case, run it like this:

    ./run-fuzzer.py --cparser-options="-fthread-jumps"

The fuzzer creates a lot of temporary files.
For cleanup run:

    bash clean

## Licence MIT

Copyright (c) 2017 Jeff Wagner

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.

repository: libfirm/firmsmith

repo_name: libfirm/firmsmith


text:
gonpy : Read Numpy binary files (.npy files) in Golang
======================================================

__gonpy__ reads and writes Numpy binary array data to/from Go slices

The npy file specification is here:

http://docs.scipy.org/doc/numpy/neps/npy-format.html

The documentation for this package can be found here:

https://godoc.org/github.com/kshedden/gonpy

When reading a multidimensional array, the data are returned as a
one-dimensional slice that has been flattened as specified by the
ColumnMajor field in the NpyReader struct.  If ColumnMajor is true,
the array is flattened in column major order.  If ColumnMajor is
false, the array is flattened in row major order.

The writer defaults to writing the data as a vector.  The Shape field
of the NpyWriter struct can be used to set other shapes.

Unsigned numeric data types, fixed-width string types, compound
dtypes, record arrays, and time dtypes are not supported (file an
issue if any of these are needed).  Python object types are of course
not supported.

The following example shows how to read a npy file into a slice of
float64 values (for clarity error handling is omitted).

```
r, _ := gonpy.NewFileReader("data.npy")
data, _ := r.GetFloat64()
```

The reader value has fields such sas `r.Shape` that provide additional
information about the array.

The following example shows how to write a slice of int32 values to a
npy file (again, error handling is omitted).

```
w, _ := gonpy.NewFileWriter("data.npy")
_ = w.WriteFloat64(data)
```

To specify a shape or other attributes, modify the writer object
before writing the array, for example:

```
w, _ := gonpy.NewFileWriter("data.npy")
w.Shape = []int32{50, 2}
w.Version = 2
_ = w.WriteFloat64(data)
```

To write to a stream, say a gzip stream, use the following:

```
f, _ := os.Create("data.npy.gz")
g := gzip.NewWriter(f)
w, _ := gonpy.WriterFromStream(g)
_ = w.WriteFloat64(data)
f.Close()
```

gha_language: JavaScript

gha_license_id: MIT


text:
# Managed/Native Interop in AOT

## Direct PInvoke Calls

The PInvoke calls in AOT compiled binaries are bound lazily at runtime by default for better compatibility. The AOT compiler
can be configured to generate direct calls for selected PInvoke methods that are bound during startup. The unmanaged libraries
and entry points referenced via direct calls always have to be available at runtime, otherwise the native binary fails to start.

The benefits of direct PInvoke calls are:
- Direct PInvoke calls have *better steady state performance*
- Direct PInvoke calls make it possible to *link the unmanaged dependencies statically*

The direct PInvoke generation can be configured using `<DirectPInvoke>` items in the project file. The item name can be either `modulename`,
which enables direct calls for all module entry points, or `modulename!entrypointname`, which enables a direct call for the specific module
and entry point only.

`<DirectPInvokeList>filename</DirectPInvokeList>` items in the project file allow specifying a list of entry points in an external file.
This is useful when the specification of direct PInvoke calls is long and it is not practical to specify them using individual `<DirectPInvoke>`
items. The file can contain empty lines and comments starting with `#`.

Examples:

```xml
<ItemGroup>
  <!-- Generate direct PInvoke calls for everything in __Internal -->
  <!-- This option replicates Mono AOT behavior that generates direct PInvoke calls for __Internal -->
  <DirectPInvoke Include="__Internal" />
  <!-- Generate direct PInvoke calls for everything in libc (also matches libc.so on Linux or libc.dylib on macOS) -->
  <DirectPInvoke Include="libc" />
  <!-- Generate direct PInvoke calls for Sleep in kernel32 (also matches kernel32.dll on Windows) -->
  <DirectPInvoke Include="kernel32!Sleep" />
  <!-- Generate direct PInvoke for all APIs listed in DirectXAPIs.txt -->
  <DirectPInvokeList Include="DirectXAPIs.txt" />
</ItemGroup>
```

### Linking

To statically link against an unmanaged library, you'll need to specify `<NativeLibrary Include="filename" />` pointing to a `.lib` file on
Windows and a `.a` file on Unix.

Examples:

```xml
<ItemGroup>
  <!-- Generate direct PInvokes for Dependency -->
  <DirectPInvoke Include="Dependency" />
  <!-- Specify library to link against -->
  <NativeLibrary Include="Dependency.lib" Condition="$(RuntimeIdentifier.StartsWith('win'))" />
  <NativeLibrary Include="Dependency.a" Condition="!$(RuntimeIdentifier.StartsWith('win'))" />
</ItemGroup>
```

## Native Exports

The native AOT compiler will export methods annotated with `UnmanagedCallersOnlyAttribute` and an explicitly specified name as
public C entry points. This makes it possible to either dynamically or statically link the AOT compiled modules into external
programs. More details can be found in [NativeLibrary Sample](https://github.com/dotnet/samples/tree/main/core/nativeaot/NativeLibrary/README.md).

repository: wfurt/runtime

gha_language: C#

repo_name: wfurt/runtime


text:
Workflow changes
----------------

### Model extension to MIMIC-III with conditional framework

1.  **TODO** current architecture can easily be extrapolated
    to in-hospital-mortality data generation task

2.  **TODO** visualize data from MIMIC-III github repository
    in 2-dimensions to see smoothness or roughness

3.  **TODO** use same color frame range for even comparison

4.  **TODO** work on extension to MIMIC-III data with
    evaluation protocols

5.  **TODO** start working on mortality data generation with
    descriptive statistics first

6.  consider using encoder-decoder or transformers in GAN for variable
    sequence length generation

7.  consider changing RGAN name to CRGAN (convolutional-recurrent-GAN),
    with conditional one as CRAGAN (auxiliary as addition)

8.  use ETH model on MIMIC-III and compare evaluations with own model

9.  apply RCGAN technique towards this process and verify results with
    existing models through TSTR/TRTS and MMD checks

10. add custom image shapes and prepare code to shift away from square
    images

11. read on more innovative semi-supervised gan architectures that we
    could also use

12. replace discriminator with existing supervised network to see how
    that can work better

13. before publication, publish some of the preliminary models used

### Model visualization and presentation

1.  **TODO** enforce tensorflow-gpu=1.14.0 in
    requirements.txt, or have it based on morty

2.  fix column enforcements and add documentation for log files

3.  add extra option to ignore pics/gifs when cloning unless prompted

4.  add function to generate best samples from trained model aside from
    already generated images

5.  change matplotlib backend default back to instant working version
    when necessary

### Model stabilization and abstraction

1.  **TODO** port code to tf 1.15 for security or
    tensorflow2/pytorch for better integration -\> might solve problem
    with accuracy printing based on non-binary target labels

2.  work on introspection tasks, where data is passed through layers
    step-wise and results are manually/automatically checked for
    explainability

3.  consider borrowing model architecture from other successful models
    and employ within local biomedical task

4.  consider that performance on images is not paramount, abstraction to
    medical data and construction of local evaluation techniques is more
    important

5.  consider developing online per-epoch similarity checks, MMD and TRTS
    to check quality of samples

6.  look up ganhacks for further possible improvements such as adding
    leaky-relu everywhere, and read on successful/innovative gan
    architectures

7.  make pipeline variable/adaptable/scalable to higher (possibly
    non-square) dimensional data in case of 64 dimensional lfw faces
    (user more variables in models instead of hard-coding)

8.  read papers for strategies/uses of synthetic data

### Heuristics

1.  add convergent pathway polynomial fit to check whether training is
    diverging or converging in given time frame

2.  add gradient checks for logging and change vis.py to include colour
    on loss line for gradients

3.  use tensorboard to analyze learning process

4.  develop similarity/quality metrics which could be used alongside
    training

### Possible architecture improvements

1.  use Wasserstein loss with standard or improved training

2.  try out vae architecture within generation process

3.  think more about constraining gradients in various network parts to
    achieve some interpretability

4.  think more about complex networks integration

5.  use feature matching and minibatch discrimination to prevent mode
    collapse

6.  consider adding Gaussian noise to images for stability (mixed
    outcomes predicted)

7.  consider resnet architecture for certain skip-connections, could be
    linked to multi-scale gradient structure

### Miscellaneous

1.  models appear more stable when discriminator is significantly less
    powerful than generator

2.  models are more stable when same noisy labels are used for
    discriminator

3.  track how many epochs or batch runs needed to converge and try to
    optimize this (\~500/2000 for mnist/lfw respectively)

4.  add MIMIC-III 2d projection depiction and learning as gif on initial
    readme

5.  remove caveats in readme once relevant developments are complete

### High-level ideas

1.  GAN stabilisation:

    1.  Gaussian label smoothing

    2.  differing learning rates for optimizers

    3.  Gaussian noise addition to images

    4.  spectral normalization

    5.  multi-scale gradient

2.  Evaluation pipeline

    1.  use MIMIC data/models for direct MMD + TSTR/TRTS validations

    2.  explore privacy perspective and whether GAN is able to remove
        personal traits

    3.  or consider another architecture which can perform this function

3.  Networks and higher-dimensions abstraction

    1.  extend to deeper model which can handle 64 pixels faces to check
        if abstraction possible

    2.  extend to RCGAN with realistic conditionings for actual usable
        data genration

4.  Input images and feature masking

    1.  come up with mask to simulate missing data in real-life

    2.  compare input and output images as time series with signals

5.  Documentation and code-health:

    1.  fix unused imports and sort with python tools

    2.  make detailed documentation and model visualizations

repository: ptee/mv-temporal-rgan

repo_name: ptee/mv-temporal-rgan


text:
# Employee Summary

![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)

## Description

This is a software engineering team generator command line application. When the user has completed building the team, the application will create an HTML file that displays a nicely formatted team roster based on the information provided by the user.

## Usage

![employee summary demo](./Assets/demo.gif)

The application will prompt the user for information about the team manager and then information about the team members. The user can input any number of team members, and they may be a mix of engineers and interns.

## Installation

To install necessary dependencies, run the following command:

      npm i

## Contributing

      folk / pull

## Questions

If you have any questions about the repo, open an issue or contact me directly @[xiaoyz28@uw.edu](xiaoyz28@uw.edu). You can find more of my work at [zhuxiaoyu1019](https://github.com/zhuxiaoyu1019).

## License

Copyright (c) Rita Z. All rights reserved.

Licensed under the [MIT](https://choosealicense.com/licenses/mit/) license.


text:
# Starting a passive node

In order to start the node, you first need to gather the blockchain
information you need to connect to.

1. the hash of the **genesis block** of the blockchain, this will be the source
   of truth of the blockchain. It is 64 hexadecimal characters.
2. the **trusted peers** identifiers and access points.

These information are essentials to start your node in a secure way.

The **genesis block** is the first block of the blockchain. It contains the
static parameters of the blockchain as well as the initial funds. Your node
will utilise the **Hash** to retrieve it from the other peers. It will also
allows the Node to verify the integrity of the downloaded **genesis block**.

The **trusted peers** are the nodes in the public network that your Node will
trust in order to initialise the Peer To Peer network.

## The node configuration

Your node configuration file may look like the following:

### Note

This config shouldn't work as it is, the ip address and port for the trusted peer should be those of an already running node.
Also, the public_address ('u.x.v.t') should be a valid address (you can use an internal one, eg: <IP_ADDRESS>).
Furthermore, you need to have permission to write in the path specified by the storage config.

```yaml
storage: "/mnt/cardano/storage"

rest:
  listen: "<IP_ADDRESS>:8443"

p2p:
  trusted_peers:
    - address: "/ip4/<IP_ADDRESS>/tcp/8299"
      id: ad24537cb009bedaebae3d247fecee9e14c57fe942e9bb0d
```

Description of the fields:

- `storage`: (optional) Path to the storage. If omitted, the
  blockchain is stored in memory only.
- `log`: (optional) Logging configuration:
  - `level`: log messages minimum severity. If not configured anywhere, defaults to "info". Possible values: "off", "critical", "error", "warn", "info", "debug", "trace".
  - `format`: Log output format, `plain` or `json`.
  - `output`: Log output destination. Possible values are:
    - `stdout`: standard output
    - `stderr`: standard error
    - `syslog`: syslog (only available on Unix systems)
    - `syslogudp`: remote syslog  (only available on Unix systems)
      - `host`: address and port of a syslog server
      - `hostname`: hostname to attach to syslog messages
    - `journald`: journald service (only available on Linux with systemd,
      (if jormungandr is built with the `systemd` feature)
    - `gelf`: Configuration fields for GELF (Graylog) network logging protocol
      (if jormungandr is built with the `gelf` feature):
      - `backend`: _hostname_:_port_ of a GELF server
      - `log_id`: identifier of the source of the log, for the `host` field in the messages.
    - `file`: path to the log file.
- `rest`: (optional) Configuration of the REST endpoint.
  - `listen`: _address_:_port_ to listen for requests
  - `tls`: (optional) enables TLS and disables plain HTTP if provided
    - `cert_file`: path to server X.509 certificate chain file, must be PEM-encoded and contain at least 1 item
    - `priv_key_file`: path to server private key file, must be PKCS8 with single PEM-encoded, unencrypted key
  - `cors`: (optional) CORS configuration, if not provided, CORS is disabled
    - `allowed_origins`: (optional) allowed origins, if none provided, echos request origin
    - `max_age_secs`: (optional) maximum CORS caching time in seconds, if none provided, caching is disabled
- `p2p`: P2P network settings
  - `trusted_peers`: (optional) the list of nodes's [multiaddr][multiaddr] with their associated `public_id`
    to connect to in order to bootstrap the P2P topology (and bootstrap our local blockchain);
  - `public_id`: (optional) the node's public ID that will be used to
    identify this node to the network.
  - `public_address`: [multiaddr][multiaddr] string specifying address of the
    P2P service. This is the public address that will be distributed to other
    peers of the network that may find interest in participating to the
    blockchain dissemination with the node.
  - `listen`: (optional) _address_:_port_ to specifies the address the node
    will listen to to receive p2p connection. Can be left empty and the node will listen
    to whatever value was given to `public_address`.
  - `topics_of_interest`: The dissemination topics this node is interested to hear about:
    - `messages`: Transactions and other ledger entries.
      Typical setting for a non-mining node: `low`. For a stakepool: `high`;
    - `blocks`: Notifications about new blocks.
      Typical setting for a non-mining node: `normal`. For a stakepool: `high`.
  - `max_connections`: The maximum number of simultaneous P2P connections
    this node should maintain.
- `explorer`: (optional) Explorer settings
  - `enabled`: True or false
- `no_blockchain_updates_warning_interval`: (optional, seconds) if no new blocks
  were received after this period of time, the node will start sending you
  warnings in the logs.

[multiaddr]: https://github.com/multiformats/multiaddr

## Starting the node

```sh
jormungandr --config config.yaml --genesis-block-hash 'abcdef987654321....'
```

The 'abcdef987654321....' part refers to the hash of the genesis, that should be given to you from one of the peers in the network you are connecting to.

In case you have the genesis file (for example `block-0.bin`, because you are creating the network) you can get this hash with `jcli`.

```sh
jcli genesis hash --input block-0.bin
```

or, in case you only have the yaml file

```sh
jcli genesis encode --input genesis.yaml | jcli genesis hash
```

[`Ed25519`]: ../jcli/key.md

repository: input-output-hk/jormungandr

gha_language: Rust

repo_name: input-output-hk/jormungandr


text:
## Button Creator
Converts User Story to CSS styles for a button element.

####Demo:
<http://lahdo.github.io/button-creator>

![bezier editor](http://i.imgur.com/c9nb8Fh.gif)

#### More information

Natural Language Processing and Speech Recognition is provided by [Wit.ai](http://wit.ai).

This is just a proof of concept. I have created this app to test wit.ai services and practise writing applications in React and Redux.

Please note that Speech Recognition System is not recognizing all css properties and thus is not not working very well.

Application is written in ES6 using React and Redux.

### Example commands:

#### Changing button's link (url):

- Change button link to news.ycombinator.com
- Change the link of the button to http://news.ycombinator.com
- Set button link to news.ycombinator.com

#### Changing button's text:

- Change text to This is my button
- Set text to This is my button
- Text to This is my button

#### Changing button's property:

- Change border radius to 200px
- Set background-color to red
- Make color #eede33

#### Changing button's css class:

- Change class to my-new-class
- Set class to my-new-class
- Class to my-new-class

#### Increasing / decreasing values

- much more
- a little bit more
- less
- much bigger
- a little bit lighter
- slightly darker
- lighten
- substantially smaller

![bezier editor](http://i.imgur.com/ueE7SjS.gif)


text:
## Pre-requirements

Fuzzing test is performed using [`libFuzzer`](https://llvm.org/docs/LibFuzzer.html) library available in Clang v6 or major.

----

## Compiling Fuzz Test

 1. Assume the project was cloned into the folder: `rfc7748_precomputed/`
 2. Compile the source code:

```sh
 $ mkdir rfc7748_precomputed/build
 $ cd rfc7748_precomputed/build
 $ cmake ..
 $ make fuzz
```

## Running Fuzz Test
After compilation two testing programs will be generated fuzzing against HACL library:

```sh
 $ ./bin/fuzz_hacl_keygen
 $ ./bin/fuzz_hacl_shared
```
Each program will stop when an error is found; otherwise, it will run forever. You can stop the execution using CTRL+C (^C).

Additionally, there are fuzzing tests for each field operation against the GMP library.
```sh
 $ ./bin/fuzz25519_opAdd
```
Each program will stop when an error is found; otherwise, it will run forever. You can stop the execution using CTRL+C (^C).

----

## Known issues
If clang is requesting the `libtinfo` library, you can install the following `ncurses` library:

```sh
 $ dnf install ncurses ncurses-compat-libs
```
----


text:
# keycloak-themes-dev
Simple development environment for [Keycloak](http://www.keycloak.org/) themes using Docker

*tested with keycloak 3.4.2*

## Install

- Docker needs to be installed on your machine (Get it [here](https://www.docker.com/community-edition))
- Run the below command to install and run the docker enviroment:

```{shell{
git clone https://github.com/msnoddy/keycloak-themes-dev &&
cd keycloak-themes-dev &&
./run.sh
```

- The themes directory will now contain the themes for Keycloak, which the Docker environment will read from
- To access the keycloak admin panel for themes go to http://localhost:8888/auth/admin/master/console/#/realms/master/theme-settings - use the following credentials to login:
```
username: admin
password: 1Password2
```
- The script will prompt you if want to open up the themes directory Visual Studio Code, and load the Keycloak
login screen in your browser

repository: msnoddy/keycloak-themes-dev

repo_name: msnoddy/keycloak-themes-dev


text:
# RDPageViewController

[![CI Status](http://img.shields.io/travis/cxk/RDPageViewController.svg?style=flat)](https://travis-ci.org/cxk/RDPageViewController)
[![Version](https://img.shields.io/cocoapods/v/RDPageViewController.svg?style=flat)](http://cocoapods.org/pods/RDPageViewController)
[![License](https://img.shields.io/cocoapods/l/RDPageViewController.svg?style=flat)](http://cocoapods.org/pods/RDPageViewController)
[![Platform](https://img.shields.io/cocoapods/p/RDPageViewController.svg?style=flat)](http://cocoapods.org/pods/RDPageViewController)

## Example

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

## Requirements

## Installation

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

```ruby
pod "RDPageViewController"
```

## Author

cxk<EMAIL_ADDRESS>
## License

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

repository: lizihe/PublicRepertory

repo_name: lizihe/PublicRepertory


text:
# mapping_controller
Webots ROS2 Mapping Controller

## Description
The Mapping Controller package starts e-puck robot on Webots Simulator to bounce for mapping the environment.
The maps can be the simple mapping from webots_ros2 or probability mapping.
The maps will be saved at the given path.

## Build
The following instructions assume that a ROS2 workspace is already set up.
```commandline
rosdep update
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
colcon build --packages-select mapping_controller
. install/setup.bash
```

## Execution
After building and installing the package, you can launch the simulation.

### Simple Mapping with rviz2
```commandline
ros2 launch mapping_controller mapping_controller_launch.py mapper:=true rviz:=true mapping_time:=3
```
mapping_time is the time for the robot to bounce in minute.

### Probability Mapping with rviz2
```commandline
ros2 launch mapping_controller mapping_controller_launch.py probability:=true rviz:=true mapping_time:=3
```

### Specifying path
By default the map is saved at home directory, to change it use path parameter.
```commandline
ros2 launch mapping_controller mapping_controller_launch.py probability:=true rviz:=true mapping_time:=3 path:=path:="/home/$USER/Documents"
```

### Map File Example
the map file looks like:

![alt text](resource/prob_map.png)

## Dependencies
Webots ROS2 package

## Documentation
If you're interested in understanding the details, please read my post [here](https://towardsdatascience.com/occupancy-grid-mapping-with-webots-and-ros2-a6162a644fab)

## Issues
Please report issues if you found bugs or raise a Pull Request.


text:
# Edit website text/translations inline

[![Latest Version on Packagist](https://img.shields.io/packagist/v/:vendor/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor/:package_slug)
[![Total Downloads](https://img.shields.io/packagist/dt/:vendor/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor/:package_slug)
![GitHub Actions](https://github.com/:vendor/:package_slug/actions/workflows/main.yml/badge.svg)

![img.png](img.png)

This package enables you to edit your websites text and translations inline.

## Installation

You can install the package via composer:

```bash
composer require esign/inline-edit
```

The package will automatically register a service provider.

Next up, you can publish the configuration file:
```bash
php artisan vendor:publish --provider="Esign\InlineEdit\InlineEditServiceProvider" --tag=config --tag=public
```

Publish the InlineEdit file to use it in your frontend.

```bash
php artisan inline-editing:install
```

The file will be copied to ```resources/assets/js/utils/InlineEdit.js```

Add the following to your ``app.js``

```javascript
import InlineEdit from './utils/inlineEdit';

InlineEdit();
```

To use the rich text editor, include de ckeditor cdn before including your ``app.js`` file by adding the following line to your  `app.blade.php` file:

```php
<script src="https://cdn.ckeditor.com/ckeditor5/34.0.0/balloon/ckeditor.js"></script>
```

Make the base url public by adding following line to your ``app.blade.php`` file.

```php
<script>var base_url = '{{ config('app.url') }}';</script>
```

Make sure you have an accessible csrf token by adding

```php
<meta name="csrf-token" content="{{ csrf_token() }}">
```

Include the inline edit css by adding

```php
<link rel="stylesheet" href="{{ asset('assets/css/inline-edit.css') }}">
```

## Usage

This package assumes you have a translations table in your database with these required columns ``term, type, value``.
The default table is ``dictionary`` but can be changed any other table by changing the specified table in the config file.

You can use the inline editor by calling following function in your blade files

```php
{!! esign_inline('term') !!}
```

Depending on the type of the term the richtext editor will be loaded.
Supported types are `text, richtext`

> **!! IMPORTANT !!**
> It is important to protect the inline edit routes so only admins can use the functionality.
> **This package does not handle authentication**

You can add a middleware to the config file that handles the authentication.

The available options are default limited to `'styles', 'bold', 'italic', 'link', 'blockQuote'` but can be expanded in the `inlineEdit.js` file.

For all available options check: https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editorconfig-EditorConfig.html

### Testing

```bash
composer test
```

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

repository: esign/inline-editing

gha_language: PHP

repo_name: esign/inline-editing


text:
# Competitive Programming Utilities

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

CP-utils is a header-only library that contains implementations of typical algorithms and data structures used in programming contests. It is intended to be used mainly in online contests, where you can copy and paste code easily. However, by the fact that in some programming contests you have to type everything from scratch, the source code is maintained short (but not so short because generality and ease of use is another important target of the library).

## Modules

Currently CP-utils has the following modules:
- Combinatorics
- Data Structure
- Geometry
- Graph
- Number Theory
- Numerical
- Search
- Sorting
- Strings
- Utility

## Installation

If you want to download CP-utils for running the tests and/or compiling the examples, do the following:

First, you need [cmake](http://www.cmake.org) installed on your system.

Then, run the following commands on the root directory of the project:
```Shell
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make && make test
```

The generated executable files will be put on a sub-directory of the build folder called *bin*.

## Compatibility

CP-utils needs a compliant C++11 compiler.

It has been tested with the following compilers:
- clang 3.5 on OS X
- gcc 4.9 on Linux

## Dependencies

CP-utils only depends on the Standard C++ Library.

## Simple usage example

The following code snippet shows how to generate a suffix array and using it.

```C++
#include <iostream>
#include <string>
#include <djp/strings/suffix_array.hpp>  // for djp::make_suffix_array

int main() {
  // Have a text.
  std::string text = "mississippi";

  // Generate the suffix array.
  auto sa = djp::make_suffix_array(text);

  // Use it to show the suffixes sorted lexicographically.
  for (size_t suffix : sa)
    std::cout << text.substr(suffix) << '\n';
}

```

## How to contribute

You can submit a pull request to improve the library. The code must be well documented, easily legible and independent of global variables. Use Issues for feedback. Thanks!

## Read the docs

See http://dieram3.github.io/CP-utils

repository: mtavano/CP-utils

repo_name: mtavano/CP-utils


text:
TraitSubscriptions.Single
=========================

**`TraitSubscriptions.Single` is a ready-made Combine [Subscription] that helps you building [single] publishers that wrap complex asynchronous apis.**

```swift
open class Single<Downstream: Subscriber, Context>: NSObject, Subscription {
    /// Creates a `Single` subscription
    init(downstream: Downstream, context: Context)

    /// Subclasses must override and eventually call the `receive` function
    open func start(with context: Context)

    /// Subclasses can override and perform eventual cleanup after the
    /// subscription was cancelled.
    ///
    /// The default implementation does nothing.
    open func didCancel(with context: Context)

    /// Subclasses can override and perform eventual cleanup after the
    /// subscription was completed.
    ///
    /// The default implementation does nothing.
    open func didComplete(with context: Context)

    /// Completes the subscription with the publisher result.
    func receive(_ result: Result<Downstream.Input, Downstream.Failure>)
}
```

---

`TraitSubscriptions.Single` is designed to be subclassed. Your custom subscriptions will override the `start(with:)` method in order to start their job, call the `receive(_:)` method in order to complete, and override `didCancel(with:)` when they should perform cancellation cleanup. Use `context` in order to pass any useful information.

For example, let's build a [single] publisher that lets a user pick a phone number from their address book. This publisher defines a subscription that subclasses `TraitSubscriptions.Single`:

```swift
import Combine
import CombineTraits
import ContactsUI
import UIKit

/// A publisher that presents the contact picker and lets the user pick
/// a phone number.
///
/// It publishes a phone number, or nil if the user dismisses the contact
/// picker without making any choice.
///
/// It must be subscribed from the main thread.
struct PhoneNumberPublisher: SinglePublisher {
    typealias Output = CNPhoneNumber?
    typealias Failure = Never

    let viewController: UIViewController

    init(presentingContactPickerFrom viewController: UIViewController) {
        self.viewController = viewController
    }

    func receive<S>(subscriber: S) where S: Subscriber, Failure == S.Failure, Output == S.Input {
        let subscription = Subscription(
            downstream: subscriber,
            context: viewController)
        subscriber.receive(subscription: subscription)
    }

    private class Subscription<Downstream: Subscriber>:
        TraitSubscriptions.Single<Downstream, UIViewController>,
        CNContactPickerDelegate
    where
        Downstream.Input == Output,
        Downstream.Failure == Failure
    {
        override func start(with viewController: UIViewController) {
            let contactPicker = CNContactPickerViewController()
            contactPicker.displayedPropertyKeys = [CNContactPhoneNumbersKey]
            contactPicker.delegate = self
            viewController.present(contactPicker, animated: true, completion: nil)
        }

        override func didCancel(with viewController: UIViewController) {
            viewController.dismiss(animated: true)
        }

        // CNContactPickerDelegate
        func contactPickerDidCancel(_ picker: CNContactPickerViewController) {
            receive(.success(nil))
        }

        // CNContactPickerDelegate
        func contactPicker(_ picker: CNContactPickerViewController, didSelect contactProperty: CNContactProperty) {
            if let phoneNumber = contactProperty.value as? CNPhoneNumber {
                receive(.success(phoneNumber))
            }
        }
    }
}

// Usage:

class MyViewController: UIViewController {
    @IBAction func pickPhoneNumber() {
        PhoneNumberPublisher(presentingContactPickerFrom: self)
            .sink { contact in
                // handle contact
            }
            .store(in: &cancellables)
    }
}
```

[single]: SinglePublisher.md
[Subscription]: https://developer.apple.com/documentation/combine/subscription

repository: chris-araman/CombineTraits

repo_name: chris-araman/CombineTraits


text:
Story App for [Conventional rails assessment](http://www.learnhowtoprogram.com/lessons/conventional-rails-assessment) for [Epicodus](http://www.epicodus.com/).

This application is basically a blog. It lets users sign in, write stories and comment on stories.

The app is on [Heroku](http://story-app-assesment.herokuapp.com/).

##Setup
In your terminal, clone this repo:

```console
$ clone https://github.com/seann1/story_app.git
```

Install [postgres](http://www.postgresql.org/download/) and start the server:

```console
$ postgres
```
Install all dependencies:

```console
$ bundle install
```

Set up the databases on your local machine:

```console
$ rake db:create
$ rake db:migrate
```

Finally, start the rails server:

```console
$ rails s
```

The app should now be available at 'localhost:3000'

license MIT

By Sean Niesen


text:
---
metaTitle: "Dataset Specification"
metaDescription: "The Qri Dataset Specification"
weight: 2
---

## Overview
A Dataset is a document for describing & storing structured data. Dataset documents are designed to satisfy the **FAIR** principle of being
_Findable, Accessible, Interoperable, and Reusable_, in relation to other dataset documents, and related-but-separate technologies such as data catalogs, HTTP API's, and data package formats Datasets are designed to be stored and distributed on content-addressed
(identify-by-hash) systems The dataset document definition is built from a research-first principle, valuing direct interoperability with existing standards over novel definitions or specifications.

_The main implementation of dataset is available at https://github.com/qri-io/dataset. If you have any concerns or questions, We'd be delighted if you filed an [issue](https://github.com/qri-io/dataset/issues)._

### Dataset Components:
A Dataset is broken into several components. Each component has a different purpose:

| component   | purpose  |
|-------------|----------|
| `body`      | location of dataset data. The _subject_ all other components are about |
| `readme`    | free-form text describing the dataset, supports markdown |
| `commit`    | versioning information for this dataset at a specific point in time |
| `meta`      | descriptive metadata |
| `structure` | machine-oriented metadata for interpreting body |
| `transform` | description of an executed script that resulted in this dataset |

Each component is described in detail below.

## Body
Body is the principle content of a dataset. A dataset body is the subject which all other fields describe and qualify.

Supported Data Formats:

* `csv` - _comma-separated values_
* `json` - _javascript object notation_
* `xlsx` - _microsoft excel open xml spreadsheet_
* `cbor` - _concise binary object representation_

The structure of the data stored is arbitrary, with one important exception: _the top level of body must be either an object or an array_. scalar types like int, bool, float, or strings are not valid types. Keep in mind that it's perfectly valid to wrap a scalar type (for example, a string) in an array to obtain a valid body.

## Commit
Commit encapsulates information about changes to a dataset in relation to other entries in a given history. Commit is directly analogous to the concept of a Commit Message in the git version control system. A full commit defines the administrative metadata of a dataset, answering _"who made this dataset, when, and why"_.

_commit fields:_

| name         | type     | description |
|--------------|----------|-------------|
| `author`     | `User`   | author of this commit |
| `message`    | `string` | an optional message that provides detail about changes made |
| `qri`        | `string` | this commit's qri kind, value should always be `cm:0` |
| `signature`  | `string` | base58-encoded bytes of body checksum |
| `timestamp`  | `string` | time this dataset was created with timezone offset |
| `title`      | `string` | title of the commit. should be a short description of |

_additional data types:_

#### `User`

_example_

<!--
docrun:
  filltype: json
-->
```json
  {
    "id": "user_id_12340584",
    "fullname": "sean carter",
    "email"<EMAIL_ADDRESS>  }
```

## Meta

Meta contains human-readable descriptive metadata that qualifies and distinguishes a dataset.
Well-defined Meta should aid in making datasets Findable by describing a dataset in generalizable taxonomies that can aggregate across other dataset documents. Because dataset documents are intended to interoperate with many other data storage and cataloging systems, meta fields and conventions are derived from existing metadata formats whenever possible.

All of the meta fields below must be well-formed, valid values. However: _The Meta section of a dataset supports arbitrary metadata_. This means you can place additional values not listed here & qri will store them as-is, without any additional validation.

Another important note here: _qri software doesn't leverage things like identifier, downloadPath, homePath, etc._. Qri considers all fields here _descriptive_ metadata, as opposed to _structural_ metadata. In practice this means qri User interfaces may leverage the meta component for the purposes of _correlation_ and _display_. Information stored in the meta section is _not_ intended for use by machines to interpret the dataset. For example, setting the `identifier` is of no significance to qri, it's included here for interoperability with other specifications like [DCAT](https://www.w3.org/TR/vocab-dcat/#Property:dataset_identifier)

_meta fields:_

| name                  | type          | description   |
|-----------------------|---------------|---------------|
| `accessPath`          | `string`      | URL or location to access this dataset.   |
| `accrualPeriodicity`  | `string`      | frequency with which dataset changes. Must be an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals) repeating duration   |
| `citations`           | `[]Citation`  | array of assets used to build this dataset   |
| `contributors`        | `[]User`      | description   |
| `description`         | `string`      | roughly a paragraph of human-readable text that provides context for the dataset |
| `downloadPath`        | `string`      | URL or other path string to where to download this dataset   |
| `homePath`            | `string`      | URL or other path string to a "landing page" resource that explains the dataset  |
| `identifier`          | `string`      | identifier for the dataset   |
| `keywords`            | `[]string`    | string of "tags" to connect this dataset with other datasets that carry similar keywords   |
| `language`            | `[]string`    | array of languages this dataset is written, in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format, ordered by most-to-least dominant  |
| `license`             | `License`     | the legal licensing agreement this dataset is released under  |
| `title`               | `string`      | title of the dataset |
| `theme`               | `[]string`      | "categories" this dataset should be filed under. Keywords should draw out specific keywords, theme entires should speak to the broader family of datasets this dataset is part of  |
| `version`             | `string`      | version identifier string   |

_additional data types:_

#### `Citation`

_example:_

<!--
docrun:
  filltype: json
-->
```json
  {
    "name" : "sean carter",
    "url" : "https://jayz.com",
    "email"<EMAIL_ADDRESS>  }
```

#### `License`

_example:_

<!--
docrun:
  filltype: json
-->
```json
  {
    "type" : "CC-BY-2",
    "url" : "https://creativecommons.org/licenses/by/2.0/"
  }
```

## Structure
Structure defines the characteristics of a dataset document necessary for a machine to interpret the dataset body.
Structure fields are things like the encoding data format (JSON,CSV,etc.), length of the dataset body in bytes, stored in a rigid form intended for machine use. A well defined structure & accompanying software should allow the end user to spend more time focusing on the data itself.

Two dataset documents that both have a defined structure will have some degree of natural interoperability, depending first on the amount of detail provided in a dataset's structure, and then by the natural comparability of the datasets.

_structure fields:_

| name                | type          | description |
|---------------------|---------------|-------------|
| `checksum`          | `string`      | bas58-encoded multihash checksum of the entire data file. this structure points to. This is different from IPFS hashes, which are calculated after breaking the file into blocks |
| `compression`       | `string`      | specifies any compression on the source data, if empty assume no compression. _**warning:** not yet implemented in qri_ |
| `encoding`          | `string`      | specifics character encoding, assumes utf-8 if not specified |
| `errCount`          | `int`         | the number of errors returned by validating data against schema. |
| `entries`           | `int`         | number of top-level entries in the dataset. analogous to the number of rows in a table |
| `format`            | `string`      | specifies the format of the raw data type by file extension. Must be one of: `json` , `csv` , `xlsx`, `cbor` |
| `formatConfig`      | `object`      |  removes as much ambiguity as possible about how to interpret the speficied format. Properties of this object depend on the `format` field |
| `length`            | `int`         | length of the data object in bytes |
| `schema`            | `jsonSchema`  | the schema definition for the dataset body, schemas are defined using the IETF json-schema specification. for more info on json-schema see: https://json-schema.org |

## Transform
Transform is a record of executing a transformation on data. Transforms can theoretically be anything from an SQL query, a jupyter
notebook, the state of an ETL pipeline, etc, so long as the input is zero or more datasets, and the output is a single dataset
Ideally, transforms should contain all the machine-necessary bits to deterministicly execute the algorithm referenced in "ScriptPath".

_transform fields:_

| name                 | type     | description |
|----------------------|----------|-------------|
| `scriptPath`         | `string` | the path to the script that produced this transformation |
| `syntax`             | `string` | language this transform is written in. Only "skylark" is currently supported |
| `syntaxVersion`      | `string` | an identifier for the application and version number that produced the result |
| `config`             | `object` | any configuration that would affect the resulting hash. transformations may use values present in config to perform their operations |
| `resources`          | `object` |  map of all datasets transform depends on with both name and commit paths |

repository: hbruch/website

repo_name: hbruch/website


text:
# OADA Functional Specifications

OADA Ecosystem has been designed to provide the farmer with best possible
experience in securely storing and sharing their data with entities of farmer's
choice. Following concepts form the foundation of this Ecosystem:

 1. Farmer should be able to use ANY OADA compliant cloud(s) as a storage system
    of choice.
 2. Farmer should be able to grant / revoke access to his / her OADA cloud or
    specific files inside of his / her OADA cloud to other entities in OADA
    Ecosystem.
 3. Framer should be able to seamlessly transfer data across OADA compliant
    clouds.

In order to realize the concepts described above, the Ecosystem defines a set of
entities that have well specified relationships and behavior.

To accomplish this, we will define the types of users who may use some part of
OADA, characteristic example usage scenarios that describe details of how they
may use the OADA ecosystem in daily life to accomplish tasks, and a high level
overview of the basic components of the OADA ecosystem

# OADA Participant Roles

[OADA Roles](OADA-Roles.md)

# OAuth2 and OADA Client Discovery
[OADA Client Discovery](OAuth2-and-Client-Discovery.md)

# Federated Identity

[OADA Federated Identity](Federated-Identity.md)

# User Groups

[User Group Descriptions](User-Groups.md)

# Use Cases

[Use Cases](Use-Cases.md)

repository: OADA/oada-docs

repo_name: OADA/oada-docs


text:
---
subcategory: "AppFlow"
---

# Resource: appflowpolicylabel

The appflowpolicylabel resource is used to create appflowpolicylabel.

## Example usage

```hcl
resource "citrixadc_appflowpolicylabel" "tf_appflowpolicylabel" {
  labelname       = "tf_policylabel"
  policylabeltype = "OTHERTCP"
}
```

## Argument Reference

* `labelname` - (Optional) Name of the AppFlow policy label. Must begin with an ASCII alphabetic or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters.  The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my appflow policylabel" or 'my appflow policylabel').
* `policylabeltype` - (Optional) Type of traffic evaluated by the policies bound to the policy label.

## Attribute Reference

In addition to the arguments, the following attributes are available:

* `id` - The id of the appflowpolicylabel. It has the same value as the `labelname` attribute.

## Import

An appflowpolicylabel can be imported using its name, e.g.

```shell
terraform import citrixadc_appflowpolicylabel.tf_appflowpolicylabel tf_policylabel
```

repository: citrix/terraform-provider-citrixadc

gha_language: Go

repo_name: citrix/terraform-provider-citrixadc


text:
---
id: creating-a-renderer
title: Creating a Renderer
---

In this guide, you'll learn how to build an autocomplete UI using React.

The `@algolia/autocomplete-core` package provides all the primitives to build an autocomplete experience, but you remain in charge of the UI output. This page will teach you how to leverage all the autocomplete capacities to build an accessible autocomplete, both for desktop and mobile.

You can find the final result in [this sandbox](https://codesandbox.io/s/autocomplete-guide-nh6y6).

## Importing the package

We'll import [`createAutocomplete`](createAutocomplete) from the core package and [`getAlgoliaHits`](getAlgoliaHits) from the Algolia preset which is a utility function to retrieve suggestions from an Algolia index.

```js
import algoliasearch from 'algoliasearch/lite';
import { createAutocomplete } from '@algolia/autocomplete-core';
import { getAlgoliaHits } from '@algolia/autocomplete-preset-algolia';

// ...
```

## Initializing Autocomplete

The Autocomplete entry point is the [`createAutocomplete`](createAutocomplete) function, which returns the methods to create the autocomplete experience.

```js
const searchClient = algoliasearch(
  'latency',
  '6be0576ff61c053d5f9a3225e2a90f76'
);

function Autocomplete() {
  // (1) Create a React state.
  const [autocompleteState, setAutocompleteState] = React.useState({});
  const autocomplete = React.useRef(
    createAutocomplete({
      onStateChange({ state }) {
        // (2) Synchronize the Autocomplete state with the React state.
        setAutocompleteState(state);
      },
      getSources() {
        return [
          // (3) Use an Algolia index source.
          {
            getInputValue: ({ suggestion }) => suggestion.query,
            getSuggestions({ query }) {
              return getAlgoliaHits({
                searchClient,
                queries: [
                  {
                    indexName: 'instant_search_demo_query_suggestions',
                    query,
                    params: {
                      hitsPerPage: 4,
                    },
                  },
                ],
              });
            },
          },
        ];
      },
    })
  ).current;

  // ...
}
```

- (1) We leverage a React state for our component to re-render when the [Autocomplete state](state) changes.

- (2) We listen to all Autocomplete state changes to synchronize them with the React state.

- (3) We use an Algolia index as a [source](sources).

We now have access to all the methods to use in our React components in the `autocomplete` variable. We can start building the UI.

## Using Prop Getters

[Prop getters](prop-getters) are methods that return props to use in your components. These props contain accessibility features, event handlers, etc. You do not have to know exactly what they're doing, since their responsibility is to create a complete experience without understanding the complex technical parts.

```jsx
function Autocomplete() {
  // ...

  return (
    <div {...autocomplete.getRootProps({})}>
      <input {...autocomplete.getInputProps({})} />
      <div {...autocomplete.getDropdownProps({})}>
        {autocompleteState.isOpen &&
          autocompleteState.suggestions.map((suggestion, index) => {
            const { source, items } = suggestion;

            return (
              <section
                key={`result-${index}`}
                className="algolia-autocomplete-suggestions"
              >
                {items.length > 0 && (
                  <ul {...autocomplete.getMenuProps()}>
                    {items.map((item, index) => {
                      return (
                        <li
                          key={`item-${index}`}
                          className="algolia-autocomplete-suggestions-item"
                          {...autocomplete.getItemProps({
                            item,
                            source,
                          })}
                        >
                          {item.query}
                        </li>
                      );
                    })}
                  </ul>
                )}
              </section>
            );
          })}
      </div>
    </div>
  );
}
```

The above code demonstrates that you do not need to worry about keyboard events, or tracking which item is highlighted, Autocomplete handles it with its prop getters.

At this point, you should already have a usable autocomplete input:

![Image](https://user-images.githubusercontent.com/6137112/83744493-7f3b0d80-a65c-11ea-9daf-ff14888f6028.png)

## Improving the input accessibility

To improve the `input` control, we can wrap it in a `form` and apply the form props given by Autocomplete:

```js
function Autocomplete() {
  // ...
  const inputRef = React.useRef(null);

  return (
    <div {...autocomplete.getRootProps({})}>
      <form
        action=""
        role="search"
        noValidate
        className="algolia-autocomplete-form"
        {...autocomplete.getFormProps({ inputElement: inputRef.current })}
      >
        <input ref={inputRef} {...autocomplete.getInputProps({})} />
      </form>
      {/* ... */}
    </div>
  );
}
```

`getFormProps` will handle submit and reset events and will respectively blur and focus the input when these events happen. You need to pass the `inputElement` to `getFormProps` to leverage this functionality.

You can add a label that represents the input:

```js
function Autocomplete() {
  // ...
  const inputRef = React.useRef(null);

  return (
    <div {...autocomplete.getRootProps({})}>
      <form
        action=""
        role="search"
        noValidate
        className="algolia-autocomplete-form"
        {...autocomplete.getFormProps({ inputElement: inputRef.current })}
      >
        <label {...autocomplete.getLabelProps({})}>Search items</label>
        <input ref={inputRef} {...autocomplete.getInputProps({})} />
      </form>
      {/* ... */}
    </div>
  );
}
```

A good practice for search inputs is to display a reset button. You can conditionally display it based on if there's a query, and trigger the `onReset` event from `getFormProps` on it.

```js
function Autocomplete() {
  // ...

  const { onSubmit, onReset } = autocomplete.getFormProps({
    inputElement: inputRef.current,
  });

  return (
    <div {...autocomplete.getRootProps({})}>
      <form
        action=""
        role="search"
        noValidate
        className="algolia-autocomplete-form"
        onSubmit={onSubmit}
        onReset={onReset}
      >
        <label {...autocomplete.getLabelProps({})}>Search items</label>
        <input ref={inputRef} {...autocomplete.getInputProps({})} />
        <button type="reset" onClick={onReset}>
          ｘ
        </button>
      </form>
      {/* ... */}
    </div>
  );
}
```

## Reacting to the network

You can display UI hints when the network is unstable, which can help users understand why results are not updating in real time.

```js
function Autocomplete() {
  // ...

  return (
    <div {...autocomplete.getRootProps({})}>
      {/* ... */}

      {autocompleteState.isOpen && (
        <div
          className={[
            'autocomplete-dropdown',
            autocompleteState.status === 'stalled' &&
              'autocomplete-dropdown--stalled',
          ]
            .filter(Boolean)
            .join(' ')}
          {...autocomplete.getDropdownProps({})}
        >
          {/* ... */}
        </div>
      )}
      {/* ... */}
    </div>
  );
}
```

You could for example create a `.autocomplete-dropdown--stalled` CSS class that lowers the opacity to hint users that the search is currently stuck.

![Image](https://user-images.githubusercontent.com/6137112/83759558-034cbf80-a674-11ea-86ca-6728b4c2d6f7.png)

You can learn more about what's available in the [state](state).

## Enabling a native mobile experience

Native platforms offer better primitive for mobile search experiences than the web. Autocomplete aims at providing this extra layer for the web mobile experience to be as close as the native mobile experience.

A common feature in mobile native experiences is to close the virtual keyboard when the user starts scrolling. This makes the results more discoverable, without the user having to manually close the keyboard

The `getEnvironmentProps` method returns event handlers that let you create this experience.

```js
function Autocomplete() {
  // ...

  const inputRef = React.useRef(null);
  const searchBoxRef = React.useRef(null);
  const dropdownRef = React.useRef(null);

  const { getEnvironmentProps } = autocomplete;

  React.useEffect(() => {
    if (!(searchBoxRef.current && dropdownRef.current && inputRef.current)) {
      return;
    }

    const { onTouchStart, onTouchMove } = getEnvironmentProps({
      searchBoxElement: searchBoxRef.current,
      dropdownElement: dropdownRef.current,
      inputElement: inputRef.current,
    });

    window.addEventListener('touchstart', onTouchStart);
    window.addEventListener('touchmove', onTouchMove);

    return () => {
      window.removeEventListener('touchstart', onTouchStart);
      window.removeEventListener('touchmove', onTouchMove);
    };
  }, [getEnvironmentProps, searchBoxRef, dropdownRef, inputRef]);

  return (
    <div {...autocomplete.getRootProps({})}>
      <form
        ref={searchBoxRef}
        action=""
        role="search"
        noValidate
        className="algolia-autocomplete-form"
        onSubmit={onSubmit}
        onReset={onReset}
      >
        {/* ... */}
      </form>

      {autocompleteState.isOpen && (
        <div
          ref={dropdownRef}
          className={[
            'autocomplete-dropdown',
            autocompleteState.status === 'stalled' &&
              'autocomplete-dropdown--stalled',
          ]
            .filter(Boolean)
            .join(' ')}
          {...autocomplete.getDropdownProps({})}
        >
          {/* ... */}
        </div>
      )}
    </div>
  );
}
```

Users will now feel a little bit closer to what they're used to on mobile apps.

---

You now have enough knowledge to build your own experience based on Autocomplete. If you feel like some topics weren't covered in this page, feel free to [open an issue](https://github.com/algolia/autocomplete.js/issues/new).

branch_name: refs/heads/next

gha_language: TypeScript


text:
[![Known Vulnerabilities](https://snyk.io/test/github/Riptide00/vue-static-site-template/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Riptide00/vue-static-site-template?targetFile=package.json)
[![Netlify Status](https://api.netlify.com/api/v1/badges/1c567290-48cd-4c1d-b3ad-10bb39933461/deploy-status)](https://app.netlify.com/sites/zealous-nightingale-80fed5/deploys)
# Vue static site template

This is my shot at a static site template for Vue.js.

It has simple a simple routing setup, a structure to add pages and a dynamic theme color system.

(By adjusting the '--main-color' CSS variable.)

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

## Deployment

We deploy Vue.js projects on [Netlify](https://www.netlify.com).

Redirect all routes to 'index.html'.

(the '_Redirect' file handles this for Netlify, but if u host it somewhere else or locally keep this in mind).

license: Unlicense


text:
TouIST main program
===================

This folder contains the source code for the main program of the TouIST
project. It is named GUI because of it's main feature: be the user
interface for the SAT/SMT solver and `touist` translator. The whole GUI is written in Java/SWING.

## Java Architecture
![conception](https://www.lucidchart.com/publicSegments/view/54f46f57-1ff4-46e0-b146-65000a009e9c/image.png)

## How to change the external solver used
We had planned, at first, to allow the user to pick the solver he wanted. Because most solvers have "standard" input/output behaviours, it might be quite easy to do so.

But for now, changing the solver requires to:

- create a new `SolverWithYourExternalSolver` class that extends the `Solver` abstract class
- implement the methods that you must override (`launch`, `nextmodel`...)

It shouldn't be really hard to re-implement a new `SolverWithYourExternalSolver`, the only big problem is the multiple problems that the `exec()` environment brings in terms of communication between an external program and your own code.

We fixed that in our own implementation of `Solver`, called `SolverTestSAT4J` that uses `minisat.jar` using multiple `wait(100ms)` and so on. It drew a lot of problems like how to know when to write into `stdin`...

repository: touist/touist

gha_language: OCaml

repo_name: touist/touist


text:
**Scenario**

Up until now, the Chinook store hasn't had to collect sales tax, but due to some new tax legislation, we will need to charge customers in certain countries taxes on their purchases.
We need to add the following columns to the `invoice table`:

`subtotal`
`tax`

We also need to update all existing invoices with data for these two new columns. The value for the `tax` column will need to be `0` for every row, and the value for the `subtotal` column will need to be the **same as the total column for each row**.

the first five rows of those columns will need to look like following:
```
sqlite> SELECT
   ...>    invoice_id,
   ...>    subtotal,
   ...>    tax,
   ...>    total
   ...> FROM invoice
   ...> LIMIT 5;
invoice_id  subtotal    tax         total
----------------------
1           15.84       0           15.84
2           9.9         0           9.9
3           1.98        0           1.98
4           7.92        0           7.92
5           16.83       0           16.83
```
**Requirement**
Launch the SQLite shell, connected to the `chinook.db` database.
Add two new columns, with values, to the invoice table:
- `tax`, with type `NUMERIC`.
The value for all existing rows should be 0.
- `subtotal`, with type `NUMERIC`.
The value for each row should be the same as that row's value for total.
Quit the SQLite shell.

```
/home/pc$ sqlite3 chinook.db
#  sqlite3> ALTER TABLE invoice
#      ...> ADD COLUMN tax NUMERIC;
#  sqlite3> ALTER TABLE invoice
#      ...> ADD COLUMN subtotal NUMERIC;
#  sqlite3> UPDATE invoice
#      ...> SET
#      ...>     tax = 0,
#      ...>     subtotal = total;
#  sqlite3> .quit
#
```


text:
## 2.0.3 (Aug 02, 2022)
  - Fix for deprecated method in runtime-core

## 2.0.2 (May 04, 2017)
  - Using File.separator in JettyWebAppContextFactory for being OS agnostic

## 2.0.1 (Oct 14, 2016)
  - Removed bottleneck in PlatformEventMultiCaster

## 2.0.0 (May 20, 2016)
  - Removed logback as packaged logging implementation. Uses only the slf4j logging facade. Users of Trooper, including Trooper profiles, now provide their own logging binding
  - JDK version is 1.8
  - Changes to all profile dependencies due to above logging change

## 1.3.4 (Feb 26, 2016)
  - Support for multiple component containers

## 1.3.3 (Sep 01, 2015)
  - Upgrade for Spring 4.2.0.RELEASE version
  - Upgrade to other libraries to be API compatible with Spring upgrade
  - Code fixes post upgrade

## 1.3.3-SNAPSHOT (Jun 01, 2015)
  - Added support to change admin port for batch console. Helps to run multiple Trooper batch instances on same machine
  - Corrected JSON formatting in services console

## 1.3.2 (May 20, 2015)
  - Upgrading snapshot release to full release

## 1.3.2-SNAPSHOT (Dec 09, 2014)
  - Added support for chaining batch jobs
  - Job executions are sorted by recency of execution
  - Enhancement to use pre-created queues in RabbitMQ Integration and Mule transport modules
  - New HTablePool implementation that validates connections periodically
  - Fix to Trooper batch for pagination (issue #34) and alphabetical sorting (issue #35)
  - Fix to Trooper batch admin page performance issue (issue #36)
  - Fix in FileLocator to use absolute path of files if specified
  - Fix in JobInfo to make use of date formatter thread safe
  - Fix in Bootstrap to handle failed init of component container

## 1.3.1 (Jan 5, 2014)
  - Bug fix for invoking Metrics Timer in service profile

## 1.3.0 (Nov 14, 2013)
  - Upgrade of all modules to use Spring 3.2.5.RELEASE
  - Enhancements/fixes to modules to make them compatible with Spring 3.2.5.RELEASE version

## 1.2.9 (Nov 5, 2013)
  - Bug fix for preventing concurrent job execution in batch profile
  - Bug fix in Rabbit consumer for queue with zero messages
  - Bug fix to prevent duplicate loading of services in service profile

## 1.2.6 (July 23, 2013)
  - Modified POM files to make build versions explicit
  - Bug fixes. Notably race condition in batch JMX administrator

## 1.2.5 (July 08, 2013)
  - Added ability to re-init Batch jobs and Services. Available using REST endpoints
  - Added support to renew TGT tickets for Kerberos secured CDH4 client access libraries i.e. dataaccess-hbase
  - Added support to connect to live RabbitMQ nodes in a cluster, node affinity
  - Bug fixes. Notably Jetty console display settings for batch-core

## 1.2.4 (June 19, 2013)
  - Forced System.exit() in bootstrap destroy
  - Warm up HTable instances during startup for faster read/write to HBase
  - Bugfixing in dataacess-hbase
  - Ignore errors in case properties file is not found (and apply defaults)

## 1.2.3 (June 3, 2013)
- **New features**
  - Support for Kerberos authentication in CDH4
  - Bumped up hibarnate version to 3.2.3-ga
  - Added requestRate as a metric in Service Framework
  - Added support for loading configurations from Trooper config locations
  - Bugfixing for Batch HA mode, Zookeeper path is created if it doesn't exist
  - Minor bugfixing in ServiceFramework, BootstrapLauncher
  - Configuration console for Service Framework core
  - Moved to Jackson for JSON marshalling/unmarshlling

## 1.2.2 (March 14, 2013)
- **New features**
  - CodaHale metrics integration for better Metrics gathering. New metrics include: P50,P75,P99,P99.9 Response Times, 1-min, 5-min, 15-min rate, etc.
  - Added Notification support for metrics. Users can now define custom rules about the metrics and get notifications when any of the rule matches
  - Ability to turn off sync in HA mode
  - Minor bugfixing: Next fire time not updated in Batch profile [FIXED]

- **Docs changes:**
  - https://github.com/regunathb/Trooper/wiki/Writing-Services-in-Trooper [Info on how to use the Metrics Notifications]
  - https://github.com/regunathb/Trooper/wiki/Trooper-Services-Web-Console [Added images to show the new console]

## 1.2.1 (March 6, 2013)
- **New features**
  - Server mode for serviceframework, that can be used to view metrics and test the services
  - Custom property configurer, that can be used to configure bean properties
  - Optimization of Trooper admin (batch server mode), making it much faster when number of executions are high
  - Added ability to limit the number of jobInstances for which data has to be stored in memory (by Trooper Admin)
  - Minor bugfixings
  - Added ability to ignore errors, if job sync doesn't happen due to permissions error (HA mode)

## 1.1.0 (February 12, 2013)
- **New features in Batch profile:**
  - Cron expression and next fire time visible on jobs page
  - Dynamic deployment of jobs. (Jobs can be deployed on the fly)
  - Added job configuration UI for modification of existing jobs and deployment of new jobs
  - Support for uploading dependency JARs with job configuration
  - Added API for pushing and pulling jobs from one Job Host to the other.
  - Clustered mode (High Availability wrapper) now supports automatic synchronization of job Hosts.
  - In Clustered (HA) mode, job page shows all the deployed job hosts, and their consoles are accessible

- **Docs changes:**
  - https://github.com/regunathb/Trooper/wiki/Writing-Batch-jobs-in-Trooper [Info on how to use the Job configuration console]
  - https://github.com/regunathb/Trooper/wiki/Trooper-Batch-Web-Console [Changed images to show the new console]
  - https://github.com/regunathb/Trooper/wiki/Useful-Batch-Libraries [Information on synchronization]

repository: regunathb/Trooper

gha_language: Java

repo_name: regunathb/Trooper


text:
# Cachit

A little backend-agnostic caching helper for JavaScript

## Installation (NodeJS)

    npm install cachit

## Usage

    var cachit, cache
    if (typeof(require) === 'function')
      cachit = require('cachit')
    else if (!!window)
      cachit = window.cachit
    cache = cachit()
    cache('foo', function() { console.log("Running foo!"); return "Foo." })
    cache('foo', function() { console.log("Running foo!"); return "Foo." })

The preceding code will print "Running foo!" just once, as the second time,
the return value of the function has been cached (in memory), and it will be
returned.


text:
## About this project

This is a site for running a free school, written to fit the needs of [Knowledge Commons DC](http://knowledgecommonsdc.org) ([contact@knowledgecommonsdc.org](mailto:contact@knowledgecommonsdc.org)).

See [this repository's wiki](https://github.com/knowledgecommonsdc/kcdc3/wiki) for information about plans, structure, installation, and use.

## License/releases

Original work in this project is copyright Knowledge Commons DC and contributors, and available under the MIT License. The project is not ready for public release, but email KCDC for details.

gha_language: Python


text:
# Questions & Answers Service API

> A simple GraphQL API to serve data to a Q&A component of a front-end retail portal

- [General info](#general-info)
- [Technologies](#technologies)
- [Setup](#setup)
- [Performance](#performance)
- [Status](#status)
- [Created by](#created-by)

## General info

## Technologies

- Node.js - version 14.5.2
- Apollo-Server-Express - version 2.19.1
- GraphQL - version 15.4
- Mongoose - version 5.11.8
- MongoDB - version 4.4.2
- Docker - version 20.10.1
- Docker-Compose - version 1.27.4

## Setup

Create _.env_ file in the root directory with the following variables:

- PORT: The port through which our API will listen to calls
- URL: The database URL in the following form
  - `mongodb://localhost:27017/DB_NAME` - If running with '**npm start**' command
  - `mongodb://DB_USER:DB_PASSWORD@mongo_qa:27017/DB_NAME` - If running with '**docker-compose up -d**' command
- DB_USER: Defines root database user on first run
- DB_PASSWORD: Defines root database password on first run

After creating the _.env_ file, execute the following commands from the console:

- **npm install** to install project dependencies
- **npm start** to instantiate the service locally
  _or_
- **docker-copose up -d** to instantiate docker containers for server and database

## Performance

## Status

Project is: _finished_

## Created by

[Denis Sanches](https://github.com/efir-tractatus) - feel free to get in touch!

repository: efir-tractatus/SDC-Questions-Answers

repo_name: efir-tractatus/SDC-Questions-Answers


text:
---
{title: swplot.logo, link: swplot.logo, summary: creates the SpinW logo, keywords: sample,
  sidebar: sw_sidebar, permalink: swplot_logo, folder: swplot, mathjax: true}

---

### Syntax

`swplot.logo`

`swplot.logo(fName)`

### Description

`swplot.logo` creates and displays the SpinW logo with credentials. The
logo is using an honest colormap [cm_inferno] and removed the tiles of
the sine wave to symbolize the increase of quality of code (measured as a
number of eliminated for loops) :D The logo is used for SpinW 3.0.
Colormap is expected to change for every major version jump.

### Examples

This is the logo:

```matlab
swplot.logo
```

{% include image.html file="generated/swplot_1.png" alt="swplot.logo" %}

### Input Arguments

`fName`
: File name to save the logo. Optional, if not given the logo
  will be shown in a new figure.

### See Also

[spinw](spinw)

{% include links.html %}

gha_language: HTML


text:
# Week-14_Unsupervised-Learning
Applying unsupervised learning algorithms to solving business problems

#### By **CHEBET HARRIETH**

## Description
You are a Data analyst at Carrefour Kenya and are currently undertaking a project that will inform the marketing department on the most relevant marketing strategies that will result in the highest no. of sales (total price including tax). Your project has been divided into four parts where you'll explore a recent marketing dataset by performing various unsupervised learning techniques and later providing recommendations based on your insights.

### Part 1: Dimensionality Reduction

This section of the project entails reducing your dataset to a low dimensional dataset using the t-SNE algorithm or PCA. You will be required to perform your analysis and provide insights gained from your analysis.

### Part 2: Feature Selection

This section requires you to perform feature selection through the use of the unsupervised learning methods learned earlier this week. You will be required to perform your analysis and provide insights on the features that contribute the most information to the dataset.

### Part 3: Association Rules

This section will require that you create association rules that will allow you to identify relationships between variables in the dataset. You are provided with a separate dataset that comprises groups of items that will be associated with others. Just like in the other sections, you will also be required to provide insights for your analysis.

### Part 4: Anomaly Detection

You have also been requested to check whether there are any anomalies in the given sales dataset. The objective of this task being fraud detection.

## Setup Requirements

The datasets used are:
* Part 1 and 2: [Dataset] (http://bit.ly/CarreFourDataset).
* Part 3: [Dataset] (http://bit.ly/SupermarketDatasetII).
* Part 4: [Dataset] (http://bit.ly/CarreFourSalesDataset).

## Technologies Used
The languages used: R.
Libraries incorporated: Unsupervised Learning dependencies

## Support and contact details
Be free to pull the code and modify it in any way you think you can make it better.

### License
*MIT License*
Copyright (c) 2021 Harrieth Rotich

**Courtesy of Moringa School Data Science class**


text:
### Merge sort is a _divide and conquer_ algorithm

an efficient, general-purpose, comparison based sorting algorithm

> Merge sort is a divide-and-conquer algorithm based on the idea of breaking down a list into several sub-lists until each sublist consists of a single element and merging those sublists in a manner that results into a sorted list.

- divides input array in two halves, call itself for the two halves and then merges the two sorted halves

**idea:**
- divide the unsorted list into _**N**_ sublists, each containing 1 element
- take adjacent pairs of two singleton lists and merge them to form a list of 2 elements. _**N**_ will now convert into _**N/2**_ lists of size 2
- repeat the process until a single sorted list is obtained

while comparing two sublists for merging, the first element of both lists is taken into consideration - while sorting in ascending order, the element that is of a lesser value becomes a new element of the sorted list - this procedure is repeated until both the smaller sublists are empty and the new combined sublist comprises all the elements of both the sublists

![Merge Sort](images/2018/08/merge-sort.png)

### time complexity:
the list of size _**N**_ is divided into a max of _**logN**_ parts, and the merging of all sublists into a single list takes _**O(N)**_ time, the **worst case** run time of this algorithm is _**O(NLogN)**_

# Merge Sort (Analysis)