text:
## JSONView 2.4.3

- Fix recognizing content types like application/hal+json

## JSONView 2.4.2

- Fix mangled encoding in Firefox

## JSONView 2.4.1

- Fix mangled arrows

## JSONView 2.4.0

- Preserve indentation when copying JSON.
- The JSON object is available from the console via the global "data" property. Note: This may go away when JSONView is forced into the new Manifest V3 extension model.
- Increased the number of content types that will be recognized as JSON.
- Added Indonesian localization.

## JSONView 2.3.0

- Switch to a dark theme when your system is set to dark mode.

## JSONView 2.2.1

- Escape single quotes in generated HTML.

## JSONView 2.2.0

- Do not read content type from redirect responses

## JSONView 2.1.0

- Ignore case when checking headers.

## JSONView 2.0.1

- Force encoding to UTF-8.

## JSONView 2.0.0

- JSONView has been rewritten with the new WebExtension model, and is now compatible with Firefox 57+ and Google Chrome.
- JSONView will now highlight any content type matching "application/\*+json" in addition to "application/json".
- Due to the new extension model, the ability to add "application/json" to the Accept header has been removed.
- Removed the preference to use the built-in Firefox JSON viewer.

## JSONView 1.2.4

- Fixed a case where JSON would fail to parse if a string containing a number was preceded by a quote that was preceded by a lot of escaped slashes, or occurred near another number.

## JSONView 1.2.3

- Fixed a case where JSON would fail to parse if a string containing a number was preceded by a quote that was preceded by an escaped slash.

## JSONView 1.2.2

- Fixed a case where JSON would fail to parse if a string containing a number also contained escaped quotes.

## JSONView 1.2.1

- Fixed a case where JSON would fail to parse if a string contains a number and the JSON isn't indented.

## JSONView 1.2.0

- Add a preference to use the built-in Firefox JSON viewer.
- Tell Firefox we support multi-process mode.
- Fix a performance regression that could severely slow down rendering large documents.

## JSONView 1.1.1

- Fix a bug where copy-pasted numbers would include a unicode space.
- Fix copy-pasting JSON to not introduce unnecessary whitespace.
- Empty arrays no longer have collapsers.

## JSONView 1.1.0

- Large numbers will now display as they appear in the original JSON document, even if they can't be represented correctly in JavaScript.
- Updated ru-RU localization.
- Rebuilt to support newer Firefoxes.

## JSONView 1.0.2

- JSONView now works with Firefox's multi-process mode (electrolysis).
- Ellipses once again appear when arrays and objects are collapsed.
- Users can opt in to treating content types other than "application/json" as JSON. Add new content types in the extension preferences. Please be careful with this setting!
- JSONP support has been removed. Please consider using cross-origin resource sharing (CORS) instead. See https://github.com/bhollis/jsonview/issues/9#issuecomment-75919259 for rationale.
- Empty JSON responses no longer cause the page to load forever.
- Added hi-IN translation courtesy of Kishu Agarwal.

## JSONView 0.9

- JSON parsing errors now include details and highlight the line/column of the error.
- Expanding and collapsing with arrow keys now does not collapse the top-level object/array.
- Object keys that are not valid JS identifiers are now displayed with quotes around them.
- Dragging a .json file onto Firefox should syntax-highlight it correctly, again.
- Navigating in Firefox with keyboard shortcuts will no longer trigger expanding/collapsing JSON.
- Updated compatibility to state that JSONView is now only compatible with Firefox 21+. This was true of 0.8 as well but was not documented correctly. It is possible to install JSONView 0.7 on older Firefox.

## JSONView 0.8

- Rewritten as a restartless addon using the Addon SDK thanks to Quoc-Viet Nguyen.
- file:// links are recognized as URLs thanks to Marcin Wojnarski.
- Firefox < 4.0 compatibility has been dropped.
- More-efficient array/object collapsing, switch to arrows from +/-.
- HTML-encode links.
- Fix empty arrays being displayed as objects thanks to Quoc-Viet Nguyen.
- Keyboard shortcuts to collapse all or expand all using the left and right arrow keys thanks to Harshit Rohatgi.
- Path tooltips on object keys thanks to Adrian Vogelsgesang.
- Escaping of quotes in generated HTML thanks to Adrian Vogelsgesang.

## JSONView 0.7

- Firefox 8+ compatibility.

## JSONView 0.6

- Several new and updated localizations.
- Copying the formatted JSON and then pasting it now pastes valid JSON.
- Preserve formatting for JSON error responses.
- When disabling or uninstalling JSONView, make sure to remove the HTTP Accept header customization.
- Better escaping of potentially display-breaking Unicode characters in strings, and some other tweaks. Extracted from a patch by Johan Sundström.
- Some services are now loaded lazily in hopes of decreasing any effect JSONView might have on Firefox startup time.
- Unicode NUL character is now escaped when showing the body of an unparseable string.

## JSONView 0.5

- Fixed display of newlines and multiple spaces - formatting is now better preserved.
- Fixed display of ECMAScript 5th Edition style JSON (with non-object/array root values) thanks to a patch from Josh Kline.
- URLs are matched even with uppercase scheme (such as "httpS://")

## JSONView 0.4

- Preference dialog with an option to send "application/json" in the HTTP Accept header.
- Fixed a bug where values that were 0 or false would not show up.
- Fixed a bug where documents would sometimes show up as invalid when Firebug was enabled
- Bumped compatibility for 3.7a1pre

## JSONView 0.3

- Detects and displays JSONP, including display of the callback.
- Doesn't show empty arrays and objects as collapsible, and displays them on one line.
- Fixed an error reading large files.

## JSONView 0.2

- .json files can be opened in JSONView from the local machine.
- Added Bulgarian, German, Hungarian, and (partial) Turkish translations. Thanks to Стоян Димитров, Archaeopteryx, Team erweiterungen.de, MIKES KASZMÁN István and Ersen Yolda from BabelZilla.org.
- Compatible with FF 3.5.\*

## JSONView 0.1

- String values which contain only a URL are displayed as a clickable link. Props to stig.murberg for the patch.
- Added Catalan, Spanish, Japanese, Portugese (Brazil), Russian, and Simplified Chinese translations. Thanks to Fani Kozolchyk, and Xavi Ivars - Softcatalà, hoolooday, drry, Marcelo Ghelman (ghelman.net), Пирятинский Виталий, and urko from BabelZilla.org.

## JSONView 0.1b3:

- Compatible with FF 3.1 Beta 3
- Fixed a bug where documents >8KB wouldn't be parsed.
- Added Czech, French, and Dutch translations. Thanks to funTomas, Goofy, and markh at babelzilla.org.
- Removed dependency on jQuery - extension is smaller, faster, no more warnings in strict mode.

## JSONView 0.1b2:

- Compatible with FF 3.1 Beta 2

## JSONView 0.1b1:

- First beta release

repository: bhollis/jsonview

repo_name: bhollis/jsonview


text:
# Metricity::Server

TODO:

- Add aggregation support (LTRIM, LSPLICE)
- Show all host metrics on dashboard

## Installation

Add this line to your application's Gemfile:

    gem 'metricity-server'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install metricity-server

## Usage

TODO: Write usage instructions here

## 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

license: MIT

repository: VvanGemert/metricity-server

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: VvanGemert/metricity-server


text:
HttpAbstractions
================

| AppVeyor | Travis |
| ---- | ----
| [![AppVeyor](https://ci.appveyor.com/api/projects/status/8civi9t457oc7rf8/branch/dev?svg=true)](https://ci.appveyor.com/project/aspnetci/HttpAbstractions/branch/dev) | [![Travis](https://travis-ci.org/aspnet/HttpAbstractions.svg?branch=dev)](https://travis-ci.org/aspnet/HttpAbstractions) |

Contains HTTP abstractions for ASP.NET Core such as `HttpContext`, `HttpRequest`, `HttpResponse` and `RequestDelegate`.

It also contains `IApplicationBuilder` and extensions to create and compose your application's pipeline.

This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo.

repository: filipw/HttpAbstractions

repo_name: filipw/HttpAbstractions


text:
# The Good Note Taker

  The Good Note Taker is an application that helps the user keep track of his or her thoughts by allowing them to write, save, and delete notes.

  ![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)

  ***

  ## Table of Contents:

  1. [How to Install The Good Note Taker](#Installation)
  2. [Using The Good Note Taker](#How%20To%20Use%20This%20Application)
  3. [Testing The Good Note Taker](#Test%20Code)
  4. [Contribution Guidlines](#Contribution%20Guidelines)
  5. [Ask Us Questions](#Ask%20Questions)
  6. [Licenses](#License)

  ***

  ## Installation

  Simply navigate your web browser to the following link: <https://protected-lake-56546.herokuapp.com/>

  ## How to Use This Application

  When you launch the application press the get started button to navigate where your notes are created, saved, and stored. Once you are there click on the pencil on the top right of the page to create a new note. This will allow you to edit the fields necessary to create a note.

  You can give your note a short title and directly below the title type the text for your note. Once you are finished you can save the note you have created. All saved notes appear on the left side of the page. By clicking on the title of a saved note on the left side of the screen you will be able to view its content. To delete a saved note click on the image of the trashcan next to the title of the note you wish to delete on the left side of the page.

  ![Application in use](/images/notetaker.png)

  ## Test Code

  No test were created during the development of this application.

  ## Contribution Guidelines

  Please check your code for errors before making a merge request.

  ## Ask Questions

  Visit my GitHub Page: [My GitHub Profile Page](https://github.com/AlvinZC4)
 -OR-
 Drop me an e-mail at<EMAIL_ADDRESS>
  ## License

  This applicaton is covered under the Public Domain (Unlicense)

license: Unlicense


text:
# [Method accesses a private member variable of owning class](https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#IMA_INEFFICIENT_MEMBER_ACCESS)

      This method of an inner class reads from or writes to a private member variable of the owning class,
      or calls a private method of the owning class. The compiler must generate a special method to access this
      private member, causing this to be less efficient. Relaxing the protection of the member variable or method
      will allow the compiler to treat this as a normal access.

repository: codacy/codacy-spotbugs

gha_language: Scala

gha_license_id: NOASSERTION

repo_name: codacy/codacy-spotbugs


text:
# PoudriereElixirWeb

Web server for viewing [Poudriere](https://github.com/freebsd/poudriere) results

## Configuration requirements

### Static contents served

Poudriere requires the following contents to be served:

* Static contents of Poudriere itself in `/` at: `/home/poudriere/static-html` with*out* directory index;
* Logs in `/data` at: `/home/poudriere/data/logs/bulk` with directory index; and
* Packages in `/packages` at: `/home/poudriere/data` with directory index.

### MIME type configuration

Poudriere needs the following MIME types to be served:

```
text/plain                          txt log;
```

The above type is already specified in the MIME module of Elixir.

### Server code

See `lib/poudriere_elixir_web_endpoint.ex`.

### Serving the logs

* Logs must be served as static contents/assets, so use `Plug.Static`.
* Logs must be served with directory index enabled, so use `PlugStaticLs`.
* *Use the same configuration between `Plug.Static` and `PlugStaticLs`.*

```elixir
plug Plug.Static,
  at: "/data", from: "/home/poudriere/data/logs/bulk"
plug PlugStaticLs,
  at: "/data", from: "/home/poudriere/data/logs/bulk"
```

### Serving the packages

* Packages must be served as static contents/assets, so use `Plug.Static`.
* Packages must be served with directory index enabled, so use `PlugStaticLs`.
* *Use the same configuration between `Plug.Static` and `PlugStaticLs`.*

```elixir
plug Plug.Static,
  at: "/packages", from: "/home/poudriere/data"
plug PlugStaticLs,
  at: "/packages", from: "/home/poudriere/data"
```

### Serving the document root

* The directory path must be redirected to the `index.html` file of the same directory, so use `Plug.Static.IndexHtml`. (Note that `Plug.Static.IndexHtml` is an *independent* package/module from `Plug` or `Plug.Static`.)
* The directory contents must be served as static contents/assets, so use `Plug.Static`.
* The files must not be indexed.

```elixir
plug Plug.Static.IndexHtml, at: "/"
plug Plug.Static, at: "/", from: "/home/poudriere/static-html"
```

### Responding to unknown paths

Use the following code:

```elixir
plug :not_found
plug :halt

def not_found(conn, _) do
  Plug.Conn.send_resp(conn, 404, ["not found"," ", "here"])
end

def halt(conn, _) do
  Plug.Conn.halt(conn)
end
```

## How to run

* Copy shared static files of Poudriere to `/home/poudriere/shared-html`, by:

```sh
umask 022 # required to provide world-readable access
mkdir /home/poudriere/shared-html
cp -pr /usr/local/share/poudriere/html/* /home/poudriere/shared-html
```

* Configure IP address and port in `config/dev.exs`, and copy the file to `config/prod.exs`

* To run the server, do this:

```sh
elixir --detached -S mix do compile, run --no-halt
```

## Building and testing Elixir release

```sh
mix do deps.get, compile
MIX_ENV=prod mix compile
MIX_ENV=prod mix release
rel/poudriere_elixir_web/bin/poudriere_elixir_web start
```

## Notes

* Conform hasn't been included yet: use `config` files

## References

* [How To Set Up a Poudriere Build System to Create Packages for your FreeBSD Servers](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-poudriere-build-system-to-create-packages-for-your-freebsd-servers)
* [Poudriere at GitHub](https://github.com/freebsd/poudriere)


text:
---
title: Generalized inverted indexes
linkTitle: Generalized inverted indexes
description: Generalized inverted indexes in YSQL
image: /images/section_icons/secure/create-roles.png
menu:
  latest:
    identifier: explore-ysql-language-features-gin
    parent: explore-ysql-language-features
    weight: 400
isTocNested: true
showAsideToc: true
---

In YugabyteDB, tables and secondary indexes are both [key-value stores internally][arch-persistence].
Loosely speaking:

- A _table's_ internal key-value store maps primary keys to the remaining columns.
- A _secondary index's_ internal key-value store maps index keys to primary keys.

**Regular indexes index columns.** This makes queries with conditions on the columns more efficient.
For example, if you had a regular index on a single int array column (currently not possible in YSQL), queries like `WHERE myintarray = '{1,3,6}'` would be more efficient when using the index.
However, queries like `WHERE myintarray @> '{3}'` (meaning "is `3` an element of `myintarray`?") would not benefit from the regular index.

**Generalized inverted indexes (GIN indexes) index elements inside container columns.**
This makes queries with conditions on elements inside the columns more efficient.
The above example would benefit from a GIN index since we can look up the key `3` in the gin index.

[arch-persistence]: ../../../architecture/docdb/persistence/

## Compatible types

GIN indexes can only be created over a few types:

- A GIN index on a _tsvector_ column indexes _text elements_
- A GIN index on an _array_ column indexes _array elements_
- A GIN index on a _jsonb_ column indexes _keys/values_

You can use extensions to support more types.
However, extension support is still in progress:

- `btree_gin`: unsupported
- `hstore`: supported
- `intarray`: unsupported
- `pg_trgm`: supported

## Grammar

### CREATE INDEX

Create the index using `USING ybgin` to specify the index access method:

```sql
CREATE INDEX ON mytable USING ybgin (mycol);
```

The `gin` access method is reserved for temporary relations while `ybgin` is for Yugabyte-backed relations.
You can still specify `USING gin`, and, if `mytable` is not a temporary table, it will be automatically substituted for `ybgin`.

GIN indexes can't be unique, so `CREATE UNIQUE INDEX` is not allowed.

### DELETE, INSERT, UPDATE

Writes are fully supported.

### SELECT

Only [certain SELECTs][operators] use the GIN index.

[operators]: https://www.postgresql.org/docs/13/gin-builtin-opclasses.html

## Changes from PostgreSQL

YugabyteDB GIN indexes are somewhat different from PostgreSQL GIN indexes:

- PostgreSQL uses bitmap index scan, while YugabyteDB uses index scan.
- In YugabyteDB, deletes to the index are written explicitly. This is due to storage-layer architecture differences and is also true for regular indexes.
- YugabyteDB doesn't support fast update, as it isn't practical for a distributed, log-structured database.
- YugabyteDB doesn't yet support fuzzy search limit.

## Examples

1. To begin, set up a YugabyteDB cluster. For instance, using `yugabyted`,

    ```sh
    ./bin/yugabyted start --base_dir /tmp/gindemo/1 --listen <IP_ADDRESS>
    ./bin/yugabyted start --base_dir /tmp/gindemo/2 --listen <IP_ADDRESS> \
      --join <IP_ADDRESS>
    ./bin/yugabyted start --base_dir /tmp/gindemo/3 --listen <IP_ADDRESS> \
      --join <IP_ADDRESS>
    ./bin/ysqlsh --host <IP_ADDRESS>
    ```

1. Set up the tables, indexes, and data.

    ```sql
    CREATE TABLE vectors (v tsvector, k serial PRIMARY KEY);
    CREATE TABLE arrays (a int[], k serial PRIMARY KEY);
    CREATE TABLE jsonbs (j jsonb, k serial PRIMARY KEY);

    -- Use NONCONCURRENTLY since there is no risk of online ops.
    CREATE INDEX NONCONCURRENTLY ON vectors USING ybgin (v);
    CREATE INDEX NONCONCURRENTLY ON arrays USING ybgin (a);
    CREATE INDEX NONCONCURRENTLY ON jsonbs USING ybgin (j);

    INSERT INTO vectors VALUES
        (to_tsvector('simple', 'the quick brown fox')),
        (to_tsvector('simple', 'jumps over the')),
        (to_tsvector('simple', 'lazy dog'));
    -- Add some filler rows to make sequential scan more costly.
    INSERT INTO vectors SELECT to_tsvector('simple', 'filler') FROM generate_series(1, 1000);

    INSERT INTO arrays VALUES
        ('{1,1,6}'),
        ('{1,6,1}'),
        ('{2,3,6}'),
        ('{2,5,8}'),
        ('{null}'),
        ('{}'),
        (null);
    INSERT INTO arrays SELECT '{0}' FROM generate_series(1, 1000);

    INSERT INTO jsonbs VALUES
        ('{"a":{"number":5}}'),
        ('{"some":"body"}'),
        ('{"some":"one"}'),
        ('{"some":"thing"}'),
        ('{"some":["where","how"]}'),
        ('{"some":{"nested":"jsonb"}, "and":["another","element","not","a","number"]}');
    INSERT INTO jsonbs SELECT '"filler"' FROM generate_series(1, 1000);
    ```

### Timing

Here are some examples to show the speed improvement of queries using GIN index.
GIN indexes currently support IndexScan only, not IndexOnlyScan.
The difference is that IndexScan uses the results of a scan to the index for filtering on the indexed table whereas an IndexOnlyScan need not go to the indexed table since the results from the index are sufficient.
Therefore, a GIN index scan can be more costly than a sequential scan straight to the main table if the index scan does not filter out many rows.
Since cost estimates currently aren't very accurate, the more costly index scan may be chosen in some cases.

The assumption in the following examples is that the user is using the GIN index in ways that take advantage of it.

1. First, enable timing for future queries.

    ```sql
    \timing on
    ```

1. Test GIN index on tsvector:

    ```sql
    SET enable_indexscan = off;
    SELECT * FROM vectors WHERE v @@ to_tsquery('simple', 'the');
    -- Run it once more to reduce cache bias.

    Time: 2.838 ms
    ```

    \
    Notice the over 3x timing improvement when using GIN index.
    This is on a relatively small table: a little over 1000 rows.
    With more and/or bigger rows, the timing improvement should get better.

1.
    Time: 2.989 ms
    ```

1. Finally, try with jsonb:

    ```sql
    SET enable_indexscan = off;
    SELECT * FROM jsonbs WHERE j ? 'some';
    SELECT * FROM jsonbs WHERE j ? 'some';
    ```

    ```output
                                            j                                          | k
    ------------------------------------------------------------------------------------+---
    {"some": ["where", "how"]}                                                         | 5
    {"and": ["another", "element", "not", "a", "number"], "some": {"nested": "jsonb"}} | 6
    {"some": "thing"}                                                                  | 4
    {"some": "body"}                                                                   | 2
    {"some": "one"}                                                                    | 3
    (5 rows)

    Time: 13.451 ms
    ```

    ```sql
    SET enable_indexscan = on;
    SELECT * FROM jsonbs WHERE j ? 'some';
    SELECT * FROM jsonbs WHERE j ? 'some';
    ```

    ```output
    ...
    Time: 2.115 ms
    ```

### Using opclass `jsonb_path_ops`

By default, jsonb GIN indexes use the opclass `jsonb_ops`.
There is another opclass `jsonb_path_ops` that can be used instead.

The difference is the way they extract elements out of a jsonb.
`jsonb_ops` extracts keys and values and encodes them as `<flag_byte><value>`.
For example, `'{"abc":[123,true]}'` maps to three GIN keys: `\001abc`, `\004123`, `\003t`.
The flag bytes here indicate the types key, numeric, and boolean, respectively.

On the other hand, `jsonb_path_ops` extracts hashed paths.
Using the above example, there are two paths: `"abc" -> 123` and `"abc" -> true`.
Then, there are two GIN keys based on those paths using an internal hashing mechanism: `-1570777299`, `-1227915239`.

`jsonb_path_ops` is better suited for queries involving paths, such as the `jsonb @> jsonb` operator.
However, it doesn't support as many operators as `jsonb_ops`.
If write performance and storage aren't an issue, it may be worth creating a GIN index of each jsonb opclass so that reads can choose the faster one.

### Presplitting

By default, `ybgin` indexes use a single range-partitioned tablet.
Like regular tables and indexes, it is possible to presplit a `ybgin` index to multiple tablets at specified split points.
These split points are for the index, so they need to be represented in the index key format.
This is simple for tsvector and array types, but it gets complicated for jsonb and text (`pg_trgm`).
`jsonb_path_ops` especially should use hash partitioning since the index key is itself a hash, but hash partitioning `ybgin` indexes is currently unsupported.

```sql
CREATE INDEX NONCONCURRENTLY vectors_split_idx ON vectors USING ybgin (v) SPLIT AT VALUES (('j'), ('o'));
CREATE INDEX NONCONCURRENTLY arrays_split_idx ON arrays USING ybgin (a) SPLIT AT VALUES ((2), (3), (5));
CREATE INDEX NONCONCURRENTLY jsonbs_split_idx1 ON jsonbs USING ybgin (j) SPLIT AT VALUES ((E'\001some'), (E'\005jsonb'));
CREATE INDEX NONCONCURRENTLY jsonbs_split_idx2 ON jsonbs USING ybgin (j jsonb_path_ops) SPLIT AT VALUES ((-1000000000), (0),<PHONE_NUMBER>));
```

Let's focus on just one index for the remainder of this example: `jsonbs_split_idx1`.

First, check how the index is partitioned.

```sh
bin/yb-admin \
  --master_addresses <IP_ADDRESS>,<IP_ADDRESS>,<IP_ADDRESS> \
  list_tablets ysql.yugabyte jsonbs_split_idx1
```

```output
Tablet-UUID                       Range                                                                               Leader-IP         Leader-UUID
43b2a0f0dac44018b60eebeee489e391  partition_key_start: "" partition_key_end: "S\001some\000\000!"                     <IP_ADDRESS>:9100  2702ace451fe46bd81dd2a19ea539163
c32e1066cefb449cb191ff23d626125f  partition_key_start: "S\001some\000\000!" partition_key_end: "S\005jsonb\000\000!"  <IP_ADDRESS>:9100  3a80acb8df5d45e38b388ffdc17a59e0
ba23b657eb5b4bc891ca794bcad06db7  partition_key_start: "S\005jsonb\000\000!" partition_key_end: ""                    <IP_ADDRESS>:9100  e24423119e734860bb0c3516df948b5c
```

Then, check the data in each partition.
Flush it to SST files so that we can read them with `sst_dump`.
Ignore lines with "filler" because there are too many of them.
`!!` refers to the previous `list_tablets` command.
 The default is `ASC` for prefix match purposes, so this can be relaxed in the future. ([#10653](https://github.com/yugabyte/yugabyte-db/issues/10653))
- UPDATEs may be expensive, since they're currently implemented as DELETE + INSERT.
- SELECT operations have the following limitations:
  - Scans with non-default search mode aren't currently supported.
  - Scans can't ask for more than one index key.
    \
    For example, a request for all rows whose array contains elements 1 or 3 will fail, but one that asks for elements 1 _and_ 3 can succeed by choosing one of the elements for index scan and rechecking the entire condition later.
    \
    However, the choice between 1 and 3 is currently unoptimized, so 3 may be chosen even though 1 corresponds to less rows.
  - Recheck is always done rather than on a case-by-case basis, meaning there can be an unnecessary performance penalty.

If a query is unsupported, you can disable index scan to avoid an error message (`SET enable_indexscan TO off;`) before the query, and re-enable it (`SET enable_indexscan TO on;`) afterwards.
In the near future, cost estimates should route such queries to sequential scan.

### Unsupported queries

Sometimes, an unsupported query may be encountered by getting an ERROR.
Here are some workarounds for some of these cases.

#### More than one required scan entry

Perhaps the most common issue would be "cannot use more than one required scan entry".
It means that the GIN index scan internally tries to fetch more than one index key.
Since this is currently not supported, it throws an ERROR.

```sql
RESET enable_indexscan;

SELECT * FROM vectors WHERE v @@ to_tsquery('simple', 'quick | lazy');
```

```output
ERROR:  unsupported ybgin index scan
DETAIL:  ybgin index method cannot use more than one required scan entry: got 2.

For sequential scan to be chosen, make sure that sequential scan is not also disabled.

```sql
SET enable_indexscan = off;
SELECT * FROM vectors WHERE v @@ to_tsquery('simple', 'quick | lazy');
```

```output
                  v                  | k
-------------------------------------+---
 'brown':3 'fox':4 'quick':2 'the':1 | 1
 'dog':2 'lazy':1                    | 3
(2 rows)

Time: 11.188 ms
```

Notice that the modified query using the index is still 2x faster than the original query to the main table.

#### Non-default search mode

All search modes/strategies besides the default one are currently unsupported.
Many of these are best off using a sequential scan.
In fact, the query planner avoids many of these types of index scans by increasing the cost, leading to sequential scan being chosen as the better alternative.

repository: schoudhury/docs

branch_name: refs/heads/main

repo_name: schoudhury/docs


text:
---
hrs_structure:
  division: '1'
  volume: '1'
  title: '2'
  chapter: '11'
  section: 11-344
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0011-0344
    parent: HRS0011
    name: 11-344 Sale or use of information
weight: 20720
title: Sale or use of information
full_title: 11-344 Sale or use of information
---
**[§****11-344] Sale or use of information.** No information in the reports or copies of the reports filed with the commission shall be sold or used by any person for the purpose of soliciting contributions or for any commercial purpose. [L 2010, c 211, pt of §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
### Docker Community Groups: Bevy Training and Q&A!

### Agenda

- Updated Community Leaders Playbook
- Ongoing Organizer Enablement & Training
- Consistent Member Communications
- Technology Consolidation
- Monthly Updates

### Event Link

[Click Here to Access](https://events.docker.com/events/details/docker-docker-community-leaders-presents-docker-community-groups-bevy-training-and-qa/)

### Event Recording

Docker Community Groups: Bevy Training and Q&A!  Meeting ( April 15 2021)

{{< youtube 7VsEmbUlfxE >}}

repository: RomainBelorgey/get-involved

repo_name: RomainBelorgey/get-involved


text:
# HexaPawnGame
A Python implementation of the game Hexapawn, described in the "Mathematical Games" section of the Scientific American magazine, March, 1962.

As described by Gardner, the goal of the game is to show how to build a machine that can learn from its mistakes, as well as victories, because it learns the bad and good moves if it loses or wins a round, respectively.

As you play against the machine, you can see that at first, it makes really bad moves. But as the rounds go by, it starts to learn which moves are bad, discarting them, and which are good, keeping them as the only possible moves for a given board configuration.

http://cs.williams.edu/~freund/cs136-073/GardnerHexapawn.pdf
https://www.youtube.com/watch?v=sw7UAZNgGg8
https://t.me/hexapawnbot

# How to play the game
This game is a very simplified version of chess, containing only three pawns for each player and it's played on a 3x3 board, where the pawns initially ocupy the first and last rows of the board.

| * | * | * |
|    |   |    |
| * | * | * |

A human plays against a machine and the machine initially does not know how to play the game. The human always plays first and they alternate their moves, which are identical to the pawn moves on a traditional chess game, except for the fact that there is no pawn promotion, no en passant and it's not possible to move two squares forward on the first movement of each pawn.

The game objective is to win by placing one of your pawns on the opposite row (the initial row of your opponent), taking all of your opponent pawns or by leaving him with no legal moves on his next move.

As you play, whether the machine wins or loses, it learns by knowing which moves led to its win/loss. If it wins, it keeps the winning move and discards all of the other moves from the winning position. This is the "reward" it gets by winning the reound. If it loses, it discards the last move, which is the one that allowed the loss. This is the "punishment" it gets for losing.

This way, after a few rounds, it starts to play better, until it plays perfectly.

repository: ualvesdias/HexaPawnGame

repo_name: ualvesdias/HexaPawnGame


text:
# Open science monitor R shiny app

## Introduction
Managing publication records on Platforms such as ORCID, Google scholar and Publons can be tedious as it often requires manual updating of individual publications. This R shiny application enables the interactive exploration of the publication profiles of an author from ORCID, Google scholar, Publons and Pubmed, automatic creation of a bibtex citation file for simple uploading and updating of the respective profile.

A live version can be found here: [pubassistant.ch](http://pubassistant.ch)

### Structure
The application is organized as a R package in the folder [uzhOS](uzhOS).
The [Dockerfile_shiny](Dockerfile_shiny) is the Docker build receipt for the shiny app.
The container build with the file [Dockerfile_rstudio](Dockerfile_rstudio) allows for development with Rstudio.
The whole stack of containers is run using Docker compose using the file [docker-compose_shiny.yml](docker-compose_shiny.yml) or [docker-compose_reverse_proxy.yml](docker-compose_reverse_proxy.yml) (using [nginx-proxy](https://github.com/nginx-proxy/nginx-proxy)).

gha_language: R

gha_license_id: MIT


text:
---
date: 2023-03-02
layout: rafaga
rafagas:
- desc: MetroDreamin lets you design and visualize the transportation system you'd
    like your city to have and explore maps made by other transit enthusiasts
  keyw: metro
  link: https://metrodreamin.com/explore?utm_source=dlvr.it&utm_medium=mastodon
  microlink:
    desc: MetroDreamin’ is a web application that allows you to design and visualize
      the transportation system that you wish your city had, and check out the transit
      dreams of other users from around the world.
    logo: https://metrodreamin.com/favicons/windows-tile-310x310.png
    title: MetroDreamin’ | Build the Public Transit System of Your Dreams
- desc: The Real Academia de la Historia española shows the location of the events
    and characters of Hispanic History with nearly 150,000 geographical references
    around the world from the year 1,350,000 BC. until now
  keyw: oldmaps
  lang: ES
  link: https://historia-hispanica.rah.es/?utm_source=dlvr.it&utm_medium=mastodon
  microlink:
    image: https://historia-hispanica.rah.es/assets/images/logo-rah.png
    logo: https://historia-hispanica.rah.es/favicon.ico
    title: Historia Hispánica | Real Academia de la Historia
- desc: The modified Visionscarto “World Atlas” topojson files derived from Natural
    Earth reflect the United Nations position on the integrity of Ukraine and the
    non-self-governing territory of Western Sahara and other disputed borders
  keyw: borders
  link: https://observablehq.com/@visionscarto/world-atlas-topojson?utm_source=dlvr.it&utm_medium=mastodon
  microlink:
    desc: Documentation for our modified topojson files Initially intended for Visionscarto,
      these files are available to all. We derived them from Natural Earth’s 110m
      and 50m cultural vector files, but added several modifications, in particular
      to reflect the United Nations’ position on the integrity of Ukr…
    image: https://static.observableusercontent.com/thumbnail/9ec542db6c13343ebf767cc3c48e8111bb28cf142e680645d77cbb8b60fedf30.jpg
    logo: https://static.observablehq.com/favicon-512.0667824687f99c942a02e06e2db1a060911da0bf3606671676a255b1cf97b4fe.png
    title: Visionscarto’s “World Atlas”
rid: 2014
---

repository: geoinquiets/rafagas

branch_name: refs/heads/gh-pages

gha_language: SCSS

repo_name: geoinquiets/rafagas


text:
---
title: 'ExaConsulting.com: A Marriage of Great Content and Design'
templateKey: blog-post
date: 2014-09-10T14:55:48.000Z
category:
  -Clients
alias: exaconsultingcom-marriage-great-content-and-design
summary: >
 Exa Consulting, Inc. develops and deploys oil and gas industry software solutions with Salesforce1. Their new website — ExaConsulting.com — lays out their services clearly and beautifully, making it easy for visitors to pick up the phone.
author: Amy Peveto
image: /assets/website-launch-exa-consulting.png
---

Exa Consulting, Inc. develops and deploys oil and gas industry software solutions with Salesforce1. Their new website — [ExaConsulting.com](http://ExaConsulting.com) — lays out their services clearly and beautifully, making it easy for visitors to pick up the phone.

Content is (almost) everything
------------------------------

Because Exa Consulting is a relatively new company with solutions unfamiliar to many in the oil and gas industry, developing excellent website content was a critical project component.

Our team worked closely with Exa to develop content that clearly and concisely explains what Exa does and how their solutions benefit their customers.

There were many phone calls made, draft copies shared, and questions asked and answered; this dedication (particularly on Exa’s part) resulted in the tight, customer-focused website content you see on their website today.

Bringing it all together with design
------------------------------------

Exa Consulting’s website is professional and modern, reflecting the company’s agile approach to technology solutions.

This site incorporates a great deal of iconography; it pulls double duty, providing visual interest while also consistently reinforcing the website content for visitors.

We love building on Drupal, but we’ve got a soft spot for WordPress — especially the [Enfold theme](http://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990). This theme’s flexibility makes it easy to create responsive websites that look as great as Exa Consulting’s.

repository: alexander-digett/digett

gha_language: JavaScript

repo_name: alexander-digett/digett


text:
---
sidebar_position: 1
---

# Introduction

A lavalink player represents a voice/audio session with a Discord guild. It is used to play audio tracks in a voice channel.

:::info
Lavalink4NET lowest abstraction level is the `ILavalinkPlayer` interface. If you need fine grained control over the player, you can use this interface. It is recommended to use the default `LavalinkPlayer` class instead, in nearly all cases.
:::

branch_name: refs/heads/dev

gha_language: C#


text:
---
layout: post
title: "[100 Days Angularjs] Day 3 - Wikipedia Search"
date: 2015-10-07
summary: The 3th day of my 100 day challenge with AngularJS
categories: AngularJS
published: true
---

## Day 3 of 100 days with Angular

I spent my whole day study at school and doing [this project](http://codepen.io/chotmat/full/MamqEd/) from [freecodecamp.com](freecodecamp.com) so i don't have time to learn the tutorial. So i will so you what i learn this day from doing this project.

### Project Zipline - Wikipedia Search:

#### Cross-origin resource sharing (CORS) Problem:

When i was trying to get the json from Wikipedia API using `$http.get` like this:

{% highlight js %}
  app.service('wikiaSearchAPI', ['$http', function ($http) {
    return {
        searchFor: searchFor
    };

    function searchFor(title) {
        return $http.get('https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=' + encodeURIComponent(title));
    }
  }]);
{% endhighlight %}

It returned this error in the console:

![]({{site.baseurl}}/images/Screenshot-2015-10-07.png)

I found out that this is a server problem because it do not support CORS so i have to find another way
to get the JSON. So after half an hour i found out that if i use `$http.jsonp` with the extra parameter `callback=JSON_CALLBACK` i wouldn't have to use CORS so i fixed that problem.

{% highlight js %}
  app.service('wikiaSearchAPI', ['$http', function ($http) {
    return {
        searchFor: searchFor
    };

    function searchFor(title) {
        return $http.jsonp('https://en.wikipedia.org/w/api.php?action=opensearch&format=json&callback=JSON_CALLBACK&search=' + encodeURIComponent(title));
    }
  }]);
{% endhighlight %}

#### Binding model to Controller of a directive:

So i have a input like this `<input id="search-box" ng-model="titleQuery" type="text" placeholder="Search for...">` and i have to bind it into the scope of my directive but it this model live in a different scope so i have to find a way to do it. And i found it, this is my directive at that time:

{% highlight js %}
app.directive('wikia', ['wikiaSearchAPI', function (wikiaSearchAPI) {
    return {
        restrict: 'E',
        scope: {
            titleQuery: '='
        },
        template: "
"
                    + "
"
                        + ""
                            + "
{{ result.name }}
"
                        + ""
                        + "
{{ result.summary }}
"
                    + "
"
                  + "
",
        controller: function($scope){
            var ctrl = this;
            ctrl.searchresults = [];
            ctrl.titleQuery = $scope.titleQuery || ''
            wikiaSearchAPI.searchFor(ctrl.titleQuery).then(function (response) {
                for (var i = 0; i < response.data[1].length; i++) {
                    ctrl.searchresults.push({
                        name: response.data[1][i],
                        summary: response.data[2][i],
                        link: response.data[3][i]
                    });
                }
            });
        },
        controllerAs: 'wikiaCtrl'
    };
}]);
{% endhighlight %}

I quickly found out that something is not right. It do not update the ctrl.searchresults. Maybe there is
something wrong with the binding. I ask some guy in the Angular Buddie slack team and know that '=' in
scope mean pass by reference and '@' is for passing string and it support {{}} expressions and there also a
'&' one that pass function. And he also point out that my code supposed to be properly bounded. Because
when he add this {{ctrl.titleQuery}} to the template and it reflect the model change immediately. So
the one that do not work here is the service. It do not know that the model was changed. I have to
use a watcher for that. And now the code work properly.

{% highlight js %}
app.directive('wikia', ['wikiaSearchAPI', function (wikiaSearchAPI) {
    return {
        restrict: 'E',
        scope: {
            titleQuery: '='
        },
        template: "
"
                    + "
"
                        + ""
                            + "
{{ result.name }}
"
                        + ""
                        + "
{{ result.summary }}
"
                    + "
"
                  + "
",
        controller: function($scope){
            var ctrl = this;
            $scope.$watch('titleQuery',function(newTitle){
                ctrl.searchresults = [];
                ctrl.titleQuery = newTitle || ''
                wikiaSearchAPI.searchFor(ctrl.titleQuery).then(function (response) {
                for (var i = 0; i < response.data[1].length; i++) {
                    ctrl.searchresults.push({
                        name: response.data[1][i],
                        summary: response.data[2][i],
                        link: response.data[3][i]
                    });
                }
            });
            }, true);
        },
        controllerAs: 'wikiaCtrl'
    };
}]);
{% endhighlight %}

#### The end result

After playing with some styling and animation (.ng-enter, .ng-enter-active) here is the end
result:

![]({{site.baseurl}}/images/wikia-search.png)

You can see it live at this [codepen](http://codepen.io/chotmat/full/MamqEd/)


text:
# Review from week 1

<!--   ![Guido van Rossum, Python creator](./guido.jpg) -->

<img src="./guido.jpg" width="30%">

1. **Good places to start learning Python include:**
    * The official [Python tutorial][python tutorial link] for a quick start guide.
    * If you're a __MATLAB__ user, the [Numpy for MATLAB users][numpy for matlab link] documentation.
    * ... and if you're a language stickler, check out the [Python style guide][pep 8 link].

2. **We recommend installing Python 3.x, as Python 2.7 is [no longer being updated][python 2 vs 3 link].**

3. **We installed a Python 3.x distribution by way of [Anaconda][anaconda link].**
    * One of the most useful aspects of Anaconda is [`conda`][conda link].
        * `conda` is an open source package manager that keeps all Python dependencies in check
        * Maybe the best part:  It doesn't require root permission to install, so you can always have a trustworthy Python installation on a remote machine
        * Check out the [conda cheatsheet][conda cheatsheet link] to get familiar with it

4. **We learned how to create a git repository.**
    * Review the materials [here](https://github.com/bairdlangenbrunner/ESS-Python-Tutorial/tree/master/materials/week1).
    * One application:  clone this repository by typing the following into your local directory of choice:

```git clone https://github.com/bairdlangenbrunner/ESS-Python-Tutorial```

5. **We opened our first [Jupyter Notebook][what is jupyter notebook link].  To do this, type `jupyter notebook` on the command line.  It will pop up in your default web browser.**
    * You can also open it using the Anaconda Navigator app that comes installed with Anaconda.  Click on the Jupyter Notebook "launch" link.
    * Finally, remember you can also run Python from a terminal by simply typing `python`, or using [Interactive Python][interactive python link] by typing `ipython` on the command line.  Quit a Python session by typing `exit()` and hitting `enter/return`.

[python tutorial link]: https://docs.python.org/3/tutorial/

[numpy for matlab link]: https://docs.scipy.org/doc/numpy-1.15.0/user/numpy-for-matlab-users.html

[pep 8 link]: https://www.python.org/dev/peps/pep-0008/

[python 2 vs 3 link]: https://wiki.python.org/moin/Python2orPython3

[anaconda link]: https://www.anaconda.com/download/

[conda link]: https://conda.io/docs/user-guide/install/download.html

[conda cheatsheet link]: https://conda.io/docs/_downloads/conda-cheatsheet.pdf

[what is jupyter notebook link]: https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/What%20is%20the%20Jupyter%20Notebook.html

[intro notebook link]: https://github.com/raspstephan/ESS-Python-Tutorial/blob/master/materials/week1/jupyter-intro.ipynb

[interactive python link]: https://ipython.org/

repository: bairdlangenbrunner/ESS-Python-Tutorial

repo_name: bairdlangenbrunner/ESS-Python-Tutorial


text:
# Yaml Lint to jUnit XML

[![PyPI version](https://badge.fury.io/py/yaml-lint-to-junit-xml.svg)](https://badge.fury.io/py/yaml-lint-to-junit-xml)

Convert yaml-lint outputs to a jUnit valid xml tests result file.

Thanks to the author of the original project [ansible-lint-to-junit-xml](https://github.com/andreferreirav2/ansible-lint-to-junit-xml)

## Quickstart

Install `ansible-lint-to-junit-xml` with pip:

    pip install yaml-lint-to-junit-xml

Or you can simply get this repo and install with setup.py

## Usage

Run `yamllint` on the desired files and pipe to `yaml-lint-to-junit-xml`

    yamllint -f parsable <file or directly> | yaml-lint-to-junit-xml > results/yaml-lint-results.xml

Alternatively you can run `yamllint` separately from `yaml-lint-to-junit-xml` and use a file to pass the output

    yamllint -f parsable <file or directly> > yaml-lint-results.txt
    yaml-lint-to-junit-xml yaml-lint-results.txt > results/yaml-lint-results.xml

> **Note:** `yamllint` must run with `-f parsable` for the output to be machine parsable

## Features

-   Pipe output directly from `yamllint` call
-   Output XML file is compliant with [jenkins junit5 Schema](https://github.com/junit-team/junit5/blob/master/platform-tests/src/test/resources/jenkins-junit.xsd/).

## Example

Running `yamllint` on a file results in:

    roles/test_role/defaults/main.yml:25:121: [warning] line too long (157 > 120 characters) (line-length)
    roles/test_role/tasks/main.yml:33:35: [error] no new line character at the end of file (new-line-at-end-of-file)
    test_playbook.yml:4:8: [warning] truthy value should be one of [False, True, false, true] (truthy)

Running `yamllint` and piping the output to `yaml-lint-to-junit-xml` looks line this:

    yamllint -f parsable test_playbook.yml | yaml-lint-to-junit-xml

Would result in:

```
<?xml version="1.0" ?>
<testsuite errors="1" name="yaml-lint" tests="1">
        <testcase name="truthy value should be one of [False, True, false, true] (truthy)">
                <failure message="test_playbook.yml:4:8: [warning] truthy value should be one of [False, True, false, true] (truthy)" type="yaml-lint">
yaml-lint exception type: warning
yaml-lint exception description: truthy value should be one of [False, True, false, true] (truthy)
filename: test_playbook.yml
line nr: 4:8
        </failure>
        </testcase>
</testsuite>
```

repository: shipilovds/yaml-lint-to-junit-xml

repo_name: shipilovds/yaml-lint-to-junit-xml


text:
`extract-repo-url`
==================
[![Crates.io][crates-io badge]][repository]
[![Linux/Mac Build Status][]][Travis CI]
[![Windows Build][]][Appveyor]

## Installation

```
cargo install extract-repo-url
```

## Basic Usage

Outputs a repository URL extracted from clipboard text.

```
$ extract-repo-url # From clipboard by default
https://github.com/foo/bar

$ extract-repo-url 'Repository https://github.com/foo/bar is awesome' # Can receive text as 1st param
https://github.com/foo/bar
```

It can also detect

- Clone URL (e.g. `git@github.com:foo/bar.git` -> `https://github.com/foo/bar`)
- File page on github (e.g. `https://foo.github.io/bar/tree/master/tests/data` -> `https://github.com/foo/bar`)
- GitHub pages (e.g. `https://foo.github.io/bar/` -> `https://github.com/foo/bar`)
- Bitbucket (e.g. `foo bar https://bitbucket.org/foo/bar` -> `https://bitbucket.org/foo/bar`)
- GitLab (e.g. `foo bar https://gitlab.com/foo/bar` -> `https://gitlab.com/foo/bar`)

You can add more hosts with `$EXTRACT_REPO_URL_SERVICE_HOSTS` environment variable.

```sh
export EXTRACT_REPO_URL_SERVICE_HOSTS="github.your-site.com, gitlab.your-site.com"
```

Please try `--help` option to see more details.

## Use-cases

With Git:

```
$ git clone `extract-repo-url`
```

With `open` command (on macOS):

```
$ open `extract-repo-url`
```

## Development

On Linux, you need to install X11 library:

```
sudo apt-get install xorg-dev
```

How to run test:

```sh
$ RUST_TEST_THREADS=1 cargo test
```

## License

[MIT](./LICENSE.txt)

[repository]: https://github.com/rhysd/extract-repo-url
[crates-io badge]: https://img.shields.io/crates/v/extract-repo-url.svg
[Linux/Mac Build Status]: https://travis-ci.org/rhysd/extract-repo-url.svg?branch=master
[Travis CI]: https://travis-ci.org/rhysd/extract-repo-url
[Windows Build]: https://ci.appveyor.com/api/projects/status/w1cue3ohnakb50qe/branch/master?svg=true
[Appveyor]: https://ci.appveyor.com/project/rhysd/extract-repo-url/branch/master

repository: iCodeIN/extract-repo-url

repo_name: iCodeIN/extract-repo-url


text:
---
layout: post
title: App with similar interface and gesture recognizers as 9GAG
---
![Geometric pattern with fading gradient](/img/9gag.gif)

This project is very fresh and will be updated.

This app is being developed for fun and to learn when I have time. Thought, I may have use for it in the future because I see it as a basis one can develop in several directions.
The navigation bar is called [BLKFlexibleHeightBar](https://github.com/bryankeller/BLKFlexibleHeightBar/)

**Language:** Swift

**Features:**

*The navigation bar can hide and show even if the app is using scrollview with x amount of tableviews inside.

*The navigation bar will show every time user changes view horizontally.

*Custom cells, not used yet though.


text:
# Deprecated
Upstream Repository is deprecated and so is this
# Arcsight Logger REST library

This is a python library to interact with the REST API that is offered on the Arcsight Logger

### Installation

Install library with pip ([You can install pip here](https://pip.pypa.io/en/stable/installing/ "Google's Homepage"))
```sh
$ pip install arcsightrest
```
Import the library
```python
import arcsightrest
```
### Different functions
#### Setting the location of the ArcSight Logger
Set the TARGET to the ip or hostname of the Arcsight logger
```python
ArcsightLogger.TARGET = 'https://IPADDRESS:9000'
```
#### Logging in
Logging in. Storing of the token is done by the library, The last
option is optional, if this is True it will ignore all SSL warnings (
if you have not imported the SSL certificate, this is default to False
```python
ArcsightLogger('USERNAME', 'PASSWORD', True)
```
#### Searching
The search function will return 2 values, first the search_id that has
been set for the search, and the HTTP content/response. You can also set start and end time, plus the other documented parameters. If you don't include the start and end time, this will default to 2 hours.
```
search(search_id, start_time=2014-05-26T21:49:46.000-07:00, end_time=2014-05-26T22:49:46.000-07:00)
```
#### Histogram
Returns data you can use to display a histogram (a column chart with no gap between columns) of the
event distribution over time of an already searched time range
```python
histogram(search_id)
```
#### Drilldown
Narrows the search results to the specified time range. For example, you can use it to narrow down the
search results to be shown in the grid when a bar of the histogram is clicked.
```python
drilldown(search_id, start_time, end_time)
```
#### Search status
There is two functions to check the search status, one function will check if the search is complete, the other will check the $

Waiting for the search to complete:
```python
wait(search_id)
```
Just checking the current status:
```python
search_complete(search_id)
```
#### Collecting the data from a search
The events function is what will return the actual events that is generated by the search, in a normal JSON format:
```python
events(search_id)
```
Custom JSON format:
```python
arcsight.events(search_id, True)
```
#### Collecting the data from a search (Raw_events)
Returns the raw events for the specified row IDs.
```python
raw_events(search_id)
```
#### Displaying chart data
Returns the data you can use to display a chart and the table under the chart. The chart_data request
also returns the results of aggregate operators like sort, tail, and head. For an example of returning the
results of aggregate operators,
```python
chart_data(search_id)
```
#### Stopping a search
There is two ways to stop the currently running search
Stop, stops the search operation but keeps the search session so that the search results can be narrowed
down later.
```python
data = arcsight.stop(search_id)
```
Close, stops the execution of the search and clears the search session data from the server.
```python
data = arcsight.close(search_id)
```
### Example script
```python
def searchfunction():
    # Define target
    arcsightrest.ArcsightLogger.TARGET = 'https://<IP_ADDRESS>:9000'
    # Logging in
    arcsight = arcsightrest.ArcsightLogger('USERNAME', 'PASSWORD', True)
    # Grabs the search_id of the search, and the response to see if the
    # search is started.
    search_id, response = arcsight.search('_deviceGroup in ["Logger Internal Event Device"]')
    print response
    # Waits for the search to complete, then checks what wait returns
    # (should be that the search is complete)
    wait = arcsight.wait(search_id)
    print wait
    # Gather the data from the started search, and prints all data returned
    data = arcsight.events(search_id)
    print data
    # Closes the search when i have the data needed, and checks the response
    close = arcsight.close(search_id)
    print close
```
### Optional Parameters.
According to the ArcSight documentation, each function also support optional parameters. These are supported for all the calls in this library, all you have to do, is add the specified fields at the end of the function call, like this:
Here search_id is the only required field (except user token, but that is handled by the library).
So if you find a specific parameter to a REST call in the ArcSight documentation, it will always work in this library.
```python
chart_data(search_id, length=NUMBER, offset=NUMBER)
```


text:
# Tile
This class describes the `ITile` interface.

### [Exported interfaces](#exported-interfaces)
 + [`ITile`](#itile)

### Exported interfaces
#### `ITile`
Represents a map tile.

#### `type: number`
The type of the tile. This corresponds to a value in the `ResourceManager.items` dictionary.

#### `id: string`
The name of the tile.

#### `sink: boolean`
Whether or not the player will sink on this tile.

#### `noWalk: boolean`
Whether or not the player can walk on this tile.

repository: Arkzzz/nrelay

repo_name: Arkzzz/nrelay


text:
# faker-provider

[![Build Status](https://travis-ci.com/localheinz/faker-provider.svg?branch=master)](https://travis-ci.com/localheinz/faker-provider)
[![codecov](https://codecov.io/gh/localheinz/faker-provider/branch/master/graph/badge.svg)](https://codecov.io/gh/localheinz/faker-provider)
[![Latest Stable Version](https://poser.pugx.org/localheinz/faker-provider/v/stable)](https://packagist.org/packages/localheinz/faker-provider)
[![Total Downloads](https://poser.pugx.org/localheinz/faker-provider/downloads)](https://packagist.org/packages/localheinz/faker-provider)

Provides additional providers for [`fzaninotto/faker`](https://github.com/fzaninotto/Faker).

## Installation

Run

```
$ composer require --dev localheinz/faker-provider
```

## Usage

:bulb: This is a great place for showing a few usage examples!

## Changelog

Please have a look at [`CHANGELOG.md`](CHANGELOG.md).

## Contributing

Please have a look at [`CONTRIBUTING.md`](.github/CONTRIBUTING.md).

## Code of Conduct

Please have a look at [`CODE_OF_CONDUCT.md`](.github/CODE_OF_CONDUCT.md).

## License

This package is licensed using the MIT License.

repository: adaamz/faker-provider

repo_name: adaamz/faker-provider


text:
---
layout: post
title: "Bootstrapping Generators from Noisy Data"
date: 2019-03-18 10:10:26
categories: arXiv_CL
tags: arXiv_CL Attention Text_Generation
author: Laura Perez-Beltrachini, Mirella Lapata
mathjax: true
---

* content
{:toc}

##### Abstract
A core step in statistical data-to-text generation concerns learning correspondences between structured data representations (e.g., facts in a database) and associated texts. In this paper we aim to bootstrap generators from large scale datasets where the data (e.g., DBPedia facts) and related texts (e.g., Wikipedia abstracts) are loosely aligned.  We use multi-instance learning to automatically discover correspondences between data and text pairs and show how these can be used to enhance the content signal while training an encoder-decoder architecture. Experimental results demonstrate that models trained with content-specific objectives improve upon a vanilla encoder-decoder which solely relies on soft attention.

##### Abstract (translated by Google)

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

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


text:
---
title: Blog on more sheets coding
layout: post
author: sam.rix
permalink: /blog-on-left-and-right-coding/
source-id: 1Ne0UNW_rluCam8WjDQyn2mO13xHS1Z-7clR9eBYE8zU
published: true
---
In this week's lesson we learnt how to code our work to be able to pick out an individual letter by using left to right code. To do it you have to put left 1 to get the first letter and the from the right how many letters there are. Then it picks out the exact letter. We also learnt how to use len. Len measures how many characters are in a word or sentence.


text:
# eco-capt
 Alyra's 2021 up and coming final project !

## Contributors

- [Hélène Bunel](https://github.com/Helene-85)
- [Édouard Vahanian](https://github.com/edvahn)
- [Daniel Villa Monteiro](https://github.com/zirgudaga)
- [Jérémy Karsenty](https://github.com/jkarsenty)

# Installation

- Install npm
- Install the Solidity Compiler version 0.8.0
- Clone the Github repository

```
cd $DEV
```

Clone the repository

```
git clone git@github.com:zirgudaga/eco-capt.git
cd eco-capt
```

- Install the npm packages for the back-end and the front-end

Install the npm packages for the back-end
```
npm install
```

Install the npm packages for the front-end
```
npm --prefix client/ install
```

# Configuration

## Environment Parameters

You will need to create a .env file in the project's root folder. It will store specific deployment parameters and your Infura project identifier.
1. Create a .env in your project folder
2. Replace the following parameters with yours:
```
MNEMONIC          = "Your_own_12_words_seed_here"
INFURA_PROJECT_ID = "Your_infura_project_id_here"
```

ℹ Keep in mind to surround each value with double quotes.

## Deploy

You need to deploy both our smart-contracts (CustomerContract.sol and LedgerContract.sol) and the ReactJS app - DApp (front-end).

## Deploy Back-End

The smart-contracts are deployed in the following order:
- LedgerContract.sol
- CustomerContract.sol

## Deploy Dev

### Local Deploy
```
npm truffle deploy --network ganache
```

## Deploy on a Test Network

### Deploy the contracts on the ropsten test network
```
npm truffle deploy --reset --network ropsten
```

Update the contract addresses in the file doc/deployed_addresses.md.

## Contracts Addresses
The file doc/deployed_addresses.md contains the address of each smart-contract deployed on the Ropsten testnet.

## Deploy Front-End

Local Deployment:
Nothing to do.

## Run

Run the local DApp:
In order to run the Front-End application on your local machine:

```
cd client
npm start
```

## Open the App

Open the local DApp: https://localhost:3000/
Open the DApp deployed on Heroku (remote): https://eco-capt-v4.herokuapp.com (to interact with the contracts deployed on a TestNet)

## Test

[This page](https://github.com/zirgudaga/eco-capt/blob/main/tests_explication.md) explains what we test and how.

Run ganache on port 7545 beforehand
```
npm truffle deploy --reset --network ganache

npm truffle test # Run the unit and integration tests
```

## Code Coverage

Runs the tests then displays a report of the smart-contracts code coverage.
```
npm run coverage
```

## Gas Report

To get a report of the gas consumed by the smart-contracts while running the tests.
```
npm run gas
```

## Decisions

The Design Pattern Decisions are explained in details here : https://github.com/zirgudaga/eco-capt/blob/main/design_pattern_desicions.md

## Project main goal

📌  This project aims at collecting industrial emissions datas through sensors and stores them on the Ethereum blockchain.
Sensors are connected to the smart contract via a bridge which turns raw data into storable information.
The objective is twofold :
- First, to provide a follow-up to the manufacturers and allow them to show the various legislators that they respect environmental standards in force.
- Then, facilitate legislator's monitoring through the use of red flags.

The data is therefore available to all, immutable.

### Service development process.

- A new customer can register a new service through a form.
- This form collects a description, a choice of measurement type, the version of the service and the frequency of recordings.
- Once a service is deployed, the foundation can designate a TechMaster.
- The TechMaster will have the role of installing the bridge, the bridge address and the the MAC addresses connected to this bridge.
- The client can set alert thresholds (form).

### Progression

CustomerContract delivered  🚀
LedgerContract delivered  🚀
Tests produced

### Visual Studio Code  🖥

### Coding languages : Solidy, ReactJS

### Framework : Truffle unbox React

### Network : Ganache, Ropsten

## Customer Contract

The smart contract defines the following events :
```
event ContractUpdate(string _message, address _author);
event ServiceUpdate(uint _serviceId, string _message, address _author);
event ServiceRulesUpdate(uint _serviceId, uint _ruleId, string _message, address _author);
event ServiceIotUpdate(uint _serviceId, bytes6 _iotId, string _message, address _author);
event MeasureReceive(uint _serviceId, bytes32 _header, bytes32 _body, address _author);
event AlertReceive(uint _serviceId, uint _ruleId, bytes32 _alert, address _author);
```

## Ledger Contract
The smart contract defines the following events :
```
event LedgerUpdate(string _message, address _target, address _author);
event TypeMeasureUpdate(string _message, bytes8 _target, address _author);
```

repository: zirgudaga/eco-capt

repo_name: zirgudaga/eco-capt


text:
# attribute_nesting

This cookbook demonstrates how to use `to\_hash` and `merge` to updated nested
Mashes in the Chef object.

## Question

We have a community application cookbook where in attributes/default.rb someone has written

```
default['blah']['config'] = {
 key => value,
 key1 => value1,
 key2 => value2,
 key3 => value3,
 key4 => value4,
 # and lots and lots more key value pairs
}
```

Then, we have a wrapper cookbook where in attributes/default.rb we'd like update just a few of those entries, e.g.:

```
default['blah']['config'] = {
 key => my_value,
 key4 => my_value4
 # and quite a few more such pairs
}
```

Which because '=' is an assignment appears to wipe out all the defaults set by the community cookbook.

Is there a better way to update those entries than writing tons of lines like the following over-and-over again?

```
default['blah']['config']['key'] = value
default['blah']['config']['key1'] = value1
default['blah']['config']['key2'] = value2
```

## Answer

The Node objects passed around for Chef attributes look like hashes but are actually 'ImmutableMashes', which are designed to be updated only through direct manipulation via Chef calls. To update a nested structure within the node object, use the `to\_hash` method to extact the portion you want, merge in your attribute changes, then update the node object, as in the following code from `attributes/default.rb`

```
my_config = default['blah']['config'].to_hash

my_config.merge!(
  {
    'key' => 'my_value',
    'key4' => 'my_value4'
  }
)

default['blah']['config'] = my_config
```

## Demonstration

Checkout this cookbook, cd into the cookbook, then run `rspec --format d` (assuming you have ChefDK installed)

repository: pburkholder/cheffian-examples

gha_language: Ruby

repo_name: pburkholder/cheffian-examples


text:
# Twitter Replica

This is a basic twitter app to view, compose, favorite, and retweet tweets.

## User Stories

- [x] User can compose a tweet.
- [x] User can favorite a tweet.
- [x] User can retweet a tweet.

## Additional User Stories

- [x] User sees app icon in home screen and styled launch screen.
- [x] User can log in.
- [x] User can log out.
- [x] User stays logged in across restarts.
- [x] User can view tweets with the user profile picture, username, and tweet text.
- [x] User can pull to refresh.
- [x] User can load past tweets infinitely.

## Video Walkthrough

Here's a walkthrough of implemented user stories:

## License

    Copyright [2019] [Jason Stephen]

    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.# tipCalculator


text:
# BusinessApi

This is a template for a Business Api as described in the [Business API template tutorial](https://docs.nexus.link/docs/business-api-template-csharp-tutorial).

It also adds some extra things here that are very common, but are not mandatory:
- Logging to Stackify
- Unit test projects

It also has example code for an invoicing capability.

repository: nexus-link/nexus-code-examples

repo_name: nexus-link/nexus-code-examples


text:
---
question: Can I quickly send an announcement to only one department or group of staff?
answer: 'Yes. You can create any groups from your Staff List two ways. First, by
  clicking the "+ Group" next to their name, typing a new group name into the
  bar showing "Choose group tags" and hitting enter key or use the drop-down to
  select an already existing group and pressing "Submit".  Second, from the
  Staff List you can check the box to the left any/all staff names you would
  like in a group then use the dropdown from the "Selected" tab that appears on
  the top right and select "Add to Group".  Once a group is created, you can
  easily select this "Group" to send Announcements too! '
isMobile: false
topics:
  - staff-management
userTypes:
  - staff
---

repository: ourlifeloop/marketing

repo_name: ourlifeloop/marketing


text:
---
title: "Firing Projectiles - Lets Make a Side Scrolling Shooter - Part 5"
aliases: [/v/7FXrK8-7sP4/]
date: 2018-07-11
featured_image: https://i.ytimg.com/vi/7FXrK8-7sP4/mqdefault.jpg
tags: [ unity3d,csharp ]

---

{{% youtube id="7FXrK8-7sP4" %}}

Time to make our ship go pew., pew! We're going to add projectiles. We'll build a set of components that can fire and build projectiles. This will include the `ProjectileMovement` class for moving projectiles forward and detecting collisions, `ProjectileTimeout` for timing out projectiles and deleting old projectiles, `TimedProjectileLauncher` which will periodically fire new projectiles and finally the `DamageDisplay` for debugging projectile collisions and damage.

## Classes

### `ProjectileMovement`

This script has two functions. It will move a projectile forward and check for collisions. If it collides with an object it sends a message to the object that was hit called `OnProjectileHit` which has information about what happened. This is a handy way to pass events around between different objects in a scene.

### `ProjctileTimeout`

This is mostly to protect against any random issues where projectiles fly off the screen and continue to exist forever. After a period of time any object with this script attached will destroy itself.

### `TimedProjectileLauncher`

The thing that does the shooting. This is a constantly shooting class which count a value up and, once a threshold is reached fire a projectile and begin counting again.

### `DamageDisplay`

The damage display is just a simple helper class that reacts to the OnProjectileHit messages that are sent by the `ProjectileMovement` class. From those messages it just generates a Debug message so we know things are working.

Pew! Pew!

Come join the World of Zero Discord channel: https://discord.gg/hU5Kq2u

repository: WorldOfZero/dotcom

repo_name: WorldOfZero/dotcom


text:
# noisy
Command line chat, with Socket.IO and Vorpal.

## Usage

First run the server:

```
node server
```

Now you can run the client:

```
node client
```

In the client type `help` to get started.

repository: bsonntag/noisy

repo_name: bsonntag/noisy


text:
---
title: Hello Storyteller - StoryMapper
description: Dedicated to create and share visual stories for collaborative community mapping and sense-making. Start a story and share your ideas.
layout: onboarding
---
# Hello Storyteller,

thanks for participating in our interactive research project, dedicated to create and share visual stories for collaborative community mapping and sense-making.

For inspiration, feel free to visit our [living map](https://padlet.com/hannevrebos/Vaartkom) to see and interact with previously generated stories.

To contribute your own story, please follow the instructions on the StoryMapper and the steps below to share it with your neighbourhood.

[Start your story](your-story.html){: .button .button--primary}


text:
---
layout: layouts/post.njk
title: Create an empty function
category: Function
---

**JavaScript version**

```js
const noop = () => {};

// Or
const noop = Function();
// calling Function() might be detected as using eval by some security tools
```


text:
# nhu

Fragment shader live coding environment.

Features:

* Edit `fragment.glsl` and see changes reflected in almost real-time
* Live-view webserver allows you to share your work with multiple viewers
* Run `nhu -gl` for a native OpenGL window if you don't like browsers

Available uniforms:

* `vec2 u_resolution` for width/height
* `float u_time` in seconds

Future ideas:

* More stuff
* Webserver with editor?

repository: Bun/nhu

repo_name: Bun/nhu


text:
# Contribute
Typically, you can contribute to this project by publishing issue or pulling request.
We have templates for those contributing actions.
If you want to check out those, read [issue template](ISSUE_TEMPLATE.md) and [pull request templates](pull_request_template.md).

## We are looking for contributor
As it is in beginning step, we are looking for contributors eagerly.
All contributors are welcome, But we are especially looking for those.

### Unit-test
We want to test whether our package properly works.
As our package deals with time, we have difficulties in making test.

### Bug-report
Our package deals with time, so we implemented concurrent programming.
As concurrent programming can have potential problems like deadlock or race condition, We cannot find out all problems without your help.

# Contact
You can get in touch with me via github in a normal situation.
However, when you want to get in touch with me privately, or the situation is urgent, email is also a good way to contact.

- email : JHParkOfficial@protonmail.com

gha_language: Go


text:
# EARS Architecture
The two major pieces of EARS are:
* Routes management: users can get/create/update/delete routes through the EARS APIs.
* Route event processing: once a route is created and running, events will flow through the route and be processed (filtered, transformed, etc)

This document shows the architectures of the two pieces.

## Route Management
![](img/architecture/RouteManagement.png)

### Middlewares
EARS currently expose route management API through REST. An API request will first enter EARS's [middleware layer](../internal/app/middlewares.go). Currently, the middleware sets up logging for the request. In the future, it may also handle request authentication, and setup tracing and metric to the request

### APIManager
A request then goes to the API manager where it is sent to a request handler using [GorillaMux](https://github.com/gorilla/mux). GorillaMux will determine which handlers to use based on the [request's HTTP method and its URL path](../internal/pkg/app/handlers_v1.go#L39-L47)

A handler will parse the request body and then send it to routingTableManager for further processing.

### RoutingTableManager
Routing table manager get/create/update/delete route(s). Because route creation is the most complex, we will focus on route creation for the rest of this section.

The routing table manager creates a route as following:
1. validate the route configuration.
2. persist the route in storageManager.
3. instantiate route plugins through pluginManager.
4. construct and run the route.
5. trigger propagation of changes to all other EARS instances (if any).

In the future, the routing table manager will also propagate any route changes to other nodes in an EARS cluster.

### StorageManager
Storage manager persist route configuration in a storage. Currently, two are impelemented:
* [In Memory Storage:](../internal/pkg/db/in_memory_route_storer.go) store routes in memory. This is only intended for testing as all routes will be deleted when the app terminates.
* [DyanmoDB Storage:](../internal/pkg/db/dynamo/dynamodb_storer.go) store routes in AWS dynamodb.

### Route
An EARS route consist of a receiver, 0 or more filters, and a sender. The [Route](../pkg/route/route.go) object wires up a receiver, a sender, and filters and starts the running of the route.

## Route event processing
![](img/architecture/EventLifeCycle.png)

Once a route is created and running, its receiver will produce events (usually through external message ingestion) and send them to the route filters for processing. Filters process (transform, filter, split, etc) events and send them to the route sender. Sender then sends out the event.

### Receiver
Receiver is an event producer. It usually receives messages from external sources (Kafka, SQS, webhook, etc), and then packages messages into events for EARS internal consumption.

Receiver should create a context for every event. It calls the provided [next function](../pkg/receiver/types.go#L50) to pass down an event. In current  implementation, the next function is the [next in plugin manager](../internal/pkg/plugin/manager.go#L196)

### Plugin Manager
The next function inside [plugin manager](../internal/pkg/plugin/manager.go) receives events from a receiver. Because a receiver can be in multiple routes, the plugin manager will look up all routes associated with the receiver. For each route, a new event is cloned from the original event, and a goroutine is created to minimize cross talks between routes sharing the same
receiver.

The plugin manager calls the [next function in route](../pkg/route/route.go#L52) to pass down an event.

### Route
The [route](../pkg/route/route.go) links up 1 or more filters using a [filter chain](../pkg/filter/chain.go). It calls the [Filter function](../pkg/filter/chain.go#L50) in filter chain.

Filter chain iterates through each filter by calling each filter's [Filter function](../pkg/filter/types.go#L59) with an event. A filter processes the event inside the Filter function before returning 0 or more processed event back to the filter chain.

After filter chain goes through its filters, the resulting event(s) are [fanOUt](../pkg/route/route.go#L76) to the sender in parallel by calling sender's [Send function](../pkg/sender/types.go#L43)

### Sender
Sender receives events from [Send function](../pkg/sender/types.go#L43) and then sends them out to downstream services (Kafka, SQS, webhook, etc)

### Event acknowledgement and error handling
One thing to note is that the signatures of event processing functions including a [next function](../pkg/receiver/types.go#L50), a [Filter function](../pkg/filter/types.go#L59), and a [Send function](../pkg/sender/types.go#L43) do not return errors. What happen when there is an error when processing an event, and how do we relay the error back to the receiver where an event originates from?

Each event has a [Ack method](../pkg/event/types.go#L45) and a [Nack method](../pkg/event/types.go#L49). When an event is finished processed, its
[Ack](../pkg/event/types.go#L45) should be called. When an error occurs when processing an event, its [Nack](../pkg/event/types.go#L49) should be called.

Receivers can listen to event acknowledgement and errors with the [WithAck option](../pkg/event/event.go#L62) when it creates an event.

repository: xmidt-org/ears

repo_name: xmidt-org/ears


text:
+++
title = "psinject"
chapter = false
weight = 103
hidden = true
+++

## Summary
Execute PowerShell commands in a remote process.

### Arguments (Positional or Popup)
#### PID
Target process ID.

#### Architecture
Target process architecture. Must be x86 or x64.

#### Command
PowerShell command to be executed.

## Usage
```
psinject [pid] [arch] [command]
```

Example
```
psinject 1234 x64 Get-Process
```

## MITRE ATT&CK Mapping

- T1059
- T1055

## Detailed Summary
The `psinject` command uses process injection into a remote process to execute PowerShell commands in the context of the target process. This method uses the agent’s current injection technique which can be viewed with [`get_current_injection_technique`](/agents/apollo/commands/get_current_injection_technique/).


text:
# Projects-from-Khan-Academy
Sample projects from Code Fellows prework using Khan Academy
November - December 2017

# Overview
Sample projects include several animations and click or mouse events in JavaScript as well as some HTML. Here is the list:

  * Growing flowers: *click the background to make flowers grow*
    https://www.khanacademy.org/computer-programming/spin-off-of-challenge-flower-grower/5711966491836416
  * Making rain: *random colors of raindrops fall with ability to make new raindrops with mouse click*
    https://www.khanacademy.org/computer-programming/spin-off-of-project-make-it-rain/4929766896893952
  * Magic 8 ball: *ask your question and click the eight ball to get one of several answers from an array*
    https://www.khanacademy.org/computer-programming/spin-off-of-project-magic-8-ball/5642904007016448
  * Tasty tomato: *use your mouse to eat the tomato*
    https://www.khanacademy.org/computer-programming/spin-off-of-challenge-tasty-tomato/4558107532787712
  * Travel China: *basic html page with advice from me about traveling in China, using HTML for styling*
    https://www.khanacademy.org/computer-programming/project-travel-webpage/4873082441760768

# Credits
These projects were made with help from
*  Khan Academy platform, based on their lessons and code samples
*  StackOverflow for examples and answers to questions
*  W3 Schools website and examples

*For questions about these projects, please contact me at my consulting firm Favored Fortune: https://www.favoredfortune.com

repository: MavenOfCode/Projects-from-Khan-Academy

repo_name: MavenOfCode/Projects-from-Khan-Academy


text:
---
title: "Data fusion and mining in SPHERE"
collection: talks
type: "Invited talk"
permalink: /talks/2014-04-04-meetup
venue: "South West Data Meetup"
date: 2017-04-04
location: "Pervasive Media Studio, The Watershed, Bristol"
---

[More information here](https://www.meetup.com/south-west-data/events/238629345/)

[Slides here](https://www.slideshare.net/SouthWestData/data-fusion-and-mining-in-sphere-challenges-opportunities-for-machine-learning).

This talk will focus on the Data Science and Machine Learning challenges and opportunities of SPHERE. Tom will discuss the implications for such an eHealth system in terms of the quantification and management of uncertainty for automated decision making in health care, gathering the necessary data to train Machine Learning models, and the importance of calibration in such systems, particularly in light of the differing operational contexts that will be encountered.

Due to well-known demographic challenges, traditional regimes of health-care are in need of re-examination. Many countries are experiencing the effects of an ageing population, which coupled with a rise in chronic health conditions is expediting a shift towards the management of a wide variety of health related issues in the home. In this context, advances in Ambient Assisted Living are providing resources to improve the experience of patients, as well as informing necessary interventions from relatives, carers and health-care professionals.

SPHERE has developed a number of different sensors that will combine to build a picture of how we live in our homes. This information can then be used to spot issues that might indicate a medical or well-being problem. The technology could help in the following ways:

* Characterise the sedentary behaviour that is linked to so many conditions.
* Detect correlations between factors such as diet and sleep.
* Measure changes in movement, posture and patterns of movement over months.
* Analyse eating behaviour - including whether people are taking prescribed medication.
* Detect periods of depression or anxiety and intervene using a computer based therapy.
* Predict falls and detect strokes so that help may be summoned.


text:
![Python versions](https://img.shields.io/badge/Python-version-blue) ![](https://img.shields.io/badge/3.6%2C%203.7%2C%203.8%2C%203.9-blue.svg)

OnJoin
===========

Send a random notice to a user entering a channel.

Configuring:
===========

* Enable in channel(s):

* `config channel #channel plugins.onjoin.enable True or False` (On or Off)

Setting up:
==========

** No setting up required.

repository: Alcheri/Plugins

repo_name: Alcheri/Plugins


text:
---
title: How to detect DOM manipulations (with jQuery)
author: Damien
layout: post
comments: true
permalink: /2012/08/20/how-to-detect-dom-manipulations-with-jquery/
geo_latitude:
  - 47.557421
geo_longitude:
  - 7.592572700000005
geo_address:
  - Basel, Basel-Stadt, Switzerland
geo_enabled:
  - 1
geo_public:
  - 1
categories:
  - Javascript
tags:
  - JQuery
  - Plugin
---
Detecting any changes in the current DOM is not an easy task even though some current browsers support to listen to mutation events. These mutation events got recently deprecated in favor of DOM Mutation Observers and for a good reason. Mutation events cause performance issues and lacking of cross browser support. The mutation events look promising but specification is still a draft and I guess that it would take a while until they are fully supported on all major browsers.

If you still need to detect changes like me and you are using jQuery (or any other library) to do your manipulation you can use this gist to hook into your library to detect changes. Instead of detecting changes on the DOM we just detect manipulating function calls. This plugin injects a function call after a jQuery function was called. The configuration is fairly easy. jQuery.hook(‘append’, myFunc) would call myFunc after jQuery.append was called.

{% codeblock lang:js %}
/*
 * Function hook jQuery plugin
 * version 1.0
 * author: Damien Antipa
 * http://github.com/dantipa/
 */
(function(window, $, undefined){

    /**
     * Hooks into a given method
     *
     * @param method
     * @param fn
     */
    $.fn.hook = function (method, fn) {
        var def = $.fn[method];

        if (def) {
            $.fn[method] = function() {
                var r = def.apply(this, arguments); //original method
                fn(this, method, arguments); //injected method
                return r;
            }
        }
    }

})(window, jQuery);
{% endcodeblock %}

repository: visiongeist/blog

repo_name: visiongeist/blog


text:
---
layout: post
current: post
navigation: True
class: post-template
author: vishnu
title: This day that year
cover: /assets/img/blog-cover.jpg
tag: that day this year,this day,facts,about today

---
# Facts and Events (29 September):

![Fact](/assets/img/blog/fact.jpg)

### 1994 Sinking of MS Estonia
MS Estonia, a passenger and car ferry, sank in the Baltic Sea killing more than 800 passengers. It is considered to be the worst maritime peace-time disaster of the 20th century.

### 1991 Coup in Haiti
President Jean-Bertrand Aristide was deposed in a military coup. Aristide had been elected in a national election held 8 months before the coup.

### 1972 First Canadian Satellite
Canada launched its first ever satellite, Alouette 1, on this day from the Vandenberg Air Force Base in California, United States. A joint venture between NASA and Defence Research and Development Canada, the satellite was sent to study the Earth's ionosphere.

### 1954 CERN established
The European Organization for Nuclear Research, popularly known as CERN, was established by 12 European governments.

### 1941 Babi Yar massacre
About 33,000 Soviet Jews were killed at the Babi Yar ravine in Kiev by the Nazis in a two-day massacre that started on this day.
---
![Bday](/assets/img/blog/bday.jpg)

# Births On This Day
* 1961 Julia Gillard
*Australian politician, 27th Prime Minister of Australia*

* 1951 Michelle Bachelet
*Chilean politician, 34th President of Chile*

* 1936 Silvio Berlusconi
*Italian politician, 50th Prime Minister of Italy*

* 1901 Enrico Fermi
*Italian physicist, Nobel Prize laureate*

* 1511 Michael Servetus
*Spanish theologian, physician, cartographer*

---
![Rip](/assets/img/blog/rip.jpg)

# Deaths On This Day

* 2009 Pavel Popovich
*Soviet astronaut*

* 1997 Roy Lichtenstein
*American painter, sculptor*

* 1981 Bill Shankly
*Scottish footballer, manager*

* 1973 W. H. Auden
*English/American poet*

* 1902 Émile Zola
*French author, critic*
---


text:
# Arrays
An [array](https://en.wikipedia.org/wiki/Array_data_structure) is a linear collection of data elements occupying a contiguous block of memory.

## Characteristics
Arrays have two key characteristics:
1. They have a fixed size, once created they cannot grow in size
1. They can be randomly accessed, the indexer indicating the _offset_ from the beginning of the allocated block of memory

### Complexity
🔔 Complexity is considered in terms of worst case.

#### Time complexity
|Insertion |Removal |Retrieval |Notes
|- |- |- |-
|Θ(n) |Θ(n) |Θ(1) |

#### Space complexity
TODO

### How do dynamic arrays work?
A dynamic array wraps a real array, abstracting the re-allocation of contiguous memory.

When the underyling array reaches capacity, a larger block of memory is allocated and the original array is copied over.

license: ISC

gha_language: TypeScript

gha_license_id: ISC


text:
> [Go to French version](/fr/Règlements/Décrets,%20ordonnances%20et%20règlements%20statutaires/86/895.md)

# Regulations Respecting the Telecommunication Programming Services Tax

**SOR/86-895**

Enabling authorities:
- [EXCISE TAX ACT](/en/Acts/Revised%20Statutes%20of%20Canada/E/E-15.md)

Date registered: 19 August 1986

----------

The Minister of National Revenue, pursuant to subsection 50(2.1)[*] of the [Excise Tax Act](/en/Acts/Revised%20Statutes%20of%20Canada/E/E-15.md), hereby makes the annexed Regulations respecting the telecommunication programming services tax.

*: S.C. 1986, c. 9, s. 35

Ottawa, August 18, 1986

E. M. MACKAY
*Minister of National Revenue*

## Short Title

**1** These Regulations may be cited as the Telecommunication Programming Services Tax Regulations.

## Interpretation

**2** In these Regulations,

***Act*** means the [Excise Tax Act](/en/Acts/Revised%20Statutes%20of%20Canada/E/E-15.md); (*Loi*)

***licence*** means a telecommunication programming services licence issued under section 19.18 of the Act; (*licence*)

***licensee*** means any person to whom a licence has been issued; (*détenteur de licence*)

***Minister*** means the Minister of National Revenue; (*ministre*)

***tax*** means the telecommunication programming services tax imposed by section 19.12 of the Act. (*taxe*)

## Returns and Payment of Tax

**3**

- **(1)** Subject to subsections (2), (3) and (4), every person who is required pursuant to the Act to pay tax shall, each month, make a return showing the total amount charged for taxable services during the period to which the return relates and the amount of tax payable.

- **(2)** Any person referred to in subsection (1) may make the return in the form prescribed pursuant to subsection 50(1) of the Act in respect of any accounting period of not less than 21 days and not more than 35 days if a corresponding accounting period is maintained and prior written authorization is granted by the Minister.

- **(3)** Any person referred to in subsection (1) may, in the form prescribed pursuant to subsection 50(1) of the Act, make the return on a quarterly basis for the calendar quarters ending March, June, September and December if
	- **(a)** the total tax payable in the last calendar year was not more than $2,400 or would not have been more than $2,400 had the provision for the tax been in force during that year;
	- **(b)** the Minister has received written notification of the person’s intention to make a return in accordance with this subsection; and
	- **(c)** the notice of intention referred to in paragraph (b) is received by the Minister not later than the last day of the first month in the calendar quarter to which the first return relates.

- **(4)** Any person referred to in subsection (1) may, in the form prescribed pursuant to subsection 50(1) of the Act, make the return on a semi-annual basis for the calendar halves ending June and December if
	- **(a)** the total tax payable in the last calendar year was nil or would have been nil had the provision for the tax been in force during that year;
	- **(b)** the Minister has received written notification of the person’s intention to make a return in accordance with this subsection; and
	- **(c)** the notice of intention referred to in paragraph (b) is received by the Minister not later than the last day of the first month in the calendar half to which the first return relates.

- **(5)** The Minister may withdraw the authorization granted for making a return pursuant to subsections (2), (3) or (4) where
	- **(a)** a return is not made within the time prescribed for the making thereof; or
	- **(b)** the tax is not paid within the time prescribed for payment.

- **(6)** A declaration on the return in the form prescribed pursuant to section 50(1) of the Act, certifying that the information entered on the form is true, correct and complete, shall be signed
	- **(a)** in the case of a sole proprietorship, by the proprietor;
	- **(b)** in the case of a partnership, by any one or more of the partners; and
	- **(c)** in the case of a body corporate, by the president, vice-president, secretary, secretary-treasurer or manager or by any other person authorized to sign the form.

- **(7)** All returns are to be sent to the Regional Chief, Excise Collections/Compliance, for the region in which the licence was issued.

repository: TravisMadill/CanadianLaws

path: /en/Regulations/Statutory Orders and Regulations/86/895.md

repo_name: TravisMadill/CanadianLaws


text:
# Brander
CLI tool for your white-label needs

We created Brander to provide a fast environment to replace, change and add files to brand our while label mobile apps. In the end, Brander can be used to brand any kind project.

## Usage

Create a file inside a folder named ```brander.json``` with content like the sample:

```json
{
  "variables": {
    "greetingMessage": "hello earth!",
    "dateFormat": "MM-dd-yy"
  },
  "templates": [
    {
      "source": "Constants.txt",
      "target": "../Constants.cs"
    }
  ],
  "replace": [
    {
        "source": "ASCIIImage.txt",
        "target": "../ASCIIImage.txt"
    },
    {
        "source": "BrandedFolder",
        "target": "../SampleFolder"
    }
  ]
}
```
Where the variables a going to be replaced in the template files. The template is something like:

```csharp
namespace Brander.Sample
{
    public static class Constants
    {
        public const string GreetingMessage = "{{greetingMessage}}";
        public const string DateFormat = "{{dateFormat}}";
    }
}
```
Note the variables names inside {{variableName}}

The replace group will replace single files or folders and files inside.

Then we can call our Brander with brander.json path

```sh
./Brander branderFolder/brander.json
```

Whe can provide only the folder name, if the ```brander.json``` file is inside that folder.

```sh
./Brander branderFolder/brander.json
```

If your branding is hosted remotely, we can pass an url to a zip file, with a ```brander.json``` file and content inside that zip and set the destination path to unzip and brand:

```sh
./Brander https://example.com/branding.zip pathToUnzipBranding/
```

repository: ptjuanramos/Brander

repo_name: ptjuanramos/Brander


text:
Sublime C Improved
================

This package provides better support of C/C++/Objective-C languages in Sublime Text.

It is **not** a self-sustained package, but only an addition to the standard *C++* package supplied with Sublime Text.

Installation
---
### Package Control
With [Package Control](https://sublime.wbond.net/installation) installed:
 - Open Command Palette (ctrl + shift + P or ⌘ + ⇧ + P)
 - Select *Package Control: Install Package* (`pkginst`)
 - Search for ***C Improved*** (`cimp`) package and install it

### Manual
Locate Sublime Text `Packages` directory (*Preferences → Browse Packages...*)
and clone this repository there:

    git clone https://github.com/abusalimov/SublimeCImproved.git "C Improved"

Usage
---

Once installed *C Improved* will be used instead of the standard *C* syntax when opening `.c` and `.h` files, unless you have forcibly bound these extensions to something else.
In the latter case you can rebind them to be handled by *C Improved* through *View → Syntax → Open all with current extension as… → C Improved*.

Other languages derived from C (like C++ and Objective C) don't need their syntaxes to be changed to something special:
they usually extend `source.c` under the hood, which is now provided by *C Improved* syntax.

Issues addressed
---

### Function calls inside macros
In the following example ST recognizes `check_range(...)` inside a macro as a function definition though it is actually a function call.
This leads to incorrect highlighting (green instead of blue) and also adds a bogus symbol into a symbol list.
Moreover a function declaration which follows the macro (`int irq_attach(...)`) is not recognized at all.

Standard C | C Improved
---------- | ----------
![Standard C macro symbols](http://habrastorage.org/storage3/9ab/a6c/99c/9aba6c99c480b90e7cfb1a841f550787.png) | ![C Improved macro symbols](http://habrastorage.org/storage3/46a/476/c85/46a476c85af7ff8feb6395d4dfdb96ba.png)

### Macro scope and parameters highlighting
Macros (as well as all other preprocessor directives) provide a *scope* now (`meta.preprocessor`), which means that you can select a whole macro with ctrl + shift + space or ⌘ + ⇧ + space.
Highlighting of macro parameters (including variable arguments) is added also with handling of some related syntax errors.

Standard C | C Improved
---------- | ----------
![Standard C macro parameters](http://habrastorage.org/storage3/1f8/118/fda/1f8118fda926989ac597a36ab0466473.png) | ![C Improved macro parameters](http://habrastorage.org/storage3/f31/11a/004/f3111a004bb12c613e909eb16886f101.png)

### Linux kernel support macros
If you use ST for Linux kernel development, then you will probably find this fix rather useful.
It adds a special handling of some common macros widely used across the kernel source code, like `EXPORT_SYMBOL`, `LIST_HEAD` or `DEFINE_XXX`,
which would otherwise be recognized as functions thus polluting a symbol index and an outline.

Standard C | C Improved
---------- | ----------
![Standard C macro parameters](http://habrastorage.org/storage3/c7b/b01/316/c7bb01316e29e0994ec32aa212911a37.png) | ![C Improved macro parameters](http://habrastorage.org/storage3/024/daa/2ac/024daa2acbc19b9d6060faf59b23d12b.png)

### Customizable indexing of types/functions/macros
You can adjust which symbols are available for navigation and visible in a symbol index or in an outline.

The following scopes and default preferences are provided:

Scope name | Description | Outline
ctrl+R | Index (ST3 only)
ctrl+shift+R, F12
---------- | ----------- | ---------------------------------------- | -----
`entity.name.type`                 | type definition (e.g. `struct`)         | visible | visible
`entity.name.type.declaration`     | forward declaration of a type           | visible | **hidden**
`entity.name.type.typedef`         | type alias (`typedef`)                  | visible | visible
`entity.name.function`             | function definition                     | visible | visible
`entity.name.function.declaration` | function declaration                    | visible | **hidden**
`entity.name.function.macro`       | function-like macro                     | visible | visible
`entity.name.variable.macro`       | object-like macro                       | visible | visible

These settings can be changed through `.tmPreferences` files, see `Packages/C Improved/Symbol Index (*).tmPreferences`.

Dropped features
----------------

### `#if 1 ... #else` conditionals
The standard syntax highlights recognizes `#else` part after `#if 1` conditional as a comment. This is a really nice feature, however it is rather fragile and has many issues, e.g. with unterminated blocks (opening/closing brace inside a preprocessor conditional).
So for sake of simplicity it was decided to remove it at all, leaving only a plain `#if 0` handling, which is more or less stable and has pretty straightforward implementation.

You may however checkout a [preprocessor-cond-scopes](https://github.com/abusalimov/SublimeCImproved/tree/preprocessor-cond-scopes) branch which doesn't have this limitation.

repository: teh-cmc/deadzone

repo_name: teh-cmc/deadzone