text:
Test model
Version 2019 R1

Tool for testing hypothetical behavior rules to see what the outcomes (trajectory and distribution) are when played together with grid-based data, for example:
 - water hydraulic patterns
 - water quality or contaminants
 - remotely sensed terrestrial landscapes
 - air/wind flow patterns
for situations where the environment could be responsible for individual animal, robot, cell, swarm, or other agent movement of interest.

This tool allows such investigation using large 2D, 3D, and time varying grids storing the environmental data.

Instructions for getting started are located in the folder "Install_and_GettingStarted", which includes some hints for programming newcomers just interested in using the ELAM model.

Behavior rules are located entirely within "BehaviorRule.f90" in the "ELAMsourceCode/solver" folder. Code files supporting "BehaviorRule.f90" are located in the "ELAMsourceCode/solver" folder. The Fortran coding language is used for the behavior rules and supporting material because of debate that Fortran may be easier than C++ for beginners to use; Fortran is also fast. Fortran code may be converted to C++ depending on future preferences of users.

C++ code (.cpp and .h files) link the ELAM model behavior rules and supporting computations with the Tecplot commercial library, so one can use a simple laptop to run the ELAM model on large grids, e.g., grids with many millions of nodes, including the generalized case of moving 3D grids of n-faced polyhedra used in some environmental modeling applications.

repository: RAndrewGoodwin/TESTmodel

repo_name: RAndrewGoodwin/TESTmodel


text:
---
layout: post
title:  "Carbon language Fibonacci series, print nth Fibonacci number"
author: Pramod
categories: [Carbon]
tags: [red, yellow]
image: assets/images/carbon-fibonacci-series.png
description: "Simplest way to print fibonacci series in carbon programming language. Working without errors to print the full series"
featured: true
hidden: true
suggestions: ['carbon-language-tutorial-syntax/']
beforetoc: "Google Carbon language is an open source Programming language that is successor to C++"
toc: true
tableofcontents: true
promote: true
last_modified_at: 2022-08-01T23:02:00+00:00
---

Google introduced [Carbon programming language](https://tipseason.com/carbon-language-tutorial-syntax/) with a modern language syntax to become a successor to C++.

One of the challenges many beginner developers are facing is to run basic examples since the language is in a very early stage without even having a compiler. So here is a working example to print fibonacci series using Carbon language.

## How to print fibonacci series in carbon lang
To recollect Fibonacci series, here the following sequence that we want to print.

`0, 1, 1, 2, 3, 5, 8, 13, 21 ....`

Currently, there is no support `<` symbol yet in Carbon language. Also `for` loop is not yet supported in carbon language. So we will use different approach.

To print fibonacci series in carbon, we will use combination of recursion + iteration to print fibonacci sequence. Here are 2 steps we follow.

1. Print nth fibonacci number in Carbon programming language
2. Print fibonacci sequence using While loop in carbonlang

Let's dive in

## Step 1: Print nth fibonacci number in Carbon language
We use a recursive code to calculate nth fibonacci number using the follow recursive formula.
```
fib(n) = fib(n-1) + fib(n-2);
if n <= 1 we can just print n.
```

Let's write code in carbon language.

```
fn Square(x: i32) -> i32 {
  return x * x;
}

fn fib(n: i32) -> i32 {
    if(n == 0) {
        return 0;
    }
    if(n == 1) {
        return 1;
    }

    return fib(n - 1) + fib(n - 2);
}
```

## Step 2: Print fibonacci sequence using While loop in carbonlang
The next step is the call fib(n) for n times. This can be achieved using while loop.
Observe fib(i) inside `Print` method.

```
fn fibSeries(count: i32) {
    var i: i32 = count;
    while(not (i == 0)) {
        Print("{0}", fib(i));
        i = i - 1;
    }

}
```

## Print fibonacci sequence in carbonlang
Connecting two pieces together, we can have

```
package sample api;

fn Square(x: i32) -> i32 {
  return x * x;
}

fn fib(n: i32) -> i32 {
    if(n == 0) {
        return 0;
    }
    if(n == 1) {
        return 1;
    }
    return fib(n - 1) + fib(n - 2);
}

fn fibonacciSeries(count: i32) {
    var i: i32 = count;
    while(not (i == 0)) {
        Print("{0}", fib(i));
        i = i - 1;
    }

}

fn Main() -> i32 {
    var n: i32 = 6;
    Print("Input n: {0}", n);
    Print("nth fibonacci number result: {0}", fib(n));
    Print("-----------", n);
    Print("Fibonacci series for n = {0}", n);
    fibonacciSeries(10);
    return 0;
}
```

The output for this would be
```
Input n: 6
nth fibonacci number result: 8
-----------
Fibonacci series for n = 6
55
34
21
13
8
5
3
2
1
1
```

You can try this by yourself using carbon language compiler explorer online:
[Compiler explorer](https://carbon.godbolt.org/)

Additional Reading in Carbon language:

Carbon language memory safety for secure memory management:
[Carbon language memory management](https://tipseason.com/carbon-language-memory-safety/)

This is a part of carbon language series for beginners. Will share carbon language tips and working examples regularly. You can view full carbon language tutorial video here.

## Carbon language short course
If you are getting started with Carbon, you can watch carbon language tutorial here

<iframe width="560" height="315" src="https://www.youtube.com/embed/vff1BRrQr_w" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

If you find other better ways to print fibonacci series in carbon, share your thoughts in the comments.

### What's next?

- A real world project built on top of supported Carbon language features.
- We will cover Carbon language updates very closely with a free newsletter and detailed articles. If you are interested in learning more about Carbon, drop your email to our Newsletter to stay on top of Carbon and latest improvements.

{% include mailchimp-carbon.html %}

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive


text:
# Estasi Translator

Estasi\Translator - internationalization system using the GNU gettext and/or
ICU MessageFormat libraries.

Currently, there is no native implementation, you must use one of the following components
(via the appropriate adapters):
- [Symfony Translation Component](https://github.com/symfony/translation):
    `composer require symfony/translation`
- [Laminas i18n Component](https://github.com/laminas/laminas-i18n):
    `composer require laminas/laminas-i18n`

## Installation
To install with a composer:
```
composer require estasi/translator
```

## Requirements
- PHP 7.4 or newer

## License
All contents of this package are licensed under the [BSD-3-Clause license](https://github.com/estasi/translator/blob/master/LICENSE.md).

repository: estasi/translator

repo_name: estasi/translator


text:
# Photoshop Scripts and Plug-ins
A collection of scripts and plug-ins developed for working with photoshop.

## Scripts
Scripts are like Photoshop actions, but a little more robust, easily installed, and transferrable. Made with the ExtendScript Toolkit, these scripts are essentially an application specific JavaScript. Anyone with a familiarity with JavaScript should have little difficulty in working with ExtendScript.

Documentation on creating and editing Photoshop scripts can be found at https://www.adobe.com/devnet/photoshop/scripting.html.

### Installation:
To install the scripts, you need only copy the `*.jsx` or `*.jsxbin` file to the Scripts directory in your Photoshop presets folder. Note that Photoshop does not provide a user preset folder for scripts, and will not recognize one if you create it, so scripts must go in the application presets folder. See below for OS specific instruction locations. Once installed, restart Photoshop.

#### Windows
The "Scripts" folder is generally located at:
```
%ProgramFiles%\Adobe\Adobe Photoshop [version]\Presets\Scripts
```

#### macOS
The "Scripts" folder is generally located at:
```
/Applications/Adobe Photoshop CC [version]/Presets/Scripts
```

#### Alternative Installation
In reality, scripts can be run from anywhere, so you may install the script at a location of your choosing. It will not appear in the Scripts menu, however, and you will need to select: `File > Scripts > Browse`, then navigate to the location of the script and select it to run it.

### Usage
Open Photoshop, load your image, and then from the application menu select: `File > Scripts > [script]` to run the script.

## Script Definitions

### Tile Preview [ _Tile Preview.jsx_ ]
This script uses the existing selection, active layer, or active image (in order of preference) as a source to generate a new image tiled with the selection. This makes it fairly simple to quickly test a working image to see how it tiles, especially useful for making textures and tile maps for games. The preview will be a 5x5 grid of the given selection, layer, or image.

Options exist in the script for changing the following features, see the "settings" object variable.
* Number of tile columns and rows.
* Whether or not to add a gap between tiles.
* Turn off the first tile highlight box.

repository: ElusiveConcepts/photoshop

repo_name: ElusiveConcepts/photoshop


text:
# SSD1306 OLED MakeCode Package

This is the MakeCode Package for SSD1306 OLED controller, based on the Adafruit Arduino library available [here](https://github.com/adafruit/Adafruit_SSD1306).

## Hardware Setup
1. Insert the OLED display into the I2C ports on the break out board.

## Blocks
### Initialize OLED Display
Initializes the OLED display.

Sets up the OLED display and prepares it for use by the micro:bit.

```sig
OLED.init(128, 64)
```

This block must be placed before any of the ``show`` blocks.

### Show String Without Newline
Displays a string on the OLED module without a newline.

```sig
OLED.writeString("")
```

The ``init`` block must be placed before this.

### Show String With Newline
Displays a string on the OLED module with a newline.

```sig
OLED.writeStringNewLine("")
```

The ``init`` block must be placed before this.

### Show Number Without newline
Displays a number on the OLED module without a newline.

```sig
OLED.writeNum(0)
```

The ``init`` block must be placed before this.

### Show Number With Newline
Displays a number on the OLED module with a newline.

```sig
OLED.writeNumNewLine(0)
```

The ``init`` block must be placed before this.

### Clear Display
Clears the display.

```sig
OLED.clear()
```

The ``init`` block must be placed before this.

### Draw Outlined Rectangle
Displays an outline of a rectangle.

```sig
OLED.drawRectangle(x,y,w,h)
```

The ``init`` block must be placed before this.

### Draw Outlined Circle
Displays an outline of a circle.

```sig
OLED.drawCircle(x,y,r)
```

The ``init`` block must be placed before this.

### Draw Line
Displays a line.

```sig
OLED.drawLine(x1,y1,x2,y2)
```

The ``init`` block must be placed before this.

### Progress bar
Displays a progress bar with a specified percentage of progress.

```sig
OLED.drawLoadingBar(percent)
```

The ``init`` block must be placed before this.

## Supported targets

* for PXT/microbit

## Footnotes

1.  Datasheet https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf

repository: longan-link/pxt-oled

repo_name: longan-link/pxt-oled


text:
# yoga-wasm-web

[Yoga](https://github.com/facebook/yoga) but in WebAssembly and ASM.js. This is an **opinionated** fork from [pinqy520/yoga-layout-wasm](https://github.com/pinqy520/yoga-layout-wasm) with the following changes:

- Stick to commit eea87c3 of Yoga, which supports `gap`.
- Fix missing `YGMeasureMode` binding.
- Fix missing `YGUnit` binding.
- Set flag `DYNAMIC_EXECUTION=0` for `emcc` to remove `eval` and `Function` executions.
- Set flag `TEXTDECODER=0`.
- Force the `ENVIRONMENT` to be `web`.
- Add `pre.js` to set `document` as `this`.
- Replace Rollup with esbuild for bundling.
- Remove the asm.js build.
- Enable LTO.
- Enable SIMD128.

## Install & Build

To develop this project locally, you need to clone the repo and fetch the yoga submodule first. Also, [emcc](https://emscripten.org/docs/getting_started/downloads.html) is required to build this project too.

After that, install npm dependencies:

```sh
pnpm i
```

And run the build script:

```sh
pnpm build
```

## WASM

To use the WASM build (take Node.js as an example):

```js
import fs from 'fs'
import initYoga from 'yoga-wasm-web'

const yoga = await initYoga(
  fs.readFileSync('./node_modules/yoga-wasm-web/dist/yoga.wasm')
)
```

You can use other ways to provide the WASM binary too.

## ASM.js

To use the ASM.js build:

```js
import initYoga from 'yoga-wasm-web/asm'

const yoga = initYoga()
```

branch_name: refs/heads/main


text:
---
layout: default
---

# 1997-07-24 - Re: DEATH TO THE TYRANTS

## Header Data

From: Tim May<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: b122cd4b1caceaf6b4c75227fbeafad66aeccf2bc53435f9e18f91b04d09ef89

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-07-24 04:37:30 UTC

Raw Date: Thu, 24 Jul 1997 12:37:30 +0800

## Raw message

```
{% raw  %}From: Tim May<EMAIL_ADDRESS>Date: Thu, 24 Jul 1997 12:37:30 +0800
To<EMAIL_ADDRESS>Subject: Re: DEATH TO THE TYRANTS
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 8:31 PM -0700 7/23/97, Declan McCullagh wrote:
>It's actually the Secret Service offices that are upstairs from the Time
>bureau, on the top floor of the building. Perhaps because we're close
>enough to see the White House? Dunno. The only time I went up there was
>when they were selling Xmas tree ornaments.
>
>I have a call into the IRS about this mail, BTW. So far nobody has (or
>admits to having) any idea what I'm talking about.
>

I'm not a reporter, but it seems to me that a major first step in writing
such a story would be to find out who own the account from which the mail
was (allegedly) sent.

Namely, who is<EMAIL_ADDRESS>and what does he or she think of
the "DEATH TO TYRANTS" subject header, sent to me (and maybe others). And
what was the reason this was sent to folks who are neither lawyers nor
reporters nor anyone else who typically receives Treasury Department press
releases?

 The headers in the first of the messages I received were:

Received: from you for tcmay
 with Cubic Circle's cucipop (v1.13 1996/12/26) Fri Jul 18 19:25:02 1997
X-From_<EMAIL_ADDRESS>Fri Jul 18 15:30:05 1997
Received: from tcs_gateway1.treas.gov (tcs-gateway1.treas.gov
[<IP_ADDRESS>]) by you.got.net (8.8.5/8.8.3) with SMTP id PAA28395 for
<EMAIL_ADDRESS>Fri, 18 Jul 1997 15:29:59 -0700
X-Real-To<EMAIL_ADDRESS>Received: by tcs_gateway1.treas.gov id AA19560
  (InterLock SMTP Gateway 3.0 for tcmay@got.net);
  Fri, 18 Jul 1997 18:36:21 -0400
Received: by tcs_gateway1.treas.gov (Internal Mail Agent-2);
  Fri, 18 Jul 1997 18:36:21 -0400
Received: by tcs_gateway1.treas.gov (Internal Mail Agent-1);
  Fri, 18 Jul 1997 18:36:21 -0400
Date: Thu, 17 Jul 1997 12:18:35 -0400
From: IRS Inspection<EMAIL_ADDRESS>Message-Id<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Subject: DEATH TO TYRANTS

I forwarded the header block a few days ago, and can furnish anyone with a
complete copy. Except for the "DEATH TO TYRANTS" subject, and some details
of the dates (as noted by John Young), it's the basic "Something of
Interest" message, which I also got a copy of.

In case there's interest in that, too, here's the header block for that one:

Received: from you for tcmay
 with Cubic Circle's cucipop (v1.13 1996/12/26) Fri Jul 18 19:25:08 1997
X-From_<EMAIL_ADDRESS>Fri Jul 18 15:39:43 1997
Received: from tcs_gateway1.treas.gov (tcs-gateway1.treas.gov
[<IP_ADDRESS>]) by you.got.net (8.8.5/8.8.3) with SMTP id PAA28954 for
<EMAIL_ADDRESS>Fri, 18 Jul 1997 15:39:39 -0700
X-Real-To<EMAIL_ADDRESS>Received: by tcs_gateway1.treas.gov id AA19652
  (InterLock SMTP Gateway 3.0 for tcmay@got.net);
  Fri, 18 Jul 1997 18:45:59 -0400
Received: by tcs_gateway1.treas.gov (Internal Mail Agent-2);
  Fri, 18 Jul 1997 18:45:59 -0400
Received: by tcs_gateway1.treas.gov (Internal Mail Agent-1);
  Fri, 18 Jul 1997 18:45:59 -0400
Date: Thu, 17 Jul 1997 12:28:11 -0400
From: IRS Inspection<EMAIL_ADDRESS>Message-Id<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Subject: Something of Interest

There's something wrong when I'm a felon under an increasing number of laws.
Only one response to the key grabbers is warranted: "Death to Tyrants!"
---------:---------:---------:---------:---------:---------:---------:----
Timothy C. May              | Crypto Anarchy: encryption, digital money,
<EMAIL_ADDRESS>408-728-0152 | anonymous networks, digital pseudonyms, zero
W.A.S.T.E.: Corralitos, CA  | knowledge, reputations, information markets,
Higher Power: 2^1398269     | black markets, collapse of governments.
"National borders aren't even speed bumps on the information superhighway."

{% endraw %}
```

## Thread

+ Return to [July 1997](/archive/1997/07)

+ Return to "[Alan <alan@ctrl-alt-del.com>](/authors/alan_alan_at_ctrlaltdel_com_)"
+ Return to "[Declan McCullagh <declan@pathfinder.com>](/authors/declan_mccullagh_declan_at_pathfinder_com_)"
+ Return to "[Declan McCullagh <declan@well.com>](/authors/declan_mccullagh_declan_at_well_com_)"
+ Return to "[Doug Peterson <fnorky@geocities.com>](/authors/doug_peterson_fnorky_at_geocities_com_)"
+ Return to "[John Young <jya@pipeline.com>](/authors/john_young_jya_at_pipeline_com_)"
+ Return to "[Ray Arachelian <sunder@brainlink.com>](/authors/ray_arachelian_sunder_at_brainlink_com_)"
+ Return to "[Robert Hettinga <rah@shipwright.com>](/authors/robert_hettinga_rah_at_shipwright_com_)"
+ Return to "[SL Baur <steve@xemacs.org>](/authors/sl_baur_steve_at_xemacs_org_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"

+ 1997-07-23 (Thu, 24 Jul 1997 07:58:16 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/29856d970530a826eb8887d2b1524f16ac80a1411b0f19453b9f6948d9661e0c) - _John Young<EMAIL_ADDRESS>  + 1997-07-24 (Thu, 24 Jul 1997 12:25:01 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/60764835824c37e61632d976137db8c057003d78cd74c00e8fff2c8a5e904cc6) - _Declan McCullagh<EMAIL_ADDRESS>    + 1997-07-24 (Thu, 24 Jul 1997 23:56:21 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/b217a5dadf24d10b4805ad12054610d875779b090c96ad5652cc84e7d48a9bbc) - _Doug Peterson<EMAIL_ADDRESS>      + 1997-07-24 (Fri, 25 Jul 1997 00:50:54 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/b748af2f8351ea4029c1525c249884c1b1f75364f656c0b41c2581c2035f85b5) - _Declan McCullagh<EMAIL_ADDRESS>        + 1997-07-24 (Fri, 25 Jul 1997 04:15:14 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/d3e27674ebfc2e54d36531eda10954bcf7e6616d5c96a80995256a650c0b0642) - _Alan<EMAIL_ADDRESS>        + 1997-07-30 (Wed, 30 Jul 1997 22:52:05 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/5bb9183845e9773747081353196df1ad592345adfeac95db33456106d1e5576a) - _Doug Peterson<EMAIL_ADDRESS>      + 1997-07-24 (Fri, 25 Jul 1997 01:03:34 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/687e16ae20301814c94c9eebb4545a545216791ddc2b91d332be4f758d2e78f6) - _Ray Arachelian<EMAIL_ADDRESS>        + 1997-07-30 (Wed, 30 Jul 1997 22:54:43 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/53ed117fb4470fab572229b97fe7295bc0f455e238842f920210ad1cea87ed2e) - _Doug Peterson<EMAIL_ADDRESS>      + 1997-07-25 (Fri, 25 Jul 1997 21:50:03 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/b9464a3403728dfa1acaceab262e9bd37f38a57216b9d43df1274fb8c2e54422) - _Robert Hettinga<EMAIL_ADDRESS>        + 1997-07-25 (Fri, 25 Jul 1997 22:47:44 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/ad0819cef86e7cbe9e3cc5bcef7e4bf37f2b91f81b9b4a8150d085d2a8984870) - _Ray Arachelian<EMAIL_ADDRESS>  + 1997-07-24 (Thu, 24 Jul 1997 12:37:30 +0800) - Re: DEATH TO THE TYRANTS - _Tim May<EMAIL_ADDRESS>    + 1997-07-24 (Thu, 24 Jul 1997 23:16:34 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/dee918f90bb1890ddfe5caa742a69ede08bc5abd956136ada22e3e3e093d874c) - _Ray Arachelian<EMAIL_ADDRESS>    + 1997-07-24 (Thu, 24 Jul 1997 23:28:31 +0800) - [Re: DEATH TO THE TYRANTS](/archive/1997/07/54764c88d1888bd2ad5bcca31ec5d660fe1889947aca237e022f3159fa9a0512) - _Tim May<EMAIL_ADDRESS>  + 1997-07-24 (Thu, 24 Jul 1997 13:22:00 +0800) - [gotcha (was Re: DEATH TO THE TYRANTS)](/archive/1997/07/3bcd00d9df190eb8fad23dbdc9833ed7dc3c9f5c3b01d869e1117326a091a49d) - _SL Baur<EMAIL_ADDRESS>


text:
# OpenCV 4 Computer Vision with Python Recipes
This is the code repository for [OpenCV 4 Computer Vision with Python Recipes [Video]](https://www.packtpub.com/application-development/opencv-4-computer-vision-python-recipes-video), published by [Packt](https://www.packtpub.com/?utm_source=github). It contains all the supporting project files necessary to work through the video course from start to finish.
## About the Video Course
Have you ever wondered how self-driving cars work? Have you ever wanted to land a highly paid job in Computer Vision industry?
We have compiled this course so you seize your opportunity to get noticed by building awesome Computer Vision applications.This course kicks-off with Introduction to OpenCV 4 and familiarizes you with the advancements in this version. We’ll educate you on how to handle images, enhance and transform them. We’ll also develop some cool applications including Face and Eyes detection, Emotion recognition and Fast QR code detection & decoding that you can deploy anywhere. We’ll also share some tips & tricks to make you more productive. By the end of the course, you will have profound knowledge on what Computer Vision is and how we can leverage OpenCV 4 to build real-world applications without much effort.

The code bundle for this video course is available at - https://github.com/PacktPublishing/OpenCV-4-Computer-Vision-with-Python-Recipes

What You Will Learn

 How to build real-world Computer Vision applications.

 Deploy Face and Eyes Detection with HAAR Cascade Classifiers.

 Recognize Age, Gender and Emotions and Roadside Landmarks.

 Develop Fast QR Code Detection and Decoding application.

 Create DNN based Image Classifier.

 Train an Object Detection Model and Detect Persons, and Vehicles.

## Instructions and Navigation
### Assumed Knowledge
To fully benefit from the coverage included in this course, you will need:

This course is for developers who have a basic knowledge of Python. If you are aware of the basics of OpenCV and are ready to build computer vision systems that are smarter, faster, more complex, and more practical than the competition, then this course is for you.
### Technical Requirements
This course has the following software requirements:

Operating system: Any

Browser: Chrome

Spyder / Sublime

## Related Products
* [Black Hat Python for Pentesters and Hackers [Video]](https://www.packtpub.com/application-development/black-hat-python-pentesters-and-hackers-video)

* [Hands-On Reactive Programming with Python [Video]](https://www.packtpub.com/application-development/hands-reactive-programming-python-video)

* [Python Deep Learning for Beginners [Video]](https://www.packtpub.com/big-data-and-business-intelligence/python-deep-learning-beginners-video)


text:
# Job Manager

## Job Management Overview

For activities that are potentially time consuming such as the
invocation of user services (e.g. algorithms), the orchestration of user
services and loading of data results, Piazza leverages Apache Kafka for
asynchronous messaging support. Requests are sent to the Gateway as
**Jobs**. The Job Manager component obtains this information and creates
job messages for the Workflow, Service Controller and Ingest components
to obtain and work on. A unique *jobId* is used to track these jobs and
is provided back to the NPE as a response to the job request. NPEs use
the jobId to track the status of their job request. Leveraging Apache
Kafka, the Workflow, Service Controller and Ingest components send
updates about job status. Once the job is complete, data results are
loaded onto S3 or PostGreSQL for NPEs to access.

Endpoints that return a Job ID are documented and outlined in the
Swagger documentation.

    {
        "jobId": "my-job-id"
    }

The response may look something like the above. In this case, the
requesting user can then take the Job ID and re-query the Gateway with
the Job ID in order to get the latest status and progress of that Job.

When the Job has been completed, the result of the associated Job (being
a data ID, or service, or whatever the end result of the Job was) will
be contained in the status of that Job, including the time it was
completed and how long it took.

### Example Job Manager Endpoints

The table below depicts examples of the various endpoints used for job
management.

			Endpoint
			Description

			/job
			Get Job Status

			/abort
			Abort Job

			/repeat
			Repeat Job

## Building and Running Locally

Please refer to repository readme: README

## Source Organization

The main logic of the Job Manager is split between two package. The
`controller` package contains the REST controller that contains the REST
endpoints for querying job status, etc. This is a simple Spring
RestController that contains the endpoints defined as simple functions.
The `messaging` package declares the Apache Kafka logic, where the
JobManager defines Kafka consumers to poll for incoming messages. The
messages pertain to 1) Creating new Jobs and 2) Updating the status of
Jobs. The Jobs are persisted in the MongoDB and interaction code to
handle the MongoDB commits is located in the `database` package.

## Interface

The main communication with the Job Manager is via Kafka from messages.
The Gateway sends "Request-Job" messages to the Job Manager in order to
index the running of new jobs. The components that process Jobs will
also send Kafka messages to the Job Manager in order to update the
status of running jobs.

The Job Manager also contains a series of REST endpoints that are used
for obtaining Job Status, or lists of Jobs.

## Piazza Database & Jobs Collection

The MongoDB instance uses a database titled `Piazza` with a single
`Jobs` collection. The interfaces exposed through the Dispatcher
messaging will be simple CRUD-style functionality. The JSON stored in
the Jobs collection will be stored using the
Common Job.

    {
        "type": "job"
        "jobId": "a10a04af-5e7e-4aea-b7de-f3dbc12e4279"
        "ready": false
        "status": "Submitted",
        "result": {},
        "progress": {
            "percentComplete": null
            "timeRemaining": null
            "timeSpent": null
        }
    }

### Administrative API

The Job Manager provides a series of REST Endpoints that can be used to
query the Job Manager for certain information useful to NPEs and
utilities such as SAK.

Jobs returned through REST Endpoints will follow the JSON Model defined
in the Job Class.

## REST Endpoints

`GET /job/count`
Gets a count of the Jobs in the Piazza system.

`GET /job`
Gets all of the Jobs in the Piazza system.

-   page: The start page for the query. Optional, default 0.

-   pageSize: The number of results per page. Optional, default 10.

`GET /job/status/{status}/count`
Get Jobs Status Counts

-   status: The Status to get the count for.

`GET /job/status/{status}`
Get Job by Status

-   status: The Status to get the Jobs for.

-   page: The start page for the query. Optional, default 0.

-   pageSize: The number of results per page. Optional, default 10.

`GET /job/userName/{userName}`
Get Jobs by User ID

-   userName: The API Key of the user to query for Jobs submitted by.

-   page: The start page for the query. Optional, default 0.

-   pageSize: The number of results per page. Optional, default 10.

`GET /admin/stats`
Administrative Statistics - Return object containing information
regarding the running instance of this component. Currently returns the
number of Jobs held in the Job Table, listed by status.

    {
        "running": 2,
        "fail": 0,
        "total": 19,
        "submitted": 0,
        "success": 16,
        "pending": 0,
        "cancelled": 0,
        "error": 1
    }

### Job Workflow

The purpose of this page is to document the Workflow of the Piazza Core
Job process, and aims to show how Piazza Jobs are created and processed,
in order to give a better understanding of how the many internal Piazza
Core components communicate.

The concept of a Job is used internally by Piazza to manage long-running
processes that are not able to immediately be returned to a user. The
cases for when Jobs and Job IDs are generated are currently for:

-   Service Execution via the `/job` endpoint.

-   Data Loading via the `/data` and `/data/file` endpoints.

-   GeoServer deployments for Data using the `/deployment` endpoint.

### Job Sequence

The Sequence for Jobs is as follows:

-   User Executes one of the above-mentioned, long-running processes
    through the Gateway.

-   The Gateway validates the Request, and passes the Request-Job topic
    to the Job Manager via Kafka

-   The Job Manager consumes this Kafka message and writes the Job
    metadata to the MongoDB Jobs table. It also forwarded along the
    Kafka topic for that Job.

-   Some internal Worker component (such as Ingest or Access) will
    consume the message.

-   The Worker will periodically update the Job Manager with Status
    Updates as to the progress of the Job. The Job Manager will write
    these updates to the Jobs table.

-   Once done, The Worker will alert the Job Manager that the Job has
    completed.

-   Along the way, the User can query for Job Status by creating another
    `/job` request to the Gateway. This response will give the user the
    progress, and when done, the final Result of the Job.

### How Jobs an be Cancelled

Each Worker component (defined as a Component capable of processing
Jobs), such as
 Service Controller,
 Ingest, and
 Access, will join a
single Kafka consumer group together. By joining the same Kafka consumer
group, this ensures that as each component scales out towards N-number
of instances, only one instance of that component will receive an
incoming Job. In this way, Jobs are spread out among all instances
automatically by Kafka. This group name is often named based on the
component itself, for readability: For example, the `pz-ingest`
component Consumer group is called `ingest`.

However, there is the scenario where Jobs currently being processed by a
Worker Component will need to be cancelled. If there are N-number of
instances of a Worker component, then we’ll need to be able to ensure
that the Worker component handling a specific Job that is to be
cancelled is able to receive the Kafka message requesting the
cancellation. Because of this, the message cannot be consumed by the
general Kafka consumer group mentioned in the above paragraph: this is
due to the fact that in this case, if there are 5 instances of a
Component running, we cannot guarantee that the 1 Component instance
handling the job will be delivered that message by Kafka.

To solve this problem, each Component instance will define **two** Kafka
groups. One group will be the general component Kafka group. This is a
group that all instances of the Component will share, and this is the
group that will consume the messages that relate to Job processing. Each
Component will define a **second** Kafka group that is uniquely named.
Thus, for any specific Component, it may have two groups: One named
`ingest` used for general Job messaging and one uniquely named
`ingest-SOJ87asd68JDS` that will have the ability to react on each and
every message that comes in, and can be used to handle messages such as
Cancelling Jobs.

Worker components will receive Job messages through their general
consumer. Kafka will ensure that only one Component instance will
receive this message, so it is guaranteed that no two instances will
work the same Job. Worker components will receive Cancellation (or other
important messages) through their unique consumer. For cancellations,
every Consumer instance will receive this Kafka message and will have to
use inner component logic to determine if they are the instance who
currently owns that Job; and if so, they must take the action to cancel
the Job.

repository: donrv/pz-docs

repo_name: donrv/pz-docs


text:
# HDP 2.6.X Cluster Built on CentOS7
## Description
This vagrant file sets up a 3 node cluster running CentOS7 and HDP 2.6.X. As currently configured, the following nodes are created:
1. mst1.test.hadoop.com - Master node with 8 GB of RAM and 1 core
2. dat1.test.hadoop.com - Data node with 8 GB of RAM and 2 cores
3. dat2.test.hadoop.com - Data node with 8 GB of RAM and 2 cores

These values are flexible, and can be modified as required.

This file also runs a FreeIPA server on the master node, and connects all three nodes to use the users and groups on that server, through SSSD. The server is currently empty after creation, but can be modified through command line, or the UI which runs on 8443 as an HTTPS server.

## Usage Notes
Make sure to use the createCluster script in order to create the box. This runs the vagrant boxes, but also runs some scripts afterwards to ensure that passwordless SSH is set up, and then print out some useful information for later.

Once this file is run, both FreeIPA and Ambari will be running on the master node, but HDP will still not be installed.

The first step necessary is to get the IP address from the ifconfig output that ends the output. On my machine, this is always the 192.168.X.X IP address, but may differ on different systems. If in doubt, try different ones until you find the IP address accessible from your host. From now on, the IP address of the master node will be denoted by $IP.

The installation portion must be done manually, by going to http://$IP:8888. Note this is different than the default port for Ambari, since it conflicted with the default port for FreeIPA.

Most of the directions located [here](https://docs.hortonworks.com/HDPDocuments/Ambari-<IP_ADDRESS>/bk_ambari-installation/content/log_in_to_apache_ambari.html).

The private SSH key for the master root user is printed out at the end of the creation of the cluster. On some terminals, I've seen issues with SSH not working when registering hosts. In these instances, pasting the key to a text editor like Sublime before copying and pasting into the window helped fix whatever unprintable characters were causing issues.

We have set up a PostgreSQL database for use with Ambari, so for the following services, use the existing PostgreSQL option, point it to the master node, and use the indicated credentials.
* Hive - Password: hivepw
* Oozie - Password: ooziepw

gha_language: Ruby


text:
What a mess.

We need a tabulation of keyUsage/extendedKeyUsage vs. 'openssl XXX -purpose'.

keyUsage: digitalSignature
extendedKeyUsage: OCSP Signing

Certificate purposes:
SSL client : No
SSL client CA : No
SSL server : No
SSL server CA : No
Netscape SSL server : No
Netscape SSL server CA : No
S/MIME signing : No
S/MIME signing CA : No
S/MIME encryption : No
S/MIME encryption CA : No
CRL signing : No
CRL signing CA : No
Any Purpose : Yes
Any Purpose CA : Yes
OCSP helper : Yes
OCSP helper CA : No
Time Stamp signing : No
Time Stamp signing CA : No

So, for now, this squishy table will have to do:

            SSL    SSL    Netscape  S/MIME   CRL     Any     OCSP    TimeStmp
            client server Svr Clnt  Sgn Enc  Sign CA Sign CA Sign CA Sign CA
                CA     CA
digitalSignature
  OCSP Signing
            n   n  n   n  n   n     n n n n  n    n  n     Y Y    n  n    n

repository: egberts/tls-ca-manage

gha_language: Shell

repo_name: egberts/tls-ca-manage


text:
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [4.6.3](http://github.com/abdes/asap/compare/v4.6.2...v4.6.3) (2023-03-25)

### Enhancements

* Simplify `devcontainer` setup by using features and additional container
  lifecycle commands.

### Bug Fixes

* enable profiling for test coverage for MSVC ([7348d0a](http://github.com/abdes/asap/commit/7348d0a36b05b2f2e9c517e5b981f2c218bd511e)), closes [#22](http://github.com/abdes/asap/issues/22)

## [4.6.2](http://github.com/abdes/asap/compare/v4.6.1...v4.6.2) (2022-11-28)

### Features

* increase ccache hit rate ([a22a912](http://github.com/abdes/asap/commit/a22a91226060851fe9fc7e5bc0e51973df94d95c))
* more robust handling of contract checking mode ([304e9ae](http://github.com/abdes/asap/commit/304e9aee1e8fb265be78163578c45ae22569e52b))

  When linking against the contract checking and enforcement library
  `asap-contract` (https://github.com/asap-projects/asap-contract), it is
  possible to control the contract checking mode by passing a value for the
  `CONTRACTS` option when adding any type of target with `asap_add_xxx`
  API (e.g. asap_add_library. asap_add_test, etc):

  * CONTRACTS OFF     : set contract checking mode to OFF
  * CONTRACTS AUDIT   : set contract checking mode to AUDIT
  * CONTRACTS DEFAULT : set contract checking mode to DEFAULT

  * CONTRACTS AUTO    : set contract checking mode using as a first priority the
    value passed in the cmake option `OPTION_CONTRACT_MODE`. If none is present,
    automatically set the mode based on the build configuration. For Debug ->
    AUDIT, For Release and RelMinSize -> OFF, and for RelWithDebInfo -> DEFAULT.

  * CONTRACTS TESTING : indicates that contracts are being testing and the
    target needs to have full control on the contract checking mode. Nothing
    will be done here.

  The default setting is AUTO.

### Bug Fixes

* **build:** [#21](http://github.com/abdes/asap/issues/21) target option `WARNING` not propagated properly ([432cdaf](http://github.com/abdes/asap/commit/432cdaff1e5c8775d0d5c533dd0abe5eac229bd7))

  By default, for every target we build, a compiler option will be added
  to treat warnings as errors, unless the target is added with `WARNING` as
  an option.

  When that option is used, we now properly propagate it to set the
  corresponding compiler option to **NOT** treat warnings as errors.

  This is useful when 3rd party dependencies have include files that
  generate warnings.

## [4.6.1](http://github.com/abdes/asap/compare/v4.6.0...v4.6.1) (2022-09-20)

### Bug Fixes

* always add code coverage 'all' targets ([d7309a0](http://github.com/abdes/asap/commit/d7309a0806e11a46c73b700f12bccb424c62839b))
* version-info test was added even when ASAP_BUILD_TESTS is OFF ([b566e7b](http://github.com/abdes/asap/commit/b566e7b555ffb40f8ab1eea43d9a965c5724ccf1))

## [4.6.0](http://github.com/abdes/asap/compare/v4.5.2...v4.6.0) (2022-09-20)

### Features

* option to control the use of ccache, default is OFF ([49a17a9](http://github.com/abdes/asap/commit/49a17a99026ae7e59d14297d01ed2f8d10c78762))

  More robust implementation of fatser builds with `ccache`. Caching is enabled in
  GitHub CI builds and can be enabled in development environments by simply
  setting the cmake variable `USE_CCACHE` to 'ON'/'TRUE' or equivalent.

  A precondition for the environment is of course to have `ccache` installed,
  which gets done automatically in GitHub workflows, but needs to be done in
  development environments. It is recommended to use brew/choco for MacOS/Windows,
  but to install from the pre-built binaries for Linux as the version that comes
  with most distros is quite old.

  It is to be noted that `ccache` with MSVC on Windows may have some issues and if
  that is the case, simply do not use it.

### [4.5.2](http://github.com/abdes/asap/compare/v4.5.1...v4.5.2) (2022-09-20)

### Bug Fixes

* sub-projects with tests fail due to coverage all target not being setup early enough ([400b2cc](http://github.com/abdes/asap/commit/400b2ccc120bd4f2c4d70f48fd3f94ce7a3f6de0))

## [4.5.1](http://github.com/abdes/asap/compare/v4.5.0...v4.5.1) (2022-09-19)

### Bug Fixes

* contract mode definition should only be added when not testing asap_contract ([c6d5e34](http://github.com/abdes/asap/commit/c6d5e342e7a74236bb1b006be1e0d6bfe956a51a))
* use correct path for the version include file ([7997b68](http://github.com/abdes/asap/commit/7997b68eeef236e6940b0ba168c79dbdd21b34ad))

## [4.5.0](http://github.com/abdes/asap/compare/v4.4.8...v4.5.0) (2022-09-19)

### Features

1. **`version-info` tool**

    Add the `version-info` tool to print the project info ([cb228e8](http://github.com/abdes/asap/commit/cb228e8af73fbf063371e4c597f757bf5e9a4b75))

    This tool uses the generated `version.h` file in a small C++ program
    to print the project's info, as defined in the project's master
    `CMakeLists.txt`.

    It also constitutes an example of how to use the `version.h` file and
    a simple test to check that the `asap` infrastructure for defining and
    building targets is working.

2. **More visibility on project/module nesting**

    Enhance configure logs with project/module nesting hierarchy ([f6c13f2](http://github.com/abdes/asap/commit/f6c13f2a08c89cac57fb2f0dd857c8f382e50e7b))

    Track the projects/modules nesting level with a hierarchy stack updated
    when we enter/exit a project/module. Most of the management is done
    automatically as helper functions get called to add modules or external
    packages. Some of the boilerplate (minimal) is still manual:

    * In the top-level `CMakeLists.txt`, the project needs to pushed at the
    beginning and popped at the end.
    * In each module `CMakeLists.txt`, the module needs to be pushed at
    the start and popped at the end.

    Use the `ASAP_LOG_PROJECT_HIERARCHY` to get a string that contains
    the nesting hierarchy.

3. **Formatting**

    Implement robust project-wide formatting ([afcaebe](http://github.com/abdes/asap/commit/afcaebe544fc03684ae2f85d8507b1f4571d989b))

    Now we can format cmake files with cmake-format and any of the file
    types supported by clang-format (including C++, JavaScript and Json)
    with clang-format.

    The following additional targets are defined:
    * format Shows which files are affected by clang-format
    * check-format errors if files are affected by clang-format (for CI)
    * fix-format Applies clang-format to all affected files

    Dedicated targets for each of `cmake-format` and `clang-format`
    are also added (e.g. cmake-format, clang-format, check-clang-format,...)

### Bug Fixes

* generated `version.h` should follow project naming ([329bcdf](http://github.com/abdes/asap/commit/329bcdfc8cb9ba4782d0cbf4b3f21ad677307644))
* install master project generated header files ([3c5c162](http://github.com/abdes/asap/commit/3c5c1628b3c920e52200f7e14ecde2346b78a6f4))

### Documentation

* add example output from version-info tool ([3a5515e](http://github.com/abdes/asap/commit/3a5515e74b0b0e5c06ba7e4500f7572a3bc4450f))
* update after new formatting system ([082e513](http://github.com/abdes/asap/commit/082e5134fd7d1cd03cc06218e10d5cf978b22409))

## [4.4.8](http://github.com/abdes/asap/compare/v4.4.7...v4.4.8) (2022-09-18)

### Bug Fixes

* restore test setup deleted by mistake ([cec7b9d](http://github.com/abdes/asap/commit/cec7b9d92481d1480c54610892cbfd954b9e0068))

## [4.4.7](http://github.com/abdes/asap/compare/v4.4.6...v4.4.7) (2022-09-18)

* Refactor cmake common modules and the master cmake script to better work with
  sub-projects built with `asap`.
* Reduce the verbosity of some actions and avoid re-running things when not
  needed.

## [4.4.6](http://github.com/abdes/asap/compare/v4.4.5...v4.4.6) (2022-09-18)

### Bug Fixes

* top level install not working properly ([4ac4a31](http://github.com/abdes/asap/commit/4ac4a31001a2ab73764e3d9fe3f279b1e7b25aee))

  `CMAKE_MODULE_PATH` should be reset at the top level project to make sure that
  every sub-project uses its own version of the `cmake` files. Additionally,
  refactor the top-level install code to simplify it and remove the need to call
  a function in the top-level project `cmake` script.

## [4.4.5](http://github.com/abdes/asap/compare/v4.4.4...v4.4.5) (2022-09-18)

### Bug Fixes

* [#20](http://github.com/abdes/asap/issues/20) local install should use CMAKE_INSTALL_PREFIX to set variables ([2e1f1d4](http://github.com/abdes/asap/commit/2e1f1d49baff64dbf47dbbda234886ad2dfdbf1c))
* [#20](http://github.com/abdes/asap/issues/20) use CMAKE_INSTALL_PREFIX to set variables ([2fffd96](http://github.com/abdes/asap/commit/2fffd96392114993bbb72e3f614725f867d61ab1))
* wrong variable used of target name ([04b5343](http://github.com/abdes/asap/commit/04b5343ae541bd6d4f5ae1c1fa2eb85b93e0b5a3))

## [4.4.4](http://github.com/abdes/asap/compare/v4.4.3...v4.4.4) (2022-09-18)

### Bug Fixes

* wrong variable used for target name ([04b5343](http://github.com/abdes/asap/commit/04b5343ae541bd6d4f5ae1c1fa2eb85b93e0b5a3))

## [4.4.3](http://github.com/abdes/asap/compare/v4.4.2...v4.4.3) (2022-09-18)

### Bug Fixes

* [#19](http://github.com/abdes/asap/issues/19) use generator expressions instead of CMAKE_BUILD_TYPE ([857d299](http://github.com/abdes/asap/commit/857d2997d4ec6c879036e10234b8baf907e91089))

  Code that checks CMAKE_BUILD_TYPE to set specific compiler flags or defines is
  problematic. Generator expressions should be used instead to handle
  configuration-specific logic correctly, regardless of the generator used.

* use cmake-format extension default behavior ([a5d5c5e](http://github.com/abdes/asap/commit/a5d5c5eae39e4d3d0094c00848cfe777d331a219))

  No need to force the `cmake-format` config file location as the command is run
  in the workspace root by default and it will look for and find the config file
  named `cmake-format.yaml`.

## [4.4.2](http://github.com/abdes/asap/compare/v4.4.1...v4.4.2) (2022-09-16)

### Bug Fixes

* [#13](http://github.com/abdes/asap/issues/13) move "caexcludepath" to dev-windows and exclude CPM cache ([0571714](http://github.com/abdes/asap/commit/0571714e9436bfec26d6450b5bc37f2a5f478a55))
* [#14](http://github.com/abdes/asap/issues/14) upgrade CPM to 0.35.6
  ([695414b](http://github.com/abdes/asap/commit/695414b8e66d4d42d7ef3aaef3c6a4b8399d16c2))
* [#15](http://github.com/abdes/asap/issues/15) get target type before testing it ([b8bd378](https://github.com/abdes/asap/commit/b8bd378f52bc131b84c13b08cfe70d649e9d9be0))
* [#16](http://github.com/abdes/asap/issues/16) use CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR for cmake includes ([4ac6928](http://github.com/abdes/asap/commit/4ac6928fc2a0bf806bbcaa3bea898b5ff018a164))
* [#17](http://github.com/abdes/asap/issues/17) git should not be required ([2c76104](http://github.com/abdes/asap/commit/2c761046d0801f643aa0215d34f2795ff0093dfc))
* [#18](http://github.com/abdes/asap/issues/18) enforce end of line to LF ([943ae47](http://github.com/abdes/asap/commit/943ae479e09de999c324a9cfe3bbf8d688d255a3))

## [4.4.1](http://github.com/abdes/asap/compare/v4.4.0...v4.4.1) (2022-08-20)

### Bug Fixes

* [#12](http://github.com/abdes/asap/issues/12) disable used-but-marked-unused
  ([6d42d83](http://github.com/abdes/asap/commit/6d42d83bfdd16123f05a69726058dc5f103143be))

  For clang-tidy, this check generates many errors with google test framework
  and as such is not worth the trouble.

## [4.4.0](http://github.com/abdes/asap/compare/v4.3.6...v4.4.0) (2022-08-20)

### Bug Fixes

* [#10](http://github.com/abdes/asap/issues/10) no more template export header
  ([dd8ffd5](http://github.com/abdes/asap/commit/dd8ffd5a8f36340963349c7ebcb7c1713c2f880a)).

  Simply include the `asap_<module>_export.h` which defines the
  `ASAP_<MODULE>_API` macros for symbol visibility. As a general rule, do not
  add explicit visibility for inline methods/functions and for template
  classes/functions as they are included in each compilation unit.

* [#11](http://github.com/abdes/asap/issues/11) refactor compiler options
  management.
  ([78ae493](http://github.com/abdes/asap/commit/78ae4933f2e263a55f6537e66347c6b11a24b961))

  In general, asap target helpers, such as asap_add_library, will seamlessly
  manage compiler options behind the scenes, relaying first to `cmake/common`
  modules and then overriding/adding/removing options based on asap preferences.
  Such options can further be customized by the calling module using the
  `asap_set_compile_options()` function and passing `ADD`, `REMOVE` and relevant
  options as appropriate.

* [#9](http://github.com/abdes/asap/issues/9) remove no longer used function
  ([5a7416f](http://github.com/abdes/asap/commit/5a7416f9563aae303d68ca2bb878fef97fbb7130))

## [4.3.6](http://github.com/abdes/asap/compare/v4.3.5...v4.3.6) (2022-08-11)

Minor update to directly use the `cmake/common` submodule from
<https://github.com/swift-nav/cmake> now that all asap fixes have been merged over
there.

## [4.3.5](http://github.com/abdes/asap/compare/v4.3.4...v4.3.5) (2022-08-11)

### Bug Fixes

* **#6:** properly setup install layout
  ([71fd5d5](http://github.com/abdes/asap/commit/71fd5d5ee6f4694a8d7d6994e3a09d5b2f18ce24)),
  closes [#6](http://github.com/abdes/asap/issues/6)

  When the install prefix matches a system install directory (i.e. /usr or
  /usr/local), the project will be installed according to the conventions of
  [GnuInstallDirs](https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html),
  otherwise, it will be installed using a simplified local layout as following:

```cmake
    # Install into local directory
    set(ASAP_INSTALL_ROOT      ".")                                           # ./
    set(ASAP_INSTALL_LIB       "lib")                                         # ./lib
    set(ASAP_INSTALL_SHARED    "${ASAP_INSTALL_LIB}")                         # ./lib
    set(ASAP_INSTALL_CMAKE     "${ASAP_INSTALL_ROOT}/share/cmake/${META_PROJECT_NAME}") # ./share/cmake/<project>
    set(ASAP_INSTALL_PKGCONFIG "${ASAP_INSTALL_ROOT}/share/pkgconfig")        # ./share/pkgconfig
    set(ASAP_INSTALL_EXAMPLES  "${ASAP_INSTALL_ROOT}")                        # ./
    set(ASAP_INSTALL_DATA      "${ASAP_INSTALL_ROOT}")                        # ./data
    set(ASAP_INSTALL_BIN       "bin")                                         # ./bin
    set(ASAP_INSTALL_INCLUDE   "include")                                     # ./include
    set(ASAP_INSTALL_DOC       "doc")                                         # ./doc
    set(ASAP_INSTALL_SHORTCUTS "misc")                                        # ./misc
    set(ASAP_INSTALL_ICONS     "misc")                                        # ./misc
    set(ASAP_INSTALL_INIT      "misc")                                        # ./misc
```

* **#7:** add `build` and `ops` commit types
  ([0d9187e](http://github.com/abdes/asap/commit/0d9187e9d20788d3f0c5048bcb4deca4cf5280e3)),
  closes [#7](http://github.com/abdes/asap/issues/7)

  Added the following two commit types:
  * `build` Commits, that affect build components like build tool, ci pipeline,
    dependencies, project version, ...
  * `ops` Commits, that affect operational components like infrastructure,
    deployment, backup, recovery, ...

* **#8:** add standard ccov excluded directories by default
  ([a8aabb3](http://github.com/abdes/asap/commit/a8aabb31d3ea6b0c5a50e13bf366f092ca724537)),
  closes [#8](http://github.com/abdes/asap/issues/8)

  The standard exclusions are:
  * anything matching `*/test/*` in its path, i.e. files used to write tests,
  * anything located inside `*/.cache/CPM/*`, i.e. third party modules included
    using CPM,
  * anything under `/usr`, i.e. system files

## [4.3.4](http://github.com/abdes/asap/compare/v4.3.3...v4.3.4) (2022-08-04)

### Bug Fixes

* alias variable to enable/disable building tests
  ([3992b0f](http://github.com/abdes/asap/commit/3992b0f7d500e653532bd0f206489058d99ad2d0))
* typo in variable name to enable/disable building tests
  ([9950fe2](http://github.com/abdes/asap/commit/9950fe2dcbe6c284e9ce32ce6a455e4a3a499ec4))

## [4.3.3](http://github.com/abdes/asap/compare/v4.3.2...v4.3.3) (2022-08-04)

### Bug Fixes

* add aliases used by cmake common functions
  ([9c33906](http://github.com/abdes/asap/commit/9c339069acd9ab6355f8156f2e8eaf81c382342c))

## [4.3.2](http://github.com/abdes/asap/compare/v4.3.1...v4.3.2) (2022-08-04)

### Bug Fixes

* [#5](http://github.com/abdes/asap/issues/5) update cmake/common to latest
  ([5034b22](http://github.com/abdes/asap/commit/5034b22d39e5cb54acd51baa0bf815dbdd82093b))

## [4.3.1](http://github.com/abdes/asap/compare/v4.3.0...v4.3.1) (2022-05-01)

### Features

* add ccache support to dev container
  ([202c27a](http://github.com/abdes/asap/commit/202c27a628f7f35ae17f2df91c1d95f67360abea))

## [4.3.0](http://github.com/abdes/asap/compare/v4.2.0...v4.3.0) (2022-04-07)

### Documentation

* add badge for OpenSSF best practices
  ([26c01c8](http://github.com/abdes/asap/commit/26c01c8bcf98c6b47e6622dea91a6c6e10bc978c))
* add CPM as preferred way of managing third party deps
  ([5a33f70](http://github.com/abdes/asap/commit/5a33f70a15a64c84f0a13b4286460f9df20459a5))
* add tutorial videos
  ([cb13248](http://github.com/abdes/asap/commit/cb13248244cddd0dc2c187893556fad7aa4f08b7))
* fix thumbnail and links of project docs video
  ([1a6269e](http://github.com/abdes/asap/commit/1a6269eef8999504aba8105d4c446a93e41c988b))
* how to report security vulnerabilities
  ([46426e9](http://github.com/abdes/asap/commit/46426e9d44f3c4e8ee0b3fdd98e2ee56d13f8890))
* improve the key features section
  ([79119ba](http://github.com/abdes/asap/commit/79119ba52f578a28dfdeb1ce59bba67c3fbcd3c1))
* include build status badges for all branches
  ([2b98ae1](http://github.com/abdes/asap/commit/2b98ae11ace8fa756c825686018a3a328ce27eca))
* revamp the project README
  ([e72c4c3](http://github.com/abdes/asap/commit/e72c4c3288d565b34b137ab785abe90370052258))
* rewrite the contributing section
  ([c7e39c4](http://github.com/abdes/asap/commit/c7e39c4cfa6033aac42befe5ed994089e601b6a0))
* update instructions for repo from template scenario
  ([1cafdb5](http://github.com/abdes/asap/commit/1cafdb57f86a4b61a736b3411791ae96ca684f33))
* update project docs video
  ([c7f79fc](http://github.com/abdes/asap/commit/c7f79fc64900cfa9ec3d2466300d1d32830b32f1))

## [4.2.0](http://github.com/abdes/asap/compare/v4.1.8...v4.2.0) (2022-04-03)

### Features

* make ccache usable on all platforms
  ([412730f](http://github.com/abdes/asap/commit/412730f86679d7ccd350cadf5649b7a489376cae))

### Bug Fixes

* use only white-listed properties for interface library
  ([227de02](http://github.com/abdes/asap/commit/227de026878beb9dd9679d0cad12cf25bce16c4a))

## [4.1.8](http://github.com/abdes/asap/compare/v4.1.7...v4.1.8) (2022-03-15)

* chore: use [CPM](https://github.com/cpm-cmake/CPM.cmake#adding-cpm) for
  dependency management
* chore: use ccache to speedup build

## [4.1.7](http://github.com/abdes/asap/compare/v4.1.6...v4.1.7) (2022-03-06)

docs: add last-updated-on timestamp

## [4.1.6](http://github.com/abdes/asap/compare/v4.1.5...v4.1.6) (2022-03-06)

### Bug Fixes

* define asap_top_level_install as empty when project install should be skipped
  ([616deed](http://github.com/abdes/asap/commit/616deed7f2655cf6690135ed1914f7eec8053373))
* use correct links for documentation
  ([486144c](http://github.com/abdes/asap/commit/486144c46222c22861b0a14f9dc002d148a31f24)),
  closes [#4](http://github.com/abdes/asap/issues/4)

## [4.1.5](http://github.com/abdes/asap/compare/v4.1.4...v4.1.5) (2022-03-06)

chore: force shell to bash on all platforms

## [4.1.4](http://github.com/abdes/asap/compare/v4.1.3...v4.1.4) (2022-03-06)

chore: adjust command for windows powershell

## [4.1.3](http://github.com/abdes/asap/compare/v4.1.2...v4.1.3) (2022-03-06)

Update artifact names in build matrix for automatic release.

## [4.1.2](http://github.com/abdes/asap/compare/v4.1.1...v4.1.2) (2022-03-06)

This is a refactoring release to trim down the template project to the minimum
and streamline the generated targets.

### Bug Fixes

* always use top level build dir for output
  ([1b01db2](http://github.com/abdes/asap/commit/1b01db2402bc52944646bcde3cf525315a4e0e1b))
* doxygen and sphinx target conflict with modules
  ([02375ff](http://github.com/abdes/asap/commit/02375ff4a33e34a8e0cb9307ef4eb6de3271e945))
* generate doc only if project is master
  ([82190fa](http://github.com/abdes/asap/commit/82190fa6562f5e51dbbab660bcab8dc265e99a0b))
* make doxygen targets sub-project friendly
  ([546fe73](http://github.com/abdes/asap/commit/546fe73ded53721dddbac311e9db41e4146b8ad2))
* make gtest work again
  ([3ce658c](http://github.com/abdes/asap/commit/3ce658c5f1eb216a3286717e7f80827b96ff3b49))
* make sphinx targets sub-project friendly
  ([024cc77](http://github.com/abdes/asap/commit/024cc77d17ed134ed5f3f4eea32226b07b05aad6))
* only add clang-format/tidy targets if master project
  ([060f082](http://github.com/abdes/asap/commit/060f082714e039eb4c2c2e198b5caed74690e8af))
* only install files if requested to install
  ([9caaf9b](http://github.com/abdes/asap/commit/9caaf9b47e138be3f9845d6d58ebc21ff8dfa83b))
* reorganize third_party modules for use of FetchContent
  ([cc65bc2](http://github.com/abdes/asap/commit/cc65bc2219dbe38197107bae71252444994e118c))
* use correct tagets for doc builds
  ([559558e](http://github.com/abdes/asap/commit/559558e8eac3043eef19986cc2ae6d6dfd937be8))
* use correct url for logo image
  ([96d1e01](http://github.com/abdes/asap/commit/96d1e01d971bd2f33faaebfc060082023f3a5209))
* use correct url for master index page
  ([a56c327](http://github.com/abdes/asap/commit/a56c327ff3d7ab14d7a499fc4997279efd2647fe))
* use lower case META_PROJECT_ID
  ([311e433](http://github.com/abdes/asap/commit/311e433e8698ff6385c2cda256bff83982596ed0))
* wrong variable used for target name
  ([829f351](http://github.com/abdes/asap/commit/829f351d22b384ddc060ae2df47ff9e801089dd2))

## [4.1.1](http://github.com/abdes/asap/compare/v4.1.0...v4.1.1) (2022-02-18)

* docs: use submodule documentation deployment urls for inter-sphinx
  configuration. using the local build directory will result in the deployed
  documentation to still be dependent on the build paths.

## [4.1.0](http://github.com/abdes/asap/compare/v4.0.2...v4.1.0) (2022-02-18)

* improvements and bug fixes in the documentation
* update GSL to 4.0.0

## [4.0.2](http://github.com/abdes/asap/compare/v4.0.1...v4.0.2) (2022-02-17)

This is a patch update to fix minor issues in the documentation files and to
refactor the docs for easier maintenance and use in forked projects.

### Bug Fixes

* contract api docs now in contract module
  ([d3366bd](http://github.com/abdes/asap/commit/d3366bd846d66486b2fcf98f36fd741452be8516))
* keep `src` even when empty for doxygen not to complain
  ([be28f42](http://github.com/abdes/asap/commit/be28f429eddde8f258a08e84722e4fcaf975b384))

## [4.0.1](http://github.com/abdes/asap/compare/v4.0.1...v4.0.0) (2022-02-17)

* update the GitHub action for windows build to 2022

## [4.0.0](http://github.com/abdes/asap/compare/v3.1.2...v4.0.0) (2022-02-17)

### Features

* overload pattern for variant visitation on the fly
  ([53ea7cc](http://github.com/abdes/asap/commit/53ea7cc74e89913cbf59eda2e30bd36c356e6acd))
* refactor: trim the project to the bare
  minimum([8d48a56](https://github.com/abdes/asap/commit/8d48a56ef0db2359aa80b5e5b2854802dc6a45f0))

  The intention from the asap base project is to be a template starter repo that
  can be cloned and used for new projects. The bare minimum is the cmake build
  infrastructure, documentation, the common submodule and the contract checking
  assertions submodule.

  Contract checking library is now in a separate submodule to keep the common
  module as minimal as possible. Projects that do not intend to use contract
  checking will not have to depend on it.

### Bug Fixes

* use separate sphinx cache dir for each module
  ([03f36fc](http://github.com/abdes/asap/commit/03f36fc96c78c51b441feb9a7b9c70d19a2125c7))

## [3.1.2](http://github.com/abdes/asap/compare/v3.1.1...v3.1.2) (2021-12-19)

### Features

* doxygen snippets from `test` or `examples` source directories
  ([85b8000](http://github.com/abdes/asap/commit/85b8000e91dd105c0f90a62b1824957b68ce9c03))

### Bug Fixes

* **doc:** wrong chapter title in logging module page
  ([5966912](http://github.com/abdes/asap/commit/59669122d3ea8565878667e6f09b124bc7da1b99))
* doxygen doc generation uses wrong module info
  ([8833474](http://github.com/abdes/asap/commit/8833474402c523a3f2eda10b8927da46989f4bba))
* need to hardcode `asap` when linking `common`
  ([e038a70](http://github.com/abdes/asap/commit/e038a702ce8727fa1a6c8b3a45cb4bb211281db5))

## [3.1.1](http://github.com/abdes/asap/compare/v3.1.0...v3.1.1) (2021-12-19)

### Documentation

* minor tweaks to the sphinx config

## [3.1.0](http://github.com/abdes/asap/compare/v3.0.0...v3.1.0) (2021-12-18)

### ⚠ BREAKING CHANGES

* The logging `Registry` is now implemented as a singleton class and therefore
  it needs to be accessed via its instance() method. All other methods in its
  interface are not static anymore.
* Prefix the build options with `ASAP_` to make them unique and avoid clashing
  with other projects that may use the generic `OPTION_xxx` names. Additionally,
  the build presets now always activate building of tests and examples except in
  release builds where examples are not built.
* The cmake option `OPTION_SELF_CONTAINED` is no longer relevant as we believe
  that 3rd party dependencies should be installed using their own projects. In
  the worst case scenario, they should be explicitly added as install
  instructions to the project in a visible and documented way.

### Features

* add support for .editorconfig
  ([5a7a689](http://github.com/abdes/asap/commit/5a7a6892f7c05798e79c6f81e9eef3b0a6256ca1))
* provide a way to distinguish between debug and release builds via preprocessor
  define
  ([bbd84a2](http://github.com/abdes/asap/commit/bbd84a2c32c9833f79b442e202b647f93946b105))

### Bug Fixes

* adjust doc target names to work in renamed projects
  ([60acc65](http://github.com/abdes/asap/commit/60acc65fcc8d529a69f3617d792376be3e54b6ce))
* cmake option was placed in the wrong command
  ([b634b15](http://github.com/abdes/asap/commit/b634b153db975a8bc8715e82f7fafdc214504cfa))
* clean the logging API implementation
  ([25535c7](http://github.com/abdes/asap/commit/25535c76c0586d53f7c6c55db250a251f0c5390b))

## [3.0.0](http://github.com/abdes/asap/compare/v2.0.1...v3.0.0) (2021-12-08)

### ⚠ BREAKING CHANGES

* The project requires C++17 as it is widely available in compilers now. Logical
  traits such as conjunction, disjunction and negation are available from the
  <type_traits> standard include.
* major redesign of the cmake build system, many macros and functions have been
  changed and the build system overall has been simplified.
* `catch2` has been replaced by Google Test/Mock, which provides more features,
  less compiler warnings and is more popular. Catch2 or any other framework can
  still be easily added to an `asap` based project.
* `hedely` was removed from `common` and was replaced by a much lighter new file
  `compilers.h`.
* `nowide` was removed from `common` and will be replaced by the standalone
  boost nowide library when needed.
* `filesystem` footprint is too large to be included by default in `asap`
  starter project. It will be provided separately and a mechanism to easily add
  it into an `asap` based project will be implemented in a future update.

### Features

* add gsl library
  ([9b982f1](http://github.com/abdes/asap/commit/9b982f17aeb9362619cf871ed9bbedb65344ab43))
* add support for CMake presets
  ([bdcfa4d](http://github.com/abdes/asap/commit/bdcfa4d6a0cfffe0026af39b635c6dcd4e61e3a8))
* add contract checking api (assertions)
  ([c691446](http://github.com/abdes/asap/commit/c691446fd18242840e62529f1aabdaf8480b7ec6))
* convert git submodule to local module
  ([4e32e8a](http://github.com/abdes/asap/commit/4e32e8a6d1152413af12c7013ee759eca5e2d51d))
* redesign cmake build system
  ([31ce14a](http://github.com/abdes/asap/commit/31ce14a301ac2e725b7760581e696f089225b161))
* remove filesystem submodule
  ([e2089ae](http://github.com/abdes/asap/commit/e2089ae7707c1448c78db23db2f53cbfab461599))
* remove logical traits backport
  ([5ed0fe6](http://github.com/abdes/asap/commit/5ed0fe6e9e03399e640221a285f87a1a8a015cd1))

* significantly enhance the documentation, both doxygen based for APIs and
  sphinx based for the project docs

### Bug Fixes

* configure compilation database for clangd when using cmake presets
  ([7493c24](http://github.com/abdes/asap/commit/7493c240ce97396040d9a7bd09cb32ed56ea2340))
* hardcode `asap` in places where we should not use the custom project name
  ([7f81298](http://github.com/abdes/asap/commit/7f81298b31e5a235bf4bce4778525a2e4594befa))
* match Clang and Apple Clang for compiler options
  ([7e1e123](http://github.com/abdes/asap/commit/7e1e12317b62099bb58ce5dd4adfdbf1a759ad03))
* convert unit testing to gtest/gmock
  ([b99c8d0](http://github.com/abdes/asap/commit/b99c8d0a315bb8200ca9cec93c9d5f64880c9271))

## [2.0.1](http://github.com/abdes/asap/compare/v2.0.0...v2.0.1) (2021-11-06)

### Bug Fixes

* "-Wreserved-identifier" only if not APPLE
  ([05fac12](http://github.com/abdes/asap/commit/05fac12d37978c6651c299e6ad1cc64dfed88fa0))
* cmake require c++ 14 in all modules
  ([f05c9a6](http://github.com/abdes/asap/commit/f05c9a63e97dbcbef3e7d8188a04e719e2247d62))
* use lower-case name for sphinx
  ([f3005b5](http://github.com/abdes/asap/commit/f3005b5bd4055b16a57cdcb3af70a2f32b1c5809))

## [2.0.0](http://github.com/abdes/asap/compare/v1.0.0...v2.0.0) (2021-11-06)

### Features

* Cleanup the code to remove most compiler and linter warnings.
* Refactor cmake build files to have robust support for sanitizers and linters.
* Rationalize the compiler options to strictly stick to those options that won't
  conflict with application decisions.
* Enhanced the documentation

### To be continued

* Refactoring of cmake build files.
* Remove additional warnings from code.
* Documentation.

### ⚠ BREAKING CHANGES

* logging is in a new module: asap::logging.

Many modules would want to only get the basic common functionality without
pulling extra 3rd party dependencies such as spdlog, fmt etc... For this reason,
the logging functionality is taken out of the common submodule and moved to
logging submodule.

* move logging functionality to separate module
  ([46f4dd9](http://github.com/abdes/asap/commit/46f4dd96edb1148e0772a1539b989fd80f3821e4))

## 1.0.0 (2021-11-03)

### Features

* add support for Conventional Commits and auto Changelog
  ([7b827fa](http://github.com/abdes/asap/commit/7b827fab2ae28ba903c69ab5acdf249cb3e55d85))
* replace cmake compiler detection with hedley
  ([8bf0a3d](http://github.com/abdes/asap/commit/8bf0a3d53fcdba65497491cbd63c1dcffcba8467))

repository: abdes/asap

repo_name: abdes/asap


text:
# Newport Ideas Document
This document lays out general API concepts and design for future consideration for implementation.

### Table Of Contents
[Engine Structure](#engine-structure)

[Editor GUI](#editor-gui)

[WASM Mods](#wasm-mods)

## Engine Structure
Using the engine should be simple and safe to setup. Global state should be kept to an absolute minimum retained in engine state through `engine::Module`s

### Needs
1. Easy ability to add engine features through crates and `engine::Module` trait
2. Global engine state which holds systems
3. Easy module initialization ordering
4. `ModuleBuilder` on engine startup

## Editor GUI
I want a custom IMGUI for any editor UI. I want there to be a custom explicit auto layout engine.

### Needs
1. Auto Layout Engine
2. Easy to add new controls
3. Controls including Button, Text Input, Scrollbox, Window, Slider, Color Picker
4. Single draw call renderer
5. Crates can easily add editor modules through custom windows that can snap in center editor window

## WASM Mods
Modding is a very important part to a games longevity. Being able to easily mod a game can make a game last much longer. I think WASM is perfect for this.

### Needs
1. Custom Mods structure with game API exposed to several languages
2. Hot reloading
3. Catch crashes and show error to user

repository: PyroFlareX/newport

repo_name: PyroFlareX/newport


text:
## File-based Bloom Filter for Java

A [Bloom filter](https://en.wikipedia.org/wiki/Bloom_filter) is a probabilistic data structure designed to tell, rapidly and efficiently,
whether an element is a member of a set. False positives are possible, but false negatives are not, which means query returns either
_"possibly in set"_ or _"definitely not in set"_.

Most Bloom filter implementations for Java are based on data sets kept in memory which is a huge limitation
when it comes to handle large data sets, in terms of performance and system stability.

Our goal was to be able to efficiently handle Bloom filters with massive data sets,
counted in billions of entries or multiple GBs of storage.

We tackled the problem of large data sets by creating a Bloom filter implementation that keeps the data in a file rather than in memory.

The algorithms are copied from _Google Guava_ but the used bit array is backed by a file instead of Java arrays.
The data file is memory mapped (_mmapped_) to the process space, not loaded, so there is no need to explicitly read of write
from/to the disk. Also the Java heap space is not involved in storing the data.

Our Bloom filter implementation is backed by two files:

- `filter_name.bloom` is metadata file containing filter parameters (e.g. false positive probability, number of insertions),

- `filter_name.bloom-data` is data set file sized to fit the provided number of expected insertions.

It can efficiently handle sets that require multi-GB data storage, e.g. with billions of entries, and low false positive rates.
You can see concrete numbers in [the benchmark section](#performance-benchmark).

The implementation is wrapped with a reusable Java library called simply `bloom-filter`.

#### Installation and usage

The `bloom-filter` library is distributed through [Maven Central]({{ site.project.mvn_repo_url }}).

```kotlin
dependencies {
    implementation("io.nixer:bloom-filter:{{ site.data.nixer_version.latest_release }}")
}
```

The filter to be used is available as implementation of `io.nixer.bloom.BloomFilter`.

In order to obtain an instance use one of the factory methods defined at `io.nixer.bloom.FileBasedBloomFilter`:

- `create(..)` for building an empty filter from scratch,

- `open(..)` for access already existing filter from the backing files, which might contain multi-GB data sets.

For most cases you are probably going to go with the second option and open already existing filter.

However the filter has to be created somehow anyway.
In order to make this process more convenient we prepared [a handy CLI tool](#bloom-cli-tool).

## Bloom CLI Tool

In addition to the Bloom filter library we provide a simple command line utility to manipulate the Bloom filter backing files,
called `bloom-tool`.

#### Installation

`bloom-tool` is built using Gradle [application plugin](https://docs.gradle.org/current/userguide/application_plugin.html)
so the package includes start scripts specific to various operating systems.

#### Download package from GitHub

The tool package is available on GitHub as an addition to
[each release of Nixer Spring Plugin](https://github.com/nixer-io/nixer-spring-plugin/releases/latest).

#### Build from sources

Alternatively, it can be build from sources - to do so clone or download
[Nixer Spring Plugin](https://github.com/nixer-io/nixer-spring-plugin) and build the project using Gradle:

```
./gradlew
```

The tool's package is going to appear under `bloom-tool/build/distributions` directory.

#### Usage

Unzip the `bloom-tool` package and invoke the following in order to see all commands and options:

```
bin/bloom-tool --help
```

#### Basic use case

Suppose we have a text file containing list of leaked credentials (e.g. one from [here](https://haveibeenpwned.com))
which we want to put into a Bloom filter. Each line in the file consist of a password hash (as hex strings) and additional info,
like prevalence, separated by colon `:`, e.g.
```
0000000A1D4B746FAA3FD526FF6D5BC8052FDB38:16
0000000CAEF405439D57847A8657218C618160B2:15
0000000FC1C08E6454BED24F463EA2129E254D43:40
```

Let's call this file `entries.txt` and assume it contains `500 million` entries, which means around `20 GB` of data.

In order to create a filter populated with all the hashes from this file use the following command:
```
bloom-tool build --name my.bloom --size 500000000 --separator : --field 0 --input-file entries.txt
```
Where `--field` says the hash should be taken the first value after splitting each line by the `:` separator.
Remember fields are counted starting from `0`.

Note execution for this amount of data might take a while. For MacBook Pro Core i7 with 16GB RAM it was around 24 minutes.

#### Create a Bloom filter

Create a new filter `my.bloom` for 1M insertions and 1 to 1M false positive rate.
```
bloom-tool create --size=1000000 --fpp=1e-6 --name=my.bloom
```
Results in creating `my.bloom` metadata file and empty `my.bloom-data` data file.

#### Insert values into a Bloom filter

Insert lines from `entries.txt` into `my.bloom` filter, populating `my.bloom-data` file.
```
bloom-tool insert --name=my.bloom --input-file=entries.txt
```
or from input stream
```
cat entries.txt | bloom-tool insert --name=my.bloom --stdin
```
alternatively
```
bloom-tool insert --name=my.bloom --stdin < entries.txt
```

Insert hexadecimal from `hashes.txt` to `my.bloom`. Useful if the filter is intended to be use from Java code generating some hashes.
```
bloom-tool insert --hex --name=my.bloom --input-file=hashes.txt
```

#### Check an element is present in a filter's dataset

Check if string `example` might be inserted in `my.bloom` filter, printing it to standard output if it might be true or skipping otherwise.
```
echo example | bloom-tool check --name=my.bloom --stdin
```

#### Performance benchmark

Execute performance benchmark and correctness verification of the Bloom filter implementation.
This might take a minute, or more for greater sizes.
```
bloom-tool benchmark --size 10000000 --fpp=1e-7
```

Sample result:

Performance numbers (date: 2018-08-24, on a MacBook 16GB RAM, the file generated had size 4GB ):
```
$ caffeinate bloom-tool benchmark --size=1000000000 --fpp=1e-7
Creating: /var/folders/f3/pqxz3z7s6g37nhv65114479r0000gn/T/bloom-benchmark-tmp3708262923291670873/test.bloom
Creation time       : PT1.063892385S
Parameters          : BloomFilterParameters{expectedInsertions=1000000000, falsePositivesProbability=1.0E-7, numHashFunctions=23, bitSize=33547704320, strategy=MURMUR128_MITZ_64, byteOrder=LITTLE_ENDIAN}
Inserting           :<PHONE_NUMBER> values
Insertion time      : PT41M42.06361178S
Insertion speed     : 399658.84 op/sec
Checking            :<PHONE_NUMBER> values (half exist, half should not exist)
Check time          : PT45M27.88090649S
Check speed         : 733163.21 op/sec
False Positives     : 123
False Positive rate : 0.00000012300000
FP rate evaluation  : good (122.92% target)
```

gha_language: CSS


text:
## [v0.41.0] - 2023-03-28

### BREAKING CHANGE

#### Following changes in OpenAPI spec:

1. Platform Service
   - field `price` inside `RegionDataItem` definitions is removed from the `required` schema. So, SDK can use value directly without pointer.
2. Session Service
   - error response schema is removed from `204` response field. So, only one return response is needed for the wrapper.
   - field `persistent` inside `ApimodelsCreateConfigurationTemplateRequest` changed as required, need to update value with pointer.
3. Basic Service
   - renamed `basic-sdk/pkg/basicclientmodels/{UserProfilePrivateUpdate -> UserProfileUpdate}`

repository: AccelByte/accelbyte-go-sdk

gha_language: Go

repo_name: AccelByte/accelbyte-go-sdk


text:
# Elm Simple Animation

### Stateless animation utils for Elm

See some examples here: https://elm-simple-animation-examples.surge.sh/

## What?

Animate HTML, SVG (or any UI Elements) with declarative animations

```elm
import Html exposing (Html)
import Simple.Animated as Animated
import Simple.Animation as Animation exposing (Animation)
import Simple.Animation.Property as P

animatedDot : Html msg
animatedDot =
    Animated.div expandFade [ class "dot" ] []

expandFade : Animation
expandFade =
    Animation.fromTo
        { duration = 2000
        , options = [ Animation.loop ]
        }
        [ P.opacity 1, P.scale 1 ]
        [ P.opacity 0, P.scale 2 ]
```

![dot](https://aws1.discourse-cdn.com/standard17/uploads/elm_lang/original/2X/e/e0cc696d2b443390d5b1ba0e736dbbb1087d3f0b.gif)

## Why?

When you want some typesafe, simple, decorative animations, but you don't need the full power of something like `elm-animator`. The benefits of this are:

+ Animations are `stateless` (from Elm's perspective) so easy to drop in anywhere (no model, update or subscriptions required).
+ Very performant (generates CSS keyframes animations under the hood).

## How?

1 . Define an animation (either `fromTo` or a sequence of `steps`)

```elm
spinAndSlide : Animation
spinAndSlide =
    Animation.steps
        { startAt = [ P.rotate 0, P.x 0 ]
        , options = [ Animation.loop ]
        }
        [ Animation.step 1000 [ P.rotate 180, P.x 50 ]
        , Animation.wait 500
        , Animation.step 1000 [ P.rotate 360, P.x 0 ]
        ]
```

2 . Render it on the page and let it fly!

```elm
spinningBox : Html msg
spinningBox =
    Animated.div spinAndSlide [ class "spinning-box" ] []
```

![spin-and-slide](https://user-images.githubusercontent.com/14013616/103415754-7ae7bc00-4b7b-11eb-8353-66733c2f2209.gif)

## Animating SVG, Elm UI and Others

So you can use your own version of `elm/svg` and `mdgriffith/elm-ui` (or whatever `Html` abstraction you use) there are some helpers that let you create animated versions:

## Hook into SVG

Give the `Svg.Attributes` `class` function to `Simple.Animated.svg`
```elm
animatedSvg =
    Simple.Animated.svg Svg.Attributes.class
```

Then create any animated SVG element you like!
```elm
svg : Animation -> List (Svg.Attribute msg) -> List (Svg msg) -> Svg msg
svg =
    animatedSvg Svg.svg

g : Animation -> List (Svg.Attribute msg) -> List (Svg msg) -> Svg msg
g =
    animatedSvg Svg.g
```

## Hook into Elm UI

Provide these 3 functions to `Simple.Animated.ui`

```elm
animatedUi =
    Simple.Animated.ui
        { behindContent = Element.behindContent
        , htmlAttribute = Element.htmlAttribute
        , html = Element.html
        }
```

Then create animated `Element`s!

```elm
el : Animation -> List (Element.Attribute msg) -> Element msg -> Element msg
el =
    animatedUi Element.el

column : Animation -> List (Element.Attribute msg) -> List (Element msg) -> Element msg
column =
    animatedUi Element.column
```

## Hook Into Custom Renderer

In case you want to completely customise how to render animations you can use the low level `Simple.Animated.custom` - which gives you access to the raw animation `stylesheet` and `class` name that will apply the animation.

For example, say you wanted to animate `elm-community/typed-svg` nodes - you could create animated versions like this:

```elm
g : Animation -> List (TypedSvg.Attribute msg) -> List (TypedSvg.Svg msg) -> TypedSvg.Svg msg
g =
    animatedTypedSvg TypedSvg.g

animatedTypedSvg node animation attributes children =
    Animated.custom
        (\className stylesheet ->
            node
                (TypedSvg.Attributes.class [ className ] :: attributes)
                (TypedSvg.style [] [ TypedSvg.text stylesheet ] :: children)
        )
        animation
```

You can find many of these common helpers here: https://github.com/andrewMacmurray/elm-simple-animation/blob/main/examples/src/Utils/Animated.elm

## Run Locally

install dependencies

```
$ npm install
```

run the tests

```
$ npm test
```

run the examples

```
$ npm run examples
```

repository: renanpvaz/elm-simple-animation

repo_name: renanpvaz/elm-simple-animation


text:
# Performance Bounceback Starter Project

This project is part of [Udacity](https://www.udacity.com "Udacity - Be in demand")'s [VR Developer Nanodegree](https://www.udacity.com/course/vr-developer-nanodegree--nd017).

## Versions
- Unity 2017.2.0f3

I've tried many times to bake lights and each time it goes all the way through the process and then says "Baking lighting data asset failed." - I've tried both enlighten and progressive.

In editor, the framerate is hosed due to waitForFrame and EditorOverhead - each of these happen for me on other VR scenes and objects, so I just took them out of the profiler and was achieving 220 - 270 fps.  The build performed well, so I think it should be fine.

repository: kaiserbergin/performanceBounceBack

repo_name: kaiserbergin/performanceBounceBack


text:
[](https://supportukrainenow.org)

# A middleware to check authorization

[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/laravel-authorize.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-authorize)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/spatie/laravel-authorize/master.svg?style=flat-square)](https://travis-ci.org/spatie/laravel-authorize)
[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/c6adf478-99b9-4a52-8635-881f6b66c8d3.svg?style=flat-square)](https://insight.sensiolabs.com/projects/c6adf478-99b9-4a52-8635-881f6b66c8d3)
[![Quality Score](https://img.shields.io/scrutinizer/g/spatie/laravel-authorize.svg?style=flat-square)](https://scrutinizer-ci.com/g/spatie/laravel-authorize)
[![StyleCI](https://styleci.io/repos/42896120/shield?branch=master)](https://styleci.io/repos/42896120)
[![Total Downloads](https://img.shields.io/packagist/dt/spatie/laravel-authorize.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-authorize)

This package provides a route middleware to protect routes from unauthorized access. It hooks into the authorization
features that were [introduced in Laravel 5.1.11](http://laravel.com/docs/5.1/authorization).

Protecting a route can be done by adding middleware to it:
```php
Route::get('/top-secret-page', [
   'middleware' => 'can:viewTopSecretPage',
   'uses' => 'TopSecretController@index',
]);
```

Of course this middleware can also be applied to a bunch of routes:

```php
Route::group(['prefix' => 'admin', 'middleware' => 'can:viewAdmin'], function() {

   //all the controllers of your admin section
   ...

});
```

Furthermore the middleware can use [route model binding](https://laracasts.com/series/laravel-5-fundamentals/episodes/18):
```php
Route::get('/post/{post}', [
   'middleware' => 'can:editPost,post',
   'uses' => 'PostController@edit',
]);
```

Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).

## Support us

[](https://spatie.be/github-ad-click/laravel-authorize)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

## Postcardware

You're free to use this package (it's [MIT-licensed](LICENSE.md)), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

The best postcards will get published on the open source page on our website.

## Do not use in Laravel 5.2.28 and up

Laravel 5.2.28 or higher contain the middleware this package provides [out of the box](https://github.com/laravel/framework/blob/v5.2.28/src/Illuminate/Foundation/Http/Middleware/Authorize.php). There's no need do install this package in those versions of Laravel.

## Install

You can install the package via composer:
``` bash
$ composer require spatie/laravel-authorize
```

Next, you must install the service provider:

```php
// config/app.php
'providers' => [
    ...
    Spatie\Authorize\AuthorizeServiceProvider::class,
];
```

Next, the `\Spatie\Authorize\Middleware\Authorize::class`-middleware must be registered in the kernel:

```php
//app/Http/Kernel.php

protected $routeMiddleware = [
  ...
  'can' => \Spatie\Authorize\Middleware\Authorize::class,
];
```

Naming the middleware `can` is just a suggestion. You can give it any name you'd like.

The `authorize`-middleware includes all functionality provided by the standard `auth`-middleware. So you could
also opt to replace the `App\Http\Middleware\Authenticate`-middleware by `Spatie\Authorize\Middleware\Authorize`:

```php
//app/Http/Kernel.php

protected $routeMiddleware = [
    'auth' => 'Spatie\Authorize\Middleware\Authorize',
    ...
];
```

You can publish the config-file with:
```bash
php artisan vendor:publish --provider="Spatie\Authorize\AuthorizeServiceProvider"
```

This is the contents of the published config file:

```php
return [
    /*
     * The path to redirect for login.
     */
    'login_url' => 'auth/login'
];
```

## Usage

### Checking authentication
When the middleware is used without any parameters at all, it will only allow logged in users to use the route.
If you plan on using the middleware like this I recommend that you replace the standard `auth`-middleware with the one
provided by this package.

```php
//only logged in users will be able to see this

Route::get('/top-secret-page', ['middleware' => 'auth', 'uses' => 'TopSecretController@index']);
```

### Checking authorization
The middleware accepts the name of an ability you have defined as the first parameter:

```php
//only users with the viewTopSecretPage-ability be able to see this

Route::get('/top-secret-page', [
   'middleware' => 'can:viewTopSecretPage',
   'uses' => 'TopSecretController@index',
]);
```

### Using form model binding
Image you've set up an ability like this:

```php
//inside the boot method of AuthServiceProvider

$gate->define('update-post', function ($user, $post) {
    return $user->id === $post->user_id;
});
```

The middleware accepts the name of a bound model as the second parameter.

```php
Route::get('/post/{post}', [
   'middleware' => 'can:editPost,post',
   'uses' => 'PostController@edit',
]);
```

Behind the scene the middleware will pass the model bound that is bound to the round to
the defined `update-post`-ability.

## What happens with unauthorized requests?

### Default behaviour

This is the default behaviour defined in the middleware.

```php
use Symfony\Component\HttpKernel\Exception\HttpException;
...

protected function handleUnauthorizedRequest($request, $ability = null, $model = null)
{
    if ($request->ajax()) {
        return response('Unauthorized.', Response::HTTP_UNAUTHORIZED);
    }

    if (!$request->user()) {
        return redirect()->guest(config('laravel-authorize.login_url'));
    }

    throw new HttpException(Response::HTTP_UNAUTHORIZED, 'This action is unauthorized.');
}
```

So guests will get redirected to the default login page, logged in users will get a response
with status `HTTP_UNAUTHORIZED` aka 401.

### Custom behaviour

To customize the default behaviour you can easily extend the default middleware and
override the `handleUnauthorizedRequest`-method. Don't forget to register your class at the kernel.

If you would like to let all unauthorized users know that you are actually a teapot you can do so.

```php
//app/Http/Middleware/Authorize.php

namespace App\Http\Middleware;

use Spatie\Authorize\Middleware\Authorize as BaseAuthorize;
use Symfony\Component\HttpFoundation\Response;

class Authorize extends BaseAuthorize
{
    protected function handleUnauthorizedRequest($request, $ability = null, $model = null)
    {
        return reponse('I am a teapot.', Response::HTTP_I_AM_A_TEAPOT);
    }
}
```

In the kernel:

```php
//app/Http/Kernel.php

  protected $routeMiddleware = [
        'can' => 'App\Http\Middleware\Authorize',
        ...
    ];
```

## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Testing

This package contains integration tests that are powered by [orchestral/testbench](https://github.com/orchestral/testbench).

You can run all tests with:
``` bash
$ composer test
```

## Contributing

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

## Security

If you've found a bug regarding security please mail [security<EMAIL_ADDRESS>instead of using the issue tracker.

## Credits

- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

A big thank you to [Joseph Silber](https://github.com/JosephSilber) for all the excellent feedback he gave
while this package was being created.

## About Spatie
Spatie is webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).

## License

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

repository: spatie/laravel-authorize

gha_language: PHP

repo_name: spatie/laravel-authorize


text:
## Current

* Most of the focus has been on web_connectivity tests. Parsing the DNS consistency files might not be as robust or error
free as the web_connectivity measurements

* Note the way data is being populated into the database; if a certain data
in the measurement files is not found, it is replaced with the string 'error'. This might
require some revisions especially with the dns_consistency tests.

* I assume more testing would be required for the body search feature as it was only recently added and testing on the
back-end was not sufficient

### Problems to fix:
* The deployment; for instance, it currently seems like ansible is not giving the proper database access to the users.
Additionally, when handling large/long requests, apache errors out (as discussed, it may be a RAM issue).

### Errors:
* **Status**: Temp Fix

  **Error**: ValueError: A string literal cannot contain NUL (0x00) characters.

  **When**: Headers search for WireFilter from 2018-06-01 to 2018-06-02 in KR

  **Temp Fix**: Added ValueError exception. Seems like a problem with Postgres not allowing NUL (0x00) characters. Tell
  sqlalchemy to rollback session once exception is raised


text:
It includes 6 scripts that implement functionalities for the different parts of a DCASE related system.

- [Dataset downloading](download_dataset.py)
- [Data augmentation](data_augmentation.py)
- [Feature extraction](feature_extraction.py)
- [Model training](train_model.py)
- [Model evaluation](evaluate_model.py)
- [Fine tuning](fine_tuning.py)

## Usage

First, note that the default parameters are stored in [`parameters.json`](../parameters.json) file. You can use other `parameters.json` by passing its path in -p (or --path) argument of each script.

In the next, we show examples on how to use these scripts for the complete development pipeline. For further usage information you can access to each script instructions by:
```
python download_dataset.py --help
```

### Download a dataset
First let's start by downloading a dataset. For instance to download ESC-50 dataset:
```
python download_dataset.py -d ESC50
```

> Note that the dataset will be downloaded in `../datasets/ESC50` following the path set in [`parameters.json`](../parameters.json).

### Data augmentation
If you wan to use data augmentation techniques, you can run the following script.
```
python data_augmentation.py -d ESC50
```

### Feature extraction
Now, you can extract the features for each file in the dataset by:
```
python extract_features.py -d ESC50 -f MelSpectrogram
```

> See that you have to pass the features name as an argument. Available features representations are in [features.py](../dcase_models/data/features.py).

### Model training
To train the model is also very easy. For instance, to train `SB_CNN` model on ESC-50 dataset with the `MelSpectrogram` features extracted before:
```
python train_model.py -d ESC50 -f MelSpectrogram -m SB_CNN -fold fold1
```

> In this case, you have to pass the model name and a fold name. This is considered to be the fold for testing, meaning that this fold will not be used during training.

### Model evaluation
Once the model is trained, you can evaluate the model in the test set:
```
python evaluate_model.py -d ESC50 -f MelSpectrogram -m SB_CNN -fold fold1
```

This scripts prints the results that we get from [`sed_eval`](https://tut-arg.github.io/sed_eval/) library.

### Fine-tuning
Once you have a model trained in some dataset, you can fine-tune this model on other dataset. For instance to fine-tune the model trained before on MAVD dataset just:
```
python fine_tuning.py -od ESC50 -ofold fold1 -f MelSpectrogram -m SB_CNN -d MAVD -fold test
```

> Note that the information of the origin dataset is passed in -od and -ofold arguments. Besides -d and -fold are the destination dataset and the fold test respectively.

repository: BilalAltundag/DCASE-models

repo_name: BilalAltundag/DCASE-models