text:
# FunCamera

![StillCoding](https://img.shields.io/badge/Still-Coding-green.svg)
![License](https://img.shields.io/badge/license-Apache-brightgreen.svg)
![build passing](https://img.shields.io/travis/rust-lang/rust.svg)
![Author](https://img.shields.io/badge/Author-DCMMC-blue.svg)
![WeChatID](https://img.shields.io/badge/WeChat-Kevin--0220-red.svg)

**Star me if you like it!**

> 因为手头上只有台 `Nexus4` (Android 8.1), 性能实在是不太好, 现在 tensorflow 的 stylish 没法使用, 懒得 debug 了... 暂且放放
> 因为 `build.gradle` 有些地方缺乏实践, 瞎写的, 所以估计过一段时间直接是跑不起来的, 酌情更改 `build.gradle` 文件

## Introduction

> A simple camera app using TensorFlow to classify object and stylize pictures.

> 一款用 TensorFlow 框架来实时物体检测和对照片进行油画风格渲染

## Screenshots

![](./screenshot/main.png)

![](./screenshot/main1.png)

![](./screenshot/drawer.png)

![](./screenshot/drawer1.png)

![](./screenshot/open_sources.png)

![](./screenshot/open_sources1.png)

![](./screenshot/classfier.png)

![take_photot](assets/take_photo.png)

![permission](assets/permission.png)

![resize](assets/resize.png)

![stylish](assets/stylish.png)

![edit_photo](assets/edit_photo.png)

![edit_photo_old](assets/edit_photo_old.png)

## Credits

## Developer(s)

[DCMMC](https://blog.dcmmcc.tk) -<EMAIL_ADDRESS>
## LICENSE

```
Copyright 2017 DCMMC

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

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

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

repository: DCMMC/FunCamera

repo_name: DCMMC/FunCamera


text:
# \<cancel\>
The element is used to cancel a delayed \<send\> event. The SCXML Processor **must not allow** \<cancel\> to affect events that were not raised in **the same session**. The Processor should make its best attempt to cancel all delayed events with the specified id. Note, however, **that it can not be guaranteed to succeed**, for example if the event has already been delivered by the time the \<cancel\> tag executes.

## Attribute Details
Name	|Required	|Attribute Constraints	|Type	|Default Value	|Valid Values	|Description
---|---|---|---|---|---|---|
sendid	|false	|Must not occur with sendidexpr.	|IDREF	|none	|The sendid of a delayed event	|The ID of the event(s) to be cancelled. If multiple delayed events have this sendid, the Processor will cancel them all.
sendidexpr	|false	|Must not occur with sendid.	|Value Expression	|none	|Any expression that evaluates to the ID of a delayed event	|A dynamic alternative to 'sendid'. If this attribute is present, the SCXML Processor must evaluate it when the parent \<cancel\> element is evaluated and treat the result as if it had been entered as the value of 'sendid'.

## [W3C IRP tests](https://www.w3.org/Voice/2013/scxml-irp)

### [1. Test 207](https://www.w3.org/Voice/2013/scxml-irp/207/test207.txml)
The SCXML Processor MUST NOT allow cancel to affect events that were not raised in the same session.

![test207](https://user-images.githubusercontent.com/18611095/28563182-d44070ca-712d-11e7-8285-5dd93092f47e.png)

![test207 - child](https://user-images.githubusercontent.com/18611095/28563194-dd998594-712d-11e7-8b5f-9d2f14fbb4c6.png)

### [2. Test 208](https://www.w3.org/Voice/2013/scxml-irp/208/test208.txml)
The Processor SHOULD make its best attempt to cancel all delayed events with the specified id.

![test208](https://user-images.githubusercontent.com/18611095/28563414-904019a6-712e-11e7-8ad6-4ca295be1620.png)

### [3. Test 210](https://www.w3.org/Voice/2013/scxml-irp/210/test210.txml)
If the **'sendidexpr'** attribute is present, the SCXML Processor MUST evaluate it when the parent cancel element is evaluated and treat the result as if it had been entered as the value of **'sendid'**.

![test210](https://user-images.githubusercontent.com/18611095/28563685-60643a68-712f-11e7-9ea0-f8f66fd3a023.png)

repository: mazj/SCXML-tutorial

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mazj/SCXML-tutorial


text:
# Vivliostyle Flavored Markdown

![](./ecosystem.drawio.svg)

## Principles

1. Rule of least surprise
   - Should be lined and matched to another Markdown syntax.
1. (Mostly) backward-compatible syntax. should not be incorrectly rendered in Markdown editor like Typora.

repository: vivliostyle/vfm

branch_name: refs/heads/main

gha_language: TypeScript

gha_license_id: NOASSERTION

repo_name: vivliostyle/vfm


text:
---
layout: post
title: Planning
category: eecs492
---
This lecture is actually more about first order logic.

## Inference in FOL
**Universal instantiation** is the idea that we can infer any sentence obtained by substituting a *ground term* for the variable. If we replace a variable by a single new constant it's called **existential instantiation** and we replace a variable with a single constant.

**First order inference** allows us to substitute names for variables, and we can apply this many times over many sentences. This brings us to **unification**, which allows us to find the values of variables to make a sentence logically consistent.

How do we resolve first order logical statements? We can look at chaining again. Let's look first at **forward chaining**:

In forward chaining we want to apply logic iteratively until we reach a conclusion. However, this is quite inefficient, if intuitive. We recheck each rule each iteration which is a huge waste. There's a version that's efficient, but we won't discuss it.

Obviously the other option of this is **backward chaining**, which is basically just using depth first search.

## Resolution
Resolution requires conjunctive normal form!

license: MIT


text:
## Songs Emotion Dataset

This is a dataset of songs. You can download this dataset from: [Songs Emotion Dataset](https://code.soundsoftware.ac.uk/projects/emotion-recognition/repository/show/4.%20dataset%20(audio))

Additional cropping and conversion (to spectrogram) is needed using the conversion codes we provide in this project. Then you can execute `create_tfrecord.py` to assemble the dataset for training purpose.

It includes songs of 4 different styles:

`angry`, `happy`, `relax`, `sad`

Reasonably this dataset incurs a more challenging task to the training module comparing with the "Piano Emotion Dataset", as human voice is incorporated now and more undetermined factors should be taken into account.

One solution to this challenging case suggests us to place more effort on the data preprocessing stage. By seperating foreground human voice from backgroud music, we can consequently apply different information extraction strategy on the raw audio data. This incurs considerable amount of noise to the raw audio data and extra effort should be devoted to relevant aspects.

Apart from denosing tasks we need to perform. Plenty of tricks should be played as we wish to crest the peak of accuracy in songs emotion recognition. These tricks, however, is rather complicated to elaborate in several words. We will go further into details in the subsequent sections.

Here we present some examples of this dataset for your quick view:
### Angry
![spectrogram of angry emotion](angry/angry_003.jpg)
### Happy
![spectrogram of happy emotion](happy/happy_125.jpg)
### Relax
![spectrogram of relax emotion](relax/relax_125.jpg)
### Sad
![spectrogram of sad emotion](sad/sad_097.jpg)

repository: jalonzou/AuEmo-Identification

repo_name: jalonzou/AuEmo-Identification


text:
# Drawing Lines by Wei Wei Chi 2016

Please download and use Processing 3 for this application.

Processing download link: https://processing.org/download/

Open one of the pde file after installing processing.

Controls:

Increase Speed by pressing UP

Decrease Speed by pressing DOWN

Change Direction by pressing LEFT or RIGHT

Save current frame by pressing 's' or 'S'

Click to paused and unpaused

repository: weiweikee/Drawing-Lines

repo_name: weiweikee/Drawing-Lines


text:
# h5bp-v5.3.0-compass

## Description
This is my setup for a new web project with HTML5 Boilerplate v5.3.0, Normalize v4.1.1 & Compass/SASS.

### CSS Files (/css) ###
The base CSS file (/css/main.css) is pre-compiled importing the HTML5 Boilerplate approved normalize.css. If compass is watching the /compass/sass folder then all your edits will truncate over main.css.

### JavaScript Files (/js) ###
Libraries are stored in the /js/vendor folder, including the minified jQuery v1.12.0 and minified Modernizr v2.8.3.
There is a starter file (main.js) supplied so you can start writing base JavaScript and a dedicated plugin file (plugin.js) for better control over third party dependencies

### Image Files (/img) ###
Create a folder named /img at trunk level and place your images there. You can also create additional folders to use with the Compass spriting engine (make sure to include @import "sprites/*.png" in base stylesheet).

## Documentation for Libraries ##
* HTML5 Boilerplate
* Compass Framework
* SASS
* normalize.css

## Acknowledgments
[HTML5 Boilerplate](http://html5boilerplate.com), created by by Paul Irish and Divya Manian.


text:
# Function Calling Function with Rest API example

With Geode Functions the default behavior the results are presented to the caller as a collection of results from each server.      With the Geode Client we have options to change up the default result collector to aggregate the results and present the answer as a single collection.    But what about the Geode REST api.

A rest client of the Geode REST api doesn't have Geode client libraries to help out with presenting the results in any other fashion.    So what are we to do?

To quote David Wheeler is "All problems in computer science can be solved by another level of indirection" - and the same goes true with Geode.    We will have a Geode Function running on one server groom the answer from another function which is running on many hosts.

# Example run through

For this example I have started up a Geode system with 3 servers and deployed two functions:

* `PartitionedFunction` - this function just looks up the results for specified keys.   We would call this function with a Geode filter so the function only runs on servers that contain the data that we are interested.   If this runs on more then one server we will get a collection of maps back.
* `PrettyPrintFunction` - this function takes an argument of what keys to look up.   Since it is an `onRegion` function we need to have it run on one server.    To do that we need to set a filter of one key so it will run on one server that potentially would have that one key.   If we don't set the filter the function will run on every server that has that region.

## What we don't want

In this step we will call the `PartitionedFunction` function as we normally would.   In the result we can see 3 entries from the 3 servers.   One of the servers just happened to be responsible for hosting 2 of the requested filters if it were to host that data.

But that isn't what our end application needs or wants.

```shell script
curl -X POST \
  'http://localhost:7071/geode/v1/functions/PartitionedFunction?onRegion=test&filter=person1,person2,person3,person4' \
  -H 'Content-Type: application/json' \
  -d '[{ "@type" : "string", "@value" : "person1"}, { "@type" : "string", "@value" : "person2"}]'
```
###Result
```shell script
voltron:scripts cblack$ curl -X POST \
>   'http://localhost:7071/geode/v1/functions/PartitionedFunction?onRegion=test&filter=person1,person2,person3,person4' \
>   -H 'Content-Type: application/json' \
>   -d '[{ "@type" : "string", "@value" : "person1"}, { "@type" : "string", "@value" : "person2"}]'
[ {
  "person3" : null
}, {
  "person2" : null
}, {
  "person4" : null,
  "person1" : {
    "@type" : "string",
    "@value" : "person1 value"
  }
} ]voltron:scripts cblack$

```
## Call our function

I am going to delete the `person1` key and re-run with our `PrettyPrintFunction`.

repository: charliemblack/geode-fn-call-fn-rest

repo_name: charliemblack/geode-fn-call-fn-rest


text:
---
# Display name
name: Stamatis Lefkimmiatis

# Username (this should match the folder name)
authors:
- admin

# Is this the primary user of the site?
superuser: true

# Role/position
role: Senior Research Scientist

# Organizations/Affiliations
organizations:
- name: Q Bio Inc
  url: "https://q.bio"

# Short bio (displayed in user profile at end of posts)
bio: My research interests include computational imaging, computer vision, machine learning and large-scale optimization.

interests:
- Computational Imaging
- Computer Vision
- Machine & Deep Learning
- Large-Scale Optimization

education:
  courses:
  - course: PhD in Electrical & Computer Engineering
    institution: National Technical University of Athens (NTUA)
    year: 2009
  - course: Diploma/M.Eng. in Computer Engineering & Informatics
    institution: University of Patras, Greece
    year: 2004

# Social/Academic Networking
# For available icons, see: https://sourcethemes.com/academic/docs/page-builder/#icons
#   For an email link, use "fas" icon pack, "envelope" icon, and a link in the
#   form<EMAIL_ADDRESS>or "#contact" for contact widget.
social:
- icon: envelope
  icon_pack: fas
  link: "mailto:stamatisl[at]gmail.com"  # For a direct email link, use<EMAIL_ADDRESS>- icon: google-scholar
  icon_pack: ai
  link: https://scholar.google.com/citations?user=3Bawtm4AAAAJ&hl=en
- icon: github
  icon_pack: fab
  link: https://github.com/slefkimmiatis
- icon: linkedin
  icon_pack: fab
  link: "https://www.linkedin.com/in/stamatis-lefkimmiatis-37855930/"
# Link to a PDF of your resume/CV from the About widget.
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
- icon: cv
  icon_pack: ai
  link: files/cv.pdf

# Enter email to display Gravatar (if Gravatar enabled in Config)
email: ""

# Organizational groups that you belong to (for People widget)
#   Set this to `[]` or comment out if you are not using People widget.
user_groups:
- Researchers
- Visitors
---

I am a Senior Team Lead of the Computational Imaging team in the Noah's Ark Lab, Huawei (https://www.noahlab.com.hk), where I am responsible for the R&D efforts in image and video processing and low-level computer vision. Prior to that I was a Senior Research Scientist in the Radiomics R&D team with [Q Bio](https://q.bio). From 2016 to 2019, I was an Assistant Professor at Skolkovo Institute of Science and Technology [(Skoltech)](https://www.skoltech.ru/en), Moscow and director of the Computational Imaging Group [(CIG)](https://cig-skoltech.github.io/). I have also held Postdoctoral Research Associate positions with the Biomedical Imaging Group at [EPFL](http://bigwww.epfl.ch) and the Department of Applied Mathematics at [UCLA](https://math.ucla.edu).

My research interests lie in the areas of computational imaging, machine & deep learning, computer vision and large-scale optimization. My current focus is on inverse imaging
problems, including, denoising, deconvolution, super-resolution, demosaicking, compressive sensing, etc., with applications in digital photography, biomicroscopy and medical imaging.

For more information about me, see my {{% staticref "files/cv.pdf" %}}CV{{% /staticref %}} or [contact me](mailto:stamatisl[at]gmail.com).

repository: slefkimmiatis/academic-kickstart

gha_license_id: MIT

repo_name: slefkimmiatis/academic-kickstart


text:
# Appwrite Command Line SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-cli.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-0.10.0-blue.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite_io?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite_io)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

**This SDK is compatible with Appwrite server version 0.10.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-cli/releases).**

Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Command Line SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

![Appwrite](https://appwrite.io/images/github.png)

## Installation

This tutorial assumes that you have docker setup and running on your machine.

You can install the CLI by getting our installation script.

### Linux / MacOS
```bash
$ wget -q https://appwrite.io/cli/install.sh  -O - | /bin/bash
```

### Windows
```powershell
$ iwr -useb https://appwrite.io/cli/install.ps1 | iex
```

## Initialisation
The CLI needs to be initialised with your project settings. This can be done using
```sh
$ appwrite init
```

The CLI requires an endpoint, project ID, API key and a locale to be able to communicate with the Appwrite backend server. There are two ways to achieve this

### 1. Pass in the project settings along with `appwrite init`

```sh
$ appwrite init --endpoint="YOUR ENDPOINT" --project="YOUR PROJECT ID" --key="YOUR API KEY" --locale="YOUR LOCALE"
```

If any of the required values are missing, a prompt will show up, asking for those missing values.

### 2. Using the prompt

Invoking `appwrite init` without any params triggers an interactive prompt where you can manually enter the details. These values are saved locally so that you dont have to re-enter them everytime.

### Note
By default, requests to domains with self signed SSL certificates (or no certificates) are disabled. If you trust the domain, you can bypass the certificate validation by using
```sh
$ appwrite client setSelfSigned --value=true
```

## Usage

The Appwrite CLI follows the following general syntax.
```sh
$ appwrite [SERVICE] [COMMAND] --[OPTIONS]
```

A few sample commands to get you started

```sh
$ appwrite users create<EMAIL_ADDRESS>--password="very_strong_password"
$ appwrite users list
```

To create a Document you can use the following command
```sh
$ appwrite database createDocument --collectionId="YOUR COLLECTION ID" --data='A VALID JSON STRING' --read=role:member --read="*" --write=role:guest
```

### Some Gotchas
- `data` expects the JSON string to be escaped.
- If using the wildcard (`*`) read or write permissions , make sure that it is properly escaped using a `\` or by enclosing it in `"*"` since bash interprets them differently.
- Some arguments like `read` and `write` permissions are expected to be arrays. In the Appwrite CLI, arrays are passed by simply repeating the argument as seen in the `createDocument` example above.

To get information about the different services available, you can use
```sh
$ appwrite help
```

To get information about a particular service and the commands available in a service you can use
```sh
$ appwrite users help
$ appwrite accounts help
```

To get information about a particular command and the parameters it accepts, you can use

```sh
$ appwrite users list --help
$ appwrite account get --help
```

## Contribution

This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.

To build and test the CLI for development, follow these steps

1. Clone the SDK Generator
```sh
$ git clone https://github.com/appwrite/sdk-generator
```

2. Ensure that docker is running locally and then run
```sh
$ cd sdk-generator

# Install the composer dependencies
$ docker run --rm --interactive --tty --volume "$(pwd)":/app composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist

# Generate the SDKs
$ docker run --rm -v $(pwd):/app -w /app php:7.4-cli php example.php
```

3. Head over to the generated SDK and build the CLI docker image
```sh
$ cd examples/CLI
$ docker build -t appwrite/cli .
```

4. Install the CLI

MacOS and Linux

Open `install.sh` and change [this line](https://github.com/appwrite/sdk-for-cli/blob/master/install.sh#L33) to `APPWRITE_CLI_IMAGE_VERSION=latest` and
comment [these lines](https://github.com/appwrite/sdk-for-cli/blob/master/install.sh#L119-L123).

You can now install the CLI using
```sh
$ chmod +x install.sh
$ ./install.sh
```

Windows

Open `install.ps1` and change [this line](https://github.com/appwrite/sdk-for-cli/blob/master/install.ps1#L28) to `APPWRITE_CLI_IMAGE_VERSION=latest` and
comment [these lines](https://github.com/appwrite/sdk-for-cli/blob/master/install.ps1#L85-L89)

You can now install the CLI using
```sh
$ ./install.ps1
```

## License

Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.

repository: abxhr/sdk-for-cli

repo_name: abxhr/sdk-for-cli


text:
# Using objects example

```
module "public-ecr" {

  source = "lgallard/ecrpublic/aws"

  repository_name = "lgallard-public-repo"

  catalog_data = {
    about_text        = "# Public repo\nPut your description here using Markdown format"
    architectures     = ["Linux"]
    description       = "Description"
    logo_image_blob   = filebase64("image.png")
    operating_systems = ["ARM"]
    usage_text        = "# Usage\n How to use you image goes here. Use Markdown format"
  }
}
```


text:
---
title: Requirements
menu:
    main:
        parent: install
        weight: 1
---

## Requirements

### MQTT broker

LoRa Gateway Bridge makes use of MQTT for publishing and receivng application
payloads. [Mosquitto](http://mosquitto.org/) is a popular open-source MQTT
server, but any MQTT broker implementing MQTT 3.1.1 should work.
In case you install Mosquitto, make sure you install a **recent** version.

#### Install

##### Debian / Ubuntu

For Ubuntu Trusty (14.04), execute the following command in order to add the
Mosquitto Apt repository, for Ubuntu Xenial and Debian Jessie you can skip
this step:

```bash
sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
```

In order to install Mosquitto, execute the following command:

```bash
sudo apt-get install mosquitto
```

##### Other platforms

Please refer to the [Mosquitto download](https://mosquitto.org/download/) page
for information about how to setup Mosquitto for your platform.

repository: ikulikov/lora-gateway-bridge

repo_name: ikulikov/lora-gateway-bridge


text:
#### Playbooks
##### New: FireEye ETP - Indicators Hunting
Created a new playbook for threat hunting and detection of IOCs such as domains, IP addresses, sender and recipient email addresses. Separate searches are conducted for each type of indicator in the playbook.
<!--Note that multiple search values should be separated by commas only (without spaces or any special characters).-->

repository: demisto/content

gha_language: Python

repo_name: demisto/content


text:
## Issues FAQ

####  I opened an issue but no one has replied.

I will not reply to issues that are not related to bugs at the moment.

#### I need you to add a feature.

I don't accept feature requests.
You can contact me at<EMAIL_ADDRESS>to hire (for money) Yelluw to work on your feature.
We do software development. You can pay us to build your feature.

#### I can't figure out how to use it.

Please refer to the documentation. No support is available.

#### I found a bug.

Open an issue about the bug. Include the following:

- Platform / Browser its happening on.

- A clear explanation of what's happening.

- Screenshots of the issue happening.

Issues without this information will be closed and/or ignored.

## Support

No support is available.

The Boostrap docs found [here](http://getbootstrap.com/) should be of help.

repository: yelluw/Bootparts

repo_name: yelluw/Bootparts


text:
---
name: "\U0001F680 Feature / Enhancement Request"
about: Suggest a new idea / feature enhancement for Acton.
labels: enhancement
---
<!-- Before opening a new issue, please search existing issues:  https://github.com/actonlang/acton/issues -->

### Proposal
<!--
  Provide a clear and concise description of what you want.
-->

### Motivation

<!--
  Explain the problem that your proposal is attempting to address
  -->

### Alternatives
<!--
  Let us know about other solutions you've tried or researched.
-->

repository: Mvmo/acton

repo_name: Mvmo/acton


text:
# Description

This is a project to show my portfolio and social media profiles.

## Reference

This project is based on [Reacteroids](https://github.com/chriz001/Reacteroids).

## Check it out

[Here](https://caiovini.github.io/)

repository: caiovini/profisteroids

repo_name: caiovini/profisteroids


text:
If you have a bugfix or new feature that you would like to contribute to elasticsearch-php, please find or open an issue about it first. Talk about what you would like to do. It may be that somebody is already working on it, or that there are particular issues that you should know about before implementing the change.

We enjoy working with contributors to get their code accepted. There are many approaches to fixing a problem and it is important to find the best approach before writing too much code.

The process for contributing to any of the Elasticsearch repositories is similar.

1. Sign the contributor license agreement

    Please make sure you have signed the [Contributor License Agreement](https://www.elastic.co/contributor-agreement/). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once.

2. Set up your fork for development

        $> git clone https://github.com/elasticsearch/elasticsearch-php.git
        $> cd elasticsearch-php
        $> git submodule update --init --recursive
        $> curl -s http://getcomposer.org/installer | php
        $> php composer.phar install --dev

3. Ensure a version of Elasticsearch is running on your machine.  Recommended "test" configuration is:

        $> bin/elasticsearch -Des.gateway.type=none -Des.http.port=9200 \
            -Des.index.store.type=memory -Des.discovery.zen.ping.multicast.enabled=false \
            -Des.node.bench=true -Des.script.disable_dynamic=false

4. Run the unit and yaml integration tests to ensure your changes do not break existing code. The `util/RestSpecRunner.php` script will automatically checkout the tests for the exact same build as is the Elasticsearch you are running on your machine (since tests are specific to the server version):

        $> export ES_TEST_HOST='http://localhost:9200'

    Then proceed to initialize the REST yaml tests and run the package. **WARNING: the unit tests will clear your cluster
    and data..._do not_ run the tests on a production cluster!**

        $> php util/RestSpecRunner.php
        $> php vendor/bin/phpunit

5. Ensure your changes follow the [PSR-2 Coding Style Guide](http://www.php-fig.org/psr/psr-2/). You can run tools such as [PHP-CS-Fixer](http://cs.sensiolabs.org/) or [PHP_CodeSniffer](http://pear.php.net/package/PHP_CodeSniffer) to enforce PSR-2 automatically.

6. Rebase your changes

    Update your local repository with the most recent code from the main elasticsearch-php repository, and rebase your branch on top of the latest master branch. We prefer your changes to be squashed into a single commit.

7. Submit a pull request

    Push your local changes to your forked copy of the repository and submit a pull request. In the pull request, describe what your changes do and mention the number of the issue where discussion has taken place, eg “Closes #123″.  Please consider adding or modifying tests related to your changes.

Then sit back and wait. There will probably be discussion about the pull request and, if any changes are needed, we would love to work with you to get your pull request merged into elasticsearch-php.

repository: elastic/elasticsearch-php

gha_language: PHP

repo_name: elastic/elasticsearch-php


text:
# Dashboard challenge by Leandro

### Intructions to install it!
  - Clone the project on you machine
  - On the root folder run in your terminal "npm install"
  - Run "npm run dev" to lift the dev server. After compile all the files it will show you a URL like: http://localhost:8080/

### Tech

* [Webpack] - Its a file Bundler
* [Javascript ES6] javascript vanilla new sintax
* [ReactJs] - Library made by Facebook to build UIs
* [Sass] - Css language extension to build cleaner and organized styles

### Development
This project is based on the design provided for A****o front-end dev lead to make a job challenge exercise.
I intend to make the most reusable project(it was the part where I put more effort). So the most of components are prepared to get data from a source and show it. And it should be easy to modify them and interchange them for a new ones for example.

### Todos

 - Improve webpack build and adapt it to prod enviroment.
 - Write Tests for the components
 - Improve the mobile version
 - Get the data from a rest api fake like this https://github.com/typicode/json-server
 - Split graphics component
 - Improve circle progress to get the percentage

License
----

MIT

repository: lcodecrafter/dashboard-challenge

gha_language: JavaScript

repo_name: lcodecrafter/dashboard-challenge


text:
---
layout: default
---

# 1997-02-22 - Re: IDEA/Strength?

## Header Data

From: Bill Stewart<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Alec)

Message Hash:<PHONE_NUMBER>ff13705bec4ca9182bcfcaa38e6319725a3d7522cf0cdf27647960

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-02-22 07:48:08 UTC

Raw Date: Fri, 21 Feb 1997 23:48:08 -0800 (PST)

## Raw message

```
{% raw  %}From: Bill Stewart<EMAIL_ADDRESS>Date: Fri, 21 Feb 1997 23:48:08 -0800 (PST)
To<EMAIL_ADDRESS>(Alec)
Subject: Re: IDEA/Strength?
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 04:21 PM 2/21/97 -0500, Alec wrote:
>Is the strength, or lack thereof, of conventional PGP encryption
>proportional to the length of the conventional password?

Sure, up to 128 bits of entropy.  Go check out pgpcrack.

Suppose you wanted to do a brute-force attack on a PGP conventionally
encrypted document, and you knew the passphrase was one character long.
What would you do?  How many tries would it take to be sure you
got the right passphrase?

Suppose you knew the passphrase was one word in a common on-line dictionary.
What would you do, and how many tries would it take?

Since the passphrase is MD5-hashed to a 128-bit-long key, there are only
2**128 really-different passphrases, though for any given passphrase,
most of the members of the infinitely large class of equivalent passphrases
won't be very easy to remember :-)  Since MD5 is cryptographically strong,
we used to assume it would be hard to find those equivalence classes,
though Dobbertin's work suggests it's not as hard to find collisions as we
used to assume.

#			Thanks;  Bill
# Bill Stewart, +1-415-442-2215<EMAIL_ADDRESS># You can get PGP outside the US at ftp.ox.ac.uk/pub/crypto/pgp
#     (If this is a mailing list, please Cc: me on replies.  Thanks.)

{% endraw %}
```

## Thread

+ Return to [February 1997](/archive/1997/02)

+ Return to "[Bill Stewart <stewarts@ix.netcom.com>](/authors/bill_stewart_stewarts_at_ix_netcom_com_)"
+ Return to<EMAIL_ADDRESS>(Alec)](/authors/camcc_at_abraxis_com_alec_)"

+ 1997-02-21 (Fri, 21 Feb 1997 13:21:23 -0800 (PST)) - [IDEA/Strength?](/archive/1997/02/b138ce60f67e72b2ed82a170adf5b1289c855917578b52e4af3f73a6aa521193) -<EMAIL_ADDRESS>(Alec)_
  + 1997-02-22 (Fri, 21 Feb 1997 23:48:08 -0800 (PST)) - Re: IDEA/Strength? - _Bill Stewart<EMAIL_ADDRESS>


text:
The following repo includes the OpenApi documentaion for OB System for Cross-domain Identity Management (SCIM) as well as Directory API.
Pleae refer to the [Obdatad project](https://github.com/OpenBankingUK/obdatat) in order to authenticate above APIs requests.

# Directory API
APIs are for carrying out specific tasks around the Directory and getting information from there.

### Host endpoints
- Sandbox: https://matls-dirapi.openbankingtest.org.uk/
- Production: https://matls-dirapi.openbanking.org.uk/

[Swagger reference](./directory-api-swagger.yaml)

# SCIM API
SCIM stands for System for Cross-domain Identity Management (SCIM). The SCIM API is used for accessing identity information, especially for automation.

### Host endpoints
- Sandbox: https://matls-api.openbankingtest.org.uk/
- Production: https://matls-api.openbanking.org.uk/

[Swagger reference](./scim-swagger.yml)

repository: OpenBankingUK/directory-api-specs

repo_name: OpenBankingUK/directory-api-specs


text:
# Wallet Requirements: Request For Proposals (RFP)
[RFP]: #RFP

## Frontmatter
[frontmatter]: #frontmatter
```yaml
title: Stronghold
stub: stronghold
document: SCOPE
version: 0000
maintainer: Daniel Thompson-Yvetot<EMAIL_ADDRESS>contributors: [tensorprogramming<EMAIL_ADDRESS>Daniel Thompson-Yvetot<EMAIL_ADDRESS>sponsors: [Navin Ramachandran<EMAIL_ADDRESS>licenses: ["MIT/Apache-2", "CC-BY-INTL-3.0"]
updated: 2020-MAY-29
```

<!--
A Request For Proposals is an open question that seeks to focus research and development in the prealpha phase
and is based on needs defined in the Project Scope document.
-->

## Summary
[summary]: #summary
<!--
Summarise in 3-5 sentences in normal English what it is that proposals in this context should address.
-->
### Wallet Security Requirements
The use case of the wallet will require a number of solutions, many of which need to be supported by Stronghold. Here is a current list:

## Requirements
[requirements]: #requirements

The following are security requirements as proposed by the wallet team.
###
```
SNAPSHOTS
- Snapshot Import
- Snapshot Export
- Splitting the snapshot
  - Custodians, nominate with redundancy
  - Share the shardshots on a regular basis
- Drag and Drop import
- Can Stronghold be used as the digital backup for your seed?
  - Password (?)
  - Decryption key (?)

SEEDS
- Seed Entry
- Import from Trinity
- Panic Button for “At Risk Concerns”
- Seed Backup
  - Physical (written down) seed mnemonic (we are all against this, btw)
    - Requires display to the user
    - Requires later reentry for recovery
- Ability to skip backup and enter wallet,
  but prompted with reminders when trying to do sensitive actions

APP LOCK
Standard user
- Desktop
  - Password (11 chars)
  - MFA via mobile / Yubikey
-	Mobile
  - Password, option to skip and use biometric/pin only
  - Variable app lock settings: require for app access / require for transactions

INTERNALS
- Multi tenant
- MFA with 2nd Device
- Handoff to Ledger

Security Settings Overview (SHIELD)
Notifications
```

## Considerations
[considerations]: #considerations
<!--
This section can be used if there are known considerations that need to be taken into account and which the actual proposals SHOULD resolve.
-->

## Technical Proposal
[technical-proposal]: #technical-proposal
<!--
Introduce and explain the technical proposals that are being requested, detailing specifically the individual proposals required.
-->

## Research
[research]: #research
<!--
Please collect all relevant research links to repositories, issues and papers
-->

branch_name: refs/heads/dev


text:
# Medical System Expansion
**Not Just Another Prostheses Mod.** An expansion of vanilla medical system and how they work. Adds full featured prosthesis that uses vanilla standard and integration with another mod.

## Main Features
- Installed prosthesis can keep its child parts. In vanilla or other mod, if you install prosthesis part like peg leg then you lost its foot and toe.
- Exclusive body part system framework and it's modules. This allows you to install prosthetic modules on installed prosthesis.

**Note that above two main features only work on bionic and archotech prosthesis.** It's not make sense to me if basic and simple body parts can have this features.

- New organ transplant rejection, prosthesis limb and bone adaptation system, and implant complication. Some of this is never done by another mod.

This mod not really that OP. **Raider chance to spawn with prostheses parts and implants now higher and also have same feature.**

- Exclusive implant system framework. Prosthesis part that support this can install implant on installed prosthesis part. of course there's a limit of how many implant can be installed on installed prosthesis part.
- Fixed vanilla bug where installed basic or simple prosthetic parts can naturally heal. Now you don't get your installed hook hand naturally healed.

###### All Other Features
- New research projects.
- 2 new workbenches.
- About 50+ new prostheses parts and implants.
- Balancing vanilla prostheses body parts and implants.
- Adds prostheses parts and implants to trader and raider.
- Vanilla organs can be harvested and transplanted.
- Harvested organs can rot and decay.
- Now all bones can be destroyed by damage or attack.
- And many other features.

gha_language: C#


text:
# Rendering in Node
Sometimes it's necessary to render code inside of Node; for serving hyper fast
first requests, testing or other purposes. Applications that are capable of
being rendered in both Node and the browser are called
_[isomorphic][isomorphic]_.

Rendering in Node is slightly different than in the browser. First off, to
maintain performance all calls to `subscriptions`, `effects`, and `reducers`
are disabled. That means you need to know what the state of your application is
going to be _before_ you render it - no cheating!

Secondly, the `send()` method inside `router` and `view` has been disabled. If
you call it your program will crash. Disabling all these things means that your
program will render [`O(n)`][big-o], which is super neat. Off to [10.000
QPS][qps] we go!

To render in Node call the `.toString()` method instead of `.start()`. The
first argument is the path that should be rendered, the second is the state:
```js
var http = require('http')
var client = require('./path-to-client')

http.createServer(function (req, res) {
  var html = client.toString('/', { message: 'hello server!' })
  res.setHeader('Content-Type', 'text/html; charset=utf-8')
  res.end(html)
})
```

In order to make our `choo` app call `app.start()` in the browser and be
`require()`-able in Node, we check if [`module.parent`][module-parent] exists:
```js
var html = require('choo/html')
var choo = require('choo')

var app = choo()
app.router([ '/', mainView ])

if (module.parent) {
  module.exports = app
} else {
  document.body.appendChild(app.start())
}

function mainView (state, prev, send) {
  return html`
    <h1>${state.message}</h1>
  `
}
```

## Rehydration
Now that your application is succesfully rendering in Node, the next step would
be to make it load a JavaScript bundle once has loaded the HTML. To do this we
will use a technique called _rehydration_.

_Rehydration_ is when you take the static, server-rendered version of your
application (static HTML, _dehydrated_ because it has no logic) and _rehydrate_
it by booting up the JS and attaching event handlers on the DOM to make it
dynamic again. It's like restoring flavor to cup noodles by adding hot water.

Because we're using something called `morphdom` under the hood, all we need is
point at an `id` at the root of the application. The syntax for this is
slightly different from what we've seen so far, because we're _updating_ a
dehydrated DOM nodes to make them dynamic, rather than a new DOM tree and
attaching it to the DOM.
```js
var mount = require('choo/mount')
var html = require('choo/html')
var choo = require('choo')

var app = choo()
app.router([ '/', mainView ])

if (module.parent) {
  module.exports = app
} else {
  mount('body', app.start())
}

function mainView (params, state, send) {
  return html`
    <h1 id="app-root">${state.message}</h1>
  `
}
```

When the JS is booted on top of the dehydrated application, it will look for
the `#app-root` id and load on top of it. You can choose any name you like for
the id, but __make sure it's the same on every possible top level DOM node__,
or else things might break.

And that's it!

## Caching
The trick to improving initial load time is to reduce latency in loading
applications. Reducing latency is often more important than reducing payload
size. In order to reduce latency content should be served from a server
physically close to person requesting the content. Content Distribution
Networks (CDNs) are networks of computers that cache content from a central
server and strategically cache it around the world - sometimes there are even
multiple caches per country.

But in order to use CDNs, the content served should be cacheable. This
means distributing the lowest common denominator of any given page throughout
the CDN.

Say we'd be building GitHub, a few great things to cache would be:
- the JS bundles
- the CSS bundles
- all the marketing site content
- every single project README.md page

Stuff you don't want to be caching on the CDN:
- user specific pages
- any type of queries

When caching the user specific pages, ideally only the static content would be
cached, leaving out any dynamic content, i.e. user-specific content. For
example, in order to not confuse people it's beneficial if the baseline for the
UI doesn't show if a user is logged in or logged out - that way once the JS
kicks in the user-specific parts of the UI (think web 2.0) can be progressively
layered on top and provide a more custom experience. Think about it this way:
the reason why a user is visiting a page is probably to look at the content
first, so make sure that's available as fast as possible.

Once CDNs are in place, the content could be sped up further by providing more
caching. At the code layer you probably want to pre-render as much content into
a buffer and save it in [bl][bl]. On the service / application layer you
probably want to use [nginx][nginx] or [varnish][varnish] to cache data at a
higher level / cache more aggressively. At the database layer you probably want
to be using [materialized views][materialize-views] so that multiple queries to
the same data don't have to be recomputed every time - caching it for at least
the time it takes to re-compute a next query.

So to summarize application performance:
- cache aggressively
- cache on every level of the application to guard against accidental meltdowns
- create content that's cacheable - having a good balance takes balance
- design UIs so that they can be progressively enhanced to add user-specific
  information after loading

[isomorphic]: https://en.wikipedia.org/wiki/Isomorphism
[bl]: https://github.com/rvagg/bl
[varnish]: https://varnish-cache.org
[nginx]: http://nginx.org/
[big-o]: https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/
[qps]: https://en.wikipedia.org/wiki/Queries_per_second
[morphdom]: https://github.com/patrick-steele-idem/morphdom
[morphdom-bench]: https://github.com/patrick-steele-idem/morphdom#benchmarks
[module-parent]: https://nodejs.org/dist/latest-v6.x/docs/api/modules.html#modules_module_parent
[sse-reconnect]: http://stackoverflow.com/questions/24564030/is-an-eventsource-sse-supposed-to-try-to-reconnect-indefinitely
[ws-reconnect]: http://stackoverflow.com/questions/13797262/how-to-reconnect-to-websocket-after-close-connection
[materialized-views]: https://www.postgresql.org/docs/9.3/static/rules-materializedviews.html

repository: corderophilosophy/choo-handbook

repo_name: corderophilosophy/choo-handbook


text:
---
title: Cleveland Fishing Map
excerpt: This map of the Cleveland area highlights various ponds, rivers, lakes, creeks, and other Cleveland fishing spots.
date: 2019-08-07
author: dan
layout: map
permalink: /cleveland-fishing-map/
needed keywords:
  - cuyahoga river fishing spots
map_source: https://www.google.com/maps/d/embed?mid=1mr4nPNRNYI3sG9vey1Js3KQR8ljUYnJw
image:
  path: /assets/img/maps/cleveland-fishing-map.png
  render: false
seo:
  type: Map
tags:
  - map
---

This map contains various fishing spots in Cleveland and is a work-in-progress. I've started compiling a list of these spots by first identifying and marking them in Google Maps. I have been visiting these places to scope them out first and making notes and adding them to the map. I don't bring any equipment because some of them are a reasonable distance from where I can park and I don't want to drag my equipment with me if I'm not sure if the trip will be fruitful.

View these Cleveland Fishing Spots in a larger map

gha_language: SCSS


text:
# Daedaleopsis purpurea (Cooke) Imazeki & Aoshima, 1966 SPECIES

#### Status
SYNONYM

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

#### Published in
Flora of eastern Himalaya 619 (1966)

#### Original name
Trametes purpurea Cooke, 1882

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Basidiomycota/Agaricomycetes/Polyporales/Polyporaceae/Daedaleopsis/Daedaleopsis nipponica/ Syn. Daedaleopsis purpurea/README.md

repo_name: mdoering/backbone


text:
HierarchyHeader 👋

Create organizational hierarchy headers

## Quick Package Install

#### Using UnityPackageManager (for Unity 2019.3 or later)
Open the package manager window (menu: Window > Package Manager)

Select "Add package from git URL...", fill in the pop-up with the following link:

https://github.com/instance-id/HierarchyHeader.git#0.0.1

#### Using UnityPackageManager (for Unity 2019.1 or later)

Find the manifest.json file in the Packages folder of your project and edit it to look like this:
```js
{
  "dependencies": {
    "com.id.instance.hierarchyheader": "https://github.com/instance-id/HierarchyHeader.git#0.0.1",
    ...
  },
}
```

## Author

👤 **instance.id**

* Twitter: [@instance_id](https://twitter.com/instance_id)
* Github: [@instance-id](https://github.com/instance-id)

## Show your support

Give a ⭐ if this project helped you!

***
_This README was generated with ❤ by [Gameframe.Packages](https://github.com/coryleach/unitypackages)_


text:
WebAPKs
--
A WebAPK is an APK which is installed by "Add to Home screen" in the Chrome app menu
provided that the website meets the
[requirements](https://web.dev/install-criteria/).

Sample site which meets WebAPK requirements
--
[https://pwa-directory.appspot.com/](https://pwa-directory.appspot.com/)

Code layout
--
- shell_apk/ - Code for APK which is generated by the Chrome server. Not compiled
into Chrome.
- libs/client/ - Library which is compiled into Chrome. Useful if another browser
implemented WebAPKs.
- libs/common/ - Library with code which is used by both WebAPK shell and Chrome. WebAPK shell
and Chrome might use different versions of the library.
- libs/runtime_library/ - Library which is stored in the Chrome APK's assets and which is extracted
from the Chrome APK by the WebAPK at runtime. This approach ensures
that the majority of the WebAPK logic is shared and can be updated as often as
CHrome, without the need for updating each individual WebAPK.

Installing WebAPK from Chrome Developer Build
--
To enable a developer build of Chrome to install WebAPKs run the following
commands:

`adb root`
`adb shell am broadcast -a com.google.gservices.intent.action.GSERVICES_OVERRIDE -e finsky.webapk.do_webapk_install_package_check false`
`adb shell am broadcast -a com.google.gservices.intent.action.GSERVICES_OVERRIDE -e finsky.webapk.do_webapk_install_signing_check false`

Building WebAPK shell locally
--
It is possible to build a test WebAPK and bypass the generation on the WebAPK
server.

On Android, build
//chrome/android/webapk/shell_apk:webapk
On ChromeOS, build
//chrome/android/webapk/shell_apk:webapk_chromeos

Both can be customized via [shell_apk/manifest/bound_manifest_config.json](https://source.chromium.org/chromium/chromium/src/+/main:chrome/android/webapk/shell_apk/manifest/bound_manifest_config.json)

To make a locally built WebAPK launch Chrome in 'WebAPK mode':
1) Set the --skip-webapk-verification Chrome command line flag
2) Ensure that the 'scope_url_\*' parameters in bound_manifest_config.json
   match a directory which contains the 'start_url' parameter. In 99% of
   test cases the other parameters can use arbitrary URL origins.

   Example:
   ```
   "intent_filters": {
     "scope_url_scheme": "https",
     "scope_url_host": "foo.com",
     "scope_url_path_type": "android:pathPrefix",
     "scope_url_path": "/bar/"
   },
   "start_url": "https://foo.com/bar/baz/start.html",
   ```

repository: chromium/chromium

repo_name: chromium/chromium


text:
---
layout: post
title: "2/4 Year review"
date: 2014-07-28 08:00:00
categories: blog
description: My year so far, a little late...
---

I'm a little late with this post, but here we go, the second part of my year's review. First part.

### Lessons learned
* "The only easy day was yesterday".
* Look to the past, sometimes is dangerous, sometimes is worthwhile.
* Risk yourself, find your limits.

 This is a little odd, because I really planned this migration, but I give up.

Cya.

repository: AgtLucas/the-legacy

extension: markdown

repo_name: AgtLucas/the-legacy


text:
### [CVE-2023-23697](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-23697)
![](https://img.shields.io/static/v1?label=Product&message=Dell%20Command%20Update%20(DCU)&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=0%3C%204.4.0%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-1386%20-%20Insecure%20Operation%20on%20Windows%20Junction%20%2F%20Mount%20Point&color=brighgreen)

### Description

Dell Command | Intel vPro Out of Band, versions before 4.4.0, contain an arbitrary folder delete vulnerability during uninstallation. A locally authenticated malicious user may potentially exploit this vulnerability leading to arbitrary folder deletion.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon
- https://github.com/ycdxsb/ycdxsb

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# MSSP Configuration Loader

This utility is provided to enable API-based configuration using the
[Palo Alto Networks MSSP templates](https://github.com/scotchoaf/mssp-templates/tree/panos_v8.1)

It interfaces with both Panorama and the firewall PAN-OS API interfaces.

### Internet Gateway service

This uses the Gold-Silver-Bronze template set to configure tiered
services based on MSSP offerings and device subscriptions.

Templates include:

    * internet gateway base config with interfaces, zones, routing

    * gold/silver/bronze tier tags and security rules

### GPCS

This is based on remote network access to the internet using GPCS

Template elements include:

    * baseline GPCS config for new service onboarding

    * remote network IPSEC onboarding

    * sample CPE IPSEC configs that text render only, no API configuration

repository: scotchoaf/mssp-cnc

repo_name: scotchoaf/mssp-cnc


text:
# Tutorial 3 - Multi-robot simulation (Python)

In this tutorial we are spicing up things by adding more robot to our simulation.

## Prerequisites
The SML Nexus packages must have been installed and the simulation setup as detailed in the [first tutorial](/documentation/tutorials/1_install_and_bringup_simulation.md) and it is recommended to follow the [previous tutorial](/documentation/tutorials/2_simple_controller_simulation_python.md) first for a better understanding.

## Bringup the simulation and the controllers

Start the following launch file to bringup Gazebo and spawn three nexus robot:

`roslaunch sml_nexus_tutorials 3_multi_robot_simulation_python.launch`

After a few seconds, you should be able to see the intial robot moving back and forth between two locations and the two new robots trying to keep same position and heading relative to this one.

## Follower controller
Two robots have been added, each one running its own follower controller. The goal is not to make for a complex formation control but simply to demonstrate the use of multiple nexus robot at the same time.

If you look at the ROS node list you will see all the new nodes that are running. In another termnal run:

`rosnode list`

```
/gazebo
/gazebo_gui
/nexus1/back_and_forth_controller
/nexus1/robot_state_publisher
/nexus2/follower_controller
/nexus2/robot_state_publisher
/nexus3/follower_controller
/nexus3/robot_state_publisher
/qualisys
/rosout
```

As you can see, most nodes are now preceded by a namespace (nexus1, nexus2 or nexus3). Namespaces are very convenients when running multiple time the same node with different robots as they allow for automatic renaming of topics (by adding the namespace in front of it). We will see more in details how to use namespaces in the section about the launch file.

We can get more information on the follower controller node by using the rosnode command:

`rosnode info /nexus2/follower_controller`

We can see that the node is subscribed to `/tf`, the two robot poses `/qualisys/nexus1/pose` and `/qualisys/nexus2/pose`, and publishes to `/nexus2/cmd_vel`. The node itself normally publishes to `/cmd_vel` but the namespace is added. This controller uses the robot position (nexus2 is this example) and the tracked object position (here nexus1) to generate a velocity command.

Using `rqt_graph` gives a good overview of the namespaces and topics:

`rosrun rqt_graph rqt_graph`

The namespaces are represented as rectangular boxes containing all the nodes on the same namespace.

Use CTRL+C to stop the program.

### Examining the multi-robot launch file

To understand how everything is launched, take a quick look into [sml_nexus_tutorials/launch/3_multi_robot_simulation_python.launch.launch](sml_nexus_tutorials/launch/3_multi_robot_simulation_python.launch)

```XML
<?xml version="1.0"?>
<launch>
  <arg name="use_sim_time" default="true" />
  <arg name="gui" default="true" />
  <arg name="headless" default="false" />

  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="debug" value="0" />
    <arg name="gui" value="$(arg gui)" />
    <arg name="use_sim_time" value="$(arg use_sim_time)" />
    <arg name="headless" value="$(arg headless)" />
    <arg name="paused" value="false"/>
  </include>

  <group ns="nexus1">
    <!-- Load robot description -->
    <include file="$(find sml_nexus_description)/launch/sml_nexus_description.launch" />
    <!-- Spawn the robot -->
    <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
      args="-urdf -model nexus1 -param robot_description -x 0 -y 0 -z 0.5" />
      <!-- Controller node -->
    <node name="back_and_forth_controller" pkg="sml_nexus_tutorials" type="back_and_forth_controller.py" output="screen" />
  </group>

  <!-- Nexus 2  -->
  <group ns="nexus2">
    <!-- Load robot description -->
    <include file="$(find sml_nexus_description)/launch/sml_nexus_description.launch" />
    <!-- Spawn the robot -->
    <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
      args="-urdf -model nexus2 -param robot_description -x 0 -y -2 -z 0.5" />
    <!-- Follower controller node -->
    <node name="follower_controller" pkg="sml_nexus_tutorials" type="follower_controller.py" output="screen" >
      <param name="robot_name" value="nexus2"/>
      <param name="tracked_object" value="nexus1"/>
      <rosparam param="tracking_offset">[0, -1, 0]</rosparam>
    </node>
  </group>

  <!-- Nexus 3  -->
  <group ns="nexus3">
    <!-- Load robot description -->
    <include file="$(find sml_nexus_description)/launch/sml_nexus_description.launch" />
    <!-- Spawn the robot -->
    <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
      args="-urdf -model nexus3 -param robot_description -x -1 -y 2 -z 0.5" />
    <!-- Follower controller node -->
    <node name="follower_controller" pkg="sml_nexus_tutorials" type="follower_controller.py" output="screen" >
      <param name="robot_name" value="nexus3"/>
      <param name="tracked_object" value="nexus1"/>
      <rosparam param="tracking_offset">[0, 1, 0]</rosparam>
    </node>
  </group>

  <!-- Motion capture system simulation -->
  <include file="$(find mocap_simulator)/launch/qualisys_simulator.launch" />

</launch>
```

The main difference with the previous single robot launch file is the use of group with namespace. The robot model description, robot spawner and controller are all included into group with specified namespace.

```XML
  <!-- Nexus 2  -->
  <group ns="nexus2">
    <!-- Load robot description -->
    <include file="$(find sml_nexus_description)/launch/sml_nexus_description.launch" />
    <!-- Spawn the robot -->
    <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
      args="-urdf -model nexus2 -param robot_description -x 0 -y -2 -z 0.5" />
    <!-- Follower controller node -->
    <node name="follower_controller" pkg="sml_nexus_tutorials" type="follower_controller.py" output="screen" >
      <param name="robot_name" value="nexus2"/>
      <param name="tracked_object" value="nexus1"/>
      <rosparam param="tracking_offset">[0, -1, 0]</rosparam>
    </node>
  </group>
```

Please note the use of private parameters in the controller node. They help make the code more modular and easier to tune than hard-coded constants.

### Examining the follower controller code

Let's look at the code in [sml_nexus_tutorials/src/follower_controller.py](/sml_nexus_tutorials/src/follower_controller.py) line by line.

First part of the code is just about importing the needed libraries.

```python
#!/usr/bin/env python
#=====================================
#     Follower controller for the
#          SML Nexus robot
#               ----
#   Listen to both the robot pose
# and another tracked object from
#    the mocap system and output a
#   velocity command to drive the
#    robot to the follow the object
#=====================================
import sys
import rospy
import copy
import geometry_msgs.msg
import tf2_ros
import tf2_geometry_msgs
from tf.transformations import euler_from_quaternion

```

We then create a class for the controller

```python
class FollowerController():
```

In the constructor of the class, the ROS node is initialized. This is needed before accessing any ROS time function or subcribing/publishing on a ROS topic.

```python
    #=====================================
    #         Class constructor
    #  Initializes node and subscribers
    #=====================================
    def __init__(self):
        #----------------
        # Initialisation
        #----------------
        #Initialize node
        rospy.init_node('follower_controller')
```

Constants and variables are declared and initialized. This time we use ROS parameters to make the controller more flexible. Values are retrived from the parameter server using the `rospy.get_param()` function. The `~` in front of the parameter name specifies a private parameter: the name of the node is added in front of the parameter name. Instead of looking at `/robot_name` the node will look the parameter `/follower_controller/robot/name`. More details on how to assign parameter values in the launch file section of this tutorial.

```python
        #Get tracked object name from parameters
        robot_name = rospy.get_param('~robot_name')

        #Get tracked object name from parameters
        tracked_object = rospy.get_param('~tracked_object')

        #Get offset from tracked object
        tracking_offset = rospy.get_param('~tracking_offset')

        #Controller gains (for x, y, heading)
        gains = (2, 2, 2)
```

The robot pose variable and the tracked object pose variable are declared here as a ROS Pose Stamped message ([definition here](http://docs.ros.org/melodic/api/geometry_msgs/html/msg/PoseStamped.html)). This is the same message type received from the robot position feedback. The controller gains are also specified here (though one good practice is to have them as parameters)

Like for the previous controller, a "last received feedback time" variable is declared here as [ROS time instance](http://wiki.ros.org/rospy/Overview/Time). Together with the timeout, it is used to stop sending commands if we lose the motion capture feedback for either the robot or the tracked object. The two booleans "init_robot" and "init_track" are used to store that information.

```python
        #Init robot pose
        self.robot_pose = geometry_msgs.msg.PoseStamped()

        #Init tracked object pose
        self.tracked_object_pose = geometry_msgs.msg.PoseStamped()

        #Init last received pose time
        self.last_received_robot_pose = rospy.Time()

        #Init last received pose time
        self.last_received_tracked_pose = rospy.Time()

        #Booleans to check is positions have been received
        init_pose = False
        init_track = False
```

Then, our feedback subscribers are setup. Like in the previous tutorial, they subscribe to the motion capture system with ROS Pose Stamped message ([definition here](http://docs.ros.org/melodic/api/geometry_msgs/html/msg/PoseStamped.html)). However this time one subscriber is for our robot position (`"/qualisys/"+robot_name+"/pose`) and one is for the tracked object (`"/qualisys/"+tracked_object+"/pose"`). Note the use of the robot name and tracked object name as variable (initialized by parameters).

Two callback functions (`self.robot_pose_callback` and `self.tracked_object_pose_callback`) are used and will be called everytime a new message is published. Those function declarations are done later in the code.

The command publisher is also declared here. When called, it will publish on the robot command topic (`"cmd_vel"`) a ROS Twist message (velocity message, [definition here](http://docs.ros.org/melodic/api/geometry_msgs/html/msg/Twist.html))

**Important point:** Please note that the `/` before a topic name is important for namespace. If we use a slash, the path is absolute and won't change whatever namespace is used (as it is the case here for the subscription to the mocap feedback). Without a slash the path is relative and the namespace will be added in front of it (as it is the case here for the velocity command).

For more information about ROS subcribers/publishers, you can take a look at the ROS Python tutorial [Writing a Simple Publisher and Subscriber](http://wiki.ros.org/rospy_tutorials/Tutorials/WritingPublisherSubscriber)

```python
        #Setup robot pose subscriber
        rospy.Subscriber("/qualisys/"+robot_name+"/pose", geometry_msgs.msg.PoseStamped, self.robot_pose_callback)

        #Setup tracked object pose subscriber
        rospy.Subscriber("/qualisys/"+tracked_object+"/pose", geometry_msgs.msg.PoseStamped, self.tracked_object_pose_callback)

        #Setup velocity command publisher
        vel_pub = rospy.Publisher("cmd_vel", geometry_msgs.msg.Twist, queue_size=100)
```

Same as last time: the robot pose and goal pose are expressed in the motion capture system frame of reference but the robot command has to be sent in the robot reference frame. Hopefully the motion capture system node also provides the transform between its frame and the tracked subject frame. ROS provides a framework for transforms (called tf2, [here for more information](http://wiki.ros.org/tf2/Tutorials)).

The program will wait for a transform to be available before continuing.

```python
        #Setup transform subscriber
        tf_buffer = tf2_ros.Buffer()
        tf_listener = tf2_ros.TransformListener(tf_buffer)
        #Wait for transform to be available
        while not tf_buffer.can_transform('mocap', robot_name, rospy.Time()):
            rospy.loginfo("Wait for transform to be available")
            rospy.sleep(1)
```

Lastly, the command message variable is declared as a ROS Twist message ([definition here](http://docs.ros.org/melodic/api/geometry_msgs/html/msg/Twist.html))

```python
        #Create a ROS Twist message for velocity command
        vel_cmd_msg = geometry_msgs.msg.Twist()
```

The main loop frequency is regulated using a ROS rate in the same way as in the previous tutorial. In addition we also print some information about the controller at initialization.

The last received pose for both the tracked object and the robot is tested for timeout and if everything is okay the loop will proceed.

```python
        #-----------------------------------------------------------------
        # Loop at set frequency and publish position command if necessary
        #-----------------------------------------------------------------
        #loop frequency in Hz
        loop_frequency = 50
        r = rospy.Rate(loop_frequency)

        rospy.loginfo("Follower controller Initialized for "+robot_name+
                      " tracking "+tracked_object+
                      " with offset x:"+str(tracking_offset[0])+
                      ", y:"+str(tracking_offset[1])+
                      ", heading:"+str(tracking_offset[2])
                      )

        while not rospy.is_shutdown():
            #Run controller if robot position and tracked object position have been received
            now  = rospy.Time.now()
            init_pose = (now.to_sec() < self.last_received_robot_pose.to_sec() + timeout)
            init_track = (now.to_sec() < self.last_received_tracked_pose.to_sec() + timeout)

            if init_pose and init_track:
```

Like in the previous controller, error is computed. This time however the difference between the tracked object (plus an offset) and the robot position is used. Both positions are retrived from the mocap feedback callbacks.

In a ROS Pose Stamped message, orientation is defined as a quaternion and therefor needs to be converted to get the robot heading.

Command is computed using the errors anf gains.

```python
                #-----------------------------------
                # Compute error on x and y position
                #-----------------------------------
                error_x = (self.tracked_object_pose.pose.position.x + tracking_offset[0]) - self.robot_pose.pose.position.x
                error_y = (self.tracked_object_pose.pose.position.y + tracking_offset[1]) - self.robot_pose.pose.position.y

                #-----------------------
                # Compute heading error
                #-----------------------
                #Get euler angle from robot pose quaternion
                (roll, pitch, yaw) = euler_from_quaternion([self.robot_pose.pose.orientation.x,
                                                            self.robot_pose.pose.orientation.y,
                                                            self.robot_pose.pose.orientation.z,
                                                            self.robot_pose.pose.orientation.w])

                #Get euler angle from robot pose quaternion
                (track_roll, track_pitch, track_yaw) = euler_from_quaternion([self.tracked_object_pose.pose.orientation.x,
                                                                              self.tracked_object_pose.pose.orientation.y,
                                                                              self.tracked_object_pose.pose.orientation.z,
                                                                              self.tracked_object_pose.pose.orientation.w])

                error_heading = (track_yaw + tracking_offset[2]) - yaw

                #----------------
                # Compute output
                #----------------
                vel_cmd_msg.linear.x = error_x * gains[0]
                vel_cmd_msg.linear.y = error_y * gains[1]
                vel_cmd_msg.angular.z = error_heading * gains[2]
```

If the last feedback as not been received recenlty  (if not init_track and init_pose), the command is set to zero.

```python
            #Else stop robot
            else:
                vel_cmd_msg.linear.x = 0
                vel_cmd_msg.linear.y = 0
                vel_cmd_msg.angular.z = 0
```

The commands need to be transformed into the robot frame of reference. A `transform_twist()` function defined later in the code is used. Everything is wrapped in a try-except block to avoid the code from crashing if no transform is available.

The command message is then published.

```python
            #-----------------
            # Publish command
            #-----------------
            try:
                #Get transform from mocap frame to robot frame
                transform = tf_buffer.lookup_transform('mocap', 'nexus1', rospy.Time())
                #
                vel_cmd_msg_transformed = transform_twist(vel_cmd_msg, transform)
                #Publish cmd message
                vel_pub.publish(vel_cmd_msg_transformed)
            except:
                continue
```

The rate object created before provides a `sleep()` function that will wait enough time for the frequency loop to be respected.

```python
            #---------------------------------
            # Sleep to respect loop frequency
            #---------------------------------
            r.sleep()

```

The pose callbacks used to receive the motion capture system feedback. We have an additional callback for the tracked object position compared to the last tutorial.

```python
    #=====================================
    #          Callback function
    #      for robot pose feedback
    #=====================================
    def robot_pose_callback(self, pose_stamped_msg):
        #Save robot pose as class variable
        self.robot_pose = pose_stamped_msg

        #Save when last pose was received
        self.last_received_robot_pose = rospy.Time.now()

    #=====================================
    #          Callback function
    #  for tracked object pose feedback
    #=====================================
    def tracked_object_pose_callback(self, pose_stamped_msg):
        #Save robot pose as class variable
        self.tracked_object_pose = pose_stamped_msg

        #Save when last pose was received
        self.last_received_tracked_pose = rospy.Time.now()
```

The `transform_twit()` function definition, identical to the one from the previous tutorial. The function is used to convert the velocity command to the robot reference frame.

```python
#=====================================
# Apply transform to a twist message
#     including angular velocity
#=====================================
def transform_twist(twist= geometry_msgs.msg.Twist, transform_stamped = geometry_msgs.msg.TransformStamped):

    transform_stamped_ = copy.deepcopy(transform_stamped)
    #Inverse real-part of quaternion to inverse rotation
    transform_stamped_.transform.rotation.w = - transform_stamped_.transform.rotation.w

    twist_vel = geometry_msgs.msg.Vector3Stamped()
    twist_rot = geometry_msgs.msg.Vector3Stamped()
    twist_vel.vector = twist.linear
    twist_rot.vector = twist.angular
    out_vel = tf2_geometry_msgs.do_transform_vector3(twist_vel, transform_stamped_)
    out_rot = tf2_geometry_msgs.do_transform_vector3(twist_rot, transform_stamped_)

    #Populate new twist message
    new_twist = geometry_msgs.msg.Twist()
    new_twist.linear = out_vel.vector
    new_twist.angular = out_rot.vector

    return new_twist
```

The main program. It creates a controller class object and handle the ROS thread until asked to shut off or when crashing.

```python
#=====================================
#               Main
#=====================================
if __name__ == "__main__":
    follower_controller = FollowerController()
    try:
        rospy.spin()
    except ValueError as e:
        rospy.logerr(e)
        sys.exit(0)
    except rospy.ROSInterruptException:
        print "Shutting down"
        sys.exit(0)
```

## Next Tutorial
You can now learn more on how to monitor your controller in the next tutorial: [Error Monitoring (Python)](/documentation/tutorials/4_error_monitoring_python.md)


text:
---
title: Rate limiting
---

API Rate limits specify the number of requests a client in a specific time frame.

Since this API is meant to be used for delivering content from DatoCMS to apps,
websites and other digital products consumed by end-users, **there are no limits
enforced on requests that hit our CDN cache**. That is, you can make an unlimited
amount of cache hits.

For requests that do hit the Content Delivery API we enforce a rate limit
of 50 requests per second per API token.

Higher rate limits may apply depending on your current plan.

Bear in mind that all the requests, cached and uncached are counted against your
API calls limit.

#### Reaching your plan monthly API calls limit

For projects under a paid plan, even exceeding the API calls or bandwidth limit
does not lead to the interruption of the service, but the payment of an additional
fee commensurate with the use. For projects under a free plan, service will be
temporarily disabled until the beginning of the following calendar month,
unless you provide a credit card.

For more details, check our [Plans, billing and pricing page](/docs/general-concepts/pricing).

repository: datocms/old-website

repo_name: datocms/old-website


text:
# Contributing

First of - thank you for using this project and willingness to contribute ❤

## Getting started

Main goal of the project is to provide a quick way to create production ready Django apps.
Due to complexity of such goal solution implemented is highly opinionated and may not fit everyone's needs.

- all changes must comply with [Reef Technologies conventions](https://github.com/reef-technologies/handbook#73-conventions)
- before putting a lot of effort into a PR with a feature, please open an issue to discuss it first to avoid wasting time on something that may not be merged.
  - the rule of thumb is that if it is not useful for 90% of projects, it should not be included

## Development

Before creating PR run:

```sh
nox
```

to check if everything is OK.

Denote any breaking changes in [CHANGELOG.md]({{cookiecutter.repostory_name}}/docs/3rd_party/cookiecutter-rt-django/CHANGELOG.md).
When updating dependencies that has breaking changes add a link to the changelog of the dependency prepend the entry with `**BREAKING**` tag.


text:
# Getting Started

## Option1: CDN

```html
<script<EMAIL_ADDRESS><script<EMAIL_ADDRESS>```

## Option 2: Package Manager

```bash
npm install --save vue-tippy
yarn add vue-tippy
```

Then, import the vue-tippy:

```js
import Vue from "vue";
import VueTippy, { TippyComponent } from "vue-tippy";

Vue.use(VueTippy);
// or
Vue.use(VueTippy, {
  directive: "tippy", // => v-tippy
  flipDuration: 0,
  popperOptions: {
    modifiers: {
      preventOverflow: {
        enabled: false
      }
    }
  }
});

Vue.component("tippy", TippyComponent);
```

Add additional themes.

```js
import "tippy.js/themes/light.css";
import "tippy.js/themes/light-border.css";
import "tippy.js/themes/google.css";
import "tippy.js/themes/translucent.css";
```

You can access to tippy library like this:

```js
import { tippy } from "vue-tippy";
```

### TypeScript

You will need to import the ESM directly.

```js
import VueTippy from 'vue-tippy/dist/vue-tippy.esm';
```

repository: harrisjose/vue-tippy

repo_name: harrisjose/vue-tippy


text:
#Custom message factory

Shows how you can customize the response returned by OneTruError WCF.

You can look at the caught exceptions by logging into [OneTrueError](http://onetrueerror.com) with demo/demo.

repository: onetrueerror/Examples

repo_name: onetrueerror/Examples


text:
# FPL_FFC
Designing dashboard for up to date analytics on Fantasy Premier League and Fantasy Football Championship.

Angular + Flask template forked from: https://github.com/shea256/angular-flask

Includes RESTful API built with Flask on top of mongodb.

To Run:

1. Clone this repo

2. pip install -r requirements.txt (ideally using a virtualenv)

3. Execute python runserver.py

4. Open a browser and got to http://localhost:5000


text:
---
layout: post
title:  "RedDot Ruby Conf 2016"
date:   2016-07-23 19:47:41
categories: conf
---
I recently had a chance to attend RedDot Ruby in Singapore, and I have to say it was an amazing experience in my career. I had never attended a Ruby conf before, but I watched a lot of them online. Getting to meet such great people like Matz, and Aaron Patterson in person was like a dream come true.

If you are interested in the talks given at RedDot Ruby this year, you can check out [this great gist](https://gist.github.com/cheeaun/43843c8b1c764825b9f3d63ed8f5bd78) that has the videos of all the talks.

When I talked to Matz I thanked him for Ruby and the great community. He is a very down to earth type of guy and extremely friendly. He reminded me of a saying that rubyists have: `Matz is nice so we are nice`. That was the point I realised how accurate that is.

Same goes to Aaron, very friendly and nice, plus he has stickers of his cats (haha).

Since all the talks are available online I just want to briefly share about my favourite talks. I should mention that they can get a little bit technical.

First up was Matz’s. He talked about new things and improvements in future Ruby versions.

There are different kinds of typing, for example:

- Strong Dynamic (Ruby)
- Weak Dynamic (Perl, Haskel)
- Strong Dynamic (Hskell)
- Weak Dynamic (C)

There’s a design policy which is duck typing and it's very important in ruby.

In dock typing we:

- Do not classify
- Do not check types
- We just ask objects to behaves

Static Typing basically lacks flexibility. Some other programming languages offer gradual typing or optional typing, and they are fundamentally static. Ruby wants something that is similar to staic typing (powerful), but it should allow duck typing. For example, GO is a static typed language that allows duck typing. it is called structural subtyping.

Matz calls this soft typing for Ruby.  Soft Typing is a type system that is defined by behaviour. Behaviours are sets of methods (and argument types), thus inferred types don’t have names. However, this is still just a concept and a part of Ruby3 project.

Here is what Matz wants for Ruby3:

- Soft typing
- 3 times faster
- Real concurrency

He also talked about Ruby 2.4 and some of it’s changes are listed below:

**FixNum / BigNum Unification**

There will be no longer fixnum and bigness, just integers. There should not be so many compatibility issues, but if your program cares about the size of integers then you might have some issues.

**Smarter Conversions**

Some methods like upcase and downcase worked only for ASCII characters. With a lot of people using Unicode, Ruby now handles unicode case mappings. If you want to stick with ASCII you can do  `.upcase(:ascii) `.

That was it for Matz.

I am now going to cover Aaron’s talk which I really enjoyed. It is about Ruby GC algorithms in MRI. His talk stated as usual with some jokes, and he demonstrated different types of typing with his mechanical keyboard.

What is GC in high level?

You can think of objects as a tree and GC finds nodes in the tree that aren't referenced from the root anymore and then frees them up. It uses different algorithms to find nodes that are not referenced.

What types of collectors MRI has?

Here is a list:

**Mark & sweep**

Theres a Mark phase that starts from the root and marks all of the objects, then sweep phase frees everything that is not marked, and at the end we unmark them all.

![marksweep](http://deborah-digges.github.io/images/gc.png)

Pros:

- Very easy

Cons:

- Too slow
- Stops the world
- Visits all the objects everytime

**Generational**

To improve  the speed of Mark&Sweep it divides the objects into old and new gens. Good thing is that this does not visit the old objects everytime and only on full GC. Theres a _remembered list_ to keep track of interesting references such as when an old gen object points to a new gen. This is to avoid bad references.

![gen](http://patshaughnessy.net/assets/2013/10/30/ruby-gen5.png)

Pros:

- Faster

Cons:

- Not as easy:
- Stops the world

**Incremental**

To get around Stop the World there is Incremental GC. It uses Tri Color Marking:

- White: will be collected
- Black: No reference to white objects, but reachable from root
- Gray: Reachable from root, but not yet scanned.

![tricolor](http://adamansky.bitbucket.org/slides/gc/img/gc-tricolor.png)

The way it works is that:

- It picks an object from gray and and moves it to black.
- For each object that the object references, they get moved to black as well.
- Keep repeating this until gray is empty.

A big advantage is it can be interrupted at each step. Each step can be performed incrementally and halt time reduces. Although it has a similar problem with generational, and theres a _remembered list_ to avoid bad references.

In Ruby, GC:

- Is not parallel
- Is not real-time
- Is not compacting

Now as for allocation we have a heap that contains all of our objects. There are big chunks of memory that are called pages and each has a linked list (each page is 16k). They have slots which contains ruby objects (each object is 40bytes). when object is garbage collected it's taken out from the page.

As a problem there is poor reclamation in the process of GC. When we have a few pages and garbages get collected, objects won’t move to free up pages. We are basically left with some pages that have holes in them. This is one of the areas that Aaron is trying to improve.

As for the last part of the talk, here are some tools to use for inspections:

GC Inspection:

- GC::Profiler.enable
- GC:Profiler.report

Heap Inspection:

- ObjectSpace.dump_all
- ObjectSpace.dump

You can turn on tracing for objects. if you have problems finding where the object came from, you can use that:

- trace_object_allocations

That's it. I hope you enjoyed this post.


text:
### How to Complete this Quiz

1. Download the peach ice cream recipe site from the resources section or from [here](http://udacity.github.io/fend/lessons/L5/problem-set/07-making-peach-ice-cream/making-peach-ice-cream.zip).
2. Make your site look like the [final site](http://udacity.github.io/fend/lessons/L5/problem-set/07-making-peach-ice-cream/final.jpg). [The annotated version of the final site](http://udacity.github.io/fend/lessons/L5/problem-set/07-making-peach-ice-cream/final-annotated.jpg) is there to help you out.
2. Edit the site using your favorite text editor. You'll definitely need to add CSS. There are also a few `<div>`s that you might be able to turn into semantic elements. Experiment and see what what happens.
3. Turn on the [Udacity Feedback Chrome Extension](https://classroom.udacity.com/nanodegrees/nd001/parts/0011345403/modules/742847927175460/lessons/7323812069/concepts/73256617910923).
4. When all of the tests pass, you'll get a code. Copy and paste the code that appears into the next page to finish!

<br>

Good luck!

repository: Nashwa-Emad/fend

branch_name: refs/heads/gh-pages

repo_name: Nashwa-Emad/fend


text:
# PHP SDK For Spotify Web Api

requires php >= 7.2

- Integrated Pagination
- Automated Token Refresh
- Separate Services Files For All Api References
- Guzzle Requests

## Installation
composer require kirilkirkov/spotify-webapi-sdk

Example usage with code:

https://github.com/kirilkirkov/Spotify-WebApi-PHP-SDK/wiki/Example-Usage-with-Code

## Doesnt have token?

### Option 1 - Get access token with client credentials

```
use SpotifyWebAPI\SpotifyWebApi;

try {
    $spotifyWebApi = new SpotifyWebApi();
    $token_obj = $spotifyWebApi->getAccessTokenWithCredentials(
        'CLIENT_ID',
        'CLIENT_SECRET'
    );
    echo $token_obj->access_token;
    // echo $token_obj->token_type;
    // echo $token_obj->expires_in;
} catch(\SpotifyWebAPI\SpotifyWebAPIException $e) {
    echo $e->getMessage();
}
```

### Option 2 - Get access token with code authorization (recommended)
Before make requests you must add yours Redirect URIs to https://developer.spotify.com/dashboard

Get redirect url for code:
```
use SpotifyWebAPI\SpotifyWebApi;

try {
    $spotifyWebApi = new SpotifyWebApi([
        'clientId' => 'CLIENT_ID',
        'clientSecret' => 'CLIENT_SECRET',
    ]);

    $callBackUrl = 'http://yoursite.com/callback';
    $url = $spotifyWebApi->getUrlForCodeToken($callBackUrl);
    header("Location: {$url}");
} catch(\SpotifyWebAPI\SpotifyWebAPIException $e) {
    echo $e->getMessage();
}
```

After signup in spotify you will be redirected back to provided above callback url (http://yoursite.com/callback) with parameter **$_GET['code']** with the code that can get token with following command:
```
use SpotifyWebAPI\SpotifyWebApi;

try {
    $spotifyWebApi = new SpotifyWebApi();
    $tokens = $spotifyWebApi->getAccessTokenWithCode(
        'YOUR_CODE',
        'http://yoursite.com/callback'
    );
} catch(\SpotifyWebAPI\SpotifyWebAPIException $e) {
    echo $e->getMessage();
}
```

And you will receive array with *accessToken* and *refreshToken* in the example above **$tokens**.

### Access/Refresh Tokens
Spotify tokens are valid 1 hour. If your token is expired and you make a call, the sdk auto renew access token with provided refresh token in every query (as there is no safe place to automatically save it).

If you set $spotifyWebApi->returnNewTokenIfIsExpired(true); before your request calls, if access token is expired will be returned from the query, object with the new access_token, then you can save it in database and recall request with a fresh Access token.
You can also generate access token with refresh token manually with
```
use SpotifyWebAPI\SpotifyWebApi;

try {
    $spotifyWebApi = new SpotifyWebApi([
        'clientId' => 'CLIENT_ID',
        'clientSecret' => 'CLIENT_SECRET',
        'accessToken' => $oldAccessToken,
        'refreshToken' => 'REFRESH_TOKEN',
    ]);
    $result = $spotifyWebApi->refreshAccessToken();
} catch(\SpotifyWebAPI\SpotifyWebAPIException $e) {
    echo $e->getMessage();
}
```

and save final expire timestamp with  time() + $result->expires_in. You can manualy generate new access token every time when saved in your database expired time is end.

### Suggestions

It is good practise to add ip of the api that you call in the hosts file in yours server os because Guzzle sometime cannot resolve the dns.

Can increase your execution time of scripts
ini_set('max_execution_time', XXX); and set_time_limit(XXX);

### Functions
In the wiki of this repository you can find all functions available in this sdk (all the ones supported by Spotify have been integrated so far)
- https://github.com/kirilkirkov/Spotify-WebApi-PHP-SDK/wiki/Functions-and-examples
- https://github.com/kirilkirkov/Spotify-WebApi-PHP-SDK/wiki/Pagination Integrated Pagination Example

## Donate

If this project help you reduce time to develop, you can give me a cup of coffee to continue its development. Thank you! :)

[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=7U9TVUV3URTK6)

BTC Address: 3FmdTVWCApEcHT6wmrSCFkUSqaowsaqS9Y

repository: kirilkirkov/Spotify-WebApi-PHP-SDK

repo_name: kirilkirkov/Spotify-WebApi-PHP-SDK


text:
# Sample Java Code

A small repository for some sample Java code.  Currently, it has two sources:

* Some sample [Project Euler](https://projecteuler.net/) solutions I used to refresh my memory on Java syntax, and
* Some sample code from my AP Computer Science A class (CSC500) at [Phillips Academy](http://www.andover.edu/).


text:
# Usage

```coffeescript
Bus = require "choreobus"
bus = new Bus
  debug: true                       # Optional - log stuff into the console to debug event path
  logger: (msg) -> console.log msg  # Optional - where to log stuff
  rethrowExceptions: false          # Optional - rethrow exceptions to facilitate debugging (will stop further event
                                    # processing

subscriptionId = bus.subscribe "event name", (event) -> console.log event.parameter
bus.publish "event name", "Hurray!"
bus.unsubscribe "event name", subscriptionId

```

Publish function also supports a correlationId parameter so you can trace what your event path is.

```coffeescript

bus.subscribe "event 1", (event) ->
    console.log event.correlationId
    bus.publish "event 2", "Hurray!", event.correlationId

bus.subscribe "event 2", (event) ->
    console.log event.correlationId
```

Will log

```
1
1
```


text:
# github-notetaker
Following along w/egghead.io

A small app that returns a GitHub user profile and repo list, and allows users to add notes (using firebase)

## To Run:

`git clone`
`npm install`
`webpack -w`

Open the index.html in a browser, or serve using your preferred method.

repository: luketlancaster/github-notetaker

repo_name: luketlancaster/github-notetaker


text:
# Training GAN

In the previous tutorials, we have seen the 2 components in a generative adversarial network (GAN) – the [generator](https://github.com/jinglescode/generative-adversarial-networks/tree/main/tutorials/03%20Generator) and the [discriminator](https://github.com/jinglescode/generative-adversarial-networks/tree/main/tutorials/02%20Discriminator). In this tutorial, we will combine the generator and discriminator and start training the GAN.

First, we input a random noise to the generator, and the generator will produce some fake samples. These generated samples, together with real samples from the dataset, are input into the discriminator. The discriminator will try to classify whether if a sample is real or fake. This produces a probability that will be used in the binary cross-entropy loss function to compare against the true label (real or fake), and determine the error rate and backpropagate to update the discriminator's parameters.

```python
def get_discriminator_loss(generator, discriminator, criterion, real_samples, n_samples, dim_noise, device):
    '''
    Discriminator predict and get loss
    Parameters:
        generator:
            generator network
        discriminator:
            discriminator network
        criterion:
            loss function, likely `nn.BCEWithLogitsLoss()`
        real_samples:
            samples from training dataset
        n_samples: int
            number of samples to generate
        dim_noise: int
            dimension of noise vector
        device: string
            device, cpu or cuda
    Returns:
        discriminator_loss:
            loss scalar
    '''

    random_noise = get_noise(n_samples, dim_noise, device=device)
    generated_samples = generator(random_noise)
    discriminator_fake_pred = discriminator(generated_samples.detach())
    discriminator_fake_loss = criterion(discriminator_fake_pred, torch.zeros_like(discriminator_fake_pred))
    discriminator_real_pred = discriminator(real_samples)
    discriminator_real_loss = criterion(discriminator_real_pred, torch.ones_like(discriminator_real_pred))
    discriminator_loss = (discriminator_fake_loss + discriminator_real_loss) / 2

    return discriminator_loss
```

Then, let's train the generator. Again, we input the noise vector into the generator, and it generates some fake samples.  The discriminator makes a prediction that produces a probability of how fake these samples are. These probabilities are computed in the binary cross-entropy loss function to compare against the *real* label, because the generator scores when the discriminator classifies those generated samples as real. With the error rate, we will backpropagate and update the generator's parameters.

```python
def get_generator_loss(generator, discriminator, criterion, n_samples, dim_noise, device):
    '''
    Generator generates and get discriminator's loss
    Parameters:
        generator:
            generator network
        discriminator:
            discriminator network
        criterion:
            loss function, likely `nn.BCEWithLogitsLoss()`
        n_samples: int
            number of samples to generate
        dim_noise: int
            dimension of noise vector
        device: string
            device, cpu or cuda
    Returns:
        generator_loss:
            loss scalar
    '''

    random_noise = get_noise(n_samples, dim_noise, device=device)
    generated_samples = generator(random_noise)
    discriminator_fake_pred = discriminator(generated_samples)
    generator_loss = criterion(discriminator_fake_pred, torch.ones_like(discriminator_fake_pred))

    return generator_loss
```

In the training process, we alternate the training such that only one network is trained at any one time, alternating between generator and discriminator. Our goal is to ensure that both networks are of similar skills level. Thus both networks mustn't be updated at the same time. Otherwise, the discriminator will perform better than the generator; because it is much easier for the discriminator to learn to distinguish real and fake samples, than for the generator to learn to generate samples.

```python
for epoch in range(n_epochs):
    for real_samples, _ in tqdm(dataloader):
        batch_size = len(real_samples)

        real_samples = real_samples.view(batch_size, -1).to(device)

        # train discriminator
        discriminator_optim.zero_grad()
        discriminator_loss = get_discriminator_loss(generator_net, discriminator_net, criterion, real_samples, batch_size, dim_noise, device)
        discriminator_loss.backward(retain_graph=True)
        discriminator_optim.step()
        mean_discriminator_loss += discriminator_loss.item() / display_step

        # train generator
        generator_optim.zero_grad()
        generator_loss = get_generator_loss(generator_net, discriminator_net, criterion, batch_size, dim_noise, device)
        generator_loss.backward()
        generator_optim.step()
        mean_generator_loss += generator_loss.item() / display_step
```

**Why should both networks improve together and keep at similar skill levels?** If the discriminator outperforms the generator, all generated samples are classified as 100% fake, because a "100% fake" (probability `1` fake) loss function is not useful for a network to learn. Thus there is no opportunity to learn. A `0.7` probability of being fake is more informative for a network to update the parameters during backpropagation. (Extra: in a reinforcement learning context, the task is so difficult that no matter what the agent does, it fails before any rewards can be given.) Likewise, suppose the generator outperforms the discriminator. In that case, the prediction from the discriminator are all 100% real, the discriminator would not have a chance to learn to distinguish between real and fake samples.

## In summary

The goal of the discriminator is to minimize the loss from misclassification between real and fake samples. While the goal of the generator is to maximize the discriminator's probabilities of being `real`. During the training process, we alternate the training between the generator and discriminator to ensure that their skill level is similar.

## Notebook

This notebook contains code for training a generative adversarial network that learns to generate hand written digits.

[Open notebook on Colab](https://colab.research.google.com/github/jinglescode/generative-adversarial-networks/blob/main/tutorials/04%20Training%20GAN/Train%20Basic%20GAN.ipynb)

path: /tutorials/04 Training GAN/README.md


text:
# ShapeView

A lightweight library for creating basic shapes as views.

## Features

- Define shapes with a simple and concise XML specification.
- Access properties programmatically with Java.
- Supports the following shapes:
  - Equilateral Triangle
  - Square
  - Rectangle
  - Circle
  - Oval
  - and more to come!

## Installing

Currently, ShapeView is only available as a library project. Download the source code and import it as a library project in Eclipse. For more information on how to do this, read [here](http://developer.android.com/tools/projects/index.html#LibraryProjects).

## Usage

In the XML you plan on using ShapeView in, place the namespace attribute in one of the top level elements:

```xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_width="match_parent"
    xmlns:shapeview="http://schemas.android.com/apk/res-auto" > <!-- You need this>
    ...
```

Then, put a ShapeView in the XML:

```xml
    <com.whoshuu.shapeview.ShapeView
        android:id="@+id/svRectangle"
        android:layout_width="20dp"
        android:layout_height="40dp"
        shapeview:shape="rectangle"
        shapeview:color="#0F0"
        shapeview:style="stroke"
        shapeview:stroke_width="5dp" />
```

To access it in Java, first grab the `ShapeView` object:

```java
ShapeView svRectangle = (ShapeView) findViewById(R.id.svRectangle);
```

and change a property:

```java
svRectangle.setStyle(Style.FILL);
```

Modifying any of the properties will invalidate the shape and force Android to redraw it with the new property.

## Contributing

Please fork this repository and contribute back using [pull requests](https://github.com/whoshuu/ShapeView/pulls). Features can be requested using [issues](https://github.com/whoshuu/ShapeView/issues). All code, comments, and critiques are greatly appreciated.

repository: whoshuu/ShapeView

repo_name: whoshuu/ShapeView