text:
# Getting Started with DeepRacer OpenSource

The DeepRacer device has all the required libraries and packages preinstalled to run the core application. We recommend you build the ROS2 packages on the device when
changing core packages or building new packages. This will make it easier to develop,
debug, and test the application.

If your device is not upgraded to the latest software stack with Ubuntu 20.04 and ROS2
Foxy, you can follow the instructions [here](https://docs.aws.amazon.com/deepracer/latest/developerguide/deepracer-ubuntu-update.html) to flash the device with upgraded software
stack. After flashing the device with the new image, the software stack should be
updated to **Ubuntu 20.04 Focal Fossa**, **Intel® OpenVINO™ toolkit 2021.1.110**,
**ROS2 Foxy Fitzroy** and **Python 3.8**.

The AWS DeepRacer device with the upgraded OpenSource software stack contains the
following software preinstalled:

1. **ROS2 Foxy and dependencies:** The DeepRacer device has the ROS2 Foxy
(**ros-foxy-desktop**), CV Bridge(**ros-foxy-cv-bridge**), image transport
(**ros-foxy-image-transport**), standard messages (**ros-foxy-std-msgs**) and sensor
messages (**ros-foxy-sensor-msgs**) installed. For more information about
installing ROS2 Foxy, see [Installing ROS 2 via Debian Packages](https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Install-Debians/).

1. **Intel OpenVino toolkit and its dependencies:** The AWS DeepRacer core application
uses Intel OpenVino to optimize the reinforcement learning models and run the inference
on them. As part of the preinstalled device software, we have installed the Intel
OpenVino toolkit (**intel-openvino-dev-ubuntu20-2021.1.110**) and its dependencies.
More details about the steps to install the Intel OpenVino toolkit can be found here
(https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_linux.html).

1. **Tensorflow:** We have installed a custom built **Tensorflow v2.4.0** wheel with no
AVX support to work on the AWS DeepRacer device.

1. **AWS DeepRacer packages**:
    1. **aws-deepracer-sample-models** - This debian package installs the three sample
    models deployed by default on the AWS DeepRacer device.
    2. **aws-deepracer-util** - This debian package installs the utility scripts
    required by the AWS DeepRacer core application.
    3. **aws-deepracer-device-console** - This debian package installs the UI component
    of the AWS DeepRacer device console.
    4. **aws-deepracer-core** - This debian package installs all the ROS2 Foxy packages
    required to provide the functionalities for AWS DeepRacer core application.

Before you pull the changes from the GitHub repositories, make sure you have the device setup completed and have the latest version of the AWS DeepRacer. For more information about the device setup, connecting to Wi-Fi and software update system, see [Getting Started](https://aws.amazon.com/deepracer/getting-started/) quick start guide for the AWS DeepRacer and AWS DeepRacer Evo devices.

#### Installing the AWS DeepRacer debian packages using CLI:

To install the latest AWS DeepRacer pacakges from the apt repository, open up a terminal on the DeepRacer device and run the following commands:

1. Update the apt cache:

        sudo apt-get update

1. Install the latest aws-deepracer-* packages:

        sudo apt-get install aws-deepracer-*

## DeepRacer Core Components

The DeepRacer application includes packages for perception, decision, navigation and general application support:

**Perception**

* [camera_node](https://github.com/aws-deepracer/aws-deepracer-camera-pkg) - reads and publishes data from the camera.
* [rplidar_node](https://github.com/youngday/rplidar_ros2) - an open source package that supports reading and publishing LiDAR data from the connected RPLidar device.
* [sensor_fusion_node](https://github.com/aws-deepracer/aws-deepracer-sensor-fusion-pkg) - combines and publishes camera and LiDAR data (if one is present) as a single message.

**Decision**

* [inference_node](https://github.com/aws-deepracer/aws-deepracer-inference-pkg) - runs inference on the selected machine learning model.

**Navigation**

* [deepracer_navigation_node](https://github.com/aws-deepracer/aws-deepracer-navigation-pkg) - collects model inference results and publishes a servo message with throttle and steering angle values based on the action space for the selected machine learning model.
* [servo_node](https://github.com/aws-deepracer/aws-deepracer-servo-pkg) - maps the input servo throttle and servo angle ratios to raw PWM values thats set on the servo/motor to move the vehicle.

**General Application Support**

* [async_web_server_cpp](https://github.com/GT-RAIL/async_web_server_cpp) - an open source package that supports streaming display_mjpeg and overlay_mjpeg to the front end as a camera stream.
* [ctrl_node](https://github.com/aws-deepracer/aws-deepracer-ctrl-pkg) - as the main node, it exposes services used by webserver backend API calls.
* [software_update_node](https://github.com/aws-deepracer/aws-deepracer-systems-pkg) - responsible for the software update system managing the aws-deepracer-core, aws-deepracer-util, aws-deepracer-sample-models, and aws-deepracer-webserver packages.
* [model_loader_node](https://github.com/aws-deepracer/aws-deepracer-systems-pkg) - responsible for extracting tar.gz model files from USB and those uploaded from console.
* [otg_control_node](https://github.com/aws-deepracer/aws-deepracer-systems-pkg) - responsible to enable and disable OTG connection and publish connection status.
* [network_monitor_node](https://github.com/aws-deepracer/aws-deepracer-systems-pkg) - responsible to connect to Wi-Fi based on configuration file on USB and communicate the network connection status.
* [device_info_node](https://github.com/aws-deepracer/aws-deepracer-device-info-pkg) - provides hardware and software version information.
* [battery_node](https://github.com/aws-deepracer/i2c_pkg) - reads and publishes vehicle battery level information.
* [model_optimizer_node](https://github.com/aws-deepracer/aws-deepracer-model-optimizer-pkg) - runs the model optimizer on the selected machine learning model.
* [status_led_node](https://github.com/aws-deepracer/aws-deepracer-status-led-pkg) - controls blinking and solid light functionality for the status LEDs found on the side of the DeepRacer device.
* [usb_monitor_node](https://github.com/aws-deepracer/aws-deepracer-usb-monitor-pkg) - monitors USB connections and published a notification if a required file is found.
* [web_video_server](https://github.com/RobotWebTools/web_video_server/pull/111) - an open source package that supports streaming the images from a topic through the webserver to the front end.
* [webserver_publisher_node](https://github.com/aws-deepracer/aws-deepracer-webserver-pkg) - a collection of FLASK APIs called from the front end. These APIs call ROS services and return results to the front end.

## (Optional) Use SSH to remotely connect to the DeepRacer device:

1. The Settings page in the DeepRacer device console provides interface to enable the SSH server on the DeepRacer device. After enabling the SSH on the device it is possible to remotely login to DeepRacer via CLI from your local system and execute commands. More instructions about the Settings page can be found [here](https://docs.aws.amazon.com/deepracer/latest/developerguide/deepracer-manage-vehicle-settings.html).

1. After enabling the SSH server, remotely connect to the DeepRacer(The local system should be on the same Wi-Fi as the DeepRacer device):

        ssh deepracer@<<IP_ADDRESS>>

## Installing build tools

To install the required build tools, open up a terminal on the DeepRacer device and run the following commands as root user.

1. Switch to root user before installing and initializing rosinstall:

        sudo su

1. Install rosinstall if not installed previously:

        apt install python3-rosinstall

1. Initializing rosdep if its not initialized previously:

        rosdep init
        rosdep update

1. We use colcon to build the AWS DeepRacer Core ROS2 packages. More
details to install and use colcon can be found [here](https://index.ros.org/doc/ros2/Tutorials/Colcon-Tutorial/#colcon).

        apt install python3-colcon-common-extensions -y

## Building the core packages

To build the core packages on the device, open up a terminal on the DeepRacer device and run the following commands as root user.

1. Switch to root user:

        sudo su

1. Stop the deepracer-core.service that is currently running on the device:

        systemctl stop deepracer-core

1. Source the ROS2 Foxy setup bash script:

        source /opt/ros/foxy/setup.bash

1. Set the environment variables required to run Intel OpenVino scripts:

        source /opt/intel/openvino_2021/bin/setupvars.sh

1. Create a workspace directory for the package:

        mkdir -p ~/deepracer_ws
        cd ~/deepracer_ws

1. Clone the deepracer_launcher package on the DeepRacer device:

        git clone https://github.com/aws-deepracer/aws-deepracer-launcher.git

1. Clone the async_web_server_cpp, web_video_server and rplidar_ros dependency packages on the DeepRacer device:

        cd ~/deepracer_ws/aws-deepracer-launcher && ./install_dependencies.sh

1. Fetch unreleased dependencies:

        cd ~/deepracer_ws/aws-deepracer-launcher
        rosws update

1. Resolve the dependencies:

        cd ~/deepracer_ws/aws-deepracer-launcher && rosdep install -i --from-path . --rosdistro foxy -y

1. Build the core packages:

        cd ~/deepracer_ws/aws-deepracer-launcher && colcon build

## Running the latest packages

To launch the built packages on the DeepRacer device open up another terminal on the DeepRacer device and run the following commands as root user:

1. Switch to root user before you source the ROS2 installation:

        sudo su

1. Source the ROS2 Foxy setup bash script:

        source /opt/ros/foxy/setup.bash

1. Set the environment variables required to run Intel OpenVino scripts:

        source /opt/intel/openvino_2021/bin/setupvars.sh

1. Source the setup script for the installed packages:

        source ~/deepracer_ws/aws-deepracer-launcher/install/setup.bash

1. Launch all the required nodes using the main launch script:

        ros2 launch deepracer_launcher deepracer_launcher.py

## Updating the deepracer-core service:

To ensure the latest packages run when DeepRacer device is booted, update the existing packages from */opt/aws/deepracer/lib* folder with the new packages. Run the following commands to replace the existing installation with the newly built packages.

1. Switch to root user:

        sudo su

1. Navigate to the deepracer workspace:

        cd ~/deepracer_ws/aws-deepracer-launcher/install

1. Copy the newly built files to the */opt/aws/deepracer/lib* folder:

        cp -r ./ /opt/aws/deepracer/lib

1. Restart the deepracer-core.service:

        systemctl restart deepracer-core

Once you have the updated software installed on the device, you should be able to run the AWS DeepRacer core application and modify the existing nodes and packages to suit your needs.

For more information about how the core application works in different
modes, see [Modes of Operation](https://github.com/aws-deepracer/aws-deepracer-launcher/blob/main/modes-of-operation.md).

## Start/Stop the deepracer-core service:

To start and stop the deepracer-core service for development/debugging, you can run the following commands.

1. To stop the deepracer-core.service:

        sudo systemctl stop deepracer-core

1. To restart the deepracer-core.service:

        sudo systemctl restart deepracer-core

## Resources

* Upgrade to latest software stack with Ubuntu 20.04 and ROS2
Foxy [https://docs.aws.amazon.com/deepracer/latest/developerguide/deepracer-ubuntu-update.html](https://docs.aws.amazon.com/deepracer/latest/developerguide/deepracer-ubuntu-update.html)
* AWS DeepRacer quickstart guide: [https://aws.amazon.com/deepracer/getting-started/](https://aws.amazon.com/deepracer/getting-started/)
* AWS DeepRacer device modes of operation: [https://github.com/aws-deepracer/aws-deepracer-launcher/blob/main/modes-of-operation.md](https://github.com/aws-deepracer/aws-deepracer-launcher/blob/main/modes-of-operation.md)

repository: jsspric/aws-deepracer-launcher

repo_name: jsspric/aws-deepracer-launcher


text:
# Generate and Test DataSet of the Network Slice Request

###### tags: `docs` `Network Slice`

## Introduction

Create DataSet by yaml file and Test algorithm performance

## Git Clone

```bash
$ git clone https://github.com/p76081158/5g-nsmf.git
```

## Create Dir of DataSet in slice-requests

```bash
$ cd 5g-nsmf/slice-requests
$ mkdir <DataSet Name>
```

## DataSet is generated by yaml

### Create yaml file

```bash
$ cd <DataSet Name>
$ nano DataSet-parameter.yaml
```

### DataSet-parameter.yaml

```yaml=
datasetInfo:
  name: DataSet-Example    # name of the dataset
  ngciList:                # tenants list
    - 466-01-000000010
    - 466-11-000000010
    - 466-93-000000010
  sliceNum: 10             # slice number of each tenants
  extraRequest: 1          # each timewindow has n network slice requests ( n = tenant num + extraRequest, e.g. n = 3 + 1 )
  testNum: 5               # how many test case in this dataset
  resource:
    cpu:
      limit: 1000          # cpu request limit  (1000 = 1 cpu core)
      lambda: 500          # generate slice reqeusted cpu by poisson distribution
      discount: 0.5        # forecasting discount
    bandwidth:
      limit: 10            # bandwidth reqeust limit
      lambda: 5            # generate slice reqeusted cpu by poisson distribution
      discount: 0.5        # forecasting discount
    duration: 300          # duration of slice reqeust
    random: false          # slice request duration is fixed or random (poison lambda = duration)
  target: cpu              # target of resource for slice bin packing algorithm
  sort: true               # sorting network slice requests in each timewindow before bin packing
  concat: false            # use concat algorithm if not finding any tree node for slice reqeust
  timewindow: 600          # duration of each timewindow
  forecastingTime: 0       # from which timewindow start use forecasted data (0 == nerver, 1 == from timewindow-1)
  forecastBlockSize: 100   # forecasted block size of network slice request, e.g. each network slice reqeust's duration is 300, so each slice requests will be divided into two sub slice requests (300/150=2)
  regenerate: true         # regenerate DataSet again (false for DataSet already exist)
```

### Usage

```bash
$ cd 5g-nsmf/nsrtester
# ./nsrtester <dataset name>
$ ./nsrtester DataSet-Example
```
![image alt](https://github.com/p76081158/5g-nsmf/blob/assets/docs/terminalizer/gif/dataset-example-generate.gif?raw=true)

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
## Frequently Asked Questions

### Why does my `node_modules` folder use disk space if packages are stored in a global store?

pnpm creates [hard links](https://en.wikipedia.org/wiki/Hard_link) from the
global store to project's `node_modules` folders. Hard links point to the same
place on the disk where the original files are. So, for example, if you have
`foo` in your project as a dependency and it occupies 1MB of space, then it will
look like it occupies 1MB of space in the project's `node_modules` folder and
the same amount of space in the global store. However, that 1MB is _the same
space_ on the disk addressed from two different locations. So in total `foo`
occupies 1MB, not 2MB.

For more on this subject:

* [Why do hard links seem to take the same space as the originals?](https://unix.stackexchange.com/questions/88423/why-do-hard-links-seem-to-take-the-same-space-as-the-originals)
* [A thread from the pnpm chat room](https://gist.github.com/zkochan/106cfef49f8476b753a9cbbf9c65aff1)
* [An issue in the pnpm repo](https://github.com/pnpm/pnpm/issues/794)

### Does it work on Windows? It is harder to create symlinks on Windows

Using symlinks on Windows is problematic indeed. That is why pnpm uses junctions
instead of symlinks on Windows OS.

### Does it work on Windows? Nested `node_modules` approach is basically incompatible with Windows

Early versions of npm had issues because of nesting all `node_modules` (see
[Node's nested node_modules approach is basically incompatible with Windows](https://github.com/nodejs/node-v0.x-archive/issues/6960)).
However, pnpm does not create deep folders, it stores all packages flatly and
uses symlinks to create the dependency tree structure.

### What about circular symlinks?

Although pnpm uses symlinks to put dependencies into `node_modules` folders,
circular symlinks are avoided because parent packages are placed into the same
`node_modules` folder in which their dependencies are. So `foo`'s dependencies
are not in `foo/node_modules` but `foo` is in `node_modules/foo`, together with
its own dependencies.

### Why have hard links at all? Why not symlink directly to the global store?

One package can have different sets of dependencies on one machine.

In project **A**<EMAIL_ADDRESS>can have dependency resolved to<EMAIL_ADDRESS>but in
project **B** the same dependency of `foo` might resolve to<EMAIL_ADDRESS>So pnpm
hard links<EMAIL_ADDRESS>to every project where it is used, in order to create
different sets of dependencies for it.

Direct symlinking to the global store would work with Node's
`--preserve-symlinks` flag. But `--preserve-symlinks` comes with a bunch of
different issues, so we decided to stick with hard links. For more details about
why this decision was made, see: https://github.com/nodejs/node-eps/issues/46.

branch_name: refs/heads/master


text:
# SOAPMessageBuilder
Windows forms application for reading WSDL definition and building request messages based on message type schemas.

Application uses as XML instance building this Microsoft sample code.
https://msdn.microsoft.com/en-us/library/aa302296.aspx

- [Installing](#installing)
- [Building](#building)
- [Contributing](#contributing)
- [Change Log](#change-log)

# Installing

Application is self hosted and does not require any external components, except .NET Framework (.NET Framework 4.7.1) to be installed to computer it is executed.
So download the source ocde and build it with Visual Studio (version 2017 used in development).

# Tasks

## SOAP Message Builder
Application takes as a parameter WSDL URL, SOAP binding name and SOAP operation name. UI contains two functions that are fetching the WSDL XML
from the URL and showing it's content. And SOAP message generation, that extract information out fro mWSDL and generates SOAP message instance XML.

Current version does not support login for WSDL endpoint, even UI has the controls for it. Second thing that is under construction is
inline XML schema definition support and support for looking SOAP 1.2 elements in WSDL. Also only Style: 'Document' & use: 'literal' is supported.

### Properties

| Property | Type | Description | Example |
| -------- | -------- | -------- | -------- |
| WSDL Url | string | Full WSDL URL. | 'http://host:10002/Service1.svc?wsdl' |
| SOAP Binding name | string | Content of binding XML node 'name' -attribute. | 'Service1' |
| SOAP Operation name | string | Name -attribute od binding element wsdl:operation -element. | 'GetData' |
| User Name | string | User name for login to WSDL endpoint. (Not in use) | 'user1' |
| Password | string  | Password for login to WSDL endpoint. (Not in use) | 'password1' |
| Needs login | bool | If value is set, uses user name and password to login into WSDL-endpoint. | false |

### Returns

| Property | Type | Description | Example |
| -------- | -------- | -------- | -------- |
| SOAP message | string | SOAP envelope XML as a string. | |

# Building

Clone a copy of the repo

`git clone https://github.com/RipaOnGit/SOAPMessageBuilder.git`

Restore dependencies

`N/A`

Rebuild the project

Run build.

`SOAPMessageBuilder2\SOAPMessageBuilder\bin\Release`

# Contributing
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

1. Fork the repo on GitHub
2. Clone the project to your own machine
3. Commit changes to your own branch
4. Push your work back up to your fork
5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

# Change Log

| Version | Changes |
| ----- | ----- |
| <IP_ADDRESS> | Initial commit. |
| <IP_ADDRESS> | Separation of business logic from the UI application to own component DLL. |

repository: RipaOnGit/SOAPMessageBuilder

gha_language: C#

gha_license_id: MIT

repo_name: RipaOnGit/SOAPMessageBuilder


text:
Body cell mass: model development and validation at the cellular level of body composition.
===========================================================================================

  [@wikidata:Q47579411]

# Highlights

THE CONCEPT OF BODY CELL MASS (BCM), as proposed in 1963 by
Moore et al. (15), reflects the cellular components of the body
involved in biochemical processes and energy metabolism.
BCM consists of the nonfat cellular portion of tissues, such as
skeletal muscle, viscera, organs, blood, and brain

Moore et al. (15) developed a BCM estimation formula of
the general type
BCM kg  k  Ke mmol (1)
where Ke is total body exchangeable potassium measured by 42K, and k (in kg/mmol) is the reciprocal of the potassium
content of BCM. This model assumes that there is negligible
extracellular fluid (ECF) potassium, all exchangeable potassium is within cells, and that the average cell potassium content
is constant.

Cohn et al. (4) were the first investigators to experimentally
estimate BCM independent of TBK. BCM was derived by
application of early fat-free mass (FFM) models on the molecular and cellular body composition levels that incorporated
several measured components, including total body nitrogen
(TBN), total body water (TBW), total body calcium, and total
body chlorine

In the present study, we critically reviewed and
refined earlier approaches for estimating BCM. Our findings
show close concord among three approaches for estimating the
central BCM prediction model component k [i.e., 1/(TBK/
BCM)] value: 0.00918  0.00091 kg/mmol for experimental
data

# Comments
Too specific

## Tags
2.3
# Links

 * [Scholia Profile](https://scholia.toolforge.org/work/Q47579411)
 * [Wikidata](https://www.wikidata.org/wiki/Q47579411)
 * [TABernacle](https://tabernacle.toolforge.org/?#/tab/manual/Q47579411/P921%3BP4510)

license: Unlicense

gha_license_id: NOASSERTION


text:
# Veloce [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Getting Started
Visual Studio 2019 is recommended, Veloce is currently not supported on platforms other than Windows.

Start by cloning the repository with `git clone --recursive https://github.com/roberttully95/Veloce`.

If the repository was cloned non-recursively previously, use `git submodule update --init` to clone the necessary submodules.


text:
Fork it ( https://github.com/[my-github-username]/dbmapper/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request


text:
# My Custom Linters

In this project I made custom linters for checking ruby syntax, I made checks for empty lines, trailing white spaces and unclosed blocks.

# Instructions

For the: [Github-link](https://github.com/MarkoNS1990/my_linters)

To get a local copy of the repository please run the following commands on your terminal:

`$ git clone https://github.com/MarkoNS1990/my_linters.git`

- To install rspec `gem install rspec`
- Rspec is used for testing purposes

## Built with

- VS Code
- Ruby

## Testing instructions

`$ cd my_linters`
`$ rspec spec/linters_test.rb`

## Test For Linter Errors

> Copy your ruby file in the my_linters folder

```
$ ruby bin/main.rb
```

It will log all errors in your code from test.rb file.

## Good and Bad examples

### **White trailing space**

> Good example - pipe indicates the cursor

```
def my_method do|
    puts 'Hello world'
end
```

> Bad example

```
def my_method do |
    puts 'Hello world'
end
```

## Empty Line

> Good example

```
def my_method do
    puts 'Hello world'
end
```

> Bad example

```
def my_method do
    puts 'Hello world'

end
```

## Unexpected end keyword

> Good example

```
def my_method do
    puts 'Hello world'
end
```

> Bad example

```
def my_method do
    puts 'Hello world'
end
end
```

# Authors

- Name :Marko Zecevic
- Githhub :https://github.com/MarkoNS1990

# Show your support

- Support by giving star

# Acknowledgement

- Microverse

## 📝 License

This project is [MIT](https://github.com/git/git-scm.com/blob/master/MIT-LICENSE.txt) licensed.


text:
# human-connection-api-nodejs-client
[![Build Status](https://travis-ci.org/demokratie-live/human-connection-api-nodejs-client.svg?branch=master)](https://travis-ci.org/demokratie-live/human-connection-api-nodejs-client)

## Prerequisites
The development environment of this plugin uses the backend APIs of [Human Connection](https://human-connection.org/) and [Democracy](https://www.democracy-deutschland.de/#!start).
If you clone this repository, you have a version of both backend APIs in [/democracy-server](/democracy-server) and [/human-connection-api](/human-connection-api) as [git subtrees](https://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging), respectively.
Follow the installation instructions of both Human Connection API and Democracy API:

https://github.com/demokratie-live/democracy-server
https://github.com/Human-Connection/API

## Installation

Install dependencies with [yarn](https://yarnpkg.com/en/):
```sh
yarn install
```

## Run

Make sure you have [node](https://nodejs.org/en/) installed with a version >= 9.0.0.

Then run:
```sh
node --experimental-modules index.mjs

```

Or
```sh
yarn start
```

## Test

Run:
```
yarn test
```


text:
---
title: Godzilla (1954)
source: https://en.wikipedia.org/wiki/Godzilla_(1954_film)
category: Shōwa
---

Godzilla (Japanese: ゴジラ, Hepburn: Gojira) is a 1954 Japanese kaiju film directed by Ishirō Honda, with special effects by Eiji Tsuburaya. Produced and distributed by Toho Studios, it is the first film in the Godzilla franchise and the Shōwa era. The film stars Akira Takarada, Momoko Kōchi, Akihiko Hirata, and Takashi Shimura, with Haruo Nakajima and Katsumi Tezuka as Godzilla. In the film, Japan's authorities deal with the sudden appearance of a giant monster, whose attacks trigger fears of nuclear holocaust during post-war Japan.


text:
# Contribution

There are several areas where you can help.

## Documentation

I'm not native English speaker and some of my sentences sound weird.
Fork [blackmamba](https://github.com/zrzka/blackmamba) repository,
update [documentation](https://github.com/zrzka/blackmamba/tree/master/docs/source) and
open pull request. Will happily merge it.

## Testing

If you find a bug, please do not hesitate to [file an issue](https://github.com/zrzka/blackmamba/issues).
I'm unable to test everything.

## Questions

Do you have a question? [File an issue](https://github.com/zrzka/blackmamba/issues), I'll add
`question` tag and will answer it. Or you can send me direct message on
[Twitter](https://twitter.com/robertvojta).

## New ideas

I'm open to new ideas as well. Please, [file an issue](https://github.com/zrzka/blackmamba/issues).

## Development

### Style

Look around and try to keep same style. There're no hard rules. Just one and it's about
documentation strings. [Google Style](http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)
is used with minimum amount of reStructuredText features. That's because the documentation
string must be readable even in the console as a plain string.

### Pull requests

Pull requests must pass `flake8` checks:

```
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics
```

Pull requests must pass tests:

```
PYTHONPATH=. pytest tests
```

Consult [.travis.yml](https://github.com/zrzka/blackmamba/blob/master/.travis.yml) for more details.

repository: zrzka/blackmamba

gha_language: Python

repo_name: zrzka/blackmamba


text:
# epa-translation
Provides support for multiple languages on site. Anyone could make own translation by changing the page text inline
and share with friends. This way the community driven translations of web application will extend the application
audience beyond of initially targeted countries and lingual dialects.

Project comprise in-browser runtime `translation integration` and `inline vocabulary editor`
[microapplications](https://github.com/EPA-WG/EPA-concept/blob/master/microapplication.md)

# Integration into web application
The web page would need to include `epa-translation.js` (CDN tbd) into page, or use Browser plugin(tbd)
, or via bookmarklet(link TBD).

## Features
* detection of browser locale and use one+ vocabulary
* language preferences for selecting order of vocabularies
* <epa-translation> Languages </epa-translation> menu entry for preferences, displaying selected vocabularies.
* once vocabulary loaded or selected the translation on the page is activated,
substituting the original text from selected vocabulary(-ies)

# Editor
Loaded on demand only. The `translation integration` client on *"enable inline translation editor"* trigger will
pull `inline vocabulary editor` microapplication into host application content.

## Edit mode
Could be triggered by
* keyboard shortcut
* `translation integration` menu

# Cloud sync
Available from epa-translation preferences. Requires identification per application, page or user.

# Customization & preferences
Host application could preconfigure the preferences enabling own cloud APIs to sync.
The reference `translation cloud sync` application TBD.

# Vocabularies cloud sync
Simplest way is to serialize vocabularies from localStorage, save as JSON to server URL and use this URL as default value.

Sync to git TBD.

repository: EPA-WG/epa-translation

repo_name: EPA-WG/epa-translation


text:
---
name: Test Case
about: Submit a new test case
title: 'TEST CASE: '
labels: ':type: test case'
assignees: ''

---

*NOTE: This issue template is being created and may not be complete.*

Use this template to create an issue for a new test case to be added to the
Rocky Linux Testing repository.

---

## Checklist

- [ ] I have verified this test case is new and does not substantially replicate
  an existing case.
- [ ] I have verified this test case addresses a requirement documented in the
  Release Engineering documentation.
- [ ] I have identified the criticality of this test case.
- [ ] I am able to write the test case.

---

**Additional context**

Add any other context or screenshots about the feature request here.


text:
STRV Apple Watch Hackathon
===
STRV is hosting Apple Watch Hackathon, it is one-day challenge and I'm proud I can be part of it.

This project is created as a result of our team efforts.

Unfortunately we didn't have to much time for preparation, so we're starting from scratch in a day of Hackathon.

NTMA
---
*"Never Miss the Train Again"*

Final idea!

Application presenting you the nearest train information table, you can then select a train you want to track and get notification from. Notification are sended when the train is delayed, or when it knows on what rail the train is comming.

We came up with this idea really late, so we didn't have time to to make the entire app, so at the end we prepare just some concept screens and prototype of UI.

Old Ideas
---
- application for quick overview of public transport arriving to the nearest stop
- simple foreign language learning app - the application will send user a notification with two phrases / words, one in his language and the other in chosen foreign language. User has to decide if the one phrase / word is the translation of the other one.
- glance with anytime recommendation for a movie based on user's watchlist

repository: Higgcz/STRV-Apple-Watch-Hackathon

repo_name: Higgcz/STRV-Apple-Watch-Hackathon


text:
Pattern: Explicit call to `and()`

Issue: -

## Description

This rule detects when the `and(Object)` method is called directly in code instead of using the `&` operator. A groovier way to express this: `a.and(b)` is this: `a & b`. This rule can be configured to ignore `this.and(Object)` using the *ignoreThisReference* property. It defaults to *true*, so even `and(x)` will not trigger a violation. The default is *true* because `and` appears commonly in Grails criteria.

This rule also ignores all calls to `super.and(Object)`.

## Further Reading

* [CodeNarc - ExplicitCallToAndMethod](https://codenarc.github.io/CodeNarc/codenarc-rules-groovyism.html#explicitcalltoandmethod-rule)

repository: Adroiti/docs-for-code-review-tools

repo_name: Adroiti/docs-for-code-review-tools


text:
# Apollo iOS

[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg?maxAge=2592000)](https://raw.githubusercontent.com/apollostack/apollo-ios/master/LICENSE) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)   [![CocoaPods](https://img.shields.io/cocoapods/v/Apollo.svg?maxAge=2592000)](https://cocoapods.org/pods/Apollo) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](http://www.apollostack.com/#slack)

Apollo iOS is a GraphQL client for iOS, written in Swift.

It allows you to execute queries and mutations against a GraphQL server, and returns results as query-specific Swift types.

This means you don't have to deal with parsing JSON, or passing around around dictionaries and making clients cast values to the right type manually. Instead, the structs returned allow you to access data and navigate relationships using the appropriate native types directly. This also gives you nice features like code completion:

![Xcode code completion](/screenshots/xcode-code-completion.png)

Because the generated types are query-specific, you're only able to access data you actually specify as part of a query. If you don't ask for a field, you won't be able to access the corresponding property. In effect, this means you can now rely on the Swift type checker to make sure errors in data access show up at compile time:

![Xcode data access error](/screenshots/xcode-data-access-error.png)

As you can see above, you can conveniently work with your UI code and corresponding GraphQL definitions side by side. Our Xcode integration will even validate your query documents and show errors inline:

![Xcode data access error](/screenshots/xcode-query-validation.png)

## Getting Started

[Front Page](https://github.com/apollostack/frontpage-ios-app) is the iOS version of the simple "Hello World" app that lives on our [developer site](http://dev.apollodata.com).

[Apollo iOS Quickstart](https://github.com/apollostack/apollo-ios-quickstart) is a collection of sample Xcode projects that make it easy to get started with Apollo iOS.

If you want the same syntax highlighting for your .graphql files showed in the screenshots above, you can install our [Xcode add-ons](https://github.com/apollostack/xcode-apollo).

## Contributing

[![Build status](https://travis-ci.org/apollostack/apollo-ios.svg?branch=master)](https://travis-ci.org/apollostack/apollo-ios)

This project is being developed using Xcode 8 and Swift 3.

If you open `Apollo.xcodeproj`, you should be able to run the tests of the Apollo target.

Some of the tests run against [a simple GraphQL server serving the Star Wars example schema](https://github.com/apollostack/starwars-server) (see installation instructions there).

repository: nikolasburk/apollo-pokedex

repo_name: nikolasburk/apollo-pokedex


text:
---
title: Open Branding for Open Source Projects
date: 2016-04-28 14:31 UTC
author: bkp
tags: OSAS RDO community Gluster Project Atomic Ceph Fedora oVirt
published: true
comments: true
---
One of the really interesting things about working for Red Hat is the company's attention to detail. Everything about the way the company is presented to the world is decided upon. You can't just toss out any old picture of a guy in a red fedora... Shadowman's gotta have the exact look and feel. To help with that, there's an actual cool little branding book Red Hat's marketing department worked up that I use for lot of things: even camera angles on video interviews.

Such things are not just fun for the control freaks among us... consistency in the way things are presented help reduce friction and make it easier for any project--commercial or otherwise--to get their messaging out. The last thing you need is a lot of inconsistent look and feel in the materials you present to your community.

READMORE

With that in mind, OSAS is pleased to present the first edition of the "[Red Hat Community Brand Guide](http://community.redhat.com/brandguide/)."

This document details the visual style and identity of a number of the upstream and downstream community projects we manage here within OSAS. as well as the messaging associated with those projects. This messaging describes the projects in multiple ways, including 25-, 50-, and 100-word descriptions projects can use to talk about any of the projects, as well as specific ways the projects integrate with each other.

Huge thanks go to Tuomas Kuosmanen for pulling the design elements together and Ruth Suehle for directing the efforts on this project!

repository: garrett/jekyll-springboard-community

gha_language: Sass

repo_name: garrett/jekyll-springboard-community


text:
# Load Generation

A chart that uses k6 to generate load

## Values

| Parameter | Description | Default |
| --------- | ----------- | ------- |
| `image.pullPolicy` |  | `Always` |
| `image.repository` |  | `loadimpact/k6` |
| `image.tag` |  | `0.22.1` |
| `loadScript` | The js script that you want to generate the load.  | `import http from "k6/http";` | `SEE Values.yaml` |
| `replicaCount` | Number of load pods  | `1` |
| `resources.limits.cpu` |  | `500m` |
| `resources.limits.memory` |  | `256Mi` |
| `resources.requests.cpu` |  | `250m` |
| `resources.requests.memory` |  | `128Mi` |
| `k6.duration` | Duration of k6 test | `0` - infinite, keep running while pod runs |
| `k6.rps` | Max requests per second in each k6 pod | `1` |
| `k6.maxVUs` | Max number of k6 VUs per pod | `1` |
| `k6.VUs` | Actual number of running VUs at start. Must be less than maxVUs | `1` |
| `influx.eanbled` | Enable sending to an influxdb | `false` |
| `influx.dbName` | Name of influx database to keep data | `k6`  |
| `influx.insecure` | non-https influx | `true` |
| `influx.url` | URL of influx to send to | `"http://data-influxdb.tick:8086"` |
| `influx.retention` | Name of influx retention policy to use for data | `autogen` |

repository: FairwindsOps/charts

gha_language: Mustache

repo_name: FairwindsOps/charts


text:
---
layout: post
title: Human Activity Recognition using Machine Learning
date: 2019-09-01 18:00:00 +0300
background: '/img/bg-post.jpg'
tags: Machine Learning
usemathjax: true
---

Human Activity Recognition (HAR) plays an important role in real life applications primarily dealing with human-centric problems like healthcare and eldercare. It has seen a tremendous growth in the last decade playing a major role in the field of pervasive computing.
In the recent years, lot of data mining techniques has evolved in analyzing the huge amount of data related to human activity, more specifically, machine learning methods have been been previously employed for recognition include Naive Bayes, SVMs, Threshold-based, Markov chains and deep learning models. Indeed, One important part of the prediction is the selection of suitable models, but also a good selection of relevant features would be benificial in the process of building an accurate model.

In this post, we will try to classify human activity using data captured from embedded inertial sensors, carried by 30 subjects performing activities of daily living. We will extract relevant temporal and spectral features from each signal. Those features are supposed to carry necessary information from each recording.

## Tutorial overview
    1. Data preparation
    2. Features extraction
        2.1. Temporal feaures
        2.2. Spectral features
        2.3 Feature selection
    3. Benchmarking SKlearn models
    4. Best model Finetuning
    5. Results and conclusion

## 1. Data preparation
We will be using the publically available dataset called [Human Activity Recognition Using Smartphones](https://archive.ics.uci.edu/ml/datasets/human+activity+recognition+using+smartphones) available in UCI repository. It contains measurements collected from 30 people with age between 19 and 48. The measurements are captured with a smartphone placed on the waist while doing one of the following six activities: walking, walking upstairs, walking downstairs, sitting, standing or laying. The obtained dataset has been randomly partitioned into two sets, where 70% of the volunteers was selected for generating the training data and 30% the test data.
The sensor signals (accelerometer and gyroscope) were pre-processed by applying noise filters and then sampled in fixed-width sliding windows of 2.56 sec and 50% overlap (128 readings/window). The sensor acceleration signal, which has gravitational and body motion components, was separated using a Butterworth low-pass filter into body acceleration and gravity. The gravitational force is assumed to have only low frequency components, therefore a filter with 0.3 Hz cutoff frequency was used. From each window, a vector of features was obtained by calculating variables from the time and frequency domain.

The measures are three-axial linear body acceleration, three-axial linear total acceleration and three-axial angular velocity. So per measurement, the total signal consists of nine component.

Fortunately, The dataset is already prepared and splitted into a training and a test sets for us. In reality, most of the time is spent on fetching, preparing, cleaning the data.
We will split the test dataset to have some data for validation set to serve the finetuning of our classifers, and keep the test set for final classifiers evaluation.

The following script reads the data, and prepares it as a Numpy array. The script is borrowed from [this awesome article](http://ataspinar.com/2018/04/04/machine-learning-with-signal-processing-techniques/).

```python
from pathlib import Path
INPUT_FOLDER_TRAIN = Path("UCI HAR Dataset/train/Inertial Signals/")
INPUT_FOLDER_TEST =  Path("UCI HAR Dataset/test/Inertial Signals/")

INPUT_FILES_TRAIN = ['body_acc_x_train.txt', 'body_acc_y_train.txt', 'body_acc_z_train.txt',
                     'body_gyro_x_train.txt', 'body_gyro_y_train.txt', 'body_gyro_z_train.txt',
                     'total_acc_x_train.txt', 'total_acc_y_train.txt', 'total_acc_z_train.txt']

INPUT_FILES_TEST = ['body_acc_x_test.txt', 'body_acc_y_test.txt', 'body_acc_z_test.txt',
                     'body_gyro_x_test.txt', 'body_gyro_y_test.txt', 'body_gyro_z_test.txt',
                     'total_acc_x_test.txt', 'total_acc_y_test.txt', 'total_acc_z_test.txt']

LABELFILE_TRAIN = 'UCI HAR Dataset/train/y_train.txt'
LABELFILE_TEST = 'UCI HAR Dataset/test/y_test.txt'

activities_description = {
    1: 'walking',
    2: 'walking upstairs',
    3: 'walking downstairs',
    4: 'sitting',
    5: 'standing',
    6: 'laying'
}

def read_signals(filepath):
    data = filepath.read_text().splitlines()
    data = map(lambda x: x.rstrip().lstrip().split(), data)
    data = [list(map(float, line)) for line in data]
    return data

def read_labels(filename):
    with open(filename, 'r') as fp:
        activities = fp.read().splitlines()
        activities = list(map(int, activities))
    return pd.Series(activities)

def randomize(dataset, labels):
    permutation = np.random.permutation(labels.shape[0])
    shuffled_dataset = dataset[permutation, :, :]
    shuffled_labels = labels[permutation]
    return shuffled_dataset, shuffled_labels

train_signals =[]
for input_file in INPUT_FILES_TRAIN:
    signal = read_signals(INPUT_FOLDER_TRAIN / input_file)
    train_signals.append(signal)
train_signals = np.transpose(np.array(train_signals), (1, 2, 0))

test_signals = []
for input_file in INPUT_FILES_TEST:
    signal = read_signals(INPUT_FOLDER_TEST / input_file)
    test_signals.append(signal)
test_signals = np.transpose(np.array(test_signals), (1, 2, 0))

train_labels = read_labels(LABELFILE_TRAIN)
test_labels = read_labels(LABELFILE_TEST)

```

## 2. Features extraction
Once our data is loaded, we are ready to extract features from it. We will extract two type of features : temporal features which are extracted from the time domain of the signals, and spectral features which are extracted from the frequency domain. We hope that both types carries enough information during our classification task. Most of described and used features are taken from a master thesis that you can enjoy reading [here](http://sal.aalto.fi/publications/pdf-files/tsep16_public.pdf).

### 2.1 Temporal features
The most obvious way to gain information from a signal is to extract features from its raw representation as a time series. The processed time series can be described throiugh statstical features. Different features describe dierent aspects, so calculating several features from one signal can give comprehensive description of that signal. We will use the following time domain related features:

The mean, the standard deviation and RMS are self-explanatory. Skewness, kurtosis and crest factor as well as L, S and I factors describe the shape of distribution. Skewness measure the symmetry of the distribution which is symmetric about the mean has a skewness close to zero. Kurtosis measure the weight of tails of the distribution. Normal distribution has a kurtosis value close to three, whereas distributions with smaller tails have larger and flatter distributions have smaller values of kurtosis. Crest factor as well as L, S and I factors all describe in their own way, how much the extreme values dier from the rest of the population.

the following function calculate temporal feature from a time series.

```python
def time_features(series, component=''):
    expected_value = np.mean(series)
    standard_deviation = np.std(series)
    square_mean_root = np.mean(np.sqrt(abs(series)))**2
    root_mean_square = np.sqrt(np.mean(series**2))
    peak_value = np.max(series)
    skewness = skew(series)
    kurtosiss = kurtosis(series)
    crest_factor = peak_value / root_mean_square
    l_factor = peak_value / square_mean_root
    s_factor = root_mean_square / expected_value
    i_factor = peak_value / expected_value

    return {
    'expected_value_'+component : expected_value,
    'standard_deviation_'+component : standard_deviation,
    'square_mean_root_'+component : square_mean_root,
    'root_mean_square_'+component : root_mean_square,
    'peak_value_'+component : peak_value,
    'skewness_'+component : skewness,
    'kurtosiss_'+component : kurtosiss,
    'crest_factor_'+component : crest_factor,
    'l_factor_'+component : l_factor,
    's_factor_'+component : s_factor,
    'i_factor_'+component : i_factor,
}
```

### 2.2 Spectral features

Spectral features are frequency based features, they are obtained by converting time based signal into frequency domain using [Fourier Transform](https://www.youtube.com/watch?v=spUNpyF58BY). In our case, we will convert our time series using Power Spectral Density which is simply the magnitude squared of the Fourier Transform of a continuos time and finite power signal. It is the quantity of power for each frequency component. More specifically, We use the Welch's methods for calculating PSD as it reduces the [spectral leakage](https://en.wikipedia.org/wiki/Spectral_leakage).

```python
from scipy.signal import welch

f_s = 50

def get_psd_values(y_values, f_s):
    f_values, psd_values = welch(y_values, fs=f_s)
    return f_values, psd_values
```

Some of the used frequency domain features corespond to the time domain feature and they are described in the following picture.

Moreover, we can add other spectral features like [spectral flatness](https://en.wikipedia.org/wiki/Spectral_flatness), spectral rolloff which determines the frequency below which 85% of the spectrum's energy is located.

All presented features are easy to calculate with python, the following function produces them for a given PSD.

```python
from scipy.stats.mstats import gmean
from scipy.stats import kurtosis, skew

def rolloff(psd,f):
        absSpectrum = abs(psd)
        spectralSum = np.sum(psd)

        rolloffSum = 0
        rolloffIndex = 0
        for i in range(0, len(psd)):
            rolloffSum = rolloffSum + absSpectrum[i]
            if rolloffSum > (0.85 * spectralSum):
                rolloffIndex = i
                break
        frequency = f[rolloffIndex ]
        return frequency

def spectral_features(psd, f, component=''):
    spec_mean = np.mean(psd)
    spec_std = np.std(psd)
    spec_skewness = skew(psd)
    spec_kurtosiss = kurtosis(psd)
    spec_centroid = np.sum(np.multiply(psd, f)) / np.sum(psd)
    spec_std_f = np.sqrt(np.sum(np.multiply((f - spec_centroid)**2,psd)) / (len(psd) - 1))
    spec_rms = np.sqrt((np.sum(np.multiply(f**2,psd))) / (np.sum(psd)))
    spec_flatness = gmean(psd) / np.mean(psd)
    spec_rolloff = rolloff(psd,f)

    return {
        'spec_mean_'+component : spec_mean,
        'spec_std_'+component : spec_std,
        'spec_skewness_'+component : spec_skewness,
        'spec_kurtosiss_'+component : spec_kurtosiss,
        'spec_centroid_'+component : spec_centroid,
        'spec_std_f'+component : spec_std_f,
        'spec_rms_'+component : spec_rms,
        'spec_flatness_'+component : spec_flatness,
        'spec_rolloff_'+component : spec_rolloff,
    }
```

For each time series in our datasets, the process of extracting all features, temporal and spectral, will result of 21 feature. In our dataset we have 7352 signal in the training set and 2947 in the test set, each signal with 9 components, which results of 189 features per signal.

Now it's time to go through our dataset and generate all features and put them in a clean dataframe.

```python
def generate_all_features(signals):
    all_features = []
    for signal in tqdm(signals):
        signal_features = {}
        for i in range(9):
            series = signal[:, i]
            f, psd = get_psd_values(series, f_s)
            signal_features_cpt = {**spectral_features(psd, f, signal_id=str(i)), **time_features(series, signal_id=str(i))}
            signal_features = {**signal_features, **signal_features_cpt}
        all_features.append(signal_features)
    return pd.DataFrame(all_features)

df_train = generate_all_features(train_signals)
df_test = generate_all_features(test_signals)

```

## 3. Benchmarking different classifiers

After preparing all the features for the training and test sets, we can now train a classifier to recognize the human activity. We will do a quick benchmark of different available classifier and pick the best one and optimize it further. In addition to XGBoost, our list  includes a collection of classifier from the amazing library scikit-learn.

This script instanciate different classifiers and train them using training data and calculate their score on test set.

```python

def benchmark(clf, clf_descr):
    t0 = time()
    clf.fit(df_train, train_labels)
    train_time = time() - t0
    t0 = time()
    pred = clf.predict(df_test)
    test_time = time() - t0
    score = accuracy_score(test_labels, pred)
    return clf_descr, score, train_time, test_time

models = [(RidgeClassifier(tol=1e-2, solver="lsqr"), "Ridge Classifier"),
        (MLPClassifier(alpha=1, max_iter=50), "MLP"),
        (PassiveAggressiveClassifier(n_iter=50), "Passive-Aggressive"),
        (KNeighborsClassifier(n_neighbors=10), "kNN"),
        (xgb.XGBClassifier(n_estimators=100), "XGBoost"),
        (SGDClassifier(alpha=.0001, n_iter=50, penalty="elasticnet"), 'SGD Classifier'),
        (NearestCentroid(), 'Nearest Centroid - Rocchio' )]

for penalty in ["l2", "l1"]:
    models.append((LinearSVC(penalty=penalty, dual=False,tol=1e-3), f'Linear SVC {penalty}'))
    models.append((SGDClassifier(alpha=.0001, n_iter=50,penalty=penalty), f'SGD Classifier {penalty}'))

results_all = []
for clf, name in tqdm(models):
    results_all.append(benchmark(clf, name))
```

Once models are trained, we can plot their scores and training time, I have also trained the proposed models using temporal and spectral features to se which set of features could perform better.

As it's expected the ensemble model perform better in this classification task. XGBoost has the highest score, but it took the longest to train.

## 4. Best model Finetuning : XGBoost tuning with HyperOpt
XGBoost has a large number of advanced parameters, which can all affect the quality and speed of our classifier, by quality we mean a model that avoid overfitting and generalize well. To achieve that, we can control model complexity by tweaking max_depth, min_child_weight and gamm parameters, or adding randomness to make training robust to noise with subsample and colsample_bytree. You can read more about XGBoost finetuning [here](https://www.dataiku.com/learn/guide/code/python/advanced-xgboost-tuning.html).

In our case, we will use HyperOpt, a Python library for serial and parallel optimization over search spaces, which may include real-valued, discrete, and conditional dimensions. It allows for simple applications of Bayesian optimization. For more details about this topic, check [this detailed post](https://towardsdatascience.com/an-introductory-example-of-bayesian-optimization-in-python-with-hyperopt-aae40fff4ff0).

The following code defines our parameter search space, an objective function to minimize and trails to store the history of our search.

```python
from hyperopt import hp, tpe, STATUS_OK, Trials
from sklearn.metrics import mean_absolute_error, log_loss, f1_score
from hyperopt.fmin import fmin

space ={
        'n_estimators': hp.quniform('n_estimators', 500, 100, 100),
        'learning_rate' : hp.loguniform('learning_rate', -6.9, -2.3),
        'max_depth': hp.choice('max_depth', np.arange(10, 30, dtype=int)),
        'min_child_weight': hp.quniform ('min_child', 1, 20, 1),
        'alpha'       : hp.uniform('alpha', 1e-4, 1e-6 ),
        'gamma'      : hp.uniform('gamma ', 1e-4, 1e-6 ),
        'subsample': hp.uniform ('subsample', 0.8, 1)
    }

def objective(space):

    clf = xgb.XGBClassifier(n_estimators = int(space['n_estimators']),
                            max_depth = space['max_depth'],
                            learning_rate = space['learning_rate'],
                            alpha = space['alpha'],
                            gamma  = space['gamma'],
                            min_child_weight = space['min_child_weight'],
                            subsample = space['subsample']
                           )

    eval_set  = [( df_train, train_labels), ( X_validation, y_validation)]

    clf.fit(df_train, train_labels, eval_set=eval_set, eval_metric="mlogloss", verbose=False)

    pred = clf.predict_proba(X_validation)
    mlogloss = log_loss(y_validation, pred)
    print('Loss', mlogloss)
    return{'loss':mlogloss, 'status': STATUS_OK }

trials = Trials()
best = fmin(fn=objective,
            space=space,
            algo=tpe.suggest,
            max_evals=20,
            trials=trials)
```

After finishing the space search for optimal parameters, the best set of paramaters are returned and used to train the best version of our classifier, we provide an evaluation set to track the progress of our model's learning. Then, we can plot the classification error and the loss in our predictions.

It seems like out model stopped learning after iteration 20, Thus, It would be better to have an early stoping around 20.
One of the advantages of XGBoost is its interpretability through features importance. We can see what are the most useful features for performing predictions on the leaf nodes of our models' estimators.

The last three component of our signal seem to have most relevant information when classifying humain activity.
Now let's look how our model did with respect to each class in our dataset, this can be summarized in the classification report provided by scikit-learn.

```python
              precision    recall  f1-score   support

           1       0.90      0.95      0.92       496
           2       0.92      0.96      0.94       471
           3       0.95      0.86      0.90       420
           4       0.91      0.82      0.86       491
           5       0.85      0.92      0.88       532
           6       1.00      1.00      1.00       537

   micro avg       0.92      0.92      0.92      2947
   macro avg       0.92      0.92      0.92      2947
weighted avg       0.92      0.92      0.92      2947
```

We can also look at the famous confusion matrix to evaluate the performance of our classifier on the test set.

Our classifier is able to recognize human activity with a pretty good accuracy across all activities.

## 5. Conclusion
That brings us to the end of this tutorial. We have built a classifier for human activity recognition based on temporal and spectral features extracted from signal data coming from human daily activities. We have experimented with a collection of classifiers and we picked the best one which is, as expcted, XGBoost model. Furthermore, we tried to optimize the XGBoost model by performing the hyper-parameter finetuning using HyperOpt to pick the best parameter of our classifier.

For further experiments, we can try using the entier time series signal data instead of extracting features, and use a time series based classifiers like Hidden Markov Models or Ruccurrent Neural network.


text:
[ ![Codeship Status for mitchlloyd/ember-islands](https://codeship.com/projects/0de87f00-c59f-0132-5306-3a52b81c571d/status?branch=master)](https://codeship.com/projects/74441)

Render Ember components into existing HTML.

This addon provides a practical way to introduce Ember into a server-rendered
application. It can facilitate a gradual redesign from a server-rendered
application to a client-rendered application.

## Installation

This addon should be installed inside of an Ember CLI project.

```
ember install ember-islands
```

Version 1.x of this addon is tested against Ember 2.x versions. If you have
trouble with an earlier version of Ember try using version 0.5.x of Ember
Islands.

## Usage

Add a placeholder for an Ember Component inside your server-rendered HTML.

```html
<div
  data-component='user-profile'
  data-attrs='{"name": "Sally User", "id": "4"}'>

  <p>Sally likes hiking in the wilderness</p>

</div>
```

* `data-component` names the component to render into this placeholder.
* `data-attrs` is a JSON object that will become the component's `attrs`.
* Content inside of the placeholder tag (`innerHTML`) will be the component's
  `innerContent` attribute.

Next define a component for that placeholder. In this example we'll show the
details of a user when someone clicks on their name.

```handlebars
{{! inside of app/templates/components/user-profile.hbs}}

<h2 {{action 'showDetails'}}>
  {{name}}
</h2>

{{#if isShowingDetails}}
  <p>{{description}}</p>
  {{user.email}}
  {{user.address}}
{{/if}}
```

Inside of the component JavaScript file we'll load a user from the Ember Data
store when the name is clicked and reveal the details portion of the template.

```javascript
// inside of app/components/user-profile.js

import Ember from 'ember';
const { Component, inject } = Ember;

export default Component.extend({
  store: inject.service(),

  init() {
    this._super(...arguments);
    this.description = this.get('innerContent').htmlSafe();
  },

  actions: {
    showDetails() {
      this.get('store').findRecord('user', this.get('id')).then((user) => {
        this.set('user', user);
      });

      this.set('isShowingDetails', true);
    }
  }
})
```

Notice that before rendering `innerContent` we called `htmlSafe` on it. Ember
will escape this HTML if we don't mark it as safe.

If you want to render island components on any server-rendered page you can add
the `{{ember-islands}}` component to your `application.hbs` template file and
configure the router `locationType` to ignore the URL.

```handlebars
{{! inside of app/templates/application.hbs}}

{{ember-islands}}
```

```javascript
// in /config/environment.js

module.exports = function(environment) {
  var ENV = {
    // ... other config

    locationType: 'none',

    // ... more config
  }
}

```

More advanced uses are described in [Rendering Ember Islands Based on URL Paths](#rendering-ember-islands-based-on-url-paths).

## Rendering Ember Islands Based on URL paths

Exclusively using Ember Islands is a great way to start introducing components
into an application. However, you can also use Ember's routing and the
`{{ember-islands}}` component to choose when to render island components. Let's
look at an example of using a combination of island components and `rootElement`
configuration to handle different cases.

It's useful to control where your Ember Application is rendered so that we
could, for instance, maintain a consistent header and footer across the
server-rendered application. To do that we set the `rootElement` in
`config/environment.js`.

```javascript
// in /config/environment.js

module.exports = function(environment) {
  var ENV = {
    // ... other config

    // Note that we have locationType set to something other than 'none'
    locationType: 'auto',

    APP: {
      rootElement: '#ember-application'
    }

    // ... more config
  }
}
```

Normally Ember will find and attach itself to the `body` element of the page. This
configuration will let us pick where it renders.

Let's say that your server-rendered application has a `/dashboard` page where
you would like to introduce some ember components with Ember Islands.

 The sign-ups-per-day component will be rendered here. -->

Server Rendered Pie Chart

Footer
```

Notice that your island components must be placed inside of the Ember
Application container. Otherwise they will not receive clicks or other mouse
events.

Your matching `dashboard.hbs` template will render the `ember-islands` component
which will inject the `sign-ups-per-day` and `net-promoter-score` components
into your static content.

```handlebars
{{! inside of app/templates/dashboard.hbs}}
{{ember-islands}}
```

Now let's say that you have another page (`/invoices`) where you would like to
render an Ember App using the normal routing workflow without Ember Islands.

In this case your server-rendered HTML could look like this:

```html
Header

Get Paid

Footer
```

In the `app/templates/invoices.hbs` template you can render HTML and components
in the typical Ember way:

```handlebars
{{! inside of app/templates/invoices.hbs}}

All The Invoices

{{invoice-list invoices=model}}
```

The routing file to support this setup would look like this:

```javascript
Router.map(function() {
  this.route('dashboard');
  this.route('invoices');
});
```

## Integration Concerns

To get started, add your `vendor.js` and `<application-name>.js` files into your
server-rendered page where you want to use Ember Islands. You can use the
`app/index.html` file from your Ember CLI project as a guide.

### Storing Config Data

By default Ember CLI stores configuration from `config/environment.js` in a
`meta` tag. It will be more useful to have Ember CLI to build the config object
into your compiled JavaScript files.

```javascript
// Inside of ember-cli-build.js
var app = new EmberApp({
  storeConfigInMeta: false
});
```

### Example Rails Usage with Helper

Inside of your Rails view files you can render a component using HTML data
attributes.

```html+erb
<div data-component="my-component" data-attrs="<%= {
  title: @post.title,
  body: @post.body
}.to_json %>">

```

If you're doing this often you'll want to create a view helper.

```ruby
module EmberComponentHelper
  def ember_component(name, attrs = {})
    content_tag(:div, '', data: { component: name, attrs: attrs.to_json })
  end
end
```

Then you can use that helper in your view files.

```html+erb
<%= ember_component 'my-component', title: @post.title, body: @post.body %>
```

### Fingerprinting

Ember CLI will fingerprint your files for you by default when you `build` your
application. This will work well with many deployment strategies and with
[ember-cli-deploy](https://github.com/ember-cli/ember-cli-deploy). When you
deploy your Ember code, you can update your server application to use the
new version of `vendor.js` and `my-application.js`.

You might find it convenient to let your server application fingerprint these
files instead. For instance if you're using Rails you can prevent Ember CLI from
fingerprinting your files, build your Ember application assets into your Rails
`assets/`, path and let Rails do its own fingerprinting during its `rake
assets:precompile` task. For this to work, you'll want to turn off Ember CLI's
fingerprinting.

```javascript
// Inside of ember-cli-build.js
var app = new EmberApp({
  fingerprint: {
    enabled: false
  }
});
```

Another option for Rails is to let Ember CLI continue to fingerprint your files
but also have it generate a `manifest-md5hash.json` file for Sprockets to
consume.

```javascript
// Inside of ember-cli-build.js
var app = new EmberApp({
  fingerprint: {
    generateRailsManifest: true
  }
});
```

### Conflicting JavaScript Libraries

If you are using libraries that rely on global variables to work (e.g. jQuery,
underscore, moment) you may run into conflicts with JavaScript libraries that
are loaded in your server-rendered application.

In your `ember-cli-build.js` file you can tell Ember CLI to exclude jQuery from
the build in certain environments

```javascript
// Inside of ember-cli-build
var vendorFiles = {};

if (EmberApp.env() !== 'test') {
  vendorFiles['jquery.js'] = null;
}

var app = new EmberApp({
  vendorFiles: vendorFiles,
});
```

You may only want to only include duplicated dependencies in your testing
environment.

```javascript
app.import({
  test: 'bower_components/underscore/underscore.js'
});
```

## Other Resources

[Discussing the need for Ember Islands at Global Ember Meetup](https://vimeo.com/152241622)

repository: noopkat/ember-islands

gha_language: JavaScript

repo_name: noopkat/ember-islands


text:
# This is a Python tutorial

This is an intro to basic python, prepared for Deep Mind, the
machine learning study group at Kroger Digital.

[View the Slide Show (https://mnebuerquo.github.io/python-tutorial/)](https://mnebuerquo.github.io/python-tutorial/)

## About

This slideshow was created using [Remark](http://remarkjs.com/) and
is hosted on [Github Pages](https://pages.github.com/).

When you are viewing the slideshow, space advances to the next slide, the up
and down arrow keys move back and forward.

If you are the presenter, press C to clone the window (one for the laptop, and
one for the projector display), and then with the presenter window selected,
press P to toggle presenter mode.

repository: shoreason/python-tutorial

repo_name: shoreason/python-tutorial


text:
Exleveldb
=========

This is an Elixir module wrapping the functions exposed by the Erlang module, [eleveldb](https://github.com/basho/eleveldb).

It may include a few extra convenience functions in the future, for more idiomatic Elixir, but at this point, the goal is just to wrap eleveldb's functions and document it well enough for it to be usable right away.

*Note:* Because eleveldb is not a hex package, you will need to run `mix do deps.get, deps.compile` in your project when using this wrapper.

## Usage

### open/2
Opens a new datastore in the directory called `name`. If `name` does not exist already and no `opts` list was provided, `opts` will default to `[{:create_if_missing, :true}]`.

Returns `{:ok, ""}` where the empty string is a reference to the opened datastore or, on error, `{:error, {:type, 'reason for error'}}`.

The reference to the database appears to be an empty binary but isn't. This is because `db_ref` is defined as an opaque type in eleveldb.

The best way to use the reference is to pattern match on the pair returned by `open/2` and keep the value for use with functions that take a `db_ref`.

### close/1
Takes a reference as returned by `open/2` and closes the specified datastore if open.

Returns `:ok` or `{:error, {:type, 'reason for error'}}` on error.

### get/3
Retrieves a value in LevelDB by key. Takes a reference as returned by `open/2`, a key, and an options list.

Returns `{:ok, value}` when successful or `:not_found` on failed lookup.

### put/4
Puts a single key-value pair into the datastore specified by the reference, `db_ref`.

Returns `:ok` if successful or `{:error, reference {:type, action}}` on error.

### delete/3
Deletes the value associated with `key` in the datastore, `db_ref`.

Returns `:ok` when successful or `{:error, reference, {:type, action}}` on error.

### is\_empty?/1
Checks whether the datastore specified by `db_ref` is empty and returns a boolean.

### fold/4
Folds over the key-value pairs in the datastore specified in `db_ref`.

Returns the result of the last call to the anonymous function used in the fold.

The two arguments passed to the anonymous function, `fun` are a tuple of the key value pair and `acc`.

### fold\_keys/4
Folds over the keys of the open datastore specified by `db_ref`.

Returns the result of the last call to the anonymous function used in the fold.

The two arguments passed to the anonymous function, `fun` are a key and `acc`.

### destroy/2
Remove a database, which implies that the database folder is deleted. Before calling `destroy/2` the database has to be closed with `close/1`. Returns `:ok` on success and `{:type, 'reason for error'}` on error.

### repair/2
According to Basho, "In the event of major hardware or filesystem problems, LevelDB can become corrupted. These failures are uncommon, but they could happen, as heavy loads can push I/O limits."
This function takes the path to the leveldb database and a list of options. The standard recomended option is the empty list `[]`. Before calling `repair/2`, close the connection to the database with `close/1`.
Returns `:ok` on success and `{:type, 'reason for error'}` on error.

## write/3
Performs a batch write to the datastore, either deleting or putting key-value pairs.

Takes a reference to an open datastore, a list of tuples (containing atoms for operations and strings for keys and values) designating operations (delete or put) to be done, and a list of options.

Returns `:ok` on success and `{:error, reference, {:type, reason}}` on error.

repository: oscarftoro/exleveldb

repo_name: oscarftoro/exleveldb


text:
# Lantern Mobile Specification

Date:   August 28, 2015

Status: Draft

Author: Myles Horton

## Background

[Lantern](https://www.getlantern.org) is widely used on desktops in censored regions, particularly Iran and China, to access web sites that are blocked. In those regions mobile is increasingly the dominant way for people to access the Internet, however, and users have requested Lantern on mobile in both two user surveys and in less formal feedback on social media and discussion forums. Lantern Mobile is an effort to meet this demand.

## Proposal

The Lantern team initially proposes to build Lantern Mobile on Android only. The initial MVP will use the always-on full device VPN mode introduced in Android 4.2 to proxy all network connections on the device and will not support older versions of Android. It will then interface directly with the existing [Lantern backend](https://github.com/getlantern/lantern) written in the Go programming language to send that data through the Lantern proxying system, complete with its various blocking resistance features. The details of those features are outside the scope of this document but include domain-fronting, peer-to-peer, and more traditional chained proxies. The first version will only unblock access to HTTP traffic, and particularly only to HTTP destinations that are detected as blocked. All other traffic will be forwarded directly to its original destination without going through the Lantern infrastructure.

The user interface for Lantern Mobile must be simple and easy to use. This document includes initial designs for that interface, although the real-world usability will be tested continually with users and will undoubtedly change in response to user feedback.

## Full Device VPN

When the user installs Lantern, he or she will be prompted to allow Lantern to run in full device VPN mode. Assuming the user approves that action, Lantern will then start intercepting all network traffic on the device. This is markedly different from Lantern behavior on desktops where Lantern only intercepts HTTP traffic that adheres to system proxy settings. It differs in that on mobile Lantern will not only receive non-HTTP traffic, but it also receives non-TCP traffic. Beyond that, Lantern on mobile receives the raw IP packets themselves and must parse and interpret each one.

## User Interface

repository: akkakks/lantern-mobile

repo_name: akkakks/lantern-mobile


text:
## About API portal for VMware Tanzu

API portal for VMware Tanzu provides API consumers with the ability to find, view API route details and try out API requests. Alongside Spring Cloud Gateway for Kubernetes and Spring Cloud Gateway for VMware Tanzu, API portal for VMware Tanzu provides the baseline API management capabilities for an internal API sharing economy across teams and lines of business within an organization.

### Key Features
API portal for VMware Tanzu includes the following key features:

View API Groups from multiple OpenAPI source URL locations
View an API Group’s detailed API documentation
Test out specific API routes from the browser
Enable Single Sign-On authentication via configuration

## API portal usecase

### To install or upgrade API portal for Kubernetes, follow the steps below.

1. Download and Extract Installation API-Portal Artifacts from VMware Tanzu Network.

2. Relocate the API-Portal for Kubernetes images to your private image registry. The images must be loaded into the local Docker daemon and pushed into the registry.

3. Install API Portal

4. Define API portal ingress

We already installed API portal on the cluster, you should see a new deployment and service named api-portal-server in your chosen namespace, api-portal by default.

execute the command  `kubectl get all -n api-portal` you should see a pod running the api-portal
operator as shown below.

```execute
kubectl get all -n api-portal
```

Output

NAME                                     READY   STATUS    RESTARTS   AGE
pod/api-portal-server-68c4769c47-d8hsl   1/1     Running   0          4d23h

NAME                        TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
service/api-portal-server   ClusterIP   <IP_ADDRESS>   <none>        8080/TCP   4d23h

NAME                                READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/api-portal-server   1/1     1            1           4d23h

NAME                                           DESIRED   CURRENT   READY   AGE
replicaset.apps/api-portal-server-68c4769c47   1         1         1       4d23h


text:
# 8Servos HAT {docsify-ignore-all}

## Description

**8Servos HAT** is an 8-way servo control board compatible with M5StickC. The brains of the borad is the STM32F030F4 microcontroller which communicates with M5StickC through I2C. In order to ensure that multiple servos can work at the same time, the HAT is equipped with a separate 16340 battery base for an external and independent power supply. A control switch and an RGB LED are also integrated with the HAT. The SG90 servos are a perfect fit for this HAT.

## Product Features

- 8-way servo control
- onboard RGB LED
- 16340 battery base
- I2C protocol for comunication and control (0x38)

## Weight and Size

- Product Size：55mm * 25mm * 20mm
- Proudct weight：33g(include battery)

## Applications

- Multiple servo control
- Robotic Arm
- Biomimetic Robots
- Smart and cognitive toys

## Package Includes

- 1x 8Servos-HAT
- 1x 16340 battery(750mAh)

## EasyLoader

<button type="button" class="btn btn-primary">Download EasyLoader</button>

>1. EasyLoader is a simple and fast program burner. Every product page in EasyLoader provides a product-related case program. This can be burned to the M5 device through simple steps, and a series of function verifications can be performed.

>2. After downloading the software, double-click to run the application, connect the M5 device to the computer through the data cable, select the port parameters, click **"Burn"** to burn the program (**For M5StickC, set the baud rate to 115200 or 750000**)

## Example

- **UIFlow**

### 1. Arduino IDE

*To get complete code, please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Hat/8servos-hat/Arduino)*

## 8Servos HAT Instructions

>1.	Function Description

	(1)Eight-way servo control

	(2)Onboard sk6812 LED control

>2.		I2C address description

	00H(R/W)servo register address

	description：

	（1）Data can be read and written continuously

	（2）Each register value indicates the degree can be written to 0-180

>	10H(R/W)servo pulse width register

    address	value	description

    10H	    0X00	CH1_WIDTH[8:15]

    11H	    0X00	CH1_WIDTH[0:7]

    12H	    0X00	CH2_WIDTH[8:15]

    13H	    0X00	CH2_WIDTH[0:7]

    14H	    0X00	CH3_WIDTH[8:15]

    15H	    0X00	CH3_WIDTH[0:7]

    16H	    0X00	CH4_WIDTH[8:15]

    17H	    0X00	CH4_WIDTH[0:7]

    18H	    0X00	CH5_WIDTH[8:15]

    19H	    0X00	CH5_WIDTH[0:7]

    1AH	    0X00	CH6_WIDTH[8:15]

    1BH	    0X00	CH6_WIDTH[0:7]

    1CH	    0X00	CH7_WIDTH[8:15]

    1DH	    0X00	CH7_WIDTH[0:7]

    1EH	    0X00	CH8_WIDTH[8:15]

    1FH	    0X00	CH8_WIDTH[0:7]

    description：

	（1）Data can be read and written continuously

>   20H(R/W)LED_RGB register

    address	value	description

    20H	    0X00	 G[0:7]

    21H	    0X00	 R[0:7]

    22H	    0X00	 B[0:7]

    description:

	（1）Data can be read and written continuously

	（2）RGB888

## Video

<video class="video_size" controls>
    <source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/Product_example_video/HAT/8Servos_hat.mp4" type="video/mp4">
</video>


text:
# Change Log

All notable changes to the "xunitsnippets" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [v1]

- Initial release
- Contains snippets for
  - Test class (`xclass`)
  - Fact test method (`xfact`)
  - Theory test method (`xtheory`)
  - TheoryData as a field (`xdatafield`)
  - TheoryData from a method (`xdatam`)


text:
---
layout: post
title: "Oscar Snubs"
excerpt: "Pop Culture"
categories: popculture
comments: false
share: true
---

![](https://cdn.movieweb.com/img.news.tops/NEtecmAOa9Y6ww_1_b/Wonder-Woman-Snubbed-Oscars-2018-Nominations.jpg)

Well it is that time of year again; Oscar Nominations!!

Oh, I love the Oscars. Not so much for the movies. Not so much for the history. And definitely not for the actual show. I love hearing all the Oscar snubs and the reasons why these people/movies were denied access to that averagely-sized golden statue.

So here is a list of the major Oscar snubs and why they were stiffed:

- Coco for Best Picture:

![](https://lumiere-a.akamaihd.net/v1/images/r_coco_header_mobile_fcfae701.jpeg?region=0%2C0%2C640%2C1020)

An obvious snub. Granted, it was nominated for best animated film, but that simply is not enough. The only explanation is that Hollywood hates Latinos. There is no way this film, although I haven't seen it myself, does not belong on that vaunted list of 9 for Best Picture. The ONLY reason this can be is that Hollywood absolutely hates the Latino culture.

- Wonder Woman for, well, anything

![](https://images-na.ssl-images-amazon.com/images/I/51JwsfzqaJL.jpg)

A travesty!!! How can this piece of modern day art not be nominated for anything? I mean this is nothing like any of the other 1,000 superhero films out there. This one has a woman!! A WOMAN!!! And the flow of the movie, completely original and never been seen before. Wonder Woman is trained at an early age, assimilates into the regular world, fights enemies and defends the peace, and finally battles the big boss man at the end. Never been done before!!! The on;y reasonable explanation for this snub is that Hollywood hates women. Yes, they hate them completely. I believe this is the first movie ever to have a woman in it and gets utterly ignored for best...anything. No other reason.

- Tyler Perry's Boo: A Medea Halloween for any award

![](https://cdn.movieweb.com/img.site/PH5P7QTPyPSQa5_1_l.jpg)

Classic. Understated. And completely novel. Tyler Perry is a voice of a new generation of filmmakers. So how did this new installment of the Medea series fall through the cracks?  Yes, I said it. There is no other way one can explain this snub other than the entire Academy must hate black people en masse. It cannot be because this film was not up to the lofty standards of classic films. No way.

- The Disaster Artist for Best Actor

![](https://resizing.flixster.com/sLV-CVtvbvLV9XnKVaaerjd77Cg=/300x300/v1.bTsxMjUxNDk4ODtqOzE3NjA0OzEyMDA7NDA1MDs2MDAw)

How did the Oscars forget James Franco? I mean he did that whole method acting thing to prepare for this part. How can you ignore that? Well, the on;y explanation I have is that Hollywood hates white men. Absolutely hates them. No ifs, ands, or buts about that.

- Blade Runner 2049 for Best Picture

![](https://mvpo.us/img/P5775.jpg)

How could the Academy leave off this modern day Sci-Fi noir classic? One word: robotophobia. You heard me! Hollywood must have a deep hatred towards robots and robot-like creatures. I cannot think of any other reason.

So....what does Hollywood like? I mean they have to like SOMETHING, right?

Well, here is what they looooove.

- The Shape of Water, 13 Oscar nominations

![](http://michiganjournal.org/wp-content/uploads/2018/01/thenewscasters-com-1.jpg)

Yes, my friend, Hollywood loves mermen. Always have . Note all the times that the Academy granted nominations for all things mermen, mermaid, and the like. There are so many that I don't feel the need to recite them right now.

Anyway, I am tired of Hollywood and their discriminatory nature towards all things Latin, women, men, black, and robots. Until those social justice warriors fix this issue, I will NOT regard anything the Academy says about anything.


text:
# bitmarkd - Main program

[![Made by](https://img.shields.io/badge/Made%20by-Bitmark%20Inc-lightgrey.svg)](https://bitmark.com)
[![GoDoc](https://godoc.org/github.com/bitmark-inc/bitmarkd?status.svg)](https://godoc.org/github.com/bitmark-inc/bitmarkd)
[![Go Report Card](https://goreportcard.com/badge/github.com/bitmark-inc/bitmarkd)](https://goreportcard.com/report/github.com/bitmark-inc/bitmarkd)
[![CircleCI](https://circleci.com/gh/bitmark-inc/bitmarkd.svg?style=svg)](https://circleci.com/gh/bitmark-inc/bitmarkd)

Prerequisites

* Install the go language package for the system
* Configure environment variables for go system
* Install the ZMQ4 and Argon2 libraries

# Operating system specific setup commands

## FreeBSD

~~~~~
pkg install libzmq4 libargon2 git
~~~~~

## MacOSX

(be sure that homebrew is installed correctly)
~~~
brew install argon2
brew install zeromq
brew install git
~~~

## Ubuntu
(tested on version 18.04)

Install following packages

~~~
sudo apt install libargon2-0-dev uuid-dev libzmq3-dev git
~~~

## Debian
(tested on version 9)

First we need to add access to testing package's repository as well as
to our current version, in this case stable.

~~~
root@debian-bitmarkd:/# cat /etc/apt/sources.list.d/stable.list
deb     http://ftp.de.debian.org/debian/    stable main contrib non-free
deb-src http://ftp.de.debian.org/debian/    stable main contrib non-free
deb     http://security.debian.org/         stable/updates  main contrib non-free

root@debian-bitmarkd:/# cat /etc/apt/sources.list.d/testing.list
deb     http://ftp.de.debian.org/debian/    testing main contrib non-free
deb-src http://ftp.de.debian.org/debian/    testing main contrib non-free
deb     http://security.debian.org/         testing/updates  main contrib non-free
~~~

Now install libargon2 using:
```
apt-get -t testing install libargon2-dev libargon2-1
```

For the other packages, install from stable or testing, both versions work:
```
apt install uuid-dev libzmq3-dev
apt install git
```

# Compilation commands for all operating systems

To compile use use the `git` command to clone the repository and the
`go` command to compile all commands.  The process requires that the
Go installation be 1.12 or later as the build process uses Go Modules.

~~~~~
git clone https://github.com/bitmark-inc/bitmarkd
cd bitmarkd
go install -v ./...
~~~~~

# Set up for running a node

Note: ensure that the `${HOME}/go/bin` directory is on the path before
continuing.  The commands below assume that a checked out and compiled
version of the system exists in the `${HOME}/bitmarkd` directory.

## Setup and run bitmarkd

Create the configuration directory, copy sample configuration, edit it
to set up IP addresses, ports and local bitcoin testnet connection.
The sample configuration has some embedded instructions for quick
setup and only a few items near the beginning of the file need to be
set for basic use.

~~~~~
mkdir -p ~/.config/bitmarkd
cp ~/bitmarkd/command/bitmarkd/bitmarkd.conf.sample  ~/.config/bitmarkd/bitmarkd.conf
${EDITOR} ~/.config/bitmarkd/bitmarkd.conf
~~~~~

To see the bitmarkd sub-commands:

~~~~~
bitmarkd --config-file="${HOME}/.config/bitmarkd/bitmarkd.conf" help
~~~~~

Generate key files and certificates.

~~~~~
bitmarkd --config-file="${HOME}/.config/bitmarkd/bitmarkd.conf" gen-peer-identity "${HOME}/.config/bitmarkd/"
bitmarkd --config-file="${HOME}/.config/bitmarkd/bitmarkd.conf" gen-rpc-cert "${HOME}/.config/bitmarkd/"
bitmarkd --config-file="${HOME}/.config/bitmarkd/bitmarkd.conf" gen-proof-identity "${HOME}/.config/bitmarkd/"
~~~~~

Start the program.

~~~~~
bitmarkd --config-file="${HOME}/.config/bitmarkd/bitmarkd.conf" start
~~~~~

## Setup and run recorderd (the mining program)

This is similar to the bitmarkd steps above. For mining on the local
bitmarkd the sample configuration should work without changes.

~~~~~
mkdir -p ~/.config/recorderd
cp ~/bitmarkd/command/recorderd/recorderd.conf.sample  ~/.config/recorderd/recorderd.conf
${EDITOR} ~/.config/recorderd/recorderd.conf
~~~~~

To see the recorderd sub-commands:

~~~~~
recorderd --config-file="${HOME}/.config/recorderd/recorderd.conf" help
~~~~~

Generate key files and certificates.

~~~~~
recorderd --config-file="${HOME}/.config/recorderd/recorderd.conf" generate-identity "${HOME}/.config/recorderd/
~~~~~

Start the program.

~~~~~
recorderd --config-file="${HOME}/.config/recorderd/recorderd.conf" start
~~~~~

## Setup and run bitmark-cli (command line program to send transactions)

Initialise the bitmark-cli for live and test networks creating a new
account on each network.  This setup is presuming that live or test
bitmarkd will be running on the same machine so thatthe loopback
address can be used.

~~~~~
mkdir -p ~/.config/bitmark-cli
bitmark-cli -n bitmark -i mylive setup -c <IP_ADDRESS>:2130  -d 'my first live account' -n
bitmark-cli -n testing -i mytest setup -c <IP_ADDRESS>:12130  -d 'my first testing account' -n
~~~~~

To see the cli sub-commands: or details on a specific command e.g., "setup"

~~~~~
bitmark-cli help
bitmark-cli help setup
~~~~~

Note: If you wish to add more connections or change the default
connection created above then it is necessary to edit the JSON
configuration files to modify the connections list.

# Prebuilt Binary

* FreeBSD

**Install bitmarkd bitmark-cli and recorderd**
~~~~~
pkg install bitmark
~~~~~

**Alternatively select one or more individual packages**
~~~~~
pkg install bitmark-daemon
pkg install bitmark-recorder
pkg install bitmark-cli
~~~~~

* Flatpak

    Please refer to [wiki](https://github.com/bitmark-inc/bitmarkd/wiki/Instruction-for-Flatpak-Prebuilt)

* Docker

    Please refer to [bitmark-node](https://github.com/bitmark-inc/bitmark-node)

# Coding

* setup git hooks

  Link git hooks directory, run command `./scripts/setup-hook.sh` at root of bitmarkd
  directory. Currently it provides checks for two stages:

  1. Before commit (`pre-commit`)

	Runs `go lint` for every modified file. It shows suggestions but not
    necessary to follow.

  2. Before push to remote (`pre-push`)

    Runs `go test` for whole directory. It is mandatory to pass this
    check because generally, new modifications must not break existing
    logic/behaviour.

    Other optional actions are `sonaqube` and `go tool vet`. These two are
    optional to follow since static code analysis just provide some advice.

* all variables are camel case with no underscores
* labels are all lowercase with '_' between words
* imports and one single block
* all break/continue must have label
* avoid break in switch and select

license: ISC

repository: bitmark-inc/bitmarkd

gha_language: Go

gha_license_id: ISC

repo_name: bitmark-inc/bitmarkd


text:
# guetzli-sys

[guetzli-sys] is a mid-level Rust FFI binding to [Google's guetzli library](https://github.com/google/guetzli/), a perceptual JPEG encoder.

## Licensing

The license for this project is MIT.

[guetzli-sys]: https://github.com/lemonrock/guetzli-sys "guetzli-sys GitHub page"

repository: lemonrock/guetzli-sys

repo_name: lemonrock/guetzli-sys


text:
# hexo-filter-sequence

[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/bubkoo/hexo-filter-sequence/blob/master/LICENSE)

[![npm:](https://img.shields.io/npm/v/hexo-filter-sequence.svg?style=flat-square)](https://www.npmjs.com/packages/hexo-filter-sequence)
[![Package Quality](http://npm.packagequality.com/shield/hexo-filter-sequence.svg)](http://packagequality.com/#?package=hexo-filter-sequence)

> Generate UML sequence diagrams for Hexo.

## Install

```
npm install --save hexo-filter-sequence
```

## Usage

This plugin is based on [js-sequence-diagrams](https://github.com/bramp/js-sequence-diagrams), so you can defined the chart as follow:

    ```sequence
    Alice->Bob: Hello Bob, how are you?
    Note right of Bob: Bob thinks
    Bob-->Alice: I am good thanks!
    ```

![snapshot.svg](https://cdn.rawgit.com/bubkoo/hexo-filter-sequence/master/snapshot.svg)

## Config

In your site's `_config.yml`:

```yaml
sequence:
  # webfont:     # optional, the source url of webfontloader.js
  # snap:        # optional, the source url of snap.svg.js
  # underscore:  # optional, the source url of underscore.js
  # sequence:    # optional, the source url of sequence-diagram.js
  # css: # optional, the url for css, such as hand drawn theme
  options:
    theme:
    css_class:
```

Your config will be merged into default config:

```json
{
  "webfont": "https://cdnjs.cloudflare.com/ajax/libs/webfont/1.6.27/webfontloader.js",
  "snap": "https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.4.1/snap.svg-min.js",
  "underscore": "https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js",
  "sequence": "https://cdnjs.cloudflare.com/ajax/libs/js-sequence-diagrams/1.0.6/sequence-diagram-min.js",
  "style": "",
  "options": {
    "theme": "simple",
    "css_class": ""
  }
}
```

## Related

- [hexo-toc](https://github.com/bubkoo/hexo-toc) Insert a markdown TOC before posts be rendered.
- [hexo-filter-fenced-code](https://github.com/bubkoo/hexo-filter-fenced-code) Extend syntax for the native fenced code block.
- [hexo-filter-flowchart](https://github.com/bubkoo/hexo-filter-flowchart) Generate flowchart diagrams for Hexo.
- [hexo-filter-sub](https://github.com/bubkoo/hexo-filter-sub) Generate subscript (`<sub>`) tag for Hexo.
- [hexo-filter-sup](https://github.com/bubkoo/hexo-filter-sup) Generate superscript (`<sup>`) tag for Hexo.
- [hexo-theme-formula](https://github.com/bubkoo/hexo-theme-formula) Hexo theme base on jade and less.

## Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please [create an issue](https://github.com/bubkoo/hexo-filter-sequence/issues/new).