text:
#What does puts do?
"Puts" prints the output to the console on another line.

#What is an integer? What is a float?
An integer is a whole number and a float is a number with decimal points.

#What is the difference between float and integer division? How would you explain the difference to someone who doesn't know anything about programming?
In integer division, you will only get an integer back even if there is a remainder. For example, 9/4 will get you 2. If you were to use float division and input 9.0/4.0 you would get 2.25.

# mini challenges

```ruby
puts 24 * 365
puts 60 * 24 * 365 * 10
```

#How does Ruby handle addition, subtraction, multiplication, and division of numbers?
Ruby uses +, -, * and / to deal with addition, subtraction, multiplication, and division respectively.

#What is the difference between integers and floats?
Integers are numbers without decimals and floats are numbers with decimals.

#What is the difference between integer and float division?
Integer division only returns whole numbers and rounds down to the nearest whole number. Float division would return the exact number in decimals.

#What are strings? Why and when would you use them?
Strings are a group of anything as long as they are between single quotes. You use strings as a way to manipulate the contents inside with other ruby commands.

#What are local variables? Why and when would you use them?
Variables are a name given to strings so that they are more easily manipulated.

#How was this challenge? Did you get a good review of some of the basics?
This challenge was a great review of some of the work we did before the interview. It's nice to be able to work with some comfort after a few weeks of being completely new to the content.

[Defining Variable](https://github.com/Petey101/phase0/blob/master/week-4/defining-variables.rb)

[Simple String](https://github.com/Petey101/phase0/blob/master/week-4/simple-string.rb)

[Basic Math](https://github.com/Petey101/phase0/blob/master/week-4/basic-math.rb)

gha_language: Ruby


text:
# RJI Image Ranking System

Machine Learning Image Classifier Designed to Help Journalists and Photographers

## CS4320 Software Engineering

## Group 17: Antonio Valazquez, Byron Smith, Weston Verhulst

### Live Deployment Environment

Check out our final project [here.](http://ec2-3-88-210-63.compute-1.amazonaws.com/)

### What Our Project Does

Our final project is a fully working ranking system that takes user-uploaded images and gives them a score. Then, the user is allowed to view and sort the images they've uploaded, and select any or all photos that they'd like to redownload.

### How It's Made

This website design is based off of a bootstrap template. Server side code is handled via php, which interacts with a mySQL database. We're hosting our system on an Amazon EC2 instance, which again can be [found here.](http://ec2-3-88-210-63.compute-1.amazonaws.com/) The image classifier that we use to score and rank the images is the [idealo image classifier](https://github.com/idealo/image-quality-assessment), which we are also hosting on the EC2 server. This classifier has not been trained on our data set, and is simply the "out-of-the-box" model.

### Deployment Instructions

We elected to use Amazon Web Services to deploy our project. We selected the Amazon Linux AMI for our server as it already came with MySQL, Docker, and the appropriate Python libraries already installed.  Should you chose to deploy our project on a different Linux environment, you will need to install Docker, MySQL and at minimum Python 2.7. You will also need to install Exiftool by Phil Harvey. There is not a repository to fetch Exiftool, so you will have to acquire it using wget to retrieve the needed packets; enter the following commands

wget http://owl.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.38.tar.gz
tar -xzf Image-Exiftool-11.38.tar.gz
cd Exiftool-11.38
sudo cp -r exiftool lib /usr/local/bin

Steps
1.	Image Selection
![Deployment Image](https://github.com/WestonV/RJI-Image-Classifier/blob/master/Sprint%204/Deployment.png)

-	Our server ran best when selecting the t2.small type instance, as the extra memory helped the photo ranker run smoother.
-	We also used 30 GB for our storage size.
-	Make sure to allow HTTP traffic in the security group.
2.	Install a LAMP Server
o	https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
o	Follow these instructions to install Apache and Mysql
3.	Download our Git html repository and place it at /var/www/html in the system.
4.	Change directory to /var/www/html/image-quality-assessment
5.	The following commands will get the docker machine and image up and running.
a.	sudo yum install docker
b.	sudo usermod -aG docker ec2-user
c.	sudo service docker start
d.	docker build -t nima-cpu . -f Dockerfile.cpu
6.	Make predict.sh and rank.sh executable
7.	You can test that docker is working using the following command in the image-quality-assessment directory.
	./predict  \
	--docker-image nima-cpu \
	--base-model-name MobileNet \
	--weights-file $(pwd)/models/MobileNet/weights_mobilenet_technical_0.11.hdf5 \
	--image-source $(pwd)/src/tests/test_images/42039.jpg
8.	Mysql stuff:  You will need to configure your local database. To do this log into the mysql prompt with the credentials you created in step 2. Then enter the following commands
	mysql> use db_name;
	mysql> source sprint2.sql;

### Thank You

license: MIT

repository: WestonV/RJI-Image-Classifier

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: WestonV/RJI-Image-Classifier


text:
# jBASE 5.7.4 Release Notes

<PageHeader />

This release includes various internal bug fixes and the following enhancements and patches:

## Patches

- [PN5\_60894](./../pn5_60894) - **listf -xml** does not work on Linux
- [PN5\_60899](./../pn5_60899) - New options for jbase\_agent: -d,-a,-J[dDpr]
- [PN5\_60900](./../pn5_60900) - Add extensions to Dynamic Objects per RFC 7159
- [PN5\_60902](./../pn5_60902) - Distributed Files: Add new error messages to enable failures to be better reported
- [PN5\_60904](./../pn5_60904) - Spooler corruption on shutdown
- [PN5\_60907](./../pn5_60907) - **CREATE-FILE TYPE=JBC** needs to create a dictionary for the source code
- [PN5\_60908](./../pn5_60908) - Enhance the **DECATALOG** command to delete the intermediate object code that gets generated when a program is compiled
- [PN5\_60909](./../pn5_60909) - Change how admin privileges are checked in Windows
- [PN5\_60910](./../pn5_60910) - Add **jDLS** status to **jdiag** output when using **-s** or **-v** option (show services)
- [PN5\_60911](./../pn5_60911) - Prevent a program aborting while doing a SELECT through a Dynamic File
- [PN5\_60913](./../pn5_60913) - Remove the restriction which prevents 2 or more copies of jlogdup restoring to the same machine simultaneously
- [PN5\_60914](./../pn5_60914) - **GET-LIST** in a Proc produced incorrect results in D3 emulation
- [PN5\_60915](./../pn5_60915) - Transaction Journaling: Prevent a segmentation violation when one of the log sets could not be accessed
- [PN5\_60916](./../pn5_60916) - Optimize select-list output when the list contains a large number of multi-values (> 100,000)
- [PN5\_60917](./../pn5_60917) - Spooler: **SP-CREATE Fnn** creates form queues with the wrong queue number
- [PN5\_60919](./../pn5_60919) - Licensing: Multi-session licenses limited to 255 sessions and up to 255 licenses per session

Back to [5.7.4 Release Notes](./../README.md)

<PageFooter />


text:
# Pierre's Treat Tracker

#### Written by Maxwell Meyer

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)

## Description

An MVC web app for a fictional bakery built to demonstrate the application of a many-to-many relationship in a MySQL database, and the use of Identity in allowing a user to create and authenticate a personal account. The app can store both Treats and Flavors, and the logged in user can view a list of both, as well as their various shared attributes. Built utilizing code-first migrations via the MS Entity Framework, as well as Identity for user authentication/authorization.

## Applied Technologies

This project was built using:

- C# 9.0
- ASP.NET 5.0(https://dotnet.microsoft.com/download/dotnet/5.0)
- ASP.NET MVC
- MySQL and MySQL Workbench
  _ Razor
  _ Entity framework
  \_ Identity framework

### Instructions for Installing C# and .NET:

**1a.** _WINDOWS: Download the [64-bit .NET 5 SDK](https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-5.0.102-windows-x64-installer). Clicking these links will prompt a **.exe** file download from Microsoft_.\
 \
 **1b.** MAC: Download this [.NET 5 SDK](https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-5.0.100-macos-x64-installer). Clicking this link will prompt a **.pkg** file download from Microsoft.\
 \
 **2.** _Open the file and follow the steps provided by the installer for your OS_.\
 \
 **3.** _Confirm the installation is successful by opening a new Windows PowerShell OR Max Terminal window and running the command dotnet --version_.\

### Installation/Setup

1. View on Github

2. Alternatively, clone this repository to your computer and navigate to the cloned directory

3. Download MySQLWorkBench

4. Navigate to the `TreatShop` directory
5. Open with your preferred text editor
6. To setup a SQL database using MySQL:

   - Create an `appsettings.json` file in the `TreatShop` directory
   - Copy the text below and paste into the `appsettings.json` file, replacing `<password>` with your MySQL password:

   ```
     {
        "ConnectionStrings": {
           "DefaultConnection": "Server=localhost;Port=3306;database=<your_db_name_here>;uid=root;pwd=<password>;"
         }
     }
   ```

   - Open your terminal and run the command: `mysql -uroot -p<mysql_password>` (replace `<mysql_password>` with your personal MySQL password) and hit enter to launch MySQL servers
   - Type the following commands to setup the database:
     - `CREATE DATABASE <your_db_name_here>;` to make a new database
     - `USE <your_db_name_here>;` to connect to the new database

7. In the Factory directory, run the terminal command `dotnet restore`

8. Now run `dotnet ef migrations add Initial` to build the Migrations Folder

9. Run `dotnet ef database update` to implement the database structure

10. Run `dotnet watch run` to run the application on your browser's local server at `http://localhost:5000`

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)

## License Information

You can find all applicable licensing information [here](https://opensource.org/licenses/MIT).

## Contact me!

Maxwell Meyer

<EMAIL_ADDRESS>

branch_name: refs/heads/main


text:
# SmartCore::ValueObject · [![Gem Version](https://badge.fury.io/rb/smart_value-object.svg)](https://badge.fury.io/rb/smart_value-object)

Value Object pattern realized in scope of Ruby.

---

## Major featurs

- `attribute` and `property` semantics;
- primitive immutability based on `#freeze` invocation;
- read-only instance attributes and properties;
- support for hash representation (other formats coming soon);
- support for:
  - semantic comparability (`Comparable`, `#<=>`, `#eql?`) (based on object's type and object's attributes and parameters);
  - semantic enumerability (`Enumerable`, `#each`) (enumerates itself by default);
  - (`soon`) `#clone` and `#dup`;

---

## Installation

```ruby
gem 'smart_value-object'
```

```shell
bundle install
# --- or ---
gem install smart_value-object
```

```ruby
require 'smart_core/value-object'
```

---

## Synopsis

```ruby
class Address < SmartCore::ValueObject
  attribute :country, 'value.string' # an alias of SmartCore::Types::Value::String (see smart_initializer gem)
  attribute :city,    'value.string'
  property :location, 'value.string'
  property :capital,  SmartCore::Types::Value::Boolean
end

khabarovsk = Address.new('Russia', 'Khabaovsk', location: '48.4814/135.0721', capital: false)
same_city = Address.new('Russia', 'Khabaovsk', location: '48.4814/135.0721', capital: false)
another_city = Address.new('Russia', 'Moscow', location: '59.9311/30.3609', capital: false)
```

```ruby
khabarovsk.frozen? # => true
```

```ruby
khabarovsk.country # => 'Russia'
khabarovsk.city # => 'Khabarovsk'
khabarovsk.location # => '48.4814/135.0721'
khabarovsk.capital # => false
```

```ruby
khabarovsk.to_h # or #as_hash or #to_hash
# => returns:
{ city: 'Russia', country: 'Khabaovsk', location: '48.4814/135.0721', capital: false }
```

```ruby
# comparability:
khabarovsk == same_city # => true
khabarovsk == another_city # => false
```

```ruby
# default Enumerable behavior:
khabarovsk.to_a # => [khabarovsk]
khabarovsk.each { |entity| puts entity } # => outputs itself
```

---

## Roadmap

- Migrate to `GitHub Actions`;

---

## Build

- run tests:

```shell
bundle exec rspec
```

- run code style checks:

```shell
bundle exec rubocop
```

- run code style checks with auto-correction:

```shell
bundle exec rubocop -A
```

---

## Contributing

- Fork it ( https://github.com/smart-rb/smart_value-object )
- Create your feature branch (`git checkout -b feature/my-new-feature`)
- Commit your changes (`git commit -am '[feature_context] Add some feature'`)
- Push to the branch (`git push origin feature/my-new-feature`)
- Create new Pull Request

## License

Released under MIT License.

## Authors

[Rustam Ibragimov](https://github.com/0exp)


text:
`run.sh` accepts several options:

## Run all tests

```bash
./run.sh
```

## Run only one file

```bash
./run.sh tests/test_waf.py
```

## Run only one class, or one method

```bash
./run.sh tests/test_waf.py::Test_WAFAddresses

# and one method:
./run.sh tests/test_waf.py::Test_WAFAddresses::test_post_json_value
```

## Spawn componenents, but do nothing

```bash
./run.sh scenarios/sleep.py

# play with the weblog, and look inside logs/interfaces/ what's happening
```

repository: alaabenfatma/system-tests

repo_name: alaabenfatma/system-tests


text:
Regarding use case diagrams:
Our project involves creating software platform for Universal Testing Machine.
It involves a main software that will run on PC as well as a smaller software that'll run on Arduino.
The software on Arduino will mainly facilate communication between hardware and the software on PC.
I've created 2 separate use case diagrams: one for PC software and one for Arduino software .
However, all other UML diagrams are for the PC software only.

Regarding component diagram:
Usually component diagrams are supposed to be high level however our project software did not involve many high level components(most are low level),
 so I've created a comparatively lower level component diagram.

path: /Design Artifacts (UML diagrams)/README.md


text:
# Step 2: \(Optional\) Configure a cluster

After you create an Alibaba Cloud Elasticsearch cluster, you can configure the cluster to improve search efficiency and service security.

## Enable the Auto Indexing feature

**Note:**

-   The **Auto Indexing** feature is designed for testing purposes. We recommend that you do not enable this feature in production environments.
-   Before you import data into an Elasticsearch cluster, you must manually create both indexes and mappings for the data. If you do not create both indexes and mappings, errors may occur. For example, if you delete the mappings for a document and then upload another document that does not have mappings, the Auto Indexing feature creates mappings for both documents. The created mappings may not be suitable for your application. To avoid this issue, Elasticsearch disables the **Auto Indexing** feature by default.
-   After you enable the **Auto Indexing** feature, the system restarts your Elasticsearch cluster. Therefore, before you enable this feature, make sure that the restart does not affect your services.

If you must use the **Auto Indexing** feature, perform the following steps to enable this feature:

1.  Log on to the [Alibaba Cloud Elasticsearch console](https://elasticsearch.console.aliyun.com/#/home).

2.  In the left-side navigation pane, click **Elasticsearch Clusters**.

3.  In the top navigation bar, select a resource group and a region. On the **Clusters** page, click the ID of the desired cluster.

4.  In the left-side navigation pane of the page that appears, click **Cluster Configuration**.

5.  On the **Cluster Configuration** page, click **Modify Configuration** on the right side of **YML Configuration**.

6.  In the **YML File Configuration** pane, set **Auto Indexing** to **Enable**.

7.  Select **This operation will restart the cluster. Continue?** and click **OK**.

    The system then restarts the cluster. After the cluster is restarted, the **Auto Indexing** feature is enabled.

## Configure plug-ins

On the Plug-ins page, you can install or remove built-in plug-ins, use the standard or rolling update method to update IK dictionaries, or upload custom plug-ins. For more information, see [Install and remove a built-in plug-in](/intl.en-US/Elasticsearch Instances Management/Plug-ins/Install and remove a built-in plug-in.md), [Use the analysis-ik plug-in](/intl.en-US/Elasticsearch Instances Management/Plug-ins/Built-in plug-ins/Use the analysis-ik plug-in.md), and [Upload and install a custom plug-in](/intl.en-US/Elasticsearch Instances Management/Plug-ins/Upload and install a custom plug-in.md).

## Configure security settings

On the Security page, you can reset the password that is used to access your Elasticsearch cluster, configure a virtual private cloud \(VPC\) whitelist, and enable the Public Network Access feature. You can also configure a public IP address whitelist, enable HTTPS, or configure cluster interconnection. For more information, see [Security](/intl.en-US/Elasticsearch Instances Management/Security/Configure a whitelist to access an Elasticsearch cluster over the Internet or a VPC.md).

## Configure monitoring and alerting settings

Alibaba Cloud Elasticsearch can monitor the following metrics of Elasticsearch clusters and send text messages to alert users. You can customize alerting thresholds for the metrics. For more information, see [Configure Elasticsearch alerts in Cloud Monitor](/intl.en-US/Elasticsearch Instances Management/Cluster monitoring and alerting/Configure the monitoring and alerting feature in Cloud Monitor.md).

-   ClusterStatus
-   ClusterQueryQPS\(Count/Second\)
-   ClusterIndexQPS\(Count/Second\)
-   NodeCPUUtilization\(%\)
-   NodeDiskUtilization\(%\)
-   NodeHeapMemoryUtilization\(%\)
-   NodeLoad\_1m

url: https://raw.githubusercontent.com/PhilYue/elasticsearch/848be25922830132834518c57903c05d6c85b177/intl.en-US/Elasticsearch Instances Management/Quick Start/Step 2: (Optional) Configure a cluster.md

repository: PhilYue/elasticsearch

repo_name: PhilYue/elasticsearch


text:
RESTful Clients in Rails - the Demo
===================================

This is the sample code for the ["RESTful Clients in Rails"](http://www.meetup.com/SFRails/events/54859542/)
talk by Jack Lawson ([ajacksified](https://github.com/ajacksified)).

Tested with Ruby 1.9.3. Uses Rails 3.2.1.

Setup Notes
-----------

Note the configuration in config/initializers/hogan\_assets and
config/initializers/stache. These need to match each other so that they can
point to each other's mustache views for client delivery and rendering.

Optionally, if you just want to check out the mustache / backbone / rails stuff
and not the API, stub out the two calls to api\_call in offers\_controller and
return formatted JSON (as defined in the next section.)

Endpoint Notes
--------------

API endpoint not included. Copy the api\_endpoints.yml.example file, whack the
.example from the end, and point at a local server that serves up super simple
JSON with a format such as the following:

    {
      "response_data": {
        "id":7,
        "start_date":"2010-05-28",
        "end_date":"2010-06-01",
        "title":"50% Off Round Pond Estate Wine Tasting and Gourmet Gift Box ",
        "sales_pitch":"
Let’s face it. Of all the ways to get through the week,  there’s one that sticks out above the rest: Wine. So how about taking that to the next level with a special trip to Round Pond Estate in the highly acclaimed Rutherford region of Napa Valley? There, you will get a Round Pond Wine Tasting for two, paired with delectable gourmet appetizers made with ingredients farmed right on the estate itself.  The tasting includes the 2007 Cabernet Sauvignon that just scored 94 points with Wine Spectator.
\r\n
The experience doesn't end once you leave the estate. You’ll also get the Round Pond Gourmet Classic Gift Box, with a variety of treats including a bottle of their award winning olive oil, their syrup, their vinegar and last but certainly not least, a bottle of their 2006 Cabernet Sauvignon.
"
      }
    }

Or, better yet, play with this code, modify it to hit some other open API like
[Twitter](https://dev.twitter.com/docs/api/1/get/search) and build something.

Todo
----

* Rewrite application controller api call method, which is really hacky.

License
-------

All code MIT licensed.

extension: markdown


text:
# LAB04 - Connect an IoT Device to Azure
## Lab Scenario
Contoso is known for producing high quality cheeses. Due to the company's rapid growth in both popularity and sales, they want to take steps to ensure that their cheeses stay at the same high level of quality that their customers expect. Therefor they have decided to launch an automated system that uses IoT devices to monitor temperature and humidity. The rate at which telemetry data is communicated will be adjustable to help ensure that their manufacturing process is under control as batches of cheese proceed through environmentally sensitive processes.

## In this lab
In this lab, you will learn how to register, configure and run a simulated device to send Device-to-Cloud telemetry messages.

![ScreenShot](../Images/04-Architecture.png)

## Prerequisites
This lab assumes that you have the following resources available:

Resource Type | Resource Name
--------------|--------------
Resource Group | AZ-220-RG
IoT Hub | AZ-220-HUB-*{YOUR-ID}*

### **Exercise 1: Create an Azure IoT Hub Device ID using Azure CLI**
The Azure CLI modules include several commands for managing IoT Devices within Azure IoT Hub under the `az iot hub device-identity` command group. These commands can be used to manage IoT Devices within scripts or directly from the command-line / terminal.
- Inside an Azure Cloud Shell, make sure you have the latest IoT Extension installed:
  ```sh
  az extension add --name azure-cli-iot-ext
  ```
- Inside the Azure Cloud Shell, now create a new Device Identity in your IoT Hub:
  ```sh
  az iot hub device-identity create --hub-name {IoTHubName} --device-id SimulatedDevice1
  az iot hub device-identity show-connection-string --hub-name {IoTHubName} --device-id SimulatedDevice1 --output table
  ```
### **Exercise 2: Configure the Device (using C#)**
You will now configure a simuated device written in C# to connect to your Azure IoT Hub using the Device ID and Shared Access Key created in exercise 1.
- Using Visual Studio Code, in the /LabFiles folder for this lab, open the SimulatedDevice.cs file
- Add your connection string to the SimulatedDevice.cs file
- Run the simulated device from within the Visual Studio Code terminal
### **Exercise 3: Verify the Telemetry Stream sent to your Azure IoT Hub**
You will again use the Azure CLI, but this time to verify telemetry sent by your simulated device.
- Inside an Azure Cloud Shell, run the following command to view D2C messages being sent to the Azure IoT Hub endpoint:
  ```sh
  az iot hub monitor-events --hub-name {IoTHubName} --device-id SimuatedDevice1
  ```
This concludes LAB04. If you want to have more detailed instructions for the lab, complete step-by-step instructions are [available here](https://github.com/MicrosoftLearning/AZ-220-Microsoft-Azure-IoT-Developer/blob/master/Instructions/Labs/LAB_AK_04-connect-iot-device-to-azure.md).

gha_language: C#

gha_license_id: MIT


text:
# Design Principles

Principles to follow when extending Kubernetes.

## API

See also the [API conventions](../devel/api-conventions.md).

* All APIs should be declarative.
* API objects should be complementary and composable, not opaque wrappers.
* The control plane should be transparent -- there are no hidden internal APIs.
* The cost of API operations should be proportional to the number of objects
intentionally operated upon. Therefore, common filtered lookups must be indexed.
Beware of patterns of multiple API calls that would incur quadratic behavior.
* Object status must be 100% reconstructable by observation. Any history kept
must be just an optimization and not required for correct operation.
* Cluster-wide invariants are difficult to enforce correctly. Try not to add
them. If you must have them, don't enforce them atomically in master components,
that is contention-prone and doesn't provide a recovery path in the case of a
bug allowing the invariant to be violated. Instead, provide a series of checks
to reduce the probability of a violation, and make every component involved able
to recover from an invariant violation.
* Low-level APIs should be designed for control by higher-level systems.
Higher-level APIs should be intent-oriented (think SLOs) rather than
implementation-oriented (think control knobs).

## Control logic

* Functionality must be *level-based*, meaning the system must operate correctly
given the desired state and the current/observed state, regardless of how many
intermediate state updates may have been missed. Edge-triggered behavior must be
just an optimization.
* Assume an open world: continually verify assumptions and gracefully adapt to
external events and/or actors. Example: we allow users to kill pods under
control of a replication controller; it just replaces them.
* Do not define comprehensive state machines for objects with behaviors
associated with state transitions and/or "assumed" states that cannot be
ascertained by observation.
* Don't assume a component's decisions will not be overridden or rejected, nor
for the component to always understand why. For example, etcd may reject writes.
Kubelet may reject pods. The scheduler may not be able to schedule pods. Retry,
but back off and/or make alternative decisions.
* Components should be self-healing. For example, if you must keep some state
(e.g., cache) the content needs to be periodically refreshed, so that if an item
does get erroneously stored or a deletion event is missed etc, it will be soon
fixed, ideally on timescales that are shorter than what will attract attention
from humans.
* Component behavior should degrade gracefully. Prioritize actions so that the
most important activities can continue to function even when overloaded and/or
in states of partial failure.

## Architecture

* Only the apiserver should communicate with etcd/store, and not other
components (scheduler, kubelet, etc.).
* Compromising a single node shouldn't compromise the cluster.
* Components should continue to do what they were last told in the absence of
new instructions (e.g., due to network partition or component outage).
* All components should keep all relevant state in memory all the time. The
apiserver should write through to etcd/store, other components should write
through to the apiserver, and they should watch for updates made by other
clients.
* Watch is preferred over polling.

## Extensibility

TODO: pluggability

## Bootstrapping

* [Self-hosting](http://issue.k8s.io/246) of all components is a goal.
* Minimize the number of dependencies, particularly those required for
steady-state operation.
* Stratify the dependencies that remain via principled layering.
* Break any circular dependencies by converting hard dependencies to soft
dependencies.
  * Also accept that data from other components from another source, such as
local files, which can then be manually populated at bootstrap time and then
continuously updated once those other components are available.
  * State should be rediscoverable and/or reconstructable.
  * Make it easy to run temporary, bootstrap instances of all components in
order to create the runtime state needed to run the components in the steady
state; use a lock (master election for distributed components, file lock for
local components like Kubelet) to coordinate handoff. We call this technique
"pivoting".
  * Have a solution to restart dead components. For distributed components,
replication works well. For local components such as Kubelet, a process manager
or even a simple shell loop works.

## Availability

TODO

## General principles

* [Eric Raymond's 17 UNIX rules](https://en.wikipedia.org/wiki/Unix_philosophy#Eric_Raymond.E2.80.99s_17_Unix_Rules)

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

repository: LINBIT/drbd-flex-provision

gha_language: Go

repo_name: LINBIT/drbd-flex-provision


text:
# Laravel Storage Connect

**This package is no longer being maintained. It is functional, at least for the Dropbox driver. However we don't plan to do much new development with this package. If you want to take over the development/maintenance, open an issue to let us know.**

[![Latest Version on Packagist](https://img.shields.io/packagist/v/stechstudio/laravel-storage-connect.svg?style=flat-square)](https://packagist.org/packages/stechstudio/laravel-storage-connect)
[![Build Status](https://img.shields.io/travis/stechstudio/laravel-storage-connect/master.svg?style=flat-square)](https://travis-ci.org/stechstudio/laravel-storage-connect)
[![Quality Score](https://img.shields.io/scrutinizer/g/stechstudio/laravel-storage-connect.svg?style=flat-square)](https://scrutinizer-ci.com/g/stechstudio/laravel-storage-connect)
[![Total Downloads](https://img.shields.io/packagist/dt/stechstudio/laravel-storage-connect.svg?style=flat-square)](https://packagist.org/packages/stechstudio/laravel-storage-connect)

This package is designed to drastically simplify the process of authenticating to a user's cloud storage account uploading files.

 - Handles OAuth flow to authorize a cloud storage account
 - Serializes and handles storing/loading of connection details
 - Queues upload tasks
 - Retries upload failures with increasing backoff
 - Supports uploading from local filesystem, S3 hosted files (registers a stream wrapper), or any URL
 - Automatically disables a connection if storage quota is full, and then re-enables if space is freed up
 - Fires events for all activity, and can optionally log activity for you

Currently Dropbox and Google Drive are the supported cloud storage backends.

➔ [View full documentation](https://stechstudio.github.io/laravel-storage-connect/)

repository: siberfx/laravel-storage-connect

gha_language: PHP

repo_name: siberfx/laravel-storage-connect


text:
---
layout: default
---

# 1994-03-31 -<EMAIL_ADDRESS>(Joe McConnell): Latest Headlines ]

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: aa6cb2b4998f63aed42bfad7554cdb556a870505187d6342f1c4bbc764299eb8

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1994-03-31 18:39:00 UTC

Raw Date: Thu, 31 Mar 94 10:39:00 PST

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Thu, 31 Mar 94 10:39:00 PST
To<EMAIL_ADDRESS>Subject<EMAIL_ADDRESS>(Joe McConnell): Latest Headlines ]
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

+===========================================================================+
| Copyright 1994 by Wood-Charles Associates.      THE
ADMINISTRATION'S OFFICE OF CAVING IN TO LAW ENFORCEMENT AGENCIES
ISSUED A STATEMENT SUPPORTING THE PROGRAM.

NEW INTERNET PUBLICATIONS ON SHELVES

ANN ARBOR: THE OUTPOURING OF PUBLIC INTEREST IN CONNECTIVITY HAS,
PREDICTABLY, RESULTED IN A SPATE OF INTERNET BOOKS.  AS YOU MIGHT
EXPECT, THE FIRST CROP WERE MOSTLY INTRODUCTORY AND AIMED AT GENERAL
AUDIENCES.  NOW, HOWEVER, THE TITLES ARE BECOMING MORE NICHE-ORIENTED,
WITH THE FOLLOWING NEW VOLUMES HITTING THE STORES NOW.

THE INTERNET GUIDE FOR CATS: INCLUDES CHAPTERS ON "HOW TO SEND ONE
OF YOUR OWNERS MAIL DENYING THAT THE OTHER ONE HAS REMEMBERED TO
FEED YOU," "WALLOWING AROUND ON THE KEYBOARD: THE ULTIMATE ENCRYPTION
SYSTEM?" AND "HOW TO TELL IF SOMEONE ON THE INTERNET REALLY _IS_ A DOG."

EVERYTHING THE GOVERNOR OF MICHIGAN NEEDS TO KNOW ABOUT THE INTERNET: A
LANDMARK IN NICHE MARKETING -- A BOOK AIMED AT ONE INDIVIDUAL READER.

      SO SAYS THE
PRESIDENT OF ZASTRONICS, INC., MAKERS OF ELECTRONIC LAWN ORNAMENTS.

                            -30-

------- End of Forwarded Message

{% endraw %}
```

## Thread

+ Return to [March 1994](/archive/1994/03)

+ Return to "[emv@mail.msen.com](/authors/emv_at_mail_msen_com)"

+ 1994-03-31 (Thu, 31 Mar 94 10:39:00 PST) -<EMAIL_ADDRESS>(Joe McConnell): Latest Headlines ] -<EMAIL_ADDRESS>


text:
# OpenCue TSC Meeting Notes 11 Nov 2020

Secretary: Brian Cipriano

TSC Attendees:

* [ ] Matt Chambers
* [x] Brian Cipriano
* [ ] Greg Denton
* [x] Ben Dines
* [ ] Dave Fellows
* [ ] Daniel Neilson
* [ ] Alex Schworer
* [ ] Erik Strauss

Committer Attendees:

* [ ] Christian Smith
* [ ] Diego Tavares
* [x] Lars van der Bijl

Agenda/Notes:

* Idris: node graph PR requires a new dependency which isn't published to pip.
   * Should we vendorize this other python project?
   * Git submodules a potential option.
   * We needed to make changes to the upstream project to make it work for us. Not sure if these
     changes are broadly applicable enough to contribute back to that project. They might be though
     — worth looking into.
   * Project setup.py is locked to Python 3 but code is Python 2 compatible.
   * Brian: look into git submodules
* User survey.
   * No major updates. Daniel is working on ASWF-wide survey. Knows we're anxious to get started.
     Update later today or tomorrow he thinks.
* CII badge updates.
   * Brian: working on Python linting.
   * Cuebot PRs still need review. Lars offered to review.
* Python packaging.
   * Not much overlap with OTIO, they are focused on developers setting up dev environment. Not
     planning to package dependencies, mainly distributing via pip.
   * Probably need to resolve legal issues on our own.
   * We can move forward with publishing pyinstaller scripts in the meantime for folks to do local
     packaging.
* New sizzle reel.
   * Looking for screen cap footage from SPI.
   * Ben found some older footage, will work with Emily to see if it's suitable.

repository: AcademySoftwareFoundation/OpenCue

gha_language: Python

repo_name: AcademySoftwareFoundation/OpenCue


text:
Schema includes bigquery schema (json) files, and code associated with
populating bigquery entities.

Parsers in mlab-sandbox and mlab-staging target datasets that are in the same
project. Parsers in mlab-oti target datasets in the measurement-lab project.

Today, all parsers write to the `base_tables` dataset. Soon, they will be
changed to write to the `incoming` dataset, and deduplicated data will be
written to `base_tables`.  See https://github.com/m-lab/etl/issues/387 for
updates.

## NDT

legacy.json contains the schema downloaded from the existing ndt.all tables.
It has been ordered for easy comparison against the new schema.

ndt.json contains the initial schema for the NDT tables. It can be used to
create a new table in mlab-sandbox project by invoking:

    bq --project_id mlab-sandbox mk --time_partitioning_type=DAY \
        --schema schema/ndt.json -t base_tables.ndt

ndt_delta.json contains another NDT schema, including a repeated "delta" field,
intended to contain snapshot deltas.  To create a new table:

    bq --project_id mlab-sandbox mk --time_partitioning_type=DAY \
        --schema schema/ndt_delta.json -t base_tables.ndt_delta

As of May 2017, there are (still) differences between the legacy and NDT schema
that may need to be addressed.

## Paris-traceroute

pt.json contains the schema for paris traceroute tables.  To create a new table:

    bq --project_id mlab-sandbox mk --time_partitioning_type=DAY \
        --schema schema/pt.json -t base_tables.traceroute

## Sidestream

ss.json contains the schema for sidestream tables.  To create a new table:

    bq --project_id mlab-sandbox mk --time_partitioning_type=DAY \
        --schema schema/ss.json -t base_tables.sidestream

## Switch - DISCO

switch.json contains the schema for DISCO tables. To create a new table:

    bq --project_id mlab-sandbox mk --time_partitioning_type=DAY \
        --schema schema/switch.json -t base_tables.switch

repository: m-lab/etl

repo_name: m-lab/etl


text:
# trilium-notes-extras
Extra stuff for the wonderful [Trilium Notes](https://github.com/zadam/trilium)

## Themes
### Atlassian
Looks like JIRA and Confluence.  Not affiliated with Atlassian.

![  High contrast look.

repository: tylwright/trilium-notes-extras

repo_name: tylwright/trilium-notes-extras


text:
# _Language_

#### _This website is about different languages in computer programming._

#### By _**Tajo Fisher**_

## Technology Used

* HTML
* CSS
* JS
* Bootstrap

## Description

* A website containing information on languages

## Known Bugs

* _No Known issues_

## License

* [MIT](link)
* copyright(c) 2021
* [Click here](link) to check out Language website

## Contact Information

Tajo Fisher _tajofisher4@gmail.com_

repository: taj-code/language

repo_name: taj-code/language


text:
# XDS - A Bitcoin-derived minable cryptocurrency with concurrent PoS

*This is to announce/report the start of a new free and open-source decentralized cryptocurrency, owned and maintained only and fully by its hopefully emerging and growing world-wide community of contributors. This is not a project claimed by a company, founders, VIP's, lead developers or any people that claim a special role. There are no brands or already-reserved accounts. Not even a name has been chosen for this cryptocurrency, it's up to the community to agree on one. For practical purposes, a preliminary coin symbol was chosen (XDS) which may be kept or changed.*

*The reason why the initiator(s) do not want to claim any further role in the life of this cryptocurrency and will remain pseudonymous, anonymous or even silent forever, is that they think this will make adoption and contributions easier, because there will be no hierarchy or 'leaders' then, but freedom instead. It means everyone can contribute, create a website, or coffee mugs for the coin. It shall be a productive anarchy.*

*If there was a White Paper for the coin, it would be Satoshi's white paper, since the success of Bitcoin proves he got it right. The only addition would be a chapter on the proof-of-stake consensus, which runs in parallel to proof-of-work, so that blocks are (quite randomly) produced either by proof-of-work or proof-of-stake. Proof-of-stake might have benefits for the climate, so it seems worthwhile trying this.*

## Overview
------------
Start date: 2nd Jan 2020 23:56:00 UTC (Genesis block time)
Genesis hash: 0x0000000e13c5bf36c155c7cb1681053d607c191fc44b863d0c5aef6d27b8eb8f
Block height as of 19th Jan 2020: 0 (all blocks that were mined for testing have been deleted)
Units mined as of 19th Jan 2020: 0 XDS
Max supply: 21,000,000 XDS
Block reward: 50 XDS (halves every 210,000 blocks)
Consensus: PoW + PoS
Transaction protocol: Only P2WPKH and P2WSH transactions (and burns) are allowed, addresses must be in bech32 format only, base58 addresses are not supported.
PoW Hash: Double-SHA512 (truncated to 256 bits)
Block spacing: 256 seconds
Json/rpc port: 48333 (you need to enable this in xds.conf)

### Connecting and syncing
--------------------------
There are node seed nodes in the source code, community forks are encouraged to change that.
Therefore, to bootstrap the network, as many people as possible should run nodes and publish their IP addresses here.
The default protocol port is 38333. Make sure you open the firewall on your OS and router, so that you can get incoming connections.

### Creating a wallet, mining, staking, receive addresses, transactions
--------------
1.) Run the node
2.) Browse to http://localhost:48334/swagger to access the API help page
3.) Follow the instructions there to
     a) create a wallet
     b) load the wallet
     c) start mining
     d) start staking
     e) get a receive address
     f) send coins

In addition to this, a Bitcoin-standard json/rpc interface is available at port 48333.

### Forks
Note that the maximum reorg length is set to 125 blocks. That means, if you happen to be on a fork that 'the majority' is not following, and if you want to re-join the 'majority chain', this will not happen automatically. If you want follow the chain that your connected peers are using, and you have been more then 125 blocks on a fork, you need to delete the following directories in [OS Application DATA]/FullNodeRoot/xds/MainNet:
/blocks
/chain
/coinview
/common
/provenheaders

You need NOT delete your wallet(s) (*.wallet.json), but all transactions, including mined/staked blocks that are not on the main chain will be lost if you delete the fork where they happened.

## Build and run on Linux, Windows, MacOS
The .NET Core SDK is required for the build:
https://dotnet.microsoft.com/download

Clone the repository:
git clone https://github.com/sonofsatoshi2020/xds.git

Change to the daemon directory:
cd /src/daemon

Build and start:
dotnet run -c release addnode=[ip address] addnode=[another ip address] ...

Build an executable file:
https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish

gha_license_id: NOASSERTION


text:
# grunt-ng-annotate

> Add, remove and rebuild AngularJS dependency injection annotations.

## Getting Started
This plugin requires Grunt.

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-ng-annotate --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-ng-annotate');
```

## The "ngAnnotate" task

### Overview
In your project's Gruntfile, add a section named `ngAnnotate` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
    ngAnnotate: {
        options: {
            // Task-specific options go here.
        },
        your_target: {
            // Target-specific file lists and/or options go here.
        },
    },
})
```

#### Options

The `ngAnnotate` task accepts a couple of options:

```js
{
    // Tells if ngAnnotate should add annotations (true by default).
    add: true|false,

    // Tells if ngAnnotate should remove annotations (false by default).
    remove: true|false,

    // If provided, only strings matched by the regexp are interpreted as module names.
    // See README of ng-annotate for further details: https://npmjs.org/package/ng-annotate
    regexp: regexp,

    // If files are provided without a destination, each file is processed
    // separately and each of them is saved under original name with appended suffix provided here.
    outputFileSuffix: string,

    // If files are provided without a destination and this option is set, each file is processed
    // separately and each of them is saved under original name processed by this function.
    transformDest: function (sourcePath) {},

    // Switches the quote type for strings in the annotations array to single ones; e.g. '$scope'
    // instead of "$scope" (false by default).
    singleQuotes: true|false,
}
```

Note that both `add` and `remove` options can be set to true; in such a case `ngAnnotate` first removes
annotations and then re-adds them (it can be used to check if annotations were provided correctly).

### Usage Examples

TODO

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
_(Nothing yet)_

## License
Copyright (c) 2013 Laboratorium EE. Licensed under the MIT license.

repository: zhangyongjiang/blocktrail

repo_name: zhangyongjiang/blocktrail


text:
---
name: "Bug report"
about: Create a bug report
---

<!--- Provide a title with a general summary of the issue -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Environment
<!--- Include the following details: -->
* Checkout SDK version:
* Platform and version:
* Operating System and version:
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Description
<!--- Provide a clear and concise description of what the bug is -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Expected behavior
<!--- Describe what should happen -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Current behavior
<!--- Describe what happens instead -->
<!--- Errors, exceptions, stack traces, and relevant logs can be included -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Steps to reproduce
<!--- If applicable, provide a snippet of code that can be used to reproduce the issue -->
<!--- Please avoid adding any unrelated code -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Possible solution
<!--- Feel free to suggest a solution -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

- [ ] I may be able to implement this bug fix

### Additional information
<!--- Feel free to add any additional information that can help to diagnose and fix the issue -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

repository: checkout/checkout-sdk-node

gha_language: JavaScript

repo_name: checkout/checkout-sdk-node


text:
---
title: no-new-object
rule_type: suggestion
related_rules:
- no-array-constructor
- no-new-wrappers
---

The `Object` constructor is used to create new generic objects in JavaScript, such as:

```js
var myObject = new Object();
```

However, this is no different from using the more concise object literal syntax:

```js
var myObject = {};
```

For this reason, many prefer to always use the object literal syntax and never use the `Object` constructor.

While there are no performance differences between the two approaches, the byte savings and conciseness of the object literal form is what has made it the de facto way of creating new objects.

## Rule Details

This rule disallows `Object` constructors.

Examples of **incorrect** code for this rule:

::: incorrect

```js
/*eslint no-new-object: "error"*/

var myObject = new Object();

new Object();
```

:::

Examples of **correct** code for this rule:

::: correct

```js
/*eslint no-new-object: "error"*/

var myObject = new CustomObject();

var myObject = {};

var Object = function Object() {};
new Object();
```

:::

## When Not To Use It

If you wish to allow the use of the `Object` constructor, you can safely turn this rule off.

repository: eslint/eslint

repo_name: eslint/eslint


text:
# PixaBot

![Peko Kugihara, an anime original character by Yottabyte Inside serves as their mascot.](https://orig13.deviantart.net/ce10/f/2017/228/5/3/pixa_by_exjageroo-dbka7oa.png)

A Discord bot that features games, image manipulation, moderation and music commands; written in JavaScript.

## Operations
To install the required dependencies, simply run `npm install`.

To run the bot, simply run `npm start` or `node bot.js`.

## Commands
To execute these commands, the command's prefix is `px;`.
***Parameters:** < > - required; [ ] - optional
* **`ping`** - Connection test to the bot.
* **`version`** - Displays the bot's current version.
* **`about`** - Information about PixaBot.

### Coming soon
* **`kick`** - Kicking a member out of the server.
* **`ban`** - Ban member out of the server.
* **`help`** - Displays PixaBot's Help Guide.

## Version history

### v0.4
- [FriendsNone] **Music Player:**  Play some tunes. Only basic commands for the music that you'll ever need, so this considered as a beta.
- [FriendsNone] The bot has rewritten for better quality of our bot.
- Added necessary icons for the `help` and `piko` commands.
- Playing or streaming status is now finally displayed! *(Derived from YottaBot)*

### v0.3.3
*This version contains backports on certain commands that will be introduced for the upcoming v0.4 of PixaBot.*
- The `piko` command is now in embed format!
- The `invite` command is also in embed formatting as well.
- Minor tweaks to `ping` command.

### v0.3.2
- Fixed a bug on `help` where the Help Guide still sends on the guild instead of DMs.
- Backported with the new `ping` command for the upcoming v0.4 of PixaBot, featuring the latency measurement on both the message and the API.
- The bot's avatar in the `about` now displays the most up to date avatar.

### v0.3.1
- We dropped an experimental music player feature due to a massive bug.
- Bug fixes and minor tweaks for `userinfo`.

### v0.3
*This version contains features that are mostly derived from YottaBot, the project that we also made.*
- [Mr. Terax and Jigs_Q] **User information:** Displays your user information or anybody else in the server. *(syntax: `px;userinfo [mention]`)*
- [Jigs_Q] **User avatars:** You can now fetch your Discord avatar or anybody else's avatar! *(syntax: `px;avatar [mention]`)*
- **Invite the bot to your server:** You can now invite our bot to join on your servers! *(syntax: `px;invite`)*
- [Zenrac] We fixed a bug where the `eval` command displays an "Unknown Command" error, but the command executes correctly.
- The music function is still unstable and unfunctional due to a bug. We will fix this in the future releases of PixaBot.

### v0.2
- **Embed texts:** Certain commands now feature the embedded rich text layout.
- **Removed `pingtime`:** It is merged to the `ping` command.
- **`developers` to `about`**: The bot's credits are now expended to an information about PixaBot. *(syntax: `px;about`)*
- **Help:** Displays PixaBot's Help Guide for the list of the commands. *(syntax: `px;help`)*
- **Say:** Say something as a bot! *(syntax: `px;say <message>`)*
- **8ball:** Ask a random question… if you are in luck. *(syntax: `px;8ball <question>`)*
- **Meet Piko-chan!:** Our bot's anime OC mascot. *(syntax: `px;piko`)*

### v0.1
- **Ping:** Test the ping status. *(syntax: `px;ping`)*
- **Timed Ping:** Test the ping status with time measured. *(syntax: `px;pingtime`)*
- **Bot version:** Prints up the bot's current version. *(syntax: `px;version`)*
- **Developers:** Developer credits who made PixaBot. *(syntax: `px;developers`)*

## Credits
* [Jigs_Q#9714](https://github.com/heri0nd3) - Manager, interim co-developer

### Developers
* [Kaiss#4599](https://github.com/OfficialRain) - Founder, lead developer
* [Rain#8241](https://github.com/OfficialRain)
* [Inkydink#9098](https://github.com/inkydink815)

#### Former developers
* [Mr.Terax#9758](https://github.com/MrTeraxYT) - Co-developer

## Discord server
Join our bot's home server for hanging out our development team!

[![EcoTech's Bot Hub](https://discordapp.com/api/guilds/347282801021943810/widget.png?style=banner3)](https://discord.gg/mQ85U7m)

repository: HeyimKaiss/PixaBot

repo_name: HeyimKaiss/PixaBot


text:
---
layout: post
title:  "100 Days of SwiftUI - Day 70"
date:   2020-01-03 22:39:50 +1300
categories: ohdos
---
According to the rules for taking part in [100 Days of SwiftUI](https://www.hackingwithswift.com/100/swiftui), as soon as I've finished each day, I have to post about it.

The topic for Day 70 was: Project 14, part 3.

This included: Advanced MKMapView with SwiftUI; and Customizing MKMapView annotations.


text:
---
layout: relation
title: 'nsubj:obj'
shortdef: 'fused subject and object pronoun'
udver: '2'
---

In the current version of the Old French treebank, fused words have not been split the way they
should be in Universal Dependencies. One of the contraction types that occur in Old French is
a subject pronoun with an enclitic that represents the object pronoun. These fused pronouns are
currently attached to the verb as `nsubj:obj`.

Example: <!-- https://books.google.cz/books?id=BaFE2m2TgNgC&pg=PA12&lpg=PA12&dq=pronoun+jes+old+french&source=bl&ots=3QU_xuiRrd&sig=ACfU3U2Edh3zqSF7vZNVrNi1Ol8tZbeFMw&hl=cs&sa=X&ved=2ahUKEwig3oDX_qXwAhWJO-wKHaOqD34Q6AEwEXoECBYQAw#v=onepage&q=pronoun%20jes%20old%20french&f=false -->

_je les avrai > <b>jes</b> avrai_ “I will have them”

~~~ sdparse
jes avrai \n je les avrai
nsubj:obj(avrai-2, jes)
nsubj(avrai-6, je)
obj(avrai-6, les)
~~~
<!-- Interlanguage links updated Út 9. května 2023, 20:04:23 CEST -->

repository: UniversalDependencies/docs

branch_name: refs/heads/pages-source

gha_language: HTML

repo_name: UniversalDependencies/docs


text:
# Watson's private document classes (wtcls)

This is Watson's private document classes: Each class loads a corresponding class in [BXjscls](https://github.com/zr-tex8r/BXjscls) and [the WTStyle package](https://github.com/wtsnjp/WTStyle).

## System Requirements

* TeX format: LaTeX2e
* TeX engine: any engine
* LaTeX packages: [BXjscls](https://github.com/zr-tex8r/BXjscls), [WTStyle](https://github.com/wtsnjp/WTStyle)

## Contents

* `wtarticle.cls`: loads `bxjsarticle.cls`
* `wtbook.cls`: loads `bxjsbook.cls`
* `wtreport.cls`: loads `bxjsreport.cls`
* `wtslide.cls`: loads `bxjsslide.cls`

## Usage

All features of BXjscls and WTStyle are available. All class options are passed to BXjscls.

## License

This package released under [the MIT license](./LICENSE).

---

Takuto ASAKURA ([wtsnjp](https://twitter.com/wtsnjp))

repository: wtsnjp/wtcls

repo_name: wtsnjp/wtcls


text:
# UDF for heating and evaporation of an n-dodecane droplet

ANYSYS Fluent UDF for defining the heat and mass transport for n-dodecane droplet.
Has been tested with ANSYS Fluent 17.2.

Physical properties are taken from:

Abramzon, B. and W.A. Sirignano, Droplet Vaporization Model for Spray Combustion Calculations. International Journal of Heat and Mass Transfer, 1989. 32(9): p. 1605-1618.

If you use our code in you project, please cite the following papers:

1. O. Rybdylova, M. Al Qubeissi, M. Braun, C. Crua, J. Manin, L.M. Pickett, G. de Sercey, E.M. Sazhina, S.S. Sazhin, M. Heikal, A model for droplet heating and its implementation into ANSYS Fluent, International Communications in Heat and Mass Transfer, Volume 76, 2016, Pages 265-270, ISSN 0735-1933,
https://doi.org/10.1016/j.icheatmasstransfer.2016.05.032.

2. Timur S. Zaripov, Oyuna Rybdylova, Sergei S. Sazhin, A model for heating and evaporation of a droplet cloud and its implementation into ANSYS Fluent, International Communications in Heat and Mass Transfer, Volume 97, 2018, Pages 85-91, ISSN 0735-1933,
https://doi.org/10.1016/j.icheatmasstransfer.2018.06.007.


text:
# Introduction to leadership
##What is Leadership?
- "Leadership is a process of social influence, which maximizes the efforts of others, towards the achievement of a goal" -Kevin Kruse
 - [What is Leadership](http://www.forbes.com/sites/kevinkruse/2013/04/09/what-is-leadership)

## Leader vs. Manager
- Leadership and management must go hand in hand. They are not the same thing.
But they are necessarily linked, and complementary. Any effort to separate the two is likely to cause more problems than it solves
 - A leader can be a manager
 - A manager can be a leader

![Leader vs. Manager](img/LeadervsManager.jpg)

## Leadership Styles
- "There is no such thing as a born leader. Leaderhip is an acquired attrribute that begin
early in school and on the playground."
- "...overtime, a leader may find that their winning formula is not producting the results
it used to. New challenges require new leadership skills, behaviors, and ways of communicating."
- Leadership consists of 20% knowledge and 80% behavior
- "If you're leading well, you won't have just one leadereship style. You'll mix and match
to engage your team and meet your goals"

### Styles
#### Charismatic (Oprah)
- Personality
- Energetic
- Inspires passion
- Belief
- Invincibility

#### Innovative (Richard Branson)
- Grasps entire situation
- Goes beyond
- Can see
- New thinking
- Risk taking
- Respect for ideas
- Failure is okay

#### Command and Control (Tom Coughlin)
- Follows rules
- Expects that from others
- Urgent
- Critical
- Demands
- Top-down
- Sole

#### Laissez-Faire (Donna Karan - Founder of DKNY)
- Not directly involved
- Trusts
- Monitors
- Gives feedback
- Value Autonomy
- Skilled and self-directed teams

#### Pace Setter (Jeff Bezos)
- High Standards
- Is example
- Burnout

#### Servant (Herb Kelleher - Southwest Airlines)
- Service
- Include the whole team
- Provide tools
- Out of limelight
- Team takes credit
- High morale culture

#### Situational (Patt Summitt)
- Adaptable
- Directing and supportive
- Empowering and coaching
- Confusing
- Reinvention

#### Transformation (Ben & Jerry)
- Expects transformation when hard
- Counts on best efforts
- Role model
- Encourage innovation
- Motivating

### Characteristics (some)
- Make others feel safe to speak-up
- Make decisions
- Communicate expectations
- Provide continuous feedback
- Ask questions, seek counsel
- Problem solve; avoid procrastination
- Courageous
- Dreamers

url: https://raw.githubusercontent.com/jonesca/Leadership/b983b46698dedfaf662c6b2f72dfd84879c06108/01 Leadership - Getting Started/01 Introduction to leadership.md

repository: jonesca/Leadership

filename: 01 Introduction to leadership.md

repo_name: jonesca/Leadership


text:
---
layout: post
title: "Automatically Generating Interesting Facts from Wikipedia Tables"
# description: "A graphic designer is a professional within the graphic design and graphic arts industry."
date: 2020-04-07
# feature_image: images/road.jpg
tags: [paper-reading]
---

Paper reading of [Automatically Generating Interesting Facts from Wikipedia Tables](https://research.google/pubs/pub47835/). It talks about how they use Wikepedia tables to generate interesting facts in Google Knowledge Graph. View my lab presentation slide [here](https://docs.google.com/presentation/d/1FIfTxcVVI9cYmtgDXc96etOtHBXgFtAL_KmeX1aQtv4/edit?usp=sharing)
<!--more-->

repository: Tiffanylqc/blogs-old

repo_name: Tiffanylqc/blogs-old


text:
# Scolecobasidium anellii Graniti, 1963 SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
G. bot. ital. 69(4-6): 364 (1963)

#### Original name
Scolecobasidium anellii Graniti, 1963

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# numbers-to-word
Convert number to words (figures into word) for Nepali currency. But can be used for other currencies as well

Create a function for the code given in conversion.py and pass the number in parameter  which you want to convert.

example: function convertNumberToWord(args)

Usable in billing of product in software

repository: sunilparajuli/numbers-to-word

repo_name: sunilparajuli/numbers-to-word


text:
# GhostTown

Implementation of GhostTown mode of Insta360 camera.

Have you ever experienced a problem of lot of moving pedestrians when you are trying to take a picture of Monuments? This project is intended to solve that problem.

Recently Insta360 OneX2 cam has released a feature called Ghost Town. which actually takes a video of less than a minute and extracts the background image by removing the moving objects from each frame. The background image is called ground-truth image of that video.

The fundemental concept behind the feature is a Unsupervised Machine learning technique based upon Mathematics.

In this project, I tried to replicate the same feature as extracting information from the video footage of CCTV or any stable cameras and reproduce the Ground-Truth image also known as Background image.

The code for teh concept is in util.py file.
To reproduce the results, Run main.py which requires two arguments,

"--input" The input video file name

"--output" The backgroung image name to be created

My results,

Output Gray-scale image:

repository: ctcusick/GhostTown

repo_name: ctcusick/GhostTown


text:
---
title: "JWT Tokens for distributed authentication"
author: Michiel De Mey
date: "2018-03-31T19:58:53Z"
teaser: "We'll take a look at session authentication and why this won't scale for microservices, introducing JWT as a solution to distributed authentication."
---

2 years have passed since my last blog post and a quite a bit has changed. Today, the term "microservice" is ever more present and aims to fix what SOA promised back in the days when vendors tried to shove Enterprise Service Busses in company's tech stacks. (But that's a whole other discussion.)

Back to the topic at hand, I gave a talk about a year ago about how you could solve authentication in a distributed (microservices) world without sacrificing performance or availability using JWT tokens.

This article is pretty much a writeup of what I talked about back then, I decided to write it all down given the recent interest of the engineers I've met on the subject.

# Session based authentication
To understand the problem, let's take a look at the current authentication landscape and how it won't work well in a distributed environment.

Authentication is often achieved using cookies, which usually means session-based authentication. This means that session identifiers are stored somewhere in a session store such as SQL, Redis, Disk, … I've seen quite a few.

Let's take a look at how that works.

![](./assets/cookie_based_auth.png)
Source: [https://auth0.com/blog/cookies-vs-tokens-definitive-guide/](https://auth0.com/blog/cookies-vs-tokens-definitive-guide/)

1. The user tries to authenticate with the server by sending a username and a password to the server on the same domain (since cookies are scoped to a specific domain).

2. When successful, the server responds with the `Set-Cookie` header, instructing the browser to store the contents of the header in a cookie. This is usually the session identifier.

3. Whenever the user makes a request to the backend, the browser will automatically include all cookies related to the domain in the request.

4. The server will then lookup the session information based on the session identifier, deserialize it, do a database lookup for more user information if needed and continue with its backend logic and ultimately send its response over to the client.

Consider the fact that a lot of unique users want to interact with your application, they will all send requests to your backend and hope to receive a response within an acceptable timeframe.

![](./assets/session_based_auth.svg)

Requests come in in a asynchronous fashion, but since the session store is (usually) synchronous, the egress traffic of the store is synchronous, which means the clients will receive the response one at a time.

As you can see, using a session store is not very scalable. The more clients interact with your system, the harder it will become to scale your session store to handle the number of concurrent requests.

Furthermore, your session store is now your SPOF ([Single Point of Failure](https://en.wikipedia.org/wiki/Single_point_of_failure)) which means that if it goes down, your entire service architecture goes down with it, resulting in client request failures.

Now, let's look at this with microservices in mind. There are a few apparent issues here.

1. A cookie is scoped to a single domain, not including subdomains.

    This makes it difficult to truly scale your services. Since everything needs to be handled from the same domain, you will likely need a reverse proxy to handle the requests and forward those to the correct service internally, which creates a huge dependency on that reverse proxy and introduces another SPOF.

2. The session store is (usually) synchronous

    A recap from what I stated previously, the session store that manages sessions and handles additional database lookups is usually synchronous which means that no matter how many clients make requests at the same time, they will all have to wait for other requests to be fulfilled before they can be served.

    Do note that you can however architect your session store to be more performant, but it will cost you a lot of time and resources, which ultimately leads to a lot of money being thrown around.

## Token based authentication
Now that we've taken a look at session based authentication and why this won't scale when thinking in terms of microservices it's time to look at how we would tackle this problem and make it scale across services.

First, we need to get rid of the SPOFs. Remember that we had 2 potential SPOF candidates.

1. Reverse proxy server:
To keep it all inside a single domain for cookies to work properly
2. Session store:
To lookup user data based on a unique session identifier
(e.g. name, email, permissions, etc.)

Now, before we continue it's best to explain what JWT tokens are and how they can help us with our problem.

---

Let's look at JWT tokens in contrast to cookies.

![](./assets/cookie_based_auth_vs_token_based.png)
Source: [https://auth0.com/blog/cookies-vs-tokens-definitive-guide/](https://auth0.com/blog/cookies-vs-tokens-definitive-guide/)

Cookie-based authentication on the left (repeated from earlier), Token-based authentication on the right (new).

1. The client makes an authentication request with a payload of both a username and password, nothing has changed here.

    However, note that with token-based authentication you are not limited to a single domain, which is very powerful in terms of scalability.

2. When successful, the server will respond with the token in the response **body**, this is different from the `Set-Cookie` header when using cookies.

    Note that your client will have to be able to store this token somewhere since we're no longer relying on the browser to send the cookie automatically with each request.

3. As previously stated, the client (browser) will no longer automatically send the cookie along with each request to the server so we need to pass the token in the header.

    This is typically set in the `Authorization` header using the `Bearer` schema.

    `Authorization: Bearer …`

4. The server validates the token and once validated accepts the token content as truth and continues with its operation.

    Note here that not a single lookup needs to happen, no unique session lookup, no database query, simply token validation ([HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code) digest comparison).

Again, let's look at this from a microservices point of view.

![](./assets/token_based_auth.svg)

1. You immediately notice that the session store is completely gone and has been replaced by simple token validation in the service itself. This removes one of our SPOFs and in addition improves throughput since we no longer have any blocking calls in our service architecture. Win!

2. Remember our second potential SPOF?
    The reverse-proxy was needed in order to keep all our endpoints on the same domain, so if the reverse-proxy goes down, all ingress traffic to our services goes down with it.

    Now, with token based authentication we are no longer bound to a single domain, removing the need for a reverse-proxy server.

    This allows our services to work independently of one another, but most importantly *fail* independently of one another.

Make no illusions, the path towards microservices is not as easy as you'd think. Services **will** fail, but that is a fact that must be embraced and incorporated into your development team's mentality.

# Security
Let's talk a bit about security. As software engineers I believe we all have a shared responsibility to keep everything as secure as possible.

## 1.

Related to this, you should note that JWT tokens are signed, not encrypted. Although you *can* [encrypt tokens](https://tools.ietf.org/html/rfc7516). Anything you store inside a token can be read by the client, therefore you cannot store sensitive data such as passwords or other secrets.

You may however store user-specific data such as email address, permissions, basically anything that the user is allowed to see as long as you serve your content over HTTPS. TLS here is crucial, a simple MITM attack can lead to [session hijacking](https://www.owasp.org/index.php/Session_hijacking_attack).

## 2. JWT Tokens support asymmetric keys
In contrast to symmetric keys (shared secret), using asymmetric keys allow you to improve your JWT signing security by having both a private and a public key.

Using a symmetric key, all services would have the same key to both sign and verify a token. This would mean that if a single service is compromised, an attacker would have to key to sign its own tokens which means your entire service infrastructure would be compromised.

Using asymmetric keys, only the "authentication" service would need the private key to sign tokens, all other services only need the public key to verify the tokens. In this scenario of one of the other services were breached, all the attacker would have is the public key which is public anyway and isn't really worth anything.

This way, you would only have to secure the private key used by the "authentication" service, which is far more manageable.

## 3. XSS vs. CSRF
Where cookies are vulnerable to [CSRF attacks](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)), JWT tokens are vulnerable to [XSS attacks](https://www.owasp.org/index.php/Cross-site_Scripting_%28XSS%29), which is actually easier to mitigate.

I won't go into details here, but know that a simple injected javascript could simply read from a user's localStorage and send the contents over to an attacker's server, which means the attacker basically used a [session hijack attack](https://www.owasp.org/index.php/Session_hijacking_attack).

This can easily be mitigated using [Content Security Policy](https://developers.google.com/web/fundamentals/security/csp/), by whitelisting your origins.

## 4. Always verify the JWT token algorithm
A vulnerability was found in certain library implementations, a great writeup is available on [Auth0's blog](https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/).

In short, always make sure on the server-side that the JWT token's algorithm is the algorithm that your are expecting, otherwise an attacker can use the `none` algorithm to circumvent token validation.

# Thoughts
Hopefully, I've made it clear how JWT tokens can be used along with microservices to improve scalability of your application by removing SPOFs and allowing your application to run more distributed.

Keep in mind that in order to ship microservices into production you would need a whole lot more than what I've talked about today. However, I would like to keep that for another article.

If you have any thoughts on how to improve this article or are interested in talking about scalability or high availability, you can find me on [Twitter](https://twitter.com/MichielDeMey) or if you're in the neighbourhood I'm always available for a ☕.


text:
---
layout: creature
name: "Sprite"
tags: [tiny, fey, cr1/4, monster-manual]
cha: 11 (0)
wis: 13 (+1)
int: 14 (+2)
con: 10 (0)
dex: 18 (+4)
str: 3 (-4)
size: Tiny fey
alignment: neutral good
challenge: "1/4 (50 XP)"
languages: "Common, Elvish, Sylvan"
skills: "Perception +3, Stealth +8"
speed: "10 ft., fly 40 ft."
hit_points: "2 (1d4)"
armor_class: "15 (leather armor)"
---

### Actions

***Longsword.*** Melee Weapon Attack: +2 to hit, reach 5 ft., one target. Hit: 1 slashing damage.

***Shortbow.*** Ranged Weapon Attack: +6 to hit, range 40/160 ft., one target. Hit: 1 piercing damage, and the target must succeed on a DC 10 Constitution saving throw or become poisoned for 1 minute. If its saving throw result is 5 or lower, the poisoned target falls unconscious for the same duration, or until it takes damage or another creature takes an action to shake it awake.

***Heart Sight.*** The sprite touches a creature and magically knows the creature's current emotional state. If the target fails a DC 10 Charisma saving throw, the sprite also knows the creature's alignment. Celestials, fiends, and undead automatically fail the saving throw.

***Invisibility.*** The sprite magically turns invisible until it attacks or casts a spell, or until its concentration ends (as if concentrating on a spell). Any equipment the sprite wears or carries is invisible with it.

gha_language: CSS


text:
# lamden-wallet-gen
This software creates a new Lamden keypair whenever it is loaded.

It uses code from Lamden.js (lamden/lamden-js)

It can be run 100% offline.

All you need to do is open it in your browser.

SK = Your secret key, keep this private! Anyone who has this can access your funds.
VK = Public Wallet Address, share this with anyone who needs to send you TAU.

repository: yourbusinessdigital/lamden-wallet-gen

repo_name: yourbusinessdigital/lamden-wallet-gen


text:
# Disallow QUnit.skip (`qunit/no-skip`)

<!-- end auto-generated rule header -->

`QUnit.skip` is useful to mark a test as skipped. This should be preferred over commenting out the test. However, leaving tests skipped in perpetuity is a bad practice, as the test ceases to provide any use in ensuring correctness of your code. Skipping tests should be done sparingly.

## Rule Details

The following patterns are considered warnings:

```js

QUnit.module.skip('Name', function() { });

QUnit.skip('Name', function() { });

module.skip('Name', function() { });

skip('Name', function() { });

test.skip('Name', function() { });

```

The following patterns are not considered warnings:

```js

QUnit.module.test('Name', function() { });

QUnit.test('Name', function() { });

module.test('Name', function() { });

test('Name', function() { });

```

## When Not to Use It

If your development pipeline would make running this rule annoying, it could be safely disabled. However, it would be a good idea to ensure that this rule is run in continuous integration at the very least.

## Further Reading

* [QUnit.skip](https://api.qunitjs.com/QUnit.skip/)

repository: platinumazure/eslint-plugin-qunit

repo_name: platinumazure/eslint-plugin-qunit


text:
# Simp #

The `simp` tactic works by applying a conditional term rewriting system to try and prove, or at least simplify, your goal. What this basically means is that `simp` is equipped with a list of lemmas (those tagged with the `simp` attribute), many of which are of the form `X = Y` or `X iff Y`, and attempts to match subterms of the goal with the left hand side of a rule, and then replaces the subterm with the right hand side. The system is conditional in the sense that lemmas are allowed to have preconditions (`P -> (X = Y)`) and in these cases it will try and prove the precondition using its simp lemmas before applying `X = Y`.

You can watch simp in action by using `set_option trace.simplify true` in your code. For example

```lean
namespace hidden

definition cong (a b m : ℤ) : Prop := ∃ n : ℤ, b - a = m * n

notation a ` ≡ ` b ` mod ` m  := cong a b m
set_option trace.simplify true
theorem cong_refl (m : ℤ) : ∀ a : ℤ, a ≡ a mod m :=
begin
intro a,
unfold cong,
existsi (0:ℤ),
simp
end

end hidden
```

If you do this exercise you will discover firstly that simp spends a lot of its time trying random lemmas and then giving up very shortly afterwards, and also that the `unfold` command is also underlined in green -- Lean seems to apply simp when you do an unfold as well (apparently unfold just asks simp to do its dirty work for it -- `unfold X` is close to `simp only [X]`).

If you only want to see what worked rather than all the things that didn't, you could try `set_option trace.simplify.rewrite true`.

### Simp lemmas

In case you want to train simp to use certain extra lemmas (for example because they're coming up again and again in your work) you can add new lemmas for yourself. For example in mathlib in `algebra/field.lean` we find the line

```lean
@[simp] theorem ne_zero (u : units α) : (u : α) ≠ 0
```

This lemma is then added to `simp`'s armoury. Note several things however.

1) It might not be wise to make a random theorem into a simp lemma. Ideally the result has to be of a certain kind, the most important kinds being those of the form `A=B` and `A↔B`. Note however that if you want to add `fact` to `simp`'s weaponry, you can prove

```lean
@[simp] lemma my_lemma : fact <-> true
```

(and in fact more recent versions of Lean do this automatically when you try to add random theorems to the simp dataset).

2) If you are not careful you can add a bad simp lemma of the form `foo x y = [something mentioning foo]` and then `simp` will attempt to rewrite `foo` and then end up with another one, and attempt to rewrite that, and so on. This can be fixed by using `rw` instead of `simp`, or using the config option `{single_pass := tt}`.

### When it is unadvisable to use simp

Using `simp` in the middle of proofs is a `simp` anti-pattern, which will produce brittle code. In other words, don't use `simp` in the middle of proofs. Use it to finish proofs. If you really need to simplify a goal in the middle of a proof, then use `simp`, but afterwards cut and paste the goal into your code and write `suffices : (simplified thing), by simpa using this`. This is really important because the behaviour of `simp` changes sometimes, and if you put `simp` in the middle of proofs then your code might randomly stop compiling and it will be hard to figure out why if you didn't write down the exact thing which `simp` used to be reducing your goal to.

### How to use simp better.

Conversely, if you ever manage to close a goal with `simp`, then take a look at the line before you ran `simp`. Could you have run simp one line earlier? How far back did simp start working? Even for goals where you didn't use simp at all -- could you have used `simp` for your last line? What about the last-but one? And so on.

Recall that `simp` lemmas are almost all of the form `X = Y` or `X ↔ Y`. Hence `simp` might work well for such goals. However what about goals of the form `X → Y`? You could try assuming `h : X` and then running either `simpa using h` or `simp {contextual := tt}` to see if Lean can deduce `Y`.

### Simp options.

The behaviour of `simp` can be tweaked by simp variants and also by passing options to the algorithm. A good place to start is to look at the docstring for simp (write simp in VS Code and hover your mouse over it to see the docstring). Here are some examples, some of which are covered by the docstring and some of whichare not.

1) `simp only [H1, H2, H3]` uses only lemmas `H1`, `H2`, and `H3` rather than `simp`s full collection of lemmas. Whyever might one want to do this in practice? Because sometimes simp simplifies things too much -- it might unfold things that you wanted to keep folded, for example.

2) `simp [-X]` stops `simp` from using lemma `X`. One could imagine using this as another solution when one finds `simp` doing more than you would like. Recall from above that `set_option trace.simplify.rewrite true` shows you exactly which lemmas `simp` is using.

3) `simp * at *`. This simplifies everything in sight. Use if life is getting complicated.

4) `simp {single_pass := tt}` -- this `single_pass` is a config option, one of around 16 at the time of writing. One can use `single_pass` to avoid loops which would otherwise occur; for example `nat.gcd_def` is an equality with `gcd` on both the left and right hand side, so `simp [nat.gcd_def]` is risky behaviour whereas `simp [nat.gcd_def] {single_pass := tt}` is not. As you can imagine, `simp only [h] {single_pass := tt}` here makes simp behave pretty much like `rw h`.

5) Search for `structure simp_config` in the file `init/meta/simp_tactic.lean` in core Lean to see the full list of config options. Others, many undocumented, are:
```
(max_steps : nat           := simp.default_max_steps)
(contextual : bool         := ff)
(lift_eq : bool            := tt)
(canonize_instances : bool := tt)
(canonize_proofs : bool    := ff)
(use_axioms : bool         := tt)
(zeta : bool               := tt)
(beta : bool               := tt)
(eta  : bool               := tt)
(proj : bool               := tt) -- reduce projections
(iota : bool               := tt)
(iota_eqn : bool           := ff) -- reduce using all equation lemmas generated by equation/pattern-matching compiler
(constructor_eq : bool     := tt)
(single_pass : bool        := ff)
(fail_if_unchanged         := tt)
(memoize                   := tt)
```

We see from the changelog that setting `constructor_eq` to true will reduce equations of the form `X a1 a2... = Y b1 b2...` to false if `X` and `Y` are distinct constructors for the same type, and to `a1 = b1 and a2 = b2 and...` if `X = Y` are the same constructor. Another interesting example is `iota_eqn` : `simp!` is shorthand for `simp {iota_eqn := tt}`. This adds non-trivial equation lemmas generated by the equation/pattern-matching compiler to simp's weaponry. See the changelog for more details.

### Cutting edge simp facts

If you want to find out the most recent tweaks to simp, a very good place to look is [the changelog](https://github.com/leanprover/lean/blob/master/doc/changes.md).

### Something that could be added later on:

"Re: documentation. If you mention congruence, you could show off simp's support for congruence relations. If you show reflexivity and transitivity for cong, and have congruence lemmas for +, etc., then you can rewrite with congruences as if they were equations."

repository: fpvandoorn/mathlib

gha_language: Lean

repo_name: fpvandoorn/mathlib


text:
# Ecovacs AWS
Ecovacs API usage in AWS Lambda

## Summary
This is a short list of instructions to be able to use the Ecovacs API to control your vacuum cleaner within an AWS Lambda function. Use the provided source files to get started easily.

## Prerequisites
1. Python must be installed (don't forget to add it to your Path Variable)
    [https://www.python.org/downloads/](https://www.python.org/downloads/)
2. Get access to your own AWS Account
    [https://aws.amazon.com](https://aws.amazon.com)
3.  Take your time to get through the instructions carefully

## Getting started
There is a great Github repository called "[sucks](https://github.com/wpietri/sucks)" which offers a wrapper for the Ecovacs API. Unfortunatelly AWS Lambda is not able to run the package out of the box (see "sucks-Modifications" chapter).
Therefore we have to make some modifications. Before we do that you should install "[sucks](https://github.com/wpietri/sucks)" and try out the command line possibilities.

## Preparing packaging for AWS Lambda
To run not available python packages in an AWS Lambda function you can package your dependencies into one zip file and run all the code you want.

## Local tests
Create a new python file (e.g. ecovacs-test.py) for testing the API. Add the [sample source](/src/ecovacs-test.py) to your local file. Replace the configuration with your values and you are ready to go.

Execute the file:
```powershell
python .\ecovacs-test.py
```

Your robot should start cleaning now and you see the text "Action executed" in your command line.

## sucks-Modifications
So far so good, the API is working and you can control your robot.
Nevertheless I had some issues which requires modifications to get it running properly.

1. The script never ends
    The script keeps running after it has started the robot successfully.  Unfortunetelly I ran into timeout issues when using the xmpp connect function directly. To avoid those issues I've added a manual timeout.
    After applying the change for the connection which is shown in [another sample file](/src/ecovacs-test-improved.py), the script should end properly.

2. Crypto not working in AWS Lambda
    Using the sucks package out of the box doesn't work in AWS Lambda functions. An error occurs that there is a problem with the crypto module:

    ```"Cannot load native module 'Crypto.Cipher._raw_ecb': Trying '_raw_ecb.cpython-36m-x86_64-linux-gnu.so': /var/task/Crypto/Util/../Cipher/_raw_ecb.cpython-36m-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory, Trying '_raw_ecb.abi3.so': /var/task/Crypto/Util/../Cipher/_raw_ecb.abi3.so: cannot open shared object file: No such file or directory, Trying '_raw_ecb.so': ```

    To avoid that we need to work around the usage of the Crypto module. Luckily it's only used for hashing the username and password for the transfer.

    We change the usage of self.ecrypt according to the following images.
    Currently it should look like this on line 36:
    ![Before change](images/sucks_init_before.png)
    We change the usage of self.encrypt to that:
    ![After change](images/sucks_init_after.png)

    Before we can continue to use our source in an AWS Lambda function we have to hash the necessary variables locally.
    Adding these two lines to your [test file](/src/ecovacs-test-crypto.py) gives you the required values.
    ```python
    print(EcoVacsAPI.encrypt(config["email"]))
    print(EcoVacsAPI.encrypt(config["password_hash"]))
    ```

    Execute the test script again and use the values from the output to fill it into these two lines. These lines should replace the previously added ones in your [test file](/src/ecovacs-test-aws.py).
    ```python
    config["email"] = "***"
    config["password_hash"] = "***"
    ```

    Now we are ready for AWS Lambda functions.

## Creating AWS Lambda function
* Open the AWS Console https://console.aws.amazon.com/
* Search Lambda and select Lambda
* Click "Create Function" > "Author from Scratch"
* Enter a Name (e.g. ecovacs-aws)
* As Runtime select "Python 3.6"
* In the Role section, select "Create a custom role"
    * IAM Role: lambda_basic_execution
    * Policy Name: Create a new Role Policy
    * Allow
    ![AWS Lambda Role](images/aws_lambda-role.png)
* You will be redirected back to Author from scratch
    * Role: should be set to Choose an existing role
    * Existing Role: lambda_basic_execution
* Create function

We are almost there...

* Change the timeout in the basic settings from 3 seconds to 10 seconds due to the really bad Ecovacs API performance.
* Copy your local test file & name it lambda_function.py
    * Wrap your [source code](/src/lambda_function.py) into a function block
* Create a zip file, so that all packages and source files are in the root level of the zip file
* Upload zip file to AWS (and Save it):
    ![AWS Lambda Role](images/aws_lambda-source.png)
* Create an empty test and execute it
    If it is successful, you should see the well known "Action executed in your log"
    ![AWS Lambda Role](images/aws_log-output.png)

## Final steps
* Getting rid of the hard coded variables.
    * Create AWS lambda function environment variables
    * Use them in your python code
        ```python
        import os
        os.environ['VARIABLE_NAME']
        ```
* Use different input parameter to control your Ecovacs
* Remove the following unused folders from your zip to save some MB
    * _\_pycache_\_
    * \_pytest
    * Crypto

## Why?
All that effort helps you to control your Ecovacs vacuum cleaner with your own Alexa skill.

## Donation
If you like my work, please consider buying me a coffee
<link href="https://fonts.googleapis.com/css?family=Cookie" rel="stylesheet">Buy me a coffee

repository: bamminger/ecovacs-aws

repo_name: bamminger/ecovacs-aws


text:
# Launcher as a local server
- Status: implemented
- Type New Product
- Related components safe_launcher
- Start Date: 11-01-2016

# Summary
This is an accompanying RFC to the parent launcher-as-local-rest-server RFC and defines APIs for RESTFull interface.
This RFC must be read and is useful only in conjunction with the parent RFC.

# Conventions

- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in [RFC 2119](http://tools.ietf.org/html/rfc2119).
- String means UTF-8 encoded string unless specifically noted to be otherwise.
- Unless specifically mentioned, all JSON key-value pairs shall be considered mandatory.
any mention of [ uint8 ... ] shall be interpreted as follows: binary data (array of unsigned 8 byte integers) encoded as
Base64 and packaged into a UTF-8 string. Correspondingly [] would be an empty such string.
- Configuration for Base64 encoding shall be as follows
    - Standard Character Set
    - Line Feed as new-line
    - Padding (in case the length is not divisible by 4) set to true (will use =)
    - No line length specified
- SERVER_PORT refers to the port to which the server binds

# Detailed API Design

The APIs can be directly invoked from localhost:SERVER_PORT. Web application are expected to direct the API requests to
`api.safenet`

### Authorised Request
- The Authorisation token must be passed in the request header.
- Authorised requests should encrypt the entire url path, using the symmetric encryption key.
- The body of the http request should also be encrypted using the symmetric key.

For example,
```
GET http:\\api.safenet\{encrypted_path_along_with_the_query_params}
```

## Authorisation API

### Application Authorisation

#### Request

##### End point
```
/v1/auth
```

##### Method
```
POST
```

##### Request header
```
content-type: application/json
```

##### Request Body

```javascript
{
    "app": {
        "name": "Application Name", //string - application name
        "vendor": "Vendor name", //string - application vendor name
        "version": "0.0.1", // string - application version number
        "key": "unique_package_key" // String - unique key for application
    },
    "permissions": [ // optional field
        'SAFE_DRIVE_ACCESS'
    ],
    "publicKey": "base64 string", // [uint8] as base64 String
    "nonce": "base64 string", // [uint8] as base64 String
}
```

#### Response on Success

##### Response headers
```
content-type: application/json
status: 200 OK
```

##### Response Body
```javascript
{
    "token": "header.payload.signed", //JWT token
    "encryptionKey": "base64", // Encrypted Symmetric key
    "publicKey": "base64", // public key used for encryption of the Symmetric Key,
    "permissions": [ // list of permissions approved
        "SAFE_DRIVE_ACCESS"
    ]
}
```

### Revoke Token

Revoke token is invoked to revoke the authorised token.

#### Request

The url path must be encrypted with the Symmetric Key

##### End point
```
/v1/auth/revoke
```

##### Method
```
DELETE
```

##### Request header
```
Authorization: Bearer {TOKEN}
```

#### Response on Success

##### Response headers
```
status: 200 OK
```

repository: maidsafe/rfcs

gha_language: Rust

repo_name: maidsafe/rfcs