text:
# NetCloth Instant messaging service deployment environment preparation

## Procedures introduction

![](../../images/procedure_IM_deploy.png)

The deployment is divided into two parts: deploy a blockchain node and IM server deployment. If you have not deployed a blockchain node, please deploy the blockchain nodes according to the document ([click here](../get-started/how-to-join-testnet.md)) and then continue to build the instant messaging server.

## 1 OS and user add

### 1.1 OS requirements

Software development and operation and maintenance are based on **Linux** operating system.

The current operating system is Ubuntu 18.04 server version, C ++ compiler is 7.x or above, and supports **C++ 17 **. If you use other Linux versions during the deployment There will be slight differences.

### 1.2 Create admin user

To deploy using the admin user, you need to create a new admin account and add sudo execution permissions

* To create a new admin user, you need the sudo or root user to perform the following operations:

```bash
adduser admin
usermod -aG sudo admin
```
## 2 Basic service deployment

### 2.1 nginx install and configuration
#### 2.1.1 Install nginx
```bash
sudo apt install nginx-full
```
Perform nginx -v check after installation, use nginx 1.14 or later

#### 2.1.2 Modify nginx parameters
Modify the file: /etc/nginx/nginx.conf

Add a new line in the http option to set the body size limit of the POST request

```bash
client_max_body_size 20m;
```
#### 2.1.3 Setting up a reverse proxy

Modify / etc / nginx / sites-available / default (Ubutu nginx 1.14) or /etc/nginx/conf.d/default.conf (nginx 1.15 and above) files.

Add the following options in the server configuration

```properties
	location ~* ^/v1/(image|video|file|contacts) {
		proxy_next_upstream error timeout invalid_header http_500 http_503;
		proxy_pass  http://<IP_ADDRESS>:8001;
		proxy_set_header X-Forwarded-Proto http;
		proxy_set_header   Host             $host;
		proxy_set_header   X-Real-IP        $remote_addr;
		proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_redirect     off;
		proxy_connect_timeout      1000;
		proxy_send_timeout         2000;
		proxy_read_timeout         2000;
		#proxy_send_lowat          12000;
		proxy_buffer_size          128k;
		proxy_buffers              8 64k;
		proxy_busy_buffers_size    128k;
		proxy_temp_file_write_size 128k;
	}

	location ~* ^/v1/(ping|service|ipal) {
		proxy_next_upstream error timeout invalid_header http_500 http_503;
		proxy_pass  http://<IP_ADDRESS>:8000;
		proxy_set_header X-Forwarded-Proto http;
		proxy_set_header   Host             $host;
		proxy_set_header   X-Real-IP        $remote_addr;
		proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_redirect     off;
		proxy_connect_timeout      1000;
		proxy_send_timeout         2000;
		proxy_read_timeout         2000;
		#proxy_send_lowat          12000;
		proxy_buffer_size          128k;
		proxy_buffers              8 64k;
		proxy_busy_buffers_size    128k;
		proxy_temp_file_write_size 128k;
	}

	location ~* ^/v1/router {
		proxy_next_upstream error timeout invalid_header http_500 http_503;
		proxy_pass  http://<IP_ADDRESS>:8002;
		proxy_set_header X-Forwarded-Proto http;
		proxy_set_header   Host             $host;
		proxy_set_header   X-Real-IP        $remote_addr;
		proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_redirect     off;
		proxy_connect_timeout      1000;
		proxy_send_timeout         2000;
		proxy_read_timeout         2000;
		#proxy_send_lowat          12000;
		proxy_buffer_size          128k;
		proxy_buffers              8 64k;
		proxy_busy_buffers_size    128k;
		proxy_temp_file_write_size 128k;
	}
```

After the modification is completed, execute the following command to detect and start nginx

```bash
nginx -t
nginx
```

Related configuration files

* [nginx.conf](./config/nginx.conf)
* [default](./config/default)

### 2.2 deploy redis-server

```bash
sudo apt install redis-server
```

### 2.3 Download and install consul

```bash
wget https://releases.hashicorp.com/consul/1.6.1/consul_1.6.1_linux_amd64.zip

unzip consul_1.6.1_linux_amd64.zip
sudo mv consul /usr/local/bin
```

### 2.4 Install supervisor

```bash
sudo apt install supervisor
```

## 3 Environment variable settings
 Add the following configuration to the .bashrc or .bash_profile. The GOPROXY variable depends on the network status to determine whether to configure. After the configuration, execute source .bashrc

```bash
export PATH=$PATH:/usr/local/bin:/usr/local/go/bin:/home/admin/go/bin

export GOPATH=/home/admin/go
export GO111MODULE=on
export GOPROXY=https://goproxy.io

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
```

repository: netcloth/docs

repo_name: netcloth/docs


text:
---
layout: default
title: Directory Compressor
supported: [Directory]
---

# Directory Compressor

## Purpose

Compress a directory recursively into a tar, tar.gz, tar.bz2, tar.xz or zip file.
The name of the created archive will be the directory basename, appended with the suffix appropriate for the selected compression type.

## Options

* Destination: Location where to create the archives.
* Compression Type: A list of supported compression/archiving types.

## Supported File Formats

Directory

## Author

Tom Schoonjans

repository: tschoonj/rfi-file-monitor

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: tschoonj/rfi-file-monitor


text:
# Sliding Parameters

Whilst exploring the synth and FX args, you might have noticed that there are a number of parameters ending with `_slide`. You might have even tried calling them and seeing no effect. This is because they're not normal parameters, they're special parameters that only work when you control synths as introduced in the previous section.

Consider the following example:

```
s = play 60, release: 5
sleep 0.5
control s, note: 65
sleep 0.5
control s, note: 67
sleep 3
control s, note: 72
```

Here, hear the synth pitch changing immediately on each control. However, we might want the pitch to slide between changes. As we're controlling the `note:` parameter, to add slide, we need to set the `note_slide` parameter:

```
s = play 60, release: 5, note_slide: 1
sleep 0.5
control s, note: 65
sleep 0.5
control s, note: 67
sleep 3
control s, note: 72
```

Now we hear the notes being bent between controls. It sounds nice doesn't it. You can speed up the sliding by using a shorter time such as `note_slide: 0.2` or slow it down by using a longer slide time.

Every parameter that can be controlled has a corresponding `_slide` parameter for you to play with.

# Sliding is sticky

Once you've set a `_slide` parameter on a running synth, it will be remembered and used every time you slide the corresponding parameter. To stop sliding you must set the `_slide` value to 0 before the next control.

# Sliding FX Parameters

It is also possible to slide FX parameters:

```
with_fx :wobble, phase: 1, phase_slide: 5 do |e|
  use_synth :dsaw
  play 50, release: 5
  control e, phase: 0.025
end
```

Now have fun sliding things around for smooth transitions and flowing control...

license: MIT

repository: jweather/sonic-pi

gha_language: Ruby

repo_name: jweather/sonic-pi


text:
# Data for NTDS 2017

This directory contains small sets of data used for the labs.

* `arxiv_collaboration_network.txt`
  General Relativity and Quantum Cosmology collaboration network
  [[source](https://snap.stanford.edu/data/ca-GrQc.html>)]


text:
# embedded-resources
Embedded Artistry Public Resources

Contains templates, documents, and source code examples referenced on https://embeddedartistry.com.

# Requirements

## git-lfs
This repository requires git-lfs.  If you do not have this installed, please visit https://git-lfs.github.com

If you cloned this repository before installing git-lfs, please run `git lfs pull`.  Otherwise clone will automatically perform a `git lfs pull`.

## premake5

This repository builds with premake5.  I have currently bundled premake for OSX, if you are a linux or windows user please check: https://premake.github.io/download.html

# Structure

* build/
	* Common build definitions used in the various Makefiles throughout the repository
* examples/
	* c
		* C examples for the Embedded Artistry website
	* cpp/
		* C++ examples for the Embedded Artistry website
	* libc/
		* Example libc implementation
* interview/
	* Example interview question implementations
* manufacturing/
	* Documents & templates that are useful for the manufacturing side of the embedded world.

# Building

You can run `make` from the top level to build all examples.  You can also run `make interview`, `make c`, `make cpp`, `make libc` to build only specific examples.  Output will be placed in a folder called `buildresults/` at the top level.

Each of the source directories contains a Makefile that can be used independently.  Each of these Makefiles has separate targets for the individual examples.  Running `make` on any of the source folders will build all the contained examples.  Results will be placed in a folder called `buildresults` within the particular source directory that was built.


text:
---
layout: home
---

## Course Description

Modern software systems are becoming highly concurrent and distributed. However, these systems are difficult to develop correctly due to many sources of nondeterminism in their execution: such as the interleavings of threads, the order of asynchronous interaction between system components, component failures, or data losses due to unreliable communication channels. As a result, concurrent and distributed systems are prone to so-called Heisenbugs which seem to disappear across executions but manifest in subtle orderings of certain events in the system. Detecting these bugs requires specific techniques to exercise nontrivial orderings of component interactions or injection of faults.

This seminar course aims to explore recent research in the field of testing concurrent and distributed systems.

### Expected Prior Knowledge:
- Knowledge on software engineering methods, software testing
- Experience on concurrent/distributed programming is appreciated

## Course Contents

The course starts with a series of lectures and continues with discussions of recent research papers.

During the lectures, we will review the execution models, correctness notions, and basic testing methodologies for concurrent and distributed programs.

During the seminars, we will explore recent research in the field of practical methods for uncovering concurrency and fault-tolerance bugs. We will implement contemporary testing methods for modern distributed systems and blockchains.

**Outline of Lectures:**
- Shared memory vs distributed concurrency
- Correctness properties for concurrent programs
- Basic abstractions for distributed programming
- Replication and notions of consistency
- Relaxed correctness properties for weak consistency
- Characterization of bugs in concurrent and distributed systems
- Software model checking via systematic testing
- Controlled concurrency testing
- Fault injection for testing

**Outline of Seminars:**
- A selection of research papers on the area will be presented and discussed.
- The selection of seminar papers will be updated based on the research on the area.
- You can see the current list of [seminar papers](./papers) for more details.


text:
# LightNovelApi
Client sided API to light novel hosters.

Please send some love to the supported hosters by reading the material on their sites. They need the ad revenue.

---
~~Dropped in favour of [lightnovel-crawler](https://github.com/dipu-bd/lightnovel-crawler).~~

Still working on it occasionally.

Currently supported hosters:

- [www.wuxiaworld.com](https://www.wuxiaworld.com/)

Planned hosters to be supported (found through ducking and [fullnovels.com](https://fullnovels.com/)):

- [www.webnovel.com](https://www.webnovel.com/)
- [toc.qidianunderground.org](https://toc.qidianunderground.org/) (completes webnovel)
- [gravitytales.com](http://gravitytales.com/)
- [www.volarenovels.com](https://www.volarenovels.com/)
- [creativenovels.com](https://creativenovels.com/)
- [www.wuxiaworld.co](https://www.wuxiaworld.co/) (imposters)
- [wuxiaworld.site](https://wuxiaworld.site/) (imposters)
- [wuxiaworld.online](https://wuxiaworld.online/) (imposters)
- [www.wuxiaworld.in](https://www.wuxiaworld.in/) (imposters)
- [wuxiaworld.world](https://wuxiaworld.world/) (imposters)
- [kiss-novel.com](https://kiss-novel.com/wuxiaworld)
- [boxnovel.net](https://boxnovel.net/)
- [wuxia.today](https://wuxia.today/)
- [www.aihristdreamtranslations.com](https://www.aihristdreamtranslations.com/)
- [zenithnovels.com](https://zenithnovels.com/)
- [www.radianttranslations.com](https://www.radianttranslations.com/)
- [lightnovelstranslations.com](https://lightnovelstranslations.com/)
- [bcat00.wpcomstaging.com](https://bcat00.wpcomstaging.com/)
- [www.asianhobbyist.com](https://www.asianhobbyist.com/)
- [jingletranslations.wordpress.com](https://jingletranslations.wordpress.com/)
- [www.thenovelst.com](https://www.thenovelst.com/)
- [tranzgeek.wordpress.com](https://tranzgeek.wordpress.com/)
- [rosyfantasy.net](https://rosyfantasy.net/)
- [whitemoonxblacksun.wordpress.com](https://whitemoonxblacksun.wordpress.com/)
- [translations.gocreateme.com](https://translations.gocreateme.com/)
- [omgtranslations.com](https://omgtranslations.com/)
- [dmtranslationscn.com](https://dmtranslationscn.com/)
- [liberspark.com](https://liberspark.com/)
- [xaiomoge.com](https://xaiomoge.com/)
- [dhh-workshop.blogspot.com](https://dhh-workshop.blogspot.com/)
- [bubbleteatranslations.wordpress.com](https://bubbleteatranslations.wordpress.com/)
- [vanillamusenovels.wordpress.com](https://vanillamusenovels.wordpress.com/)
- [lmsnovel.wordpress.com](https://lmsnovel.wordpress.com/)
- [zhanlantranslations.com](https://zhanlantranslations.com/)
- [moonruneworks.com](https://moonruneworks.com/)

repository: raember/lightnovelapi

repo_name: raember/lightnovelapi


text:
# Dracula for [Abricotine](https://abricotine.brrd.fr/)

> A dark theme for [Abricotine](https://abricotine.brrd.fr/).

![Screenshot](./screenshot.png)

## Install

All instructions can be found at [draculatheme.com/abricotine](https://draculatheme.com/abricotine).

## Team

This theme is maintained by the following person and a bunch of [awesome contributors](https://github.com/dracula/template/graphs/contributors).

[![Calder Sheagren](https://github.com/calderds.png?size=100)](https://github.com/calderds) |
--- |
[Calder Sheagren](https://github.com/calderds) |

## License

[MIT License](./LICENSE)


text:
---
title: "Command Reference"
linkTitle: "Command Reference"
type: docs
weight: 40
menu:
  main:
    weight: 3
description: >
    Overview of kpt commands
---

<!--mdtogo:Short
    Overview of kpt commands
-->

{{< asciinema key="kpt" rows="10" preload="1" >}}

<!--mdtogo:Long-->

kpt functionality is subdivided into the following command groups, each of
which operates on a particular set of entities, with a consistent command
syntax and pattern of inputs and outputs.

| Command Group | Description                                                                     | Reads From      | Writes To       |
| ------------- | ------------------------------------------------------------------------------- | --------------- | --------------- |
| [pkg]         | fetch, update, and sync configuration files using git                           | remote git      | local directory |
| [cfg]         | examine and modify configuration files                                          | local directory | local directory |
| [fn]          | generate, transform, validate configuration files using containerized functions | local directory | local directory |
| [live]        | reconcile the live state with configuration files                               | local directory | remote cluster  |

<!--mdtogo-->

### Examples

The following are examples of running each kpt command group.

<!--mdtogo:Examples-->

```sh
# get a package
$ kpt pkg get<EMAIL_ADDRESS>helloworld
fetching package /package-examples/helloworld-set from \
  https://github.com/GoogleContainerTools/kpt to helloworld
```

```sh
# list setters and set a value
$ kpt cfg list-setters helloworld
NAME            DESCRIPTION         VALUE    TYPE     COUNT   SETBY
http-port   'helloworld port'         80      integer   3
image-tag   'hello-world image tag'   v0.3.0  string    1
replicas    'helloworld replicas'     5       integer   1

$ kpt cfg set helloworld replicas 3 --set-by pwittrock  --description 'reason'
set 1 fields
```

```sh
# get a package and run a validation function
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-sdk.git/example-configs example-configs
mkdir results/
kpt fn run example-configs/ --results-dir results/ --image gcr.io/kpt-functions/validate-rolebinding:results --<EMAIL_ADDRESS>```

```sh
# apply the package to a cluster
$ kpt live apply --reconcile-timeout=10m helloworld
...
all resources has reached the Current status
```

<!--mdtogo-->

### OpenAPI schema

Kpt relies on the OpenAPI schema for Kubernetes to understand the structure
of kubernetes manifests. Kpt already comes with a builtin
OpenAPI schema, but that will obviously not include any CRDs. So in some
situations it might be beneficial to use a schema that accurately reflects both
the correct version of Kubernetes and the CRDs used. Kpt provides a few global
flags to allows users to specify the schema that should be used.

By default, kpt will use the builtin schema.

```sh
--k8s-schema-source
  Set the source for the OpenAPI schema. Allowed values are cluster, file, or
  builtin. If an OpenAPI schema can't be find at the given source, kpt will
  return an error.

--k8s-schema-path
  The path to an OpenAPI schema file. The default value is ./openapi.json
```

### Global flags

Kpt exposes many global flags in addition to the ones listed above to allow
customization of how kpt works. This is primarily around logging and how kpt
connects to your kubernetes cluster. Some flags that are unlikely to be useful
to most users are hidden in the cli, but this section lists all flags accepted
by kpt.

```
--add_dir_header
  If true, adds the file directory to the header
--alsologtostderr
  log to standard error as well as files
--as string
  Username to impersonate for the operation
--as-group stringArray
  Group to impersonate for the operation, this flag can be repeated to
  specify multiple groups.
--cache-dir string
  Default HTTP cache directory (default "/Users/<user>/.kube/http-cache")
--certificate-authority string
  Path to a cert file for the certificate authority
--client-certificate string
  Path to a client certificate file for TLS
--client-key string
  Path to a client key file for TLS
--cluster string
  The name of the kubeconfig cluster to use
--context string
  The name of the kubeconfig context to use
-h, --help
  Help for kpt
--insecure-skip-tls-verify
  If true, the servers certificate will not be checked for validity.
  This will make your HTTPS connections insecure
--install-completion
  Install shell completion
--k8s-schema-path string
  Path to the kubernetes openAPI schema file (default "./openapi.json")
--k8s-schema-source string
  Source for the kubernetes openAPI schema (default "builtin")
--kubeconfig string
  Path to the kubeconfig file to use for CLI requests.
--log-flush-frequency duration
  Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at traceLocation
  When logging hits line file:N, emit a stack trace (default :0)
--log_dir string
  If non-empty, write log files in this directory
--log_file string
  If non-empty, use this log file
--log_file_max_size uint
  Defines the maximum size a log file can grow to. Unit is megabytes.
  If the value is 0, the maximum file size is unlimited. (default 1800)
--logtostderr
  Log to standard error instead of files (default true)
--match-server-version
  Require server version to match client version
-n, --namespace string
  If present, the namespace scope for this CLI request
--password string
  Password for basic authentication to the API server
--request-timeout string
  The length of time to wait before giving up on a single server request.
  Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h).
  A value of zero means don't timeout requests. (default "0")
-s, --server string
  The address and port of the Kubernetes API server
--skip_headers
  If true, avoid header prefixes in the log messages
--skip_log_headers
  If true, avoid headers when opening log files
--stack-trace
  Print a stack-trace on failure
--stderrthreshold severity
  Logs at or above this threshold go to stderr (default 2)
--token string
  Bearer token for authentication to the API server
--user string
  The name of the kubeconfig user to use
--username string
  Username for basic authentication to the API server
-v, --v Level
  Number for the log level verbosity
--vmodule moduleSpec
  Comma-separated list of pattern=N settings for file-filtered logging
```

### Next Steps

- Learn about kpt [architecture] including major influences and a high-level
  comparison with kustomize.
- Read kpt [guides] for how to produce and consume packages and integrate with
  a wider ecosystem of tools.
- Consult the [FAQ] for answers to common questions.

[pkg]: pkg/
[cfg]: cfg/
[fn]: fn/
[live]: live/
[architecture]: ../concepts/architecture/
[guides]: ../guides/
[FAQ]: ../faq/

repository: ZhuGongpu/kpt

gha_language: Go

repo_name: ZhuGongpu/kpt


text:
---
title: More Locations
layout: website-normal
children:
- { section: Single Host }
- { section: The Multi Location }
- { section: The Server Pool }
---

Some additional location types are supported for specialized situations:

### Single Host

The spec `host`, taking a string argument (the address) or a map (`host`, `user`, `password`, etc.),
provides a convenient syntax when specifying a single host.
For example:

{% highlight yaml %}
services:
- type: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server
  location:
    host: <IP_ADDRESS>
{% endhighlight %}

Or, in `brooklyn.properties`, set `brooklyn.location.named.host1=host:(<IP_ADDRESS>)`.

### The Multi Location

The spec `multi` allows multiple locations, specified as `targets`,
to be combined and treated as one location.
When the first target is full, the next is tried, and so on:

{% highlight yaml %}
location:
  multi:
    targets:
    - byon:(hosts=<IP_ADDRESS>)
    - jclouds:aws-ec2:
      identity: acct1
    - jclouds:aws-ec2:
      identity: acct2
{% endhighlight %}

The example above provisions the first node to `<IP_ADDRESS>`,
then it provisions into `acct1` at Amazon if possible,
and then to `acct2`.

### The Server Pool

The {% include java_link.html class_name="ServerPool" package_path="org/apache/brooklyn/entity/machine/pool" project_subpath="software/base" %}
entity type allows defining an entity which becomes available as a location.

repository: johnmccabe/PRESPLIT-incubator-brooklyn

gha_language: Java

gha_license_id: NOASSERTION

repo_name: johnmccabe/PRESPLIT-incubator-brooklyn


text:
---
layout: update
date: 2016-04-16
title: Windows images update on April 16th, 2016
---

## What's new

* [#548](https://github.com/appveyor/ci/issues/548) NuGet 3.3.0 on Visual Studio 2015 image
* [#756](https://github.com/appveyor/ci/issues/756) Visual Studio Agents 2015 with Update 2
* [#757](https://github.com/appveyor/ci/issues/757) Visual Studio Tools for Apache Cordova Update 8.1

## Previous worker images

There are build worker images available from previous deployment. You can use them in case of any issues with the current images:

* `Previous Visual Studio 2013`
* `Previous Visual Studio 2015`

You can select build worker image in "Build worker image" dropdown on Environment tab of project settings or if you use `appveyor.yml`:

```yaml
os: Previous Visual Studio 2015
```

repository: appveyor/website

gha_language: HTML

gha_license_id: MIT

repo_name: appveyor/website


text:
[![Build status](https://travis-ci.com/isi-vista/aida-viz.svg?branch=master)](https://travis-ci.com/isi-vista/aida-viz?branch=master)

# AIDA Vizualization Tools

This repository contains the package `aida_viz`, a tool for visualizing "hypotheses" (from AIDA TA3) in a simple HTML format.

## Installation

Install `aida_viz` by downloading this repository and running `pip install $AIDA_VIZ_REPO`, where `$AIDA_VIZ_REPO` is the top-level directory of this repository.

We recommend the use of a virtual environment manager, such as [`conda`](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) or [`virtualenv`](https://virtualenv.pypa.io/en/latest/).

## Usage

To generate visualizations, `aida_viz` requires a small (<1gb) SQLite database file containing the text documents found in the AIDA Phase 1 Evaluation Source Data, `LDC2019E42` (download available via the [LDC Catalog](https://catalog.ldc.upenn.edu)).

**The easiest way to obtain this SQLite database file is to contact the maintainers of this repository and request it from them.** However, it is possible to generate the database from the original LDC source data.

### Generating the Database

**Skip this section** if you have obtained the SQLite database file from this repository's maintainers.

Generating the database from the LDC-provided `.tgz` file is a two-step process:

1. Convert the source data in `.tgz` format to `.zip` format. Use the script [tar_gz_to_zip.py](https://github.com/isi-vista/vistautils/blob/master/vistautils/scripts/tar_gz_to_zip.py) found in the [isi-vista/vistautils](https://github.com/isi-vista/vistautils) repository.

2. Use the resulting `.zip` file to populate the database using the following command:

	```
	python -m aida_viz.corpus -z $AIDA_SOURCE_ZIP -d $AIDA_SOURCE_SQLITE
	```

Where:
- `$AIDA_SOURCE_ZIP` is the location of the converted `.zip` version of the source data.
- `$AIDA_SOURCE_SQLITE` is the name of the new file where the database will be written (this file should be given the `.sqlite` extension).

### Generating Visualizations

Now that you have the SQLite database file `$AIDA_SOURCE_SQLITE`, generate a visualization of an AIF `.ttl` file with the following command:

```
python -m aida_viz -a $AIDA_AIF_TTL -d $AIDA_CORPUS_SQLITE -o $RESULTS
```

Where:
- `$AIDA_AIF_TTL` is the location of the AIF `.ttl` file that you would like to visualize.
- `$RESULTS` is the **new** directory location where the results should be written.

# Contributing

Install the development requirements by running `pip install dev-requirements.txt`.

Run `make precommit` before committing.

WARNING: contributor infrastructure is still under development. Please contact the repository maintainers if you would like to contribute.

repository: TonyBY/aida-viz

repo_name: TonyBY/aida-viz


text:
# link2phone-whatsapp

React Native App that lets you send WhatsApp message to IL phone number without adding the number.

# How it works:

1. Enter phone number
2. Click on the WhatsApp icon

<img src="./screen.jpg"/>

# Install on device

### Install

`yarn install package.json`

### Android

`npx react-native run-android`

### Ios

`npx react-native run-ios`

branch_name: refs/heads/main


text:
# covid-tracker

## Installation
1. Fork the repository.
2. Clone the repository to your local computer and change directory.
```
git clone https://github.com/<your-username>/covid-tracker.git
cd covid-tracker
```

3. Create a virtual environment to install packages (recommended).
```
python -m venv myvenv
```

4. Install Django and all packages.
```
pip install -r requirements.txt
```

5. Set environment variables.
```
cp .env.example .env
```
Now, edit `.env` to add `RAPI_KEY` from your [RapidApi Dashboard](https://rapidapi.com/developer/dashboard) for your app and a new `SECRET_KEY` for your Django project ([Read more](https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-SECRET_KEY)).

6. Start project.
```
python manage.py runserver
```

license: Unlicense

repository: darshjain/covid-tracker

gha_language: Python

gha_license_id: Unlicense

repo_name: darshjain/covid-tracker


text:
# Viva La Vinyl

### Background

Viva La Vinyl currently runs on pgBoard and it's making my life a living hell. Let's change that. The aim with this new version of VLV is to:

* Get off of Apache as a webserver
* Use a more modern stack
* Use a language and database that will allow more developers to contribute (hopefully)
* Don't reinvent the wheel, use frameworks rather than create our own

With that in mind, this reincarnation of VLV is using:

* Trails.js
* MongoDB
* Angular2
* Typescript
* Gulp

### Setup

```
clone repo
npm install
npm run typings install
mongodb
npm start
```

Open up your browser to http://localhost:3000 and you should see the homepage

repository: DarthHater/vivalavinyl

gha_language: JavaScript

repo_name: DarthHater/vivalavinyl


text:
## Hovers
### Ln 7, Col 12
```marko
  5 | }
  6 |
> 7 | -- ${input.fullName}
    |            ^ (property) Input<FirstName, LastName, Extra>.fullName: `${FirstName} ${LastName}`
  8 | //         ^?
```

## Diagnostics
### Ln 1, Col 75
```marko
> 1 | export interface Input<FirstName extends string, LastName extends string, Extra> {
    |                                                                           ^^^^^ 'Extra' is declared but its value is never read.
  2 |   firstName: FirstName,
  3 |   lastName: LastName,
  4 |   fullName: `${FirstName} ${LastName}`
```

repository: marko-js/language-server

gha_language: TypeScript

repo_name: marko-js/language-server


text:
# gimp-imagemagick
Gimp plug-in to access ImageMagick

This is a GIMP plug-in written in Python.  It gives access to the ImageMagick command line using either some built-in
functions or using an ImageMagick command directly.

The plug-in is considerably extended from a more basic example by Michael Munzert.  It was originally hosted on Google
Projects, but apparently is no longer online since Google Projects was shutdown by Google.  I have now created this
repository to house it.

The code is build and tested on Linux and should work under MS Windows, but is (currently) untested on MS Windows.

The code has some lense distortion correcton features which whould be viewed as experimetal.  Note that these features
require SciPy and Numpy to work.  The rest of the plug-in will work without these and it should install and run
correctly.

repository: sjgcit/gimp-imagemagick

repo_name: sjgcit/gimp-imagemagick


text:
# Preview: SCRAM -- Short Cut Resistant AEAD Mode

SCRAM is a symmetric encryption mode, based on AES-GCM, that includes new
cryptographic protections against dangerous short-cuts that applications
sometimes take.

## Cryptographic protection against release of unauthenticated plaintext

Modern cryptographic libraries offer 'in place' encryption and decryption. By
avoiding copies of the memory, encrypting and decrypting data in place saves
both memory and CPU. While offering great performance, this interface depends
on a promise from the application developer not to use or look at the decrypted
plaintext until it has been authenticated by the cryprographic library.
Application developers do not always appreciate that this authentication occurs
only once the entire message has been received, and that it is not safe to
process the data until then.

There are two variants of this misuse:

1. Some applications do not perform the final 'authenticate this data'
operation, or do not check the return status of this operation. Although
encryption libraries such as Amazon s2n do include tests that simulate malicious
attackers injecting corrupted traffic, this is not a common or easy kind of
test for applications to include. An application with this error will appear to
work correctly, and will handle correctly encrypted and authenticated data
without error, however the application will also accept corrupt or malicious
input; usually a high severity security issue.

2. Some applications deliberately use decrypted plaintext before it has been
authenticated, in order to get a 'head start' on work. For example, an
application may decompress a compressed payload before it has been
authenticated, or may optimistically execute a dependent operation such as a
web-request. The application developers may believe that this is 'ok' as long
as the work is 'cancelled' or 'undone' should the message fail authentication.
However this is rarely done with a full appreciation for the information
side-channels that are introduced by optimistic operations, or the inherent
risk of denial of service attacks.

SCRAM adds misuse resistance for both kinds of issues.

When using SCRAM, a recipient simply must first (correctly) compute the message
authentication code in order to subsequently decrypt it.  There is no
significant benefit to skipping this step. If an application does fail to check
the result of the message authentication operation, and uses the 'decrypted'
data prematurely, the corrupt message will result in a 'random garbage'
plaintext. Crucially, an attacker has no control over this random garbage.

For applications that are using SCRAM to simply encrypt bulk data, this kind of
application failure still results in data corruption. But for applications that
are using SCRAM to encrypt data that must conform to a schema, or data that
contains instructions, this kind of application failure is generally much
safer. Without any control over the data that is decrypted, an attacker's
ability to abuse the application failure, or to find meaningful decryption or
message forgery oracles is severely limited.

## Integration of message padding into the AEAD layer

Modern cryptography is extremely good at disguising data as meaningless noise,
however analysis of encrypted data volumes and traffic timings remains the most
practical attack on well-encrypted information.

Without any measures to prevent these attacks, the size and timing of encrypted
messages can be enough information for an attacker (who has access to the
encrypted data) to decipher a voice call, determine the keystrokes used in a
password, or to identify content being accessed by using size-based
fingerprints.

To enhance protection against these risks, SCRAM integrates message padding
directly into the AEAD encryption layer. The caller indicates a desired 'frame
size' and SCRAM will ensure that every encrypted message is rounded up (if
needed) to a whole number of frames. Frames can be aligned with network
boundaries, such as record sizes or TCP segment sizes, or they can be aligned
with storage boundaries such as page sizes or block sizes. It's up to the
application.

By integrating padding, SCRAM handles the details that developers can sometimes
get wrong, for example many application developers mistakenly believe that a
random amount of padding is sufficient to hide the length of a message.

Applications using SCRAM don't have to use padding, it's not enforced, but
adding padding to the AEAD layer acts as a noteworthy reminder to application
developers and code-auditors that obfuscation of message sizes and timings is
an important consideration for cryptographic systems. For example, it will
be noticeable during a code-review that padding has not been chosen.

## SCRAM algorithm

SCRAM is being developed as part of Amazon s2n and is open source. The working
specification of the SCRAM algorithm is maintained in Python.

There are several ways of achieving SCRAM's cryptographic goals, but our
choices are heavily guided by ensuring that SCRAM's security proofs can be
simple, robust, and build on top of well-established properties of existing
cryptographic primitives.

The design of SCRAM is also intended to make use of operations that are already
accelerated in hardware on common platforms including Amazon EC2 instances, the
AWS Nitro Platform, commidity and embedded systems.

SCRAM is not yet finalized; some performance sensitive details of SCRAM may
change as we experiment with different workloads and datasets. We are always
open to feedback from application developers about how SCRAM may be useful in
their applications.

Once measurements and any changes are finalized, we will be publishing a final
SCRAM specification, accompanying security proofs, and other learnings.

## SCRAM material

* [Watch AWS CISO Stephen Schmidt announce SCRAM](https://www.youtube.com/watch?time_continue=2489&v=oam8FDNJhbE)

## SCRAM team

SCRAM is designed and maintained by Shay Gueron, Colm MacCarthaigh, and Alex
Weibel from the AWS Cryptography team. Shay Gueron is also a professor at the
University of Haifa.

gha_language: C


text:
# Python to latex math equation

Generates LaTeX math description from Python functions.

```bash
pip install latexify-py
```

## Usage

```python
import math
import latexify
```

```python
@latexify.with_latex
def solve(a, b, c):
  return (-b + math.sqrt(b**2 - 4*a*c)) / (2*a)

solve
```

$$
solve(a,b,c)≜\frac{−b+\sqrt{b^2−4ac}}{2a}
$$

Ref: https://github.com/odashi/latexify_py


text:
---
layout: post
title: Week 5
---

## What type of things are you looking for when you select an open source project to work on?
When I select an Open Source project, I look for issues that I am able to work on. I also look to see if the community is welcoming and friendly to beginners. To check if a community is friendly, I specifically look at discussions and the tags on bugs. I prefer working with helpful people rather than toxic people because I would be less willing to contribute if the community is toxic.

## What are you able to offer to the team that you will be working on for the project? (what are your strengths)
I am able to offer help in coding in Java, Python, or Javascript. I am capable of researching for more information about an issue. I am generally very responsive and can provide assistance in documentation.

## What are you hoping to learn from working on an open source project?
I am hoping to learn how to work more collaboratively, to learn about good coding practices, and to learn about anything in general. I have seen comments on pull requests where people were told that the code isn't good and were given suggestions on how to fix the code. I find that particularly helpful and useful to learn and pick up on. Since open source projects mean working with strangers, I believe I would be able to learn about stuff other than coding, as people may provide useful insight on particular issues.

## What are you most worried about when you are thinking about and planning to work on an open source project?
I am most worried about toxic people and rude and unhelpful comments. I am also worried that I would not be able to contribute to anything in an open source project. In big projects where there are a lot of active people and discussions, the easier tasks such as confirming an issue or reproducing it may already have been done by a few other people.

## Summize your contributions made this week, if any
Contributions I made this week include:
1. Making a comment on an issue for the course website: [link](https://github.com/joannakl/cs480_s18/issues/85)

## Propose questions for Aurelia
* In an interview, I read that you used Sublime Text as your text editor of choice. Why do you prefer Sublime over other editors like Atom, which is open source and has customizable themes?
* What do you like about working in Mozilla, other than the open source and open science aspects?
* How did you initially get into open source?
* Is there anything that you dislike about open source?


text:
# ndarray-image

[![Crates.io][ci]][cl] ![MIT/Apache][li] [![docs.rs][di]][dl] ![LoC][lo]

[ci]: https://img.shields.io/crates/v/ndarray-image.svg
[cl]: https://crates.io/crates/ndarray-image/

[li]: https://img.shields.io/crates/l/specs.svg?maxAge=2592000

[di]: https://docs.rs/ndarray-image/badge.svg
[dl]: https://docs.rs/ndarray-image/

[lo]: https://tokei.rs/b1/github/rust-cv/ndarray-image?category=code

Allows conversion between ndarray's types and image's types

## Deprecated

WARNING: This crate is currently deprecated in favor of https://github.com/rust-cv/nshare. Use `nshare` instead.
This crate may eventually be repurposed, or if someone else wants to take the name, just reach out on the Rust CV Discord.

This crate allows zero-copy conversion between `ArrayView` from `ndarray` and `ImageBuffer` from `image`.

## Output of `red_put` example

![red_put](http://vadixidav.github.io/ndarray-image/red_put.png)


text:
# LavaClient

[![discord server][discord]](https://discord.gg/CH9ubGPMV6) • [![codacy rating][codacy]](https://www.codacy.com/gh/Lavaclient/lavaclient?utm_source=github.com&utm_medium=referral&utm_content=Lavaclient/lavaclient&utm_campaign=Badge_Grade) • [![npm version][version]](https://npmjs.com/lavaclient)

A simple, easy-to-use, and flexible node.js lavalink client.

- **Flexible**: LavaClient doesn't depend on a specific Discord library. Each class can be changed relatively easily, allowing everything to be customized.
- **Plugins**: Provides a simple `Plugin` class that the Manager can load, you can view the [Plugins Guide](https://lavaclient.js.org/guide/plugins.html) for a basic implementation.
- **Easy-to-use**: LavaClient has a neat and user-friendly promise-based api.
- **Performant**: Designed to be small and performant, it's a great choice for any sized project.

## Installation

> node.js v14 or newer needed.

```sh
npm install lavaclient
# or
yarn add lavaclient
```

## Usage

> Documentation: <https://lavaclient.js.org/> *outdated (join our [support server](https://discord.gg/CH9ubGPMV6) for updates)*

```ts
import LavaClient from "lavaclient";

const nodes = [
  {
    id: "My Node",
    host: "localhost",
    port: 3000,
    password: "lavaclient-is-amazing"
  }
]

const manager = new LavaClient.Manager(nodes, {
  send(id, payload) {
    sendPayloadToDiscord()
    // check out our guides for an eris and discord.js example.
  }
});

await manager.init("your client id.");

// Use these two methods when receiving voice state and server updates.
await manager.stateUpdate(<update>);
await manager.serverUpdate(<update>);
```

## Bot Showcase

> Here's a few bots that use Lavaclient in production!

- [Stereo](https://top.gg/bot/725808086933176410) by [@Sxmurai](https://github.com/Sxmurai)
- [StormBeatz](https://top.gg/bot/768268608639598624) by [@muhimur9049](https://github.com/muhimur9049) & [@DaStormer](https://github.com/DaStormer)

If you'd like your bot listed just join our discord and ask `2D#5773`!

---

[discord]: https://discordapp.com/api/guilds/830616783199010857/embed.png
[codacy]: https://api.codacy.com/project/badge/Grade/fe049eb85ee74900ae764fc5af6a6299
[version]: https://img.shields.io/npm/v/lavaclient.svg?maxAge=3600

[melike2d](https://github.com/melike2d) © 2020

repository: DaStormer/lavaclient

repo_name: DaStormer/lavaclient


text:
---
layout: page
title: "8 Bonus topic: Remote access and Portainer"
description: ""
keywords: ""
permalink: "cosmo-docker-8-remote-access"
slug: "cosmo-docker-8-remote-access"
---
{::options parse_block_html="true" /}
Table of content
- [Remote access](#remote-access)
- [Use Portainer](#use-portainer)

### Remote access
Setting up remote access in the following way might make sense for an internal Docker host were you trust everyone how might be able to get network access to that host. Please make sure that this is never exposes to the internet as you basically would allow everyone to do whatever the want on your host like running a crypto miner or some container with a worm. If you are sure, go ahead. First we change the config file and then we restart the Docker service. To allow the client VM access, we also add a rule to the Windows firewall. Please note that external access e.g. from your laptop is still blocked by the Azure firewall.
```bash
'{ "hosts": ["tcp://<IP_ADDRESS>:2375", "npipe://"] }' | Set-Content c:\programdata\docker\config\daemon.json
Restart-Service docker
netsh advfirewall firewall add rule name="Open Port 2375" dir=in action=allow protocol=TCP localport=2375
```

Full output of config and restart
```bash
PS C:\> '{ "hosts": ["tcp://<IP_ADDRESS>:2375", "npipe://"] }' | Set-Content c:\programdata\docker\config\daemon.json
PS C:\> Restart-Service docker
PS C:\> netsh advfirewall firewall add rule name="Open Port 2375" dir=in action=allow protocol=TCP localport=2375
Ok.
```

Now switch to the client VM and try to access our Docker engine on the host. For that we need to let the Docker client know to which host we want to connect and then we can validate the connection e.g. with `docker info`
```bash
$env:DOCKER_HOST="<IP_ADDRESS>"
docker info
```
Full output of remote access to the engine
```bash
PS C:\Users\CosmoAdmin> $env:DOCKER_HOST="<IP_ADDRESS>"
PS C:\Users\CosmoAdmin> docker info
Client:
 Debug Mode: false

Server:
 Containers: 4
  Running: 0
  Paused: 0
  Stopped: 4
 Images: 58
 Server Version: 19.03.4
 Storage Driver: windowsfilter
  Windows:
 Logging Driver: json-file
 Plugins:
  Volume: local
  Network: ics internal l2bridge l2tunnel nat null overlay private transparent
  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
 Swarm: inactive
 Default Isolation: process
 Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
 Operating System: Windows Server 2019 Datacenter Version 1809 (OS Build 17763.805)
 OSType: windows
 Architecture: x86_64
 CPUs: 16
 Total Memory: 64GiB
 Name: cosmo-big
 ID: G2F4:KJOZ:PDG4:XT5R:35YM:BRJW:RTQ7:ZBG4:BERB:7C3C:2WGL:MPSJ
 Docker Root Dir: C:\ProgramData\docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  <IP_ADDRESS>/8
 Live Restore Enabled: false

WARNING: API is accessible on http://<IP_ADDRESS>:2375 without encryption.
         Access to the remote API is equivalent to root access on the host. Refer
         to the 'Docker daemon attack surface' section in the documentation for
         more information: https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
```

With that in place, you can do all the Docker commands on the client that we did on the host, but the containers will still be running on the host. In fact, on the client only the Docker CLI is installed, but not the engine.

### Use Portainer
Portainer is a very nice web GUI for Docker that you can use to do almost everything Docker-related. See [https://portainer.io](https://portainer.io) for documentation. It is of course distributed as container image itself, so spinning it up is very easy.  Define an admin password there and select "Local" on the next screen. Then hit "connect" and you should be up and running!
{::options parse_block_html="true" /}

gha_language: Sass


text:
# Settings

Pyforms is using the pysettings library to manage it settings.
Here it is described some of the settings of the library.

## General configurations

#### PYFORMS_MODE = os.environ.get('PYFORMS_MODE', 'GUI')

It defines the mode that the pyforms should run. Currently pyforms can run as **GUI** or **TERMINAL** mode.

#### PYFORMS_LOG_HANDLER_FILE_LEVEL = logging.DEBUG

Logging level.

#### PYFORMS_LOG_HANDLER_CONSOLE_LEVEL = logging.INFO

Logging level.

## GUI layout

#### PYFORMS_STYLESHEET = None

Path to the stylesheet file of the application.

#### PYFORMS_STYLESHEET_DARWIN = None
#### PYFORMS_STYLESHEET_LINUX = None
#### PYFORMS_STYLESHEET_WINDOWS = None

Frequently it is necessary to adapt the layout of an application for each operating system. These variables allow you to do just that.
For each operating system you can define a stylesheet that will complement the default stylesheet for a specific OS.

## Controls

#### PYFORMS_CONTROL_CODE_EDITOR_DEFAULT_FONT_SIZE = '12'
#### PYFORMS_CONTROL_EVENTS_GRAPH_DEFAULT_SCALE = 1
#### PYFORMS_CONTROLPLAYER_FONT = 9


text:
# Changelog

All notable changes to this project will be documented in this file.

## Release 1.5.0

**Features**

- Add splay option
- Add splaylimit option
- Add noop option
- Add log_level option
- Add logdest option

## Release 1.4.0

**Features**

- Added unit tests to all supported OS's.

## Release 1.3.0

**Features**

- Added support to puppet agent 5.3.3

## Release 1.2.0

**Features**

- Added support to puppet agent 5.2.0

## Release 1.0.0

First release of the module.

repository: florianfa/puppet-puppetagent

repo_name: florianfa/puppet-puppetagent


text:
![Image](doc/regexlogo-1-1.JPG?branch=master)

# Regular expressions for [Dynamo](https://github.com/dynamods/dynamo) #

Regular expressions provide a powerful, flexible, and efficient method for processing text. The extensive pattern-matching notation of regular expressions enables you to quickly parse large amounts of text to find specific character patterns; to validate text to ensure that it matches a predefined pattern (such as an email address); to extract, edit, replace, or delete text substrings; and to add the extracted strings to a collection in order to generate a report.
[Regular Expression Language - Quick Reference](https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference?view=netframework-4.8)

Regular expressions are now available in Dynamo with this package.
Package based on the regular expression engine, which is represented by the System.Text.RegularExpressions.Regex object in .NET

## Regular Expression Examples ##
### Example 1: Replacing Substrings ###
Assume that a mailing list contains names that sometimes include a title (Mr., Mrs., Miss, or Ms.) along with a first and last name. If you do not want to include the titles when you generate envelope labels from the list, you can use a regular expression to remove the titles, as the following example illustrates.
![Image](doc/regex-examples/examples-001.png)
The regular expression pattern ```(Mr\.? |Mrs\.? |Miss |Ms\.? )``` matches any occurrence of "Mr ", "Mr. ", "Mrs ", "Mrs. ", "Miss ", "Ms or "Ms. ". Regex.Replace node replaces the matched string with empty string; in other words, it removes it from the original string.

### Example 2: Identifying Duplicated Words ###
Accidentally duplicating words is a common error that writers make. A regular expression can be used to identify duplicated words, as the following example shows.
![Image](doc/regex-examples/examples-002.png)
The Regex.Matches method is called with regular expression options set to IgnoreCase. Therefore, the match operation is case-insensitive, and the example identifies the substring "This this" as a duplication.

Note that the input string includes the substring "this? This". However, because of the intervening punctuation mark, it is not identified as a duplication.

# Getting Started

## Installation
The package is available on the Dynamo Package Manager. Also you can install them manually by following the instructions under the Alternative installation methods section of this document.

## Alternative installation methods

### Manual install
If you prefer to install one of the more experimental/work-in-progress builds, you can still follow the instructions below.

- Download the latest release from the [Releases page](https://github.com/brutich/regex/releases)
- Unzip the downloaded file
- Once unzipped, double-check that all `.dll` files in the package's `bin` folder have been [unblocked](https://blogs.msdn.microsoft.com/delay/p/unblockingdownloadedfile/)
- Copy the package folder to the location of your Dynamo packages  :
    - `%appdata%\Dynamo\Dynamo Core\2\packages` for Dynamo Sandbox, replacing `2` with your version of Dynamo
    - `%appdata%\Dynamo\Dynamo Revit\2\packages` for Dynamo for Revit, replacing `2` with your version of Dynamo
- Start Dynamo, the package should now be listed as in the library and in Dynamo's `Package Manager`

## Prerequisites

This project requires the following applications or libraries be installed :

```
Dynamo : version 2.1 or later
```
```
.NET : version 4.7.1 or later
```

repository: Brutich/RegEx

gha_language: C#

repo_name: Brutich/RegEx


text:
# LICENSE.d

`LICENSE.d` is a collection of "add-ons" to common Open Source software licenses, to be included as named files in a `LICENSE.d` directory, along with the original, unmolested `LICENSE` text.

- [NONO](https://github.com/berneout/nono) allows distributing copies without preserving copyright and other notices, turning MIT, BSD-2-Clause, or similar into something close to [FPL-1.0 / 0BSD](https://spdx.org/licenses/0BSD).

- [IO](https://github.com/berneout/io) declares maintainers' expectation that contributors will license their work on the same public license terms, a bit like section 5 of [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0).

- [NOSRV](https://github.com/berneout/nosrv) makes double-extra-clear that the Open Source software license doesn't obligate contributors to provide ongoing services to anyone.

## Be Warned!

**Licenses are prescription-strength legal devices, and messing with them is risky business.  If you have serious questions about how you should license your software, consult a lawyer.**

**Do _not_ put confidential information about you, your work, or your clients in issues or pull requests.  Do _not_ ask for legal advice on GitHub, or try to disguise requests for legal advice as general questions or hypotheticals.


text:
## fi-0020: Invalid protocol member {#fi-0020}

This error occurs when an item in a protocol is not recognized as a valid
protocol member such as when something in a protocol is not a protocol
composition, one-way method, two-way method, or event.

{% include "docs/reference/fidl/language/error-catalog/label/_bad.md" %}

```fidl
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0020.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
```

To fix this error, remove the invalid items or convert them to the correct
syntax for the type of protocol item they were intended to be.

{% include "docs/reference/fidl/language/error-catalog/label/_good.md" %}

```fidl
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0020.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
```

Note: FIDL protocols may only contain compose statements, one-way methods,
two-way methods, and events. Attempting to place any other kind of declaration
directly within a protocol is an error. Declarations for other protocols and
named types can be placed outside of the protocol block. Anonymous types for
methods and events can be placed inside of the method declaration, but not
directly in the protocol body.

repository: gnoliyil/fuchsia

repo_name: gnoliyil/fuchsia


text:
### Tuts+ Course: Ghost Theme Development–Beyond the Basics
#### Instructor: Kezz Bracey

Since its release, Ghost has been steadily adding to the toolkit of functionality theme developers can dip into. In this course, you’ll learn how to leverage these new options in some creative ways, with custom sorting and styling of featured posts, image gallery creation, contact pages complete with forms and maps, and even Tumblr style post formats. Let’s get started on Ghost Theme Development–Beyond the Basics.

#### Source Files Description:

In this package you'll find the completed Ghost themes seen in each lesson.

**Available on Tuts+ October 2015**


text:
description: Broadcasts values from nodes to incident edges.

<meta itemprop="name" content="gnn.broadcast_node_to_edges" />
<meta itemprop="path" content="Stable" />

# gnn.broadcast_node_to_edges

    View source on GitHub

Broadcasts values from nodes to incident edges.

gnn.broadcast_node_to_edges(
    graph_tensor: gnn.GraphTensor,
    edge_set_name: EdgeSetName,
    node_tag: IncidentNodeTag,
    *,
    feature_value: Optional[Field] = None,
    feature_name: Optional[FieldName] = None
) -> gnn.Field

Given a particular edge set (identified by `edge_set_name` name), this
operation collects node features from the specific incident node of each edge
(as indicated by `node_tag`). For example, setting `node_tag=SOURCE` and
`reduce_type='sum'` gathers the source node features over each edge. (See the
corresponding `pool_edges_to_node()` mirror operation).

The feature to fetch node values from is provided either by name (using
`feature_name`) and found in the graph tensor itself, or provided explicitly
(using `feature_value`) in which case its shape has to be compatible with the
shape prefix of the node set being gathered from. One of `feature_value`
or `feature_name` must be specified.

<colgroup><col width="214px"><col></colgroup>

Args

`graph_tensor`

A scalar GraphTensor.

`edge_set_name`

The name of the edge set to which values are broadcast.

`node_tag`

The incident side of each edge from which values are broadcast,
specified by its tag in the edge set (e.g. `gt.SOURCE`, `gt.TARGET`).

`feature_value`

A ragged or dense source node feature values. Has a shape
`[n, f1..fk]`, where `n` index source nodes; `f1..fk` features inner
dimensions.

`feature_name`

A source node feature name.

<colgroup><col width="214px"><col></colgroup>

Returns

Source node value broadcast to corresponding edges, with shape `[e,
f1..fk]`, where `e` indexes edges; the inner `f1..fk` feature dimensions are
not affected.

repository: oesteban/gnn

repo_name: oesteban/gnn


text:
CCLE---COLT-correlation
=======================

 The purpose of this program is to calculate the correlation between
CCLE gene expression data and COLT RNAi knockdown scores across multiple cell lines.
In processData a single gene's correlation is calculated againstevery other gene for which there is data. Just set the 'geneToAnalyze' the 'sourceData' (i.e. what data to use for the geneToAnalyze), and the 'compareDataTo'. SourceData and CompareDataTo can be either 'CCLE' or colt, but they cannot be the same. 'pValueCutoff' can be set to the correlation p-value threshold you would like to outputted results to be limited to 'tumorTypesToConsider' is a hash that can be used to specify the types of cell lines to consider (source tissue). If this parameter is omitted all tissues will be considered.

Data sources:

CCLE
    http://www.broadinstitute.org/ccle/data/browseData?conversationPropagation=begin

COLT
    http://colt.ccbr.utoronto.ca/cancer/download.html

repository: jdittmar/CCLE---COLT-correlation

repo_name: jdittmar/CCLE---COLT-correlation


text:
# IPFS webui

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![](https://david-dm.org/ipfs/webui.svg?style=flat-square)](https://david-dm.org/ipfs/webui)
[![](https://img.shields.io/circleci/project/ipfs/webui/master.svg?style=flat-square)](https://circleci.com/gh/ipfs/webui)
[![](https://img.shields.io/travis/ipfs/webui/master.svg?style=flat-square)](https://travis-ci.org/ipfs/webui)
[![](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fwebui.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fwebui?ref=badge_shield)

> IPFS Webui is a web interface for [IPFS](https://ipfs.io), the Interplanetary File System. With the interface, you can check on your node info, network addresses, see connections on a globe visually, see your files, look at your config and logs without needing to touch the CLI, and more. This interface uses the [js-ipfs-api](//github.com/ipfs/js-ipfs-api) for all of its heavy lifting.

The webui is a **work-in-progress**. Follow the [development](#development) processes below to check it out.

# Usage

## Config your IPFS Daemon

When developing the WebUI you will need an ipfs daemon running with API access on port `5001`, as well as the following configuration set, otherwise you will not be able to communicate with the ipfs node.

```bash
> ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://localhost:3000"]'
> ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
> ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
```

Alternatively, just run the quick config script with:

```bash
> ./quick-config.sh
```

## Reset your IPFS Daemon config

To reset your config back to the default configuration, run the following command.

```bash
> ipfs config --json API.HTTPHeaders {}
```

It might be a good idea to copy the `.ipfs/config` file somewhere with a useful name so you can use `ipfs config replace <file>` to switch between dev mode easily.

## Installation and running

```bash
> git clone https://github.com/ipfs/webui
> cd webui
> npm install
# Runs server on port 3000.
> npm start
```

## Building

```bash
> npm run build
# The result will be in /dist
```

# Development

Make sure [node.js](https://nodejs.org/) version 6 and [npm](https://docs.npmjs.com/) version 3+ are installed and in your path.

# Contribute

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)

Please contribute! The more people who work on this, the faster we'll be able to ship it. Dive in by testing it and [looking at the issues](https://github.com/ipfs/webui/issues).

The [CONTRIBUTING](CONTRIBUTING.md) file has more information relevant to this repo. To contribute to IPFS in general, just click on the image above to go to our [global contributing guide](https://github.com/ipfs/community/blob/master/contributing.md).

# License

[MIT License](LICENSE)

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fwebui.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fwebui?ref=badge_large)

repository: ShadowRZ/ipfs-webui

repo_name: ShadowRZ/ipfs-webui


text:
# Directories
Your program will recursively traverse the directories and their files, starting with the specified path, and count every regular file that is readable by the current process

#include <stdio.h>
#include <string.h>

void listFilesRecursively(char *path);

int main()
{
    // Directory path to list files
    char path[100];

    // Input path from user
    printf("Enter path to list files: ");
    scanf("%s", path);

    listFilesRecursively(path);

    return 0;
}

/**
 * Lists all files and sub-directories recursively
 * considering path as base path.
 */
void listFilesRecursively(char *basePath)
{
    char path[1000];
    struct dirent *dp;
    DIR *dir = opendir(basePath);

    // Unable to open directory stream
    if (!dir)
        return;

    while ((dp = readdir(dir)) != NULL)
    {
        if (strcmp(dp->d_name, ".") != 0 && strcmp(dp->d_name, "..") != 0)
        {
            printf("%s\n", dp->d_name);

            // Construct new path from our base path
            strcpy(path, basePath);
            strcat(path, "/");
            strcat(path, dp->d_name);

            listFilesRecursively(path);
        }
    }

    closedir(dir);
}}

repository: FinnishArmy/Directories

repo_name: FinnishArmy/Directories


text:
Postmark PHP class
==================

Copyright 2009 - 2011, Markus Hedlund, Mimmin AB, www.mimmin.com
Licensed under the MIT License.
Redistributions of files must retain the above copyright notice.

### Additional contributors

* Jeff Downie
* August Trometer
* Hristo Deshev
* jeffreyhunter77
* John Beales
* Geoff Wagstaff
* beaudesigns
* Gabriel Bull

## Requirements

All in-data must be encoded with UTF-8.

Getting started
---------------

```php
// Create a "server" in your "rack", then copy it's API key
$postmarkApiKey = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';

// Create a message and send it
Postmark\Mail::compose($postmarkApiKey)
<EMAIL_ADDRESS>'John Smith')
<EMAIL_ADDRESS>'Jane Smith')
    ->subject('Subject')
    ->messagePlain('Plaintext message')
    ->send();
```

Configuration
-------------

There are two ways of configuration.

### Adapter

An adapter class should be used for a more dynamic configuration.
The adapter must implement Postmark\MailAdapterInterface. These
are the methods that must be implemented.

* `getApiKey` - Should return the API key
* `setupDefaults(Postmark\Mail &$mail)` - May be used to setup
  a default email, e.g. set From address.
* `log($logData)` - Is called immediately after the email is sent.
  `$logdata` is an array with keys `messageData`, `return`,
  `curlError` and `httpCode`.

See `Tests/Adapter.php` for example usage.

Usage
-----

```php
Postmark\Mail::compose($postmarkApiKey)
<EMAIL_ADDRESS>'Name')
<EMAIL_ADDRESS>'Name')
	->subject('Subject')
	->messagePlain('Plaintext message')
	->send();
```

or:

```php
$email = new Postmark\Mail($postmarkApiKey);
<EMAIL_ADDRESS>'Name')
<EMAIL_ADDRESS>'Name')
	->subject('Subject')
	->messagePlain('Plaintext message')
	->send();
```

Error handling
--------------

See PHPDOC for details on Exceptions thrown. If no API key
is set, an E_USER_ERROR will be raised.

Debugging
---------

Call method `debug(Postmark\Mail::DEBUG_VERBOSE)` or
`debug(Postmark\Mail::DEBUG_RETURN)` to enable debug mode.
`DEBUG_VERBOSE` prints debug info and `DEBUG_RETURN` makes
`send()` return debug info as an array.

Unit tests
----------

Unit tests are located in `Tests/`. Simple test is the unit test framework being used.

`Adapter.php` runs all tests relevant for adapter configuration.

E-mail address validation
-------------------------

This class uses a regular expression to validate e-mail addresses, in addition to the
validation Postmark does. This regex isn't perfect. If you need more extensive validation,
please try http://www.dominicsayers.com/isemail/.

repository: Znarkus/postmark-php

gha_language: PHP

repo_name: Znarkus/postmark-php


text:
# node-openrefine

Node.js client library for controlling OpenRefine.

Although there are many other ways to achieve these results using other applications I have yet to experience an application that can handle such a huge amount of data and transform it with insane speeds.

The main objective is to apply the necessary changes to OpenRefine to make it work as an API service. Where the transformations can occur at the original object level, without the need to start and define "Projects" imports and exports.

Simply put, think of it as every project is initiated as a Line-Based text file and all else happens as part of the transformations/operations. A set of operations is tied to a REST service where payload is sent and transformed data is received.
This would mean that you can send messy CSVs and receive back cleaned versions using the same operations.
Or post xPaths of HTML data directly from the console of your browser and retrieve structured data.

--My Project

Milestone 1
- Get projects to actively listen as a REST service to post requests.
- Send new row(s) to the buffer, validate cloumn/data structure matching
- Apply preset transformation and post reply back.
- Fully clear cache and buffer and return to the original listening state.
- Possible integration with https://medialab.github.io/artoo/

Milestone 2
- Build conditional operations dependent on validations
- Start with CSV file > Apply transformation set to get column names > Post column names for comparison
- If column names match X then apply transformation set Y
(think of a company who has to build so many reports everyday, your best bet would be to assign transformations based on filename imported, however transformations based on conditional specifications allow for a much faulty free and universal resource processing)

Milestone 3
- Extend useability of the UI experience of other additional features of the system
- Explore the possibility of using Facet's data results in other interfaces
- Could clusters or facets be used in ORM based systems?
- Would a full integration of Facets be possible for ng-grid or KendoUI, Infragistics or DHTMLX?

## Usage

``` javascript
var openrefine = require('openrefine')

// another server; same usage
var server = openrefine.server('http://localhost:3333')

// projects metadata
openrefine
  .projects()
  .then(project_metadata => ...)
```

Project metadata format:

``` javascript
{
  "[project_id]": {
    "name": "[project_name]",
    "created": "[project_creation_time]",
    "modified": "[project_modification_time]",
    "customMetadata": {}
  },
  ...[More projects]...
}
```

Create a project and clean up some data:

``` javascript
var project = openrefine
  .create('data_cleanup_project')     // .create() auto-generates a project name
  .accept('csv')
  .accept({
    separator: ',',
    ignoreLines: 1
  })
  .expose('csv')
  .keep(true)   // keep data after end() or pipe; default is not keeping
  .use([
    {
      "op": "core/column-split",
      "description": "Split column DATE by separator",
      "engineConfig": {
        "facets": [],
        "mode": "row-based"
      },
      "columnName": "DATE",
      "guessCellType": true,
      "removeOriginalColumn": true,
      "mode": "separator",
      "separator": "-",
      "regex": false,
      "maxColumns": 0
    }
  ])
  .use(customCleanupAddress())    // customCleanupAddress() returns an array of operations

project
  .load('input.csv')
  .end(function (data) {
    // ...
  })
  .then(() => project.destroy())
```

Or use the stream interface:

``` javascript
fs.createStream('input.csv')
  .pipe(project)
  .pipe(fs.createWriteStream('output.csv'))
```

A project may have some internal states (project metadata such as name and ID, data imported previously, etc.)  To open an existing project, use numeric ID of OpenRefine:

``` javascript
server.open(1234567980)
```

Delete all data in a project:

``` javascript
project.clean()
```

Destroy a project after use:

``` javascript
project.destroy()
```

## See also

* [Refine API](https://github.com/maxogden/refine-python/wiki/Refine-API) and implementations [in Python](https://github.com/maxogden/refine-python/) and [in Ruby](https://github.com/maxogden/refine-ruby).

repository: jsEveryDay/node-openrefine

repo_name: jsEveryDay/node-openrefine


text:
# pprune-concorde

There is a [famous thread](http://www.pprune.org/tech-log/423988-concorde-question.html) on pprune.org by Concorde experts that gives an extraordinary insight into that aircraft. This is a re-mix of that thread that organises it by subject matter. I hope that it will be easier to read and will spark further interest, and contributions, of that unique aircraft.

Here is the result with the original posts organised into [all 144 subjects](https://paulross.github.io/pprune-concorde/docs/index.html)

# How This was Done

Realise that this is a a fairly 'dumb' mechanical re-ordering of this Concorde thread. My hope is that my work might lead to a much better grouping of Concorde knowledge and stories to be done by others. I feel that it important to retain this information and make it accessible to the widest possible audience.

## Concept

The basic idea was to remove the 1000 most common English words from each post and the remaining words give some indication of the subject of the post. Since the posts have a large amount of technical terms and phrases these identify the subject without having to do any natural language processing. Once the subjects have been identified the posts could then automatically be reorganised by subject (maintaining the order of posts).

## Practice

In practice this turned out about right but some refinements were needed (for example user names in post would appear as 'interesting words'). After a bit of fiddling around the following techniques seemed to give a good result:

* Strip all punctuation then make all mixed case words lower case. Then eliminate common words. So 'Re-Heat' becomes 'reheat' and that is an unusual word and merits being part of a subject, say "Afterburner/Re-Heat".
* Strip all punctuation then remove all words that were _not_ all upper case. So 'LHR-JFK' becomes 'LHRJFK', an unusual word, and merits being part of a subject, say "LHR-JFK Route".
* Two word phrases were useful. Strip all punctuation then make all mixed case words lower case. Then look at word pairs. So `('rolls', 'royce')` clearly is the subject "Rolls Royce". Three word phrases were tried but did not seem to add much.

## Implementation

In the end a manual table was constructed for each of the three techniques, this table mapped the result of the method to a subject name. These tables are in `concorde_pub_map.py` and control how the output is produce from the input.

A fourth ad-hoc table was added by inspection where posts were clearly about a specific subject but the subject was not obtainable by other techniques.

## Setup

To reproduce this follow these steps on Linux or Mac OS X. I'm afraid Windows users you are on your own but there is no reason why the code should not work on Windows.

### Initial Setup

You need [Python 3](https://www.python.org/) installed, I'm using Python 3.6 here. Create a new Python environment (I'm assuming your virtual environments directory is `~/venvs/`):

```
$ python3.6 -m venv ~/venvs/pprune
$ . venvs/pprune/bin/activate
```

Install [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/) for parsing the HTML:

```
(pprune) $ pip install beautifulsoup4
```

Create a working area and clone the repository:

```
$ mkdir ~/pprune
$ cd ~/pprune
$ git clone https://github.com/paulross/pprune-concorde.git
```

Make a directory for the HTML pages of the thread:

```
$ mkdir ~/pprune/original
$ cd ~/pprune/original
```

### Get the Original Thread

Grab the first page:

```
$ curl http://www.pprune.org/tech-log/423988-concorde-question.html -o "423988-concorde-question-1.html"

[1/97]: http://www.pprune.org/tech-log/423988-concorde-question.html --> 423988-concorde-question.html
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  126k    0  126k    0     0   148k      0 --:--:-- --:--:-- --:--:--  148k
```
And all the rest:

```
$ curl http://www.pprune.org/tech-log/423988-concorde-question-[2-97].html -o "423988-concorde-question-#1.html"

[1/97]: http://www.pprune.org/tech-log/423988-concorde-question-2.html --> 423988-concorde-question-2.html
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  126k    0  126k    0     0   148k      0 --:--:-- --:--:-- --:--:--  148k
...
[2/97]: http://www.pprune.org/tech-log/423988-concorde-question-3.html --> 423988-concorde-question-3.html
100  124k    0  124k    0     0   223k      0 --:--:-- --:--:-- --:--:--  223k
```

### Process the Original Thread

Head for the source code:

```
$ cd ~/pprune/pprune-concorde/src
```

### Do Some Research

If you want to explore the thread in a programatic way then the `research.py` script is the one for you:

```
(pprune) $ python3.6 research.py ../../original/
```

This will dump out word counts and various other stuff that will allow you to tailor the `concorde_pub_map.py` that controls how the final site is produced.

### Generate the New Pages

Run `main.py` with the location of the pages that you have just pulled down. This will create the output in `~/pprune/pprune-concorde/docs`:

```
(pprune) $ python3.6 main.py ../../original/
Read: /Users/paulross/Documents/workspace/pprune/in/original/423988-concorde-question-1.html posts: 20
Read: /Users/paulross/Documents/workspace/pprune/in/original/423988-concorde-question-2.html posts: 20
Read: /Users/paulross/Documents/workspace/pprune/in/original/423988-concorde-question-3.html posts: 20
...
Read: /Users/paulross/Documents/workspace/pprune/in/original/423988-concorde-question-98.html posts: 12
Read 1942 posts
Number of words: 292355
Reading words file: count_1w.txt
Output path: /Users/paulross/Documents/workspace/pprune/github/pprune-concorde/docs
Writing: index.html
Writing: "ADC (Air Data Computer)"
Writing: "AFCS (Automtic Flight Control System)"
Writing: "AICS (Air Intake Control System)"
Writing: "AICU (Air Intake Control Computer)"
Writing: "ALT HOLD"
Writing: "APU (Auxiliary Power Unit)"
...
Writing: "Vortex AoA"
Bye, bye!
```

Open up the index page:

```
$ open ../docs/index.html
```

# Reference

This describes the source code used to create the final site.

### `analyse_thread.py`

This provides various functions for analysing the thread or individual posts such as word matching, counting popular words or phrases.

### `concorde_pub_map.py`

This is a series of dictionaries that map words and phrases to subject titles. These are the heart of converting the original thread to subjects.

### `main.py`

This just brings the whole thing together and generates the output from the input. It is invoked thus:

```
$ python3 main.py <path_to_input>
```
This will write the output to the `../docs` directory.

### `read_html.py`

This reads all of the static HTML that comprises the thread, in particular this produces a `Thread` object that contains an ordered list of `Post` objects. Both of these classes provide an API that makes the subsequent work convenient.

### `research.py`

This has various ad-hoc functions to read the whole thread and dump out the results of an analysis. These results are informative when deciding the `concorde_pub_map.py `.

### `styles.py`

This just contains the CSS styles used in the final result.

### `write_html.py`

This takes the publication map and converts it to the new structure. The code makes two passes over the data:

1. Each post is analysed in order for the subjects it might refer to. These are added to a subject map which looks like: `{subject : [post_number, ...], ...}`
2. This subject map is then iterated across in subject order, each subject is a set of pages and consists of the list of `[post_number, ...]` from the original material. Pages are limited to 20 posts. Of course each subject is an entry in the `index.html` table.

# Credits

* [pprune](http://www.pprune.org/) contributors, there is a hall of fame for the Concorde thread on [my index page](https://paulross.github.io/pprune-concorde/docs/index.html).
* [Peter Norvig](http://norvig.com/ngrams/) for the most common English words file.
* [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/) for their fabulous HTML parser and, of course, [Python](https://www.python.org/).

repository: paulross/pprune-concorde

repo_name: paulross/pprune-concorde


text:
## various Windows Script Host (WSH) examples converted to Python
Originally published: 2001-06-08 10:49:34
Last updated: 2001-06-08 10:49:34
Author: Kevin Altis

various Windows Script Host (WSH) examples converted to Python. The originals are at:
http://msdn.microsoft.com/scripting/default.htm?/scripting/windowshost/doc/wsMthRun.htm
http://msdn.microsoft.com/scripting/windowshost/doc/wsproenvironment.htm
http://msdn.microsoft.com/scripting/default.htm?/scripting/windowshost/doc/wsMthSendKeys.htm

Note that this script is a Python program that utilizes WSH, so use a .py extension rather than .pys.


text:
| :exclamation:  This repository is deprecated |
|:---------------------------|
| This project has been superseeded by the [LuaExpat repository at the Lunarmodules organization](https://github.com/lunarmodules/luaexpat) |

luaexpat
========

LuaExpat is a SAX XML parser based on the Expat library.

repository: tomasguisasola/luaexpat

gha_language: Lua

repo_name: tomasguisasola/luaexpat


text:
---
layout: post
title: "Adding Disqus to your Jekyll"
date: 2014-06-29
update_date: 2015-12-24
comments: true
---

I transferred my blog from a [Wordpress](http://old.perfectlyrandom.org) theme to Jekyll/GitHub Pages
because I liked the idea of writing up a post in [Markdown](http://daringfireball.net/projects/markdown/)
in my [favorite text editor](http://www.sublimetext.com/3) and then using [git](http://git-scm.com/)
to push the changes to [Github](https://github.com/). Add to that the speed and simplicity
of having a static (though [javascript](http://www.w3schools.com/js/DEFAULT.asp)-powered) website
*on* a free server. I don't have to log in to a (comparatively) slower, web browser based
interface of Wordpress hosted on a free server that runs [PHP](http://www.php.net/)
to dynamically create my [HTML](http://www.w3schools.com/html/DEFAULT.asp).

### Steps
1.  You will need to register your website with [Disqus](https://disqus.com/websites/).
2.  Get a customized version of the [Universal Embed code](https://disqus.com/admin/universalcode/)
    or edit the code to include the *unique identifier* of your Disqus account. The universal
    code is nothing but [Javascript](http://www.codecademy.com/en/tracks/javascript).
3.  You will need to add the code to either your HTML or Markdown files. Follow the instructions
    [here](https://help.disqus.com/customer/portal/articles/472138-jekyll-installation-instructions).

While these basic steps should do the trick, I did not get the desired behavior that easily.

First of all, when you are testing the page locally (instead of the live location), you need to
enable *developer mode* as follows
(thanks to [SchmidtHappens](http://schmidt-happens.com/articles/2011/09/26/adding-disqus-comments.html)
for that)
```javascript
var disqus_developer = 1; // Comment out when the site is live
```

Another helpful reference is [here](http://joshualande.com/jekyll-github-pages-poole/).

### Adding Disqus comments
I added the `disqus_thread` javascript code to every blog post.
This was easy and worked quite well. Here is a snippet from my
[`_layouts/post.html`](https://github.com/ankur-gupta/ankur-gupta.github.io/blob/master/_layouts/post.html):

```javascript
{% raw %}
{% if page.comments %}
<div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'perfectlyrandom'; // required: replace example with your forum shortname
        // var disqus_developer = 1; // Comment out when the site is live
        var disqus_identifier = "{{ page.url }}";

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
{% endif %}
{% endraw %}
```

Note that the above javascript code uses `embed.js`.

I further *tightened* my Disqus integration following some tips from
[here](https://help.disqus.com/customer/portal/articles/565624-tightening-your-disqus-integration)
and defined a `discus_identifier` variable in my `disqus_thread` javascript code.
You can learn about other `disqus_` variables [here](https://help.disqus.com/customer/portal/articles/472098).

### Adding comment count
This is a trickier task than adding the comments. This is an example of the javascript
that I used (from [`_layouts/default.html`](https://github.com/ankur-gupta/ankur-gupta.github.io/blob/master/_layouts/default.html)):
```javascript
<script type="text/javascript">
      /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
      var disqus_shortname = 'perfectlyrandom'; // required: replace example with your forum shortname
      // var disqus_developer = 1; // Comment out when the site is live

      /* * * DON'T EDIT BELOW THIS LINE * * */
      (function () {
        var s = document.createElement('script'); s.async = true;
        s.type = 'text/javascript';
        s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
        (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
      }());
    </script>
```

You need to add this `count.js` javascript code to every page on which you want to display the
number of comments. This can be the blog post itself (such as this page) or it can be the
list of posts (such as the [`index.html`](http://perfectlyrandom.org/index.html)).

Next, you need to add some HTML which puts the number of comments wherever you want it.
I wanted to show comment count on both the post and the index page.
This is the snippet from [`index.html`](https://github.com/ankur-gupta/ankur-gupta.github.io/blob/master/index.html):
```html
{% raw%}
<a href="{{ post.url }}index.html#disqus_thread" data-disqus-identifier="{{post.url}}"></a>
{% endraw %}
```
and, this is the snippet from [`_includes/title-with-author.html`](https://github.com/ankur-gupta/ankur-gupta.github.io/blob/master/_includes/title-with-author.html):
```html
{% raw %}
<a href="{{ page.url }}index.html#disqus_thread" data-disqus-identifier="{{page.url}}"></a>
{% endraw %}
```

The [`_includes/title-with-author.html`](https://github.com/ankur-gupta/ankur-gupta.github.io/blob/master/_includes/title-with-author.html) file is included in [`_layouts/post.html`](https://github.com/ankur-gupta/ankur-gupta.github.io/blob/master/_layouts/post.html). The difference between the above two snippets is that one uses `post.url` and the
other uses `page.url`.

These steps seem like they would work, and they do. But there is one more thing that may help you
keep you from **setting your hair on fire**. Even when you do everything right, it takes Disqus
some time to handle the javascript (I have no idea why!). I noticed that the same exact code
would initially not show the comment count at all. But later on, after about 5-10 minutes and
after closing and reopening the web page, the comment count will magically appear. Similarly,
even after I wrote a comment to test things out, the web page would not show the correctly
updated count. I had to wait another few minutes to get the correct count. So, before you go
unnecessarily "correcting" your code, just wait and see if it works.

**Reminder:** Remember to change the `disqus_shortname` to your own forum shortname. If you keep on using my shortname, `perfectlyrandom`, as shown in the javascript above, I will get an email from Disqus about the comment.


text:
---
layout: post-no-feature
title: "Filming"
description: "The railway bridge was the perfect location for shooting a scene in Chitty Chitty Bang Bang."
category: history
tags: [filming, railway, bridge, halt]
---

### Chitty Chitty Bang Bang

The 1968 film starring Dick Van Dyke had a memorable scene filmed at the railway bridge. Watch it again to see how little has changed!

<iframe width="620" height="350" src="https://www.youtube.com/embed/109uKA3nWog" frameborder="0" allowfullscreen></iframe>

### Railway

The bridge was constructed in 1904 and the line opened in 1906. This [photo](http://www.railwayarchive.org.uk/Lpages/html/L3327.html) shows the newly constructed bridge:

![1904 Ilmer Bridge](http://www.transportarchive.org.uk/aimages/L3327.jpg)

### Station

Adjacent to the bridge was Ilmer Halt, an on-request station where a telephone was used to ask for the next train to stop at the halt. The station was opened 1st April 1929 serving the London and North-Eastern Railway Company. Initially, 1 northboard and 1 southbound train stopped here every morning on weekdays. Ilmer Halt can be seen in this still image taken from a [train cab video](http://youtu.be/nyWkpteoa84?t=39s) in 1962. The station closed the following year:

![Ilmer Halt]({{ site.url }}/images/halt.jpg)

branch_name: refs/heads/gh-pages

gha_language: SCSS


text:
Day 6 - RWD part 1

Today was a busy day, so I made today's coding a little lighter so I don't strain myself and lose motivation. I started with a little research on
RWD fundamentals and did some small experiments. Tomorrow I want to desing simple layout and test it carefully with media queries and
responsive elements like fonts or images.

**Stack**:
- HTML
- CSS (SCSS)
- Gulp
- Google (mostly)

**Media queries**: Not exactly but **YES!** FINALLY!

**Speed code video:**
[[ Here ]](https://www.youtube.com/watch?v=vyMIO0IH2yQ)

**What could have been done better?:**
- Whole day...  I'm so tired x.x

**Wasted cups of coffee**: 0

## Instalation

- Clone this repo
- Use `pnpm install` command
- In project directory use `gulp`

url: https://raw.githubusercontent.com/NumerDev/Daily-Coding/c9b50ce8a0f3f57ec9e7e6d2bc6fa681cfbaffff/Projects/Day 6 -  RWD part 1/README.md

repository: NumerDev/Daily-Coding

path: /Projects/Day 6 -  RWD part 1/README.md

repo_name: NumerDev/Daily-Coding


text:
---
layout: post
title: "Kalman filter, Extended Kalman Filter, and Unscented Kalman Filter - Part 2"
tagline: "Hidden charm of Gaussian distribution"
categories: Bayesian Filtering
image: /thumbnail-mobile.png
author: "Phuong Hoang"
meta: "Springfield"
---

![Sant Logo](/images/BayesianFiltering.JPEG)
We are in the era of Kalman filter after the first blog. However, the un-answered question is that what if the prediction model (dynamic model function) and the observation model (the measurement model) are not linear.

$$ x_k = f(x_{k-1}) + q_{k-1}$$

$$ y_k = h(x_k) + r_k $$

* $$f(.)$$ is the dynamic model function or the prediction model
* $$h(.)$$ is the observation model or the measurement model function
* $$r_k \sim N(0, R_k)$$ is Gaussian measurement noise may be from your Computer Vision module
* $$q_{k-1} \sim N(0, Q_k)$$ is Gaussian process noise may be from your control module

The non-linear functions can be linearized as follows:

$$ f(x) \approx f(m) + F_x(m) (x-m) $$
$$ h(x) \approx h(m) + H_x(m) (x-m) $$

where $$x \sim N(m, P) $$ and $$F_x, H_x$$ are the Jacobian matrices of $$f$$ and $$h$$, respectively.

Let's consider a base case - a transformation of $$x$$ into $$y$$

$$ x \sim N(m,P)$$

$$ y = g(x)$$

We should ask the main questions of Linear Approximation of Non-Linear Transforms are what is the mean and covariance of $$y = g(x)$$

First, the probability density of y is now NOT Gaussian any more. The main reason is that the form of it is now as follows:

$$p(y) = \mid J(h)\mid N(g^{-1}(y) \mid m, P)$$

But we should linearly approximate the probability distribution of $$y = g(x)$$ by estimating its mean $$E[g(x)]$$ and its covariance $$Cov[g(x)]$$

Utilizing Taylor series expansion of $$g$$ on mean $$m$$, we can get:

$$g(x) = g(m + \delta x) = g(m) + G_x(m) \delta x + \sigma_i \frac{1}{2}\delta x^T G_{xx}^(i)(m)\delta x $$

where $$\delta x = x-m $$

Linear approximation:

$$ g(x) \approx g(m) + G_x(m)\delta x$$

$$ E[g(x)] \approx g(m) + G_x(m) E[ \delta x] \approx g(m)$$

For covariance we get the approximation based on Delta method for multivariate variables

$$g(x) \approx g(m) + G_x(m)^T (x-m)$$

<!--
\begin{align} Var(g(x)) & \approx Var(g(m) + G_x(m)^T (x-m)) \\ &= Var(g(m) + G_x(m)^T x - G_x(m)^T m)  \\ &= Var(G_x(m)^T x) \\ &= G_x(m)^T Var(x) G_x(m) \end{align} -->

$$\begin{eqnarray}
Var[g(x)] &\approx& Var[g(m) + G_x(m)^T (x-m)]   \\\\\\
&=& Var[g(m) + G_x(m)^T x - G_x(m)^T m]  \\\\\\
&=& Var[G_x(m)^T x]  \\\\\\
&=& G_x(m)^T Var(x) G_x(m)
\end{eqnarray}$$

$$cov[g(x)] \approx G_x(m)^T P G_x(m) $$

Now,  we derive the EKF based on the linear approximations of non-linear transforms.

#Prediction step

Assume that the filtering distribution of the previous step is Gaussian

$$p(x_{k-1} \mid y_{1:k-1})  \approx N(x_{k-1} \mid m_{k-1}, P_{k-1}) $$

The joint distribution of $$x_{k-1}$$ and $$x_k = f(x_{k-1}) + q_{k-1}$$ is NOT Gaussian anymore since $$f()$$ is non linear function. We can approximate linearly as follows:

$$ p(x_{k-1}, x_k \mid y_{1:k-1}) \approx N( \left [ x_{k-1}, x_k \right ] \mid m^{'}, P^{'})$$

where

$$m^{'} = \begin{pmatrix} m_{k-1} \\\ f(m_{k-1}) \end{pmatrix}$$

$$P^{'} = \begin{pmatrix} P_{k-1} && P_{k-1}F_x^T(m_{k-1}) \\\ F_x(m_{k-1})P_{k-1} && F_xP_{k-1}F_x^T + Q_{k-1} \end{pmatrix}$$

In the prediction step, the approximate predicted distribution of $$x_k$$ given $$y_{1:k-1}$$ is Gaussian with moments

$$ P(x_k \mid y_{1:k-1}) \sim N(m_k^{-}, P_{k}^{-})$$

$$ m_k^{-} = f(m_{k-1}) $$

$$ P_k^{-} =  F_xP_{k-1}F_x^T + Q_{k-1} $$

#Update step
Similarly, we can approximate the joint distribution of $$x_k$$ and $$y_k = h(x_k) + r_k$$ by linear approximation although the distribution is non-Gaussian

$$ P(x_k, y_k \mid y_{1:k-1}) \approx N \left( \begin{matrix} x_k \\\ y_k \end{matrix} \mid m^{''}, P^{''} \right)$$

where

$$ m^{''} = \begin{pmatrix} m_k^{-} \\\ h(m_k^{-}) \end{pmatrix}$$

$$ P^{''} = \begin{pmatrix} P_k^{-} && P_k^{-}H_x^T(m_k^{-}) \\\ H_x(m_k^{-}) P_k^{-} && H_x(m_k^{-}) P_k^{-}H_x^T(m_k^{-}) + R_k \end{pmatrix}$$

From the joint distribution, we can derive the conditional distribution $$ p(x_k \mid y_k, y_{1:k-1}) \approx N(m_k, P_k)$$ as follows:

$$ m_k = m_k^{-} + P_k^{-} H_k^T (H_x P_k^{-} H_x^T +R_k)^{-1} [y_k - h(m_k^{-})]$$

$$ P_k = P_k^{-} - P_k^{-}H_x^T(H_x P_k^{-} H_x^{T} + R_k)^{-1}H_x P_k^{-}$$

It sounds mathematically complex right?! But you don't have to remember the equation since computers or edge computing resources will do it for you.

What we should understand and remember are the advantages and limitations of EKF.
* Noise processes must be Gaussian - not sure in real practices
* Jacobian matrices can be computationally expensive and quite error prone


text:
### Introduction
- This project is completed for Startup called 'Sparkify - A music streaming company'.
- The aim of the project is to create a Postgres database with tables designed to optimize queries on song play analysis.
- A star schema for database and ETL pipeline for analysis is created using Python3 and SQL
#

### Raw Data
- JSON logs on user activity on the app
- JSON metadata on the songs in the app
#

### PostgreSQL table
- A Fact table of Songs-Played
- Dimenisons Table: Users, Songs, Artists and time
#

### Project Implementation
#### There are 3 project phases:
- Database and tables creation
   * Fact and Dimesnions tables are idenitied and created
   - Data Definitions and Constraints are created
   - Create, Insert and Upsert operations are created
- ETL processes building
   * Extract- Transform Processes are identified in this phase:
   - Json data is transformed to pandas dataframes
   - Duplicates are removed adhering to table constraints
   - Data is enhanced to meet all requirements set in phase1
   - Data is pushed into SQL tables through post-greSQL connection in Python
   - Testing is done before complete automation
- ETL pipeline building
   * A automated Extract, Transform and Load pipeline is created to rapidly push data into SQL tables
 #

 ### How to run this project
 - Clone the repository

 - Change the settings parameters: password and user for accessing PostgreSQL server in settings.py

 - Install the requirements using requirements.txt

 - Run the files in order from commandline:
      * python3 create_tables.py
      - python3 etl.py

      You can view the results in postgreSQL server.

      ![](https://github.com/RammySekham/Data-Modelling-ETL/blob/main/DataModelling_PostgreSQL/postgreSQL_database.PNG)
      #

 - Use codeSample.ipynb to query the data for analysis
   #

repository: RammySekham/cassandra-postgres

repo_name: RammySekham/cassandra-postgres


text:
### [CVE-2020-22002](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-22002)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

An Unauthenticated Server-Side Request Forgery (SSRF) vulnerability exists in Inim Electronics Smartliving SmartLAN/G/SI <=6.x within the GetImage functionality. The application parses user supplied data in the GET parameter 'host' to construct an image request to the service through onvif.cgi. Since no validation is carried out on the parameter, an attacker can specify an external domain and force the application to make an HTTP request to an arbitrary destination host.

### POC

#### Reference
- https://www.zeroscience.mk/en/vulnerabilities/ZSL-2019-5545.php

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

repo_name: trickest/cve


text:
## Last Week's Accomplishments

Finally get everything worked in my virtual box.
![alt text](https://github.com/janinewu/rcos-status-updates/blob/master/1.png?raw=true)

Finished angular tutorial on the official site. https://angular.io/tutorial/toh-pt6

## This Week's Plan

Got myself assigned to an issue. https://github.com/YACS-RCOS/yacs/issues/366
Have a lot of things do during the weekend, so probably will start working on it since Monday, and hopefuly can get it done by next Friday.

## Anything Blocking?

Problems with linux in virtual box. Cannot get sublime installed, cannot see the application menu(solved during small group meeting in Friday)

## Notes

> This is an optional section for any sort of information that does not fall under any of the other categories.

repository: janinewu/rcos-status-updates

repo_name: janinewu/rcos-status-updates