text:
+++
title = "5c: Compiler Backend & Prettyprinter"
weight = 45
template = "doc.html"
+++

## `++ut`

Hoon compiler backend

#### Source

This core is too large to include here, refer to `hoon.hoon` for the source.

---

## `++us`

Pretty-printer backend

#### Source

This core is too large to include here, refer to `hoon.hoon` for the source.

---

## `++cain`

Tank pretty-print

Pretty-print a `vase` as a `tank` using `++deal`. This is the same as
[`++sell`](#sell).

#### Accepts

A `vase`.

#### Produces

A `tank`.

#### Source

```hoon
++  cain  sell
```

#### Examples

```
> (cain !>(['foo' 'bar']))
[%rose p=[p=" " q="[" r="]"] q=~[[%leaf p="'foo'"] [%leaf p="'bar'"]]]
```

---

## `++noah`

Tape pretty-print

Pretty-print a `vase` as a `tape`. This is the same as [`++text`](#text).

#### Accepts

A `vase`.

#### Produces

A `tape`.

#### Source

```hoon
++  noah  text
```

#### Examples

```
> (noah !>(['foo' 'bar']))
"['foo' 'bar']"
```

---

## `++onan`

Vise to vase

Convert a `vise` (old `vase`) to the new `vase`. This is the same as
[`++seer`](#seer).

#### Accepts

A `vise`.

#### Produces

A `vase`.

#### Source

```hoon
++  onan  seer
```

#### Examples

```
> (onan `vise`!>(['foo' 'bar']))
[#t/[@t @t] q=[7.303.014 7.496.034]]
```

---

## `++levi`

Type nests or crash

Check if type `b` nests under type `a`. Produces `%.y` if it nests and crashes
if it does not.

#### Accepts

`a` is a `type`.

`b` is a `type`.

#### Produces

A `?`.

#### Source

```hoon
++  levi
  |=  [a=type b=type]
  (~(nest ut a) & b)
```

#### Examples

```
> (levi -:!>('foo') -:!>(%foo))
%.y

> (levi -:!>(%foo) -:!>('foo'))
-need.%foo
-have.@t
nest-fail
```

---

## `++text`

Tape pretty-print

Pretty print vase `vax` as a `tape`.

#### Accepts

`vax` is a `vase`.

#### Produces

A `tape`.

#### Source

```hoon
++  text
  |=  vax=vase  ^-  tape
  ~(ram re (sell vax))
```

#### Examples

```
> (text !>(['foo' 'bar']))
"['foo' 'bar']"
```

---

## `++seem`

Promote typo

Convert `typo` (old type) to the new `type`.

#### Accepts

`toy` is a `typo`.

#### Produces

A `type`.

#### Source

```hoon
++  seem  |=(toy=typo `type`toy)
```

#### Examples

```
> (seem -:!>('foo'))
#t/@t
```

---

## `++seer`

Promote vise

Convert a `vise` (old `vase`) to the new `vase`.

#### Accepts

`vix` is a `vise`.

#### Produces

A `vase`.

#### Source

```hoon
++  seer  |=(vix=vise `vase`vix)
```

#### Examples

```
> (seer !>('foo'))
[#t/@t q=7.303.014]
```

---

## `++sell`

Pretty-print vase to a tank

Pretty-print vase `vax` to a `tank` using `++deal:us`.

#### Accepts

`vax` is a `vase`.

#### Produces

A `tank`.

#### Source

```hoon
++  sell
  ~/  %sell
  |=  vax=vase
  ^-  tank
  ~|  %sell
  (~(deal us p.vax) q.vax)
```

#### Examples

```
> (sell !>(['foo' 'bar']))
[%rose p=[p=" " q="[" r="]"] q=~[[%leaf p="'foo'"] [%leaf p="'bar'"]]]
```

---

## `++skol`

Pretty-print type to tank

Pretty-print type `typ` to a `tank` using `++duck:ut`.

#### Accepts

`typ` is a `type`.

#### Produces

A `tank`.

#### Source

```hoon
++  skol
  |=  typ=type
  ^-  tank
  ~(duck ut typ)
```

#### Examples

```
> (skol -:!>(['foo' 'bar']))
[%rose p=[p=" " q="[" r="]"] q=~[[%leaf p="@t"] [%leaf p="@t"]]]
```

---

## `++slam`

Slam a gate

Slam `gat`, a gate in a `vase`, with `sam`, a sample in a `vase`. Produces a
`vase` containing the result.

#### Accepts

`gat` is a gate in a `vase`.

`sam` is a noun in a `vase`.

#### Produces

A `vase`.

#### Source

```hoon
++  slam
  |=  [gat=vase sam=vase]  ^-  vase
  =+  :-  ^=  typ  ^-  type
          [%cell p.gat p.sam]
      ^=  gen  ^-  hoon
      [%cnsg [%$ ~] [%$ 2] [%$ 3] ~]
  =+  gun=(~(mint ut typ) %noun gen)
  [p.gun (slum q.gat q.sam)]
```

#### Examples

```
> (slam !>(|=([a=@ud b=@ud] [b a])) !>([1 2]))
[#t/[@ud @ud] q=[2 1]]
```

---

## `++slab`

Test if contains

States whether you can access named wing `cog` in type `typ` using access method `way`.

#### Accepts

`way` is a `?(%read %rite %both)` (A `$vial` without `%free`). This represents
the access method (read, write, or both read and write).

`cog` is a `@tas`, the name of a wing.

`typ` is a `type`.

#### Produces

A `?`.

#### Source

```hoon
++  slab
  |=  [way=?(%read %rite %both) cog=@tas typ=type]
  ?=  [%& *]
  (~(fond ut typ) way ~[cog])
```

```
> =au |=(a=@ +(a))
> (slab %read %a -:!>(au))
%.y
> (slab %rite %a -:!>(au))
%.y
> (slab %both %a -:!>(au))
%.y

> (slab %both %blah -:!>(au))
%.n

> =fe ^|(|=(a=@ +(a)))
> (slab %read %a -:!>(fe))
%.n
> (slab %rite %a -:!>(fe))
%.y
> (slab %both %a -:!>(fe))
%.n
```

---

## `++slap`

Untyped vase `.*`

Compile hoon `gen` with subject `vax` using `.*`, producing a `vase` of the
result.

#### Accepts

`vax` is a noun in a `vase`, and is the subject.

`gen` is some `hoon`.

#### Produces

A `vase`.

#### Source

```hoon
++  slap
  |=  [vax=vase gen=hoon]  ^-  vase
  =+  gun=(~(mint ut p.vax) %noun gen)
  [p.gun .*(q.vax q.gun)]
```

#### Examples

```
> (slap !>(b='foo') (ream '|=(a=@t [a b])'))
[#t/<1.qgm [a=@t b=@t]> q=[[[0 6] 0 7] 0 7.303.014]]

> !<($-(@t [@t @t]) (slap !>(b='foo') (ream '|=(a=@t [a b])')))
<1|xpg [@t @t @t @t]>

> (!<($-(@t [@t @t]) (slap !>(b='foo') (ream '|=(a=@t [a b])'))) 'bar')
['bar' 'foo']
```

---

## `++slog`

Deify printf

Prints stack trace `a` if the stack trace isn't null, then produces the other
input. `+slog` first takes `a`, producing a gate. The gate then takes some hoon.

#### Accepts

`a` is a `tang`, and is the sample of `+slog`.

`(slog a)` takes some `hoon`.

#### Produces

The result of the hoon given to `(slog a)`, with `a` printed to the terminal.

#### Source

```hoon
++  slog
  =|  pri=@
  |=  a=tang  ^+  same
  ?~(a same ~>(%slog.[pri i.a] $(a t.a)))
```

#### Examples

```
foo
> ((slog leaf+"foo" ~) (add 1 1))
2
```

#### Discussion

`slog` is intended to be put in the middle of a bunch of chained function
calls that string a piece of data through them, so that an error message will be
printed if there's one to print.

---

## `++mean`

Crash and printf

Ends the program and prints `a`, a tracing error message.

#### Accepts

`a` is a `tang`.

#### Produces

A crash, with `a` printed to the terminal.

#### Source

```hoon
++  mean
  |=  a=tang
  ^+  !!
  ?~  a  !!
  ~_(i.a $(a t.a))
```

#### Examples

```
> (mean leaf+"foo" ~)
foo
dojo: hoon expression failed
```

---

## `++road`

Evaluate trap

Evaluate a `trap`, producing the result if successful or else
crashing with a trace.

#### Accepts

A `trap`.

#### Produces

A noun.

#### Source

```hoon
++  road
  |*  =(trap *)
  ^+  $:trap
  =/  res  (mule trap)
  ?-  -.res
    %&  p.res
    %|  (mean p.res)
  ==
```

#### Examples

```
> (road |.("foo"))
"foo"

> (road |.(~|('crash!' !!)))
'crash!'
dojo: hoon expression failed
```

---

## `++slew`

Get axis in vase

Get axis `axe` in vase `vax`, producing the resulting `vase` in a `unit` which is null if
the axis cannot be retrieved.

#### Accepts

`axe` is an atom.

`vax` is a `vase`.

#### Produces

A `(unit vase)`.

#### Source

```hoon
++  slew
  |=  [axe=@ vax=vase]  ^-  (unit vase)
  ?.  |-  ^-  ?
      ?:  =(1 axe)  &
      ?.  ?=(^ q.vax)  |
      $(axe (mas axe), q.vax .*(q.vax [0 (cap axe)]))
    ~
  `[(~(peek ut p.vax) %free axe) .*(q.vax [0 axe])]
```

#### Examples

```
> (slew 3 !>(['foo' 'bar']))
[~ [#t/@t q=7.496.034]]

> !<(@t (need (slew 3 !>(['foo' 'bar']))))
'bar'

> (slew 7 !>(['foo' 'bar']))
~
```

---

## `++slim`

Identical to `++seer`

Convert a `vise` (old `vase`) to a `vase`. Identical to [`++seer`](#seer).

#### Accepts

`old` is a `vise`.

#### Produces

A `vase`.

#### Source

```hoon
++  slim
  |=  old=vise  ^-  vase
  old
```

#### Examples

```
> (slim !>('foo'))
[#t/@t q=7.303.014]
```

---

## `++slit`

Type of slam

The `type` produced if a gate of type `gat` were slammed with a sample of type `sam`.

#### Accepts

`gat` is a `type`.

`sam` is a `type`.

#### Produces

A `type`.

#### Source

```hoon
++  slit
  |=  [gat=type sam=type]
  ?>  (~(nest ut (~(peek ut gat) %free 6)) & sam)
  (~(play ut [%cell gat sam]) [%cnsg [%$ ~] [%$ 2] [%$ 3] ~])
```

#### Examples

```
> (slit -:!>(|*(a=@ [a a])) -:!>(42))
#t/[@ud @ud]

> (slit -:!>(|*(a=@ [a a])) -:!>('foo'))
#t/[@t @t]
```

---

## `++slob`

Superficial arm

#### Source

```hoon
++  slob
  |=  [cog=@tas typ=type]
  ^-  ?
  ?+  typ  |
      [%hold *]  $(typ ~(repo ut typ))
      [%hint *]  $(typ ~(repo ut typ))
      [%core *]
    |-  ^-  ?
    ?~  q.r.q.typ  |
    ?|  (~(has by q.q.n.q.r.q.typ) cog)
        $(q.r.q.typ l.q.r.q.typ)
        $(q.r.q.typ r.q.r.q.typ)
    ==
  ==
```

---

## `++sloe`

Get arms in core

Produces a list of the arms in a core of type `typ`.

#### Accepts

`typ` is a type.

#### Produces

A `(list term)`.

#### Source

```hoon
++  sloe
  |=  typ=type
  ^-  (list term)
  ?+    typ  ~
      [%hold *]  $(typ ~(repo ut typ))
      [%hint *]  $(typ ~(repo ut typ))
      [%core *]
    %-  zing
    %+  turn  ~(tap by q.r.q.typ)
      |=  [* b=tome]
    %+  turn  ~(tap by q.b)
      |=  [a=term *]
    a
  ==
```

#### Examples

```
> (sloe -:!>(|=(@ 1)))
~[%$]

> =cr |%
      ++  foo  1
      ++  bar  2
      ++  baz  3
      --

> (sloe -:!>(cr))
~[%foo %baz %bar]

> (sloe -:!>(42))
~
```

---

## `++slop`

Cons two vases

Produce the vase of a cell of vases `hed` and `tal`.

#### Accepts

`hed` is a `vase`.

`tal` is a `vase`.

#### Produces

A `vase`.

#### Source

```hoon
++  slop
  |=  [hed=vase tal=vase]
  ^-  vase
  [[%cell p.hed p.tal] [q.hed q.tal]]
```

#### Examples

```
> (slop !>('foo') !>(42))
[#t/[@t @ud] q=[7.303.014 42]]

> !<([@t @ud] (slop !>('foo') !>(42)))
['foo' 42]
```

---

## `++slot`

Got axis in vase

Get axis `axe` in vase `vax`, returning it in a `vase`. Crashes if the axis
cannot be retrieved.

#### Accepts

`axe` is an atom.

`vax` is a `vase`.

#### Produces

A `vase`.

#### Source

```hoon
++  slot
  |=  [axe=@ vax=vase]  ^-  vase
  [(~(peek ut p.vax) %free axe) .*(q.vax [0 axe])]
```

#### Examples

```
> (slot 3 !>(['foo' 'bar']))
[#t/@t q=7.496.034]

> !<(@t (slot 3 !>(['foo' 'bar'])))
'bar'

> (slot 7 !>(['foo' 'bar']))
dojo: hoon expression failed
```

---

## `++slym`

Slam without sample-type

Slam `gat`, a gate in a `vase`, with `sam`, a `noun`. The type of `sam` is
ignored and the type of the resulting vase is determined by the gate alone.

#### Accepts

`gat` is a `vase`.

`sam` is a noun.

#### Produces

A `vase`.

#### Source

```hoon
++  slym
  |=  [gat=vase sam=*]  ^-  vase
  (slap gat(+<.q sam) [%limb %$])
```

#### Examples

```
> (slym !>(|*(a=@ux [a a])) 'foo')
[#t/[@ux @ux] q=[7.303.014 7.303.014]]

> (slym !>(|*(a=@ux [a a])) "foobar")
[#t/[@ux @ux] q=[[102 111 111 98 97 114 0] 102 111 111 98 97 114 0]]
```

---

## `++sped`

Reconstruct type

#### Source

```hoon
++  sped
  |=  vax=vase
  ^-  vase
  :_  q.vax
  ?@  q.vax  (~(fuse ut p.vax) [%atom %$ ~])
  ?@  -.q.vax
    ^=  typ
    %-  ~(play ut p.vax)
    [%wtgr [%wtts [%leaf %tas -.q.vax] [%& 2]~] [%$ 1]]
  (~(fuse ut p.vax) [%cell %noun %noun])
```

---

## `++swat`

Deferred `++slap`

This is the same as [`++slap`](#slap) except `tap` is the subject `vase`
encapsulated in a `trap`, and a `(trap vase)` is produced.

#### Accepts

`tap` is a `(trap vase)`.

`gen` is `hoon`.

#### Produces

A `(trap vase)`.

#### Source

```hoon
++  swat
  |=  [tap=(trap vase) gen=hoon]
  ^-  (trap vase)
  =/  gun  (~(mint ut p:$:tap) %noun gen)
  |.  ~+
  [p.gun .*(q:$:tap q.gun)]
```

#### Examples

```
> %.  10
  !<  $-(@ @)
  %-  road
  %+  swat
    |.(!>(add-42=(cury add 42)))
  (ream '|=(a=@ (add-42 a))')
52
```

---


text:
# Lab 5: Binary Counter

GitHub link to my Digital-Electronics-1 repository

https://github.com/JiriKlimes99/Digital_Electronics_1.git

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

## Task 1 (Pre-Task)

Connection of push buttons on Nexys A7 Board (Top left section of picture)

![LastPicture](Images/BUTTONS.png)

As stated in the manual for Nexys A7, the pushbuttons generate a low output when they are at rest, and high output only when they are pressed.

Table with calculated values

   | **Time interval** | **Number of clk periods** | **Number of clk periods in hex** | **Number of clk periods in binary** |
   | :-: | :-: | :-: | :-: |
   | 2 ms | 200 000 | `x"3_0d40"` | `b"0011_0000_1101_0100_0000"` |
   | 4 ms | 400 000 | `x"6_1A80"` | `b"0110_0001_1010_1000_0000"` |
   | 10 ms | 1 000 000 | `x"F_4240"` | `b"1111_0100_0010_0100_0000"` |
   | 250 ms | 25 000 000 | `x"17D7_84"0` | `b"0001_0111_1101_0111_1000_0100_0000"` |
   | 500 ms | 50 000 000 | `x"2FA_F080"` | `b"0010_1111_1010_1111_0000_1000_0000"` |
   | 1 sec | 100 000 000 | `x"5F5_E100"` | `b"0101_1111_0101_1110_0001_0000_0000"` |

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

## Task 2 - Bidirectional counter

Listing of VHDL code of the process p_cnt_up_down

```vhdl

p_cnt_up_down : process(clk)
    begin
        if rising_edge(clk) then

            if (reset = '1') then               -- Synchronous reset
                s_cnt_local <= (others => '0'); -- Clear all bits

            elsif (en_i = '1') then       -- Test if counter is enabled

                -- TEST COUNTER DIRECTION HERE
            if(cnt_up_i = '1') then

                s_cnt_local <= s_cnt_local + 1;

            else

                s_cnt_local <= s_cnt_local - 1;

            end if;

            end if;
        end if;
    end process p_cnt_up_down;

```

Listing of VHDL reset and stimulus processes from testbench file tb_cnt_up_down.vhd

```vhdl

 --------------------------------------------------------------------
    -- Reset generation process
    --------------------------------------------------------------------
    p_reset_gen : process
    begin
        s_reset <= '0';
        wait for 12 ns;

        -- Reset activated
        s_reset <= '1';
        wait for 73 ns;

        s_reset <= '0';
        wait;
    end process p_reset_gen;

    --------------------------------------------------------------------
    -- Data generation process
    --------------------------------------------------------------------
    p_stimulus : process
    begin
        report "Stimulus process started" severity note;

        -- Enable counting
        s_en     <= '1';

        -- Change counter direction
        s_cnt_up <= '1';
        wait for 380 ns;
        s_cnt_up <= '0';
        wait for 220 ns;

        -- Disable counting
        s_en     <= '0';

        report "Stimulus process finished" severity note;
        wait;
    end process p_stimulus;

```

Screenshot with simulated time waveforms (all inputs and outputs)

Counting doesn't start while reset is high value

![WaveformsPicture](Images/Reset_and_CountStart.PNG)

Counts up while the signal s_cnt_up is active, then counting changes direction

![WaveformsPicture](Images/CountUpToCountDown.PNG)

While the signal s_en has high value, the counter keeps counting, once s_en drops to low value, counting stops, and counter remembers last held number

![WaveformsPicture](Images/CountStops.PNG)

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

## Task 3 - Top Level

Listing of VHDL code from source file top.vhd with all instantiations for the 4-bit bidirectional counter.

```vhdl

--------------------------------------------------------------------
    -- Instance (copy) of clock_enable entity
    clk_en0 : entity work.clock_enable
        generic map(
            --- WRITE YOUR CODE HERE
        g_MAX => 100000000
        )
        port map(
            --- WRITE YOUR CODE HERE
                clk     => CLK100MHZ,     -- Main clock
                reset   => BTNC, -- Synchronous reset
                ce_o    => s_en -- Clock enable pulse signal
        );

    --------------------------------------------------------------------
    -- Instance (copy) of cnt_up_down entity
    bin_cnt0 : entity work.cnt_up_down
        generic map(
            --- WRITE YOUR CODE HERE
            g_CNT_WIDTH => 4
        )
        port map(
            --- WRITE YOUR CODE HERE
            clk         => CLK100MHZ,
            reset       => BTNC,
            en_i        => s_en,
            cnt_up_i    => SW(0),
            cnt_o       => s_cnt
        );

    -- Display input value on LEDs
    LED(3 downto 0) <= s_cnt;

    --------------------------------------------------------------------
    -- Instance (copy) of hex_7seg entity
    hex2seg : entity work.hex_7seg
        port map(
            hex_i    => s_cnt,
            seg_o(6) => CA,
            seg_o(5) => CB,
            seg_o(4) => CC,
            seg_o(3) => CD,
            seg_o(2) => CE,
            seg_o(1) => CF,
            seg_o(0) => CG
        );

```

Image of the top layer including both counters, ie a 4-bit bidirectional counter from Part 4 and a 16-bit counter from Experiments on your own.

![WaveformsPicture](Images/Scheme.jpg)

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
---
layout: page
title: About
---

## This page

This page is the "About" page. Here I explain the purpose of my site. Please continue reading.

## This site

The purpose of this site is to immortalize (in github's Arctic vault no less) all the rants and opinions I've accumulated over my ~~long and prosperous~~ short and otherwise uneventful existence. Sometimes I will write many things. Sometimes I will not write anything. There's no main subject and no single language.

## Me

Many years ago during an informal professional gathering a friend described me and my brother as "engineers who like to ride bicycles".  Also, I was intrigued. If this friend thinks this of me: what may other people, who know me less still, think? With time, I've learned to appreciate the exactness of the definition. Also with time, I've accumulated some other badges / tags: PhD in Operations Research, [double](https://baobabsoluciones.es/)-[entrepreneur](https://hackpackinglife.com/) and ~~President of the United States of America~~.

Somewhere else I gave this description which I think it's still valid (and may be for a long time): Engineer, programmer and scientist. Loves solving puzzles, organizing stuff and customer service. During his free (and not-so-free) time he's a cyclist and professional skeptic.

## Contact

If you want to tell me something, the easier is to write me an email: pchtsp at gmail dot com.

branch_name: refs/heads/master


text:
# m151-cinema-booking-system

## 1) Requirements:

- [composer](https://getcomposer.org/) installed
- [npm](https://www.npmjs.com/) installed
- MySql Server installed and running

## 2) Setup Project

1) Clone repo

2) `cd path/to/project`

3) Please change the `config/packages/doctrine.yaml` to fit your needs / setup.

4) `composer install`

5) `npm install`

6) `npm run dev`

## 3) Setup Doctrine and Database

This project works with multiple SQL Servers, a (Master / Slave) Setup.
The `doctrine.yaml` structure is predefined for a Master / Slave setup.

**Please change the `config/packages/doctrine.yaml` to fit your needs / setup.**

### Master / Slave Setup

1) Create a database (example sql in `resources/1_db_ddl.sql`) on your Master Server

2) Add `Server-Id = 1` and `Log-bin=mysql-bin` to your Master MySQL Servers config files (ex. `mysql.ini`, `my.cnf`)

3) Add `Server-Id = YOUR_SLAVE_ID` to your Slave MySQL Servers config files (ex. `mysql.ini`, `my.cnf`)

4) Execute `CHANGE MASTER TO MASTER_HOST= 'YOUR_MASTER_HOST', MASTER_PORT=3306, MASTER_USER='YOUR_MASTER_USER', MASTER_PASSWORD='YOUR_MASTER_PASSWORD';` on your Slave MySQL Servers

5) Execute `START SLAVE;` on your Slave MySQL Servers

6) Execute `show slave status\G;` on your Slave MySQL Servers. Check if connection was successful

7) Test Doctrine configuration: `php bin/console doctrine:query:sql "SELECT 1" --connection=MASTER_OR_SLAVE_CONNECTION`

8) Create entity tables (only on Master): `bin/console doctrine:schema:update --force`

9) Execute file `resources/2_stored_procedures_events.sql` in your Master database

10) Execute file `resources/3_data.sql` in your Master database

11) Make sure the slaves replicated the master correctly

## 4) Run the project:

`php bin/console server:run`

Server will now be available on (http://<IP_ADDRESS>:8000)

Admin user:
Email<EMAIL_ADDRESS>PW: 123456

Employee user:
Email<EMAIL_ADDRESS>PW: 123456

You can find more users in the table `user`. Their password is 123456


text:
# sqlmi
Azure SQL Managed Instance scripts & tools

Folders & Projects:
- how-to/ contains the SQL MI scripts from the how-to series at https://aka.ms/sqlmi-howto


text:
# Database projecting information and notes

## sequence for step-by-step create database and models structure

1. make **(0)model with migration or only migration** if model exist
2. make **(1)seed** and **(2)factory** for the model
3. **(3)migrate** with seeds
4. **(4)write relationships** for models related to recently created
5. **(5)write tests** for relations and pass it

_Good explanation for factory and faker: <https://scotch.io/tutorials/generate-dummy-laravel-data-with-model-factories>_

## sequence example step-by-step

```shell
# make model with migration
php artisan make:model Block -m

# make factory
php artisan make:factory BlockFactory

# make seeder
php artisan make:seeder BlocksTableSeeder

# make tests
php artisan make:test BlockBotRelationshipsTest
```

1. edit created migration files
2. edit factory
3. write seed with factory and test it (`php artisan migrate:fresh --seed`)
4. write relationships for Models
5. write test for test relations forward and backward
6. write test for foreign keys / cascade deleting

repository: adminoid/chat-constructor

gha_language: PHP

repo_name: adminoid/chat-constructor


text:
# Jetpack 🚀

![Jetpack example](http://i.cubeupload.com/Jdtq62.png)

**Jetpack** is a simple boilerplate with webpack, babel, mocha, chai and [travis](https://travis-ci.org/) integration.

## Usage

**Jetpack** uses folders *src*, *test*, *dist* to store source files, test files and distribution files respectively.

```bash
git clone git@github.com:ramadis/jetpack.git
```

## Contributing

Feel free to submit any issues and PRs you want. To run the project:

```sh
npm run build && npm run test
```

repository: ramadis/jetpack

repo_name: ramadis/jetpack


text:
## ML@Edge with SageMaker - Getting Started Examples

This repository contains examples of different models, showing how they can be built using SageMaker and prepared for deployment at the edge.

In this repository, we will use [Amazon Sagemaker](https://docs.aws.amazon.com/sagemaker/latest/dg/whatis.html) to train the models, [Sagemker-Neo](https://docs.aws.amazon.com/sagemaker/latest/dg/neo.html) to compile them [Sagemaker Edge Manager](https://docs.aws.amazon.com/sagemaker/latest/dg/edge.html) to packaged them. Once the package is created, it can be deployed at the edge devices(for example: Jetson Xavier Jetpack 4.4.1)

Let us understand the structure of the repository:
- [models](models) folder contains one sub-folder per model/framework type. These subfolders contain a jupyter notebook which does the following:
    - Download the model from the official repository
    - Train the model on a sample dataset
    - Compile the model for an edge device(in this case, a Jetson Xavier Jetpack 4.4.1)
    - Create a SageMaker Edge Manager Packaging job to prepare the deployment package

- [sagemaker_edge_manager_agent_docker](sagemaker_edge_manager_agent_docker) folder contains the details on how to build a docker container for SageMaker Edge Agent.

Below is the list of models with their destination hardware platform, processor and other details.

| Board           | Model                                                         |Processor    | Cold start (no TRT cache) | Cold start time (TRT cache)     | Inference time  |
| -               | -                                                             | -           | -               | -                   | -                   |
| Jetson Nano     | [Tiny Yolov4 416x416 80 classes](models/02_YoloV4/01_Pytorch) |GPU          | ~98.02s         | -             | ~73ms               |
| Jetson Nano     | [Tiny Yolov4 416x416 80 classes](models/02_YoloV4/01_Pytorch) |CPU          | ~0.86s          | -              | ~1503ms             |
| Jetson Xavier   | [Tiny Yolov4 416x416 80 classes](models/02_YoloV4/01_Pytorch) |GPU          | x               | -                   | x               |
| Jetson Xavier   | [Tiny Yolov4 416x416 80 classes](models/02_YoloV4/01_Pytorch) |CPU          | x               | -                   | x               |

## SageMaker Edge Manager Docker container
[Instructions](sagemaker_edge_manager_agent_docker/README.md) of how to create a docker container for the ARM64 agent + Nvidia devices -> Nano/Xavier.

## Security

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

## License

This library is licensed under the MIT-0 License. See the LICENSE file.

repository: vrakesh/ml-edge-getting-started

repo_name: vrakesh/ml-edge-getting-started


text:
### Task scheduling for Azure and Windows Servers: Service Bus.
+ Initialize: Queues, Topics, Event Hubs
+ Enqueue and dequeue
+ Enqueue for dequeue at specific time
+ Dequeue batches
+ Recieve events
+ Time sensitive events
+ Plugs into [King.Service](https://github.com/jefking/King.Service)

### [NuGet](https://www.nuget.org/packages/King.Service.ServiceBus)
```
PM> Install-Package King.Service.ServiceBus
```

### [Wiki](https://github.com/jefking/King.Service.ServiceBus/wiki)
View the wiki to learn how to use this.


text:
# Document Page Counter
A handy app that counts all pages in known document types found in a directory and its subdirs

The application traverses all files and directories in the target directory and outputs each document found, and the number of pages in it.
At the end the total number of documents and the total number of pages are printed.

At the moment the application supports pdf and docx document. Other types can be added on request.

## Usage
Execute the following in the directory where the jar is located (or add the jar path to java classpath)

`java -jar DocumentPageCounter-0.2-full.jar <target directory>`

## Building

Execute in the project root directory:

`mvn clean install`

After the build the executable jar shall be found in the `target` directory.

## Requirements

Requirements for building: java8, maven 3

Requirements for running: java 8/jre 8

repository: seropian/document-page-counter

repo_name: seropian/document-page-counter


text:
<!--
Thank you for submitting a pull request! A few things to know first:

- For us to be able to merge your PR, you must first fill out a CLA. Information on our CLA process can be found at https://developer.okta.com/cla
- For faster reviews and merging, please fill out all sections of this template completely
- Your title should be concise and explain what the PR does
- Follow the single responsibility principal with your PR. This PR should adjust a single set of changes. If it is larger than that, please submit multiple PR's
- Please use this template for your PR, so we can understand the purpose. PR's that do not use this template will be closed
-->

## Summary
<!-- Be concise with your summery, but explain what changed -->

<!-- Include the below line. If there is no issue associated with this PR, please use N/A -->
Fixes #

## Type of PR
<!-- Multiple selections are ok -->
- [ ] Bug Fix (non-breaking fixes to existing functionality)
- [ ] New Feature (non-breaking changes that add new functionality)
- [ ] Documentation update
- [ ] Test Updates
- [ ] Other (Please describe the type)

## Test Information
<!-- Please fill out all information -->
- [ ] My PR required test updates <!-- If you can honestly answer no to this, you may skip this section -->

Go Version:
Os Version:
OpenAPI Spec Version:

## Signoff
- [ ] I have submitted a CLA for this PR
- [ ] Each commit message explains what the commit does
- [ ] I have updated documentation to explain what my PR does
- [ ] My code is covered by tests if required
- [ ] I ran `make fmt` on my code
- [ ] I did not edit any automatically generated files

repository: okta/okta-sdk-golang

gha_language: Go

gha_license_id: NOASSERTION

repo_name: okta/okta-sdk-golang


text:
# Simplicity

Simplicity is a blockchain programming language designed as an alternative to Bitcoin script.

The language and implementation is still under development.

## Contents

This project contains

* A Haskell implementation of Simplicity's language semantics, type inference engine, serialization functions, and some example Simplicity code.
* A Coq implementation of Simplicity's formal denotational and operational semantics.

## Build

### Building with Nix

Software artifacts can be built using [Nix](https://nixos.org/nix/).

* To build the Haskell project, run `nix-build -A haskell`.
* To use the Haskell project, try `nix-shell -p "(import ./default.nix {}).haskellPackages.ghcWithPackages (pkgs: [pkgs.Simplicity])"`.
* To build the Coq project, run `nix-build -A coq`.

### Building without Nix

To build the Coq project, we first need to build the VST dependency.

1. Download and extract the lastest VST from <https://github.com/PrincetonUniversity/VST/archive/v2.5.tar.gz>.
1. Build the VST project by running `make` in the extracted directory.  If you are in a rush it is sufficent to run `make sha/functional_prog.vo`.
(Tip: if you have a newer version of Coq, you can try setting the environment variable `IGNORECOQVERSION=true`.)
1. Install the VST project into your user's `.local/share` (or `XDG_DATA_HOME`) directory by running
    1. `mkdir -p ${XDG_DATA_HOME:-$HOME/.local/share}/coq/VST`
    1. `cp -r msl sepcomp veric floyd ${XDG_DATA_HOME:-$HOME/.local/share}/coq/VST`
    1. `cp -r compcert sha ${XDG_DATA_HOME:-$HOME/.local/share}/coq`

Now we can build the Simplicity project.
1. Enter the `Coq` directory.
1. Execute `coq_makefile -f _CoqProject -o CoqMakefile`.
1. Build the project by executing `make -f CoqMakefile`.

## Documentation

Detailed documentation can be found in the `Simplicity-TR.tm` TeXmacs file.
A recent PDF version can be found in the [pdf](https://github.com/ElementsProject/simplicity/blob/pdf/Simplicity-TR.pdf) branch.

## Further Resources

* Our [paper that originally introduced Simplicity](https://arxiv.org/abs/1711.03028).  Some of the finer details are out of date, but it is still a good introduction.
* [BPASE 2018 presentation](https://youtu.be/VOeUq3oR2fk) of the above paper ([slides](https://cyber.stanford.edu/sites/g/files/sbiybj9936/f/slides-bpase-2018.pdf)).
* [Scale by the Bay 2018 presentation](https://youtu.be/M4XnDrRIKx8) that illustrates formal verification of Simplicity in Agda ([slides](https://lists.ozlabs.org/pipermail/simplicity/2018/000011.html)).

## Contact

Interested parties are welcome to join the [Simplicity mailing list](https://lists.ozlabs.org/listinfo/simplicity).
Issues and pull-requests can be made through GitHub's interface.

repository: meonBot/simplicity

gha_license_id: MIT

repo_name: meonBot/simplicity


text:
# ▶ Playful

> A simple transition library for React (and routers!)

## Table of Contents

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Installation](#installation)
- [Usage](#usage)
- [Effects](#effects)
- [Direction](#direction)
- [Example](#example)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Installation

```
npm install --save playful
```

## Usage

```jsx
import {withTransition} from 'playful'

// Create your components as you normally would
const MyComponent = () => <div>My Content</div>

// Define the effect you'd like your component to animate with when it is
// mounted and unmounted. Technically, you don't need to do this.
// The library has some nice smart defaults.
const playOptions = {
  effect: 'fadeAndPop',
  duration: 600,
  direction: 'up',
}

// Create the enhanced component using withTransition along with your
// options and component.
const PlayfulComponent = withTransition(playOptions)(MyComponent)

// Render it out! ✨
const App = () => {
  return (
    <div className="App">
      <PlayfulComponent />
    </div>
  )
}
```

## Effects

Playful supports the following transition effects:

- fade
- fadeAndPop
- fadeAndSlide
- pop
- scale
- slide
- swipe
- zoom

## Direction

The following directions can be applied to directonal moving effects:

- `up`
- `down`
- `left`
- `right`

The default direction is `right`.

## Example

[Check out the Storybook example!](https://react-playful.netlify.com/iframe.html?selectedKind=Playful&selectedStory=Example&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel)

repository: ItsJonQ/playful

repo_name: ItsJonQ/playful


text:
# Serial Graph coloring implementation in C++

##### Algorithm
This is a C++ implementation of the popular greedy first fit graph coloring algorithm.
* Till all the vertices are not colored:
  * For each vertex v in the set of vertices V:
    * Iterate over v's neighbors and mark their colors disallowed
    * Find the first available color that is not disallowed and assign it to the vertex v

Repeat this snippet till the entire graph is colored.

##### Usage
1. Build the GraphReader library. This is a library written to read in MTX (Matrix Market) graph ASCII files. It'll be dynamically linked to our executable. See the `README.md` in `src/GraphReader` for details.
```
$ cd ../src/GraphReader && make
```
2. Build this program: All built components will be in a new folder `build/`
```
$ make
```
3. Run the program: The coloring info for the given graph will be written to STDOUT and an output text file.
```
$ ./build/SerialFirstFit <input-mtx-file> <Output-txt-file>
```
_TODO: Add instructions on how to run the self-test script_

##### Performance
TODO

##### References
* https://en.wikipedia.org/wiki/Greedy_coloring

repository: kmmankad/ParallelGraphColoring

repo_name: kmmankad/ParallelGraphColoring


text:
#### Configuration Request

The `workspace/configuration` request is sent from the server to the client to fetch configuration settings from the client. The request can fetch n configuration settings in one roundtrip. The order of the returned configuration settings correspond to the order of the passed `ConfigurationItems` (e.g. the first item in the response is the result for the first configuration item in the params).

A `ConfigurationItem` consist of the configuration section to ask for and an additional scope URI. The configuration section ask for is defined by the server and doesn't necessarily need to correspond to the configuration store used be the client. So a server might ask for a configuration `cpp.formatterOptions` but the client stores the configuration in a XML store layout differently. It is up to the client to do the necessary conversion. If a scope URI is provided the client should return the setting scoped to the provided resource. If the client for example uses [EditorConfig](http://editorconfig.org/) to manage its settings the configuration should be returned for the passed resource URI. If the client can't provide a configuration setting for a given scope then `null` need to be present in the returned array.

_Client Capability_:

The client sets the following client capability if it is able to handle `workspace/configuration` requests:

```ts
/**
 * The workspace client capabilities
 */
workspace: {
	/**
	 * The client supports `workspace/configuration` requests.
	 */
	configuration?: boolean;
}
```

_Request_:

* method: 'workspace/configuration'
* params: `ConfigurationParams` defined as follows

```ts
export interface ConfigurationParams {
	items: ConfigurationItem[];
}

export interface ConfigurationItem {
	/**
	 * The scope to get the configuration section for.
	 */
	scopeUri?: string;

	/**
	 * The configuration section asked for.
	 */
	section?: string;
}
```

_Response_:
* result: any[]
* error: code and message set in case an exception happens during the 'workspace/configuration' request

repository: yutiansut/vscode-languageserver-node

gha_language: TypeScript

repo_name: yutiansut/vscode-languageserver-node


text:
## nsqlookupd

`nsqlookupd` is the daemon that manages topology information. Clients query `nsqlookupd` to discover
`nsqd` producers for a specific topic and `nsqd` nodes broadcasts topic and channel information.

There are two interfaces: A TCP interface which is used by `nsqd` for broadcasts and an HTTP
interface for clients to perform discovery and administrative actions.

### Command Line Options

    -http-address="<IP_ADDRESS>:4161": <addr>:<port> to listen on for HTTP clients
    -inactive-producer-timeout=5m0s: duration of time a producer will remain in the active list since its last ping
    -tcp-address="<IP_ADDRESS>:4160": <addr>:<port> to listen on for TCP clients
    -broadcast-address: external address of this lookupd node, (default to the OS hostname)
    -tombstone-lifetime=45s: duration of time a producer will remain tombstoned if registration remains
    -verbose=false: enable verbose logging
    -version=false: print version string

### HTTP Interface

 * `/ping` (returns "OK" for use with monitoring)
 * `/lookup?topic=....` (returns a list of producers for a topic)
 * `/topics` (returns a list of all the topics it knows about)
 * `/channels?topic=...` (returns a list of all the channels for a topic)
 * `/nodes` (returns a list of all the producers it knows about)
 * `/delete_topic?topic=...` (deletes a topic)
 * `/delete_channel?topic=...&channel=...` (deletes a channel)
 * `/tombstone_topic_producer?topic=...&node=...` (tombstones a specific producer of a topic)
 * `/info` (returns server version information)

### Deletion and Tombstones

When a topic is no longer produced it is a relatively simple operation to purge that information
from the cluster.

For a channel deletion the process is similar, the only difference being you would use the
`/delete_channel` endpoint on your `nsqlookupd` instances and you would need to ensure that all
consumers that were subscribed the the channel were already downed.

However, it gets a bit more complicated when a topic is no longer produced on a *subset* of nodes.
Because of the way consumers query `nsqlookupd` and connect to all producers you enter into race
conditions with attempting to remove the information from the cluster and consumers discovering that
node and reconnecting (thus pushing updates that the topic is still produced on that node). The
solution in these cases is to use "tombstones". A tombstone in `nsqlookupd` context is producer
specific and lasts for a configurable `--tombstone-lifetime` time. During that window the producer
will not be listed in `/lookup` queries, allowing the node to delete the topic, propagate that
information to `nsqlookupd` (which then *removes* the tombstoned producer), and prevent any consumer
from re-discovering that node.

repository: ChimeraCoder/golang-stuff

repo_name: ChimeraCoder/golang-stuff


text:
Algorithms
==========

API
---

```python
class MyAlgo(TradingFactory):
  '''
  Place for the trading strategy.

  The class provides the following useful attributes :
    - manager - Manager object specified on command line
    - portfolio - Portfolio informations
    - perf_tracker - Trading metrics
    - datetime - Current datetime
    - day - Day counter
    - logger
  '''
  def initialize(self, properties):
    '''
    This function runs once, before any trading event.
    '''
    # `properties` is a dictionnary storing parameters you set outside.
    self.short_window = properties.get('short_window', 15)
    self.long_window = properties.get('long_window', 30)

    # Intuition comes with battery included
    # Middlewares are trading tools. self.use() is sugar syntax that tells the
    # algorithm to call the provided function after each event
    if properties.get('save'):
        self.use(database.RethinkdbBackend(self.identity, True)
                 .save_portfolio)

  def warming(self, data):
    '''
    An other function ran once, after everything has been initialized, the
    very first time of trading
    '''
    # Fit a model before backtesting for example
    self.training_model = train_on_past_data()

  def event(self, data):
    '''
    Called for each event.
    If you can detect trading opportunities, this is where you
    place orders or fill the signals dictionnary : {'sid 1': price, 'sid 2': -price}
    The portfolio manager will use it compute the allocation : positive
    values are buy signals and vice versa.
    '''
    signals = {}

    for ticker in data:
        if great_prospect():
            # Currently, if you want to use weight-based strategy allocation,
            # you must provide the current sid price
            signals[ticker] = data[ticker].price
        if take_profit():
            signals[ticker] = -data[ticker].price

    return signals
```

Library
-------

Here is a list of the algorithms currently implemented, with a short
description and the configuration exposed (values are defaults)

Most of them take also boolean parameters 'save' (portfolio metrics storage in
database), 'interactive' (manual commands through redis), 'notify' (andorid
notifications with [Push Bullet](pushbullet.com)) and 'commission' (the
transaction cost).

* Buy And Hold
> Buy every sids on the given day, regularly or always (start_day = -1), and
> until the end
```python
properties = {start_day: 2, rate: -1}
```

* Stochastic Gradient Method
> Randomly chooses training data, gradually decrease the learning rate, and
> penalize data points which deviate significantly from what's predicted. Here
> We used an average SGD method that is tested to outperform if we simply pick
> the last predictor value trained after certain iterations.
```python
properties = {refresh: 1, window: 60, gradient_iterations: 5}
```

* Regular Rebalance
> Reconsidere the portfolio allocation every <refresh> periods,
> providing to the portfolio strategy <window_length> days of quote data.
```python
properties = {refresh: 10, window: 40}
```

* Standard Deviation based (Always loose, there's something wrong !)
> Open Long Position if current price is larger than the 9 day volume weighted
> average plus 60% of the standard deviation Then positions are monitored with
> takeprofit and stoploss limits.  Plus, if we loose more than plug *
> starting_cash, we sell and stop trading.
```python
properties = {stddev: 9, vwap_window: 5, plug: 0.7}
```

* Auto adjusting stop loss
> The goal behind this algorithm was to invest in a broad range of stocks,
> eliminate the ones that aren't doing well, and "double down" on the ones that
> are.  The stop loss price is set as a function of the rate of return, and
> trails the current price so as to lock in a profit in the event that the
> price of a particular security starts dropping
```python
properties = {}
```

* Volume weight average price
> For each frame, it finds the price and calculates the volume-weighted average
> price.  If the price is moving quickly, and we have not exceeded our position
> limits, it executes the order and updates our position.
```python
properties = {window: 3, buy_trigger: -5, sell_trigger: 5}
```

* Momentum
> Buy when price > moving average and vice versa, but only if the stock
> notional is between max_weigth and max_expose
```python
properties = {window: 3, max_weight: 0.2, max_exposure: max_weight}
```

* Dual Moving Average
> Buys once its short moving average crosses its long moving average
> (indicating upwards momentum) and sells its shares once the averages cross
> again (indicating downwards momentum).
```python
properties = {long_window: 30, ma_rate: 0.5, short_window: ma_rate * long_window, threshold: 0}
```

repository: MiguelPeralvo/insights

repo_name: MiguelPeralvo/insights


text:
---
title   : Glossary
anchors : true
---

# Glossary

Both **mediasoup** and **mediasoup-client** refer to the same common entities that are represented in both client and server sides. Those entities are described below:

## Room
{: #Glossary-Room}

A **Room** represents a multi-party conference with N participants (**Peers**). Within a **Room**, audio and video tracks generated by a client/browser are relayed to all the participants.

## Peer
{: #Glossary-Peer}

A **Peer** represents a participant in the conference, thus it has a local (client side) representation and a remote (server side) representation. When a client joins a **Room** it also gets information about existing and new **Peers** in the conference.

A **Peer** holds a set of associated **Transport**, **Producer** and **Consumer** instances.

## Transport
{: #Glossary-Transport}

A **Transport** represents a path for sending or receiving audio/video RTP and RTCP. In the context of WebRTC this means a network path negotiated by both, the client and the server, via ICE and DTLS. A **Transport** has an associated entity in both client and server sides.

## Producer
{: #Glossary-Producer}

A **Producer** represents and handles a media track (audio or video) sent by a client to the server. A **Producer** has an associated entity in both client and server sides, meaning that both sides (the client app and the server app) can run API methods on it (such as pausing or resuming it).

In order to send the media track to the server, the **Producer** needs to be provided with a **Transport** instance.

In **mediasoup** (server side) a **Producer** is connected with many **Consumers** associated to it.

## Consumer
{: #Glossary-Consumer}

A **Consumer** represents and handles a media track (audio or video) sent by the server to the client. A **Consumer** has an associated entity in both client and server sides, meaning that both sides (the client app and the server app) can run API methods on it (such as pausing or resuming it).

Typically, a **Consumer** has a remote **Producer** as a source. In fact, an audio **Producer** created by Alice's **Peer** will trigger the creation of an audio **Consumer** in Bob's **Peer** and all the other **Peers**.

It's up to the client side application whether to enable/activate a **Consumer** (by providing a **Transport**) or not. Once enabled, the corresponding RTP is relayed to the client.

## Profile
{: #Glossary-Profile}

A **Profile** represents a RTP quality layer and, hence, just makes sense for [simulcast](https://tools.ietf.org/html/draft-westerlund-avtcore-rtp-simulcast) streams or [SVC](https://en.wikipedia.org/wiki/Scalable_Video_Coding) video codecs.

**mediasoup** defines the following profiles:

* **default**: If not simulcast nor SVC, it just points to the single audio or video RTP stream. When there is simulcast or SVC, this profile means "the highest one".
* **low**: The lowest profile. In simulcast this means the stream with lowest video resolution. In SVC this means the lowest spatial layer.
* **medium**: The medium profile. In simulcast this means the stream with medium video resolution. In SVC this means the medium spatial layer.
* **high**: The highest profile. In simulcast this means the stream with highest video resolution. In SVC this means the highest spatial layer.
* **none**: Special case when there is no available stream (this may happen at **Consumer** level when no profile can be sent to the remote client.

license: ISC

repository: brucetsao/mediasoup-website

repo_name: brucetsao/mediasoup-website


text:
# SwiftISY

[![Swift](https://img.shields.io/badge/Swift-3.0.1-blue.svg)]()
[![platform](https://img.shields.io/badge/platform-iOS-blue.svg)]()
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![License](https://img.shields.io/hexpm/l/plug.svg)]()

__SwiftISY__ is a framework to interact with the
[Universal Devices ISY-994i Series](https://www.universal-devices.com/residential/isy994i-series/)
product written in Swift.  This home automation solution supports remote access by a
[REST interface](http://wiki.universal-devices.com/index.php?title=ISY_Developers:API:REST_Interface).

For additional developer information, refer to the
[developer's website](http://www.universal-devices.com/isy-developers/).

- __Requirements__: iOS 9 or later
- __Swift Version__: Swift 3.0.1

Please note that not all REST features are currently supported by this framework.  This framework
currently supports:

* Lookup of lighting devices.
* Lookup of lighting scenes.
* Get status of lighting devices.
* Turn on a device/scene.
* Turn off a device/scene.

Additional functionality will be added in the future.

## Usage

```swift
import SwiftISY

// create a request
let request = SwiftISYRequest(SwiftISYHost(host: "your host", user: "your username", password: "your password"))

// get all nodes for this host
request.nodes { (results) in
  if let objects = results.objects {
    // loop through all devices on this host
    for node in objects.nodes {
      // process this device
      ...

      // get status for this device
      let status = objects.statuses[node.address]
      ...
    }

    // loop through all scenes on this host
    for node in objects.groups {
      // process this scene
      ...
    }
  }
}

```

## Installation

1. Build SwiftISY framework.
3. In *Build Phases*, add `SwiftISY.framework` library to your project.
<br /><img<EMAIL_ADDRESS>height="160"/>
5. `import SwiftISY` in your Swift file.
6. Use in your code.

### Build via Carthage
SwiftISY is [Carthage](https://github.com/Carthage/Carthage) compatible. You can easily build
SwiftISY by adding the following line to your Cartfile.

```ruby
github "wyzzarz/SwiftISY"
```

To install the framework, run `carthage update --platform iOS --use-submodules`.  The script
`carthage-update.sh` includes this command.

## Author

Copyright 2017 Warner Zee.

## License

SwiftISY is available under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more info.

repository: wyzzarz/SwiftISY

repo_name: wyzzarz/SwiftISY


text:
---
title: Defold AdMob extension API documentation
brief: This manual covers how to get use AdMob to show ads on iOS and Android in Defold.
---

# Defold AdMob extension API documentation

This extension provides a unified, simple to use interface to show AdMob ads on iOS and Android.

## Installation
To use this library in your Defold project, add the following URL to your `game.project` dependencies:

[https://github.com/defold/extension-admob/archive/master.zip](https://github.com/defold/extension-admob/archive/master.zip)

We recommend using a link to a zip file of a [specific release](https://github.com/defold/extension-admob/releases).

## Configuration
The extension can be configured by adding the following fields to game.project:

```
[admob]
app_id_ios = ca-app-pub-3940256099942544~1458002511
app_id_android = ca-app-pub-3940256099942544~3347511713
ios_tracking_usage_description = Your data will be used to provide you a better and personalized ad experience.
```

### app_id_ios
This is your iOS AdMob app ID. An app ID is a unique ID number assigned to your apps when they're added to AdMob. The app ID is used to identify your apps.

### app_id_android
This is your Android AdMob app ID. An app ID is a unique ID number assigned to your apps when they're added to AdMob. The app ID is used to identify your apps.

### ios_tracking_usage_description

Before requesting the unique IDFA string for a device on iOS 14 the application must request user authorization to access app-related data for tracking the user or the device. This is done automatically when `admob.request_idfa()` is called. The string set in `admob.ios_tracking_usage_description` will be shown to the user.

Apple documentation: https://developer.apple.com/documentation/apptrackingtransparency?language=objc

## Example

[Refer to the example project](https://github.com/defold/extension-admob/blob/master/main/ads.gui_script).

## Source code

The source code is available on [GitHub](https://github.com/defold/extension-admob)

## API reference

repository: thejustinwalsh/extension-admob

repo_name: thejustinwalsh/extension-admob


text:
# Logstash input plugin for Azure Storage Blobs

## Summary
This plugin reads and parses data from Azure Storage Blobs.

## Installation
You can install this plugin using the Logstash "plugin" or "logstash-plugin" (for newer versions of Logstash) command:
```sh
logstash-plugin install logstash-input-azureblob
```

For more information, see Logstash reference [Working with plugins](https://www.elastic.co/guide/en/logstash/current/working-with-plugins.html).

## Configuration
### Required Parameters
__*storage_account_name*__

The Azure storage account name.

__*storage_access_key*__

The access key to the storage account.

__*container*__

The blob container name.

### Optional Parameters
__*codec*__

The codec used to decode the blob. By default *json_lines* is selected. For normal log file, use *line* or other existing codec.

* **Default value:** *json_lines*

__*sleep_time*__

The sleep time before scanning for new data.

* **Default value:** *10* seconds.
* **Note:** Does not seems to be implemented

__*sincedb*__

The Azure Table name to keep track of what have been done like when we
use the file plugin. This define the table name that will be used during
the process. **IMPORTANT** This will __not__ take into account any *.lock*
files. It will also __not__ create any *.lock* files.

* **Default value:** No default value, if a value is defined, than it will
create the *sincedb* table in the blob account.

__*ignore_older*__

When the file input discovers a file that was last modified before the
specified timespan in seconds, the file is ignored. After it's discovery,
if an ignored file is modified it is no longer ignored and any new data
is read. The default is 24 hours.

* **Default value:** *24*60*60* (24h)

__*start_position*__

Choose where Logstash starts initially reading blob: at the beginning or
at the end. The default behavior treats files like live streams and thus
starts at the end. If you have old data you want to import, set this
to 'beginning'.

This option only modifies *"first contact"* situations where a file
is new and not seen before, **i.e.** files that don't have a current
position recorded in a sincedb read by Logstash. If a file
has already been seen before, this option has no effect and the
position recorded in the sincedb file will be used.

* **Possible values:** [beginning | end]
* **Dependency:** *sincedb* needs to be activated.
* **Default value:** *beginning*

__*path_prefix*__

Array of blob "path" prefixes. It defines the path prefix to watch in the
blob container. Path are defined by the blob name (i.e.: ["path/to/blob.log"]).
Regex cannot really be used to optimize perfs.

I recommend to use the paths in order to speed up the processing. *By example,
WebApp on azure with IIS logging enabled will create one folder per hour. If
you keep the logs for a long retention it will select all before keeping only
the last modified ones.*

* **Default value:** *[""]*

***

### Example 1 Basic (out of the box)
Read from a blob (any type) and send it to ElasticSearch.
```
input
{
    azureblob
    {
        storage_account_name => "mystorageaccount"
        storage_access_key => "VGhpcyBpcyBhIGZha2Uga2V5Lg=="
        container => "mycontainer"
    }
}
output
{
  elasticsearch {
    hosts => "localhost"
    index => "logstash-azureblob-%{+YYYY-MM-dd}"
  }
}
```

#### What will it do
It will get the blob, create an empty lock file (512 bytes) and read the entire blob **only once**. Each iteration of the plugin will take a new file and create a new lock file and push the original file to ElasticSearch. If any modification are made on the blob file, it won't be taken into account to push the new data to ElasticSearch. (*No use of sincedb in this situation*)

### Example 2 Advanced (Using sincedb and some other features)
Read from a blob and send it to ElasticSearch and keep track of where we are in the file.

```
input
{
    azureblob
    {
        storage_account_name => "mystorageaccount"
        storage_access_key   => "VGhpcyBpcyBhIGZha2Uga2V5Lg=="
        container            => "mycontainer"
        codec                => "line"         # Optional override => use line instead of json
        sincedb              => "sincedb"      # Optional          => Activate the sincedb in Azure table
        sleep_time           => 60             # Optional override => Azure IIS blob are updated each minutes
        ignore_older         => 2*60*60        # Optional override => Set to 2hours instead of 24 hours
        path_prefix          => ["ServerA/iis/2016/06/30/", "ServerA/log4net/"]
        start_position       => "end"          # Optional override => First contact set the sincedb to the end
    }
}
output
{
  elasticsearch {
    hosts => "localhost"
    index => "logstash-azureblob-%{+YYYY-MM-dd}"
  }
}
```

## More information
The source code of this plugin is hosted in GitHub repo [Microsoft Azure Diagnostics with ELK](https://github.com/Azure/azure-diagnostics-tools). We welcome you to provide feedback and/or contribute to the project.

repository: Jashchahal/azure-diagnostics-tools

repo_name: Jashchahal/azure-diagnostics-tools


text:
# ES20 P1 submission, Group 10

## Feature PPA

### Observation
Unfortunately one of the elements of this subgroup gave up the course which left us with two options. Bernardo Matos would either continue his job on PPA and make the first two features or he would join TDP and make a new feature there. He chose to join TDP, so his job on PPA was interrupted. As the teacher ordered, he then stopped working on PPA and for this reason, it was never completed. The tasks for the feature "Create StudentQuestion" were all done except for the refactoring of the service and the tests. Since the PPA wasn't finished it wasn't merged to the develop branch. The work done on PPA is below:

### Subgroup
 - Bernardo Cunha Matos, ist189419, matosberna
   + Issues assigned: [#17](https://github.com/tecnico-softeng/es20al_10-project/issues/17), [#27](https://github.com/tecnico-softeng/es20al_10-project/issues/27), [#28](https://github.com/tecnico-softeng/es20al_10-project/issues/28), [#29](https://github.com/tecnico-softeng/es20al_10-project/issues/29), [#30](https://github.com/tecnico-softeng/es20al_10-project/issues/30), [#31](https://github.com/tecnico-softeng/es20al_10-project/issues/31), [#32](https://github.com/tecnico-softeng/es20al_10-project/issues/32)

### Pull requests associated with this feature

No pull requests were made because of the reasons above.

### New/Updated domain entities

#### New entities
 - [StudentQuestion](https://github.com/tecnico-softeng/es20al_10-project/blob/PpA/backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/question/domain/StudentQuestion.java)

#### Entities changed
 - [Course](https://github.com/tecnico-softeng/es20al_10-project/blob/PpA/backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/course/Course.java)
   + Added field `studentQuestions`
 - [User](https://github.com/tecnico-softeng/es20al_10-project/blob/PpA/backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/user/User.java)
   + Added field `studentQuestions`

### Feature testing

I define two success tests, one insuccess test, and three tests for invalid input. The direct links to these are:

 - [CreateStudentQuestionServiceSpockTest.groovy](https://github.com/tecnico-softeng/es20al_10-project/blob/582f18dbd502fe0a302d809ab28d54c32fc79a07/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/question/service/CreateStudentQuestionServiceSpockTest.groovy)
    + [Success test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/582f18dbd502fe0a302d809ab28d54c32fc79a07/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/question/service/CreateStudentQuestionServiceSpockTest.groovy#L76)
    + [Success test #1](https://github.com/tecnico-softeng/es20al_10-project/blob/582f18dbd502fe0a302d809ab28d54c32fc79a07/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/question/service/CreateStudentQuestionServiceSpockTest.groovy#L112)
    + [Insuccess test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/582f18dbd502fe0a302d809ab28d54c32fc79a07/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/question/service/CreateStudentQuestionServiceSpockTest.groovy#L218)
    + [Tests for invalid input #0](https://github.com/tecnico-softeng/es20al_10-project/blob/582f18dbd502fe0a302d809ab28d54c32fc79a07/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/question/service/CreateStudentQuestionServiceSpockTest.groovy#L152)
    + [Tests for invalid input #1](https://github.com/tecnico-softeng/es20al_10-project/blob/582f18dbd502fe0a302d809ab28d54c32fc79a07/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/question/service/CreateStudentQuestionServiceSpockTest.groovy#L174)
    + [Tests for invalid input #2](https://github.com/tecnico-softeng/es20al_10-project/blob/582f18dbd502fe0a302d809ab28d54c32fc79a07/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/question/service/CreateStudentQuestionServiceSpockTest.groovy#L196)

### Test Coverage Screenshot

The screenshot includes the test coverage results associated with the new/changed entities:

![Test Coverage Screenshot](http://web.tecnico.ulisboa.pt/ist189419/testCovPPA.png)

---

## Feature DDP

### Subgroup
 - Daniel Gonçalves, ist191004, masterzeus05
   + Issues assigned: [#24](https://github.com/tecnico-softeng/es20al_10-project/issues/24), [#33](https://github.com/tecnico-softeng/es20al_10-project/issues/37), [#38](https://github.com/tecnico-softeng/es20al_10-project/issues/38), [#39](https://github.com/tecnico-softeng/es20al_10-project/issues/39), [#40](https://github.com/tecnico-softeng/es20al_10-project/issues/40)
 - Gabriel Almeida, ist189446, galmeida9
   + Issues assigned: [#13](https://github.com/tecnico-softeng/es20al_10-project/issues/13), [#14](https://github.com/tecnico-softeng/es20al_10-project/issues/14), [#15](https://github.com/tecnico-softeng/es20al_10-project/issues/15), [#18](https://github.com/tecnico-softeng/es20al_10-project/issues/18), [#19](https://github.com/tecnico-softeng/es20al_10-project/issues/19), [#20](https://github.com/tecnico-softeng/es20al_10-project/issues/20), [#21](https://github.com/tecnico-softeng/es20al_10-project/issues/21), [#23](https://github.com/tecnico-softeng/es20al_10-project/issues/23)

### Pull requests associated with this feature

The list of pull requests associated with this feature is:

 - [PR #025](https://github.com/tecnico-softeng/es20al_10-project/pull/25)
 - [PR #042](https://github.com/tecnico-softeng/es20al_10-project/pull/42)

### New/Updated domain entities

#### New entities
 - [Clarification](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/domain/Clarification.java)
 - [ClarificationAnswer](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/domain/ClarificationAnswer.java)

#### Entities changed
 - [User](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/user/User.java)
   + Added field `clarifications`
   + Added field `clarificationAnswers`
 - [Question](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/question/domain/Question.java)
   + Added field `clarifications`

### Feature testing - |Create Clarification|

We define one success tests one insuccess test, and tests for invalid input. The direct links to these are:

 - [CreateClarificationServiceSpockTest.groovy](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationServiceSpockTest.groovy)
    + [Success test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationServiceSpockTest.groovy#L51)
    + [Insuccess test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationServiceSpockTest.groovy#L95)
    + [Insuccess test #1](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationServiceSpockTest.groovy#L117)
    + [Tests for invalid input #0](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationServiceSpockTest.groovy#L73)
    + [Tests for invalid input #1](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationServiceSpockTest.groovy#L108)
    + [Tests for invalid input #2](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationServiceSpockTest.groovy#L129)

### Feature testing - |Create Clarification Answer|

We define one success tests one insuccess test, and tests for invalid input. The direct links to these are:

 - [CreateClarificationAnswerTest.groovy](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationAnswerTest.groovy)
    + [Success test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/8ad467f62e4037877f477a6d5604b14f620992d5/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationAnswerTest.groovy#L59)
    + [Insuccess test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/8ad467f62e4037877f477a6d5604b14f620992d5/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationAnswerTest.groovy#L78)
    + [Tests for invalid input #0](https://github.com/tecnico-softeng/es20al_10-project/blob/8ad467f62e4037877f477a6d5604b14f620992d5/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/clarification/service/CreateClarificationAnswerTest.groovy#L96)

### Test Coverage Screenshot

The screenshot includes the test coverage results associated with the new/changed entities:

![Test Coverage Screenshot](http://web.tecnico.ulisboa.pt/ist189446/ES/coverage.PNG)

---

## Feature TDP

### Observation
Due to what has already been explained above, one more feature had to be done, more specifically the feature "Cancel Tournament".

### Subgroup
 - Hugo Filipe Dias Marques, ist189460, Hugo-Marques-work
   + Issues assigned: [#36](https://github.com/tecnico-softeng/es20al_10-project/issues/36), [#35](https://github.com/tecnico-softeng/es20al_10-project/issues/35), [#34](https://github.com/tecnico-softeng/es20al_10-project/issues/34), [#22](https://github.com/tecnico-softeng/es20al_10-project/issues/22)
 - João Carlos Morgado David, ist189471, joaocmd
   + Issues assigned: [#2](https://github.com/tecnico-softeng/es20al_10-project/issues/2), [#3](https://github.com/tecnico-softeng/es20al_10-project/issues/3), [#4](https://github.com/tecnico-softeng/es20al_10-project/issues/4), [#5](https://github.com/tecnico-softeng/es20al_10-project/issues/5), [#41](https://github.com/tecnico-softeng/es20al_10-project/issues/41), [#49](https://github.com/tecnico-softeng/es20al_10-project/issues/49)
 - Bernardo Cunha Matos, ist189419, matosberna
   + Issues assigned: [#43](https://github.com/tecnico-softeng/es20al_10-project/issues/43), [#44](https://github.com/tecnico-softeng/es20al_10-project/issues/44), [#45](https://github.com/tecnico-softeng/es20al_10-project/issues/45), [#46](https://github.com/tecnico-softeng/es20al_10-project/issues/46)

### Pull requests associated with this feature

The list of pull requests associated with this feature is:

 - [PR #037](https://github.com/tecnico-softeng/es20al_10-project/pull/37)
 - [PR #047](https://github.com/tecnico-softeng/es20al_10-project/pull/47)
 - [PR #048](https://github.com/tecnico-softeng/es20al_10-project/pull/48)
 - [PR #050](https://github.com/tecnico-softeng/es20al_10-project/pull/50)
 - [PR #052](https://github.com/tecnico-softeng/es20al_10-project/pull/52)

### New/Updated domain entities

#### New entities
 - [Tournament](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/domain/Tournament.java)
 - [TournamentDto](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/dto/TournamentDto.java)

#### Entities changed
  - [User](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/user/User.java)
    + Added field `signUpTournament`
    + Added field `createdTournaments`

### Feature testing - |Create Tournament|

We define one success test, insuccess tests and tests for invalid input. The direct links to these are:

 - [CreateExternalCourseExecutionServiceSpockTest.groovy](https://github.com/tecnico-softeng/es20al_10-project/blob/master/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CreateTournamentSpockTest.groovy)
    + [Success test](https://github.com/tecnico-softeng/es20al_10-project/blob/master/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CreateTournamentSpockTest.groovy#L108)
    + [Insuccess test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/master/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CreateTournamentSpockTest.groovy#L142)
    + [Insuccess test #1](https://github.com/tecnico-softeng/es20al_10-project/blob/master/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CreateTournamentSpockTest.groovy#L155)
    + [Insuccess test #2](https://github.com/tecnico-softeng/es20al_10-project/blob/master/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CreateTournamentSpockTest.groovy#L175)
    + [Insuccess test #3](https://github.com/tecnico-softeng/es20al_10-project/blob/master/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CreateTournamentSpockTest.groovy#L191)
    + [Insuccess test #4,#5](https://github.com/tecnico-softeng/es20al_10-project/blob/master/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CreateTournamentSpockTest.groovy#L239)
    + [Tests for invalid input](https://github.com/tecnico-softeng/es20al_10-project/blob/master/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CreateTournamentSpockTest.groovy#L206)

### Feature testing - |Sign Up For Tournament|

We define one success test, two insuccess tests, and tests for invalid input. The direct links to these are:

 - [SignUpForTournamentSpockTest.groovy](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/SignUpForTournamentSpockTest.groovy)
    + [Success test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/SignUpForTournamentSpockTest.groovy#L77)
    + [Insuccess test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/b4e3701df583d64b21749f795a8cabedba555e0f/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/SignUpForTournamentSpockTest.groovy#L102)
    + [Insuccess test #1](https://github.com/tecnico-softeng/es20al_10-project/blob/b4e3701df583d64b21749f795a8cabedba555e0f/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/SignUpForTournamentSpockTest.groovy#L117)
    + [Tests for invalid input](https://github.com/tecnico-softeng/es20al_10-project/blob/b4e3701df583d64b21749f795a8cabedba555e0f/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/SignUpForTournamentSpockTest.groovy#L134)

### Feature testing - |Cancel Tournament|

We define one success test, one insuccess test, and tests for invalid input. The direct links to these are:

 - [CancelTournamentSpockTest.groovy](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CancelTournamentSpockTest.groovy)
    + [Success test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/85df58b6ae08a308d39be61979ef6124119e2fe9/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CancelTournamentSpockTest.groovy#L89)
    + [Insuccess test #0](https://github.com/tecnico-softeng/es20al_10-project/blob/85df58b6ae08a308d39be61979ef6124119e2fe9/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/CancelTournamentSpockTest.groovy#L104)

### Feature testing - |Get Open Tournaments|

Due to the simplicity of this task, We define just one success test and one insuccess test:

 - [GetOpenTournamentsSpockTest.groovy](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/GetOpenTournamentsSpockTest.groovy)
    + [Success test](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/GetOpenTournamentsSpockTest.groovy#L98)
    + [Insuccess test](https://github.com/tecnico-softeng/es20al_10-project/blob/develop/backend/src/test/groovy/pt/ulisboa/tecnico/socialsoftware/tutor/tournament/service/GetOpenTournamentsSpockTest.groovy#L113)

### Test Coverage Screenshot

The screenshot includes the test coverage results associated with the new/changed entities:

![Test Coverage Screenshot](http://web.tecnico.ulisboa.pt/ist189419/testCovTDP.png)


text:
---
title: Header
order: 1
---

# Site Header

At the top of every BYU page should be the University header.  It includes a BYU Logo, the name of the current site, user login/logout, site search, and a limited number of links.

## General Layout

The site header spans the width of the user's viewport and is 55 pixels tall. The background is {% include color.html color='navy' %}, and text is white.

On the left side of the header is a white version of the [BYU institutional monogram](https://identity.byu.edu/institutional/logos/monogram/)
followed by the site-specific title and a subtitle or supertitle.

On desktop, the right site is occupied by site-specific actions, user login/logout,
and site search.  On mobile, the right side has a button to trigger a dropdown menu containing site action links, user login/logout, and navigation, and the search field moves below the blue bar.

{% include mobile-and-desktop.html caption='Header Overview' desktop='images/all-header-options-desktop.png' mobile='images/all-header-options-mobile.png' %}

## BYU Logo

The layout of the logo remains the same at all screen sizes.

The logo, [available here](https://cdn.byu.edu/shared-icons/latest/logos/monogram-white.svg),
is 114px wide and 33px tall. It is positioned 16px from the left side and 11px from the top. There are 16px between the right edge of the logo and the left edge of the site title.

In mobile layouts, it is possible that the top bar will expand vertically in order to accommodate
long site titles.  In this case, the logo keeps the same positioning, 11px from the top.

{% include image.html src='images/logo-positioning.png' caption='Logo Positioning' %}

## Site Title

The site title should reflect the page that the user is currently on. It can be coupled with a subtitle or supertitle to help provide context or
to add additional information about an entity.

The site title uses the "Vitesse" font stack. On desktop views, the main title has a font size of 22px and the sub- or super- title has a font size of 14px.
On mobile, this is reduced to 16px for the main title and 12px for the sub or super title to help accommodate long
site titles and limited screen space.

{% include mobile-and-desktop.html desktop='images/desktop-single-line.png' mobile='images/mobile-single-line.png' caption='Simple title' %}

{% include image.html src='images/desktop-supertitle.png' caption='Title with supertitle - Desktop' %}

{% include image.html src='images/desktop-subtitle.png' caption='Title with subtitle - Desktop' %}

The site title is always 16px to the right of the logo. If used without a sub/super title, the site title is always centered
vertically in the header. When a sub- or super- title is present, the top and bottom of the title space should roughly align with the top and bottom of the logo.

In mobile views, when the site title and sub/super title are too long to fit on the bar, the bar expands vertically to accommodate the
text. When this happens, the top of the site title text should line up with the top of the logo (11px from the top).

repository: ThatJoeMoore/byu-style-guide

repo_name: ThatJoeMoore/byu-style-guide


text:
LINE
----

[![Join the chat at https://gitter.im/carpedm20/LINE](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/carpedm20/LINE?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

- Documentation : [http://carpedm20.github.io/line/](http://carpedm20.github.io/line/)
- Developer Mailing List: [Google Group](https://groups.google.com/forum/#!forum/line-python-developer)

*May the LINE be with you...*

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

**2017.05.27**

**Install Python:**

This project requires Python 2. It will not run under the latest Python 3. If you have Python 3 installed, it's not a problem. You may have multiple versions installed side-by-side. The latest version of Python 2 can be downloaded for all platforms [here](https://www.python.org/downloads/).

Linux users installing Python from a repository should be sure to install the `pip` package. Typically something like `python27` and `python27-pip`.

**Install LINE from repository:**

The LINE library has a number of dependencies. The easiest way to install them is through the use of a Python package manager such as `pip` or `easy_install`. (After installing the LINE library with dependencies, remove it leaving the dependencies behind. This allows the use of the libary files included in this repository.)

    pip install LINE
    pip uninstall LINE

**Install LINE from source:**

Alternatively, you may wish to install the LINE library from the source files.

    git clone https://github.com/Nilpo/LINE.git
    cd LINE
    python config.py
    python setup.py install

**Uninstall Newer Versions of Apache Thrift:**

Whichever method you used to install LINE, you will have installed Apache Thrift as a dependency. The current version Thrift 0.10.0 is unsupported and needs to be downgraded to Thrift 0.9.3.

    pip uninstall thrift
    pip install thrift==0.9.3

**Set up Environmental Variables**

It's a best practice to load private credentials from environment variables rather than hard-coding them into your project. This is the best way to handle login credentials such as usernames, passwords, and API keys.

***For Windows:***

 1. Click **Start** and search for _Environment Variables_.
 2. Click **Edit the environment variables** to open the **System Properties** dialog.
 3. Click **Environment Variables**.
 4. In the **System variables** section, click **New**.
 5. For **Variable name**, enter _LINE_CLIENT_ID_.
 6. For **Variable value**, enter your email address.
 7. Click **OK**.
 8. Repeat 5-7 to set up _LINE_CLIENT_PASS_.

***For Mac/Linux:***

The `export` command is used to assign environmental variables to your current session. Adding this to your `.bash_profile` file with allows these settings to persist across sessions.

    export<EMAIL_ADDRESS>>> ~/.bash_profile
    export LINE_CLIENT_PASS="password" >> ~/.bash_profile

After adding these lines, you can reboot or reload your profile.

    source ~/.bash_profile

Update
------

**2015.05.28**

`sendImage` and `sendImageWithURL` is fixed.

To send an Image:

    >>> contact = client.contacts[0]
    >>> contact.sendImage('./image.jpg')

Or use:

    >>> contact = client.contacts[0]
    >>> contact.sendImageWithURL('https://avatars3.githubusercontent.com/u/3346407?v=3&s=460')

**2015.03.31**

authToken expiration [issue](https://github.com/carpedm20/LINE/issues/9) solved.

update authToken **automatically**:

    $ pip install line --upgrade

There is nothing to change in your original code.

update authToken **manually**:

    $ pip install line --upgrade
    $ python
    >>> from line import LineClient, LineGroup, LineContact
    >>> client = LineClient("ID", "PASSWORD")
    >>> client.updateAuthToken() # manual update
    True

**2014.08.08**

Some codes are removed because of the request of LINE corporation. You can use library only with `authToken` login.

Screenshot
----------

![alt_tag](http://3.bp.blogspot.com/-FX3ONLEKBBY/U9xJD8JkJbI/AAAAAAAAF2Q/1E7VXOkvYAI/s1600/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA+2014-08-02+%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB+10.47.15.png)

Author
------

Taehoon Kim / [@carpedm20](http://carpedm20.github.io/about/)

repository: Nilpo/LINE

repo_name: Nilpo/LINE


text:
![kubernetes](https://cambiodigital-ol.com/wp-content/uploads/2019/02/Kubernetes_New.png)

# Easy Kubernetes Cookbook
I'm leaving Docker Swarm and Docker standalone to run all my workloads in Kubernetes, so, I'm building a few recipes with what I need and I posted here to share with others.

## Assumptions

All this recipes are created using Traefik as Ingress. So, in the services that require accesed from outside I'm setting an IngressRoute with TLS. Also, as I used a single node of Kubernetes, I set HostPath volumes to persist the data of the containers.

## Contribute

If you see that something can be improved, go ahead a contribute with this Cookbook.


text:
# 5ePrintableSpells
This program generates LaTeX code for all spells and their descriptions in 5e. You can use this to make a printable document with any collection of spells.

This is a work in progress. Some spells will probably have mistakes and formatting errors in them, so you should probably double check your selection.

## Instructions
1. Download the repository.
2. Download the the spell data from [here](https://github.com/TheGiddyLimit/TheGiddyLimit.github.io/tree/master/data/spells) . Place all the *.json* files in the data folder.
3. Run *generate_tex.py*. This will produce one *.tex* file for each spell. You'll find those in the output folder.
4. You can now use the spells in a Latex, either by copy-pasting the content or by using `\include{output/<spell_name>.tex}`. See *example.tex*.
5. Some spells might contain errors. You will have to fix them manually in the corresponding *.tex* file or write a fix into the script itself and submit a pull request.

## To do
 - Display material components with a cost
 - Better damage display for scaling cantrips
 - Prettier tables
 - Use colors to highlight important aspects


text:
# lua_oop
OOP tests for Lua.

Improving Lerg's metatables. They doesn't work on thier full potential

Tests were made on Lua 5.3.5

Here's original results:

      object count: 100000    step count: 20

      plain   create: 0.89400s (149.2%)       simulate: 10.32s (116.6%)       memory: 347.0MB f: 49916 h: 19725 z: 180275

      predef  create: 0.59900s (100.0%)       simulate: 8.85s (100.0%)        memory: 241.7MB f: 49916 h: 19725 z: 180275

      mt      create: 0.73900s (123.4%)       simulate: 10.48s (118.4%)       memory: 249.4MB f: 49916 h: 19725 z: 180275

Here's new results:

      object count: 100000    step count: 20

      plain   create: 0.89800s (206.9%)       simulate: 10.65s (115.4%)       memory: 347.0MB f: 49916 h: 19725 z: 180275

      predef  create: 0.61200s (141.0%)       simulate: 9.23s (100.0%)        memory: 241.7MB f: 49916 h: 19725 z: 180275

      new_mt  create: 0.43400s (100.0%)       simulate: 9.71s (105.2%)        memory: 166.8MB f: 49916 h: 19725 z: 180275

How you can see new meta's are better at creation but quite lacks on simulation part, also new meta's eat significantly less memory.

UPD: Actually, I understood that it's beter to change Lerg's metas to actually show the problem:-/

Here's improved Lerg's metas results:

      object count: 100000    step count: 20

      plain   create: 1.51900s (215.8%)       simulate: 18.02s (140.3%)       memory: 347.0MB f: 49916 h: 19725 z: 180275

      predef  create: 0.70400s (100.0%)       simulate: 12.84s (100.0%)       memory: 241.7MB f: 49916 h: 19725 z: 180275

      mt      create: 0.75700s (107.5%)       simulate: 13.94s (108.5%)       memory: 207.4MB f: 49916 h: 19725 z: 180275


text:
Batch.js
========

Batch.js is a tiny JavaScript library that enables sending batch requests to ASP.NET Web API using jQuery. More information on this library (as well as on OData in general) can be found here: http://volgarev.me/blog/re-discovering-microsoft-web-api.

## What is request batching ##

Batching is a way to pack several different API requests into the single HTTP POST request. The ASP.NET Web API middleware then unpacks the request and re-routs the individual requests to the appropriate API methods. Similarly, multiple responses are then going to be packed together and sent back to the client as a single HTTP response. This feature allows you to decrease the traffic between the server and the client dramatically making the entire communication much less "chatty" (and therefore, making your API more scalable).

Below are some resources that will get you started with batching support in ASP.NET Web API.

http://blogs.msdn.com/b/webdev/archive/2013/11/01/introducing-batch-support-in-web-api-and-web-api-odata.aspx
http://aspnetwebstack.codeplex.com/wikipage?title=Web+API+Request+Batching

## Using the code ##

The batching support is implemented via ```ajaxBatch``` method which can be called on a global jQuery object. The semantics of ```ajaxBatch``` method are more or less the same as with the native ```ajax``` method.

Below is an example of performing a batch request to a handler available at ```/api/batch```:

```javascript
$.ajaxBatch({
url: '/api/batch',
  data: [
    {
      type: 'GET',
      url: '/api/posts'
    },
    {
      type: 'POST',
      url: '/api/posts',
      data: {
        Title: 'Batch support in Web API'
      }
    }
  ],
  complete: function (xhr, status, data) {
    alert(data.length) // 2
  }
});
```

As you can see, there's an additional argument "data" which is passed to "complete" handler. The argument contains an array of object, where each element of the array corresponds to a single API response within the batch (the library assumes that the order of the responses within the batch is the same as the order of the requests, although this can be customized at the server level). Each element represents an object with two fields:

- ```status``` - HTTP status code (e.g. 200).
- ```data``` - Evaluated response data (if any).

## Dependencies ##

Batch.js depends on jQuery >= 1.5.x (although, this dependency can easily be eliminated). The library also takes advantage of the native JSON library (e.g. ```parse``` and ```stringify``` methods). Please refer to https://github.com/douglascrockford/JSON-js if you're targeting browsers that don't support JSON object natively.

## Known issues ##

Currently Batch.js only supports ```application/json``` as content type (and therefore, enforces it when sending the request and receiving the response).

repository: volpav/batchjs

repo_name: volpav/batchjs


text:
## Set up AWS cloud architecture

As stated earlier, running a course with [`rudaux`](https://github.com/UBC-DSCI/rudaux) requires 3 pieces of AWS cloud architecture:

1. One AWS EC2 instance will be used to host and serve the student JupyterHub (where students will complete their homework).

2. One AWS EC2 instance will be used to host and serve the grading JupyterHub (where the teaching team will perform grading and where the autograding will be done).

3. One Amazon elastic filesystem (EFS) mounted on both the student and grading JupyterHubs to allow for simple transfer of files between the two JupyterHubs for grading.

The following documentation will walk you through setting up each of these using the AWS web user interface.

repository: UBC-DSCI/rudaux

gha_language: HTML

repo_name: UBC-DSCI/rudaux


text:
# Low Latency Communications Agenda (9am - 4pm with 12-1pm Lunch)

Intro to SBE: 9-10am
* Break: 10 min

Intro to Aeron: 10-11am
* Break: 10 min

Exercise 1: 11-12pm
* intro to auctions and exercises: 20 min
* given domain model of an auction system, turn it into a service that listens on an Aeron stream
(receiving and decoding) for the following commands:
    1. new auction
    1. bid on auction
* SBE schemas are provided for the commands

Exercise 2: 1-2pm
* add activity feed to auction service (sending and encoding). Events are:
    1. new auction
    1. new high bid on auction
    1. auction won
    1. list of active auctions (periodic)
* SBE schemas are provided for the events on the activity feed
* break: 10 min

Exercise 3: 2-3pm
* discussion of how schema's could work (new version?, new templateIds?, deprecate?): 15 min
* add a new type of auction to the service. A fixed amount of items.
* new domain model including new auction type provided
* SBE schemas updated for commands and activity feed events
* break: 10 min

Exercise 4: 3-4pm (If we have time and the WiFi cooperates!)

repository: tmontgomery/Amaethon

repo_name: tmontgomery/Amaethon


text:
# Unity plugin -- How to build an application for Linux

## Introduction
In this tutorial, we will show how easy it is to build an application for Linux when you are running the Unity editor on Windows.

Note that the current official plugin version does not support Linux. The Linux support is currently in beta.

We won't cover how to create the scenes, as it's the exact same as Windows and covered in our [Unity documentation](https://www.stereolabs.com/docs/unity/).

## Requirements
* Requires Unity 2018.x. (plugin is now using UnityEngine.XR)
* Unity Editor in OpenGLCore/Desktop graphic API (DirectX does not exist on Linux)
* ZED Unity Plugin from github, on Linux_compatibility_beta branch.

## What's Different about the Linux Native Plugin?

The Unity plugin revolves around the ZED Unity wrapper, sl_unitywrapper.dll, a single library that provides access to ZED SDK functions. Under Windows, you can find this library in SDK/Plugins/Win64/.

Under Linux, it's instead an .so library (similar to a dll for Linux) called libsl_unitywrapper.so in the SDK/Plugins/Linux/ folder.

Under the hood, there are some differences with the Windows version:
- On Windows, the .dll is dynamically linked against the ZED SDK and statically linked against CUDA(rt). Therefore, due to the way Windows resolves the dependencies, the wrapper will load the ZED SDK libraries installed on the PC.
- On Linux, any dependencies of a library must be linked once the executable is created.<br/>
 Since we support multiple CUDA versions and multiple Ubuntu LTS versions (16 and 18), that would mean a different version for each configuration. Since when you are building an application for Linux, you may not know what the final target would be, other than that it's Linux. It was not possible to keep it that way.

To solve this, the ZED SDK is statically embedded in the Linux wrapper library. The big advantage this provides is that you don't need to worry about the CUDA version and even the Ubuntu version (for 16LTS and 18LTS).
Furtermore, unlike Windows, you *don't need to install the ZED SDK* on the target device since it is already inside the wrapper.
 *One library to rule them all...*

## Install the Linux Build Support on Windows

When you install Unity on Windows, it does not come with Linux build support by default. This is what you need to specify that the application will run on Linux.
To install it, go to the Unity Hub on the *Installs* tab :
On the desired Unity version, click on *...* and select Add Component:

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

This will open a list of components you can add to your installation. Select Linux Build Support:

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

Wait for the installation to complete and restart Unity Hub.

## Create your Project in Unity

* When Unity is started, create a new project, enter a name and click on "Create Project"
* In the menu bar, click on Assets >> Import Package >> Custom Package... and select the ZED Unity package file (xxxxx.unitypackage). The unity import window should appear and click on "import".
* In the project window, select one of the provided scene located in ZED/Examples/XXXX/Scenes/ by double clicking on it. You can also use the prefabs.
* A simple scene with spheres and cubes should appear in the Scene and Game window.
* Click on play button to launch it.

## Build the Application

On the Unity Menu bar, click on **File** -> then **Build Settings** to build your application (or Ctrl+Shift+B). A familiar popup will open.
Now that you've installed Linux support in Unity, you can choose Linux as the Target Platform in addition to Windows.

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

* Select Linux and click on Build.

* Under Linux, the application will be called XXXXX.x86_64 with a XXXX_data folder attached. Inside the XXX_data/plugins folder, you will see the libsl_unitywrapper.so directly inside.

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

* Copy both the file and folder oto your Linux desktop. You may need to set the file as an executable :
`$ chmod +x ./XXXXX.x86_64`

Launch the application and enjoy it running on Linux.

gha_language: C#


text:
---
title: Deploy to Github Pages
date: "2020-01-05T11:56:03.284Z"
description: "Deploy the blog to Github Pages"
---

## Navigate to the Gatsby Project root folder

`cd C:\[path-to-gatsby-project-folder]\`

## Install gh-pages

`yarn add --dev gh-pages`
or
`npm install -D gh-pages`

## gatsby-config.js changes

### Add the Github Repository name to pathPrefix

```javascript
module.exports = {
  pathPrefix: "/my-blog-starter",
}
```

## package.json changes

### Add the Github Repository name to homepage setting

```json
"homepage": "https://snerks.github.io/my-blog-starter",
```

### Add the Github Repository name to repository.url setting

```json
"repository": {
    "type": "git",
    "url": "git+https://github.com/snerks/my-blog-starter.git"
},
```

## scripts changes

### Add a deploy script for gh-pages

```json
"scripts": {
    "deploy": "gatsby build --prefix-paths && gh-pages -d public"
}
```

### Deploy to Github Pages

`yarn run deploy`
or
`npm run deploy`

Refer to [this page](https://www.gatsbyjs.org/docs/how-gatsby-works-with-github-pages/), for more details on how to deploy to
[Github Pages](https://www.gatsbyjs.org/docs/how-gatsby-works-with-github-pages/).

repository: snerks/my-blog-starter

gha_language: JavaScript

repo_name: snerks/my-blog-starter


text:
## Notes

- Make the `h` tags scale up by a factor of `sqrt(2)`, but change their `line-height` in increments of `rem`: naturalistic increase in fontsize, with a atomic grid approach to spacing