text:
# Piping UI
[![Cloudflare Pages](https://github.com/nwtgck/piping-ui-web/actions/workflows/cloudflare-pages.yml/badge.svg)](https://github.com/nwtgck/piping-ui-web/actions/workflows/cloudflare-pages.yml) [![E2E testing](https://github.com/nwtgck/piping-ui-web/actions/workflows/e2e-test.yml/badge.svg)](https://github.com/nwtgck/piping-ui-web/actions/workflows/e2e-test.yml)

Web UI for [Piping Server](https://github.com/nwtgck/piping-server) - Easy and secure file transfer between every device over HTTPS
![Piping UI - iPhone to UI](doc_assets/iphone-to-ui.gif)

## Application

<https://piping-ui.org>

![Piping UI QR code](./doc_assets/piping-ui-qr.png)

## Features

- Download while uploading
- [Progressive Web Apps](https://developers.google.com/web/progressive-web-apps) (PWA)
- Dark theme
- English/Japanese
- Multi-file sending with zip
- Auto completes for server URLs and secret paths
- Image/video preview
- Passwordless [E2E encryption] by [Elliptic-curve Diffie–Hellman] and [OpenPGP.js]
- Password protection powered by [OpenPGP.js]
- Share Sheet support by Web Share Target API

## Self-hosting

You can build Piping UI by yourself like the following.

```console
$ git clone https://github.com/nwtgck/piping-ui-web.git
$ cd piping-ui-web
$ npm ci
$ npm run build
```

Then, you can publish `./dist`.
In addition, you can also use hosting services such as GitHub pages and Netlify.

### Change default Piping Server URLs at build-time

Set env `$PIPING_SERVER_URLS` to change default Piping Server URLs.

```console
$ PIPING_SERVER_URLS='["https://mypiping.server", "https://mypipi.ng"]' npm run build
```

![Build-time Piping Server URLs](doc_assets/build-time-piping-server-urls.png)

## Sitemap for telling about localized versions

Set env `$SITE_URL` to generate `sitemap.xml` for telling about localized versions. `robots.txt` has also `Sitemap: ...` section.
(see: <https://support.google.com/webmasters/answer/189077>)
(see: <https://developers.google.com/search/reference/robots_txt#google-supported-non-group-member-lines>)

```console
$ SITE_URL="https://mypiping.ui" npm run build
```

## Logo

Icons made by Freepik from www.flaticon.com

[E2E encryption]: https://en.wikipedia.org/wiki/End-to-end_encryption
[Elliptic-curve Diffie–Hellman]: https://en.wikipedia.org/wiki/Elliptic-curve_Diffie%E2%80%93Hellman
[OpenPGP.js]: https://github.com/openpgpjs/openpgpjs

repository: nwtgck/piping-ui-web

branch_name: refs/heads/develop

gha_language: Vue

repo_name: nwtgck/piping-ui-web


text:
---
title: "Fake news with wav2lip"
date: 2021-06-22 17:13:00
image: '/assets/img/posts/wav2lip_architecture.png'
description: 'Fake news with wav2lip'
main-class: 'funny'
tags:
- python
- deep fake
- speech to lip
categories:
twitter_text: 'Fake news with wav2lip'
introduction: 'Fake news with wav2lip'
---

[Wav2lip](https://arxiv.org/abs/2008.10010) is a lip-sync expert, that is all you need for speech to lip generation in the wild

We need a video and an audio, both files have to be exact same length. The audio we will extract from [a Vietnamese video](https://www.youtube.com/watch?v=ni2eRUZdJzc) (named `vi-news.mp4`) and the video we will download [an English video](https://www.youtube.com/watch?v=9LS4XCNyRKA) (named `en-news.mp4`). See [this guide](/en/posts/youtube-dl) to download these videos.

```bash
# Cutting the video and audio (14 seconds)
ffmpeg -i en-news.mp4 -ss 00:00:00.000 -to 00:00:14.000 -async 1 en-news-cut.mp4
ffmpeg -i vi-news.mp4 -ss 00:01:27.500 -to 00:01:41.500 -async 1 vi-news-cut.mp4

# Extract audio from vi-news-cut.mp4
ffmpeg -i vi-news-cut.mp4 -q:a 0 -map a vi-news-cut.mp3
```

Upload `en-news-cut.mp4` and `vi-news-cut.mp3` to [the wav2lip web demo](https://bhaasha.iiit.ac.in/lipsync/) and download the result video

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

### References

[Wav2Lip](https://github.com/Rudrabha/Wav2Lip)

license: MIT

repository: etrain-xyz/etrain

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: etrain-xyz/etrain


text:
# Grimorium Verum
> An infinite platform game about banishing demonic spirits.

![image](https://user-images.githubusercontent.com/2739245/92928704-19051a00-f405-11ea-8322-49c5a103a514.png)

## About the Game

### How to play
Use the ◀ and ▶ keys to run and the 🔼 key to jump. To banish the spirits, use the **spacebar**.

You must banish all of the spirits in the realm in order to continue to the next level.

The game ends when you get possessed by an evil spirit. This happens when the spirit touches you while you're not attacking.

If your score is among the top 10 your name will appear at the end of the game.

### Scenes
- **Main game**: The wizard appears in the demon-infested realm. Be careful not to get possessed!
- **Game Over**: The game ends when the wizard becomes possessed. You may record you highest score here.

### Built With

- Node JS
- Webpack
- Javascript ES6
- Babel
- Phaser
- Matter.js

## Live Demo

Check out the live demo [here](https://grimoriumverum.netlify.app/)

## Getting started

### Pre Requisites

- Install Node JS. ([NodeJS Documentation](https://nodejs.org/en/docs/))
- Install Webpack. ([Webpack Documentation](https://webpack.js.org/guides/installation/))

### Install

- Clone this repo with `git clone`.
- Enter the repo directory.
- Run `npm install` && `npm start` in your terminal.
- This will open **http://localhost:8080** on your browser.
- Banish those ghouls!

## Game Doc

### Hero

Use the ◀ and ▶ keys to run and the 🔼 key to jump. To banish the spirits, use the **spacebar**.

![image](https://user-images.githubusercontent.com/2739245/93560442-d0d78180-f947-11ea-824b-c251e4816c21.png)

### Demon

Jumps around a given area. If it touches you, you're possessed! Game over, Pal.

![image](https://user-images.githubusercontent.com/2739245/93560508-f6648b00-f947-11ea-850e-848202469501.png)

## Scenes

### Main Scene

Run and jumpr around banishing demons. Once you banish all the demons in the level, you pass on to the next level, where there will be more demons than before. The game only ends once you become possessed.

![image](https://user-images.githubusercontent.com/2739245/93560639-404d7100-f948-11ea-90b9-9de426ea3960.png)

### Game over

Once you lose, you can register your final socre with your name here.

![image](https://user-images.githubusercontent.com/2739245/93560747-74289680-f948-11ea-9731-46ca8e0f6dae.png)

### High scores

It contains the top players of the game.

![image](https://user-images.githubusercontent.com/2739245/93560823-9fab8100-f948-11ea-8707-04c26300322e.png)

## Future features
Bring to life more aspects of the Grimorium Verum:

Initially, the game was going to be about collecting magical items necesary for a demonic evocation, however, due to time constraints, it wasn't possible. The evocation would result on a demonic Boss appearing, which the wizard would have to defeat in order to bind it (as is detailed in the grimorium). In the present version, the game only serves to showcase what the game mechanics would look like in a finished version of the Grimorium Verum.

## Author

👤 **Oscar Mier**
- Github: [@voscarmv](https://github.com/voscarmv)
- Twitter: [@voscarmv](https://twitter.com/voscarmv)
- Linkedin: [Oscar Mier](https://www.linkedin.com/in/oscar-mier-072984196/)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the [issues page](../../issues/).

## Show your support

Give a ⭐ if you like this project!

## Acknowledgments

Sprite credits:
- [Wizard pack](https://luizmelo.itch.io/wizard-pack)
- [Demon pack (Gothicvania Patreon Collection)](https://ansimuz.itch.io/gothicvania-patreon-collection)
- [Platformer Fantasy Set 2](https://szadiart.itch.io/platformer-fantasy-set2)
- [Michael Hadley's excellent tutorial on Matter.js](https://itnext.io/modular-game-worlds-in-phaser-3-tilemaps-5-matter-physics-platformer-d14d1f614557)

## 📝 License

This project is [MIT](./LICENSE) licensed.

branch_name: refs/heads/master

gha_language: JavaScript

gha_license_id: MIT


text:
# Mac Essentials

**Mac OS X** tops the most used Desktop Operating System by developers in a [Stack Overflow 2016 Developer Survey](http://stackoverflow.com/research/developer-survey-2016). For the past decade and a half, Apple's operating system has been built on top of Unix, the command-line operating system (OS) that powers much of the world's filesystems and servers.

**Unix shell** is very important for a programmer because it lets you run programs in almost any language without a specialized IDE (Integrated Development Environment).

![Mac](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/apple.jpg)

You can run all main operating systems (like Windows and Linux) on a Mac through a virtual environment.

You also can use **XCode**, which is the software IDE we will be using to develop iOS applications in this course.

![XCode](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/xcode.png)

**Prerequisites:**

- [Mac OSX](http://www.apple.com/mac/): Your computer
- [XCode 8.0+](https://developer.apple.com/xcode/): iOS IDE
- [Genymotion](https://www.genymotion.com/): Android emulator
- A Text Editor: ie. [Atom](https://atom.io/) or [Sublime](https://www.sublimetext.com/)

**Lesson 1 Objectives:**

- Learn a brief history of the Macintosh
- Set up your Mac for development
- Learn to use the Command Line Interface (CLI)

**Mac's Long History:**

![Mac](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/mac.png)

- Steve Jobs learned of the advanced work on graphical user interfaces (GUI) at Xerox and arranged a deal to license their designs
- The FIRST Mac was introduced by Steve Jobs on Jan 10, 1984.
- In 2001, Apple introduced OS X (based on Darwin and NeXTSTEP)
- MacOS is a Unix operating system that borrows from FreeBSD, therefore many apps written for Linux or BSD run on it.

**Setting up:**

Follow the instructions [here](https://github.com/stanleycyang/perfect-mac-osx-setup/blob/master/README.md) to get your Mac ready for development.

**Command Line Interface:**

![Command Line Interface](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/terminal.png)

Command line interface is a way for us (users) to interact with the computer directly. Due to MacOSX's Unix heritage, much of the info here is also useful in other unix inspired systems, like the Linux command line.

**Opening the Command Line:**

You can simply open `Spotlight Search:`

```bash
Command ⌘ + Space bar
```

![Spotlight Search](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/spotlight.png)

Then, type in `Terminal` and press `enter`. Your command line is now open!

**Command Line Fundamentals:**

**Find out who the user is:**

```bash
$ whoami
```

![cd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/whoami.png)

**Find out what the present working directory is:**

```bash
$ pwd
```

![pwd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/pwd.png)

**Quickly change directories:**

```bash
$ cd ~/Desktop
```

![cd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/cd-initial.png)

The squiggle (~) denotes your user directory, for me it would be `/Users/stanley`

If you use:

```bash
$ cd /
```

![cd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/cd-slash.png)

You would end up at the root directory **/**

**To move up one directory**, you simply type:

```bash
$ cd ../
```

![cd up 1](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/cd-up.png)

**To move up two directories**, you would type:

```bash
$ cd ../../
```

![cd up 2](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/cd-up-2.png)

So on and so forth, if you choose to go many directories up!

**To list all the files in the current directory**, type:

```bash
$ ls
```

![pwd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/ls.png)

**To get more detailed info about the files**, you can use a -l flag:

```bash
$ ls -l
```

![pwd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/ls-detailed.png)

**To make directories, type:**

```bash
$ mkdir happy gilmore
```

![pwd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/mkdir.png)

Now you have two folders, one called `happy` and one called `gilmore`.

**To create file(s) in those folders**:

```bash
$ touch happy/stanleysayshi.txt gilmore/stanleysaysbye.txt
```

![pwd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/touch.png)

**To remove those files, run**:

```bash
$ rm -rf happy/ gilmore/
```

![pwd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/rimraf.png)

The `-rf` flag stands for recursive with force. Be careful! The files `will be permenantly deleted`.

Let's create a new file with the help of **redirection**:

```bash
$ echo "Hello World" >> Hello.txt
```

![pwd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/echo.png)

`Note:` The `>>` symbols append the content to the end of the file. The `>` symbol will overwrite the content with the new content.

**Now, let's use grep to search the file for some content**.

Knowing that we have "Hello" in the Hello.txt, let's run `grep` to search for it:

```bash
$ grep Hello Hello.txt
```

![pwd](https://raw.githubusercontent.com/stanleycyang/Newsby/master/docs/imgs/workshop/l1/grep.png)

There are a host of other cool and useful commands to learn. Here are some useful references to improve your skills before the next lesson:

- [Mac & Terminal Cheatsheet](https://github.com/0nn0/terminal-mac-cheatsheet)
- [OS X commands](http://ss64.com/osx/)

At the end of this lesson, you should have learned:

- A brief history of the Macintosh
- How to set up your Mac for development
- How to use the Command Line Interface (CLI)

View this lesson on [GitHub](https://github.com/stanleycyang/Newsby/blob/master/docs/get-started.md).

repository: stanleycyang/Newsby

gha_language: Objective-C

repo_name: stanleycyang/Newsby


text:
---
layout: model

# Privacy (Public or Private)
privacy: public

model_name: 'Gulf of Papua - uniform erodibility coefficient'
author:
  - 'Rhiannon Garrett'
# Software options include Badlands, Underworld or Coupled
software: 'Badlands' #
version:
  - 'Badlands 1.0'
# Provide a category from Depositional, Tectonic or Coupled
category: 'surface processes' #
subcategory: 'PNG'
# Image to display on the menu
thumbnail: 'https://www.earthbyte.org/BGH_Wordpress/wp-content/uploads/2019/08/Initial.png'
icon: 'globe'
# Animations to display
animation:
  mp4: 'https://www.earthbyte.org/BGH_Wordpress/wp-content/uploads/2019/09/GoP_35-0Ka-1.mp4'
  description: 'This model simulates the Late Quaternary landscape evolution of the Gulf of Papua, examining source-to-sink sediment transfer assuming a uniform erodibility coefficient. The simulation includes the surface uplift and subsidence history of the Gulf and uses present day precipitation rates. The simulation shows sediment delivered to the Gulf of Papua primarily by the Fly, Kikori and Purari Rivers and deposited in the western deep-sea basin, with shorter rivers draining the Papuan Peninsula contributing to sedimentation in the eastern Gulf. Sea level rise over the past 16 Kyr prevents the rivers draining the mainland from depositing directly into the deep-sea, with sediment becoming trapped on the submerged continental shelf.'
#Model setup
model_setup:
  url : 'https://www.earthbyte.org/BGH_Wordpress/wp-content/uploads/2019/08/Initial_setup.png'
  description: 'The initial setup approximates the paleotopography by subtracting the vertical movement field from the present day topography. The Lambeck et al. (2014) sea level curve is applied to the simulation for the past 35 kyr. A) The present day topography, B) the magnitude of surface uplift and subsidence over the past 35 kyr, C) the paleotopography at 35 Ka and D) present day precipitation rates.'
# Describe the conditions/parameters for the models in a table or image
conditions:
  url: 'https://www.earthbyte.org/BGH_Wordpress/wp-content/uploads/2019/08/Table.png'
  table:
  description: 'Uniform erodibility coefficient and diffprop values.'

# Give text for model results
result:
  url: 'https://www.earthbyte.org/BGH_Wordpress/wp-content/uploads/2019/08/ResultsW.jpg'
  description: 'Sediment accumulation in the marine environment for A) the start of the simulation at 35 Ka, B) the end of Marine Isotope Stage 3 (MIS3), C) the end of MIS2 and D) present day.'

# Give citation or DOI for paper
citation:

# Online pointer to your model (Git/Binder/FTP etc.)
model_url:

# Hashable search terms
keywords: ''

# Model location coordinates
location:
  title: Gulf of Papua - uniform erodibility coefficient
  image:
  url: https://members.atlas.bgh.org.au/gulf-of-papua/
  url_text: View Model
  latitude: -8.542148
  longitude: 144.366907

map: "true"
# Contact
contact:
---


text:
# Image similarity

Given an image, the goal of an image similarity model is to find
"similar" images. Just like in [image
classification](../image_classifier/README.md), deep learning
methods have been shown to give incredible results on this challenging
problem. However, unlike in image similarity, there isn't a need to
generate labeled images for model creation. This model is completely
unsupervised.

#### Creating the model

In this example, we use the [Caltech-101
dataset](http://www.vision.caltech.edu/Image_Datasets/Caltech101/)
which contains images objects belonging to 101 categories with about 40
to 800 images per category.[1](../datasets.md)

```python
import turicreate as tc

# Load images from the downloaded data
reference_data  = tc.image_analysis.load_images('./101_ObjectCategories')
reference_data = reference_data.add_row_number()

# Save the SFrame for future use
reference_data.save('./caltech-101.sframe')
```

We can explore the data interactively using:
```python
reference_data.explore()
```

Next, we create an **image similarity** model using the data (commonly
called **reference data**)
```python
model = tc.image_similarity.create(reference_data)
```

#### Querying the model

Once created, we can query the model to retrieve the ten closest images
in the original reference data (by setting the `k` parameter to `10`).
The result of the query method is an SFrame with four columns: query
label, reference label, distance, and rank of the reference point
among the query point's nearest neighbors.

_Note: You can pass in an image, or an SArray of images into the `model.query`_
_method. This image or array of images does **not** need to be a part of the_
_original dataset._

```python
query_results = model.query(reference_data[0:10], k=10)
query_results.head()
```
```no-highlight
+-------------+-----------------+---------------+------+
| query_label | reference_label |    distance   | rank |
+-------------+-----------------+---------------+------+
|      0      |        0        |      0.0      |  1   |
|      0      |       2557      | 18.3461090355 |  2   |
|      0      |       7000      | 18.3861360371 |  3   |
|      0      |       2664      |  18.655464356 |  4   |
|      0      |       1968      |  18.887705352 |  5   |
|      0      |       7764      | 19.0063301087 |  6   |
|      0      |       4296      | 19.0114573751 |  7   |
|      0      |       221       | 19.1188139256 |  8   |
|      0      |       1361      | 19.1415785143 |  9   |
|      0      |       1148      | 19.1690505999 |  10  |
+-------------+-----------------+---------------+------+
[100 rows x 4 columns]
```

Now, for a simple image like this (let's say the 10th image in the data).
```python
reference_data[9]['image'].show()
```
![Similar images](images/sample_image.jpg)
Note: the loading order of images is non-deterministic, so your 10th image
is likely something different but this isn't important for demonstration purposes.

The 10 most "similar" looking images are
```python
similar_rows = query_results[query_results['query_label'] == 9]['reference_label']
reference_data.filter_by(similar_rows, 'id').explore()
```

![Similar images](images/similar_images.png)

#### Similarity graph

In some cases, we want to find the most similar images in the reference
dataset for all images in the reference dataset. The similarity_graph
method returns an SGraph whose vertices are the row numbers of the reference
dataset and whose edges indicate a nearest neighbor match. Specifically,
the destination vertex of an edge is a nearest neighbor of the source
vertex. `similarity_graph` can also return results in the same form as the
query method if so desired.

```python
similarity_graph = model.similarity_graph(k=10)
similar_images = similarity_graph.edges
```
```no-highlight
+----------+----------+---------------+------+
| __src_id | __dst_id |    distance   | rank |
+----------+----------+---------------+------+
|   1145   |   3031   | 16.6532360195 |  1   |
|   1145   |   8627   | 16.7883178946 |  2   |
|   1145   |   8559   | 16.9748661517 |  3   |
|   1145   |   238    | 17.6599250835 |  10  |
|   1158   |   4523   | 17.0756179217 |  2   |
|   1161   |   7422   | 16.9777686727 |  2   |
|   1161   |   1203   | 17.1384324655 |  7   |
|   1180   |   6636   | 16.7749244209 |  9   |
|   1182   |   3276   | 16.8179663995 |  5   |
|   1182   |   7717   |  16.889624839 |  6   |
+----------+----------+---------------+------+
[91440 rows x 4 columns]
```

##### Saving the model

Once you have created a model, you can save it and load it back later for use.

```python
model.save('./caltech-101.model')
loaded_model = turicreate.load_model('./caltech-101.model')
```

#### Using GPUs

GPUs can make creating an image similarity model much faster. If you have
macOS 10.13 or higher, Turi Create will automatically use the GPU. If
your Linux machine has an NVIDIA GPU, you can setup Turi Create to use
the GPU, [see instructions](https://github.com/apple/turicreate/blob/master/LinuxGPU.md).

The `turicreate.config.set_num_gpus` function allows you to control if GPUs are used:
```python
# Use all GPUs (default)
turicreate.config.set_num_gpus(-1)

# Use only 1 GPU
turicreate.config.set_num_gpus(1)

# Use CPU
turicreate.config.set_num_gpus(0)
```

#### How it works

The key ideas in the image similarity model are similar to those in
[image classifier](../image_classifier/how-it-works.md). When you run
the Turi Create image classifier, it breaks things down into something
like this:

* **Stage 1**: Uses a pre-trained CNN classifier on a large, general
  dataset. A good example is ImageNet, with 1000 categories and 1.2
million images.

* **Stage 2**: The outputs of each layer in the CNN can be viewed as a
  meaningful vector representation of each image. Extract these feature
vectors from the layer prior to the output layer on each image of your
task.

* **Stage 3**: Create a [nearest
  neighbors](../nearest_neighbors/nearest_neighbors.md) model with those
feature vectors as input.

#### References

- [1] L. Fei-Fei, R. Fergus and P.  Perona. One-Shot learning of object
categories. IEEE Trans. Pattern Recognition and Machine Intelligence.

repository: Sitispeaks/turicreate

repo_name: Sitispeaks/turicreate


text:
quickstarts: Various quickstarts to demonstrate Fuse
======================================================
Author: Fuse Team
Level: Beginner
Technologies: Camel, CXF, REST, SOAP
Summary: These quickstarts demonstrate a variety of ways to get started with Fuse and many of it's technologies
Target Product: Fuse
Source: <https://github.com/jboss-fuse/quickstarts>

Various quickstart projects for getting you started with JBoss Fuse

* [beginner](beginner) - a set of beginner quickstarts. We recommend that new JBoss Fuse users try these first.
* [camel.amq](camel-amq) - demonstrates using Apache Camel to send and receive messages to an Apache ActiveMQ message broker, using the Camel [amq](http://fabric8.io/gitbook/camelEndpointAmq.html) component.
* [camel.box](camel-box) -  shows how to use Apache Camel, and its OSGi integration to use the OSGi config admin and upload files to Box.com.
* [camel.linkedin](camel-linkedin) - shows how to use Apache Camel, and its OSGi integration to use the OSGi config admin and poll connections from LinkedIn.
* [camel.odata](camel-odata) - shows how to use Apache Camel, and its OSGi integration to use the OSGi config admin and create records in JDV.
* [camel.salesforce](camel-salesforce) - shows how to use Apache Camel, and its OSGi integration to use the OSGi config admin and create/update records in Salesforce.
* [camel.sap](camel-sap) - shows how to use the SAP Camel Component and demonstrates several basic processes.
* [cxf](cxf) - contains various quickstart projects using [Apache CXF](http://cxf.apache.org) for web services and REST.
* [custom](custom) - shows how to build a custom assembly starting from the JBoss Fuse full kit

repository: dynatechdev/fuse

repo_name: dynatechdev/fuse


text:
# Tools

Here's a rough list of the things I use to make bread. **Note: None of these links are affiliate links**. I'm not making any money off this, just providing links for convenience.

## Tubs

I really like plastic tubs for bread making.

- [2 quart round](https://breadtopia.com/store/dough-rising-and-storage-bucket-2-quart/) - For keeping my starter in and making my leaven
- [8 quart rectangle flat](https://www.webstaurantstore.com/cambro-26cw135-camwear-1-2-size-clear-food-pan-6-deep/21426CWCL.html?utm_source=Google&utm_medium=cpc&utm_campaign=GoogleShopping&gclid=EAIaIQobChMIieCz89ms4AIVlcJkCh1paQHIEAQYBSABEgL_r_D_BwE) - For the bulk phase
- [12 quart round](https://www.webstaurantstore.com/cambro-rfs12pp190-12-qt-translucent-round-storage-container/214RFS12PP.html) - For keeping my starter food in

## Mixer

I use a [Kitchen Aid](https://www.williams-sonoma.com/products/kitchenaid-pro-line-stand-mixer-7-quart/?catalogId=60&sku=1564509&cm_ven=PLA&cm_cat=Google&cm_pla=Electrics%20%3E%20Mixers%20%26%20Attachments%20%3E%20Stand%20Mixers&cm_ite=1564509&gclid=EAIaIQobChMIldOwjtqs4AIVsR-tBh1_ugqfEAQYAiABEgIqO_D_BwE) 7qt Pro with the bread hook for mixing, but you can mix the bread in the plastic bulking tub by hand with [dough scrapers](https://breadtopia.com/store/dr-oetker-dough-scraper/) or with your hands (that's how [Ken Forkish](#books) recommends, but not what I do).

## Proofing baskets

[Round 8.5in baskets](https://breadtopia.com/store/bread-proofing-basket/) - I use round ones because I make boules. I think they're easier to shape and fit in a normal round dutch oven best

## Dutch Oven

[6-7qt Dutch Oven](https://shop.lodgemfg.com/dutch-ovens-and-casseroles/6-qt-dutch-ovens.asp) - I bake in a Lodge dutch oven. It keeps the steam and heat in and creates a very nice crust. Make sure you get one where the lit has a metal handle, otherwise it will melt.

 Lint free is super important.

## Bread peel

[Bread peel](https://breadtopia.com/store/cherry-pizza-peel/) - Some people turn their bread out of the proofing baskets directly into their dutch ovens and score it inside the dutch oven. I turn my onto a peel and score it there, then transfer it by hand to the dutch oven. I do this because I'm scared shitless out of burning my arm on the dutch oven while scoring the dough.

## Bench Knife

[Bench Knife](https://breadtopia.com/store/lamsonsharp-bench-knife/) - This isn't the exact bench knife that I use, but that's not important. Find one that is comfortable for you to hold. This is used for dividing and shaping the dough.

## Books

- [Flour Water Salt Yeast](https://www.amazon.com/Flour-Water-Salt-Yeast-Fundamentals/dp/160774273X/ref=sr_1_1?keywords=flour+water+salt+yeast&qid=1549643780&s=Books&sr=1-1) - Fantastic and practical book about making artisan bread at home. Everyone who wants to get into bread making should start here.
- [Tartine Bread](https://www.amazon.com/Tartine-Bread-Chad-Robertson/dp/0811870413/ref=sr_1_1_sspa?s=books&ie=UTF8&qid=1536611333&sr=1-1-spons&keywords=tartine+bread&psc=1) - This is a much more academic take at bread making than Flour Water Salt Yeast, but has some really in depth and fantastic information. As a cook book, its fairly awful. But its a great resource once you don't need the step-by-step anymore. It also has some fantastic recipes in it.
- [Dough](https://www.amazon.com/Dough-Simple-Contemporary-Richard-Bertinet/dp/1909487538/ref=sr_1_1?keywords=dough+by+richard&qid=1549649402&s=Books&sr=1-1) - This book has some interesting recipes, but uses a totally different method. In my opinion, it isn't well suited to home baking. The crust and crumb aren't well developed, and the flavors for the basic whites aren't there. In my personal recipe section, I've adapted many of his flavors for use with FWSY and Tartine methods and had pretty good results.

repository: jaredonline/bread-making

repo_name: jaredonline/bread-making


text:
---
layout: post
title:      "Application Controllers"
date:       2018-07-30 04:10:22 +0000
permalink:  application_controllers
---

Up until now, while there have been many challenges in my coding journey, in terms of learning, moving into the concept of the Application Controller, by far has been the most daunting.

Previously, concepts and actions seemed fairly linear and straight forward to me.  Even when learning about SQL, even with all the various Interrelations, it still seemed straight forward.  I think that while obviously figuring out the specifics of the Interrelations could be challenging, the concept was still simple to understand - even though the problems were challenging to solve.

Hopefully that explanation makes sense.

Moving into Application Controllers, it's as if we took those challenging problems and interrelations, and applied them not just to tables, but to everything.

WIth that said, as I continue to work on various problems, and figure out the solutions needed to solve them, everything becomes a bit clearer.

I think part of the key to understanding is to really take a step back and clearly define how the application needs to work.  What aspects of the application need to tie together, what they need to output, where they need to direct you to, etc.

Before this, it was simply learning how to speak in Ruby.

Now, it's how to speak in Ruby, and how to really allow the program to speak to itelf, and all of its components in Ruby.

I remember started my coding journey with the basics of "Hello World!"

And here I am, learning the framework/concepts that allow for the complexities of Applications to work.

It's moments like these, where I can take a step back and really appreciate just how far I have come thus far.

extension: markdown


text:
bratutils
=========
[![CircleCI](https://circleci.com/gh/savkov/bratutils.svg?style=svg&circle-token=9a7bdcb066c87c45017fe2214c71f2e2f9672c94)](https://circleci.com/gh/savkov/bratutils)
[![Maintainability](https://api.codeclimate.com/v1/badges/4c8fccbe0c29026c90bd/maintainability)](https://codeclimate.com/github/savkov/bratutils/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/4c8fccbe0c29026c90bd/test_coverage)](https://codeclimate.com/github/savkov/bratutils/test_coverage)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A collection of utilities for manipulating data and calculating inter-annotator
agreement in brat annotation files.

### Installation

Install as a normal package from the source directory.

```bash
$ pip install bratutils
```

### Agreement Definition

Agreement in multi-token annotations is commonly evaluated using [f-score][fsc].
due to various problems with computing the traditional [Krippendorf's alpha][al]
and [Cohen's kappa][ka]. [Hripcsak][hripcsak] prove the validity of the metric
for very large populations, i.e. for unrestricted text annotations.

This library roughly follows the definitions of precision and recall calculation
from the [MUC-7 test scoring][muc]. The basic definitions along with some
additional restrictions are laid out below:

* `CORRECT` - when annotation tags and indices match completely
* `INCORRECT` - when annotation tags do not match, but the indices coincide
* `PARTIAL` - when the annotation tags are the same but one of the annotations
has the same end index and a different start index
* `MISSING` - annotations exising only in the gold standard annotation set
* `SPURIOUS` - annotations existing only in the candidate annotation set

_Note_: the gold standard is considered the collections/document from which the
 comparison is invoked, while the supplied parallel annotation is considered
 the candidate set.

_*Disclaimer:*_ the current definition of the `PARTIAL` category accomodates
working with syntactic chunks. A different arrangement (e.g. pick largest
contained tag as partial match instead of rightmost) might be more suitable for
other tasks, for example some types of semantic annotation.

### Examples

Simple example:

```python
from bratutils import agreement as a

doc = a.Document('res/samples/A/data-sample-1.ann')
doc2 = a.Document('res/samples/B/data-sample-1.ann')

doc.make_gold()
statistics = doc2.compare_to_gold(doc)

print(statistics)
```

Output:

```shell
-------------------MUC-Table--------------------
------------------------------------------------
pos:135
act:134
cor:115
par:5
inc:4
mis:11
spu:10
------------------------------------------------
pre:0.858208955224
rec:0.851851851852
fsc:0.855018587361
------------------------------------------------
und:0.0814814814815
ovg:0.0746268656716
sub:0.0725806451613
------------------------------------------------
bor:119
ibo:15
------------------------------------------------
------------------------------------------------
```

[fsc]: <https://en.wikipedia.org/wiki/F1_score>
[al]: <https://en.wikipedia.org/wiki/Krippendorff%27s_alpha>
[ka]: <https://en.wikipedia.org/wiki/Cohen%27s_kappa>
[hripcsak]: <http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1090460/>
[muc]: <https://aclweb.org/anthology/M/M98/M98-1024.pdf>

repository: jeanphilippegoldman/bratutils

repo_name: jeanphilippegoldman/bratutils


text:
# Questionnaire Tree
_This project comes from the split of the original [exploreAT-collectionexplorer](https://github.com/acdh-oeaw/exploreAT-collectionexplorer) of [Alex Benito](https://github.com/ale0xb)_

Dynamic tree generation of Questionnaire hierarchies based on the content matching searches. This prototype provides an overview of questionnaires and related questions.
Users can filter by questionnaire, question or lemma.

![Prototye screenshot](img/prototype.png "Prototype screenshot")

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Installing

Dependencies are been migrated from [API](https://github.com/acdh-oeaw/exploreAT-collectionexplorer-api). Therefore yarn or npm may be used for installing
the dependencies.

As indicated in **Bower** official site, it is recommended not to use it to manage the dependencies.

```
yarn
```
or
```
npm install
```

You can use any static server of your choice to serve the files for the webpage.
Additionally, [webpack](http://www.dropwizard.io/1.0.2/docs/) may be used for compiling the source code
and package it into a few files (friendlier with download speed for the webpage).

**This prototype needs for an ElasticSearch database**

## Authors

* [Alex Benito](https://github.com/ale0xb) - *Implementation of the prototype*
* [Alejandro Rodríguez](https://github.com/Janchorizo) - *Project split and migration to newer package managers*

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

repository: acdh-oeaw/exploreAT-questionnaire-tree

repo_name: acdh-oeaw/exploreAT-questionnaire-tree


text:
# **Data Analysis and Visualization with Python**

This repository contains data analysis and visualization projects in python.

## **Table of Contents**

- **[FIFA 19 Player Data Visualization](https://github.com/pb111/Data-Analysis-and-Visualization-with-Python/blob/master/fifa_19_player_data_visualization.ipynb)**

- **[Matplotlib Basics](https://github.com/pb111/Data-Analysis-and-Visualization-with-Python/blob/master/Matplotlib_Basics.ipynb)**

- **[Seaborn Basics](https://github.com/pb111/Data-Analysis-and-Visualization-with-Python/blob/master/Seaborn%20basics.ipynb)**

- **[Plotly Basics](https://github.com/pb111/Data-Analysis-and-Visualization-with-Python/blob/master/Plotly%20basics.ipynb)**


text:
# ETAdCycleView
An auto cycle or loop UIScrollview for horizonal advertisement or banner！一个自动无限循环轮播广告图

## Usage
---------
## Installation

ETAdCycleView is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "ETAdCycleView"
```
### Run Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.

### Quick Start
* In your podfile, just add `pod 'ETAdCycleView`, then `pod update`.
* Write api code to run a networking call:

* Use frame create
```
cycleScrollView = ETAdCycleView(frame: CGRect(x: 0, y: 30, width: view.size_width, height: 100))
view.addSubview(cycleScrollView)

let adImages = ["https://raw.githubusercontent.com/onevcat/Kingfisher/master/images/logo.png"
,
"http://tb1.bdstatic.com/tb/cms/frs/bg/default_head20141014.jpg",
"https://www.baidu.com/img/bd_logo1.png",
""]
cycleScrollView.et_setCycleImagesWithURLs(adImages, placeHolder: UIImage(named: "u86"))
```

* Use xib or storyboard create
```
let adCycleImages = ["https://raw.githubusercontent.com/onevcat/Kingfisher/master/images/logo.png"
,
"http://tb1.bdstatic.com/tb/cms/frs/bg/default_head20141014.jpg",
"https://www.baidu.com/img/bd_logo1.png",
""]
ibCycleView.et_setCycleImagesWithURLs(adCycleImages, placeHolder: UIImage(named: "u86"))
```

* Click image delegate
```
cycleScrollView.delegate = self
```
* Delegate
```
func et_cycleView(didClickPage pageView: UIImageView, atIndex index: Int) {
print("\(index)")
}
```
## License

ETAdCycleView is available under the MIT license. See the LICENSE file for more info.

repository: VolleyZ/ETAdCycleView

repo_name: VolleyZ/ETAdCycleView


text:
# SPD 1.5 - Engineering Careers: Management and Leadership

## Course Description

This course focuses on engineering careers, particularly on leadership: coaching, leading people and organizations. Students will also focus on solving coding challenges and preparing for technical interviews. Students who perform well in this class will have the option to become peer coaches for incoming students at the start of the new school year.

### Why you should know this

The material you learn here will continue to prepare you for crushing technical interviews, and how to start the path of becoming a leader in your environment.

## Prerequisites:

- [SPD 1.4](https://github.com/Make-School-Courses/SPD-1.4)

## Learning Outcomes

By the end of the course, you will be able to ...

1. Empower peers through building trust and utilizing effective coaching practices
1. Lead teams through using a variety of product management and communication best practices
1. Develop the skillsets and confidence of teammates using the science of learning
1. Become more comfortable with online, live-coding interview tools and take home coding projects.
1. Demonstrate using various strategies to answer behavioral interview questions to highlight your specific story, skill set, and talents.

## Schedule

**NOTE:** Due to the shorter summer sessions, for some class sessions you will see multiple topics covered. This schedule compression is to ensure that we cover the same material that we normally would in non-summer terms.

**Course Dates:** Monday, July 8 – Wednesday, August 14, 2019 (6 weeks)

**Class Times:** Tues and Thurs at 9:30–12:15am (12 class sessions)

| Class |          Date          |                 Topics                  |
|:-----:|:----------------------:|:---------------------------------------:|
|  1 |  Tues, June 2                      | Brainstorming & [Coderpad Interviews & Take Home Projects] |
|  2 |  Thurs, June 4                         | [PMs & Communication] |
|  3 |  Tues, June 9                     |  [Science of Learning & Pair Programming] |
|  4 |  Thurs, June 11                        | [Building Trust] |
|  5 |  Tues, June 16                     | [Leadership Models & Warm Demander] |
|  6 |  Thurs, June 18                        | [Strategies for Behavioral Interviewing: Attunement] |
|  7 |  Tues, June 21                     | Lab Day |
|  8 |  Thurs, June 25                        | [Strategies for Behavioral Interviewing: Situational Awareness] |
| 9 |  Tues, June 23                        | Lab Day |
| 10 |  Thurs, July 2                           | Behavioral Interview Drilling in Groups of 4 |
| 11 |  Tues, July 7                        | Pitch Deck/YCombinator Application/Blog Post|
| 12 |  Thurs, July 9                        | Final Pitches |

[Building Trust]: https://docs.google.com/presentation/d/1yhri9SnNGcBZpaaALLVddFwLIfthsiJ8Uw8HBzcjJa4/edit?usp=sharing

[Framing Behavioral Interviewing]: https://docs.google.com/presentation/d/1UzYmvtyJP7VrHkuAU7WcTt5LLEZ2CyofHw_in-h7kBk/edit#slide=id.g5c2e78bb1f_0_84

[Leadership Models & Warm Demander]: https://docs.google.com/presentation/d/1Xs43CIsX56hMN3BBVR88zzaCvMqNT1mpFv_gH6z7_Wc/edit?usp=sharing

[Strategies for Behavioral Interviewing: Situational Awareness]: https://docs.google.com/presentation/d/19mtsJUPtsVaz834himqbiOZYXMTU_A2qJnqDX0GD6XA/edit#slide=id.g5c2e78bb1f_0_76

[Science of Learning & Pair Programming]: https://docs.google.com/presentation/d/1nZnYIpEcNhNN71E122PnnVF-s3D85Fa9J1XU_7x0yE4/edit?usp=sharing

[Strategies for Behavioral Interviewing: Attunement]: https://docs.google.com/presentation/d/1ur2Wp1p2lWnFQfZ1QYGMDXP-87izAul7JnCvVO7lhZI/edit#slide=id.g5c303e9ba7_0_90

[Coaching Issues & Interventions]: https://docs.google.com/presentation/d/1SnOp0hG7pYvXqC0GDRaG4zatvfpcF1_RFjjhbjJIipE/edit?usp=sharing

[Coderpad Interviews & Take Home Projects]: https://docs.google.com/presentation/d/13bdEEG7omU_p4mql9h6-AXOsuD4c_HlMBscucgrdUSs/edit

[PMs & Communication]: https://docs.google.com/presentation/d/1A8gEFcWZoGYUUiSBDctwr1T9SS2BFUcpJ7MlrHthSuo/edit?usp=sharing

[Final White Board Coding]: Lessons/Lesson11.md

## Class Assignments

### Take Home Coding Project

**Due: Tues June 9th**

A common interview practice is to assign a take home project for the interviee to complete. You're typically given a prompt or spec to follow, and a deliverable date or timeline. Through this assignment, our goal is to give you practice with a take home project with the same conditions you'd find in a real interview scenario.

[Here are the requirements](https://docs.google.com/document/d/1F3LByW-A1pSpviBL4g3u9VMVuoUjxi1dUmOC_Sczg2U/edit) for the take home interview project (July 31st).

### Final Project (will be assigned later)
Complete one of the following three:
- Complete the Y Combinator Application (1000 words min)
- Complete a pitch deck (10 slides)
- Complete a blog post explaining your project, motivation, challenges, and how you overcame them.

**Evaluation:**
Using the Presentation Rubric or the Writing/Blog Post Rubric

### Final Product (will be assigned soon)
Build your best product yet! We'll treat this semester as a simulation of Y Combinator.

Choose one option:
- Team product up to 4 people
- Solo

**Evaluation:**
Using the Portfolio Product Rubric for the respective track

### Quiz 1: PMs & Communications

**Quiz will take place on June 11th**

There will be a quiz on PMs & Communication. Expect there to be a mixture of multiple choice and free response questions.

Quiz link will be distributed on the day of.

### Quiz 2: Leadership Models & Warm Demander

**Quiz will take place on June 25th**

There will be a quiz on Leadership Models & Warm Demander. Expect there to be a mixture of multiple choice and free response questions.

Quiz link will be distributed on the day of.

### Answering Behavioral Interview Questions (OPTIONAL!)

**3 answers due: Wed, July 17**

**5 additional answers due: Wed, July 24**

As you go through the interview process, you will encounter the same (or similar) behavioral interview questions in most interviews you take. It's good to have answers to common questions primed and ready to go so you can have examples and stories to share at hand that highlight your skillset and talents.

**Answer questions from [this list of behavioral interview questions](./Assignments/common-bi-questions.md) and link to your answers in the course tracker**

**Submission:**

1. Schedule time with a peer to do a pair programming session
1. Follow [this agenda](https://docs.google.com/document/d/19FI_MGJ2SEWioMMQSnbXi7ygipV3iUGBpSfypxShtkQ/edit?usp=sharing) during your session
1. Have your partner fill out this form to evaluate your efforts: [http://make.sc/pair-programming-form](http://make.sc/pair-programming-form)

**Evaluation:**

To pass the pair programming assignments, you must do the following:

1. Ensure that your partner logs your two pair programming sessions via the evaluation form: [http://make.sc/pair-programming-form](http://make.sc/pair-programming-form)
1. You utilize at least 2/3 of the senior skills outlined in the [pair programming agenda](https://docs.google.com/document/d/19FI_MGJ2SEWioMMQSnbXi7ygipV3iUGBpSfypxShtkQ/edit?usp=sharing)

**Evaluation:**

- Must score above a 2 on the [writing rubric](https://docs.google.com/document/d/1T1oqHFoRo0kl7mPUTFupmsoEkLYltKsVgtqyGKDaCgY/edit) to pass
- Must include 2-3 of the components listed above to pass

## Evaluation
To pass this course you must meet the following requirements:

- Complete all required assignments
- Pass all projects according to the associated project rubric
- Pass the final summative assessment according to the rubric as specified in this class
    - This will be further explained in the [study guide](ADD_STUDY_GUIDE_LNK)
- Actively participate in class and abide by the attendance policy
- Make up all classwork from all absences

## Make School Course Policies

- [Program Learning Outcomes](https://make.sc/program-learning-outcomes)
- [Grading System](https://make.sc/grading-system)
- [Diversity and Inclusion Statement](https://make.sc/diversity-and-inclusion-statement)
- [Academic Honesty](https://make.sc/academic-honesty-policy)
- [Attendance Policy](https://make.sc/attendance-policy)
- [Course Credit Policy](https://make.sc/course-credit-policy)
- [Disability Services (Academic Accommodations)](https://make.sc/disability-services)
- [Student Handbook](https://make.sc/student-handbook)


text:
# iswindow

Checks whether value is a window object.

###### *Support*

IE8+ is the target. But making it work in IE8 also makes it work in IE6+, so this basically works everywhere, even old Safaris.

## Installation

```
component install darsain/iswindow
```

## Example

```js
var isWindow = require('iswindow');

isWindow(window);       // true
isWindow(anythingElse); // false
```

## Not bulletproof

Uses duck typing and double equals when comparing window objects, which is necessary for this to work in IE8.

Double equals are necessary because in IE8:

```js
window.window === window;                // false
window.document.parentWindow === window; // false
window.window == window;                 // true
window.document.parentWindow == window;  // true
window === window;                       // true
window == window;                        // true
```

If someone knows why this is happening in IE8, or has a better or more robust method to test for window in IE8+, **please** let me know in issues.

Hell, we can't even do `typeof window.setTimeout === 'function'`, because in IE8 global functions are `'object'`.

That being said, you'd need this to cause a false positive:

```js
var notWin = {};
notWin.window = notWin;
notWin.setTimeout = 'truthy';
notWin.alert = 'truthy';
notWin.document = {};
notWin.document.defaultView = notWin;

isWindow(notWin); // true
```

## License

MIT

repository: darsain/iswindow

repo_name: darsain/iswindow


text:
# Appendix A: VDSM and Hooks

## VDSM

The VDSM service is used by the Red Hat Virtualization Manager to manage Red Hat Virtualization Hosts (RHVH) and Red Hat Enterprise Linux hosts. VDSM manages and monitors the host's storage, memory and network resources. It also co-ordinates virtual machine creation, statistics gathering, log collection and other host administration tasks. VDSM is run as a daemon on each host managed by Red Hat Virtualization Manager. It answers XML-RPC calls from clients. The Red Hat Virtualization Manager functions as a VDSM client.

## VDSM Hooks

VDSM is extensible via hooks. Hooks are scripts executed on the host when key events occur. When a supported event occurs VDSM runs any executable hook scripts in `/usr/libexec/vdsm/hooks/nn_event-name/` on the host in alphanumeric order. By convention each hook script is assigned a two digit number, included at the front of the file name, to ensure that the order in which the scripts will be run in is clear. You are able to create hook scripts in any programming language, Python will however be used for the examples contained in this chapter.

Note that all scripts defined on the host for the event are executed. If you require that a given hook is only executed for a subset of the virtual machines which run on the host then you must ensure that the hook script itself handles this requirement by evaluating the **Custom Properties** associated with the virtual machine.

**Warning:** VDSM hooks can interfere with the operation of Red Hat Virtualization. A bug in a VDSM hook has the potential to cause virtual machine crashes and loss of data. VDSM hooks should be implemented with caution and tested rigorously. The Hooks API is new and subject to significant change in the future.

## Extending VDSM with Hooks

This chapter describes how to extend VDSM with event-driven hooks. Extending VDSM with hooks is an experimental technology, and this chapter is intended for experienced developers. By setting custom properties on virtual machines it is possible to pass additional parameters, specific to a given virtual machine, to the hook scripts.

## Supported VDSM Events

**Supported VDSM Events**

| Name | Description |
|-
| before_vm_start | Before virtual machine starts. |
| after_vm_start | After virtual machine starts. |
| before_vm_cont | Before virtual machine continues. |
| after_vm_cont | After virtual machine continues. |
| before_vm_pause | Before virtual machine pauses. |
| after_vm_pause | After virtual machine pauses. |
| before_vm_hibernate | Before virtual machine hibernates. |
| after_vm_hibernate | After virtual machine hibernates. |
| before_vm_dehibernate | Before virtual machine dehibernates. |
| after_vm_dehibernate | After virtual machine dehibernates. |
| before_vm_migrate_source | Before virtual machine migration, run on the source host from which the migration is occurring. |
| after_vm_migrate_source | After virtual machine migration, run on the source host from which the migration is occurring. |
| before_vm_migrate_destination | Before virtual machine migration, run on the destination host to which the migration is occurring. |
| after_vm_migrate_destination | After virtual machine migration, run on the destination host to which the migration is occurring. |
| after_vm_destroy | After virtual machine destruction. |
| before_vdsm_start | Before VDSM is started on the host. `before_vdsm_start` hooks are executed as the user root, and do not inherit the environment of the VDSM process. |
| after_vdsm_stop | After VDSM is stopped on the host. `after_vdsm_stop` hooks are executed as the user root, and do not inherit the environment of the VDSM process. |
| before_nic_hotplug | Before the NIC is hot plugged into the virtual machine. |
| after_nic_hotplug | After the NIC is hot plugged into the virtual machine. |
| before_nic_hotunplug | Before the NIC is hot unplugged from the virtual machine |
| after_nic_hotunplug | After the NIC is hot unplugged from the virtual machine. |
| after_nic_hotplug_fail | After hot plugging the NIC to the virtual machine fails. |
| after_nic_hotunplug_fail | After hot unplugging the NIC from the virtual machine fails. |
| before_disk_hotplug | Before the disk is hot plugged into the virtual machine. |
| after_disk_hotplug | After the disk is hot plugged into the virtual machine. |
| before_disk_hotunplug | Before the disk is hot unplugged from the virtual machine |
| after_disk_hotunplug | After the disk is hot unplugged from the virtual machine. |
| after_disk_hotplug_fail | After hot plugging the disk to the virtual machine fails. |
| after_disk_hotunplug_fail | After hot unplugging the disk from the virtual machine fails. |
| before_device_create | Before creating a device that supports custom properties. |
| after_device_create | After creating a device that supports custom properties. |
| before_update_device | Before updating a device that supports custom properties. |
| after_update_device | After updating a device that supports custom properties. |
| before_device_destroy | Before destroying a device that supports custom properties. |
| after_device_destroy | After destroying a device that supports custom properties. |
| before_device_migrate_destination | Before device migration, run on the destination host to which the migration is occurring. |
| after_device_migrate_destination | After device migration, run on the destination host to which the migration is occurring. |
| before_device_migrate_source | Before device migration, run on the source host from which the migration is occurring. |
| after_device_migrate_source | After device migration, run on the source host from which the migration is occurring. |

## The VDSM Hook Environment

Most hook scripts are run as the `vdsm` user and inherit the environment of the VDSM process. The exceptions are hook scripts triggered by the `before_vdsm_start` and `after_vdsm_stop` events. Hook scripts triggered by these events run as the `root` user and do not inherit the environment of the VDSM process.

## The VDSM Hook Domain XML Object

When hook scripts are started, the `_hook_domxml` variable is appended to the environment. This variable contains the path of the libvirt domain XML representation of the relevant virtual machine. Several hooks are an exception to this rule, as outlined below.

* The `_hook_domxml` variable of the following hooks contains the XML representation of the NIC and not the virtual machine.

* `*_nic_hotplug_*`

* `*_nic_hotunplug_*`

* `*_update_device`

* `*_device_create`

* `*_device_migrate_*`

**Important:** The `before_migration_destination` and `before_dehibernation` hooks currently receive the XML of the domain from the source host. The XML of the domain at the destination will have various differences.

The libvirt domain XML format is used by VDSM to define virtual machines. Details on the libvirt domain XML format can be found at [http://libvirt.org/formatdomain.html](http://libvirt.org/formatdomain.html). The UUID of the virtual machine may be deduced from the domain XML, but it is also available as the environment variable `vmId`.

## Defining Custom Properties

The custom properties that are accepted by the Red Hat Virtualization Manager - and in turn passed to custom hooks - are defined using the `engine-config` command. Run this command as the `root` user on the host where Red Hat Virtualization Manager is installed.

The `UserDefinedVMProperties` and `CustomDeviceProperties` configuration keys are used to store the names of the custom properties supported. Regular expressions defining the valid values for each named custom property are also contained in these configuration keys.

Multiple custom properties are separated by a semi-colon. Note that when setting the configuration key, any existing value it contained is overwritten. When combining new and existing custom properties, all of the custom properties in the command used to set the key's value must be included.

Once the configuration key has been updated, the `ovirt-engine` service must be restarted for the new values to take effect.

**Virtual Machine Properties - Defining the `smartcard` Custom Property**

1. Check the existing custom properties defined by the `UserDefinedVMProperties` configuration key using the following command:

        # engine-config -g UserDefinedVMProperties

    As shown by the output below, the custom property `memory` is already defined. The regular expression `^[0-9]+$` ensures that the custom property will only ever contain numeric characters.

        # engine-config -g UserDefinedVMProperties
        UserDefinedVMProperties:  version: 3.6
        UserDefinedVMProperties:  version: 4.0
        UserDefinedVMProperties : memory=^[0-9]+$ version: 4.0

2. Because the `memory` custom property is already defined in the `UserDefinedVMProperties` configuration key, the new custom property must be appended to it. The additional custom property, `smartcard`, is added to the configuration key's value. The new custom property is able to hold a value of `true` or `false`.

        # engine-config -s UserDefinedVMProperties='memory=^[0-9]+$;smartcard=^(true|false)$' --cver=4.0

3. Verify that the custom properties defined by the `UserDefinedVMProperties` configuration key have been updated correctly.

        # engine-config -g UserDefinedVMProperties
        UserDefinedVMProperties:  version: 3.6
        UserDefinedVMProperties:  version: 4.0
        UserDefinedVMProperties : memory=^[0-9]+$;smartcard=^(true|false)$ version: 4.0

4. Finally, the `ovirt-engine` service must be restarted for the configuration change to take effect.

        # systemctl restart ovirt-engine.service

**Device Properties - Defining the `interface` Custom Property**

1. Check the existing custom properties defined by the `CustomDeviceProperties` configuration key using the following command:

        # engine-config -g CustomDeviceProperties

    As shown by the output below, no custom properties have yet been defined.

        # engine-config -g CustomDeviceProperties
        CustomDeviceProperties:  version: 3.6
        CustomDeviceProperties:  version: 4.0

2. The `interface` custom property does not already exist, so it can be appended as is. In this example, the value of the `speed` sub-property is set to a range of 0 to 99999, and the value of the `duplex` sub-property is set to a selection of either `full` or `half`.

        # engine-config -s CustomDeviceProperties="{type=interface;prop={speed=^([0-9]{1,5})$;duplex=^(full|half)$}}" --cver=4.0

3. Verify that the custom properties defined by the `CustomDeviceProperties` configuration key have been updated correctly.

        # engine-config -g CustomDeviceProperties
        UserDefinedVMProperties:  version: 3.6
        UserDefinedVMProperties:  version: 4.0
        UserDefinedVMProperties : {type=interface;prop={speed=^([0-9]{1,5})$;duplex=^(full|half)$}} version: 4.0

4. Finally, the `ovirt-engine` service must be restarted for the configuration change to take effect.

        # systemctl restart ovirt-engine.service

## Setting Virtual Machine Custom Properties

Once custom properties are defined in the Red Hat Virtualization Manager, you can begin setting them on virtual machines. Custom properties are set on the **Custom Properties** tab of the **New Virtual Machine** and **Edit Virtual Machine** windows in the Administration Portal.

You can also set custom properties from the **Run Virtual Machine(s)** dialog box. Custom properties set from the **Run Virtual Machine(s)** dialog box will only apply to the virtual machine until it is next shutdown.

The **Custom Properties** tab provides a facility for you to select from the list of defined custom properties. Once you select a custom property key an additional field will display allowing you to enter a value for that key. Add additional key/value pairs by clicking the **+** button and remove them by clicking the **-** button.

## Evaluating Virtual Machine Custom Properties in a VDSM Hook

Each key set in the **Custom Properties** field for a virtual machine is appended as an environment variable when calling hook scripts. Although the regular expressions used to validate the **Custom Properties** field provide some protection you should ensure that your scripts also validate that the inputs provided match their expectations.

**Evaluating Custom Properties**

This short Python example checks for the existence of the custom property `key1`. If the custom property is set then the value is printed to standard error. If the custom property is not set then no action is taken.

    #!/usr/bin/python

    import os
    import sys

    if os.environ.has_key('key1'):
    sys.stderr.write('key1 value was : %s\n' % os.environ['key1'])
    else:
        sys.exit(0)

## Using the VDSM Hooking Module

VDSM ships with a Python hooking module, providing helper functions for VDSM hook scripts. This module is provided as an example, and is only relevant to VDSM hooks written in Python.

The hooking module supports reading of a virtual machine's libvirt XML into a DOM object. Hook scripts can then use Python's built in `xml.dom` library ([http://docs.python.org/release/2.6/library/xml.dom.html](http://docs.python.org/release/2.6/library/xml.dom.html)) to manipulate the object.

The modified object can then be saved back to libvirt XML using the hooking module. The hooking module provides the following functions to support hook development:

**Hooking module functions**

| Name | Argument | Description |
|-
| `tobool` | string | Converts a string "true" or "false" to a Boolean value |
| `read_domxml` | - | Reads the virtual machine's libvirt XML into a DOM object |
| `write_domxml` | DOM object | Writes the virtual machine's libvirt XML from a DOM object |

## VDSM Hook Execution

`before_vm_start` scripts can edit the domain XML in order to change VDSM's definition of a virtual machine before it reaches libvirt. Caution must be exercised in doing so. Hook scripts have the potential to disrupt the operation of VDSM, and buggy scripts can result in outages to the Red Hat Virtualization environment. In particular, ensure you never change the UUID of the domain, and do not attempt to remove a device from the domain without sufficient background knowledge.

Both `before_vdsm_start` and `after_vdsm_stop` hook scripts are run as the `root` user. Other hook scripts that require `root` access to the system must be written to use the `sudo` command for privilege escalation. To support this the `/etc/sudoers` must be updated to allow the `vdsm` user to use `sudo` without reentering a password. This is required as hook scripts are executed non-interactively.

**Configuring `sudo` for VDSM Hooks**

In this example the `sudo` command will be configured to allow the `vdsm` user to run the `/bin/chown` command as `root`.

1. Log into the virtualization host as `root`.

2. Open the `/etc/sudoers` file in a text editor.

3. Add this line to the file:

        vdsm ALL=(ALL) NOPASSWD: /bin/chown

    This specifies that the `vdsm` user has the ability to run the `/bin/chown` command as the `root` user. The `NOPASSWD` parameter indicates that the user will not be prompted to enter their password when calling `sudo`.

Once this configuration change has been made VDSM hooks are able to use the `sudo` command to run `/bin/chown` as `root`. This Python code uses `sudo` to execute `/bin/chown` as `root` on the file `/my_file`.

    retcode = subprocess.call( ["/usr/bin/sudo", "/bin/chown", "root", "/my_file"] )

The standard error stream of hook scripts is collected in VDSM's log. This information is used to debug hook scripts.

## VDSM Hook Return Codes

Hook scripts must return one of the return codes shown in [hook-return-codes](hook-return-codes). The return code will determine whether further hook scripts are processed by VDSM.

**Hook Return Codes**

| Code | Description |
|-
| 0 | The hook script ended successfully |
| 1 | The hook script failed, other hooks should be processed |
| 2 | The hook script failed, no further hooks should be processed |
| >2 | Reserved |

## VDSM Hook Examples

The example hook scripts provided in this section are strictly not supported by Red Hat. You must ensure that any and all hook scripts that you install to your system, regardless of source, are thoroughly tested for your environment.

**NUMA Node Tuning**

**Purpose:**

This hook script allows for tuning the allocation of memory on a NUMA host based on the `numaset` custom property. Where the custom property is not set no action is taken.

**Configuration String:**

    numaset=^(interleave|strict|preferred):[\^]?\d+(-\d+)?(,[\^]?\d+(-\d+)?)*$

The regular expression used allows the `numaset` custom property for a given virtual machine to specify both the allocation mode (`interleave`, `strict`, `preferred`) and the node to use. The two values are separated by a colon (`:`). The regular expression allows specification of the `nodeset` as:

* that a specific node (`numaset=strict:1`, specifies that only node 1 be used), or
* that a range of nodes be used (`numaset=strict:1-4`, specifies that nodes 1 through 4 be used), or
* that a specific node not be used (`numaset=strict:^3`, specifies that node 3 not be used), or
* any comma-separated combination of the above (`numaset=strict:1-4,6`, specifies that nodes 1 to 4, and 6 be used).

**Script:**

`/usr/libexec/vdsm/hooks/before_vm_start/50_numa`

    #!/usr/bin/python

    import os
    import sys
    import hooking
    import traceback

    '''
    numa hook
    =========
    add numa support for domain xml:

    <numatune>
        <memory mode="strict" nodeset="1-4,^3" />
    </numatune>

    memory=interleave|strict|preferred

    numaset="1" (use one NUMA node)
    numaset="1-4" (use 1-4 NUMA nodes)
    numaset="^3" (don't use NUMA node 3)
    numaset="1-4,^3,6" (or combinations)

    syntax:
        numa=strict:1-4
    '''

    if os.environ.has_key('numa'):
        try:
            mode, nodeset = os.environ['numa'].split(':')

            domxml = hooking.read_domxml()

            domain = domxml.getElementsByTagName('domain')[0]
            numas = domxml.getElementsByTagName('numatune')

            if not len(numas) > 0:
                numatune = domxml.createElement('numatune')
                domain.appendChild(numatune)

                memory = domxml.createElement('memory')
                memory.setAttribute('mode', mode)
                memory.setAttribute('nodeset', nodeset)
                numatune.appendChild(memory)

                hooking.write_domxml(domxml)
            else:
                sys.stderr.write('numa: numa already exists in domain xml')
                sys.exit(2)
        except:
            sys.stderr.write('numa: [unexpected error]: %s\n' % traceback.format_exc())
            sys.exit(2)

**Prev:** [Chapter 20: Proxies](../chap-Proxies)<br>
**Next:** [Appendix B: Custom Network Properties](../appe-Custom_Network_Properties)

repository: bessii/ovirt-site

repo_name: bessii/ovirt-site


text:
# Multi-language client generator

Need to compile and start a rest server to generate the clients.
```
mvn clean install -DskipTests -Dopencga.war.name=opencga
./build/bin/opencga-admin.sh server rest --start --port 9123
```

Then, execute the client generator for each language
## Java
```
python3 build/misc/clients/java_client_generator.py http://localhost:9123/opencga opencga-client/src/main/java/org/opencb/opencga/client/rest/clients
```

## Python
```
python3 build/misc/clients/python_client_generator.py http://localhost:9123/opencga opencga-client/src/main/python/pyopencga/rest_clients
```

## R
```
python3 build/misc/clients/r_client_generator.py http://localhost:9123/opencga opencga-client/src/main/R/R/
```

## JS
```
python3 build/misc/clients/js_client_generator.py http://localhost:9123/opencga <target>
```

repository: drfranknlee/opencga

repo_name: drfranknlee/opencga


text:
# Discord API Client

## Installation

```bash
$ npm install --save discord-api-client
```

## Usage

```typescript
import {Client, Endpoints} from "discord-api-client";

// There are a couple of other options in here, make sure you check them out.
const client = new Client({
    token: "Bot <DISCORD API TOKEN HERE>"
});

const response = await client.request("GET", Endpoints.GATEWAY_BOT);

console.log(response);
```

## License

Large parts of this lib were taken from https://github.com/abalabahaha/eris/

We follow the MIT License supplied in the [LICENSE](./blob/master/LICENSE) file.

repository: aequasi/discord-api-client

gha_language: TypeScript

gha_license_id: NOASSERTION

repo_name: aequasi/discord-api-client


text:
# Mobile Games: AB Testing & Player Retention

This project is based on a mini project from Datacamp.

## Introduction

Cookie Cats is a hugely popular mobile puzzle game developed by Tactile Entertainment. It's a classic "connect three"-style puzzle game where the player must connect tiles of the same color to clear the board and win the level. It also features singing cats. Check out this short demo: https://youtu.be/GaP5f0jVTWE.

As players progress through the levels of the game, they will occasionally encounter gates that force them to wait a non-trivial amount of time or make an in-app purchase to progress.

***The main objective of project is to analyze an A/B test and determine if the gate should be moved from level 30 to level 40.***

## Data Source
The dataset is publicly available on Datacamp, which can be retrieved from https://www.datacamp.com/projects/184.

## Data Analysis
Please see codes in the file ***Mobile_Games_AB_Testing***. (Alternatively, visit my Kaggle page https://www.kaggle.com/yufengsui/datacamp-mini-project-mobile-games-a-b-testing)

repository: yfsui/Mobile-Games-AB-Testing-Project

repo_name: yfsui/Mobile-Games-AB-Testing-Project


text:
# babel-plugin-console-with-loc

[![Build Status](https://travis-ci.org/akameco/babel-plugin-console-with-loc.svg?branch=master)](https://travis-ci.org/akameco/babel-plugin-console-with-loc)
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)

> babel plugin for console.log with loc

## Install

npm:

```
$ npm install --save-dev babel-plugin-console-with-loc
```

yarn:

```
$ yarn add --dev babel-plugin-console-with-loc
```

## Usage

.babelrc

```js
{
  "plugins": ["console-with-loc"]
}
```

## Examples

```js
console.log('hello world');

      ↓ ↓ ↓ ↓ ↓ ↓

console.log('{\\"start\\":{\\"line\\":1,\\"column\\":0},\\"end\\":{\\"line\\":1,\\"column\\":26}}', 'hello world');
```

## Contributors

Thanks goes to these wonderful people
([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):

| [
akameco](http://akameco.github.io)
[💻](https://github.com/akameco/babel-plugin-console-with-loc/commits?author=akameco "Code") [📖](https://github.com/akameco/babel-plugin-console-with-loc/commits?author=akameco "Documentation") [⚠](https://github.com/akameco/babel-plugin-console-with-loc/commits?author=akameco "Tests") [🚇](#infra-akameco "Infrastructure (Hosting, Build-Tools, etc)") |
| :---: |

This project follows the
[all-contributors](https://github.com/kentcdodds/all-contributors)
specification. Contributions of any kind welcome!

## License

MIT © [akameco](http://akameco.github.io)

repository: akameco/babel-plugin-console-with-loc

repo_name: akameco/babel-plugin-console-with-loc


text:
# SPlayer

🍭A simple box music player (Netease cloud music analysis)

## Example

<iframe src="/0.2.3/example.html"></iframe>

## Thank

 - [@metowolf](https://github.com/metowolf)

 - [@ohmyga233](https://github.com/ohmyga233)

## Join in the discussion

 - QQ Group: [1040225813](https://shang.qq.com/wpa/qunwpa?idkey=fb30524582f88ffc33bcb0da8734a91c877694984794f6cb7f87a3d1269eaecf)

## Copyright

Copyright © 2020 [SatoSouta](https://baka.fun/) & [SPlayer](https://splayer.js.org/), under MIT License

## Attention

!> There may be some imperfections at present. Welcome to GitHub for pull request.

# Guide

## Setup

jsDelivr:

```html
<link rel="stylesheet"<EMAIL_ADDRESS>/>
<script<EMAIL_ADDRESS>```

## Use

Insert code where you need to use the player:

```html
<div id="splayer" server="1" netease="Netease cloud music ID"></div>
```

## Parameter

The following parameters need to be changed by yourself.

Name | default value | description
----|-------|----
netease|null|Netease cloud music ID
server|1|Get music server（Meting`1` / O'sAPI`2` / Shota'sAPI`3` / Dog'sAPI`4`）
autoplay|false|Whether to turn on autoplay（`true` or `false`）

## FAQs

### Why can't I use autoplay?

There is no problem with your settings, but autoplay is disabled by default in some browsers, so autoplay cannot be performed.

repository: SatoSouta/SPlayer

repo_name: SatoSouta/SPlayer


text:
# Clay Starter

> A basic starter for Clay

## Docs
Documentation around Clay is being refined in cojunction with iteration on this starter. For beginning documentation about Clay and its data structures you can browse this link: https://claycms.gitbook.io/clay/

## Requirements

- [NodeJS](https://github.com/creationix/nvm)
- [Docker For Mac](https://hub.docker.com/editions/community/docker-ce-desktop-mac)
- [Clay CLI](https://github.com/clay/claycli)

## Assumptions

- This repo uses Google for OAuth by default. To use your Google account to authenticate locally change the `username` field in `sample_users.yml`
- You're running Node `8.12.0` or greater
- You've installed [Clay CLI](https://github.com/clay/claycli)

## Setup

Clone the repo and run the following commands:

- `make` (This will download the containers, run an `npm install` and start the app)
- `make add-access-key` ([Please read this doc for more information about your Clay access key](docs/clay-access-key.md))
- `make bootstrap` (This command seeds some starting data)
- `make bootstrap-user` (This command seeds a user from `sample_users.yml` file at the root of this project)

You should be able to navigate to http://localhost/_pages/sample-article.html to see an article page render!

### Accessing The Edit UI

The edit interface of Clay is a component itself called [`Kiln`](https://github.com/clay/clay-kiln)! To begin editing with the UI you'll need to make sure you've run `make boostrap-user` after replacing the sample user with your own Gmail address.

Once you're done that you can access edit mode from any page by adding `?edit=true` or by holding down `Shift` and typing `CLAY`. For example, navigating to http://localhost/_pages/sample-article.html?edit=true will grant you access to the edit interface.

### Stopping & Clearing Out Data

- `make burn` (Stops and removes all service containers)
- `make clear-data` (Removes all local data)
- `make clear-public` (Removes the `app/public` directory which is Express' static asset directory)

## What's Running?

The project consists of four services running in Docker and Clay running on your host machine.

- NGINX: locally it allows us to forward port 80 to Clay to make working with Clay easy. The current configuration is set to only route requests to `localhost`. If you want to change the host that clay listens to you'll need to update the NGINX config
- Postgres: the primary data store for Clay data
- Redis: locally this container is the cache for Postgres, the session store for PassportJS and the event bus for Clay
- ElasticSearch: integrated for search functionality

repository: ritsok/clay-starter

repo_name: ritsok/clay-starter


text:
# Vehicle_Management_System
The Vehicle Management System allows providing a variety of services to the organization.
This project helps the organization to reduce manual work.
The real power of this project lies not in modules, but the creation of tighter and transparent relationships with users/
drivers/employees and delivering a high level of service and support, which in turn
improves organization time and money


text:
## Recursion:

In computer science, recursion is a method of solving a problem where the solution depends on solutions to smaller instances of the same problem. Such problems can generally be solved by iteration, but this needs to identify and index the smaller instances at programming time.

![nv](https://i.ytimg.com/vi/kepBmgvWNDw/maxresdefault.jpg)
![nv](https://media.geeksforgeeks.org/wp-content/cdn-uploads/Recursive-Functions-in-c.png)

## Python Exceptions:

In Python, exceptions can be handled using a try statement. The critical operation which can raise an exception is placed inside the try clause. The code that handles the exceptions is written in the except clause. ... If no exception occurs, the except block is skipped and normal flow continues(for last value).

Until now error messages haven’t been more than mentioned, but if you have tried out the examples you have probably seen some. There are (at least) two distinguishable kinds of errors: syntax errors and exceptions.

Syntax Errors:
Syntax errors, also known as parsing errors, are perhaps the most common kind of complaint you get while you are still learning Python:
```
>>> while True print('Hello world')
  File "<stdin>", line 1
    while True print('Hello world')
                   ^
SyntaxError: invalid syntax
```
Exceptions:

```
>>> 10 * (1/0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: division by zero
>>> 4 + spam*3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'spam' is not defined
>>> '2' + 2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Can't convert 'int' object to str implicitly
```

## Reading and Writing Files in Python:

When you’re working with Python, you don’t need to import a library in order to read and write to files. It’s handled natively in the language, albeit in a unique manner.

The first thing you’ll need to do is use the built-in python open file function to get a file object.

[gitfile](https://github.com/Obada-gh/reading-notes)

### find more:

link for the github file : [reading-and-writing-files-in-python](https://www.pythonforbeginners.com/files/reading-and-writing-files-in-python)

##### *writen by OBADA ALHAWJREH.*

My name is obada jaber, I’m 27 years old, I studied Mechanical engineering and i graduated from al balqa applied university, i am now a software student. [OBADA ALHAWJREH](https://github.com/Obada-gh).

##### *Support or Contact:*

Having trouble with Pages? Check out our<EMAIL_ADDRESS>or phone number :<PHONE_NUMBER> or [contact support for gethub](https://support.github.com/contact) and we’ll help you sort it out. 🚑 🚑 🚑

repository: Obada-gh/reading-notes

repo_name: Obada-gh/reading-notes


text:
# Contributor's Guide:<br>Extensions for Apache Proton-J library

## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct]
(https://opensource.microsoft.com/codeofconduct/). For more information
see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/).

## Getting Started

To build and test this locally, make sure you install:
- Java 1.7 SDK
- [Maven 3.x](https://maven.apache.org/download.cgi)

After that, cloning the code and running `mvn clean package` should successfully
run all unit/integration tests and build a JAR.

## Filing Issues

You can find all of the issues that have been filed in the [Issues](https://github.com/Azure/proton-extensions/issues)
section of the repository.

If you encounter any bugs, would like to request a feature, or have general
questions/concerns/comments, feel free to file an issue [here](https://github.com/Azure/proton-extensions/issues/new).

## Pull Requests

### Required Guidelines

When filing a pull request, the following must be true:

- Tests have been added (if needed) to validate changes
- Zero CheckStyle violations - `mvn checkstyle:check` runs clean
- `mvn clean test` runs clean!

### General Guidelines

If you would like to make changes to this library, **break up the change into small,
logical, testable chunks, and organize your pull requests accordingly**. This makes
for a cleaner, less error-prone development process.

If you'd like to get involved, but don't know what to work on, then please reach out to
us by opening an issue.

If you're new to opening pull requests - or would like some additional guidance - the
following list is a good set of best practices!

- Title of the pull request is clear and informative
- There are a small number of commits that each have an informative message
- A description of the changes the pull request makes is included, and a reference to the bug/issue the pull request fixes is included, if applicable
- Pull request includes comprehensive test coverage for the included changes


text:
# Ross says licences for US companies to sell to Huawei coming ‘shortly’: Report

Published at: **2019-11-03T23:30:00+00:00**

Author: ****

Original: [CNA](https://www.channelnewsasia.com/news/business/ross-says-licences-for-us-companies-to-sell-to-huawei-coming-12059758)

REUTERS: U.S. Commerce Secretary Wilbur Ross said licenses for U.S. companies to sell components to China's Huawei Technologies Co will come "very shortly," in an interview with Bloomberg published on Sunday.
Ross said the licenses "will be forthcoming very shortly" and that the U.S. government had received 206 requests.
"That's a lot of applications - it's frankly more than we would've thought," Ross added.
Huawei did not immediately respond to a request for comment.
In May, Huawei, the world's largest telecoms equipment provider, was put under a U.S. blacklist citing national security concerns, effectively banning it from buying American-made parts without a special license, while U.S. companies were banned from selling to Huawei without carrying a special license.
U.S. President Donald Trump promised in June to provide some relief to firms that did business with Huawei.
On U.S.-China trade developments, Ross said there was no reason the deal could not be on track to be signed this month.
"We are in good shape, we are making good progress, and there is no natural reason why it could not be," Bloomberg quoted Ross as saying.

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
---
published: false
title: b05
layout: post
author: Yu
categories: v17
hidden: true
---

| Item | Detail | Link |
|---:|---|---|
| Reviewers | John Maindonald| |
| Title |Pattern Recognition and Machine Learning | [download](http://www.jstatsoft.org/v17/b05/paper) |
| Reference |Vol. 17, Book Review 5, Jan 2007 | |
| | Submitted 2007-01-31, Accepted 2007-01-31| |
| Type | Book Review| |
| Book's authors | Christopher M. Bishop| |
| Book's title | Pattern Recognition and Machine Learning| |
| Book's publisher | Springer-Verlag| |
| ISBN | 0-387-31073-8| |
| Year | 2006| |
| Paper | Pattern Recognition and Machine Learning  (application/pdf, 111.1 KB)| [download](http://www.jstatsoft.org/v17/b05/paper) |
| Resources | [BibTeX](http://www.jstatsoft.org/v17/b05/bibtex) [OAI](http://www.jstatsoft.org/oai?verb=GetRecord&identifier=oai.jstatsoft/v17/b05&prefix=oai_dc)| |
| |  | [返回卷目录]({{site.baseurl}}/volume/v17.html) |

repository: yulijia/jstatsoft

repo_name: yulijia/jstatsoft


text:
# Banuba VideoEditor SDK
## CombinedGalleryConfiguration

The CombinedGallery is used in app when you want to select a photo or video stored on your phone.

Use the properties below to customize the CombinedGallery.

- [videoResolution: VideoResolutionConfiguration](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L7)

VideoResolutionConfiguration setups editor options for rendering video

- [galleryItemConfiguration: GalleryItemConfiguration](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L8)

GalleryItemConfiguration setups gallery item style for collection view cell

- [closeButtonConfiguration: ImageButtonConfiguration](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L16)

ImageButtonConfiguration setups close button style

- [albumButtonConfiguration: TextButtonConfiguration](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L17)

TextButtonConfiguration setups album button style

- [nextButtonConfiguration: SaveButtonConfiguration](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L18)

SaveButtonConfiguration setups next button style

- [noItemsLabelConfiguration: TextConfiguration](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L19)

TextConfiguration setups 'no photos' and 'no videos' label title style

- [layoutConfiguration: GalleryLayoutConfiguration](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L20)

GalleryLayoutConfiguration setups collection view layout for gallery items

- [topBarBlurColor: UIColor](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L21)

Top bar blur color

- [clearSelectionButtonConfiguration: ImageButtonConfiguration](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L22)

ImageButtonConfiguration setups clear selection button style

- [galleryTypeButton: TextButtonConfiguration](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L23)

TextButtonConfiguration setups gallery type buttons' style

- [galleryTypeUnderlineColor: UIColor](/Example/Example/Extension/CombinedGalleryConfiguration.swift#L24)

Color for underline view

![img](screenshots/Gallery.png)

## String resources

![img](screenshots/GalleryLocalization.png)

| Key        |      Value      |   Description |
| ------------- | :----------- | :------------- |
| No matching files found in gallery | No matching files found in gallery | No photo in the combined gallery
| No matching photos found in gallery | No photos found | No photo in gallery
| No matching video found in gallery | No videos found | No video in gallery
| Too much, %d - max number of photos | Too much, %d - max number of photos | User selected too many photos in the gallery
| You can choose %i videos | You can choose %i videos | Shown when the user tries to add a file to import beyond what is possible
| Error loading images | Error loading images | Failed to download photos for slideshow
| Failed to create video | Failed to create video | Failed to export a video
| BanubaVideoEditor.Gallery.ImageTabTitle | Image | Gallery image tab title
| BanubaVideoEditor.Gallery.VideoTabTitle | Video | Gallery video tab title
| BanubaVideoEditor.Gallery.AllPhotosTitle | All Photos | Gallery custom All Photos title
| BanubaVideoEditor.Gallery.RecentPhotosTitle | Recent | Gallery Recent Photos title
| BanubaVideoEditor.Gallery.SelectItems | Select items | Gallery selection hint
| BanubaVideoEditor.Gallery.ImportSingleVideo | Import 1 video | Import single video template
| BanubaVideoEditor.Gallery.ImportMultipleVideos | Import %d videos | Import multiple videos template
| BanubaVideoEditor.Gallery.ImportSingleImage | Import 1 image | Import single image template
| BanubaVideoEditor.Gallery.ImportMultipleImages | Import %d images | Import multiple images template


text:
# AccessKeyLabelPolyfill

> Polyfills the accessKeyLabel property to improve discoverability of native keyboard shortcuts for
> your website. Tiny (< 1KB) and dependency-free.

With the [`accesskey` HTML property](https://developer.mozilla.org/de/docs/Web/HTML/Globale_Attribute/accesskey),
you can easily provide keyboard shortcuts for the buttons of your web application.

```html
<button accesskey="D">Do crazy stuff</button>
<!-- Can be activated using Ctrl + Alt + D -->
```

Sadly, most users don't even know these shortcuts can be used, even if the web developer provided
them. To make these shortcuts more discoverable you might decide to use the `title` property, a
tooltip or some other UI element to display the keyboard shortcut.

```html
<button accesskey="D">Do crazy stuff</button>
<small>Hint: Use Ctrl + Alt + D to quickly access this button!</small>
```

A good idea, but browsers use different combinations of modifier keys. But thanks to the
[`accessKeyLabel` property](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/accessKeyLabel),
we can easily get a string representation of the keyboard shortcut assigned by the browser. Sooo,
we're good, right? Alas, not quite. Though the API has been around for years,
[browser support](https://caniuse.com/?search=accessKeyLabel) isn't good enough. Especially, since
Chrome is still missing out. To help bridge the gap, you can use this polyfill and finally let your
users benefit from the keyboard shortcuts you provide!

[**Demo**](https://tillsanders.github.io/access-key-label-polyfill/)

[**Full length article** about accessKey and accessKeyLabel on dev.to](https://dev.to/tillsanders/boy-was-it-hard-to-implement-proper-keyboard-shortcuts-4d72)

## Usage

### NPM

Simply install the polyfill:

```sh
npm i access-key-label-polyfill
# or
yarn add access-key-label-polyfill
```

And the import and run the install function:

```javascript
import installAccessKeyLabelPolyfill from 'access-key-label-polyfill';
installAccessKeyLabelPolyfill();
```

Note: CJS, UMD and ESM are available, just take a look in the package.

### Browser

You can also use this polyfill 'oldschool'. Simply download the demo files and add the
`AccessKeyLabelPolyfill.umd.js` file to your body:

```html
<body>
  <!-- ... -->
  <script src="path/to/AccessKeyLabelPolyfill.umd.js"></script>
  <script>
    accessKeyLabelPolyfill(); // lowerCamelCase!
  </script>
```

## Demo

You can view the demo here: <https://tillsanders.github.io/access-key-label-polyfill/>

The demo will tell you wether the polyfill detected native support for `accessKeyLabel` or not and
will display either output below the button.

## How does it work?

First, the polyfill will try to detect wether the browser already supports `accessKeyLabel`. If it
does, it will exit immediately. If the browser doesn't support this API, the polyfill will add a
small function to fill the gap. This function will try to detect the browser / operating system and
return the correct label. You can then use `accessKeyLabel` as expected.

### Caveats

- To return the correct label, the polyfill needs to determine the correct operating system, browser
  and sometimes even the browser version. This is done with a very lightweight script and based on
  the user-agent. While this has been tested successfully and should work reliably, wrong
  user-agents can still mess it up, of course.
- The polyfill currently supports the major browsers on macOS (including Firefox < v14), namely
  Chrome. As well as Internet Explorer, Edge and Safari on iOS / iPadOS. There might be more
  browsers, that need this polyfill, but there is surprisingly little information regarding support,
  so please feel free to open an issue if you come across an unsupported case.
- Chrome on Android does not seem to support `accessKey`, or at least, I was unable to guess (why
  is this not documented anywhere?!) the correct modifier keys. Would love to get help with this!

# Changelog

## 0.1.1 – (10.01.2021)

- Fix browser detection of Edge

## 0.1.0 – (09.01.2021)

- Initial implementation

repository: tillsanders/access-key-label-polyfill

repo_name: tillsanders/access-key-label-polyfill