text:
# Metrics specification

This document describes the metrics exposed by `ha_cluster_exporter`.

General notes:
- All the metrics are _namespaced_ with the prefix `ha_cluster`, which is followed by a _subsystem_, and both are in turn composed into a _Fully Qualified Name_ (FQN) of each metrics.
- All the metrics and labels _names_ are in snake_case, as conventional with Prometheus. That said, as much as we'll try to keep this consistent throughout the project, the label _values_ may not actually follow this convention, though (e.g. value is a hostname).

- If the `enable-timestamps` option is on, all the metrics will be timestamped with the Unix epoch time in milliseconds.

These are the currently implemented subsystems.

1. [Pacemaker](#pacemaker)
2. [Corosync](#corosync)
3. [SBD](#sbd)
4. [DRBD](#drbd)
5. [Scrape](#scrape)

## Pacemaker

The Pacemaker subsystem collects an atomic snapshot of the HA cluster directly from the XML CIB of Pacemaker via `crm_mon`.

0. [Sample](../test/pacemaker.metrics)
1. [`ha_cluster_pacemaker_config_last_change`](#ha_cluster_pacemaker_config_last_change)
2. [`ha_cluster_pacemaker_fail_count`](#ha_cluster_pacemaker_fail_count)
3. [`ha_cluster_pacemaker_location_constraints`](#ha_cluster_pacemaker_location_constraints)
4. [`ha_cluster_pacemaker_migration_threshold`](#ha_cluster_pacemaker_migration_threshold)
5. [`ha_cluster_pacemaker_nodes`](#ha_cluster_pacemaker_nodes)
6. [`ha_cluster_pacemaker_node_attributes`](#ha_cluster_pacemaker_node_attributes)
7. [`ha_cluster_pacemaker_resources`](#ha_cluster_pacemaker_resources)
8. [`ha_cluster_pacemaker_stonith_enabled`](#ha_cluster_pacemaker_stonith_enabled)

### `ha_cluster_pacemaker_config_last_change`

#### Description

The value of this metric is a Unix timestamp in seconds, converted to a float, corresponding to the last time Pacemaker configuration changed.
The metric is in turn timestamped with the time it was last checked.

### `ha_cluster_pacemaker_fail_count`

#### Description

The number of fail count per node and resource ID.
The value is an integer ranging from 0 to `+Inf`.
The actual maximum integer value depends on Pacemaker internals, so please refer to upstream documentation for further information.

### `ha_cluster_pacemaker_location_constraints`

#### Description

Resource location constraints.
The value of the metric is the **score** of the constraint, represented by an integer ranging from `-Inf` to `+Inf`.
The actual minimum and maximum integer values depend on Pacemaker internals, so please refer to upstream documentation for further information.

#### Labels

- `constraint`: the unique string identifier of the constraint.
- `node`: the node the constraint applies to.
- `resource`: the resource the constraint applies to.
- `role`: the resource role the constraint applies to, if any.

### `ha_cluster_pacemaker_migration_threshold`

#### Description

The number of migration threshold pro node and resource ID set by a pacemaker cluster.
Possible values are positive numbers.

### `ha_cluster_pacemaker_nodes`

#### Description

The status of each node in the cluster; it will have one line for each possible `status` of each `node`.
A value of `1` means the node is in the status specified by the `status` label, a value of `0` means it is not.

#### Labels

- `node`: name of the node (usually the hostname).
- `status`: one of `online|standby|standby_onfail|maintanance|pending|unclean|shutdown|expected_up|dc`.
- `type`: one of `member|ping|remote`.

### `ha_cluster_pacemaker_node_attributes`

#### Description

This metric exposes in its labels raw, opaque, cluster metadata, called node attributes, which often leveraged by Resource Agents.
The value of each line will always be `1`.

#### Labels

- `node`: name of the node (usually the hostname).
- `name`: name of the attribute.
- `value`: value of the attribute.

### `ha_cluster_pacemaker_resources`

#### Description

The status of each resource in the cluster; it will have one line for each possible `status` of each `resource`.
A value of `1` means the resource is in the status specified by the `status` label, a value of `0` means it is not.

#### Labels

- `agent`: the name of the resource agent for this resource.
- `clone`: the name of the clone this resource belongs to, if any.
- `group`: the name of the group this resource belongs to, if any.
- `managed`: either `true` or `false`.
- `node`: the name of the node hosting the resource.
- `resource`: the unique resource name.
- `role`:  one of `started|stopped|master|slave` or one of `starting|stopping|migrating|promoting|demoting`.
- `status`: one of `active|orphaned|blocked|failed|failure_ignored`.

### `ha_cluster_pacemaker_stonith_enabled`

#### Description

Whether or not stonith is enabled in the cluster.
Value is either `1` or `0`.

## Corosync

The Corosync subsystem collects cluster quorum votes and ring status by parsing the output of `corosync-quorumtool` and `corosync-cfgtool`.

0. [Sample](../test/corosync.metrics)
1. [`ha_cluster_corosync_member_votes`](#ha_cluster_corosync_member_votes)
2. [`ha_cluster_corosync_quorate`](#ha_cluster_corosync_quorate)
3. [`ha_cluster_corosync_quorum_votes`](#ha_cluster_corosync_quorum_votes)
4. [`ha_cluster_corosync_ring_errors`](#ha_cluster_corosync_ring_errors)
5. [`ha_cluster_corosync_rings`](#ha_cluster_corosync_rings)

### `ha_cluster_corosync_member_votes`

#### Description

How many votes each member node has contributed with to the current quorum

#### Labels

- `node_id`: the internal corosync identifier associated to this node.
- `node`: the name of the node; usually the hostname.
- `local`: whether or not this is the local node.

### `ha_cluster_corosync_quorate`

#### Description

Whether or not the cluster is quorate.
Value is either `1` or `0`.

### `ha_cluster_corosync_quorum_votes`

#### Description

Cluster quorum votes; one line per type.

#### Labels

- `type`: one of `expected_votes|highest_expected|total_votes|quorum`

### `ha_cluster_corosync_ring_errors`

#### Description

The total number of faulty corosync rings.

### `ha_cluster_corosync_rings`

#### Description

The status of each Corosync ring; `1` means healthy, `0` means faulty.

#### Labels

- `ring_id`: the internal Corosync ring identifier; usually corresponds to the first member node to join.
- `node_id`: the internal Corosync identifier of the local node.
- `number`: the ring number.
- `address`: the IP address locally linked to this ring.

## SBD

The SBD subsystems collect devices stats by parsing its configuration and the output of `sbd --dump`.

0. [Sample](../test/sbd.metrics)
1. [`ha_cluster_sbd_devices`](#ha_cluster_sbd_devices)
2. [`ha_cluster_sbd_timeouts`](#ha_cluster_sbd_timeouts)

### `ha_cluster_sbd_devices`

#### Description

The SBD devices in the cluster; one line per device.
Either the value is `1`, or the line is absent altogether.

#### Labels

- `device`: the path of the SBD device
- `status`: one of `healthy|unhealthy`

The total number of lines for this metric will be the cardinality of `device`.

### `ha_cluster_sbd_timeouts`

#### Description

The SBD timeouts pro SBD device
Value is an integer expessing the timeout

#### Labels

- `device`: the path of the SBD device
- `type`:  either `watchdog` or `msgwait`

## DRBD

The DRBD subsystems collect devices stats by parsing its configuration the JSON output of `drbdsetup`.

0. [Sample](../test/drbd.metrics)
1. [`ha_cluster_drbd_resources`](#ha_cluster_drbd_resources)
2. [`ha_cluster_drbd_written`](#ha_cluster_drbd_written)
3. [`ha_cluster_drbd_read`](#ha_cluster_drbd_read)
4. [`ha_cluster_drbd_al_writes`](#ha_cluster_al_writes)
5. [`ha_cluster_drbd_bm_writes`](#ha_cluster_bm_writes)
6. [`ha_cluster_drbd_upper_pending`](#ha_cluster_drbd_upper_pending)
7. [`ha_cluster_drbd_lower_pending`](#ha_cluster_drbd_lower_pending)
8. [`ha_cluster_drbd_quorum`](#ha_cluster_drbd_quorum)
9. [`ha_cluster_drbd_connections`](#ha_cluster_drbd_connections)
10. [`ha_cluster_drbd_connections_sync`](#ha_cluster_drbd_connections_sync)
11. [`ha_cluster_drbd_connections_received`](#ha_cluster_drbd_connections_received)
12. [`ha_cluster_drbd_connections_sent`](#ha_cluster_drbd_connections_sent)
13. [`ha_cluster_drbd_connections_pending`](#ha_cluster_drbd_connections_pending)
14. [`ha_cluster_drbd_connections_unacked`](#ha_cluster_drbd_connections_unacked)
15. [`ha_cluster_drbd_split_brain`](#ha_cluster_drbd_split_brain)

### `ha_cluster_drbd_connections`

#### Description

The DRBD resource connections; 1 line per per `resource`, per `peer_node_id`
Either the value is `1`, or the line is absent altogether.

#### Labels

- `resource`: the resource this connection is for.
- `peer_node_id`: the id of the node this connection is for
- `peer_role`: one of `primary|secondary|unknown`
- `volume`: the volume number
- `peer_disk_state`: one of `attaching|failed|negotiating|inconsistent|outdated|dunknown|consistent|uptodate`

The total number of lines for this metric will be the cardinality of `resource` times the cardinality of `peer_node_id`.

### `ha_cluster_drbd_connections_sync`

#### Description

The DRBD disk connections in sync percentage. Values are float from `0` to `100.00`.

#### Labels

- `resource`: the resource this connection is for.
- `peer_node_id`: the id of the node this connection is for
- `volume`: the volume number

### `ha_cluster_drbd_connections_received`

#### Description

Volume of net data received from the partner via the network connection in KiB; 1 line per per `resource`, per `peer_node_id`
Value is an integer greater than or equal to `0`.

#### Labels

- `resource`: the resource this connection is for.
- `peer_node_id`: the id of the node this connection is for
- `volume`: the volume number

### `ha_cluster_drbd_connections_sent`

#### Description

Volume of net data sent to the partner via the network connection in KiB; 1 line per per `resource`, per `peer_node_id`
Value is an integer greater than or equal to `0`.

#### Labels

- `resource`: the resource this connection is for.
- `peer_node_id`: the id of the node this connection is for
- `volume`: the volume number

### `ha_cluster_drbd_connections_pending`

#### Description

Number of requests sent to the partner that have not yet been received; 1 line per per `resource`, per `peer_node_id`
Value is an integer greater than or equal to `0`.

#### Labels

- `resource`: the resource this connection is for.
- `peer_node_id`: the id of the node this connection is for
- `volume`: the volume number

### `ha_cluster_drbd_connections_unacked`

#### Description

Number of requests received by the partner but have not yet been acknowledged; 1 line per per `resource`, per `peer_node_id`
Value is an integer greater than or equal to `0`.

#### Labels

- `resource`: the resource this connection is for.
- `peer_node_id`: the id of the node this connection is for
- `volume`: the volume number

### `ha_cluster_drbd_resources`

#### Description

The DRBD resources; 1 line per `name`, per `volume`
Either the value is `1`, or the line is absent altogether.

#### Labels

- `resource`: the name of the resource.
- `role`: one of `primary|secondary|unknown`
- `volume`: the volume number
- `disk_state`: one of `attaching|failed|negotiating|inconsistent|outdated|dunknown|consistent|uptodate`

The total number of lines for this metric will be the cardinality of `name` times the cardinality of `volume`.

### `ha_cluster_drbd_written`

#### Description

Amount in KiB written to the DRBD resource; 1 line per `resource`, per `volume`
Value is an integer greater than or equal to `0`.

#### Labels

- `resource`: the name of the resource.
- `volume`: the volume number

### `ha_cluster_drbd_read`

#### Description

Amount in KiB read from the DRBD resource; 1 line per `resource`, per `volume`
Value is an integer greater than or equal to `0`.

#### Labels

- `resource`: the name of the resource.
- `volume`: the volume number

### `ha_cluster_drbd_al_writes`

#### Description

Number of updates of the activity log area of the meta data; 1 line per `resource`, per `volume`
Value is an integer greater than or equal to `0`.

#### Labels

- `resource`: the name of the resource.
- `volume`: the volume number

### `ha_cluster_drbd_bm_writes`

#### Description

Number of updates of the bitmap area of the meta data; 1 line per `resource`, per `volume`
Value is an integer greater than or equal to `0`.

#### Labels

- `resource`: the name of the resource.
- `volume`: the volume number

### `ha_cluster_drbd_upper_pending`

#### Description

Number of block I/O requests forwarded to DRBD, but not yet answered by DRBD; 1 line per `resource`, per `volume`
Value is an integer greater than or equal to `0`.

#### Labels

- `resource`: the name of the resource.
- `volume`: the volume number

### `ha_cluster_drbd_lower_pending`

#### Description

Number of open requests to the local I/O sub-system issued by DRBD; 1 line per `resource`, per `volume`
Value is an integer greater than or equal to `0`.

#### Labels

- `resource`: the name of the resource.
- `volume`: the volume number

### `ha_cluster_drbd_quorum`

#### Description

Quorum status of the DRBD resource according to it's configured quorum policies; 1 line per `resource`, per `volume`
Value is `1` when quorate, or `0` when inquorate.

#### Labels

- `resource`: the name of the resource.
- `volume`: the volume number

### `ha_cluster_drbd_split_brain`

#### Description

This metric signal if there is a split brain occurring per resource and volume.
Either the value is `1`, or the line is absent altogether.

This metric is a special metric compared to others, because in order to make this metric work you will need to setup a DRBD custom split-brain handler. Look at the end.

#### Labels

- `resource`: the name of the resource.
- `volume`: the volume number

#### Setting up the DRBD split-brain hook

In order to get the `split_brain` metric working:

1) copy hook into all drbd nodes:

get the hook from:
https://github.com/SUSE/ha-sap-terraform-deployments/blob/72c9d3ecf6c3f6dd18ccb7bcbde4b40722d5c641/salt/drbd_node/files/notify-split-brain-haclusterexporter-suse-metric.sh

2) on the DRBD configuration enable the hook:

```split_brain: "/usr/lib/drbd/notify-split-brain-haclusterexporter-suse-metric.sh"```

Refer to upstream doc: https://docs.linbit.com/docs/users-guide-8.4/#s-configure-split-brain-behavior

It is important for the exporter that he hook should create the files in that location and naming.

Remember to remove the files manually after the split brain is solved

## Scrape

The `scrape` subsystem is a generic namespace dedicated to internal instrumentation of the exporter itself.

1. [`ha_cluster_scrape_duration_seconds`](#ha_cluster_scrape_duration_seconds)
2. [`ha_cluster_scrape_success`](#ha_cluster_scrape_success)

### `ha_cluster_scrape_duration_seconds`

The duration of a collector scrape in seconds.

#### Labels

- `collector`: collector names correspond to the subsystem they collect metrics from.

#### Example

```
# TYPE ha_cluster_scrape_duration_seconds gauge
ha_cluster_scrape_duration_seconds{collector="pacemaker"} 1.234
```

### `ha_cluster_scrape_success`

Whether a collector succeeded.

Collectors may gracefully fail, but this won't prevent them from continuing running.

If some metrics could not be scraped, the value of this metric will be `0`.
In such cases, you shall find more details in the exporter logs.

#### Labels

- `collector`: collector names correspond to the subsystem they collect metrics from.

#### Examaple

```
# TYPE ha_cluster_scrape_success gauge
ha_cluster_scrape_success{collector="pacemaker"} 1
```

gha_language: Go


text:
# CombinedLog Parser

A CombinedLog parser in Haskell.

## Examples

```haskell
parseEvent "<IP_ADDRESS> - frank [10/Oct/2000:13:55:36 -0700] \"GET /apache_pb.gif HTTP/1.0\" 200 2326 \"http://www.example.com/start.html\" \"Mozilla/4.08 [en] (Win98; I ;Nav)\""
```
```haskell
Event {
  remote = "<IP_ADDRESS>",
  logName = Nothing,
  authUser = Just "frank",
  timestamp = 2000-10-10 13:55:36 -0700,
  request = "GET /apache_pb.gif HTTP/1.0",
  status = 200,
  bytes = 2326,
  referer = Just "http://www.example.com/start.html",
  userAgent = Just "Mozilla/4.08 [en] (Win98; I ;Nav)"
}
```

## License

Copyright © 2014 Derek Schaefer<EMAIL_ADDRESS>
Licensed under the [MIT License](http://opensource.org/licenses/MIT).

license: MIT

repository: derek-schaefer/combinedlog-parser

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: derek-schaefer/combinedlog-parser


text:
![Static Logo](docs/static.png)

[![Version](https://img.shields.io/github/release/venmo/Static.svg)](https://github.com/venmo/Static/releases) ![Status](https://travis-ci.org/venmo/Static.svg?branch=master) ![Swift Version](https://img.shields.io/badge/swift-4.2-orange.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

Simple static table views for iOS in Swift. Static's goal is to separate model data from presentation. `Row`s and `Section`s are your “view models” for your cells. You simply specify a cell class to use and that handles all of the presentation. See the [usage](#usage) section below for details.

## Version Compatibility

| Swift Version | Static Version |
| ------------- | -------------- |
| 5.0+          | 4.0.0          |
| 4.2+          | 3.0.1          |
| 3.2+          | 2.1            |
| 3.0.1         | 2.0.1          |
| 3.0           | 2.0            |
| 2.3           | 1.2            |
| 2.2           | 1.1            |
| 2.0 - 2.1     | 1.0            |

## Installation

### Carthage

[Carthage](https://github.com/carthage/carthage) is the recommended way to install Static. Add the following to your Cartfile:

``` ruby
github "venmo/Static"
```

### CocoaPods

[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. To install Static with CocoaPods:

Make sure CocoaPods is installed (Static requires version 0.37 or greater).

Update your Podfile to include the following:

```ruby
use_frameworks!
pod 'Static', git: 'https://github.com/venmo/Static'
```

Run `pod install`.

### Manual

For manual installation, it's recommended to add the project as a subproject to your project or workspace and adding the appropriate framework as a target dependency.

## Usage

An [example app](Example) is included demonstrating Static's functionality.

### Getting Started

To use Static, you need to define [`Row`s](Static/Row.swift) and [`Section`s](Static/Section.swift) to describe your data. Here's a simple example:

```swift
import Static

Section(rows: [
    Row(text: "Hello")
])
```

You can configure `Section`s and `Row`s for anything you want. Here's another example:

```swift
Section(header: "Money", rows: [
    Row(text: "Balance", detailText: "$12.00", accessory: .disclosureIndicator, selection: {
        // Show statement
    }),
    Row(text: "Transfer to Bank…", cellClass: ButtonCell.self, selection: {
        [unowned self] in
        let viewController = ViewController()
        self.presentViewController(viewController, animated: true, completion: nil)
    })
], footer: "Transfers usually arrive within 1-3 business days.")
```

Since this is Swift, we can provide instance methods instead of inline blocks for selections. This makes things really nice. You don't have to switch on index paths in a `tableView:didSelectRowAtIndexPath:` any more!

### Customizing Appearance

The `Row` never has access to the cell. This is by design. The `Row` shouldn't care about its appearance other than specifying what will handle it. In practice, this has been really nice. Our cells have one responsibility.

There are several custom cells provided:

* `Value1Cell` — This is the default cell. It's a plain `UITableViewCell` with the `.Value1` style.
* `Value2Cell` — Plain `UITableViewCell` with the `.Value2` style.
* `SubtitleCell` — Plain `UITableViewCell` with the `.Subtitle` style.
* `ButtonCell` — Plain `UITableViewCell` with the `.Default` style. The `textLabel`'s `textColor` is set to the cell's `tintColor`.

All of these conform to [`Cell`](Static/Cell.swift). The gist of the protocol is one method:

```swift
func configure(row row: Row)
```

This gets called by [`DataSource`](Static/DataSource.swift) (which we'll look at more in a minute) to set the row on the cell. There is a default implementation provided by the protocol that simply sets the `Row`'s `text` on the cell's `textLabel`, etc. If you need to do custom things, this is a great place to hook in.

`Row` also has a `context` property. You can put whatever you want in here that the cell needs to know. You should try to use this as sparingly as possible.

### Custom Row Accessories

`Row` has an `accessory` property that is an `Accessory` enum. This has cases for all of `UITableViewCellAccessoryType`. Here's a row with a checkmark:

```swift
Row(text: "Buy milk", accessory: .checkmark)
```

Easy enough. Some of the system accessory types are selectable (like that little *i* button with a circle around it). You can make those and handle the selection like this:

```swift
Row(text: "Sam Soffes", accessory: .detailButton({
  // Show info about this contact
}))
```

Again, you could use whatever function here. Instance methods are great for this.

There is an additional case called `.view` that takes a custom view. Here's a `Row` with a custom accessory view:

```swift
Row(text: "My Profile", accessory: .view(someEditButton))
```

### Custom Section Header & Footer Views

`Section` has properties for `header` and `footer`. These take a `Section.Extremity`. This is an enum with `Title` and `View` cases. `Extremity` is `StringLiteralConvertible` you can simply specify strings if you want titles like we did the [Getting Started](#getting-started) section.

For a custom view, you can simply specify the `View` case:

```swift
Section(header: .view(yourView))
```

The height returned to the table view will be the view's `bounds.height` so be sure it's already sized properly.

### Working with the Data Source

To hook up your `Section`s and `Row`s to a table view, simply initialize a `DataSource`:

```swift
let dataSource = DataSource()
dataSource.sections = [
    Section(rows: [
        Row(text: "Hello")
    ])
]
```

Now assign your table view:

```swift
dataSource.tableView = tableView
```

Easy as that! If you modify your data source later, it will automatically update the table view for you. It is important that you don't change the table view's `dataSource` or `delegate`. The `DataSource` needs to be those so it can handle events correctly. The purpose of `Static` is to abstract all of that away from you.

### Wrapping Up

There is a provided [`TableViewController`](Static/TableViewController.swift) that sets up a `DataSource` for you. Here's a short example:

```swift
class SomeViewController: TableViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        dataSource.sections = [
            Section(rows: [
                Row(text: "Hi")
            ]),
            // ...
        ]
    }
}
```

Enjoy.

repository: soffes/Static

extension: markdown

gha_language: Swift

gha_license_id: MIT

repo_name: soffes/Static


text:
DRC-VISR --- Tutorial example for creating an external C++ library to extend the VISR framework
===============================================================================================

Copyright Andreas Franck<EMAIL_ADDRESS>2018 --- All rights reserved.

Copyright Institute of Sound and Vibration Research 2018 --- All rights reserved.

Overview
========

The **DRC-VISR** repository is a tutorial example to explain how to extend the VISR framework with code implemented in C++.

It contains a set of simple components, implementing dynamic range control (DRC) algorithms as compressors, expanders, etc.

Contents
========

The following components are provided:

* libdrccomponents: A C++ library containing a set of VISR components. These can be used to build C++ binaries such as standalone renderers, DAW plugins, or Max/MSP external.
   * Compressor: A multichannel compressor with an optional limiter setting, implemented as an atomic VISR component.

Build instructions
==================

Requirements
------------

* CMake (description uses the CMake GUI)
* VISR (either as an installed package or a build tree)
* A compiler (as GCC) or a development environment (Apple XCode, Microsoft Visual Studio) depending on your platform`

Installation
------------

* Clone the drc-visr repository
* Create a build directory (for instance visr-external-library-example-build). We refer to this directory as $DRC_BUILD in the following.
* In the CMake GUI, set the source and the build directory.
* Click the 'Configure' button
* Depending on the platform you might need to set the following variables
  (they might already be filled automatically, esp. on Linux and Mac OS X):

   + VISR_DIR This entry has to be set to either an installed VISR package or a build tree.
      - In case of a build tree, the entry must point to the src/ directory within, e.g., /home/af5u13/dev/VISR-build/src/
      - For an installed package on Linux, point to the directory containing the CMake export files: /usr/lib/cmake/visr/ . Normally this path is being found automatically.
      - For an installed package on Mac OS X, point to the root directory of that package, i.e., /Applications/VISR-X.X.X/lib/cmake/visr
      - For an installed package on Windows, point to the root directory of the package, e.g., c:\Program Files\VISR-X.X.X\lib\cmake\visr
* For single-configuration build system (such as Makefiles), you might set the variable CMAKE_BUILD_TYPE to either Debug or Release to get fast code or the ability to debug the code. In multi-configuration build systems (e.g., Visual Studio or XCode), you can select the build type in the IDE.
In the latter case the binary code is contained in either Debug/ or Release/ subdirectories within $DRC_BUILD.
* Run 'Configure' again.
* Check the PYTHON entries and set them accordingly. In particular, make sure that it points to the Python distribution (typically Python3) you intend to use. See the VISR installation instructions how to fill these settings.
* Click 'Generate'
* Build the project with the build system/IDE selected (e.g., make, XCode or Visual Studio).
   - For a Make project, go into the build directory and execute 'make all'

Usage
=====

The drc-visr package can be used in different ways:

Linking to external applications
--------------------------------

The project creates a library, libdrccomponents, that contains all atomic and composite components as C++ objects. These can be used and linked in other applications.

TODO: Provide proper visibility settings and install the public headers.

Usage in Python
---------------

All components (atomic and composite) can be used from Python, e.g., to create more complex signal flows or to run the CTC rendering in realtime.
To this end, Python wrappers are provided for these components.
They are contained in the Python module **drc-visr** and can be used in exactly the same way as builtin VISR components (contained in the **rcl** library) or Python-based components

The Python external **drc_visr** must be found by the Python interpreter. In most cases you should add the directory $DRC_BUILD/python to the $PYTHONPATH variable. For multi-configuration builds, the actual directory name can be $DRC_BUILD/python/Debug or $DRC_BUILD/python/Release (depending on the chosen build type).

::
  from drc_visr import Compressor

Standalone realtime renderer
----------------------------

In addition to the components, the drc-visr repository also provides a realtime C++ application that performs multichannel compression. It can use different, configurable audio interfaces. Extensive configuration options for the compressor can be passed as command line arguments (we suggest using a configuration file using the **--option-file** option (shorthand: **@**).

The full list of options can be displayed by

::
  ./standalone/standalone --help

repository: ChaogeCanFly/visr-cpp-library-example

repo_name: ChaogeCanFly/visr-cpp-library-example


text:
Overview

Welcome to the repository of Wolk. Wolk is a minimalistic piece of note taking software written in .NET Core and Vue + Vuetify.

- **Minimalistic web interface.** Wolk contains a minimalistic web interface where you can manage your daily note taking needs.
- **Simple API.** Wolk contains an API for you to automate nearly everything.
- **Todo.txt integration.** Wolk has integration for [todo.txt](http://todotxt.org/). This is a very simple, text based syntax to manage your todo items.
- **Sticky notes.** You can create a note of type "Sticky note" so you can create a whiteboard on your screen.
- **Progressive web app.** You can install the PWA on your phone and everything should work just fine.

I built Wolk with the idea of becoming more proficient with .NET Core and Vue. Overtime, it gained more functionalities and I started using it for my day-to-day use and am pretty satisfied with it.

Docs

- [Installation](docs/install.md)
- [User manual](docs/user-manual.md)
- [API](docs/api.md)
- [Configuration](docs/configuration.md)

repository: dukeofharen/wolk

gha_language: C#

repo_name: dukeofharen/wolk


text:
# Custom Command Handler Example using Express.js
## Custom commands and action handlers
### Simple custom slash command
In this example, we implement a custom slash command that can be used to create support tickets.

#### Setup
##### Application Settings
First we set the custom_action_handler_url in the application settings:

```javascript
await client.updateAppSettings({
    custom_action_handler_url: "https://example.com/{type}",
});
```

You can use a `{type}` variable substitution in the URL to pass on the name of the command that was triggered.

#####  Create Custom Command
Next, we register a “ticket” custom command and provide a description of the command and its arguments.

```javascript
await client.createCommand({
    name: "ticket",
    description: "Create customer support tickets",
    args: "[description]",
});
```

#####  Create Channel Type
In order to be able to use this command in a channel, we’ll need to create a channel type that includes the ticket command.

```javascript
await client.createChannelType({
    name: "support-channel-type",
    commands: ["ticket"],
});
```

#####  Create Channel
We can now create a new channel that will support our using new ticket command.

```javascript
const channel = client.channel("support-channel-type", "support-chat", {
    name: "Support Chat",
});
await channel.create();
```

When we look at the channel’s config, we should see the ticket command listed there:

```javascript
console.log(channel.getConfig());
{
  name: 'support-channel',
  commands: [
    {
      app_pk: 12345,
      name: 'ticket',
      description: 'Create customer support tickets',
      args: '[description]',
    }
  ],
  ...
}
```

In the frontend this will make the ticket command show up in the command auto-completion popup.

####  Custom Command Handler
Now we’re ready to use our custom ticket command.

```javascript
channel.sendMessage(text: "/ticket my laptop stopped working");
```

This will try to send a POST request to our custom_command_url endpoint with a JSON encoded body like:

```javascript
{
  "message": {
    "id": "gmoree-2b1909be-8b96-42c5-9c5b-01f84ea23330",
    "text": "/ticket my laptop stopped working",
    "command": "ticket",
    "args": "my laptop stopped working"
    "type": "regular",
    "attachments": [],
    ...
  },
  "user": {
    "id": "gmoree",
    "role": "user",
    "name": "Guyon Moree",
    ...
  }
}
```

##### Rewrite Message
To handle this request we’ll use Express JS. We’ll start by simply rewriting the message text to return the argument that was passed onto the ticket command:

```javascript
ticketCmdHandler = (req, res) => {
    // the body of the message we will modify
    // based on user interactions
    let message = req.body.message;

    message.text = `ticket created about "${message.args}"`;

    res.setHeader('Content-Type', 'application/json')
    res.end(JSON.stringify({message}))
};
```

This rewrites the message text and will be reflected in the frontend.

##### Actions
In order to add some interactivity to our command, we’ll be using message attachment actions, to let the user confirm or cancel the support ticket request.

```javascript
message.text = `creating ticket about "${message.args}"`;
message.attachments = [
   {
       type: "text",
       actions: [
           {
               type: "button",
               name: "action",
               value: "confirm",
               text: "Confirm",
               style: "primary",
           },
           {
               type: "button",
               name: "action",
               value: "cancel",
               text: "Cancel",
               style: "default",
           },
       ],
   }
];
```

The rewrite of the message text and attachment action will be reflected in the frontend.

##### Form Data
When a user interacts with one of the actions, the handler will be called again with an additional form_data attribute that will contain the chosen action:

```javascript
{
 "message": {
   ...
 },
 "user": {
   ...
 },
 "form_data": {
   "action": "confirm"
 }
}
```

Now that we have access to the chosen action, we can act accordingly. In case of a confirmation, we will finalize the message text and remove the previously added attachments. In case of cancel, we simply set the message to null, which will remove the message completely:

```javascript
const formData = req.body.form_data || {};
const action = formData["action"];

switch (action) {
   case "confirm":
       message.text = `ticket created about "${message.args}"`;
       message.attachments = null;
       break;
   case "cancel":
       message = null;
       break;
   default:
       ...
}
```

##### Message Types
The default message type is regular, which means it will be shown to everyone in the channel. It is common to set the message type to ephemeral while interacting with the command and set it to regular once the message has been finalized.

A 3rd type is error, which we can use to mark the message as invalid, eg. when command is missing a required argument.
```javascript
switch (action) {
   case "confirm":
       message.type = "regular";
       message.text = `ticket created about "${message.args}"`;
       message.attachments = null;
       break;
   case "cancel":
       message = null;
       break;
   default:
       if(message.args.trim() === "") {
           message.type = "error";
           message.text = "missing ticket description";
           break;
       }
       ...
```

#### Custom Command Interaction with MML
Using the attachment actions is limited to Buttons. If we want to use more elaborate interactions, we can use MML to create a form.

##### Rewrite Message MML field

Previously, we modified the text field and added an attachment with action on the message to communicate with the user. Now, we will replace these by rewriting the mml field instead:

```javascript
message.mml = `
   <mml name="ticket_form">
       <text>creating ticket about "${message.args}"</text>
       <row>
           <column width="2">By:</column>
           <column width="10">
               <input type="text" name="reported_by" value="${user.name}" />
           </column>
       </row>
       <button_list>
           <button name="action" value="confirm">Confirm</button>
           <button name="action" value="cancel">Cancel</button>
       </button_list>
   </mml>
`;
```

This will display 2 buttons like before, and an additional text input field that will allow us to enter the name of the person that reported this ticket, with a default set to the user associated with the message.

Handling the form works similar to handling the attachment action, in fact we don’t have to change anything for those. We only need to capture the reported_by field and transform the remaining messages to mml equivalents:

```javascript
switch (action) {
   case "confirm":
       const reportedBy = formData["reported_by"];
       message.type = "regular";
       message.mml = `
           <mml>
               <text>ticket created about "${message.args} by ${reportedBy}"</text>
           </mml>
       `;
       message.attachments = null;
       break;
```

#### Standalone MML Messages & Interactions
Messages containing MML are not necessarily initiated by slash commands, but can also be sent through the client’s sendMessage api.

```javascript
channel.sendMessage({
   mml: `<mml name="mml_form">
           <text>This is a standalone mml message</text>
           <button name="action" value="ok" text="ok"/>
         </mml>`,
   user: {
       id: "bot",
       name: "Mr. Bot",
       image: "bender.jpg"
   }
});
```

When a user interacts with the message, the custom command handler endpoint will be called, with the command name set to mml.

Additionally, the form data will include a field containing the mml name attribute value, called mml_name, that can be used to identify the form that initiated the request.

repository: GetStream/customcommand

repo_name: GetStream/customcommand


text:
# Deep Learning Recommendation Model for Personalization and Recommendation Systems for PyTorch

For more information about training deep learning models on Gaudi, visit [developer.habana.ai](https://developer.habana.ai/resources/).

The DLRM demo included in this release are as follows:
- DLRM training for FP32 and BF16 mixed precision for [Medium configuration](#medium-configuration) in Eager mode.
- DLRM training for FP32 and BF16 mixed precision for [Medium configuration](#medium-configuration) in Lazy mode.

**Table of Contents**
* [Model overview](#model-overview)
* [Setup](#setup)
* [Training the Model](#training-the-model)
* [Known issues](#known-issues)

## Model overview
This repository provides a script to train the Deep Learning Recommendation Model(DLRM) for PyTorch on Habana GaudiTM, and is based on Facebook's [DLRM repository](https://github.com/facebookresearch/dlrm). The implementation in this repository has been modified to support Habana GaudiTM and to make use of custom extension operators. For the details on what was changed in the model, please see the [Training Script Modifications section](#training-script-modifications)

One input data consists of continuous and categorical features. Categorical features and continuous features are converted into a dense representation of the same length by the embedding tables and the bottom MLP, respectively. Then the dot interaction is performed on all pairs of the embedding vectors and the processed continuous features. The output of the dot interaction is concatenated with the original processed continuous features and provided to the top MLP. Finally, this is fed into the sigmoid function, giving a probability that a user will click on an ad.

### Medium Configuration
Each gaudi contains a single embedding table with 3000000 entries of feature size 64.
- Model parameters
    - Interaction between categorical & continuous features set to 'cat'
    - Feature size for categorical features set to 64
    - Bottom MLP size set to "1024-1024-1024-64"
    - Top MLP size set to "4096-4096-4096-4096-4096-4096-4096-1"
    - Embedding table size set to "3000000" (for 1x)
    - Number of indices per lookup set to 38

- Hyperparameters
    - Mini batch size: 512
    - Learning rate: 1e-5
    - Optimizer: Adagrad

## Setup
Please follow the instructions given in the following link for setting up the
environment including the `$PYTHON` environment variable: [Gaudi Setup and
Installation Guide](https://github.com/HabanaAI/Setup_and_Install). Please
answer the questions in the guide according to your preferences. This guide will
walk you through the process of setting up your system to run the model on
Gaudi.

Set the `MPI_ROOT` environment variable to the directory where OpenMPI is installed.

For example, in Habana containers, use

```bash
export MPI_ROOT=/usr/local/openmpi/
```

### Dataset setup

#### Random dataset for medium configuration
Input data for the medium configuration is obtained from the random input generator provided in the scripts.

The following settings are used:
- num-indices-per-lookup: 38
- mini-batch-size: 512
- data-size: 1024000

## Training the model

In the docker container, clone this repository and switch to the branch that
matches your SynapseAI version. (Run the
[`hl-smi`](https://docs.habana.ai/en/latest/System_Management_Tools_Guide/System_Management_Tools.html#hl-smi-utility-options)
utility to determine the SynapseAI version.)

```bash
git clone -b [SynapseAI version] https://github.com/HabanaAI/Model-References
```
Go to the PyTorch dlrm directory.
```bash
cd Model-References/PyTorch/recommendation/dlrm
```
Install python packages required for DLRM model
```bash
pip install -r Model-References/PyTorch/recommendation/dlrm/requirements.txt
```
Set up the dataset as mentioned in the section [Dataset setup](#dataset-setup).

i. Run single-card training using Random data in lazy mode using Medium configuration in bf16 mixed precision
```
$PYTHON demo_dlrm.py  --world_size 1 --print-time --print-freq 500 --mode lazy --arch-interaction-op cat --arch-sparse-feature-size 64 --arch-embedding-size 3000000 --arch-mlp-bot 1024-1024-1024-64 --arch-mlp-top 4096-4096-4096-4096-4096-4096-4096-1 --mini-batch-size 512 --learning-rate 1e-05 --num-batches 10000 --num-indices-per-lookup 38 --optimizer adagrad --data_type bf16
```
```
$PYTHON dlrm_s_pytorch_hpu_custom.py --arch-interaction-op=cat --arch-sparse-feature-size=64 --arch-mlp-bot=1024-1024-1024-64 --arch-mlp-top=4096-4096-4096-4096-4096-4096-4096-1 --arch-embedding-size=3000000 --num-indices-per-lookup=38 --mini-batch-size=512 --learning-rate=1e-05 --num-batches=10000 --numpy-rand-seed=123 --print-precision=5 --data-size=8 --activation-function=relu --loss-function=bce --loss-threshold=0.0 --data-generation=random --data-trace-file=./input/dist_emb_j.log --data-set=kaggle --nepochs=1 --processed-data-file= --data-randomize=total --max-ind-range=-1 --data-sub-sample-rate=0.0 --print-freq=500 --optimizer=adagrad --raw-data-file= --run-lazy-mode --print-time --hmp --hmp-bf16 ./ops_bf16_dlrm.txt --hmp-fp32 ./ops_fp32_dlrm.txt
```

ii. Run single-card training using Random data in eager mode using Medium configuration in fp32
```
$PYTHON demo_dlrm.py  --world_size 1 --print-time --print-freq 500 --arch-interaction-op cat --arch-sparse-feature-size 64 --arch-embedding-size 3000000 --arch-mlp-bot 1024-1024-1024-64 --arch-mlp-top 4096-4096-4096-4096-4096-4096-4096-1 --mini-batch-size 512 --learning-rate 1e-05 --num-batches 10000 --num-indices-per-lookup 38 --optimizer adagrad
```

## Known issues
- Multinode configurations are not supported for DLRM.
- Placing mark_step() arbitrarily may lead to undefined behaviour. Recommend to keep mark_step() as shown in provided scripts.
- Only scripts & configurations mentioned in this README are supported and verified.

## Training Script Modifications
The following changes were added to support Habana devices:

1. Support for Habana device was added

   a. Added support to run DLRM in lazy mode in addition to the eager mode.
   mark_step() is performed to trigger execution of the graph.

   b. Changes for dynamic loading of HCL library.

   c. Certain environment variables are defined for habana device.

2. Added new file, dlrm_habana_kernels.py, that encapsulates some operators and utilities for Habana specific adaptations/optimizations

    a. Inside model, nn.EmbeddingBag was replaced by a custom operator for using Habana specific implementation of embedding bag kernel. Also, inputs to embedding bag are pre-processed on the host; this step has also been added as a custom operator which runs on the CPU.

    b. Embedding weights are updated using a custom operator (running on Habana device) which uses some outputs of the pre-processing step described above.

    c. Maximum size tensors are created wherever variable sized input and intermediate tensors can change from iteration to iteration. Actual tensors from the iteration are copied in-place into these tensors.
3. Added support for Adagrad optimizer in scripts.
4. Added modifications to discard partial batches.
5. Control of few Habana lazy mode optimization passes in bridge.
6. Added flag to allow re-running multiple iterations of training with previously
    loaded data to allow measurement of iteration time excluding dataloader times.
7. To improve performance:

    a. In case print-frequency is larger than 1, then accuracy and loss are pulled out of device at the iteration where printing is actually performed.

    b. Enabled pinned memory for data loader using flag pin_memory.

    c. When SGD optimizer is used, torch.optim.SGD is used only for updating learnable parameters of bottom and top MLP.

    d. When Adagrad optimizer is used, fusedAdagrad operator is used for updating bottom and top MLP weights.

8. Enhanced training scripts with multi-node support with following (Multinode is not functional in this release):

    a. Embedding table is split across cards.

    b. Training script modified to make use of all to all.

    c. Script argument distributed added to trigger distributed training.

    d. Split input batches based on number of cards (world_size) used.

    e. Use HCL backend.

    f. Added support for DDP.

    g. Printing of loss.

repository: omrialmog/Model-References

repo_name: omrialmog/Model-References


text:
### [CVE-2017-7235](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7235)
![](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 issue was discovered in cloudflare-scrape 1.6.6 through 1.7.1. A malicious website owner could craft a page that executes arbitrary Python code against any cfscrape user who scrapes that website. This is fixed in 1.8.0.

### POC

#### Reference
No PoCs from references.

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

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

repo_name: trickest/cve


text:
# Generating a Frontend Demo

Cool, You now have infra and services up and running! For front-end, CX Cloud CLI allows you to generate a front-end demo to test the concept with end-to-end functionality. Currently, we support Angular 7 and React is coming soon. In the future, we will also provide accelerators to be used as basis for customer specific implementation.

## Front-end generation

You start by creating a new repository for the service in Github, named for example `frontend-demo`. Then clone it to your project folder and start front-end demo generation by running the following commands:

```bash
$ git clone git@github.com:myorganization/frontend-demo.git
$ cd frontend-demo
$ cxcloud generate demo
```

You will go through a set of simple questions and receive an end-to-end working demo.

It should be noted that our Angular demo is using one API/service, with the Commerce \(commercetools\), Content \(Contenful\) and Search \(Algolia\) core modules enabled. Authentication is implemented via Commerce core module in this case, which is good for simple eCommerce project.

## Configuration

Generated demo will be using our live test API including end points with pre-filled sets of data for Commerce, Content and Search services. Later we will provide a guide to configure your front-end to connect to your own services, with set level of granularity, running in your AWS.

## Local test

In case of Angular demo, to explore it, from inside of the project folder you should run the following command:

```bash
$ npm run dev
```

By default, your demo will be available at `http://localhost:4200/` but check the console logs.

## Deployment

Run the following command to deploy your frontend demo:

```bash
$ cxcloud deploy
```

Check [Deploying Service](deploying-services.md) and [Routing Manifest](routing-manifest.md) sections for more information on deployment and routing.

## Commit

As a final step, commit changes to your Github repository by running the following commands:

```bash
$ git add .
$ git commit -m "initial commit"
$ git push
```

repository: najibla/docs

repo_name: najibla/docs


text:
# Date of Retrospective: 05/25/21

* Led by: Anika Arora
* Present: Anika, Rukmini, Calvin, Yvonne
* Absent: N/A

## Action item

What was good:
* Creating a priority list
* Monday meetings
* We always had something to show in meetings (always had updates for the team)
* We developed a good amount of things and now we should just focus on making it easy for the user to use our app.

What was bad:
* We put down too many ideas initially that weren't doable in 10 weeks.
* We finalized which map we were using really late.
* Our issues were too big (should have split it up into smaller issues).
* Didn't set up our database early on so we had to convert the hard-coded pages into the database.

Ideas:
* As we approach the end of development, we should increase how much we collaborate. Make sure everyone is on the same page and understands what they have to
    do to get the specifications to work.

Actions:
* Don't add new components or features until everything else is finished.
* Updating the Kanban board more frequently to make sure everyone is working on something and is on the same page.

* a goal: have alerting system implemented by Sunday --> use the last two weeks efficiently by having mini deadlines for small tasks
* a change: constant communication with team as soon as you make some progress

## Optional

* Make sure to revisit the retro notes if any of us needs to refer to any ideas we had during the retrospective

## Retro Assessment
* I used the quick retro outline. We went over what was good, what was bad, ideas, and actions. The retro went well for the team. Everyone shared their
    thoughts respectfully and we came up with some goals for the last few weeks. The retro helped my team become more organized and set deadlines for
    tasks that needed to be completed. We also agreed on how we will function as a team in the next few weeks (more communication, updating Kanban board
    more often, and no new components/features until everything else is done).


text:
---
layout: post
title: "Teaching OCaml and Prolog through Jupyter Notebooks"
date: 2020-01-19 15:16
categories: [OCaml, Prolog, Jupyter, Notebooks]
excerpt_separator: <!--more-->
---

Last semester at IIT Madras, I taught a revamped core course [CS3100 Paradigms
of Programming](http://kcsrk.info/cs3100_f19/), which introduces 3rd-year
students to functional and logic programming paradigms. While the course had
been traditionally offered in Lisp and Prolog, I introduced OCaml instead of
Lisp. All of the lectures were delivered through interactive Jupyter
notebooks. The assignments were also distributed as Jupyter notebooks and
evaluated through autograder facility in Jupyter. There has since been several
requests to replicate this setup elsewhere. Hence, I thought I should write
about the set up and experience of teaching through Jupyter notebooks.

<!--more-->

## Course Content

Having never taken a functional programming course, there was the question of
what I wanted the students to take away from the course. I wanted the course to
be a mixture of functional programming concepts (types and lambda calculus) as
well as advanced yet pragmatic concepts that one would find in modern functional
programming languages (such as GADTs and Monads). The OCaml part of the course
is based on the excellent [CS3110 from
Cornell](https://www.cs.cornell.edu/courses/cs3110/2019sp/) and [AFP from
Cambridge Computer Laboratory](https://www.cl.cam.ac.uk/teaching/1718/L28/). In
particular, I would highly recommend the [CS3110
book](https://www.cs.cornell.edu/courses/cs3110/2019sp/textbook/intro/3110.html)
for anyone taking first steps into functional programming. Lambda calculus
lectures were based on Peter Selinger's [lecture notes on lambda
calculus](https://arxiv.org/abs/0804.3434).

The Prolog part of the course were modelled on [Prolog lectures from Cambridge
Computer Laboratory](https://www.cl.cam.ac.uk/teaching/1819/Prolog/) and the
wonderful [The Art of
Prolog](https://mitpress.mit.edu/books/art-prolog-second-edition) book.

Teaching functional and logic programming in the same course allowed me to
develop interesting content that intersected both of the paradigms. In the
functional programming part of the lecture, I had introduced [simply typed
lambda calculus](http://kcsrk.info/cs3100_f19/lectures/lec11/lec11.pdf). In the
logic part of the course, we developed a type checker for simply typed lambda
calculus in Prolog. Merely encoding type checking rules for simply typed lambda
calculus in Prolog, [type inference with polymorphic types falls
out](http://kcsrk.info/cs3100_f19/lectures/lec25/lec25.pdf). With a tiny bit of
coaxing, Prolog synthesizes programs for the given type. In the last assignment,
the students were asked to implement [a Prolog interpreter in
OCaml](https://github.com/kayceesrk/cs3100_f19/blob/gh-pages/assignments/assignment6.ipynb).
There was indeed some value in teaching multiple paradigms in the same course,
not just for a comparative study of strengths and weaknesses, but to be able to
teach the students to pick the right tool for the job.

## Course Delivery

I had a clear idea that the course will have to be interactive where programs
are developed during the lectures. There was the option of using pdf slides and
switching to [utop](https://opam.ocaml.org/packages/utop/) for interactive
development. But this solution lacked the uniformity that the students would
like when reviewing the course materials. Moreover, switching between two
mediums made it difficult for me to plan the lectures and was a distraction for
the students.

### Jupyter Notebooks

Hence, I decided to use Jupyter Notebooks for the course. Jupyter is a
collection of open source standards and software for interactive development.
Jupyter supports a variety of languages. For OCaml, I used
[akabe/ocaml-jupyter](https://github.com/akabe/ocaml-jupyter), an OCaml kernel
for Jupyter notebooks. This uses `utop`, an advanced OCaml top-level in the
backend and hence provides excellent interactive top-level support. The
situation for Prolog was not so great. Eventually, I zeroed in on
[targodan/jupyter-swi-prolog](https://github.com/targodan/jupyter-swi-prolog)
but ended up improving the solution a bit
[kayceesrk/jupyter-swi-prolog](https://github.com/kayceesrk/jupyter-swi-prolog)
(TODO KC: upstream fixes). Jupyter supports [mathjax](https://www.mathjax.org/),
which allows typesetting LaTeX in the notebooks. This was great for writing the
lectures on lambda calculus.

### RISE for slideshow

Jupyter notebooks are webpages that mixes text and code. For lectures, I much
prefer slides since they let you focus on a particular images, statement or an
inference rule. While Jupyter allows the conversion of notebooks to slides
*out-of-band*, [RISE](https://github.com/damianavila/RISE) is an Jupyter
notebook extension that lets turn your Jupyter notebook into a slideshow. Adding
RISE to the setup makes the Jupyter experience compatible with traditional
slides based lectures.

## Course Distribution

Apart from delivering the lectures through the notebooks, I also wanted the
students to be able to go through the notebooks and be able to run the snippets.
Installing all the required software (OPAM, OCaml, Prolog, Jupyter and its
extensions, Jupyter Kernels for OCaml and Prolog) and correctly was not
something I wanted the students to go through. I wasn't even sure if this
software combination works on various Mac, Windows and Linux distributions.
Hence, everything was packaged as a [Docker
file](https://github.com/kayceesrk/cs3100_f19/blob/gh-pages/_docker/dockerfile),
and the latest version of the image uploaded to [docker
hub](https://hub.docker.com/r/kayceesrk/cs3100_iitm). In order to review the
course, the students only had to install Docker and Git and run [exactly 4
commands](https://github.com/kayceesrk/cs3100_f19#running-the-jupyter-notebooks).

Docker is generally supported on all major OSes. Packaging up the course content
as a docker image and pushing it to dockerhub is insurance against the software
combination not working in the next offering of the course; if for some reason
one of the dependency does not work next year, I can always fallback to the
docker image while I find a fix. One of my TAs ran a tutorial on basic Docker
and Git in the first week of the course to ensure that everyone was setup. I
would consider Docker and Git as essential tools for modern software development
as well as research. After that, the students did not ever have to do anything
on the command line.

## Assignments

[nbgrader](https://nbgrader.readthedocs.io/en/stable/) is a tool that
facilitates creating and grading assignments in Jupyter notebook. It uses
language-agnostic logic to identify failing cells, which meant that it was easy
to set up nbgrader for OCaml and Prolog. The assignments were
[released](http://kcsrk.info/cs3100_f19/assignments/) as Jupyter notebooks,
which the students filled in and submitted. nbgrader has support for unit tests
which allowed the students to get instant feedback as they were developing the
solutions.

## Wish List

Overall, the students felt that the Jupyter notebooks were better than
slidedecks. However, not everything was perfect with the Jupyter notebook based
lecturing. Here are some of the things that could be improved.

* There is no good diagramming + animation support for Jupyter notebooks. The
  best I could find was [egal](https://github.com/kayceesrk/egal) whose user
  interface I did not find intuitive. Even for simple diagrams, it was much more
  effort making diagrams there compared to Keynote, PowerPoint or OmniGraffle.
  Eventually, I used [draw.io](https://www.draw.io/) to make the diagrams and
  include the images in the slides for a few of the cases where I actually
  needed to make diagrams.
* Docker for Windows does not work on Windows Home or Student. Support for OPAM
  on Windows is slowly improving, but it is not yet for novices. Hence, I had to
  recommend the students to run an Ubuntu VM on their Windows machines in which
  they ran the course's docker container.
* nbgrader had several bugs which caused the autograder to award marks even for
  failing cells. The TAs had to go through a few of the assignments manually to
  ensure that students were awarded grades correctly. This is something that
  should be fixable easily.
* RISE doesn't easily let you change the size of the font. One has to edit the
  CSS to change the font size. And the default style wastes too much space. This
  meant that not much content can be fit into a single slide. Hence, I've had to
  artificially split content into multiple slides or zoom out several steps to
  show content that was cut off on the bottom.
* The support for Prolog is not so great. There are a few advanced features in
  Prolog for which the Prolog setup
  [fails](https://github.com/yuce/pyswip/issues/68). I had to switch to
  SWI-Prolog top-level for a few lectures. That said, the Prolog support is
  mostly there and the issues can be fixed with some effort.

## Conclusion

I have started working on fixing some of these issues and upstreaming the
solutions. Hopefully the fixes should be ready for the next iteration of the
course. If you would like to replicate this setup for your course, do feel free
to utilise the course materials.

gha_license_id: NOASSERTION


text:
# solus-scheduler
A web service for coordinating jobs between one or more builders and for
providing public-facing feedback on their status.

## API

### Public
``` yaml
GET /
    Response:
        Content-Type: text/html
        Body: Summary of the last 25 jobs and status of builders(s)
```

### Private

#### Types

**Job**
``` json
{
    "id"   : 27087,
    "task" : {
        "type"    : 0,
        "package" : {
            "name"    : "gd",
            "version" : "2.2.5",
            "release" : 13,
        }
    },
    "status"    : 3,
    "user"      : "sunnyflunk",
    "created"   : "2018-09-07T02:25:13Z00:00",
    "started"   : "2018-09-07T02:25:16Z00:00",
    "finished"  : "2018-09-07T02:29:23Z00:00",
    "builderid" : 0
}
```

**Jobs**
``` json
{
    "jobs" : [
        {job},
        {job}
    ]
}
```

#### Jobs
``` yaml
GET /api/v1/jobs
    Response:
        Content-Type: application/json
        Body: Page 1 with default offset of 25 jobs an an Array of Jobs

GET /api/v1/jobs/jobs?page=3&offset=10
    Query:
        page: the page number
        offset: the number of items per page
    Response:
        Content-Type: application/json
        Body: Specified page for the given offset as an Array of Jobs

POST /api/v1/jobs?package=nano
    Query:
        package: the name of the package to build
    Response:
        200: the job was created
        404: the package does not exist
        500: failed to create job

GET /api/v1/jobs/10
    Response:
        Content-Type: application/json
        Body: JSON description of the job

PUT /api/v1/jobs/10?state=done
    Query:
        state: the state to set for an existing job (done, failed, cancelled)
    Response:
        200: the job's status was updated
        404: the job does not exist
        500: failed to update job
```

repository: ionutnechita/datadrake-solus-builder

repo_name: ionutnechita/datadrake-solus-builder


text:
# Presentation Prompt

## Goal
** Student can demonstrate the proper use of a callback function by passing a function to another function as a parameter **

## intro to students - IWY
1- Hey everyone! How is everyone doing? I'm happy to see you all here.

2- Today, we're going to start with a brief review of what are variables, write some code, and run it in the browser console. Then we continue with functions, to finally learn the concept of High Order Functions or HOF.

Open a new CodePen to begin coding.

### Variables
- A variable is a named item that points to a piece of data.
- In JS variables do not need to be typed.
- We have access to that variable within the scope it was created. We can pass a variable around and use it whenever we want to.

Let's see that in codePen.

### Functions
- A function is a block of code that is encapsulated and can be run at any time.
- A function can be assigned to a variable.
- A function can take dynamic data. When the function is initialized this data is named, but not yet assigned. This is called a parameter.
- When we call a function, we can pass data into it. This is called an argument.
- Parameters and arguments can be any data type.
- We can pass data directly as an argument, or we can pass a variable.
- A parameter/argument can be ANY valid Javascript data type. (string, boolean, number, array, object, etc. hint: don't say function, yet)

### HOF: High Order Functions

repository: sdbeng/HOF

repo_name: sdbeng/HOF


text:
# Open Source Software - Spring 2021
## Dennis Chau

## Bio
Senior computer science student at RPI! Currently taking Open Source Software in the Spring 2021 semester.

![Headshot](./headshot.jpg)

[GitHub](https://github.com/dchau2017)

Discord: slick0888 #7262

## Lab Reports
[Lab 1](labs/lab-01/lab01.md)
[Lab 2](labs/lab-02/lab02.md)


text:
# jumpbox

Provides a "jumpbox" image for Openshift containing:

* bash
* curl
* source code control: git
* dns utilities: nslookup and dig
* text editors: nano and vi
* scripting: python
* aws cli
* mysql
* Openshift cli
* NSS Wrapper (to handle Openshift's dynamic UIDs)

The jumpbox is a docker container which runs a simple, one line `bash` shell script to loop indefinitely on a `sleep` statement.

## Deploying a jumpbox on Openshift
```yaml
apiVersion: v1
kind: Pod
metadata:
  name: jumpbox
spec:
  containers:
    - name: jumpbox
      image: mchudgins/jumpbox:latest
      command: [ "/bin/sh", "-c", "while /bin/true; do sleep 60; done" ]
      env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: "metadata.namespace"
      imagePullPolicy: Always
  restartPolicy: Never
```

## Connecting to the the jumpbox
After logging in via the Openshift `cli`, you can run `oc exec` to connect to the jumpbox pod.
However, for some reason I haven't taken the time to fully grok, the PS1 prompt complains "I have no name".  To correct this
launch a second Bash child process.  Since `oc` doesn't [currently](https://github.com/openshift/origin/issues/2284)
set up the Linux terminal to match the command line terminal on your computer, create the following `bash` shell script
to provide for a more optimal user experience:
```bash
#!/bin/sh
if [ "$1" = "" ]; then
  echo "Usage: kshell <pod>"
  exit 1
fi
COLUMNS=`tput cols`
LINES=`tput lines`
TERM=xterm
oc exec -i -t $1 -- env COLUMNS=$COLUMNS LINES=$LINES TERM=$TERM bash -il -c "bash"
```

Call this new shell script `kshell` and connect to your jumpbox pod using `kshell <pod name>`.

Happy hunting.

repository: mchudgins/jumpbox

repo_name: mchudgins/jumpbox


text:
---
discourse: 7735
---

(storage)=
# Storage

````{only} diataxis
The following how-to guides cover common operations related to storage:

```{toctree}
:titlesonly:

Back up a volume </howto/storage_backup_volume>
Create an instance in a pool </howto/storage_create_instance>
Manage buckets </howto/storage_buckets>
Manage pools </howto/storage_pools>
Manage volumes </howto/storage_volumes>
Move or copy a volume </howto/storage_move_volume>
```
````

## Related topics

```{only} diataxis
{{storage_exp}}

{{storage_ref}}
```

````{only} topical
```{toctree}
:titlesonly:

About storage </explanation/storage>
Manage pools </howto/storage_pools>
Create an instance in a pool </howto/storage_create_instance>
Manage volumes </howto/storage_volumes>
Move or copy a volume </howto/storage_move_volume>
Back up a volume </howto/storage_backup_volume>
Manage buckets </howto/storage_buckets>
/reference/storage_drivers
```
````

repository: tomponline/lxd

repo_name: tomponline/lxd


text:
---
title: "Update profilePhoto"
description: "Update the photo for the signed-in user, or the specified group or contact or team."
ms.localizationpriority: medium
author: "kevinbellinger"
ms.prod: "people"
doc_type: apiPageType
---

# Update profilePhoto

Namespace: microsoft.graph

Update the photo for the specified contact, group, team, or user in a tenant. The size of the photo you can update to must be under 8 MB.

Due to the current limit of 4 MB on the total size of each REST request, the size of the photo you can add is also limited to 4 MB. The following are the supported dimensions for HD photos on Exchange Online: `48x48`, `64x64`, `96x96`, `120x120`, `240x240`, `360x360`, `432x432`, `504x504`, and `648x648`.

You can use either PATCH or PUT for this operation.

> **Note:** This operation supports only a user's work or school mailboxes and not personal mailboxes.

## Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).

### To update the profile photo of a contact

|Permission type      | Permissions (from least to most privileged)              |
|:--------------------|:---------------------------------------------------------|
|Delegated (work or school account)      |   Contacts.ReadWrite           |
|Delegated (personal Microsoft account)      |   Not supported.            |
|Application      |    Contacts.ReadWrite           |

### To update the profile photo of a group

|Permission type      | Permissions (from least to most privileged)              |
|:--------------------|:---------------------------------------------------------|
|Delegated (work or school account)      |   Group.ReadWrite.All           |
|Delegated (personal Microsoft account)      |   Not supported.            |
|Application      |    Group.ReadWrite.All           |

### To update the profile photo of a team

| Permission Type | Permissions (from least to most privileged)  |
| --------------- | -------------------------------------------- |
| Delegated (work or school account)        | TeamSettings.ReadWrite.All |
| Delegated (personal Microsoft account)    | Not supported.     |
| Application                               | Not supported. |

### To update the profile photo of the signed-in user

|Permission type      | Permissions (from least to most privileged)              |
|:--------------------|:---------------------------------------------------------|
|Delegated (work or school account)      |   User.ReadWrite, User.ReadWrite.All           |
|Delegated (personal Microsoft account)      |   Not supported.            |
|Application      |    User.ReadWrite.All           |

> [!NOTE]
>
> 1. To update the photo of any user in the organization, your app must have the *User.ReadWrite.All* application permission and call this API under its own identity, not on behalf of a user. To learn more, see [get access without a signed-in user](/graph/auth-v2-service). Updating the photo of the signed-in user only requires *User.ReadWrite* permission.
> 2. There is currently a [known issue](/graph/known-issues#groups) with accessing group photos using application permissions.
> 3. Updating a user's photo using the Microsoft Graph API is currently not supported in Azure AD B2C tenants.

## HTTP request
<!-- { "blockType": "ignored" } -->
```http
PATCH /me/photo/$value
PATCH /users/{id | userPrincipalName}/photo/$value
PATCH /groups/{id}/photo/$value
PATCH /me/contacts/{id}/photo/$value
PATCH /users/{id | userPrincipalName}/contacts/{id}/photo/$value
PATCH /me/contactfolders/{contactFolderId}/contacts/{id}/photo/$value
PATCH /users/{id | userPrincipalName}/contactfolders/{contactFolderId}/contacts/{id}/photo/$value

PUT /me/photo/$value
PUT /users/{id | userPrincipalName}/photo/$value
PUT /groups/{id}/photo/$value
PUT /me/contacts/{id}/photo/$value
PUT /users/{id | userPrincipalName}/contacts/{id}/photo/$value
PUT /me/contactfolders/{contactFolderId}/contacts/{id}/photo/$value
PUT /users/{id | userPrincipalName}/contactfolders/{contactFolderId}/contacts/{id}/photo/$value
PUT /team/{id}/photo/$value
```

## Request headers

| Header       | Value |
|:---------------|:--------|
| Authorization  | Bearer {token}. Required.  |
| Content-Type  | image/jpeg. Required.  |

## Request body

In the request body, include the binary data of the photo in the request body.

## Response

If successful, this method returns a `200 OK` response code or a `204 No Content` response code for updating the photo of a **team**.

## Examples

### Example 1: Update the photo of the user

#### Request

The following is an example of a request.

# [HTTP](#tab/http)
<!-- {
  "blockType": "request",
  "name": "update_profilephoto"
}-->
```http
PUT https://graph.microsoft.com/v1.0/me/photo/$value
Content-type: image/jpeg

Binary data for the image

```

# [C#](#tab/csharp)

```csharp

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

using var stream = new System.IO.MemoryStream(Encoding.UTF8.GetBytes(@"Binary data for the image"));

await graphClient.Me.Photo.Content
	.Request()
	.PutAsync(stream);

```

 For details about how to [add the SDK](/graph/sdks/sdk-installation) to your project and [create an authProvider](/graph/sdks/choose-authentication-providers) instance, see the [SDK documentation](/graph/sdks/sdks-overview).

#### Response

The following is an example of the response.

<!-- {
  "blockType": "response"
} -->
```http
HTTP/1.1 200 OK
```

### Example 2: Update the photo of a team

#### Request

The following is an example of a request to update a team photo.

# [HTTP](#tab/http)
<!-- {
  "blockType": "request",
  "name": "update_team_photo"
}-->
```http
PUT https://graph.microsoft.com/v1.0/teams/172b0cce-e65d-44ce-9a49-91d9f2e8491e/photo/$value
Content-type: image/jpeg

Binary data for the image
```

# [C#](#tab/csharp)

```csharp

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

using var stream = new System.IO.MemoryStream(Encoding.UTF8.GetBytes(@"Binary data for the image"));

await graphClient.Teams["{team-id}"].Photo.Content
	.Request()
	.PutAsync(stream);

```

 For details about how to [add the SDK](/graph/sdks/sdk-installation) to your project and [create an authProvider](/graph/sdks/choose-authentication-providers) instance, see the [SDK documentation](/graph/sdks/sdks-overview).

#### Response

The following is an example of the response.

<!-- {
  "blockType": "response",
  "truncated": true
} -->

```http
HTTP/1.1 204 No Content
```

repository: microsoftgraph/msgraph-sdk-dotnet

branch_name: refs/heads/dev

repo_name: microsoftgraph/msgraph-sdk-dotnet


text:
#1. Architecture/Technology stacks:

* [BuildFire APIs](https://github.com/BuildFire/sdk/blob/master/scripts/buildfire.js)
* [AngularJS](https://docs.angularjs.org/guide)
* [angular-ui-tree] (https://github.com/angular-ui-tree/angular-ui-tree)

BuildFire will provide us with methods for fetching and updating information on the server.
Advance Folder API will provide us with verification and streaming of the Advance Folder tracks.
In AngularJS, we will follow MVVM design pattern.

Included methods of BuildFire’s API are
* [buildfire.datastore](https://github.com/BuildFire/sdk/wiki/How-to-use-Datastore)
* [buildfire.imageLib](https://github.com/BuildFire/sdk/wiki/How-to-use-ImageLib)
* [buildfire.navigation](https://github.com/BuildFire/sdk/wiki/How-to-use-Navigation)
* [buildfire.spinner](https://github.com/BuildFire/sdk/wiki/Spinners)
* [buildfire.components.carousel](https://github.com/BuildFire/sdk/wiki/BuildFire-Carousel-Component)
* [buildfire.messaging](https://github.com/BuildFire/sdk/wiki/How-to-use-Messaging-to-sync-your-Control-to-Widget)

For more information refer to BuildFire Wiki.

Angular-Animate is the angularjs module that will help us on performing animations. Angular-Route is used to navigate to different view in app.

#2.  Standardization:

* **Lazy Loading**: We will use ngInfiniteScroll for lazy loading. We will fetch 15 items on every single hit.

* **Caching**: Caching will be done by buildfire API mainly. It includes Image caching API buildfire.imageLib.

* **Refreshing**: Refreshing will be disabled for this plugin. We are using
* **buildfire.datastore.onUpdate**: to subscribe to changes in buildfire database. Whenever there is change in the data, it will be updated in the widget/simulator.

* **Styling**: UI Design will be done using [BuildFire-Style-Helper-Documentation](https://github.com/BuildFire/sdk/wiki/BuildFire-Style-Helper-Documentation). It has pre build style classes that we can use to improve UX of the plugin.

#3. DataBase Model:

Database model is not directly exposed to the user. BuildFire provides buildfire.datastore to fetch and update data on server. It is a black box for user.

The database should be unique as appId,pluginId, instanceId, tag and obj. Here the composite key of appId and pluginId should be every single app.

The Database schema is as follows:
Tag Name - “AdvanceFolderInfo”

    {
    "content": {
    "carouselImages": [{
            "url": "",
            "title": "",
            "link": ""
        }],
        "body": "",
        "entity": [{
                "id": 1,
                "title": "folder1",
                link: ‘’ "items": [{
                    "id": 11,
                    "title": "folder1.1",
                    "items": [{
                        "id": 111,
                        "title": "plugin1.1.1",
                        "items": []
                    }]
                }, {
                    "id": 12,
                    "title": "plugin1.2",
                    "items": []
                }]
            }

        ],

        "design": {
            "itemListLayout": "",
            "bgImageMostDevices": "",
            "bgImageIphone": "",
            "bgImageIpad": "",
            "bgImageTablet": ""
        }
    }

#4. Front-end:

The plugin is divided into two main sections:

##a. Control Panel(CP) :
This will provide user with basic CRUD operations for the data to be shown on the widget section.

CP is further divided into two sections:

###1 Content section

This section contains CRUD for carousel images to be shown on widget part. Images can be sorted manually. It also provides a “wysiwyg” text editor for body content. Last part is the “Plugin Details”, where a user can create a new folder and Add a new plugin instance.
On clicking create folder , user is asked to enter a title for newly created folder.
Created folder can be placed anywhere inside another folder. These folder list can be dragged and dropped for doing the same operation. Each item (folder ) can be deleted or moved upside hierarchy or downside hierarchy.

###2 . Design section

This section lets user to choose the appearance of the data in widget section.

There are two options to modify the look and feel of the widget:
* Item List Layout
* Item List Background Image

## b. Widget Panel(App):
Widget: This is the basic Emulator where user can see the real-time changes whenever there is any change in control panel. User can see containers and plugins list inside a listLayout.
user can navigate inside the folder. By clicking on plugin user can navigate to that particular plugin.
after that on pressing back button, it again get back to Advance Folder Root layout.

#5. Unit Testing Framework and Test Runner:

Karma : A test runner.
Jasmine : A behavior-driven development framework for testing JavaScript code  mostly used in angularJS unit testing.

#6. FAQ
## APP
* Q1. What happens when you click on a container?
 The container you’ve clicked on will transition in like a normal page and will show you all of the plugins and other containers that exist inside of it.

* Q2. What happens when you are in a container and you click the back button?
 It will take you back to the page from which you came.
If you came from another container, it should take you back to the previous container.
If you came from the first tier of the advanced folder, it should take you back to it.

* Q3. Does the container have the same carousel and wysiwyg information as the master folder?
 No. At this time, the containers will not have carousel or wysiwyg information. It will only show a list of the plugins or containers inside of it.

* Q4. What layout should the containers use?
 The containers will use the same layout as what the user has selected in the “design tab”

## CONTROL PANEL
* Q5. What happens when you click on a container?
It will take you inside that container in the CP emulator and show you all of the plugins and other containers that exist inside of it.
However, It WILL NOT take you to a different page in the CP.
Note: If the container is collapsed when the user clicks on it either through the CP or emulator, expand it to reveal the contents inside of it.

* Q6. Can you have containers inside of other containers?
Yes

* Q7.
You should definitely be able to place plugin instances (of any kind) inside containers. If it is possible to make it so that the user can drag plugins into other folders, that would be great, but it is not absolutely necessary for phase 1

* Q8. How does drag and drop work?
It should work as close to the menu in this video as possible: https://www.youtube.com/watch?v=lrJuV6CUxlc

repository: BuildFire/advancedFolderPlugin

gha_language: JavaScript

repo_name: BuildFire/advancedFolderPlugin


text:
---
title: About
permalink: "/about/"
layout: page
order: 1
---

My name is Juan Olvera. I was born in Mexico, and currently live in The Woodlands, TX.

I’m a self-taught front-end developer & web standards enthusiastic.

I build web products and services with focus on user experience, accessibility, and performance.

My primary focus is JavaScript development. I build user interfaces using React, Vue, and similar libraries. Currently I work more with React and its ecosystem (Redux, React Router, etc.) along with the corresponding tooling (Babel, Gulp, Webpack, Rollup, etc.)

I’m a Linux user and spend most of my development time on the terminal, with tools like Tmux and Vim (recently I switched to VS Code, but still use Vim for a lot of things).

On my free time I do side projects with Python. I’m comfortable with its ecosystem: Virtualenv, PyPi, Pythonic style, etc. I’ve built web crawlers, back-end services (APIs), bots (Twitter, Telegram, Messenger), and some penetration testing tools. These projects got me experience with MongoDB, Postgres, SQLite, Celery, Redis, Ngnix and more.

Other stuff I’ve built are cli programs with both Python (Click) and Node.js (Commander.js).

## Technical Skills

### Web technologies

- HTML
- CSS (including pre-processors Sass and Less)
- JavaScript (ES6, TypeScript, Elm)
- WordPress theme development

### Other programming languages

- Python
- PHP
- Lua
- Ocaml

### Tools & workflow

- Text editor: Vim VS Code
- Browser: Google Chrome Firefox Developer Edition
- Task runner: Gulp Webpack
- Version control system: Git
- Terminal: iTerm (macOS) & Gnome Terminal (GNU/Linux)
- OS: Experienced in macOS (current), GNU/Linux (preferred) & Windows

### Languages

- Spanish: Native
- English: Fluent

### Professional Interests

- Web design & front-end development
- UI/UX design
- Technical writing
- JavaScript programming
- Shell programming
- Python programming
- Web apps Security & penetration testing
- Cryptography

### Me everywhere else

- [Github](https://github.com/thinkxl)
- [Twitter](https://twitter.com/_jolvera)
- [Keybase](https://keybase.io/thinkxl)
- [Dribbble](https://dribbble.com/thinkxl)
- [LinkedIn](https://www.linkedin.com/in/juanolvera)

gha_language: CSS


text:
Servo DEMO

###Semester
Fall 2013

###Description

This demo demonstrates the functioning of a servo and distance sensor. The
distance sensor is attached to the front servo and there is another servo behind
the front sevo. The front servo is contonously rotatation, but it stops if the distance
sensor detects something within a certain range. The back servo roates to the angle
of the front servo, if an object is detected

###Hardware
* 2 servos
* 1 Arduino
* Breadboard
* 1 LED
* 1 1kohm resistor(for LED)
* Distance sensor

###Pins
5V
Gnd
Pin 5,6 -> Servo motors
Analog Pin 0   -> Distance Sensor
Pin 9  -> LED

###Purpose
To show how objects can be detected with a distance sensor and how servos can be controlled using multiple
sensors.
###References

repository: TinkerUMD/TinkerUMD

repo_name: TinkerUMD/TinkerUMD


text:
#I'm Crushing It.
Do you hate when people ask you what your New Year's Resolution is and you can't think of a sarcastic and snarky response quickly enough? This is the solution for you.

I'm crushing it is a New Year's Resolution generator that's aimed at poking fun at those who identify millennial's and hipster. This is by no means meant to offend anyone, we just had some tech we had built out for another project and thought of making something for the fun of it. You can read more about why and how we built this app [here.](http://blog.snazzyham.com/crushit)

This app was built as part of my time at [Percolate Galactic](http://wearepercolate.com), and features content that the team came up with. The front end of the app/site is a modification of a theme created by StartBootstrap.

Special thanks to Harry Oliver.

## Copyright and License
The comedic elements and content of this project are the copyright of Percolate Galactic. The app is distributed using the Apache 2.0 licence.

repository: Snazzyham/Crushing-It

repo_name: Snazzyham/Crushing-It


text:
---
layout: post
title: "Complexity Classification in Infinite-Domain Constraint Satisfaction"
date: 2019-04-20 07:03:06
categories: arXiv_AI
tags: arXiv_AI GAN Classification
author: Manuel Bodirsky
mathjax: true
---

* content
{:toc}

##### Abstract
A constraint satisfaction problem (CSP) is a computational problem where the input consists of a finite set of variables and a finite set of constraints, and where the task is to decide whether there exists a satisfying assignment of values to the variables. Depending on the type of constraints that we allow in the input, a CSP might be tractable, or computationally hard. In recent years, general criteria have been discovered that imply that a CSP is polynomial-time tractable, or that it is NP-hard. Finite-domain CSPs have become a major common research focus of graph theory, artificial intelligence, and finite model theory. It turned out that the key questions for complexity classification of CSPs are closely linked to central questions in universal algebra.
 This thesis studies CSPs where the variables can take values from an infinite domain. This generalization enhances dramatically the range of computational problems that can be modeled as a CSP. Many problems from areas that have so far seen no interaction with constraint satisfaction theory can be formulated using infinite domains, e.g. problems from temporal and spatial reasoning, phylogenetic reconstruction, and operations research.
 It turns out that the universal-algebraic approach can also be applied to study large classes of infinite-domain CSPs, yielding elegant complexity classification results. A new tool in this thesis that becomes relevant particularly for infinite domains is Ramsey theory. We demonstrate the feasibility of our approach with two complete complexity classification results: one on CSPs in temporal reasoning, the other on a generalization of Schaefer's theorem for propositional logic to logic over graphs. We also study the limits of complexity classification, and present classes of computational problems provably do not exhibit a complexity dichotomy into hard and easy problems.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1201.0856](http://arxiv.org/abs/1201.0856)

##### PDF
[http://arxiv.org/pdf/1201.0856](http://arxiv.org/pdf/1201.0856)


text:
# Storybook Components

Storybook Components is a React UI components collection used by the UI of Storybook and Addons.

All components use [`emotion`](https://emotion.sh) for styling.

repository: storybookjs/storybook

branch_name: refs/heads/next

gha_language: TypeScript

repo_name: storybookjs/storybook


text:
# Debugger Game

![screenshot](./game-screenshot.png)

**Author: Miguel Uzcátegui**

# Table of contents

- [Overview](#Overview)
- [Third party applications](#Third-party-applications)
- [Gameplay](#Gameplay)
- [Main Menu](#Main-Menu)
- [Scenes](#Scenes)
- [Game Characters](#Game-Characters)
  - [Player](#Player)
  - [Bugs](#Bugs)
- [Health](#Health)
- [Scoring](#Scoring)

## Overview

You are a turret keeping guard of a sweet system. Suddenly, bugs start trying to invade and infect it.

You need to start shooting them to save your system. You are its only hope! As long as you are alive your system will survive. Start typing and don't let those bugs get you.

## Third party applications

- Phaser 3 framework
- JavaScript ES6
- HTML5 / CSS3
- Webpack
- Babel
- Random Words APi

## Gameplay

- Use your keyboard to type the word on top of the bugs as fast as you can

![screenshot](./keyboard.png)

## Main Menu

The first thing you will see is a loading screen with a progress bar. This will load all necessary files and assets for the game. Then you will see the main menu scene with 3 buttons that lead you to other 3 different scenes

![screenshot](./menu-screenshot.png)

## Scenes

- **Game Scene**: Here is where the game take place. Keep typing to survive
- **Instructions**: Here you can read the game instructions on how to play
- **Leaderboard**: Here you can see the top 5 player with their names and scores

## Game Characters
### Player

  ![image](src/assets/player.png)

  The player is a turret that aims and shoots after you type the word on top of a bug

### Bugs

  ![image](src/assets/spider.png)

  The main enemy in the game are bugs. They have a word associated with them, you need to type it to shoot each individual bug. They will apper in waves of 5 every time you shoot them all

## Health

**Player:** When a bug touches the player the game is over

**Bugs:** Once the player types the word on top of the bug with no mistakes, it explodes and dissapers

## Scoring
  The length of the word of each of the bugs the player shoot is added to the player score

branch_name: refs/heads/develop


text:
---
name: '疑问或需要帮助 Question or need help'
about: Question or need help
title: '[Need Help]'
labels: question
assignees: ''
---

### 问题描述 Problem Description

<!-- 详细地描述问题，让大家都能理解。 -->
<!-- Describe the problem in detail so that everyone can understand. -->

### 其他信息 Other information

<!-- 如截图等其他信息可以贴在这里。 -->
<!-- Other information such as screenshots can be posted here. -->

repository: AttoJS/vue-request

repo_name: AttoJS/vue-request


text:
# Horizontal integration

Go back to the [[Economic_Glossary]]

Merging with another firm just like yours, for example, two biscuit makers becoming one. Contrast with VERTICAL INTEGRATION, which is merging with a firm at a different stage in the SUPPLY chain. Horizontal integration often raises ANTITRUST concerns, as the combined firm will have a larger market share than either firm did before merging.

filename: Horizontal Integration.Md


text:
# movie-rates
Small Java app that queries Vimeo API for a movie trailer and aggregates the total number of views of the results.
Read the list of target movies from a mysql database, query the Vimeo API for each movie, then push the results (per hour)
to a remote DynamoDB database, and concatenate and store the raw json output (from the Vimeo API) in S3.

### Configuration

You need to provide a file with configuration properties for mysql, dynamodb and s3.

    database.url=
    database.user=
    database.password=

    vimeo.api.url=
    vimeo.api.endpoint=
    vimeo.api.access_token=

    aws.key.id=
    aws.key.secret=
    aws.s3.bucket=
    aws.dynamodb.url=
    aws.dynamodb.table=

Then pass the the path to the configuration file as a system property

```sh
$ java ... -Dconfig.file=/path/to/config.properties ...
```
### Work Flow (With Akka)

This app uses [Akka](http://akka.io) for concurrency.

First, a router actor is configured to speard the search load over xx SearchActor.
Every hour, a movie is sent to a SearchActor for querying. Every search is performed in a seperate actor instance.
The SearchActor then creates a reference to an AggregateActor and passes the search result to it.

The AggregateActor aggregates the views of the result hits, compares to the previous hour results and insert in a new record the DynamoDB table. Once the insert is done, the AggregateActor stops.

**TODO** The SearchActor also passes the result to a ConcatenteActor that has been previously created. The ConcatenateActor adds the current hour raw result to a local temp file and pushs it to S3 once it obtains the results of all SearchActors.

![alt text](/docs/diagram.png)

repository: rafikn/movie-rates

repo_name: rafikn/movie-rates


text:
# Formatting

## Formatting with Layouts

Layouts provide a simple way to format dashboards into columns and rows. The New-UDLayout cmdlet has a Columns parameter to specify the number of columns in the layout. Based on the content of the layout, rows will be added whenever there are more items than columns.

For example, a layout with three cards and three columns would be formatted like this.

```powershell
New-UDLayout -Columns 3 -Content {
    New-UDCard
    New-UDCard
    New-UDCard
}
```

|  |  |  |
| :--- | :--- | :--- |

If you were to specify more than three items in the content, another row would be added.

```powershell
New-UDLayout -Columns 3 -Content {
    New-UDCard
    New-UDCard
    New-UDCard
     New-UDCard
     New-UDCard
     New-UDCard
}
```

|  |  |  |
| :--- | :--- | :--- |
|  |  |  |

## Formatting with Rows and Columns

For more control over the format of your dashboard, you can use the New-UDRow and New-UDColumn cmdlets. The row and column system is a PowerShell implementation of the Grid system found in [Materialize](http://materializecss.com/grid.html). Each row is broken down into 12 equally size areas. Each column can be 1-12 in size.

For example, the definition below would create a row with a single column that stretched the width of the page.

```powershell
New-UDRow -Columns {
    New-UDColumn -Size 12 {
}
}
```

|  |
| :--- |

To create two equally sized columns, you could make them both 6 in size.

```powershell
New-UDRow -Columns {
    New-UDColumn -Size 6 {
}
    New-UDColumn -Size 6 {
}
}
```

|  |  |
| :--- | :--- |

You can also nest rows with in columns.

```powershell
New-UDRow -Columns {
    New-UDColumn -Size 6 {
        New-UDRow -Columns {
New-UDColumn -Size 12 {
               }
 }
       }
}
    New-UDColumn -Size 6 {
}
}
```


text:
# DomeBuilder - A simple dome optimiser
=======================================

## Overview

This builds a hybrid Schwedler-Lamella dome structure and analyses it.

DomeBuilder has two dependencies from GitHub:

* For the frame analysis: [FJFranklin/PyNite](https://github.com/FJFranklin/PyNite) (a fork of Craig Brinck's [JWock82/PyNite](https://github.com/JWock82/PyNite))
* For the optimiser: [FJFranklin/BeesEtAl](https://github.com/FJFranklin/BeesEtAl)

If these are downloaded as source in the same directory as DomeBuilder, you'll need to set Python's path, e.g.:
```
export PYTHONPATH=$PWD/BeesEtAl:$PWD/PyNite
cd DomeBuilder
python3 test.py
```

# License

Unless otherwise stated, the code and examples here are
provided under the MIT License:

Copyright (c) 2019 Francis James Franklin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: FJFranklin/DomeBuilder

repo_name: FJFranklin/DomeBuilder