text:
---
layout: splash
title: "scraping historical data "
author: "David M soto (davidmontesoto@gmail.com)"
date: "oct 17, 2016"
description: "scraping funds historical data from financial times"
category: Sample-Posts
tags: [sample post, code, highlighting]
comments: true
share: true
---

timing is the answer
the only way to outsmart the market is with the desing of a system before start investing, if we don't desing anythig emotions, such as fear or greed will be our worst enemy, doesn't matter if your are going to invest  in CDFs, stocks, ETFs or even funds.
I have open an account in fidelity (UK), with an ISA,the first thing that they offer you is a 50 top selected funds. let's see if there is an oportunity in any of them.

I've donwnloade this this little dataset from the fidelity webpage of the 50 selected funds, you can do it even if you are not a customer.
fidelity to 50 :  [here](https://www.fidelity.co.uk/investor/funds/find-funds/select-list/default.page)

{% highlight r %}
rm(list = ls())
setwd("~/dataScience/blog/mfunds/")
library(data.table)
selected_fidelity = fread('./input/top50.csv')
str (selected_fidelity)
{% endhighlight %}

{% highlight text %}
## Classes 'data.table' and 'data.frame':	88 obs. of  15 variables:
##  $ Full fund name                         : chr  "M&G European High Yield Bond I Acc" "Fidelity Special Situations Fund W-Accumulation" "Fidelity Enhanced Income Fund W-MINC-GBP" "Fidelity Global Dividend Fund W-MINC-GBP" ...
##  $ Fund ISIN                              : chr  "GB00B76MD544" "GB00B88V3X40" "GB00BYSYZP12" "GB00BYSYZL73" ...
##  $ Fund code                              : chr  "MGELA" "WSSA" "WEIIM" "WGDIM" ...
##  $ Asset Class                            : chr  "Bonds" "UK" "UK" "Global" ...
##  $ Morningstar rating                     : int  NA NA NA NA 5 5 NA NA NA NA ...
##  $ Morningstar category                   : chr  "Europe High Yield Bond" "UK Flex-Cap Equity" "UK Equity Income" "Global Equity Income" ...
##  $ OCF/TER(%)                             : num  0.92 0.94 0.94 0.95 0.96 0.96 0.95 0.69 0.19 0.19 ...
##  $ Eligible for ISA                       : chr  "Yes" "Yes" "Yes" "Yes" ...
##  $ Eligible for SIPP                      : chr  "Yes" "Yes" "Yes" "Yes" ...
##  $ Eligible for general investment account: chr  "Yes" "Yes" "Yes" "Yes" ...
##  $ Performance in % (Current Yr-4)        : num  20.4 36.3 NA NA 25.4 ...
##  $ Performance in % (Current Yr-3)        : num  7.2 10.94 NA NA 8.43 ...
##  $ Performance in % (Current Yr-2)        : num  -12.38 12.56 NA NA 8.46 ...
##  $ Performance in % (Current Yr-1)        : num  16.93 -4.11 NA NA 23.51 ...
##  $ Performance in % (Current Yr)          : num  16.5 30.6 11.3 15 15 ...
##  - attr(*, ".internal.selfref")=<externalptr>
{% endhighlight %}

## data scraping .

there are some nice packages like quuantmod that have some functions to donwload historiacal data from stocks,
when it comes to funds, I have not found any better source of historical data like the financial times.

it the below code we download from the Ft the last 3 years of hitorical data, basically we extract from the JSON that the FT respond our http request the XML

This process will take some minutes,  later on i will post how can we make another process for updating the file so we don't need to download all the historical data from the Financial times every day.

{% highlight r %}
library(jsonlite)
library(XML)
library(RCurl)
library(stringr)
library(plyr)

library(lubridate)

end.date <-gsub("-", "/", Sys.Date())
start.date <-gsub("-", "/", Sys.Date()-years(3))

url_ft_base <- paste0("https://markets.ft.com/data/equities/ajax/get-historical-prices?startDate=",
                      start.date, "&endDate=", end.date, "&symbol=" )

df <- data.frame(stringsAsFactors=FALSE)

start.time <- Sys.time()

for (i in 1:2){

  url_ft = paste0(url_ft_base,selected_fidelity[i,2]) # second column is sthe isnn
  ft.xml <- getURL(url_ft) %>% fromJSON() %>%  htmlParse(asText = TRUE)  #extract from the json the xml
  xmltop = xmlRoot(ft.xml) #gives content of root
  ft.df =ldply(xmlToList(xmltop[[1]]), data.frame)   #convert the xml into a dataframe

  ft.df <- ft.df [-1,c(5,8,9,10,11)] # select the columns we need

  names(ft.df )<-c("date","Open","High","Low","Close") # rename de columms
  ft.df [ , "fundsname"] <- selected_fidelity[i,1] # add the fundsname column from the fidelity dataset
  ft.df [ , "isin"] <-selected_fidelity[i,2]       #add the ISIN
  ft.df [ , "AssetClass"] <-selected_fidelity[i,4]    #add the Asset Class
  ft.df [ , "Mcategory"] <-selected_fidelity[i,6]   #add the Morning start category
  df <-rbind( df ,ft.df )
}

str (df)
{% endhighlight %}

{% highlight text %}
## 'data.frame':	1518 obs. of  9 variables:
##  $ date      : chr  "Fri, Oct 06, 2017" "Thu, Oct 05, 2017" "Wed, Oct 04, 2017" "Tue, Oct 03, 2017" ...
##  $ Open      : chr  "1,571.47" "1,561.99" "1,554.10" "1,553.24" ...
##  $ High      : chr  "1,571.47" "1,561.99" "1,554.10" "1,553.24" ...
##  $ Low       : chr  "1,571.47" "1,561.99" "1,554.10" "1,553.24" ...
##  $ Close     : chr  "1,571.47" "1,561.99" "1,554.10" "1,553.24" ...
##  $ fundsname : chr  "M&G European High Yield Bond I Acc" "M&G European High Yield Bond I Acc" "M&G European High Yield Bond I Acc" "M&G European High Yield Bond I Acc" ...
##  $ isin      : chr  "GB00B76MD544" "GB00B76MD544" "GB00B76MD544" "GB00B76MD544" ...
##  $ AssetClass: chr  "Bonds" "Bonds" "Bonds" "Bonds" ...
##  $ Mcategory : chr  "Europe High Yield Bond" "Europe High Yield Bond" "Europe High Yield Bond" "Europe High Yield Bond" ...
{% endhighlight %}

#time taken

{% highlight r %}
end.time <- Sys.time()
time.taken <- end.time - start.time
time.taken
{% endhighlight %}

{% highlight text %}
## Time difference of 13.27004 secs
{% endhighlight %}

#data munging
Lets format the historical data from the financial times and store it, we will use this historical data for some analysis and backtesting in other post.

{% highlight r %}
df[,1] <- as.Date(df[,1], format="%a, %b %d, %Y") # date format
converToNumeric = function(x) { as.numeric(gsub(",", "", x, fixed = TRUE)) }
df[,2:5] = sapply(df[,2:5], converToNumeric) # numeric format
str (df)
{% endhighlight %}

{% highlight text %}
## 'data.frame':	1518 obs. of  9 variables:
##  $ date      : Date, format: "2017-10-06" "2017-10-05" ...
##  $ Open      : num  1571 1562 1554 1553 1545 ...
##  $ High      : num  1571 1562 1554 1553 1545 ...
##  $ Low       : num  1571 1562 1554 1553 1545 ...
##  $ Close     : num  1571 1562 1554 1553 1545 ...
##  $ fundsname : chr  "M&G European High Yield Bond I Acc" "M&G European High Yield Bond I Acc" "M&G European High Yield Bond I Acc" "M&G European High Yield Bond I Acc" ...
##  $ isin      : chr  "GB00B76MD544" "GB00B76MD544" "GB00B76MD544" "GB00B76MD544" ...
##  $ AssetClass: chr  "Bonds" "Bonds" "Bonds" "Bonds" ...
##  $ Mcategory : chr  "Europe High Yield Bond" "Europe High Yield Bond" "Europe High Yield Bond" "Europe High Yield Bond" ...
{% endhighlight %}

{% highlight r %}
saveRDS(df, "~/dataScience/blog/mfunds/input/selected2.rds")
{% endhighlight %}


text:
# Binary Search Trick

A simple game to guess a number a user thinks of with log2(n) steps.

## Screenshots

![Screenshot](media/screenshot.png)

Trying to guess `987654`:

![Gameplay](media/gameplay.gif)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Pipeline Client Command Reference
pipeline_client is a python app intended to be a reference for using Intel(R) Deep Learning Streamer (Intel(R) DL Streamer) Pipeline Server REST API. pipeline_client is included in Pipeline Server's REST container and can be easily launched using the accompanying run script, `pipeline_client.sh`.

>**Note:**
This document assumes you are familiar with Intel(R) DL Streamer Pipeline Server and have built the image locally and Pipeline Server REST instance is running for Pipeline Client to connect to. See the main [README](../README.md) for details on building and running the service.

## Basic Usage
### Listing Supported Models and Pipelines
To see which models and pipelines are loaded by the service run the following commands.
> **Note:** Results will vary depending on your service configuration but the format of models and pipelines are displayed in the tuplet form of name/version as seen below.

Listing models:
```
 ./client/pipeline_client.sh list-models
```
```
<snip>
 - object_classification/vehicle_attributes
 - emotion_recognition/1
 - audio_detection/environment
 - object_detection/person_vehicle_bike
 - face_detection_retail/1
```

Listing pipelines:
```
./client/pipeline_client.sh list-pipelines
```
```
<snip>
 - object_classification/vehicle_attributes
 - audio_detection/environment
 - object_tracking/person_vehicle_bike
 - object_tracking/object_line_crossing
 - object_detection/person_vehicle_bike
 - object_detection/object_zone_count
```

### Running Pipelines

All examples (including samples) that produce `file` output assume you will have already started Pipeline Server using a volume mount to the destination path; e.g., the `/tmp` folder in our examples.

   ```
   ./docker/run.sh -v /tmp:/tmp
   ```

> **Important**: While Pipeline Server does support overriding the runtime user, keep in mind that by default all examples are designed to permit _current user_ access to files exported by Pipeline Server.

pipeline_client can be used to send pipeline start requests using the `run` command. With the `run` command you will need to enter two additional arguments the `pipeline` (in the form of pipeline_name/pipeline_version) you wish to use and the `uri` pointing to the media of your choice.
```
./client/pipeline_client.sh run object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true
```

If the pipeline request is successful, an instance id is created and pipeline_client will print the instance. More on `instance_id` below.
Once pre-roll is completed and pipeline begins running, the output file is processed by pipeline_client and inference information is printed to the screen in the following format: `label (confidence) [top left width height] {meta-data}` At the end of the pipeline run, the average fps is printed as well. If you wish to stop the pipeline mid-run, `Ctrl+C` will signal the client to send a `stop` command to the service. Once the pipeline is stopped, pipeline_client will output the average fps. More on `stop` below

```
Pipeline instance = <uuid>
Pipeline running
<snip>
Timestamp<PHONE_NUMBER>3
- vehicle (0.95) [0.00, 0.12, 0.15, 0.36] {}
Timestamp<PHONE_NUMBER>6
- vehicle (0.79) [0.00, 0.12, 0.14, 0.36] {}
Timestamp<PHONE_NUMBER>3
- vehicle (0.68) [0.00, 0.13, 0.11, 0.36] {}
Timestamp<PHONE_NUMBER>6
- vehicle (0.78) [0.00, 0.13, 0.10, 0.36] {}
Timestamp<PHONE_NUMBER>0
- vehicle (0.63) [0.00, 0.13, 0.09, 0.36] {}
Timestamp<PHONE_NUMBER>3
- vehicle (0.63) [0.00, 0.14, 0.07, 0.35] {}
Timestamp<PHONE_NUMBER>6
- vehicle (0.69) [0.00, 0.14, 0.07, 0.35] {}
Timestamp<PHONE_NUMBER>0
- vehicle (0.64) [0.00, 0.14, 0.05, 0.34] {}
avg_fps: 39.66
```
However, if there are errors during pipeline execution i.e GPU is specified as detection device but is not present, pipeline_client will terminate with an error message
```
Pipeline instance = <uuid>
<Error Message>
```

If the server was started without mounting `/tmp` you will see the message:

```
No results will be displayed. Unable to read from file
```

If the server and client are not started by the same user you will see the message:
```
Unable to delete destination metadata file /tmp/results.jsonl
```

### Starting Pipelines
The `run` command is helpful for quickly showing inference results but `run` blocks until completion. If you want to do your own processing and only want to kickoff a pipeline, this can be done with the `start` command. `start` arguments are the same as `run`, you'll need to provide the `pipeline` and `uri`. Run the following command:
```
./client/pipeline_client.sh start object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true
```

The `start` and `run` commands in all client examples require the following to successfully output results:
   1. The server volume mounts the /tmp folder (i.e. `-v /tmp:/tmp`)
   2. Both the server and client are started by the same user

Similar to `run`, if the pipeline request is successful, an instance id is created and pipeline_client will print the instance. More on `instance_id` below.
```
Pipeline instance = <uuid>
```
Errors during pipeline execution are not flagged as pipeline_client exits after receiving instance id for a successful request. However, both `start` and `run` will flag invalid requests, for example:
```
./client/pipeline_client.sh start object_detection/person_vehicle_bke \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true
```
The pipeline name has a typo `object_detection/person_vehicle_bke` making it invalid, this results in the error message:
```
400 - "Invalid Pipeline or Version"
```

#### Instance ID
On a successful start of a pipeline, Pipeline Server assigns a pipeline `instance_id` which is a [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) which can be used to reference the pipeline in subsequent requests. In this example, the `instance_id` is `0fe8f408ea2441bca8161e1190eefc51`
```
Starting pipeline object_detection/person_vehicle_bike, instance = 0fe8f408ea2441bca8161e1190eefc51
```
### Stopping Pipelines
Stopping a pipeline can be accomplished using the `stop` command along with the `pipeline` and `instance id`:
```
./client/pipeline_client.sh stop object_detection/person_vehicle_bike 0fe8f408ea2441bca8161e1190eefc51
```
```
Stopping Pipeline...
Pipeline stopped
avg_fps: 42.07
```
### Getting Pipeline Status
Querying the current state of the pipeline is done using the `status` command along with the `pipeline` and `instance id`:
```
./client/pipeline_client.sh status object_detection/person_vehicle_bike 0fe8f408ea2441bca8161e1190eefc51
```
pipeline_client will print the status of `QUEUED`, `RUNNING`, `ABORTED`, `COMPLETED`  along with the fps or `ERROR` with the error message as applicable.
```
<snip>
RUNNING (30fps)
```
```
<snip>
ERROR (Not Found (404), URL: https://github.com/intel-iot-devkit/sample.mp4, Redirect to: (NULL))
```

### Waiting for a pipeline to finish
If you wish to wait for a pipeline to finish running you can use the `wait` command along with the `pipeline` and `instance id`:
```
./client/pipeline_client.sh wait object_detection/person_vehicle_bike 0fe8f408ea2441bca8161e1190eefc51
```
The client will print the initial status of the pipeline. Then wait for completion and print the average fps.

### Getting Status of All Pipelines
Querying the current state of the pipeline is done using the `list-instances` command.

This example starts two pipelines and then gets their status and request details.
```
./client/pipeline_client.sh start object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true
```
Output:
```
Starting pipeline object_detection/person_vehicle_bike, instance = 94cf72b718184615bfc181c6589b240c
```
```
./client/pipeline_client.sh start object_classification/vehicle_attributes \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/car-detection.mp4?raw=true
```
Output:
```
Starting pipeline object_classification/vehicle_attributes, instance = 978e09c561f14fa1b793e8b644f30031
```
```
./client/pipeline_client.sh list-instances
```
```
01: object_detection/person_vehicle_bike
state: RUNNING
fps: 16.74
source: {
    "element": "urisourcebin",
    "type": "uri",
    "uri": "https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true"
}
destination: {
    "metadata": {
        "format": "json-lines",
        "path": "/tmp/results.jsonl",
        "type": "file"
    }
}

02: object_classification/vehicle_attributes
state: RUNNING
fps: 11.08
source: {
    "element": "urisourcebin",
    "type": "uri",
    "uri": "https://github.com/intel-iot-devkit/sample-videos/blob/master/car-detection.mp4?raw=true"
}
destination: {
    "metadata": {
        "format": "json-lines",
        "path": "/tmp/results.jsonl",
        "type": "file"
    }
}
parameters: {
    "object-class": "vehicle"
}
```

## Command Line Arguments
See [customizing pipeline requests](../docs/customizing_pipeline_requests.md) to further understand how pipeline request options can be customized.

### --quiet
This optional argument is meant to handle logging verbosity common across all commands to pipeline_client.
> **Note**: If specified, --quiet needs to be placed ahead of the specific command i.e start, run etc.

#### Start
pipeline_client output will just be the pipeline instance.
```
./client/pipeline_client.sh --quiet start object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true
```
```
<snip>
280ff2c4a54611ec8b900242ac110002
```
#### Run
pipeline_client output will be the pipeline instance followed by inference results.
```
./client/pipeline_client.sh --quiet run object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true
```
```
<snip>
280ff2c4a54611ec8b900242ac110002
Timestamp<PHONE_NUMBER>
- person (0.54) [0.67, 0.88, 0.74, 1.00]
Timestamp<PHONE_NUMBER>
- person (0.55) [0.68, 0.83, 0.74, 1.00]
```

### Run/Start Arguments
This section summarizes all the arguments for pipeline_client `run` and `start` commands.

#### pipeline (required)
Positional argument (first) that specifies the pipeline to be launched in the form of `pipeline name/pipeline version`.

#### uri (optional)
Positional argument (second) that specifies the location of the content to play/analyze.
> Note: uri argument can be skipped only if passed in via --request-file

#### --destination
By default, pipeline_client uses a generic template for destination:
```json
{
"destination": {
    "metadata": {
        "type": "file",
        "path": "/tmp/results.jsonl",
        "format": "json-lines"
    }
}}
```
Destination configuration can be updated with `--destination`. This argument affects only metadata part of the destination.
In the following example, passing in `--destination path /tmp/newfile.jsonl` will update the filepath for saving inference result.

> **Note**: To access files exported by Pipeline Server, remember that you must _volume mount_ the destination path (e.g., the `/tmp` folder for our examples) when Pipeline Server is started.
   ```
   docker/run.sh -v /tmp:/tmp
   ```

   ```
   ./client/pipeline_client.sh start object_detection/person_vehicle_bike \
     https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true \
     --destination path /tmp/newfile.jsonl
   ```

If other destination types are specified (e.g. `mqtt` or `kafka` ), the pipeline will try to publish to specified broker and pipeline_client will subscribe to it and display published metadata. Here is an mqtt example using a broker on localhost.
```
docker run --rm --network=host -d eclipse-mosquitto:1.6

./client/pipeline_client.sh run object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true \
  --destination type mqtt --destination host localhost:1883 \
  --destination topic pipeline-server
```
```
Starting pipeline object_detection/person_vehicle_bike, instance = <uuid>
Pipeline running - instance_id = <uuid>
Timestamp<PHONE_NUMBER>
- person (0.91) [0.75, 0.50, 0.81, 0.70]
Timestamp<PHONE_NUMBER>
- person (0.91) [0.76, 0.50, 0.81, 0.68]
Timestamp<PHONE_NUMBER>
- person (0.82) [0.76, 0.49, 0.82, 0.69]
Timestamp<PHONE_NUMBER>
- person (0.70) [0.76, 0.48, 0.82, 0.69]
Timestamp<PHONE_NUMBER>
- person (0.59) [0.76, 0.47, 0.83, 0.69]
```
For more details on destination types, see [customizing pipeline requests](../docs/customizing_pipeline_requests.md#metadata).
#### --rtsp-path
If you are utilizing RTSP restreaming, `--rtsp-path` can be used to update the `server_url` path. This updates the frame part of destination under the hood.
For example, adding `--rtsp-path new_path` will able you to view the stream at `rtsp://<ip_address>:<port>/new_path`. More details on RTSP restreaming in [running_pipeline_server](../docs/running_pipeline_server.md) documentation.

#### --parameter
By default, pipeline_client relies on pipeline parameter defaults. This can be updated with `--parameter` option. See [Defining Pipelines](../docs/defining_pipelines.md) to know how parameters are defined. The following example adds `--parameter detection-device GPU`
```
./client/pipeline_client.sh start object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true \
  --parameter detection-device GPU
```

#### --parameter-file
Specifies a JSON file that contains parameters in key, value pairs. Parameters from this file take precedence over those set by `--parameter`.
> **Note**: As pipeline_client volume mounts /tmp, the parameter file may be placed there.

A sample parameter file can look like
```json
{
    "parameters": {
        "detection-device": "GPU"
    }
}
```
The above file, say /tmp/sample_parameters.json may be used as follows:
```
./client/pipeline_client.sh start object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true \
  --parameter-file /tmp/sample_parameters.json
```

#### --tag
Specifies a key, value pair to update request with. This information is added to each frame's metadata.
This example adds tags for direction and location of video capture
```
./client/pipeline_client.sh start object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true \
  --tag direction east --tag camera_location parking_lot
```

#### --server-address
This can be used with any command to specify a remote HTTP server address. Here we start a pipeline on remote server `http://remote-server.my-domain.com:8080`.
```
./client/pipeline_client.sh start object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true \
  --tag direction east --server=address http://remote-server.my-domain.com:8080
```

#### --status-only
Use with `run` command to disable output of metadata and periodically display pipeline state and fps
```
./client/pipeline_client.sh run object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true \
  --tag direction east --status-only
```
```
Starting pipeline 0
Starting pipeline object_detection/person_vehicle_bike, instance = <uuid>
Pipeline 0 running - instance_id = <uuid>
Pipeline status @ 6s
- instance=<uuid>, state=RUNNING, 24fps
Pipeline status @ 11s
- instance=<uuid>, state=RUNNING, 21fps
Pipeline status @ 16s
- instance=<uuid>, state=RUNNING, 21fps
Pipeline status @ 21s
- instance=<uuid>, state=RUNNING, 20fps
```

#### --number-of-streams
Takes an integer value that specifies the number of streams to start (default value is 1) using specified request.
If number of streams is greater than one, "status only" display mode is used.
```
./client/pipeline_client.sh run object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true \
  --status-only --number-of-streams 4 --server-address http://hbruce-desk2.jf.intel.com:8080
```
```
Starting pipeline 0
Starting pipeline object_detection/person_vehicle_bike, instance = <uuid>
Pipeline 0 running - instance_id = <uuid>
Starting pipeline 1
Starting pipeline object_detection/person_vehicle_bike, instance = f20d1e60806311ecad1c3417ebbc7e7a
Pipeline 1 running - instance_id = f20d1e60806311ecad1c3417ebbc7e7a
Starting pipeline 2
Starting pipeline object_detection/person_vehicle_bike, instance = f2faeb04806311ecad1c3417ebbc7e7a
Pipeline 2 running - instance_id = f2faeb04806311ecad1c3417ebbc7e7a
Starting pipeline 3
Starting pipeline object_detection/person_vehicle_bike, instance = f435a0fe806311ecad1c3417ebbc7e7a
Pipeline 3 running - instance_id = f435a0fe806311ecad1c3417ebbc7e7a
All 4 pipelines running.
Pipeline status @ 11s
- instance=<uuid>, state=RUNNING, 20fps
- instance=f20d1e60806311ecad1c3417ebbc7e7a, state=RUNNING, 15fps
- instance=f2faeb04806311ecad1c3417ebbc7e7a, state=RUNNING, 13fps
- instance=f435a0fe806311ecad1c3417ebbc7e7a, state=RUNNING, 12fps
Pipeline status @ 16s
- instance=<uuid>, state=RUNNING, 17fps
- instance=f20d1e60806311ecad1c3417ebbc7e7a, state=RUNNING, 14fps
- instance=f2faeb04806311ecad1c3417ebbc7e7a, state=RUNNING, 12fps
- instance=f435a0fe806311ecad1c3417ebbc7e7a, state=RUNNING, 12fps
Pipeline status @ 21s
- instance=<uuid>, state=RUNNING, 16fps
- instance=f20d1e60806311ecad1c3417ebbc7e7a, state=RUNNING, 13fps
- instance=f2faeb04806311ecad1c3417ebbc7e7a, state=RUNNING, 12fps
- instance=f435a0fe806311ecad1c3417ebbc7e7a, state=RUNNING, 12fps
```

#### --request-file
Specifies a JSON file that contains the complete request i.e source, destination, tags and parameters.
See [Customizing Pipeline Requests](../docs/customizing_pipeline_requests.md) for examples of requests in JSON format.
> **Note**: As pipeline_client volume mounts /tmp, the request file may be placed there.

A sample request file can look like
```json
{
    "source": {
        "uri": "https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true",
        "type": "uri"
    },
    "destination": {
        "metadata": {
            "type": "file",
            "path": "/tmp/results.jsonl",
            "format": "json-lines"
        }
    },
    "parameters": {
        "detection-device": "GPU"
    }
}
```
The above file, named for instance as /tmp/sample_request.json may be used as follows:
```
./client/pipeline_client.sh start object_detection/person_vehicle_bike \
  --request-file /tmp/sample_request.json
```

#### --show-request
All pipeline_client commands can be used with the `--show-request` option which will print out the HTTP request and exit i.e it will not be sent to the Pipeline Server.
This example shows the result of `--show-request` when the pipeline is started with options passed in
```
./client/pipeline_client.sh start object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true \
  --destination path /tmp/newfile.jsonl \
  --parameter detection-device GPU --tag direction east --tag camera_location parking_lot --show-request
```
```
<snip>
POST http://localhost:8080/pipelines/object_detection/person_vehicle_bike
Body:{'source': {'uri': 'https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true', 'type': 'uri'}, 'destination': {'metadata': {'type': 'file', 'path': '/tmp/newfile.jsonl', 'format': 'json-lines'}}, 'parameters': {'detection-device': 'GPU'}, 'tags': {'direction': 'east', 'camera_location': 'parking_lot'}}
```
See [View REST request](../README.md#view-rest-request) to see how the output from `--show-request` can be mapped to a curl command.

### Status/Wait/Stop Arguments
This section summarizes all the arguments for pipeline_client `status`, `wait` and `stop` commands.

#### pipeline (required)
Positional argument (first) that specifies the pipeline to wait on/query status of/stop as indicated in the form of `pipeline name/pipeline version`

#### instance (required)
Positional argument (second) that specifies pipeline instance id to wait on/query status of/stop based on the command.

#### --show-request
As mentioned before, `--show-request` option which will print out the HTTP request and exit.

##### Status
```
./client/pipeline_client.sh status object_detection/person_vehicle_bike \
  94cf72b718184615bfc181c6589b240c --show-request
```
```
<snip>
GET http://localhost:8080/pipelines/object_detection/person_vehicle_bike/status/94cf72b718184615bfc181c6589b240c
```
##### Wait
```
./client/pipeline_client.sh wait object_detection/person_vehicle_bike \
  94cf72b718184615bfc181c6589b240c --show-request
```
```
<snip>
GET http://localhost:8080/pipelines/object_detection/person_vehicle_bike/status/94cf72b718184615bfc181c6589b240c
```
##### Stop
```
./client/pipeline_client.sh stop object_detection/person_vehicle_bike \
  94cf72b718184615bfc181c6589b240c --show-request
```
```
<snip>
DELETE http://localhost:8080/pipelines/object_detection/person_vehicle_bike/94cf72b718184615bfc181c6589b240c
```

### Using HTTPS with Pipeline Client

To use Pipeline Client together with HTTPS, the request must provide `--server-address` with a https address and `--server-cert` with the server certificate as a configuration option to configure the client with the server certificate. This is handled by `pipeline-client.sh` and is set as an Environment variable to `pipeline_client.py`. Below is an example:

#### --server-cert
Specifies a certificate for HTTPS. This information is added to each request to run on HTTPS with the given certificate.
This example makes pipeline_client.sh use HTTPS by setting `--server-address` and `--server-cert`

This adds an Environment variable `ENV_CERT` and `REQUESTS_CA_BUNDLE` to accomodate for self-signed certificates. These environment variables can be ignored if you are not using self-signed certificate.

```sh
$ client/pipeline_client.sh run object_detection/person_vehicle_bike \
  https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4\?raw\=true \
  --server-address https://localhost:8443 --server-cert samples/nginx/cert/server.crt

.
.
.

Starting pipeline object_detection/person_vehicle_bike, instance = 1843e91040da11edbaf2b62e8c582e09
Pipeline running - instance_id = 1843e91040da11edbaf2b62e8c582e09
No results will be displayed. Unable to read from file /tmp/results.jsonl
avg_fps: 593.75
Done
```

### Working with Kubernetes

As Kubernetes deploys its' own MQTT broker inside the cluster, Pipeline Client requires a configuration to be set to `pipeline_client.sh`. This is handled by `pipeline_client.sh` and this configuration option is set as an Environment variable to `pipeline_client.py` to override MQTT broker's address for Kubernetes use case.

#### --mqtt-cluster-broker
This argument is to be used together with MQTT destination. This argument is helpful when your MQTT broker & Pipeline Server instance is on a separate network from your client machine. This happens in the Kubernetes deployment. Use this argument to set the client to connect to the MQTT broker directly to get the output. This will set an Environment variable `MQTT_CLUSTER_BROKER` which will override the existing MQTT broker destination for the client to connect.

```
./client/pipeline_client.sh run object_detection/person_vehicle_bike \
  https://lvamedia.blob.core.windows.net/public/homes_00425.mkv \
  --server-address http://remote-server.my-domain.com:8080 \
  --destination type mqtt --destination host mqtt-broker-address:1883 \
  --destination topic person-vehicle-bike \
  --mqtt-cluster-broker cluster-mqtt-broker-address:1883
```

repository: whbruce/video-analytics-serving

repo_name: whbruce/video-analytics-serving


text:
# EUROCONTROL R&D data archive

Load and visualize EUROCONTROL R&D data archive air traffic data with Python framework

Air traffic data are stored as [pandas](https://pandas.pydata.org/) / [GeoPandas](http://geopandas.org/) dataframes

The map background is built with [contextily](https://github.com/darribas/contextily)

Example 1: visualize EUROCONTROL R&D data archive sample

![sample](sample.png)

Example 2: visualize data archive extraction (set of short-haul flights over German upper airspace)

![filtering](filtering.png)

Example 3: analyze some flights data

![fldistribution](fldistribution.png)

## Running the tests

Run the following notebooks to load and visualize air traffic data:

* demo_sample: notebook to load and visualize the EUROCONTROL R&D data archive sample

* demo_archive_load: notebook to load an archive as pandas dataframes

* demo_archive_filtering: notebook to filter a data archive and export a smaller extraction

* demo_stats: notebook to load an archive and analyze some flights data with pandas tools

Run the

## Built With

* [pandas](https://pandas.pydata.org/) - Python Data Analysis Library

* [GeoPandas](http://geopandas.org/) - GeoPandas is an open source project which extends the datatypes used by pandas to allow spatial operations on geometric types.

* [contextily](https://github.com/darribas/contextily) - Context geo-tiles in Python

## Authors

* **Thomas Dubot**

## License

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

## Acknowledgments

EUROCONTROL R&D archive data & information can be found [here](https://www.eurocontrol.int/dashboard/rnd-data-archive)

repository: thomasdubdub/eurocontrol-data-archive

branch_name: refs/heads/main

repo_name: thomasdubdub/eurocontrol-data-archive


text:
## NEMS (NodeJs ExpressJS MongoDB Blog)

Starter kit for web application using NodeJS and MongoDB

# Installation

npm install

## License

NEMS is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

#Login & Register
/login
/register

repository: rahmatcmos/nodeblog-MongoDB

repo_name: rahmatcmos/nodeblog-MongoDB


text:
# Contributing

**The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the [Discord server](https://discord.gg/gkZCQtH) instead of opening an issue – you will get redirected there anyway.**

If you wish to contribute to the guidebot codebase, feel free to fork the repository and submit a
pull request. We use ESLint to enforce a consistent coding style, so having that set up in your editor of choice
is a great boon to your development process.

## Setup
To get ready to work on the codebase, please do the following:

1. Fork & clone the repository, and make sure you're on the **master** branch
2. Run `npm install`
3. Code your heart out!
4. [Submit a pull request](https://github.com/An-Idiots-Guide/guidebot/compare)

repository: Favetti/hadesbotty

gha_language: JavaScript

gha_license_id: MIT

repo_name: Favetti/hadesbotty


text:
# prompt-skeleton

This project aims to bring a **consistent behavior to CLI apps**.

Use [`cli-prompter`](https://github.com/ahdinosaur/cli-prompter) if you want to have batteries included or if you want to chain prompts.

[![npm version](https://img.shields.io/npm/v/prompt-skeleton.svg)](https://www.npmjs.com/package/prompt-skeleton)
[![dependency status](https://img.shields.io/david/derhuerst/prompt-skeleton.svg)](https://david-dm.org/derhuerst/prompt-skeleton#info=dependencies)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/prompt-skeleton.svg)
[![support me via GitHub Sponsors](https://img.shields.io/badge/support%20me-donate-fa7664.svg)](https://github.com/sponsors/derhuerst)
[![chat with me on Twitter](https://img.shields.io/badge/chat%20with%20me-on%20Twitter-1da1f2.svg)](https://twitter.com/derhuerst)

Instead of letting prompts parse user input by themselves, *prompt-skeleton* provides a [standard set of actions like `submit`](#actions), which prompts can act on by exposing methods. The key bindings are [readline](https://de.wikipedia.org/wiki/GNU_readline)-inspired.

## Projects using `prompt-skeleton`

Prompts:

- [`sms-cli`](https://github.com/derhuerst/sms-cli)
- [`date-prompt`](https://github.com/derhuerst/date-prompt)
- [`mail-prompt`](https://github.com/derhuerst/mail-prompt)
- [`multiselect-prompt`](https://github.com/derhuerst/multiselect-prompt)
- [`number-prompt`](https://github.com/derhuerst/number-prompt)
- [`range-prompt`](https://github.com/derhuerst/range-prompt)
- [`select-prompt`](https://github.com/derhuerst/select-prompt)
- [`text-prompt`](https://github.com/derhuerst/text-prompt)
- [`tree-select-prompt`](https://github.com/derhuerst/tree-select-prompt)
- [`cli-autocomplete`](https://github.com/derhuerst/cli-autocomplete)
- [`switch-prompt`](https://github.com/derhuerst/switch-prompt)

Other command line interfaces:

- [`really-basic-chat-ui`](https://github.com/derhuerst/really-basic-chat-ui)
- [`command-irail`](https://github.com/iRail/command-irail)
- [`cli-2048`](https://github.com/derhuerst/cli-2048)
- [`cli-minesweeper`](https://github.com/derhuerst/cli-minesweeper)
- [`tiny-cli-editor`](https://github.com/derhuerst/tiny-cli-editor)

## Installing

```
npm install prompt-skeleton
```

## Usage

```js
wrap(prompt) // Promise
```

To render to screen, [`write`](https://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback) to `prompt.out`. Because `prompt.out` is a [`ansi-diff-stream`](https://www.npmjs.com/package/ansi-diff-stream#usage), you can also clear the screen manually be calling `prompt.out.clear()`.

### Actions

You can process any of these actions by exposing a method `prompt[action]`.

- `first`/`last` – move to the first/last letter/digit
- `left`/`right`
- `up`/`down`
- `next` - for tabbing
- `delete` – remove letter/digit left to the cursor
- `space`
- `submit` – success, close the prompt
- `abort` – failure, close the prompt
- `reset`

### Example

This renders a prompt that lets you pick a number.

```js
const wrap = require('prompt-skeleton')

const prompt = wrap({
	value: 0,
	up: function () {
		this.value++
		this.render()
	},
	down: function () {
		this.value--
		this.render()
	},
	render: function () {
		this.out.write(`The value is ${this.value}.`)
	}
})

prompt
.then((val) => {
	// prompt succeeded, do something with the value
})
.catch((val) => {
	// prompt aborted, do something with the value
})
```

## Contributing

If you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/prompt-skeleton/issues).

license: ISC

repository: derhuerst/prompt-skeleton

repo_name: derhuerst/prompt-skeleton


text:
Cosmpolitan
==============
A 4kb JavaScript library with no dependencies that gets your app talking

    cosmpolitan.google();   // "https://plus.google.com/share?url=https://github.com/instore/cosmopolitan"
    cosmpolitan.twitter();  // "http://twitter.com/home?status=instore%2Fcosmopolitan%20%C2%B7%20GitHub%3A%20https%3A%2F%2Fgithub.com%2Finstore%2Fcosmopolitan"

Try them out yourself:
   Share on Google
   Share on Twitter

Cosmopolitan has built-in support for Facebook, Twitter, Stumbleupon, GooglePlus, Reddit, and LinkedIn.

Three easy steps
--------------

- 1 Set your defaults
- 2 Set your links
- 3 Relax and enjoy

1 Set your defaults
--------------
At the top of *cosmopolitan.js* and *cosmopolitan_min.js* is a defaults object literal.

    defaults: {

    // your website URL, defaults to current url
    url: window.location.href,

    // the name of your company, defaults to document's title
    source: window.document.title,

    // the title of your link, defaults to document's title
    title: window.document.title,

    // a basic summary of your page, defaults to page's meta description
    summary: "",

    // replace with your facebook app_id, defaults to Cosmpolitan's application id
    facebook_app_id: "472158962873088",

    // replae with your application's image, defaults to Cosmpolitan's application image
    app_image_url: "https://fbcdn-photos-c-a.akamaihd.net/hphotos-ak-prn1/851578_472160816206236_251760216_n.png"
    }

Change these defaults to suit your needs. For example set *url* as your website url, *source* as your company name, and *summary* as your page's summary.

Rather than change defaults application wide, you can alternatively set these defaults on each page for example:

    cosmopolitan.defaults.source = "My Company";
    cosmopolitan.defaults.description = "My Company provides tools for businesses.";

2 Set your links
--------------

Cosmpolitan.js exposes six social services each that maps to a function which returns a URl that shares your website's content. For example if I'm on "http://www.verdiergun.com" calling cosmopolitan.google() returns "https://plus.google.com/share?url=http://verdiergun.com/"

These are the services and this is how they map:

- reddit      : cosmopolitan.reddit()
- google plus : cosmopolitan.google()
- linkedin    : cosmopolitan.linkedin()
- stumbleupon : cosmopolitan.stumbleupon()
- twitter     : cosmopolitan.twitter()
- facebook    : cosmopolitan.facebook()

This library doesn't make assumptions about where you will embed these links. For example if you have this HTML:

    Share on Google

You could set up sharing with:

    $('#google').href(cosmopolitan.google()) //using jQuery

    document.getElementById('google').href = cosmopolitan.google() //using regular JavaScript

3 Relax and enjoy
--------------

Sit back, relax, and enjoy a fresh Cosmpolitan.

About, License, etc...
--------------
This library was created from our blog. We use the library to power our own social service sharing.

MIT License. © MMIX – MMXIII Own Group, Inc. All rights reserved.

repository: instore/cosmopolitan

repo_name: instore/cosmopolitan


text:
# zamzar-php

A simple PHP script to demonstrate usage of the [Zamzar file conversion API](https://developers.zamzar.com/).

The script:

1. Uploads a file for conversion
2. Polls the API to verify if the conversion job has completed
3. Downloads any converted files when it has completed

## Prereqs

Make sure you have:

* A version of PHP >5.3 installed.
* [Registered for a Zamzar API account](https://developers.zamzar.com/pricing) and have a valid API key that you can use.

## Running the script

* Change the `YOUR_API_KEY` to use your Zamzar API key
* Modify `$sourceFilePath` to point to a file on your local filesystem you wish to convert
* Update `$convertedFilePath` to use a path on your local filesystem where you wish to save any converted files.
* Change `$targetFormat` to the name of a target format you wish to convert your file to ([check here](https://developers.zamzar.com/formats) for a full list of supported formats).
* Run the script from the command line using: `php zamzar-sample.php`

For further information check out the [Zamzar API docs here](https://developers.zamzar.com/docs).

repository: whyleyc/zamzar-php

gha_language: PHP

repo_name: whyleyc/zamzar-php


text:
## intent:Default Welcome Intent
- just going to say hi
- heya
- hello hi
- howdy
- hey there
- hi there
- greetings
- hey
- long time no see
- hello
- lovely day isn't it
- I greet you
- hello again
- hi
- hello there
- hi there
- a good day

## intent:address
- What is an actual address?
- Where is this place?
- What is the address of this place?
- I am wondering how long does it take to get to the location?
- Does it take a long time to get to the place?
- Does it take long to get there?
- Can you please tell me the actual address?
- Where about is it?
- What is the location of it?
- Where is the place?
- Can you tell me the address?
- What's the address?
- Where is it?

## intent:goodbye
- Bye for now
- Talk to you later.
- Goodbye
- Awesome, bye bye
- Talk to you later!

## intent:opening_hours
- Is the place still open today?
- Is the place open today?
- Tell me if it's open.
- Can you tell me if it's open at the moment?

- Is it open at the moment?
- Is it working?
- Is it currently open?
- Is it still open?

## intent:place_search
- - Looking for a [cinema](query).
- I am looking for a [bank](query) within [25](number) meters from here.
- Is there a [bank](query) anywhere close?
- I am looking for a [club](query) nearby.
- I am wondering if I can find a [train station](query) within [250](number) meters from here?
- Please tell me is there a [museum](query) around?
- I am looking for a [hair salon](query) within [20](number) meters from here.
- Where can I find the [mall](query)?
- Where is the closest [shop](query)?
- Is there a [market](query) within [500](number) meters?
- Can you tell me where is the [museum](query) in [100](number) meters from where I am?
- Looking for a [supermarket](query) within [50](number) meters from me.
- Where is the closest [cinema](query)
- I am looking for a [restaurant](query)

## intent:rating
- I want to know the rating
- What rating does it have?
- Do you know the rating of this place?
- Tell me the rating
- Does it have a good rating?
- What is the rating of this place?

## intent:thanks
- Thank you so much
- Thank you very much
- Thanks a bunch
- Thanks a lot
- thank you
- thanks


text:
[clappr](../../../index.md) / [io.clappr.player](../../index.md) / [Player](../index.md) / [State](index.md) / [PLAYING](./-p-l-a-y-i-n-g.md)

# PLAYING

`PLAYING`

Playing media.

repository: clappr/clappr-android

branch_name: refs/heads/dev

gha_language: Kotlin

repo_name: clappr/clappr-android


text:
# ubuntu-soe
Standard operating environment for java development on Ubuntu.

To install simply open a new terminal and enter:
```sh
curl -s "https://raw.githubusercontent.com/avqodev/ubuntu-soe/master/soe.sh" | bash
```
Then navigate to _$HOME/.soe_ and proceed as desired.

repository: avqodev/ubuntu-soe

repo_name: avqodev/ubuntu-soe


text:
## Juple
Juple is a Java library that can be used to convert Java objects into a Tuple Markup Language (TML) representation. It can also be used to convert a TML string to an equivalent Java object. Juple can also convert TML to node trees that are searchable by patterns.

The [Tuple Markup Language](https://github.com/judnich/TupleMarkup) specification was originally written by John Judnich.

Juple uses modified code from [Google's Gson](https://code.google.com/p/google-gson/) which is released as open-source under the [Apache Liscense, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).

### Why Juple?
Juple was created to combine the simplicity and elegance of John Judnich's Tuple Markup Language with the versatility and power of Google's Gson.

### What is in this repository?
Documentation:
* **README.md** this file
* **USER_GUIDE.md** illustrates how to use Juple ([link](https://github.com/codetaylor/Juple/blob/master/USER_GUIDE.md))
* **SYNTAX.md** highlights how Juple interprets TML  ([link](https://github.com/codetaylor/Juple/blob/master/SYNTAX.md))
* **LICENSE** the license  ([link](https://github.com/codetaylor/Juple/blob/master/LICENSE))

The `com.sudoplay.juple` package contains several classes of interest:
* **Juple** serializes and deserializes Java objects to and from TML.
* **JupleBuilder** builds a Juple instance with user defined settings.
* **TMLNodeTreeParser** parses TML into a pattern searchable node tree.
* **TMLReader** is a wrapper for java.io.Reader with methods to assert syntax and read data.
* **TMLWriter** is a wrapper for java.io.Writer with methods to assert syntax and write data.

## Example

It is very simple to create a Java object from its TML representation using Juple.

##### TML
```java
[
    [ name | Ethereal Filcher ]
    [ life | 22 ]
    [ location |
        [ x | 6.2 ]
        [ y | 5.4 ]
        [ z | -3.14 ]
    ]
    [ ethereal | true ]
]
```
##### Java Objects
```java
public class Vector3f {
    public float x, y, z;

    public Vector3f() {}
}

public class Monster {
    private String name;
    private int life;
    private Vector3f location;
    private boolean ethereal;

    public Monster() {}
}
```
##### Java
```java
Juple juple = new Juple();
Monster monster = juple.fromTML(reader, Monster.class);
```
For more examples, check out the examples folder.

## License

Copyright © 2013 Jason Taylor. Released as open-source under [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).

repository: codetaylor/Juple

repo_name: codetaylor/Juple


text:
---
title: "Participatory Research for Low-resourced Machine Translation:
A Case Study in African Languages"
authors:
- Nekoto
- et al.
date: "2020-11-16T00:00:00Z"
doi:

# Schedule page publish date (NOT publication's date).
publishDate: "2018-11-18T00:00:00Z"

# Publication type.
# Legend: 0 = Uncategorized; 1 = Conference paper; 2 = Journal article;
# 3 = Preprint / Working Paper; 4 = Report; 5 = Book; 6 = Book section;
# 7 = Thesis; 8 = Patent
publication_types: ["1"]

# Publication name and optional abbreviated publication name.
publication: In *EMNLP finidngs*
publication_short: In **

abstract: Research in NLP lacks geographic diversity, and the question of how NLP can
be scaled to low-resourced languages has
not yet been adequately solved. “Lowresourced”-ness is a complex problem going beyond data availability and reflects
systemic problems in society.
In this paper, we focus on the task of Machine Translation (MT), that plays a crucial role for information accessibility and
communication worldwide. Despite immense improvements in MT over the past
decade, MT is centered around a few highresourced languages.

As MT researchers cannot solve the problem of low-resourcedness alone, we propose participatory research as a means to
involve all necessary agents required in
the MT development process. We demonstrate the feasibility and scalability of participatory research with a case study on
MT for African languages. Its implementation leads to a collection of novel
translation datasets, MT benchmarks for
over 30 languages, with human evaluations for a third of them, and enables participants without formal training to make
a unique scientific contribution. Benchmarks, models, data, code, and evaluation
results are released at https://github.
com/masakhane-io/masakhane-mt.

# Summary. An optional shortened abstract.
summary: As MT researchers cannot solve the problem of low-resourcedness alone, we propose participatory research as a means to
involve all necessary agents required in
the MT development process. We demonstrate the feasibility and scalability of participatory research with a case study on
MT for African languages.

tags:
- Computer Science
- Computation and Language
featured: true

links:
- name: Paper
  url: 'https://www.aclweb.org/anthology/2020.findings-emnlp.195.pdf'
url_code: 'https://www.aclweb.org/anthology/2020.findings-emnlp.195.pdf'
url_dataset: ''
url_poster: ''
url_project: ''
url_slides: ''
url_source: ''
url_video: ''

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
image:
  caption: ''
  focal_point: ""
  preview_only: false

# Associated Projects (optional).
#   Associate this publication with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `internal-project` references `content/project/internal-project/index.md`.
#   Otherwise, set `projects: []`.
projects:
- internal-project

# Slides (optional).
#   Associate this publication with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides: "example"` references `content/slides/example/index.md`.
#   Otherwise, set `slides: ""`.
slides: example
---

{{% alert note %}}
Click the *Cite* button above to demo the feature to enable visitors to import publication metadata into their reference management software.
{{% /alert %}}

{{% alert note %}}
Click the *Slides* button above to demo Academic's Markdown slides feature.
{{% /alert %}}

Supplementary notes can be added here, including [code and math](https://sourcethemes.com/academic/docs/writing-markdown-latex/).


text:
# Overview
`"` is an language based on Unicode symbols. Its fundamental elements are roots, which represent basic ideas.

# Features
**Oligosynthesis**: `"` has few roots, but these roots often join together to form larger words.

**Loose Grammar**: More on this later; basically, roots and words can be moved around rather freely.

**Absence of POS**: Conventional parts of speech are done away with. Instead, the roots change into actions with a few modifiers.

repository: molarmanful/-

path: /syntax/0) overview.md

filename: 0) overview.md

repo_name: molarmanful/-


text:
# Client–server model

## wikipedia [Client–server model](https://en.wikipedia.org/wiki/Client%E2%80%93server_model)

**Client–server model** is a [distributed application](https://en.wikipedia.org/wiki/Distributed_application) structure that partitions tasks or workloads between the providers of a resource or service, called [servers](https://en.wikipedia.org/wiki/Server_(computing)), and service requesters, called [clients](https://en.wikipedia.org/wiki/Client_(computing)).

repository: dengking/Parallel-computing

repo_name: dengking/Parallel-computing


text:
# Safe Redis Leader

## Goal

The Safe Redis Leader JS module is designed to provide a leader election implementation that provides tested gaurentees that there is only a single leader elected from a group of clients at one time.

The implementation is a port of the stale [Redis Leader npm package](https://github.com/pierreinglebert/redis-leader) that implements a solution to the [known race condition](https://github.com/pierreinglebert/redis-leader/blob/c3b4db5df9802908728ad0ae4310a52e74acb462/index.js#L81). Additionally, this rewritten package:

1. Removes the usage of `.bind` and `this`, as well as prototype inheritance (Without introducing classes in the main impl)
2. Only exposes public api functions that should be exposed (no more public-but-should-be-private `_elect` fn)
3. has a test suite within docker-compose using a real redis instance, which allows anyone to run the tests with no heavy dependency setup
4. Has tests to assert the known race condition can no longer occur
5. removes the need for `new`, by providing a simple `createSafeRedisLeader(...)` public fn
6. Replace callback-hell with async/await

## Usage

Install the package:

```bash
    npm install --save safe-redis-leader
```

in one terminal, run the follow index.js:

```javascript
    const {createSafeRedisLeader} = require('safe-redis-leader')
    const Redis = require('ioredis')

    async function main(){

      const asyncRedis = new Redis({
        host: "localhost",
        port: 6379,
        password: "some-password"
      })

      const leaderElectionKey = 'the-election'

      const safeLeader = await createSafeRedisLeader({
        asyncRedis: asyncRedis,
        ttl: 1500,
        wait: 3000,
        key: leaderElectionKey
      })

      safeLeader.on("elected", ()=>{
        console.log("I'm the leader - 1")
      })

      await safeLeader.elect()
    }

  main().catch((e)=>{
    console.error(e)
    process.exit(1)
  })
```

In a seperate terminal/tab, run the following index.js:

```javascript
    const {createSafeRedisLeader} = require('safe-redis-leader')
    const Redis = require('ioredis')

    async function main(){

      const asyncRedis = new Redis({
        host: "localhost",
        port: 6379,
        password: "some-password"
      })

      const leaderElectionKey = 'the-election'

      const safeLeader = await createSafeRedisLeader({
        asyncRedis: asyncRedis,
        ttl: 1500,
        wait: 3000,
        key: leaderElectionKey
      })

      safeLeader.on("elected", ()=>{
        console.log("I'm the leader - 2")
      })

      await safeLeader.elect()
    }

  main().catch((e)=>{
    console.error(e)
    process.exit(1)
  })
```

## Run Library Tests

npm run docker:test

# License
MIT


text:
deck.gl | Website

 WebGL2-powered, highly performant large-scale data visualization

[![docs](http://i.imgur.com/mvfvgf0.jpg)](https://uber.github.io/deck.gl)

## Installation

```
npm install deck.gl
```

## Using deck.gl

deck.gl offers an extensive catalog of pre-packaged visualization "layers", including [ScatterplotLayer](http://deck.gl/#/documentation/deckgl-api-reference/layers/scatterplot-layer), [ArcLayer](http://deck.gl/#/documentation/deckgl-api-reference/layers/arc-layer), [TextLayer](http://deck.gl/#/documentation/deckgl-api-reference/layers/text-layer), [GeoJsonLayer](http://deck.gl/#/documentation/deckgl-api-reference/layers/geojson-layer), etc. The input to a layer is usually an array of JSON objects. Each layer offers highly-flexible API to customize how the data should be rendered.

Example constructing a deck.gl ScatterplotLayer:

```js
import {ScatterplotLayer} from<EMAIL_ADDRESS>
/**
 * data is an array of object in the shape of:
 * {
 *   "name":"Montgomery St. (MONT)",
 *   "address":"598 Market Street, San Francisco CA 94104",
 *   "entries":"43430",
 *   "exits":"45128",
 *   "coordinates":[-122.401407,37.789256]
 * }
 */
const scatterplotLayer = new ScatterplotLayer({
  id: 'bart-stations',
  data: 'https://github.com/uber-common/deck.gl-data/blob/master/website/bart-stations.json',
  getRadius: d => Math.sqrt(d.entries) / 100,
  getPosition: d => d.coordinates,
  getFillColor: [255, 228, 0],
});
```

## Using deck.gl with React

```js
import DeckGL from 'deck.gl';

<DeckGL width="100%" height="100%" longitude={-122.4} latitude={37.78} zoom={8} controller={true} layers={[scatterplotLayer]} />
```

## Using deck.gl with Pure JS

```js
import {Deck} from<EMAIL_ADDRESS>
const deck = new Deck({
  container: document.body,
  width: '100vw',
  height: '100vh',
  longitude: -122.4,
  latitude: 37.78,
  zoom: 8,
  controller: true,
  layers: [scatterplotLayer]
});
```

Minimum setups of end-to-end deck.gl usage is also showcased in the [hello-world examples](./examples/get-started), using both [webpack](https://webpack.js.org/) and [browserify](http://browserify.org/), so you can choose which bundler you prefer or are more familiar with.

To learn how to use deck.gl through the many examples that come with the deck.gl repo, please clone the latest **release** branch:

```
git clone -b 6.2-release --single-branch https://github.com/uber/deck.gl.git
```

For the most up-to-date information, see our [API documentations](http://deck.gl/#/documentation)

## Contributing

PRs and bug reports are welcome, and we are actively opening up the deck.gl [roadmap](./dev-docs) to facilitate for external contributors.

Note that you once your PR is about to be merged, you will be asked to register as a contributor by filling in a short form.

## Attributions

#### Data sources

Data sources are listed in each example.

#### The deck.gl project is supported by


text:
# Data Mining Projects

## Covid19 analysis

Data Analysis for covid-19 based on:
- [Owid](https://github.com/owid/covid-19-data/tree/master/public/data)
- [CDC](https://covid.cdc.gov/covid-data-tracker/#cases_casesper100klast7days)

On 18-11-202

## Recommendation Systems

I implemented and compared various algorithms used in recommendation systems based on their Root Mean Square Error(RMSE) using the Yelp Dataset:
- [Yelp Dataset](https://www.yelp.com/dataset)

On 10-12-2020

## Value Propagation

On the same Yelp Dataset using a Graph to represent Users(nodes) and its frienships(edges) I implemented Value Propagation algorithm as a **recommender system**. Then, I compared it with UCF, ICF, User Average, Business Average algorithms(for more info check recommender_systems.ipynb above) based on their RMSE.

repository: kasselouris/Data-Mining

repo_name: kasselouris/Data-Mining


text:
# Recursive Neural Network for Sentiment Analysis with Pytorch

A recursive neural network for sentiment analysis

## Introduction

This project is to implement the sentiment analyser in the paper: Recursive Deep Models for Sentiment Compositionality Over a Sentiment Treebank.
Actually, we can do sentiment analysis using different kinds of structures, like RNN and CNN. The reason why we use Recursive Neural Network is
that this kind of network take into consideration the syntactic structure of the sentences. On the other hand, Stanford Sentiment Treebank provides
us with large amount of high quality parsed data to train a Recursive Neural Network. </br>

The architecture of the network: </br>
![Architecture](Architecture.png) </br>
The dataset structure: </br>
![Treebank](Treebank.png) </br>

## Methodology

1. Read sentences from file build tree structures for each sentence
2. Build a recursive neural network model sentiment analysis
3. Train the model with approporiate learning rate
4. Evluate the model with test data
Note: We need to write two recursion, one for parsing string to tree structured data, one for computing vector representation for each phrase.

## Result
Test Acc:  67.19370460048427

## References:
https://nlp.stanford.edu/~socherr/EMNLP2013_RNTN.pdf </br>
https://nbviewer.jupyter.org/github/DSKSD/DeepNLP-models-Pytorch/blob/master/notebooks/09.Recursive-NN-for-Sentiment-Classification.ipynb </br>
https://nlp.stanford.edu/sentiment/index.html </br>
https://github.com/aykutfirat/pyTorchTree </br>

repository: dmitrijmangul/RecNN-pytorch

repo_name: dmitrijmangul/RecNN-pytorch


text:
---
title: " Permission denied (publickey)"
sidebar: errors_sidebar
permalink: error-permission-denied.html
---
With this error message an SSH command to Gerrit is rejected if the SSH
authentication is not successful.

The [SSH](http://en.wikipedia.org/wiki/Secure_Shell) protocol can use
[Public-key
Cryptography](http://en.wikipedia.org/wiki/Public-key_cryptography) for
authentication. In general configurations, Gerrit will authenticate you
by the public keys known to you. Optionally, it can be configured by the
administrator to allow for
[kerberos](config-gerrit.html#sshd.kerberosKeytab) authentication
instead.

In any case, verify that you are using the correct username for the SSH
command and that it is typed correctly (case sensitive). You can look up
your username in the Gerrit Web UI under *Settings* → *Profile*.

If you are facing this problem and using an SSH keypair, do the
following:

1.  Verify that you have uploaded your public SSH key for your Gerrit
    account. To do this go in the Gerrit Web UI to *Settings* → *SSH
    Public Keys* and check that your public SSH key is there. If your
    public SSH key is not there you have to upload it.

2.  Verify that you are using the correct private SSH key. To find out
    which private SSH key is used test the SSH authentication as
    described below. From the trace you should see which private SSH key
    is used.

Debugging kerberos issues can be quite hard given the complexity of the
protocol. In case you are using kerberos authentication, do the
following:

1.  Verify that you have acquired a valid initial ticket. On a Linux
    machine, you can acquire one using the `kinit` command. List all
    your tickets using the `klist` command. It should list all
    principals for which you have acquired a ticket and include a
    principal name corresponding to your Gerrit server, for example
<EMAIL_ADDRESS>Note that tickets can
    expire and require you to re-run `kinit` periodically.

2.  Verify that your SSH client is using kerberos authentication. For
    OpenSSH clients this can be controlled using the
    `GSSAPIAuthentication` setting. For more information see [SSH
    kerberos configuration](user-upload.html#configure_ssh_kerberos).

## Test SSH authentication

To test the SSH authentication you can run the following SSH command.
This command will print out a detailed trace which is helpful to analyze
problems with the SSH authentication:

```
  $ ssh -vv -p 29418<EMAIL_ADDRESS>```

If the SSH authentication is successful you should find the following
lines in the output:

```
  ...

  debug1: Authentication succeeded (publickey).

  ...

  Unfortunately, interactive shells are disabled.
  To clone a hosted Git repository, use:

  git clone ssh://john.doe@git.example.com:29418/REPOSITORY_NAME.git

  ...
```

## GERRIT

Part of [Gerrit Error Messages](error-messages.html)

## SEARCHBOX

repository: omunroe-com/gerrihmpg

repo_name: omunroe-com/gerrihmpg


text:
---
layout: post
title:  "7_0_6_patch2"
date:   2017-10-06 16:42:42 +0200
categories: cmssw
relmajor: 7
relminor: 0
relsubminor: 6
relpatch: _patch2
---

# CMSSW_7_0_6_patch2
#### Changes since CMSSW_7_0_6_patch1:

1. [4512](http://github.com/cms-sw/cmssw/pull/4512){:target="_blank"}  from **@tlampen**: Backport of PR #4354. Use word disc for TEC and TID instead of layer (printouts and file names... `alca`  created: 2014-07-03T17:30:13Z merged: 2014-07-08T16:22:18Z

1. [4550](http://github.com/cms-sw/cmssw/pull/4550){:target="_blank"}  from **@mdhildreth**: Configure SiStrip noise the same in production and validation modes! Sup... `simulation`  created: 2014-07-08T02:42:20Z merged: 2014-07-08T16:21:55Z

repository: rovere/ReleaseNotes

repo_name: rovere/ReleaseNotes


text:
# loading="lazy" attribute polyfill

[![Financial Contributors on Open Collective](https://opencollective.com/loading-attribute-polyfill/all/badge.svg?label=financial+contributors)](https://opencollective.com/loading-attribute-polyfill) [![MIT license](https://img.shields.io/npm/l/loading-attribute-polyfill.svg "license badge")](https://opensource.org/licenses/mit-license.php)
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/loading-attribute-polyfill)](https://bundlephobia.com/result?p=loading-attribute-polyfill)
[![Total downloads ~ Npmjs](https://img.shields.io/npm/dt/loading-attribute-polyfill.svg "Count of total downloads – NPM")](https://npmjs.com/package/loading-attribute-polyfill 'loading="lazy"-attribute polyfill – on NPM')
[![jsDelivr CDN downloads](https://data.jsdelivr.com/v1/package/npm/loading-attribute-polyfill/badge "Count of total downloads – jsDelivr")](https://www.jsdelivr.com/package/npm/loading-attribute-polyfill "loading-attribute polyfill – on jsDelivr")
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4f4cc692565d425c82860d18a11f17d4)](https://www.codacy.com/gh/mfranzke/loading-attribute-polyfill/dashboard)
[![Known Vulnerabilities](https://snyk.io/test/github/mfranzke/loading-attribute-polyfill/badge.svg?targetFile=package.json)](https://snyk.io/test/github/mfranzke/loading-attribute-polyfill?targetFile=package.json)
[![CodeQL](https://github.com/mfranzke/loading-attribute-polyfill/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/mfranzke/loading-attribute-polyfill/actions/workflows/codeql-analysis.yml)
[![GitHub Super-Linter](https://github.com/mfranzke/loading-attribute-polyfill/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/mfranzke/loading-attribute-polyfill/actions/workflows/linter.yml)
[![loading-attribute-polyfill on Npmjs](https://img.shields.io/npm/v/loading-attribute-polyfill.svg?color=rgb%28237%2C%2028%2C%2036%29 "npm version")](https://npmjs.com/package/loading-attribute-polyfill 'loading="lazy"-attribute polyfill – on NPM')
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![Join the chat at https://gitter.im/loading-attribute-polyfill/community](https://badges.gitter.im/loading-attribute-polyfill/community.svg)](https://gitter.im/loading-attribute-polyfill/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![Open Source Love](https://badges.frapsoft.com/os/v3/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](CODE-OF-CONDUCT.md)

Fast and lightweight vanilla JavaScript polyfill for native lazy loading, meaning the behaviour to load elements right before they enter the viewport. Provides graceful degradation, and is - not just thatfor - SEO friendly. Handles images with `srcset` and within `picture`, as well as `iframe` elements. `loading="lazy"` will be a huge improvement for todays web performance challenges, so use and polyfill it today!

- Released under the MIT license
- Made in Germany. And supported by so many great people from all over this planet - see "Credits" accordingly.
- Compatible down to Microsoft Internet Explorer 9

## Features

- Lightweight (see the badge above)
- Web standards: supports the standard `loading="lazy"` attribute on `img` and `iframe` elements
- Performance: it's based on highly efficient, best practice code.
- SEO & crawlers: the image and iframe contents aren't being hidden from crawlers that aren't capable of scrolling.
- Supporting HTML generating JavaScript frameworks through a method provided to reinit its functionality (see "Another solution, especially in combination with JavaScript framework usage" as well)

## Core concepts

The polyfill was designed with the following concepts kept in mind:

- dependency-free
- using JavaScript with graceful degradation

## Another solution, especially in combination with JavaScript framework usage

We're even also providing [another solution](https://github.com/mfranzke/loading-attribute-polyfill-with-serviceworker), which main architectural decision is that we're using Service Worker to intercept the image and iframe contents network requests there. This comes with some aspects that are important to mention, that might be either acceptable (have a look at the [other solution](https://github.com/mfranzke/loading-attribute-polyfill-with-serviceworker)) or not (stay with this one) on your requirements and technical context.

- Service Workers only run over **HTTPS**, for security reasons
- Service Worker need to get **registered on first page visit**
- Only works on **same domain** network requests

Whereas the first topic might not be a problem (anymore) on most websites – as this should be the de-facto standard nowadays – the second and third might be acceptable in your context, as this polyfill behaves as a progressive enhancement to provide the expected functionality even for non-supporting browsers both only on seconds pages request and any revisits and for same origin image and contents (iframe) requests even only.

## Installation

First you'll need to integrate the JavaScript file into your code.

You may optionally load via NPM or Bower:

    $ npm install loading-attribute-polyfill
    $ bower install loading-attribute-polyfill

You could load the polyfill asynchronously as well: <https://output.jsbin.com/codelib/1>

## Integration

Include one of the provided JavaScript files depending on your setup plus the CSS file:

```html
<link rel="stylesheet" href="dist/loading-attribute-polyfill.css" />
<script src="dist/loading-attribute-polyfill.umd.js" async></script>
```

or e.g. within JS

```js
import loadingAttributePolyfill from "node_modules/loading-attribute-polyfill/dist/loading-attribute-polyfill.module.js";
```

Afterwards, you need to wrap all of your `<img>` and `<iframe>` HTML tags (in the case of `<picture>` use the complementary `<source>` HTML tags) that you'd like to lazy load with a `<noscript>` HTML tag (with the attribute `class="loading-lazy"`.)

Please keep in mind that it's important to even also include `width` and `height` attributes on `<img>` HTML tags, as the browser could determine the aspect ratio via those two attributes values being set (even if you overwrite them via CSS), compare to the great work by Jen Simmons on this topic, e.g. within these articles <https://css-tricks.com/do-this-to-improve-image-loading-on-your-website/> (with video) or <https://css-tricks.com/what-if-we-got-aspect-ratio-sized-images-by-doing-almost-nothing/>

And please "Avoid lazy-loading images that are in the first visible viewport", compare to [the article "Browser-level image lazy-loading for the web"](https://web.dev/browser-level-image-lazy-loading/#avoid-lazy-loading-images-that-are-in-the-first-visible-viewport) published on web.dev:

> You should avoid setting `loading=lazy` for any images that are in the first visible viewport. It is recommended to only add `loading=lazy` to images which are positioned below the fold, if possible.

### Simple image

```html
<noscript class="loading-lazy">
	<img src="simpleimage.jpg" loading="lazy" alt=".." width="250" height="150" />
</noscript>
```

### Image wrapped in a picture tag

```html
<noscript class="loading-lazy">
	<picture>
		<source
			media="(min-width: 40em)"
			srcset="simpleimage.huge.jpg 1x, simpleimage.huge.2x.jpg 2x"
		/>
		<source srcset="simpleimage.jpg 1x, simpleimage.2x.jpg 2x" />
		<img
			src="simpleimage.jpg"
			loading="lazy"
			alt=".."
			width="250"
			height="150"
		/>
	</picture>
</noscript>
```

### Image with `srcset`

```html
<noscript class="loading-lazy">
	<img
		src="simpleimage.jpg"
		srcset="
			simpleimage.1024.jpg 1024w,
			simpleimage.640.jpg   640w,
			simpleimage.320.jpg   320w
		"
		sizes="(min-width: 36em) 33.3vw, 100vw"
		alt="A rad wolf"
		loading="lazy"
	/>
</noscript>
```

### Iframe

```html
<noscript class="loading-lazy">
	<iframe
		src="https://player.vimeo.com/video/87110435"
		width="320"
		height="180"
		loading="lazy"
	></iframe>
</noscript>
```

## Optional additional dependencies

In case you'd like to support [older versions of Microsoft Edge, Microsoft Internet Explorer 11 or Apple Safari up to 12.0](https://caniuse.com/#feat=intersectionobserver), you could (conditionally) load an IntersectionObserver polyfill:

<https://www.npmjs.com/package/intersection-observer>

Nevertheless this polyfill would still work in those browsers without that other polyfill included, but [this small amount of users](<(https://caniuse.com/#feat=intersectionobserver)>) wouldn't totally benefit from the lazy loading functionality - we've at least got you partly covered by using the [Microsoft proprietary lazy loading resource hints](https://caniuse.com/#feat=lazyload).

### Internet Explorer 9 & Internet Explorer 10

> Internet Explorer 9 and 10 have bugs where the 'interactive' state can be fired too early before the document has finished parsing.

Source: https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState

That for you would need to include the polyfill the latest within the HTML code, like the nearest to the closing `body` HTML tag, as including it e.g. within the `head` section might lead to an unexpected state, so that in worst case the images might not get loaded.

### Internet Explorer 9

The polyfill has been enhanced to even also provide it's functionality on IE9. But please keep in mind to even also include a `matchMedia` polyfill.

And the images are still displaying an error in the demo on IE9, as most likely (from my understanding) this browser doesn't work with the HTTPS protocol by GitHub pages any more, but the src-attributes values are correctly rewritten after all.

## API

In case that you're dynamically adding HTML elements within the browser, you could call the following method with an included [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) object, like e.g.:

```JavaScript
loadingAttributePolyfill.prepareElement(document.querySelector('main noscript.loading-lazy'));
```

## Demo

See the polyfill in action either by downloading / forking this repository and have a look at `demo/index.html`, or at the hosted demo: <https://mfranzke.github.io/loading-attribute-polyfill/demo/>

## Further implementations - Kudos for that

### WordPress

Nico23 has developed a WordPress plugin: <https://wordpress.org/plugins/native-lazyload-polyfill/> (which is much better than the one by Google !)

### PHP Twig Extension

@tim-thaler has developed a PHP Twig Extension: <https://github.com/tim-thaler/twig-loading-lazy>

### Craft Twig Loading Lazy plugin

@tim-thaler has even also developed a Craft Twig Loading Lazy plugin: <https://github.com/tim-thaler/craft-twig-loading-lazy>

## Credits

Credits for the initial kickstarter / script to @Sora2455 for better expressing my ideas & concepts and support by @cbirdsong, @eklingen, @DaPo, @nextgenthemes, @diogoterremoto, @dracos, @Flimm, @TomS-, @vinyfc93, @JordanDysart and @denyshutsal. Thank you very much for that, highly appreciated !

## Tested with

- Mac

  - Safari 14, macOS 11 (via CrossBrowserTesting)
  - Mozilla Firefox _latest_, macOS 10.14 (manually, localhost)

- iOS

  - Mobile Safari 12.0, iPad 6th Generation Simulator (manually)

- Windows

  - Google Chrome _latest_, Windows 10 (via CrossBrowserTesting)
  - Mozilla Firefox _latest_, Windows 10 (via CrossBrowserTesting)
  - Microsoft Edge version 18, Windows 10 (manually, localhost)
  - Microsoft Internet Explorer version 11, Windows 10 (via CrossBrowserTesting)
  - Internet Explorer 9.0.8112.16421, Windows 7 SP1 (manually, localhost)

### Big Thanks

Cross-browser testing platform provided by [CrossBrowserTesting](https://crossbrowsertesting.com)

[![CrossBrowserTesting](https://static1.smartbear.co/crossbrowsertesting/media/site/cbt-smartbear-logo.svg "CrossBrowserTesting")](https://crossbrowsertesting.com)

## Things to keep in mind

- The HTML demo code is meant to be simple
- This polyfill doesn't (so far) provide any functionality for the `loading="eager"` value, as this was released even already, but still seems to be in the measure, learn and improvements phase.

## More information on the standard

- [Specification](https://github.com/whatwg/html/pull/3752)
- [LazyLoad Explainer](https://github.com/scott-little/lazyload)

## Outro

If you're trying out and using my work, feel free to contact me and give me any feedback. I'm curious about how it's gonna be used.

And if you do like this polyfill, please consider even also having a look at the other polyfill we've developed: <https://github.com/mfranzke/datalist-polyfill/>

## Contributors

### Code Contributors

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].

### Financial Contributors

Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/loading-attribute-polyfill/contribute)]

#### Individuals

#### Organizations

Support this project with your organization.  [[Contribute](https://opencollective.com/loading-attribute-polyfill/contribute)]

repository: mfranzke/loading-attribute-polyfill

repo_name: mfranzke/loading-attribute-polyfill


text:
# Python Package Sniffer (PPS)
Package Sniffer for Python : Extract Package Names for Python Projects and Resolve Dependencies.

## Objective :

<blockquote>
 PPS is a Sniffer of Python Packages in a Directory. It used file structures to get you a complete list of installable packages for a fresh enviornment, with dependencies resolved.
</blockquote>

## Tasks to Solve :

- Have you ever worked on a project with a lot of scripts, notebooks and and a messy file structure?
- Do you like to work with clean isolated virtual environments?
- Do you have problems with dependency managements and frequently get import errors?

## Ideas :

- **Regex Solver** - Use `import x` from `*.py` and `*.ipynb` to check for package `x` in pip using cloud for the given directory. If found attach to file called `requirements.txt`.
- **Dependency Management & Resolver** - Use python poetry to get rid of program dependencies using latest python version preferably, or a fixed python version.
- **Smart Sense** - looks for various extensions from a smartfile to get the required package essentials. For example, big `h5` & `hdf5`, require package `h5py` for manipulating such files.


text:
---
title: "Growth Automation"
date: 2022-07-16T11:10:36+08:00
draft: false
language: en
featured_image: ../assets/images/featured/growth-automation.png
summary: Marketing consistently can be tough. We identify the right journeys that will help convert your existing clients more and help prospects fall in love with your products
description: Marketing consistently can be tough. We identify the right journeys that will help convert your existing clients more and help prospects fall in love with your products
author: EV Advisory
authorimage: ../assets/images/global/author.webp
categories: services
tags: services
---

### *Growing your business' sales by $50,000 or more over the course of a year*

Sustaining organic growth in your ecommerce business is like nurturing a garden. Without proper care and the right nutrients, even the most robust plants can wither. That's where we come in! Our growth automation services provide the vital support your business needs to thrive, continually bloom, and bear fruit.

 We meticulously analyze data, plucking out insights like weeds to clear the path for growth. From orchestrating social media marketing campaigns that resonate with your audience, to devising marketing strategies tailored to your unique business, we tend to your garden with expert care.

We don't stop there, though. Our e-mail nurturing journeys are the irrigation system your business garden needs, delivering the right message at the right time to keep your customers engaged. Be it abandoned cart reminders, thank-you notes, VIP appreciations, or more, we ensure each communication is timely, relevant, and adds value.

## Planting Seeds of Content 🌻
In the digital landscape, content is king, and we are the experienced landscapers you need. We craft a content strategy and planning that are as essential as sunlight, encouraging engagement, and fostering brand loyalty. Just as different plants need different amounts of sunlight, we tailor content strategy to your unique business needs and audience preferences.

 A gardener not only tends to the plants but also ensures the gardening tools are in top shape. In the same vein, [we offer operations redesign services to help your ecommerce business run like a well-oiled machine]({{< relref "services/operations-redesign">}}). Intrigued? Discover more about how we can help streamline your order fulfillment and inventory management.

## Embark on Your Growth Journey Today! 🌟
Your ecommerce business is a seed of potential. With our growth automation services, we provide the right environment, care, and nutrients for it to flourish into a lush, fruitful garden. Start your journey to sustainable growth today, and watch your business blossom.

Contact us today and let's cultivate your path to success together. [Your growth journey is just a click away! 🚀]({{< relref "contact" >}})

repository: Esturban/eval

gha_language: HTML

repo_name: Esturban/eval


text:
# facebook signed request for node.js

node.js port of [facebook-signeded-request](https://github.com/wooga/facebook-signed-request).
It implements the [signed request](http://developers.facebook.com/docs/authentication/signed_request/) sent by facebook to applications.

## Installation and Usage

clone this repository and then

	var SignedRequest = require(PATH_TO_LIB + '/lib/facebook-signed-request');
	SignedRequest.secret = "your facebook application secret";
	var request = yourRequestObjectParamsHash['signed_request'];
	var signedRequest = new SignedRequest( request );

	signedRequest.parse(function(errors, request){
	  // check if request was valid
	  console.log(request.isValid());

	  // access errors
	  console.log(errors);

	  // this is your data object
	  console.log(request.data);
	});

You can also sign requests to be used in your tests

	SignedRequest.secret = "897z956a2z7zzzzz5783z458zz3z7556";
 	SignedRequest.encodeAndSign({ user_id : '111111'})

which will output something in the format of

	gI7hojzSUZyrEP6/kh7TRCI6PZ6VucX0bvbcKxj10HY.eyJ1c2VyX2lkIjoiMTExMTExMSJ9

## Data sent by facebook

Here is an example

	{
		algorithm: 'HMAC-SHA256',
		expires:<PHONE_NUMBER>,
		issued_at:<PHONE_NUMBER>,
		oauth_token: '111111111111111|2.AQBAttRlLVnwqNPZ.3600.1111111111.1-111111111111111|T49w3BqoZUegypru51Gra70hED8',
		user: { country: 'de', locale: 'en_US', age: { min: 21 } },
		user_id: '111111111111111'
	}

## Tests

	npm install jasmine-node
	jasmine-node spec

repository: leonsbuddydave/CemeteryMania

repo_name: leonsbuddydave/CemeteryMania


text:
# Graphs - Get Edge
<!-- Short summary or background information -->
Given a business trip itinerary, and an Alaska Airlines route map, is the trip possible with direct flights? If so, how much will the total trip cost be?

## Challenge
<!-- Description of the challenge -->

Write a function based on the specifications above, which takes in a graph, and an array of city names. Without utilizing any of the built-in methods available to your language, return whether the full trip is possible with direct flights, and how much it would cost.

## Approach & Efficiency
<!-- What approach did you take? Why? What is the Big O space/time for this approach? -->

### Algorithm
```
Declare getEdge(nodeStart,nodeDestination)
  define result = false
  define directNeighbor <-- getNeighbors(nodeStart)
  directNeighbor.forEach( neighbor => {
    if neighbor === nodeDestination
      result <-- neighbor.weight
  })
  return result
```

## API
<!-- Description of each method publicly available in your Graph -->

[PR](https://github.com/astrokd/data-structures-and-algorithms/pull/57)

repository: astrokd/data-structures-and-algorithms

repo_name: astrokd/data-structures-and-algorithms


text:
---
hrs_structure:
  division: '2'
  volume: '8'
  title: '23'
  chapter: 425E
  section: '425E-604'
type: hrs_section
tags:
  - Business
menu:
  hrs:
    identifier: HRS_0425E-0604
    parent: HRS0425E
    name: 425E-604 Person's power to dissociate as a general partner;
weight: 48290
title: Person's power to dissociate as a general partner;
full_title: 425E-604 Person's power to dissociate as a general partner;
---
**[§425E-**604] Person's power to dissociate as a general partner; wrongful dissociation.**** (a) A person has the power to dissociate as a general partner at any time, rightfully or wrongfully, by express will pursuant to section 425E-603(1).

(b) A person's dissociation as a general partner is wrongful only if:

(1) It is in breach of an express provision of the partnership agreement; or

(2) It occurs before the termination of the limited partnership, and:

(A) The person withdraws as a general partner by express will;

(B) The person is expelled as a general partner by judicial determination under section 425E-603(5);

(C) The person is dissociated as a general partner by becoming a debtor in bankruptcy; or

(D) In the case of a person that is not an individual, trust other than a business trust, or estate, the person is expelled or otherwise dissociated as a general partner because it wilfully dissolved or terminated.

(c) A person that wrongfully dissociates as a general partner shall be liable to the limited partnership and, subject to section 425E-1001, to the other partners for damages caused by the dissociation. The liability shall be in addition to any other obligation of the general partner to the limited partnership or to the other partners. [L 2003, c 210, pt of §1]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
---
sidebar_position: 4
title: Step 3 - Structure dataset files
image: https://og.fairdataihub.org/api/ogimage?app=soda-for-sparc&title=Step%203%20-%20Structure%20dataset%20files&description=Prepare%20Dataset
---

Virtually structure your dataset using this interface as if you were organizing it on your computer but without actually modifying any local files. All your requested actions (files to be included, folders to be created, metadata information to be added, etc.) will be registered by SODA and only implemented when the dataset is generated during Step 6.

- Go inside a folder by double-clicking on it.
- Import files/folders inside a folder using drag-and-drop or the `Import` menu located in the upper right corner.
- Create a new folder using the `New folder` button located in the upper right corner. Note that this option is only allowed inside a high-level SPARC folder. To create a new high-level SPARC folder, go back to Step 2.

  :::info
  SPARC folders naming should contain only alpha-numerical values 0-9, A-Z, no empty spaces, and no special characters.
  :::

- Rename files/folders by right-clicking on the files/folders and click menu option `Rename`.
- Remove files/folders by right-clicking on the files/folders and click menu option `Delete`.
- Move files/folders by right-clicking on the files/folders and click menu option `Move`
- Simultaneously select multiple files/folders by either drag-selecting items or holding Ctrl and clicking the items.
  ![](https://github.com/fairdataihub/SODA-for-SPARC/blob/main/docs/documentation/Organize-dataset/organize-step3-part1.gif?raw=true)
- Use the arrow located in the upper left corner to move up a folder. The current location in the dataset is indicated right next to the arrow.
  ![](https://github.com/fairdataihub/SODA-for-SPARC/blob/main/docs/documentation/Organize-dataset/organize-step3-part2-files.gif?raw=true)

#### Adding file descriptions (optional)

- Use the `Details` option from the right-click menu to see the actual path of the file and include metadata (description, Additional Metadata) which will be included in the
  manifest files if you request SODA to generate them automatically for you (Step 5).
  ![](https://github.com/fairdataihub/SODA-for-SPARC/blob/main/docs/documentation/Organize-dataset/organize-step3-part2-files.gif?raw=true)

### Duplicate Files/Folders

When importing and duplicate files/folders are detected an alert will appear to see how you would like to handle those duplicates. You have the options to:

- Skip
- Replace
- Rename

`Skip` will prompt you with a list of files and be able to select which ones you'd like to skip. For the ones left unselected you will be prompted back to see if you would like
to handle those files/folders.

`Replace` gives you the ability to update an already imported file/folder. For example if you have updated the context of a file/folder outside of SODA you can update the
file/folder within SODA to sync any new changes.

`Rename` will allow you to import the duplicate files/folders with new names. You will be prompted to rename the current duplicates and after all are given a unique name you will
be allowed to import.

`Cancel` returns you back to the duplicate prompt if you decide to not continue with one of the selections above. On hitting cancel again, duplicate files/folders will not
imported and only the new unique items will.

<video
   controls
   autoPlay
   loop
   width="100%"
   src="https://github.com/fairdataihub/SODA-for-SPARC/raw/main/docs/documentation/Videos/Duplicate-Item.mp4"
/>

import PageFeedback from '@site/src/components/PageFeedback';

<PageFeedback />

repository: fairdataihub/SODA-for-SPARC-Docs

repo_name: fairdataihub/SODA-for-SPARC-Docs


text:
Homepage-docker
=====

Dockerize our [Homepage](https://github.com/NCUNOS/Homepage). :v:

Usage
=====

To run it:

```
$ docker run -d -p 80:80 ncunos/homepage
```

Usage-Compose
=====

docker-compose.yml:

```
homepage:
  image: ncunos/homepage
```

License
-------
Copyright (C) Community of Networking and Open Source 2015, under MIT License.

repository: NCUNOS/Homepage-docker

repo_name: NCUNOS/Homepage-docker


text:
---
title: dropWhile
tags: array,function,intermediate
author_title: Deepak Vishwakarma
author_url: https://github.com/deepakshrma
author_image_url: https://avatars2.githubusercontent.com/u/7682731?s=400
description: Implementation of "dropWhile" in typescript, javascript and deno.
image: https://www.positronx.io/wp-content/uploads/2018/11/positronx-banner-1152-1.jpg
---

![JS](https://img.shields.io/badge/supports-javascript-yellow.svg?style=flat-square)
![TODO](https://img.shields.io/badge///TODO-blue.svg?style=flat-square)

Removes elements in an array until the passed function returns `true`. Returns the remaining elements in the array.

Loop through the array, using `Array.prototype.slice()` to drop the first element of the array until the returned value from the function is `true`.
Returns the remaining elements.

```js
const dropWhile = (arr, func) => {
  while (arr.length > 0 && !func(arr[0])) arr = arr.slice(1);
  return arr;
};
```

```js
dropWhile([1, 2, 3, 4], (n) => n >= 3); // [3, 4]
```