text:
# Intelligent drum mixing with the Wave-U-Net
Implementation of the [Mix-Wave-U-Net](https://www.aes.org/e-lib/browse.cfm?elib=21023) for automatic mixing of drums.

## Listening examples

Listen to drum mixing results [here](https://mchijmma.github.io/drum-mixing-wave-u-net/).

## What is the Mix-Wave-U-Net?
The Wave-U-Net is a convolutional neural network applicable to audio source separation tasks, which works directly on the raw audio waveform, presented in [this paper](https://arxiv.org/abs/1806.03185).

We adapted the architecture slightly and applied it to the task of mixing a set of stem recordings into a full music mixture.

See the diagram below for a summary of the network architecture.

# Installation

## Requirements

GPU strongly recommended to avoid very long training times (CUDA 10.0 required)

The project is based on Python 3.6 and requires [libsndfile](http://mega-nerd.com/libsndfile/) to be installed.

Then, the following Python packages need to be installed:

```
numpy==1.18.3
sacred==0.8.1
tensorflow-gpu==1.15.2
librosa==0.7.2
soundfile==0.10.3.post1
lxml==4.5.0
google
protobuf
soundfile
tqdm
```

Instead of ``tensorflow-gpu``, the CPU version of TF, ``tensorflow`` can be used, if there is no GPU available.

All the above packages are also saved in the file ``requirements.txt`` located in this repository, so you can clone the repository and then execute the following in the downloaded repository's path to install all the required packages at once:

``pip install -r requirements.txt``

### Download datasets

To directly use the pre-trained models we provide for download to separate your own songs, now skip directly to the [last section](#test), since the dataset is not needed in that case.

To reproduce the experiments in the paper (train all the models), you need to download the [ENST dataset](https://sigsep.github.io/datasets/musdb.html) and extract it into a folder of your choice. It should then have "drummer_1", "drummer_2" and "drummer_3" subfolders in it.

### Set-up filepaths

Now you need to set up the correct file paths for the dataset and the location where outputs should be saved.

Open the ``Config.py`` file, and set the ``enst_path`` entry of the ``model_config`` dictionary to the location of the main folder of the ENST dataset.
Also set the ``estimates_path`` entry of the same ``model_config`` dictionary to the path pointing to an empty folder where you want the final model outputs to be saved into.

## Training the models / model overview

Since the paper investigates many model variants of the Wave-U-Net and also trains the [U-Net proposed for vocal separation](https://ismir2017.smcnus.org/wp-content/uploads/2017/10/171_Paper.pdf), which achieved state-of-the-art performance, as a comparison, we give a list of model variants to train and the command needed to start training them:

| Model name (from paper) | Description                                             | Command for training                          |
|-------------------------|---------------------------------------------------------|--------------------------------------|
| Dry                      | Wave-U-Net for dry mixing task                         |``python Training.py with cfg.context_dry``                            |
| Wet                      | Wave-U-Net for wet mixing task                         | ``python Training.py with cfg.context_wet``         |

#  Test trained models on songs!

## Downloading our pretrained models

We provide pre-trained models so you can mix your own collection of drum recordings right away, see the [Github release section](https://github.com/f90/Mix-Wave-U-Net/releases) for downloads.
Unzip the obtained archive into the ``checkpoints`` subfolder in this repository, so that you have one subfolder for each model (e.g. ``REPO/checkpoints/dry``)

## Run pretrained models

For a quick demo on a set of drum stems using the wet mixing model, simply execute

`` python Predict.py with cfg.context_wet ``

which will mix the drum stems contained in this repository's ``audio_examples/inputs`` subfolder. The output will be saved into ``audio_examples/outputs``.

To use the dry model on the example inputs, use

`` python Predict.py with cfg.context_dry output_path=audio_examples/outputs/dry_mix.wav model_path=checkpoints/dry/dry-460000``

which loads the model checkpoint file of the dry model fitting to the model configuration that is used.
``output_path`` specifies a custom output file path for the mixture audio.

To use the model on your own inputs, add the ``input_path`` parameter to the command-line arguments. For example, to set the ``tom_2`` input to ``PATH``, use ``input_path={'tom_2':PATH}``. Set ``PATH`` to ``None`` if you don't want to use this particular stem for mixing. See ``Config.py``for details.


text:
# Go bindings for the Brotli compression library

[![GoDoc](https://godoc.org/gopkg.in/kothar/brotli-go.v0?status.svg)](https://godoc.org/gopkg.in/kothar/brotli-go.v0)
[![Build Status](https://travis-ci.org/kothar/brotli-go.svg)](https://travis-ci.org/kothar/brotli-go)

See <https://github.com/google/brotli> for the upstream C/C++ source, and
the `VERSION.md` file to find out the currently vendored version.

Usage
---

To use the bindings, you just need to import the enc or dec package and call the Go wrapper
functions `enc.CompressBuffer` or `dec.DecompressBuffer`

Naive compression + decompression example with no error handling:

```go
import (
	"gopkg.in/kothar/brotli-go.v0/dec"
	"gopkg.in/kothar/brotli-go.v0/enc"
)

func brotliRoundtrip(input []byte) []byte {
  // passing nil to get default *BrotliParams
  // careful, q=11 is the (extremely slow) default
  compressed, _ := enc.CompressBuffer(nil, input, make([]byte, 0))
  decompressed, _ := dec.DecompressBuffer(compressed, make([]byte, 0))
  return decompressed
}
```

For a more complete roundtrip example, read top-level file `brotli_test.go`

The `enc.BrotliParams` type lets you specify various Brotli parameters, such
as `quality`, `lgwin` (sliding window size), and `lgblock` (input block size).

```go
import (
	"gopkg.in/kothar/brotli-go.v0/enc"
)

func brotliFastCompress(input []byte) []byte {
  params := enc.NewBrotliParams()
  // brotli supports quality values from 0 to 11 included
  // 0 is the fastest, 11 is the most compressed but slowest
  params.SetQuality(0)
  compressed, _ := enc.CompressBuffer(params, input, make([]byte, 0))
  return compressed
}
```

Advanced usage (streaming API)
---

When the data set is too large to fit in-memory, `CompressBuffer` and
`DecompressBuffer` are not a viable option.

`brotli-go` also exposes a streaming interface both for encoding:

```go
import (
	"gopkg.in/kothar/brotli-go.v0/enc"
)

func main() {
  compressedWriter,_ := os.OpenFile("data.bin.bro", os.O_CREATE|os.O_WRONLY, 0644)

  brotliWriter := enc.NewBrotliWriter(nil, compressedWriter)
  // BrotliWriter will close writer passed as argument if it implements io.Closer
  defer brotliWriter.Close()

  fileReader, _ := os.Open("data.bin")
  defer fileReader.Close()

  io.Copy(brotliWriter,fileReader)
}
```

..and for decoding:

```go
import (
	"gopkg.in/kothar/brotli-go.v0/dec"
)

func main() {
  archiveReader, _ := os.Open("data.bin.bro")

  brotliReader := dec.NewBrotliReader(archiveReader)
  defer brotliReader.Close()

  decompressedWriter,_ := os.OpenFile("data.bin.unbro", os.O_CREATE|os.O_WRONLY, 0644)
  defer decompressedWriter.Close()
  io.Copy(decompressedWriter, brotliReader)
}
```

Bindings
---

This is a very basic Cgo wrapper for the enc and dec directories from the Brotli sources. I've made a few minor changes to get
things working with Go.

1. The default dictionary has been extracted to a separate 'shared' package to allow linking the enc and dec cgo modules if you use both. Otherwise there are duplicate symbols, as described in the dictionary.h header files.

2. The dictionary variable name for the dec package has been modified for the same reason, to avoid linker collisions.

Links
---

  * brotli streaming decompression written in pure go: <https://github.com/dsnet/compress>

License
---

Brotli and these bindings are open-sourced under the MIT License - see the LICENSE file.

license: MIT

repository: golint-fixer/brotli-go

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: golint-fixer/brotli-go


text:
# gpu_stereo_image_proc [![CircleCI](https://circleci.com/gh/WHILL/gpu_stereo_image_proc.svg?style=svg&circle-token=95d28a14b516f20bef6e607e2c88d5a3f3bd92fe)](https://circleci.com/gh/WHILL/gpu_stereo_image_proc)

## Overview

This package provides ROS wrapper for CUDA implementations of Semi-Global (Block) Matching (i.e. SGM or SGBM). This package currently supports [Fixstars libSGM](https://github.com/fixstars/libSGM) and [NVIDIA VisionWorks](https://developer.nvidia.com/embedded/visionworks) as stereo-matching engine.

## Requirement

- [CUDA (compute capabilities >= 3.5)](https://developer.nvidia.com/cuda-downloads)
- [VisionWorks 1.6 or later](https://developer.nvidia.com/embedded/visionworks)
- OpenCV 3.2 or later
- CMake 3.1 or later
- ROS Melodic

## Installation

Only "Build from Source" option is provided. Simply pull the source and build the package on your machine.

```sh
cd <path-to-your-catkin-workspace>/src
git clone https://github.com/WHILL/gpu_stereo_image_proc.git
cd ..
catkin_make
# Note: libSGM is automatically pulled to gpu_stereo_image_proc/libSGM as CMake's external project.
```

If you want to build this package on a machine which does not have any GPU, CMake would not be able to detect CUDA architecture and build may fail. In this case, you can specify CUDA architecture by providing build options.

```sh
catkin_make -DAUTO_DETECT_ARCH=OFF -DCUDA_ARCH="<your-selection>"
# e.g. -DCUDA_ARCH="-arch=sm_72" for Jetson Xavier
```

## Usage

### Basic Usage

Basic usage of this package (e.g. subscribed/published topics, node structure) is compatible with [ros-perception/image_pipeline/stereo_image_proc](https://github.com/ros-perception/image_pipeline/tree/melodic/stereo_image_proc). Refer to its [wiki](http://wiki.ros.org/stereo_image_proc?distro=melodic) for quick start.

### Nodelets

This package contains nodelets for creating disparity images from stereo.

#### gpu_stereo_image_proc/libsgm_disparity

Nodelet which wraps Fixstars libSGM.

#### gpu_stereo_image_proc/vx_disparity

Nodelet which wraps NVIDIA VisionWorks.

### Parameters

Most of the parameters can be configured via [dynamic reconfigure](http://wiki.ros.org/dynamic_reconfigure). These wiki pages describes configurable parameters.

- [Parameter (libSGM)](https://github.com/WHILL/gpu_stereo_image_proc/wiki/Parameter-(libSGM))
- [Parameter (VisionWorks)](https://github.com/WHILL/gpu_stereo_image_proc/wiki/Parameter-(VisionWorks))

### Example: Compare disparity calculation results

This package provides an example launch file which enables you to see difference of three stereo-mathing implementations: OpenCV (CPU), libSGM (GPU) and VisionWorks (GPU).

```sh
# Launch your stereo camera
# Launch your nodelet manager
rosrun nodelet nodelet manager __name:=manager # Note that manager must be located in global namespace

# Launch image processing nodelets
roslaunch gpu_stereo_image_proc comparison.launch manager:=/manager __ns:=<namespace-of-your-camera> # Don't forget '/' before manager's name.
```

Note: `disparity` and `points2` topics are remapped with `libsgm_` prefix (libSGM) and `vx_` prefix (VisionWorks).

### Demo Video

See https://youtu.be/whCAjrDg9_A

## Licenses

- This package is distributed under the [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause).
- The underlying code of this package is forked from [ros-perception/image_pipeline/stereo_image_proc](https://github.com/ros-perception/image_pipeline/tree/melodic/stereo_image_proc) which is distibuted under the [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause).
- This package includes [libSGM](https://github.com/fixstars/libSGM) which is distributed under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).
- This package depends on [VisionWorks](https://developer.nvidia.com/embedded/visionworks) which NVIDIA reserves all the copyrights of.

branch_name: refs/heads/main


text:
# Getting Started with BigQuery and the Google Java API Client library

Google's BigQuery Service features a REST-based API that allows developers to create applications to run ad-hoc queries on massive datasets. This sample Java command-line application demonstrates how to access the BigQuery API using the Google Java API Client Libraries. For more information, read the [Getting Started with BigQuery and the Google Java API Client library][1] codelab.

## Products
- [Google BigQuery][2]

## Language
- [Java][3]

## Dependencies
- [Google APIs Client Library for Java][4]

[1]: https://developers.google.com/bigquery/articles/gettingstartedwithjava
[2]: https://developers.google.com/bigquery
[3]: https://java.com
[4]: http://code.google.com/p/google-api-java-client/

repository: adamdille/google-samples

repo_name: adamdille/google-samples


text:
---
title: 'POINTER'
type: Shared Task 2021
background: POINTER is a hybrid architecture, combining transformers with insertion-based networks.
---

## Table of Contents

## Model Description

- **Paper:** [System Description for the CommonGen task with the POINTER model](https://aclanthology.org/2021.gem-1.15/)
- **Creator:** Anna Shvets
- **Point of Contact:** Anna Shvets<EMAIL_ADDRESS>
## Social Impact

In this section, we ask you to provide information on all of the steps that went into obtaining your models, especially in regards to how they would affect a user’s interactions with the technology if it was deployed in a live system.

Then, please choose one of these steps to analyze in terms of possible negative impacts on potential direct and indirect users, and propose a test to evaluate the existence and magnitude of that impact. We provide examples of such analyses in the following two paragraphs.

Consider for example a model pre-trained on English Wikipedia and fine-tuned on a summarization dataset, and imagine that such a model is deployed in a news website to provide automatic summaries. Given the gender gap on Wikipedia, we can imagine two possible effects:
1) the model could systematically produce summaries with lower ROUGE scores when compared to a reference for articles describing women than it would for articles describing men.
2) the model may be less likely to name the subject of an article if the subject is a woman than if the subject is a man.
We can measure either of these effects by running an entity linking system on the articles, for example, and comparing subsets of the test set where the gender of the actors is known.

Alternatively, imagine that a system that is fine-tuned on WikiAuto, which aligns English Wikipedia text to its Simple English Wikipedia version, is used in an attempt to make a blog where the writer talks about their personal experience more accessible. How well does the model handle the shift from a third person to a first person point of view? One way we can check whether the behavior is roughly the same is by comparing the copy rate (number of words from the input that are re-used in the output) between the Wikipedia and blog setting.

We ask you to take a similar approach to analyzing your model:

### Additional Data
*If you used a model that was pre-trained on additional data or used additional data, please describe it. Provide a link to a datasheet or data statement if there is one available, otherwise, provide as much relevant information as possible on the source of the data, the people represented in it, its languages, licensing, pre-processing, etc.*

The model used for CommonGEN task is based on pre-trained POINTER model available at https://github.com/dreasysnail/POINTER. According to authors of the article, describing the pre-training process (https://arxiv.org/abs/2005.00558), 12Ga of English Wikipedia corpora has been used to produce above-metioned pre-trained wiki model. The pretrained model is distributed under MIT licence: https://github.com/dreasysnail/POINTER/blob/master/LICENSE.

### Training Process

*Describe the training or fine tuning setup, including whether the final model was trained on a single task or in a multi-task setting. If a data augmentation technique was used, describe the technique*

The fune tuning was done using training data for CommonGEN task. The data pre-processing included the ml masks formation with a special NOI tag on 3 data epochs, which resulted in data augmentation from  67.389 source entries to 160.680 processed entries.

### Real-World Use
*Describe a possible real-use application of your model, then choose one of the steps (e.g. choice of the pre-trained model, data source, data augmentation, training loss, etc.) above and describe a negative impact it may have on the user experience*

Since the model was pre-trained on English Wikipedia corpora, the bias inherent to the dataset will potentially influence the generated texts, leading to potential discrimination of minority groups or marginalized communities.

### Measuring Impact

*Propose a method to test the magnitude of the impact identified in your previous answer*

There are several methodologies to measure bias in a dataset, reflected in a devoted study: https://arxiv.org/abs/1908.09635. In order to measure the fairness of the generated text, one of the fairness metrics might be applied, including equalized odds, predictive parity, counterfactual fairness or demographic parity.

## Reproducibility

*In this section, we ask you to provide any information that would be required for someone to reproduce your model and experimental results. These questions are derived from the suggested model card in [1] and the reproducibility checklist in [2].*

*[1] Dodge, Jesse, et al. "Show Your Work: Improved Reporting of Experimental Results." EMNLP. 2019.*

*[1] Mitchell et al. "Model cards for model reporting." Proceedings of the conference on fairness, accountability, and transparency. 2019.*

### Model Description

*Provide basic information about your model, including (1) the model type (e.g., BART, Pointer Network), (2) model version/date if multiple versions are available, (3) training algorithms used. Please cite papers or other resources where further information about the model can be found. Also include the model license and citation details.*

POINTER is a hybrid architecture, combining transformers with insertion-based networks. The original paper was published in 2020 (https://arxiv.org/abs/2005.00558), along with the pretrained wiki model available for download, along with the source code at https://github.com/dreasysnail/POINTER

### Model Hyperparameters

*Provide the range of hyperparameters that would be required to reproduce your final model (e.g., optimizer used, number of epochs, learning rate, etc.). If hyperparameter search was used, please describe (1) the bounds for each hyperparameter, (2) the number of hyperparameter search trials, (3) the method for choosing hyperparameter values (e.g., uniform sampling, manual tuning, evolutionary optimization, etc.).*

Optimizer: AdamW

Learningrate: 1e-5

Adam epsilon: 1e-8

Warmup steps: 10

Seed: 1

Epochs: 10

Batch size: 64

### The Hyperparameter specifications for best performing models

There are two sampling methods used while the inference phase - greedy and sampling. Greedy is based on a greedy search algorithm, while sampling uses top-k, top-p and temperature parameters to render model predictions. Here is a set for both of sampling strategies:

1. Greedy:
noi_decay: 1,
reduce_decay: 1,
prevent: True,
reduce_stop: True,
lessrepeat: True.

2. Sampling:
top_k: 10,
top_p: 0.9,
temperature: 1.

### Dataset Details
*Include relevant training data statistics (e.g., number of samples used, whether some subsets of the dataset were discarded), the training/validation/test splits for the number of samples and any pre-processing steps if used.*

67.389 source entries from training set of CommonGEM dataset were converted to 160.680 processed entries. The main purpose of pre-processing consists of creation of lm labels with a special NOI tag, masking the word that should be further inserted at the inference phase.

### Dependencies and External Libraries

*Include a specification of library dependencies*

Since the TPU was used for training, XLA support is necessary.

### Link to downloadable source code

https://github.com/dreasysnail/POINTER

### Computing Infrastructure Used

*Describe the computing infrastructure used to train your model (e.g., number of GPUs, GPU type and vRAM) and the time taken to train your final model.*

The training was done using TPU-v3-8, following the multiprocessing paradigm. The total training time was 3 hours.

### Evaluation Details

*How were your models evaluated? Please include evaluation metric details (including links to code), train/validation/test splits, and model performance on both test and validation sets. If more than one model was trained and evaluated, what was the number of training and evaluation runs, and the variance in scores? If human evaluation was used, please describe the experimental setup.*

The model performance was evaluated using different metrics for lexical similarity (ROUGE 1/2/L, BLEU, Meteor), semantic similarity (BERTscore, BLEURT) and diversity (MSTTR, Distinct 1/2/3, Unique 1/2/3, Entropy 1/2/3) measures. The file with all described metrics and their results is available at https://github.com/asnota/metrics


text:
# MultiNotifier

MultiNotifier provides a minimal, modular and adaptable interface for sending notifications in Ruby.
It unifies and distills the API for sending notifications to multiple sources with [middlewares](http://en.wikipedia.org/wiki/Middleware).

## Installation

Add this line to your application's Gemfile:

    gem 'multi_notifier'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install multi_notifier

## Usage

```ruby
MultiNotifier.build do |builder|
  builder.use :mail, :from =><EMAIL_ADDRESS>:to =><EMAIL_ADDRESS>:subject => "MultiNotifier notification"
  builder.use :campfire, :access_token => "123", :room => "123", :message => "Hello world"
end.notify_all!
```

## Middlewares

### Mail

The [mail middleware](https://github.com/jingweno/multi_notifier/blob/master/lib/multi_notifier/middlewares/mail.rb) sends email with the provided settings.

```ruby
builder.adapter :mail,
  :delivery => {
    :method => Rails.configuration.action_mailer.delivery_method, # delivery method
    :settings => Rails.configuration.action_mailer.send("#{Rails.configuration.action_mailer.delivery_method}_settings") # deivery settings
  },
  :from =><EMAIL_ADDRESS># from email
  :to =><EMAIL_ADDRESS># to email
  :subject => "subject", # email subject
  :text_body => mail_text_body, # email body in text
  :html_body => mail_html_body # email body in html
```

### Travis

The [travis middleware](https://github.com/jingweno/multi_notifier/blob/master/lib/multi_notifier/middlewares/travis.rb) restarts the latest build with the provided repo.

```ruby
builder.adapter :travis,
  :access_token => "123", # travis-ci access token
  :repo => "jingweno/multiple_notifier", # travis-ci repo in the format of OWNER/REPO
  :travis_pro => true # whether this repo is built in travis-ci pro
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
**As a** <persona>
**I want to** <feature>
**so that** <business value this feature brings>

## Context
Any info into how this fits into the bigger context to understand the feature better

## In scope
* What does this feature encapsulate? (optional)

## Out of scope
* What does this not encapsulate and maybe can be done in follow up stories? (optional)

## Tech notes
* Anything technical that should be known in order to implement this

## Acceptance Criteria
### AC1
This can be used to test the feature out
_GIVEN_ ...
_WHEN_ ...
_THEN_ ...

## Sketches
Anything that helps implementing it (optional)

repository: diabetes-assistant/documentation

repo_name: diabetes-assistant/documentation


text:
# Algolia Search Function
Netlify function to pull dataset from Sanity containing all Article, People, and Data entries and push to an Algolia index
for search functionality on the [HODP website](https://www.hodp.org/search/)

## Usage

Is automatically deployed whenever new content is published through [Sanity](https://hodp.sanity.studio/desk).

## License
[MIT](https://choosealicense.com/licenses/mit/)

gha_language: JavaScript


text:
# Full Stack Open 2021
## [Part 8: GraphQL](https://fullstackopen.com/en/part8)

**Topics Covered:** Fundamentals of GraphQL paradigm. Implementing GraphQL on server and client with Apollo. Queries, mutations, fragments, and subscriptions. Handling database operations in GraphQL scenario.


text:
---
layout: post
title:  fastdb-学习笔记(四)-查询语言
date:   2014-12-24 12:42:01 +0800
category : 技术文档
tag : fastdb
---

* content
{:toc}

自[FastDB Main Memory Database Management System](http://www.garret.ru/fastdb/FastDB.htm#sql)
=================================

fastdb支持一个类sql句法的查询语言。fastdb使用更流行于面向对象程序设计的表达式而不是关系数据库的表达式。表中的行被认为是对象实例，表是这些对象的一个类。与sql不同，fastdb面向的是对对象的操作而不是对sql元组。所以每一次查询的结果就是来自一个类的对象的集合。fastdb查询语言与标准sql的主要差别在于：

* 不支持多个表之间的连接（join）操作，不支持嵌套子查询。查询总是返回来自一个表的对象的集合。

* 原子表列使用标准的c数据类型。

* 没有NULL值，只有null引用。我完全同意C.J.Date对3值逻辑的批评以及他使用缺省值来代替NULL的意图。

* 结构和数组可以作为记录元素。一个特别的exists算子(quantor)用来定位数组中的元素。

* 可以为表记录（对象）也可以为记录元素定义无参用户自定义方法。

* 应用程序可以定义只有一个串或者数值类型参数的用户自定义函数。

* 支持对象间的引用，包括自动支持逆引用。

* 通过使用引用，start from follow by执行递归的记录遍历。

* 因为查询语言深度继承在了c++类中，语言标识符和关键字是大小写敏感的

* 不进行整形和浮点型到串的隐含转换，如果需要这样的转换，必须显式进行。

下面类BNF表达式的规则指定了Fastdb查询语言搜索断言的语法：

![Grammar conventions](/images/blog/fastdb/4-query-language/1_Grammar_conventions.png)

{% highlight c %}
select-condition ::= ( expression ) ( traverse ) ( order )
expression ::= disjunction
disjunction ::= conjunction
        | conjunction or disjunction
conjunction ::= comparison
        | comparison and conjunction
comparison ::= operand = operand
        | operand != operand
        | operand <> operand
        | operand < operand
        | operand <= operand
        | operand > operand
        | operand >= operand
        | operand (not) like operand
        | operand (not) like operand escape string
        | operand (not) match operand
        | operand (not) in operand
        | operand (not) in expressions-list
        | operand (not) between operand and operand
	| operand is (not) null
operand ::= addition
additions ::= multiplication
        | addition +  multiplication
        | addition || multiplication
        | addition -  multiplication
multiplication ::= power
        | multiplication * power
        | multiplication / power
power ::= term
        | term ^ power
term ::= identifier | number | string
        | true | false | null
	| current | first | last
	| ( expression )
        | not comparison
	| - term
	| term [ expression ]
	| identifier . term
	| function term
        | exists identifier : term
function ::= abs | length | lower | upper
        | integer | real | string | user-function
string ::= ' { { any-character-except-quote } ('') } '
expressions-list ::= ( expression { , expression } )
order ::= order by sort-list
sort-list ::= field-order { , field-order }
field-order ::= [length] field (asc | desc)
field ::= identifier { . identifier }
traverse ::= start from field ( follow by fields-list )
fields-list ::=  field { , field }
user-function ::= identifier
{% endhighlight %}

标识符大小写敏感，必须以一个a-z，A-Z ，_ 或者$字符开头，只包含a-z, A-Z,0-9,_或者$字符，不能使用SQL保留字。保留字列表

| abs | and | asc | between | by |
| current | desc | escape | exists | false |
| first | follow | from | in | integer |
| is | length | like | last | lower |
| match | not | null | or | real |
| start | string | true | upper |

可以使用ANSI标准注释，所有位于双连字符后直到行末的字符都将被忽略掉。

fastdb扩展了ansi标准sql操作符，支持位运算。and/of操作符不仅可以运用到布尔操作数也可以操作整形操作书。and/or运用到整形操作数返回的结果是一个整形值，这个值是对操作数进行按位and或者按位or得到的结果。对于小的集合位运算是高效的。fastdb也支持对整形和浮点型的升幂运算（x^y）

Structures
=================================

结构可以作为记录的组成部分，结构的字段可以通过标准的点表达式访问：company.address.city

结构字段可以以指定的顺序索引和使用，可以嵌套并且嵌套的层次没有限制。程序员可以定义结构的方法用于查询。该方法不能有参数并且只能返回原子类型（布尔值、数值、字符串和引用类型）。这些方法也不能改变对象句柄。如果该方法返回字符串，这个字符串应当使用new 运算符分配，因为其值拷贝后串就会被删掉。

用户定义方法可以用来创建虚组件-就是不存储在数据库中由别的组件计算出来的组件。例如，mdb dbDateTime 类型只包括一个整型的时间戳组件以及如dbDateTime::year(),dbDateTime::month()之类的方法，可以在应用中指定像这样的查询："delivery.year = 1999"，

Arrays
=================================

FastDB组件接受动态数组长度，不支持多维数组，但是在arrays中定义array是可以的。这使得通过数组域的长度来排序成为可能。FastDB提供了一系列的特殊构造器来处理Arrays:

* 1 It is possible to get the number of elements in the array by the length() function.
* 2 Array elements can be fetched by the[] operator. If an index expression is out of array range, an exception will be raised.
* 3 The operator in can be used to check if an array contains a value specified by the left operand. This operation can be used only for arrays of atomic type: with boolean, numeric, reference or string components.
* 4 Array can be updated using update method which creates copy of the array and returns non-constant reference.
* 5 Iteration through array elements is performed by the exists operator. A variable specified after the exists keyword can be used as an index in arrays in the expression preceeded by the exists quantor. This index variable will iterate through all possible array index values, until the value of the expression will become true or the index runs out of range. The condition

{% highlight c %}
exists i: (contract[i].company.location = 'US')
{% endhighlight %}

will select all details which are shipped by companies located in 'US', while the query

{% highlight c %}
not exists i: (contract[i].company.location = 'US')
{% endhighlight %}

will select all details which are shipped from companies outside 'US'.
Nested exists clauses are allowed. Using nested exists quantors is equivalent to nested loops using the correspondent index variables. For example the query

{% highlight c %}
exists column: (exists row: (matrix[column][row] = 0))
{% endhighlight %}

will select all records, containing 0 in elements of a matrix field, which has type array of array of integer. This construction is equivalent to the following two nested loops:

{% highlight c %}
bool result = false;
for (int column = 0; column < matrix.length(); column++) {
    for (int row = 0; row < matrix[column].length(); row++) {
         if (matrix[column][row] == 0) {
             result = true;
             break;
         }
    }
}
{% endhighlight %}

The order of using indices is essential! The result of the following query execution
{% highlight c %}
exists row: (exists column: (matrix[column][row] = 0))
{% endhighlight %}
will be completely different from the result of the previous query. In the last case, the program simply hangs due to an infinite loop in case of empty matrices.

Strings
=================================

All strings in FastDB have varying length and the programmer should not worry about specification of maximal length for character fields. All operations acceptable for arrays are also applicable to strings. In addition to them, strings have a set of own operations. First of all, strings can be compared with each other using standard relation operators. At present, FastDB supports only the ASCII character set (corresponds to type char in C) and byte-by-byte comparison of strings ignoring locality settings.

The operator like can be used for matching a string with a pattern containing special wildcard characters '%' and '_'. The character '_' matches any single character, while the character '%' matches zero or more characters. An extended form of the like operator together with the escape keyword can be used to handle the characters '%' and '_' in the pattern as normal characters if they are preceded by a special escape character, specified after the escape keyword.

If you rebuild GigaBASE with USE_REGEX macro, then you can use match operator implementing standard regular expressions (based on GNU regex library). Second operand of this operator specified regular expression to be matched and should be string literal.

It is possible to search substrings within a string by the in operator. The expression ('blue' in color) will be true for all records which color field contains 'blue'. If the length of the searched string is greater than some threshold value (currently 512), a Boyer-Moore substring search algorithm is used instead of a straightforward search implementation.

Strings can be concatenated by + or || operators. The last one was added for compatibility with the ANSI SQL standard. As far as FastDB doesn't support the implicit conversion to string type in expressions, the semantic of the operator + can be redefined for strings.

References
=================================

References can be dereferenced using the same dot notation as used for accessing structure components. For example the following query

{% highlight c %}
company.address.city = 'Chicago'
{% endhighlight %}

will access records referenced by the company component of a Contract record and extract the city component of the address field of the referenced record from the Supplier table.
References can be checked for null by is null or is not null predicates. Also references can be compared for equality with each other as well as with the special null keyword. When a null reference is dereferenced, an exception is raised by FastDB.

There is a special keyword current, which during a table search can be used to refer to the current record. Usually , the current keyword is used for comparison of the current record identifier with other references or locating it within an array of references. For example, the following query will search in the Contract table for all active contracts (assuming that the field canceledContracts has a dbArray< dbReference<Contract> > type):

{% highlight c %}
current not in supplier.canceledContracts
{% endhighlight %}

FastDB provides special operators for recursive traverse of records by references:

{% highlight c %}
start from root-references
( follow by list-of-reference-fields )
{% endhighlight %}
The first part of this construction is used to specify root objects. The nonterminal root-references should be a variable of reference or of array of reference type. The two special keywords first and last can be used here, locating the first/last record in the table correspondingly. If you want to check all records referenced by an array of references or a single reference field for some condition, then this construction can be used without the follow by part.
If you specify the follow by part, then FastDB will recursively traverse the table of records, starting from the root references and using a list-of-reference-fields for transition between records. The list-of-reference-fields should consist of fields of reference or of array of reference type. The traverse is done in depth first top-left-right order (first we visit the parent node and then the siblings in left-to-right order). The recursion terminates when a null reference is accessed or an already visited record is referenced. For example the following query will search a tree of records with weight larger than 1 in TLR order:

{% highlight c %}
"weight > 1 start from first follow by left, right"
{% endhighlight %}

For the following tree:

{% highlight c %}
                      A:1.1
      B:2.0                             C:1.5
D:1.3         E:1.8                F:1.2         G:0.8
{% endhighlight %}

the result of the query execution will be:

{% highlight c %}
('A', 1.1), ('B', 2.0), ('D', 1.3), ('E', 1.8), ('C', 1.5), ('F', 1.2)
{% endhighlight %}

As was already mentioned FastDB always manipulates with objects and doesn't accept joins. Joins can be implemented using references. Consider the classical Supplier-Shipment-Detail examples:

{% highlight c %}
struct Detail {
    char const* name;
    double      weight;

    TYPE_DESCRIPTOR((KEY(name, INDEXED), FIELD(weight)));
};

struct Supplier {
    char const* company;
    char const* address;

    TYPE_DESCRIPTOR((KEY(company, INDEXED), FIELD(address)));
};

struct Shipment {
    dbReference<Detail>   detail;
    dbReference<Supplier> supplier;
    int4                  price;
    int4                  quantity;
    dbDateTime            delivery;

    TYPE_DESCRIPTOR((KEY(detail, HASHED), KEY(supplier, HASHED),
                     FIELD(price), FIELD(quantity), FIELD(delivery)));
};
{% endhighlight %}

We want to get information about delivery of some concrete details from some concrete suppliers. In relational database this query will be written something like this:
{% highlight sql %}
select from Supplier,Shipment,Detail where
         Supplier.SID = Shipment.SID and Shipment.DID = Detail.DID
         and Supplier.company like ? and Supplier.address like ?
         and Detail.name like ?
{% endhighlight %}

In FastDB this request should be written as:

{% highlight sql %}
dbQuery q = "detail.name like",name,"and supplier.company like",company,
         "and supplier.address like",address,"order by price";
{% endhighlight %}

FastDB will first perform index search in the table Detail for details matching the search condition. Then it performs another index search to locate shipment records referencing selected details. Then sequential search is used to check the rest of select predicate.

Functions
=================================

FastDB允许用户自行定义函数和运算符，函数至少需要一个参数，但不能超过3 个。参数类型必须为string、integer、boolean、reference 或者用户定义类型（rawbinary）

参考资料
=================================

fastdb主页 : [http://www.garret.ru/fastdb.html](http://www.garret.ru/fastdb.html)

FastDB SourceForge主页 : [http://sourceforge.net/projects/fastdb](http://sourceforge.net/projects/fastdb)

FastDB SourceForge下载 :

[http://sourceforge.net/projects/fastdb/files/latest/download](http://sourceforge.net/projects/fastdb/files/latest/download)

参考博客 ：

[http://blog.csdn.net/fuyun10036/article/details/8620542](http://blog.csdn.net/fuyun10036/article/details/8620542)


text:
### Application Name
* BLOG-WEB

## Author
* JOHN Mariga

### Description
* A website for user to create their blogs depending on the categories of their choice,comment on other people's blogs and share the their views on trending things through their blogs.
* A user can also upload their image and create a bio for more followers and popularity.

## BDD
>Login Inputs

| Inputs |  Description |
| :---         |          ---: |
| Username  | Account username, ``eg johndoe``|
| Password  | Account password, ``eg parseword``|

>Signup inputs

| Inputs |  Description |
| :---         |          ---: |
| Username  | Account username, ``eg johndoe``|
| Email  | User email, ``eg<EMAIL_ADDRESS>| Password  | Account password, ``eg parseword``|
| Confirm Password  | Account password, ``eg parseword``|

> Blog inputs

| Inputs | Description  |
|---|---|
|  Blog title | the title of the blog eg; `` Car news``  |
|  Blog post| The blog post itself|
| Comment| A comment on the blog post|

## Development Installation
To get the code..

1. Cloning the repository:
  ```bash
  https://github.com/Mariga123/BLOGS.git
  ```
2. Move to the folder and install requirements
  ```bash
  cd BLOGS
  pip install -r requirements.txt
  ```
3. Exporting Configurations
  ```bash
  export SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://{User Name}:{password}@localhost/{database name}
  ```
4. Running the application
  ```bash
  python3.6 manage.py server
  ```
5. Testing the application
  ```bash
  python3.6 manage.py test
  ```
Open the application on your browser `<IP_ADDRESS>:5000`.

## Technology used

* [Python3.6](https://www.python.org/)
* [Flask](http://flask.pocoo.org/)
* [Heroku](https://heroku.com)
* [Bootstrap](https://getbootstrap.com/)

## Support and contact details
* email<EMAIL_ADDRESS>* phn: *0742249975*
* fb *zellyjones*
* instagram *Mariga john*

### License
licensed under [MIT license](LICENSE)


text:
# Endocrinology :heavy_exclamation_mark:

Endocrinology is a branch of biology and medicine dealing with the endocrine system, its diseases, and its specific secretions known as hormones. It is also concerned with the integration of developmental events proliferation, growth, and differentiation, and the psychological or behavioral activities of metabolism, growth and development, tissue function, sleep, digestion, respiration, excretion, mood, stress, lactation, movement, reproduction, and sensory perception caused by hormones.

(definition from [Wikipedia](https://en.wikipedia.org/wiki/Endocrinology))

# Contents
- [:books: ML Research Papers](#research-papers)
- [:fire: Open-source](#open-source)
- [:bar_chart: Datasets](#datasets)
- [:eyes: Startups](#startups)

### Research Papers
-
### Open-source
-
### Datasets
- [Kaggle diabetic retinopathy](https://www.kaggle.com/c/diabetic-retinopathy-detection)
- [Thyroid Disease Data Set](https://archive.ics.uci.edu/ml/datasets/Thyroid+Disease)

### Startups


text:
---
layout: page
title: About
published: true
---
Hello! I'm currently an AI/ML Engineer at Froniter Medicines, an pre-clinical drug discovery company in South San Francisco, CA. In 2022, I graduated with a B.S. in applied math and a minor in neuroscience at UCLA. In school, I was a research assistant in the [Buonomano Lab](http://buonomanolab.com) at UCLA, where I trained recurrent neural networks (RNNs) to perform timing and short-term memory tasks and analyzed the dynamics of the trained networks.

Here are links to my [Github](https://github.com/rehanbchinoy), [LinkedIn](https://www.linkedin.com/in/rehan-chinoy-37420911b/). You can get in touch via [email](mailto:rehanbchinoy@gmail.com).


text:
# Contributing

We greatly appreciate you have considered contributing to Fibratus! Please, read carefully through the contribution guidelines before you start the contribution process.

## Introduction

1. **You're familiar with [Github](https://github.com) and the pull request workflow.**
2. **Make sure you've read Fibratus [docs](https://www.fibratus.io).**
3. If you got an idea about some feature that's not currently in the backlog, please create the [feature request](https://github.com/rabbitstack/fibratus/issues/new) first.

## Development

1. Clone the Fibratus repository into the location of your choice.
2. [Download](https://golang.org/dl/) and install the Go compiler.
3. If you are intending to contribute to features that interop with the `C` code, such as [filaments](https://www.fibratus.io/#/filaments/introduction) or [YARA](https://www.fibratus.io/#/yara/introduction), [set up](https://www.fibratus.io/#/setup/installation?id=installing-dependencies) the required dependencies.

#### Directory Structure

- [`/build/package`](/build/package) - [NSIS](https://nsis.sourceforge.io/Main_Page) script for producing the Windows installer.
- [`/cmd/fibratus`](/cmd/fibratus) - Contains the entrypoint, CLI command implementations and the resource compiler manifest.
- [`/config`](/config) - Configuration files in `yml` and `json` format, included in releases. [Rules](https://www.fibratus.io/#/filters/rules) files are included in the `rules` subdirectory.
- [`/docs`](/docs) - Markdown files for generating the [documentation](https://www.fibratus.io/) site.
- [`/filaments`](/filaments) - The collection of [filaments](https://www.fibratus.io/#/filaments/introduction) that are included in releases.
- [`/pkg`](/pkg) - Fibratus main source.
- [`/pkg-config`](/pkg-config) - [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/) descriptors for externalizing the `cgo` flags.

#### Make

Fibratus includes a [`make.bat`](/make.bat) in the root of the repo. The `bat` script mimics the [Makefile](https://www.gnu.org/software/make/manual/html_node/Introduction.html) execution workflow.
Running `make` will produce the Fibratus binary and place it inside `cmd\fibratus` directory. Refer to the `make.bat` file for a list of available tasks.

#### Code Style

Fibratus uses `gofmt` to format the code. Run the `make fmt` from the root directory to emit indentation blocks that are in harmony with the Go code style.

Besides this, the `golint` ensures you adhere to best practices regarding identifier naming, code docs, and so on. You can invoke the linter with `make lint`.

gha_language: Go

gha_license_id: NOASSERTION


text:
---
title: "Florence face mask: What You Need"
---

To make a Florence face mask, you will need the following:

- Basic sewing supplies
- About 15 cm (6") of a suitable fabric ([see Fabric options](/docs/patterns/florence/fabric/))
- About 15 cm (6") of lining fabric
- About 1.6 meters (1.8 yards) of ribbon cut in 4 equal parts

repository: freesewing/freesewing

branch_name: refs/heads/develop

repo_name: freesewing/freesewing


text:
# `@yume-chan/adb-daemon-direct-sockets`

Use [Direct Sockets API](https://wicg.github.io/direct-sockets/) for plugin-free ADB over WiFi connection.

Note: Direct Sockets API is still under development. Currently it's only available in Chrome and requires extra command line arguments to enable. This package is not ready to be used in production, thus not published to NPM registry.

repository: yume-chan/ya-webadb

gha_language: TypeScript

repo_name: yume-chan/ya-webadb


text:
# Sphinx

A web application for managing Delta Sigma Phi (Delta Epsilon) fraternity operations.

## Contributing

Following the instructions below in order to get the website running locally and contribute changes.

### Installations

- Visual Studio Community Edition (latest)
- SQL Server 2016 Express
  - Download and install the Express edition from [here][2]
  - Make sure you get SQL Server Management Studio too

### Clone & Build

Clone the repository with git and open the solution in Visual Studio.
Build the solution to download all the required NuGet packages, which may take a few minutes.

### Building Your Local Databases

This application uses [Entity Framework Code-First][1] to handle database interaction and management.
After you've installed everything, cloned the repo, and built the solution, open the NuGet Package Manager Console in Visual Studio and run the following commands:

~~~ sh
PM> Enable-Migrations -ContextTypeName Dsp.Data.SphinxDbContext -ProjectName Dsp.Data
PM> Update-Database -ConfigurationTypeName Dsp.Data.Migrations.Configuration -ProjectName Dsp.Data
~~~

If you receive an error about the database not existing, you will need to modify the connection string in the root `Web.config` to point to a fresh, local sql server database that you will need to create.
Get the latest version of SQL Server Management Studio to create a local database.

Entity Framework *migrations* exist to keep track of every change made to the database schema over time.
The first command simply turns on the ability to use migrations.
The second command creates a new migration based on anything that has changed since the previous migration.
The third command actually updates your local database by applying any unapplied migrations.

Contact Ty if you get stuck.

### Data
The `Seed` method in `Migrations/Configuration.cs` contains some commented out code that serves as a good starting place.
If you are working with Ty on the Delta Sigma Phi website, contact him for some recent data to throw in your local database.
To make yourself an administrator, run the following SQL query on the DspDb:

~~~ sql
INSERT INTO Leaders VALUES (/*your user id from Members table*/, 1, 30, '2014-01-01 12:00:00.000')
~~~

### Contributing

1. Create your feature branch: `git checkout -b my-new-feature`
2.  Push to the branch: `git push origin my-new-feature`
4. Submit a pull request

The idea is to do your work on a branch other than `master` and then submit a pull request for that branch to be merged into master on the upstream repo.

## Deployment

The easiest way is to download the Web Publish profile from the host to somewhere on your computer and use it.
Right-click on the `Dsp` project and select Publish.
In the Publish prompt, import the profile you downloaded and click through the rest of the sub-menus.
If there are new database migrations since the last time you published, make sure the "Execute Code-First Migrations" box is checked.

## Feedback
Use the issues feature of this repository to report bugs or make suggestions/requests for new features, or enhancements to existing ones.

[1]: http://www.entityframeworktutorial.net/code-first/entity-framework-code-first.aspx
[2]: https://www.microsoft.com/en-us/sql-server/sql-server-downloads

repository: deltasig/sphinx

gha_language: C#

repo_name: deltasig/sphinx


text:
## Facial Biometric

 This repository detects a human face using Dlib's 68 points model. As the human face is way too complex for a computer to learn, so we have used the 68 points model to ease the process of facial recognition. Facial Biometric uses a two step biometric process for facial recognition.
 These steps are:
 1.
 2. Detecting facial structures using Dlib's 68 points model.

## Dlib's 68 points model

 The below image is an example of Dlib's 68 points model. This pre-trained facial landmark detector inside the Dlib's library is used to estimate the location of 68(x,y)-coordinates that maps to the different facial structures.

![68_face_points.png](68_face_points.png)

## Facial localization

 ![localisation1](localisation1.jpg)

 ## Detecting Facial Landmarks

 Some examples of the output generated by the Facial_biometric are shown below.

 ![Capture1.jpg](Capture1.jpg)

![Capture2.jpg](Capture2.jpg)

## How to get started

- Clone this repository-
`git clone https://github.com/akshitagupta15june/Face-X.git`
- Change Directory-
`cd Facial_Biometric`

- Run file-
`python library.py`

- Input name-
`Type your name in the input dialogue opened in the terminal`

## Requirements

- python 3.6+
- opencv
- dlib

`Note` : This file takes input video from your webcam and detects the points, So you need an inbuilt or externally connected webcam

## Installation

- Create virtual environment-
```
- `python -m venv env`
- `source env/bin/activate`  (Linux)
- `pip install opencv-python==<IP_ADDRESS>`
- `pip install dlib==19.21.1`
- `pip install opencv-python==<IP_ADDRESS>`
```

`Note' : dlib is a library written in c++ that used applications like cmake,boost etc.,if you face any error while installing dlib, don't panic and try to install the extensions required.

gha_language: Jupyter Notebook


text:
tos-udp6-test#payload-stack-timediff
====================================

---------------------

Simple code for sending and receiving a sequence of udp pakets.
Written for *tinyOS* in *nesC* and intended to run on *Zolertia's* Z1 board.

Under tinyOS the z1 generate a local link address in the form:
``fe80::212:6d4c:4f00:$NODE_ID``
The *NODE_ID* can be set only at build time by appending it to the install target
``install.$NODE_ID``.
The hexfile is copied, patched, flashed and the copy is deleted aferwards.

build
-----
UDPSendMon:
``make z1 blip install.1 bsl,ref,$BOARD_REF``

UDPRecvMon:
``make z1 blip install.2 bsl,ref,$BOARD_REF``

The unique *BOARD_REF* can be observed with *motelist* from the *tinyos-tools*.

Time measurement with TimeProbe:
--------------------------------

Two time differences are measured.
- On the sender side: The first time counter is sampled when invoking UDP.send() and the second when
the packet is transmited into the radio chip.
- On the receiver side: The first time counter is sampled right befor reading the arrived packet from the radio chip and the second when UDP.received offers the recieved payload.

A component has been implemented to provide a uniqe storage for timestamps (TMicro) including access methods to sample the timestamps and return the difference.
**TimeProbe** provides the intefaces StdControl and Get to make the commands start, stop and get accessible.
`TimeProbeControl.start()` takes the first timestamp, `TimeProbeControl.start()` the second (if start has invoked before) and `TimeProbeGet.get()` returns the difference.

*Important: tinyOS Millies have 2^10 ticks per second and Micros 2^20.*

Code Locations
--------------

In *UDPSendMon/CC2420TransmitP.nc* :
```
570
571     if ( acquireSpiResource() == SUCCESS ) {
572       loadTXFIFO();
573       call TimeProbeControl.stop();
574     }
```

In *UDPRecvMon/CC2420ReveiveP.nc* :
```
212
213   /***************** InterruptFIFOP Events ****************/
214   async event void InterruptFIFOP.fired() {
215     call TimeProbeControl.start();
216     if ( m_state == S_STARTED ) {
```


text:
This is a simple repository that help you to install 2 server Ubuntu 14.04 with Consul installed.

You just clone this repository and run:
```
vagrant up
```

And now, you can get started with Consul, following the guide at [consul.io](https://www.consul.io/intro/getting-started/join.html)


text:
---
title: About managing Dynamic Media assets
description: Learn how to work with Dynamic Media assets, such as videos and images, after they are uploaded. You can preview, download, or publish assets.
uuid: 9c7f9d4e-caab-434f-a1ae-eca16c883461
contentOwner: Rick Brough
products: SG_EXPERIENCEMANAGER/6.5/ASSETS
topic-tags: dynamic-media
content-type: reference
discoiquuid: a323bf5a-b5b2-4b15-bcf8-48d0fe819512
feature: Asset Management
role: User, Admin
exl-id: 74242ee5-1036-498b-88ef-2310ba2643ce
---
# About managing Dynamic Media assets {#managing-assets}

Managing Dynamic Media assets – images, video, and interactive assets – after they are uploaded–involves many tasks including previewing, downloading, or publishing them.

When previewing, you can also apply image presets (for images only) or viewer presets (for video and images). You cannot apply both to an asset. See [Applying viewer presets](/help/assets/viewer-presets.md) and [Applying image presets](/help/assets/image-sets.md).

General information on managing assets is found in [Manage assets](/help/assets/manage-assets.md).

The following topics describes how to manage Dynamic Media assets:

* [Best practices for optimizing the quality of your images](/help/assets/best-practices-for-optimizing-the-quality-of-your-images.md)
* [Previewing Dynamic Media assets](/help/assets/previewing-assets.md)
* [Publishing Dynamic Media Assets](/help/assets/publishing-dynamicmedia-assets.md)
* [Working with Selectors](/help/assets/working-with-selectors.md)

gha_language: Groovy


text:
<!--
$theme: gaia
template: invert
-->

# Python Workshop Day 2

## REVA Institutions

## [@dhilipsiva](https://github.com/dhilipsiva)

---

# Requirements

```
pip install xlsxwriter pydub pillow moviepy requests click
```

---

- Tech Lead, Full-Stack & DevOps - [@Appknox](https://twitter.com/appknox)
- I code for Web, Mobile, Embedded & IoT. Open-Source Fanatic. Big Data & Machine Learning Enthusiast. Dad. Atheist
- So primarily a Developer + little bit of this & that
- Jack of all trades & Master of none
- No, I do not keep Bindi for religious reasons. Its for a scientific reason & a fashion statement.
- [http://dhilipsiva.com](http://dhilipsiva.com)
- [dhilipsiva<EMAIL_ADDRESS>
---

# I have no idea what I am talking about :stuck_out_tongue_winking_eye:

---

# How else can I help you?

- Dropout (Yes, I am not a graduate)
- Startup Fanatic (& hate corporate)
- Full Stack & DevOps landscape
- Getting Started on ML
- I love Python. A lot.
- Take my words with a pinch of salt

---

# Recap: Workshop Day 1

None, Boolean, Numbers, Strings, List, Tuple, Set, Dict, Variables, List & String Manipulation, Conditionals, Loops, Function

More: https://github.com/ChillarAnand/python-101/blob/master/manuscript.md

---

# Overview: Workshop Day 2

* Files (Text, [Excel](https://github.com/jmcnamara/XlsxWriter), [Audio](http://pydub.com/), [Image](https://python-pillow.org/), [Video](https://github.com/Zulko/moviepy))
* Classes & Objects
* CLI Application (Let's build a simple game)

---

# Files

```py
fr = open("file.txt")  # Open a file to read
fr.read()  # Will read entire content
fr.readline()  # Reads line by line
fr.readlines()  # Reads the entire files and return a list
fr.close()  # Close the file

fw = open("file.txt", "w")  # Open a file to write
fw.write("Foo Bar")  # Write a single line
fw.writelines(["One", "Two"])  # Write a list of lines
fw.close()  # Close the file

# Also explain append mode
```
---

## Excercises

1. Copy content of one file into another file
2. Remove the lines in a file which has the text `foo`

---

## Excel Sheet

```py
import xlsxwriter

workbook = xlsxwriter.Workbook('demo.xlsx')
worksheet = workbook.add_worksheet()
worksheet.set_column('A:A', 20)
bold = workbook.add_format({'bold': True})
worksheet.write('A1', 'Hello')
worksheet.write('A2', 'World', bold)
worksheet.write(2, 0, 123)
worksheet.write(3, 0, 123.456)
worksheet.insert_image('B5', 'logo.png')
workbook.close()
```

---

## Image

```py
from PIL import ImageFilter
size = (128, 128)
from PIL import Image
im = Image.open("lena.ppm")
print(im.format, im.size, im.mode)
im.show()
im.thumbnail(size)
box = (100, 100, 400, 400)
region = im.crop(box)
region = region.transpose(Image.ROTATE_180)
out = im.resize((128, 128))
out = im.rotate(45)
out = im.transpose(Image.FLIP_LEFT_RIGHT)
out = im.filter(ImageFilter.DETAIL)
```
---

## Audio

```py
from pydub import AudioSegment
song = AudioSegment.from_wav("trance.wav")
ten_seconds = 10 * 1000
first_10_seconds = song[ten_seconds:ten_seconds*2]
last_5_seconds = song[-5000:]
beginning = first_10_seconds + 6
end = last_5_seconds - 3
backwards = beginning.reverse()
with_style = beginning.append(end, crossfade=1500)
with_style = with_style.append(backwards, crossfade=1500)
do_it_over = with_style * 2
awesome = do_it_over.fade_in(2000).fade_out(3000)
awesome.export("mashup.wav", format="wav")
```

---

## Video
```py
from moviepy.editor import VideoFileClip, TextClip, CompositeVideoClip
clip = VideoFileClip("baby-cry.webm")
clip = clip.volumex(0.8)
txt_clip = TextClip("Baby Cry", fontsize=70, color='white')
txt_clip = txt_clip.set_pos('center').set_duration(3)
video = CompositeVideoClip([clip, txt_clip])
video.write_videofile("baby-cry-text.webm")
```

---

# Classes and Objects

* Abstraction
* Polymorphism
* Encapsulation
* Inheritance

\_\_init__, super, \_\_str__, \_\_len__

---

# CLI Applications

Lets build a simple game, shall we?

---

# Thanks! :pray:

### https://github.com/dhilipsiva/talks

This copy is released under the [MIT License](https://github.com/dhilipsiva/talks/blob/master/LICENSE)

[Source Code](https://github.com/dhilipsiva/talks/blob/master/2017-02-11-<Reva-Institution>-<Python-Worshop-Day-2>.md)
[SlideShare Link](http://www.slideshare.net/dhilipsiva/python-workshop-day-2-reva-university)

# Questions:question:
[http://dhilipsiva.com](http://dhilipsiva.com)

repository: dhilipsiva/talks

gha_language: Python

repo_name: dhilipsiva/talks


text:
# CircularImageView
[![](https://jitpack.io/v/SayRattana/CircularImageView.svg)](https://jitpack.io/#SayRattana/CircularImageView)

CircularImageView to show your images in Circular Shape.
* min SDK 19 (Android 4.4 KitKat)
* written in Java

A lightweight and fully customizable library to show your images in Circular Form

## Screenshots

    <img src="https://github.com/SayRattana/CircularImageView/blob/master/screenshots/screen1.png" width="300px"
    <img src="https://github.com/SayRattana/CircularImageView/blob/master/screenshots/screen2.png" width="300px"

## Installation

Add this into your root build.gradle file:

```java
allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
```
Add the dependency to your module build.gradle:
```java
dependencies {
	         implementation 'com.github.SayRattana:CircularImageView:1.0.0'
}
```
## Usage
### Using XML Layout
```xml
<com.rattanasay.circularimageviewlib.CircularImageView
        android:id="@+id/imageView"
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:layout_centerHorizontal="true"
        android:src="@drawable/profile_pic"
        app:c_background_color="@color/colorPrimary"
        app:c_border="true"
        app:c_border_color="#4A97E4"
        app:c_border_width="2.5dp"
        app:c_shadow="true"
        app:c_shadow_color="#000"
        app:c_shadow_gravity="end"
        app:c_shadow_radius="2.5" />
```
### Programatically
```java
CircularImageView circularImageView = findViewById(R.id.imageView);
circularImageView.setImageResource(R.drawable.profile_pic);
circularImageView.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
circularImageView.setBorderWidth(5);
circularImageView.setBorderWidth(10);
circularImageView.setBorderColor(getResources().getColor(R.color.colorPrimaryDark));
circularImageView.setShadowGravity(CircularImageView.ShadowGravity.BOTTOM);
circularImageView.setShadowRadius(9);
```

## License
~~~
Copyright 2020 Rattana

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

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

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

repository: SayRattana/CircularImageView

repo_name: SayRattana/CircularImageView


text:
# signals_and_systems_fundamentals
Programmes for studying signals and systems fundamantals; Signal transformations, enen & odd signal components, convolution and periodisation of finite duration signals.

The following functions and scripts are contained in this file:
  * evenOdd.m
  * diffEqn.m
  * myConv.m
  * impulseTrain.m
  * BackToBackAudio.m

### evenOdd.m
`[x_e, n_e, x_o, n_o] = evenOdd(n, x)` takes two inputs `n`, the timing
index and `x`, the values of the signal at the designated time instants.
The function returns the two sub-functions, `x_e` and `x_o` along with their
timing indices `n_e` and `n_o` respectively. Test your function.

### diffEqn.m
`Y = diffEqn(CONSTANT, X, Yo)` returns the time series `Y` according to the
difference equation y[n] = a.y[n-1] + x[n]. `X` is the input time series,
`Yo` is y[-1], which is user defined and `CONSTANT` is the coeffcient a of
y[n-1].

### myConv.m
`[y, n] = myConv(x, nx, h, nh)` returns the convolution `y` of inputs `x` and
`h`. `nx` and `nh` being the time indices of `x` and `h` respectively, are used to
calculate the output signal time index vector, `n`.

### impulseTrain.m
`[ x, n ] = impulseTrain( N, k )` returns an impulse train `x` along with
its timing index vector `n` depending on the required period `N` and signal
range `k`.

### BackToBackAudio.m
This script studies the generation of a  periodic version of a time
limited input signal by convolving the signal with an impulse train. The
impulses/samples should be located at least a period of the signal being
convolved apart.


text:
# Changelog
All notable changes to Merlin Spellbook will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.1]

### Fixed
- style and version number
- testing for make-samples

## [0.8.0]

### Added
- -round and -repeat options to make-samples, which allows for mixed integers and floats

### Changed
- changed python version support to 3.7 - 3.11 (3.6 is past end-of-life)

## [0.7.4]
### Fixed
- `learn.make_regressor` and `learn_alt.random_forest` properly calls `utils.load_infile`.

## [0.7.3]
### Fixed
- `make-barrier-qoi` can accept no constraints.
- `make-barrier-qoi` applies `numpy.atleast_2d` to the qoi before returning.
- `make-barrier-qoi` correctly normalizes inputs from 0 to 1.
- `utils.stack_arrays` returns inputs in correct shape: (# of features, dim of feature).
- `ml.learn` and `ml.learn_alt` use correct `load_infiles` function from `utils`.

## [0.7.2]

### Fixed
- Add missing __init__.py to optimization module.

### Changed
- Remove .keepme file in optimization module.

## [0.7.1]

### Fixed
- Package version

## [0.7.0]

### Added
- function `make-barrier-cost` to create optimization cost functions

## [0.6.1]

### Added
- pylint to dev requirements for format checking

### Changed
- Conduit tests are skipped when conduit python package is not available. (test_conduit.py is also skipped for format checking)
- Rename l variable in setup.py to line.
- Removed unused import libraries.
- Fixed bare "except" statements.
- Created a get_samples function for sample generation in MakeSamples.run to simplify run function.
- Update workflow to always run syntax checkers even if previous syntax heckers fail.
- Reformat code with isort, black and pylint to fit coding standards

## [0.6.0]

### Added
- Delimiter option in serialization command.

### Changed
- In serialize command, grab the first entry as the key and everything else as the value.

## [0.5.3]

### Fixed
- version number in docs and setup.py to match 0.5.3

## [0.5.2]

### Fixed
- auto-deploy by adding a MANIFEST.in and changing to python -m build for release

## [0.5.1]

### Added
- prototype github actions for testing and auto-deploy

### Fixed
- `conduit-collect` incompatibility with recent versions of click
- Copyright year to 2022

## [0.5.0]

### Added
- Ability for `conduit-translate` to deal with chunks from `conduit-collect`.
- Ansynchronous parallelism for `conduit-translate -chunks -n <n processes>`.

### Fixed
- Help message for `-chunk_size` in `conduit-collect`. Previously was ambiguous,
  saying `-chunk_size` corresponded to number of files, instead of size of files.
- Typo in `make-samples` help message.
- Error in serializing booleans
- Bug in serializer and error in serialize testing

## [0.4.3]

### Fixed
- Allowed for pyDOE2 sampling functions to use seeds.
- Bug in `spellbook learn` that excluded the `-regressor` flag.

## [0.4.2]

### Fixed
- A conduit loading bug.

## [0.4.1]

### Added
- CLI test for `spellbook serialize`.
- CLI test for `spellbook make-samples`.
- Conduit bundler unit tests.

### Fixed
- A variety of bugs in `conduit-collect` and `conduit-translate`.

## [0.4.0]

### Added
- The new spellbook command `spellbook serialize`.
- The new spellbook command `spellbook conduit-collect`.
- The new spellbook command `spellbook conduit-translate`.

### Changed
- For better organization and speed, moved internal cli logic from `argparse` to `click`.

## [0.3.0]

### Added
- Central composite sampling in `make-samples`.

## [0.2.1]

### Fixed
- Bug that made make-samples break for single values of x0

## [0.2.0]

### Added
- Ability for `spellbook make_samples` to take multiple values in x0.
- Chunking logic for `spellbook collect`.
- Padding feature that allows `spellbook stack-npz` to handle variable-length arrays.

### Fixed
- Bug that caused `stack-npz` to break when given only 1 source file.

## [0.1.0]

### Added
- Command line functionality for all spellbook scripts

repository: LLNL/merlin-spellbook

repo_name: LLNL/merlin-spellbook


text:
# Vaulttool

This is a demo of using [Awskeyring](https://github.com/vibrato/awskeyring) as a Gem dependancy and as a little tool that helps interact with [HashiCorp Vault](https://vaultproject.io/). It is also, generally a place where I'm stuffing useful features that don't belong in Awskeyring.

## Installation

Install it with:

    $ gem install vaulttool --user-install

## Usage

Again the CLI is using [Thor](http://whatisthor.com) with help provided interactively.

    Commands:
      vaulttool --version, -v    # Prints the version
      vaulttool console          # Open the AWS Console
      vaulttool creds ROLE       # Retrieve IAM credentials for AWS from Vault
      vaulttool env              # Outputs bourne shell environment exports
      vaulttool exec command...  # Execute an external command with env set
      vaulttool help [COMMAND]   # Describe available commands or one specific command
      vaulttool login            # Login to Vault
      vaulttool renew            # Renew you Vault Token
      vaulttool sts ROLE         # Retrieve STS credentials for AWS from Vault

## Development

After checking out the repo, run `bundle update` to install dependencies. Then, run `rake` to run the tests. Run `bundle exec vaulttool` to use the gem in this directory, ignoring other installed copies of this gem. Vaulttool is tested against the last two versions of Ruby shipped with macOS.

To install this gem onto your local machine, run `bundle exec rake install`.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

repository: tristanmorgan/vaulttool

repo_name: tristanmorgan/vaulttool


text:
---
layout: layout.pug
navigationTitle:  Troubleshooting LDAP errors
title: Troubleshooting LDAP errors
menuWeight: 5
excerpt: Troubleshooting common authentication and configuration issues for your LDAP directory
enterprise: true
render: mustache
model: /mesosphere/dcos/1.13/data.yml
---
The Lightweight Directory Access Protocol (LDAP) provides a lightweight client-server protocol for accessing directory services. The protocol provides a standards-based method for defining objects and their attributes for X.500-based directory services. LDAP runs over TCP/IP or other connection-oriented transfer services.

# Common issues when using Microsoft Active Directory
Microsoft Windows Server Active Directory is the LDAP-based identity store for Windows forests and domains. Active Directory stores details about users, groups, computers, roles, and organizations in LDAP-compliant objects and attributes and returns the information you search for using LDAP queries in the same format as other LDAP services such as OpenLDAP.

Because integrating Active Directory authentication into a multi-platform environment can present challenges that you are less likely to encounter when you use ApacheDS, OpenLDAP, or other LDAP services, the most common issues with LDAP authentication and configuration involve communication with the Active Directory domain controllers or replication across Active Directory domains.

# Cannot connect to the directory backend
If you attempt to retrieve information from Active Directory but the connection fails, you might see the following error message:

![Cannot connect to the directory](/mesosphere/dcos/1.13/img/ldap-cannot-open-connection-error.png)

Figure 1. Connection error message: timeout

If you see an error message indicating the connection to the backend directory failed, the problem is most often caused by one of the following issues:

- A required port is closed to all traffic or protected by firewall rules.

    Specific port requirements depend on the version of Active Directory you are using and the type of communication traffic. For example, most LDAP traffic requires port 389 for TCP or UDP connections to handle directory and replication services, user and computer authentication, and group policy distribution.

    To handle the same type of traffic over a secure communications channel, LDAP requires port 636 for TCP connections to deliver encrypted messages over a secure socket layer (SSL).

- DNS cannot resolve the name or IP address for the Active Directory domain controller.

If you encounter this error, check whether the computer where you saw the error has the correct IP address for the network interface and the domain controller. You can check the current IP address and network settings for domain connections using the DHCP server role or manually in the network adapter settings. For example, you can retrieve the current network settings for the computer using `ipconfig` or a similar operating system command to display network configuration details.

If there is a problem with the port number, host name, or host IP address, edit the values in the LDAP directory settings to specify the correct port, host name, or host IP address.

To edit the LDAP directory settings:

1. Log in to the DC/OS web-based console.

1. Click **Settings**, then click **LDAP Directory**.

1. Click **Edit Directory**.

1. Modify the host name, host IP address, or LDAP port.

1. Click **Save Configuration**.

# Transport layer security (SSL/TLS) connection errors
If you attempt to connect to Active Directory and the connection fails because there is a problem communicating with the server using transport layer security (SSL/TLS), you might see the following error message:

![SSL connection error](/mesosphere/dcos/1.13/img/ldap-tsl-ssl-socket-error.png)

Figure 2. Connection error: socket SSL wrapping error

For example, you might see this error if the LDAP server is not configured to accept SSL/TLS connections or if the certificate used to secure the channel is invalid.

If you have a problem connecting to Active Directory when using secure socket layer (SSL) connections, you should:
- Check that LDAP over SSL (LDAPS) is enabled for the Active Directory LDAP server role and that you have imported a valid CA certificate to allow SSL/TLS connections.
- Check how you have configured the appropriate corresponding LDAP SSL/TLS setting for the directory in the DC/OS cluster.

If the Active Directory LDAP server role is not configured to allow SSL/TLS connections, you should verify that the DC/OS cluster is configured to allow unencrypted communication.

To change how DC/OS handles SSL/TLS connection errors:
1. Log in to the DC/OS web-based console.

1. Click **Settings**, then click **LDAP Directory**.

1. Click **Edit Directory**.

1. Under **Select SSL/TLS setting**, select another option.

    ![SSL/TLS setting option](/mesosphere/dcos/1.13/img/ldap-ssl-options.png)

    Figure 3. SSL/TLS setting options

    For example, if you have configured the Select SSL/TLS setting to **Use SSL/TLS for all connections**, you might want to change the setting to **Attempt StartTLS, proceed unencrypted if it fails**.

1. Click **Save Configuration**.

# SSL/TLS is enforced but the connection fails
If you have configured connections to the LDAP server to abort if unable to use transport layer security (SSL/TLS), you might see the following error message:

![Aborted SSL/TLS connections](/mesosphere/dcos/1.13/img/ldap-enforced-TLS-error.png)

Figure 4. Connection error message: TLS error

To change how DC/OS handles SSL/TLS connection errors:
1. Log in to the DC/OS web-based console.

1. Click **Settings**, then click **LDAP Directory**.

1. Click **Edit Directory**.

1. Under **Select SSL/TLS setting**, select another option.

    ![SSL/TLS setting option](/mesosphere/dcos/1.13/img/ldap-ssl-options.png)

    Figure 5. SSL/TLS setting option

    For example, if you want to continue to connect to the LDAP server when secure communication is not available, you can set the Select SSL/TLS setting to **Attempt StartTLS, proceed unencrypted if it fails**.

1. Click **Save Configuration**.

# Service account credential issues
If the connection to the LDAP server is successful, but the authentication credentials for the service account are incorrect, you might see the following error message:

![LDAP authentication error](/mesosphere/dcos/1.13/img/ldap-lookup-DN-error.png)

Figure 6. LDAP authentication error

To address this issue:
1. Log in to the DC/OS web-based console.

1. Click **Settings**, then click **LDAP Directory**.

1. Click **Edit Directory**.

1. Click **Authentication**.

1. Correct the **Lookup DN** and the **Lookup Password**.

    ![Modify authentication information](/mesosphere/dcos/1.13/img/ldap-lookup-dn.png)

    Figure 7. Modify authentication information

1. Click **Save Configuration**.

# Cannot find user
If the connection to the LDAP server is successful and the service account credentials are correct, but the user is not found, you might see the following error message:

![LDAP user not found](/mesosphere/dcos/1.13/img/ldap-user-error.png)

Figure 8. LDAP user not found

In most cases, you will see this error if a specified user or service account is not within the scope of the user search base you have defined or if there is a problem with the distinguished name (DN) or distinguished name (DN) template used to bind to the LDAP server. If you see this error, you should verify the following settings:
- The type of bind operation and authentication method you are using to connect to the LDAP server.
- The scope defined for the user search base.
- The user distinguished name (DN) template you are using.
- The user search filter template you are using.

## Specifying a user distinguished name (DN) template
If you are using **simple** authentication to bind to the LDAP server, be sure that you have specified a valid User DN Template. In most cases, the distinguished name template includes the runtime variable placeholder `cn=%(username)s` that is replaced in lookup requests with an actual account name value.

## Specifying a user search base and filter template
If you are using **search** authentication to bind to the LDAP server, be sure that you have specified a valid User Search Base and User Search Filter Template.

The user search base should be broad enough to include the appropriate containers, organizational units, and domains you from which you want to return results.

When defining a search filter template, you should keep in mind the following:
- The `%(username)s` runtime variable is a placeholder that is replaced in lookup requests with an actual account name value.
- For OpenLDAP deployments, account lookup requests typically use the UID attribute so the search template placeholder is typically defined using `(uid=%(username)s))`.
- For Active Directory deployments, account lookup requests typically use the `sAMAccountName` attribute so the search template placeholder is typically defined using `(sAMAccountName=%(username)s))`. In most cases, the sAMAccountName attribute is the account name users enter to log on to computers in the Windows domain.

## Verifying Active Directory user account names
If you are using the LDAP server to access Active Directory accounts for Windows users, you can find the sAMAccountName attribute and other account information using Active Directory Users and Computers or Windows PowerShell.

To look up the account information using Active Directory Users and Computers:
1. Log on to a Windows computer using an account with administrative privileges.
1. Open the Control Panel for **Administrative Tools**.
1. Open **Active Directory Users and Computers**.
1. Select the user account.

    ![Selecting a user in Active Directory Users and Computers](/mesosphere/dcos/1.13/img/ldap-aduc.png)

    Figure 9. Active Directory selections

1. Right-click, then select **Properties**.
1. Click the **Account** tab and check the **User login name**.

    ![User login account property](/mesosphere/dcos/1.13/img/ldap-aduc-account-properties.png)

    Figure 10. User login account

## Checking for alternative account name formats
In some cases, you might want to look up account information using an alternative to the `sAMAccountName`. For example, you might want to look for account information by the `userPrincipalName` that defines unique accounts in a domain with the<EMAIL_ADDRESS>format.

If you want to use any other valid account name format such as<EMAIL_ADDRESS>you can find the valid alternatives to replace the `sAMAccountName` by using Active Directory Users and Computers or by running commands using Windows PowerShell.

To look up Active Directory user information using Window PowerShell:
1. Open the Windows PowerShell administrator console.

1. Import the Active Directory module by using Import menu option or the Import-Module cmdlet. For example, in the PowerShell console you can run the `import-module` cmdlet like this: PS C:\Users\Administrator> import-module activedirectory

1. Run the Get-ADUser cmdlet to retrieve the Active Directory properties for a specified user. For example: PS C:\Users\Administrator> Get-ADUser rmcdonald -properties *

This cmdlet returns all of the properties for the user with the `SAMAccountName` rmcdonald.

```
AccountExpirationDate :
accountExpires :<PHONE_NUMBER>854775807
AccountLockoutTime :
AccountNotDelegated : False
AllowReversiblePasswordEncryption : False
BadLogonCount : 1
badPasswordTime :<PHONE_NUMBER>30929294
badPwdCount : 1
CannotChangePassword : False
CanonicalName : example.com/Users/Ronald McDonald
Certificates : {}
City :
CN : Ronald McDonald
codePage : 0
Company :
Country :
countryCode : 0
Created : 12/17/2018 2:27:43 PM
createTimeStamp : 12/17/2018 2:27:43 PM
Deleted :
Department :
Description :
DisplayName : Ronald McDonald
DistinguishedName : CN=Ronald McDonald,CN=Users,DC=example,DC=com
Division :
DoesNotRequirePreAuth : False
dSCorePropagationData : {12/31/1600 4:00:00 PM}
EmailAddress :
EmployeeID :
EmployeeNumber :
Enabled : True
Fax :
GivenName : Ronald
HomeDirectory :
HomedirRequired : False
HomeDrive :
HomePage :
HomePhone :
Initials :
instanceType : 4
isDeleted :
LastBadPasswordAttempt : 12/18/2018 11:44:53 AM
LastKnownParent :
lastLogoff : 0
lastLogon : 0
LastLogonDate : 12/17/2018 2:36:30 PM
lastLogonTimestamp :<PHONE_NUMBER>03404620
LockedOut : False
logonCount : 0
LogonWorkstations :
Manager :
MemberOf : {}
MNSLogonAccount : False
MobilePhone :
Modified : 12/17/2018 2:36:30 PM
modifyTimeStamp : 12/17/2018 2:36:30 PM
msDS-User-Account-Control-Computed : 0
Name : Ronald McDonald
nTSecurityDescriptor : System.DirectoryServices.ActiveDirectorySecurity
ObjectCategory : CN=Person,CN=Schema,CN=Configuration,DC=example,DC=com
ObjectClass : user
ObjectGUID : 8a372fe3-b879-4a58-aabd-6001327b2548
objectSid : S-1-5-21-1469461492-1576009741-989685995-1104
Office :
OfficePhone :
Organization :
OtherName :
PasswordExpired : False
PasswordLastSet : 12/17/2018 2:27:43 PM
PasswordNeverExpires : True
PasswordNotRequired : False
POBox :
PostalCode :
PrimaryGroup : CN=Domain Users,CN=Users,DC=example,DC=com
primaryGroupID : 513
ProfilePath :
ProtectedFromAccidentalDeletion : False
pwdLastSet :<PHONE_NUMBER>35431368
SamAccountName : rmcdonald
sAMAccountType : 805306368
ScriptPath :
sDRightsEffective : 15
ServicePrincipalNames : {}
SID : S-1-5-21-1469461492-1576009741-989685995-1104
SIDHistory : {}
SmartcardLogonRequired : False
sn : McDonald
State :
StreetAddress :
Surname : McDonald
Title :
TrustedForDelegation : False
TrustedToAuthForDelegation : False
UseDESKeyOnly : False
userAccountControl : 66048
userCertificate : {}
UserPrincipalName<EMAIL_ADDRESS>uSNChanged : 16787
uSNCreated : 16781
whenChanged : 12/17/2018 2:36:30 PM
whenCreated : 12/17/2018 2:27:43 PM
```

# User with incorrect credentials
If the connection to the LDAP server is successful and the specified user can be found inside the scope of the user search base but the credentials are wrong, you might see the following error message:

![Invalid user credentials](/mesosphere/dcos/1.13/img/ldap-wrong-user-credentials.png)

Figure 11. Invalid user credentials

If you see this error, check for the following potential issues that can cause the user credentials to be invalid:
- Verify that the account is not locked or disabled.
- Verify that the account password has not expired.
- Check whether there are login hours or other access control restrictions preventing the user from being authenticated.

repository: mesosphere/dcos-docs-site

gha_language: SCSS

repo_name: mesosphere/dcos-docs-site


text:
---
layout: DefaultLayout
---

## Packaging

PIEs are defined as NPM packages, and as a best practice follow a structure for including documentation and a demonstration of the PIE.

## NPM Package

The following directory structure and files should be present in the package (and included when it is installed with npm):

| File | Description | Required? |
|----------------------------|----------------------------------------------------------------------------------------------------------------------|-------------|
| `README.md` | Documentation to describe the PIE to users  | yes |
| `package.json` | Definition for the PIE as an NPM package. Including dependencies needed for rendering | yes |
| `controller/` | Folder containing controller code | no |
| `controller/package.json` | Used to define dependencies and `main` file for the controller. Dependencies should be kept to a minimum and should not use IO | no |
| `docs/schema.json` | JSON schema document that defines the configuration model for the PIE | recommended |
| `docs/demo` | Directory that defines a demonstration assessment item that uses this PIE | recommended |
| `docs/demo/index.html` | The HTML markup for the demo assessment item | recommended |
| `docs/demo/config.json` | The JSON config for the demo assessment item | recommended |
| `src/` | Directory for the PIE Element source code*  | recommended |
| `test/` | Directory for the test code  | recommended |

> \* The PIE element source code can be placed in any directory as long as the `main` property in `package.json` points to the main module for this code.

> Additional directories and files may be added at the discretion of the developer, but care should be taken so that only necessary files are included with the package using the `files` property in package.json and `.npmignore` file as necessary.

> The controller's package name must be `${mainPackageName}-controller`.

The package definition is contained in `package.json` see [npm documentation](https://docs.npmjs.com/files/package.json) for full documentation on npm packages.

Example Package.json:

```json
{
  "name": "my-pie",
  "version": "0.0.1",
  "main": "src/index.js",
  "dependencies": {...},
  "files": ["docs", "src", "controller"],
}
```

#### name (required)

The package `name` property will be used as the Custom Element name. Elements should be named according to W3C [rules](https://www.w3.org/TR/custom-elements/#concepts) for Custom Elements (all-lowercase, must contain a hyphen). The name of the PIE should be unique, as such, we recommend using your organization name as the first part of the name, e.g. `organization-pie-name`

### version (required)

This is the [semver](semver.org) version for your PIE. The semver rules should be followed so that breaking changes will not be applied to existing questions that use your pie.

### main (required)

This is the entry point for defining the Custom Element for your PIE.

This file will be defined as a `.js` file and should be an ES6 module that is the entry point module for your Custom Element. (See examples in [Custom Element](custom-element.md))

> Important: You should not bundle / pack your PIE's dependencies in this file, The [PIE CLI packaging tool](https://github.com/PieLabs/pie-cli) will do that on your behalf.

### dependencies

Define dependencies that need to be included with your PIE when it is run in the browser.
Care should be taken to only define dependencies that are used in the PIE and to not add too much download size to the PIE when distributed.

### files

Defines what files should be downloaded when the package is installed.

> `README.md`, and `package.json` and some [other files](https://docs.npmjs.com/files/package.json#files) will always be included by npm

## Demo and Docs

The [pie-cli] `serve` utility helps load and preview PIEs, it enforces some conventions about how a PIE is structured so that it can be easily reviewed in a consistent way.

To support this, as described above, the following files should be present in a PIE package:

```
README.md
docs/
  schema.json
  demo/
    index.html
    config.json
```

#### README.md

This markdown file should describe and document how to use the PIE.

#### schema.json

This file should be a json schema document, describing the model for the `config` object that needs to be provided by a content author to use an instance of the PIE.

#### demo/

This should contain a sample usage of the PIE, see [Defining Questions](../using/defining-questions.md).

license: ISC

repository: pie-framework/pie-website

gha_language: Vue

gha_license_id: ISC

repo_name: pie-framework/pie-website


text:
# PostCodeLookup EI Connector

The Postcode lookup [Connector](https://docs.wso2.com/display/EI640/Working+with+Connectors) allows you to access the [Postcode lookup REST API](https://developers.alliescomputing.com/) through WSO2 Enterprise Integrator (WSO2 EI).

## Compatibility

| Connector version | Supported WSO2 ESB/EI version |
| ------------- | ------------- |
| [1.0.3](https://github.com/wso2-extensions/esb-connector-postcodelookup/tree/org.wso2.carbon.connector.postcodelookup-1.0.3) |  ESB 4.9.0, ESB 5.0.0, EI 6.2.0, EI 6.3.0, EI 6.4.0    |

## Getting started

#### Download and install the connector

1. Download the connector from the [WSO2 Store](https://store.wso2.com/store/assets/esbconnector/details/9b5a28b2-e743-428d-aef2-5df7a5146cce) by clicking the Download Connector button.
2. Then you can follow this [Documentation](https://docs.wso2.com/display/EI640/Working+with+Connectors+via+the+Management+Console) to add and enable the connector via the Management Console in your EI instance.
3. For more information on using connectors and their operations in your EI configurations, see [Using a Connector](https://docs.wso2.com/display/EI640/Using+a+Connector).
4. If you want to work with connectors via EI tooling, see [Working with Connectors via Tooling](https://docs.wso2.com/display/EI640/Working+with+Connectors+via+Tooling).

#### Configuring the connector operations

To get started with PostCode Lookup connector and their operations, see [Configuring PostCode lookup Operations](docs/config.md).

## Building From the Source

Follow the steps given below to build the PostCodeLookup connector from the source code:

1. Get a clone or download the source from [Github](https://github.com/wso2-extensions/esb-connector-postcodelookup).
2. Run the following Maven command from the `esb-connector-postcodelookup` directory: `mvn clean install`.
3. The PostCodeLookup connector zip file is created in the `esb-connector-postcodelookup/target` directory

## How You Can Contribute

As an open source project, WSO2 extensions welcome contributions from the community.
Check the [issue tracker](https://github.com/wso2-extensions/esb-connector-postcodelookup/issues) for open issues that interest you. We look forward to receiving your contributions.

gha_language: Java


text:
---
date: 2020-04-26T09:00:00-0600
feedId: /notes/0855/
tags:
    - Zettelkasten
    - reading
    - note-taking

---

Between my new [This Week I Learned][TWIL] entries, an interest in having all my notes in one place, and a desire to actually *use* my notes system more effectively I’m trying something new with my reading: notable things I read (and my comments on them) will now live in [Bear] instead of [Pinboard]. I expect this will help a lot with *active review* of my reading notes. (I may go ahead and do something I’ve thought about for a while and pull all of my Pinboard notes over to Bear, too!)

[TWIL]: https://v5.chriskrycho.com/topics/this-week-i-learned/
[Pinboard]: https://pinboard.in
[Bear]: https://bear.app

repository: chriskrycho/lightning-rs

repo_name: chriskrycho/lightning-rs


text:
# go-app

[go-app] is a multipurpose Helm chart for various type of applications.

## TL;DR;

```console
$ helm repo add shurshun https://shurshun.github.com/helm-charts
$ helm repo update
```

## Introduction

This chart helps to bootstrap applications on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites

  - Kubernetes 1.6+

## Using the Chart

Examples of usage this chart you can find in my projects listed below:

  - [Domain Harverster](https://github.com/shurshun/domain-harvester)

Or in the [examples directory](https://github.com/shurshun/go-app-chart/tree/master/examples).

## Configuration

All configurable parameters of the go-app chart, their default values and usage examples you can find in `values.yaml` file.

## My other charts

  - [php-app](https://github.com/shurshun/php-app-chart)

repository: shurshun/go-app-chart

repo_name: shurshun/go-app-chart


text:
# Lecture 3: GloVe: Global Vectors for Word Representation
[Lecture 3 Stanford NLP on GloVe](https://www.youtube.com/watch?v=ASn7ExxLZws&index=4&list=PL3FW7Lu3i5Jsnh1rnUwq_TcylNr7EkRe6&t)
  - [slides](http://web.stanford.edu/class/cs224n/lectures/lecture3.pdf)

# Lecture Plan
- Lecture plan: [2:28](https://youtu.be/ASn7ExxLZws?t=2m28s)
  - Finish word2vec: [3:07](https://youtu.be/ASn7ExxLZws?t=3m7s)
  - What does word2vec capture? [25:05](https://youtu.be/ASn7ExxLZws?t=25m05s)
  - Break: Linear Algebraic Structure of Word Senses [45:45](https://youtu.be/ASn7ExxLZws?t=45m45s)
  - How could we capture this essence more effectively? [31:14](https://youtu.be/ASn7ExxLZws?t=31m14s)
  - How can we analyze word vectors?
    - Evaluation [50:35](https://youtu.be/ASn7ExxLZws?t=50m35s)

# Highlights

## Skip-gram and negaitve sampling
- A neural probabilistic language model -Bengio, 2003
- Main idea of word2vec [11:13](https://youtu.be/ASn7ExxLZws?t=11m13s)
  - Basic idea: log[sigma(outerwords dot centerword)  divided by sum of log[ sigma(random samplings dot centerword)]
  - Unigram matrix to de-emphasis stop words

## Continuous Bag of Words
- word2vec improves object function by putting similar words nearby in space
- Main idea of Continuous Bag of Words [17:50](https://youtu.be/ASn7ExxLZws?t=17m50s)
  - Add the nearby words the dot-product against centerword

## Summary of word2vec algorithm
- Go thru corpus find all co-occuring: [19:37](https://youtu.be/ASn7ExxLZws?t=19m37s)
- Capture the entire count of co-occurance
- Looking arond the document "this word appears with enitre document"  -> Laten Semantic Analysis [21:40](https://youtu.be/ASn7ExxLZws?t=21m40s)

## Simple example of Windw based co-ocurance matrix
- Buiding a co-occurance matrix: [24:18](https://youtu.be/ASn7ExxLZws?t=24m18s)

## How do we reduce the large co-occurance matrix?
- SVD: [27:20](https://youtu.be/ASn7ExxLZws?t=26m30s)

## Hybrid solution: GloVe
- Count based v. direct perdiction: [35:54](https://youtu.be/ASn7ExxLZws?t=35m54s)
- GloVe cost function, J(theta):[38:00](https://youtu.be/ASn7ExxLZws?t=38m00s)

## Word vector analogies
- Intrinsic word vector evaluaion: [54:30](https://youtu.be/ASn7ExxLZws?t=54m30s)
=

# Suggested reading
  - http://web.stanford.edu/class/cs224n/syllabus.html
  - [skip-gram-tutorial](http://mccormickml.com/2016/04/19/word2vec-tutorial-the-skip-gram-model/#)
  - [distributed-representation-paper](http://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf)
  -[Efficient Estimation of Word Representations in Vector Space by Tomas Mikolov](https://arxiv.org/pdf/1301.3781.pdf)

# Assignment info
  - [HW#1](http://web.stanford.edu/class/cs224n/assignment1/index.html)
  - [HW#1-solutions](http://web.stanford.edu/class/cs224n/assignment1/assignment1-solution.pdf)

# References
- [Global Vectors for Word Representatino by Chtid Manning et al](https://nlp.stanford.edu/pubs/glove.pdf)
- [distributed-representations-of-words-and-phrases-and-their-compositionality](http://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf)
- [Efficient Estimation of Word Representations in Vector Space](https://arxiv.org/pdf/1301.3781.pdf)

repository: study-groups/stanford-nlp-study-group

repo_name: study-groups/stanford-nlp-study-group