text:
#Sketch on the map

This sample demonstrates how you can use the sketch graphics overlay to draw point or line or polygon geometry

##How to use the sample

The sample has a toolbar of sketch tools at the bottom. You can choose the type of geometry using the switch. Sketch by tapping on the map. There are tools to undo or redo an action or clear everything.

![](image1.png)
![](image2.png)

##How it works

To set the type of geometry, you need to assign the `geometryBuilder` property on `AGSSketchGraphicsOverlay`. It could be a `AGSPointBuilder` or `AGSPolylineBuilder` or `AGSPolygonBuilder`. The sketch graphics overlay has a undo manager of type `NSUndoManager` that provides the undo and redo methods. To clear everything there is a `clear` method on the sketch graphics overlay.

repository: pithiwat/arcgis-runtime-samples-ios

path: /arcgis-ios-sdk-samples/Display information/Sketch on the map/README.md

repo_name: pithiwat/arcgis-runtime-samples-ios


text:
Virtual Memory Glossaries
=========================

- **EFER**: (Extended Feature Enable Register)
- **LME**: (Long Mode Enable)

           Bit 8 in `IA32_EFER` MSR.
           If set, 64-bit long mode (i.e., IA-32e) is enabled.
- **MMU**: (Memory Management Unit)
- **MSR**: (Model-Specific Register)
- **PAE**: (Physical Address Extension)

           Bit 5 in CR4 control register.
- **PD**: (Page Directory)

          The 3rd level of the 4-level x86\_64 paging structure.
          An PD entry (PDE) points to a page table (PT).
- **PDPT**: (Page Directory Pointer Table)

            The 2nd level of the 4-level x86\_64 paging structure.
            An PDPT entry (PDPTE) points to a PD table.
- **PFN**: (Page Frame Number)
- **PG**: Bit 31 in CR0 control register.
          If set, paging is enabled.
- **PS**: (Page Size)

          Bit 7 in PML4/PDPT/PD entries.
          If this bit is set, then the current entry represents the physical page.
          Otherwise, the entry points to the next layer of paging structure.
- **PT**: (Page Table)

          The last level of the 4-level x86\_64 paging structure, containing page table entries (PTEs).
- **VM**: (Virtual Memory)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Crate Data Extractor

This little Python tool gets the top-ranked crates from [the Crates.io data dump][crates-data] and measures some aspect of their code.

Type `make` to regenerate the data files in this directory.

## Analyzing Crate Code

The only requirements should be Python itself and [curl][].

Run the script to download the data and extract some information:

    python3 crate_scrape.py

The tool will download a `db-dump.tar.gz` file once and reuse it when run again. To fetch fresh data, just delete that file and re-run the script.

The tool prints a CSV to standard output consisting of some basic data about the crates and the results of running the report command on each.

To control the number of (top) crates to analyze, pass a positional argument `N`. The tool runs a shell command to extract data from each crate; set the `REPORT_CMD` constant to the command you want to run. The command is a [Python template string][template], so insert `{}` where you want the code directory name to appear.

By default, this counts (1) explicit use of dynamic trait objects with by searching for the `dyn` keyword, and (2) implicit use of dynamic trait objects by searching for calls to `get_vtable`.

[crates-data]: https://crates.io/data-access
[curl]: https://curl.se
[template]: https://docs.python.org/3/library/string.html#format-string-syntax

## Summary Statistics

Translate the collected data into summary statistics using `summarize.py`. Just pipe the resulting CSV from `crate_scrape.py` into this script to produce a few useful values.

branch_name: refs/heads/main


text:
### [CVE-2019-12836](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12836)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

The Bobronix JEditor editor before 3.0.6 for Jira allows an attacker to add a URL/Link (to an existing issue) that can cause forgery of a request to an out-of-origin domain. This in turn may allow for a forged request that can be invoked in the context of an authenticated user, leading to stealing of session tokens and account takeover.

### POC

#### Reference
- https://github.com/9lyph/CVE-2019-12836/blob/master/README.md

#### Github
- https://github.com/0xT11/CVE-POC
- https://github.com/9lyph/CVE-2019-12836
- https://github.com/developer3000S/PoC-in-GitHub
- https://github.com/hectorgie/PoC-in-GitHub

repository: trickest/cve

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
# jsmn-cmake

use JSMN C library for JSON parsing in CMake projects for C embedded systems.

## Example

Build program. This auto-downloads the C header library JSMN.

```sh
cmake -B build
cmake --build build
```

optionally, run test

```sh
ctest --test-dir build
```

repository: scivision/jsmn-cmake

repo_name: scivision/jsmn-cmake


text:
# comments-wiper

A smart comments remover for all types of files from any type of project (js, ts, jsx,tsx, py, go, dart, etc..) - make it clean again.

`CTRL+ALT+W`

cli tool version of this extension can be found [here](https://www.npmjs.com/package/cwiper)

## Disclaimer

⚠ commenting code is great and you should do it but if you're like me and hate comments that comes with boilerplates and some projects then this extension is for you 🙂

## Preview

## Supported Programming/Markup Languages/Technologies (All)

### Popular ones

| Language     | Type of Comments                  |
| ------------ | --------------------------------- |
| ✔ Python     | #                                 |
| ✔ Javascript | //, /\* \*/, {/\* \*/}, /\*\* \*/ |
| ✔ Dart       | //                                |
| ✔ Go         | /\* \*/, //                       |
| ✔ Lua        | --, --[[ --]]                     |
| ✔ JSP        | <%-- --%>                         |
| ✔ Ruby       | =begin =end                       |
| ✔ HTML       | <!- ->                            |

## Show Off

## License

MIT

## Author

Igwaneza Bruce

repository: knowbee/cwiper-vscode-extension

gha_language: JavaScript

repo_name: knowbee/cwiper-vscode-extension


text:
# DocuSign.eSign.Model.BillingPaymentItem
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Amount** | **string** | Reserved: TBD | [optional]
**Description** | **string** |  | [optional]
**PaymentDate** | **string** |  | [optional]
**PaymentId** | **string** |  | [optional]
**PaymentNumber** | **string** | When set to **true**, a PDF version of the invoice is available.   To get the PDF, make the call again and change \"Accept:\" in the header to \"Accept: application/pdf\". | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
## How to backend
------

_Please read this doument for a pratical guide how to add something to the backend_

The technologies used are `Flask` and `flask_sqlalchemy` to access the database.

------
#### How should the app work

The database consists of mulitple tables:
* `crawl` : to store the raw crawled data as html and a json object with a timestamp
* `hospital` : stores hospital related data with geolocation
* `person` : contact person in the hospital
* `bed` : Bed type and description
* `hospital_beds` : resolves the many-to-many relationship with the beds. This stores the avaiable beds types (later maybe number of beds) with a timestamp.

To store the data in the database please create a post interface `api.py` which stores the raw crawled data in the data model `Crawl` (see `model.py`).
The raw data should then be internally parsed and stored via `flask_sqlalchemy` in the database.

------
#### How to extend the database model and the API

If you want to modify the database model please adapt the `model.py` file by either creating variable for the base classes and functions editing or accessing data.
The individual variables have to be also added manually then to the database.

You can add interfaces to the API in the `api.py`. Please add a route to the blueprint and then use `flask_sqlalchemy` to access or to modify the dataset.
If you want to use just SQL statements you can use the following example:

```python
@backend_api.route('/hospital/<int:id>', methods=['GET'])
def example_stmt(id=None):
        sql_stmt = '''SELECT *
                    FROM hospital
                    WHERE id = :id
                    ORDER BY "name") ; '''
        sql_result = db.engine.execute(text(stmt), id=id).fetchall()

        # do stuff here

        return jsonify(result)
```

The `create_session()` in the `db.py` can be used if you plan to do multiprocessing with `flask_sqlalchemy` as a new process requires new sessions to the database.

------
#### Why SQLAlchemy and flask_sqlalchemy

SQLAlchemy is an ORM and manages connection, driver abstraction, SQL expressions, session management, synchronization, eager loading etc.
Security is also important - as the library prevents SQL injections. For more see - [Key Features of SQLAlchemy](https://www.sqlalchemy.org/features.html)

`flask_sqlalchemy` on the other hand allows to access all the functions from `sqlalchemy` and `sqlalchemy.orm`and allows to use preconfigured sessions, engine etc.
It salso kills the sessions if the flask app is stopped.
For more see - [Flask-SQLAlchemy Quickstart](https://flask-sqlalchemy.palletsprojects.com/en/2.x/quickstart/)

repository: pmaisel/coronavis

repo_name: pmaisel/coronavis


text:
# browserify-livescript

browserify-livescript is an npm module that allows
[livescript](https://github.com/gkz/LiveScript) files to be seemlessly
integrated into a project through
[browserify](https://github.com/substack/node-browserify.git). If you are not
familiar with [browserify](https://github.com/substack/node-browserify.git), I
strongly encourage you to read up.

## Basic usage

To use browserify-livescript in a project, include it as a dev-dependency in
your package.json file. Then pass it as a transform to
[browserify](https://github.com/substack/node-browserify.git). at the command
line (or in a makefile or through [grunt](https://github.com/gruntjs/grunt.git),
etc.).

```
browserify -t browserify-livescript file.ls > output.js
```

## Source Maps

browserify-livescript supports sourcemaps "out of the box" the only thing the
user needs to do is to instruct browserify to use the source maps by including
the '-d' flag.

```
browserify -d -t browserify-livescript file.ls > output.js
```

repository: coachshea/browserify-livescript

repo_name: coachshea/browserify-livescript


text:
# rpi-python-haproxy
Run two Python webservers behind haproxy with `docker-compose` on Raspberry Pi.

You have to install `docker-compose` as described in [https://github.com/hypriot/compose#installation-and-documentation](https://github.com/hypriot/compose#installation-and-documentation).

Then clone the repo and run all four containers.

```bash
git clone https://github.com/spiermar/rpi-python-haproxy
cd rpi-python-haproxy
docker-compose up
```

repository: spiermar/rpi-python-haproxy

repo_name: spiermar/rpi-python-haproxy


text:
---
name: Feature / Enhancement Request
about: Adding new features or improving existing ones.
title: ""
labels: enhancement
assignees: ""

---

<!--
Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot-demo-projects/issues?q=is%3Aissue
-->

**Which demo project is affected:**
<!-- Specify the project name or path. -->

**Description:**

repository: godotengine/godot-demo-projects

gha_language: GDScript

repo_name: godotengine/godot-demo-projects


text:
## Some Lightweight Block Ciphers

Implementations of some lightweight block ciphers in C

* HIGHT 64/128
* [PRESENT 64/80](https://www.iacr.org/archive/ches2007/47270450/47270450.pdf)
* LBlock 64/80
* LED 64/80
* Piccolo 64/80
* TWINE 64/80
* PRINCE 64/128
* LEA 128/128
* [SIMON 64/96&128](https://eprint.iacr.org/2013/404.pdf)
* [SPECK 64/96&128](https://eprint.iacr.org/2013/404.pdf)
* Chaskey 128/128
* Fantomas 128/128
* [PRIDE 64/128](https://eprint.iacr.org/2014/453.pdf)
* Robin 128/128
* [RECTANGLE 64/80&128](https://eprint.iacr.org/2014/084.pdf)
  + Reference and some assembler implementations can be found in [FELICS](https://www.cryptolux.org/index.php/FELICS)
  + May add an implementation of ARM NEON
* [SKINNY 128/128](https://eprint.iacr.org/2016/660.pdf)

repository: openluopworld/block-ciphers

repo_name: openluopworld/block-ciphers


text:
# jTelegram Extensions

jTelegram Extensions is a set of components provided as extensions to the [Java API Wrapper](https://github.com/jTelegram/jTelegramBotAPI) for the Telegram Bot API.

Current components:
* [Date Picker](https://github.com/jTelegram/jTelegramBotAPI-ext/blob/master/jtelegrambotapi-ext-datepicker)

Documentation for each component is available at their individual links. Just click on a component's name to see its documentation.

## Support

You can find our support group [here](https://t.me/jTelegramSupport).
If you have any questions, request a feature, or help out with an issue, we'd be happy to help in a moments notice.
We can provide support in English, French (Français), and Persian (فارسی). Although, please keep in mind that the group is mainly in English.

Ping the maintainer of this collection using `@nickrobson`.

## Licensing

This project is under the MIT license, please consult [this link](https://github.com/jTelegram/jTelegramBotAPI/blob/master/LICENSE) for more information.

repository: jTelegram/jTelegramBotAPI-ext

repo_name: jTelegram/jTelegramBotAPI-ext


text:
# pushbulletnote
This activity provides your flogo application the ability to send a notification via Pushbullet.
If no email and channel target is specified, then the note is sent to all devices.

## Installation

```bash
flogo add activity github.com/achimera/flogo/activity/pushbulletnote
```

## Schema
Inputs and Outputs:

```json
{
  "inputs":[
    {
      "name": "accessToken",
      "type": "string",
      "required": true
    },
    {
      "name": "note",
      "type": "string",
      "required": true
    },
    {
      "name": "noteTitle",
      "type": "string",
      "required": true
    },
    {
      "name": "emailTarget",
      "type": "string",
      "required": false
    },
    {
      "name": "channelTarget",
      "type": "string",
      "required": false
    }
  ],
  "outputs": [
  	{
      "name": "status",
      "type": "string"
    }
  ]
}
```
## Settings
| Setting      | Description    |
|:-------------|:---------------|
| accessToken  | The Pushbullet access token allocated for your app |
| note      	 | The note to send |
| noteTitle | The title of the note |
| emailTarget    	| The email address where to send the note. Only one target is allowed |
| channelTarget    	| The channel name where to send the note. Only one target is allowed |

If emailTarget and channelTarget are empty, then the note is sent to all devices.

In the 'status' output, you may get the following values:
- 'OK' : the note was correctly sent
- 'PUSH_ERR' : an error on sending the note via Pushbullet
- 'CONNECT_ERR' : if there was an error connecting to Pushbullet
- 'NO_NOTE_ERR' : if the input 'note' field is empty
- 'TOO_MANY_TARGETS_ERR' : if multiple targets are specified

## Configuration Example

```json
            {
            	"id": 2,
            	"name": "Pushbullet Note Notification",
            	"type":1,
            	"activityType":"pushbulletnote",
            	"attributes":[
    				{
      					"name": "accessToken",
      					"value": "YOUR_ACCESS_TOKEN",
      					"type": "string"
    				},
    				{
      					"name": "note",
      					"value": "YOUR_NOTE",
      					"type": "string"
    				},
    				{
      					"name": "noteTitle",
      					"value": "YOUR NOTE TITLE",
      					"type": "string"
    				}
            	]
         	},
```

repository: achimera/flogo

repo_name: achimera/flogo


text:
Uptime Panel

Awesome Grafana panel to easily show uptime of a service/application!

## Hello

This is a custom Grafana panel, it will display the time since a given timestamp. This is good to use for keeping track of how long a service/application has been up, how long since a given time or whatever else.

The panel is very easy to use and also has quite a few options to customise the simple thing.

### Usage
1. Add a panel
2. Pick this under "Visualisation"
3. Add a query returning a unix timestamp
4. ???
5. Profit

![image](https://user-images.githubusercontent.com/8492901/122567214-55bf0b00-d040-11eb-919b-f416128e22cd.png)

### Options
**Provided Timestamp Format**\
[Milliseconds, Seconds]\
This specifies if the given timestamp is in seconds or milliseconds. This is used to calculte the time so make sure it's the right one!

**Uptime Format**\
[Long Form, Short Form]\
This specifies if the time displayed should be in short form (e.g 1h 5m 20s) or long form (e.g 1 hour 5 minutes 20 seconds).

**Pad 0s To The Time**\
[true, false]\
This specifies if a `0` should be added to values lower than 10. For example: `09 minutes` rather than `9 minutes`.

**Text Size (CSS font-size property)**\
[*2em*]\
This specifies the `font-size` of the text. This is used in the CSS so it accepts anything which can be used in CSS, px, em, %, etc.

### Download
You can download this panel from the [releases page](https://github.com/WalshyDev/Uptime-Panel/releases).

## Contributing

Contributions are always welcome to this project!
Take a look at any existing issues on this repository for starting places to help contribute towards, or simply create your own new contribution to the project.

Please make sure to follow the existing standards within the project such as code styles, naming conventions and commenting/documentation.

When you are ready, simply create a pull request for your contribution and I will review it whenever I can!

### Donating

You can also help me and the project out by sponsoring me through [GitHub Sponsors](https://github.com/users/WalshyDev/sponsorship) or by donating on [PayPal](https://walshy.dev/donate).

repository: WalshyDev/Uptime-Panel

repo_name: WalshyDev/Uptime-Panel


text:
<!--
Thanks for sumbitting a Pull Request (PR) to this project.
 Replace this with a description of your pull request -->

**This Pull Request (PR) fixed the following issues:**
<!-- Replace this with the list of issues or n/a. Use the format: Fixes #123 -->

**Task List:**

<!--

To aid community reviewers in reviewing and merging your pull request (PR), please take
the time to run through the below checklist.
Change to [x] for each task in the task list that applies to your pull request (PR).
-->
- [ ] Change details added to Unreleased section of CHANGELOG.md?
- [ ] Updated code follows established [Best Practices](https://github.com/PoshCode/PowerShellPracticeAndStyle)?
- [ ] Unit and (optional) Integration tests created/updated where possible?

branch_name: refs/heads/develop

gha_language: PowerShell


text:
# Projects on web scraping.
## At first install dependencies as:-
```
    npm install request
    npm install cheerio
```
##  Hackernews_web_Scraper
This module is used to scrap the headings of hackernews website

## To use this as a module in a project:-

```
    npm i hackernews_scraper

```
After installion import this i.e require it in your project
as given below:-

```
    var hackernews_scraper = require('hackernews_scraper')

```
or to run:-
```
    fork and clone
    then node scraper.js
```

### Made with :heart: rupeshiya

repository: Rupeshiya/WebScraping.

repo_name: Rupeshiya/WebScraping.


text:
---
layout: default
---

# 1997-03-28 - WebWorld 19

## Header Data

From: Bubba Rom Dos<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 13ad4719a6f8561b70010380df731c13bcca989944c6d5fe382e99394d001366

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-03-28 21:29:27 UTC

Raw Date: Fri, 28 Mar 1997 13:29:27 -0800 (PST)

## Raw message

```
{% raw  %}From: Bubba Rom Dos<EMAIL_ADDRESS>Date: Fri, 28 Mar 1997 13:29:27 -0800 (PST)
To<EMAIL_ADDRESS>Subject: WebWorld 19
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/html

Title: The True Story of the InterNet

The True Story of the InterNet

Part II

WebWorld & the Mythical 'Circle of Eunuchs'

by Arnold

Copyright 1995, 1996, 1997 Pearl Publishing

TruthMonger

Jonathan rubbed his temples, for the thousandth time, leaned back
in his chair, and rolled his head back and forth, easing the strain
on his neck and back muscles, which were wound tight as a drum
from endless hours of exhausting analysis of emails, CyberPosts,
keyword searches and traffic analysis reports which stretched
over the course of history starting with the birth of the Author
of "The Xenix Chainsaw Massacre" and ending with the
death of the CypherPunks.

Access to the Cowboy's files had led to a discovery that would
have shocked both the Masters of Antiquity, and scientists and
engineers around the world.
Apparently, HydroCube storage technology had been in existence
for some time before its official announcement by BabyGates Technology.
The Kid, as she was called, had been the daughter, lover, or employee
of the richest man in the world, depending on which version of
this era you believed. Her star had risen, even as Microsoft's
star had begun to fall, mostly as a result of her development
of the HydroCube, with its nearly infinite data-storage capacity.

Now, however, Jonathan was wondering if she hadn't actually discovered
the HydroCube long before previously thought, and made it available
to those working in the background on the InterNet, to fight against
the monopolizing power held by government and large corporations
during the early days of the CypherPunks.

And now, Jonathan had reason to believe that the Kid had actually
been a member of the CypherPunks, masquerading under the pseudonym
of Blanc Weber.
What's more, examination of her private email revealed to Jonathan
her close connection to another CypherPunk named Alec, who, in
turn, seemed to have some unknown relationship with the Author,
since he had the Author's PGP Public Key for 'sog' in his pubring.pgp
file. Possession of the 'sog' Public Key, a variation of the 'son
of gomez' key, was very rare, as Jonathan had found in his data
searches.

This apparent connection between the Circle of Eunuchs, the CypherPunks,
and BabyGates Technology was the only explanation that Jonathan
could find for the fact that he now had access to every bit and
byte of data that had ever traveled the InterNet since January
19, 1997 AD.

Jonathan shook off his reverie, and returned his attention to
the task at hand.

He was studying a trail of TruthMonger posts that had been sent
to the CypherPunks and Freedom-Knights lists, among others, shortly
after the CypherPunks list had moved off of the toad.com server,
and onto several others, forming a distributed list.

The TruthMonger persona was historically known as the first multi-user
pseudonym, one which appeared shortly after the original meeting
of the Circle of Eunuchs, according to legend.
Once an individual had posted an opinion, using the TruthMonger
persona, anyone who wished could follow up on that post, using
the same persona. The only non-enforceable 'requirements' for
using the pseudonym were that the first post should contain some
element of thinly veiled humor, and subsequent posts by others
should start out with logic and flow consistent with the previous
post before moving in the direction of the current author's predilections.

Often, a series of TruthMonger posts would start out from one
perspective, gradually move to its polar opposite, and then wind
its way circuitously back to the original frame of perspective,
but having gathered a much larger scope of perception along the
way.
TruthMonger posts tended to defy any attempts at categorization
by even the most proficient of traffic analysts, much to their
chagrin. As well, other shadowy entities sometimes leapt into
the fray, posting counterpoints to the TruthMonger missives, or
doing a winding dance of agreement and/or disagreement with the
various authors.

The persona was handy for those who sometimes felt the need to
step out of their own skin and argue from a point of view which
might be considered by some to be inconsistent with their usual
personality. It was considered shallow and rude, however, for
one to use the persona to reply directly to their own posts, although
they could play devil's advocate against themselves if someone
who supported their public position quoted them in a post.

And now, Jonathan found himself staring at a humorous spin-off
in a series of posts involving the traditional TruthMonger posts,
and some parallel posts by an entity or entities known as Dr.
Roberts.

From - Fri Mar 28 07:52:49 1997

Received: from www.video-collage.com (www.video-collage.com
[<IP_ADDRESS>]) by orion.bc.sympatico.ca with ESMTP (8.7.5/8.7.3)
id HAA00780 for<EMAIL_ADDRESS>Fri, 28 Mar 1997
07:25:54 -0600 (CST)
Received: from toad.com (toad.com [<IP_ADDRESS>]) by www.video-collage.com
(8.8.5/8.8.0) with ESMTP id IAA05988 for<EMAIL_ADDRESS>Fri, 28 Mar 1997 08:17:21 -0500 (EST)
Received: from wombat.sk.sympatico.ca (wombat.sk.sympatico.ca
[<IP_ADDRESS>]) by toad.com (8.7.5/8.7.3) with ESMTP id FAA24044
for<EMAIL_ADDRESS>Fri, 28 Mar 1997 05:16:52 -0800
(PST)

Date: Friday, 28 Mar 97 07:18:53 CST
To<EMAIL_ADDRESS>
From: Truth Mongrel<EMAIL_ADDRESS>
X-Mailer: WinSock Remailer Version ALPHA1.3B
X-Comments: -
X-Comments: "Mad Dog in possession of the last False Smile."

X-Comments: -
X-Comments: This message is NOT from <earth>. It was remailed

X-Comments: by an automated anonymous remailer. Send all complaints
and
X-Comments: requests for blocking to <<EMAIL_ADDRESS>
X-Comments: -
X-Remailer-Setup: Maximum Message Size - None
X-Remailer-Setup: Reordering is OFF
X-Remailer-Setup: Logging COMPLETE Messages
X-Remailer-Setup: PGP messages accepted

Subject: CypherPunks Hash Distribution Network
/ Combined thread

Sender<EMAIL_ADDRESS>Precedence: bulk
X-Mailing-List<EMAIL_ADDRESS>X-List-Admin<EMAIL_ADDRESS>X-Loop<EMAIL_ADDRESS>

Igor Chudov @ home wrote:

> As far as I understand, the process of building a distributed
network of
> cypherpunks mailing lists is logically complete. It means
that the following
> list servers are now connected:

> ssz.com <---> algebra <----> cyberpass

> Again, you are free to do so and your Cc-copies will NOT
cause any
> duplication of traffic because each mailing list server employs
an
> anti-duplicate filter. It is just a waste of your keyboard
typing.

> Dale Thorn @ bat:
>> That's funny - I unsuscrived to toad, and 'scribed to
cyberpass and
>> algebra. I have been getting an average of 2-1/2 of each
message
>> that comes through. Mostly three's, a few two's, and
an occasional
>> five or six copies.

It sounds to me as if we might already have a naturally recurring

parallax to a hash-collusion system here.
In other misused words, perchance the ASCII art spams and multiple

copies of various posts, which became common fare for anyone who

followed the moderation/censorship experiment/dictatorship of

Gilmore/Sandfort and Toad/C2Net in Jan/Feb, are nature's way of

exacting a cost for subscription to the CypherPunks list(s).

Perhaps the good Dr. Vulis DV K, rather than being called a flamer,

should be referred to as our good friend, Mr. Fire, who helps
to
clear the deadwood out of the forest.
Apparently, over a thousand pieces of deadwood were cleared
in the last cycle of flame wars. ("Run, Bambi. Run!")

Below, agreeing with me (in my dreams):
Hal Finney wrote:
> Adam Back writes:

> > [ Re idea to for a nym to "post a bond" to
enhance reputation]
> > Your suggestion is another neat way of passing expense
and tying an
> > investment to a nyms reputation.
> > X-reputation: 64 bit SHA1 collision
> > or
> > X-reputation: $100 digicash
> >
> Don't forget though, it's not really a payment system. The
hash
> collisions can't be exchanged for anything in the real world.

> They represent a certain threshold of effort which someone
has to have
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (emphasis mine)
> expended to create them, but they can't replace cash. At
best they
> could be sort of a "play money" which some people
choose to accept.
>
> I do like your idea of using it as an incoming spam filter,
though.
> (By spam I mean mass mailings.)

Which begs the question, is the current system capable of acting

as an outgoing filter? Can it glean out the losers who are cruising

for an easy view of cryptography issues, and help maintain a higher

level of membership, limiting it to losers who have a more dedicated

interest/psychosis in privacy/paranoia cryptography/disinformation

issues?

> > - and anyway I've nearly finished implementing it (I'll
post the hash
> > cash postage money mint (collision generator) and remailer
plug-in
> > for postage later on today) where as not many people
have digicash
> > accounts.

Perhaps if Dale developed an 'outgoing filter' system to go with

Adam's 'incoming filter' system, we could have the best of both

worlds, being saved from "Make $$$ Fast" spams, but
having to use
our delete keys to ante-up in regard to our own list loons.

We could also institute a 'bad hash' system, where bad-hashes

like Tim C. May and Attila T. Hun could use their guns to balance

the threat of legal actions from bad-hashes like Greg Broiles
and
Side-Door Sammy.

With new developments such as these, to thwart the efforts of

anti-thwarters to bring balance and sanity to the list, perhaps

the CypherPunks can bypass the inevitable evolutionary extinction

of the 'bug-fixed' victims of insect vasectomies, and bring in

the new millennium as the longest running wash-out-your-mouth-with

Soap Opera on the InterNet, staying one step ahead of the guys

with the ButterflyNet.

The Truth of the Mongrel is, that we obviously need to develop

a system that makes certain the spam we receive is CypherSpam.

The loons on the list should be CypherLoons. Our membership
should consist of CypherIdiots, CypherNewbies, CypherElitists,

CypherLosers, CypherCynics, CypherSpooks and CypherGenius'.

Where else can movers and shakers like Robert Hettinga join
in an list-takeover attempt, then participate in the call for
the killing
of the list when the takeover attempt has failed miserably,
and then, like a whirling dervish acting as his own spin doctor,

re-appear, riding on the back of the CypherXenix rising from the

ashes, and genuinely declare, "I *love* this list."?

(* - ASCII Graphicology allegedly (c) DV K Bot-ling Plant, No-Inc.)

Where else can Afro-American cryptographers have their native

tongue, Ebonics, recognized as a valid encryption system?
Where else can you be guaranteed that your typos will be
forwarded to Ft. Meade, to be pored over by military analysts

for hidden meaning, quite possibly launching world infowars as

a result of drunken, sticky fingers.

The CypherPunks list, love it or leave it, is still, far and away,

the best show in town.

("If I can make it theeerrre...I can make it anywheeerrre...")

And the way this relates to cryptography is...my brain is
scrambled/encrypted.

Anarchist (Don't) Rule!

Truth Mongrel
~~~~~~~~~~~

Just say "No" to "Bad Dog Inside"

We got nuts, we're peeing on telephone poles, I know that ain't
allowed.
---------:---------:---------:---------:---------:---------:---------:---------:--------:--------

Truth Mongrel | Doggie Anarchy: cats chased, bones buried,
<EMAIL_ADDRESS>| anonymous droppings, analog come-calling
Woof! Woof! | legs lifted, territories marked
"Yard fences aren't even speed bumps on the garbage sniffing
alleyway."

Jonathan went through his pile of pattern ratiocination logs,
identity/pseudonym affinity markers, and traffic analysis flow-charts.

Every time that Jonathan began to think he had a grip on the underlying
associations and relationships behind the CypherPunks, their protagonists,
antagonists, friends and foes, he would come across a post such
as this one, which indicated that they were indeed just a loosely
connected band of rounders as their historical reputation made
them out to be. Every time that a plot line began to develop in
their history, then a post such as this would pop up suggesting
that they were merely a bunch of loose cannons, rolling around
on the deck of a ship that was not destined for any specific port.

Yet, at the same time, they always seemed to be on the cutting
edge of various upcoming technologies, with their ideas, philosophies
and methodologies being forerunners of the future directions of
the social society and scientific community of their era.

No matter what model Jonathan worked with, he found that he could
not predict with any amount of certainty which course of thought
or action any of the players on the list would take in any given
situation. Known spooks and government officials were just as
likely to switch roles with the known misfits on this or that
issue-depending, as far as Jonathan could tell on the air quality
on a given day-as they were to stoutly defend an entrenched position.

Even during the famed 'moderation' experiment, C2Net, the apparent
villain of the 'list takeover,' as the action was viewed by some,
had an abundance of employees who had previously played important
roles in the CypherPunks maintaining independence from outside
pressures, and who would do so in the future, as well.

Hettinga, known to the eCa$h Cows as the 'Patron Saint of eCa$h,'
had played varying roles in the CypherPunks history. An unabashed
glad-hander and master of public relations, he had had many an
apparent alliance with big-money outfits who were allied against
much of what the CypherPunks stood for, but he somehow managed
to maintain his alliances with even some of the more radical anarchist
on the list, eventually being the main player responsible in turning
control of the InterNet over to the CypherPunks at the end of
Channel War I.

Side-Door Sammy got his nickname by plugging Key Escrow for the
U.S. government-allowing them a back door into encryption systems
by holding the secret keys-at a time when government regulators
were close to losing support for it. Later, it turned out that
he had put in a famed Side-Door in his products, which could be
used by the CypherPunks to block the government's access to their
secret key.

Everywhere he looked, Jonathan saw examples of various factions
of the CypherPunks acting in a manner which seemed ill-suited
to the traditional roles that history would place on them as a
result of their perceived positions and alliances.
Jonathan looked at his charts on the others mentioned in the email
that currently held his attention.

Chudov-one of the shit-disturbers during the censorship crisis,
but also one of the administrators of the resurrected distributed
lists.

Thorn-a "been there, done that, got the T-shirt" type
of individual who had still managed to remain naïve in many
ways, even in regard to his own deep-seated paranoia and resulting
conspiracy theories.

Back and Finney-both strong intellectuals with a good grasp of
both the technology and politics of encryption and privacy issues,
but both had replied in private email to Toto's "Make Big
$$$ Licking Your Own Nuts At Home" spams. Were they double
agents, setting him up for a fall, or were their private lives
a world apart from their public personas?

Even Jonathan's grandfather, one of the legendary founders of
the list, had, to all appearances, betrayed them toward the end
of Channel War II. Yet Jonathan clearly remembered the joy with
which his family was received in their journey through the CypherPunks
underground at the close of the war.

Jonathan took off his reading glasses and rubbed his eyes, once
again. He decided to knock off for a while, have a quiet drink,
and get some much needed rest.
It seemed that the more information he had at his beck and call,
the less he knew about the players in the CypherPunks arena, and
the bigger the mystery surrounding their actions and the motives
behind them.

He sighed, and reached for the Jim Beam, once again.

Chapter 19 - TruthMonger

{% endraw %}
```

## Thread

+ Return to [March 1997](/archive/1997/03)

+ Return to "[Bubba Rom Dos <bubba@dev.null>](/authors/bubba_rom_dos_bubba_at_dev_null_)"

+ 1997-03-28 (Fri, 28 Mar 1997 13:29:27 -0800 (PST)) - WebWorld 19 - _Bubba Rom Dos<EMAIL_ADDRESS>


text:
!!! info
    This example will demonstrate how to reshape an input table as though it were a 2D array.

## Overview

This filter will take a `vtkTable` object and reshape it. This filter essentially treats `vtkTable`s as 2D matrices and reshapes them using `numpy.reshape` in a C contiguous manner. Unfortunately, data fields will be renamed arbitrarily because VTK data arrays require a name.

## ParaView Example

!!! failure "Description to come!"
    There are a lot of pages in the documentation and we are trying to fill all content as soon as possible. Stay tuned for updates to this page

<!--- TODO --->

## Python Example

!!! info "{lookup:PVGeo.filters.tables.ReshapeTable}"

```py
import numpy as np
import vtk
from vtk.numpy_interface import dataset_adapter as dsa
import PVGeo
from PVGeo.filters import ReshapeTable

# Create some input table
t0 = vtk.vtkTable()
# Populate the tables
arrs = [None, None, None]
n = 400
ncols = 2
nrows = int(n * len(arrs) / ncols)
titles = ('Array 0', 'Array 1', 'Array 2')
arrs[0] = np.random.random(n)
arrs[1] = np.random.random(n)
arrs[2] = np.random.random(n)

t0.AddColumn(PVGeo.convertArray(arrs[0], titles[0]))
t0.AddColumn(PVGeo.convertArray(arrs[1], titles[1]))
t0.AddColumn(PVGeo.convertArray(arrs[2], titles[2]))

# Use the filter to reshape the table
order = 'F'
newtitles = ['Title %d' % i for i in range(ncols)]
output = ReshapeTable(order=order,
                      ncols=ncols,
                      nrows=nrows,
                      names=newtitles).Apply(t0)

# Check the output against NumPy
wpdi = dsa.WrapDataObject(output)
tarr = np.zeros((nrows, ncols))
for i in range(ncols):
    tarr[:,i] = wpdi.RowData[i]
arrs = np.array(arrs).T
arrs = arrs.flatten()
arrs = np.reshape(arrs, (nrows, ncols), order=order)
assert(tarr.shape == arrs.shape)
assert(np.allclose(tarr, arrs))

```

repository: OpenGeoVis/PVGeo-Website

repo_name: OpenGeoVis/PVGeo-Website


text:
# Changelog

## 0.5.5
- Dagit now accepts parameters via environment variables prefixed with `DAGIT_`, e.g. `DAGIT_PORT`.
- Fixes an issue with reexecuting Dagstermill notebooks from Dagit.
- Bug fixes and display improvments in Dagit.

## 0.5.4

- Reworked the display of structured log information and system events in Dagit, including support
  for structured rendering of client-provided event metadata.
- Dagster now generates events when intermediates are written to filesystem and S3 storage, and
  these events are displayed in Dagit and exposed in the GraphQL API.
- Whitespace display styling in Dagit can now be toggled on and off.
- Bug fixes, display nits and improvements, and improvements to JS build process, including better
  display for some classes of errors in Dagit and improvements to the config editor in Dagit.

## 0.5.3

- Pinned RxPY to 1.6.1 to avoid breaking changes in 3.0.0 (py3-only).
- Most definition objects are now read-only, with getters corresponding to the previous properties.
- The `valueRepr` field has been removed from `ExecutionStepInputEvent` and `ExecutionStepOutputEvent`.
- Bug fixes and dagit UX improvements, including SQL highlighting and error handling.

## 0.5.2

- Added top-level `define_python_dagster_type` function.
- Renamed `metadata_fn` to `typecheck_metadata_fn` in all runtime type creation APIs.
- Renamed `result_value` and `result_values` to `output_value` and `output_values` on `SolidExecutionResult`
- Dagstermill: Reworked public API now contains only `define_dagstermill_solid`, `get_context`,
  `yield_event`, `yield_result`, `DagstermillExecutionContext`, `DagstermillError`, and
  `DagstermillExecutionError`. Please see the new
  [guide](https://dagster.readthedocs.io/en/0.5.2/sections/learn/guides/data_science/data_science.html)
  for details.
- Bug fixes, including failures for some dagster CLI invocations and incorrect handling of Airflow
  timestamps.


text:
Computed Properties
===================

Sometimes CSS properties are dynamically computed based upon the context of the style. For example an property value with an `em` unit is proportional to the parent element.

![Audits](../elements/computed-properties.png)

####Exercise
Inspect the element below and analyze the defined versus computed properties:

		Here is some calculated content

repository: Rgghgh/chrome-dev-tools

repo_name: Rgghgh/chrome-dev-tools


text:
## Room Descriptions

Green Rooms
Name: Supply Depots
Entry: Green Access Card (free at start of game)
Possible Contents: Probe, Access Card (Red, Yellow, Blue), Hazard, Nothing

Blue Rooms
Name: Discruptor Banks
Entry: Blue Access Card
Possible Contents: Probe, Access Card (Red, Yellow), Hazard, Nothing

Red Rooms
Name: Negatron Labs
Entry: Red Access Card
Possible Contents: Negatron AVD, Probe, Access Card (Blue or Yellow), Hazard, Nothing

Yellow Rooms
Name: Decoder Stations
Entry: Yellow Access Card
Possible Contents: Decoder AVD, Probe, Access Card (Red, or Blue), Hazard, Nothing

## Room List

Red Sector
0.0.0 - Green
0.0.1 - Blue
0.0.2 - Blue
0.1.0 - Green
0.1.1 - Yellow
0.1.2 - Green

Yellow Sector
2.0.0 - Green
2.0.1 - Red
2.0.2 - Blue
2.1.0 - Green
2.1.1 - Red
2.1.2 - Green

Green Sector
1.1.0 - Green
1.1.1 - Blue
1.1.2 - Yellow
1.2.0 - Green
1.2.1 - Yellow
1.2.2 - Green

Blue Sector
0.2.0 - Green
0.2.1 - Red
0.2.2 - Yellow
1.0.0 - Green
1.0.1 - Red
1.0.2 - Green

repository: BanjoFox/bad-hackerman

repo_name: BanjoFox/bad-hackerman


text:
# git-contribs
A lightweight tool, written in GO, to display the contributors statistics of a Git project.

## Installation

### Homebrew
```bash
brew tap ajardin/formulas
brew install git-contribs
```

### Manual
1. Download the binary corresponding to your operating system from
the [releases page](https://github.com/ajardin/git-contribs/releases).
2. Compile by yourself the binary corresponding to your operating system from the source code.

## Usage
```bash
# Default settings from a project where Git has been initialized.
git-contribs

# With a specific path to a Git project (default value is ".").
git-contribs -path="${HOME}/myproject"

# From a specific date (default value is "01 Jan 2000").
git-contribs -start="01 May 2019"

# With a specific threshold (default value is 10).
git-contribs -threshold=100

# All flags can also be used at the same time.
git-contribs -path="${HOME}/myproject" -start="01 May 2019" -threshold=100
```

## Preview
```bash
git clone git@github.com:golang/go.git
git-contribs -path="go/" -threshold=1000

+------+----------------------+---------------------+---------+------------+-----------+---------------+-----------+
| RANK |         NAME         |        EMAIL        | COMMITS | INSERTIONS | DELETIONS | LINES/COMMITS | ACTIVITY  |
+------+----------------------+---------------------+---------+------------+-----------+---------------+-----------+
|    1 | Russ Cox             |<EMAIL_ADDRESS>    |    6399 |    1182715 |    895122 |           324 | 3932 days |
|    2 | Robert Griesemer     |<EMAIL_ADDRESS>    |    3044 |     391169 |    261566 |           214 | 4082 days |
|    3 | Rob Pike             |<EMAIL_ADDRESS>      |    2961 |     691834 |    522117 |           409 | 4070 days |
|    4 | Brad Fitzpatrick     |<EMAIL_ADDRESS>|    2232 |     254591 |     50782 |           136 | 3032 days |
|    5 | Ian Lance Taylor     |<EMAIL_ADDRESS>   |    1719 |      63945 |     31969 |            55 | 3890 days |
|    6 | Josh Bleecher Snyder |<EMAIL_ADDRESS>|    1211 |     144696 |    139687 |           234 | 2106 days |
|    7 | Andrew Gerrand       |<EMAIL_ADDRESS>    |    1184 |      80560 |     75804 |           132 | 2559 days |
|    8 | Austin Clements      |<EMAIL_ADDRESS> |    1143 |      45505 |     29075 |            65 | 1659 days |
+------+----------------------+---------------------+---------+------------+-----------+---------------+-----------+
```

repository: ajardin/git-contribs

repo_name: ajardin/git-contribs


text:
Title: Lab 13: Making websites!
Category: labs
Date: 2019-12-05
Author: Chris Tanner
Slug: lab13
Tages: websites, web pages, http, html, google sites, wix, www

## Jupyter Notebooks
- [Lab 13: Making Websites]({filename}notes/cs109a_Lab13_Websites.ipynb)


text:
# SimpSOM (Simple Self-Organizing Maps)

[![DOI](https://zenodo.org/badge/91130860.svg)](https://zenodo.org/badge/latestdoi/91130860)
[![PyPI version](https://badge.fury.io/py/SimpSOM.svg)](https://badge.fury.io/py/SimpSOM)
[![Build Status](https://travis-ci.org/fcomitani/SimpSOM.svg?branch=master)](https://travis-ci.org/fcomitani/SimpSOM)
[![Documentation Status](https://readthedocs.org/projects/simpsom/badge/?version=latest)](https://simpsom.readthedocs.io/en/latest/?badge=latest)

## Version 1.3.4

SimpSOM is a lightweight implementation of Kohonen Self-Organizing Maps
(SOM) for Python 2.7 and 3, useful for unsupervised learning,
clustering and dimensionality reduction.

The package is now available on PyPI, to retrieve it just type
`pip install SimpSOM` or download it from here and install with
`python setup.py install`.

It allows you to build and train SOM on your dataset, save/load the trained
network weights, and display or print graphs of the network with
selected features. The function `run_colorsExample()` will run a toy
model, where a number of colors will be mapped from the 3D RGB space to
the 2D network map and clustered according to their similarity in the
origin space.

![](./docs/_images/colorExample.png)

## Dependencies

-   Numpy 1.11.0 (older versions may work);
-   Matplotlib 1.5.1 (older versions may work);
-   Sklearn 0.15 (older versions may work);

## Example of Usage

Here is a quick example on how to use the library with a `raw_data`
dataset:

    #Import the library
    import SimpSOM as sps

    #Build a network 20x20 with a weights format taken from the raw_data and activate Periodic Boundary Conditions.
    net = sps.somNet(20, 20, raw_data, PBC=True)

    #Train the network for 10000 epochs and with initial learning rate of 0.01.
    net.train(0.01, 10000)

    #Save the weights to file
    net.save('filename_weights')

    #Information on each node is stored in the .nodeList attribute of the network. These include each node position
    #in the hexagonal grid (.pos) or its weights (.weights), i.e. the position of the node in the features space.
    position_node0 = net.nodeList[0].pos
    weights_node0 = net.nodeList[0].weights

    #Print a map of the network nodes and colour them according to the first feature (column number 0) of the dataset
    #and then according to the distance between each node and its neighbours.
    net.nodes_graph(colnum=0)
    net.diff_graph()

    #Project the datapoints on the new 2D network map.
    net.project(raw_data, labels=labels)

    #Cluster the datapoints according to the Quality Threshold algorithm.
    net.cluster(raw_data, type='qthresh')

## A More Interesting Example: MNIST

Here is another example of SimpSOM capabilites: the library was used to try and reduce a MNIST handwritten digits dataset. A 50x50 nodes map was trained with 500 MINST landmark datapoints and 100000 epochs in total, starting from a 0.1 learning rate and without PCA Initialisation.

![](./docs/_images/nD_annotated.png)

Projecting a few of those points on the map gives the following result, showing a clear distinction between cluster of digits with a few exceptions. Similar shapes (such as 7 and 9) are mapped closed together, while relatively far from other more distinct digits. The accuracy of this mapping could be further improved by tweaking the map parameters, by training the network for more epochs or with a more adequate choice of initial dataset.

## Documentation

See [here](https://simpsom.readthedocs.io/en/master/) the full API documentation

## Citation

If using this library, please cite it as

> Federico Comitani, 2019. fcomitani/SimpSOM: v1.3.4. doi:10.5281/zenodo.2621560

## What\'s New

- It's now possible to explicitly choose the output folder.

repository: chandpes/SimpSOM

repo_name: chandpes/SimpSOM


text:
Udemy Babel Preset for our Website
===================================

This is the main configuration used by our
[`udemy/website-django/static/`](https://github.com/udemy/website-django/tree/master/static/.babelrc) codebase.

# Installation

Install [Babel](https://www.github.com/babel/babel) locally. See this package's package.json
for the correct peer dependency version:

    $ yarn add @babel/core

Install the Udemy Babel Preset locally.

    $ yarn add babel-preset-udemy-website

# Configuration

Add an `extends` section to your `.babelrc` and specify `udemy` as an extended configuration.

```js
// At .babelrc

{
    "presets": ["udemy-website"]
}
```

# Contributing

See [Contributing](/README.md#contributing).

repository: udemy/js-tooling

repo_name: udemy/js-tooling


text:
# Routing

**Level: Beginner** 🍃

## Basic routing

The code is an example of a basic route.

```csharp
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapGet("/", () => "Hello World!");

app.Run();
```
## Route methods

## Route


text:
A userscript adds all mentioned links in the side bar

* This userscripts adds useful links from the comments into the sidebar.
* Ignored links:
  * User mentions
  * Links surrounding images
  * Duplicate (only first occurrence will appear)
* The sidebar section includes:
  * A button to load hidden items (if it exists on the page; [example page](https://github.com/isaacs/github/issues/215))
  * An internal link to the comment that contains the link
  * The mentioned link
* Idea from: https://github.com/isaacs/github/issues/1627
* Click [this link](https://raw.githubusercontent.com/Mottie/GitHub-userscripts/master/github-mentioned-links.user.js) to install from GitHub; or, install from [GreasyFork](https://greasyfork.org/en/scripts/398907-github-mentioned-links) or [OpenUserJS](https://openuserjs.org/scripts/Mottie/GitHub_Mentioned_Links).

## Screenshot

No links

![](https://raw.githubusercontent.com/Mottie/GitHub-userscripts/master/images/github-mentioned-links-none.png)

Links

![](https://raw.githubusercontent.com/Mottie/GitHub-userscripts/master/images/github-mentioned-links.gif)

## Change Log

### Version 0.1.0 (2020-03-28)

* Initial commit

repository: NateWeiler/Resources

repo_name: NateWeiler/Resources


text:
# About Amorphous

[![version](https://img.shields.io/npm/v/amorphous.svg)][npm-package]
[![license](https://img.shields.io/github/license/ariabuckles/amorphous.svg)][LICENSE]
[![build status](https://travis-ci.com/ariabuckles/amorphous.svg?branch=master)][travis-ci]
[![Coverage Status](https://coveralls.io/repos/github/ariabuckles/amorphous/badge.svg)][coverage]
[![docs](https://img.shields.io/badge/docs-js.org-ff69b4.svg)][docs]

[npm-package]: https://www.npmjs.com/package/amorphous
[LICENSE]: https://github.com/ariabuckles/amorphous/blob/master/LICENSE
[travis-ci]: https://travis-ci.com/ariabuckles/amorphous
[coverage]: https://coveralls.io/github/ariabuckles/amorphous
[docs]: https://amorphous.js.org

Amorphous makes sharing state in react as easy as using `setState`.

Just as `this.state` is a component's state and can be updated with
`setState`, `this.appState` is an app's state and can be updated with
`this.setAppState`:

```javascript
class Input extends AppComponent {
  render() {
    return (
      <input
        type="text"
        value={this.appState.text}
        onChange={(e) => this.setAppState({ text: e.target.value })}
      />
    );
  }
}
```

Amorphous is designed to:

 * get your app's state management working as quickly as possible
 * avoid unnecessary pitfalls while doing so

### Usage

Amorphous has two main classes:

 * `AppComponent`: a class for components that use appState
 * `RootAppComponent`: a class for the root component of your app

To use `AppComponent`, you must have a `RootAppComponent` at the
root of your app. (For library authors, see
[using Amorphous in a library](using-amorphous-in-a-library.md).)

Both `AppComponent` and `RootAppComponent` have access to:

 * `this.appState`
 * `this.setAppState`
 * `shouldComponentUpdate(nextProps, nextState, appState)`
 * `componentDidUpdate(nextProps, nextState, snapshot, appState)`

### Full Example:

```javascript
import { AppComponent, RootAppComponent } from 'amorphous';

class Input extends AppComponent {

  render() {
    return (
      <input
        type="text"
        value={this.appState.text || 'null'}
        onChange={(e) => this.setAppState({ text: e.target.value })}
      />
    );
  }
}

class Output extends AppComponent {
  render() {
    return (
      <span>
        {'You typed: '}
        {this.appState.text}
      </span>
    );
  }
}

class App extends RootAppComponent {
  appState = { text: 'hi' };

  render() {
    return (
      <div>
        <Input />
        <Output />
      </div>
    );
  }
}
```


text:
class: center, middle
# Section 5 - Containers lifecycle
## 2 - Monitor & Inspect Containers
---
## Exercises

### Exercise 1
1. Create two containers, mysql and nginx as follow:
```terminal
# docker container run -d --name mysql -e MYSQL_RANDOM_ROOT_PASSWORD=true mysql
# docker container run -d --name nginx nginx sha1sum /dev/zero
```
> Note that in case of nginx, we used /dev/zero => (this is a small hack to make the main process use ~100% of the CPU).
2. Display the running processes of each container.
3. Display the most CPU intensive processes running on the host system.
4. Display a single view (Disable streaming) of containers resource usage statistics.
5. Find the "IPAddress" of the nginx container from the output of the "docker container inspect" command.
---

### Exercise 1 Solution
1. Create two containers, mysql and nginx as follow:
```terminal
# docker container run -d --name mysql -e MYSQL_RANDOM_ROOT_PASSWORD=true mysql
67efa407d4f03743118d5b5c43302e5f34e7aac42e052712a75caffbe37a439d
# docker container run -d --name nginx nginx sha1sum /dev/zero
ddbcc964f9229cf518dd85da43b4c2b1fc102d1ee561c3fc326689b078c70ab8
```

2. Display the running processes of each container:

```terminal
# docker container top mysql
UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
polkitd             5080                5067                0                   10:47               ?                   00:00:00            mysqld

# docker container top nginx
UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
root                5211                5198                91                  10:47               ?                   00:00:58            sha1sum /dev/zero
```

3. Display the most CPU intensive processes running on the host system:
```terminal
# top
...
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 5211 root      20   0    4192    344    284 R 99.9  0.0   8:35.63 sha1sum
    1 root      20   0  125632   4124   2588 S  0.0  0.1   0:01.15 systemd
    2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd
```
Press `<Ctrl-C>` to exit from the real time view of the statistics.
*Note that the first PID, reported from the "top" command which is also the most CPU intensive process, is the same as the one reported from the "docker container top nginx" command*.

4. Display a single view (Disable streaming) of containers resource usage statistics:
With the use of the CLI help documentation we can see that the "--no-stream" option can be used to disable the streaming of statistics
```terminal
# docker stats --help

Usage:  docker stats [OPTIONS] [CONTAINER...]

Display a live stream of container(s) resource usage statistics

Options:
  -a, --all             Show all containers (default shows just running)
      --format string   Pretty-print images using a Go template
      --no-stream       Disable streaming stats and only pull the first result
      --no-trunc        Do not truncate output
```

```terminal
# docker stats --no-stream
CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT   MEM %               NET I/O             BLOCK I/O           PIDS
ddbcc964f922        nginx               98.57%              108KiB / 3.701GiB   0.00%               729B / 0B           0B / 0B             1
67efa407d4f0        mysql               0.25%               364MiB / 3.701GiB   9.60%               729B / 0B           0B / 661MB          37
```

5. Find the "IPAddress" of the nginx container from the output of the "docker container inspect" command:
```terminal
# docker container inspect nginx | grep  -m1 -w  "IPAddress"
            "IPAddress": "<IP_ADDRESS>",
```

Note that we use the "--format" option to format the output using the given Go template.
Ref:
https://docs.docker.com/engine/reference/commandline/inspect/

```terminal
# docker container inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nginx
<IP_ADDRESS>
```

gha_language: Java


text:
# RemoteFiles

*Download files from the Internet and keep them up-to-date.*

[![Build Status](https://github.com/helgee/RemoteFiles.jl/workflows/CI/badge.svg)](https://github.com/helgee/RemoteFiles.jl/actions) [![codecov.io][codecov-badge]][codecov-url] [![Docs Stable][docs-badge-stable]][docs-url-stable] [![Docs Latest][docs-badge-dev]][docs-url-dev]

## Installation

The package can be installed through Julia's package manager:

```julia
Pkg.add("RemoteFiles")
```

## Quickstart

Remote files are declared through the `@RemoteFile` macro:

```julia
using RemoteFiles

@RemoteFile(JULIA_BINARY, "https://status.julialang.org/download/win64",
    file="julia-nightly-x64.exe", updates=:daily)

# Download the file if it is out-of-date
download(JULIA_BINARY)

# Check whether the file has been downloaded
isfile(JULIA_BINARY)

# Get the path
path(JULIA_BINARY)
```

By default the file is downloaded to `Pkg.dir(CURRENT_PACKAGE)/data`.
This can be customized with the `dir` keyword argument to the `@RemoteFile` macro.

`RemoteFile`s can be grouped together in a `RemoteFileSet`:
```julia
@RemoteFileSet BINARIES "Julia Binaries" begin
    win = @RemoteFile "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7.0-win64.exe"
    osx = @RemoteFile "https://julialang-s3.julialang.org/bin/osx/x64/0.7/julia-0.7.0-osx10.7+.dmg"
end

# Download all of them

download(BINARIES)
```

Note that there is also a function-interface with `RemoteFile` and
`RemoteFileSet`, see their docstrings.

RemoteFiles.jl will try to download files via the [cURL](https://curl.haxx.se/) command-line tool
by default and automatically fall back to use [wget](https://www.gnu.org/software/wget/) or
[HTTP.jl](https://github.com/JuliaWeb/HTTP.jl) if the download fails or the respective binaries
are not available.

## Documentation

Read the [documentation][docs-url-stable].

[travis-badge]: https://travis-ci.org/helgee/RemoteFiles.jl.svg?branch=master
[travis-url]: https://travis-ci.org/helgee/RemoteFiles.jl
[av-badge]: https://ci.appveyor.com/api/projects/status/nr2fv8tngcru03k0?svg=true
[av-url]: https://ci.appveyor.com/project/helgee/remotefiles-jl
[coveralls-badge]: https://coveralls.io/repos/helgee/RemoteFiles.jl/badge.svg?branch=master&service=github
[coveralls-url]: https://coveralls.io/github/helgee/RemoteFiles.jl?branch=master
[codecov-badge]: http://codecov.io/github/helgee/RemoteFiles.jl/coverage.svg?branch=master
[codecov-url]: http://codecov.io/github/helgee/RemoteFiles.jl?branch=master
[docs-badge-dev]: https://img.shields.io/badge/docs-dev-blue.svg
[docs-url-dev]: https://helgee.github.io/RemoteFiles.jl/dev/
[docs-badge-stable]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-url-stable]: https://helgee.github.io/RemoteFiles.jl/stable/

gha_language: Julia

gha_license_id: NOASSERTION


text:
---
layout: post
title: Game Graphics-Assignment 6.0
published: true
---

##3d is HARD!!.

Time Spent: ~18 Hours.
[Download-Assignment 6.0](http://cade.utah.edu/~gujjar/Assignment6/game.zip)

_Purpose of the Assignment_:

Purpose of the assignment was to render our objects in 3d,and also have depth buffering.

_How I did the Assignment_:

This time I gave a brief reading of the requirements and then got changing code very soon.This was really a good idea.I felt like i understood more as I kept writing code. I also made a lot of commits in this assignment,every time i felt like this are working i did a commit and moved on to changing it.
This helped me revert back to a working version very fast.

_My First Task_:

I replaced the current vertices and Math files with the new ones,just so I can avoid any problems in the future.

I also enabled culling in openGL.This was fairly easy and I also added an assert to check if there were any errors when enabling it.

Encapsulating in the same task I also added a 3rd position on the lua file.The new positions didnt render the cube in 3d but I was able to see a square covering the whole screen.
This was because I didnt have a camera to transform location and position.Once I added the camera and keep it away from the cube,it wont cover the whole screen.

_My Second Task_:

When I made changes to the lua file,I had some hardcoded values in my lua file load that were causing unwanted behavior.I got rid of them and checked it in.
I also updated the code in the fragment shaders with the one in vertex shaders to maintain consistency and avoid linker errors.
After this I was able to render the square that had 3 coordinates.

I also decided to encapsulate my mesh and its transform in a GameObject. This helps with moving data among functions

Adding a Camera:
From my understanding of Unity, Camera is also a gameobject but has other properties. So I have a Camera struct that has a component called gameobject that is responsible for the position and orientation of the camera.
I also added other functionalities to my camera which calculated  a WorldToCameraTransformationMatrix and a CameraToScreenTransformationMatrix.
Here's my interface for the camera.

This is how the camera looks when zoomed in

_My Third Task_:

Converting my square into a cube,this was kind of confusing for me because in OpenGl it was as simpleas changing a number from 2 to 3 which mainted the count of the vertices.But in d3d i didnt find that variable,my assumption was d3d does it
default,but I was wrong,we needed to change a define for D3d.Once that was done I was able to see the side faces of the cube.

_My Fourth Task_:

Rotating the cube,
This was very easy to do in D3D.I just had to made a new quaternion every frame and send it to my d3d graphics,but on openGL the data gets currupted when moving from one function to another.I am still unable to figure out
the problem that is causing this.So I just left my cube non rotating in openGL and added all functionalities,

Troubleshooting ideas I implemented:

Generally when class data is being passed thru functions,there are 2 things that are commonly used.
Assignment operator and copy constructor, I defined both of them for the quaternion

Update:

This problem was solved.

Michael helped me figure out the problem,

The problem was
#define EAE6320_GRAPHICS_ISDEVICEDEBUGINFOENABLED

This code is defined in the Configuration.h file,which graphics.h includes.

But the cMyGame.cpp does not include, so my cMyGame.cpp considers the size of my gameobject to be 8 bytes more(2 GLuints) than what my graphics considers it during debug time.

So when I create my gameobject in cMyGame.cpp it is 48 bytes(because the #define is not something my game will consider.)

But when the data is passed into my graphics it is just 40 bytes.its is still the same struct,but the graphics project visualises the struct with the #define included. which means its going to ignore the 2 GLuints in the struct. and bring down the size to 40 bytes.

The way we figured this out was way complicated, I am glad Michael has the expertise to understand assembly. What we noticed that in assembly code,the way it was offsetting to get the rotation vector was through 20h.which means it was jumping 2 floats ahead and trying to read they bytes from there.

We noticed this anomaly because the myGame.cpp was only offsetting with an 18h.

So we went and commented out the #define in te configuration.h and voila. everything works.

I tried to articulate as much as I can,but if anyone wants to add anyuthing please feel free.

This problem has taken more than 8 hours of my time trying to figure out.

_My Fifth Task_:

Enabling depth buffering,

Adding the depth buffering was fairly easy,the code was given and we just had to know to add it in the right places.Once all the code was added,depth buffering was enabled.

I also added the floor.lua file at this point so I can keep the cube on the floor. this is just a plane,so I layed it on the y axis plane.And I had the cube.

This is how the cube should be when culling is enabled.

Controls
Camera

Up arrow to move up

Down arrow to move Down

Left arrow to move Left

Right arrow to move Right

Space bar to zoom in

Control to zoom out

Cube
W to move up

A to move left

S to move down

D to move right.

The cube and camera also moves independent of frame rate.The way I did this was to multiply the offset of the movement with time taken during previous frame.

Questions Answered:

Vertices required for the cube when doing index drawing is 8 vertices.As compared to vertex drawing where would have to repeat atleast 1 vertex for every triangle. we would need 2 triangles for each face so we would need to draw 12 triangles.
As I mentioned we need to send atleast 1 vertex repeatedly drawing 12 triangles would require 36 vertices, which is 98 floats.breaking it down more it is 392 bytes of data.

By using indexed drawing we have 8 vertices which 24 floats and 96 bytes and we use 72 bytes to store indices.on the whole the number comes to 168 bytes,which is less than half of what we would have if we did vertex drawing.

We save 224 bytes on the whole,by using index drawing.

Interface for my Camera

For the Gameplay programmer Camera is also a gameobject that he needs to submit to the graphics.So I overloaded the submitToGraphics function to also b e able to take int he camera.The Graphics interface has 2 functions submitMesh and SubmitCamera.
There is no abstraction here because the graphics needs to be able to differentiate the objects sent to it.

The way my data is converted into a draw call buffer is in the graphics function,where i pass in my rotation and position to the cMatrixTransformation constructor to create a 4x4 matrix.

I feel this is not ideal and I would want to maintain a drawable class that has the data required for the drawcall.This drawable data is created in the submitMesh function.

Game code that submits a drawcall

```

	eae6320::Application::cbApplication::sendToGraphics(square);

	eae6320::Application::cbApplication::sendToGraphics(floor);

	eae6320::Application::cbApplication::sendToGraphics(mainCamera); ```

As mentioned above the Gameplay programmer considers the camera just like anything else he deals with interms of graphics and just submits it.I dont have the functionality right now for multiple cameras.I think this is convinient for the gameplay programmer.

filename: 2016-9-6-Game Graphics-Assignment6.md


text:
---
layout: post
commentshortlink: "http://ps-s.clarkezone.dev/p6"
title:  "Animated vector graphics in C++ using Windows::UI::Composition"
date: 2019-05-05 11:00:45 -0800
categories: [UI,Windows]
tags: [UWP,WinComp,C++]
---

## Native vector graphics in Windows
This post describes some new vector graphics APIs recently added to the Windows platform (```ShapeVisual```, ```SpriteShape``` and friends), some scenarios they can unlock for you and how to use them from C++ in WIN32 desktop applications.  The sample I walk through along with versions written in C# are available in this repo: http://github.com:clarkezone/UWPCompositionDemos.

![example](/static/img/vectors/Vectors_in_Win32.gif)

## Some History: Composition in the Windows DWM
Since Windows Vista, all roads from an application's UI tree to the monitor have gone via the Desktop Window Manager (DWM for short).  We never got the "look, my window is a flag" example from early Longhorn tech demos:

<iframe width="560" height="315" src="https://www.youtube.com/embed/p2rQrd_uocI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

but having a composing window manager or system compositor has [brought many advantages to your desktop](https://en.wikipedia.org/wiki/Compositing_window_manager).  Remember when you could "paint" the screen with your hung app?

# Give me your bitmaps
What you may not realize is that, from the inception of the composed desktop in Vista until as recently as in Windows 8.1, DWM has only supported bitmaps/textures as an input format that can be composed from.  As a consequence, if you were writing an application and needed to display content like a button your application would ultimately needed to produce a bitmap representation of the button using either GDI or DirectX to get it on screen.  Same deal for more exotic content such as text or non-rectangular shapes.  Oh, and animations? those need a bitmap for every frame at display refresh rate (>= ~60Hz).

As app developers, we have lived in blissful ignorance of this byzantine complexity since our friendly neighborhood UI frameworks have been doing all the heavy lifting for us.  Thankfully.

# Enter Primitives
Starting in Windows 10, DWM got a lot smarter with regard to input formats, adding support for a number of non-bitmap based content primitives such as ```SpriteVisual```, ```SolidColorVisual```, ```CompositionLinearGradientBrush``` and others making framework and more advanced app developers lives simpler.

# Animated vector all the things

![alt text](https://airbnb.io/lottie/images/ShowcaseWalgreens.gif)

It's hard to find a popular consumer app these days that doesn't have a cute loading screen, welcome animation or app tutorial that doesn't contain a wealth of beautifully crafted animated characters bringing a more playful, human feel to the scenario. This trend was accelerated with the advent of the [Lottie tool](https://airbnb.io/lottie/#/) from Air BnB which made it much easier for designs to create said animations and dev's to get the resulting assets into their codebase.

# Native Animated Vector Graphics in Windows

To bring this capability to Windows in an efficient way, the composition team set out on a journey to add a rich set of vector animation primitives to the engine, staring in the 1809 update and delivering a complete end-to-end implementation in the Spring 2019 release.  We are releasing both a series of API's that bring low-level capabilities to the platform, a toolchain to enable a Lottie-based designer developer workflow from After Effects and a new XAML control that makes it easy for UI developers to incorporate vector animation in apps.

Because the low-level support is implemented in a framework agnostic way in the DWM itself, it's possible to get animated vector support in UWP XAML Apps, WPF, Winforms and even desktop WIN32 apps as we'll explore here.

# Hello Shape
For the remainder of this post I will show how to use the low-level primitives.  I figured we'd start off at the lowest level and build up from there.

Since we are starting low-level, I decided to lead with a C++ WIN32 sample using [c++/winrt](https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/intro-to-using-cpp-with-winrt).  C++ desktop developers have been less well served with good samples and, since the API's here work everywhere, it's as good a place as any to start.  Plus C++/WINRT makes it super easy to call WinRT API's from WIN32.

Let's start by creating a basic circle using a ```ShapeVisual``` to host it in the visual tree for us:

```c++
void Scenario1SimpleShape(const Compositor & compositor, const ContainerVisual & root) {
	ShapeVisual shape = compositor.CreateShapeVisual();
	shape.Size({ 100.0f,100.0f });
```

This should feel pretty familiar if you have previously experimented with the Windows Visual Layer at all (if not check out the docs [here](https://docs.microsoft.com/en-us/windows/uwp/composition/visual-layer)).  Next we need a geometry for our circle; let's create an ```EllipseGeometry``` and set it's radius:

```c++
	auto circleGeometry = compositor.CreateEllipseGeometry();
	circleGeometry.Radius(float2(30, 30));
```

to get the Ellipse show up we need to create a ```SpriteShape``` from the geometry and set up a brush to fill it with and an offset to position it spatially:

```c++
	auto circleShape = compositor.CreateSpriteShape(circleGeometry);
	circleShape.FillBrush(compositor.CreateColorBrush(Windows::UI::Colors::Orange()));
	circleShape.Offset(float2(50, 50));
```

and finaly get it in the visual tree by adding the circle to our ```ShapeVisual``` and adding the ```ShapeVisual``` to the visual tree:

```c++
	shape.Shapes().Append(circleShape);

	root.Children().InsertAtTop(shape);
```

OK, pretty simple stuff.

![example](/static/img/vectors/circle.PNG)

Now, how about we create a more interesting composition path using Direct2D.  We need a couple of helpers to achieve this: firstly a ```LinearGradientBrush``` with a couple of color stops to define our fill:

```c++
// Helper funciton to create a GradientBrush
Windows::UI::Composition::CompositionLinearGradientBrush CreateGradientBrush(const Compositor & compositor)
{
	auto gradBrush = compositor.CreateLinearGradientBrush();
	gradBrush.ColorStops().InsertAt(0, compositor.CreateColorGradientStop(0.0f, Windows::UI::Colors::Orange()));
	gradBrush.ColorStops().InsertAt(1, compositor.CreateColorGradientStop(0.5f, Windows::UI::Colors::Yellow()));
	gradBrush.ColorStops().InsertAt(2, compositor.CreateColorGradientStop(1.0f, Windows::UI::Colors::Red()));
	return gradBrush;
}
```

The next helper object contains some boilerplate code needed to convert from an ID2D1Geometry interface to an interop interface called ```IGeometrySource2DInterop``` that is compatible with ```CompositionPath``` as a constructor argument.  More about ```CompositionPath``` in a minute.

```c++
// Helper class for converting geometry to a composition compatible geometry source
struct GeoSource implements<GeoSource,
	Windows::Graphics::IGeometrySource2D,
	ABI::Windows::Graphics::IGeometrySource2DInterop>
{
public:
	GeoSource(com_ptr<ID2D1Geometry> const & pGeometry) :
		_cpGeometry(pGeometry)
	{ }

	IFACEMETHODIMP GetGeometry(ID2D1Geometry** value) override
	{
		_cpGeometry.copy_to(value);
		return S_OK;
	}

...

private:
	com_ptr<ID2D1Geometry> _cpGeometry;
};

```

Next, let's use those two helpers to create a simple path using Direct2D.  The initial ```ShapeVisual``` configuration is the same as in the first example:

```c++
void Scenario2SimplePath(const Compositor & compositor, const ContainerVisual & root) {
	// Same steps as for SimpleShapeImperative_Click to create, size and host a ShapeVisual
	ShapeVisual shape = compositor.CreateShapeVisual();
	shape.Size({ 500.0f, 500.0f });
	shape.Offset({ 300.0f, 0.0f, 1.0f });
```

Since we are using Direct2D to create our custom path, we need to use an object that implements ```ID2D1GeometrySink``` to help construct the path using line segments of different types.  To get one of those fancy geometrySinks, we need to first create a ```ID2D1Factory``` and a smart pointer to hold the path geometry:

```c++
	com_ptr<ID2D1Factory> d2dFactory;
	check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, d2dFactory.put()));
	com_ptr<ID2D1PathGeometry> path;
```

then we'll create the path geometry using the factory and, for the path created above, create a geometry sink used to add points to the path:

```c++
	check_hresult(d2dFactory->CreatePathGeometry(path.put()));

	com_ptr<ID2D1GeometrySink> sink;
	check_hresult(path->Open(sink.put()));
```

It's then just a matter of defining how we want to fill the object and add some line segments.  Of course these could have been curved bezier segements, but we're starting simple here.
```c++
	sink->SetFillMode(D2D1_FILL_MODE_WINDING);
	sink->BeginFigure({ 1, 1 }, D2D1_FIGURE_BEGIN_FILLED);
	sink->AddLine({ 300, 300 });
	sink->AddLine({ 1, 300 });
	sink->EndFigure(D2D1_FIGURE_END_CLOSED);
```

lastly, we'll close the geometry sink:
```c++
	check_hresult(sink->Close());
```

we can then take the path geometry, wrap it using our ```GeoSource``` adapter object defined above, casting to ```IGeometrySource2D```  and construct a ```CompositionPath``` from that:

```c++
	CompositionPath trianglePath = CompositionPath(winrt::make<GeoSource>(path).as<Windows::Graphics::IGeometrySource2D>());
```

Create a ```CompositionPathGeometry``` from the ```CompositionPath``` created above:
```c++
	CompositionPathGeometry compositionPathGeometry = compositor.CreatePathGeometry(trianglePath);
```

and finally we get to create a ```SpriteShape``` using the ```CompositionPathGeometry```
```c++
	CompositionSpriteShape spriteShape = compositor.CreateSpriteShape(compositionPathGeometry);
	spriteShape.FillBrush(CreateGradientBrush(compositor));
}
```

At this point, the ```CompositionPathGeometry``` may seem like an unnecessary extra level of indirection.  It's purpose will become clearer in the next section.

![example](/static/img/vectors/trigrad.PNG)

At this point you may be wondering, where the animated part comes in.  Fear not, we're getting to that now.  Let's see what it takes to build a morph animation between two shapes.  Here I've encapsulated the path building into a helper function and ommitted the shape, D2D factory construction for brevity:

```c++
void Scenario3PathMorphImperative(const Compositor & compositor, const ContainerVisual & root) {

	... (shape and factory creation as above)

	auto squarePath = BuildSquarePath(d2dFactory);

	auto circlePath = BuildCirclePath(d2dFactory);

```

The interesting part is that we only need to use the squarePath for now as this will be the initial value that ```compositionPathGeometry``` will have until the animation and morphing kicks in:

```c++
	CompositionPathGeometry compositionPathGeometry = compositor.CreatePathGeometry(squarePath);
	CompositionSpriteShape spriteShape = compositor.CreateSpriteShape(compositionPathGeometry);
	... (set offset and fill as above)
```

Now for the animation.  First we create a new variant of key frame animation called ```PathKeyFrameAnimation``` and set it's duration

```c++
	auto playAnimation = compositor.CreatePathKeyFrameAnimation();
	playAnimation.Duration(std::chrono::seconds(4));
```

and the interesting / magic part comes in when we add the keyframes.  Here we have our animation progress value as the first parameter (a float between 0 and 1.0f where 1.0f represents 100% of the animation).  The second parameter is the specific ```CompositionPath``` we want at that progress point in the animation.  We set the square path as the default value above but when the animation plays, that will be overriden.  Assuming the paths are compatible (same number of control points defining the path), the engine will do the right thing and perform path interpolation between keyframes as the animation plays forwards or backwards:

```c++
	playAnimation.InsertKeyFrame(0, squarePath);
	playAnimation.InsertKeyFrame(0.3F, circlePath);
	playAnimation.InsertKeyFrame(0.6F, circlePath);
	playAnimation.InsertKeyFrame(1.0F, squarePath);
```

To make the animation play, we'll need to specify an ```AnimationIterationBehavior```, an ```AnimationDirection``` in this case Forever and Alternate so it will cycle backwards and forwards

```c++
	playAnimation.IterationBehavior(AnimationIterationBehavior::Forever);
	playAnimation.Direction(AnimationDirection::Alternate);
```

and then start the animation against the Path property of our CompositionPathGeomety object.

```c++
	compositionPathGeometry.StartAnimation(L"Path", playAnimation);

	... (Add the SpriteShape to our shape visual and add to the visual tree)
}
```

![example](/static/img/vectors/morph.gif)

So there we have a nice morph animation running in the system compositor with relatively little code.  But the majority of us typically don't want to programatically define animations.  Simply put, it is very hard to visualize, tweek and get them just right.  We really want to use a tool that ideally a designer can use to generate this for us.

The final example illustrates that approach.  Here, we are taking "one I made earlier", specifically code generated as output from [Lottie Windows](https://docs.microsoft.com/en-us/windows/communitytoolkit/animations/lottie), an opensource tool we're shipping.  This allows a designer to define the animation in Adobe After Effects, export and code generate all of what we just made by hand.

In order to convert your own animations, if you are a c# developer, the version of the tool that is [shipping in the store is all you need](https://www.microsoft.com/store/productId/9P7X9K692TMW).  If you are a c++ developer, you'll need to grab the PR I have open on the Lottie Windows repo [here](https://github.com/windows-toolkit/Lottie-Windows/pull/64) as a temporary measure until it is completed.

But here, we're going to use the one I made earlier.  First off, we'll define a simple helper function to play back the animation.  We're using a "master" animation named Progress to drive progress on the imported animation as a whole.  This enables us to control the playback speed, go forwards / backwards, pause etc.

```c++
ScalarKeyFrameAnimation Play(const Compositor & compositor, Visual const & visual) {
	auto progressAnimation = compositor.CreateScalarKeyFrameAnimation();
	progressAnimation.Duration(std::chrono::seconds(5));
	progressAnimation.IterationBehavior(AnimationIterationBehavior::Forever);
	progressAnimation.Direction(AnimationDirection::Alternate);
	auto linearEasing = compositor.CreateLinearEasingFunction();
	progressAnimation.InsertKeyFrame(0, 0, linearEasing);
	progressAnimation.InsertKeyFrame(1, 1, linearEasing);

	visual.Properties().StartAnimation(L"Progress", progressAnimation);
	return progressAnimation;
}
```
Let's configure up a visual to hold the code generated animation we're going to load in:
```c++
	float width = 400.0f, height = 400.0f;
	SpriteVisual container = compositor.CreateSpriteVisual();
	container.Size({ width, height });
	container.Offset({ 0.0f, 350.0f, 1.0f });
	root.Children().InsertAtTop(container);
```
Next we'll instantiate the code gen'd class, in this case ```LottieLogo1```:
```c++
	auto static bmv = winrt::make<AnimatedVisuals::LottieLogo1>();
```
we can then call the ```TryCreateAnimatedVisual``` method to instantiate the animation
```c++
	winrt::Windows::Foundation::IInspectable diags;
	auto avptr = bmv.TryCreateAnimatedVisual(compositor, diags);
```
insert it into the tree, scaling to fit our visual
```c++
	auto visual = avptr.RootVisual();
	container.Children().InsertAtTop(visual);
	container.Scale({ width / avptr.Size().x, height / avptr.Size().y, 1.0f });
```
and finally play back
```c++
	auto playanimation = Play(compositor, visual);
```
This is clearly considerably less / simpler code to get a much more impressive results with all of the heavy lifting taken care of us inside the generated code.  Make machines do the hard work!

![example](/static/img/vectors/lottie.gif)

Note that if you are able to use XAML in your application and looking to integrated animated vector graphics, there is a [handy control that can take care of all of this](https://docs.microsoft.com/en-us/uwp/api/microsoft.ui.xaml.controls.animatedvisualplayer?view=winui-2.2) which obviates the need to build a customer player as we've done here.  But our approach taken here is perfectly valid for cases where you can't / don't want XAML.

Thanks for reading to the end, if you are interested in more information about animated vector graphics in Windows check out the documentation as well as the [source code](https://github.com/windows-toolkit/Lottie-Windows) for the Lottie Windows tool mentioned above as well as the official documentation for the API's [here](https://docs.microsoft.com/en-us/windows/communitytoolkit/animations/lottie) and we'd love feedback on twitter [@windowsui](https://twitter.com/windowsui) or to me personally [@clarkezone](https://twitter.com/clarkezone).

gha_language: SCSS


text:
# FXRibbon
Ribbon control for Java, using JavaFX framework, based on [Microsoft Ribbon](https://en.wikipedia.org/wiki/Ribbon_(computing)).
If you want to support the development of this library consider a [donation or sponsoring a feature or bug fix](http://www.pixelduke.com/contact).

![Sample FXRibbon app](./Ribbon.png)

## Documentation
For more information check [http://www.pixelduke.com/fxribbon](http://www.pixelduke.com/fxribbon)

## How to get the library
- If you just want to download the jar file containing the library go to [releases tab](https://github.com/dukke/FXRibbon/releases).
- If you want to use maven the jar is available through [Bintray](https://bintray.com/dukke/maven/FXRibbon).

Please send me pictures of your application that is using FXRibbon, this is for me to know how users are effectively using
it and make adjustments accordingly and if you allow it, to showcase example uses.

## Issues and Contributions
Issues can be reported to the Issue tracker. If you're not sponsoring or fixing them yourself, please be patiente as I can only work on them during my spare time and according to priorities.
We welcome contributions, they can be submitted via Pull requests.

## Pull Requests (PR)
We welcome contributions via PR.
Before submitting a PR please, please file an issue for prior discussion. This will avoid you wasting time with a PR that
might not be approved because for instance might be outside the intended scope of the project.

## Controls used inside Ribbon
The controls used inside the ribbon (e.g. comboboxs, texfield, etc)  are based on JMetro, visit [http://www.pixelduke.com/jmetro](http://www.pixelduke.com/jmetro)
for more information.
For now the option has been to, for the most commonly used controls inside the ribbon, have these styles available through this library and so avoid another dependency for most use cases.

## Icons used on test apps
Kudos icons8 for the icons used in the sample apps, visit [https://icons8.com](https://icons8.com) for more information.

## About The Author
I hope you don't mind just a bit of publicity. I'm a [JavaFX and Swing Freelancer and Consultant](https://www.pixelduke.com), a
Software Engineer and Software Designer with experience in User Interface Design and User Experience. If you need to hire
professional assistance feel free to [contact me](https://www.pixelduke.com/contact).
Still, this is, and will remain being, a free and open source library, so feel free to use it.

# License
FXRibbon uses the [new BSD](http://en.wikipedia.org/wiki/BSD_licenses#3-clause_license_.28.22Revised_BSD_License.22.2C_.22New_BSD_License.22.2C_or_.22Modified_BSD_License.22.29) license


text:
# NLP for Nepali

This repository contains State of the Art Tokenizer, Language model
 and Classifier for Nepali, which is official language of Nepal and
  one of the official status gained language of India.

## Dataset

* Download [Nepali Wikipedia Articles Dataset](https://drive.google.com/open?id=1Yh8BlJ5bydbvZaOQEmRPlTEDZjIIoAYN) (38,757 articles) which I scraped, cleaned and
used to train the language model

* Download [Nepali News classification Dataset](https://drive.google.com/open?id=1Vm0UJ3FfWP-3guSan3FZsOV4q7rYuJIG) which I scraped and used to train
the classifier

## Results

#### Language Model

`on 30% validation set`

* Perplexity of language model: ~32

#### Classifier

* Accuracy of classification model: ~97%
* Kappa score of classification model: ~96

## Pretrained Language Model

Download pretrained Language Model from [here](https://drive.google.com/open?id=1-OhdbDd7ZDqUPihN703SvPeJQTn3JRFE)

## Classifier

Download classifier from [here](https://drive.google.com/open?id=1_u5t2hH70jbS0rMtEXhjrJ388WpOkpC8)

## Tokenizer

Trained tokenizer using Google's [sentencepiece](https://github.com/google/sentencepiece)

Download the trained model and vocabulary from [here](https://drive.google.com/open?id=1AS0Yk17rTcvdWVlwB0F7MyNu70iwRsLk)


text:
# Goals of Scribble

As I was sketching out the initial idea, I came up with four initial goals.

## Easy to get started

One of the big reasons why Sandcastle has such a bad name is because it is really hard to setup (and automate). XML documentation is another common thing for many codebases but quite often this is more for Intellisense than for end-user documentation.

Scribble should take care of the heavy lifting of setting up the documentation infrastructure, so you can get straight to writing stuff.

## Easy to use

Rather than a custom XML format or inventing a new DSL, Scribble will use Markdown for its content. This allows documentation to be:

 - header tags for sections
 - lists of things
 - code snippets
 - images
 - and of course words

## Easy to export

From your set of Markdown files you should be able to export a set of HTML/CSS/JS files so that you can publish the site elsewhere.

Jekyll is a common static site generator for Ruby, and I've worked on a [project](https://github.com/Code52/pretzel) in the past which allows you to create the site without installing Ruby on the machine. While I'm leaning towards that as a site structure, the blog-focus for some of the features may mean there's something more focused out there...

## Leverage your code

Quite often you will have code snippets which you want to include in your documentation. It might be in the form of a sample application or some unit tests, but being able to link code and documentation makes life so much easier.

Scribble should allow you to annotate your source code, which you can then reference in documentation pages.

repository: PauloLeca/scribble

repo_name: PauloLeca/scribble


text:
# Jake

An animation inspired by this [post 100 days of motion design](https://uxdesign.cc/100-days-of-motion-design-463526af852f)

<img src="jake.gif" alt="Jake Gif">

## Authors

* **Anderson Kloss Maia** - [ndrsKloss](https://github.com/ndrsKloss)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

repository: ndrsKloss/jake

gha_language: Swift

repo_name: ndrsKloss/jake


text:
### [CVE-2013-0899](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0899)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Integer overflow in the padding implementation in the opus_packet_parse_impl function in src/opus_decoder.c in Opus before 1.0.2, as used in Google Chrome before 25.0.1364.97 on Windows and Linux and before 25.0.1364.99 on Mac OS X and other products, allows remote attackers to cause a denial of service (out-of-bounds read) via a long packet.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/Live-Hack-CVE/CVE-2013-0899

repository: trickest/cve

repo_name: trickest/cve


text:
# Web Accessibility (a11y)

It is the inclusive practice of ensuring there are no barriers that prevent interaction with, or access to, websites on the World Wide Web by people with physical disabilities, situational disabilities, and social-economic restrictions on bandwidth and speed. When sites are correctly designed, developed and edited, more users have equal access to information and functionality.

## Why

* To include people with disabilities.
* To improve website usability.
* It is a law in some places **(ADA)**.

[See Dominos's case](https://www.cnbc.com/2019/10/07/dominos-supreme-court.html)

## ADA

The Americans with Disabilities Act was instituted in 1990 in an effort to end discrimination based on differing abilities.
This was a fairly revolutionary addition that led to the widespread adoption of wheelchair access ramps, accessible restroom facilities, and many other equal-access accommodations that have become a regular part of most American workplaces.

The WCAG is an internationally recognized set of guidelines for digital accessibility. It was established and is managed by the international web standards group, the W3C. The de facto standard in the US - recognized (yet not set) by the DOJ (Department of Justice), the courts, and advocates is the WCAG A, AA.

[See more](https://www.accessibility.works/blog/2021-ada-wcag-website-accessibility-standards-requirements/)

## WCAG (Web Content Accessibility Guidelines)

Guidelines to make websites more accessible. Created by W3C (Also Web standards creators) under the initiative of WAI.

WCAG 2.0 and WCAG 2.1 are stable, referenceable technical standards. They have 12-13 guidelines that are organized under 4 principles: perceivable, operable, understandable, and robust. For each guideline, there are testable success criteria, which are at three levels: A, AA, and AAA.

Current version of WCAG is 2.1 released on June 5, 2018.

### Conformance levels

WCAG 2.1 guidelines are categorized into three different conformance levels (Level A, Level AA, and Level AAA) based on the impact they have on design or visual presentation of the pages in order to meet the needs of different individuals and different situations. Conformance levels must be met in full and conformance at higher levels indicates conformance at lower levels:

* **Level A** — The lowest and easiest level of conformance to obtain. Level A sets a minimum level of accessibility and does not achieve broad accessibility for many situations.
* **Level AA** — The mid-range and most common level of conformance to obtain. Level AA is the recommended conformance for all web-based information.
* **Level AAA** — The highest and hardest level of conformance to obtain. It’s not recommended to strive for full AAA compliance as it is not possible to satisfy all Level AAA Success Criteria for some content.

### Categories

* **Perceivable**: All users must be able to perceive your content. If there is audio or video content, you should provide text alternatives. If there is text content, you should provide audio alternatives or a way that assistive technology such as screen readers can consume it for the end-user.

Ask yourself: Is there anything on my site that a deaf, colorblind, low vision or blind user would not be able to perceive?

* **Operable**: All users must be able to operate your site. Most users with disabilities use a keyboard to surf the web using character key shortcuts along the way to navigate, interact with, and access content. Your site should be forgiving to your users if they make a mistake, offering ways to retract, correct, and confirm information.

Ask yourself: Can my site be navigated and operated solely through a keyboard? Do users have control of interactive elements on my site? Are tasks on my site able to be easily and successfully completed?

* **Understandable**: Just because your users can perceive and operate your site doesn’t necessarily mean that they can understand it. Interactive elements on a site including menus, icons, and links should all give an insight to their destination.

Ask yourself: Are all my site’s interactions easy to understand? Is the content on my site presented clearly and meaningfully?

* **Robust**: Users should be able to access your site from any device, platform, or browser. Adopt best development practices to support different operating systems and browsers. To guarantee a functional site for a diverse set of audiences, avoid any mishaps and ensure that your code is clean.

Ask yourself: Is our site developed with best practices in mind? Can our site or application support a variety of devices and browsers? Is the code to our site clean?

## Assistive Technology

People with certain disabilities use display and input technologies to access online resources. There are several software and hardware solutions that have been adopted, commonly referred to as assistive technologies.

* **Screen readers** – used to listen to the content of a webpage.
* **Screen magnification software** - used to enlarge screen content to make it easier to read for users with a partial sight impairment.
* **Alternative Input Devices**- an alternative to the typical mouse and keyboard interaction for users with physical or cognitive impairment (head pointers, motion tracking or eye tracking, single switch entry devices, large-print and tactile keyboards, speech input software...).

## Tools for testing web accessibility

* Lighthouse.
* Disability simulators:
  * NoCoffee
  * Web Disability Simulator.
* Manual testing (keyboard interaction).
* Screen readers.
  * NVDA - Firefox.
  * JAWS - Internet Explorer.
  * VoiceOver - Safari.
  * ChromeVox - Google Chrome.
* Accessibility tree browser.

repository: christiandbf/web-accessibility

repo_name: christiandbf/web-accessibility