text:
# IOS-PreHW
This repository was created to host solutions to the CodePath Pre-Homework.

# Pre-work - *tips*

**tips** is a tip calculator application for iOS.

Submitted by: **Eugene Damiba**

Time spent: **20** hours spent in total

## User Stories

The following **required** functionality is complete:

* [x] User can enter a bill amount, choose a tip percentage, and see the tip and total values.
* [x] Settings page to change the default tip percentage.

The following **optional** features are implemented:
* [x] UI animations
* [ ] Remembering the bill amount across app restarts (if <10mins)
* [ ] Using locale-specific currency and currency thousands separators.
* [x] Making sure the keyboard is always visible and the bill amount is always the first responder. This way the user doesn't have to tap anywhere to use this app. Just launch the app and start typing.

The following **additional** features are implemented:
A sharing section was added to the first page to provide the user with the option of dividing the tip or the total amount among a certain number of people. The user can specify the number of people, and the contribution of each person is calculated as the bill amount is entred.
- [ ] List anything else that you can get done to improve the app functionality!
+ Create a list of favorite restaurant to allow the user save the name and address of the restaurant
+ Add the "Apple Pay" button to make the bill payement more convenient for the user.

## Video Walkthrough

Here's a walkthrough of implemented user stories:

<img src='http://i.imgur.com/HgR5Hg0.gif' title='Video Walkthrough' width='' alt='Video Walkthrough' />

GIF created with [LiceCap](http://www.cockos.com/licecap/). Link (http://imgur.com/HgR5Hg0)

## Notes

Describe any challenges encountered while building the app.
Given the fact that this was my introduction to swift and app development, the challenges had mainly to do with getting acquainted with the language and app ios app development concepts.

## License

    Copyright [2015] [Eugene Damiba]

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

repository: Tegdam/Pre-HW-tips-App

repo_name: Tegdam/Pre-HW-tips-App


text:
# StoreForm

 Bind store and form with record iteration and editing

> extends: 'Ext.form.Panel'

> This js file is to be used within an ExtJS 4 application.

#Instructions

Download the file and save in your extjs app under an appropriate path.

It can be extended similar to the sample below:

```Javascript
Ext.define('App.view.MyForm',{
  extend:'App.view.StoreForm',
  store:'myStore',
});
```

# Methods
* ```getFirstRecord() ```
  * sets form to first item in store
* ```getNextRecord() ```
  * sets form to next item in store
* ```getPreviousRecord() ```
  * sets form to previous item in store
* ```getLastRecord() ```
  * sets form to last item in store
* ```syncRecord()```
  * syncs changes to form with selected record in store
* ```reset()```
  * resets the form (makes form blank and not tied to record)
* ```setRecordByIndex(index)```
  * sets current record on form to the index specified
* ```setRecordByField(fieldName,fieldValue)```
  *  sets current record on form based on field name and field value specified (sets to first match)
* ```addRecord(index)```
  *  adds record at the index, if no index is specified it defaults to 0

# Additional Configs
* ```syncRecordOnChange```
  * type : bool
  * defaults to false
  * will auto sync fields on form with store record on change event
* ```hasId```
  * defaults to false
  * defines whether there is an id field available within the store requires ```idName``` to be defined for use

# Record Iteration Variables
* ```bool containsRecords```
* ```bool endOfStore```
* ```bool startOfStore```
* ```nullable<int> selectedIndex```

license: MIT

repository: weeksdev/StoreForm

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: weeksdev/StoreForm


text:
# Report

## Development plan

1) Create an initial full pipeline for the following components with simple/fake implementations:
    - input
    - output
    - counter
    - timestamp processing
2) Improve components one-by-one with unit tests
    1) Implement working but simple counter with sets
    2) Implement advanced timestamp processing
    3) Test/benchmark ingestion from Kafka (docker-compose)
    4) Output to Kafka
3) Benchmark, profile, improve performance
4) Try a probabilistic cardinality estimator - HyperLogLog++?
5) Improve understanding of Kafka and document/implement more scalable solution

## Benchmark

### Setup

For benchmarking I used Golang's built-in benchmarking infrastructure and added code for generating
a CPU profile. I decided to only benchmark the input parsing, processing, counting, and output stage,
and in particular not include the possible overhead from Kafka.

### Results

Overall, we achieved an ingestion performance of 200k records/s, or 8MiB/s. This corresponds to about 10M records
per minute and does not seem to be I/O bound, i.e. I would expect Kafka being able to deliver higher data rates.

![ggprof graph](./profile.svg)

From the profiling data we see that the cpu usage can be basically partitioned into 4 domains:

* 9% for user counting
* 18% for garbage collection
* 27% for scheduling and communication
* 46% for JSON parsing and encoding

### Possible improvements

#### Counting
It does not seem like there is a lot of improvement possible here. The counting algorithm already
uses a hash-set, which has O(1) runtime complexity for insertion, and anyways, the processing and
counting use already less than 10% of the runtime.

What can and should be improved is memory complexity. While the hash set has O(1) runtime
complexity, it still requires O(n) space. This I expect to be a major bottleneck for scaling.

#### Garbage collection
The time spent in garbage collection can only be reduced indirectly by reducing the number of
dynamic allocations in the code. I expect both counting and JSON parsing to contribute to the
number of dynamic allocations. This could be verified with memory profiling.

#### Scheduling and communication
The CPU time for communication and scheduling could be reduced by using less Go routines and channels.
Maybe it could also help sending objects by reference instead than by value over a channel.

#### JSON parsing
Clearly, we are spending a lot of time in JSON parsing end encoding. Also, the JSON parsing
probably contributes mostly to the time required for garbage collection. It is very likely that
a more efficient JSON parser or a different data format could greatly improve runtime performance.

In Golang, the JSON serialization relies on reflection, which is implemented rather inefficiently
in Golang. Also here, a serialization, that utilizes static type information could improve
performance.

## Discussion

### Output format
Eventually we will have to produce statics per hour/day/week/month/year.
In order to solve this requirement we could have a copy of our software collecting continuously data continuously for a
longer period of time. In my view this would not be an optimal solution, as we would have to handle and recover from crashes
of machines.

Instead I will not only return a user count per minute, but also a raw aggregatable counter. This will not only allow
for aggregating the minutely counts to hourly, daily, etc, but also allow for setting up redundant instances of the
counting algorithm for the same partition.

### JSON serialization
As discussed above, we are spending probably more than 50% of the whole runtime in JSON parsing and the related garbage
collection. It also poses an overhead in the data transfer and thus reduces the maximum throughput in terms of
records per second.

On the other hand JSON is a versatile, schema-less, and widely supported data format, which is usually a good choice
for log data.

I would make the choice of data format dependent on the possible current and future consumers of the data.
If there are multiple consumers that require a specific subset of the data fields, it could be
useful to add a pre-processing step in the data pipeline (e.g. a job consuming from one Kafka topic
and publishing to a second refined topic), which filters data and converts to more efficient format like
e.g. protobuf. The primary topic with JSON would remain to be used by future applications that
require the original data.

### Scalability
The biggest issue in terms of scalability, I expect to be memory usage. At least with the set
implementation for counting. If we still need to compute exact user counts, we can partition
the input data by uid, and deploy different consumers for the partitions. This would reduce the
memory and CPU usage per consumer, as each would only handle a subset of user ids. The final aggregation
to an overall count can be easily performed by summing all partitioned counts for a specific timestamp.

The output data (count and raw aggregatable value) can be partitioned by timestamp to allow
for efficient aggregation.

### Probabilistic cardinality estimation
 If the user is willing to trade memory usage for accuracy,
then a probabilistic cardinality estimation is a good choice.

I implemented a HyperLogLog++ based counter quickly for comparison with the set implementation.

According to the authors, the error at high sample numbers should be around 2%. The overall performance is about the
same as with the exact counter, but the memory usage is minimal (1.5 kiB).

Another benefit of HLL, is that input data does not have to partitioned by uid. Also the raw aggregatable value is small
and can be easily aggregated.

### Error recovery
I decided to output not only the counts, but also the raw information of unique users. This
information can be used for checkpointing and can be aggregated to produce results for longer
time ranges.

### Late/Out-of-order frames
The "advanced" timestamp processing implementation always accepts data frames with timestamps
within a window of two minutes around the current system timestamp. By that we ignore all data
that is outside of this window, and an error is raised for each such out-of-order frame.
It would be useful to log such errors and include them as a metric in monitoring.

repository: butzist/challenge

repo_name: butzist/challenge


text:
This is a repository following the progress of the Laracasts series, Laravel 8 from Scratch.

I am putting this repository together for free on my own time in order to help others who may be going through this course, as there are currently no uploaded course files. I am in no way affiliated with Laracasts, other than using their amazing courses.

There will be one commit per episode so that students can easily pick up at the beginning of any episode.

More information on the Laravel framework can be found here.

## License

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

branch_name: refs/heads/main


text:
---
national_indicator_available: "Percentage of the population living in areas where the Canadian Ambient Air Quality Standards are met"
target_name: "Increase the percentage of Canadians living in areas where air quality standards are achieved from 70% in 2015 to 85% in 2030"
national_indicator_description: "Breathing in air pollutants can contribute to health issues such as asthma, cardiovascular diseases and premature mortality. To better inform Canadians, an indicator was devised that monitors general improvements to air quality using the 2020 Canadian Ambient Air Quality Standards (CAAQS, the standards). More specifically, this indicator tracks the percentage of the population living in areas where outdoor concentrations of air pollutants were below the 2020 standards."
national_geographical_coverage: "Canada"
graph_title: "Percentage of Canadians living in areas where outdoor concentrations of air pollutants were below the 2020 Canadian Ambient Air Quality Standards"
graph_type: line
graph_annotations:
  - unit: Percentage
    value: 85
    preset: target_line
computation_units: Percentage
indicator_name: "Percentage of the population living in areas where the Canadian Ambient Air Quality Standards are met"
indicator_sort_order: 11-03-01
published: true
reporting_status: complete
indicator_number: 11.3.1
sdg_goal: '11'
data_non_statistical: false
target_id: '11.3'
data_show_map: false
source_active_1: true
source_url_text_1: "Environment and Climate Change Canada (2020) Air Quality Research Division. Health Canada (2020) Air Health Effects Assessment Division"
source_url_1: 'https://www.canada.ca/en/environment-climate-change/services/environmental-indicators/population-exposure-outdoor-air-pollutants.html'
source_organisation_1: "Environment and Climate Change Canada and Health Canada"
source_periodicity_1:
source_geographical_coverage_1: 'Canada'
---

repository: JulienSTC/CIF-Data

branch_name: refs/heads/develop

gha_language: Python

gha_license_id: MIT

repo_name: JulienSTC/CIF-Data


text:
# Examples of games for the extension for Yandex.Games SDK
Examples of games for the [GDevelop extension for Yandex.Games SDK](https://github.com/achubutkin/yandex-games-sdk-gdevelop-extension) that allows you to easily integrate games created by [GDevelop](https://gdevelop-app.com/) into the [Yandex.Games](https://yandex.com/games/) platform.

Before setting up and running the sample games, download the entire repository to your computer. Each game is placed in a separate directory along with assets.

> To download the repository, click the green "Code" (top right) button and then "Download ZIP". [Or just click on this link](https://github.com/achubutkin/yandex-games-sdk-gdevelop-extension-examples-games/archive/refs/heads/main.zip).

# Games

### Falling box
Player details / Manage ads / Competition tables

A hyper-casual game where you have to toss a box and not let it fall. This game uses user authorization and competition tables to save the player's current achievement and restore it the next time they log in. When you lose, ads are displayed.

#### Instructions
This game displays ads, so make sure you have monetization enabled. Follow [this instruction in the official documentation](https://yandex.ru/dev/games/doc/dg/console/enable-monetization.html) to enable monetization and display ads.

This game uses competitive tables, so you need configuring that tables in Yandex Games Developer Console. For to do this:
1. Go to the developer dashboard.
2. Select the game.
3. Go to the Leaderboards tab.
4. Add leaderboard with the following parameters. **Leaderboard string identificator** = leaderboard2021, **Main leaderboard** = yes, **Leaderboard type** = numeric. Leave the rest of the parameters as default.

Configure and run game:
1. Open the game from **falling-box** in GDevelop.
2. Run game.

## License

MIT


text:
## Something
**Kind**: global class

* [Something](#markdown-header-something)
    * [new Something()](#markdown-header-new-something)
    * [~four](#markdown-header-somethingfour)
    * [~three](#markdown-header-somethingthree)

### new Something()
something

### Something~four
inner var

**Kind**: inner property of [Something](#markdown-header-new-something)
### Something~three
inner constant

**Kind**: inner constant of [Something](#markdown-header-new-something)


text:
---
home: false
heroText: Henri's
tagline: Welcome to the Henri's documentation..
actionText: Get Started →
actionLink: /guide/
features:
footer: MIT Licensed | Copyright © 2018-present Sil van Diepen
---

# Henri's
###  Welcome to the Henri's documentation..

### features

#### Full Toolset

The most complete toolset which you can use to style without giving you any predefined styles.

#### No output

By default, there is no output at all from Henri's. So you can use it without putting any extra weight on your style.

#### Framework independent

The only thing you need is Sass. Henri's can work with any framework in any setup.

repository: henris-style/docs

repo_name: henris-style/docs


text:
# A-Maze-ingly Retro Route Puzzle

Requisites:
-------

Docker is a mandatory technology to master. Each artifact must
1. contains a Dockerfile into the root directory
2. the full directory will be mounted under /mnt/ folder into the docker image builded from your docker file
3. if the implementation is for a network accessible service it must be binded to the port :9090
4. contains a build script runnable within the docker container generated from the Docker file named scripts/build.sh
5. contains a test script runnable within the docker container generated from the Docker file named scripts/test.sh
6. contains a run script runnable within the docker container generated from the Docker file named scripts/run.sh

The candidate can simulate the review process with these commands, that must be run from the root of the project folder:

```
docker build -t mytest .
docker run -v $(pwd):/mnt -p 9090:9090 -w /mnt mytest ./scripts/build.sh
docker run -v $(pwd):/mnt -p 9090:9090 -w /mnt mytest ./scripts/test.sh
```

To run:
```
docker run -v $(pwd):/mnt -p 9090:9090 -w /mnt mytest ./scripts/run.sh -m maps/map1.json -r 2 -i "Knife" "Potted Plant"
docker run -v $(pwd):/mnt -p 9090:9090 -w /mnt mytest ./scripts/run.sh -m maps/map2.json -r 4 -i "Knife" "Potted Plant" "Pillow"
```

Problem:
-------

Write a program that will output a valid route one could follow to collect all specified items within a map.
The map is a json description of set of rooms with allowed path and contained object.

Exercise starts with an input of:
  - json reppresentation of map
  - starting room
  - list of object to collect

```
Room type allowed fields

  id: Integer
  name: String
  north: Integer //referring to a connected room
  south: Integer //referring to a connected room
  west: Integer //referring to a connected room
  east: Integer //referring to a connected room
  objects: List //of Objects

Object type allowed fields
  name: String //Object Name
```

Example 1
-------

Map
```json
{
    "rooms": [
        { "id": 1, "name": "Hallway", "north": 2, "objects": [] },
        { "id": 2, "name": "Dining Room", "south": 1, "west": 3, "east": 4, "objects": [] },
        { "id": 3, "name": "Kitchen","east":2, "objects": [ { "name": "Knife" } ] },
        { "id": 4, "name": "Sun Room","west":2, "objects": [ { "name": "Potted Plant" } ] }
    ]
}
```

Input
```
Start Room ID = 2
Objects To Collect = Knife, Potted Plant
```

Output

| ID | Room | Object collected|
|----|------|-----------------|
|0|Dining Room|None|
|1|Hallway|None|
|2|Dining Room|None|
|3|Kitchen|Knife|
|2|Dining Room|None|
|4|Sun Room|Potted Plant|

Example 2
-------

Map
```json
{
    "rooms": [
        { "id": 1, "name": "Hallway", "north": 2, "east":7, "objects": [] },
        { "id": 2, "name": "Dining Room", "north": 5, "south": 1, "west": 3, "east": 4, "objects": [] },
        { "id": 3, "name": "Kitchen","east":2, "objects": [ { "name": "Knife" } ] },
        { "id": 4, "name": "Sun Room","west":2, "north":6, "south":7, "objects": [] },
        { "id": 5, "name": "Bedroom","south":2, "east":6, "objects": [{ "name": "Pillow" }] },
        { "id": 6, "name": "Bathroom","west":5, "south":4, "objects": [] },
        { "id": 7, "name": "Living room","west":1, "north":4, "objects": [{ "name": "Potted Plant" }] }
    ]
}
```

Input
```
Start Room ID = 4
Objects To Collect = Knife, Potted Plant, Pillow
```

Output

| ID | Room | Object collected|
|----|------|-----------------|
|4|Sun Room|None|
|6|Bathroom|None|
|4|Sun Room|None|
|7|Living Room|Potted Plant|
|4|Sun Room|None|
|2|Dining Room|None|
|5|Bedroom|None|
|2|Dining Room|None|
|1|Hallway|None|
|2|Dining Room|None|
|3|Kitchen|None|

Goals
----------------
  - TDD approach.
  - Build a Docker container with runnable code inside so that we can mount a volume in it and test on different maps.

Issues
----------------
On build command, all maven-assembly-plugin dependency are downloaded. There's an open issue about [here](https://issues.apache.org/jira/browse/MASSEMBLY-874)

repository: ncremaschini/maze-solver

repo_name: ncremaschini/maze-solver


text:
---
title: 'Dev Diary: My React, Redux & React Router Setup.'
date: '2017-08-23'
---

_Note: This post is not meant to be about the inner workings of React, Redux or
React-Router. This is a post detailing my experiences & understanding in
creating an app using all 3 libraries, the problems I faced while doing it & how
I got around them._

Some background info on me, professionally I am a backend developer who
primarily works with Java. I have worked with [Apache
Wicket](https://wicket.apache.org/) for a long time. For those who don’t know
Wicket is a web framework for Java with components at its center. So when I
wanted to learn a JavaScript frontend library/framework, I chose React as it was
similar to Wicket in terms of creating components and composing them to create
views while being lightweight enough that it was easy to learn in isolation.

## V1: Just React

To start learning React, I made [Snooplay](http://snooplay.surge.sh/): A media
player for Reddit. The first version of Snooplay was very simple, it just used
React, no routing & no state management. You can checkout the code for v1
[here](https://github.com/anirudhvarma12/snooplay/tree/v1).

## V2: React meets Router & Redux

In order to extend my knowledge to Redux, Middlewares & React Router, I decided
to extend Snooplay with the following goals —

- The state for the entire app should be stored & managed via
  [Redux](http://redux.js.org/).
- The user should be able to change subreddits by altering the URL. eg:
  snooplay/r/movies. Routing to be handled by
  [React-Router.](https://github.com/ReactTraining/react-router)
- Create the boiler plate using
  [create-react-app](https://github.com/facebookincubator/create-react-app)
- All styling should be done via SASS/SCSS and compilation of the same has to be
  done via Webpack.

Now that we know, what our goals are, lets get started. Here is some information
on important packages —

- React: v15.6.1
- Redux: v3.7.2
- React-Redux: v5.0.6 (Package that helps connect react components with redux
  stores)
- React-Router: v4.1.2
- Redux-thunk: v2.2.0

You can checkout the full [package.json file
here](https://github.com/anirudhvarma12/snooplay/blob/master/package.json).

### Step 1: Create the app boiler plate.

We will create the structure of the app by using Facebook’s create-react-app
(CRA) tool. After your install CRA, go to your terminal and type the following
command —

    create-react-app <app_name>

create-react-app is a utility that creates a pre-configured project with Webpack
& Babel and other tools. This was made to get over the configuration issues that
people usually face while wiring up different tools together.

This process can take some time, once it finishes you can `cd` into the
directory and type `npm start` This would open your browser and you should be
able to see the React App.

The entry point for the app is `index.js` which then renders the `<App />`
component from `app.js` .

### Step 2: Installing the libraries

Now we need to install our essential libraries i.e. React-Router & Redux.

    npm install --save redux react-router

Both React-Router & Redux are very modular libraries. For example, React-Router
can also be used in React-Native projects, whereas Redux has no direct
connection with React. To make it easy to use these libraries we will install 2
more libs.

- react-router-dom: Contains react components to be used in web projects.
- react-redux: Helps connect our components with redux, thus making it easy to
  read & change state from React components.

      npm install --save react-router-dom react-redux

### Step 3: SCSS Integration

This step was very tricky, with many resources on the web. Some worked with
Webpack 1 & not with Webpack 2 while some refused to work at all.

    npm install --save-dev css-loader extract-text-webpack-plugin node-sass sass-loader

Before we update our webpack configs, we need to *eject *our project. Eject
basically means that we will now take care of the webpack & other config instead
of just working with what create-react-app gives us. To eject the project just
run the following command —

    npm run eject

After this process is completed, you will find a config folder which would
contain 2 webpack files, one is _webpack.config.dev.js _& other is
*webpack.config.prod.js. *As you might have guessed, the dev file your
devlopment profile (used when you do `npm start` ) and the prod file is your
production profile that performs optimizations before creating a deployment
bundle (run `npm run build` )

Now in our `webpack.config.dev.js` we will configure the
`extract-text-webpack-plugin` to handle the scss files.

**3.1) Get the extract — text plugin in the file.**

    const ExtractTextPlugin = require('extract-text-webpack-plugin');

Also declare the CSS file name -

    const cssFilename = 'static/css/[name].[contenthash:8].css';

**3.2) Configure rules**

In the `module.exports` object, find the `module` property. In the `rules` array
you need to find the following section —

    // "oneOf" will traverse all following loaders until one will                               // match the requirements. When no loader matches it will fall                               // back to the "file" loader at the end of the loader list.                               oneOf: [
    ....
    ]

Here add the config to process `scss` files using appropriate loaders.

    {
    test: /\.scss$/,
    use: ExtractTextPlugin.extract(['css-loader', 'sass-loader'])                                 },

_Note: Several examples on the internet use the loaders syntax, but that is
deprecated._

Also, you should comment out the `css` loader that is pre-configured in the
file.

### Step 4: Redux & Redux-Thunk

Before going forward here, I would like to mention 2 resources that helped me
greatly in understanding Redux & Thunks.

1.  Stephen Grider’s Modern React with Redux course on Udemy. Check it out here —
    [https://www.udemy.com/react-redux/](https://www.udemy.com/react-redux/)
1.  Matt Stow’s Dummy’s Guide to Redux & Thunk. Check it out here-
    [https://medium.com/@stowball/a-dummys-guide-to-redux-and-thunk-in-react-d8904a7005d3](https://medium.com/@stowball/a-dummys-guide-to-redux-and-thunk-in-react-d8904a7005d3)

An introduction to the various terms you are going to see moving forward in
reference to Redux.

- **State: **State refers to the data of the application that we store in Redux.
  Redux creates this one big JavaScript object to store all the state of the
  application. State can only be updated by Reducers.
- **Reducers: **Reducers are plain JavaScript functions that are responsible for
  updating the state of the application. Each reducer is responsible for updating
  one part of the application state.
- **Actions**: An action is basically an object that describes an event that would
  result in a change in state. Each action has `type` property which helps
  reducers in deciding if they have to respond to this action or not. Function
  that return actions are called action creators.
- **Redux-Thunk: **Action creators usually returns a plain JavaScript object.
  Redux-Thunk allows you to return functions instead of objects. These functions
  recieve `dispatch` & `getState` store functions which allow you to further call
  actions from inside the function. Example of such action creator —

Example of using Redux-Thunk

### Step 5: Creating our store and using Redux.

I would like to outline the process that I used to create my store.

- Design the app state on paper or as a JavaScript object in any text editor.
- Create reducers for each property. At this step all reducers simply returned the
  state without any other process.
- Bind reducer & properties. This is how the state for Snooplay looks

  //As you can see, each property is assigned a reducer.
  const rootReducer = combineReducers({ currentPost: ReducerCurrentPost,
   posts: ReducerFetchPosts,
  subs: ReducerFetchSubreddits,
   currentSub: ReducerCurrentSubreddit, loaderVisible: ReducerLoadingState, notification: ReducerNotification, lastPostId: ReducerLastPost
  });

- To provide the state to the entire application, you need to wrap your components
  with `Provider` component provided by `react-redux` package.
- Now that we have linked our properties with our reducers, I would like to point
  out that in our reducer functions, _the _`state`_ property refers to the value
  of the property only and not the entire state_. For example, here is my
  ReducerCurrentPost-

      // here the state is the value of 'currentPost' property of the app // state and not the entire state.
      export default function currentPostReducer(state = null, action) {

      }

- **Actions & Action Creators. **As described earlier the action is simply a JS
  object with a type field. Any data that has to be sent to the reducer can be
  sent as the payload property of the action. Here is what the action creator to
  set the current post look like-

      //This is an action creator, returns an action with a type and //payload.
      export const setCurrentPost = (post) => {
          return {
              type: ACTION_CURRENT_POST,
              payload: post
          }
      }

When this action is dispatched (called) like `setCurrentPost(post)` redux sends
this action to all reducers. The the current post reducer can respond like-

    import { ACTION_CURRENT_POST } from './../Constants';

    export default function currentPostReducer(state = null, action) {
        switch (action.type) {
        //This reducer checks the current action type
        //Returns the post (payload)
        //This post is updated in the state
          case ACTION_CURRENT_POST: {
            return action.payload
          }
          default: {
            return state;
          }
        }
    }

Next, we want our components to update when the associated state is changed. So
lets say we have a component which displays the current post. When the reducer
updates the current post in the state, we want this component to re-render to
show the new post. This is where the `connect` method from the `react-redux`
library comes into play. It connects the react components with its associated
state.

_Note: In react world, components which work directly with the store are called
Container Components and components which work only on the given props
(irrespective of where the props are supplied from) are called Presentation
Components._

This is what my PostContainer component looks like. It is directly connected to
the store —

    import React, { Component } from 'react';
    import { connect } from 'react-redux';
    import { bindActionCreators } from 'redux';
    import { setCurrentPost } from './../../actions/';

    class PostContainer extends Component {
        render(){
           return(
{this.props.post.title}
)
       }
    }

    function mapStateToProps(state){
        return {
          post: state.currentPost
        }
    }

    function mapDispatchToProps(dispatch){
        return {
          actions:{
            closePlayer: bindActionCreators(setCurrentPost, dispatch)
          }
        }
    }

    export default connect(mapStateToProps, mapDispatchToProps)PostContainer);

So whats happening here?

Here we create a Component that has to render some details about the current
post of the application.

- `mapStateToProps` is responsible for taking the entire application state and
  then getting out the relevant pieces needed to render the current component.
  These pieces are then provided to the components as `props`
 In the above
  example the `currentPost` property of the application state is accessed using
  the standard props mechanism.
- `mapDispatchToProps` is used to call actions from inside the component. In the
  above example, I use the `setCurrentPost`action to close the player. you can
  call the `setCurrentPost` action by calling
  `this.props.actions.closePlayer(null)` .
- In the end we use `connect`to wire all these together. Now whenever the
  `currentPost` property is updated in the state, `PostContainer` will be updated
  to reflect this change.

_Note: if you are wondering why to use mapDispatchToProps — Read_ [this
StackOverflow answer](https://stackoverflow.com/a/41782298/1563269)

After this you can setup React-Router. There are many great examples/guides on
how to do this. Just note that do not follow a react-router v3 guide if you are
working with v4 as v4 is a complete re-write.

React Router setup was a breeze, one thing that bugged me was navigating to
paths programmatically. To do this in v4, I have used the `withRouter` Component
from `react-router-dom` package. This is what it looks like —

    import React, { Component } from 'react';
    import { withRouter } from 'react-router-dom'

    class SubmitLink extends Component {

        handleClick = () => {
          if (this.props.onClick()) {
            this.props.history.push(this.props.navigateTo());
          }
        }

        render() {
          return (
              {this.props.label})
          }
        }
    }

    const NavigableSubmitLink = withRouter(SubmitLink);

    export default NavigableSubmitLink;

This component first calls the `onClick` property, if that function returns
true, then it calls the `navigateTo` function which returns the new path that it
has to go to after computation. Using `withRouter` gives us access to updated
`match`, `location`, and `history` props.

Ending Notes —

- **The real documentation is in the issues:** In the Java world, we have Java
  Docs & where they don’t help StackOverflow steps in. But in the JS world, most
  problems I ran into were solved somewhere in GitHub issues.
- In the Udemy course linked above, they use **react-promise** middleware, but
  here I use **react-thunk** middleware even for Ajax calls. That’s just a
  personal preference because I prefer less magic in my code :)

That’s the end of this article, I have tried to explain all the problems I faced
and how I overcome them. If you want to more detailed explanations of React,
Redux & Redux-Thunk, look at the resources I have linked above.

gha_language: JavaScript


text:
Sentry
======

Hookshot supports [Sentry](https://sentry.io/welcome/) error reporting.

You can configure Sentry by adding the following to your config:

```yaml
sentry:
  dsn<EMAIL_ADDRESS># The DSN for your Sentry project.
  environment: production # The environment sentry is being used in. Can be omitted.
```

Sentry will automatically include the name of your homeserver as the `serverName` reported.

repository: matrix-org/matrix-hookshot

gha_language: TypeScript

repo_name: matrix-org/matrix-hookshot


text:
# Running Eiffel Intelligence

## _Prerequisites_

Eiffel intelligence is Spring microservice distributed in a war file. To start
the service download the war file from
[jitpack.io](https://jitpack.io/#Ericsson/eiffel-intelligence) and look for the
latest version. Now replace the latest version in the link below:

    https://jitpack.io/com/github/Ericsson/eiffel-intelligence/<version>/eiffel-intelligence-<version>.war

If you want to test the latest code in github clone the project and compile it
with:

    mvn clean install

append **_-DskipTests_** if you want to skip the tests since the latest on
master always has passed the tests. The war file should now be found under
target folder in your cloned project.

If you run from source code, you can run Eiffel-Intelligence front-end with maven command:

    mvn spring-boot:run

With properties added to the maven command, e.g:

    mvn spring-boot:run -Dlogging.level.com.ericsson.ei=DEBUG -Dspring.data.mongodb.port=27019

Or you can run the executable war file (located in target folder, if running from source code):

    java -jar eiffel-intelligence-<version>.war

if you want to run with default configuration for local message buss and
Mongo DB.

Own configuration can be provided with

    java -jar eiffel-intelligence-<version>.war --spring.config.location=file:<path to own application.properties>

remember to keep the name of the properties file if you are a beginner to
Spring. More advanced Spring user can look [here](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html)
for more information about using external configuration.

If only few properties need to be overridden then use java opts, for example

    java -jar eiffel-intelligence-<version>.war -Dspring.data.mongodb.port=27019

All available Eiffel-Intelligence properties can be found in [application.properties](https://github.com/Ericsson/eiffel-intelligence/blob/master/src/main/resources/application.properties) example file.

repository: codacy-badger/eiffel-intelligence

repo_name: codacy-badger/eiffel-intelligence


text:
# Raytracer-cpp
Implementation of a raytracing algorithm for CG.

## Features
This project features an implementation of a basic raycasting algorithm to create rich and beautiful images. It is capable of rendering spheres, ellipsoids and triangles.

To shade the scene the Blinn-Phong lighning model was used. In addition, this project has recursive raytracing imlemented to support reflectivity (and refraction in a future).

It doesn't feature early collision test to reduce number of ray-object intersection tests yet. However, it features multithreaded solution to speed the rendering process up.

## Dependencies
This project uses [GLM](https://glm.g-truc.net/0.9.9/index.html) and [FreeImage](http://freeimage.sourceforge.net/) libraries.
Include both of them before compiling this application.

*FreeImage* is used only for saving the image to a file. You can replace it if you have troubles compiling it for your system.

## Screenshots

Default Scene

![screenshot3](https://image.ibb.co/gBY3co/out.png)

Standford Dragon

![screenshot4](https://image.ibb.co/jxU408/scene7.png)

1000 Spheres

![screenshot2](https://image.ibb.co/iVygkJ/scene5.png)

Table with 4 spheres and 2 ellipsoids

![screenshot1](https://image.ibb.co/bDJ8Xy/scene4_specular.png)

repository: PLUkraine/Raytracer-cpp

repo_name: PLUkraine/Raytracer-cpp


text:
The use of the `+=` operator for appending strings causes the JVM to create and use an internal `StringBuffer`. If a non-trivial number of these concatenations are being used then the explicit use of a `StringBuilder` or threadsafe `StringBuffer` is recommended to avoid this.

Ex:

```
public class Foo {
	void bar() {
		String a;
		a = "foo";
		a += " bar"; // better would be:

		// StringBuilder
		a = new StringBuilder("foo");
		a.append(" bar);
	}
}
```

[Source](http://pmd.sourceforge.net/pmd-5.3.2/pmd-java/rules/java/optimizations.html#UseStringBufferForStringAppends)

repository: darioajr/codacy-pmdjava

repo_name: darioajr/codacy-pmdjava


text:
---
layout: post
title: "Recent Advances in Object Detection in the Age of Deep Convolutional Neural Networks"
date: 2018-09-10 09:09:12
categories: arXiv_CV
tags: arXiv_CV Review Object_Detection Attention Survey CNN Detection
author: Shivang Agarwal, Jean Ogier Du Terrail, Frédéric Jurie
mathjax: true
---

* content
{:toc}

##### Abstract
Object detection-the computer vision task dealing with detecting instances of objects of a certain class (e.g., 'car', 'plane', etc.) in images-attracted a lot of attention from the community during the last 5 years. This strong interest can be explained not only by the importance this task has for many applications but also by the phenomenal advances in this area since the arrival of deep convolutional neural networks (DCNN). This article reviews the recent literature on object detection with deep CNN, in a comprehensive way, and provides an in-depth view of these recent advances. The survey covers not only the typical architectures (SSD, YOLO, Faster-RCNN) but also discusses the challenges currently met by the community and goes on to show how the problem of object detection can be extended. This survey also reviews the public datasets and associated state-of-the-art algorithms.

##### Abstract (translated by Google)

##### URL
[https://arxiv.org/abs/1809.03193](https://arxiv.org/abs/1809.03193)

##### PDF
[https://arxiv.org/pdf/1809.03193](https://arxiv.org/pdf/1809.03193)


text:
---
layout: default
---

# 1998-12-30 - QuickEmail, A Web-based E-mail message

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 6cff585877a75ab2affb0c149b9510f58a23d9aff623eb9769788d8b7c213c00

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1998-12-30 01:40:02 UTC

Raw Date: Wed, 30 Dec 1998 09:40:02 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Wed, 30 Dec 1998 09:40:02 +0800
To<EMAIL_ADDRESS>Subject: QuickEmail, A Web-based E-mail message
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

SSA, IRS, VA A-OK FOR Y2K

President Clinton says that the U.S. Treasury Financial Management System
has completed testing by independent auditors and is now "certified as Y2K
(Year 2000) compliant."  The Y2K problem or "millennium bug" is found in
old programs that (because their authors used only two rather than four digits
to designate years) will make mistakes when doing calculations based on
dates.  The Social Security Administration has led the way in dealing with
the Y2K problem, which it first started working on in 1989.

(San Jose Mercury News 29 Dec 98)

A service provided by TechAID Computer Services, http://www.techaid.net
The e-mail address of the sender MAY NOT BE AUTHENTIC.

{% endraw %}
```

## Thread

+ Return to [December 1998](/archive/1998/12)

+ Return to "[whiterose@liveinfreedomor.die](/authors/whiterose_at_liveinfreedomor_die)"

+ 1998-12-30 (Wed, 30 Dec 1998 09:40:02 +0800) - QuickEmail, A Web-based E-mail message -<EMAIL_ADDRESS>


text:
+++
title = "Run project locally"
date = 2021-08-30T08:30:00-06:00
weight = 15
chapter = true
pre = "<b>2. </b>"
+++
# Run project locally

Now that you have a SAM application. You will learn how to run it and test it locally using the AWS SAM CLI. This is important because its part of the day to day development workflow. It helps you verify if the application is behaving as expected, debug what's wrong, and fix any issues before pushing your changes to a central repository.

![DevWorkflow](/images/dev-workflow-art.png)

repository: mmondino/aws-serverless-cicd-workshop

repo_name: mmondino/aws-serverless-cicd-workshop


text:
---
templateKey: blog-post-swift
slug: /swift-archives/xcode-10-features-and-fun/
author: Peter Witham
tags: ["Development Notes", "Swift"]
title: Xcode 10 Features and Fun
date: 2018-06-27T16:06:38
blurb: New Xcode Happiness. Xcode 10 has some great new features, here are a few of my favorite things.
---

Xcode 10 is a bigger release than it first appears, never under estimate internal app changes to really impact the development lifecycle. Let’s take a look at some of the more noticeable changes.

## Dark Mode if you run macOS Mojave

This one is an interesting twist. So many Xcode users have asked for a dark mode over the years, Apple went one better. If you run macOS Mojave then you get the new mode thanks to system level support, this is so much more sensible than just adding it to an app. I love using dark mode in my development tools due to the long hours staring at code and the late nights fixing bugs. Whilst I am talking about dark mode, there is a new option to view dark or ‘normal’ variances in the application design views and assets panel. This is great for checking how each version will look in macOS apps (iOS next year?). In the assets library, you can specify the color sets and resources for both versions.

## New NSGridView Design Tool

There is a fantastic new design tool for laying out grid views. It reminds me a lot of the way you work with spreadsheets in Numbers (Apple iWorks), you can drag around to add/remove columns and rows along with editing other details. This is very cool and hopefully, we will see more of these layout aids in future versions.

## Source Control Changes

To help track changes and maybe reduce merge conflicts, there is now a bar that appears in the code editor that will highlight changes in a file since the last checkout. This is handy for also knowing what is going on with the code when working in a team. You can monitor and merge changes from other team members without the pain of a last-minute merge conflict (hopefully). When logging into a source control service account, Xcode can both generate and upload SSH keys. Previously this was a very hands-on manual process, so this is a welcome change. Talking of source control services, BitBucket cloud and server are now supported along with GitLab and self-hosted services.

## Quoting Speed Statistics

Here are a few numbers to make Xcode feel a whole lot more responsive.

  * 40% faster document loading
  * 3x faster canvas interactions on storyboards
  * 2.5x faster loading of large documents
  * 5x faster debug symbol downloading
  * The build system uses 20% less memory
  * Rebuilds are now 2x faster when using Swift compared to last year

## Multi-Cursor Happiness

Xcode is finally getting multi-cursor support. For those that might not know what that is, you can have multiple cursors in the same file. This allows you to edit multiple lines of code at once along with pasting and copying, to use the feature you CTRL+Shift click the locations you want to edit and type away.

## Notable Mentions

There are a few other things that might not be obvious at first.

  * The code folding ribbon has returned to the code editor (cheers all around for that one).
  * The library window is now separate from the inspectors, this makes me very happy. Having the library always in the corner drives me crazy, and it also seems to randomly resize for me depending on its mood.
  * You can now run parallel tests by using multiple virtual devices, this is a nice time saver if you have enough power to crank up the device count.
  * Custom instruments can now be created and shared with other people via export.

  Xcode 10 will include Swift 4.2, you can add other versions of Swift via the toolchain in the preferences. As we near the final release version, presumably in the Fall of 2018, more details are sure to be discovered. I look forward to putting Beta 2+ through the daily grind and see what I come across.

repository: GrfxGuru/gatsby-starter-netlify-cms

repo_name: GrfxGuru/gatsby-starter-netlify-cms


text:
---
layout: post
title:  "Useful Guidelines for Contributing to a Project Managed Using GIT."
date:   2014-12-09 00:00
categories: General
permalink: archivers/useful-guidelines-for-contributing-to-a-project-managed-using-git
---
GIT is a popular and powerful open source version control system. In many respects it is ideal VCS if you are working in project with medium to large team size. These are a couple of useful guidelines for you if you are contributing in a project using GIT as VCS:

1. Create a branch for each logical change you are doing:

    For each logical change of yours like fixing a bug or creating a new feature avoid using master branch and rather create a new branch. This will save you from reverting your changes and rebasing your master in case your changes do not make to master branch of the main project repo.

2. Base the code you are contributing against suitable branch:

    Base your change against suitable branch, for example a new feature should ideally be rebased against master branch. A bug fix generally on maintenance branch, if the bug is reported from code of some branch not yet merge into master, base your change against that branch.

3. Do not commit white spaces:

    Most annoying change in a file on git repo are blank space, they mostly creep in because of the IDE codestyle settings. You can check you files for blank spaces introduced prior to commit using the command:

    `git diff –check`

4. Make separate commits for logically separate changes:

    For each logically separate change create a new commit. Committing together 5 small bug fixes in a commit or creating 5 different commits for a small new feature are not good idea. Logical and atomic commits help others to understand your change. They are also useful if you want to get rid of some specific code change at a later point.

    You might do frequent small commits in your branch that’s actually useful to keep your code changes safe, in that case it would be good idea to squash your commits and clean commit history before pushing your code to main repo so that everyone else gets a clean copy. But yes it is not recommended to change commit history after it is shared with others.

5.  As a rule the first line should be a concise message not more than 50 letters, that should be followed by a blank line and a detailed message. The original format specified by Tim Pope is:

        Short (50 chars or less) summary of changes_

        More detailed explanatory text, if necessary. Wrap it to about 72 characters or so.
        In some contexts, the first line is treated as the subject of an email and the rest of the text as the body.
        The blank line separating the summary from the body is critical (unless you omit the body entirely);
        tools like rebase can get confused if you run the two together.

        Further paragraphs come after blank lines.

        * Bullet points are okay, too

        * Typically a hyphen or asterisk is used for the bullet,preceded by a single space,
          with blank lines in between, but conventions vary here

    Also take care to describe your changes in an imperative mode.

6. Contributing to a public project – Interactive rebasing and squashing to create clean PR:

    If you are contributing your code to a public repo you may not have required permissions to directly update but will rather be submitting your changes to maintainers. A preferred way to contribute to such projects is to fork the code and then create a branch for doing changes. You can then create a pull request and submit it to maintainers.

    `git request-pull origin/master myfork`

    Interactively rebase and squashing your commits prior to creating PR can be very helpful to create clean commits and keep project history clean.  It also helps to get rid for merge commits.


text:
# DI library/framework to simplify development

* Status: accepted

## Context and Problem Statement

How to construct all objects required for application to run correctly?
How to manage dependencies between objects?

## Decision Drivers

* fast
* will not bloat the code with framework approach

## Considered Options

* spring
* guice

## Decision Outcome

Chosen option: guice, because it's fast, lightweight and allows to test how DI works with library instead of framework.

I've decided to use @Inject to simplify object creation and declare all dependencies on the constructor.

### Positive Consequences

* Application startup time will be fast
* each module will have clearly defined boundaries

### Negative Consequences

* it offers nothing more than DI library

repository: pchudzik/edu-ddd

gha_language: Java

repo_name: pchudzik/edu-ddd


text:
# connect-memjs

  Memcached session store forked from using [connect-memcached](https://github.com/balor/connect-memcached), using [memjs](https://github.com/alevy/memjs) as the underlying memcached client.

  This enables faster binary transport and authentication, which is needed to use the [Memcachier](https://www.memcachier.com) service.

  Many thanks to [balor](https://github.com/balor) who wrote the original implementation - this module simply swaps out the memcached client.

## Installation

  via npm:

      $ npm install connect-memjs

## Example

      /**
      * Module dependencies.
      */

      var express = require('express')
        , session = require('express-session')
        , favicon = require('serve-favicon')
        , logger = require('morgan')
        , cookieParser = require('cookie-parser')
        , http = require('http')
        , app = express();

      // pass the express to the connect memcached module
      // allowing it to inherit from express.session.Store
      var MemcachedStore = require('connect-memjs')(session);

      app.use(favicon());

      // request logging
      app.use(logger());

      // required to parse the session cookie
      app.use(cookieParser());

      // Populates:
      // - req.session
      // - req.sessionStore
      // - req.sessionID (or req.session.id)

      var store = new MemcachedStore({servers: ['<IP_ADDRESS>:1121'], username: 'liam', password: 'hunter2'});
      app.use(session({
        secret: 'CatOnTheKeyboard',
        store:
      }));

      app.get('/', function(req, res){
        if (req.session.views) {
          ++req.session.views;
        } else {
          req.session.views = 1;
        }
        res.send('Viewed <strong>' + req.session.views + '</strong> times.');
      });

      http.createServer(app).listen(3000, function(){
        console.log('Express app started on port 3000');
      });

## Options

    - `servers` Memcached servers locations, as an array of strings.
    - `username` An optional username to authenticate with
    - `password` An optional password to authenticate with
    - `prefix` An optional prefix for each memcache key, in case you are sharing
               your memcached servers with something generating its own keys.
    - ...     Rest of given option will be passed directly to the node-memcached constructor.

  For details see [memjs](https://github.com/alevy/memjs).

## License

(The MIT License)

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

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

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: liamdon/connect-memjs

repo_name: liamdon/connect-memjs


text:
> [Go to French version](/fr/Lois/Lois%20du%20Canada/2015/ch.%2036.md)

# Economic Action Plan 2015 Act, No. 1

**S.C. 2015, c. 36**

Assented to on 23 June 2015

----------

Her Majesty, by and with the advice and consent of the Senate and House of Commons of Canada, enacts as follows:

## Short Title

**Short title**

**1** This Act may be cited as the Economic Action Plan 2015 Act, No. 1.

**PART 1**
## Amendments to the Income Tax Act and to Related Legislation

### [Income Tax Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(5th%20Supp.).md)

**2** [Amendment]

**3** [Amendment]

**4** [Amendment]

**5** [Amendment]

**6** [Amendment]

**7** [Amendments]

**8** [Amendment]

**9** [Amendment]

**10** [Amendment]

**11** [Amendment]

**12** [Amendments]

**13** [Amendment]

**14** [Amendment]

**15** [Amendment]

**16** [Amendment]

**17** [Amendment]

**18** [Amendments]

**19** [Amendment]

### [Income Tax Regulations](/en/Regulations/Consolidated%20Regulations%20of%20Canada/901-1000/C.R.C.,%20c.%20945.md)

**20** [Amendments]

**21** [Amendment]

**22** [Amendment]

**23** [Amendments]

**24** [Amendment]

**25** [Amendment]

**26** [Amendment]

### [Canada Pension Plan Regulations](/en/Regulations/Consolidated%20Regulations%20of%20Canada/301-400/C.R.C.,%20c.%20385.md)

**27** [Amendments]

### [Insurable Earnings and Collection of Premiums Regulations](/en/Regulations/Statutory%20Orders%20and%20Regulations/97/33.md)

**28** [Amendments]

**PART 2**
## Support for Families

**DIVISION 1**
### [Income Tax Act](/en/Acts/Statutes%20of%20Canada/1985/c.%201%20(5th%20Supp.).md)

**29** [Amendment]

**30** [Amendment]

**31** [Amendments]

**32** [Amendment]

**33** [Amendment]

**34** [Amendment]

**DIVISION 2**
### [Universal Child Care Benefit Act](/en/Acts/Statutes%20of%20Canada/2006/c.%204,%20s.%20168.md)

#### Amendments to the Act

**35** [Amendment]

**36** [Amendment]

**37** [Amendments]

#### Related Amendments to the [Children’s Special Allowances Act](/en/Acts/Statutes%20of%20Canada/1992/c.%2048,%20Sch..md)

**38** [Amendment]

**39** [Amendment]

#### Coming into Force

**July 1, 2015**

**40** This Division comes into force, or is deemed to have come into force, on July 1, 2015.

**PART 3**
## Various Measures

**DIVISION 1**
### [Federal Balanced Budget Act](/en/Acts/Statutes%20of%20Canada/2015/c.%2036,%20s.%2041.md)

#### Enactment of Act

**Enactment**

**41** The [Federal Balanced Budget Act](/en/Acts/Statutes%20of%20Canada/2015/c.%2036,%20s.%2041.md), whose text is as follows and whose schedule is set out in Schedule 1 to this Act, is enacted:
> [See Federal Balanced Budget Act]

**DIVISION 2**
### [Prevention of Terrorist Travel Act](/en/Acts/Statutes%20of%20Canada/2015/c.%2036,%20s.%2042.md)

#### Enactment of Act

**Enactment**

**42** The [Prevention of Terrorist Travel Act](/en/Acts/Statutes%20of%20Canada/2015/c.%2036,%20s.%2042.md) is enacted as follows:
> [See Prevention of Terrorist Travel Act]

#### Related Amendment to the [Canada Evidence Act](/en/Acts/Revised%20Statutes%20of%20Canada/C/C-5.md)

**43** [Amendment]

**DIVISION 3**
### Intellectual Property

#### [Industrial Design Act](/en/Acts/Revised%20Statutes%20of%20Canada/I/I-9.md)

**44** [Amendment]

**45** [Amendment]

**46** [Amendment]

**47** [Amendments]

**48** [Amendment]

**49** [Amendment]

#### [Patent Act](/en/Acts/Revised%20Statutes%20of%20Canada/P/P-4.md)

**50** [Amendment]

**51** [Amendment]

**52** [Amendment]

**53** [Amendments]

**54** [Amendment]

**55** [Repealed before coming into force, 2017, c. 6, s. 136]

**56** [Amendment]

**57** [Amendment]

**58** [Amendments]

**59** [Amendment]

**60** [Repealed before coming into force, 2017, c. 6, s. 136]

**61** [Amendments]

**62** [Amendments]

**63** [Amendment]

**64** [Amendment]

**65** [Amendments]

#### [Trade-marks Act](/en/Acts/Revised%20Statutes%20of%20Canada/T/T-13.md)

**66** [Amendment]

**67** [Amendment]

**68** [Amendment]

**69**

- **(1)** [Repealed before coming into force, 2015, c. 36, s. 70]

- **(2)** [Repealed before coming into force, 2018, c. 27, s. 239]

#### Coordinating Amendments

**70** [Amendments]

**71** [Amendments]

#### Coming into Force

**Order in council — [Industrial Design Act](/en/Acts/Revised%20Statutes%20of%20Canada/I/I-9.md)**

**72**

- [*]**(1)** Sections 44, 45 and 47 to 49 come into force on a day to be fixed by order of the Governor in Council, but that day must not be before the day on which sections 102 to 113 of the Economic Action Plan 2014 Act, No. 2 come into force.

*: [Note: Sections 44, 45 and 47 to 49 in force November 5, 2018, *see* SI/2018-45.]

**Order in council — [Patent Act](/en/Acts/Revised%20Statutes%20of%20Canada/P/P-4.md)**

- [*]**(2)** Sections 50 to 53, 55 to 62, 64 and 65 come into force on a day to be fixed by order of the Governor in Council, but that day must not be before the day on which sections 114 to 141 of the Economic Action Plan 2014 Act, No. 2 come into force.

*: [Note: Sections 50 to 53, 56 to 62, 64 and 65 in force October 30, 2019, *see* SI/2019-46.]

**Order in council — [Trade-marks Act](/en/Acts/Revised%20Statutes%20of%20Canada/T/T-13.md)**

- [*]**(3)** Section 67 and subsection 69(2) come into force on a day to be fixed by order of the Governor in Council, but that day must not be before the day on which section 357 of the [Economic Action Plan 2014 Act, No. 1](/en/Acts/Statutes%20of%20Canada/2014/c.%2020.md) comes into force.

*: [Note: Section 67 in force June 17, 2019, *see* SI/2018-100; subsection 69(2) repealed before coming into force, *see* 2018, c. 27, s. 239.]

**Order in council — sections 46, 63 and 68**

- [*]**(4)** Sections 46, 63 and 68 come into force on a day or days to be fixed by order of the Governor in Council.

*: [Note: Section 46 in force November 5, 2018, *see* SI/2018-45; sections 63 and 68 in force November 5, 2018, *see* SI/2018-49.]

**Twelve months after royal assent**

- [*]**(5)** Sections 54 and 66 come into force 12 months after the day on which this Act receives royal assent.

*: [Note: Sections 54 and 66 in force June 24, 2016.]

**Subsection 69(1)**

- [*]**(6)** Subsection 69(1) comes into force on the first day on which both section 359 of the [Economic Action Plan 2014 Act, No. 1](/en/Acts/Statutes%20of%20Canada/2014/c.%2020.md) and section 68 are in force.

*: [Note: Subsection 69(1) repealed before coming into force, *see* 2015, c. 36, s. 70.]

**DIVISION 4**
### Compassionate Care Leave and Benefits

#### [Canada Labour Code](/en/Acts/Revised%20Statutes%20of%20Canada/L/L-2.md)

**73** [Amendments]

#### [Employment Insurance Act](/en/Acts/Statutes%20of%20Canada/1996/c.%2023.md)

**74** [Amendments]

**75** [Amendments]

**76** [Amendment]

**77** [Amendments]

**78** [Amendments]

#### Transitional Provisions

**79** [Transitional Provisions]

#### Coming into Force

**January 3, 2016**

**80** This Division comes into force on January 3, 2016.

**DIVISION 5**
### [Copyright Act](/en/Acts/Revised%20Statutes%20of%20Canada/C/C-42.md)

**81** [Amendments]

**82** [Related Provision]

**DIVISION 6**
### [Export Development Act](/en/Acts/Revised%20Statutes%20of%20Canada/E/E-20.md)

#### Amendments to the Act

**83** [Amendment]

**84** [Amendments]

**85** [Amendment]

#### Coming into Force

**Order in council**

[*]**86** This Division comes into force on a day to be fixed by order of the Governor in Council.

*: [Note: Division 6 in force May 18, 2017, *see* SI/2017-27.]

**DIVISION 7**
### [Canada Labour Code](/en/Acts/Revised%20Statutes%20of%20Canada/L/L-2.md)

#### Amendments to the Act

**87** [Amendment]

**88** [Amendment]

**89** [Amendment]

**90** [Amendment]

**91** [Amendments]

**92** [Amendments]

#### Coming into Force

**Order in council**

[*]**93** The provisions of this Division come into force on a day or days to be fixed by order of the Governor in Council.

*: [Note: Section 87 in force September 14, 2015, *see* SI/2015-78.]

**DIVISION 8**
### [Members of Parliament Retiring Allowances Act](/en/Acts/Revised%20Statutes%20of%20Canada/M/M-5.md)

**94** [Amendment]

**95** [Amendment]

**96** [Amendment]

**DIVISION 9**
### [National Energy Board Act](/en/Acts/Revised%20Statutes%20of%20Canada/N/N-7.md)

**97** [Amendments]

**DIVISION 10**
### [Parliament of Canada Act](/en/Acts/Revised%20Statutes%20of%20Canada/P/P-1.md)

#### Amendments to the Act

**98** [Amendment]

#### Transitional Provisions

**99** [Transitional Provision]

**100** [Transitional Provision]

**101** [Transitional Provision]

**102** [Transitional Provision]

**103** [Transitional Provision]

**104** [Transitional Provision]

**105** [Transitional Provision]

**106** [Transitional Provision]

**107** [Transitional Provision]

**108** [Transitional Provision]

**109** [Transitional Provision]

**110** [Transitional Provision]

**111** [Transitional Provision]

**112** [Transitional Provision]

**113** [Transitional Provision]

**114** [Transitional Provision]

**115** [Transitional Provision]

**116** [Transitional Provision]

**117** [Transitional Provision]

**118** [Transitional Provision]

**119** [Transitional Provision]

**120** [Transitional Provision]

**121** [Transitional Provision]

**122** [Transitional Provision]

#### Consequential Amendments

##### [Canada Post Corporation Act](/en/Acts/Revised%20Statutes%20of%20Canada/C/C-10.md)

**123** [Amendment]

##### [Federal Courts Act](/en/Acts/Revised%20Statutes%20of%20Canada/F/F-7.md)

**124** [Amendment]

##### [Financial Administration Act](/en/Acts/Revised%20Statutes%20of%20Canada/F/F-11.md)

**125** [Amendments]

##### [Garnishment, Attachment and Pension Diversion Act](/en/Acts/Revised%20Statutes%20of%20Canada/G/G-2.md)

**126** [Amendment]

**127** [Amendment]

**128** [Amendment]

**129** [Amendments]

**130** [Amendments]

**131** [Amendments]

**132** [Amendments]

**133** [Amendments]

**134** [Amendment]

**135** [Amendment]

##### [Government Employees Compensation Act](/en/Acts/Revised%20Statutes%20of%20Canada/G/G-5.md)

**136** [Amendment]

##### [Public Service Superannuation Act](/en/Acts/Revised%20Statutes%20of%20Canada/P/P-36.md)

**137** [Amendment]

##### [Radiocommunication Act](/en/Acts/Revised%20Statutes%20of%20Canada/R/R-2.md)

**138** [Amendments]

##### [Parliamentary Employment and Staff Relations Act](/en/Acts/Statutes%20of%20Canada/1985/c.%2033%20(2nd%20Supp.).md)

**139** [Amendment]

**140** [Amendment]

**141** [Amendment]

**142** [Amendment]

##### [Non-smokers’ Health Act](/en/Acts/Statutes%20of%20Canada/1985/c.%2015%20(4th%20Supp.).md)

**143** [Amendment]

##### [Official Languages Act](/en/Acts/Statutes%20of%20Canada/1985/c.%2031%20(4th%20Supp.).md)

**144** [Amendment]

**145** [Amendment]

**146** [Amendments]

**147** [Amendment]

**148** [Amendment]

**149** [Amendment]

##### [Public Sector Compensation Act](/en/Acts/Statutes%20of%20Canada/1991/c.%2030.md)

**150** [Amendment]

##### [Public Service Employment Act](/en/Acts/Statutes%20of%20Canada/2003/c.%2022,%20ss.%2012,%2013%20.md)

**151** [Amendment]

##### [Expenditure Restraint Act](/en/Acts/Statutes%20of%20Canada/2009/c.%202,%20s.%20393.md)

**152** [Amendment]

**DIVISION 11**
### [Employment Insurance Act](/en/Acts/Statutes%20of%20Canada/1996/c.%2023.md)

#### Amendments to the Act

**153** [Amendment]

**154** [Amendment]

**155** [Amendment]

**156** [Amendment]

**157** [Amendment]

#### Transitional Provision

**158** [Repealed, 2016, c. 7, s. 230]

#### Consequential Amendments

##### [Modernization of Benefits and Obligations Act](/en/Acts/Statutes%20of%20Canada/2000/c.%2012.md)

**159** [Amendment]

##### [Budget Implementation Act, 2000](/en/Acts/Statutes%20of%20Canada/2000/c.%2014.md)

**160** [Amendment]

**DIVISION 12**
### [Canada Small Business Financing Act](/en/Acts/Statutes%20of%20Canada/1998/c.%2036.md)

**161** [Amendment]

**162** [Amendments]

**163** [Amendment]

**DIVISION 13**
### [Personal Information Protection and Electronic Documents Act](/en/Acts/Statutes%20of%20Canada/2000/c.%205.md)

**164** [Amendment]

**165** [Amendment]

**166** [Amendment]

**DIVISION 14**
### [Proceeds of Crime (Money Laundering) and Terrorist Financing Act](/en/Acts/Statutes%20of%20Canada/2000/c.%2017.md)

**167** [Amendment]

**DIVISION 15**
### [Immigration and Refugee Protection Act](/en/Acts/Statutes%20of%20Canada/2001/c.%2027.md)

#### Amendments to the Act

**168** [Amendment]

**169** [Amendments]

**170** [Amendment]

**171** [Amendments]

**172** [Amendment]

**173** [Amendment]

**174** [Amendment]

**175** [Amendment]

#### Coming into Force

**Order in council**

**176**

- [*]**(1)** Sections 168 and 170, subsection 171(2) and section 174 come into force on a day to be fixed by order of the Governor in Council.

*: [Note: Sections 168 and 170, subsection 171(2) and section 174 in force July 31, 2018, *see* SI/2018-47.]

**Order in council**

- [*]**(2)** Subsections 169(1) and (2) and 171(1) and (3) and sections 172, 173 and 175 come into force on a day or days to be fixed by order of the Governor in Council.

*: [Note: Subsections 169(1) and 171(1) and (3) and sections 172, 173 and 175 in force October 18, 2017, *see* SI/2017-58.]

**DIVISION 16**
### [First Nations Fiscal Management Act](/en/Acts/Statutes%20of%20Canada/2005/c.%209.md)

#### Amendments to the Act

**177** [Amendments]

**178** [Amendments]

**179** [Amendments]

**180** [Amendments]

**181** [Amendments]

**182** [Amendment]

**183** [Amendment]

**184** [Amendment]

**185** [Amendment]

**186** [Amendments]

**187** [Amendment]

**188** [Amendment]

**189** [Amendments]

**190** [Amendments]

**191** [Amendments]

**192** [Amendments]

**193** [Amendment]

**194** [Amendment]

**195** [Amendment]

**196** [Amendment]

**197** [Amendment]

**198** [Amendment]

**199** [Amendment]

**200** [Amendment]

**201** [Amendment]

**202** [Amendment]

**203** [Amendment]

**204** [Amendment]

#### Coming into Force

**Order in council**

[*]**205** The provisions of this Division come into force on a day or days to be fixed by order of the Governor in Council.

*: [Note: Sections 177 to 204 in force April 1, 2016, *see* SI/2016-14.]

**DIVISION 17**
### Canadian Forces Members and Veterans Re-establishment and Compensation Act

#### Amendments to the Act

**206** [Amendment]

**207** [Amendment]

**208** [Amendment]

**209** [Amendments]

**210** [Amendment]

**211** [Amendment]

**212** [Amendment]

**213** [Amendment]

**214** [Amendment]

**215** [Amendment]

**216** [Amendment]

**217** [Amendment]

**218** [Amendment]

**219** [Amendment]

**220** [Amendment]

**221** [Amendment]

**222** [Amendments]

**223** [Amendment]

**224** [Amendment]

**225** [Amendments]

#### Consequential Amendments to the [Veterans Review and Appeal Board Act](/en/Acts/Statutes%20of%20Canada/1995/c.%2018.md)

**226** [Amendment]

**227** [Amendments]

#### Coordinating Amendment

**228** [Repealed, 2016, c. 7, s. 115]

#### Coming into Force

**July 1, 2015**

**229** This Division comes into force, or is deemed to have come into force, on July 1, 2015.

repository: TravisMadill/CanadianLaws

path: /en/Acts/Statutes of Canada/2015/c. 36.md

repo_name: TravisMadill/CanadianLaws


text:
# team-mixer

### Project Introduction
This is a program to automate the creation of a team summary with detailed information.

### Project Objective:
Deploy a command-line application that generates a team overview page based on user provided information through CLI prompts.

### Areas of focus:
    Command-line application development
    Clean, lean and reliable code logic
    Object oriented focused development
    Functional scripts
    Implementation of handlebar placeholders
    Display qualified results
    Passing all unit tests

### Project Repository Link:
https://github.com/victoriacmlee/team-mixer

Project Screenshots in images folder.

### License
MIT

repository: ruo-si/team-mixer

repo_name: ruo-si/team-mixer


text:
# S3 Access Logs Analysis
This script collects all the S3 access logs in the specified bucket, and checks if any of the traffic to and from the
bucket does not use SSL.

## Table of contents
* [Architecture](#architecture)
* [Setup](#setup)

## Architecture

![Architecture](assets/arch.png?raw=true "Architecture")

## Setup

### SageMaker role
To run the notebook inside the account's SageMaker, a SageMaker role must be created with READ
permissions to the logs bucket and write permissions to the bucket where the results will be stored.
Also, the relevant athena permissions (AthenaFullAccess permissions) should be attached to this role.

### Envrioment Variables
Configure AWS SDK with the account to collect (profile entry in AWS shared credentials file).
In addition, the following environment variables needs to be set:

* `S3_ACCESS_LOGS_BUCKET` - S3 bucket that contains all the S3 access logs (*required*)
* `OUTPUT_BUCKET_NAME` - S3 bucket where the query result will be saved to (*required*)
* `ATHENA_DATABASE_NAME` - The name of the Athena DB to be created. Default is `s3_access_logs`
* `ATHENA_TABLE_NAME` - The name of the Athena Table to be created. Default is `s3_access_logs_table`
* `ATHENA_VIEW_NAME` - The name of the Athena Table to be created. Default is `s3_access_logs_view`

### Workspace
* Install required Python packages with pipenv:

   `pipenv update`

* Launch a Jupyter session to use the notebook:

   `jupyter notebook`

### Description

The following steps are carried throughout the process:

* A matching Athena database, table and view are created and populated by the access logs from the bucket selected
* Query Athena view for un-secure traffic
* Display the un-secure traffic and the identity which initiated it, if such exist.

repository: Didato/cloud-security-notebooks

repo_name: Didato/cloud-security-notebooks


text:
# Specification

|         |                                                                         |
|:------- | ----------------------------------------------------------------------- |
| Title   | Remote access for Chronicle Map RFC                                     |
| URL     | https://github.com/OpenHFT/RFC/blob/master/Chronicle/Map/Remote/Remote-Chronicle-Map-0.1.md |
| Editor  | Peter Lawrey                                                            |
| License | Apache 2.0                                                              |
| Change Process | Users issue Pull Requests for the Editor's consideration.        |
| Status  | Raw.                                                                    |

# Goals
An RFC for library specific requirements for Remote access to a Chronicle Map. See the parent RFC for cross library requirements.

## Remote access.
This section details the services a Chronicle Map exposes and wire protocol for the methods.

### Services
| Service           | Relative URI                  |
| ----------------- | ----------------------------- |
| Unqualified Map   | map-name                      |
| Qualified Map     | map-name#Map                  |
| Keys of Map       | map-name#keySet               |
| Entries of Map    | map-name#entrySet             |
| Values of Map     | map-name#values               |
| Replication       | map-name#replication          |

These proxies can be returned by methods and should be serialized when sending to the server

### Method calls
In all the examples below the `csp:` can be replaced with a `cid:` which is a short token to improve the efficiency of the routing logic.

#### Map proxies
For entrySet(), the client sends
```yaml
--- !!meta-data
csp://server/path/map-name#Map
# or
cid: 1212
tid: 123456789
--- !!data
entrySet: { }
```

The server replies
```yaml
--- !!meta-data
tid: 123456789
--- !!data
reply: !!set-proxy { csp://server/path/map-name#entrySet, cid: 1234 }
```

For keySet(), the client sends
```yaml
--- !!meta-data
csp://server/path/map-name#Map
# or
cid: 1212
tid: 123456789
--- !!data
keySet: { }
```

The server replies
```yaml
--- !!meta-data
tid: 123456789
--- !!data
reply: !!proxy { csp://server/path/map-name#keySet, cid: 1235 }
```
The sample applies to `values()` returning `csp://server/path/map-name#values`

#### Map get
The client sends
```yaml
--- !!meta-data
csp://server/path/map-name#Map
tid: 123456789
--- !!data
get: 1
```

The server replies with the payload.
```yaml
--- !!meta-data
tid: 123456789
--- !!data
reply: Bonjour
```

#### Map put
If the client expects a reply
```yaml
--- !!meta-data
csp://server/path/map-name#Map
tid: 123456789
--- !!data
getAndPut: { key: 1, value: Hello }
```

The server sends back
```yaml
--- !!meta-data
tid: 123456789
--- !!data
reply: !!null     # for no return
```

Or if the server gets an error
```yaml
--- !!meta-data
tid: 123456789
--- !!data
reply: !IllegalArgumentException "Invalid key type"
```

or the server sends back the previous value
```yaml
--- !!meta-data
tid: 123456789
--- !!data
reply: Bonjour
```

If the client doesn't expect a reply
```yaml
--- !!meta-data
csp://server/path/map-name#Map
--- !!data
put: { key: 1, value: Hello }
```

The server doesn't send anything.

#### Map putAll
Client sends
```yaml
--- !!meta-data
csp://server/path/map-name#Map
--- !!not-ready-data
put:
 - { key: 1, value: Hello1 }
 - { key: 2, value: Hello2 }
 - { key: 3, value: Hello3 }
 - { key: 4, value: Hello4 }
 - { key: 5, value: Hello5 }
--- !!data
put:
 - { key: 6, value: Hello6 }
 - { key: 7, value: Hello7 }
 - { key: 8, value: Hello8 }
 - { key: 9, value: Hello9 }
 -  { key: 10, value: Hello10 }
```

The server doesn't send back a reply.

#### Map putAll of a proxy

Client sends
```yaml
--- !!meta-data
csp://server/path/map-name#Map
tid: 123456789
--- !!not-ready-data
putAll: csp://server/path/map-name2#Map
```

The server doesn't send back a reply.

#### Map size and isEmpty
To determine the size of the map or if the map is empty. `isEmpty()` can test `size() > 0`

Client sends
```yaml
--- !!meta-data
csp://server/path/map-name#Map
tid: 123456789
--- !!data
size: { }
```

The server replies with
```yaml
--- !!meta-data
tid: 123456789
--- !!data
reply: 1212121
```

#### Map toString()
Client sends
```yaml
--- !!meta-data
csp://server/path/map-name#Map
tid: 123456789
--- !!data
toString: { }
```

For short replies, the server replies with
```yaml
--- !!meta-data
tid: 123456789
--- !!data
reply: "{ 1=Hello, 2=World }"
```

For long replies, the server replies with
```yaml
--- !!meta-data
tid: 123456789
--- !!not-ready-data
reply: "{ 1=Hello,"
--- !!not-ready-data
reply-append: "2=World,"
--- !!data
reply-append: "3=Bye }"
```
#### Map remove
Client sends
```yaml
--- !!meta-data
csp://server/path/map-name#Map
--- !!data
remove: { key: 12, reply: false }
```

or using the keySet()

```yaml
--- !!meta-data
csp://server/path/map-name#keySet()
tid: 123456789
--- !!data
remove: { element: 12, reply: true }
```

and the server replies
```yaml
--- !!meta-data
tid: 123456789
--- !!data
reply: { 1=Hello, 2=World }
```

#### iterator()
When the client starts a stream, it must tell the server when it is ready for more data.
```yaml
--- !!meta-data
csp://server/path/map-name#entrySet
tid: 123456789
--- !!not-ready-data
iterator: { }
```
The server replies with
```yaml
--- !!meta-data
tid: 123456789
--- !!data
entry:
 - { key: 1, value: Hello1 }
 - { key: 2, value: Hello2 }
 - { key: 3, value: Hello3 }
 - { key: 4, value: Hello4 }
 - { key: 5, value: Hello5 }
```
Once the client has received this:
```yaml
--- !!meta-data
csp://server/path/map-name#entrySet
--- !!data
iterator-continue: { tid: 123456789 }
```
And the server give some more.
```yaml
--- !!meta-data
tid: 123456789
--- !!data
entry:
 - { key: 6, value: Hello6 }
 - { key: 7, value: Hello7 }
 - { key: 8, value: Hello8 }
 - { key: 9, value: Hello9 }
 - { key: 10, value: Hello10 }
```

The client could prefetch an additional block from the start.
```yaml
--- !!meta-data
csp://server/path/map-name#entrySet
tid: 123456789
--- !!not-ready-data
iterator: { }
iterator-continue: { tid: 123456789 }
```
This causes two blocks to be in flight at once reducing the stop-start behaviour for downloading.

Once the iteration has finished, the server sends
```yaml
--- !!meta-data
tid: 123456789
--- !!data
entry: { key: 11, value: Hello11 }
hasNext: true
```

#### Replication
The sender pushes an update
```yaml
--- !!meta-data
csp://server/path/map-name#replication
# or
cid: 2121
--- !!data
update: { key: 12, value: "Crazy", timestamp:<PHONE_NUMBER>, id: 5 }
```

The sender pushes a remove
```yaml
--- !!meta-data
csp://server/path/map-name#replication
# or
cid: 2121
--- !!data
remove: { key: 12, timestamp:<PHONE_NUMBER>, id: 5 }
```

The sender requests being notified of updates.
```yaml
--- !!meta-data
csp://server/path/map-name#replication
# or
cid: 2121
--- !!data
subscribe: { all: true }
```

or to unsubscribe All
```yaml
--- !!meta-data
csp://server/path/map-name#replication
# or
cid: 2121
--- !!data
unsubscribe: { all: true }
```

Future versions will need to subscribe selectively.

repository: lburgazzoli/RFC

repo_name: lburgazzoli/RFC


text:
# dbase

**dBase data file**

???+ abstract "In short"
    Proprietary legacy format for tabular data.

item | info
--- | ---
types | [Database](../dataTypes/database.md)
preferred | ❌ no
extensions | [`.dbf`](../extensions/dbf.md)
related formats | [Access](../fileFormats/access.md), [CSV](../fileFormats/csv.md), [HDF5](../fileFormats/hdf5.md), [SIARD](../fileFormats/siard.md), [SQL](../fileFormats/sql.md), [XML](../fileFormats/xml.md)
wikipedia | [`DBase`]({{wikipedia}}/DBase), [`.dbf`]({{wikipedia}}/.dbf)

## Description

dBase is a proprietary product.
The company behind
dBase will still support older versions of the format. For versions earlier than
7 no official documentation is made available.

## Recommendation

*dBase* formats can be read in
several different database applications, including
[LibreOffice/OpenOffice]({{libreoffice}}),
[MySQL]({{mysql}})
and
[MS Access]({{msaccess}}).
From these applications, it is possible to export the dBase data
into other formats, such as
[SQL](../fileFormats/sql.md) or [CSV](../fileFormats/csv.md).

## See also
*   [`dbase`](dbase)

repository: Dans-labs/formats

repo_name: Dans-labs/formats


text:
# Raw Queries

## Contents

- [The Basics](#the-basics)
- [Other Query Methods](#other-query-methods)
- [PDO Connections](#pdo-connections)

## The Basics

The **query** method is used to execute arbitrary, raw SQL against your database connection.

#### Selecting records from the database:

	$users = DB::query('select * from users');

#### Selecting records from the database using bindings:

	$users = DB::query('select * from users where name = ?', array('test'));

#### Inserting a record into the database

	$success = DB::query('insert into users values (?, ?)', $bindings);

#### Updating table records and getting the number of affected rows:

	$affected = DB::query('update users set name = ?', $bindings);

#### Deleting from a table and getting the number of affected rows:

	$affected = DB::query('delete from users where id = ?', array(1));

## Other Query Methods

Laravel provides a few other methods to make querying your database simple. Here's an overview:

#### Running a SELECT query and returning the first result:

	$user = DB::first('select * from users where id = 1');

#### Running a SELECT query and getting the value of a single column:

	$email = DB::only('select email from users where id = 1');

## PDO Connections

Sometimes you may wish to access the raw PDO connection behind the Laravel Connection object.

#### Get the raw PDO connection for a database:

	$pdo = DB::connection('sqlite')->pdo;

> **Note:** If no connection name is specified, the **default** connection will be returned.

repository: pixeline/bugs

gha_language: PHP

repo_name: pixeline/bugs


text:
# swansonsays

## What is this?

A CLI utility to shower you with some good ol' Ron Swanson wisdom.

## Who is Ron Swanson?
Ron is the director of the Parks and Recreation department of Pawnee, Indiana. Read more about him [here.](https://en.wikipedia.org/wiki/Ron_Swanson)

## How to run this tool?
Run `npx swansonsays` on your terminal. You should have `npx` installed already if you have a recent version of [node](https://nodejs.org/en/) installed on your machine.

![](https://user-images.githubusercontent.com/21967563/80956605-2a1e9880-8e1f-11ea-8b18-afbaf7ff8499.png)

## What is the source of these quotes?
The quotes are being fetched from [this](http://ron-swanson-quotes.herokuapp.com/v2/quotes) API.

## Was this necessary?
Does Ron Swanson love America?


text:
Speaker: Leo Siqueira (RSMAS)

Title: Python bytes on spatial-temporal data. Basics and perspectives.

Summary:
   *  Python language and object-oriented programming
   *  Brief intro to Object and Class.
   *  Why Python?
   *  Standard libraries and package index.
   *  Python distribution - Anaconda.
   *  Python bindings - all purpose glue.
   *  Online climate data examples using Interactive Python Notebook.

repository: msdevana/lunch-bytes

repo_name: msdevana/lunch-bytes


text:
# eco Governance Framework

Based on the Sovrin Governance Framework, a governance framework for Blockchain technology is being developed. The Sovrin Steward Technical and Organizational Policies V2 were used and analysed and adapted for the eco Governance Framework. Subsequently, of course, also extended.

---

## General Security Policies

First the questions are extracted from the guidelines and then examples of implementation are given.

 1. What does a secure organizational structure look like and how do you implement it?
 2. How to ensure continuous safe operation?
 3. How do you regulate security for administrative staff?
 4. How do you ensure the ongoing operation and integrity of your employees?
 5. What are the physical security requirements?
 6. What are the security requirements for outsourcing to a third-party provider?
 7. How is compliance with this Directive ensured for the operator?

___

 1. Security policies and practices must be defined and provided in order to operate a steward. This includes all services    related to the operation of the steward and the staff involved. An employee must be appointed to supervise the correct operation. This includes reviewing and updating the guidelines and, in addition to training employees, enforcing the guidelines.
 2. The safety guidelines must be reviewed at least once a year to ensure safe operation.
 3. Administrative staff pose a high security risk. Accordingly, they must be reviewed regularly. This process must be initiated for new recruits and repeated regularly. This also applies to administrative employees of subsidiaries who are involved in the operation. This includes, among other things, proof of identity, police clearance certificates and other security measures that the operator considers necessary, provided that these are compatible with the law.
 4. Employees who are involved in the services provided must regularly attend training courses on security and data protection. This should be done at least once a year and an agreement should be reached which guarantees ethical behaviour in particular and also deals responsibly with confidentiality, security, data protection and privacy. In addition, tailored training and guidelines must be provided for employees who have administrative access to subcomponents.
 5. If the nodes are operated in their own premises, it must be ensured that the guidelines also guarantee physical security and access control and that the best possible industry standards are adhered to.
 6. If the nodes are hosted by a third-party provider, the operator must ensure that the security, privacy and data security policies of the third-party provider meet the requirements of this document.
 7. The operator must provide an inspection body on request with evidence of compliance with the guidelines and all accreditations. In particular certificates, attestations or reports from accredited third parties. This includes standards such as ISO 27001, SSAE SOC 2 and others.

---

## General Node Policies

 1. Availability and type of nodes?
 2. Operation of the node? (software)
 3. Software update window?
 4. Updating the node configuration?
 5. Number of employees required to operate the node?
 6. Accessibility of the administrators?
 7. Time window for recovery after error or system failure?

___

 1. The nodes must be available as validation nodes or observation nodes in the network.
 2. The node must run software specified by the Technical Board.
 3. The software must be updated within 3 working days after the Technical Board has made a recommendation and a competent management entity confirms this by vote.
 4. The configuration for the network must be transmitted to the required location in good time. To this end, the information must be updated within 3 working days in the event of changes.
 5. At least 2 IT-qualified employees must be responsible for the node as administrators. In addition, there must be another employee with access and sufficient qualifications to manage the node in an emergency. Imaginable scenarios are, attacks or when the network can not create consensus.
 6. Contact information must be provided by all administrators. These are reviewed quarterly.
 7. Backups, snapshots or images must be kept available so that a recovery after an error is possible within one hour or less.

---

## Node Technical Policies

The guidelines apply to the production network. A test network should implement these guidelines.

 1. Minimum requirements of the hardware class?
 2. Using and updating virtual machines?
 3. Minimum requirement of the software?
 4. Compatibility with certain network standards?
 5. Hardware requirement CPU?
 6. Hardware requirement RAM?
 7. Hardware requirement main memory? (hard drive)
 8. Connection to the Internet?
 9. Network requirements?
 10. Ensuring the high availability of the node?
 11. Reliable synchronization of the system time?
 12. Securing the power supply?

___

 1. The node must run on server hardware.
 2. If the node is running on a virtual machine, make sure to use a virtualization that is regularly updated by the vendor or a community and these updates must be performed regularly.
 3. The node must run on an operating system that is intended for the validator. (Single-purpose physical or virtual machine) It shall run software specified by the Technical Board, and may also use software released by the Technical Board. No other software may be run on the machine. Software that is used for configuration, backup and monitoring is permitted. However, all software packages that are transferred between the nodes and the outside world should be discussed with the technical board.
 4. Must run a server that provides a compatible operating system for network, according to the specifications of the network.
 5. Must have adequate computing power. (16 cores or more)
 6. Must have sufficient memory. ( 64 GB or more )
 7. Must have at least 2 TB of storage with the option to grow to 4 TB. For example via Raid implementations. The start partition must also be sufficiently large.
 8. Must have a high-speed connection to the Internet with highly available, fail-safe lines. 1 Gbps
 9. Must provide at least one dedicated NIC for consensus traffic and have another NIC to handle external requests. Each NIC must have a stable, static, globally routable IP address.
 10. Nodes must be implemented in such a way that the high-availability architecture is not compromised. Implementation of the node selection algorithm so that the individual nodes do not take on more responsibility than intended. So that a recovery reacts to errors within a reasonable time.
 11. A system clock is required that has been proven to be synchronized with known NTP servers.
 12. A power supply is required that meets the requirements of a high-availability system.

---

## Node Security Policies

 1. How to ensure authentication and authorization of the stewards and nodes in the network?
 2. How can it be certified that the nodes are running in a secure environment?
 3. How is the separation of public and internal systems regulated?
 4. Possibilities of remote maintenance?
 5. Realization of the access control?
 6. Update intervals of nodes and internal systems?
 7. Regulation of access control over the network?
 8. Authorization of the nodes in the network?
 9. Ensuring the ongoing integrity of the systems?

___

 1. The steward keys must be managed on a different system than the system on which the nodes run. A possible implementation would be via a "CLI (Command Line Interface) System". Thus, nodes in the network can be authorized and stewards authenticated. For this possible CLI system no high end hardware is required. However, best IT security practices must be used for nodes that meet or exceed the following guidelines.
 2. It must be ensured and certified that the node is operated in a secure data center. Including appropriate security levels and specifications at which they are targeted. For example, compliance with SSAE 16 Type II or other standards.
 3. The nodes must not run on the same system as the internal systems of the stewards. This serves to protect the internal systems because the nodes are publicly visible.
 4. It must be ensured that a current state of the art technology is used for remote access to the nodes and internal systems. (At least SSH with key plus password plus source IP firewall rule and two-factor authentication wherever possible)
 5. It must be ensured that only the assigned administrators have access to the nodes and CLI systems, whether remote or local.
 6. The latest updates must be installed within a week or less. The time limit should be as short as possible. (24 hours or less)
 7. It must be certified that the server on which the node is running is protected by a firewall. Furthermore, it must be ensured that no public access is possible, except on ports required for the node software. It must be ensured that only administrators from outside can access the systems. The output ports should also be blocked to ensure that no jumps are made from one node to another.
 8. A security audit tool must be carried out and the results subsequently submitted to the Technical Board. After approval, the node can participate in the consensus procedure.
 9. The security clearance tool shall be run from time to time as requested by the Technical Board and shall deliver the results within 3 working days.

---

## Node Operating Policies

 1. How can the alarm be implemented redundantly in the event of faults?
 2. Regulation of downtime?
 3. Network-wide planning of downtime?

___

 1. The operator must provide 2 technical contact points responsible for managing the node with an SMS-capable device for alerting.
 2. The operator should aim for 99,9 % uptime for the nodes. (This corresponds to about 1.4 minutes of downtime per day or 9 hours per year).
 3. It should coordinate with other operators in advance a downtime together with the technical board. Everything should be settled amicably.

---

## Node selection algorithm

 1. Application of the node selection algorithm?
 2. Manual adjustments of the node selection algorithm?
 3. Design of the node selection algorithm?
 4. How is the node selection algorithm made transparent and public?

 ___

 1. Active Validator nodes must be determined in the production network by the node selection algorithm defined by the Technical Board.
 2. Non-technical inputs or policy decisions implemented by the node selection algorithm MUST be approved by the Technical Board.
 3. At all times, the node selection algorithm must represent the best efforts of the Technical Board to design an algorithm that applies the basic principles of the eco Governance Framework. In recognition of the inherent tensions and trade-offs between some of the basic principles, priority should be given to balancing when designing this algorithm:
 The principles of Decentralization by Design, especially the principles of diffuse trust and high availability.
 The principles of Security by Design, especially the principles of system diversity and secure failure.
 4. A human readable, understandable and explainable description of the current draft of the algorithm as approved by the Technical Board SHALL be published by the Technical Board in the official repository and made publicly available through a web page.

---

## Permissioned Test Network Policies

 1. What configurations are possible in the permissioned test network?
 2. How is access to the permissioned test network possible?
 3. Who can become a transaction endorser for the Permissioned Test Network?
 4. What happens if personal data is found in the Permissioned Test Network?

___

 1. Via the Permissioned Test Network
The steward must serve at least one node, but can serve more than one node. Any number of nodes can be hosted as hosting providers at the steward's discretion. It is not necessary to execute the node selection algorithm.
 2. Any access to the Permissioned Test Network must be controlled by Permissioned Write Access (note that this does not allow writing personal data).
 3. To be a transactional endorser for the Permissioned Test Network, an organization must either:
Be a member of eco.
Be a steward of the permissioned test network.
Be a steward-authorized transaction support in the permissioned est network.
 4. If at any time, for any reason, personal information is discovered on the Permissioned Test Network:
A supervisory body must be notified immediately.
Within 48 hours of notification, the Control Panel must reset the Permissioned Test Network to delete the personal data.

---

## Reporting Policies

 1. How are changes to the operator to be communicated?

 ___

 1. An operator shall report any significant change in the configuration or location of a node to the competent governance body within 5 working days of the change.