text:
---
title: 'rfasst: An R tool to estimate air pollution impacts on health and agriculture'
tags:
  - R
  - emissions
authors:
  - name: Jon Sampedro
    orcid: 0000-0002-2277-1530
    affiliation: 1
  - name: Zarrar Khan
    orcid: 0000-0002-8147-8553
    affiliation: 1
  - name: Chris R. Vernon
    orcid: 0000-0002-3406-6214
    affiliation: 1
  - name: Steven J. Smith
    orcid: 0000-0003-3248-5607
    affiliation: 1
  - name: Stephanie Waldhoff
    orcid: 0000-0002-8073-0868
    affiliation: 1
  - name: Rita Van Dingenen
    orcid: 0000-0003-2521-4972
    affiliation: 2
affiliations:
 - name: Joint Global Change Research Institute, Pacific Northwest National Laboratory, College Park, MD, USA
   index: 1
 - name: European Commission, Joint Research Centre (JRC), Ispra, Italy
   index: 2
date: 17 April 2021
bibliography: paper.bib
---
# Summary
Existing scientific literature shows that health and agricultural impacts attributable to air pollution are significant and should be considered in the integrated analysis of human and Earth-system interactions.
The implementation of policies that affect the power sector, the composition of the vehicle fleet or the investments and deployment of different energy sources will in turn result in different levels of air pollution.
Even though the various methodologies for estimating the impacts of air pollution, such as exposure-response functions, are extensively applied by the scientific community,
they are normally not included in integrated assessment modeling outputs.

`rfasst` is an R package designed to estimate future human-health and agricultural damages attributable to air pollution using scenario outputs from the Global Change Analysis Model (GCAM), namely emission pathways and agricultural production and prices.
The package combines these with the calculations from the TM5-FASST air quality model to estimate the associated adverse health and agricultural impacts.
The structure of the `rfasst` package is summarized in Figure 1.

![Structure of the `rfasst` package](figure_rfasst.png)

`rfasst` can be accessed via the web at the public domain https://github.com/JGCRI/rfasst. The following code is a simplified example that shows how to run the package. In addition, we provide an R vignette step-by-step tutorial for users to get started with `rfasst` which is accessible here: [Tutorial](https://jgcri.github.io/rfasst/).

```r
install.packages("devtools")
library(devtools)
devtools::install_github("JGCRI/rfasst")
library(rfasst)

db_path<-"path/to/my-gcam-database"
query_path<-"path/to/queries_rfasst.xml"
db_name<-"my-gcam-database"
prj_name<-"my-project.dat"
scen_name<-"name of the GCAM scenario"
queries<-queries_rfasst.xml

# Using the m1_emissions_rescale function as a representative example.
# All the functions are listed in the documentation vignettes.
m1_emissions_rescale(db_path,query_path,db_name,prj_name,
		     scen_name,queries,saveOutput=T, map=T)

```

# Statement of need

According to the World Health Organization's (WHO) [Ambient air quality database](https://www.who.int/data/gho/data/themes/topics/topic-details/GHO/ambient-air-pollution), more than 90% of people breathe unhealthy air at a global level.
Therefore, premature mortality associated with air pollution is one of the biggest threats for human health, accounting for more than 8 million deaths globally per year [@burnett2018global], but heavily concentrated in developing Asia.
Likewise, air pollution leads to a significant decrease of crop yields.
Ozone, which is formed by the reaction of air pollutants with solar radiation, is considered the most hazardous pollutant for crop yields [@emberson2018ozone].
Current high ozone concentration levels entail substantial economic damages and would increase pressures on several measures associated with food security [@van2009global].
The integration of these effects into integrated assessment models, such as GCAM, can provide valuable insights for scenario analysis.

The GCAM model [@calvin2019gcam], developed at the Joint Global Change Research Institute (JGCRI), is an integrated assessment multi-sector model designed to explore human and Earth-system dynamics.
For each scenario representing an alternate future, GCAM reports a full suite of emissions of greenhouse gases and air pollutants, by region and time period through 2100.
GCAM outputs also include regional agricultural production projections for a range of crops, detailed in online [documentation](https://github.com/JGCRI/gcam-doc/blob/gh-pages/aglu.md). However, GCAM does not include the atmospheric
and meteorological information required to translate the greenhouse gas and air pollutant emissions into particulate matter ($PM_{2.5}$) and ozone ($O_{3}$) concentration levels.
This transformation from emissions to concentration is addressed by full chemistry models or by simplified air quality emulators, such as TM5-FASST [@van2018tm5].
These concentration levels are the inputs for the exposure-response functions that are normally used to calculate adverse human-health and agricultural effects associated with exposure to $PM_{2.5}$ and $O_{3}$.

Therefore, the combined use of these models, which is the essence of `rfasst`, is a powerful methodology to estimate a consistent range of health and agricultural damages and the co-benefits associated with different strategies or climate policies, that complements existing models and methods.
Historically, the assessment of air pollution and the subsequent impacts has been developed with global chemical transport models (CTMs) such as GEOS-Chem [@bey2001global] or the The Community Multiscale Air Quality Modeling System (CMAQ; @appel2021community).
These models combine atmospheric, meteorological, and land-use data with anthropogenic emissions, which can be extracted from global emissions inventories, such as  The Emissions Database for Global Atmospheric Research (EDGAR; @crippa2016forty) or The Community Emissions Data System (CEDS; @hoesly2018historical),
or generated by additional tools, namely SMOKE [@smoke] or EmissV [@schuch2018emissv].
While these CTMs provide detailed outputs, they are also computationally expensive, so they have limited application for either rapid assessment or evaluation of multiple scenarios.
A number of air quality tools and emulators, such as TM5-FASST [@van2018tm5], BenMap [@sacks2018environmental], SHERPA [@clappier2015new] or AirQ+ [@world2018airq],
have been developed to allow faster estimation of air pollution levels and associated impacts for global or regional changes in emission levels.
`rfasst` contributes to this set of tools by making the already widely used TM5-FASST tool available as an easily accessible `R` package that can be readily used for air pollution and impact assessment of alternative “what-if” global scenarios.

Prior to the development of this package, we have used GCAM and TM5-FASST to analyze these co-benefits in different studies. We showed that health co-benefits attributable to air pollution are larger than mitigation costs
for different technological scenarios consistent with the 2°C target of the Paris Agreement [@sampedro_2020a].
Previously, we demonstrated that these health co-benefits outweigh mitigation costs in multiple decarbonization scenarios based on different emissions abatement efforts across regions [@markandya2018health].
In addition, we have applied this methodology to show how high $O_{3}$ levels generate substantial crop losses and, subsequently, negative economic impacts in the agricultural sector [@sampedro_2020b].
Taking all these results into consideration, we understand that a tool that systematically addresses air pollution driven human-health and agricultural damages within an integrated assessment modeling framework,
is a significant contribution to this community, and of interest for a range of stakeholders, particularly for the designers of alternative transition strategies.

# Functionality
The package includes several functions that have been classified in four different modules.
Note that all the functions are listed in the [Tutorial](https://jgcri.github.io/rfasst/), which includes individual documentation pages for each of these modules.

+ Module 1: Static downscaling of GCAM emissions to country-level and re-aggregation into a new regional distribution (consistent with TM5-FASST), and some additional pollutant-related adjustments (e.g., organic carbon to organic matter).
+ Module 2: Calculation of regional fine particulate matter ($PM_{2.5}$) and ozone ($O_{3}$) concentration levels using different indicators.
+ Module 3: Estimation of health impacts attributable to $PM_{2.5}$ and $O_{3}$ exposure. The package reports both physical damages, such as premature mortality, years of life lost (YLLs), and disability adjusted life years (DALYs),
and the associated monetized damages based on the Value of Statistical Life (VSL).
+ Module 4: Estimation of agricultural damages attributable to $O_{3}$ exposure, including relative yield losses (RYLs) and losses in agricultural production and revenue ($Revenue=Prod \cdot Price$).

The package also includes additional input information, namely constant values and mapping files, that need to be read in for running the different functions and can be modifiable by the user.
The [Tutorial](https://jgcri.github.io/rfasst/) explains which values can be changed within each module. These include the time horizon (from 2010 to 2100 in 10-year periods, +2005),
the crop categories to be included in the analysis (see @kyle2011gcam for a detailed mapping of GCAM crop categories), the coefficients or counterfactual values for the exposure-response functions (both for health and agricultural damages),
the base Value of Statistical Life (VSL) or Value of Statistical Life Year (VSLY), and additional ancillary information.

The outputs generated by the package consist of both comma-separated values (CSV) files and maps (as Portable Network Graphic files) that can be controlled by the user. If the parameter `saveOutput` is set to `TRUE`, the function writes a CSV file with the selected outcome in the corresponding sub-directory.
In addition, if `map` is set to `TRUE`, the function generates a suite of maps and animations for the corresponding output. We note that these maps are generated using the [rmap](https://github.com/JGCRI/rmap) package, documented in the following [website](https://jgcri.github.io/rmap).
As an example, the following Figure 2 shows the average $PM_{2.5}$ concentration levels per region, for a GCAM-v5.3 reference scenario.

![$PM_{2.5}$ concentration per country and period in a reference scenario (ug/m3)](figure_conc.png){ height=200% }

Finally, the package is continually being developed to address science objectives and some additional features are scheduled for future releases. For example, an alternative dynamic GDP-based downscaling technique
for re-scaling GCAM emissions in Module 1 (as developed in @gidden2019global), additional age-specific functions for the health impact assessment, as well as a more flexible structure, to allow users to be able to read in emission pathways from different models.

# Acknowledgements
The research described in this paper was conducted under the Laboratory Directed Research and Development Program at Pacific Northwest National Laboratory, a multiprogram national laboratory operated by Battelle for the U.S. Department of Energy.
The views and opinions expressed in this paper are those of the authors alone.

# References

repository: JGCRI/rfasst

gha_language: R

repo_name: JGCRI/rfasst


text:
This is an example of using React with
[Bacon.React.HTML](https://github.com/polytypic/bacon.react.html) and
[Bacon.Atom](https://github.com/polytypic/bacon.atom) to implement a reactive
model and UI.

For some time now, we have actually been using this approach, namely

* storing state in mutable observable model objects,
* potentially using lenses to access such state,
* specifying all kinds of state dependent computations as Bacon streams and
  properties, and
* embedding such streams and properties directly into React Virtual DOM

in production.  It just works.

To test locally

```bash
git clone https://github.com/polytypic/atomi-todomvc.git
cd atomi-todomvc
npm install
npm run build
```

and then point browser to `atomi-todomvc/public/index.html`.

license: MIT

repository: wolverian/atomi-todomvc

branch_name: refs/heads/master

extension: md

gha_language: CSS

gha_license_id: MIT

license_type: permissive

repo_name: wolverian/atomi-todomvc


text:
# Deployment

## Configuration

You should copy `./public/data/config.template.json` to `./public/data/config.local.json` and modify it with your own settings.

```js
{
    "apiEndpoint": "ENDPOINT",                      /* The url of the api endpoint e.g. https://api.my-domain.com */
    "nodesMainnet": [                               /* List of mainnet nodes to load balance across */
        {
            "provider": "MYNODE",                   /* A node to perform Tangle operations */
            "depth": 3,                             /* Depth to use for attaches */
            "mwm": 9                                /* MWM to use for attaches */
        }
    ],
    "nodesDevnet": [                                /* List of devnet nodes to load balance across */
        {
            "provider": "MYNODE",                   /* A node to perform Tangle operations */
            "depth": 3,                             /* Depth to use for attaches */
            "mwm": 9                                /* MWM to use for attaches */
        }
    ],
    "googleMapsKey": "GOOGLE-MAPS-KEY",             /* Key for using with Google maps API */
    "googleAnalyticsId": "GOOGLE-ANALYTICS-ID"      /* Optional, google analytics id */
}
```

## Build

```shell
npm run build
```

## Deploy

The app is configured to use zeit/now for hosting, you can configure `./now.json` to suit your own setup.

If you want to use a different name for the config file you can specify an environment variable of CONFIG_ID, e.g. set CONFIG_ID to `dev` will load `config.dev.json` instead.

After modifying the configuration files you can deploy using the folllowing commands:

```shell
now
```


text:
---
layout: post
title: Falcon. Creating simple and fast API
categories: [python]
excerpt: ""
---

_Originally published on medium_

![Photo by [Guillaume
Jaillet](https://unsplash.com/photos/Nl-GCtizDHg?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
on [Unsplash](https://unsplash.com/search/photos/fast?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)](https://cdn-images-1.medium.com/max/2560/1*MattM04QSySowzXrPSO1dQ.jpeg)

Back to my studies, this week I decided to get away from the good the
well-defined world of the Python framework called Django and try some
different tools. This week I found
[Falcon](https://falconframework.org/).

Falcon, it's a bare-metal Python web API framework for building very
fast app backends and microservices with a particular emphasis on low
latency. The goal of the maintainers was to build something fast, close
connected with the network layer with a non-opinionated approach
resulting in a flexible codebase that could be used to build upon and
reuse over and over. Like a framework for frameworks.

> Why is this a thing?
> \- You

Well, I've been working with big frameworks for a while to have an
answer for that.

Big frameworks are great! They give you a starting point, a base
implementation to build your project upon. A lot of frameworks have a
very opinionated way of approaching things, which is both good and bad.
Of course, it depends on either your own personal opinions or the
problem you're trying to solve, but in this case, let's assume that
things start to get messy when you want to do something that's slightly
different from what the framework proposes. Usually what you will have
to do is to override a bunch of methods and implement this new, but very
similar behavior, on the places defined by the framework. Most of the
times, this is ok, but let's assume it's not. This time you had to
re-write a bunch of methods, that had nothing to do with your original
modification only because that's the way that the framework process
things.

Cases like this, are cases when you want to use simple and
non-opinionated tools. Let's get to code.

I want to build an API that exposes movie information. Typically I start
thinking about the resource, in this specific case: Movie. Falcon
borrows this concept from REST architectural style, resources are simply
all the things on the API that can be accessed by a URL. A resource on
falcon is represented by a simple python class that uses duck-typing, so
you don't need to inherit from any sort of special base class. In
practice, these classes act as controllers in your application. They
convert an incoming request into one or more internal actions and then
compose a response back to the client based on the results of those
actions.

The Movie resource above defines a single method,
`on_get()`. For any HTTP method you want
your resource to support, simply add an `on_*()`{.markup--code
.markup--p-code} method to the class, where `*`{.markup--code
.markup--p-code} is any one of the standard HTTP methods, lowercased
(e.g., `on_get()`,
`on_put()`,`on_head()`, etc.). These well-known methods are called
"responders". Each responder takes (at least) two params, one
representing the HTTP request, and one representing the HTTP response to
that request. By convention, these are called `req` and `resp`,
respectively. Now, open `app.py`:

This code creates a WSGI application and aliases it as
`api`. To run the API, make sure all the
files are in a *project_name* folder and:

```bash
$ pip install gunicorn
$ gunicorn --reload project_name.app
```

Now, when a request comes in for `/movies`, Falcon will call the responder on the images resource
that corresponds to the requested HTTP method.

![](https://cdn-images-1.medium.com/max/800/1*ZnGNdbIiyr9e-l0gCqQaxw.png)

The simplicity of this library it's the main advantage, with two files we have a fully functional API.

gha_language: SCSS


text:
# Priority
- the IR module doesn't work when using anything else
	- investigate IR libraries that use interrupts
	- it actually sometimes works .. needs further investigation
- implement various checks for input commands
- implement using analog pins as digital
- think about implementing
	- shift registers
	- RGB LED stuff
- revise and document TEMP error states

# In the future
- US - do attachInterrupt nicely
	- multiple sensors
	- use the ultracool library?
- multiple Dallas sensors
- diagnostics
- pin (+device) deregister (or register as sthing else)
- module for like a speaker / buzzer?
- investigate whether the String class causes any problems
	- with memory fragmentation / usage
	- does the .reserve() serve its purpose? do the boundaries cover all (or at least most) uses?
- put `byte response_msg = 0;` where it belongs when it actually works

repository: renekliment/saltlamp-arduino

repo_name: renekliment/saltlamp-arduino


text:
# pubsub-emulator-alpine

[![Docker Pulls](https://img.shields.io/docker/pulls/frankie567/pubsub-emulator.svg)](https://hub.docker.com/r/frankie567/pubsub-emulator/)

Docker image that starts a Google Pub/Sub emulator (port `8085` by default). Just do:

```
docker run --rm -d frankie567/pubsub-emulator:alpine
```

Check the [official documentation](https://cloud.google.com/pubsub/docs/emulator) for more information about the Pub/Sub emulator.


text:
# safe-data-structure/stack

A perfectly encapsulated implementation of `Stack`.

## Contribution

Use `pnpm` instead of `npm` or `yarn` to install all dependencies. If you haven't installed `pnpm` yet, install it with `npm`.

```shell
npm install pnpm -g
```

gha_language: TypeScript


text:
RSS Reader
=====================

### Usage

```
npm install
npm start
open http://localhost:3000
```

### Linting

```
npm run lint
```

### Building

A basic production script is included that builds your app to a `dist` folder

```
npm run build
```

repository: rdalmas/react-rss-reader

gha_language: JavaScript

repo_name: rdalmas/react-rss-reader


text:
# Testing

We use a number of different testing strategies.

1. [Unit testing](#unit-tests)
1. [K8S Integration Tests](#k8s-integration-tests)

There are a number of different testing strategies

## Unit Tests

Basic unit/functional testing.  External dependencies are mocked

To honor cached tests, simply run:

```
make test
```

To force test everything available, run

```
make test-nocache
```

## K8S Integration Tests

These test our integration with Kubernetes.  They use small, ephemeral Kubernetes
clusters set up from [kind](https://kind.sigs.k8s.io/).

### Set up cluster

```sh
kind create cluster
./script/setup-kind.sh
```

### Run tests

```go
make test-k8s-integration
```

### Snippets

If things are ever behaving strangly, you can remove everything installed by akash
with:

```sh
kubectl delete ns -l akash.network
```

or, as a last resort, delete and re-create the cluster:

```sh
kind delete cluster
kind create cluster
./script/setup-kind.sh
```


text:
# Neighborhood App

#### A web application that allows you to be in the loop about everything happening in your neighborhood.

#### By **Maryann Gitonga**

## Description
A web application that allows you to be in the loop about everything happening in your neighborhood.

## Behavior Driven Development
* The program should navigate to the login page on load:

     **Input Example**: On page load

     **Output Example**: Navigate to the login page

* The program should navigate to sign up page when Sign Up is clicked on the login form:

     **Input Example**: Click on **Sign Up** on the login form

     **Output Example**: Redirected to the sign up page

* The program should navigate to the login page when Logout is clicked on the navigation bar:

     **Input Example**: Click on **Logout** on the navigation bar

     **Output Example**: Redirected to the login page

* The program should direct the user to their neighborhood page when logged in and already has a neighborhood:

    **Input Example**: Log in

    **Output Example**: Redirected to their neighborhood page

* The program should direct the user to the index page with neighborhood listings when logged in and has no neighborhood:

    **Input Example**: Log in

    **Output Example**: Redirect the user to the index page with neighborhood listings

* The program should navigate to the profile page when the My Profile is clicked on the navigation bar:

    **Input Example**: Click on **My Profile** on the navigation bar

    **Output Example**: Redirected to the profile page

* The program should navigate to the admin dashboard when one logs in as an admin:

    **Input Example**: Login in as Admin

    **Output Example**: Navigate to the admin dashboard

## Setup/Installation Requirements
To start using this project use the following commands:

* `git clone https://github.com/MaryannGitonga/Neighborhood-App.git`
* `cd neighborhood-app`
* `atom .`
* `code . `(this is if Visual Studio Code is your preferred text editor)

To run this program
* run this command lines in your terminal:
* `python manage.py runserver`
* access the application on this localhost address `http://<IP_ADDRESS>:8000`

## Prerequisites
You need the following to work on the project:

`-Python version 3.6`

`-Django 2.0`

`-Pip`

`-virtualenv`

`-A text  Editor`
## Link to Live Website

## Technologies Used
* Django
* HTML/CSS
* Bootstrap

## License
MIT License

Copyright (c) 2018 Maryann Gitonga

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

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

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

repository: GeGe-K/Neighborhood-App

repo_name: GeGe-K/Neighborhood-App


text:
### Story 1: Register
**As a user I want to register myself to have access to You-coach.**

- Register screen (register.title)
    - First Name (register.label.first-name)
    - Last Name (register.label.last-name)
    - Email (used to sign in) (register.label.email)
    - Password  (register.label.email)
    - Password  (register.label.email)

    - Validation
        - email is a valid email format (register.message.email-wrong-format)
            - internal format validation, no external webservice
        - email is not yet used within the system (register.message.email-in-use)
        - password validation (register.message.password-policy, register.message.password-match)

- in scope
    - Creation of the homepage
    - Creation of the register screen
    - redirect to empty profile page upon success

- Open Questions
    - Password policy?
            - min 8 characters
            - min one number
            - min one capital

- mockups
    - ![Homepage](../img/homepage.png)

    - ![Register](../img/register.png)


text:
# TaskManagement ![CI status](https://img.shields.io/badge/build-passing-brightgreen.svg)

TaskManagement is a project which stores added task in Firebase. This is developed in angular 6.

## Platforms Supported
* For all projects, it will be MacOS, Windows, and Linux
## Version
* 1.0.9

## Code style
Standard [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

##

### Requirements
* Windows/Linux
* Node 10.7.0 and up
`$ node -v`

* npm 6.2.0 and up
`$ npm -v`

## Installation

```
//Download Github repo
$ git clone https://github.com/Sendhil-Vel/TaskManagement
$ npm install (execute this once you are inside the folder)

//Run Website
$ ng serve --open

```

## Development
```
$ ng serve --open
```

## Sample URL
* site will run locally at port 4200 by default

http://localhost:4200

## Features
* We are storing information in firebase
* Project is developed in Angular 6
* Dashboard is the default page, appears as soon website is loaded. : http://localhost:4200/dashboard
* Add Task allows you to add new Tasks. : http://localhost:4200/add-task
    1) You can add task name, task description, task date and task time.
    2) Necessary Validation added using ReactiveForms.
* List Task will list all the existing task in Firebase. : http://localhost:4200/list-task
* Current Location will show your location in google map. You have to allow location infotmation when the page loads. : http://localhost:4200/location
* Demo push notification will send a push notification which will appear in the browser.

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

Please make sure to update tests as appropriate.

## Contact
* Mobile : 91-9924092297
* Mail : [myemail.msamvel<EMAIL_ADDRESS>## License
[MIT] © [Sendhil Vel](Mail:myemail.msamvel@gmail.com)

repository: Sendhil-Vel/TaskManagement

repo_name: Sendhil-Vel/TaskManagement


text:
# Backend code for map application

## run

```
SET DEBUG=mapmarker-backend:* & npm start
```

## library

1. express-js
2. [dotenv](https://github.com/motdotla/dotenv) to read the environment file
3. [Jest](https://github.com/facebook/jest) and [SuperTest](https://github.com/visionmedia/supertest) for unit testing


text:
@depreciate -> on the chopping block, did not include in the docs and I'm just keeping this around for posible latter thoughts during the rewrite

__Description__: As outlined in `animation/general/timeline-literal` the user should be able to use `literal`'s or `string`'s

__Notes__

+ As noted in `animation/general/timeline-literal` you can potentially shoot yourself in the foot using this notation if you're not careful. That being said I recommend you spend the extra time to define the `animation-name` within the individual `timeline` via the `name` key/val rather than using this timeline `literal` notation. You can take a look at the test to see what I’m recommending if you're confused

repository: ctr-lang/ctr

repo_name: ctr-lang/ctr


text:
# Kitchen Sink for titanium-backbone

I won't lie to you. There's not much to see yet. This is still VERY
early.

If you run this app from within [titanium-backbone](https://github.com/trabian/titanium-backbone), though, you'll currently see this:

![Sample App](https://raw.github.com/wiki/trabian/titanium-backbone-ks/github_app_screenshot.jpg)

Not bad considering how little code is required to create it!

### Installation

#### Install Titanium SDK

Visit the [Titanium download page](http://www.appcelerator.com/products/download/) and follow the instructions from there to download Titanium Studio (and the Titanium SDK), or clone the GitHub repository at [https://github.com/appcelerator/titanium_mobile](https://github.com/appcelerator/titanium_mobile).

#### Clone the project to your development machine:

```console
$ git clone https://github.com/trabian/titanium-backbone-ks.git
$ cd titanium-backbone-ks
```

#### Install package dependencies

```console
$ npm install
```

#### (Optional) Install titanium-backbone as a submodule

If you would like to make changes to titanium-backbone-ks and titanium-backbone, run the following:

```console
$ npm run-script develop
```

This will pull the latest titanium-backbone code as a submodule and create a link to this submodule within node_modules.

#### Run the app

```console
$ cake t:iphone:run
```

repository: trabian/titanium-backbone-ks

repo_name: trabian/titanium-backbone-ks


text:
# 7.3 Using the AuthorizeView component

[( Pt-BR )](/docs/7.3-Using-the-AuthorizeView-component-ptBR.md)

Now we are going to use the [AuthorizeView](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.authorization.authorizeview?view=aspnetcore-5.0) component to display and hide information based in the user's authentication state. Through it, we will define in the application what a user can or cannot access, depending on their authentication status. [AuthorizeView](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.authorization.authorizeview?view=aspnetcore-5.0) is a Blazor component that allows you to show the content of components children based on the user's authentication status. We can use this component like this:

```razor
<AuthorizeView>
    <Authorized>
        @* in this tag we define what the user can see when he is authenticated *@
        <a href="Identity/Account/Manage">Hello, @context.User.Identity.Name!</a>
        <a href="Identity/Account/LogOut">Logout</a>
    </Authorized>

    <NotAuthorized>
        @* in this tag we define what the user can see when he is NOT authenticated *@
        <a href="Identity/Account/Register">Register</a>
        <a href="Identity/Account/Login">Login</a>
    </NotAuthorized>

</AuthorizeView>
```

 We will then wrap the content of our _Category_ component in the file [Index.razor](../Catalogo_Blazor/Client/Pages/Categorias/Index.razor) with the tag _<AuthorizeView>_ followed by the <Authorized> tag. In addition, we will also define a message for the _<NotAuthorized>_ tag as:

```razor
<h1>Unauthenticated user!</h1>
```

When saving and running the project, you will receive the message above. This is because we have defined an anonymous user at our provider. So now let's change this behavior and define an authentication type. Opening our [DemoAuthStateProvider.cs](../Catalogo_Blazor/Client/Auth/DemoAuthStateProvider.cs) file and placing the cursor on our user's type (as in the image below) we can see that it accepts a parameter of type _string_ which will represent the type of authentication ([authenticationType](https://docs.microsoft.com/en-us/dotnet/api/system.security.principal.iidentity.authenticationtype?view=net-5.0#System_Security_Principal_IIdentity_AuthenticationType))

![image.png](img/7.3a.png)

Then assigning any value to this parameter, we should now be able to access the restricted content because we will become an authenticated user. We can even create a generic declaration with some values:

_Auth\DemoAuthStateProvider.cs_
```c#
var user = new ClaimsIdentity (new List<Claim>() {
   new Claim("key", "value"),
   new Claim (ClaimTypes.Name, "Dionison")},
   "demo");
```

We can now access the properties of our [Claim](https://docs.microsoft.com/en-us/dotnet/api/system.identitymodel.claims.claim?view=netframework-4.8) objects to personalize the user experience . To test this more easily, let's mount our [AuthorizeView](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.authorization.authorizeview?view=aspnetcore-5.0) component in the file [index.razor](../Catalogo_Blazor/Client/Pages/Index.razor) from the root of our pages:

_\index.razor_
```razor
@page "/"

<h1>Product catalog</h1>

<AuthorizeView>
   <Authorized>
      @* in this tag we define what the user can see when he is authenticated *@
      <a href="Identity/Account/Manage">Hello, @context.User.Identity.Name!</a>
      <a href="Identity/Account/LogOut">Logout</a>
   </Authorized>

   <NotAuthorized>
      @* in this tag we define what the user can see when he is NOT authenticated *@
      <h1>Unauthenticated user!</h1>
   </NotAuthorized>

</AuthorizeView>
```

And the result should be:

![image.png](img/7.3b.png)

We can further filter this access, for example by defining whether the current user has administrator access, thus being able to have personalized access. For this to work, can we involve the component that only the administrator will have access to with our [AuthorizeView](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.authorization.authorizeview?view=aspnetcore-5.0) component by adding the _Role_ attribute. Let's do this on the _"Create Product"_ button of our [Products](../Catalogo_Blazor/Client/Pages/Produtos/Index.razor) component. It will look like this:

_Produtos\index.razor_
```razor
<AuthorizeView Roles="Admin">
   <Authorized>
      <div>
         <a class="btn btn-success" href="produtos/create">Create Product</a>
      </div>
   </Authorized>

   <NotAuthorized>
      <h1>Only Admin user can add a product</h1>
   </NotAuthorized>

</AuthorizeView>
```

With this modification, even after being authenticated, we will not be able to include a new product.

We will be able, if we add this [Claim](https://docs.microsoft.com/en-us/dotnet/api/system.identitymodel.claims.claim?view=netframework-4.8) to our identity:

_Auth\DemoAuthStateProvider.cs_
```c#
var user = new ClaimsIdentity(new List<Claim>() {
   new Claim("key", "value"),
   new Claim (ClaimTypes.Name, "Dionison"),
   new Claim (ClaimTypes.Role, "Admin")
   },
   "demo");
```

In this case, we can also use the user property [IsInRole](https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.applicationservices.user.isinrole?view=net-5.0) checking the user's role and thus improving their experience. Let's add this check in our [Index](../Catalogo_Blazor/Client/Pages/Index.razor) root:

_\index.razor_
```razor
<Authorized>
   @* in this tag we define what the user can see when he is authenticated *@
   <a href="Identity/Account/Manage">Hello, @context.User.Identity.Name!</a>
   <a href="Identify/Account/LogOut">Logout</a>

<br/>
@if (@context.User.IsInRole ("Admin"))
{
   <text>Admin User</text>
}

</Authorized>
```

We will also give the Admin user a page of his own. For that, we will include a new menu in our [NavMenu.razor](../Catalogo_Blazor/Client/Shared/NavMenu.razor) component that we will call Backup, and we will also link this menu with our component [AuthorizeView](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.authorization.authorizeview?view=aspnetcore-5.0)

_Shared\NavMenu.razor_
```razor
<AuthorizeView Roles="Admin">

<Authorized>
   <li class="nav-item px-3">
      <NavLink class="nav-link" href="backup">
         <span class = "hi hi-plus" aria-hidden = "true"></span>Backup
      </NavLink>
   </li>
</Authorized>

</AuthorizeView>
```

And let's add this Backup component to our Page folder with some content as a test:

_\Backup.razor_
```razor
@page "/backup"

<h1>Perform Backup...</h1>

@code {
}
```

When running the application you should now be able to see the new menu and page Backup. To test the look without Admin privileges, comment out the line:

_Auth\DemoAuthStateProvider.cs_
```c#
//new Claim (ClaimTypes.Role, "Admin")
```

Note however that we can still access the _Backup_ page by adding "/backup" to our url. We'll have to fix this ...

[7.4 Using the Authorize attribute >>>](/docs/7.4-Using-the-Authorize-attribute.md)

repository: Krekinha/blazor-catalog

repo_name: Krekinha/blazor-catalog


text:
KinderChat
===========

<img align="right" src="Shot.png" width="250">

KinderChat is an application that we presented at Microsoft Build 2015 in April of 2015.

The goal of this application is to provide a secure chat application for children, where
all the communications between children are encrypted and yet, parents have a golden key
to monitor the communications of their children.

This application is born out two simple principles - first, that if a child
has nothing to hide, he has nothing to fear; and second that a parent must
trust but verify.

By allowing parents to monitor the conversation of their children with third parties, we can
ensure their safety and a more harmonious future for everyone.

Presentation
------------

We introduced Kinder Chat at Build 2015, you can watch the video and download the
slides for this project here:

https://channel9.msdn.com/Events/Build/2015/3-770

You can fast-forward to 8:50 to watch the introduction of Kinder Chat.

[Slides](http://video.ch9.ms/sessions/build/2015/3-770.pptx) or [View online](http://view.officeapps.live.com/op/view.aspx?src=http%3a%2f%2fvideo.ch9.ms%2fsessions%2fbuild%2f2015%2f3-770.pptx)

User Experience
---------------

The individual clients are written using native code for Android, iOS and Windows.  They should
provide a good blueprint for how to build native user experiences while sharing code across
all three platforms.

Cryptography and Onboarding Experience
--------------------------------------

At the core of Kinder Chat lives a secure cryptographic system.  It is as secure as we could
design it. Still, it could probably be improved by security and cryptographic experts.  We welcome your
input.

We have tried to solve the problem of onboarding users while providing a secure communication
system.

Each time you run an instance of Kinder Chat, a new private/public key pair is generated.  The
private key never leaves your device.  It is never posted to the web and is never recorded on the
Kinder Chat servers. Instead, the public key is sent to the servers, and users are then able
to merge one or more endpoints into a single identity.

For example, the identity "Miguel de Icaza" associated with the phone<PHONE_NUMBER> and the
email address<EMAIL_ADDRESS>would have many public keys associated with it, one
for each device that completes the verification process.

Consider this scenario: Jose and Maria are the parents of Jesus, and Magdalena is a close
friends of his.

When Magdalena wants to send a message to Jesus, her Kinder Chat application will retrieve
from the server all the keys that are associated with Jesus.  That will for example include
the Jesus' iPhone key, and the Jesus' Android key, and also the keys for the Jesus' parents,
Maria and Jose.

So if Maria sends the message "Sup yo", KinderChat encrypts that message using four
different keys, one for each recipient (two of them are Jesus' different devices, and
one for each parent in this case).  Then the messages are posted to the server and stored
in the respective buckets.  Then the client KinderChat apps for Jesus, Maria and Jose
will retrieve those copies and decrypt the results on each device.

This has some important side effects: if you change devices, or delete and reinstall the
application on a device, new keys will be generated.  This means that you could never
decipher any previous messages stored.   Your device becomes your key.

Kinder Points
-------------

To ensure that kids use the application for all their communication, a system of points was
introduced. Points are earned for using the application, eating their veggies, or completing chores.

In-App purchases [*] allow children to purchase Kinder Points from their allowance.  This
empowers children to increase their Kinder Point scores on weeks where they have not
performed their chores, ate their veggies or used the application enough.  This teaches
kids a valuable civics lesson: everything is for sale for the right price.

[*] This feature is not yet available in this public release.

Platforms
---------

The code contains clients for Android, iOS and Windows 10.  It contains a watchOS app for
parents to grant points.

The Matriarch app is a Windows desktop application dashboard that centralizes the management
and statistics for the activities performed by their offspring.

Backend
-------

We are hoping that no child will be left behind; that is, we want every kid in the world to
use this safe and secure system, so we have designed the backend to scale.

The backend is built on top of Azure, and uses several Azure services to scale up.  It uses
the ServiceBus to connect the frontends to the backing stores.

This diagram shows the high-level architecture:

![KinderChat Backend](KinderChatWorkerRole/KinderChat.WorkerRole.SocketServer/diagram.png)

Status
------

We build this code for about a month before the Build conference took place, and had not
really had the time to work on this since then.  While we like the user experience that
we got up to the time of the release, the design language and idioms have evolved from
April.  If we had time, we would likely refresh some elements.

There is also a lot of room for improvement on the backend and how to scale it, but we have not
really touched the code since the conference.

This project was originally conceived under a different name and a different target audience.  Our delay
to release the code was due to project cleanup.  We may release the original project at a future date.

repository: richardboegli/KinderChat

repo_name: richardboegli/KinderChat


text:
# devops-workshops
Workshops around the devops methodology

## Workshop01 : Terraform

### Terraform installation
* Get it here : https://www.terraform.io/downloads.html
* Copy it with the other executables.
* `terraform -version`

### Commands
```
cd ./Workshop01-Terraform
aws configure --profile sandbox-admin
# be sure to be connected to the AWS accout you want

ssh-keygen
# put the key you want to associate in ~/.ssh

export AWS_PROFILE=sandbox-admin

terraform init
terraform plan -var-file=env.tfvars
terraform apply -var-file=env.tfvars
terraform destroy -var-file=env.tfvars
```

## Workshop02 : Ansible-Terraform

### Commands
```
cd ./Workshop02-Ansible-Terraform
ansible-playbook plays/build.yml -e layer_name=main

ansible -m ping all
# should return :
# nodejs-server-0 | SUCCESS => {
#     "changed": false,
#     "ping": "pong"
# }

ssh -F env-ssh.cfg admin@nodejs-server-0
# should access to the server

ansible-playbook plays/apply_basics.yml
ansible-playbook plays/apply_nodejs.yml
ansible-playbook plays/apply_nodejs_servers.yml

ansible-playbook plays/destroy.yml -e layer_name=main
```

## Workshop03 : Bastion

### Commands
```
cd ./Workshop03-Bastion
ansible-playbook plays/build.yml -e layer_name=main

ssh -F env-ssh.cfg admin@nodejs-server-0
# should access to the server

ansible-playbook plays/destroy.yml -e layer_name=main
```

## Workshop04 : ElasticSearch

### Commands
```
cd ./Workshop04-ElasticSearch
ansible-playbook plays/build.yml -e layer_name=main
ansible-playbook plays/apply_es.yml

ssh -F env-ssh.cfg admin@es-master-0
curl -s http://<IP_ADDRESS>:9200/_cluster/health | python -mjson.tool
# {
#     "active_primary_shards": 0,
#     "active_shards": 0,
#     "active_shards_percent_as_number": 100.0,
#     "cluster_name": "sandbox",
#     "delayed_unassigned_shards": 0,
#     "initializing_shards": 0,
#     "number_of_data_nodes": 2,
#     "number_of_in_flight_fetch": 0,
#     "number_of_nodes": 3,
#     "number_of_pending_tasks": 0,
#     "relocating_shards": 0,
#     "status": "green",
#     "task_max_waiting_in_queue_millis": 0,
#     "timed_out": false,
#     "unassigned_shards": 0
# }

ansible-playbook plays/destroy.yml -e layer_name=main
```

## Workshop05 : Consul

### Commands
```
cd ./Workshop05-Consul
ansible-playbook plays/build.yml -e layer_name=main
ansible-playbook plays/apply_consul.yml

consul members
# Node             Address            Status  Type    Build  Protocol  DC
# consul-client-0  <IP_ADDRESS>:8301   alive   client  0.9.2  2         dc1
# consul-master-0  <IP_ADDRESS>:8301  alive   server  0.9.2  2         dc1

ansible-playbook plays/destroy.yml -e layer_name=main
```

## Workshop06 : Prometheus

### Commands
```
cd ./Workshop06-Prometheus
ansible-playbook plays/build.yml -e layer_name=main

ansible-playbook plays/apply_basics.yml
ansible-playbook plays/apply_consul.yml
consul members
# Node             Address            Status  Type    Build  Protocol  DC
# consul-master-0  <IP_ADDRESS>:8301  alive   server  0.9.2  2         dc1
# monitor-0        <IP_ADDRESS>:8301   alive   client  0.9.2  2         dc1
# nodejs-server-0  <IP_ADDRESS>:8301  alive   client  0.9.2  2         dc1

ansible-playbook plays/apply_nodejs.yml
ansible-playbook plays/apply_nodejs_servers.yml
ssh -F env-ssh.cfg admin@nodejs-server-0
pm2 ls

ansible-playbook plays/apply_monitor_exporters.yml
ansible-playbook plays/apply_monitor.yml
ssh -F env-ssh.cfg admin@monitor-0 -L 3000:localhost:3000 -L 9090:localhost:9090
# import this dashboard : https://grafana.com/dashboards/1860

ansible-playbook plays/destroy.yml -e layer_name=main
```

## Workshop07 : Docker

### Instructions
* Install Docker [following the procedure for your machine](https://grafana.com/dashboards/1860)
* At the end, you can add the Nomad orchestrator [following this tutorial](https://github.com/jdxlabs/hello-nomad)
* You have cheatsheets available for [Docker](https://jdxlabs.com/notes/docker) and for [Nomad](https://jdxlabs.com/notes/nomad)

### Commands
```
cd ./Workshop07-Docker

# to build the docker image
docker build -t hello-docker -f node-app/Dockerfile node-app/.

# to run your container locally
docker run -d -p 8080:8080 --name hello-docker hello-docker

# to see informations about the container
docker ps -a
docker stats

# to have a shell access for your container
docker exec -it hello-docker sh

# to stop the container and remove the image
docker stop -t0 hello-docker
docker rm hello-docker
```

## Workshop08 : Nomad

```
cd ./Workshop08-Nomad

aws ecr create-repository --repository-name bootstrap-nomad-<your-initials>
aws ecr describe-repositories

docker build -t bootstrap-nomad -f node-app/Dockerfile node-app/.
$(aws ecr get-login --no-include-email --region us-east-1)
docker tag bootstrap-nomad <account-id>.dkr.ecr.us-east-1.amazonaws.com/bootstrap-nomad-<your-initials>:latest
docker push <account-id>.dkr.ecr.us-east-1.amazonaws.com/bootstrap-nomad-<your-initials>:latest

ansible-playbook plays/build.yml -e layer_name=main
ansible-playbook plays/apply_consul.yml
ansible-playbook plays/apply_nomad_masters.yml
ansible-playbook plays/apply_nomad_workers.yml
ansible-playbook plays/nomad_push_job.yml

ssh -F env-ssh.cfg admin@nomad-master-0
consul members
nomad server-members
nomad node-status
nomad run nomad/jobs/bootstrap-nomad.hcl
nomad status bootstrap-nomad

ssh -F env-ssh.cfg admin@nomad-worker-0
curl http://<current-ip>:11201

ansible-playbook plays/destroy.yml -e layer_name=main
```

## Workshop09 : Vault

### Commands
```
cd ./Workshop09-Vault
ansible-playbook plays/build.yml -e layer_name=main
ansible-playbook plays/apply_consul.yml
ansible-playbook plays/apply_vault.yml

ssh -F env-ssh.cfg admin@vault-server-0
consul members
vault status

vault init
vault unseal <key> (x3)
vault auth <token>
vault status

vault write secret/toto value=tata
vault read secret/toto

ansible-playbook plays/destroy.yml -e layer_name=main
```

## Workshop10 : Graylog

### Commands
```
cd ./Workshop10-Graylog
ansible-playbook plays/build.yml -e layer_name=main
ansible-playbook plays/apply_consul.yml
ansible-playbook plays/apply_logstore.yml

ssh -F env-ssh.cfg admin@consul-master-0
consul members

ssh -F env-ssh.cfg admin@logstore-0 -L 9000:localhost:9000
# open your browser at this address : http://localhost:9000/sources#3600

# to test the http input
curl -XPOST http://<logstore-ip>:12201/gelf -p0 -d '{"short_message":"Hello there", "host":"example.org", "facility":"test", "_foo":"bar"}'

ansible-playbook plays/destroy.yml -e layer_name=main
```

repository: obourdon/devops-workshops

repo_name: obourdon/devops-workshops


text:
# Duplicate File Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.1 - 2019-03-07
### Fixed
- Fixes an issue where Duplicate File could throw an exception in Asset sub folders

## 1.0.0 - 2019-02-25
### Added
- Initial release

repository: mmikkel/Craft-DuplicateFile

repo_name: mmikkel/Craft-DuplicateFile


text:
---
layout: post
title: "Reward Tampering Problems and Solutions in Reinforcement Learning: A Causal Influence Diagram Perspective"
date: 2019-08-13 16:50:00
categories: arXiv_AI
tags: arXiv_AI Reinforcement_Learning
author: Tom Everitt, Marcus Hutter
mathjax: true
---

* content
{:toc}

##### Abstract
Can an arbitrarily intelligent reinforcement learning agent be kept under control by a human user? Or do agents with sufficient intelligence inevitably find ways to shortcut their reward signal? This question impacts how far reinforcement learning can be scaled, and whether alternative paradigms must be developed in order to build safe artificial general intelligence. In this paper, we use an intuitive yet precise graphical model called causal influence diagrams to formalize reward tampering problems. We also describe a number of tweaks to the reinforcement learning objective that prevent incentives for reward tampering. We verify the solutions using recently developed graphical criteria for inferring agent incentives from causal influence diagrams.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1908.04734](http://arxiv.org/abs/1908.04734)

##### PDF
[http://arxiv.org/pdf/1908.04734](http://arxiv.org/pdf/1908.04734)


text:
# Modalize - jQuery Plugin

Simple modal plugin that I'm working on to learn some jquery plugin concepts. You can add a button to your page and this will display a modal that will include a title and text pulled from data attributes of the element that was clicked.

## Getting Started

Include the script in your head tag.

```
<script type="text/javascript" src="js/modalize.js"></script>
```

Add the element that will server as your link/button to open the modal. Pick a class for it and set the modal title and text in data-modal-title and data-modal-text, correspondingly.

```
<a href="#" class="modal-button" data-modal-title="My Modal Title" data-modal-text="Text to show in modal">Open Modal</a>
```

Add a click event handler for the element you just added.

```
// add click event handler to any element with class modal-button
$(document).ready(function() {
	$('.modal-button').on('click', $(this).modalize);
});
```

## Prerequisites

You will need to include jQuery for this plugin to work.

```

repository: arquilca/modalize

repo_name: arquilca/modalize


text:
###Project 3 Front-end

###User Stories

  - As a user, I can register.
  - As a user, I can login.
  - As a user, I can view all products.
  - As a user, I can add items to Shopping Cart.
  - As a user, I can pay for items with credit card via Stripe.
  - As a user, I can view my transaction history.

###Reach User Stories

  - As a user, I can search for products.
  - As an admin, I can add/edit/remove products.

###Data Collections
  - users
  - products
  - transactions (shopping cart + purchase history?)


text:
# Continuous Integration (CI) and Continuous Deployment (CD) workshop
The goal of this workshop is to discuss current activities in CI, testing and code analysis. The expected outcome is to share experiences, find common activities and explore ideas for the next sprint.

We want to find out what challenges companies have in this area and how we can assist in solving these challenges.

# Date and time
**Date**: 25/9

**Time**: 10.00 - 12.00

**Place**: MS Teams, link will be distributed to the registered participants.

Registration is free and open for all software center companies. We distribute MS Outlook (iCal) invitations and will send the link using that channel.

**Please register here**: https://choodle.portal.chalmers.se/FBwMYPlnRehtlwRI
IMPORTANT! please write your e-mail address when registering!

# Content - what we want to talk about
* CI testing and ML (Finding flaky tests using ML)
* Using ML to prioritize CI flow activities (e.g. which static analysis checks to use)
* Managing models in the CI pipeline

# Ideas for the next workshops
For the next workshop we plan to organize a virtual Hackathon, ideas are more than welcome.

# Contact, theme leaders:
* Kristian Sandahl<EMAIL_ADDRESS>* Jan Carlson<EMAIL_ADDRESS>* Wilhelm Meding<EMAIL_ADDRESS>* Miroslaw Staron<EMAIL_ADDRESS>


text:
# Intel XTU Installation Helper

Intel has been dropped XTU support for certain CPUs (Such as 8550u, 8250u, and etc), resulting installer to reject installation process with **'unsupported platform_error'**. However, in most cases, this does not mean your hardware is actually incompatible with XTU.

Therefore, after installing XTU with [simple trick by Kalle Lilja](https://kallelilja.com/2018/12/workaround-xtu-attempted-to-install-on-an-unsupported-platform/), XTU can still be used for CPU tweaks, such as undervolting.

Intel XTU Install Helper is designed to automate such procedure, providing an easier way to install XTU on unsupported platforms.

# User Guide

 1. Download Intel XTU Installer from [official intel download center](https://downloadcenter.intel.com/download/24075/Intel-Extreme-Tuning-Utility-Intel-XTU-).
 2. Download Intel XTU Install Helper from  [repository release tab](https://github.com/gimdh/Intel-XTU-Install-Helper/releases).
 3. Run Intel XTU Install Helper
	 - You can execute with an argument in first place.
	 > cmd> **IntelXTU_Install_Helper.exe <path/to/Original XTU Installer from Intel>**
	 - Or can enter a path after execution.
	 > \> Please enter the file name of proper XTU Installer: **<path/to/Original XTU Installer form Intel>**

If any error occurs, please submit a new issue with created **error.log** file.

## Example

**Assume**
- Both files are located in the same directory.
- File name of **Intel XTU Installer from Intel** is **XTUSetup.exe**
- File name of **Intel XTU Install Helper from this repository** is **IntelXTU_Install_Helper.exe**

**Then**
- Run **IntelXTU_Install_Helper.exe XTUSetup.exe** in cmd (or PowrShell).

	**or**
- Open **IntelXTU_Install_Helper.exe** by double-click.
- Program should prompt **Please enter the file name of proper XTU Installer:**
- Type **XTUSetup.exe** then press enter.

Now follow the directions of the program.

# Comment
It was origianlly my private 30-minute project. However, I think it's quite handy, so added least amount of user-friendliness in order to share this nifty tool.

So please bare with my code if you happen to go through it. Thanks.

repository: gimdh/Intel-XTU-Install-Helper

repo_name: gimdh/Intel-XTU-Install-Helper


text:
# Time & Weather System
This is a script created to be used on [Mafia 2 Online](http://mafia2-online.com).
The script includes time and dynamic weather. You are also able to change the season with a single variable, the script looks at that variable and chooses the correct weather.

If you have found bugs or see ways to improve this then do let me know.
You can find me here or on [Mafia 2 Online forums](http://forum.mafia2-online.com) with username Rolandd.

## License
This is licensed under MIT License. You are allowed to use this script however you want.

path: /systems/Time & Weather System/README.md


text:
# speed2.py - RPI OpenCV2 Object Speed Tracker
####  A Raspberry Pi Speed Camera using python, Video Stream Thread, pi-camera

IMPORTANT - This project has moved to https://github.com/pageauc/speed-camera

Claude Pageau

YouTube Channel https://www.youtube.com/user/pageaucp
GitHub Repo https://github.com/pageauc

repository: takeahsiaor/motion-track

repo_name: takeahsiaor/motion-track


text:
# **@resolve-js/readmodel-postgresql**

[![npm version](https://badge.fury.io/js/%40resolve-js%2Freadmodel-postgresql.svg)](https://badge.fury.io/js/%40resolve-js%2Freadmodel-postgresql)

A **Read Model Adapter** for [PostgreSQL 10.7](https://www.postgresql.org) database server.
The adapter provides a query API for projection and resolvers. This API is standard among reSolve read model adapters, so you can change a **Read Model Adapter** in the configuration file without changing the code.

## Available Parameters

- `databaseName` - The name of the PostgreSQL [schema](https://www.postgresql.org/docs/10/ddl-schemas.html).
- `buildMode` - An optional build mode: "auto" (default), "nodejs", "plv8", "plv8-internal", "plv8-external".
- `useSqs` - An optional flag determining possibility of usage SQS transport (only in AWS cloud).
- `tablePrefix` - An optional table prefix for read-models server by current adapter instance.
- `user` - The name of a user.
- `password` - The user's password.
- `database` - The database name.
- `host` - The database server's host name.
- `port` - The database server's port.

The adapter interface is defined in the **@resolve-js/readmodel-base** package.

## Usage

```js
import createAdapter from '@resolve-js/readmodel-postgresql'

const adapter = createAdapter({
  databaseName,
  ...connectionSettings,
})
```

repository: reimagined/resolve

branch_name: refs/heads/dev

repo_name: reimagined/resolve


text:
# Status Actions

These actions return information/data that might be useful if you are reconnecting and missed the original associated event.

## activeMetagameEvents (previously activeAlerts)

Returns all active metagame events/alerts (and their respective facilities) across all servers. Optionally, you can provide an array of world_id's to get metagame event information for only the specified servers.

<aside class="warning">
If a world does not contain any running metagame events, it WILL NOT appear in the worlds node.
</aside>

> Sent

```json
{
    "action": "activeMetagameEvents", "worlds": ["1002"]
}
```

> Response
> (Please note this has been truncated, the facilities and metagame_events arrays have more than 1 element)

```json
{
    "action":"activeMetagameEvents",
    "worlds":
    {
        "1002":
        {
            "metagame_events":
            [
                {
                    "instance_id":"303",
                    "metagame_event_type_id":"4",
                    "facility_type_id":"0",
                    "category_id":"1",
                    "zone_id":"4",
                    "start_time":"1439216803",
                    "end_time":"1439224003",
                    "control_vs":"28",
                    "control_nc":"37",
                    "control_tr":"34",
                    "facilities":
                    [
                        {
                            "facility_id":"307010",
                            "facility_type_id":"6",
                            "owner":"2",
                            "zone_id":"4"
                        }
                    ]
                }
            ]
        }
    }
}
```

### Sent Payload

| Field  | JSON Type    | Description                                                                                |
|--------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| action | String       | The action we want to perform. In this case, activeMetagameEvents.                                                                           |
| worlds | String/Array | (Optional) A single or list of world ID's ([PC](http://census.daybreakgames.com/get/ps2:v2/world/?c:limit=1000) [PS4-US](http://census.daybreakgames.com/get/ps2ps4us:v2/world/?c:limit=1000) [PS4-EU](http://census.daybreakgames.com/get/ps2ps4eu:v2/world/?c:limit=1000)) that you want Metagame info for. Not specifying any worlds gets all metagame events across all worlds. |

### Response Payload

### root node

| Field | JSON Type | Description |
|------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| action | String | An echo of the action that generated "worlds" |
| worlds | Object | The parent node containing all worlds valid for the sent request. JSON keys/properties match the "world_id" found on Census ([PC](http://census.daybreakgames.com/get/ps2:v2/world/?c:limit=1000) [PS4-US](http://census.daybreakgames.com/get/ps2ps4us:v2/world/?c:limit=1000) [PS4-EU](http://census.daybreakgames.com/get/ps2ps4eu:v2/world/?c:limit=1000)). |

### metagame_events node

| Field | JSON Type | Description |
|------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| instance_id | String | Represents the WORLD unique instance ID of this metagame event. This is not globally unique, and can clash with other servers/worlds. Use this to match up start/update/end metagame events that come through the "MetagameEvent" subscription. Matches the ["instance_id" found on Census](https://census.daybreakgames.com/get/ps2:v2/world_event/?type=METAGAME&c:limit=1) |
| metagame_event_type_id | String | Represents the type of this metagame. Matches the ["metagame_event_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/metagame_event/?c:limit=1000). |
| facility_type_id | String | Represents the facility type for facility metagame events. Returns "0" if metagame event is not facility type specific, otherwise returns the relating facility type. Matches the ["facility_type_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/facility_type/?c:limit=1000). |
| category_id | String | Represents the Magic "type" value given to metagame events by census. Matches the ["type" found on Census](http://census.daybreakgames.com/get/ps2:v2/metagame_event/?c:limit=1000). |
| zone_id | String | Represents the zone relating to this metagame event. Returns "0" if metagame event is global, otherwise returns the related zone. Matches the ["zone_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/zone/?c:limit=1000). |
| start_time | String | Represents the epoch time (in seconds) when this metagame event started. |
| end_time | String | Represents the epoch time (in seconds) when the metagame event IS EXPECTED to end. |
| control_xx | String | Represents the rounded down territory control percentage from 0-100 for faction "xx". "control_vs", "control_nc" and "control_tr" represent each factions territory control. |
| facilities | Array | Represents all facilities that contribute/have influence for this metagame event. |

### facilities node

| Field | JSON Type | Description |
|------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| facility_id | String | Represents the unique ID of this facility. Matches the ["region_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/region/?c:limit=1000). |
| facility_type_id | String | Represents the type of this facility (Bio-lab, Outpost, etc). Matches the ["facility_type_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/facility_type/?c:limit=1000) for this region. |
| owner | String | Represents the owner of this facility. Matches the ["faction_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/faction/?c:limit=1000) |
| zone_id | String | Represents the zone this facility is located in. Matches the ["zone_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/zone/?c:limit=1000) |

## worldStatus (Previously zoneStatus/facilityStatus)

Returns zone (territory control, lock) and facility information (ownership) for the given world/zones.

> Sent

```json
{
    "action": "worldStatus", "worlds": ["25"], "zones": ["2"]
}
```

> Response
> (Please note this has been truncated, the worlds, zones and facilites arrays can contain more than 1 element, depending on the query.)

```json
{
    "action":"worldStatus",
    "worlds":
    {
        "25":
        {
            "zones":
            {
                "2":
                {
                    "locked":"0",
                    "locked_by":"0",
                    "control_vs":"28",
                    "control_nc":"27",
                    "control_tr":"44",
                    "facilities":
                    [
                        {
                            "facility_id":"4430",
                            "facility_type_id":"6",
                            "owner":"3",
                            "zone_id":"2"
                        }
                    ]
                }
            }
        }
    }
}
```

### Sent Payload

| Field | JSON Type | Description |
|--------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| action | String | The action we want to perform. In this case, worldStatus. |
| worlds | String/Array | (Optional) A single or list of world ID's ([PC](http://census.daybreakgames.com/get/ps2:v2/world/?c:limit=1000) [PS4-US](http://census.daybreakgames.com/get/ps2ps4us:v2/world/?c:limit=1000) [PS4-EU](http://census.daybreakgames.com/get/ps2ps4eu:v2/world/?c:limit=1000)) that you want zone/facility info for. Not specifying any worlds gets data from all worlds. |
| zones | String/Array | (Optional) A single or list of zone ID's ([PC](http://census.daybreakgames.com/get/ps2:v2/zone/?c:limit=1000) [PS4-US](http://census.daybreakgames.com/get/ps2ps4us:v2/zone/?c:limit=1000) [PS4-EU](http://census.daybreakgames.com/get/ps2ps4eu:v2/zone/?c:limit=1000)) that you want zone/facility info for. Not specifying any zones gets data from all zones. |

### Response Payload

### root node

| Field | JSON Type | Description |
|--------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| action | String | An echo of the action that generated "worlds" |
| worlds | Object | The parent node containing all worlds valid for the sent request. JSON keys/properties match the "world_id" found on Census ([PC](http://census.daybreakgames.com/get/ps2:v2/world/?c:limit=1000) [PS4-US](http://census.daybreakgames.com/get/ps2ps4us:v2/world/?c:limit=1000) [PS4-EU](http://census.daybreakgames.com/get/ps2ps4eu:v2/world/?c:limit=1000)). |

### xx world ID node

| Field | JSON Type | Description |
|--------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| zones | Object | The parent node containing all zones valid for the sent request. JSON keys/properties match the "zone_id" found on Census ([PC](http://census.daybreakgames.com/get/ps2:v2/zone/?c:limit=1000) [PS4-US](http://census.daybreakgames.com/get/ps2ps4us:v2/zone/?c:limit=1000) [PS4-EU](http://census.daybreakgames.com/get/ps2ps4eu:v2/zone/?c:limit=1000)). |

### zones node

| Field | JSON Type | Description |
|------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| locked | String | Represents whether this zone is locked. "0" indicates the zone is unlocked, "1" indicates the zone is locked. |
| locked_by | String | Represents the faction who locked this zone. If the zone is not locked, this returns "0". Matches the ["faction_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/faction/?c:limit=1000) |
| control_xx | String | Represents the rounded down territory control percentage from 0-100 for faction "xx". "control_vs", "control_nc" and "control_tr" represent each factions territory control. |
| facilities | Array | Represents all facilities inside this zone. |

### facilities node

| Field | JSON Type | Description |
|------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| facility_id | String | Represents the unique ID of this facility. Matches the ["region_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/region/?c:limit=1000). |
| facility_type_id | String | Represents the type of this facility (Bio-lab, Outpost, etc). Matches the ["facility_type_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/facility_type/?c:limit=1000) for this region. |
| owner | String | Represents the owner of this facility. Matches the ["faction_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/faction/?c:limit=1000) |
| zone_id | String | Represents the zone this facility is located in. Matches the ["zone_id" found on Census](http://census.daybreakgames.com/get/ps2:v2/zone/?c:limit=1000) |


text:
---
title: "Population Neuroscience: How to Responsibly Handle Big Data in the Age of Biobanks?"
collection: teaching
type: "Education Course"
permalink: /teaching/2018-summer-teaching-3
venue: "Annual Meeting of the Organization on Human Brain Mapping (OHBM)"
date: 2018-06-07
location: "OHBM Conference Center"
---

This is a series of education courses I taught during [OHBM](https://www.humanbrainmapping.org) conferences (2018 - present).

[Beijing Time <---> Mountain Time](http://www.timebie.com/cn/mountainbeijing.php)

List of links to the course recordings
======

* [2018-06-07, Sigapore](https://www.pathlms.com/ohbm/courses/8246), Neuroinformatics and Replication: Beyond BASH Scripts and Winner’s Curses
* [2019-06-09, Rome](https://www.humanbrainmapping.org/i4a/pages/index.cfm?pageid=3882), MISSED.
* [2020-06-23, Virtual](https://www.humanbrainmapping.org/i4a/pages/index.cfm?pageID=3977), Human Brain Mapping of Individual Differences: Reliability, Reproducibility and Replicability. [Data and Code](https://github.com/zuoxinian/CCNP/tree/master/3R-BRAIN)

branch_name: refs/heads/main


text:
# CLI Workshop

👋 hi there! My name is [swyx](https://swyx.io) and this is the
source material for [the Egghead CLI workshop!](https://egghead.io/courses/build-custom-cli-tooling-with-oclif-and-typescript?af=95qfq1)!

![image](https://user-images.githubusercontent.com/6764957/69071656-3c6d6b80-0a65-11ea-8aad-2ceeff65f913.png)

## Pre-Workshop Instructions/Requirements

In order for us to maximize our efforts during the workshop, please do the
following:

- [ ] Setup the project (follow the setup instructions below) (~5 minutes)
- [ ] Install and setup [Zoom](https://zoom.us) on the computer you will be
      using (~5 minutes)
- [ ] Watch
      [Use Zoom for KCD Workshops](https://egghead.io/lessons/egghead-use-zoom-for-kcd-workshops)
      (~8 minutes).
- [ ] Read [12 Factor CLI Apps](https://medium.com/@jdxcode/12-factor-cli-apps-dd3c227a0e46) or Watch [Rules for creating great developer CLIs](https://devrel.net/developer-experience/rules-for-creating-great-developer-clis) (20 mins)
- [ ] Write down 2-3 small Node.js CLI's you'd like to explore (points if I haven't heard of them!)
- [ ] (Optional) Browse the [CLI Cheatsheet](https://github.com/sw-yx/cli-cheatsheet)

The more prepared you are for the workshop, the better it will go for you.

## System Requirements

- [git][git] v2.20.1 or greater
- [NodeJS][node] v10.15.3 or greater
- [npm][npm] v6.9.0 or greater

All of these must be available in your `PATH`. To verify things are set up
properly, you can run this:

```
git --version
node --version
npm --version
```

If you have trouble with any of these, learn more about the PATH environment
variable and how to fix it here for [windows][win-path] or
[mac/linux][mac-path].

## Structure

- 1 - CLI Basics
  - 1A: Create a Hello World Single-Command CLI with Oclif
  - 1B: Parse Arguments and Flags in an Oclif Command
  - 1C: Understand when to use Multi-Command vs Single-Command in Oclif
  - 1D: Set up Debugging and Testing for CLI's
- 2 - Heavy Lifting
  - 2A: Beautiful Prompts for User Input with Enquirer
  - 2B: Read User Config with Cosmiconfig
  - 2C: Build Your Own Boilerplate Scaffolding CLI with Copy-Template-Dir
  - 2D: Execute and Pipe Child Processes with Execa
- 3 - Polish
  - 3A: Prompt Users to Update CLI Versions with Update Notifier
  - 3B: Store State on Filesystem in CLI's respecting XDG-spec with Conf
  - 3C: Create CLI's that Intelligently Adapt to Usage with Frecency
  - 3D: Polish CLI Output with Ora, CLI-UX, and Chalk
- 4 - React Ink
  - 4A: Build Interactive CLI Components with React Ink
  - 4B: Create Flexible CLI Layouts with React Ink's Box Component
  - 4C: Create Dynamic Command Line User Interfaces with React Ink Input Components

## License

MIT

[npm]: https://www.npmjs.com/
[node]: https://nodejs.org
[git]: https://git-scm.com/
[win-path]:
  https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
[mac-path]: http://stackoverflow.com/a/24322978/971592


text:
# Platygloea abdita Bandoni, 1959 SPECIES

#### Status
ACCEPTED

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

#### Published in
Mycologia 51(1): 94 (1959)

#### Original name
Platygloea abdita Bandoni, 1959

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Changelog

## 0.3.1

* Updated vulnerable version of lodash

## 0.3.0

* **BREAKING** Changed `validateSsn`'s return type from boolean to `ValidationResult`. This allows to return the reason for which the SSN is invalid.

## 0.2.0

* Made `CountryCode` type public.
* Improved error handling.

## 0.1.1

Removed dependencies from the bundle.

## 0.1.0

Initial version. Support for US and Swiss social security number formats.

license: MIT,ISC

detected_licenses: MIT ISC


text:
# Build instructions

1. To build the project, first install the `dep` tool:

    ```
    curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
    ```

2. Retrieve the dependencies:

    ```
    dep ensure -vendor-only
    ```

3. Build the project:

    ```
    go build -v -o istio-pod-network-controller cmd/istio-pod-network-controller/main.go
    ```

gha_language: Go


text:
# static2000-nunjucks

Nunjucks adapter for [Static2000](https://github.com/judas-christ/static2000).

## Installation

Via npm:

```bash
npm install static2000-nunjucks
```

## Usage

Install, create templates and content as `.html` files and run [static2000](https://github.com/judas-christ/static2000) with `templateAdapter` specified:

```bash
static2000 --templateAdapter static2000-nunjucks
```

or

```js
var static2000 = require('static2000');

static2000({ templateAdapter: 'static2000-nunjucks' });
```

## Globals

### Global include

This adapter includes `[templates folder]/includes/globals.html` in all files, templates and content, so macros defined there are available both in the body of content and in templates:

```html+django
{{ globals.myMacro() }}
```

### Global functions

The global functions are available without namespace in the templates:

```html+django
{% set visiblePages = query({ visible: true }) %}
```


text:
# Myles' Talks Build and Deploy Script

This directory contains scripts to build and deploy Myles' Talks to <https://myles.github.io/talks/>.

## Contents

* `build.py` - Converts the README.md files to HTML.
* `deploy_key.enc` - The encrypt SSH private key for accessing this GitHub repo.
* `deploy.sh` - The deploy script.
* `template.html` - The template file.

repository: myles/talks

gha_language: HTML

repo_name: myles/talks


text:
## Simple FAQ creator

The goal of this project is to create a simple tool to create question/answers. The idea came from all internet celibrities, specialy streamers, who answer each eveining the same question "Where come you from ?" "How old are you ?" "Whats your favorite movie".

#### [Demo here](http://faq-demo.herokuapp.com/)

### Road map

* User can up vote a QA
* User can order the QAs with the users favorite first

### Contribute
How to start the project and go on the localhost home page
```
git clone --recursive https://github.com/ice-blaze/faq.git
cd faq
git submodule update --init --recursive
cp .env.example .env
# add the recaptcha public and private key in the .env file
cd laradock-faq
cp env-example .env
# set to true WORKSPACE_INSTALL_NODE and WORKSPACE_INSTALL_PYTHON
sudo docker-compose build workspace
sudo docker-compose up -d nginx postgres
sudo docker-compose exec workspace bash
composer install
php artisan key:generate
php artisan migrate:refresh --seed
php artisan serve
# and now go on http://localhost
```

repository: ice-blaze/faq

repo_name: ice-blaze/faq


text:
# ostd

Simple [OpenSubtitles.org](https://www.opensubtitles.org) download CLI-tool and API. You will have to acquire a user-agent [as described here](http://trac.opensubtitles.org/projects/opensubtitles/wiki/DevReadFirst). The user-agent for test purposes is: `TemporaryUserAgent` (the API docs state this may change without notice, so keep that in mind).

## Installation

```sh
pip install ostd
```

## CLI

```sh
py -m ostd <USER-AGENT> <SUBTITLE-ID>
```

## API

```python
from ostd import Downloader

ids = (1234, 5678, 9012)

with Downloader('Your User-Agent') as downloader:
  for result in downloader.download(ids):
    print(result.content)  # Watch out for file and console encoding mismatches!
```

## License

MIT.

repository: Fylipp/ostd

repo_name: Fylipp/ostd


text:
# RTBlockCallChecker

[![CI Status](http://img.shields.io/travis/rickytan/RTBlockCallChecker.svg?style=flat)](https://travis-ci.org/rickytan/RTBlockCallChecker)
[![Version](https://img.shields.io/cocoapods/v/RTBlockCallChecker.svg?style=flat)](http://cocoapods.org/pods/RTBlockCallChecker)
[![License](https://img.shields.io/cocoapods/l/RTBlockCallChecker.svg?style=flat)](http://cocoapods.org/pods/RTBlockCallChecker)
[![Platform](https://img.shields.io/cocoapods/p/RTBlockCallChecker.svg?style=flat)](http://cocoapods.org/pods/RTBlockCallChecker)

## Introduction

Sometimes, as a third-party library, we must make sure that the completion block we passed
to a developer must be called, or it will cause an error and unexpected states. For example,
in **WebKit**, we have a navigation delegate method:

```objc
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler;
```

What if for some reason the developer forget to call `decisionHandler`? This is not allowed.
In fact, if you do forget to call it, **WebKit** will raise a exception for you. How did **WebKit**
do that? well, it implements a [CompletionHandlerCallChecker](https://opensource.apple.com/source/WebKit2/WebKit2-76<IP_ADDRESS>.10/Shared/Cocoa/CompletionHandlerCallChecker.mm.auto.html) in **CPP**, and
use the lamda expresion. But this project provides a tricky way in **Objective-C**. for more
information, please read the source code, quite simple.

## Usage

RTBlockCallChecker is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'RTBlockCallChecker'
```

```objc
void (^someBlockMustBeCalled)() = ^{
   ...
};
// change
[self passBlockToAMethod:someBlockMustBeCalled];
// to
[self passBlockToAMethod:RT_CHECK_BLOCK_CALLED(someBlockMustBeCalled)];
// simple!

- (void)passBlockToAMethod:(void(^)(void))block {
    // 1. call the block immediatedlly
    block();        // ok
    // 2. call the block with delay
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        block();    // ok
    });
    // 3. pass the block to another instance, and it will call the block in the future
    someObj.completion = block; // ok
    // 4. forget to call the block, raise an exception!
}
```

## Author

Ricky Tan<EMAIL_ADDRESS>
## License

RTBlockCallChecker is available under the MIT license. See the LICENSE file for more info.

repository: HuangXiZhu/RTBlockCallChecker

repo_name: HuangXiZhu/RTBlockCallChecker


text:
---
title: Wiki -> F.A.Q.s
description: A wiki maintained by the r/WiiHacks community.
redirect_from: "/faqs/faqs.md"
---

## [Modding F.A.Q.](./modding.md)

  You can find the modding FAQ [here](./modding.md).

----

## Regarding the subreddit.

### My post keeps getting flagged for Rule #4, why?

  There are two types of posts that get flagged for Rule #4. Help requests or questions that are regularly asked are removed, as well as ones that ask vague questions and/or provide vague information.

  People are less likely to respond to a help request if the first thing they need to do is ask you to provide the proper information.

### How can I get my post to not get removed by Rule #4?

  Always research the issue in the forum before you post. 98% of all questions asked are asked and answered regularly. If your post was removed because of this, you really didn't need to post to begin with.

  Provide enough information for the person to troubleshoot your issue;

  * Your post should have a title that briefly, but accurately describes the issue.

  * In the body, included should be a full description of the issue.

  * Include your hardware setup. What Wii are you using? The model and size of SD and USB device is often relevant, include it too. Do you have an original Wiimote, or a motion plus?

  * Include your software setup. A syscheck is almost always helpful. Paste the results into a pastebin and include it in your body. Like [this](https://pastebin.com/agpxtvXz).

  * Include everything you've done up until that point including links to tutorials you've followed and try to describe the results as best as you can.

  * The more information you provide, the less chance of the post getting removed as well as the more chance you have of getting someone to help you resolve your issue.

----

## USB Loader GX

  These are the most common questions regarding USB Loader GX in which we get a lot of. If you can't find the answer here, you will most certainly be able to find it in the subreddit search.

### Can I use an SD Card?

  * For certain things, yes. However the Wii's SD Card slot, thanks to security encryption is considerably slower than the USB. So what does work works slower and with less compatibility than if you were using a USB device.

### My games aren't (showing up or loading) in USB Loader GX? Black Screen, Blank List, etc

  Here is a basic checklist:

  * Have you tried making sure they are checked to be displayed in USB Loader GX? You can get to this by pressing +, or make sure that your favorites aren't turned on.

  * Make sure your drive is plugged into the right port and being detected. It *needs* to be in the port closest to the outside of the device.

  * Make sure you're Wii has the correct cIOSes needed to run it. You can find that information [here](https://wii.guide/cios)

  * Ensure your hard drive is formatted in a way that can be read by whatever you are using. Wii games will work on NTFS, but the most compatible will be FAT32. You can format a drive in FAT32 from Windows by using the command line. DDG/Google.

  * Make sure your game files are in the proper directory structure. They are different for Wii/USBLoaderGX games, and Nintendont games. You can find information on how to do that in the links below:

    [nintendont](https://github.com/FIX94/Nintendont) -> For your GameCube games.

    [usb loader gx](https://sourceforge.net/p/usbloadergx/wiki/Installation/) -> For your Wii games.

  * Make sure USB Loader is configured properly. You can find information on doing so in the link above. Worst case scenario, rename your config so it will generate a new one.

  * Are your images wbfs or iso? If they have the extension '.nkit' they will not work. Get a different image or learn to convert that one.

  * Last things to try are 'replacements'. Try a new game image, a different USB device, or SD card if possible. Yours might not be compatible, or sometimes not even good.

  * This information and more can be found in a user posted troubleshooting guide [here](https://www.reddit.com/r/WiiHacks/comments/dnfb81/usb_loader_gx_troubleshooting_guide/).

### Ripping games using USB Loader GX isn't working.

  * USB Loader GX has a habit of stopping in the middle of a rip and never completing, if it works at all.

  * After this issue appearing in the subreddit numerous time, the general public consensus is to not use it to rip games. It doesn't do it reliably, or accurately.

  * Use [CleanRip](https://github.com/emukidid/cleanrip) instead. It's more recently maintained and works much better.

### Why is my [Crap](https://sites.google.com/site/completesg/backup-launchers/usb/crap) Forwarder not working in USB Loader GX?

  * USB Loader GX was recently updated and it broke Crap compatibility.
  * Currently we have tested Crap forwarders on USB Loader GX v3.0 rev 1271.
  * If you are using USB Loader GX v3.0 rev 1272, it will not work.

#### References:

  https://www.reddit.com/r/WiiHacks/comments/efone1/usb_loader_gx_isnt_launching_through_my_crap_wads/

----

## Miscellaneous

  While the faq is growing, anything that doesn't have its own category will go here.

### Homebrew Browser

  * If you're going to use it, please make sure you're using the newer repository, [OSC, which can be found here](https://oscwii.org).

  * Here at r/WiiHacks, we recommend that you install the software yourself as software like this doesn't have a track record for reliability, and eventually you'll probably want to know how to install it yourself.

  * Lastly, if you do choose to use either, please take your issue(s) to the RC24 discord, or their recommended support path, as we will not provide support for it at r/WiiHacks due to the fact that we don't recommend it and it causes disruptive discussions in submissions that ask for help with it.

### How do I manage my virtual Wii game library?

  * Use [WiiBackupManager](http://www.wiibackupmanager.co.uk/WiiBackupManager_Build78.html) to get proper folder structure, gameID and to split large game files.

### How do I get WADs and Channel forwarders onto my Wii?

  * [YAWMM](https://github.com/FIX94/Some-YAWMM-Mod) is a great way to easily install wad files and channel forwarders.

### What Modded Wii Games can I play?

  * Check out our [useful links](https://www.wiihacks.org/links/links) page.

----

## Helping out...

If you have any corrections, additions or suggestions, please message the moderators. We'd be glad to hear it.


text:
# CSV to Firebase

Ultimate Fast CLI to migrate your csv data to Firebase Firestore!!!

## Installation

```
npm i -g csv-to-firestore
```

## Usage

### Preparation

Move your CSV file and your Google Service Account ([Step to get Service Account](https://cloud.google.com/docs/authentication/production)) into the same directory

### Configuration File

Before start, you have to write your own configuration file like the following template.

```js

module.exports = {
    path: 'example.csv', // Your CSV file name
    firebase: {
        credential: 'serviceAccount.json', // Your service account file name
        collection: 'sample', // target Collection in Firestore
    },
    mapper: (dataFromCSV) => { // Mapper Method as optional field
        return dataFromCSV // Return data for saving in Firestore
    }
}
```

### Let's Transfer!

In your Terminal or CMD run the following command.

```
csv-to-firestore -c <your-js-config-file> // or
csv-to-firestore --config <your-js-config-file>
```

### Result

```
✔ Config File is ready !
✔ Data from CSV is ready !
✔ Firebase Admin is ready !
✔ Firebase Data Transfer Successfully !
```

repository: adroaldopagliari/csv-to-firestore

repo_name: adroaldopagliari/csv-to-firestore


text:
# Cultural Preferences Modding Guide

Cultural Preferences scripting mod files are located within the **Preferences** folder. To be valid, mod files must have the **.json** extension and have the following file structure:

#### File Structure
Note: *.json* files do not support comments. Remove texts enclosed within double dashes `--`

```
{
  "preferences": [ -- list of preferences --
    {
      "id":                  -- (required) Unique preference identifier, if more than one definition share ids, only the last one loaded will be used
      "name":                -- (required) text to use when displaying the preference name within the game
    },
    ... -- additional preferences --
  ]
}
```

#### Additional Notes
1. Remove any trailing commas or the file won't be parsed

repository: Zematus/Worlds

gha_language: C#

repo_name: Zematus/Worlds


text:
Supplementary material for

# The Climate Benefit of Sequestration

This folder contains a jupyter notebook to reproduce an example that introduces the computation of CS and CBS for a nonlinear model out of equilibrium.
To run this jupyter notebook, CompartmentalSystems and LAPM must be installed.

repository: MPIBGC-TEE/CompartmentalSystems

gha_language: Python

repo_name: MPIBGC-TEE/CompartmentalSystems


text:
Word At Index 0.0.2
===================

  Returns the word of a mask given its index.
	Purpose: split a mask for eg distributed computing [brute force]

	pc1 -> mask[0-100000000]
	pc2 -> mask[100000001-200000000]
	...

	Usage: bash wai.sh -i index -m mask [customCharSet]
	eg.
		bash wai.sh -i1000000 -m?d?d?d?d?d?d?d?d
	will output
		'00999999'
	surrounding '' are needed to make sure the space char wont be forgotten

	* Info:
	  -p,  to display the full output additional to the word at index -i
	  -v,  Display version number
	  -h,  Display this help menu

	* generation:

	  -i,  Index for Word; fist word at index 1
	  -m,  Specify mask via Built-in charsets

	       Example:

	       bash wai.sh -i 13 -m ?d?d

	* Custom charsets:

	  -1, -2, -3, -4,  Specify custom charsets via Built-in charsets

	       Example:

	       bash wai.sh -i 13 -m ?1?d?1 -1 ?dabcDE

	       IMPORTANT -1 ?d?l NOT EQUAL -1 ?l?d

	* Built-in charsets:

	  ?l = 'abcdefghijklmnopqrstuvwxyz'
	  ?u = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
	  ?d = '0123456789'
	  ?s = ' !\"#\$%&'()*+,-./:;<=>?@[\\]^_\`{|}~'
		without surrounding ''

ENJOY & BE NICE ;)

changelog 0.0.2 - added -p option
  WAI will now only return the word at index -i inside single quotes ''
	instead of the bulky output information which can be added via -p
	this will hopefully enable easy pipelining

repository: cjsatuforc/wordAtIndex

repo_name: cjsatuforc/wordAtIndex


text:
---
layout: post
title:      "My first CLI Gem"
date:       2019-08-21 18:15:34 +0000
permalink:  my_first_cli_gem
---

Hello, so today I finally finished my first actual running program. I created a Command Line Interface for one of my favorite video games - Dota2. The program gives the user the ability to select a Hero from a list and return a short summary of the Heroes information. The returned information includes -  the heroes name, primary attribute, and the role that the hero is meant to play in the game.

The purpose of the post is to give you an idea of how I tackled creating this gem.

The first thing I did was pull the data that I needed from the web. I used open-uri and json to scrape the data I needed.

```
require 'open-uri'
require 'json'
class Api

    def self.get_heroes
        data = open('https://api.opendota.com/api/heroes').read
        JSON.parse(data)
    end
end
```

Next, I created my Hero class and gave it various attributes that I know that I would like to use throughout the program. I created readers/writers for the attributes and also used the initialize method so that each individual instance of Hero will have attributes written into it. Also I utilized a hashed @@all class method because I noticed that in the scraped data, every hero had a unique id. I wanted to use this id when creating my list in the CLI.

```
class Hero

    attr_accessor :id, :name, :attack_type, :roles, :primary_attribute
    PRIMARY_ATTRIBUTE_LOOKUP = {
        'agi' => 'Agility',
        'str' => 'Strength',
        'int' => 'Intelligence'
    }.freeze

    @@all = {}

    def initialize(details)
        @id = details["id"]
        @name = details["localized_name"]
        @attack_type = details["attack_type"]
        @roles = details["roles"]
        @primary_attribute = details["primary_attr"]
        @@all[@id] = self
    end

    def roles_string
        @roles.join(", ")
    end

    def summary
        "#{@name} is an #{PRIMARY_ATTRIBUTE_LOOKUP[@primary_attribute]} hero with a #{@attack_type} attack. This hero is an asset to its team when playing the roles of #{roles_string}."
    end

    def self.all
        @@all
    end

end
```

At this point my instances of Hero still have not been created. I needed a method to iterate through my data.

```
def info(id)
      Api.get_heroes.each do |hero|
      Hero.new(hero)
      end
      Hero.all[id]
    end
```

At this point all of my pieces are exist and it is just a matter of piecing them together. I created my DotaHandler class to handle all the operations and piecing together of my CLI.

```
require "dotacli/version"
require "dotacli/api"
require "dotacli/hero"

module Dota
  class Error < StandardError; end

  class DotaHandler

    def initialize
      line_break
      puts "Welcome to my dotaCLI! In this CLI you will be able to see information on the popular games awesome playable heroes"
      line_break
      puts "Type list to get started!"
    end

    def list
      Api.get_heroes
    end

    def info(id)
      Api.get_heroes.each do |hero|
      Hero.new(hero)
      end
      Hero.all[id]
    end

    def start_program
      line_break
        numbered_list
        more_info
        info_again
    end

    def numbered_list
      x = gets.chomp
        if x == "list"
          list.each {|hero| puts "#{hero["id"]} #{hero["localized_name"]}" }
        else
          puts "Im sorry that command is not valid!"
          line_break
          start_program
          puts "Type list to get started"
        end
    end

    def more_info
      line_break
      puts "To see more information on a particular hero, type in the the number to the left of the heroes name."
      line_break
        r = gets.chomp
        line_break
        x = info(r.to_i)
        if x
          puts info(r.to_i).summary
      line_break
        else "Sorry that hero doesnt exist"
        end
    end

    def info_again
      puts "Type y to get info on a different hero.  Type back to see the list again."
      h = gets.chomp
      if h == "y"
        more_info
        info_again
      elsif h =="back"
        line_break
        puts "Type list to see the list"
        start_program
      else
        puts "Im sorry that command is not valid!"
        line_break
        info_again
      end
    end

    def line_break
      puts ""
    end

  end
end
```

extension: markdown


text:
Websocket API Gateway

This application uses Gin and Gorilla websocket to implement a gateway for subscribing
to the signals of the test account of the Bitmex exchange, when connected to which
it is possible to receive notifications about changes in the table of financial
instruments (quotes) of the test environment of the Bitmex exchange.

You can run service by command
"go run main.go"

Test as a client using websocat by command
"websocat ws://<IP_ADDRESS>:8844/bitmex"