text:
# arc-rails

A bit of tooling to make `arc unit` work in a Rails project.

## Installation

Currently, `git clone` the repo into your Rails project, and include the
following in your `.arcconfig`:

```
"load": ["path/to/this/directory"],
"unit.engine": "RSpecTestEngine"
```

Currently, this cannot be installed as a gem. This is due to a limitation in
Arcanist, where load paths will not expand environment variables. If that is
fixed, then this can be converted to a gem.

## Configuration

At this time, no configuration is suported. The library follows Rails
conventions as closely as possible, so code written The Rails Way(TM) should
work out of the box.

## Requirements
This library makes assumptions about naming conventions that are in line with
Rails naming conventions (as of ~4.2):

* The code to test should be under `ROOT/app` or `ROOT/lib`
* Tests should be in `ROOT/spec`
* Tests files should end in `_spec.rb`
* There should be a 1:1 mapping between names and directories. For example,
  source code located at `ROOT/app/models/user.rb` should have its
  corresponding test at `ROOT/spec/models/user_spec.rb`

Each test file is run in an isolated process per Aranist conventions, so if
there are dependencies between test files, you will likely encounter problems.

## Usage
`arc unit` should work as expected. The `--everything` flag is supported.

Code coverage reporting is not supported at this time.

repository: Firehed/arc-rails

repo_name: Firehed/arc-rails


text:
# Herpotrichia herpotrichoides (Fuckel) P.F. Cannon, 1982 SPECIES

#### Status
ACCEPTED

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

#### Published in
Trans. Br. mycol. Soc. 79(2): 338 (1982)

#### Original name
Sphaeria herpotrichoides Fuckel, 1864

### Remarks
null

repository: mdoering/backbone

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mdoering/backbone


text:
## Event Bubbling and Capturing (事件冒泡與事件捕獲) [Back](./../JavaScript.md)

Both event bubbling and capturing are two ways of event propagation(事件傳播) in the HTML DOM APIs, when an event occurs in an element inside another element, and both elements have registered a handle for that triggered event.

#### Bubbling

**Bubbling** means that the event is first captured and handled by the inner element and then propagated to the outer one.

- IE 5.5: div -> body -> document
- IE 6.0: div -> body -> html -> document
- Mozilla 1.0: div -> body -> html -> document -> window

*Notice that: `blur`, `focus`, `load` and, `unload` won't have event bubbling*

#### Capturing

**Capturing** means that the event is first captured by the outer element and propagated to the inner one.

Capturing is also called "trickling(滴落)", which helps to remember:

`trickle down, bubble up`

*Notice that: capturing is not **supported by IE***

#### Useage

```js
/**
 * useCapture is an boolean option
 * true: for capturing
 * false: for bubbling
 */

ele.addEventListener('click', function () {
}, [useCapture]);
```

And how to prevent from event propagation:

```js
/** prevent from propagating */
ele.addEventListener('click', function (evet) {
    event.stopPropagation();
}, [useCapture]);

/** In IE */
ele.attachEvent('onclick', function () {
    window.event.cancelBubble = true;
});

/** prevent the default event */
ele.addEventListener('click', function (event) {
    event.preventDefault();
}, [useCapture]);

/** In IE */
ele.attachEvent('onclick', function () {
    window.event.returnValue = false;
});
```

license: MIT

repository: YYY-TEAM/PersonalWiki

repo_name: YYY-TEAM/PersonalWiki


text:
# Workforce Scripts
A set of Python scripts and notebooks to help administer and configure Workforce projects.

## Notebooks

Several example Jupyter notebooks are provided to demonstrate some more advanced workflows that are possible via the ArcGIS API for Python and Workforce:
- [1 - Configuring a Project](notebooks/examples/1%20-%20Configuring%20a%20Project.ipynb)
- [2 - Importing Assignments](notebooks/examples/2%20-%20Importing%20Assignments.ipynb)
- [3 - Assigning Work](notebooks/examples/3%20-%20Assigning%20Work.ipynb)
- [4 - Optimally Creating and Assigning Work Orders Based on Routes](notebooks/examples/4%20-%20Optimally%20Creating%20and%20Assigning%20Work%20Orders%20Based%20on%20Routes.ipynb)

Notebooks used for previous demos are also available:
- [UC 2018](notebooks/UC_2018)
- [Dev Summit 2019](notebooks/dev_summit_2019)
- [UC 2019](notebooks/UC_2019)
- [Dev Summit 2020](notebooks/dev_summit_2020)

In addition, we have uploaded our AGOL-compatible notebooks into a publicly accessible [group of Hosted Notebooks in ArcGIS Online](https://arcgis.com/home/group.html?id=c1695c0c2f9945a8a7fee7dd106c74ae)

## Scripts

Supports:
- Python 3.6+
- Python API for ArcGIS 1.8.3+

The Workforce team released a new version of the app supporting offline-enabled Projects in July 2020. To work with
those projects in Python and deploy the corresponding scripts in this repo, users will need to update their version
of the Python API to 1.8.3. This can be downloaded in Conda prior to 1.8.3's official release via:

`conda install -c esri/label/prerelease -c esri arcgis`

A set of Python scripts using the [ArcGIS API for Python v1.8.3+](https://developers.arcgis.com/python/).
These scripts support Workforce in both ArcGIS Online and ArcGIS Enterprise.

Note that some may scripts may work with a Python API for ArcGIS version that is less than 1.8.3 but this cannot
be guaranteed.

### Features

| Functionality                                                        | Script
|----------------------------------------------------------------------|----------------------------------------------------------------------------------------|
| [Create Assignment Types ](readmes/create_assignment_types.md)               | [create_assignment_types.py](scripts/create_assignment_types.py)              |
| [Import Workers](readmes/import_workers.md)                                  | [import_workers.py](scripts/import_workers.py)                       |
| [Import Dispatchers](readmes/import_dispatchers.md)                          | [import_dispatchers.py](scripts/import_dispatchers.py)
| [Create Assignments From CSV](readmes/create_assignments_from_csv_readme.md) | [create_assignments_from_csv.py](scripts/create_assignments_from_csv.py)          |
| [Copy Assignments To Feature Service](readmes/copy_assignments_to_fs_readme.md) | [copy_assignments_to_fs.py](scripts/copy_assignments_to_fs.py)                  |
| [Export Assignments to CSV](readmes/export_assignments_to_csv_readme.md)     | [export_assignments_from_csv.py](scripts/export_assignments_from_csv.py)          |
| [Check Assignment Completion Location](readmes/check_completion_location.md)         | [check_completion_location.py](scripts/check_completion_location.py)            |
| [Delete Assignments](readmes/delete_assignments_readme.md)                   | [delete_assignments.py](scripts/delete_assignments.py)          |                   |
| [Delete Assignment Types ](readmes/delete_assignment_types.md)               | [create_assignment_types.py](scripts/create_assignment_types.py)              |
| [Assignment Monitor (Slack Integration)](readmes/assignment_monitor.md)                           | [assignment_monitor.py](scripts/assignment_monitor.py) |
| [Migrate to Version 2 Project](readmes/migrate_to_v2.md) | [migrate_to_v2.py](scripts/migrate_to_v2.py) |
| [Reset Stale Workers ](readmes/reset_stale_workers.md)               | [reset_stale_workers.py](scripts/reset_stale_workers.py)              |
| [Report Incomplete Assignments with Work Orders ](readmes/report_incomplete_assignments_with_work_orders.md)               | [report_incomplete_assignments_with_work_orders.py](scripts/report_incomplete_assignments_with_work_orders.py)
| [Report Complete Assignments without Work Orders](readmes/report_complete_assignments_without_work_orders.md)               | [report_complete_assignments_without_work_orders.py](scripts/report_complete_assignments_without_work_orders.py)
| [Create Default Ops Dashboard](readmes/create_ops_dashboard.md)              | [create_ops_dashboard.py](scripts/create_ops_dashboard.py)|
| [Create Joined View](readmes/create_joined_view.md) | [create_joined_view](scripts/create_joined_view.py) |

### Instructions

1. Install ArcGIS API for Python package via Conda as described [here](https://developers.arcgis.com/python/guide/install-and-set-up/).
2. Clone or download this repository
3. In terminal/cmd navigate to the `scripts` folder
4. Create Conda environment
   1. Install Anaconda
   2. Run `conda env create --file environment.yml` to create the virtual environment with the correct dependencies
   3. Run `conda activate workforce-scripts` to activate the environment
5. (Optional - dev only) Configure pre-commit to run flake8 linting on pushes
   * `pre-commit install --hook-type pre-push`

To run in ArcGIS Notebooks:
1. Visit our [AGOL Hosted Notebooks group](https://arcgis.com/home/group.html?id=c1695c0c2f9945a8a7fee7dd106c74ae#overview)
2. Click on "Content"
3. Choose a notebook you'd like
4. Click on the thumbnail for "Open Notebook" to open in ArcGIS Notebooks

## Resources

 * [ArcGIS API for Python](https://developers.arcgis.com/python)
 * [Workforce for ArcGIS](http://www.esri.com/products/workforce-for-arcgis)
 * [Usecases for the Workforce Python module](https://www.esri.com/arcgis-blog/products/workforce/field-mobility/automate-workforce-with-arcgis-api-for-python/)
 * [Scheduling Workforce Python scripts with Windows Task Scheduler](https://community.esri.com/groups/workforce-for-arcgis/blog/2020/05/14/schedule-tasks-for-workforce)
 * [Scheduling Workforce Python scripts in Linux / MacOS](readmes/scheduling_with_python.md)

## Issues

Although we do our best to ensure these scripts and notebooks work as expected, they are provided as is and there is no official support.

If you find a bug, please let us know by submitting an issue.

## Contributing

Esri welcomes contributions from anyone and everyone.
Please see our [guidelines for contributing](https://github.com/esri/contributing).

## Licensing

Copyright 2020 Esri

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

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

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

A copy of the license is available in the repository's
[LICENSE](LICENSE) file.

repository: Esri/workforce-scripts

gha_language: Jupyter Notebook

repo_name: Esri/workforce-scripts


text:
# Collection

- [Collection](#Collection)
  - [Link](#Link)
  - [Collection Implementations](#Collection-Implementations)
  - [Concurrent Collections interfaces](#Concurrent-Collections-interfaces)
    - [implementation](#implementation)

## Link

- [Collection](https://liujiacai.net/blog/2015/09/01/java-collection-overview/#disqus_thread)
- [Collection guides (oracle)](https://docs.oracle.com/javase/8/docs/technotes/guides/collections/index.html)

## Collection Implementations

| Interface | Hash Table | Resizable Array | Balanced Tree | Linked List | Hash Table + Linked |
| --------- | ---------- | --------------- | ------------- | ----------- | ------------------- |
| Set       | HashSet    |                 | TreeSet       |             | LinkedHashSet       |
| List      |            | ArrayList       |               | LinkedList  |
| Deque     |            | ArrayDeque      |               | LinkedList  |
| Map       | HashMap    |                 | TreeMap       |             | LinkedHashMap       |

All of the new implementations have fail-fast iterators, which detect invalid concurrent modification, and fail quickly and cleanly (rather than behaving erratically).

## Concurrent Collections interfaces

- BlockingQueue
- TransferQueue
- BlockingDeque
- ConcurrentMap
- ConcurrentNavigableMap

### implementation

- LinkedBlockingQueue
- ArrayBlockingQueue
- PriorityBlockingQueue
- DelayQueue
- SynchronousQueue
- LinkedBlockingDeque
- LinkedTransferQueue
- CopyOnWriteArrayList
- CopyOnWriteArraySet
- ConcurrentSkipListSet
- ConcurrentHashMap
- ConcurrentSkipListMap

branch_name: refs/heads/main


text:
# _PCC Python Scraper_

#### _Super simple web scraper that uses BeautifulSoup. I wrote this script for a project that I had to do at PCC. My task was to find all of the books in the "Images of America" series about Portland, OR that were NOT in PCC's collection. My script scrapes the Arcadia Publishing site, grabbing the ISBNs and titles of appropriate books in the series, storing them in a dictionary. Then it iterates through the dictionary an uses the ISBN to search the PCC Online Catalog. The results are parsed. If the title is NOT present, then the ISBN and title are added to a csv file._

#### By _**Rafael Perez**_

## Description

_A python 2.7.x application scrapes two websites for titles in the "Image of America" series from Arcadia Publishing._

## Setup/Installation Requirements (Requires Python 2.7.x)

* _Clone repository._
* _"pip install bs4"._
* _Run "python portland-picture-books.py"._
* _Open buy_books.csv  All titles not owned by PCC will be in the file._

## Known Bugs

_There are no known bugs at this time._

## Support and contact details

_If you have any issue with this code, please contact me._

## Technologies Used

_Python, BeautifulSoup, CSV._

### License

*MIT License*

Copyright (c) 2016 **_Rafael Perez_**

repository: doohinkus/PccPythonScraper

repo_name: doohinkus/PccPythonScraper


text:
# LiDAR_georeference
Open source code implementing the basic lidar georeferencing functions described in Baltsavias (1999),and more recently along with propagation of uncertanties for LiDAR points in Glennie (2007)[1] and Schaer et al (2007) [2].

Based on MATLAB code developed for a PhD project - which can still be found in ./MATLAB. Future development will be in Python, unless someone wants to take up making a C version - although part of the point is to make the process fairly easy to understand.

If you want to contribute, use what's in ./MATLAB as a base, and if you don't see it's equivalent in Python then give it a shot. Or, if you can make any Python code you see here better/faster/more efficient/more functional please do so!

Rough plan:

- implement the basic equations for 2D and 3D scanners in Python **underway**
- implement uncertainty propagation using SymPy to handle deriving the required partial derivatives (q2 2017)
- implement output to .LAS, or postgres-pointcloud (q2 2017). Las is trickier because of user defined fields which will be required (see point above)
- ...and implement output to an Entwine index, skipping the standard output to LAS/LAZ tiles entirely. All these outputs will depend on PDAL (http://pdal.io)
- implement binary reading of Reigl LiDAR scanner output (q3 2017)

pipe dreams:

- read trajectory input from Novatel .bin files output from Inertial explorer
- read trajectory input from binary OxTS NCOM files, will need proj.4 to project (once) from an ECEF frame to some cartesian frame.
- Schaer (2007)[2] Q-factors
- faster implementation for real-time point generation and QA.
- maybe even it's own kalman filter implementation to do tightly-coupled GPS+inertial trajectory determination, avoiding the proprietary blackbox step currently required (beyond my skills at present)

[1] Glennie, C. (2007). Rigorous 3D error analysis of kinematic scanning LIDAR systems. Journal of Applied Geodesy, 1, 147–157. http://doi.org/10.1515/JAG.2007.

[2] Schaer, P., Skaloud, J., Landtwing, S., & Legat, K. (2007). Accuracy estimation for laser point cloud including scanning geometry. In Mobile Mapping Symposium 2007, Padova.

repository: adamsteer/LiDAR-georeference

repo_name: adamsteer/LiDAR-georeference


text:
# ModBus changelog

>**IMPORTANT**
>
>As a reminder, if there is no information on the update, it means that it only concerns the update of documentation, translation or text.

# 02/03/2022

- Beta version, compatible with 4.2.7

# 02/14/2022

- Fc16 function for PLCs without Fc6

# 03/20/2022

- Function Fc16 Register not followed

# 02/05/2022

- Function Exporting a Json file and Importing orders by Equipment

# 08/01/2022

- BugFix on disconnection of a device on the same bus

# 08/16/2022

- Choice of port for Modbus TCP (by default 502)

# 09/23/2022

- Change Logs pyModbus Library

# 09/26/2022

- New Timeout parameter between reading register

# 07/10/2022

- New Pre-Recorded Model System
- ReadMultiRegisters option on commands

# 10/13/2022

- Option Enable/Disable Write Message
- NbBytes option to determine the division of a register into x bytes

repository: jeedom/documentations

gha_language: HTML

gha_license_id: MIT

repo_name: jeedom/documentations


text:
# ncnnpy
This project can easily test the ncnn model and even deploy ncnn projects on python to speed up.
At present, we have implemented face detection and recognition based on ncnn and boost.
face detection has two implementation methods, getting max face by mtcnn and getting all faces by retinaface.
face recognition by insightface mobilefacenet.In the future, model transformation and debugging will be implemented in it.

### Use directly
We have compiled ncnn with avx2 and ncnnpy, you can download from Baidu Driver
https://pan.baidu.com/s/1JuhkH7qiuK1fCswckrXzcg code:hpvg
just put ncnnpy.so to ./install and run
```buildoutcfg
python face_detector.py
python face_recognition.py
```
Retinaface for detection all faces
![all%20faces.jpg](https://github.com/hanson-young/ncnnpy/blob/master/install/all%20faces.jpg)

MTCNN for detection max face
![max%20face.jpg](https://github.com/hanson-young/ncnnpy/blob/master/install/max%20face.jpg)

### Recompile
if you want change code by yourself,you should recompile!
Review CMakeList.txt and change your python path
```
if (NOT PYTHON_INCLUDE_DIRS OR NOT PYTHON_LIBRARY)
    SET(PYTHON_INCLUDE_DIRS "/usr/include/python2.7")
    SET(PYTHON_LIBRARY "/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so")
endif()
```
Review ./cmake/boost-python.cmake and change your boost path
```buildoutcfg
    set(Boost_LIBRARY_DIRS /usr/local/lib)
    set(BOOST_INCLUDEDIR /usr/include/boost)
```
Than start compling !
```buildoutcfg
git clone https://github.com/hanson-young/ncnnpy.git
cd ncnnpy
mkdir build
mkdir src/lib
# copy libncnn.a to ./src/lib
cd build && cmake ..

# ncnnpy. so will be generated under this folder
cp ncnnpy.so ./../install
cd ../install
# only python2.7
python face_detector.py
python face_recognition.py
```

- [x] face detection by mtcnn and retinaface
- [x] face recognition by mobilefacenet
- [x] python2.7

### TODO
- [ ] benchmark
- [ ] Intermediate output
- [ ] python3.6

### Dependencies
Currently only Linux and python2.7 is supported, if you want to run it on Windows or Mac,
I suggest you modify CMakeLists. txt to recompile the source code
```buildoutcfg
$ sudo apt-get install libboost-python-dev libopencv-dev
```
### License
BSD 3 Clause

### Acknowledgement
- [ncnn](https://github.com/Tencent/ncnn)
- [RetinaFace-Cpp](https://github.com/Charrin/RetinaFace-Cpp)
- [insightface](https://github.com/deepinsight/insightface)
- [mobileFacenet-ncnn](https://github.com/honghuCode/mobileFacenet-ncnn/tree/feature/mobilefacenet-mxnet2caffe)
- [numpy-opencv-converter](https://github.com/spillai/numpy-opencv-converter)

repository: piaopiaodaye/ncnnpy

repo_name: piaopiaodaye/ncnnpy


text:
# SpeedCurve Synthetic Agent for Docker

Docker container for the SpeedCurve synthetic agent with Chrome, Firefox and Lighthouse installed

## Prequisites

*ifb* must be loaded on the *host* for traffic shaping to work

```
sudo modprobe ifb numifbs=1
```

## Building the Container

Build the container from the *root* folder of the repo

```
docker build -t speedcurve-agent . -f docker/Dockerfile

```

## Using the Container

Three environment variables MUST to be set for the container to execute successfully!

- SERVER_URL - URL of SpeedCurve endpoint that the agent will poll for work and upload results to
- LOCATION - Name of the location
- KEY - key for the location

An example configuration might look like:

```
docker run -dit --init --name speedcurve-agent --shm-size 1g --network host --cap-add=NET_ADMIN --env SERVER_URL=xxx --env LOCATION=yyy --env KEY=zzz speedcurve-agent
```

repository: SpeedCurve-Metrics/wptagent

gha_language: Python

gha_license_id: NOASSERTION

repo_name: SpeedCurve-Metrics/wptagent


text:
@property {Symbol} can-observe/can.computedPropertyDefinitions @can.computedPropertyDefinitions
@parent can-observe/function

@description Object containing rich property behaviors for a proxy-wrapped object.

@signature `@@can.computedPropertyDefinitions()`

Proxy-wrapped objects created by can-observe recognize an internal value, stored under the `can.computedPropertyDefinitions` symbol. When using can-observe class constructors, it will inherit much like other properties and methods.

The actual value is an object, and its values are functions which return instances of [can-observation]. if you access a key on your object that matches a key in this object, the function will be called with the instance and the name of the property, and its return value will be cached (each instance of your object will only get one instance of the observation), and the observation's value will be the return value of your getter. Future changes to this observation will trigger updates as if you had changed the value directly.

If you wish to expand this behavior yourself, we have provided a few helpers to assist. Firstly, there is `ensureComputedPropertyDefinitions`. This helper makes sure that your proxy-wrapped object or prototype has the correct initial value for the `can.computedPropertyDefinitions` symbol, with inheritance, etc. You should rarely need this helper however as it is called automatically by the `defineProperty` helper. This helper should be called with your target object (either a proxy-wrapped object or the prototype of proxy-wrapped class), the key where the new functionality will be added, and the function which returns an observation.

```js
import Observation from "can-observation";

observe.defineProperty( target, "name", function( instance, property ) {
	return new Observation( function() {
		return this.first + " " + this.last;
	}, instance );
} );
```

repository: canjs/can-observe

gha_language: JavaScript

repo_name: canjs/can-observe


text:
# node-jamf

**NOTE: This repository has been deprecated and archived. It has been mirrored to https://github.com/trevorspecht/jamf-sdk-node and will continue to live and be maintained by @trevorspecht, but will no longer have any connection to Mapbox.**

A lightweight Node.js wrapper for Jamf Pro's JSS REST API.

## Scope

Currently this module only supports `GET` requests for the JSS REST API. [Support for other methods such as `PUT`, `POST`, and `DELETE` will be added later](https://github.com/mapbox/node-jamf/issues/6).

[Support for the JSS Universal API](https://github.com/mapbox/node-jamf/issues/5) may also be added later.

## Installation

`npm install jamf`

## Usage

The following code sets up the module and configures the API client with values from your local environment:

```js
var JamfApiClient = require('jamf');

var config = {
  user: process.env.JAMF_API_USER,
  password: process.env.JAMF_API_PASSWORD,
  jamfUrl: process.env.JAMF_URL,
  format: 'json'
}

var jamf = new JamfApiClient(config);

jamf.get('/accounts', function (err, res){
  if (err) console.log(err)
  console.log(res)
});
```

Each Jamf API client method requires a path (e.g. `/accounts`) and a callback (`function(err, res)`) function.

For example, if you wanted to get the General and Location subsets of information about a computer with an id of 50:

```js
jamf.get('/computers/id/50/subset/General&Location', function (err, res){
  if (err) console.log(err)
  console.log(res)
});
```

### Examples

You can find more examples in the `examples` directory of this project.

### Configuration

You need to configure the Jamf API client before it can make any API calls. You'll need the following for configuration:

* `user`: username for the JSS user accessing the Jamf API
* `password`: password for the above account
* `jamfUrl`: the URL of your JSS instance, whether on premise or in the cloud (`https://yourdomain.jamfcloud.com`)
* `format`: the format of the returned data, must be either `xml` (Jamf API default) or `json`

We recommend you create a new dedicated, least privilege API user for these scripts. The user must have the necessary privileges (create, read, update, or delete) on the JSS objects

Here's an example configuration for obtaining XML data:

```js
var config = {
  user: 'readonlyapiuser',
  password: 'fakepassword',
  jamfUrl: 'https://fakefakefakefake.jamfcloud.com',
  format: 'xml'
}

var jamf = new JamfApiClient(config);
```

## Tests

To run the tests for this project:

```js
npm test
```

The tests use [eslint](http://eslint.org/) for linting and [tape](https://github.com/substack/tape) for tests.

## Feature requests and reporting bugs

Are we missing something in this module? Did you find a bug?

Please look through the [list of issues](https://github.com/mapbox/node-jamf/issues?utf8=%E2%9C%93&q=is%3Aissue) (both open and closed) and see if an issue already exists for what you want to propose or report.

Don't see anything in the issues? Please [create a new one](https://github.com/mapbox/node-jamf/issues/new)!

## Contributing

Contributors are welcome! If you want to contribute, please fork this repo then submit a pull request (PR).

All of your tests should pass both locally and in Travis before we'll accept your PR. We also request that you add additional test coverage and documentation updates in your PR where applicable.

## Resources

* You can see all available Jamf API calls by accessing `/api` on your JSS instance. For example, visit `https://yourdomain.jamfcloud.com/api`. This page also contains an API playground where you can test out requests.
* [The Unofficial Jamf API Docs](https://unofficial-jss-api-docs.atlassian.net/wiki)

repository: mapbox/node-jamf

repo_name: mapbox/node-jamf


text:
# CommentBasedHelp.test.ps1
Pester `.test.ps1` file for PSM1 functions' comment based help.

## Criteria
All exported functions have `Get-Help` output with:
+ `.SYNOPSIS`
+ `.DESCRIPTION`
+ `.INPUTS`
+ `.EXAMPLE`

All function parameters have:
- `.PARAMETER`
- Default value, _or_ `[Parameter( Mandatory )]` attribute set
- sample usage in at least one `.EXAMPLE`

## Usage
Either copy the `Describe` block into your existing `.tests.ps1` file, or copy the file into the PSModule's root folder. If using the latter method, trigger the tests by running `Invoke-Pester` from the PSModule's root folder or some ancestor folder.

```
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
```

repository: tim-dunn/CommentBasedHelpTests

gha_language: PowerShell

repo_name: tim-dunn/CommentBasedHelpTests


text:
Commandeer
==========

Take command of your command line.

Commandeer gets data from the command line to your variables and exits
gracefully if there is any issue.

It does this little thing well and lets *you* deal with the rest.

Usage
-----

**In code**

```nimrod
## myCLApp.nim

import commandeer

commandline:
  argument integer, int
  argument floatingPoint, float
  argument character, char
  arguments strings, string
  option optionalInteger, int, "int", "i"
  option testing, bool, "testing", "t"
  exitoption "help", "h",
             "Usage: myCLApp [--testing|--int=<int>|--help] " &
             "<int> <float> <char> <string>..."
  errormsg "You made a mistake!"

echo("integer = ", integer)
echo("floatingPoint = ", floatingPoint)
echo("character = ", character)
echo("strings (one or more) = ", strings)

if optionalInteger != 0:
  echo("optionalInteger = ", optionalInteger)

if testing:
  echo("Testing enabled")

```

**On the command line**

```
$ myCLApp --testing 4 8.0 a one two -i:100
integer = 4
floatingPoint = 8.0000000000000000e+00
character = a
strings (one or more) = @[one, two]
optionalInteger = 100
Testing enabled
$ myCLApp 10 --help
Usage: myCLApp [--testing|--int=<int>|--help] <int> <float> <char> <string>...
```

When you have commandeer installed, try passing an incorrect set of
command line arguments for fun!

See the `tests` folder for other examples.

That's all.

It's not much and it doesn't pretend to be a magical experience.
Although, it would be much cooler if it was.

It should Just Work.

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

There are 2 ways to install commandeer:

**babel**

Install [babel](https://github.com/nimrod-code/babel). Then do:

    $ babel install commandeer

This will install the latest tagged version of commandeer.

**raw**

Copy the commandeer.nim file to your project and import it.

When I go this way for Nimrod libraries, I like to create a `libs/`
folder in my project and put third-party files in it. I then add the
line `path = "libs"` to my `nimrod.cfg` file so that the `libs/`
directory is looked into at compile time.

Documentation
-------------

**commandline**

`commandline` is used to delimit the space where you define the command line
arguments and options you expect. All other commandeer constructs (described below) are placed under it. They are all optional - although you probably want to use at least one, right?

**argument `identifier`, `type`**

It declares a variable named `identifier` of type `type` initialized with
the value of the corresponding command line argument converted to type `type`.
Correspondence works as follows: the first occurrence of `argument` corresponds
to the first argument, the second to the second argument and so on.

**arguments `identifier`, `type` `[, atLeast1]`**

It declares a variable named `identifier` of type `seq[type]` initialized with
the value of the sequential command line arguments that can be converted to type `type`.
By default `atLeast1` is `true` which means there must be at least one argument of type
`type` or else an error is thrown. Passing `false` there allows for 0 or more arguments of the
same type to be stored at `identifier`.

*Warning*: `arguments myListOfStrings, string` will eat all arguments on
the command line. The same applies to other situations where one type is
a supertype of another type in terms of conversion e.g., floats eat ints.

**option `identifier`, `type`, `long name`, `short name`**

It declares a variable named `identifier` of type `type` initialized with
the value of the corresponding command line option converted to type `type`
if it is present. Otherwise `identifier` is initialized to its default type value.

The command line option syntax follows Nimrod's one i.e., `--times=3`, `--times:3`, `-t=3`, `-t:3` are all valid.

Syntactic sugar is provided for boolean options such that only the presence of the option is needed to give a true value.

**exitoption `long name`, `short name`, `exit message`**

It declares a long and short option string for which the application
will immediately output `exit message` and exit.

This is mostly used for printing the version or the help message.

**errormsg `custom error message`**

It sets a string `custom error message` that will be displayed after the other error messages if the command line arguments or options are invalid.

**Valid types for `type` are:**

- pre-defined integer
- pre-defined floating point
- string
- boolean
- character

Design
------

- Keep as much logic out of the module and into the hands of
  the developer as possible
- No magical variables should be made implicitly available. All created
  variables should be explicitly chosen by the developer.
- Keep it simple and streamlined. Command line parsers can do a lot for you, but I prefer to be in full control.

TODO and Contribution
---------------------

- Subcommands
- Better tests!
- Use and see what needs to be added.


text:
![TensorFlow Requirement: 1.x](https://img.shields.io/badge/TensorFlow%20Requirement-1.x-brightgreen)
![TensorFlow 2 Not Supported](https://img.shields.io/badge/TensorFlow%202%20Not%20Supported-%E2%9C%95-red.svg)

# vid2depth

**Unsupervised Learning of Depth and Ego-Motion from Monocular Video Using 3D Geometric Constraints**

Reza Mahjourian, Martin Wicke, Anelia Angelova

CVPR 2018

Project website: [https://sites.google.com/view/vid2depth](https://sites.google.com/view/vid2depth)

ArXiv: [https://arxiv.org/pdf/1802.05522.pdf](https://arxiv.org/pdf/1802.05522.pdf)

## Update: TF2 version.

Please see [https://github.com/IAMAl/vid2depth_tf2](https://github.com/IAMAl/vid2depth_tf2)
for a TF2 implementation of vid2depth.

## 1. Installation

### Requirements

#### Python Packages

```shell
mkvirtualenv venv  # Optionally create a virtual environment.
pip install absl-py
pip install matplotlib
pip install numpy
pip install scipy
pip install tensorflow
```

### Download vid2depth

```shell
git clone --depth 1 https://github.com/tensorflow/models.git
```

## 2. Datasets

### Download KITTI dataset (174GB)

```shell
mkdir -p ~/vid2depth/kitti-raw-uncompressed
cd ~/vid2depth/kitti-raw-uncompressed
wget https://raw.githubusercontent.com/mrharicot/monodepth/master/utils/kitti_archives_to_download.txt
wget -i kitti_archives_to_download.txt
unzip "*.zip"
```

### Download Cityscapes dataset (110GB) (optional)

You will need to register in order to download the data.  Download the following
files:

* leftImg8bit_sequence_trainvaltest.zip
* camera_trainvaltest.zip

### Download Bike dataset (34GB) (optional)

Please see [https://research.google/tools/datasets/bike-video/](https://research.google/tools/datasets/bike-video/)
for info on the bike video dataset.

Special thanks to [Guangming Wang](https://guangmingw.github.io/) for helping us
restore this dataset after it was accidentally deleted.

```shell
mkdir -p ~/vid2depth/bike-uncompressed
cd ~/vid2depth/bike-uncompressed
wget https://storage.googleapis.com/vid2depth/dataset/BikeVideoDataset.tar
tar xvf BikeVideoDataset.tar
```

## 3. Inference

### Download trained model

```shell
mkdir -p ~/vid2depth/trained-model
cd ~/vid2depth/trained-model
wget https://storage.cloud.google.com/vid2depth/model/model-119496.zip
unzip model-119496.zip
```

### Run inference

```shell
cd tensorflow/models/research/vid2depth
python inference.py \
  --kitti_dir ~/vid2depth/kitti-raw-uncompressed \
  --output_dir ~/vid2depth/inference \
  --kitti_video 2011_09_26/2011_09_26_drive_0009_sync \
  --model_ckpt ~/vid2depth/trained-model/model-119496
```

## 4.   It is possible to run
inference on this pre-trained model without compiling the ICP op.  It is also
possible to train a new model from scratch without compiling the ICP op by
setting the icp loss to zero.

If you would like to compile the op and run a new training job using it, please
use the CMakeLists.txt file at
[https://github.com/IAMAl/vid2depth_tf2/tree/master/ops](https://github.com/IAMAl/vid2depth_tf2/tree/master/ops).

### Run training

```shell
# Train
cd tensorflow/models/research/vid2depth
python train.py \
  --data_dir ~/vid2depth/data/kitti_raw_eigen \
  --seq_length 3 \
  --reconstr_weight 0.85 \
  --smooth_weight 0.05 \
  --ssim_weight 0.15 \
  --icp_weight 0 \
  --checkpoint_dir ~/vid2depth/checkpoints
```

## Reference
If you find our work useful in your research please consider citing our paper:

```
@inproceedings{mahjourian2018unsupervised,
  title={Unsupervised Learning of Depth and Ego-Motion from Monocular Video Using 3D Geometric Constraints},
    author={Mahjourian, Reza and Wicke, Martin and Angelova, Anelia},
    booktitle = {CVPR},
    year={2018}
}
```

## Contact

To ask questions or report issues please open an issue on the tensorflow/models
[issues tracker](https://github.com/tensorflow/models/issues). Please assign
issues to [@rezama](https://github.com/rezama).

## Credits

This implementation is derived from [SfMLearner](https://github.com/tinghuiz/SfMLearner) by [Tinghui Zhou](https://github.com/tinghuiz).

repository: jianzhnie/models

repo_name: jianzhnie/models


text:
# WeatherPredictor
[![Build Status](https://travis-ci.org/zelfrontial/WeatherPredictor.svg?branch=master)](https://travis-ci.org/zelfrontial/WeatherPredictor)
Predict Weathers in Melbourne

#Read This
https://guides.github.com/introduction/flow/

#Do this for basics
https://try.github.io/levels/1/challenges/1

#Read and understand this before starting to collaborate
http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging

#Git setup tutorial.
```
URL = https://github.com/zelfrontial/WeatherPredictor.git
```

#First setup
In your designated folder in cmd/bash
```
git init
git remote add origin URL
```

confirm it..
```
denisthamrim$ git remote -v
origin	https://github.com/zelfrontial/WeatherPredictor.git (fetch)
origin	https://github.com/zelfrontial/WeatherPredictor.git (push)
```

pulling the content of this repo
```
git pull URL
```

always, check for git status

Done (:

#Part 2.
To get the latest changes,
```
git pull origin master
```
-get the latest master branch from the url.

to create branch
```
git branch "branch name"
```

go to branch
```
git checkout "branch name"
```

to add file to git
```
git add .
```

to save changes
```
git commit -m "MESSAGE"
```

to submit changes
```
git push origin BRANCHNAME
```
do not
git push origin master !!! push to branch and ask for merge request.

repository: zahidislam/WeatherPredictor

repo_name: zahidislam/WeatherPredictor


text:
# Changelog

## 0.1.2

* Support all Node runtimes

## 0.1.1

* Support full and partial linting

## 0.1.0

* Made compatible with Serverless v0.5
* Accept multiple names as arguments

## 0.0.2

* Support for custom configuration file (.jshintrc)

## 0.0.1

* Initial release

license: ISC

repository: dbhagen/serverless-jshint-plugin

repo_name: dbhagen/serverless-jshint-plugin


text:
# ForceHttpsPlugin

Stupidly simple [Pico CMS](http://picocms.org) to force the use of https protocol.

* [Installation](#installation)

## Installation

Copy the `ForceHttpsPlugin.php` file to the `plugins/` directory of your Pico Project.

repository: alejandroliu/ForceHttpsPlugin

repo_name: alejandroliu/ForceHttpsPlugin


text:
# Basketball Box Scores Extension

The best NBA browser extension!

## Get Basketball Box Scores Extension

- [Chrome](https://chrome.google.com/webstore/detail/box-scores/mfmkedeaebcckihpinmhkadoagdbifaa)
- [Firefox](https://addons.mozilla.org/en-US/firefox/addon/basketball-box-scores)

## Screenshots

Click me to see.

Boxscores overview with a highlight video

Boxscores player stats

Dark mode 🌙

standings

Playoff view

## Motivation

Sports websites don't usually have a convenient way to find out the latest box score.
This extension is for people who just want to get the latest update but too lazy to look it up.

## Features
- [x] Daily box score on the popup page
- [x] Highlight Videos from YouTube
- [x] Dark mode
- [x] Add favorite team
- [x] Playoff bracket for each season
- [x] Standings
- [x] Notifications

## Roadmap
- [ ] Add the ability to sort tables

---

## Dev start notes

### Prerequisite
You need to have `npm` installed.

### Running locally
- Run `./build.sh`. A new zip should be created under the `/dist`

**Firefox**
- Load the zip file into Firefox

**Chrome** (Chrome cannot load zip as extension locally)
- Load the `build` folder into Chrome

#### Third party packages
* `react-flatpickr`
* `moment-timezone`

repository: mingchia-andy-liu/chrome-extension-nba

repo_name: mingchia-andy-liu/chrome-extension-nba


text:
Convex Adversarial Layerwise Training (COLT)
=============================================================================================================

![overview](https://raw.githubusercontent.com/eth-sri/colt/master/media/colt.png)

COLT is a certified defense for neural networks against adversarial examples, presented in [our ICLR'20 paper](https://files.sri.inf.ethz.ch/website/papers/iclr2020-colt.pdf).
Our defense is based on a novel combination of adversarial training with existing provable defenses.
The key idea is to model neural network training as a procedure which includes both, the verifier and the
adversary.
In every iteration, the verifier aims to certify the network using convex relaxation while the adversary tries to
find inputs inside that convex relaxation which cause verification to fail.
This method produces state-of-the-art neural network in terms of certified robustness on the challenging CIFAR-10 dataset.

# Setup

All of the required python packages are listed in `requirements.txt`.
We suggest to install the packages in a new virtual environment in the following way:

```
$ virtualenv venv
$ source venv/bin/activate
$ (venv) pip install -r requirements.txt
```

Additionally, we require Gurobi 9.0 to perform certification (Academic license is available for free).
Gurobi can be installed using:

```
$ wget https://packages.gurobi.com/9.0/gurobi9.0.0_linux64.tar.gz
$ tar -xvf gurobi9.0.0_linux64.tar.gz
$ cd gurobi900/linux64/
$ python setup.py install
```

# Training

Next, we present scripts to train the networks from our paper and reproduce the results.
We use CIFAR-10 dataset and perform training as explained in our paper.
To train the networks please run:

```
$ scripts/train_cifar10_2_255
$ scripts/train_cifar10_8_255
```
for 2/255 and 8/255 perturbation, respectively.

# Certification

Similarly, to certify the networks and reproduce our results, please run:

```
$ ./scripts/certify_cifar10_2_255
$ ./scripts/certify_cifar10_8_255
```

Note that certifying all 10 000 examples from the test set can take several days.
An easy way to speed up certification would be to partition the certification of the test set across different CPUs and GPUs
by manipulating `start_idx` and `end_idx` arguments in the scripts.

Citing this work
---------------------
```
@inproceedings{balunovic2020Adversarial,
	title={Adversarial Training and Provable Defenses: Bridging the Gap},
	author={Mislav Balunovic and Martin Vechev},
	booktitle={International Conference on Learning Representations},
	year={2020},
	url={https://openreview.net/forum?id=SJxSDxrKDr}
}
```
Contributors
------------

* [Mislav Balunović](https://www.sri.inf.ethz.ch/people/mislav) -<EMAIL_ADDRESS>* [Martin Vechev](https://www.sri.inf.ethz.ch/people/martin) -<EMAIL_ADDRESS>
License and Copyright
---------------------

* Copyright (c) 2020 [Secure, Reliable, and Intelligent Systems Lab (SRI), ETH Zurich](https://www.sri.inf.ethz.ch/)
* Licensed under the [Apache License](http://www.apache.org/licenses/)

repository: eth-sri/colt

repo_name: eth-sri/colt


text:
# Maplestory 2 Auto Gather

I was annoyed that auto-gathering required a badge in Maplestory 2, so I created a simple script
to move the window to the foreground and press SPACE.

The key to toggle it on and off is F10.

## Getting Started

Just clone the repository and run `main.py`.

```bash
python main.py
```

### Prerequisites

Python 3

### Future

Ideally in the future, it would be nice to make this more general and perhaps have
the program specified using a ComboxBox, and have the toggle key configurable.


text:
# DOP Adult Probationers Rearrested As A Percentage Of NYPD Arrest Report (Monthly Average)

## Dataset

| Name | Value |
| :--- | :---- |
| Catalog | [Link](https://catalog.data.gov/dataset/adult-probationers-rearrested-as-a-percentage-of-nypd-arrest-report-monthly-average) |
| Metadata | [Link](https://data.cityofnewyork.us/api/views/arhf-esqb) |
| Data: JSON | [100 Rows](https://data.cityofnewyork.us/api/views/arhf-esqb/rows.json?max_rows=100) |
| Data: CSV | [100 Rows](https://data.cityofnewyork.us/api/views/arhf-esqb/rows.csv?max_rows=100) |
| Host | data.cityofnewyork.us |
| Id | arhf-esqb |
| Name | DOP Adult Probationers Rearrested As A Percentage Of NYPD Arrest Report (Monthly Average) |
| Attribution | Department of Probation (DOP) |
| Category | Public Safety |
| Tags | dop |
| Created | 2016-08-02T17:51:58Z |
| Publication Date | 2017-03-31T20:56:13Z |

## Columns

```ls
| Included | Schema Type    | Field Name | Name   | Data Type | Render Type |
| ======== | ============== | ========== | ====== | ========= | =========== |
| Yes      | series tag     | borough    | Region | text      | text        |
| No       |                | month      | Month  | text      | text        |
| No       |                | year       | Year   | number    | number      |
| Yes      | numeric metric | rate       | Rate   | number    | number      |
```

## Time Field

```ls
Value = year-month
Format & Zone = yyyy-MMMM
```

## Series Fields

```ls
Excluded Fields = year,month
```

## Data Commands

```ls
series e:arhf-esqb d:2016-03-01T00:00:00.000Z t:borough=Citywide m:rate=3.3

series e:arhf-esqb d:2016-04-01T00:00:00.000Z t:borough=Citywide m:rate=3.3

series e:arhf-esqb d:2016-05-01T00:00:00.000Z t:borough=Citywide m:rate=3.3
```

## Meta Commands

```ls
metric m:rate p:float l:Rate d:"The percentage of adult probationer arrests relative to all arrests recorded by the Police Department during the reporting period." t:dataTypeName=number

entity e:arhf-esqb l:"DOP Adult Probationers Rearrested As A Percentage Of NYPD Arrest Report (Monthly Average)" t:attribution="Department of Probation (DOP)" t:url=https://data.cityofnewyork.us/api/views/arhf-esqb

property e:arhf-esqb t:meta.view v:id=arhf-esqb v:category="Public Safety" v:averageRating=0 v:name="DOP Adult Probationers Rearrested As A Percentage Of NYPD Arrest Report (Monthly Average)" v:attribution="Department of Probation (DOP)"

property e:arhf-esqb t:meta.view.owner v:id=5fuc-pqz2 v:screenName="NYC OpenData" v:lastNotificationSeenAt=1491336998 v:displayName="NYC OpenData"

property e:arhf-esqb t:meta.view.tableauthor v:id=5fuc-pqz2 v:screenName="NYC OpenData" v:roleName=administrator v:lastNotificationSeenAt=1491336998 v:displayName="NYC OpenData"
```

## Top Records

```ls
| borough  | month     | year | rate |
| ======== | ========= | ==== | ==== |
| Citywide | March     | 2016 | 3.3  |
| Citywide | April     | 2016 | 3.3  |
| Citywide | May       | 2016 | 3.3  |
| Citywide | June      | 2016 | 3.3  |
| Citywide | July      | 2016 | 3.6  |
| Citywide | August    | 2016 | 3.5  |
| Citywide | September | 2016 | 3.6  |
| Citywide | October   | 2016 | 3.6  |
| Citywide | November  | 2016 | 3.5  |
| Citywide | December  | 2016 | 3.5  |
```

repository: SpellarBot/open-data-catalog

repo_name: SpellarBot/open-data-catalog


text:
# Your first webpack plugin :heart:

> To start this exercise, be sure to be in `./packages/advanced/plugins` folder.
> Be sure you have [installed this repository first](../README.md#install)

## Introduction

You already saw and used many plugins with webpack.
It gives user possibility to add features, optimize performance, etc...

An API is open to let you implement your own webpack plugin.

::: tip
In your project you may need a plugin that already have been created by the community, don't hesitate to look at [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#webpack-plugins).
:::

You should also know that more than 70% of webpack core code is using it's own plugin API. Webpack code is a great example of _how to write a plugin ?_

## Hooks and tapable

Creating a Plugin
A plugin for webpack consists of

- A named JavaScript function.
- Defines apply method in its prototype.
- Specifies an [event hook](https://webpack.js.org/api/compiler-hooks/) to tap into.
- Manipulates webpack internal instance specific data.
- Invokes webpack provided callback after functionality is complete.

```javascript
class MyExampleWebpackPlugin {
  // Define `apply` as its prototype method which is supplied with compiler as its argument
  apply(compiler) {
    // Specify the event hook to attach to
    compiler.hooks.done.tapAsync(
      "MyExampleWebpackPlugin",
      (compilation, callback) => {
        console.log("This is an example plugin!");
        console.log(
          "Here’s the `compilation` object which represents a single build of assets:",
          compilation
        );

        // Manipulate the build using the plugin API provided by webpack
        compilation.addModule(/* ... */);

        callback();
      }
    );
  }
}
```

## Create a BuildTime

In order to learn to how to write a plugin. Try to define a plugin that take `stats` from `done` hooks and log build time in milliseconds.

<details>
<summary>Solution</summary>

```javascript{8-16,65}
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CleanWebpackPlugin = require("clean-webpack-plugin");
const VueLoaderPlugin = require("vue-loader/lib/plugin");
const CompressionPlugin = require("compression-webpack-plugin");

class BuildTime {
  apply(compiler) {
    compiler.hooks.done.tapAsync("StatsFilePlugin", stats => {
      console.log(
        `Build took ${stats.endTime - stats.startTime} milliseconds!`
      );
    });
  }
}

module.exports = {
  mode: "production",
  entry: "./src/main.js", // The source module of our dependency graph
  devServer: {
    contentBase: "./dist"
  },
  output: {
    // Configuration of what we tell webpack to generate (here, a ./dist/main.js file)
    filename: "[name].bundle.[hash].js",
    path: path.resolve(__dirname, "dist")
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: "babel-loader"
      },
      {
        test: /\.jpg$/,
        use: [
          {
            loader: "file-loader",
            options: {
              outputPath: "assets",
              publicPath: "assets"
            }
          }
        ]
      },
      {
        test: /\.(sass|css)$/,
        use: ["style-loader", "css-loader", "sass-loader"]
      },
      {
        test: /\.vue$/,
        use: "vue-loader"
      }
    ]
  },
  plugins: [
    new VueLoaderPlugin(),
    new CleanWebpackPlugin("dist"),
    new HtmlWebpackPlugin({
      template: "./src/index.html"
    }),
    new CompressionPlugin(),
    new BuildTime()
  ]
};
```

</details>


text:
# 15 Puzzle

This is an example how to solve the [15 puzzle] problem.  It supports two
solving modes: a non-consecutive mode where each tile is moved individually and
a consecutive mode where multiple tiles are moved at once.  In the latter mode,
much harder instances can be solved but the resulting solutions are not
necessarily optimal w.r.t. the number of single tile moves.

## Example Calls

    clingo encoding.lp instance1.lp -c consecutive=1
    clingo encoding.lp instance1.lp -c consecutive=0
    clingo encoding.lp instance2.lp -c consecutive=1 -t8,split --config=crafty

[15 puzzle]: https://en.wikipedia.org/wiki/15_puzzle

repository: CaptainUnbrauchbar/clingo

repo_name: CaptainUnbrauchbar/clingo


text:
#### Registering objects into the SDK

The SDK needs to know which spatials, controls and meshes it is allowed to display to the user and how it can create instances of it.
If your object requires no constructor arguments it's just a case of creating a very simple class anywhere in your project.
A convenience class prefixed with NoArgs makes for a very simple registration class.

For a Spatial:
```java
public class MyCustomNodeRegistrar extends NoArgsSpatialRegistrar {
    public MyCustomNodeRegistrar() {
        setRegisteredClass(MyCustomNode.class);
    }
}
```

For a Control:
```java
public class MyCustomControlRegistrar extends NoArgsControlRegistrar {
    public MyCustomControlRegistrar() {
        setRegisteredClass(MyCustomControl.class);
    }
}
```

For a Filter:
```java
public class MyCustomFilterRegistrar extends NoArgsFilterlRegistrar {
    public MyCustomFilterRegistrar() {
        setRegisteredClass(MyCustomFilter.class);
    }
}
```

If your object requires some setup before it can be added to a scene, instead of using the `NoArgs` prefixed class, you would use
the full class. This provides you with a `createInstance` method with a reference to the jMonkey SimpleApplication class so you can
create materials or anything else needed.

```java
public class ParticleEmitterSpatialRegistrar extends SpatialRegistrar {

    public ParticleEmitterSpatialRegistrar() {
        setRegisteredClass(ParticleEmitter.class);
    }

    @Override
    public Spatial createInstance(SimpleApplication application) {

        AssetManager assetManager = application.getAssetManager();

        ParticleEmitter particleEmitter = new ParticleEmitter("New ParticleEmitter", ParticleMesh.Type.Triangle, 30);

        Material mat_red = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
        mat_red.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/flame.png"));

        particleEmitter.setMaterial(mat_red);
        particleEmitter.setImagesX(2);
        particleEmitter.setImagesY(2); // 2x2 texture animation
        particleEmitter.setEndColor(  new ColorRGBA(1f, 0f, 0f, 1f));   // red
        particleEmitter.setStartColor(new ColorRGBA(1f, 1f, 0f, 0.5f)); // yellow
        particleEmitter.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 2, 0));
        particleEmitter.setStartSize(1.5f);
        particleEmitter.setEndSize(0.1f);
        particleEmitter.setGravity(0, 0, 0);
        particleEmitter.setLowLife(1f);
        particleEmitter.setHighLife(3f);
        particleEmitter.getParticleInfluencer().setVelocityVariation(0.3f);

        return particleEmitter;
    }
}
```

For Filters, an additional method is available to override:
 ```java
boolean sceneLoaded(Filter filter, Spatial scene)
```

This method is called whenever a scene is loaded or updated in the SDK and returns a boolean to determine whether or not the filter
should be added to the `FilterPostProcessor`. For example, a `DirectionalLightFilter` requires a `DirectionalLight` in the scene. Without
the Light the PostProcessor would throw an exception. The code below shows an example of the DirectionalLightFilter registrar.

```java
public class DirectionalLightShadowFilterRegistrar extends FilterRegistrar {

    public DirectionalLightShadowFilterRegistrar() {
        setRegisteredClass(DirectionalLightShadowFilter.class);
    }

    @Override
    public Filter createInstance(SimpleApplication application) {
        return new DirectionalLightShadowFilter(application.getAssetManager(), 4096, 4);
    }

    @Override
    public boolean sceneLoaded(Filter filter, Spatial scene) {

        final DirectionalLight[] directionalLight = {null};

        scene.breadthFirstTraversal(spatial -> {

            LightList lightList = spatial.getLocalLightList();

            for (Light light : lightList) {
                if (light instanceof DirectionalLight) {
                    directionalLight[0] = (DirectionalLight) light;
                    break;
                }
            }

        });

        DirectionalLightShadowFilter directionalLightShadowFilter = (DirectionalLightShadowFilter) filter;

        if (directionalLight[0] != null) {
            directionalLightShadowFilter.setLight(directionalLight[0]);
            return true;
        }

        return false;
    }

}
```

The `sceneLoaded` method checks for an available `DirectionalLight` in the scene, and if it finds one it will attach the light
to the filter and return true, else it will return false, and the filter will not be added to the PostProcessor stack. If at any
time the user does add a DirectionalLight to the scene, the filter will attach itself to that light and thus return true, and add
itself to the FilterPostProcessor stack.


text:
# Disaster text message analysis

## Table of Contents

1. [Installation](#installation)
2. [Project Motivation](#motivation)
3. [File Descriptions](#file)
4. [Summary](#summary)
5. [Licensing and Acknowledgements](#licensing)

## Installation
The python file in this project is based on Python 3.6.4. You will need packages such as numpy, pandas, matplotlib, json, plotly, nltk, flask, sklearn, pickle, and re to run the .py file.

After downloading the repository to your local machine, you  need to follow the steps below:
1. In the terminal, change directory to /data, run the command:
> python process_data.py disaster_messages.csv disaster_categories.csv DisasterResponse.db

2. Change directory to /models, run the command:
> python train_classifier.py ../data/DisasterResponse.db classifier.pkl

3. Change directory to /app, run the command:
> python run.py

4. At this point you should see some output in the terminal like 'Running on http://<IP_ADDRESS>:3001/'. Then, open your web browser and open the web link. Now you should be able to see the web page.

## Project Motivation
This project builds a multi-label machine learning model to classify disaster text messages. It is trying to automatically classify disaster text messages into different categories. So, the messages can be sent to different departments for further processing.

## File Descriptions
The file structure should be as follows:
> app/
  template/
    master.html
    go.html
  run.py
data/
  disaster_categories.csv
  disaster_messages.csv
  process_data.py
  DisasterResponse.db
models/
  train_classifier.py
  classifier.pkl
README.md

1. The folder 'app/' is used to run the web application.
2. The folder 'data/' is used for the ETL process. 'disaster_categories.csv' and 'disaster_messages.csv' are raw data files provided by [Figure Eight](https://www.figure-eight.com/). 'process_data.py' is used to clean and transform the raw data. 'DisasterResponse.db' stores the clean data after the ETL process.
3. The folder 'models/' is used for machine learning model training. 'train_classifier.py' is the training script. 'classifier.pkl' stores the trained model.

## Summary

Only two parameters were used for the grid search process. This is to save the training time. If higher accuracy is required, please search more parameter space. You can add more parameters in the build_model() function of the 'train_classifier.py' file.

Random forest classifier is selected for this project. An average accuracy of 92% can be achieved with a two-minute training.

A web application was also developed to make it easier for the users to classify new disaster text messages.

## Licensing and Acknowledgements
Thanks [Figure Eight](https://www.figure-eight.com/) for providing the real disaster text messages for the model training. The code in this repository is released under the MIT license.


text:
# Description
A Docker container for an open source MPEG DASH packager featuring

 - Single period MPEG DASH for VOD and Live
 - Multi period MPEG DASH for VOD and Live

The MPEG DASH packager is built on:

 - Ubuntu
 - Apache2 (https://httpd.apache.org)
 - ffmpeg (https://ffmpeg.org)
 - Bento4 (https://www.bento4.com)
 - hls2dash (https://pypi.python.org/pypi/hls2dash)
 - nodejs-express (for the admin UI)

|      | Input           | Output                  | Supported |
| ---- | --------------- | ----------------------- | --------- |
| Live | HLS             | Single Period MPEG-DASH | Yes       |
| Live | HLS EXT-CUE     | Multi Period MPEG-DASH  | Yes       |
| VOD  | MP4             | Single Period MPEG-DASH | Planned   |
| VOD  | MP4 w cue sheet | Multi Period MPEG-DASH  | Planned   |

# Deploying DASH Packager

## Running on localhost

Start DASH packager listening on port 3000:

    docker run -d -p 3000:80 --restart=always --name packager eyevinntechnology/packager:0.1.2

Verify it is up and running by entering http://localhost:3000/ in your web browser and you would see something like this:

![](screenshot-packager.png)

### Testing with encoder
Now configure an encoder to post HLS to:

    http://localhost:3000/ingest/event/

### Testing without encoder

If you don't have an encoder you can test the packager with the [hls-relay](https://github.com/Eyevinn/hls-relay) script. First install it:

	pip install hlsrelay

Then run it:

	hls-relay http://example.com/event/master.m3u8 http://localhost:3000/ingest/event/

### Playing
And you would then access the HLS here

    http://localhost:3000/live/event/master.m3u8

which should be playable in a Safari web browser.

The MPEG DASH stream is found here

    http://localhost:3000/live/event.mpd/manifest.mpd

and a multi period MPEG DASH variant is found here

    http://localhost:3000/live/event.mpd/multi.mpd

You can also see the available streams in the admin page, in this case on http://localhost:3000/admin/. Default username is "admin" and password is "eyevinntechnology"

![](screenshot-admin.png)

To stop the packager you run:

    docker stop packager && docker rm -v registry packager

## Using Docker Compose

You could also use a Docker compose config:

```
packager:
  restart: always
  image: eyevinntechnology/packager:0.1.2
  ports:
    - 3000:80
  volumes:
    - /tmp/data:/data
```

And simply start it by running:

    docker-compose up -d

Shut down the packager by running:

    docker-compose down

# License

Licensed under The MIT License (MIT)

Copyright (c) 2016 Eyevinn Technology

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

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

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

repository: rayAthavtis/docker-dash-packager

repo_name: rayAthavtis/docker-dash-packager


text:
# amazon cloudwatch alarms controller for kubernetes

This repo is a custom controller for kubernetes that when installed in a cluster grantes the cluster access to the Cloudwatch metrics alarms api. Thus, allowing developers to define alarms from their kubernetes manifests.

## installation

There are some example manifests in the examples folder that you can utilize.

### testing

To run unit tests you can run the following commands.

`docker-compose build test-coverage`
`docker-compose run test-coverage`

### Note

The definition of the service account in the example will require you to make an IAM role for your service account according to the [documentation](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html) ensuring that the policy on the role has cloudwatch access. Then you will need to update the section of the cloudwatch_alarms_operator.yml file in the examples folder to reference the ARN of the role made in the previous step.

```yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
  creationTimestamp: null
  name: cloudwatchalarm-controller
  namespace: kube-system
  labels:
    app: cloudwatchalarm-controller
  annotations:
    eks.amazonaws.com/role-arn: {{THE ROLE YOU CREATED FOR THE CONTROLLER}}
```

You will also need to push changes to gitlab so that they can be built and published. Then update the reference to the image build on you feature branch for testing.

```yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cloudwatchalarm-controller
  namespace: kube-system
  labels:
    app: cloudwatchalarm
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: cloudwatchalarm
      role: operator
  template:
    metadata:
      labels:
        app: cloudwatchalarm
        role: operator
      annotations:
        prometheus.io/scrape: 'false'
    spec:
      serviceAccountName: cloudwatchalarm-controller
      containers:
        - name: cloudwatchalarm
          image: {{WHEREVER YOU PUSH YOUR IMAGE}}
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP
          resources:
            requests:
              cpu: "100m"
              memory: "256Mi"
            limits:
              cpu: "500m"
              memory: "500Mi"

## Example alarm definition

```yaml
---
apiVersion: cw.aws.com/v1
kind: cloudwatchmetricalarm
metadata:
  namespace: kube-system
  name: test-kube-dns-alarm
spec:
  EvaluationPeriods: 4
  DatapointsToAlarm: 2
  ComparisonOperator: LessThanLowerOrGreaterThanUpperThreshold
  ThresholdMetricId: ad1
  AlarmActions:
    - {{ ARN_FOR_ACTION_RESOURCE }}
  Metrics:
    - Id: "m1"
      ReturnData: true
      MetricStat:
        Metric:
          Namespace: ContainerInsights
          MetricName: pod_cpu_utilization
          Dimensions:
            - Name: ClusterName
              Value: {{CLUSTER_NAME}}
            - Name: Serivce
              Value: kube-dns
            - Name: Namespace
              Value: kube-system
        Period: 10
        Stat: p95
    - Id: ad1
      Label: pod_cpu_utilization (expected)
      ReturnData: true
      Expression: ANOMALY_DETECTION_BAND(m1, 2)

---
apiVersion: cw.aws.com/v1
kind: cloudwatchmetricalarm
metadata:
  namespace: kube-system
  name: test-cluster-autoscaler-alarm
spec:
  EvaluationPeriods: 4
  DatapointsToAlarm: 2
  ComparisonOperator: LessThanLowerOrGreaterThanUpperThreshold
  ThresholdMetricId: ad1
  AlarmActions:
    - {{ ARN_FOR_ACTION_RESOURCE }}
  Metrics:
    - Id: "m1"
      ReturnData: true
      MetricStat:
        Metric:
          Namespace: ContainerInsights
          MetricName: pod_cpu_utilization
          Dimensions:
            - Name: ClusterName
              Value: {{CLUSTER_NAME}}
            - Name: Serivce
              Value: cluster-autoscaler
            - Name: Namespace
              Value: cluster-autoscaler
        Period: 10
        Stat: p95
    - Id: ad1
      Label: pod_cpu_utilization (expected)
      ReturnData: true
      Expression: ANOMALY_DETECTION_BAND(m1, 2)

---
apiVersion: cw.aws.com/v1
kind: cloudwatchcompositalarm
metadata:
  namespace: kube-system
  name: test-composit-alarm
spec:
  AlarmRule: ALARM("kube-system-test-cluster-autoscaler-alarm") OR ALARM("kube-system-test-kube-dns-alarm")
```

## Security

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

## License

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


text:
# sandbox.iot.coap
Sandbox for all IoT CoAP Developments - ESP-IDF on Espressif ESP32

## Hardware

This documentation covers the [ESP32](
https://www.espressif.com/en/products/hardware/esp32/overview)
system on a chip [SoC](https://en.wikipedia.org/wiki/System_on_a_chip)
of the manufacturer [Espressif](https://www.espressif.com/).

## Software

The [ESP32-DevKitC](
https://www.espressif.com/en/products/hardware/esp32-devkitc/overview)
software development kit for the ESP32 SoC provides all libraries and tools
to develop for this embedded hardware platform.

In the git repository [ESP-IDF](https://github.com/espressif/esp-idf)
there are further instructions how to do a
[Standard Setup of Toolchain for Linux](
https://esp-idf.readthedocs.io/en/latest/get-started/linux-setup.html)
and then how to [Get ESP-IDF](
https://esp-idf.readthedocs.io/en/latest/get-started/index.html#get-started-get-esp-idf)

### Setup

Simply execute the script [`./setup.sh`](./setup.sh)
to get the development environment set up.

### Build

license: Unlicense


text:
---
title: AuthorizationSettings
---
## ININ.PureCloudApi.Model.AuthorizationSettings

## Properties

|Name | Type | Description | Notes|
|------------ | ------------- | ------------- | -------------|
| **Id** | **string** | The globally unique identifier for the object. | [optional] |
| **AnalysisEnabled** | **bool?** | Boolean showing if organization is opted in or not to unused role/perm analysis | [optional] |
| **AnalysisDays** | **int?** | Integer number of days to analyze user usage | [optional] |
| **DateLastCalculated** | **DateTime?** | The date and time of the most recent unused role calculation. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z | [optional] |
| **DateLastActive** | **String** | The date of the most recent org activity used for analysis. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd | [optional] |
| **SelfUri** | **string** | The URI for this object | [optional] |
{: class="table table-striped"}

repository: MyPureCloud/platform-client-sdk-dotnet

gha_language: C#

repo_name: MyPureCloud/platform-client-sdk-dotnet


text:
# Enron Email Fraud Detection

This project apply machine learning techniques to identify Enron employees who may have commited fraud based on the public Enron financial and email dataset. The code can be found [here](poi_id.py).

This project involves:
* Dealing with imperfect, real-world dataset
* Feature creation, transformation and selection aka Feature engineering
* Validating and evaluating using quantitative metrics
* Compare the performance of differente machine learning algorithms
* Tune each machine learning algorithm for maximum performance
* Clearly communicate results

This project was part of my Data Analyst Nanodegree at Udacity.


text:
# Roadmap

## Goals

Create an open source tool that allows anyone to learn anything in the most efficient way. It should allow users to:

- Curate knowledge through study guides. Where study guides can contain links and text with optional dependencies. Guides can be guided or unguided.
- Extend and improve any of the study guides through collaboration. The GitHub model of forking, suggesting changes. But simpler and more streamlined.
- Have access to an open knowledge graph of topics. Users can specify their proficiency in a given topic as well as mark topics to learn next.
- Search for any topic in the knowledge graph and see all study guides available for a given topic. As well as show related topics.
- Be able to extend the knowledge graph and improve the accuracy of the relationships between topics.
- Be able to visualize the knowledge graph in various ways. Learn Anything provides both all the source code and all the data for public use.

## Ideas

Aside from building the best tool for learning, Learn Anything should solve the core incentive of why people learn. And that is because they are either curious how the universe works or they want to build something. To solve the latter, we want to build the best ideas platform on the web. This platform should let users:

- Share any idea either publicly or privately.
- Find relevant ideas based on interest and skill.
- Let people message and collaborate to work on ideas together.

## Open to change

The goals above may change. Hopefully we grow a community of passionate learners and developers who are set on solving the problem of maximizing the efficiency of learning new things and finding impactful and interesting things to create.

As the community and product grows, machine learning can be used to effectively make use of submitted information to the platform. One can imagine a ML system that can create the **perfect** study guides for any user topic request that is perfectly tailored to the user. This will take into account all the information that is available. Topics already learned, preference in style of learning (video, text, visualizations) and material (resources) already covered.

Same applies for Ideas platform. Ideally these two platforms (Learning & Ideas) become one of the same thing. As you learn new things, ideas are being suggested to you for potential things you can build that **people want**. No more 1000 of TODO or note taking apps. Solving real problems that you care about where learning is just a tool.

repository: vsujeesh/docs

repo_name: vsujeesh/docs


text:
# Pulsar IO Gradle template

This Project is template to build pulsar io connectors with gradle

## Usage

```
./gradlew nar
```

Deploy generated nar artifact

```
build/libs/pulsar-io-datagen-0.0.1.nar
```

repository: aahmed-se/pulsar-io-gradle

repo_name: aahmed-se/pulsar-io-gradle


text:
![ReduxAPIStruct Logo](https://raw.githubusercontent.com/konojunya/redux-api-struct/master/logo/logo.png)

[![npm](https://img.shields.io/npm/v/redux-api-struct.svg?style=flat)](https://www.npmjs.com/package/redux-api-struct)
[![CircleCI](https://circleci.com/gh/konojunya/redux-api-struct/tree/master.svg?style=shield)](https://circleci.com/gh/konojunya/redux-api-struct/tree/master)
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)

redux-api-struct makes it easy to manage the state of the API for redux's state.

# Description

redux-api-struct provides types and utils for store.

By managing the state with `initial` `fetching`, `success` and `failure`, it is possible to easily switch the UI on the component side, making the error report easier to write due to the structure of the error, or letting the error sentence depend on the action.

# Installation

install with npm or yarn

- npm

```shell
npm install --save redux-api-struct
```

- yarn

```shell
yarn add redux-api-struct
```

# Usage

redux-api-struct is supposed to be used with redux.

sample is an example using **typescript-fsa** and **typescript-fsa-reducers**.

```ts
import { reducerWithInitialState } from "typescript-fsa-reducers";
import {
  ReduxAPIStruct,
  ReduxAPIState,
  createDefaultStruct
} from "redux-api-struct";

/**
 * To createDefaultStruct, pass in the generic type such as API response,
 * give the default value. If there is no default value,
 * undefined is substituted.
 */
export interface InitialState {
  user: ReduxAPIStrcut<number>
}

// case no defualt value
export const initialState: InitialState = {
  count: createDefaultStruct<number>()
}

// case default value is 0
export const initialState: InitialState = {
  count: createDefaultStruct<number>(0)
}

// reducer
export const sampleReducer = reducerWithInitialState(initialState)
  .case(ActionCreator.request, state => {
    ...state,
    count: {
      ...state.count,
      state: ReduxAPIState.FETCHING
    }
  })
  .case(ActionCreator.success, (state, payload) => {
    ...state,
    count: {
       ...state.count,
       state: ReduxAPIState.SUCCESS,
       data: payload
    }
  })
  .case(ActionCreator.failure, (state, error) => {
    ...state,
    count: {
      ...state.count,
      state: ReduxAPIState.FAILURE,
      error
    }
  })
```

actionCreator.ts

```ts
import actionCreatorFactory from "typescript-fsa";
import { ReduxAPIError } from "redux-api-struct";

const actionCreator = actionCreatorFactory("sample");

// actionCreator
export type RequestPayload = void;
export const request = actionCreator<RequestPayload>("REQUEST");

export type SuccessPayload = number;
export const success = actionCreator<SuccessPayload>("SUCCESS");

export type FailurePayload = ReduxAPIError;
export const failure = actionCreator<FailurePayload>("FAILURE");

export const nextCount = () => async (dispatch, getState) => {
  const { sampleReducer } = getState();
  dispatch(request());

  let num: number = sampleReducer.count.data;
  try {
    const nextCount = await new Promise<number>((resolve, reject) => {
      setTimeout(() => {
        if (Math.floor(Math.random() * 4) === 0) {
          reject(new Error("request failure"));
        }
        resolve(++num);
      }, 500);
    });
    dispatch(success(nextCount));
  } catch (error) {
    // Depending on the type of ReduxAPIError, statusCode, error and message are required.
    dispatch(
      failure({
        statusCode: 500,
        error
      })
    );
  }
};
```

in component

```tsx
import * as React from "react";
import { connect } from "react-redux";
import { ReduxAPIStruct, ReduxAPIState } from "redux-api-struct";
import { nextCount } from "./action"

interface Props {
  count: ReduxAPIStruct<number>;
  nextCount: typeof nextCount;
}

const Component: React.FunctionComponent<Props> = ({ count, nextCount }) => {
  const countComponent = (() => {
    switch(count) {
      case ReduxAPIState.INITIAL:
      case ReduxAPIState.FETCHING:
        return <p>loading...</p>
      case ReduxAPIState.SUCCESS:
        return <p>{count.data}</p>
      caes ReduxAPIState.FAILURE:
        return <p>failure component</p>
    }
  })()

  <>
    {countComponent}
    <button onClick={nextCount}>+1</button>
  </>
}

const Counter = connect(
  state => ({
    count: state.sampleReducer.count
  }),
  dispatch => ({
    nextCount: () => dispatch(nextCount())
  })
)(Component)

export { Counter }
```

# API

The state wrapped by ReduxAPIStruct has the following state.

- status
- data
- error

## status: ReduxAPIState

status is for describing the situation with the API with the following enums briefly. Components can use this enum to separate out depending on the state.

```ts
enum ReduxAPIState {
  INITIAL,
  FETCHING,
  SUCCESS,
  FAILURE
}
```

## data: T

data is given the type of generics given by the type of ReduxAPIStruct.

The actual response returned by the API will be included in this data.

## error: ReduxAPIError

error requires three states. Only the statusCode is mandatory. The error type of the component is switched by statusCode so that error main body is put on because it is used for error reporting. message makes it easy to issue arbitrary error statements to action.

## createDefaultStruct: <T>(default?: any) => ReduxAPIStruct<T>

In createDefaultStruct, it is possible to give the default value as optional. You can get the benefit of ReduxAPIStruct by setting the return value of this method to the state of reducer.

## errorDefault: () => ReduxAPIError

errorDefault is a method to initially generate a state for managing errors. Use it to generate a test code or an arbitrary error.

# Logo

created by [kinokoruumu](https://github.com/kinokoruumu)

you can see [logo dir](https://github.com/konojunya/redux-api-struct/blob/master/logo)

# License

MIT

repository: konojunya/redux-api-struct

gha_language: TypeScript

repo_name: konojunya/redux-api-struct


text:
# Python Client

**zeroos** is the Python client used to talk to [Zero-OS 0-core](https://github.com/zero-os/0-core).

## Install

Install `0-core-client` package:
```bash
pip3 install 0-core-client
```

Or, if the above doesn't work (yet):
```bash
BRANCH="master"
sudo -H pip3 install git+https://github.com/zero-os/0-core.git@${BRANCH}#subdirectory=client/py-client
```

Or:

```bash
git clone git@github.com:zero-os/0-core.git
cd 0-core/client/py-client
``

## How to use

Launch the Python interactive shell:
```bash
python3
```

Ping your Zero-OS instance on the IP address provided by ZeroTier:
```python
from zeroos.core0.client import Client
cl = Client("<ZeroTier-IP-address>")
cl.ping()
```

The above example will of course only work from a machine that joined the same ZeroTier network.

Some more simple examples:
- List all processes:
  ```python
  cl.system('ps -ef').get()
  ```

- List all network interfaces:
  ```python
  cl.system('ip a').get()
  ```

- List all disks:
  ```python
  cl.disk.list()
  ```

Also see the examples in [JumpScale Client](jumpscale.md).


text:
# Features
Linear guides with block sliders has been implemented on the x axis. This improvement provides a strong structure without vibrations.
The quality of the printed parts greatly improves on this axis.
# Contents
1. Cad files in SW 2016
2. STL files (needed to print parts)
3. Images of the results

path: /X axis upgrade/Readme.md


text:
---
jupytext:
  formats: md:myst
  text_representation:
    extension: .md
    format_name: myst
kernelspec:
  display_name: Python 3
  language: python
  name: python3
---
# Lab 4

Here are some help for lab 4.
___

+++

## Overview

- I think it seems like a lot of work but no worries its super quick!

- You will need some tapes and Logger Pro to finish the lab.

+++

## Part 1: Attraction and repulsion of charged and neutral objects

- Part 1 requires you with some equipment:
  - Tape (It does not have to be Scotch).
  - Smartphone/Camera (just for taking picture).
  - Youtube videos (super helpful!).

### Setup Visualization

- Before we go any further, it is helpful to have a picture of the experiment setup.

```{figure} ../../images/lab4/setup_part1_lab4.jpg
Experimental setup (part 1)
```

- Note that you will need to use **7 pieces** of tape in total.

````{margin}
```{tip}
Watch the video first before you do it!
```
````

### Setup instructions

- Now, let's have a brief version of the instruction.
  - Step 1: Take out 1 piece of tape, touch it gently to discharge, put it on anything insulated and mark it **N**.
  - Step 2: Stick 2 pieces on a surface (e.g. table). Those are called **workingspaces**.
  - Step 3: Take out 2 pieces, folder one end down a little and mark it **B**.
  - Step 4: Take 2 more pieces, do the same as step 3 and mark it **T**.
  - Step 5: Pick 1 workspace. Pull up **B** and **T** at the same time. Stick them (hanging) on a surface. Now, **B** is in position.
  - Step 6: Do the same for the other workspace.

- Now, you have set up your experiment. Follow the later instruction to observe the behavior and record it in your report sheet.

````{margin}
```{tip}
Same charges repels. Different charges attract!
```
````

- One question will ask you to watch one video to identify the charge of each label. Make sure you watch it to answer the question. It will be super clear.

```{note}
For drawing the tape, you will have to show me which tape is negatively charged and which tape is positively charged.
```

+++

## Part 2: Measuring the charge on a pith ball

- For this part, there is just a picture for you to insert in Logger Pro and do analysis.

- Make sure when you do it, choose Picture with analysis.

### Setup visualization

- Let's have a look of what the setup look likes.

```{figure} ../../images/lab4/setup_part2_lab4.jpg
:scale: 50%
Experimenal setup (Part 2)
```

### Setup instructions

- Follow the manual and repeat similar steps as previous labs.

- After you follow the manual's instructions, you will use the **vertical ruler** for measuring distance between 2 points. Here is the sample Logger Pro window.

```{figure} ../../images/lab4/part2_lab4.jpg
:scale: 50%
Logger Pro demo
```

```{caution}
In this picture, I only show how to find Dp. You will have to also find Ds!
```

````{margin}
```{note}
Please choose either meter or centimeter! Don't mix them up!
```
````

### Free Body Diagram and Calculations

- When you are done, record the values in the report sheet' table.

- Now, start calculating $\theta$ by using only $D_{p}$ and $D_{s}$. This will be use later.

- Next, draw your body diagram on **1 ball only**.

- From there, based on the observed system, we have $F_{net} = 0$. Break the forces into components and calculate $F_{e}$.

- Having $F_{e}$ and equally charged balls meaings we can find the charge on each ball via **Coulomb Law**.

```{warning}
Don't forget to calculate uncertainties. Show your work!
```

+++

## Discussion

- The last question asks you to know how the angle behaves in response to the change in charge of each ball.

- Now, this is a common proportional relationship between 2 quantities. **I would start by writing down relating formula and assume other quantities constant**.

```{caution}
Proportional relationship is not limited to linearity!
```

+++

## Attachments

- You are required to submit pictures of your experiment setup in part 1.

- Here are the sample picture I want you to submit.

````{panels}
Table setup
^^^
```{figure} ../../images/lab4/attachment1_lab4.jpeg
:alt: attachment1
:width: 250px
:height: 250px
:align: center
Table setup submission
```

---

Separation setup
^^^
```{figure} ../../images/lab4/attachment2_lab4.jpeg
:alt: attachment2
:width: 300px
:align: center
Separation setup submission
```
````

```{warning}
Please include these pictures in your reportsheet as one whole pdf.
```

+++

## Recordings

- Here is your lab 4 recordings. [Click Here](https://ubc.zoom.us/rec/share/imBPYLsRFMqzKORW86dMMb1EX2MRLjZnikOnZLMNRhRxVE1_hr02hA_4NJHxtYA.MsYgPbTFjNEQzFrI)

repository: tthvo/phys-web

repo_name: tthvo/phys-web