text:
### [CVE-2019-6832](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6832)
![](https://img.shields.io/static/v1?label=Product&message=Wiser%20for%20KNX&color=blue)
![](https://img.shields.io/static/v1?label=Product&message=spaceLYnk&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-287%3A%20Authentication&color=brighgreen)

### Description

A CWE-287: Authentication vulnerability exists in spaceLYnk (all versions before 2.4.0) and Wiser for KNX (all versions before 2.4.0 - formerly known as homeLYnk), which could cause loss of control when an attacker bypasses the authentication.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon

repository: trickest/cve

repo_name: trickest/cve


text:
# broadlink\_ac\_mqtt\_addon

HassOS addon for [Broadlink AC to Mqtt](https://github.com/liaan/broadlink_ac_mqtt)

## Usage

Place your broadlink\_ac\_mqtt config file in `/config/broadlink_ac_mqtt.yaml`.
MQTT address and login information will be received directly from Home
Assistant and do not need to be included.

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
# The Go Ecosystem

* The core language, spec and docs
* The Go development community at [github.com/golang/](github.com/golang/), evolution via [proposals](https://github.com/golang/proposal)

![](static/git-cal.png)

Fun fact: the first commit (7d7c6a97f8) of the Go repo dates 1972-07-18 (a
Tuesday) and contains a file written in
[B](https://en.wikipedia.org/wiki/B_(programming_language)).

```
$ tree
.
└── src
    └── pkg
        └── debug
            └── macho
                └── testdata
                    └── hello.b

5 directories, 1 file

$ cat src/pkg/debug/macho/testdata/hello.b
main( ) {
        extrn a, b, c;
        putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';
```

* More and more open source third party libraries, tools and projects: [https://github.com/topics/go](https://github.com/topics/go)
* Strong cloud and microservice story
* More and more documentation and materials

![](/static/goog_books.png)

* Migration stories; [patterns](https://apenwarr.ca/log/20190318), [Eigenvectors](https://github.com/golang-leipzig/welcome/blob/master/Slides.md#go)

An online QA community:

* [https://stackoverflow.com/questions/tagged/go](https://stackoverflow.com/questions/tagged/go),
  as of 06/2021: 54,297 questions.

repository: miku/gonotes

repo_name: miku/gonotes


text:
	Branding

All of the relevant branding information and logos for Wolf Software.

Primary Website Colours

| Description | Colour Code |
| --- | --- |
| Primary colour (website) | 0f5ea1 |
| Accent colour (website) | 2980b9 |
| Logo colour | 105fa2 |

Shields

Operating Systems

| Operating System | Versions                   | Buttons |
| ---------------- | -------------------------- | ------- |
| Alpine Linux     | 3.8 & 3.9, 3.10 & 3.11     |  |
| Arch Linux       | ....                       |  |
| Amazon Linux     | 2                          |  |
| Centos           | 6, 7 & 8                   |  |
| Debian           | 8, 9 & 10 (including slim) |  |
| Ubuntu           | 16.04, 18.04 & 20.04       |  |
| Mac OSX          |                            |  |

Programming Language

| Programming Language | Versions                 | Buttons |
| -------------------- | ------------------------ | ------- |
| Bash                 | 4.*, 5.*                 |  |
| C                    | ...                      |  |
| Docker               | ...                      |  |
| PHP                  | 5.4, 5.6, 7.*            |  |
| Puppet               | 5.*, 6.*                 |  |
| Python               | 3.4, 3.5, 3.6, 3.7 & 3.8 |  |
| Ruby                 | 2.5, 2.6 & 2.7           |  |
| Terraform            | 0.12.*                   |  |

Development Tools

| Development Tool | Link                   | Buttons |
| ---------------- | ---------------------- | ------- |
| Travis           | https://travis-ci.com/ |  |
| Gimp             | https://www.gimp.org/  |  |

Contributors

repository: WolfSoftware/branding

branch_name: refs/heads/master

repo_name: WolfSoftware/branding


text:
# coco2017-tfrecord
Create selective class tfrecord from coco2017 dataset
very simple selective class tfrecord creator from coco2017 dataset.

The program works jupyter notebook (.ipynb file)

## Getting Started

1. Clone this Repo .
2. Download cocoa2017 dataset with annotations files from:
http://cocodataset.org/#download

Under **"Images"** download
```
2017 Train images [118K/18GB]
2017 Val images [5K/1GB]
```

Under **"Annotations"** download
```
2017 Train/Val annotations [241MB]
```
#### Folder Structure
 - <#Dataset path#>
	 - annotations (folder)
	 - train2017
	 - val2017
	 - test2017 (not compulsory)

### Prerequisites

1. Python 3
2. COCO API
3. Tensorflow
4. numpy
5. PILLOW
6. Jupyter Notebook

##### 1. Python 3 Installation
This you would already know

##### 2. COCO API Installation (Only if the import statement in jupyter notebook does not work)
You will need COCO API. Installation instruction can be found on this link [COCO API](https://github.com/cocodataset/cocoapi)
Still for your quick reference will list installation instruction:

Clone git repo:
```
git clone https://github.com/cocodataset/cocoapi
cd cocoapi/PythonAPI
make
```
*if you use 'python3' to run python files please make chanes in cocoapi/PythonAPI/Makefile (replace 'python' with 'python3')

##### 3. tensorflow Installation
```
pip3 install tensorflow
```
or
```
pip3 install tensorflow-gpu
```

##### 4. numpy Installation
```
pip3 install numpy
```

##### 5. PILLOW Installation
```
pip3 install pillow
```

##### 6. Jupyter notebook Installation
```
pip3 install jupyter
```

### Running the program

Post cloning the Repo, go to repo dir.

```
jupyter notebook
```
the notebook will open in a browser. double click on ipynb file and start executing cell by cell :)

## License

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

### Star the REPO, if you find it useful. Feel free for pull requests.
## CHEERS!!!


text:
# PICSimLab_examples_in_MicroC
Examples of basic functions in programming a PIC microprocessor using MicroC editor and PICSimlab for testing.
The examples are made for PIC18F452 Clock:8

There are given some example codes for some functionalities as Interrupts,ADC,Steppers/servo Motors,I2C etc so the basics can be explained.

Warning: Micro C and PIC Simlab are both difficult to use as they have a lot of buggs and it is quite possible for obstacles to appear.


text:
# todo-example in Haskell

todo-example is a showcase of a lightweight web application written in Haskell.

A simple todo list server with a REST API using our own frameworks Welshy and TX, with a simple UI displaying the interaction with the API.

## Why?

todo-example was inspired and resulted from parts of a project done in the lecture 'Industrial Haskell' at [Vienna UT](http://www.informatik.tuwien.ac.at/) by [Michael Schröder](https://twitter.com/schrototo), [Harald Steinlechner](https://github.com/haraldsteinlechner), and [Jürgen Cito](https://twitter.com/citostyle).

Following our presentation of the project, feedback from fellow students was something along the lines of 'Wow, you can write web applications in Haskell? I thought it's only for compilers and other academic stuff'. Our aim is to change this perception of Haskell and showcase a simple working web applicatiion

## Screenshot/Usage

Below you can see a screenshot of what it looks like. You can create new lists of todo items which you can share with the 'Invite-URL'. Everyone who has the link can then add, edit and delete items from the list - updates are made available to everyone in near realtime.

![haskell todo-example Screenshot](screenshot.png)

## Frameworks
### Welshy

A Haskell web framework heavily influenced by the excellent Scotty, which was in turn influenced by Ruby's Sinatra.

Welshy strives to make it easier to do error handling without overly complicating the control flow.

Welshy is on [Hackage](http://hackage.haskell.org/package/welshy)

### TX

TX provides persistent transaction on top of STM.

TX on [Hackage](http://hackage.haskell.org/package/tx)

## Slides

todo-example was presented as a lightning talk at the [New York Haskell User Group](http://www.meetup.com/NY-Haskell/). The slides are online on [SpeakerDeck](https://speakerdeck.com/citostyle/haskell-todo-example).

repository: sophietyl/todo-example

repo_name: sophietyl/todo-example


text:
There are only 4 steps needed to get you started.

```php
// Build the form
$form = (new FormFactory())->fromHtml($htmlForm);

// Validate the form
$result = $form->validate($_POST);

// Process validation result
if ($result->isValid()) {
    $data = $result->getValues();
}

// Render the form
echo $form->asString();
```

The HTML5 standard validation rules are added for you [[input elements|API Form Elements]] so you don't need to
repeat those over and over again. And then there are the special attributes with trigger standard validation:
- [[max|API Attributes#max]]
- [[min|API Attributes#min]]
- [[step|API Attributes#step]]
- [[maxlength|API Attributes#maxlength]]
- [[minlength|API Attributes#minlength]]
- [[multiple|API Attributes#multiple]]
- [[pattern|API Attributes#pattern]]
- [[required|API Attributes#required]], [[aria-required|API Attributes#aria-required]]

And if you need more validation or specific filters there is a [[data-filters|API Attributes#data-filters]] and
[[data-validators|API Attributes#data-validators]] attribute.

A full blown text input might look like:

```html
<input type="text" id="username" name="username" required
       placeholder="Your username" class="form-control"
       pattern="[a-z]{2,}" minlength="2" maxlength="16"
       data-reuse-submitted-value="true"
       data-filters="striptags|stringtrim"
       data-validators="" />
```

Let's go through all the steps needed to get this working inside a controller action method.

## The four steps

### 1. Build the form

Create the form from html. Nothing fancy here. In this case a template renderer is used and the default values are
injected.

```php
// Build the form
$form = (new FormFactory())->fromHtml($this->template->render('app::form', [
    'token' => $session->get('csrf'),
]));
```

### 2. Validate the form

The easiest way is if you use a framework that uses [PSR-7 requests](http://www.php-fig.org/psr/psr-7/).

```php
// Validate PSR-7 request and return a ValidationResponseInterface
// It should only start validation if it was a post and if there are submitted values
$validationResult = $form->validateRequest($request);
```

If you use a framework that doesn't handle PSR-7 requests, you can still reduce boilerplate code by passing the
request method yourself:

```php
$validationResult = $form->validate($submittedData, $_SERVER['REQUEST_METHOD']);
```

You can also leave the method validation out. It won't check for a valid `POST` method.

```php
$validationResult = $form->validate($submittedData);
```

### 3. Process validation result

Submitted data should be valid if it was a post and there are no validation messages set.

```php
// It should be valid if it was a post and if there are no validation messages
if ($validationResult->isValid()) {
    // Get filter submitted values
    $data = $validationResult->getValues();

    // Process data

    return new RedirectResponse('/');
}
```

If you didn't use the PSR-7 request method, you might want to check for a valid post method yourself.

```php
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $validationResult->isValid()) {
    // ...
}
```

### 4. Render the form

Last step is rendering the form and injecting the submitted values and validation messages.

```php
// Render the form
return new HtmlResponse($this->template->render('app::edit', [
    'form' => $form->asString($validationResult),
]));
```

If you don't want the values and messages injected for you, just leave out the validation result.

```php
echo $form->asString();
```

## Submit button detection

Who doesn't want to know which button is clicked? For this to work the submit button must have a name attribute set.

```html
<form>
    <input type="submit" name="confirm" value="Confirm" />
    <button type="submit" name="cancel">Cancel</button>
</form>
```

You can check by the button name attribute if a specific button is clicked.

```php
// Returns a boolean
$validationResult->isClicked('confirm');
```

Or get the name of the clicked button.

```php
// Returns the name of the clicked button or null if no named was clicked
$validationResult->getClicked();
```

## Custom Validators and Filters

Setting up custom validators and filters is a bit more work but it isn't complicated. Instead of creating the
FormFactory with its static `fromHtml` method, the constructor is needed with a configured `Zend\InputFilter\Factory`
and a `Psr\Container\ContainerInterface`.

```php
$config = [
    'zend-inputfilter' => [
        'validators' => [
            // Attach custom validators or override standard validators
            'invokables' => [
                'recaptcha' => Xtreamwayz\HTMLFormValidator\Validator\RecaptchaValidator::class,
            ],
        ],
        'filters'    => [
            // Attach custom filters or override standard filters
            'invokables' => [
            ],
        ],
    ],
];

// Create a container-interop compatible container with the custom validator configuration
$container = new Zend\ServiceManager\ServiceManager($dependencies);
$container->setService('config', $config);

// Use the InputFilterFactory to do all the work for you
$factory = new Xtreamwayz\HTMLFormValidator\InputFilterFactory();
$inputFilterFactory = $factory($container);

// Load the html form into the FormFactory
$formFactory = new FormFactory($inputFilterFactory);

// Create a form instance
$form = $formFactory->fromHtml($html);

// Validate the form
$result = $form->validate($_POST);

// Display the plain form
echo $form->asString();

// Display the form with the submitted values and validation messages
echo $form->asString($validationResult);
```

repository: Ocramius/html-form-validator

gha_license_id: MIT

repo_name: Ocramius/html-form-validator


text:
# Begonia serraticauda Merr. & L.M.Perry SPECIES

#### Status
ACCEPTED

#### According to
International Plant Names Index

#### Published in
J. Arnold Arbor. 24:51, t. 4f-g. 1943

#### Original name
null

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/cloud-application-security-sample)](https://api.reuse.software/info/github.com/SAP-samples/cloud-application-security-sample)

# Cloud Application Security Samples

## Description
Implementing security in SAP BTP Applications?
The SAP BTP offers specific support to implement authentication and authorization for business users that access SAP BTP applications. As a developer of such applications you have different options how to leverage the possibilities that SAP BTP offers. In this repository we want to showcase how this can be done. These samples demonstrate several different technologies to implement security authentication and authorization. Specifically, they integrate to SAP BTP XSUAA service using one of SAP's Container Security Libraries.

## Overview of Samples
Each sample is provided in a separate module.

Module | Description | Availability | Prerequisite
---- | -------- | ---- | ---
[spring-security-basis](spring-security-basis) | This module shows how to implement basic access control in Spring-based SAP BTP applications. It leverages Spring Security 5.x and integrates to SAP BTP XSUAA service (OAuth Resource Server) using the SAP Container Security Library (Java), which is available on maven central. Furthermore the sample demonstrates a multi-tenancy setup and how to implement JUnit tests. | 2019-06 | [openSAP course: Cloud-Native Development with SAP CP](https://open.sap.com/courses/cp5) - Week 5
[spring-security-acl](spring-security-acl) | This module shows the usage of Spring Security ACL to implement instance-based access control in Spring-based SAP BTP applications. Furthermore the sample demonstrates a multi-tenancy setup and how to implement JUnit tests. | 2019-01 | Module: [spring-security-basis](spring-security-basis)

## Understanding OAuth 2.0 Components
To better understand the content of this repository, you should gain a rough understanding about the SAP BTP OAuth 2.0 components, which are depicted in figure below.

![](images/Figure_OAuth2.0_SAP_CP_Components.png)

#### OAuth Resource Server
First, we still have a **microservice** or CF application that we want to secure. In OAuth terminology this is the **Resource Server** that protects the resources by checking the existence and validity of an OAuth2 access token before allowing a request from the Client to succeed.

#### OAuth Access Token (JWT)
Access and refresh tokens in the form of **JSON Web Token (JWT)** represent the user’s identity and authorization claims. If the access token is compromised, it can be revoked, which forces the generation of a new access token via the user’s refresh token.

Example JWT
```json
{
  "client_id": "sb-xsapplication!t895",
  "cid": "sb-xsapplication!t895",
  "exp":<PHONE_NUMBER>,
  "user_name": "John Doe",
  "user_id": "P0123456",
  "email"<EMAIL_ADDRESS>  "zid": "1e505bb1-2fa9-4d2b-8c15-8c3e6e6279c6",
  "grant_type": "urn:ietf:params:oauth:grant-type:saml2-bearer",
  "scope": [ "xsapplication!t895.Display" ],
  "xs.user.attributes": {
    "country": [
      "DE"
    ]
  }
}
```

#### OAuth Authorization Server
Furthermore we have the **Extended Services for User Account and Authentication (XSUAA)** that acts as **OAuth Authorization Server** and issues authorization codes and JWT tokens after the user was successfully authenticated by an identity provider. Technically the XSUAA is a SAP-specific extension of CloudFoundry’s UAA service to deal with authentication and authorization.

#### OAuth Client
The **Application Router (approuter)** is an edge service that provides a single entry point to a business application that consists of several backend microservices. It acts as reverse proxy that routes incoming HTTP requests to the configured target microservice, which allows handling Cross-origin resource sharing (CORS) between the microservices. It plays a central role in the OAuth flow.

Just like HTTP, token-based authentication is stateless, and therefore for scalability reasons an OAuth Resource Server must not store a JWT. The consequence would be that the JWT is stored client side as it must be provided with every request. Here, the Application Router takes over this responsibility and acts an **OAuth Client** and is mainly responsible for managing authentication flows.

The Application Router takes incoming, unauthenticated requests from users and initiates an OAuth2 flow with the XSUAA. After the user has successfully logged on the Identity Provider the XSUAA considers this request as authenticated and uses the information of the Bearer Assertion to finally create a JWT containing the authenticated user as well as all scopes that he or she has been granted. Furthermore the Application Router enriches each subsequent request with the JWT, before the request is routed to a dedicated microservice (instance), so that they are freed up from this task.

> In this flow it is important to notice that the JWT never appears in the browser as the Application Router acts as OAuth client where the user “authorizes” the approuter to obtain the authorizations - the JWT - from the XSUAA component.

#### Conclusion

You need to configure the Application Router for your business application as explained in the free [openSAP course](https://open.sap.com/courses/cp5) exercises:

- [Exercise 22: Deploy Application Router and Set Up Authentication](https://github.com/SAP/cloud-bulletinboard-ads/blob/Documentation/Security/Exercise_22_DeployApplicationRouter.md)
- [[Optional] Exercise 23: Setup Generic Authorization](https://github.com/SAP/cloud-bulletinboard-ads/blob/Documentation/Security/Exercise_23_SetupGenericAuthorization.md)

Note that the Application Router can be bypassed and the microservice can directly be accessed. So the backend microservices must protect all their endpoints by validating the JWT access token and implementing proper scope checks.

In order to validate an access token, the JWT must be decoded and its signature must be verified with one of the JSON Web Keys (JWK) such as public RSA keys. Furthermore the claims found inside the access token must be validated. For example, the client id (`cid`), the issuer (`iss`), the audience (`aud`), and the expiry time (`exp`).
Hence, every microservice has to maintain a service binding to the XSUAA that provides the XSUAA url as part of `VCAP_SERVICES` to get the current JWKs and has to configure the XSUAA as OAuth 2.0 Resource Server with its XSUAA access token validators by making use of one of SAP's Container Security Libraries.

## How to obtain support
For any question please [open an issue](https://github.com/SAP/cloud-application-security-sample/issues/new) in GitHub and make use of the [labels](https://github.com/SAP/cloud-application-security-sample/labels) in order to refer to the sample and to categorize the kind of the issue.

# License
Copyright (c) 2019-2020 SAP SE or an SAP affiliate company. All rights reserved.
This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSES/Apache-2.0.txt) file.

gha_language: Java


text:
### Train locally

```
python HousingTrain.py --model-file=trained_ames_model.dat --train-input=ames_dataset/train.csv
```

### Serve on Kubernetes

Set a docker registry that you are authenticated to in the set_builder command.

```
fairing.config.set_builder('docker',
    registry='<YOUR-REGISTRY-HERE>',
    base_image="seldonio/seldon-core-s2i-python3:0.4")
```

Serve the model

```
python HousingServe.py
```

Query the endpoint that is given

```
curl -H "Content-Type: application/x-www-form-urlencoded" -d 'json={"data":{"tensor":{"shape":[1,37],"values":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]}}}' $PREDICTION_ENDPOINT
```

gha_language: Jsonnet


text:
---
layout: post
title: 'The Secret Building (Part 2 With Video!: Holy Crap There''s Stuff In It!)'
image: http://www.hunterdavis.com/content/images/2014/04/20140427_142938.jpg
date: '2014-04-28 01:15:53'
---

Check the video for how it went down.

Here’s how it went down if you can’t see the video. I invited some friends and family over, we moved some boxes, cut some more vines, and opened up the secret building!

[![20140427_142938](http://www.hunterdavis.com/content/images/2014/04/20140427_142938-300x225.jpg)](http://www.hunterdavis.com/content/images/2014/04/20140427_142938.jpg)

The walls were starting to rot (turns out only the foundation is concrete), and there were many spiders. There were no windows. I’ll probably tear it down and build something new on the foundation this summer.

And what did we find inside:

1. Old yard tools.
 2. A 203cc, american made roto-tiller. It’s HEAVY. I trucked it up to my garage to fix it up. It’s in pretty good shape, it almost starts! The gas stinks though, and I think it’s separated out. over the years.
 3.Old gas cans. One empty, one full. Gotta properly dispose of that.
 4. An old roof antenna.
 5. Spiders
 6. A gnome house lawn ornament
 7. Some old hoses

So ok, it’s not gold or silver, but it’s still a pretty sweet find, and a very satisfying conclusion to the adventure: The Secret Building. Outrageous!

Bonus stinger, we try to get it to start!

extension: markdown

gha_language: JavaScript


text:
# transfer learning
transfer learning in AI

## Recsys

## NLP
1. Transfer Learning across Low-Resource, Related Languages for Neural Machine Translation by Toan Q. Nguyen, David Chiang. arXiv 2017. <br>
Source: https://arxiv.org/abs/1708.09803,  Code: ,
* overlapping the vocabularies of transferred language sources by related language and byte pair coding (Neural Machine Translation of Rare Words with Subword Units, EMNLP 2016 http://www.aclweb.org/anthology/P16-1162)

2.

## CV

## General

## deep learning for recommender systems
1. https://github.com/robi56/Deep-Learning-for-Recommendation-Systems

repository: njuhugn/transferlearning

repo_name: njuhugn/transferlearning


text:
JAX-RS 2.0 Async HTTP
=========================
Simple JAX-RS 2.0 example of server-side async HTTP.  This is a chat application.

$ mvn jetty:run

Open your browser to http://localhost:8080/index.html
Open another tab or browser to same and chat.

FYI, some messages are lost because we are queuing response streams, and not the actual posted messages, but you get
the idea I hope.

repository: raphaelning/resteasy-client-android

repo_name: raphaelning/resteasy-client-android


text:
---
breadcrumbs:
- - /teams
  - Teams
page_name: devtools
title: DevTools
---

The DevTools team is an engineering team that maintains the
[Chrome DevTools](https://developer.chrome.com/docs/devtools/) -
the debugging tools and capabilities offered by Chromium.

Debugging is a critical part of the (Web) Developer's day-to-day
workflows, and we firmly believe that a great debugging experience
contributes significantly to the overall developer satisfaction
and success on the Web.

## What We believe

> Our mission is to deliver a **reliable**, **relevant**, and
> **delightful** debugging experience - universally available
> with **Chrome** - empowering developers to create helpful Web
> experiences.

See [go/chrome-devtools/strategy](http://go/chrome-devtools/strategy)
(Googlers-only) for more information.

## Design Documents

For proposing contributions, please refer to our [design
guidelines](https://chromium.googlesource.com/devtools/devtools-frontend/+/HEAD/docs/design_guidelines.md).

## Contact

The team uses a public mailing list for technical discussions, questions, and
announcements.

Email address: [devtools-dev<EMAIL_ADDRESS>
Web archives:
[devtools-dev](https://groups.google.com/a/chromium.org/forum/#!forum/devtools-dev)

## Bug Triage

The DevTools team is responsible for bugs filed for the
[Platform>DevTools](https://bugs.chromium.org/p/chromium/issues/list?q=component%3APlatform%3EDevTools)
component.

## Members

*<EMAIL_ADDRESS>(TLM)
*<EMAIL_ADDRESS>(PM)
*<EMAIL_ADDRESS>(TPM)
*<EMAIL_ADDRESS>(UXD)
*<EMAIL_ADDRESS>(UXD)
*<EMAIL_ADDRESS>(DevRel)
*<EMAIL_ADDRESS>(DevRel)
*<EMAIL_ADDRESS>*<EMAIL_ADDRESS>*<EMAIL_ADDRESS>*<EMAIL_ADDRESS>*<EMAIL_ADDRESS>*<EMAIL_ADDRESS>*<EMAIL_ADDRESS>*<EMAIL_ADDRESS>*<EMAIL_ADDRESS>

repository: iridium-browser/iridium-browser

repo_name: iridium-browser/iridium-browser


text:
KREPLA - Kivy REPL for Android
==============================

A Python REPL for Android created using Kivy.

A couple of other Python REPLs for Android already exist, but they try very
hard to act like the standard Python REPL. touch actions are just work-arounds
for annoying desktop assumptions. This REPL aims to be better designed for
mobile devices, specifically Android tablets and phones.

repository: brousch/krepla

repo_name: brousch/krepla


text:
---
title: A Simple Reader Monad Example
description: If you are looking for a simple Reader Monad example, then look no further.
author: sanjiv sahayam
tags: haskell
---

What is a Reader Monad?

The [Reader Monad](http://hackage.haskell.org/package/mtl-2.2.1/docs/Control-Monad-Reader.html) works within the context of a shared environment. But what does that mean?  An example could be that you need a database connection in every query function you execute. Or it could be some configuration options read from a file that are needed across a number of functions.

When trying to learn about the Reader Monad I've found most examples are convoluted or unnecessarily long. I hope to change that by providing a simple example that you can try out without too much head-spinning.

The Reader Monad is defined as:

```{.haskell}
type Reader r = ReaderT r Identity
```

One of the time-consuming things about learning the Reader Monad is that it is defined in terms of the ReaderT transformer (which is also a Monad). So now you have to learn multiple monads just to understand the Reader Monad. Annoying.

 And thanks to the type alias
above you can just about do that.

Because Reader is a Monad we can do stuff like this:

```{.haskell .scrollx}
import Control.Monad.Reader

let r1 = return 5 :: Reader String Int
```

We have created a simple Reader using the Monad's __return__ function.

If we check the type of r1:

```{.haskell}
:t r1
r1 :: Reader String Int
```

We see that we have created a Reader that takes in a String and returns an Int. The String is the "environment" of the Reader. So how can we get the Int value out of the reader? By running it of course! We can use the __runReader__ function to do that:

```{.haskell}
(runReader r1) "this is your environment"
5
```

__runReader__ is defined as:

```{.haskell}
runReader :: Reader r a -> r -> a
```

So __runReader__ takes in a Reader and an environment (__r__) and returns a value (__a__).

_Now notice that we didn't really do anything with the environment supplied to us._

What if we had a bunch of Readers and we wanted to __bind__ across them?

```{.haskell .scrollx}
import Control.Monad.Reader

tom :: Reader String String
tom = do
    env <- ask -- gives you the environment which in this case is a String
    return (env ++ " This is Tom.")

jerry :: Reader String String
jerry = do
  env <- ask
  return (env ++ " This is Jerry.")

tomAndJerry :: Reader String String
tomAndJerry = do
    t <- tom
    j <- jerry
    return (t ++ "\n" ++ j)

runJerryRun :: String
runJerryRun = (runReader tomAndJerry) "Who is this?"
```

The ask function is defined on [MonadReader](http://hackage.haskell.org/package/mtl-2.2.1/docs/Control-Monad-Reader.html#t:MonadReader).

```{.haskell .scrollx}
class Monad m => MonadReader r m | m -> r where
```

Let's ignore MonadReader for now and focus on the definition of the ask function:

```{.haskell}
ask :: m r
```

Basically the above gives you a Reader Monad with the environment in it. So if you need access to the environment you ask for it. :)

In the __tom__, __jerry__ and __tomAndJerry__ functions, we are working within the context of the Reader Monad. That allows us to __bind__ to the environment within the Reader. It also means that we need to __return__ all values within a new Reader as well.

The __tomAndJerry__ function binds to values from each Reader and then returns them combined in another Reader. We then run the whole lot in the __runJerryRun__ function with the help of __runReader__ and get the following output:

```{.haskell}
Who is this? This is Tom.
Who is this? This is Jerry.
```

I hope this simple example is useful in getting you started in using and thinking about the Reader Monad.

repository: ssanj/babyloncandle

repo_name: ssanj/babyloncandle


text:
# Training
DNN maker python script i used in my graduation assignment. Pembuat DNN yang saya digunakan untuk kebutuhan tugas akhir saya.

### The file structure are as below
.
+-- _Main_Folder ( i made it so i can do this recursively with other data)
|   |
|   +-- _train_test
|   |   +-- contains train and test data
|   +-- _model
|   |   +-- contains model saved by keras model.save()
|   +-- _hasil
|   |   +-- contains json file that has result from the training
|   +-- _history
|   |   +-- contains training history including accuracy and loss
|   +-- _report_testing
|   |   +-- contains reports of testing evaluation
|   +-- _label_testing
|   |   +-- contains the prediction of the test data

repository: lqill/Training

repo_name: lqill/Training


text:
# spectrogram_paint
Paint a floating point image and use it as a spectrogram to update audio output live

## Dependencies

Need python skimage

sudo apt install python-skimage

Create 32-bit float images with Gimp 2.9+ (actually any images probably work)

./load_32bit_tif.py ~/Documents/floatimage.tif ~/Documents/phaseimage.tif

The images need to be the same size.


text:
---
layout: post
categories: Leetcode
tags: [array]

---

Given n non-negative integers representing the histogram's bar height where the width of each bar is 1,
find the area of largest rectangle in the histogram.

Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3].
The largest rectangle is shown in the shaded area, which has area = 10 unit.

For example,

Given heights = [2,1,5,6,2,3], return 10.

#### Analysis

Solving the problem with O(n2) time complexity is trivial. At each position i, we scan at both
sides of i and looking for histograms that is higher than position i. Then we get the max rectangular area that include i.

We can also solve this problem in O(n) time. We scan the array from left to right, and stores
the position of unfinished subhistograms (heights[i] >= the height of the histogram)
in a stack. When one of the subhistogram finishes (height[i] < the height of the histogram),
we compare the area with the max area. We add a fake histogram of height 0 to finish the search process.

Be careful with the start and end position of each subhistogram.

- The end position is current position.
- The start position has two possibilities after poping a position,
which is the position of the min height of that subhistogram.
  1. stack is empty, start from 0.
  1. stack is not empty, start is the peak of stack plus 1.

```java
public int largestRectangleAreaStack(int[] height){
    if(height == null || height.length == 0)
        return 0;

    Stack<Integer> stack = new Stack<Integer>();
    int val = 0, max = 0, len, pos;

    for(int i = 0; i <= height.length; ){
        // add 0 to the end to finish the search process
        val = i < height.length ? height[i]:0;
        if(stack.empty() || val > height[stack.peek()]) {
            stack.push(i++);
        } else {//subhistogram finishes
            pos = stack.pop();
            if(stack.empty())
                len = i;
            else
                len = i - stack.peek() - 1;
            max = Math.max(max, len * height[pos]);
        }
    }

    return max;
}
```


text:
# Version 0.2.29

* Revert the change in 0.2.21 in favor of using `s3cmd info` over
  `s3cmd ls` to obtain updated_at information on files.

# Version 0.2.28

* Add exponential backoff logic to s3.put function.

# Version 0.2.27
* Turn off the LRU cache too when `cache = FALSE` in `s3read`.

# Version 0.2.26
* `options(s3mpi.num_retries)` now allows you to specify default number of retries globally.

# Version 0.2.25
* Automatically adds ending slashes to paths if they are missing when using
  `s3store`, `s3exists`, or `s3delete`.

# Version 0.2.24

* Add the ability to delete an object in s3 using `s3delete`.

# Version 0.2.23

* `s3path()` is exported.

# Version 0.2.22

* `s3read()` (with no arguments) is no longer supported.

# Version 0.2.21

* Fixed an issue where reading files that have the same prefix as another file
  on the S3 bucket generates a warning.
* Fix a more serious problem where writing and reading within the same minute
  produces incorrect results due to the s3cmd utility having *minute*-level
  rather than second-level granularity.

# Version 0.2.20

* Workaround for the silent but oh-so-deadly sporadic failure of s3cmd's put.
  By default we now check for the existence of the object when issuing a put,
  with the option to retry a number of times.

# Version 0.2.19

* Keep AWS.tools on a remote.

# Version 0.2.18

* Add remotes to DESCRIPTION.

# Version 0.2.17

* Explicitly create the directory of a file given by `tempfile()` to prevent
  rare errors wherein the directory does not exist and yields a
  file connection error. ([#41](https://github.com/robertzk/s3mpi/issues/41))

# Version 0.2.16

* Introduce an `s3mpi.disable_lru_cache` option as well as
  silently fail if storage to LRU does not succeed.

# Version 0.2.15

* Switch to `system2`, which should be more windows friendly, and allow
  the user to specify path to executable of s3cmd, by setting `options(s3mpi.s3cmd_path = '/usr/local/bin/s3cmd')`

# Version 0.2.13

* Fixup LRU cache to actually use size parameter option.

# Version 0.2.11

* A stylistic refactor of the package. The `.path` argument
  has been deprecated in `s3read` and `s3store` in favor of
  simply `path`.

# Version 0.2.9-10

* Remove the need to type a trailing slash in `.path`.

# Version 0.2.8

 * A hotfix for cache corruption, where data exists without metadata.
   It can happen if writing metadata ever fails.

# Version 0.2.7

 * Remove the `s3mpi.memoize_cache` global option, since it makes no sense.
   A user could have overwritten an S3 key in a different R session.

 * `s3exists(NULL)` now returns FALSE.  Fixes issue #22.

# Version 0.2.5-6

 * The `s3mpi.memoize_cache` global controls whether or not caching is
   [memoised](https://github.com/hadley/memoise). If set to `TRUE`, it would
   have the effect of keeping a common object in the R session instead of
   retrieving it from the cached file for each given s3 key. This can significantly
   speed up code that reads from the same S3 key multiple times within a
   single R session.

# Version 0.2.4

 * The safety check on `s3store` uses `safe = FALSE` by default now. The new
   function `s3put` is equivalent to `s3store` and should be used going forward
   if one does not wish to overwrite existing keys. The other approach was causing
   too many breaking changes to existing codebases.

# Version 0.2.2

 * Added a safety check for `s3store`. Now if you want to overwrite a key inside a bucket,
   you need to use `s3store(key, safe = FALSE)`. By default safe is set to `TRUE`.

# Version 0.2.0

 * Added a caching mechanism that will keep copies of files downloaded and
   uploaded to S3. Useful if local storage constraints are not an issue.
   To enable, set `options(s3mpi.cache = '~/.s3cache')` in your `~/.Rprofile`
   (or replace `'~/.s3cache'` with a directory of your choice).

gha_language: R


text:
---
layout: post
title:  "Enable ajax functionalify for datatables on rails"
date:   2014-05-09 06:30:00
comments: true
categories: rails datatables
---

This is part 2 of a 2-part tutorial series.

In this part two of this tutorial we will going to tech you have to enable Datatables with ajax functionality to our html table.

To enable datatables we have to two things

1. Generate custom datatable configuration file

1. Configure custom datatable configuration file for your model

1. Initialize datatables on the following files

(for this example we are going to work on user related files witch we already created on previous part of this tutorial)

  *  app/views/users/index.html.erb
  *  app/controllers/users_controller.rb
  *  app/assets/javascripts/users.js.coffee

### Generate custom datatable configuration file

```
rails generate datatable User
```

This will generate a file named `user_datatable.rb` in `app/datatables`.

### Configure custom datatable configuration file for your model(my case the file is user_datatable.rb)

**Before making any change the file will look like this**

```
# uncomment the appropriate paginator module,
# depending on gems available in your project.
# include AjaxDatatablesRails::Extensions::Kaminari
# include AjaxDatatablesRails::Extensions::WillPaginate
# include AjaxDatatablesRails::Extensions::SimplePaginator

def sortable_columns
  # list columns inside the Array in string dot notation.
  # Example: 'users.name'
  @sortable_columns ||= []
end

def searchable_columns
  # list columns inside the Array in string dot notation.
  # Example: 'users.name'
  @searchable_columns ||= []
end
```

* For `paginator options`, just uncomment the paginator you would like to use, given the gems bundled in your project. For example, if your models are using `Kaminari`, uncomment `AjaxDatatablesRails::Extensions::Kaminari`.

* For sortable_columns, assign an array of the database columns that correspond to the columns in our view table. For `example [users.name, users.phone]`. This array is used for sorting by various columns.

* For searchable_columns, assign an array of the database columns that you want searchable by datatables. For `example [users.name, users.phone]`

* For listing record from database to table you have to select what are all the attributes you are going to list on the html table on the `data` funciton.

```
def data
end
```

* For selecting query you have to define in this function

```
get_raw_records
```

**For this example project i have these requirements**

> I need searchable on these two attributes

1. name
1. phone

> And i need sortable columns for these two

1. name
1. phone

> And i would like to print the following attributes on the table

1. name
1. phone
1. address

> And i am using kaminari for pagination

**After making changes my UserDatatable.rb file will look like this**

```
class UserDatatable < AjaxDatatablesRails::Base
  # uncomment the appropriate paginator module,
  # depending on gems available in your project.
  include AjaxDatatablesRails::Extensions::Kaminari
  # include AjaxDatatablesRails::Extensions::WillPaginate
  # include AjaxDatatablesRails::Extensions::SimplePaginator

  def sortable_columns
    # list columns inside the Array in string dot notation.
    # Example: 'users.name'
    @sortable_columns ||= ['users.name' ,'users.phone']
  end

  def searchable_columns
    # list columns inside the Array in string dot notation.
    # Example: 'users.name'
    @searchable_columns ||= ['users.name' ,'users.phone']
  end

  private

  def data
    records.map do |record|
      [
        record.name,
        record.phone,
        record.address
      ]
    end
  end

  def get_raw_records
    User.all
  end

end
```

### Initialize datatables on the following files

  *  app/views/users/index.html.erb
  *  app/controllers/users_controller.rb
  *  app/assets/javascripts/users.js.coffee

**Initialize on view file (app/views/users/index.html.erb)**

```
<table id="users-table", data-source="<%= users_path(format: :json) %>">
  <thead>
    <tr>
      <th>Name</th>
      <th>Phone</th>
      <th>Address</th>
      <th colspan="3"></th>
    </tr>
  </thead>
  <tbody>
  </tbody>
</table>
```

**Initialize on controller index action on this file (app/controllers/users_controller.rb)**

```
  def index
    respond_to do |format|
      format.html
      format.json { render json: UserDatatable.new(view_context) }
    end
  end
```

**Initialize js on this file (app/assets/javascripts/users.js.coffee)**

```
$ ->
  $('#users-table').dataTable
    processing: true
    serverSide: true
    ajax: $('#users-table').data('source')
    pagingType: 'full_numbers'
```
**Congratulations** Now when you visit the app in your browser, at http://localhost:3000, you should see this:

![image from imgur](https://i.imgur.com/OpwQW3Z.png)

You have successfully integrated and enabled datatables on your project . Thank you for reading .

gha_language: CSS

gha_license_id: NOASSERTION


text:
# experimental-installations-group-7
School group assignment for Experimental Installations

## Installation

considering you have nodejs and yarn already installed on your system:

```Bash
git clone https://github.com/vgesteljasper/experimental-installations-group-7 game
cd game
yarn install
./node_modules/.bin/electron-rebuild
```


text:
A one-one association is established by pairing a `belongsTo` and a `hasOne` association (though the `hasOne` is often omitted).

Say we have two model tables, `Pug` and an `Owner`. We might associate them like so:

```javascript
Pug.belongsTo(Owner)
Owner.hasOne(Pug)
```

This means that a pug belongs to an owner, and an owner has one (and only one) pug.

By doing this, the following three things will happen/be available to use:

1. The Pug table will have a foreign key column, "ownerId", corresponding to a primary key in the Owner table.

*Pugs* - includes an ownerId!
```
id | name | createdAt | updatedAt | ownerId
```

*Owner* - no changes!
```
id | name | createdAt | updatedAt
```

2. Sequelize automatically creates two instance methods for pugs, "getOwner" and "setOwner". This is because we defined `Pug.belongsTo(Owner)`. Likewise, owners get two instance methods, "getPug" and "setPug" (because we defined `Owner.hasOne(Pug)`).

```javascript
pug.getOwner() // returns a promise for the pug's owner

pug.setOwner(ownerInstanceOrID) // updates the pug's ownerId to be the id of the passed-in owner, and returns a promise for the updated pug

owner.getPug() // returns a promise for the owner's pug

owner.setPug(pugInstanceOrID) // updates the passed-in pug's ownerId to be the id of the owner, and returns a promise for the updated pug
```

3. Sequelize will allow us to "include" the pug's owner, or the owner's pug in queries.

```javascript
const pugsWithTheirOwners = await Pug.findAll({
  include: [{model: Owner}]
})

console.log(pugsWithTheirOwners[0])
// looks like this:
// {
//   id: 1,
//   name: 'Cody',
//   ownerId: 1,
//   owner: {
//     id: 1,
//     name: 'Tom'
//   }
// }
```

Likewise (but note that if we do omit the `Owner.hasOne(Pug)`, this is not possible):

```javascript
const ownersWithTheirPug = await Owner.findAll({
  include: [{model: 'Pug'}]
})

console.log(ownersWithTheirPug[0])
// looks like this:
// {
//   id: 1,
//   name: 'Tom',
//   pug: {
//     id: 1,
//     name: 'Cody',
//     ownerId: 1
//   }
// }

```

repository: FullstackAcademy/SequelizeGuides

repo_name: FullstackAcademy/SequelizeGuides


text:
# Setup on any system
Coming soon to a movie theatre near you

# Manual setting up backend on Bucknell's linuxremote
1. Make sure that you have a `config.json` and `deployment.json` file in the root directory of the repo. If you don't, read instructions in `/README.md`

2. Run the folowing commands to make sure you are using python 3.6
```
module load python/3.6
```

3. Run the following commands to install all necessary python packages
```
pip install --user --upgrade google-auth flask flask-mysql
```

4. Go to the `scripts` directory and run the flask starting script
```
./restart_flask.sh
```

# Using the api
Each of these end points need to be accessed by an http request to `https://eg.bucknell.edu/energyhill/{endpoint}` where `{endpoint}` which is described below.  Each http request needs to be accompanied with parameters described below.

Generally, hardcoding the URL shouldn't be in code, but instead you should use the deployment config setup (information found in `/README.md`)

## Reading from the DB
- `{endpoint}`: `read`
- allowed http requests: `GET`
- parameters:
    - `table`: the table which to pull data from. Must be a valid table in the DB.
    - `fields`: the column names which should be retrieved. Must be valid column of `table`
    - `condition_fields`: the condition field to compare a value equal to.  Must be a valid column name for `table` or `null` (if `null`, then values must also be `null`)
    - `condition_values`: the values that must match up with the `condition_fields` to make a condition. Each subsequent field/value pair will be `AND`ed with the others.
- form: `SELECT fields FROM table WHERE condition_fields[0] = condition_values[0] AND condition_fields[1] = condition_value[1] AND ...`
- returns: JSON serialization of DB output

## Inserting into the DB
- `{endpoint}`: `insert`
- allowed http requests: `POST`
- parameters:
    - `idtoken`: the token that Google Auth gives to the client
    - `table`: the table which to insert data into. Must be a valid table in DB.
    - `fields`: the column names which should be inserted into. Must be valid columns in `table`.
    - `values`: the values to place into the fields in the same order that the fields are in
- form: `INSERT INTO table (fields) VALUES (values)`
- returns: JSON serialization of DB output

## Update the DB
- `{endpoint}`: `update`
- allowed http requests: `POST`
- parameters:
    - `idtoken`: the token that Google Auth gives to the client
    - `table`: the table which to update data from. Must be valid table in DB.
    - `fields`: the columns of which to update information with. Must be valid columns in `table`
    - `values`: the values to update into the fields columns in the same order that the fields are in.
    - `condition_fields`: the condition field to compare a value equal to.  Must be a valid column name for `table` or `null` (if `null`, then values must also be `null`)
    - `condition_values`: the values that must match up with the `condition_fields` to make a condition. Each subsequent field/value pair will be `AND`ed with the others.
- form: `UPDATE table SET (fields[0] = values[0], fields[1] = values[1], ...) WHERE condition_fields[0] = condition_values[0] AND condition_fields[1] = condition_value[1] AND ...`
- returns: JSON serialization of DB output

## Delete from the DB
- `{endpoint}`: `delete`
- allowed http requests: `POST`
- parameters:
    - `idtoken`: the token that Google Auth gives to the client
    - `table`: the table which to delete data from. Must be valid table in DB.
    - `condition_fields`: the condition field to compare a value equal to.  Must be a valid column name for `table` or `null` (if `null`, then values must also be `null`)
    - `condition_values`: the values that must match up with the `condition_fields` to make a condition. Each subsequent field/value pair will be `AND`ed with the others.
- form: `DELETE FROM table WHERE condition_fields[0] = condition_values[0] AND condition_fields[1] = condition_value[1] AND ...`
- returns: JSON serialization of DB output

## Get the User Profile
- `{endpoint}`: `get-profile`
- allowed http requests: `POST`
- parameters:
    - `idtoken`: the token that Google Auth gives to the client
- returns: JSON serialization of all profile information for user log in

## Get all of the sensors with project information
- `{endpoint}`: `get-all-sensors`
- allowed http requests: `GET`
- parameters: None
- returns: JSON serialization of all sensors and their project information

## Ask admins for approval for user
- `{endpoint}`: `request-access`
- allowed http requests: `POST`
- parameters:
    - `idtoken`: the token that Google Auth gives to the client, needs to be for the user that wants access
- returns: nothing

## Approve user for dashboard access
- `{endpoint}`: `approve-user`
- allowed http requests: `POST`
- parameters:
    - `idtoken`: the token that Google Auth gives to the client, needs to be admin user
    - `userid`: the userid from the DB that is to be approved access
- returns: nothing

## Upload a file
- `{endpoint}`: `store-code`
- allowed http requests: `POST`
- parameters:
    - `idtoken`: the token that Google Auth gives to the client, needs to be admin user
    - `deviceid`: the deviceid from the DB that the code is to uploaded to
    - file: a `.hex` file to be uploaded (see `web/control-panel/codeupload.html` for an example)
- returns: nothing

## Download a file
- `{endpoint}`: `download-code`
- allowed http requests: `GET`
- parameters:
    - `uploadid`: the uploadid from the DB that specifies the code upload
- returns: the `.hex` file requested

## Log error message after attempt at code upload
- `{endpoint}`: `log-error`
- allowed http requests: `POST`
- parameters:
    - `deviceid`: the deviceid from the DB that the code upload was attempted on
    - `error_msg`: the full error message to be saved and relayed
- returns: nothing

## Log success message after attempt at code upload
- `{endpoint}`: `log-success`
- allowed http requests: `GET`
- parameters:
    - `deviceid`: the deviceid from the DB that the code upload was attempted on
- returns: nothing

## Check for status of code upload
- `{endpoint}`: `check-error`
- allowed http requests: `GET`
- parameters:
    - `deviceid`: the deviceid from the DB that is waiting to be attempted at code upload
- returns: the error message for the device if failure and `SUCCESS` if success

## Get the most recent reading for a sensor
- `{endpoint}`: `get-sensor-last-reading`
- allowed http requests: `GET`
- parameters:
    - `sensorid`: the id of the sensor that you want the most recent reading from
- returns: json with one key - `value` which corresponds to the data of the most recent reading

## Change the admin status of user
- `{endpoint}`: `set-admin-status`
- allowed http requests: `POST`
- parameters:
    - `idtoken`: the token that Google Auth gives to the client, needs to be admin user
    - `userids`: the userids of the users to have their isAdmin status set to adminstatus
    - `adminstatus`: the status that is to be set for the users. Must be strictly either `0` or `1`
- returns: empty string on success, 503 status if user is denied access

## Get the project that the user doesn't own
- `{endpoint}`: `get-all-others-projects
- allowed http requests: `GET`
- parameters:
    - `userId`: the userid of the user whose projects should not be included
- returns: list of objects that contain projectId and name that aren't owned by user

repository: BucknellSustainability/Flower

branch_name: refs/heads/dev

repo_name: BucknellSustainability/Flower


text:
## About

**WARNING** The current Canon DICOMs (18 Sept, 2020 V6.0SP2000*) do not report phase encoding polarity, and does not adjust the reported gradient directions with respect to phase encoding polarity. The included series 9000 and 10000 illustrate this issue. This means that the FSL-format bvec files created will incorrect for AP acquisitions: the polarity of the y-component must be inverted. This is a limitation of the images, not the conversion software. If you use DSI Studio, you should select the [Check b-table]( http://dsi-studio.labsolver.org/Manual/Reconstruction#TOC-Check-b-table) function. If you use FATCAT you should run [GradFlipTest](  https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/FATCAT/GradFlipTest.html). For FSL and other tools, you will need to compensate for this issue.

dcm_qa_canon is a simple DICOM to NIfTI validator script and dataset to test conversion of Canon (né Toshiba) diffusion tensor imaging. Specifically, to ensure that the DICOM gradient vector direction are transformed to match the FSL standard. Note that different vendors use [different conventions](https://www.na-mic.org/wiki/NAMIC_Wiki:DTI:DICOM_for_DWI_and_DTI) to report gradient directions. The goal is to convert these to [FSL's bvec format](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FDT/FAQ#What_conventions_do_the_bvecs_use.3F) which is in [image space](http://justinblaber.org/brief-introduction-to-dwmri/).

The images were acquired on a Canon Galan 3T by Clément Debacker at Le Groupe Hospitalier Universitaire Paris.

Inspection of the DICOM header tags reveals that these images do not [report diffusion gradients in typical tags](https://www.na-mic.org/wiki/NAMIC_Wiki:DTI:DICOM_for_DWI_and_DTI). Rather, the gradient direction is inserted into the [image comments](http://dicomlookup.com/lookup.asp?sw=Tnumber&q=(0020,4000)) field. The gradient orientation appears to reflect coordinates with respect to the scanner bore (like Siemens, Philips and UIH), rather than the image space (like GE):

```
 (0018,9087) FD 1500                                     #   8, 1 DiffusionBValue
 (0020,4000) LT [b=1500(0.445,0.000,0.895)]              #  26, 1 ImageComments
```

The provided dataset adjust the acquisition orientation (axial, coronal, sagittal) and the image angulation. The rationale is to identify whether an image-space or world-space frame of reference is used, and to ensure that these are accurately transformed to FSL's image space format. A [dedicated document](https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage#Diffusion_Tensor_Imaging) describes this procedure.

## Series

* 9000_DTI_PA-ortho
  * Description: Axial acquisition with no angulation (image space aligned to world).  posterior to anterior phase encoding.

* 10000_DTI_AP-ortho
  * Description: Axial acquisition with no angulation (image space aligned to world).  anterior to posterior phase encoding.

* 11000_DTI_PA-SAG_20d
  *  Description: Sagittal acquisition with 20-degree angulation, posterior to anterior phase encoding.

* 12000_DTI_PA-AX_20d
  * Description: Axial acquisition with with 20-degree angulation, posterior to anterior phase encoding.

* 13000_DTI_PA-COR_20d
  * Description: Coronal acquisition with with 20-degree angulation, posterior to anterior phase encoding.

* 14000_DTI_PA-ALL_20d
  *  Description: Sagittal acquisition with 20-degree angulation in each dimension (yaw, pitch, roll), posterior to anterior phase encoding.

* 32000_DTI_PA-ortho-HT
  * Description: Axial acquisition with no angulation (image space aligned to world), posterior to anterior phase encoding. Head turned of about 45 degrees on the right.

* 33000_DTI_PA-ortho-HT-VT
  * Description: Axial acquisition with angulation to match anatomy), posterior to anterior phase encoding. Head turned of about 45 degrees on the right.

* 37000_SAG_DTI_PA-ortho
  * Description: Sagittal acquisition with no angulation (image space aligned to world).  posterior to anterior phase encoding.

* 38000_SAG_DTI_PA-COR_20d
  * Description: Sagittal acquisition 20-degree angulation, posterior to anterior phase encoding.

* 39000_SAG_DTI_PA-ALL_20d
  * Description: Sagittal acquisition with 20-degree angulation in each dimension (yaw, pitch, roll), posterior to anterior phase encoding.


text:
---
layout: text/textblock
---
Reusable content can mean two different things:
1. A content type that can be repurposed into different content types.
2. Content chunks that are created once and edited in one place but can be published in many places.

It also means that content should be written in a way so that it can be reused as required, on any other page or part of your website. This will save you designing the same content multiple times.

For example, you can manage content in your CMS, but have that same content displayed in various places on your website, other websites, publications or applications etc.

It’s also helpful to clearly define when you want to reuse content in more than one place.

To create content types, you’ll need to:
- understand what types of content to meet the needs of your users
- what types of content you need for your business objectives
- define and develop the components and attributes of each content type

repository: govau/service-manual

repo_name: govau/service-manual


text:
# Progressive Web Application Starter Kit

[![](https://img.shields.io/badge/Lighthouse%20Report-100%25-brightgreen.svg?style=flat)](https://github.com/GoogleChrome/Lighthouse/)

## Goals

Provide an easy to read `serviceWorker.js` that does the following:

- [x] Cache a specific set of files.
- [x] Cache files not included in the `serviceWorker.js` file.
- [x] Update cached files on page load.
- [x] Clear out old cache.
- [x] Return cached files when offline or server is unavailable.
- [x] Display an online/offline status.
- [ ] Display a message when the cache updates.

repository: neogeek/pwa-starter-kit

repo_name: neogeek/pwa-starter-kit


text:
# :star_struck: Hacktoberfest_2020 :star_struck:
![](https://github.com/chandrikadeb7/Hacktoberfest_2020/blob/main/readme%20pic.jpeg)

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

### This repository aims to help code beginners with their first successful pull request and open source contribution. :partying_face:

:star: Feel free to use this project to make your first contribution to an open-source project on GitHub. Practice making your first pull request to a public repository before doing the real thing!

:star: Make sure to grab some cool swags during Hacktoberfest by getting involved in the open-source community.

### This repository is open to all members of the GitHub community. Any member can contribute to this project! :grin:

:point_right: Repo Link : [https://github.com/chandrikadeb7/Hacktoberfest_2020](https://github.com/chandrikadeb7/Hacktoberfest_2020)

## What is Hacktoberfest? :thinking:
A month-long celebration from October 1st to October 31st presented by [Digital Ocean](https://hacktoberfest.digitalocean.com/) and [DEV Community](https://dev.to/) collaborated with [GitHub](https://github.com/blog/2433-celebrate-open-source-this-october-with-hacktoberfest) to get people involved in [Open Source](https://github.com/open-source). Create your very first pull request to any public repository on GitHub and contribute to the open-source developer community.

[https://hacktoberfest.digitalocean.com/](https://hacktoberfest.digitalocean.com/)

## Rules :fire:
To qualify for the __official limited edition Hacktoberfest shirt__, you must register [here](https://hacktoberfest.digitalocean.com/) and make four Pull Requests (PRs) between October 1-31, 2020 (in any time zone). PRs can be made to any public repo on GitHub, not only the ones with issues labeled Hacktoberfest. This year, the __first 70,000__ participants who complete the challenge will earn a T-shirt.

## Choose from these tasks :rainbow:

Here are 3 quick and easy ways to contribute to this project:

## Task 1: [Add your program question and solution](https://github.com/chandrikadeb7/Hacktoberfest_2020/tree/main/Task%201) :innocent:
Add any programming question and its solution in a separate folder and make your way to Open Source.

:star: The file structure will be as follows:

```
<name of program>/
├── question.md
├── <solution> (Solution file in any language including C/Java/Python etc.)
```

:eyes: Upload your contribution here in this folder [Task 1](https://github.com/chandrikadeb7/Hacktoberfest_2020/tree/main/Task%201)

## Task 2: [Submit your Own portfolio page](https://github.com/chandrikadeb7/Hacktoberfest_2020/tree/main/Task%202) :eyes:
Host your very own portfolio page in minutes and share with us to get nearer to swags

You can take help from one of my blogs :point_right: [Visit Blog](https://medium.com/analytics-vidhya/portfolio-website-the-beginners-way-d43be855217e)

:star: The file structure will be as follows:

```
<your name>/
├── <all files/folders> (In any language including C/Java/Python etc.)
```

:eyes: Upload your contribution here in this folder [Task 2](https://github.com/chandrikadeb7/Hacktoberfest_2020/tree/main/Task%202)

## Task 3: [Show Your Algorithm Skills](https://github.com/chandrikadeb7/Hacktoberfest_2020/tree/main/Task%203) :rocket:
Help us in making a one-stop place to find necessary codes and articles, which can vary from `Hello World` to `Dynamic Programming` in any language of your choice.
:star: The file structure will be as follows:

```
<algorithm name>/
├── <implementation file> (With commented sample input/output. In any language including C/Java/Python etc.)
```

:eyes: Upload your contribution here in this folder [Task 3](https://github.com/chandrikadeb7/Hacktoberfest_2020/tree/main/Task%203)

## Choose one or all 3, make a pull request for your work and wait for it to be merged! :heart:

## Steps to follow :scroll:

### 0. Star The Repo :star2:

Star the repo by pressing the topmost-right button to start your wonderful journey.

### 1. Fork it :fork_and_knife:

You can get your own fork/copy of [HacktoberFest_2020](https://github.com/chandrikadeb7/Hacktoberfest_2020) by using the Fork button or clicking [this](https://github.com/chandrikadeb7/Hacktoberfest_2020/new/master?readme=1#fork-destination-box) at top-right of your screen.

 [![Fork Button](https://help.github.com/assets/images/help/repository/fork_button.jpg)](https://github.com/chandrikadeb7/Hacktoberfest_2020)

### 2. Clone it :busts_in_silhouette:

`NOTE: commands are to be executed on Linux, Mac, and Windows(using Powershell)`

You need to clone (download) it to local machine using

```sh
$ git clone https://github.com/Your_Username/Hacktoberfest_2020.git
```

> This makes a local copy of the repository in your machine.

Once you have cloned the `Hacktoberfest_2020` repository in Github, move to that folder first using change directory command on Linux, Mac, and Windows(PowerShell to be used).

```sh
# This will change directory to a folder Hacktoberfest_2020
$ cd Hacktoberfest_2020
```

Move to this folder for all other commands.

### 3. Set it up :arrow_up:

Run the following commands to see that *your local copy* has a reference to *your forked remote repository* in Github :octocat:

```sh
$ git remote -v
origin  https://github.com/Your_Username/Hacktoberfest_2020.git (fetch)
origin  https://github.com/Your_Username/Hacktoberfest_2020.git (push)
```

Now, let's add a reference to the original [Hacktoberfest_2020](https://github.com/chandrikadeb7/Hacktoberfest_2020/) repository using

```sh
$ git remote add upstream https://github.com/chandrikadeb7/Hacktoberfest_2020.git
```

> This adds a new remote named ***upstream***.

See the changes using

```sh
$ git remote -v
origin    https://github.com/Your_Username/Hacktoberfest_2020.git (fetch)
origin    https://github.com/Your_Username/Hacktoberfest_2020.git (push)
upstream  https://github.com/Remote_Username/Hacktoberfest_2020.git (fetch)
upstream  https://github.com/Remote_Username/Hacktoberfest_2020.git (push)
```
`In your case, you will see`
```sh
$ git remote -V
origin    https://github.com/Your_Username/Hacktoberfest_2020.git (fetch)
origin    https://github.com/Your_Username/Hacktoberfest_2020.git (push)
upstream  https://github.com/chandrikadeb7/Hacktoberfest_2020.git (fetch)
upstream  https://github.com/chandrikadeb7/Hacktoberfest_2020.git (push)
```

### 4. Sync it :recycle:

Always keep your local copy of the repository updated with the original repository.
Before making any changes and/or in an appropriate interval, run the following commands *carefully* to update your local repository.

```sh
# Fetch all remote repositories and delete any deleted remote branches
$ git fetch --all --prune

# Switch to `master` branch
$ git checkout master

# Reset local `master` branch to match the `upstream` repository's `master` branch
$ git reset --hard upstream/master

# Push changes to your forked `Hacktoberfest_2020` repo
$ git push origin master
```

### 5. Ready Steady Go... :turtle: :rabbit2:

Once you have completed these steps, you are ready to start contributing by checking our `Good First Issue` Issues and creating [pull requests](https://github.com/chandrikadeb7/Hacktoberfest_2020/pulls).

### 6. Create a new branch :bangbang:

Whenever you are going to contribute. Please create a separate branch using command and keep your `master` branch clean (i.e. synced with remote branch).

```sh
# It will create a new branch with name Branch_Name and switch to branch Folder_Name
$ git checkout -b BranchName
```

Create a separate branch for contribution and try to use the same name of the branch as of folder.

To switch to the desired branch

```sh
# To switch from one folder to other
$ git checkout BranchName
```

To add the changes to the branch. Use

```sh
# To add all files to branch Folder_Name
$ git add .
```

Type in a message relevant for the code reviewer using

```sh
# This message get associated with all files you have changed
$ git commit -m 'relevant message'
```

Now, Push your awesome work to your remote repository using

```sh
# To push your work to your remote repository
$ git push -u origin BranchName
```

Finally, go to your repository in the browser and click on `compare and pull requests`.
Then add a title and description to your pull request that explains your precious effort.

## Awesome contributors :star_struck:

Made with [contributors-img](https://contributors-img.web.app).

## Help Contributing Guides :crown:

We love to have `articles` and `codes` in different languages and the `betterment` of existing ones.

Please discuss it with us first by creating a new issue.

:tada: :confetti_ball: :smiley: _**Happy Contributing**_ :smiley: :confetti_ball: :tada:


text:
---
layout: post
title: "Food for Thought"
date: 2005-03-02 08:06
comments: true
categories: Life in General
author: Oliver Thylmann
---

Here's a list I just received of some interesting items. Most might already be widely known, if not all of them, but they still made me smile. Read on.

* Why lemon juice
is made with artificial flavor, while dishwashing liquid is made with real
lemons?*

*Why the man who invests
all your money is called a "Broker"?*

*Why there isn't mouse
flavored cat food?*

*Who tastes dog food
when it has a "new & improved" flavor?*

*Why Noah didn't swat
those two mosquitoes?*

*Why they sterilize the
needle for lethal injections?*

*Why they don't make
the whole plane out of the material used for the indestructible black box?*

*Why sheep don't shrink
when it rains?*

*Why they are called
apartments when they are all stuck together?*

*If con is the opposite
of pro, is Congress the opposite of progress?*

*Why they call the
airport "the terminal" if flying is so safe?*

*AND...*

*&nbsp;*

*In case you need
further proof that the human race is doomed because of stupidity, here are some
actual label instructions on consumer goods:*

*&nbsp;*

*_On a Myer hairdryer:_*

*-"Do not use
while sleeping".*

*(Darn, and that's the
only time I have to work on my hair).*

*_On a bag of Chips:_*

*-â€œYou could be a
winner!&nbsp; No purchase necessary.&nbsp; Details insideâ€?.*

*(The shoplifter
special?)*

*_On a bar of Palmolive
soap:_*

*-"Directions:&nbsp; Use
like regular soap".*

*(And that would be
how???)*

*_On some frozen
dinners:_*

*-"Serving
suggestion:&nbsp; Defrost".*

*(But, it's just a
suggestion).*

*_On Nanna's Tiramisu
dessert (printed on bottom):_*

*- "Do not turn
upside down".*

*(Well...duh, a bit
late, huh)!*

*_On Marks & Spencer
Bread Pudding:_*

*-"Product will be
hot after heating".*

*(And you
thought????...)*

*_On packaging for a
K-Mart iron:_*

*"Do not iron
clothes on body".*

*(But wouldn't this
save me more time?)*

*_On Boot's Children
Cough Medicine:_*

*"Do not drive a
car or operate machinery after taking this medication".*

*(We could do a lot to
reduce the rate of construction accidents if we could just get those 5 year
olds with head colds off those forklifts.)*

*_On Nytol Sleep Aid:_*

*"Warning: May
cause drowsiness".*

*(And...I'm taking this
because???)*

*_On most brands of
Christmas lights:_*

*"For indoor or
outdoor use only".*

*(As opposed
to...what?)*

*_On a Japanese food
processor:_*

*"Not to be used
for the other use".*

*(Now, somebody out
there, help me on this.&nbsp; I'm a bit curious.)*

*_On Nobby's peanuts:_*

*"Warning:
contains nuts".*

*(Talk about a news
flash!)*

*_On an American
Airlines packet of nuts:_*

*"Instructions:&nbsp; Open
packet, eat nuts".*

*(Step 3: maybe,
uh...fly Delta?)*

*_On a Swedish chainsaw:_*

*"Do not attempt
to stop chain with your hands or genitals".*

*(Was there a lot of
this happening somewhere?)*

* * I don't blame
the company, I blame the parents for this one:*

*_On a child's superman
costume:_*

*"Wearing of this
garment does not enable you to fly".*

*&nbsp;*

*Now that you've smiled
at least once, it's your turn to spread the stupidity and send this to someone
you want to bring a smile to (maybe even*

*a chuckle)...in other
words send it to everyone.&nbsp; We all need to smile every once in a while.*

I hope it made you smile too :)


text:
# wombat-projects
  This is the source code for the projects supplied with the Wombat prototyping board for Raspberry Pi,
  available from www.gooligum.com.au

  Written by David Meiklejohn for Gooligum Electronics.
  MIT license and all text above must be included in any redistribution

  To download, we suggest logging into your Pi with Internet accessibility and typing:

```bash
git clone https://github.com/gooligumelec/wombat-projects.git
```

repository: gooligumelec/wombat-projects

repo_name: gooligumelec/wombat-projects


text:
# linear-spherical-conformal-map

spherical_conformal_map: Conformally map a genus-0 closed triangle mesh to the unit sphere

This code computes spherical conformal (i.e. angle-preserving) maps of genus-0 closed triangle meshes using the linear method in [1], which has been applied for human brain mapping, texture mapping, surface registration, cardiac mapping and so on.
Any comments and suggestions are welcome.

If you use this code in your own work, please cite the following paper:
[1] P. T. Choi, K. C. Lam, and L. M. Lui,
    "FLASH: Fast Landmark Aligned Spherical Harmonic Parameterization for Genus-0 Closed Brain Surfaces."
    SIAM Journal on Imaging Sciences, vol. 8, no. 1, pp. 67-94, 2015.

Copyright (c) 2013-2018, Gary Pui-Tung Choi
https://scholar.harvard.edu/choi

===============================================================

Usage:
map = spherical_conformal_map(v,f)

Input:
v: nv x 3 vertex coordinates of a genus-0 triangle mesh
f: nf x 3 triangulations of a genus-0 triangle mesh

Output:
map: nv x 3 vertex coordinates of the spherical conformal map

repository: YinlinHu/linear-spherical-conformal-map

repo_name: YinlinHu/linear-spherical-conformal-map


text:
# Finland crypto FIFO tax calculator
> Calculate taxes for the Finnish government from your crypto tradings

Finnish government has [rules for taxation of different crypto
trades](https://www.vero.fi/en/detailed-guidance/guidance/48411/taxation-of-virtual-currencies3/).
The rules are quite complex compared to how easy it is to trade coins, so this
project aims to build an easy-to-use and free tool so you know to pay correct
amount of taxes.

## Try it out!

The website is live and accessible for free at:

https://kryptovero.fi

## Getting started

At the moment this project implements the examples from vero.fi as unit tests.
You can run the unit tests with `yarn test`.

Later this will be probably deployed as a webapp

## Developing

First run: Install dependencies with `yarn`.

After that the development is basic TDD using:

```
yarn test --watch
```

This watches all changed files automatically for changes and re-runs appropriate
tests when necessary. See `src/` folder for both unit tests and implementation.

### Deployment

This project is deployed to Netlify. All pull requests create a new test
environment and the `master` branch is deployed to production automatically.

## Features

This project
* Tries to implement the vero.fi specification as good as possible
* Is zero trust / low trust
  * User data never leaves user's own machine
* Is free to use
  * The easier it is to pay taxes, the more (hopefully) people do and it
    benefits everyone
* Has [an extensive test suite for the calculations](./ledger/src/)
  * All official examples from vero.fi are implemented as tests

## Contributing

This is a free and voluntary open source project. Pull requests are warmly
welcome. If you'd like to contribute, please fork the repository and use a
feature branch.

If you find any bugs or want to propose a new feature, please open a Github
issue to discuss.

## Licensing

The code in this project is licensed under MIT license.


text:
# Load testing scripts

## gce-loadtest.sh
Wraps [Artillery.js](https://artillery.io/) by starting a [GCE](https://cloud.google.com/compute/ "Google Compute Engine") instance, copying a vanilla Artillery Yaml config/scenario description file to the instance, running Artillery, then getting the results and report back to the host. Tears down the GCE instance after use. Artillery does not need to be installed locally to use this script.

The script keeps an ssh connection open to the box until the test is finished (or something crashes), you can watch the interim results coming from Artillery.

Language is Bash. Tested on Ubuntu 16.04.

### Usage:
1. Copy the [script](./gce-loadtest.sh) and the load test description Yaml file into the same directory.
2. Run `$ chmod +x gce-loadtest.sh`
3. Run `$ ./gce-loadtest.sh [OPTIONS --] <ARTILLERY_YAML>`

Options:
- **-h|--help** - display help and quit.
- **-m|--machine-type `<VALUE>`** - sets the machine type the load testing instance will be created from. Accepts values listed in the NAME column of the response from `gcloud compute machine-types list --zones <ZONE>`, where `<ZONE>` is the Availability Zone your local `gcloud compute` is set to. Default is "n1-highcpu-8".
- **-p|--project `<VALUE>`** - sets the GCP project id where the load testing instance will be created in. Default is whichever project the local gcloud is set to.
- **-z|--zone `<VALUE>`** - sets the compute zone where the load testing instance will be created in. Default is whichever zone the local gcloud is set to.
- **-k|--keep-instance** - doesn't delete the instance after the test finished.
- **-e|--env-var `<KEY=VALUE>`** - set environment variable.

To quickly test the script, you can use [loadtest-example.yml](./loadtest-example.yml) provided in the repo. There are many examples of artillery scenario definitions over the interwebz.

repository: davidfulop/scripts

repo_name: davidfulop/scripts


text:
Gateway Game
====
[![Build Status](https://travis-ci.org/Team-H/gateway.png?branch=develop)](https://travis-ci.org/Team-H/gateway)
[![Code Climate](https://codeclimate.com/github/Team-H/gateway.png)](https://codeclimate.com/github/Team-H/gateway)
[![Coverage Status](https://coveralls.io/repos/Team-H/gateway/badge.png?branch=develop)](https://coveralls.io/r/Team-H/gateway?branch=develop)
[![Release Status](http://img.shields.io/badge/release-sprint%204-03fcde.svg)](http://www.scrumwise.com/)
[![Dependency Status](https://david-dm.org/team-h/gateway.png)](https://david-dm.org/team-h/gateway)
[![devDependency Status](https://david-dm.org/team-h/gateway/dev-status.png)](https://david-dm.org/team-h/gateway#info=devDependencies)
[![Stories in Ready](https://badge.waffle.io/team-h/gateway.png?label=ready&title=Ready)](http://waffle.io/team-h/gateway)
[![License](http://img.shields.io/license/MIT.png?color=green)](http://opensource.org/licenses/MIT)
[![Gitter chat](https://badges.gitter.im/Team-H/gateway.png)](https://gitter.im/Team-H/gateway)

styleguide
====
Style guides are enforced by lint checkers configured to check complete adherence to the below styleguides

for python please follow the [PEP 8 styleguide](http://www.python.org/dev/peps/pep-0008/)
We have an autoformatter, please make sure autopep8 is installed, then run the autoPython.sh in gateway to format.

for javascript please follow the [JS Hint styleguide](http://www.jshint.com/)
We also have an autoformatter for javascript now, make sure you install jsbeautifier from pip and run the autoJS.sh from terminal

for templates please follow [valid HTML 5 standards](http://validator.w3.org/nu/) and [follow django best practices](https://oncampus.oberlin.edu/webteam/2012/09/architecture-django-templates)

for stylesheets please use [bootstrap](http://getbootstrap.com/) for modifying bootstrap follow [the SMACSS styleguide](http://smacss.com/)

testing code
===
###creating unit tests
####django
basic contraints
* page is accessible
* page is secure

####javascript
test core logic

testing of events, or of dependant libraries is a non-goal

###running unit tests
####django
```
./manage.py test gateway.tests
```

####javascript game
```
karma start karma.conf.js
```

modifying bootstrap
====
to customize bootstap styles please visit the bootstrap folder.
in the folder run
```sh
sudo npm install
cd boostrap
sudo npm install
```

to edit the style visit the less folder.
please make all edits to custom-bootstrap and custom-variables.
(if you make edits to additional modules please copy prefix with custom-modulename and update the custom-bootstrap to import the custom module)

to compile the less to css, then move it to the static folder
```sh
cd bootstrap
grunt dist
cd ..
./manage.py collectstatic
```

naming convensions
====
bootstrap mixins should use the class naming system

example bootstrap panel
``` html
<div class="panel panel-default">
  <div class="panel-heading">Panel heading without title</div>
  <div class="panel-body">
    Panel content
  </div>
</div>
```

in django the variables would be
``` django
<section class="panel panel-default">
  <div class="panel-heading">
    {{ header }}
  </div>
  <div class="panel-body">
    {{ body }}
  </div>
</section>
```

repository: davisk/gateway

repo_name: davisk/gateway


text:
In this example I want a MSSQL
  table that shows the current state of the
  Meter Aggregate. This is helpful in scenarios where
  you need to run quick ad hoc queries to view the
  current state.

 You may want this instead of Cosmos views, or
in addition to Cosmos views. For the example
we keep the Cosmos views and have this as an additional
way of viewing your current state.

 ### 1) Create a SQL database
 ### 2) Run this script to create your Meter views table.

 ---

 create table Meter
 (
     MeterId                   nvarchar(255) not null primary key,
     PostalCode                nvarchar(255),
     HouseNumber               nvarchar(255),
     IsActivated               bit,
     FailedActivationAttempts  int,
     LatestReadingDate         datetime,

     -- The next 2 lines should be on all tables. They allow code to decide if a change has been applied yet.
     LogicalCheckPoint_lsn     float         not null,
     LogicalCheckPoint_ItemIds nvarchar(max) not null
 )
 go

 create unique index Meter_MeterId_uindex
     on Meter (MeterId)
 go

---
 ### 3) Update the connection string in your project to point to your db
 You will find it in Projections/MSSQL/DBSchema/esdemo3Context.cs

 ### Notes)
  This Project already includes Projections/MSSQL/DBSchema/esdemo3Context.cs
  and Projections/MSSQL/DBSchema/Meter.cs

  Once the table is created you can run this script in your 'Projections' project root folder,
  and it will create your SQL EF code for you.

  You need to go to  Projections/MSSQL/DBSchema/esdemo3Context.cs  and set the connection string
 to match the database you created at Azure

 If you alter the table and you want to udpdate your .Net models use this with your correct connection string
 You should run it from the terminal in the Projections folder location
 dotnet ef dbcontext scaffold "server=myServer;database=myDb;user=myUser;password=myPassword;" "Microsoft.EntityFrameworkCore.SqlServer" -v -f --schema dbo -o MSSQL/DbSchema

repository: marctalcott/CosmosEventSourcing

gha_language: C#

repo_name: marctalcott/CosmosEventSourcing


text:
---
title: the Subsystem authorizations for Flexberry ASP.NET
sidebar: flexberry-aspnet_sidebar
keywords: Flexberry ASP-NET Flexberry Security
toc: true
permalink: en/fa_right-manager.html
lang: en
autotranslated: true
hash: e9e29d4afc3265fc82afb365362136e3824e6dd64a6ea92474694fade63db2a9
---

At the moment [subsystem powers](efs_right-manager-module.html) Web application does not require third-party services and comes along with the application in the generation of [Flexberry Designer](fd_flexberry-designer.html).

The database can be located in the application or in a separate database.

In the configuration file for configuration meets the following unit (Forms authentication):

```xml
<!-- Authority system -->
  <unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
    <alias alias="ISecurityService" type="ICSSoft.STORMNET.Security.ISecurityService, ICSSoft.STORMNET.DataObject" />
    <alias alias="CheckingInSessionMode" type="ICSSoft.STORMNET.Security.CheckingInSessionMode, CheckingLibrary" />
    <alias alias="singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity" />
    <container>
      <!-- System configuration authority. -->
      <register type="ISecurityService" mapTo="CheckingInSessionMode">
        <lifetime type="singleton" />
        <constructor>
          <!-- Here it is necessary to register the name of the application -->
          <param name="imprisone" type="System.String" value="WebApp" />
        </constructor>
      </register>
    </container>
  </unity>

  <authentication mode=Forms >
    <forms name=".ASPXFORMSAUTH" loginUrl="LoginForm.aspx" timeout="30" slidingExpiration="true" />
  </authentication>

  <authorization>
    <deny users="?" />
  </authorization>

  <membership defaultProvider="CaseberryMembershipProvider">
    <providers>
      <clear/>
      <add name="CaseberryMembershipProvider" type="ICSSoft.STORMNET.Security.CaseberryMembershipProvider" applicationName="SLAuthSample"/>
    </providers>
  </membership>

  <roleManager defaultProvider="CaseberryRoleProvider" enabled="true">
    <providers>
      <clear/>
      <add name="CaseberryRoleProvider" type="ICSSoft.STORMNET.Security.CaseberryRoleProvider" />
    </providers>
  </roleManager>
 ```

As well as the variant with Windows authentication:

```xml
<authentication mode="Windows" />

  <authorization>
    <deny users="?" />
  </authorization>

  <membership defaultProvider="CaseberryDomainMembershipProvider">
    <providers>
      <clear/>
      <add name="CaseberryDomainMembershipProvider" type="CheckingLibrary.Web.CaseberryDomainMembershipProvider, CheckingLibrary" applicationName="SLAuthSample"/>
    </providers>
  </membership>

  <roleManager defaultProvider="CaseberryDomainRoleProvider" enabled="true">
    <providers>
      <clear/>
      <add name="CaseberryDomainRoleProvider" type="CheckingLibrary.CaseberryDomainRoleProvider" applicationName="SLAuthSample" />
    </providers>
  </roleManager>
```

To use AzMan substitute providers.

Powers can also be configured using the [Security Console](efs_security-console.html).

## Add users to the database system of authority in windows authentication

Add users to the database system of authority when windows-authentication is described in the appropriate [article](fa_authentication-adapter.html).

## The creation of powers for classes for Flexberry ASP.NET

The creation of powers for classes for Flexberry ASP.NET described in the appropriate [article](fa_authority-classes.html).

## CaseberryDomainRoleProvider

Use `CaseberryDomainRoleProvider` described in the appropriate [article](fa_domain-role-provider.html).

## CaseberryMembershipProvider

Use `CaseberryMembershipProvider` described in the appropriate [article](fa_membership-provider.html).

## Web forms subsystem powers

The subsystem authorizations for the web-form described in [the Web forms subsystem powers](fa_security-forms.html).

## UserSettingsService

Use `UserSettingsService` described in the appropriate [article](fa_user-settings-service.html).


text:
# Google Cloud Storage Bucket Proxy

A proxy server to serve google cloud storage object to the web.

# Requirements

- Python3
- Flask
- Requests

# Using

Run from a machine having a service account, and ensure that the used service account have sufficient permission to read the bucket and the object you intent to serve via this proxy.

Export to the environment
- GCS_PROXY_STREAMING - set to 1 to enable response steam (disabled by default)
- GCS_BUCKET - set to the bucket name the proxy should serve
- GCS_PROXY_HEADER_EXCEPTION - set header to omit from google storage API, comma separated

```
$ export GCS_PROXY_HEADER_EXCEPTION=X-Goog-Metageneration,X-Goog-Storage-Class,X-Goog-Generation,X-GUploader-UploadID,X-Goog-Hash,Vary,Cache-Control,Pragma
$ export GCS_BUCKET=${BUCKET_NAME}
$ python3 gcs_proxy.py
```

You can invoke through any other wsgi server ( like gunicorn ).

It is also recommended that you run this through a reverve application proxy, which would take care of extra details (such as caching )


text:
# SQLiteXX
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/maxxboehme/SQLiteXX/blob/master/LICENSE.txt)
[![Travis CI Linux/Mac Build Status](https://travis-ci.org/maxxboehme/SQLiteXX.svg?branch=master)](https://travis-ci.org/maxxboehme/SQLiteXX)
[![AppVeyor Windows Build status](https://ci.appveyor.com/api/projects/status/wkrlgfv2p5mm5cgg/branch/master?svg=true)](https://ci.appveyor.com/project/maxxboehme/sqlitexx/branch/master)
[![Coverage Status](https://coveralls.io/repos/github/maxxboehme/SQLiteXX/badge.svg)](https://coveralls.io/github/maxxboehme/SQLiteXX)

## What is SQLiteXX
An object oriented designed C++ wrapper for [sqlite3](https://www.sqlite.org) that uses features in C++14.

## How to use it
The following links will direct you to helpful documents on how to use SQLiteXX.

* [Tutorial](docs/tutorial.md) - Getting Started
* [Doxygen](https://maxxboehme.github.io/SQLiteXX/doxygen/html) - Documentation for the API
* [Reference](docs/ReadMe.md) - all the details

## How to build it
You will need a compiler that supports C++14. The Travis-CI YAML file shows some of the supported and tested compilers.

Using the following commands should allow you to build SQLiteXX on Windows, Linux, and Mac.
```Shell
git clone https://github.com/maxxboehme/SQLiteXX.git
cd SQLiteXX
mkdir build
cd build

# Generate Visual Studio project, XCode project, Makefiles or any ther build systems CMake supports.
cmake ..

# Build
cmake --build .
```

### Dependencies
* An STL implementation that supports C++14 featurs.
* The SQLite library either by linking statically or dynamically. (The CMake script files will either find the library if there is a version installed on your system or will download and build it during the build process.)
* Catch which is a automated test framework for C++ and is only needed if building the automated tests. (The CMake script files will either find the library if there there is a version installed on your system or will download and build it during the build process.)

## Multithreading
This wrapper does not add any other thead-safety mechanism above what the SQLite library itself provides. You can read what SQLite
already provides in their page, [Using SQLite In Multi-Threaded Applications](http://www.sqlite.org/threadsafe.html).

## More
* Issues and bugs can be raised on the [Issue tracker on Github](https://github.com/maxxboehme/SQLiteXX/issues)

repository: maxxboehme/SQLiteXX

repo_name: maxxboehme/SQLiteXX


text:
# resource.yaml file options

``` yaml
appwans:
- action: { e.g. create, get, delete }
  endpoints: { list of endpoint names to be added }
  name: { name for the appwan}
  services: { list of services to be added }
environment: {NF Console Environment, e.g. Production }
gateway_list:
- action: { e.g. create, get, delete }
  cloud: { public cloud, e.g. azure }
  count: 1
  names: { empty, will be filled in by script }
  region: { cloud region that gateways will be deployed in}
  regionalCidr: { list of IP address space in Resource group}
  regkeys: { empty, will be filled in by script }
  resourceGroup:
    name: { Azure Resource Group name used/created }
    region: { Azure Resource Group region used/created }
  tag: { text }
network_action:  { e.g. create, get, delete }
network_name: { network name to use }
services:
- action: { e.g. create, get, delete}
  gateway: { name of the gateway used for this service}
  ip: (destination ip for the service)
  name: {empty, automatically generated and populated by the wrapper script}
  port: (destination port for the service)
  type: { e.g. host, network; host only enabled in this script right now}
terraform:
  bin: { path to terraform binary}
  output: { boolean e.g. no or yes}
  source: ./quickstarts/docs/terraform { where the terraform module is located e.g. azure }
  work_dir: . { directory where the terraform from main plan file to be installed }
```

repository: netfoundry/mop

gha_language: Python

repo_name: netfoundry/mop


text:
# Data analysis

In this document I go through some or all the data structures that will be used in the project (depending on the spare time I have 😄).

# City

Cities should be referred to them by name and country (in case of namesakes), name and city id (zip code), geographic coordinates.

Cities should be able to present or link to their public institutional website; I think also a quick way to send feedbacks should be present therefore there should be contact info like addresses, phone numbers and maybe opening hours and days.

A list of "subcities" should be present as those may have other collection policies. Here in Italy we have the [__comune__](https://en.wikipedia.org/wiki/Comune) and several smaller [__frazioni__](https://en.wikipedia.org/wiki/Frazione) inside of it and in several (if not all) of them the collection days are different.

## Example of a City model

| Data _Name_       | Type          | Details                                        |
| ----------------- | ------------- | ---------------------------------------------- |
| City Name         | `String`      | Name of the city                               |
| Submunicipalities | `City[]`      | List of smaller "cities" inside the city.      |
| City ID           | `String`      | ID (Zip code/_CAP_ in Italy e.g.) of the city. |
| Country           | `Enum/String` | Name of the country.                           |
| Contact Info      | `ContactInfo` | Links to public offices addresses and as such. |
| Coordinates       | `Location`    | Geographic coordinates.                        |

# Collection info

Every garbage collection should have the usual days of the week, the frequency of the collection and maybe even the time of the day of the collection.

Since separate collection exists in many countries, it should be supported OOTB. Separate collection involves determining what kind of waste is collected in each collection (metal, glass, plastic, organic, not recyclable, etc.).

## Example of a Collection info model

| Data _Name_      | Type             | Details                                                                                |
| ---------------- | ---------------- | ------------------------------------------------------------------------------------------------------------- |
| Day of the week  | `Integer/String` | Day of the week: could be integer starting from monday or sunday (depending on locale) or just plain strings. |
| Frequency        | `Frequency`      | Dedicated object that defines occurence repetitions.                                                          |
| Waste Collection | `Enum/String`    | Option from a predefined list or just normal strings.                                                         |

# Other

Since garbage collection is something that often is repeated regularly (exceptions can be found only during festivities and in critical environments (like staff strikes, any kind of disasters, etc.)), there should be a "generator" that takes the calendar and for each collection places a collection event on it based on day of the week and frequency.

repository: niktekusho/smart-garbage-collection

repo_name: niktekusho/smart-garbage-collection


text:
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](#license)

  # Note Taker

  ## Description

  This application is used to take notes and save to an array of objects in the server. When the app is loaded and the user clicked on the "Get Started" button, the user is presented with the list of the notes he/she has taken. In the new window of the app, the user has the option to delete existing notes, and add new notes and save to the server.  The application will generate a uniqe id for each record and when the user deletes a record, the app rearranges the id's so that it is unique continuous.

![note2](https://user-images.githubusercontent.com/42190239/97248265-c5ddff80-17d7-11eb-858b-9c42b1b485c0.PNG)

![note](https://user-images.githubusercontent.com/42190239/97248275-cb3b4a00-17d7-11eb-908b-1f0f42f953d4.PNG)

  ## Table of Contents

  * [Installation](#installation)

  * [Usage](#usage)

  * [License](#license)

  * [Contributing](#contributing)

  * [Tests](#tests)

  * [Questions](#questions)

  ## Installation

  You can get the application in my GitHub repository and use it.

  ## Usage

  This is application envolves server side coding. To utilize this app for personal purpose, you should deploy to server such as Heroku.

  ## License

  Apache License v2.0

  ## Contributing

  To contribute to this project, you can reach me to my contact information found below in Questions section.

  ## Tests

  Deploy the app and test for bugs

  ## Questions

  [Yigezu Birhane](https://yigezu1.github.io/Yigezu1/)

<EMAIL_ADDRESS>
  Reach out to me if you want to contribute, fix bugs or add functionality.


text:
---
layout: default
---

This is a show for **Dr ZHAO**. He is a great man. His wife, _Lijun ZHANG_, is also a great woman.

[academic pages](https://www.researchgate.net/profile/Tuan_Zhao).

# Rapid and Effective Synthesis of α‑Acyloxy-α-alkynyltrimethylsilanes

α-Alkynyl-α′-trimethylsilylhydrazones are readily oxidized into diazo compounds under simple experimental conditions. These stable diazo species can in turn react with a range of carboxylic acids via a protonation−nucleophilic substitution sequence, leading to valuable α-acyloxy-α-alkynyltrimethylsilanes. This procedure avoids the delicate preparation and manipulation of α-hydroxypropargyltrimethylsilanes.

## Expedient Synthesis of 1,4-Benzodiazepines via a Tandem Condensation/[1,5]-Hydride Transfer/Cyclization Process

An expedient approach to 1,4-benzodiazepines via a tandem condensation/[1,5]-hydride shift/cyclization process has been developed. This transformation started from readily available o-amino benzaldehyde and aminomalonate and was promoted by low-cost FeCl3 with high step and atom economy.

### Zinc Chloride Catalyzed Stereoselective Construction of Spiropyrazolone Tetrahydroquinolines via Tandem [1,5]-Hydride Shift/Cyclization Sequence

```js
A zninc chloride catalyzed tandem 1,5-hydride shift/cyclization
process to form spiropyrazolone terahydroquinoline derivatives is
developed. A series of new spiropyrazolone derivatives were
obtained in good to high yields with good to excellent
diastereoselectivities (up to 95% yield, >95:5 dr). Additionally, the
spiropyrazolone derivatives could be converted into the
corresponding novel spriopyrazolines.
```

#### A ZnCl2-Catalyzed Knoevenagel Condensation/1,5-Hydride Shift/Cyclization Sequence: Synthesis of Novel Spiroisoxazol-5-one Tetrahydroquinolines

*   A concise synthesis of novel spiroisoxazol-5-one tetrahydroquinoline derivatives has been developed by an efficient
ZnCl2-catalyzed stereoselective Knoevenagel Condensation/1,5-
hydride shift/cyclization sequence. The reactions are broad in
scope and the products could be obtained in good to high
yields (up to 97% yield) with good to excellent diastereoselectivities (up to >95:5 dr). In addition, these products
may be converted into novel 5-hydroxy-spiroisoxazolines and
spiropyrazolones.

### Small image

![Octocat](https://raw.githubusercontent.com/flylikethefish/flylikethefish.github.io/main/IMG_20200715_200952-1080x675.jpg)

```
The final element.
```


text:
BigQuery_Helper provides a helper class to simplify common read-only BigQuery tasks.
It currently only works within kernels on [Kaggle](kaggle.com/) as it has no functionality for logging in to BigQuery.

You can see a working example in [this Kaggle kernel](https://www.kaggle.com/sohier/introduction-to-the-bq-helper-package/).