text:
# CGen
CGen allows for C code to be produced and then compiled from Tokens.

CGen only requires a vector of tokens to be passed to the CGen method and it returns C code as a string. Pass that into the Compile method and it will place a C file where ever the temp directory was set through the Arg Engine and then it will be compiled.

A main file is included that shows what a hello world program would look like in CGen. CGen can just be compiled as a lib and linked to.

Clang is needed for CGen so one will have to be placed next to the executable that links CGen or CGen itself. This is untill a Clang path can be added to the Arg Engine.

# Arg Flags

The Arg Engine will abort once it hits any of theses flags. Theses flags should be passed to a executable version of CGen but they can be passed when called as a lib.

- -help || shows all the args that can be passed to the Arg Engine
- -h || shows all the args that can be passed to the Arg Engine

- -git || shows the link to be used when cloning the git repo
- -g || shows the link to be used when cloning the git repo

- -git-url || shows the web url for the github
- -url || shows the web url for the github

Theses flags can be hit and will not abort

- -name || -name "name" || sets the name of the program if not given the name defaults to Prog
- -n || -n "name" || sets the name of the program if not given the name defaults to Prog

- -out || -out "exe" || sets the output file type if not given it will default to exe
- -o || -o "exe" || sets the output file type if not given it will default to exe

- -run || -run "true" || sets if the program should run after compiling, if not given it will by default
- -r || -r "true" || sets if the program should run after compiling, if not given it will by default

# Building
CGen uses Premake and a project file is given with the source.

repository: SeanMott/CGen

repo_name: SeanMott/CGen


text:
---
title: Published Language
permalink: /docs/published-language/
---

The Published Language pattern describes a relationship between two bounded contexts and is used on a [context map](/docs/context-map/) in CML. The [Language Semantics](https://contextmapper.org/docs/language-model/) page describes all relationship types that are supported in CML.

## Syntax
The Published Language pattern can be used as a role for the upstream context in a Upstream/Downstream relationship by using the **PL** abbreviation.
The following example illustrates the syntax:

PolicyManagementContext [D,CF]<-[U,OHS,PL] CustomerManagementContext {
  implementationTechnology = "RESTful HTTP"
}

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: SCSS

gha_license_id: MIT

license_type: permissive


text:
# Rust LeetCode
These are the solutions for LeetCode's 30-Day Challenge in Rust.

## Running the Solution
To run the solutions, simply run `cargo run --bin {BINARY}`.
For example, `cargo run --bin day01` will run [src/bin/day01.rs](src/bin/day01.rs).

## Unit Tests
To run the unit tests for the solutions, simply run `cargo test`.

gha_language: Rust


text:
# Scripts in Atom
This package allow you to bind javascript functions to commands (`Ctrl-Shift-P`) and key bindings just by writing those in a file.

## How To
In the root of a specific the desired project, create a file named `scripts.js`. In this file, you will code the functions related to the this very project root, thus not binding them to stranger files.

![](walkthrough.gif)

## Scripts File
Each scripts file must be a node module exporting an array of objects with the following properties:

- **name:** Contains a string command name in lower case, dash separated words format. Ex.: 'build'; This will be used to identify the script.
- **match:** Contains a string with a regex pattern. Eg.: `'^index\\.js$'`; This will filter the files allowed to run the script.
- **hotkey:** Contains a [key combination string][1] in the atom default pattern. Eg.: `'ctrl-f9'`; This will be the registered key binding for the script.
- **script:** Contains the actual script as a function. The function will receive a `data` argument whose members provide a few utilities:
    - `file`: A string containing the active file path.
    - `project`: A string containing the active project root path.
    - `exec`: The `child_process` [function][2] for executing shell commands.

So we end up with the following file `scripts.js`.

```javascript
module.exports = [
    {
        name: 'build',
        match: '^index\\.js$',
        hotkey: 'ctrl-f9',
        script: (data) => {
            // Your code here...
        }
    },

    {
        name: 'debug',
        match: '^.*\\.js$',
        hotkey: 'ctrl-f8',
        script: (data) => {
            // Your code here.
        }
    }
]
```

## Contributing
For bug reporting, feature requesting and any issues, please refer to our [active GitLab repo](https://gitlab.com/guillitem/atom-scripts). Enjoy scripting!

[1]: http://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/#key-combinations
[2]: https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback

repository: raisch/atom-config

repo_name: raisch/atom-config


text:
# project name.
Delani studio.
#### Project description.
this is Delani studio's services:

.Design

Our design practice offers a full range of services including brand strategy, interaction and visual design and user experience testing.
Throughout your project, our designers create and implement visual design and workflows, solicit user feedback and work with you to make sure what gets built is what is needed.

.Development

All engineers are fluent in the latest enterprise, mobile and web development technologies.

They collaborate with your team to write, and improve code on a daily basis, using proven practices such as test-driven development and pair programming.

.Product Management

Planning and development is iterative. Because we are constantly coding and testing, the products we build are always ready to go live.
This iterative process allows for changes as business requirements evolve.
## Author's information
this is Aline Ingabire, Am the own who developed this site.
this delani studio was created on 26.07.2019.

## Setup/Installation Requirements
* find visual studio
* ubuntu , terminal
* downloading bootstrap  and then copy file of bootstrap which called bootstrap.min.css.
* link java script to your html
* link your jquery to html
* cd Desktop
* using jquery  for me i use this one jquery-3.4.1.min.js
* git clone
* code .
* link css also in your html

## Technologies used.
this application was developed by using html , css, bootstrap, javascript, jquery, and  google fonts.
## Contact information.
for any issues please contact me on my<EMAIL_ADDRESS>### License and Copyright information.
 MIT license

 copyright(c)2019 aline ingabire

repository: aline-bebe/studio

repo_name: aline-bebe/studio


text:
---
layout: post
title:      "What's the most important thing to understand about Variables and Methods?"
date:       2020-05-16 22:54:53 +0000
permalink:  whats_the_most_important_thing_to_understand_about_variables_and_methods
---

For me, what is the important thing to understand about Variables an Methods is by following the 5 W's. Who, what, when, where, and why.  The most important thing to understand is what they are. Variables are words or characters that hold values, variables allow us to store information. Methods tell your Ruby program to do a routine or behavior that it can do. One phrase that I like and understand the most is that Variables are like nouns and methods are like verbs.

extension: markdown


text:
## STARTING OFF:

Make sure you have npm installed.
From the root project directory, run:
```
npm install http-server -g
```

From the root project directory, run:
```
http-server
```

View at: http://localhost:8080/0002-vectors-part-2

## CONCEPTS:

* Vectors Part 2: Negation, Magnitude, Normals, Addition, Subtraction

## RESOURCES:

* https://github.com/davidwparker/programmingtil-3d-math/tree/master/0002-vectors-part-2
* Slides JS: https://github.com/hakimel/reveal.js/
* Math JS: https://www.mathjax.org/


text:
---
title: Toxic Content Monitoring
date: "2020-05"
template: "project"
draft: false
slug: "toxic-content-monitoring"
category: "Natural Language Processing"
tags:
  - "Natural Language Processing"
  - "Project"
description: "In recent years, many articles have highlighted the toxic world of internet comments and intenet posts. The following is a tool built to monitor and categories user comments into six
categories."
socialImage: "/media/image-0.jpg"
---
[![Alt text](/media/icons/GitHub-Mark-32px.png)](https://github.com/andronikmk/toxic-content-monitoring)

## Introduction

In recent years, many articles have highlighted the toxic world of internet comments and intenet posts.
Reddit has announced its "anti-evil team" and YouTube has diasbled the comments section on videos featuring
children. The internet of today is a far cry from the early days when cyber-utopians heralded in a new era
of human collaboration and communication. While furfilling my role as a Data Science Intern at Big Armor,
our team was tasked to come up with an application to be used by social workers to monitor and report potentially
harmful and toxic online behavior. Systems exist to detect toxicity, suicidality, and other concerning behavior, but
they are all either whole system programs or limited to a small number of topics.
The model that performs best is a Bi-directional LSTM + GRU neural network made with PyTorch.

## Models and Metrics

Our model is used to determine if text contains the following characteristics:

+ toxic
+ severe toxic
+ obscene
+ threat
+ insult
+ identity hate

The API returns clean text, labeled True or False, and the predicted probability of each. The current model is a Bi-directional LSTM + GRU neural network made with
PyTorch, assuming FastText vectorization. Considerable preprocessing is
performed on the text before vectorization. The metrics used for evaluation
are F1 and ROC-AUC scores.

F1 score is defined as the harmonic mean between precision and recall and is measured on a scale from 0 to 1. Recall demonstrates how effectively this model identifies all relevant instances of toxicity. Precision demonstrates how effectively the model returns only these relevant instances. The AUC score represents the measure of separability, in this case, distinguishing between toxic and non-toxic content. Also on a scale of 0 to 1, a high AUC score indicates the model successfully classifies toxic vs non-toxic. The ROC represents
the probability curve. The F1 score for this model is 0.753 and the ROC-AUC score is 0.987.
The figure above shows all the various models our team assembled with top performing model show on the top right hand side
of the chart.

## Presentation

repository: andronikmk/blog

repo_name: andronikmk/blog


text:
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netbox_ipam_aggregate Resource - terraform-provider-netbox"
subcategory: ""
description: |-
  Manage an aggregate (ipam module) within Netbox.
---

# netbox_ipam_aggregate (Resource)

Manage an aggregate (ipam module) within Netbox.

## Example Usage

```terraform
resource "netbox_ipam_aggregate" "aggregate_test" {
  prefix = "<IP_ADDRESS>/24"
  rir_id = netbox_ipam_rir.rir_test.id
  date_created = "2020-12-21"

  tag {
    name = "tag1"
    slug = "tag1"
  }

  custom_field {
    name = "cf_boolean"
    type = "boolean"
    value = "true"
  }

  custom_field {
    name = "cf_date"
    type = "date"
    value = "2020-12-25"
  }

  custom_field {
    name = "cf_text"
    type = "text"
    value = "some text"
  }

  custom_field {
    name = "cf_integer"
    type = "integer"
    value = "10"
  }

  custom_field {
    name = "cf_selection"
    type = "select"
    value = "1"
  }

  custom_field {
    name = "cf_url"
    type = "url"
    value = "https://github.com"
  }

  custom_field {
    name = "cf_multi_selection"
    type = "multiselect"
    value = jsonencode([
      "0",
      "1"
    ])
  }

  custom_field {
    name = "cf_json"
    type = "json"
    value = jsonencode({
      stringvalue = "string"
      boolvalue = false
      dictionary = {
        numbervalue = 5
      }
    })
  }

  custom_field {
    name = "cf_object"
    type = "object"
    value = data.netbox_dcim_platform.platform_test.id
  }

  custom_field {
    name = "cf_multi_object"
    type = "multiobject"
    value = jsonencode([
      data.netbox_dcim_platform.platform_test.id,
      data.netbox_dcim_platform.platform_test2.id
    ])
  }
}
```

## Schema

### Required

- `prefix` (String) The network prefix of this aggregate (ipam module).
- `rir_id` (Number) The RIR id linked to this aggregate (ipam module).

### Optional

- `custom_field` (Block Set) Existing custom fields to associate to this ressource. (see [below for nested schema](#nestedblock--custom_field))
- `date_added` (String) Date when this aggregate was added. Format *YYYY-MM-DD*.
- `description` (String) The description of this aggregate (ipam module).
- `tag` (Block Set) Existing tag to associate to this resource. (see [below for nested schema](#nestedblock--tag))
- `tenant_id` (Number) ID of the tenant where this object is attached.

### Read-Only

- `content_type` (String) The content type of this aggregate (ipam module).
- `created` (String) Date when this aggregate was created.
- `family` (String) IP family of this aggregate.
- `id` (String) The ID of this resource.
- `last_updated` (String) Date when this aggregate was last updated.
- `url` (String) The link to this tag (extra module).

### Nested Schema for `custom_field`

Required:

- `name` (String) Name of the existing custom field.
- `type` (String) Type of the existing custom field (text, longtext, integer, boolean, date, url, json, select, multiselect, object, multiobject, selection (deprecated), multiple(deprecated)).
- `value` (String) Value of the existing custom field.

### Nested Schema for `tag`

Required:

- `name` (String) Name of the existing tag.
- `slug` (String) Slug of the existing tag.

## Import

Import is supported using the following syntax:

```shell
# Aggregates can be imported by id
terraform import netbox_ipam_aggregate.aggregate_test 1
```

license: ISC

repository: smutel/terraform-provider-netbox

gha_language: Go

gha_license_id: ISC

repo_name: smutel/terraform-provider-netbox


text:
# chunksv

Python wrapper for `csv.reader` that can process files in predefined chunks.

## purpose

This library allows a user to partition a filestream into partitions of a predefined size. It was initially
motivated by the need to process large CSV files from AWS S3 while keeping application code clean.

## package installation and usage

The package is available on PyPI:

```shell
python -m pip install chunksv
```

The library can be imported and used as follows:

```python
import chunksv

with open("file.csv", "r") as f:
    rows = chunksv.reader(
        f,
        max_bytes=<size of each partition>,
        header=[<optional columns list>]
    )
```

When the `reader` object has consumed enough rows to reach the `max_bytes` limit, it will raise `StopIteration`. To
consume more rows from the input stream, call `reader.resume()`:

```python

while not rows.empty:
    current_partition = [r for r in rows]
    < process partition here >
    rows.resume()
```

repository: bengetch/chunksv

branch_name: refs/heads/main

repo_name: bengetch/chunksv


text:
---
title:  "Instant Ramen Taikai 2022"
date:   2022-02-15 14:00:00 +0100
categories: tournaments
lang: en
---

{% capture fig_img %}
![Instant Ramen Taikai]({{ "/assets/images/2022-02-15-instant-ramen-taikai.png" | relative_url }})
{% endcapture %}

  {{ fig_img | markdownify | remove: "
" | remove: "
" }}

It's time for the first chicken-flavored riichi tournament in Kraków!
The tournament will be held on 3rd April 2022 in [Boardowa Cafe](http://boardowa.pl/)
and will use modified [EMA](http://mahjong-europe.org/) rules. Additionally, the tournament
will be included in the [Upper-Silesian Mahjong Association](https://mahjongsilesia.wordpress.com/) ranking.

Below you will find all the tournament details and the link to the registration form.
We accept new participants until 20th March, but we'd like to accept sign-ups as fast as possible
in order to be able to estimate the number of participants.

Every registered participant gets a cup of instant ramen for DIY preparation + multi-use chopsticks for eating the ramen. ❤

## About

* Date: 3rd April 2022 (Sunday)
* Place: [Boardowa Cafe, Topolowa 52, 31-506 Kraków](https://g.page/Boardowa)
* Rules: **modified** EMA 2016; uma +15/+5/-5/-15; no oka
* Hanchans: 4
* Judges: Michał Herda (will not play)
* Substitute players: TBA
* Fee: 45 PLN (30 PLN for use at the Boardowa bar)
* Participant limit: 24
* Scoring: [Mahjong Tracker](https://mahjongtracker.com/)

## Rules

The ruleset is **EMA 2016 with the following modifications:**

### Bird of Honor
1s is counted as one of souzu *or* an active honor depending on what gives a greater score. This means the following:

* A pair of 1s can give 2 fu for an active honor pair (it blocks pinfu this way);
* 1s is neither a dragon nor a wind, so it cannot replace any in shousangen/daisangen lub shousuushii/daisuushii;
* A koutsu or kantsu from 1s can count as **fanpai kura** (see below).

### Additional yaku: fanpai kura (蔵)
* Koutsu or kantsu from 1s treated as honors.
* Valid for winning via tsumo or ron.
* Worth 1 han.

### Additional yaku: kinkei dokuritsu (金鶏独立)
* Four melded groups + single wait (hadaka tanki) on 1s.
* Valid for winning via tsumo or ron.
* Always worth 5 han (mangan), does not combine with other yaku (but combines with dora).

### Yakitori

* Penalty for not winning a single hand during the whole hanchan.
* Worth -10000 points, counted before uma.

### Examples

{% capture fig_hand1 %}
![111123444m6z_6z_111*s]({{ "/assets/images/2022-02-15-instant-ramen-taikai-hand1.png" | relative_url }})
{% endcapture %}

  {{ fig_hand1 | markdownify | remove: "
" | remove: "
" }}

The hand above is a honitsu in manzu + fanpai kura.

{% capture fig_hand2 %}
![111s333s9s_9s_4*56s_7*65s]({{ "/assets/images/2022-02-15-instant-ramen-taikai-hand2.png" | relative_url }})
{% endcapture %}

  {{ fig_hand2 | markdownify | remove: "
" | remove: "
" }}

This hand does not use the bird of honor rule, because then it would count only as honitsu + kura;
instead, this hand is a "standard" chinitsu in souzu.

{% capture fig_hand3 %}
![111s1z_1z_4*44z_55*5**5z_7*77z]({{ "/assets/images/2022-02-15-instant-ramen-taikai-hand3.png" | relative_url }})
{% endcapture %}

  {{ fig_hand3 | markdownify | remove: "
" | remove: "
" }}

This hand is yakuman tsuuiisou.

{% capture fig_hand4 %}
![123345678m11s34s_2s]({{ "/assets/images/2022-02-15-instant-ramen-taikai-hand4.png" | relative_url }})
{% endcapture %}

  {{ fig_hand4 | markdownify | remove: "
" | remove: "
" }}

If we count the 1s as pair as a honor pair, we get 2 fu.
It is better to instead count it as a pair of normal tiles, which gets us pinfu.

{% capture fig_hand5 %}
![1s_1s_2*34m_555*z_7*77s_8*79p]({{ "/assets/images/2022-02-15-instant-ramen-taikai-hand5.png" | relative_url }})
{% endcapture %}

  {{ fig_hand5 | markdownify | remove: "
" | remove: "
" }}

This is just a kinkei dokuritsu, worth a mangan - we ignore the white dragon.

{% capture fig_hand6 %}
![1s_1s_3*33s_44*4s_888*s_99*9s]({{ "/assets/images/2022-02-15-instant-ramen-taikai-hand6.png" | relative_url }})
{% endcapture %}

  {{ fig_hand6 | markdownify | remove: "
" | remove: "
" }}

If we count kinkei dokuritsu, then this hand is only a mangan.
We should instead count it as chinitsu toitoi, worth a haneman.

## Agenda

| Godzina       | Etap                |
|---------------|---------------------|
| 09:00 - 09:30 | Registration        |
| 09:30 - 09:45 | Opening ceremony    |
| 09:45 - 11:00 | 1st hanchan         |
| 11:30 - 12:45 | 2nd hanchan         |
| 12:45 - 14:30 | Lunch break         |
| 14:30 - 15:45 | 3rd hanchan         |
| 16:15 - 17:30 | 4th hanchan         |
| 17:45 - 18:00 | Closing ceremony    |

## Participant list

| First name | Last name  | Nickname   | City             |
|------------|------------|------------|------------------|
| Dominik    | Jarno      |            |                  |
| Szymon     | Nowicz     |            | Zbrosławice      |
| Joanna     | Zalewska   | Tuptaju    | Warszawa         |
| Adrian     | Fornalik   | Miku       | Poznań           |
| Tomek      | Dwojacki   |            |                  |
| Bartosz    | Kruger     | Chapatsu   | Kraków           |
| Jacek      | Spychała   | Jackek     | Katowice         |
| Dominik    |            | Eshiyo     |                  |
| Bartosz    | Kawa       |            | Kraków           |
| Egor       | Egorov     | Punch      | Kraków           |
| Tatsuya    | Igarashi   | 夏夢想        | Katowice         |
| Ula        | Szudlich   |            | Dąbrowa Górnicza |
| Paweł      | Polański   |            | Warszawa         |
| Paweł      | Kruk       | Kruker     | Rzeszów          |
| Bartłomiej | Żok        |            | Rzeszów          |
| Artur      | Libich     |            | Łódź             |
| Łukasz     | Gosk       | Żokun      | Poznań           |
| Jakub      | Titow      | Tribell    | Wrocław          |
| Mateusz    | Maćkowski  |            | Kraków           |
| Dawid      | Bronowicki |            | Kraków           |
| Alex       | Gradowski  | Mironty    | Kraków           |
|            |            | haoma      |                  |
| Shu        |            |            |                  |
|            |            | Tobas      |                  |

## Registration

[Here!](https://forms.gle/cDMZcCej329RFSti8)

gha_language: HTML


text:
# Python Bytes 192
Sponsored by us! Support our work through:

- Our [**courses at Talk Python Training**](https://training.talkpython.fm/)
- [Test & Code](https://testandcode.com/) Podcast

**Brian #1:** [**Building a self-updating profile README for GitHub**](https://simonwillison.net/2020/Jul/10/self-updating-profile-readme/)

- Simon Willison, co-createor of Django
- “GitHub quietly released a new feature at some point in the past few days: profile READMEs. Create a repository with the same name as your GitHub account (in my case that’s [github.com/simonw/simonw](https://github.com/simonw/simonw)), add a `README.md` to it and GitHub will render the contents at the top of your personal profile page—for me that’s [github.com/simonw](https://github.com/simonw)”
- Simon takes it one further, and uses GitHub actions to keep the README up to date.
- Uses Python to:
	- Grab recent releases from certain GH repos using GH GraphQL API
	- Links to blog entries using feedparser
	- Retrieve latest links using SQL queries

**Michael #2:** [**Handcalcs**](https://github.com/connorferster/handcalcs)

- Created by Connor Ferster
- In design engineering, you need to do lots of calculations and have those calculation sheets be kept as legal records as part of the project's design history.
- If they are not being done by hand, then often Excel is used but formatting calculations in Excel is time consuming and a maintenance nightmare.
- However, doing calculations in Jupyter is not any better even if you fill it up with print() statements and print to PDF: it just looks like a bunch of code output.
-  Even proprietary software like MathCAD cannot render math as good as a hand calculation because it does not show the numerical substitution step. No software does
- **Why handcalcs exists:**
- Type the formula once into a Jupyter cell
- Have the calculation be rendered out as beautifully as though you had written it by hand.
- Write your notebooks once, and use them for calculation again and again; the formula you write is the same as the representation of the formula.
![](https://raw.githubusercontent.com/connorferster/handcalcs/master/docs/images/basic_demo.gif)

- `**Symbolic**` The primary purpose of `handcalcs` is to render the full calculation with the numeric substitution. This allows for easy traceability and verification of the calculation.
- However, there may be instances when it is preferred to simply display calculations symbolically. For example, you can use the `# Symbolic` tag to use `handcalcs` as a fast way to render Latex equations symbolically.
- Includes **longhand vs. shorthand**
- Use units (mm^3) for example.

**Brian #3:** [**The (non-)return of the Python print statement**](https://lwn.net/Articles/823292/)

- Article by Jake Edge
- Idea by Guido van Rossum to bring back the print statement.
- Short answer: not gonna happen

**Michael #4:** [**FastAPI for Flask Users**](https://amitness.com/2020/06/fastapi-vs-flask/)

- Flask has become the de-facto choice for API development
- FastAPI that has been getting a lot of community traction lately
- Benefits
	- Automatic data validation
	- documentation generation
	- baked-in best-practices such as pydantic schemas and python typing
- Running “Hello World” - super similar, but FastAPI is uvicorn out of the box
- `@app.get('/')` vs `@app.route('/')`
- FastAPI defers serving to a production-ready server called `uvicorn`.
- URL Variables:
    - Flask
```
    @app.route('/users/<int:user_id>')
    def get_user_details(user_id):
```

	- FastAPI

```
    @app.get('/users/{user_id}')
    def get_user_details(user_id: int):
```
- Query Strings
	- Flask
```
    @app.route('/search')
    def search():
        query = request.args.get('q')
```

- FastAPI

```
    @app.get('/search')
    def search(q: str):
```

- Taking inbound JSON request in FastAPI:
`def lower_case(json_data: Dict)`
- Nice but if you define a `Sentence` model via pydantic:

```
    @app.post('/lowercase')
    def lower_case(sentence: Sentence):
```

- Blueprints == Routers
- Automatic validation via pydantic

**Brian #5:** [**Tweet deleting with tweepy**](https://gist.github.com/chrisalbon/b9bd4a6309c9f5f5eeab41377f27a670)

- Chris Albon
- A useful and simple example of using tweepy to interact with Twitter
- Chris set up and shared a Python script that deletes tweets that are:
	- older than 62 days
	- have been liked by less than a 100 people
	- haven’t been liked by yourself

**Michael #6:** [**Clinging to memory: how Python function calls can increase your memory usage**](https://pythonspeed.com/articles/function-calls-prevent-garbage-collection/)

- by [Itamar<EMAIL_ADDRESS>- I had Itamar on [Talk Python episode 274](https://talkpython.fm/274) to discuss FIL which was recently covered.
- This article basically uses FIL to explore patterns for lowering memory usage within the context of a function.
- With simple code like this, we expected 2GB of memory usage, but we saw 3GB:
-
```
    def process_data():
        data = load_1GB_of_data()
        return modify2(modify1(data))
```

- The problem is that first allocation: we don’t need it any more once `modify1()` has created the modified version. But because of the local variable `data` in `process_data()`, it is not freed from memory until `process_data()` returns.
- **Solution #1: No local variable at all**

```
    return modify2(modify1(load_1GB_of_data()))
```

- **Solution #2: Re-use the local variable**

```
    data = load_1GB_of_data()
    data = modify1(data)
    data = modify2(data)
    return data
```

- **Solution #3: Transfer object ownership**
    - See article

Extras:

Michael:

- **Pickle Use Example via  Adam.**
	- I once had to work on an API that spoke to a 3rd party service that was a little unusual. That communication to the 3rd party service was over a raw socket connection, so we were responsible for crafting specifically formatted byte arrays to send to them, and we'd get specifically formatted byte arrays back which we'd then have to parse out to determine what pieces of data were in the message. The other wrinkle: that service wasn't available 24/7 but only during limited specific testing periods which had to be negotiated days in advance.
	- We instrumented the code with a feature flag to enable pickling all received messages from that 3rd party service.
- [Python 3.8.4 is out](https://www.python.org/downloads/release/python-384/)
- [I'm an Arctic Code Vault Contributor](https://github.com/mikeckennedy/) over at GitHub. You might be too.

Joke:

[](http://geek-and-poke.com/geekandpoke/2019/10/20/qa-best-practices)
![http://geek-and-poke.com/geekandpoke/2019/10/20/qa-best-practices](https://trello-attachments.s3.amazonaws.com/58e3f7c543422d7f3ad84f33/5f0751415f713e68c3cd2653/41a92bd352d8a14b62152d3c79f759df/coverage.png)

gha_language: Python


text:
# Sentimental

A sentiment analyzer for English, Dutch and German. Feel free to add more languages.

## Scoring

Word scores are normalized to a scale between -1 and 1 and all scores in a sentence are summed for the total score. The higher the score the more positive the sentiment.

Words are sourced from:

- English: the [AFINN-165](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6010)
- Dutch: [Moors et al](http://crr.ugent.be/papers/Moors_et_al_BRM_norms_Valence_Arousal_Dominance_AoA.pdf)
- German: [Leipzig Affective Norms for German](https://link.springer.com/article/10.3758%2FBRM.42.4.987)

German is by far the smallest word list and therefor the least reliable.

## install

```npm install --save sentimental```

```javascript
  const sentiment = require('sentimental');

  const s = sentiment('EN', 'Cats are amazing!');
  // Results in: 0.8 score
```

## Credits

Inspired and based upon [Andrew Sliwinskis Sentiment](https://github.com/thisandagain/sentiment)

## License

Copyright 2017 Hidde Stokvis

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

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

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

repository: hiddestokvis/sentiment

repo_name: hiddestokvis/sentiment


text:
# libssh 0.9.5

The APKBUILD was taken from Alpine 3.13.

Changes:
  * added libssh-static package
  * reduced the number of the required dependencies

repository: sjinks/aports

repo_name: sjinks/aports


text:
1. Use whatever you prefer, but keep it consistent per-file,
 ideally per-codebase ('a Rapture mod' or 'the deobf libs' being a codebase)

2. Use quoted properties whenever not dealing with CrossCode itself.
 If you *don't* do this, and in future a property is defined
  that overlaps with yours, there'll be trouble.

I'm introducing a tool, mod-lint.js, to help out;
 basically, if code isn't ALREADY broken on reobf, it'll warn you.

If it is already broken, then you're kind of screwed, because if the information
 about if a prop should be reobf'd was available, we wouldn't need to quote.


text:
---
layout: post
title: "Building a Slack clone using Laravel, Tailwind CSS and Vue.js"
date:   2018-03-28 16:42:01 -0300
tags: laravel broadcasting slack websockets
---

I shared a [tweet](https://twitter.com/tonysmdev/status/967481096995856385) a while back about building a Slack clone app in PHP using Laravel, VueJS, TailwindCSS, and Pusher. That got some attention, so I was invited by [Pusher](https://pusher.com/) to blog about using Pusher on it.

If you are into Laravel and/or WebSockets, check it out at [Pusher blog](https://blog.pusher.com/slack-clone-laravel-tailwindcss-vuejs/).


text:
---
title: Touch UI Feature Status
description: Release notes specific to [!DNL Adobe Experience Manager] Touch-Enabled UI.
exl-id: 7b71e8db-e8c6-4470-bc22-db3d4600b7fc
---
# Touch UI Feature Status {#touch-ui-feature-status}

AEM 6.4 onwards [Classic UI is deprecated](../release-notes/deprecated-removed-features.md). Adobe will not make further enhancements to the Classic UI and users are encouraged to leverage the powerful new features available in the touch-enabled UI.

Starting with version 6.0, AEM introduced a new user interface referred as the "touch-enabled UI" (simply called "Touch UI") that is aligned to the [!DNL Adobe Experience Cloud] and to the overall Adobe user interface guidelines. With near feature parity reached, this has become the standard UI in AEM with the legacy, desktop-oriented interface referred to as "classic UI".

While most capabilities are present in the touch-enabled UI, there are features that are not yet complete and will be added in future releases.

The following list shows the current status of the capabilities as implemented in AEM 6.5.

For recommendations for customers that upgrade to AEM 6.5, see [User interface recommendations for customers](/help/sites-deploying/ui-recommendations.md).

>[!NOTE]
>
>This page only covers feature parity with classic UI. Capabilities added to and unique to the Touch-enabled UI that are not present in the Classic UI are not listed.

>[!NOTE]
>
>This list strives to be complete, but is not exhaustive.

## Legend {#legend}

* **Complete**: The feature is fully available in the touch-enabled UI.
* **Mostly**: The feature is mostly available in the touch-enabled UI.
* **Missing**: The feature is not present in the touch-enabled UI, the classic UI has to be used to do this action.
* **Replaced**: The feature was replaced with a new implementation that works differently.
* **Removed**: The feature no longer exists in the touch-enabled UI and will not be replaced.

## Feature Status: Sites Admin {#feature-status-sites-admin}

This is a list of capabilities the classic UI Site Admin (`/siteadmin`) has and the status in the touch-enabled UI (`/sites.html`).

|Feature|Status|Comment|
|--- |--- |--- |
|Navigate Site Hierarchy|Complete|AEM 6.4 introduced a [content tree view](/help/sites-authoring/basic-handling.md#content-tree).|
|Start Workflow|Complete||
|Create new page|Complete||
|Create new site|Complete||
|Create new launch|Complete||
|Create new livecopy|Complete||
|Create folder|Complete||
|Show Publication Status|Complete|Starting AEM 6.5, the workflow status is shown in the list view.|
|Search|Complete||
|Copy and paste page (Duplicate)|Complete||
|Move page(s)|Complete||
|Publish page(s)|Complete||
|Publish page(s) without replication rights|Complete||
|Publish later|Complete||
|Publish tree|Complete||
|Unpublish pages(s)|Complete||
|Unpublish page(s) without replication rights|Complete||
|Unpublish later|Complete||
|Delete|Complete||
|Lock/Unlock|Complete||
|View/Edit Properties|Complete||
|Set Permissions on Page(s)|Complete||
|Version history|Complete||
|Restore version|Complete||
|Restore tree and restore deleted pages|Missing|Use Classic UI.|
|Show difference between old and current version|Complete||
|Livecopy Actions (Roll-out)|Complete||
|See language copies|Complete||
|Find and replace|Missing|Use Classic UI.|
|Notification inbox (JCR events)|Missing|Use Classic UI. Will be replaced with different implementation.|
|References|Complete|Display of incoming page links added to AEM 6.5.|

## Feature Status: Page Editor {#feature-status-page-editor}

This is a list of capabilities the classic UI Page Editor (`/cf#`) has and the status in the touch-enabled (`/editor.html`).

|Feature|Status|Comment|
|--- |--- |--- |
|Edit Web Pages|Complete||
|Edit Mobile Web Pages|Complete||
|Edit content imported via Design Importer|Complete||
|Edit E-Mails|Complete||
|Edit Hybrid Mobile Apps|Complete||
|Edit Forms|Complete||
|Edit Offers|Complete||
|Edit Workflows Models|Complete||
|Mode: Edit and Preview|Complete||
|Responsive Preview|Complete||
|Mode: Edit Design|Complete||
|Mode: Scaffolding|Complete||
|Mode: Live Copy Status|Complete||
|Add annotations|Complete||
|Edit properties|Complete||
|Roll-out page|Complete||
|Start and show workflow|Complete||
|Workflow package handing|Mostly|Completely accessible in touch-enabled UI. Multiple workflow payload still presented in classic UI.|
|Lock/Unlock Page|Complete||
|Publish Page|Complete||
|Unpublish Page|Complete||
|Copy Page|Removed|Use Site Admin to [copy pages](/help/sites-authoring/managing-pages.md#copying-and-pasting-a-page).|
|Move Page|Removed|Use Site Admin to [move pages](/help/sites-authoring/managing-pages.md#moving-or-renaming-a-page).|
|Delete Page|Removed|Use Site Admin to [delete pages](/help/sites-authoring/managing-pages.md#deleting-a-page).|
|Show References|Removed|Use Site Admin to see the [detailed reference list](/help/sites-authoring/author-environment-tools.md#references).|
|Audit Log|Removed|Use Site Admin and [open activity rail](/help/sites-authoring/author-environment-tools.md#events-timeline).|
|Create Version|Removed|Use Site Admin to [create new versions](/help/sites-authoring/working-with-page-versions.md#creating-a-new-version).|
|Restore Version|Removed|Use Site Admin to [restore versions](/help/sites-authoring/working-with-page-versions.md#reverting-to-a-page-version).|
|Switch Launches|Removed|Use Site Admin to [switch between launches](/help/sites-authoring/launches-promoting.md).|
|Translate Page|Removed|Use Site Admin to [add page to translation projects](/help/sites-administering/tc-manage.md).|
|Timewarp (choose date/time and browse site as it then looked)|Complete||
|Set Permissions|Complete||
|Client Context UI|Replaced|Use the [ContextHub](/help/sites-authoring/ch-previewing.md) UI going forward.|
|Content Finder for the various media types|Complete||
|Component List|Complete||
|Copy and paste components|Complete||
|List of components in clipboard|Missing||
|Undo / Redo|Complete||
|Drag content into component placeholder|Complete||
|Drag content directly into parsys placeholder with component auto-creation|Complete||

## Feature Status: Text, Table, and Image Editors {#feature-status-text-table-and-image-editors}

This is a list of capabilities the classic UI Text, Table, and Image Editor have and the status in the touch-enabled UI.

|Feature|Status|Comment|
|--- |--- |--- |
|Rich Text Editor|Complete|Usable in-place, in dialog, and in full screen.|
|Enable/disable RTE Plug-ins|Complete|Can be done using the [Template Editor](/help/sites-authoring/templates.md).|
|Use RTE for Plain-text|Complete||
|RTE Plug-in: Links and anchor|Complete||
|RTE Plug-in: Character Map|Complete||
|RTE Plug-in: Copy/Paste|Complete||
|RTE Plug-in: Paste from Microsoft Word|Complete||
|RTE Plug-in: Find and replace|Complete||
|RTE Plug-in: Text Formats (bold, ...)|Complete||
|RTE Plug-in: Sub and superscript|Complete||
|RTE Plug-in: Justify|Complete||
|RTE Plug-in: Lists (bullet / numbers)|Complete||
|RTE Plug-in: Paragraph Format|Complete||
|RTE Plug-in: Text Styles|Complete||
|RTE Plug-in: Source Editor (Edit HTML)|Complete|Only available in dialog and full screen.|
|RTE Plug-in: Spellchecker|Complete||
|RTE Plug-in: Table (embedded Table Editor)|Complete||
|RTE Plug-in: Undo/Redo|Complete||
|RTE Plug-In: Allow in-line images|Complete||
|Table Editor|Complete|Usable in-place, in dialog, and in full screen.|
|Drag image into table cell|Complete|Usable in-line|
|Image Editor|Complete|Usable in-place, in dialog, and in full screen.|
|Enable/disable IPE Plug-ins|Complete|AEM 6.3 introduced a UI in the [Template Editor](/help/sites-authoring/templates.md).|
|IPE Plug-in: Crop|Complete||
|IPE Plug-in: Flip|Complete||
|IPE Plug-in: Undo/Redo|Complete||
|IPE Plug-in: Image Map|Complete||
|IPE Plug-in: Rotate|Complete||
|IPE Plug-in: Zoom|Complete||

## Feature Status: Tools {#feature-status-tools}

This is a list of various tools the classic UI have and the status in the touch-enabled UI.

|Feature|Status|Comment|
|--- |--- |--- |
|Task Management|Replaced|6.0 introduced Projects and tasks.|
|Workflow Inbox|Complete||
|Workflow to Page Template Configuration (`/etc/workflow/wcm/templates.html`)|Missing|Use Classic UI.|
|Tagging Admin UI|Complete||
|MSM/Blueprint Control Center|Complete||
|Blueprint Manager UI|Complete||
|Roll-out Configuration UI|Missing|Use Classic UI.|
|User, Groups and permissions UI|Mostly Complete|For advanced permission editing use Classic UI.|
|Purge Versions (`/etc/versioning/purge.html`)|Missing|Use Classic UI.|
|External Link Checker (`/etc/linkchecker.html`)|Missing|Use Classic UI.|
|Bulk Editor (`/etc/importers/bulkeditor.html`)|Missing|Use Classic UI.|
|Upload thumbnails to add or overwrite those|Missing|Use Classic UI.|

gha_language: Groovy


text:
Soundwave is just a wrapper of the Web Audio API that I started inspired by [@mjanssen](https://github.com/mjanssen) package [Aural](https://github.com/mjanssen/aural) so I can learn more about the API and test the Rollup.js bundler that I had never worked with.

# Bundle
```
yarn rollup:prod
```
# Use
Import ```bundle.js``` and load a local file with ```Soundwave.load(file)```.
```Soundwave.play()```
```Soundwave.pause()```
```Soundwave.stop()```
They are self-explanatory.

I just allow playing one sound file at a time. Haven't tested further than with MP3 file format.

# Examples
By far, just one with the basic functions I have already implemented.

# License
ISC

repository: p-fernandez/Soundwave

repo_name: p-fernandez/Soundwave


text:
# Design

## Learning objectives

After completing this exercise, the student should:

- Know about the pipe operator.
- Know the two different ways the pipe operator can call functions.
- Know how to use a `_` placeholder to pipe into other positions.

## Out of scope

- Function captures (the `_` syntax).

## Prerequisites

- `strings`: Manipulating strings.
- `modules`: Importing modules.
- `results`: The string functions return `Result`s.
- `lists`: The string functions return `List`s.

## Concepts

- `pipe-operator`

## Analyzer

This exercise could benefit from the following rules added to the the analyzer:

- Verify that the `initial` function calls the `first_letter` function.
- Verify that the `initials` function calls the `initial` function.
- Verify that the `pair` function calls the `initials` function.

repository: exercism/gleam

gha_language: Gleam

repo_name: exercism/gleam


text:
---
section: deprecated
---

## helm init

This command does not exist in Helm 3, following the [removal of Tiller](https://helm.sh/docs/faq/#removal-of-tiller). You no longer need to install Tiller in your cluster in order to use Helm.

If you are using Helm 2, go to [v2.helm.sh](https://v2.helm.sh/docs/helm/#helm-init) to view the [Helm Init documentation](https://v2.helm.sh/docs/helm/#helm-init).

repository: helm/helm-www

repo_name: helm/helm-www


text:
---
metaTitle: "MATLAB - Conditions"
description: "IF condition, IF-ELSE condition, IF-ELSEIF condition, Nested conditions"
---

# Conditions

## IF condition

Conditions are a fundamental part of almost any part of code. They are used to execute some parts of the code only in some situations, but not other. Let's look at the basic syntax:

```matlab
a = 5;
if a > 10    % this condition is not fulfilled, so nothing will happen
    disp('OK')
end

if a < 10    % this condition is fulfilled, so the statements between the if...end are executed
    disp('Not OK')
end

```

Output:

```matlab
Not OK

```

In this example we see the `if` consists of 2 parts: the condition, and the code to run if the condition is true. The code is everything written after the condition and before the `end` of that `if`. The first condition was not fulfilled and hence the code within it was not executed.

Here is another example:

```matlab
a = 5;
if a ~= a+1        % "~=" means "not equal to"
    disp('It''s true!') % we use two apostrophes to tell MATLAB that the ' is part of the string
end

```

The condition above will always be true, and will display the output `It's true!`.

We can also write:

```matlab
a = 5;
if a == a+1    % "==" means "is equal to", it is NOT the assignment ("=") operator
    disp('Equal')
end

```

This time the condition is always false, so we will never get the output `Equal`.

There is not much use for conditions that are always true or false, though, because if they are always false we can simply delete this part of the code, and if they are always true then the condition is not needed.

## IF-ELSE condition

In some cases we want to run an alternative code if the condition is false, for this we use the optional `else` part:

```matlab
a = 20;
if a < 10
    disp('a smaller than 10')
else
    disp('a bigger than 10')
end

```

Here we see that because `a` is not smaller than `10` the second part of the code, after the `else` is executed and we get the output `a bigger than 10`. Now let's look at another try:

```matlab
a = 10;
if a > 10
    disp('a bigger than 10')
else
    disp('a smaller than 10')
end

```

In this example shows that we did not checked if `a` is indeed smaller than 10, and we get a wrong message because the condition only check the expression as it is, and ANY case that does not equals true (`a = 10`) will cause the second part to be executed.

This type of error is a very common pitfall for both beginners and experienced programmers, especially when conditions become complex, and should be always kept in mind

## IF-ELSEIF condition

Using `else` we can perform some task when the condition is not satisfied. But what if we want to check a second condition in case that the first one was false. We can do it this way:

```matlab
a = 9;
if mod(a,2)==0   % MOD - modulo operation, return the remainder after division of 'a' by 2
    disp('a is even')
else
    if mod(a,3)==0
        disp('3 is a divisor of a')
    end
end

OUTPUT:
3 is a divisor of a

```

This is also called ["nested condition"](http://stackoverflow.com/documentation/matlab/3806/conditions/14308/nested-conditions), but here we have a speciel case that can improve code readability, and reduce the chance for anr error - we can write:

```matlab
a = 9;
if mod(a,2)==0
    disp('a is even')
elseif mod(a,3)==0
    disp('3 is a divisor of a')
end

OUTPUT:
3 is a divisor of a

```

using the `elseif` we are able to check another expression within the same block of condition, and this is not limited to one try:

```matlab
a = 25;
if mod(a,2)==0
    disp('a is even')
elseif mod(a,3)==0
    disp('3 is a divisor of a')
elseif mod(a,5)==0
    disp('5 is a divisor of a')
end

OUTPUT:
5 is a divisor of a

```

Extra care should be taken when choosing to use `elseif` in a row, since **only one** of them will be executed from all the `if` to `end` block. So, in our example if we want to display all the divisors of `a` (from those we explicitly check) the example above won't be good:

```matlab
a = 15;
if mod(a,2)==0
    disp('a is even')
elseif mod(a,3)==0
    disp('3 is a divisor of a')
elseif mod(a,5)==0
    disp('5 is a divisor of a')
end

OUTPUT:
3 is a divisor of a

```

not only 3, but also 5 is a divisor of 15, but the part that check the division by 5 is not reached if any of the expressions above it was true.

Finally, we can add one `else` (and only **one**) after all the `elseif` conditions to execute a code when none of the conditions above are met:

```matlab
a = 11;
if mod(a,2)==0
    disp('a is even')
elseif mod(a,3)==0
    disp('3 is a divisor of a')
elseif mod(a,5)==0
    disp('5 is a divisor of a')
else
    disp('2, 3 and 5 are not divisors of a')
end

OUTPUT:
2, 3 and 5 are not divisors of a

```

## Nested conditions

When we use a condition within another condition we say the conditions are "nested". One special case of nested conditions is given by the [`elseif`](http://stackoverflow.com/documentation/matlab/3806/conditions/14307/if-elseif-condition) option, but there are numerous other ways to use nested conditons. Let's examine the following code:

```matlab
a = 2;
if mod(a,2)==0    % MOD - modulo operation, return the remainder after division of 'a' by 2
    disp('a is even')
    if mod(a,3)==0
        disp('3 is a divisor of a')
        if mod(a,5)==0
            disp('5 is a divisor of a')
        end
    end
else
    disp('a is odd')
end

```

For `a=2`, the output will be `a is even`, which is correct. For `a=3`, the output will be `a is odd`, which is also correct, but misses the check if 3 is a divisor of `a`. This is because the conditions are nested, so **only** if the first is `true`, than we move to the inner one, and if `a` is odd, none of the inner conditions are even checked. This is somewhat opposite to the use of `elseif` where only if the first condition is `false` than we check the next one. What about checking the division by 5? only a number that has 6 as a divisor (both 2 and 3) will be checked for the division by 5, and we can test and see that for `a=30` the output is:

```matlab
a is even
3 is a divisor of a
5 is a divisor of a

```

We should also notice two things:

1. The position of the `end` in the right place for each `if` is crucial for the set of conditions to work as expected, so indentation is more than a good recommendation here.
1. The position of the `else` statement is also crucial, because we need to know in which `if` (and there could be several of them) we want to do something in case the expression if `false`.

Let's look at another example:

```matlab
for a = 5:10    % the FOR loop execute all the code within it for every a from 5 to 10
    ch = num2str(a);    % NUM2STR converts the integer a to a character
    if mod(a,2)==0
        if mod(a,3)==0
            disp(['3 is a divisor of ' ch])
        elseif  mod(a,4)==0
            disp(['4 is a divisor of ' ch])
        else
            disp([ch ' is even'])
        end
    elseif mod(a,3)==0
        disp(['3 is a divisor of ' ch])

    else
        disp([ch ' is odd'])
    end
end

```

And the output will be:

```matlab
5 is odd
3 is a divisor of 6
7 is odd
4 is a divisor of 8
3 is a divisor of 9
10 is even

```

we see that we got only 6 lines for 6 numbers, because the conditions are nested in a way that ensure only one print per number, and also (although can't be seen directly from the output) no extra checks are preformed, so if a number is not even there is no point to check if 4 is one of it divisors.

#### Syntax

- if **expression** ... end
- if **expression** ... else ... end
- if **expression** ... elseif **expression** ... end
- if **expression** ... elseif **expression** ... else ... end

#### Parameters

|Parameter|Description
|---|---|---|---|---|---|---|---|---|---
|**expression**|an expression that has logical meaning

repository: haifenghuang/generate

repo_name: haifenghuang/generate


text:
prefixer
========

infix notation to prefix notation conversion and reduce as much as possible

<<<<============= Project Goals ==============>>>>

Given infix notation, convert it to its corresponding prefix notation

Example:
3 becomes 3
1 + 1 becomes (+ 1 1)
2 * 5 + 1 becomes (+ 1 (* 2 5))
2 * ( 5 + 1 ) becomes (* (+ 1 5) 2)
3 * x + ( 9 + y ) / 4 becomes (+ (* 3 x) (/ (+ 9 y) 4))

Input :

The format of the input expression is highly restricted. All values are either single alphabetic characters or positive integers. All operators, including ( and ), are always separated by at least one space from other values  or operators.

You should respect operator precedence, so 3 + 5 * 4 should always be parsed as 23, not 32.

Output:

Your program should be run from the command line as

prefixer FILE_NAME

where FILE_NAME is the name of a file containing an infix expression.

Final step: Reduce all expressions as much as possible before you output them. This behavior should be triggered by a -r flag.

repository: kabir-sohel/prefixer

repo_name: kabir-sohel/prefixer


text:
noteshrinker-qt
==========

A PyQt-based frontend for [noteshrink](https://github.com/mzucker/noteshrink) which was created by [Matt Zucker](https://github.com/mzucker).

- Under development!

repository: lillyPJ/noteshrinker-qt

repo_name: lillyPJ/noteshrinker-qt


text:
---
hrs_structure:
  division: '1'
  volume: '6'
  title: '19'
  chapter: '334'
  section: 334-3
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0334-0003
    parent: HRS0334
    name: 334-3 Functions of department in mental health
weight: 56025
title: Functions of department in mental health
full_title: 334-3 Functions of department in mental health
---
**§334-3 Functions of department in mental health.** (a) The department of health within the limits of available funds within the designated programs, shall promote and provide for the establishment and operation of a community-based mental health system responsive to the needs of persons of all ages, ethnic groups, and geographical areas of the State, reflective of an appropriate distribution of resources and services, and monitored and evaluated in terms of standards, goal attainment, and outcomes. The elements of the system shall be defined by departmental rules recognizing the need for at least the following services:

(1) Informational and educational services to the general public and to lay and professional groups;

(2) Collaborative and cooperative services with public and private agencies and groups for the prevention and treatment of mental or emotional disorders and substance abuse and rehabilitation of patients;

(3) Consultation services to the judiciary, to educational institutions, and to health and welfare agencies;

(4) Case management, outreach, and follow-up services;

(5) Emergency crisis and noncrisis intervention services accessible to all residents;

(6) Community-based, relevant, and responsive outpatient services;

(7) Community residential care comprising a comprehensive range of small, homelike, and appropriately staffed treatment and rehabilitation facilities;

(8) Short-term psychiatric treatment, preferably in facilities where access to other health and medical services are readily available;

(9) Intensive psychiatric treatment for patients in need of long-term, highly structured, or highly specialized care and treatment under section 334-2.5, and provision of appropriate community resources;

(10) Training programs, activities, and staffing standards for the major mental health disciplines and ancillary services; and

(11) Rehabilitative services for hospital and community-based individuals who have experienced short- or long-term mental or emotional disorders and substance abuse.

(b) The department shall revise, refine, and develop the system to ensure optimal responsiveness to the many and varied needs of the people of the State. The development of the system shall be based on an annual statewide comprehensive integrated service plan that is the cumulative result of comprehensive integrated service area planning within each county. The statewide plan shall determine the specific content of the department of health budget for the mental health system.

(c) The department shall specifically:

(1) Perform statewide assessments of the need for prevention, treatment, and rehabilitation services in the areas of mental or emotional disorders and substance abuse;

(2) Adopt rules pursuant to chapter 91 for establishing the number and boundaries of the geographical service areas for the delivery of services in the areas of mental or emotional disorders and substance abuse. The department shall periodically review the effectiveness of the geographical service areas in promoting accessibility and continuity of appropriate care to all residents of that geographical area;

(3) Appoint a service area administrator in each county who shall be responsible for the development, delivery, and coordination of services in that area;

(4) Ensure statewide and community-based planning for the ongoing development and coordination of the service delivery system as guided by needs assessment data and performance related information;

(5) Establish standards and rules for psychiatric facilities and their licensing, where applicable;

(6) Establish standards and rules for services in the areas of mental health and substance abuse treatment, including assurances of the provision of minimum levels of accessible service to persons of all ages, ethnic groups, and geographical areas in the State;

(7) Ensure community involvement in determining the service delivery arrangements appropriate to each community of the State;

(8) Cooperate with public and private health, education, and human service groups, agencies, and institutions in establishing a coordinated system to meet the needs of persons with mental or emotional disorders and substance abuse difficulties;

(9) Evaluate and monitor all services in the fields of mental health and substance abuse where such services are supported fully or in part by state resources;

(10) Promote and conduct research, demonstration projects, and studies concerned with the nature, prevention, intervention, and consequences of mental or emotional disorders and substance abuse;

(11) Keep records, statistical data, and other information as may be necessary in carrying out the functions of the mental health system and this chapter;

(12) Advocate patients' rights in all psychiatric facilities in the State and investigate any grievances submitted to the department by any patient in a psychiatric facility, except as provided in section 334E-2(d). The department shall establish rules and procedures for the purpose of this paragraph within one year after January 1, 1985, and post the rules in a conspicuous manner and accessible place;

(13) Promote and conduct a systematic program of accountability for all services provided, funds expended, and activities carried out under its direction or support in accordance with sound business, management, and scientific principles;

(14) Coordinate mental health resources in each county of the State by the development and presentation of a comprehensive integrated service area plan developed by the service area administrator in conjunction with the service area board. The service area administrator and the service area board, in collaboration with private and public agencies serving their population, shall submit recommendations for the statewide comprehensive integrated service plan, including needs assessment, program planning, resource development, priorities for funding, monitoring, and accountability activities;

(15) Oversee and coordinate service area programs and provide necessary administrative and technical assistance to assist service area programs in meeting their program objectives; and

(16) Provide staffing to the state council and service area boards to assist in the performance of their functions. [L 1967, c 259, pt of §1; [HRS §334-3](/title-19/chapter-334/section-334-3/); am L 1982, c 200, §2; am L 1984, c 218, §3; am L 1985, c 6, §2; am L 1999, c 119, §3; am L 2004, c 79, §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# PickItUp

PickItUp is a service that allows users to request pick up of items to deliver to charity events organized by organizations. Volunteers of an event will be facilitating the pickup and delivery from requested users. It is for the help of individuals and organizations who wish to donate items but could not do in person.
## Run it locally
Clone the repository
```
git clone https://github.com/hgayan7/PickItUp
cd PickItUp
```
### Without using Docker
Navigate to the project's root directory and use the below commands:
```bash
mvn install
cd target
java -jar pickItUp.jar
```
### Using Docker

Create .jar
```
mvn clean
mvn install
```
Build docker image of the project
```
docker build . -t name-of-spring-boot-project-image
```
Run a MySQL container using the official MySQL docker image
```
docker run --name mysql-standalone -e MYSQL_DATABASE=pickitup -e MYSQL_ROOT_PASSWORD=password -d mysql:8.0
```
Run a new container using the name-of-spring-boot-project-image and link it to the mysql-standalone container
```
docker run -p 8100:8100 --name name-of-spring-boot-project-container --link mysql-standalone:mysql -d name-of-spring-boot-project-image
```

## ER diagram

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

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


text:
# elasticsearch-java-client

A Java client for using ElasticSearch over the http API

## Why?

ElasticSearch has an internal Java interface, so why have a client library?

1. The HTTP API is more stable than the native Java interface.
2. Using a native Java client can complicate the task of configuring ElasticSearch.

repository: milesgould/elasticsearch-java-client

repo_name: milesgould/elasticsearch-java-client


text:
# aws-photo-storage

## Table of contents
* [General info](#general-info)
* [Technologies](#technologies)
* [Setup](#setup)

## General info
This is a simple budget friendly photo album. You can read more about my journey on this project in the following blog post - _[budget photo album using aws s3](https://beltranca.medium.com/budget-photo-album-using-aws-s3-fbef342b2bcf)_.

## Technologies
Project is created with:

 ![](https://img.shields.io/badge/Cloud-AWS-informational?style=flat&logo=amazon&logoColor=white&color=2bbc8a)
 ![](https://img.shields.io/badge/CSS-Bulma-informational?style=flat&logo=bulma&logoColor=white&color=2bbc8a)
 ![](https://img.shields.io/badge/Code-JavaScript-informational?style=flat&logo=JavaScript&logoColor=white&color=2bbc8a)
 ![](https://img.shields.io/badge/JS%20framework-Galleria-informational?style=flat&logo=google&logoColor=white&color=2bbc8a)
 ![](https://img.shields.io/badge/Node.js-V11.2.0-informational?style=flat&logo=node.js&logoColor=white&color=2bbc8a)
 ![](https://img.shields.io/badge/Paas%20hosting-Heroku-informational?style=flat&logo=heroku&logoColor=white&color=2bbc8a)
 ![](https://img.shields.io/badge/PostgreSQL-V12.2-informational?style=flat&logo=postgresql&logoColor=white&color=2bbc8a)
 ![](https://img.shields.io/badge/Tools-NPM-informational?style=flat&logo=npm&logoColor=white&color=2bbc8a)
 ![](https://img.shields.io/badge/Tools-VSCode-informational?style=flat&logo=visual-studio-code&logoColor=white&color=2bbc8a)
 ![](https://img.shields.io/badge/Tools-TablePlus-informational?style=flat&logo=&logoColor=white&color=2bbc8a)

## Setup
To run this project, you will need the following:
- An AWS [account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/).
- Follow the prerequisite tasks and CORS configuration from this [AWS doc](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-example-photo-album.html).
- Create a postgres database for this project, I've set it to `memories` you may name it whatever you want.

After completing the above and cloning the project, you can uncomment and update the environment variables accordingly in the `.env` file.
```bash
JWT_SECRET_KEY="insert_secret"

# --- AWS ---
ALBUM_BUCKET_NAME="insert_bucket_name"
BUCKET_REGION="insert_bucket_region"
IDENTITY_POOL_ID="insert_identity_pool_id"

# --- Postgres ---
DATABASE_URL="postgres://postgres:postgres@localhost:5432/memories"

# --- For access to settings page ---
SECRET_PASSWORD="insert_secret_password"

```

Next, navigate to your project and run:
```bash
$ npm install
```

Next, run the migrationa to ensure that the DB is properly setup:
```bash
$ db-migrate up
```

Last but not least, we want to start the project!
```bash
$ nodemon app.js
```

You should see a message on your terminal saying `STARTED APP ON PORT 8000`.

Go to your browser and type `http://localhost:8000/`, you should see the _Welcome_ page.

To create a user go to `http://localhost:8000/settings` and enter your `SECRET_PASSWORD`. You should now be able to log in and start creating albums and uploading photos to your S3 bucket.

Code released under [the MIT license](https://github.com/c-beltran/aws-photo-storage/blob/master/LICENSE).

repository: c-beltran/aws-photo-storage

repo_name: c-beltran/aws-photo-storage


text:
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: '20,000 Leagues Under the Sea: Sleep, cognitive performance, and self-reported
  recovery status during a 67-day military submarine mission'
subtitle: ''
summary: ''
authors:
- Arne Nieuwenhuys
- Jonas Dora
- Melanie Knufinke
- Debby Beckers
- Gerard Rietjens
tags: []
categories: []
date: '2021-02-01'
lastmod: 2020-11-06T14:58:29-08:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-11-06T22:58:28.848529Z'
publication_types:
- '2'
abstract: Employing a field-based monitoring paradigm, the current study examined
  day-to-day fluctuations in actigraphy-based sleep recordings, cognitive performance
  (10-min psychomotor vigilance test; PVT), and self-reported recovery status among
  14 submariners throughout a 67-day military mission. Mission averages reflected
  suboptimal sleep that was of short overall duration (5:46 ± 1:29 h per 24-h day)
  and relatively low efficiency (82.5 ± 9.9%); suboptimal levels of cognitive performance
  (PVT mRT = 283 ± 35 ms; PVT response errors = 5.3 ± 4.8); and moderate levels of
  self-reported recovery. Whilst self-reported recovery status remained stable across
  mission days, small but consistent day-to-day increases in sleep onset latency and
  PVT mRT accumulated to reflect meaningful deterioration in sleep and cognitive performance
  across the entire 67-day mission (i.e., 47% and 16% of the overall mission average,
  respectively). Future work is required to corroborate the current findings, firmly
  establish underlying causes, and make evidence-based suggestions for interventions
  to improve and uphold submariners’ health and performance.
publication: '*Applied Ergonomics*'
doi: 10.1016/j.apergo.2020.103295
---


text:
# design.automation-extract-fabpart
Extract the data of FabricationPart of Revit

## Demo Video:
https://www.youtube.com/watch?v=c8Szl7Jtrlk

# Steps
1.	Follow [Readme of LearnForge](https://github.com/Autodesk-Forge/learn.forge.designautomation/tree/master/forgesample) to setup the environment
2.	Build Revit plugin (Revit 2019), ensure the zip of the bundle is output to \forgesample\wwwroot\bundles. The post build event uses 7zip.
3.	Build web app
4.	Start ngrok
5.	Input ngrok link to properties of web app
6.	Launch web app
7.	Click [Configuration]
8.	Select the bundle, select the enginer (Revit 2019), click [Create/Update]
9.	An appbundle and activity will be created.
10.	go to web page, ignore [Width] and [Height].
11.	Upload your soure Revit file, which contains the Fabrification Parts.
12.	Click [Start WorkItem]. Wait a moment
13.	It will output the csv file, and upload to Forge bucket, and send web page with the download link of the csv

Note: do not define the output file as *.txt or *.html if you want to use this LearnForge tutorial because it uploads to Forge bucket, but bucket does not accept *.txt or *.html now.

gha_language: C#


text:
## CSS - Box model

The CSS box model is one of the foundations of layouts on the web. On it's core it says that each element is represented as a rectangular box.

Consider the box as an onion, having *content*, *padding*, *border* and *margin*. Each one of the layer being a customizable CSS property than can be set to match the layout.

### Box properties

![What is the box model?][box_model_properties]

[box_model_properties]: https://mdn.mozillademos.org/files/13647/box-model-standard-small.png

- [width](https://developer.mozilla.org/en-US/docs/Web/CSS/width) and [height](https://developer.mozilla.org/en-US/docs/Web/CSS/height) - Customize the dimensions of the content box, the place where element content is going to be displayed.

- [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) - Customize the **inner margin** of a CSS box, *padding* is known as the inner space within a box. CSS allows to specify different paddings for every side (top, right, bottom, left).

- [border](https://developer.mozilla.org/en-US/docs/Web/CSS/border) - Border is the layer after *padding*. It represents (as the name says) the element's border. Border has as lot of properties that can be customized, from style, thickness to color.

- [margin](https://developer.mozilla.org/en-US/docs/Web/CSS/margin) - Margin is the layer after border, it represents the outer space the element needs to have to the surrounding elements.

![Box model in chrome dev tools][box_model_dev_tools]

[box_model_dev_tools]: http://blog.teamtreehouse.com/wp-content/uploads/2014/05/chrome-computed.png

### Advanced box properties

- [overflow](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow) - Overflow defines how the element should behave when the content is bigger than the defined dimensions (it is widely used to define which elements should scroll or not, and which ones should crop).

- [display](https://developer.mozilla.org/en-US/docs/Web/CSS/display) - The type of box in CSS is defined by the *display* property. And is this property that defines how the element behaves when used around other elements.

The most common *display* properties are:

- `block` - With `display: block` the boxes are stacked one upon another, each box occupying the whole line.

- `inline` - With `display: inline` the box will be shown as if it was text. Boxes with this display type completely ignore *width* and *height*.

- `inline-block` - With `display: inline-block`, as the name says, this property is like a mix between `block` and `inline`. The main characteristic of this display type is that is allows to have elements flowing with the text but to customize *height* and *width*, keeping the *block integrity*.


text:
# Table of Contents

* [Setup](GRADER.md#setup)
* [Running](GRADER.md#running)
  * [Prepare Mode](GRADER.md#prepare-mode)
  * [Grade Mode](GRADER.md#grade-mode)
  * [Upload Mode](GRADER.md#upload-mode)

# Grader Script
The grader script, `tools/grader.py`, simplifies the grading process by: (1)
organizing the students' submissions and downloading student information for
convenience, (2) running a [unit test](TEST.md) in batch for all students or for
an individual student and optionally generating a grade report, and (3)
uploading grades with the test report attached as a comment on each
student's submission.  Additionally, the script provides several options to
facilitate debugging.

The University of Texas at Austin uses the Canvas learning management system, so
the grader script leverages the Canvas API.  To the best of my knowledge, this
script should work with Canvas at other institutes and can be adapted to use
other learning management systems.

# Setup
1. Get a Canvas API key by going to your account settings page on Canvas (i.e.
   `https://<INSTITUTE>.instructure.com/profile/settings`) and then clicking the
   'New Access Token' button.  The API key, which is a large string of
   characters, must remain private, so ensure that it's not accidentally pushed
   to Github or accessible by others elsewhere!
2. Determine the Course ID number by navigating to the course home page on
   Canvas.  The Course ID number will be in the URL (i.e.
   `https://<INSTITUTE>.instructure.com/courses/<COURSE_ID>`).
3. Create a `.env` file in the `tools` directory with the following format:
```
INSTITUTE='<INSTITUTE>'
CANVAS_KEY='<API_KEY>'
COURSE_ID='<COURSE_ID>'
```
4. Install the `python-dotenv` and `canvasapi` Python packages through `pip`.

# Running
The script, located at `tools/grader.py` provides three modes:
1. `prepare`: Extract the submission zip file (usually `submissions.zip` when
   downloaded directly from Canvas), organize the files into directories for
   each student, and create an `INFO.json` file, which contains student
   information such as EID,  in each student's directory.
2. `grade`: Grade one or all of the submissions and optionally generate a grade
   report file.
3. `upload`: Upload grades to Canvas and attach the test report as a comment on
   each student's submission.

The script must be run from the same directory that the `.env` file is saved,
which is recommended to be the `tools` directory.

## Prepare Mode
The purpose of Prepare Mode is to organize the submission zip file, which can be
downloaded directly from the assignment page on Canvas and contains each
student's submissions, into a file structure that is more conducive to grading.

The submission zip file contains a flat structure of `*.asm` or `*.bin` files
with a Canvas-specific naming convention for the files.  Running this mode: (1)
creates a directory for each student based on their Canvas ID number, (2)
renames the submission file to the name provided to the script, and (3) creates
an `INFO.json` file in each student's directory.

Full operation of Prepare Mode is as follows:
```
usage: python grader.py prepare [OPTIONS]

  --file=FILE      [Required] File name of assignment
  --zip=ZIP        [Required] Path to zip file downloaded from Canvas
  --root=DIR       [Default="submissions"] Path to output directory
```

**Important Note:** Canvas marks late submissions by appending `LATE` to the
submission file name.  Prepare Mode does not retain this information, so the
grader script will grade submissions irrespective of their submission time.  It
is up to the instructor to manually enter a 0 in the grade report or on Canvas
if a submission is deemed late.

### Example
Assume that 2 students, Jane Doe and Chirag Sakhuja, have submitted an
assignment to Canvas corresponding to the [sample
assignment](TEST.md#assignment-description) in the [unit test
document](TEST.md).  First, the instructor should go to the assignment page and
download submissions.  We will assume the downloaded file is called
`submissions.zip` and is also stored in the `tools` directory.  Prepare Mode may
be run as follows from the `tools` directory:
```
python grader.py prepare --file=tutorial_sol.asm --zip=submissions.zip --root=tutorial_submissions
```

Extracting `submissions.zip` may result in the following two files:
```
doejane_4768371_64927485_tutorial_sol.asm
sakhujachirag_4769143_64927613_tutorial_sol.asm
```

After running Prepare Mode, the following directory structure will be produced:
```
tutorial_submissions
|- 4768371
   |- INFO.json
   |- tutorial_sol.asm
|- 4769143
   |- INFO.json
   |- tutorial_sol.asm
```
And `INFO.json` for Chirag Sakhuja will contain something similar to:
```
{"name": "Sakhuja, Chirag", "eid": "cs84292", "id": "4769143"}
```

## Grade Mode
**Ensure that the submission directory has been prepared by [Prepare
Mode](GRADER.md#prepare-mode).**

Grade Mode performs grading and is the most commonly used mode in the grader
script.  At a high level, Grade Mode simply automates invocations to the
specified unit test.  However, this mode provides several useful features in the
context of an instructor grading assignments for a class.

Full operation of Grade Mode is as follows:
```
usage: python grader.py grade [OPTIONS]

  --file=FILE      [Required] File name of assignment
  --tester=TESTER  [Required] Path to unit test binary
  --root=DIR       [Default="submissions"] Path to prepared directory
  --eid=EID        [Optional] EID (when grading a single student's assignment)
  --passargs=ARGS  [Optional] Space-delimited string of arguments to pass into unit test
  --dryrun         [Optional] Do not update the grade report file
```

### Grading
Grading can either be performed in batch mode or solo mode (e.g. when looking
into a single student's submission).  In either case, simply provide the
`--file` and `--tester` arguments.  To grade a single student's assignment,
additionally provide the `--eid` argument with the student's EID.

Additionally, Grade Mode supports the `--passargs` argument, which can be used
to pass arguments, which are outlined in the [CLI document](CLI.md#unit-tests),
directly into the unit test.  This may be useful in batch mode for debugging
purposes or to display explicit grader messages (i.e. `--tester-verbose`) for
all students.  This may also be useful in solo mode, such as to get detailed
runtime information with the `--sim-print-level` argument, which would otherwise
require a manual invocation of the unit test.

All output from the unit test is redirected into files in the student's
submission directory.  Standard output is redirected to `<FILE>.out.txt`, and
standard error is redirected to `<FILE>.err.txt`.

### Grade Report
By default, Grade Mode produces tab-separated grade report file called
`REPORT.tsv`, which is stored in the root directory and contains four columns:
full name, EID, Canvas ID, and grade.  When running in batch mode, the entirety
of `REPORT.tsv` is replaced with the results of the run.  When running in solo
mode, only that student's grade is updated in the report.  In either case, to
avoid the grade report from being updated, supply the `--dryrun` argument.

### Example
Continuing from the [example from the previous section](GRADER.md#example), we
now wish to grade the batch of submissions.  To do so, simply run the following
command from `tools`:
```
python grader.py grade --file=tutorial_sol.asm --tester=../build/bin/tutorial --root=tutorial_submissions
```

`REPORT.tsv` may look like the following:
```
Doe, Jane	jd57293	4768371	100.0
Sakhuja, Chirag	cs84292	4769143	0.0
```

Hold on, Chirag wasn't expected to get a 0!  This warrants some closer
examination, so re-run just his submission to get more detailed information.
Since this is just for debugging purposes, there's no need to update the grade
report.  Run the following command:
```
python grader.py grade --file=tutorial_sol.asm --tester=../build/bin/tutorial --root=tutorial_submissions --eid=cs84292 --dryrun --passargs='--sim-print-level=9 --asm-print-level=9'
```

The updated output files,
`tutorial_submissions/4769143/tutorial_sol.asm.out.txt` and
`tutorial_submissions/4769143/tutorial_sol.asm.err.txt` now contain a wealth of
useful information to help with debugging.  See the [debugging
document](DEBUG.md) for tips on how to debug.

Assume that Chirag made a silly mistake and has resubmitted his assignment.
Manually replace `tutorial_sol.asm` with the updated file and then run the
grader script again without the `--dryrun` and `--passargs` arguments.

## Upload Mode
**Ensure that [Grade Mode](GRADER.md#prepare-mode) has completed for the entire
submission directory and that `REPORT.tsv` exists and is accurate.**

The purpose of Upload Mode is to upload grades and test reports (i.e.
`<FILE>.out.txt`) to Canvas.  It is highly recommended that the assignment
grades are muted on Canvas before running Upload Mode.  Similar to Grade Mode,
Upload Mode can update all students' grades or just a single student's grade on
Canvas.  This mode requires an additional argument: the case-sensitive,
whitespace-sensitive name of the assignment on Canvas.

Full operation of Upload Mode is as follows:
```
usage: python grader.py upload [OPTIONS]

  --file=FILE              [Required] File name of assignment
  --assignment=ASSIGNMENT  [Required] Exact name of assignment on Canvas
  --root=DIR               [Default="submissions"] Path to prepared directory
  --eid=EID                [Optional] EID (when updataing a single student's grade)
```

### Example
The final step in the example from [the previous sections](GRADER.md#example-1)
is to upload grades and reports to Canvas.  To do so, run the following command:
```
python grader.py upload --file=tutorial_sol.asm --assignment='Tutorial Assignment' --root=tutorial_submissions
```

If a submission needs to be regraded, then run Grade Mode without `--dryrun` and
then run Upload Mode with `--eid` argument.

# Copyright Notice
Copyright 2020 © McGraw-Hill Education. All rights reserved. No
reproduction or distribution without the prior written consent of McGraw-Hill
Education.


text:
# Developing with Cloud Code

# Objectives

In this lab you will:

-  Explore Cloud Code Plugins
-  Deploy to Kubernetes cluster
-  Stream kubernetes Logs
-  Utilize hot reloading of changes
-  Debug live Kubernetes apps

# Preparing your workspace

## Clone the app

To clone the repository and open it in your development environment:

1. Open Cloud Shell editor by visiting the following url

```
https://ide.cloud.google.com
```

1. In the terminal window clone the application source with the following command:

```
git clone https://github.com/viglesiasce/sample-app.git -b golden-path
```

1. Change into the directory and set the IDE workspace to the repo root

```
cd sample-app && cloudshell workspace .
```

## Start Minikube

In this section, you build, test, deploy, and access your application using a local version of kubernetes called Minikube.

1. In the terminal, start minikube by running:

```
minikube start
```

> Minikube sets up a local Kubernetes cluster in your Cloud Shell, this setup will take a few minutes. While it is starting, take a moment to review the various interfaces provided by Cloud Code in the next step.

# Exploring Cloud Code Plugin

Cloud Code provides IDE support for the full development cycle of Kubernetes and Cloud Run applications, from creating an application from an existing template to monitoring your deployed app's resources. You'll be using different commands and views provided by Cloud Code. In this step you will get acquainted with the basic interfaces.

1. Review the various explorer views from the activity bar

   Multiple user interface panels are accessible from the Activity bar. To briefly get acquainted with the various view click on the icons for each view

   API Explorer:

      -  Click the Cloud Code - Cloud APIs icon Cloud Code from the Activity bar. Additional details for working in this view are available in the [documentation](https://cloud.google.com/code/docs/vscode/client-libraries).

      ![image](oepub6vk28.png)

   Secret Manager  Explorer:

      -  Click on the Secret Manager view ￼ in the Activity bar. Additional details for for working in this view are available in the [documentation](https://cloud.google.com/code/docs/vscode/secret-manager)

      ![image](imias3q32ah.png)

   Cloud Run Explorer:

      -  Navigate to the Cloud Run Explorer using the Cloud Run icon in the Activity bar on the left ￼. Additional details for for working in this view are available in the [documentation](https://cloud.google.com/code/docs/vscode/cloud-run-overview)

      ![image](4dwlgh6avps.png)

   Kubernetes explorer:

      -  Navigate to the Kubernetes Explorer using the icon in the Activity bar on the left ￼. Additional details for for working in this view are available in the [documentation](https://cloud.google.com/code/docs/vscode/k8s-overview)

      ![image](mz5gbbsj9lq.png)

2. Review common commands available from the status bar

   Frequently used commands can be accessed quickly through the indicator in the status bar.

   -  Locate the Cloud Code extension indicator in the status bar and click on it.
      ![image](zygset0j2tn.png)
   -  Review the various commands available to run and debug on CloudRun and Kubernetes
   -  Click on Open Welcome Page for additional details and sample activities

3. Review Commands available in the command pallet

   Additional commands are available from the command pallet. Review the list of commands you can access.

   -  Open the Command Palette (press Ctrl/Cmd+Shift+P) and then type Cloud Code to filter the available commands.
   -  Use your arrow keys to cycle through the list of commands.

# Deploying to Kubernetes cluster

In this section, you build, test, deploy, and access your application.

1. In the pane at the bottom of Cloud Shell Editor, select Cloud Code  ￼
![image](sq5ck29lduc.png)
2. In the panel that appears at the top, select Run on Kubernetes. If prompted, select Yes to use the minikube Kubernetes context.

This command starts a build of the source code and then runs the tests. The build and tests will take a few minutes to run. These tests include unit tests and a validation step that checks the rules that are set for the deployment environment. This validation step is already configured, and it ensures that you get warning of deployment issues even while you're still working in your development environment.

3. Select the Output tab in the lower pane  to view progress and notifications
   ![image](wvofl4zlg6a.png)
4. Select "Kubernetes: Run/Debug - Detailed" in the channel drop down to the right to view additional details and logs streaming live from the containers
![image](x30hwes9pu.png)

When the build and tests are done, the Output tab says: `Resource deployment/gceme-backend-dev status completed successfully`, and two URLs are listed.

5. In the Cloud Code terminal, hover over the first URL in the output (http://localhost:8080), and then in the tool tip that appears select Open Web Preview.

The local version of the application opens in your browser. This version of the app is running in minikube's Kubernetes cluster.

6. In your browser, refresh the page. The number next to Counter increases, showing that the app is responding to your refresh.

In your browser, keep this page open so that you can view the application as you make any changes in your local environment.

# Utilize hot reloading of changes

In this section, you make a change to the application, and view the change as the app runs in the local Kubernetes cluster. In the output tab for the Kubernetes: Run/Debug channel, in addition to the application urls, the output also says `Watching for changes.` This means that watch mode is enabled. While Cloud Code is in watch mode, Cloud Code will detect any saved changes in your repo and will automatically rebuild and redeploy the app with the latest changes.

1. In Cloud Shell Editor, go to the main.go file.
2. In this main.go file, in line 23, change the color from green to blue.
3. Save the file.

Cloud Code detects that the change to the app is saved, and it redeploys the change automatically. The Output tab shows Update initiated. This redeployment will take a few minutes to run.

This automatic rebuild is similar to hot code reloading, which is a feature available for some application types and frameworks.

4. When the build is done, go to your browser where you have the app open and refresh the page.

When you refresh, the color at the top of the table changes from blue to green.

This setup gives you this automatic reloading for any architecture, with any components. When using Cloud Code and minikube, anything that is running in Kubernetes has this hot code reloading functionality.

# Debugging live Kubernetes apps

You have run the application, made a change, and viewed the running app. In this section, you debug the application to be confident that it's ready to commit back into the main repo.

For this debug example, we'll focus on the section of the code for the page counter.

1. In Cloud Shell Editor, open the file main.go
2. Set a breakpoint in the application by clicking to the left  number of line 82 (if err != nil {)
3. In the blue pane at the bottom of Cloud Shell Editor, select Cloud Code    ![image](y1nu68cr85h.png)
4. In the panel that appears at the top, select Debug on Kubernetes.

Cloud Code runs and attaches debuggers so that you'll be able to access the in-memory state of the application, not just the user-facing behavior of the application.

5. At the end of the deploy process a prompt will appear at the top of your window asking to confirm the directory in the container where the application is deployed. ![image](tw2ka8wmpl.png)

   Verify the value is set to /go/src/app and hit enter to accept the value
6. Wait for the debugger to finish deploying. You'll know it's complete when the status bar turns orange and the output reports `"Attached debugger to container "sample-app-dev-..." successfully`."
7. In the Cloud Code terminal, hover over the first URL in the output (http://localhost:8081), and then in the tool tip that appears select Open Web Preview. The page won't finish loading which is expected.
8. Switch back to the IDE where the debugger now appears. Code comes up in the tab, and you'll see the call stack, what variables are available at that part of the code. You can expand the Variables - Local to see here the current counter variable value.
9. To allow the page to continue to load, select the "Continue" icon in the debugging window    ![image](fyg1yamuy0d.png)
10. When you're finished debugging click the stop button to terminate each of the running threads.    ![image](61jmwjqwlhk.png)

repository: viram-ms/software-delivery-workshop

repo_name: viram-ms/software-delivery-workshop


text:
# Phomopsis stictica (Berk. & Broome) Traverso, 1906 SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Fl. ital. crypt. 2(1): 276 (1906)

#### Original name
Phoma stictica Berk. & Broome, 1850

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
Define the procedure `up-split` used by `corner-split`. It is similar to `right-split`, except that it switches the roles of `below` and `beside`.

[![

repository: kenspirit/SICP

repo_name: kenspirit/SICP


text:
# build.teztools.io
Build blockchain powered applications with scripts and tools built against teztools.io infrastructure

# API Endpoints
https://api.teztools.io/token/prices.js


text:
# Testing

## Naming your test files

Create test files with the name pattern of `{component name}.test.js` in the same directory which
contains `{component name}.js`.

## Updating snapshots

When you change a component in a way that affects the markup, you will need to update the snapshot in order for the tests to succeed. To do so, run `yarn run test-unit -u`. This will update all snapshots in the repo. You can also add any string to the end of the command to run the tests only on directories that contain that string. For example, `yarn run test-unit -u button` will only update the tests for directories that **contain** `button`.

## Test helpers

The [`src/test`](../src/test) module exports some functions and constants to help you write better tests:

* `findTestSubject` helps you find DOM nodes in mounted components.
* `requiredProps` is a list of all props almost all components should support.
* `takeMountedSnapshot` generates a snapshot of a mounted component.

## Test design

### Do's and don'ts

* DO use the `data-test-subj` attribute to mark parts of a component you want to `find` later.
* DON'T depend upon class names or other implementation details for `find`ing nodes, if possible.
* DO use snapshots as much as possible.
* DON'T assert for the presence of nodes if you can use a snapshot instead.

### Anatomy of a test

A good test will document:

* The default state of the component.
* The inputs for each prop, and the associated outputs.
* Errors.
* Special behavior, e.g. keyboard navigation, async behavior, DOM manipulation under the hood.

```jsx
describe('YourComponent', () => {
  test('is rendered', () => {
    const component = render(
      <YourComponent {...requiredProps}>
        Hello
      </YourComponent>
    );

    expect(component)
      .toMatchSnapshot();
  });

  describe('props', () => {
    describe('color', () => {
      test('is rendered', () => {
        const component = render(
          <YourComponent color="blue" />
        );

        expect(component)
          .toMatchSnapshot();
      });
    });

    describe('onClick', () => {
      test(`isn't called upon instantiation`, () => {
        const onClickHandler = sinon.stub();

        mount(
          <YourComponent onClick={onClickHandler} />
        );

        sinon.assert.notCalled(onClickHandler);
      });

      test('is called when the button is clicked', () => {
        const onClickHandler = sinon.stub();

        const component = mount(
          <YourComponent onClick={onClickHandler} />
        );

        // NOTE: This is the only way to find this button.
        component.find('button').simulate('click');

        sinon.assert.calledOnce(onClickHandler);
      });
    });
  });

  describe('behavior', () => {
    it('button is automatically focused', () => {
      const component = mount(
        <YourComponent />
      );

      expect(findTestSubject(component, 'button').getDOMNode()).toBe(document.activeElement);
    });
  });
});

```

## Writing mock component files

A component file can be mocked for snapshot simplification or to mitigate nondeterministic rendering in test environments. See [`src/components/icon`](../src/components/icon) for a example.

_Although mock component files are currently only used as part of consuming project test environments, the concept will soon be applied to EUI's own testing environment._

### Using the mock namespace

Component mocking relies on using the `[name].testenv.*` namespace for identification. The mocked module will replace the standard import in the `test-env` build. Both `index` files and individual component files can mocked.

### Mapping all module exports

The rendered output of a mocked component is at the author's discretion, however, all public exports from a module must be preserved in the mock file. Note that this does not apply to exported TypeScript types and interfaces, which will always be derived from the original component file.

repository: TWpower/eui

repo_name: TWpower/eui


text:
# Prototype
Every object is linked to a prototype object from which it inherits properties.

All objects that are created from object literals (`{}`) are automatically linked to Object.prototype, which is an object that comes standard with JavaScript.

The following code can be used to retrieve an object's property:
```js
var adult = {age: 26},
    retrievedProperty = adult.age;
 // The line above
```
First, the interpreter looks through every property the object itself has. For example, `adult` has only one own property — `age`. However, it actually has a few more properties, which are inherited from Object.prototype.
```js
var stringRepresentation = adult.toString();
 // the variable has value of '[object Object]'
```

The property `toString` is an Object.prototype's property, which was inherited. It has a value of a function, which returns a string representation of the object. If you want it to return a more meaningful representation, then you can override it by simply adding a new property to the adult object.

```js
adult.toString = function(){
    return "I'm "+this.age;
}
```
If you call the `toString` function now, the interpreter will find the new property in the object itself and stop. The interpreter retrieves the first property it will find from the object itself, then continue through its prototype.

To set your own object as a prototype, instead of the default Object.prototype, you can invoke `Object.create` as follows:

```js
var child = Object.create(adult);
 /* This way of creating objects lets us easily replace the default
 Object.prototype with the one we want. In this case, the child's prototype is
 the adult object. */

child.age = 8;
 /* Previously, child didn't have its own age property, and the interpreter had to look further to the child's prototype to find it.
 Now, when we set the child's own age, the interpreter will not go further.
 Note: adult's age is still 26. */

var stringRepresentation = child.toString();
 // The value is "I'm 8".

 /* Note: we have not overridden the child's toString property, thus the
 adult's method will be invoked. If adult did not have toString property, then
 Object.prototype's toString method would be invoked, and we would get
 "[object Object]" instead of "I'm 8"
 */
```

`child`'s prototype is `adult`, whose prototype is `Object.prototype`. This sequence of prototypes is called **prototype chain**.

repository: lukecaputo/javascript

repo_name: lukecaputo/javascript


text:
# Snake-Game-using-js
The classic, evergreen Snake game is here, now on PC !

# Pre-requisites to run this game locally:

1. Having a text editor
2. node.js installed in your PC
3. Steady internet connection

# Steps:

1. Open your terminal window and check if node is installed or not by typing node -v. If not, first install node.js from the official website.
2. Star this repository and clone it (or donwnload zip and extract all) and inside it open the text editor using its suitable command
    (particulary, for VS Code use: code -r . )
3. Inside this folder, check if express is installed, if not install express.js by typing in your command prompt (or Git Bash, whichever you prefer): npm i express
4. run node index.js in your terminal and in your browser type: https://localhost:3000 to play the game. Game controls are with the Navigation Keys of the keyboard.

gha_language: JavaScript