text:
# CodeChallenge

Welcome to my cool gem! Please, include it into your project in order to have easy acces to coding challenge API application.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'code_challenge'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install code_challenge

## Usage

Please use `CodeChallenge::Client` class to access API. You can provide you custom url if needed for testing purpose by passing it to client inititalizer like this

```ruby
  require 'code_challenge'

  CodeChallenge::Client.new('some funky URL')
```

To make api call you can use one of 2 methods `import` and `info`

`Import` method used to upload new data to API server. Data will be uploaded and then parsed in backgroud. Response contains information about request status. It accept 2 parameters, that are file names for zip_to_cbsa file and cbsa_to_msa file respectively.

```ruby
  require 'code_challenge'

  client = CodeChallenge::Client.new
  client.import('path/to/zip_to_cbsa', 'path/to/cbsa_to_msa')
```

`Info` method used to fetch information for ZIP adress from API. It returns full list of information about specified ZIP if present on server. In other cases it returns empty response values.

```ruby
  require 'code_challenge'

  client = CodeChallenge::Client.new
  client.info('00501')

  #  => {"cbsa"=>"99999", "name"=>"N/A", "lsad"=>"N/A", "pop_2010"=>"N/A", "pop_2011"=>"N/A", "pop_2012"=>"N/A", "pop_2013"=>"N/A", "pop_2014"=>"N/A", "pop_2015"=>"N/A", "zip"=>"505"}
```

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/code_challenge. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).


text:
---
layout: post

#event information
title:  "Mozilla Stall at SNSCT"
cover: "../assets/2019-MozStall_1.jpg"
#event organiser details
organiser: "Selena"

categories: "blog"
---

![Mozilla Stall at SNSCT]({{ site.url }}/assets/2019-MozStall_1.jpg)

**Hello All!**

Texperia 2k19 is an important technical symposium held at SNS College of Technology Coimbatore. It was held on 27th and 28th Febraury 2019

![Mozilla Stall at SNSCT]({{ site.url }}/assets/2019-MozStall_2.jpg)

This time Mozilla played a victim role on Texperia.On behalf of SNSCT Mozilla Campus Club Surentharan and his team organized a Mozilla stall. The main goal of the stall was to give a clear view about Mozilla to the encaged audience and explain them about the various tracks.

Surentharan explained about what is Mozilla, it's importance, the importance of open source contribution. Others explained about the various tracks and the ways through which they can contribute.

![Mozilla Stall at SNSCT]({{ site.url }}/assets/2019-MozStall_3.jpg)

Monish Explained about WEB-VR, Satchin explained Webcompat and QA, Rust by Selena and Rogani, Localization by krishnaveni and Web Extensions by Vishali

![Mozilla Stall at SNSCT]({{ site.url }}/assets/2019-MozStall_4.jpg)

Many Students from various colleges such as BIT, NGP, Info, KCT, Karpagam, Kongu participated and they were very much interested to know about open source contribution and Mozilla.The team explained the topics in such an interesting way that it pulled the crowd towards them

#Key Metrics: 200+ Firefox Lite downloads
.

license: MIT

repository: vishalisakar/snsct

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: vishalisakar/snsct


text:
% "CONFIG.JSON" "5" "JANUARY 2016" "Docker Community" "Docker User Manuals"

# NAME
HOME/.docker/config.json - Default Docker configuration file

# INTRODUCTION

By default, the Docker command line stores its configuration files in a
directory called `.docker` within your `$HOME` directory.  Docker manages most of
the files in the configuration directory and you should not modify them.
However, you *can modify* the `config.json` file to control certain aspects of
how the `docker` command behaves.

Currently, you can modify the `docker` command behavior using environment
variables or command-line options. You can also use options within
`config.json` to modify some of the same behavior. When using these
mechanisms, you must keep in mind the order of precedence among them. Command
line options override environment variables and environment variables override
properties you specify in a `config.json` file.

The `config.json` file stores a JSON encoding of several properties:

* The `HttpHeaders` property specifies a set of headers to include in all messages
sent from the Docker client to the daemon. Docker does not try to interpret or
understand these header; it simply puts them into the messages. Docker does not
allow these headers to change any headers it sets for itself.

* The `psFormat` property specifies the default format for `docker ps` output.
When the `--format` flag is not provided with the `docker ps` command,
Docker's client uses this property. If this property is not set, the client
falls back to the default table format. For a list of supported formatting
directives, see **docker-ps(1)**.

* The `detachKeys` property specifies the default key sequence which
detaches the container. When the `--detach-keys` flag is not provide
with the `docker attach`, `docker exec`, `docker run` or `docker
start`, Docker's client uses this property. If this property is not
set, the client falls back to the default sequence `ctrl-p,ctrl-q`.

* The `imagesFormat` property  specifies the default format for `docker images`
output. When the `--format` flag is not provided with the `docker images`
command, Docker's client uses this property. If this property is not set, the
client falls back to the default table format. For a list of supported
formatting directives, see **docker-images(1)**.

You can specify a different location for the configuration files via the
`DOCKER_CONFIG` environment variable or the `--config` command line option. If
both are specified, then the `--config` option overrides the `DOCKER_CONFIG`
environment variable:

    docker --config ~/testconfigs/ ps

This command instructs Docker to use the configuration files in the
`~/testconfigs/` directory when running the `ps` command.

## Examples

Following is a sample `config.json` file:

    {
      "HttpHeaders": {
        "MyHeader": "MyValue"
      },
      "psFormat": "table {{.ID}}\\t{{.Image}}\\t{{.Command}}\\t{{.Labels}}",
      "imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}",
      "detachKeys": "ctrl-e,e"
    }

# HISTORY
January 2016, created by Moxiegirl<EMAIL_ADDRESS>

repository: docker/cli

gha_language: Go

repo_name: docker/cli


text:
# CL-EVENTS [![Build Status](https://travis-ci.org/deadtrickster/cl-events.svg)](https://travis-ci.org/deadtrickster/cl-events) [![Coverage Status](https://coveralls.io/repos/deadtrickster/cl-events/badge.svg?branch=master&service=github&qwe=1)](https://coveralls.io/github/deadtrickster/cl-events?branch=master)

Composable events system for Common Lisp

## Wut

CL-EVENTS sees event as an entity that implements the following APIs:

- `add-event-handler`
- `remove-event-handler`
- `sink-handlers-list`
- `invoke-executor`
- `invoke-event-handlers`

This was futher re-grouped as
- Sinks (`add-event-handler`, `remove-event-handler`, `sink-handlers-list`)
- Executors (`invoke-executor`)
- Events (`invoke-event-handlers`)

CL-EVENTS implements the following SINK types:

- `single-thread-think` - add/remove/list operations must be performed in single thread OR synchronized manually
- `multi-thread-think` - add/remove/list operations synchronized for you. On available platforms CAS is used.

and EXECUTOR types:

- `serial-executor` - consecutively executes handlers returned by `event-handlers-list`. The next handler executed only after previous one returned
- `chained-executor` - emulates `serial-executor` for non-blocking word. It assumes you are using [blackbird](https://github.com/orthecreedence/blackbird) as promises implementation. The next handler executed only after promise returned by previous one is resolved.
- `threaded-executor` - each handler executed in its own newly-created thread.
- `pooled-executor` - handlers executed in [lparallel](http://lparallel.org/) pool. Note: if`*thread-pool*` is nil new lparallel kernel of size 5 will be automatically created.

CL-EVENTS also exports number of predefined event types:
-  `event` `(multi-thread-sink serial-executor)`
-  `simple-event` `(single-thread-sink serial-executor)`
-  `non-blocking-event` `(single-thread-sink chained-executor)`
-  `broadcast-event` `(multi-thread-sink pooled-executor)`

Usually you just need to define your custom sink/executor types and compose events.
For further customizations `invoke-event-handlers` can be used to select executor at runtime for example,

```
(defparameter *event-executor* nil)

(defclass bunny-event (multi-thread-sink pooled-executor)
  ())

(defmethod invoke-event-handlers ((event bunny-event) &rest args)
  (if *event-executor*
      (invoke-executor *event-executor* event args)
      (call-next-method)))
```

## Example

``` lisp
;; broadcast-event
;; handlers can be added/removed from many threads
;; and will be executed in lparallel pool

(ql:quickload :cl-events)

(in-package :cl-events)

(defun make-broadcast-event ()
  (make-instance 'broadcast-event))

;; use event type

(defclass channel ()
  ((name :accessor channel-name)
   (state :initform :closed
          :accessor :channel-state)
   ;; events
   (on-message :initform (make-broadcast-event)
               :reader channel-on-message)
   (on-close :initform (make-broadcast-event)
             :reader channel-on-close)))

(defparameter *channel* (make-instance 'channel))

;; subscribe

(event+ (channel-on-message *channel*)
        (lambda (message)
          (format t "Received: ~a" message)))

(event+ (channel-on-close *channel*)
        (lambda (channel)
          (format t "Closed: ~a" channel)))

;; fire

(event! (channel-on-message *channel*) "Hello from cl-events")

#|Received: Hello from cl-events|#

(event! (channel-on-close *channel*) *channel*)

#|Closed: #<CHANNEL {1003D06703}>|#

```

## License

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

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

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

By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.

## Copyright

Copyright (c) 2015 Ilya Khaprov<EMAIL_ADDRESS>and [CONTRIBUTORS](CONTRIBUTORS.md)

CL-EVENTS uses a shared copyright model: each contributor holds copyright over their contributions to CL-EVENTS. The project versioning records all such contribution and copyright details.

If a contributor wants to further mark their specific copyright on a particular contribution, they should indicate their copyright solely in the commit message of the change when it is committed. Do not include copyright notices in files for this purpose.

repository: deadtrickster/cl-events

repo_name: deadtrickster/cl-events


text:
# Dependency Information

## dependencies
| Dependency | Version | React Version | Description |
|-|-|-|-|
| classnames | ^2.2.5 | -- | A simple utility for conditionally joining classNames together |
| moment | ^2.17.1 | -- | Parse, validate, manipulate, and display dates |
| moment-timezone | ^0.5.13 | -- | Parse and display moments in any timezone. |
| prop-types | ^15.5.8 | -- | Runtime type checking for React props and similar objects. |
| terra-base | ^2.9.0 | ^15.4.2 | The base component sets minimal global styles for an application. |
| terra-button | ^1.14.0 | ^15.4.2 | The terra-button component provides users a way to trigger actions in the UI. |
| terra-date-picker | ^1.19.0 | ^15.4.2 | The terra-date-picker component provides users a way to enter or select a date from the date picker. |
| terra-modal | ^1.17.0 | ^15.4.2 | Modals are used to display content in a layer above the app. Modals consist of an overlay and container. Higher order components can provide the modal dialog with a header, body, and close button. |
| terra-time-input | ^1.16.0 | ^15.4.2 | A controlled input component for entering time. |

## devDependencies
| Dependency | Version | React Version | Description |
|-|-|-|-|
| react-intl | ^2.3.0 | ^0.14.9 \|\| ^15.0.0 \|\| ^16.0.0 | Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations. |
| react-redux | ^5.0.4 | ^0.14.0 \|\| ^15.0.0-0 \|\| ^16.0.0-0 | Official React bindings for Redux |
| redux | ^3.6.0 | -- | Predictable state container for JavaScript apps |
| terra-app-delegate | ^1.8.0 | -- | An object that provides a set of functions used to facilitate communcation between Containers and their consuming Containers/Applications |
| terra-date-picker | ^1.19.0 | ^15.4.2 | The terra-date-picker component provides users a way to enter or select a date from the date picker. |
| terra-modal-manager | ^1.17.0 | ^15.4.2 | A Redux-backed Container component that dynamically presents components in a Terra Modal |
| terra-props-table | ^1.10.0 | ^15.4.2 | terra-props-table |

## peerDependencies
| Dependency | Version | React Version | Description |
|-|-|-|-|
| react | ^15.4.2 | -- | React is a JavaScript library for building user interfaces. |
| react-dom | ^15.4.2 | ^15.6.2 | React package for working with the DOM. |
| terra-base | ^2.9.0 | ^15.4.2 | The base component sets minimal global styles for an application. |
| terra-button | ^1.14.0 | ^15.4.2 | The terra-button component provides users a way to trigger actions in the UI. |
| terra-date-picker | ^1.19.0 | ^15.4.2 | The terra-date-picker component provides users a way to enter or select a date from the date picker. |
| terra-modal | ^1.17.0 | ^15.4.2 | Modals are used to display content in a layer above the app. Modals consist of an overlay and container. Higher order components can provide the modal dialog with a header, body, and close button. |
| terra-time-input | ^1.16.0 | ^15.4.2 | A controlled input component for entering time. |

repository: dylanklohr/terra-core

repo_name: dylanklohr/terra-core


text:
sudo python3 drevo

# fdclct

Free Drevo Calibur Lighting Control Tool
*Warning: at the moment just very little actually works*

## What this will become

This tool is to set the color of the RGB LEDs in the Drevo Calibur keyboard. By default this keyboard can be set to 8 different colors per key, but the Windows software by Drevo ([you can get from here](drevo.net/product/keyboard/calibur)) supports color selection per key with 24 bit color. Sadly it is closed source and Windows exclusive. So this project aims to reverse engineer the USB communication and implement a free version of the same tool to enable platform independent keyboard RGB glory.

## Requirements

### Software

This package is written for Python 3.

Packages:

* [PyUSB 1.0+](https://github.com/pyusb/pyusb) (under Ubuntu also available via ```sudo apt install python3-usb```)
* [colour 0.1.5](https://github.com/vaab/colour)

If under Windows, drop PyUSB for [pywinusb](https://github.com/rene-aguirre/pywinusb) (under development)

### Hardware

The Drevo Calibur keyboard. I have the 71 key version, but the 72 key version should work as well. If not, please leave an issue.

Furthermore i run the keyboard with firmware V3.4 for the 71 key edition. This should be equivalent to firmware V2.3 for the 72 key version. Both come with the date 20170908. I don't know if this works for earlier versions. While I'm pretty sure it does not work for the initial factory firmware, it might work for intermediate versions. Please leave an issue or pr if you know.

## Restrictions

Due to the nature of the protocol the Calibur uses to set the leds it is not possible to hack fluid animations. This is due to the fact that for every single change in the configuration of the lighting a new colormap for every key is transfered to the keyboard. This process can take over half a second.


text:
# MT inference

Run inference on binary (2 classes only) Deeplab model cropping large images in a sliding window approach.

## Prerequisites

You will need the following things properly installed on your computer:
* [Git](https://git-scm.com/)
* Python >= 3.6
* pipenv or docker

## Installation / Setup

* `git clone git@github.com:ttill/deeplab-inference.git`
* `cd deeplab-inference`

### Locally

* `pipenv install`

### Using docker

* `docker build -t deeplab-inference .`

## Running

```
Usage: app.py [OPTIONS]

  Run inference on binary (2 classes only) Deeplab model stored in frozen
  graph on image. Image has to be in RGB format. It will be cropped in a
  sliding window approach (see option `crop_size`).

Options:
  --frozen-graph FILE             Path to frozen graph of the model to use in
                                  protobuf format.  [required]

  --input PATH                    Path to input image to infer on. In case a
                                  directory is passed inference will be run on
                                  every contained.  [required]

  --crop-size INTEGER             In case input is larger in terms of width or
                                  height, it will be cropped into patches of
                                  `crop_size` with overlaps of 50 pixels will
                                  be passed into the model. Predicitons will
                                  be stitched together considering the maximum
                                  value in the overlapping regions.

  --segmentation PATH             Where to put a PNG image of the segmentation
                                  map. Filename or folder (uses basename of
                                  input).

  --probability PATH              Where to put a PNG pseudocolor image of the
                                  probability map. Filename or folder (uses
                                  basename of input).

  --visualize-progress / --no-visualize-progress
                                  Show figure containing input, probability
                                  map (pseudocolors), segmentation overlay for
                                  every cropped patch (halts inference).

  --visualize-result / --no-visualize-result
                                  Show figure containing input, probability
                                  map (pseudocolors), segmentation overlay for
                                  every input image (halts inference).

  --ground-truth PATH             Path to image (filename or folder where png
                                  with same basename as input is located) with
                                  ground truth as 8-bit grayscale png (class
                                  0: `0`, class 1: `255`). When supplied
                                  multiple metrics will be calculated
                                  (Accuracy, MIoU, Matthews Correlation
                                  Coefficient, …)

  --split-file FILE               Use this to filter input folder. Path to
                                  text file with one basename per line (pascal
                                  voc format).

  --difference PATH               Where to put a PNG image containing a
                                  difference map: Black: True negative (class
                                  0), White: True positive (class 1), Red:
                                  False negative, Blue: False positive.
                                  Filename or folder (uses basename of input).

  --install-completion            Install completion for the current shell.
  --show-completion               Show completion for the current shell, to
                                  copy it or customize the installation.

  --help                          Show this message and exit.
```

### Locally

* `pipenv run python app.py --frozen-graph path/to/frozen_inference_graph.pb --input path/to/images/ --segmentation output/folder/`

### Using docker

* `docker run -it -v /path/to/data/:/data/ deeplab-inference bash`
* `python app.py --frozen-graph /data/frozen_inference_graph.pb --input /data/images/ --segmentation /data/segmentation/`

## License

This project is licensed under the [MIT License](LICENSE).

repository: ttill/deeplab-inference

repo_name: ttill/deeplab-inference


text:
# Golang Microsoft Graph API implementation
[![godoc](https://godoc.org/github.com/open-networks/go-msgraph?status.svg)](https://godoc.org/github.com/open-networks/go-msgraph)
[![Go Report Card](https://goreportcard.com/badge/github.com/open-networks/go-msgraph)](https://goreportcard.com/report/github.com/open-networks/go-msgraph)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/0f21b4bbb7334f9c8ce3a04852533dd4)](https://www.codacy.com/app/TerraTalpi/go-msgraph?utm_source=github.com&utm_medium=referral&utm_content=open-networks/go-msgraph&utm_campaign=Badge_Grade)
[![codebeat badge](https://codebeat.co/badges/9d93c0c6-a981-42d3-97a7-bb48c296257f)](https://codebeat.co/projects/github-com-open-networks-go-msgraph-master)
[![codecov](https://codecov.io/gh/open-networks/go-msgraph/branch/master/graph/badge.svg)](https://codecov.io/gh/open-networks/go-msgraph)

go-msgraph is a go lang implementation of the Microsoft Graph API. See https://developer.microsoft.com/en-us/graph/docs/concepts/overview

## General
This implementation has been written to get various user, group and calendar details out of a Microsoft Azure Active Directory. Currently only READ-access is implemented.

POST-access to the /sendMail API has also been implemented.

## Features
working & tested:
- list users, groups, calendars, calendarevents
- automatically grab & refresh token for API-access
- json-load the GraphClient struct & initialize it
- set timezone for full-day CalendarEvent
- send mail using /users/\<user\>/sendMail endpoint

in progress:
- implement paging to load huge data-sets, currently limitted to one page, 999 entries

planned:
- add further support for mail, personal contacts (outlook), devices and apps, files etc. See https://developer.microsoft.com/en-us/graph/docs/concepts/v1-overview

## Example
To get your credentials visit: https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal
````go
// initialize GraphClient manually
graphClient, err := msgraph.NewGraphClient("<TenantID>", "<ApplicationID>", "<ClientSecret>")
if err != nil {
    fmt.Println("Credentials are probably wrong or system time is not synced: ", err)
}

// initialize the GraphClient via JSON-Load. Please do proper error-handling (!)
// Specify JSON-Fields TenantID, ApplicationID and ClientSecret
fileContents, err := ioutil.ReadFile("./msgraph-credentials.json")
var graphClient msgraph.GraphClient
err = json.Unmarshal(fileContents, &graphClient)

// List all users
users, err := graphClient.ListUsers()
// Gets all the detailled information about a user identified by it's ID or userPrincipalName
user, err :=<EMAIL_ADDRESS>
// List all groups
groups, err := graphClient.ListGroups()
// List all members of a group.
groupMembers, err := groups[0].ListMembers()
// Lists all Calendars of a user
calendars, err := user.ListCalendars()

// Let all full-day calendar events that are loaded from ms graph be set to timezone Europe/Vienna:
// Standard is time.Local
msgraph.FullDayEventTimeZone, _ = time.LoadLocation("Europe/Vienna")

// Lists all CalendarEvents of the given userPrincipalName/ID that starts/ends within the the next 7 days
startTime := time.Now()
endTime := time.Now().Add(time.Hour * 24 * 7)
events, err :=<EMAIL_ADDRESS>startTime, endTime)
````

## Installation

### Using *go get*

    $ go get github.com/R2D2Env/go-msgraph

You can use `go get -u` to update the package.

## Documentation

For docs, see http://godoc.org/github.com/open-networks/go-msgraph or run:

    $ godoc github.com/open-networks/go-msgraph

Note that these docs are from the main fork of the module and therefore will not contain documentation about the SendMail capability.

branch_name: refs/heads/main

gha_license_id: MIT


text:
# NoRM
Activation induced heterogeneity: Single cells in a macrophage population respond differently to stimulus. Upon secondary stimuli some of these cells can become non-responsive.
This non-responsiveness can be permanent (at least over an observed period of time) or even reversible as seen by delayed kinetics. This code models to appearance and disappearance of these proposed states (Dey et al, https://wellcomeopenresearch.org/articles/7-29/v2) by using a Doob-Gillespie algorithm. This code traces the time-evolution of these states and predicts transition rates that maybe closest to predicting experimental data. These parameters are referred to as NoRM parameters.

Priors
All csv files (included in NoRM) to be in the same folder as your working directory
Select a relative/absolute path in fit_2_challenge_time_points_param_pies_test.m
Select a relative/absolute path for saving results.

For figures 6E, 7, 8 and 9
Start at execute.m

Executes fit_2_challenge_time_points_param_pies_test.m with intialising parameters

1. minimum_deviation=0.2; #minimum deviation from experimental results
2. tpts_bmdm=[4 8 12]; #timepoints for BMDMs
3. tpts_raw=[8 12 16]; #timepoints for RAW cells
4. search=0; #decides whether to search for parameters or select parameters saved in a csv

For figure 6D, see
execute_ode_ssa_check.m

For SSA/Gillespie implementation, see
Gillespie_4_state_5_rate_memory.m

repository: jipsi/NoRM

gha_language: MATLAB

repo_name: jipsi/NoRM


text:
---
layout: default
---

# 1997-12-16 - Re: hashcash spam prevention & firewalls

## Header Data

From: Andy Dustman<EMAIL_ADDRESS>To: Adam Back<EMAIL_ADDRESS>Message Hash: 695398257cfdcedb08f8b666adb8475a9b0516b0d1551cc0642589c899b910a7

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-12-16 17:49:16 UTC

Raw Date: Wed, 17 Dec 1997 01:49:16 +0800

## Raw message

```
{% raw  %}From: Andy Dustman<EMAIL_ADDRESS>Date: Wed, 17 Dec 1997 01:49:16 +0800
To: Adam Back<EMAIL_ADDRESS>Subject: Re: hashcash spam prevention & firewalls
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

CC: me as I'm not presently reading cypherpunks (this was bcc:ed to
coderpunks).

On Sat, 13 Dec 1997, Adam Back wrote:

> The required filter functionality is something like this in order of
> desirability:
>
> Accept the SMTP session.  Use an EHLO extension HASHCASH to say that
> this server expects hashcash.  (Extended HELO is a method of
> specifying SMTP extensions (I think)).  Accept the headers, and if a
> valid hashcash postage is not included, hand off to the real
> mailserver a site configurable bounce message.

I'm not sure this is doable. From what I've seen of the sendmail anti-spam
stuff and the SMTP protocol, you can't just accept the headers and then
decide whether not not to accept the rest; you either have to be able to
(at present) a) reject the message before you receive it based on the FROM
data (known spammers, bogus hostnames, etc); b) reject the messages before
you receive it based on the RCPT data (anti-relaying: is the recipient at
our site?); c) reject the message after you receive it. Obviously with
spam, you'd like to be able to reject it before it takes up bandwidth. So,
an extended protocol could require a CASH command from the client before
DATA will be accepted. The client could generate the cash on the fly, or
it could be grepped out of the headers.

If you don't want to dink around with patching sendmail or whatever for an
extended protocol, then simply use a system-wide procmailrc to enforce
hashcash; procmail can generate bounces very easily (or rather, trick the
MTA into generating the bounce for it). Or, make requiring hashcash a
user-selectable option by having a publicly-available script which a user
can have included into his .procmailrc by setting some variable.

> This still leaves open the question of the user generating their own
> hashcash postage.  Again this could be problematic for neophytes.  One
> solution is to include a URL for a web page including a javascript
> hashcash generator -- this means that no new software must be
> installed, the user cut and pastes the generated hashcash into their
> message.

Two potentially simpler solutions: a) the client MTA could generate
hashcash on the fly as needed (like it generates Message-IDs); b) a filter
could be installed in place of the user's normal MTA which generates
hashcash. The latter is probably better (easier to implement). For
example, if the normal MTA is sendmail, then a fake sendmail could be
installed which is just a nasty little script which parses out the
recipients, generates a suitable hashcash token for each one, and inserts
the appropriate headers, and then passes the message off to the real
sendmail.

My preferred means of spam-blocking right now is a barrage of tests for
typical spams using procmail, combined with a reverse spam block. An
ordinary spam block is an address munge where something is added to the
address to make it undeliverable, so ordinary users have to unmunge your
address before they can mail you, i.e<EMAIL_ADDRESS>A
reverse spam block lets you use your real address for posts but requires
users to add something to your address to guarantee delivery. As my sig
indicates, if you add +spamsucks to my username, various spam filtering
features are deactivated. If I wanted to, I could bounce anything which
didn't have the +spamsucks in it. The recipe I use also uses lists of
"trusted" users (ones I don't do any spam testing on, so they don't need
the password) and "spammers" (we don't spam test these either, we just
make them bounce). Also will reject messages where I am bcc:ed (unless
from someone trusted or the password was used) or on a huge visible list
(again as before).

It works pretty darn good. I hardly get any spam. Most of what I get
bounces back to the sender with "User unknown". If the sender has a forged
From, then this at least bounces there, or to the site's postmaster, who
will likely take some action (but not complain to me because I don't
exist). If the From was completely bogus, then I get the bounce, but that
doesn't happen too often. I use this same system for the return address of
the cracker remailer<EMAIL_ADDRESS>and it works pretty well, though
as of late I am munging the return address for all USENET posts a la
<EMAIL_ADDRESS>(which has been hugely effective);
you're not supposed to reply anyway...

I would like to modify the nymserver so that users can set a reverse spam
blocking password, but just haven't gotten around to it. I'm pretty sure
it can be done, though.

Andy Dustman / Computational Center for Molecular Structure and Design
For a great anti-spam procmail recipe, send me mail with subject "spam".
Append "+spamsucks" to my username to ensure delivery.  KeyID=0xC72F3F1D
Encryption is too important to leave to the government. -- Bruce Schneier
http://www.athens.net/~dustman<EMAIL_ADDRESS> <}+++<

{% endraw %}
```

## Thread

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

+ Return to "[Adam Back <aba@dcs.ex.ac.uk>](/authors/adam_back_aba_at_dcs_ex_ac_uk_)"
+ Return to "[Andy Dustman <andy@neptune.chem.uga.edu>](/authors/andy_dustman_andy_at_neptune_chem_uga_edu_)"
+ Return to "[Bill Frantz <frantz@netcom.com>](/authors/bill_frantz_frantz_at_netcom_com_)"
+ Return to "[Bill Stewart <bill.stewart@pobox.com>](/authors/bill_stewart_bill_stewart_at_pobox_com_)"
+ Return to "[frissell@panix.com](/authors/frissell_at_panix_com)"
+ Return to "["Ge' Weijers" <ge@Progressive-Systems.Com>](/authors/ge_weijers_ge_at_progressivesystems_com_)"
+ Return to "[Mike <Michael.Johnson@mejl.com>](/authors/mike_michael_johnson_at_mejl_com_)"
+ Return to "[phelix@vallnet.com](/authors/phelix_at_vallnet_com)"
+ Return to "["Robert A. Costner" <pooh@efga.org>](/authors/robert_a_costner_pooh_at_efga_org_)"
+ Return to "[Robert Hettinga <rah@shipwright.com>](/authors/robert_hettinga_rah_at_shipwright_com_)"
+ Return to "[Steve Schear <schear@lvdi.net>](/authors/steve_schear_schear_at_lvdi_net_)"
+ Return to "[stewarts@ix.netcom.com](/authors/stewarts_at_ix_netcom_com)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"
+ Return to "["Uhh...this is Joe [Randall Farmer]" <rfarmer@HiWAAY.net>](/authors/uhh_this_is_joe_randall_farmer_rfarmer_at_hiwaay_net_)"
+ Return to "["William H. Geiger III" <whgiii@invweb.net>](/authors/william_h_geiger_iii_whgiii_at_invweb_net_)"

+ 1997-12-13 (Sat, 13 Dec 1997 09:10:05 +0800) - [hashcash spam prevention & firewalls](/archive/1997/12/1e5b8113649b27a084cbd156bbbcb9bc930be21ede63d9cff4bc41a1dabf1cd3) - _Adam Back<EMAIL_ADDRESS>  + 1997-12-13 (Sat, 13 Dec 1997 12:49:46 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/6f2d4be57b92e7eebc02c106819ab590a27c5b386139a2baf995e3c686745ca4) - _"Robert A. Costner"<EMAIL_ADDRESS>    + 1997-12-13 (Sat, 13 Dec 1997 19:19:47 +0800) - [remailer hashcash spam prevention](/archive/1997/12/32b73ece180241cdcfb074ab0df6ba911fea46cc01d70290c60809ddcf889fd7) - _Adam Back<EMAIL_ADDRESS>    + 1997-12-13 (Sun, 14 Dec 1997 00:12:36 +0800) - [Re: remailer hashcash spam prevention](/archive/1997/12/ffdde8d44bed7bc1f0957bd1b42c79140584eae5573ba3f5fc3b113bfc80f5ae) - _"Robert A. Costner"<EMAIL_ADDRESS>      + 1997-12-14 (Sun, 14 Dec 1997 08:35:03 +0800) - [Re: remailer hashcash spam prevention](/archive/1997/12/e080a2180e912b9b129e8be3e4d114421b0c9bc11217ac2e40b3b8f112305572) - _Adam Back<EMAIL_ADDRESS>      + 1997-12-15 (Mon, 15 Dec 1997 13:07:23 +0800) - [Re: remailer hashcash spam prevention](/archive/1997/12/c42b0b4f57dc371518243c22207122dce29474124965f788f701f596652df5e2) - _"Robert A. Costner"<EMAIL_ADDRESS>    + 1997-12-13 (Sun, 14 Dec 1997 02:38:23 +0800) - [Re: remailer hashcash spam prevention](/archive/1997/12/4e2c1bcbd8ce859f454922715082bd63b5d563f1aa65d0c8ad8f2d4c54e7c91f) - _Steve Schear<EMAIL_ADDRESS>      + 1997-12-14 (Sun, 14 Dec 1997 08:33:29 +0800) - [Re: remailer hashcash spam prevention](/archive/1997/12/c715d8d2ed91a5444bfac5aebf1f7d21598eb1e31ab605b49e36bef13eb88b29) - _Adam Back<EMAIL_ADDRESS>      + 1997-12-16 (Tue, 16 Dec 1997 10:45:41 +0800) - [Re: remailer hashcash spam prevention](/archive/1997/12/5fec0dfd756dc4c58ed53937469f7beadee292fa59dde89782d0fb51d0c5bec4) - _Steve Schear<EMAIL_ADDRESS>    + 1997-12-13 (Sun, 14 Dec 1997 04:12:38 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/2a456a422eec682ac9057507e9e3cca52a17f0246f5d7a2232859cb78e2824d7) - _"Uhh...this is Joe [Randall Farmer]"<EMAIL_ADDRESS>    + 1997-12-13 (Sun, 14 Dec 1997 05:28:15 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/cea4e525bf40ee2205159dee1a923e87cfcdbf5b0c600588e7dd83e1110210d6) - _"Robert A. Costner"<EMAIL_ADDRESS>      + 1997-12-14 (Sun, 14 Dec 1997 08:32:42 +0800) - [message dependent hashcash => no double spend database (Re: hashcash spam prevention & firewalls)](/archive/1997/12/0f4abeaa75f380574adf7c47fa198a7a0ccae6b9dc700a2a07890b7efa5d6b63) - _Adam Back<EMAIL_ADDRESS>      + 1997-12-14 (Sun, 14 Dec 1997 08:56:46 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/b97f82e945331514440892366cc2a2ab6c9a7dcab8a623b73e16f8c654b45732) - _"Uhh...this is Joe [Randall Farmer]"<EMAIL_ADDRESS>      + 1997-12-15 (Mon, 15 Dec 1997 12:48:33 +0800) - [Re: message dependent hashcash => no double spend database (Re: hashcash spam prevention & firewalls)](/archive/1997/12/134c512facc9a0a946b3e88bf4ad9b661abc342b665ba573f774af00e428b1d6) - _"Robert A. Costner"<EMAIL_ADDRESS>        + 1997-12-16 (Tue, 16 Dec 1997 11:06:25 +0800) - [Re: message dependent hashcash => no double spend database  (Re: hashcash spam prevention & firewalls)](/archive/1997/12/cf65ce8d14f6f5fbdf2060a035bd199d47a5d6200eba6413f7790dc569cbd38a) - _"Uhh...this is Joe [Randall Farmer]"<EMAIL_ADDRESS>        + 1997-12-17 (Wed, 17 Dec 1997 18:02:33 +0800) - [Re: message dependent hashcash => no double spend database  (Re: hashcash spam prevention & firewalls)](/archive/1997/12/28f8f6aece600e34f3b08ec147033d153bc07dccadc5a55c6933969be6045f2f) -<EMAIL_ADDRESS>          + 1997-12-19 (Sat, 20 Dec 1997 00:58:25 +0800) - [Fees for delivery not set by standards committees](/archive/1997/12/bb1e9bbcb8c1c9096e929c9ca8c336836b371adf80753580cd1e203bec2172fe) - _Tim May<EMAIL_ADDRESS>          + 1997-12-22 (Tue, 23 Dec 1997 02:19:08 +0800) - [Re: message dependent hashcash => no double spend database  (Re: hashcash spam prevention & firewalls)](/archive/1997/12/2b93e86dbfb853b8be7fe51545dc491041de516f04f412d7d2554f39a07bf3f3) - _Adam Back<EMAIL_ADDRESS>        + 1997-12-18 (Fri, 19 Dec 1997 01:50:01 +0800) - [Re: message dependent hashcash => no double spend database  (Re:hashcash spam prevention & firewalls)](/archive/1997/12/7034113f96eae1c457289dc7c7a397a2521c4f5cbf6acdc61e79432f7ab00f7b) - _Steve Schear<EMAIL_ADDRESS>          + 1997-12-18 (Fri, 19 Dec 1997 05:28:46 +0800) - [Re: message dependent hashcash => no double spend database  (Re: hashcash spam prevention & firewalls)](/archive/1997/12/f29bccf2331b65a59871f3b4e33a26ee98d36b642b2f6db8378399e836398361) - _"William H. Geiger III"<EMAIL_ADDRESS>            + 1997-12-19 (Sat, 20 Dec 1997 04:50:05 +0800) - [Re: Lions and Tigers and Micromoney, Oh, My...](/archive/1997/12/b1e278c000b64ba4bfc603bb96af2b34805a3f8d269d17246d383bcc1dc38648) -<EMAIL_ADDRESS>            + 1997-12-22 (Tue, 23 Dec 1997 02:18:44 +0800) - [Re: message dependent hashcash => no double spend database  (Re: hashcash spam prevention & firewalls)](/archive/1997/12/ec991362a8d37b005d8f0b208e800c2e96f67b02460cc1ea3ca64364ce52e41e) - _Adam Back<EMAIL_ADDRESS>              + 1997-12-23 (Tue, 23 Dec 1997 13:06:33 +0800) - [Re: message dependent hashcash => no double spend database  (Re: hashcash spam prevention & firewalls)](/archive/1997/12/e50682e00fcb733c4647e9eda5b42c224ea0776be4c92b08842fadbf022f55df) - _"William H. Geiger III"<EMAIL_ADDRESS>          + 1997-12-19 (Fri, 19 Dec 1997 08:16:04 +0800) - [Lions and Tigers and Micromoney, Oh, My...](/archive/1997/12/11d1baef11324cde37d8e94c3c68451eacfb708788d7e6437ba9d84e32c7ef45) - _Robert Hettinga<EMAIL_ADDRESS>      + 1997-12-15 (Mon, 15 Dec 1997 13:14:09 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/fbf8a1f6fec1a32f297340f4bb6c644aacb34645e76f512233e9dc90ebc4ab8e) - _"Robert A. Costner"<EMAIL_ADDRESS>        + 1997-12-16 (Tue, 16 Dec 1997 10:21:51 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/b72fd94e7c6f8837c50689a0f198f277b744efe9d497f2ca40807d16e4acfd5f) - _"Uhh...this is Joe [Randall Farmer]"<EMAIL_ADDRESS>      + 1997-12-19 (Fri, 19 Dec 1997 14:44:58 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/d75119bec3fadfedf537afe3e59155e22717df683a8c1ecf40f5f311137a8972) - _Bill Stewart<EMAIL_ADDRESS>        + 1997-12-22 (Tue, 23 Dec 1997 02:19:09 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/b4f803fb73c2f788c5d19695cc2b8d1e30f71554cd01be0b2ae54f6530103e7e) - _Adam Back<EMAIL_ADDRESS>        + 1997-12-23 (Tue, 23 Dec 1997 09:48:07 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/c7f5eaa604924a56c9bf60220d50fa77cd3ce6fbae7be1be502f7c87531b05b7) - _Steve Schear<EMAIL_ADDRESS>        + 1997-12-24 (Thu, 25 Dec 1997 03:23:24 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/fd2d4ae6914cef140ec0cefedd6c33e3ea88488d4ec15970e65d6046d12e5fc4) -<EMAIL_ADDRESS>  + 1997-12-13 (Sat, 13 Dec 1997 13:07:38 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/4d6487fd3f721f0c72ea9fe9f729fdf180d0c286ee4f2d4d085eb0b122e8565a) - _Bill Frantz<EMAIL_ADDRESS>    + 1997-12-13 (Sat, 13 Dec 1997 19:19:57 +0800) - [hashcash => mailing lists get spam instead](/archive/1997/12/3bfb65d62a5115b18e1f0f4f4d84cef2d30cd4209b61396256c7290314386e38) - _Adam Back<EMAIL_ADDRESS>  + 1997-12-13 (Sat, 13 Dec 1997 14:25:40 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/aeb5ee826f56ce614e2663a49314b7e8da26dfb55732a8af4db182d6efdb2fa3) -<EMAIL_ADDRESS>    + 1997-12-13 (Sat, 13 Dec 1997 19:20:07 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/5b2b2766b149b0ef5a85af9084fa2d57fd248e55286b90fd6beeffc5ecd7cffe) - _Adam Back<EMAIL_ADDRESS>    + 1997-12-13 (Sat, 13 Dec 1997 22:37:18 +0800) - [Not quite as much Blood in the Streets](/archive/1997/12/53e70e29101de3ffcd998a8fb049da55f0e646854a8aef08dc137584c447ee9d) -<EMAIL_ADDRESS>    + 1997-12-13 (Sun, 14 Dec 1997 04:07:24 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/813a5d3b7fc9de1fdd434d0a696931f7b45fc3b8b889d4972bcd625fbed2d379) - _"Uhh...this is Joe [Randall Farmer]"<EMAIL_ADDRESS>      + 1997-12-14 (Sun, 14 Dec 1997 08:32:37 +0800) - [profit from spammers (Re: hashcash spam prevention & firewalls)](/archive/1997/12/cae7159921cc3df17c38fef72b3ec1a984190f081d848a3676e3e056a846be04) - _Adam Back<EMAIL_ADDRESS>        + 1997-12-14 (Sun, 14 Dec 1997 12:01:11 +0800) - [Re: profit from spammers (Re: hashcash spam prevention & firewalls)](/archive/1997/12/f08af712ae69453d84116032c4d9c8e30d34f9586a9eaa4cdb5c925ca3d69e9c) - _"Uhh...this is Joe [Randall Farmer]"<EMAIL_ADDRESS>  + 1997-12-15 (Mon, 15 Dec 1997 19:25:46 +0800) - [Re: hashcash spam prevention & GSM/SMS](/archive/1997/12/2dd692fea4181bedebfc37eef3f30bf36c6be51cf0654501621c2d2232a30397) - _Mike<EMAIL_ADDRESS>  + 1997-12-15 (Tue, 16 Dec 1997 00:28:27 +0800) - [Re: hashcash spam prevention & firewalls](/archive/1997/12/3c63e10c4a6b932478197f2aa2f6dd97c8661f7b5daa5cbe3bcd10952e8b97af) - _"Ge' Weijers"<EMAIL_ADDRESS>  + 1997-12-16 (Wed, 17 Dec 1997 01:49:16 +0800) - Re: hashcash spam prevention & firewalls - _Andy Dustman<EMAIL_ADDRESS>


text:
---
title: Questions
permalink: /docs/questions/
---

Parallel sources and generates questions that will be useful for AI forecasters. Below are a subset of the questions we've listed:

- [Will OpenAI Five win against the reigning Dota 2 world champions OG?]('https://ai.metaculus.com/questions/135/will-openai-five-win-against-the-reigning-dota-2-world-champions-og/')

- [When will an RL agent match the best human performance on Starcraft II with no domain-specific hardcoded knowledge, trained using no more than $10,000 of compute of public hardware?](https://ai.metaculus.com/questions/2/when-will-an-rl-agent-match-the-best-human-performance-on-starcraft-ii-with-no-domain-specific-hardcoded-knowledge-trained-using-no-more-than-10000-of-compute-of-public-hardware/)

- [By mid-2020, what will be the maximum compute (measured in petaflop/s-days), used in training by a published AI system?](https://ai.metaculus.com/questions/8/by-mid-2020-what-will-be-the-maximum-compute-measured-in-petaflops-days-used-in-training-by-a-published-ai-system/)

- [By end of 2020, will another state-of-the-art model be only partially released due to explicit concerns about malicious use?]('https://ai.metaculus.com/questions/117/by-end-of-2020-will-another-state-of-the-art-model-be-only-partially-released-due-to-explicit-concerns-about-malicious-use/')

If you have suggestions [email<EMAIL_ADDRESS>or, better yet, apply to be part of our forecasting communities.

repository: ghabs/sitetest

branch_name: refs/heads/dev

gha_language: CSS

repo_name: ghabs/sitetest


text:
---
layout: post
title:  "Lecture 2: Theory and practice of machine learning"
date:   2016-02-05 00:00:00 +0200
description: Why machine learning works.
category: lecture
---

In the second lecture we will delve into the practicalities of machine learning.
We will look at how to test and evaluate our models using various metrics (e.g., accuracy, precision, recall).
The most important quality of a learning algorithm is its generalization capability.
We will see that a common cause of poor performance is the phenomenon of overfitting, when the algorithm just "memorizes" the train data; we will look at a couple of ways of preventing overfitting through cross-validation and regularization.

## Metrics

* Accuracy
* Precision
* Recall

## Overfitting

* What is overfitting?
* Solution to overfitting: validation
* Solution to overfitting: regularization

## Curse of dimensionality

## Additional resources

extension: markdown

gha_language: HTML


text:
# Filters

Filters are used to process the result of an expression in a template.

## Overview

As an example, the expression `{{ 'hello' | upper }}` uses the "upper" filter to create
the upper case result "HELLO".

## Built in filters

- require: Will throw an error if the result is empty or null
- default(any): Replaces empty, null, or error types with the default value from the args
- length: Returns the length of a string or array
- lower: Lowercase the rendered result
- upper: Uppercase the rendered result
- trim: Trim whitespace off the rendered result
- split(str?): Split a string into an array. Delimited by newline, but an arg can be used to override the delimiter.
- index(int): Retrieve the int index from the array
- join(str?): Join an array with the provided string. Defaults to newline
- string: Forces the result into a string type, usually by rendering it
- key(str): Retrieve the value of the specified key from the dictionary
- escape_html: (alias 'e') Render the result and escape HTML characters
- yaml: (alias yml) Serialize the data into a YAML string. Requires"yaml-extension" feature (default on)
- json(str?): Serialize the data into a JSON string. Set str to 'pretty' to print with indentation. Requires the "json-extension" feature (default on)
- base64(str?): Encode the result as Base64. If the optional string parameter is set to "decode" then it will try to decode instead. Requires "base64-extension" feature (default on)

repository: Niedzwiedzw/templar

repo_name: Niedzwiedzw/templar


text:
# Consuming Fibre Channel Storage on Kubernetes

## Table of Contents

- [Example Parameters](#example-parameters)
- [Step-by-Step](#step-by-step)
- [Multipath Considerations](#multipath-considerations)

## Example Parameters

```yaml
 fc:
   targetWWNs:
     - '500a0982991b8dc5'
     - '500a0982891b8dc5'
   lun: 2
   fsType: ext4
   readOnly: true
```

[API Reference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#fcvolumesource-v1-core)

## Step-by-Step

### Set up a Fibre Channel Target

Using your Fibre Channel SAN Zone manager you must allocate and mask LUNs so that all hosts in the Kubernetes cluster can access them

### Prepare nodes in your Kubernetes cluster

You will need to install and configured a Fibre Channel initiator on the hosts within your Kubernetes cluster.

### Create a Pod using Fibre Channel persistent storage

Create a pod manifest based on  [fc.yaml](fc.yaml). You will need to provide *targetWWNs* (array of Fibre Channel target's World Wide Names), *lun*, and the type of the filesystem that has been created on the LUN if it is not _ext4_

Once you have created a pod manifest you can deploy it by running:

```console
kubectl apply -f ./your_new_pod.yaml
```

You can then confirm that the pod hase been sucessfully deployed by running `kubectl get pod fibre-channel-example-pod -o wide`

```console
# kubectl get pod fibre-channel-example-pod -o wide
NAME                        READY   STATUS          RESTARTS   AGE    IP               NODE    NOMINATED NODE   READINESS GATES
fibre-channel-example-pod   1/1     READY           0          1m8s   <IP_ADDRESS>   node0   <none>           <none>

```

If you connect to the console on the Kubernetes node that the pod has been assigned to you can see that the volume is mounted to the pod by running `mount | grep /var/lib/kubelet/plugins/kubernetes.io/fc/`

```console
# mount | grep /var/lib/kubelet/plugins/kubernetes.io/fc/
/dev/mapper/360a98000324669436c2b45666c567946 on /var/lib/kubelet/plugins/kubernetes.io/fc/500a0982991b8dc5-lun-2 type ext4 (relatime,seclabel,stripe=16,data=ordered)
  ```

## Multipath Considerations

To leverage multiple paths for block storage, it is important to perform
multipath configuration on the host.
If your distribution does not provide `/etc/multipath.conf`, then you can
either use the following minimalistic one:

```
defaults {
    find_multipaths yes
    user_friendly_names yes
}
```

or create a new one by running:

```console
$ mpathconf --enable
```

Finally you'll need to ensure to start or reload and enable multipath:

```console
$ systemctl enable --now multipathd.service
```

**Note:** Any change to `multipath.conf` or enabling multipath can lead to
inaccessible block devices as they will be claimed by multipath and
exposed as a device in /dev/mapper/*.

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/volumes/fibre_channel/README.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->

gha_language: Shell


text:
# Blog Server
Barebones example blog for teaching purposes complete with authentication (!), backed by a MySQL database.

## Prerequisites
You must have a MySQL database available to connect to. It should have the following tables, at minimum:

### users
| id  | username | hash    |
| --- | -------- | ------- |

### posts
| id  | title | summary | full_text | image | date |
| --- | ----- | ------- | -------- | ----- | ---- |

## Installing
`npm install`

## Running
You need to pass appropriate environment variables in order for the database connection to be made. Example:
`DB_USER=myuser DB_PASSWORD=mypass DB_NAME=blog nodemon index.js`

repository: yaviner/teaching-blog-server

repo_name: yaviner/teaching-blog-server


text:
        Star if you like

            Co-maintain Reframe

            Follow on Twitter

            Chat on Discord

Intro   |   Starters   |   Usage Manual   |   Concepts   |   Plugins

# Usage Manual

### Basics

- [Getting Started](#getting-started)
- [CSS](#css)
- [Static Assets](#static-assets)
- [Async Data](#async-data)
- [Navigation & Links](#navigation--links)
- [`doNotRenderInBrowser`](#donotrenderinbrowser)
- [`renderHtmlAtBuildTime`](#renderhtmlatbuildtime)

### Use Cases

- Flexible stack
  - [Add/Remove Server](#addremove-server)
  - [Add/Remove Frontend](#addremove-frontend)
  - [Add/Remove Database](#addremove-database)
- Deploy
  - [Static Deploy](#static-deploy)
  - [Serverless Deploy](#serverless-deploy)
- Integrations
  - [Vue](#vue)
  - [React Router](#react-router)
  - [TypeScript](#typescript)
  - [Express](#express)
  - [Koa](#koa)
  - [PostCSS](#postcss)
  - [React Native (Web)](#react-native-web)
  - [React Native (Web) + React Router](#react-native-web--react-router)
  - [Bootstrap](#boostrap)
  - [Semantic UI](#semantic-ui)
  - [Frontend Libraries](#frontend-libraries)

### Custom

*Full customization. Based on eject.*

- Server
  - [Custom Server](#custom-server)
  - [Custom Server Framework (Express, Koa, ...)](#custom-server-framework-express-koa-)
  - [Full Custom Server](#full-custom-server)
- Rendering
  - [Custom HTML <head>, <meta>, <html>, ...](#custom-html-head-meta-html-)
  - [Custom Renderer](#custom-renderer)
- Browser
  - [Custom Default Browser Entry](#custom-default-browser-entry)
  - [Custom Page Browser Entry](#custom-page-browser-entry)
  - [Full Custom Browser Entry](#full-custom-browser-entry)
- Routing
  - [Advanced Routing](#advanced-routing)
  - [Custom Router](#custom-router)
- Build
  - [Custom Babel](#custom-babel)
  - [Custom Webpack](#custom-webpack)
  - [Full Custom Build](#full-custom-build)

## Getting Started

1. Install the Reframe CLI:
   ~~~shell
   $ npm install -g @reframe/cli
   ~~~

   With yarn

   ~~~shell
   $ yarn global add @reframe/cli
   ~~~

   With npx (local install)

   Instead of globally installing `@reframe/cli`, you can use
   [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b):
   ~~~shell
   $ npx @reframe/cli create react-frontend
   ~~~

   Then prefix every `$ reframe <command>` with `npx`.
   For example:
   ~~~shell
   $ cd my-react-frontend/
   $ npx reframe dev
   ~~~
   npx uses the `@reframe/cli` locally installed at `my-react-frontend/node_modules/@reframe/cli`.

2. Create a new app with the `react-frontend` starter:
   ~~~shell
   $ reframe create react-frontend
   ~~~

3. Build and serve the app:
   ~~~shell
   $ cd my-react-frontend/
   $ reframe dev
   ~~~

4. Open [http://localhost:3000](http://localhost:3000).

5. Read [Usage Manual - Basics](/docs/usage-manual.md#basics).

> The
> [react-frontend](/plugins/create/starters/react-frontend#readme)
> starter scaffolds a static site.
> There are other starters to scaffold
> a SSR app, a backend-only app, a full-stack app, etc.
> See [Starters](/docs/starters.md#readme).

⇧ TOP  ⇧

## CSS

A CSS file can be loaded and applied by importing it.

~~~js
import './GlitterStyle.css';
~~~

Example of a page using CSS:
 - [/examples/basics/pages/glitter/](/examples/basics/pages/glitter/)

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Static Assets

Static assets (images, fonts, videos, etc.) can be imported as well
but importing an asset doesn't actually load it:
Only the URL of the asset is returned.
It is up to us to use/fetch the URL of the asset.

~~~js
import diamondUrl from './diamond.png';

// do something with diamondUrl, e.g. `await fetch(diamondUrl)` or `<img src={diamondUrl}/>`
~~~

In addition, static assets can be referenced in CSS by using the `url` data type.

~~~css
.diamond-background {
    background-image: url('./diamond.png');
}
~~~

Example of a page using fonts, images and other static assets:
 - [/examples/basics/pages/glitter/](/examples/basics/pages/glitter/)

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Async Data

The page config `async getInitialProps()` can be used to fetch data before your page's view is rendered.
The value returned by `async getInitialProps()` is then available to your page's view.

For example:

~~~js
// /examples/basics/pages/got/GameOfThronesPage.config.js

import React from 'react';
import getCharacters from './data/getCharacters';
import CharacterList from './views/CharacterList';

export default {
    route: '/game-of-thrones',

    // Everything returned in `getInitialProps()` is passed to the props of the view
    getInitialProps: async () => {
        const characters = await getCharacters();
        return {characters};
    },

    // Our data is available at `props.characters`
    view: props => <CharacterList characters={props.characters}/>,

    doNotRenderInBrowser: true,
};
~~~

Alternatively, you can fetch data in a stateful component.
But in that case the data will not be rendered to HTML.

Deeper explanation and further examples of pages asynchronously loading data:
 - [/examples/basics/pages/got/](/examples/basics/pages/got/)

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Navigation & Links

The standard way to navigate between pages is to use the HTML link tag `<a>`.

See [Advanced Routing](#advanced-routing) for alternative ways of navigating.

Example:

~~~js
import React from 'react';

export default {
    route: '/page-a',
    view: () =>

            This is page A.
            Page B.

,
};
~~~
~~~js
import React from 'react';

export default {
    route: '/page-b',
    view: () =>

            This is page B.
            Page A.

,
};
~~~

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## `doNotRenderInBrowser`

The page config option `doNotRenderInBrowser` allows you to control whether the page is rendered in the browser.

By default,
a page is rendered in the browser so that it can have interactive views.
(A like button, an interactive graph, a To-Do list, etc.).

 - `doNotRenderInBrowser: false` (default value)

   The page is rendered in the browser.

   The page's code (e.g. React components) and the view library (e.g. React) are loaded in the browser.

   The page is rendered to the DOM.

   The DOM may change.
 - `doNotRenderInBrowser: true`

   The page is not rendered in the browser.

   No JavaScript is loaded nor executed in the browser.
   (Or much less JavaScript.)

   The page is not rendered to the DOM.
   (The page is rendered to HTML only.)

   The DOM will not change.

Setting `doNotRenderInBrowser: true` makes your page considerably faster.
So,
if your page has no interactive views,
then you should set `doNotRenderInBrowser: true`.
(More precisely, you should set `doNotRenderInBrowser: true` when your page's view components are all stateless.)

By setting `doNotRenderInBrowser: true` to all your pages,
you remove browser-side JavaScript.
In other words,
you remove the frontend,
and the view library
(React/Vue/etc.)
is only used on the server as an HTML template engine.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## `renderHtmlAtBuildTime`

With Reframe,
your pages are always rendered to HTML.
(Modern view libraries, such as React and Vue, can render components to HTML.)

The page config option `renderHtmlAtBuildTime` allows you to control whether the page's HTML is
rendered statically at build-time or
dynamically at request-time.

 - `renderHtmlAtBuildTime: false` (default value)

   The page is rendered to HTML at request-time.

   The page is (re-)rendered to HTML every time the user requests the page.
 - `renderHtmlAtBuildTime: true`

   The page is rendered to HTML at build-time.

   The page is rendered to HTML only once, when Reframe is building and transpiling your app.

By default,
a page is rendered to HTML at request-time.
But if the page's content is static
(a landing page, an about page, a blog post, a personal homepage, etc.)
it is wasteful to re-render its HTML on every page request.

By setting `renderHtmlAtBuildTime: true` to all your pages,
you effectively remove the need for a Node.js server.
You can then deploy your app to a static host such as Netlify or GitHub Pages.

If you don't want to render your page to HTML,
then do something like that:
~~~jsx
const Loading = require('./path/to/your/loading/component');
const Search = require('./path/to/your/search/component');

const SearchPageConfig = {
  title: 'Search products',
  route: '/search',
  view: SearchPage,
  // We render <Loading> to HTML at build-time
  renderHtmlAtBuildTime: true,
  // We render <Search> to the DOM
  doNotRenderInBrowser: false,
};

export default SearchPageConfig;

function SearchPage(props) {
  if( props.isNodejs ) {
    return <Loading/>;
  } else {
    return <Search {...props}/>;
  }
}
~~~

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Add/Remove Server

By setting `renderHtmlAtBuildTime: true` to all your pages you remove the need for a Node.js server.
See
[renderHtmlAtBuildTime](#renderhtmlatbuildtime).

You app is then only a backend with plain old HTML.

You can't have interactive views but
you can still have dynamic content by rendering the HTML dynamically at request-time.

More infos at
[doNotRenderInBrowser](#donotrenderinbrowser)
and
[renderHtmlAtBuildTime](#renderhtmlatbuildtime).

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Add/Remove Database

If you didn't eject the server code already then eject it:

~~~js
$ reframe eject server
~~~

(All starters, with the exception of the `react-frontend` starter, have already have ejected the server code for you.)

Once you have eject and gained control over the server, you are free to use add/remove any database/ORM.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Static Deploy

If your app is html-static, you can deploy it to a static host.

Your app is html-static when all your page configs have `renderHtmlAtBuildTime: true`.
In that case,
all HTMLs are rendered at build-time,
your app consists of static browser assets only,
no Node.js server is required,
and your app can be statically served.

If you add the `@reframe/deploy-git` plugin you can then
run `$ reframe deploy` to automatically deploy your app.

The deploy command works with any static host that integrates with Git such as
[Netlify](https://www.netlify.com/) (recommanded) or
[GitHub Pages](https://pages.github.com/).

If you want to manually deploy then simply copy/serve the `dist/browser/` directory.
This directory contains all browser assets.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Serverless Deploy

If your app is stateless then we recommand serverless deployment.

Serverless deployment solutions:
 - [Up](https://github.com/apex/up) - CLI tool to manage serverless deployement on AWS.

   The free tier is generous and will likely be enough for your first prototype.

   Step-by-step guide on how to deploy a Reframe app on Up: [github.com/AurelienLourot/reframe-on-up](https://github.com/AurelienLourot/reframe-on-up).
 - [Now](https://zeit.co/now) - Serverless host.

   Includes a free plan, albeit less generous than Up/AWS.
   (See [zeit.co/pricing](https://zeit.co/pricing).)

If you want to persist data, you may consider using a cloud database.
 - [List of cloud databases](/docs/cloud-databases.md)

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Vue

With the
[`@reframe/vue`](/plugins/vue) plugin
you can use Reframe with Vue instead of React.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## React Router

You can use the React Router components by adding the [@reframe/react-router](/plugins/react-router) plugin.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## TypeScript

You can write your app with TypeScript by adding the [@reframe/typescript](/plugins/typescript) plugin.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Express

You can use Express (instead of Hapi) by using the [@reframe/express](/plugins/express) plugin.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Koa

You can use Koa (instead of Hapi) by using the [@reframe/koa](/plugins/koa) plugin.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## PostCSS

You can write your styles with PostCSS by adding the [@reframe/postcss](/plugins/postcss) plugin.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## React Native (Web)

If you want an app on the web and on mobile,
you may consider create a web app with Reframe and [React Native Web](https://github.com/necolas/react-native-web)
and a mobile app with [React Native](https://facebook.github.io/react-native/).
Both app will then share most/lots of code.

Add the [`@reframe/react-native-web`](/plugins/react-native-web) plugin to render your page's React components with React Native Web.

Examples of apps using Reframe + RNW:
 - [/plugins/react-native-web/example](/plugins/react-native-web/example)
 - [/examples/react-native-web-and-react-router](/examples/react-native-web-and-react-router)

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## React Native (Web) + React Router

As mentioned in the previous section you can use Reframe + React Native Web to share code with your React Native mobile app.

And you can share routing logic by using Reframe + React Native Web + [React Router Web](https://reacttraining.com/react-router/web) for your web app and React Native + [React Router Native](https://reacttraining.com/react-router/native) for your mobile app.

For example:
 - [/examples/react-native-web-and-react-router](/examples/react-native-web-and-react-router)

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Bootstrap

See section [Frontend Libraries](#frontend-libraries) below.

## Semantic UI

See section [Frontend Libraries](#frontend-libraries) below.

## Frontend Libraries

There are two ways to add third party browser code:
 - Directly add the code with `<script>` and `<link>` tags.
 - Include the code into Reframe's bundles with `import 'thirdparty/main.js';` and `import 'thirdparty/style.css';`.

See
[Custom HTML <head>, <meta>, <html>, ...](#custom-html-head-meta-html-)
for how to change the HTML to add `<script>` and `<link>` tags.

See
[Custom Default Browser Entry](#custom-default-browser-entry)
for how to eject the browser entry to add
`import 'thirdparty/main.js';` and `import 'thirdparty/style.css';`.

Example that uses jQuery and Semantic UI:
 - [/examples/custom-browser-lib](/examples/custom-browser-lib)

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Custom Server

By default, Reframe creates a server with the web framework hapi ([hapijs.com](https://hapijs.com/)).

You can customize the hapi server by ejecting it with `$ reframe eject server`.

We encourage you to eject the server and you should if you want to
 - Add custom routes
 - Add API endpoints
 - Add authentication endpoints
 - Use a process manager such as PM2
 - etc.

Running `$ reframe eject server` will copy the following code to your codebase.

~~~js
// /plugins/hapi/start.js

const Hapi = require('hapi');
const config = require('@brillout/reconfig').getConfig({configFileName: 'reframe.config.js'});
const {symbolSuccess, colorEmphasis} = require('@brillout/cli-theme');
const HapiAdapter = require('@universal-adapter/hapi');

module.exports = start();

async function start() {
  const server = Hapi.Server({
      port: process.env.PORT || 3000,
      debug: {request: ['internal']},
  });

  await server.register(
    // We use https://github.com/brillout/universal-adapter to integrate Reframe with Hapi
    new HapiAdapter([
      // Run `$ reframe eject server-rendering` to eject the server rendering code
      config.ServerRendering,
      // Run `$ reframe eject server-assets` to eject the static asset serving code
      config.StaticAssets,
    ])
  );

  await server.start();

  const env = colorEmphasis(process.env.NODE_ENV||'development');
  console.log(symbolSuccess+'Server running (for '+env+')');

  return server;
}
~~~

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Custom Server Framework (Express, Koa, ...)

Check the [list of plugins](/docs/plugins.md) for a plugin integrating the server framework you want to use.
You can then get control over the server instance by runnning `$ reframe eject server`.

If there isn't a plugin for the server framework you want, then run
`$ reframe eject server`
to get control over the server.
At that point you can get rid of the current server framework and replace it another server framework.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Full Custom Server

The following ejectables give you full control over the server.

- `$ reframe eject server`

  Eject the code that creates the server instance.
  See previous sections.
- `$ reframe eject server-rendering`

  Eject the code that implements server-side rendering. (The generation of HTML of pages at request-time.)
- `$ reframe eject server-assets`

  Eject the code that implements the serving of static browser assets (JavaScript files, CSS files, images, fonts, etc.)

If you eject all these ejectables then every single server LOC is in your codebase and you have full control over the server logic.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Custom HTML <head>, <meta>, <html>, ...

Reframe uses [`@brillout/index-html`](https://github.com/brillout/index-html) to generate HTML.

You have full control over the "outer-part" HTML.
(`<meta>`, `<!DOCTYPE html`>, `<head>`, `<html>`, `<body>`, `<script>`, etc.)

There are two ways to change the outer-part HTML:
 - By creating a `index.html` file
 - Over the page config

1. Over the page config:

~~~js
// /examples/custom-head/pages/landing.config.js

import React from 'react';

export default {
    // Add <title>Welcome<title>
    title: 'Welcome',

    // Add <meta name="description" content="A welcome page.">
    description: 'A welcome page.',

    // Add
    scripts: [
        'https://example.org/awesome-lib.js',
    ],

    // Add <link href="https://example.org/awesome-lib.css" rel="stylesheet">
    styles: [
        'https://example.org/awesome-lib.css',
    ],

    // ...
    // ...
    // Every `@brillout/index-html` option is available over the page config
    // ...
    // ...

    route: '/',
    view: () =>
Welcome
,
    doNotRenderInBrowser: true,
};
~~~

Note that if `awesome-lib.js` and `awesome-lib.css` are inside your project, you can't follow this
technique. Instead you will have to [customize the browser entry](#custom-default-browser-entry).

2. Over a `index.html` file saved in your app's root directory:

~~~js
// /examples/custom-head/index.html

<!DOCTYPE html>

        <link rel="manifest" href="/manifest.json">
        !HEAD

        !BODY

~~~

Also, the `indexHtml` page config option allows you to override the `index.html` file for a specific page:

~~~js
// /examples/custom-head/pages/about.config.js

import React from 'react';

export default {
    // Set a different outer-part HTML for the `/about` page
    indexHtml: (
`<!DOCTYPE html>

        <title>About</title>
        !HEAD

        !BODY

`
    ),

    route: '/about',
    view: () =>
About Page
,
    doNotRenderInBrowser: true,
};
~~~

All `@brillout/index-html` options are available over the page config.

See [`@brillout/index-html`'s documentation](https://github.com/brillout/index-html) for the list of options.

Example:
 - [/examples/custom-head](/examples/custom-head)

If you want to use something else than `@brillout/index-html`, then you can eject the renderer,
see [Custom Renderer](#custom-renderer).

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Custom Renderer

By default Reframe renders the `view` property of your page configs with React.

You can customize how your views are rendered.

Either use another plugin in the [list of renderer plugins](/docs/plugins.md#renderers) or eject the renderer with `$ reframe eject renderer`.

Ejecting the React renderer will copy the following code to your codebase.

~~~js
// /plugins/react/renderToDom.js

const ReactDOM = require('react-dom');
const browserConfig = require('@brillout/browser-config');
const {CONTAINER_ID, getReactElement} = require('./common');

module.exports = renderToDom;

async function renderToDom({pageConfig, initialProps}) {
    const reactElement = getReactElement({
        pageConfig,
        initialProps,
        viewWrappers: browserConfig.browserViewWrappers,
    });

    const container = document.getElementById(CONTAINER_ID);
    ReactDOM.hydrate(reactElement, container);
}
~~~
~~~js
// /plugins/react/renderToHtml.js

const ReactDOMServer = require('react-dom/server');
const generateHtml = require('@brillout/index-html');
const config = require('@brillout/reconfig').getConfig({configFileName: 'reframe.config.js'});
const {CONTAINER_ID, getReactElement} = require('./common');

module.exports = renderToHtml;

async function renderToHtml({pageConfig, initialProps}) {
    const reactElement = getReactElement({
        pageConfig,
        initialProps,
        viewWrappers: config.nodejsViewWrappers,
    });

    const contentHtml = ReactDOMServer.renderToStaticMarkup(reactElement);

    const html = renderHtmlDocument(contentHtml, pageConfig);
    return html;
}

function renderHtmlDocument(contentHtml, pageConfig) {
    const htmlOptions = Object.assign({bodyHtmls: []}, pageConfig);
    htmlOptions.bodyHtmls.push('
'+contentHtml+'
');

    const html = generateHtml(htmlOptions);
    return html;
}
~~~
~~~js
// /plugins/react/common.js

const React = require('react');

module.exports = {
    CONTAINER_ID: 'root-react',
    getReactElement,
};

function getReactElement({pageConfig, initialProps, viewWrappers}) {
    let reactElement = React.createElement(pageConfig.view, initialProps);
    reactElement = applyViewWrappers({reactElement, initialProps, viewWrappers});
    return reactElement;
}

// Apply view wrappers.
// E.g. the `@reframe/react-router` plugin adds a view wrapper to add
// the provider-components `<BrowserRouter>` and `<StaticRouter>`.
function applyViewWrappers({reactElement, initialProps, viewWrappers=[]}) {
    viewWrappers
    .forEach(viewWrapper => {
        reactElement = viewWrapper(reactElement, initialProps);
    });
    return reactElement;
}
~~~

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Custom Default Browser Entry

You can customize the browser entry code by running `$reframe eject browser`.

We encourage you to do so and you should if you want to:
  - Initialize user tracking such as Google Analytics
  - Initialize error tracking such as Sentry
  - Add a frontend library such as Bootstrap or Semantic UI
  - etc.

Running `$reframe eject browser` ejects the following code.

~~~js
// /plugins/browser/browserInit.js

import browserConfig from '@brillout/browser-config';

initBrowser();

async function initBrowser() {
    // Include pre-init code here

    // Plugins can add init functions
    // For example:
    //  - page hydration (i.e. rendering of the page to the DOM)
    //  - user tracking initialization
    for(const initFunction of Object.values(browserConfig.initFunctions)) {
        await initFunction();
    }

    // Include post-init code here
}
~~~

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Custom Page Browser Entry

You can customize the browser entry code for a single page
without affecting the browser entry code of other pages.

You do this by setting the page config `browserInit`.
For example:

~~~js
// /examples/custom-browser/pages/custom-hydration.config.js

import React from 'react';
import TimeComponent from '../../basics/pages/time/TimeComponent';

export default {
    route: '/custom-hydration',
    browserInit: {
        initFile: './custom-hydration.js',
    },
    doNotRenderInBrowser: true,
    view: () => (

                Some static stuff.

                Current Time:

                    <TimeComponent/>

    ),
};
~~~

~~~js
// /examples/custom-browser/pages/custom-hydration.js

import React from 'react';
import ReactDOM from 'react-dom';
import TimeComponent from '../../basics/pages/time/TimeComponent';
import './style.css';

ReactDOM.hydrate(<TimeComponent/>, document.getElementById('time-hook'));

console.log('custom hydration');
~~~

You can see the example in full and other examples at [/examples/custom-browser](/examples/custom-browser).

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Full Custom Browser Entry

You can as well eject the code that orchestrates the hydration of the page by running `$ reframe eject browser-hydrate`.
If you want to customize the rendering process itself
you should run `$ reframe eject renderer` instead,
see [Custom Renderer](#custom-renderer).

The browser entry of each page is generated at build-time.
You can take control over the generation of browser entries by running `$ reframe eject build-browser-entries`.
We recommand to use the previously mentioned ejectables instead.
Use this ejectable as last resort.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Advanced Routing

###### Reframe's default router

By default, Reframe uses [`path-to-regexp`](https://github.com/pillarjs/path-to-regexp) to match URLs with a the page config's `route`.
(React Router uses `path-to-regexp` as well.)

For example, in the following page config, Reframe will use `path-to-regexp` to determine if a URL matches the page's route `'/hello/:name'`.

~~~jsx
const HelloPage = {
    route: '/hello/:name',
    view: ({route: {args: {name}}}) =>
Welcome {name}
,
};
~~~

See [`path-to-regexp`'s docs](https://github.com/pillarjs/path-to-regexp) for further information about the route string syntax.

###### Advanced routing with React Router

You can use React Router's components by adding the plugin [`@reframe/react-router`](/plugins/react-router).

Using React Router components allow you to implement:
 - **pushState-navigation**

   To navigate to a new page by manipulating the DOM instead of loading the new page's HTML.
   (A detailed explanation of "pushState-navigation" follows below.)
   Such navigation make sense for route changes that cause only small changes on the page.
   It would for example be prohibitive to reload the entire page for a URL change that causes only minor changes to a little box on the page.
 - **Nested Routes**

 - **SPAs**

   Apps where the app's entire browser-side code is bundled in one script and loaded at once.
 - **URL hash**

   URLs with a `window.location.hash`.

###### Html-navigation VS pushState-navigation

There are two ways of navigating between pages:
 - *HTML-navigation*

   When clicking a link, the new page's HTML is loaded.
   (In other words, the browser discards the current DOM and builds a new DOM upon the new page's HTML.)
 - *pushState-navigation*

   When clicking a link, the URL is changed by `history.pushState()` and the DOM is manipulated (instead of loading the new page's HTML).

By default, Reframe does HTML-navigation when using `<a>` links between pages defined with page configs.

###### pushState-navigation

By using React Router's components you can do pushState-navigation.
Pages are then defined by React Router's component instead of page configs.

Note that with *page* we denote any view that is identified with a URL:
If two URLs have similar views that differ in only in a small way,
we still speak of two pages because these two views have two different URLs.

Also note that the broswer-side code is splitted only between pages defined with page configs,
and pages defined with React Router components will share the same browser-side code bundle.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Custom Router

Reframe can be used with any routing library.

Either use another plugin in the [list of router plugins](/docs/plugins.md#routing) or eject the router with `$ reframe eject router`.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Custom Babel

You can customize the babel config by creating a `.babelrc` file.

Example:
 - [/examples/custom-babel](/examples/custom-babel)

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Custom Webpack

You can customize the webpack config by using `webpackBrowserConfig` and/or `webpackNodejsConfig`.

~~~js
// reframe.config.js

module.exports = {
    $plugins: [
        require('@reframe/react-kit')
    ],
    webpackBrowserConfig: webpackConfig,
    webpackNodejsConfig: webpackConfig,
};

function webpackConfig({
    config,

    // Webpack entries
    // For `webpackNodejsConfig` this is the list of found page config paths
    // For `webpackBrowserConfig` this is the list of (generated) browser entry files
    entries,

    // The directory where the built assets are expected to be
    outputPath,

    // Config modifiers provided by the package `@brillout/webpack-config-mod`
    setRule, getRule, getEntries, addBabelPreset, addBabelPlugin, modifyBabelOptions
}) {
    // Either
    //  - apply modifications to `config` (by using modifiers or manually), or
    //  - return an entirely new config object (by using `entries` and `outputPath`)

    return config;
}
~~~

All `@brillout/webpack-config-mod` config modifiers are listed at [/helpers/webpack-config-mod](/helpers/webpack-config-mod).

Examples:
 - Using config modifiers [/examples/custom-webpack](/examples/custom-webpack)
 - Fully custom config [/examples/custom-webpack-full](/examples/custom-webpack-full)
 - Source code of [`@reframe/postcss`](/plugins/postcss)
 - Source code of [`@reframe/react`](/plugins/react)
 - Source code of [`@reframe/typescript`](/plugins/typescript)

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

## Full Custom Build

Run `$ reframe eject build` to eject the overall build code.

It will copy the following file to your codebase.

~~~js
// /plugins/build/runBuild.js

const Build = require('webpack-ssr/Build');
const watchDir = require('webpack-ssr/watchDir');

const projectConfig = require('@brillout/reconfig').getConfig({configFileName: 'reframe.config.js'});

const outputDir = projectConfig.projectFiles.buildOutputDir;
const getPageFiles = () => projectConfig.getPageConfigFiles();
const getWebpackBrowserConfig = ({config, ...utils}) => projectConfig.webpackBrowserConfigModifier({config, ...utils});
const getWebpackNodejsConfig = ({config, ...utils}) => projectConfig.webpackNodejsConfigModifier({config, ...utils});
const {log, doNotWatchBuildFiles} = projectConfig;
const {pagesDir} = projectConfig.projectFiles;
const {getPageHtmls, getPageBrowserEntries} = projectConfig;
const serverEntryFile = projectConfig.transpileServerCode && projectConfig.serverEntryFile;

const build = new Build({
    outputDir,
    getPageFiles,
    getPageBrowserEntries,
    getPageHtmls,
    getWebpackBrowserConfig,
    getWebpackNodejsConfig,
    log,
    doNotWatchBuildFiles,
    serverEntryFile,
});

watchDir(pagesDir, () => {build()});

module.exports = build;
~~~

Run `$ reframe eject build-rendering` to eject `getPageHtmls()` to gain control over the static rendering.
(That is the rendering of pages to HTML that happens at build-time.
In other words, the HTML rendering of pages that have `renderHtmlAtBuildTime: true` in their page configs.)
Note that, most of the time, you should eject the renderer instead,
see [Custom Renderer](#custom-renderer).
Use this ejectable as last resort.

Run `$ reframe eject build-browser-entries` to eject `getPageBrowserEntries()` to gain control over the generation of the browser entry source code of each page.
Note that, most of the time, you should use the browser ejectables instead,
see the sections under "Custom > Browser".
Use this ejectable as last resort.

If you eject all build ejectables, then you have full control over the build logic.

Feel free to [open a GitHub issue](https://github.com/reframejs/reframe/issues/new) or [chat with Reframe authors on Discord](https://discord.gg/kqXf65G).

⇧ TOP  ⇧

repository: nmonmontmon/reframe

repo_name: nmonmontmon/reframe


text:
# 4 Killed, Several Injured in Mass Shooting at Halloween Party in Northern California

Published at: **2019-11-01T11:19:52+00:00**

Author: **Rachael Bunyan**

Original: [Time](https://time.com/5716078/orinda-shooting-halloween/)

Four people have been killed and several others injured in a mass shooting at what local media reports was a Halloween party attended by college students in northern California.
The shooting happened late Thursday in Orinda, Calif., which is about nine miles northeast of Oakland. The Contra Costa Sheriff’s Office confirmed that four people were killed and that there were “several” injuries. No further details were immediately available.
NBC Bay Area reported that witnesses said the shooting happened at an Airbnb rental that was the site of a Halloween party. Students from Laney College, a community college in Oakland, were among those attending, according to the TV station.
The sheriff’s office first confirmed the shooting about 11:45 p.m. local time.
Police told local media that they were overwhelmed by the crowd where the shooting occurred.
This is a developing story that will be updated.

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
<!--- Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> -->

# Configuring Netty Server Backend

The Netty server backend is built on top of [Netty](https://netty.io/).

> **Note**: The Netty server backend is not the default in 2.6.x, and so must be specifically enabled. See more information in [[Netty Server|NettyServer]] documentation.

## Default configuration

Play uses the following default configuration:

@[](/confs/play-netty-server/reference.conf)

The configurations above are specific to Netty server backend, but other more generic configurations are also available:

@[](/confs/play-server/reference.conf)

## Configuring transport socket

Native socket transport has higher performance and produces less garbage but is only available on Linux. You can configure the transport socket type in `application.conf`:

```properties
play.server {
  netty {
    transport = "native"
  }
}
```

## Configuring channel options

The available options are defined in [Netty channel option documentation](https://netty.io/4.1/api/io/netty/channel/ChannelOption.html). If you are using native socket transport you can set [these](https://netty.io/4.1/api/io/netty/channel/unix/UnixChannelOption.html) and [these](https://netty.io/4.1/api/io/netty/channel/epoll/EpollChannelOption.html) additional options.

repository: playframework/playframework

gha_language: Scala

repo_name: playframework/playframework


text:
---
layout: default
---

# 1996-09-17 - Re: Erasing Disks

## Header Data

From<EMAIL_ADDRESS>(Adamsc)

To: "Bill Frantz"<EMAIL_ADDRESS>Message Hash: e7ec209887fe2702c9a99b2c56c23f75b0335a6625bbbd36aa802762ffdf10c7

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-09-17 23:02:43 UTC

Raw Date: Wed, 18 Sep 1996 07:02:43 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Adamsc)
Date: Wed, 18 Sep 1996 07:02:43 +0800
To: "Bill Frantz"<EMAIL_ADDRESS>Subject: Re: Erasing Disks
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

On Sat, 14 Sep 1996 20:11:45 -0500 (CDT), Douglas R. Floyd wrote:

>> >But shredding the floppy?  No need to classify that, no secrets leaked

>> Burn after shredding, or you have a puzzle fan reassembling the shredded disk.

>Actually, taking the cookie portion out, putting it on an inverted cup so
>its in the center of the microwave, then letting it cook for 30 seconds
>does the job quite well =)

I've always been a fan of applying lighter fluid in a fashion similar to the
way the allies applied napalm to Dresden.  It's more satisfying... <g>

# Chris Adams<EMAIL_ADDRESS>| http://www.io-online.com/adamsc/adamsc.htp
#<EMAIL_ADDRESS>| V.M.<PHONE_NUMBER>
"I have never been able to figure out why anyone would want to play games on
a computer in any case when the whole system is a game.  Word processing,
spreadsheets, telecoms -- it's all a game.
	-- Duncan Frissell

{% endraw %}
```

## Thread

+ Return to [September 1996](/archive/1996/09)

+ Return to<EMAIL_ADDRESS>(Adamsc)](/authors/adamsc_at_ioonline_com_adamsc_)"

+ 1996-09-17 (Wed, 18 Sep 1996 07:02:43 +0800) - Re: Erasing Disks -<EMAIL_ADDRESS>(Adamsc)_


text:
---
layout: post
title:  "Who are smallholder farmers? And why is market access an issue?"
subtitle: "A concept video explaining how we use mobile tech to streamline crop transactions for smallholder buyers and farmers"
date:   2017-03-17 10:16:01 -0600
author: jacqui_poon
categories: posts
background: '/img/posts/2017-03-17.jpg'
---

### So, what exactly *is* our idea?
#### And what is our startup doing specifically?

In the following video, Jacqui will tell what Farming Data is all about. So, check it out and come learn about us!

*If you have any questions or want to connect with us, feel free to contact us through email<EMAIL_ADDRESS>or Twitter ([@farming_data](https://twitter.com/farming_data))!*


text:
# voxel-recipes

voxel.js plugin providing access to [craftingrecipes](https://github.com/deathcap/craftingrecipes)

Includes a central recipe list and crafting thesaurus

## License

MIT

repository: voxel/voxel-recipes

gha_language: JavaScript

repo_name: voxel/voxel-recipes


text:
# [Deep Learning - I. Goodfellow, Y. Bengio, A. Courville](http://www.deeplearningbook.org)

## Purpose
The purpose of this repo is **purely educational**.

All scripts and equations are meant as a help for those who wish to have a better understanding of the subjects explained in the book.

## Requirements:
* python >= 3.6
* ```pip install -r requirements.txt```

## Resources

* **[Machine Learning 2013](https://www.youtube.com/playlist?list=PLE6Wd9FR--EdyJ5lbFl8UuGjecvVw66F6)**

These are the lectures for a machine learning course taught by Nando de Freitas at UBC in 2013.

* **Deep Learning book:**
```@book{Goodfellow-et-al-2016,
    title={Deep Learning},
    author={Ian Goodfellow and Yoshua Bengio and Aaron Courville},
    publisher={MIT Press},
    note={\url{http://www.deeplearningbook.org}},
    year={2016}
}
```

repository: dariocazzani/deeplearning-book

gha_language: Python

repo_name: dariocazzani/deeplearning-book


text:
---
layout: default
---

# 1993-04-29 - pgp

## Header Data

From<EMAIL_ADDRESS>(Jim Bidzos)

To<EMAIL_ADDRESS>Message Hash: 497427c88413d98f3c3dc34bdad0a07559b28a3710840dccaa4d646a1e0c3d15

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-04-29 02:17:43 UTC

Raw Date: Wed, 28 Apr 93 19:17:43 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Jim Bidzos)
Date: Wed, 28 Apr 93 19:17:43 PDT
To<EMAIL_ADDRESS>Subject: pgp
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

I don't think you're aware of our position on pgp. Unfortunately, you
may leave us no choice but to take legal action, which we will unless
you cease promotion adn distribution of pgp. The next message will
state our position.

End forwarded msg----------------------------------------------------------
--
Testes saxi solidi!  **********************   Podex opacus gravedinosus est!
Stanton McCandlish,  SysOp:  Noise in the Void Data Center BBS
IndraNet: 369:1/1      FidoNet: 1:301/2      Internet<EMAIL_ADDRESS>Snail: 8020 Central SE #405, Albuquerque, New Mexico 87108 USA
Data phone: +1-505-246-8515 (24hr, 1200-14400 v32bis, N-8-1)
Vox phone:  +1-505-247-3402 (bps rate varies, depends on if you woke me up...:)

{% endraw %}
```

## Thread

+ Return to [April 1993](/archive/1993/04)

+ Return to<EMAIL_ADDRESS>(Jim Bidzos)](/authors/jim_at_rsa_com_jim_bidzos_)"

+ 1993-04-29 (Wed, 28 Apr 93 19:17:43 PDT) - pgp -<EMAIL_ADDRESS>(Jim Bidzos)_


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

Cubby is a command line tool used to help make interacting with [Hashicorp's Vault](https://github.com/hashicorp/vault) cubbyhold pattern much less painful.

Reference
---------

- [Vault](https://www.vaultproject.io/)
- [Cubbyhole](https://www.vaultproject.io/docs/secrets/cubbyhole/index.html)
- [Vault: Cubbyhole Authentication Principles](https://www.hashicorp.com/blog/vault-cubbyhole-principles.html)

How it Works
------------

1. You will need to be authenticated with vault.  I.E. you will need to have a token at `~/.vault-token`.
2. The `VAULT_ADDR` environment variable will need to be set to your instances of vault.

According to the cubbyhole pattern, we should not be passing around authentication tokens.  If we must (which we usually do with machines) we should only pass around tokens that have a very short ttl and a usage limit of 2.

Cubby helps facilitate this through Vaults http API.  It works in this order:

- Create the Temporary Token (The Temporary token assumes the default policy)
- Create the Permanent Token
- Store the Permanent Token in the cubbyhole/token secret backend with the Temporary token (1 use)
- Give the Temporary Token to STDOUT.

In the end, you'll get a temporary token that has 1 use left that you can pass to your army of machines.

Installation
------------

	npm install -g vs-cubby

Usage
-----
	cubby -help

	[options]
	-t, --ttl:		The time to live for the temporary token. (Default 15m)
	-p, --policy:	A policy to associate with the permanent token. Can be used multiple times.

	cubby -t 5m -p engineers -p notadmins

Development
-----------

We like to use [coffeescript](http://coffeescript.org) and [grunt](http://gruntjs.com) here at VeriShip, so in order to build and run all tests, simply run:

	npm run dev

This will compile all source and test files then run all the tests.

Contributing
------------

If you encounter a bug or would like a feature that is not a part of Cubby yet, please fork and submit a pull request!

License
-------

MIT License

Copyright (c) 2016 VeriShip Inc.

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

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

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

repository: VeriShip/cubby

repo_name: VeriShip/cubby


text:
# Virginiah Portfolio

## Project Description
- This is a personal portfolio for displaying my coding skills so far.

## Contibutors
- Virginiah Wamuyu

## Project Set Up Instructions
- To use this projects follow the steps below
- git  clone into your working folder
- click on the index.html file to view the web page

## Live link
- https://virginiah2020.github.io/portfolio/

## Copyrights & License

## License

[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)

- **[MIT license](http://opensource.org/licenses/mit-license.php)**
- Copyright 2020 © Virginiah Wamuyu.


text:
# Monty Hall Problem

A good introduction to the Monty Hall Problem can be found [here](https://youtu.be/ugbWqWCcxrg).

From [wikipedia](https://en.wikipedia.org/wiki/Monty_Hall_problem)
```text
Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car;
behind the others, goats. You pick a door, say   No.1, and the host, who knows what's behind the doors,
opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick doorNo. 2?"
Is it to your advantage to switch your choice?

Under the standard assumptions, contestants who switch have a 2/3 chance of winning the car, while contestants
who stick to their initial choice have only a 1/3 chance.
 ```
## Simulation
On running this simulation, Monty Hall Problem started to converge towards the theoretical probability of 2/3 in case of switching the door and towards 1/3 in case of sticking with initial choice.
![Simulation Graph](anim.gif)

## License
[**THE MIT LICENSE**](../LICENSE) Copyright (c) 2018 Kumar Sourav

repository: kumarsourav/Monte-Carlo-Simulation

repo_name: kumarsourav/Monte-Carlo-Simulation