text:
# pokemon-go-rankings
List of all pokemon, ranked by stats, automatically generated by script. Use `data/config.json` to customize sorting and grouping.

Pokemon data swiped from [BrunnerLivio's pokemongo-data-normalizer](https://raw.githubusercontent.com/BrunnerLivio/pokemongo-data-normalizer/master/output/pokemon.json).

repository: proegssilb/pokemon-go-rankings

repo_name: proegssilb/pokemon-go-rankings


text:
## AtFileUploadComponent: at-file-upload

## Usage

Perfect component for file selection and upload in simple flows. Uses `AtFileInputComponent` internally.

Example for usage:

```html
<at-file-upload #fileUpload [(ngModel)]="files" defaultColor="accent" activeColor="warn" cancelColor="primary" (select)="selectEvent($event)"
  (upload)="uploadEvent($event)" (cancel)="cancelEvent()" accept=".ext,.anotherExt" [disabled]="disabled" multiple>
  <mat-icon>file_upload</mat-icon><span>{{ files?.name }}</span>
  <ng-template at-file-input-label>
    <mat-icon>attach_file</mat-icon>
    <span>
      Choose a file...
    </span>
  </ng-template>
</at-file-upload>
```

```typescript
export class Demo {

  files: File | FileList;
  disabled: boolean = false;

  selectEvent(files: FileList | File): void {
    if (files instanceof FileList) {
      ...
    } else {
      ...
    }
  }

  uploadEvent(files: FileList | File): void {
    if (files instanceof FileList) {
      ...
    } else {
      ...
    }
  }

  cancelEvent(): void {
    ...
  }
}
```

## API Summary

Properties:

| Name | Type | Description |
| --- | --- | 650--- |
| `defaultColor` | `string` | Sets browse button color. Uses same color palette accepted as [MatButton] and defaults to 'primary'.
| `activeColor` | `string` | Sets upload button color. Uses same color palette accepted as [MatButton] and defaults to 'accent'.
| `cancelColor` | `string` | Sets cancel button color. Uses same color palette accepted as [MatButton] and defaults to 'warn'.
| `multiple` | `boolean` | Sets if multiple files can be dropped/selected at once in [AtFileUploadComponent].
| `accept` | `string` | Sets files accepted when opening the file browser dialog. Same as "accept" attribute in `<input/>` element.
| `disabled` | `boolean` | Disables [AtFileUploadComponent] and clears selected/dropped files.
| `upload` | `function($event)` | Event emitted when upload button is clicked. Emits a [File or FileList] object.
| `select` | `function($event)` | Event emitted when a file is selected. Emits a [File or FileList] object.
| `cancel` | `function()` | Event emitted when cancel button is clicked.

## Setup

Import the [CovalentFileModule] in your NgModule:

```typescript
import { CovalentFileModule } from '@covalent/core';
@NgModule({
  imports: [
    CovalentFileModule,
    ...
  ],
  ...
})
export class MyModule {}
```

## atFileService

## Usage

Service provided with methods that wrap complexity for as easier file upload experience.

Recieves as parameter an object that implements the [IUploadOptions] interface. You have to assign a value either to `[file]` or to `[formData]`. If `[file]` is assigned then `[formData]` will be ignored; when only `[formData]` is assigned then it will be sent as form data.

```typescript
interface IUploadOptions {
  url: string;
  method: 'post' | 'put';
  file?: File;
  headers?: {[key: string]: string};
  formData?: FormData;
}
```

Example for usage:

```typescript
import { AtFileService, IUploadOptions } from '@covalent/core';
...
  providers: [ AtFileService ]
})
export class Demo {

  file: File;

  constructor(private fileUploadService: AtFileService){
  };

  uploadEvent1(file: File) {
    let options: IUploadOptions = {
      url: 'https://url.to/API',
      method: 'post',
      file: file
    };
    this.fileService.upload(options).subscribe((response) => {
      ...
    });
  };

}
```

## API Summary

Methods:

| Name | Type | Description |
| --- | --- | 650--- |
| upload | function(IUploadState) | Uses underlying [XMLHttpRequest] to upload a file to a url. Will be depricated when angular fixes [Http] to allow [FormData] as body.

---

license: MIT

repository: dbartumeu/atomic-ui

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: dbartumeu/atomic-ui


text:
# Spinal Tap resolves soundtrack dispute

Published at: **2019-11-06T13:19:00+00:00**

Author: **The Associated Press, Staff**

Original: [www.ctvnews.ca](https://www.ctvnews.ca/entertainment/spinal-tap-resolves-soundtrack-dispute-1.4672326)

LONDON -- The principal players behind the "This Is Spinal Tap" film have resolved their dispute with Universal Music Group over the soundtrack.
Harry Shearer, Christopher Guest, Michael McKean and Rob Reiner have issued a statement saying UMG will continue to distribute Spinal Tap's recordings, and eventually the rights will go back to them as the creators.
Shearer had filed the original lawsuit in 2016, alleging the four had earned less than US$100 in music sales income and $81 in merchandising income between 1984 and 2006.
Guest, McKean and Reiner joined the lawsuit in 2017. Their complaint against film production company Studio Canal is ongoing.

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
ABSTRACT
========

	- manage running of applications of any type (java, C, etc)
	- easily start and stop applications as-needed
	- easily visualize the state of applications

NEED
====

	- UI
	- registry of applications
		- name of application instance
		- command(s) to execute
	- persistence backing for registry
	- Output storage to file (or other) for large output

repository: amlinv/app-mgr-svc

repo_name: amlinv/app-mgr-svc


text:
xlsx-to-seats
=============

Convert spreadsheet file to Rails console code to generate seats.

[![Circle CI](https://circleci.com/gh/caiguanhao/xlsx-to-seats.svg?style=svg)](https://circleci.com/gh/caiguanhao/xlsx-to-seats)

LICENSE: MIT

repository: caiguanhao/xlsx-to-seats

repo_name: caiguanhao/xlsx-to-seats


text:
---
layout: page
title: About Me
subtitle: Machine Learning Researcher at Borealis AI,
Novartis,
PhD in Computer Science
---
Welcome to my website!
My name is Hossein Sharifi-Noghabi. I was born and raised in a city named Mashhad, in northeast of Iran. I received my Ph.D. in Computer Science at Simon Fraser University and Vancouver Prostate Centre in 2021. My main focus is to develop/apply state-of-the-art robust learning systems using transfer learning, adversarial learning, multi-task learning, and domain generalization. During my Ph.D. I worked on transfer learning in precision oncology and pharmacogenomics. Between 2021 and 2022, I was at Novartis under AI4Life Residency Program where I worked on machine learning for data integration on SomaScan proteomics data in collaboration with Data42 and the Novartis Institute for Biomedical Research (NIBR). Currently, I am a machine learning researcher at Borealis AI - Vancouver office.

### Employment

Machine Learning Researcher, October 2022-Present
  - Vancouver office (Vancouver, Canada).

AI4Life Resident, Sep 2021-Sep 2022
  - Data42 Team, Novartis (Basel, Switzerland).

Admin Support (Research), June 2020-May 2021
  - Princess Margarent Cancer Centre, University Health Network (Toronto, Canada).

### Education

Ph.D. in Computer Science, Sep 2016-Sep 2021
  - Simon Fraser University, Burnaby, BC, Canada.

M.Sc. in Artificial Intelligence, Sep 2012-Feb 2015
  - Ferdowsi University of Mashhad, Iran.

B.E. in Information Technology, Sep 2008-Aug 2012
  - Sadjad University of Technology (former Sadjad Institute of Higher Education), Mashhad, Iran.


text:
#Podcast Profile for ProcessWire

Podcast feed generation/publishing platform for the ProcessWire CMS

## About the Podcast Profile

Manage your podcasting with ProcessWire! The Podcast Profile is a fully featured iTunes podcast publishing platform built using nothing more than ProcessWire's basic fields/templates/pages system. Automatically generates an XML feed for submission to iTunes. Fully implements the iTunes podcasting specification (https://www.apple.com/itunes/podcasts/specs.html) and supports managing an unlimited number of podcasts and episodes from the same installation. Accommodates both on-site and off-site file hosting.

## Instructions

1. Upload a fresh copy of ProcessWire to your server.

2. Extract the PodcastProfile-master folder from the zip file to the root directory of the new installation.

3. Rename the folder to site-PodcastProfile <- IMPORTANT!

4. Install ProcessWire as usual. When asked to select a site profile, choose "Podcast Profile".

5. Once installed, you can add a new Podcast via the "Add New" menu in the upper right portion of the admin panel.

6. Fill out the podcast details and then begin adding episodes under the podcast page, or via the "Add New" menu.

7. The XML file for each podcast is generated at http://www.yoursite.com/podcast-name/ (The url of the podcast page)

8. Use this URL to submit the podcast to iTunes at https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast

-----

Copyright 2014 by Michael Spooner

repository: thetuningspoon/PodcastProfile

repo_name: thetuningspoon/PodcastProfile


text:
# reStructuredText language support in Atom

Adds snippets and syntax highlighting for reStructuredText files (`.rst`/`.rest`).

Originally [converted](https://atom.io/docs/latest/converting-a-text-mate-bundle) from the [reStructuredText TextMate bundle](https://github.com/textmate/restructuredtext.tmbundle).

Contributions are greatly appreciated.

## Related links
- [Quick language reference](http://docutils.sourceforge.net/docs/user/rst/quickref.html)
- [Package at Atom.io](https://atom.io/packages/language-restructuredtext)

repository: Lukasa/language-restructuredtext

gha_language: JavaScript

gha_license_id: MIT

repo_name: Lukasa/language-restructuredtext


text:
# LEMMA Static Analyzer Docker Image
The `lemma/static_analyzer` Docker image bundles LEMMA's
[Static Analyzer](https://github.com/SeelabFhdo/lemma/tree/main/de.fhdo.lemma.analyzer)
in an executable form.

## Using the `run_model_processor.py` Script to Execute the Image
To facilitate the usage of the image, we provide the `run_model_processor.py` Python
script located in the `/scripts` folder of LEMMA's repository. The Python script generalizes the execution of LEMMA model processors from the command line and therefore expects as its first argument the path to a model processor execution specification in the YAML file format.

When executed with such a specification, the script will first take care of the local availability of the `lemma/static_analyzer` Docker image and guide
the user to install it, if it does not exist already. Furthermore, the script
simplifies the command line invocation of the Static Analyzer. To this end,
the script is executable from the command line with Python 3 and expects the
following arguments:
- `-b`: Base path. This is the base path for all model files. It will be mounted
        as a volume in the Docker container.
- `-i`: Intermediate model: This is the intermediate model file. It must be
        stated relative to the base path. All static analyses basically happen on this file.

Optional command line arguments:
- `--additional_intermediate_model`: Additional intermediate model file to consider for static
                                     analysis. The argument excepts the assignment of the
                                     additional intermediate model file relative to the given base
                                     path. The argument may occur more than once for different
                                     intermediate model files.
- `--analysis_module`: Module for the static analysis to execute. By default, the Static Analyzer
                       executes all modules being applicable to the given intermediate model files.
                       The argument may occur more than once for different analysis modules.
- `--csv_file`: Absolute path to a CSV file that shall receive the results of a static analysis.
- `--csv_column_prefix`: Additional prefix for columns in the CSV file.
- `--csv_variable_separator`: Separator for variable parts of a CSV column, e.g., the name of a
                              microservice. Defaults to an underscore. This argument does **not**
                              impact the separator for CSV values, which is always a semicolon.
- `--print_value_store`: Print the contents of the store of collected analysis values (for
                         debugging purposes).

### Example Usage
The example concerns the analysis of two microservices from two different service models. Suppose the following file system structure on the host that executes the script:
- Intermediate service model for Microservice 1:
    `/home/user/intermediate models/service models/Service1.xmi`
- Intermediate service model for Microservice 2:
    `/home/user/intermediate models/service models/Service2.xmi`

Execution of the script to analyze the microservices and store the results in the CSV file `/tmp/analysis.csv`:
```bash
/scripts/run_model_processor.py \
    /de.fhdo.lemma.analyzer/docker/execution.yaml \
    -b "/home/user" \
        -i "intermediate models/service models/Service1.xmi" \
        --additional_intermediate_model="intermediate models/service models/Service2.xmi" \
    --csv_file="/tmp/analysis.csv"
```

The script will derive a `docker run -i` command from the above command line
parameters as follows:
```bash
docker run -i \
    -v "/home/user":"/home/user" \
    -v "/tmp":"/tmp" \
    -u $(id -u ${USER}):$(id -g ${USER}) \
    lemma/static_analyzer:latest \
        -i "/home/user/intermediate models/service models/Service1.xmi" \
        --additional_intermediate_model="/home/user/intermediate models/service models/Service2.xmi" \
        --csv_file="/tmp/analysis.csv"
```

repository: SeelabFhdo/lemma

branch_name: refs/heads/main

gha_language: Java

repo_name: SeelabFhdo/lemma


text:
# Rosetta
Rosetta is a project template to rapidly deploy Chisel and Vivado HLS accelerators on the Xilinx PYNQ platform. It uses the PlatformWrapper components from the fpga-tidbits framework for easy memory mapped register file management.

For Chisel accelerators, use the master branch. For Vivado HLS accelerators, use the hls branch.

## Requirements
1. A working Chisel2 and sbt setup.
2. Xilinx Vivado 2016.4 (make sure vivado is in PATH)
3. A PYNQ board with network access

## Quickstart
1. Clone this repository and cd into it
2. Run make pynq, this may take several minutes. This will create a deployment folder under build/rosetta
3. Run make rsync to copy generated files to the PYNQ board. You may have to edit the BOARD_URI variable in the Makefile to get this working.
4. Open a PYNQ terminal via ssh, and cd into ~/rosetta
5. Run sudo ./load_bitfile.sh to configure the FPGA with the bitfile
6. Try pressing the the buttons (BTN0..3) on the PYNQ to control the LEDs (LD0..3)
7. Run ./compile_sw.sh to compile the sample application
8. Run the sample application with sudo ./app
9. Enter two integers -- you should see their sum printed correctly, as computed by the FPGA accelerator.

## Under the Hood
1. Have a look at the hardware description under the src/main/scala -- the accelerator definition is in Accelerator.scala, the "entry point" for code generation is in Main.scala, and the infrastructure (where the magic happens) is in Rosetta.scala
2. Have a look at the example application under src/main/cpp/app -- note that it uses the auto-generated register driver to access the hardware signals. The register driver will be generated in build/hw/driver
3. Have a look at what the different Makefile targets generate inside the build/ folder. You can also try launching Vivado with the make launch_vivado_gui target after the project has been generated.

repository: thomaav/slamdunk

repo_name: thomaav/slamdunk


text:
# Smart-Queue-Monitoring-System

This project demonstrates how to detect people in queues (in order to redirect them to shortest queue) using inference on pre-trained neural network with Intel OpenVINO framework.

The purpose of this project is to choose the right hardware suitable for a particular scenario. See [Scenarios.md](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/Scenarios.md)

![](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/GIF%20Folder/Screenshot.png)

## Main Tasks
The following pages will walk you through the steps of the project. At a high level, you will:

 * Propose a possible hardware solution
 * Build out your application and test its performance on the DevCloud using multiple hardware types
 * Compare the performance to see which hardware performed best
 * Revise your proposal based on the test results

 ## Scenarios
 * Scenario 1: Manufaturing

    * Hardware: `FPGA`

 ![](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/GIF%20Folder/manufacturing.gif)

 * Scenario 2: Retail Sector
    * Hardware: `CPU and IGPU`

 ![](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/GIF%20Folder/retail.gif)

 * Scenario 3: Transport Sector
    * Hardware: `VPU`

  ![](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/GIF%20Folder/transport.gif)

 ## Results
 The application was tested on a number of hardware using the Intel DevCloud and the results can be accessed [here](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/choose-the-right-hardware-proposal-template.pdf).

 ## Requirements

### Hardware
* This project makes the use of Intel DevCloud to test on CPU, GPU, FPGA and VPU so no specific hardware is required..
### Software
* Intel® Distribution of OpenVINO™ toolkit 2019 R3 release.
* Python > 3.5, 3.6

## Intel DevCloud
The Intel® DevCloud for the Edge is a cloud service designed to help developers prototype and experiment with computer vision applications using the Intel® Distribution of OpenVINO™ Toolkit. Once registered, developers can access a series of Python and C++ based Jupyter Notebook tutorials and sample solutions and execute them directly from a web browser. Then, developers can create their own Jupyter Notebooks and quickly try them out on a variety of hosted Intel® hardware solutions specifically designed for deep learning inferencing.

The Intel® DevCloud for the Edge provides you with access to everything needed to begin working with sample applications, prototypes and tutorials. This includes pre-trained models, source code, test input images, video and data streams. Additionally, users can apply any of the pre-trained deep learning models available through the Intel® Distribution of OpenVino™ toolkit, or upload their own customized pre-trained deep-learning models to develop and test their own computer vision applications.

### Benefits of The Intel® DevCloud for the Edge
Reduced time to access comprehensive Intel® development solutions, hardware and software, for deep learning and computer vision application development with just an internet connection.
Access to fully configured physical edge machines pre-installed with the Intel® Distribution of OpenVINO™ Toolkit (CPU, iGPU, VPU and FPGA) hosted in the cloud powered by Intel® Xeon® Scalable processors.
Ability to evaluate and choose the right Intel® hardware acceleration option for your application.
A vast library of pre-trained models from the Intel® Distribution of OpenVINO™ Toolkit and ability to upload your own custom pre- trained models to evaluate the best framework, topology, and hardware acceleration solution for your unique application.

## Setup
**Install Intel® Distribution of OpenVINO™ toolkit**
Utilize the classroom workspace, or refer to the relevant instructions for your operating system for this step.

* [Linux/Ubuntu](https://github.com/Rishit-dagli/Smart-Queuing-System-On-Edge/blob/master/linux-setup.md)
* [Mac](https://github.com/Rishit-dagli/Smart-Queuing-System-On-Edge/blob/master/mac-setup.md)
* [Windows](https://github.com/Rishit-dagli/Smart-Queuing-System-On-Edge/blob/master/windows-setup.md)
## Get started with DevCloud
Much of the Intel® DevCloud for the Edge documentation can be accessed without registering. You will need to register for an Intel® DevCloud for the Edge account to explore, run the examples, upload your own code and test the hardware.

* On the Home page, click Sign in on the top right corner.
* Click Register and follow the prompts to enter the information requested.
* Within 48 hours you will receive an invitation email to your Intel® DevCloud for the Edge account.
* For increased security, the Intel® DevCloud for the Edge is protected by 2-factor authentication. Please check your email for the 6- digit security code. Copy/paste the full URL from that email containing the uuid argument into a browser window. All current web browsers are supported.
* Follow the prompts to complete your Intel DevCloud account registration.
* Once you have completed account registration, you can return any time to the Home page and click Sign in at the top right corner to access your account.
* Each time you sign in, the top right corner displays the total number of days you have access to the Intel® DevCloud for the Edge resource. You can request an extension from within the portal.

## Run the application
The figure below illustrates the user workflow for code development, job submission and viewing results.

![](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/GIF%20Folder/How-DevCloud-works.svg)

### Step 1 - Person Detection
* The [person_detect.py](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/person_detect.py) file does the person counting part for you. Try to experiment around with the threshold value and see how the predictions turn up.

### Step 2 - Job Submission
* The [queue_job.sh](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/queue_job.sh) is the utility which helps in the submission of the job to multiple devices on the DevCloud.

### Step 3 - Submitting the job
* The project includes 3 notebooks for different use cases-

* [Retail Scenario](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/Retail_Scenario.ipynb)
* [Manufacturing Scenario](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/Manufacturing_Scenario.ipynb)
* [Transportation Scenario](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/Transportation_Scenario.ipynb)

Each of the notebooks follow this process, be sure to change the original video location according to your system in each case.

### Submit to an Edge Compute Node with an Intel CPU
We write a script to submit a job to an [IEI Tank* 870-Q170](https://software.intel.com/en-us/iot/hardware/iei-tank-dev-kit-core) edge node with an [Intel Core™ i5-6500TE](https://ark.intel.com/products/88186/Intel-Core-i5-6500TE-Processor-6M-Cache-up-to-3-30-GHz-) processor.
The inference workload should run on the CPU.

```
cpu_job_id = !qsub queue_job.sh -d . -l nodes=1:tank-870:i5-6500te -F "[model_path] CPU [original_video_path] /data/queue_param/manufacturing.npy [output_path] 2" -N store_core
```

### Submit to an Edge Compute Node with CPU and IGPU
We write a script to submit a job to an [IEI Tank* 870-Q170](https://software.intel.com/en-us/iot/hardware/iei-tank-dev-kit-core) edge node with an [Intel® Core i5-6500TE](https://ark.intel.com/products/88186/Intel-Core-i5-6500TE-Processor-6M-Cache-up-to-3-30-GHz-). The inference workload should run on the Intel® HD Graphics 530 integrated GPU.

```
gpu_job_id = !qsub queue_job.sh -d . -l nodes=tank-870:i5-6500te:intel-hd-530 -F "[model_path] GPU [original_video_path] /data/queue_param/manufacturing.npy [output_path] 2" -N store_core
```

### Submit to an Edge Compute Node with a Neural Compute Stick 2
We write a script to submit a job to an [IEI Tank 870-Q170](https://software.intel.com/en-us/iot/hardware/iei-tank-dev-kit-core) edge node with an [Intel Core i5-6500te](https://ark.intel.com/products/88186/Intel-Core-i5-6500TE-Processor-6M-Cache-up-to-3-30-GHz-) CPU.
The inference workload should run on an [Intel Neural Compute Stick 2](https://software.intel.com/en-us/neural-compute-stick) installed in this node.

```
vpu_job_id = !qsub queue_job.sh -d . -l nodes=tank-870:i5-6500te:intel-ncs2 -F "[model_path] MYRIAD [original_video_path] /data/queue_param/manufacturing.npy [output_path] 2" -N store_core
```

### Submit to an Edge Compute Node with IEI Mustang-F100-A10
We write a script to submit a job to an [IEI Tank 870-Q170](https://software.intel.com/en-us/iot/hardware/iei-tank-dev-kit-core) edge node with an [Intel Core™ i5-6500te](https://ark.intel.com/products/88186/Intel-Core-i5-6500TE-Processor-6M-Cache-up-to-3-30-GHz-) CPU.
The inference workload will run on the [IEI Mustang-F100-A10 FPGA](https://www.ieiworld.com/mustang-f100/en/) card installed in this node.

```
fpga_job_id = !qsub queue_job.sh -d . -l nodes=1:tank-870:i5-6500te:iei-mustang-f100-a10 -F "[model_path] HETERO:FPGA,CPU [original_video_path] /data/queue_param/manufacturing.npy [output_path] 2" -N store_core
```

### Step 4 - Compare performance
We then compare performance on these devices on these 3 metrics-

* Frames Per Second
* Model Load Time
* Inference Time

## License
The contents of this repository are covered under the [MIT License](https://github.com/ObinnaIheanachor/Smart-Queue-Monitoring-System/blob/master/LICENSE)


text:
---
title: "Synchrophasor lossy data compression based SVD-CE."
published: True
---

With the developing of high-reporting-rate phasor measurement units (PMUs), their data volume keeps growing.
This project combines the singular value decomposition (SVD) and the cross entropy to propose an efficient yet accurate lossy data compression approach.

View Repo


text:
---
layout: post
title:      "Devise Mailer "
date:       2018-05-20 18:00:10 -0400
permalink:  device_mailer
---

Devise is a great gem and provides a lot of functionality. Today I will expalin how I made a very simple app that utilizes Devise and uses its Mailer to send emails upon signing up and authorizes an email. For setting up Devise follow the following link

[Setting Up Devise](http://anniezh12.github.io/setting_up_devise_in_10_steps)

So far our app has functionality of  sidn up/signing in/signing out etc but we dont recieve ny email upon a sign up. Lets do it less than 10 steps

## Step 1
  Inside
**models/user.rb**  add **:confirmable**

```
 class User < ApplicationRecord
   # Include default devise modules. Others available are:
   # :confirmable, :lockable, :timeoutable and :omniauthable

   devise :database_authenticatable, :registerable,
          :recoverable, :rememberable, :trackable,:confirmable, :validatable
 end

```

### Step 2
Before proceeding further lets make sure we get all the messages by placing following two lines  in our **views/layouts/application.html.erb** before yield
```
<p class="notice"><%= notice %></p>
      <p class="alert"><%= alert %></p>
```

### Step 3

inside **app/mailers/application_mailer.rb **

add
default from:' something.com'
which will notify users of the website sending them email.

```
class ApplicationMailer < ActionMailer::Base
  default from: 'something.com'
  layout 'mailer'
end
```

### Step 4

Inside **config/environments/development.rb**, **config/environments/production.rb**,
**config/environments/test.rb**

add the following code

```
config.action_mailer.default_url_options =
  { :host => 'localhost3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  address:              'smtp.gmail.com',
  port:                 587,
  domain:               'heroku.com',
  user_name:            ENV['GMAIL_USERID'],
  password:             ENV['GMAIL_PASSWORD'],
  authentication:       'login',
  enable_starttls_auto: true
}
```

I will explain in a while what ENV['GMAIL_USERID'], ENV['GMAIL_PASSWORD'] are shortly.
For learning purposes you can add your gmail address and password in the above piece of code but make sure you dont commit it to github untill you have a look at Setting Up Environment Variable(step 7).

### Step 5

Inside **config/initializers/devise.rb**  modify true to false as follows
`config.reconfirmable = false`

### Step 6

Configure Your google Account as follows

1.Enable IMAP from your Gmail settings in Forwarding IMAP/POP tab
2. Allow less secure apps: ON from [here](https://myaccount.google.com/lesssecureapps)

### Step 7

It is very important for an application to have valuable data like password and emails hidden from general user. In order to accomplish that  we will save them in our environment variables  in a  **.env** file.

The ENV constant refers to a global hash for your entire computer environment.
 You can store any key-value pairs in this hash more over instead of setting this variable directly its better to use it using a gem called  **dotenv-rails** .

 1. lets first add **dotenv-rails** to Gemfile as
 2.
      `gem  'dotenv-rails' `

			and run bundle

2. Create a **.env** file at the root of app in this case** Mailer**

3. Add gmail address and password as follows

      GMAIL_USERNAME = "your gmail address"
      GMAIL_PASSWORD = " your gmail password"

4. Finally the most important step is to not forget to add .env file in .gitignore, which will actually hide all of our important info from  general public.

[Github Repo](http://https://github.com/anniezh12/DeviseMailer)

extension: markdown


text:
## Language Parser Builder

This project is a tool to generate an OpenRewrite lossless semantic tree (LST) model for a language. The LST model is the form that is suitable for search, transformation, and even serialization.

This project is a sort of template meant to be modified while generating an LST model and then reverted back to its current state once the new language binding is complete.

### To use

Replace all occurrences of `Toml` with the language you intend to build a parser for. Rename the packages ending in `toml`, file names containing `Toml`, and references in the code referring to `Toml`.

Update the `Assertions` class with the correct `@Language` annotation for your language (if there is one, otherwise remove them altogether), and update the method names to your language name.

The class `src/model/Toml` is meant to help you write a simplified version of the LST model. `GenerateModel` takes this simplified form and writes out the full LST model and fills out basic visitor navigation and printing methods. The generated methods in `TomlPrinter` (which will of course be renamed to the language you are implementing) are meant as a starting point. There will be further printing modification necessary, but the generator takes care of a lot of the repetitive work.

You can proceed incrementally, adding model objects and running the generator, implementing their print methods, etc. Or you can write out the entire model and generate once. The generator will not overwrite any existing methods, so iterative generation does not clobber your work.

### Completing the language parser

A partial series of steps needed to complete the language:

* Create a new directory `rewrite-LANGUAGE`
* Add your new language to the list of `allProjects` in `settings.gradle.kts`
* Add your new language to `IDE.properties.tmp`.

repository: sullis/rewrite

repo_name: sullis/rewrite


text:
# Plumber
Multiplexed inter-process communication framework based on plan 9's [plumber](https://9fans.github.io/plan9port/man/man4/plumber.html).

The goal is to implement something like the plan 9 plumber system, in python, for unix/linux platforms.

## Modules

* communication protocols and formats
  * between user and plumber server
  * between plumber and handler programs
* rules specification
  * configuration
    * config file
	* dynamic(command interface)
  * matching
    * regex

## Concerns & design philosophy

* Modularity and extensibility.

repository: DrPyser/plumber

repo_name: DrPyser/plumber


text:
# kubernetes-dbaas

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)

A Helm chart for the Kubernetes DBaaS Operator.

**Homepage:** <https://bedag.github.io/kubernetes-dbaas/>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| criscola |<EMAIL_ADDRESS>| https://github.com/criscola |

## Source Code

* <https://github.com/bedag/kubernetes-dbaas>

## Requirements

Kubernetes: `>= 1.21.0`

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` |  |
| automountServiceAccountToken | bool | `true` | Should the ServiceAccount of the manager Pod automount the SA Account Token? otherwise |
| dbc | string | `nil` | DatabaseClass (dbc) generator (optional). |
| dbmsSecrets | string | `nil` | Endpoint Secrets generator (optional). |
| enableMetricsRbac | bool | `true` | If set to true, enabled the deployment of the RBAC needed to protect the /metrics endpoint. |
| fullnameOverride | string | `""` |  |
| image.pullPolicy | string | `"IfNotPresent"` |  |
| image.repository | string | `"bedag/kubernetes-dbaas"` | Repository of the operator manager image. |
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` |  |
| livenessProbe.httpGet.path | string | `"/healthz"` |  |
| livenessProbe.httpGet.port | int | `8081` |  |
| livenessProbe.initialDelaySeconds | int | `15` |  |
| livenessProbe.periodSeconds | int | `20` |  |
| managerArgs | list | `[]` | Arguments passed to the Operator binary, e.g. "--debug=true". |
| managerSaName | string | `"kubernetes-dbaas-controller-manager"` | Manager service account name |
| nameOverride | string | `""` |  |
| nodeSelector | object | `{}` |  |
| operatorConfig | object | `{"dbms":null,"health":{"healthProbeBindAddress":":8081"},"leaderElection":{"leaderElect":true,"resourceName":"bfa62c96.dbaas.bedag.ch"},"metrics":{"bindAddress":"<IP_ADDRESS>:8080"},"rps":1,"webhook":{"port":9443}}` | Operator configuration including the relative Manager configuration. See<EMAIL_ADDRESS>|
| operatorConfig.dbms | string | `nil` | Describes the DBMS configuration. Each entry includes a "databaseClassName" attribute specifying the name of the DatabaseClass resource associated with the endpoints along with an "endpoints" attribute specifying the "name" of endpoint to be made available to end-users as well as its connection string (DSN). To learn more about the supported DSN formats, see: https://github.com/xo/dburl. |
| operatorConfig.rps | int | `1` | Specifies the maximum number of operations per second allowed per endpoint. Set to 0 to disable rate limiting. |
| podAnnotations | object | `{}` |  |
| podSecurityContext.runAsNonRoot | bool | `true` |  |
| prometheusNamespace | string | `"prometheus"` | Namespaces of where Prometheus is deployed. It is required for discovering the ServiceMonitor used to scrape the metrics. |
| prometheusSaName | string | `"prometheus-kube-prometheus-prometheus"` | Name of the Service Account allowed to scrape the metrics endpoint. |
| prometheusSaNamespace | string | `"prometheus"` | Namespace of the Service Account allowed to scrape the metrics endpoint. |
| readinessProbe.httpGet.path | string | `"/readyz"` |  |
| readinessProbe.httpGet.port | int | `8081` |  |
| readinessProbe.initialDelaySeconds | int | `5` |  |
| readinessProbe.periodSeconds | int | `10` |  |
| replicaCount | int | `1` |  |
| resources | object | `{"limits":{"cpu":"200m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"20Mi"}}` | Allocating less resources might create problems |
| securityContext | object | `{}` |  |
| terminationGracePeriodSeconds | int | `10` | The termination grace period of your operator manager container. |
| tolerations | list | `[]` |  |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)

repository: grooverdan/kubernetes-dbaas

repo_name: grooverdan/kubernetes-dbaas


text:
## Dialog

Harlowe doesn't have a user-accessible dialog system, so this script creates one and adds a macro for accessing it.

![Dialog example](dialog.jpg)

> **Get the Code**
>
> - [Minified](https://github.com/ChapelR/harlowe-macro-api/blob/master/examples/minified/dialog.min.js)
> - [Pretty](https://github.com/ChapelR/harlowe-macro-api/blob/master/examples/dialog.js)
>
> **Required CSS**
>
> - [Minified](https://github.com/ChapelR/harlowe-macro-api/blob/master/examples/minified/dialog.min.css)
> - [Pretty](https://github.com/ChapelR/harlowe-macro-api/blob/master/examples/dialog.css)

### Macro: `(dialog:)`

This macro opens the dialog box and adds the indicated title and classes, if any. The attached hook is then rendered into the box.

#### Syntax

```
(dialog: [title] [, classList])[ ... ]
```

#### Arguments

- `title` ( *`string`* ) ( optional ) The string to render into the title area of the dialog. If omitted, the title area will still be present, just blank.
- `classList` ( *`string`* | *`string array`* ) ( optional ) You may pass a single string of space separated class names (e.g. `"my-class another-class a-third-class"`), an array of strings, or simply list several different strings as arguments to the macro to have them added to the `#dialog-frame` element of the dialog box (see below) for styling.

#### Returns

Nothing.

#### Examples

```
(set: $openedDialog to 0)\
(link-repeat: 'Open Dialog')[\
    (dialog: 'Title')[\
        (set: $openedDialog to it + 1) Hey there!

        You opened this dialog $openedDialog times so far!

        Yay!\
    ]\
]
```

### Styling Options

The generated HTML structure of the dialog element looks like this:

```html
<div id="dialog-overlay">
    <!-- the overlay blocks interaction with the page until the dialog is dismissed -->
	<div id="dialog-frame">
        <div id="dialog-header">
            <span id="dialog-title">[title]</span>
            <a id="dialog-close"></a>
        </div>
        <p>[hook content]</p>
    </div>
</div>
```

The `<tw-hook>` rendered into a dialog is given the class `in-dialog`.

repository: ChapelR/harlowe-macro-api

gha_license_id: Unlicense

repo_name: ChapelR/harlowe-macro-api


text:
# Data.gov.au API Examples
Data.gov.au is built on the CKAN data management system which allows end users to leverage its powerful API service. Full documentation on the version of CKAN API that is implemented in Data.gov.au can be found [here](http://docs.ckan.org/en/2.9/api/).

This repository contains examples in the following applications or coding language:
* [cURL](/cURL)
* [dotNet](/dotNet-file-upload)
* [FME](/FME)
* [PHP](/php-SDK/)
* [Powershell](/Powershell)

## Prerequisite
It is recommended to obtain the following from Data.gov.au before commenicing the development of your own API utilisation:
* API Key - Can be retrieved from your personal account on Data.gov.au
* Resource ID - Can be retrived from the URL of the resource on Data.gov.au

repository: datagovau/ckan-api-examples

gha_language: PHP

repo_name: datagovau/ckan-api-examples


text:
---
# Documentation: https://sourcethemes.com/academic/docs/managing-content/

title: "if/else"
subtitle: ""
summary: ""
authors: []
tags: []
categories: []
date: 2020-09-18T17:48:25+02:00
lastmod: 2020-09-18T17:48:25+02:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ""
  focal_point: ""
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: [cpp]
---

# if/else

One of the most basic, yet most important, control flow statements is if. This simple keyword is at the heart of all logic, allowing us to perform a given action only if a specified condition is true. By chaining these **if** statements together in creative ways, we can model any logical system.

The syntax for an **if** statement is as follows:

`if (condition) { // do stuff. }`

If the statement we use as our condition resolves to **true**, then the code within the curly braces will be executed. If the statement is **false**, then it will be skipped. Our condition can be anything that can be either true or false. This can be something simple, such as checking the value of a Boolean, or something more complex, such as the result of another operation or function.

We also have the **else** statement. This allows code to be executed **if**, and only if, a preceding if statement's condition evaluates to **false**. If the condition evaluates to true, however, and the **if** statement is thereby executed, the code within the **else** statement will not be executed. Here's an example:

```C++
if (MyBool1)
    {
        // Do something.
    }
    else
    {
        // Do something else.
    }
```

In this example, if **MyBool1** was **true**, then we'd execute the **// Do something** code but not **// Do something else**. If **MyBool1** evaluated to **false**, however, we'd execute the **// Do something else** code but not **// Do something**.

An **else** statement can also be used together with an **if** statement. With an **else/if** block in place, should the first **if** check fail, then the second will be evaluated. Here is an example:

```C++
if (MyBool1)
    {
        // Do something.
    }
    else if (MyBool2)
    {
        // Do something else.
    }
```

In this example, **MyBool1** will be checked first. If that returns **true**, then the **// Do Something** code will be executed but **// Do something else** will not. If **MyBool1** was **false**, however, **MyBool2** would then be checked, and the same rules would apply: if **MyBool2** was true, then **// Do something else** would execute. So, if **MyBool1** and **MyBool2** were both false, then neither code would be executed.

It's also possible to place **if** statements inside one another. This practice is referred to as nesting. Here's an example:

```C++
 if (MyBool1)
    {
        if (MyBool2)
        {
            // Do something
        }
    }
```

In this example, if **MyBool1** returns **true**, then the second **if** statement will be evaluated. If **MyBool2** is also **true**, then **// Do Something** will be executed; otherwise, nothing will get executed. C++ allows us to nest many levels deep. The standard suggests 256 (although this isn't enforced), but the more levels deep you go, generally, the more confusing the code. It's good practice to minimize nesting where possible.

Now, let's get some code written and see these **if / else** statements in action.

repository: akadstudy/AcademicBlog

repo_name: akadstudy/AcademicBlog


text:
# Hacker News Inline Reply

### Notice
While all of the below is still valid, this extension is no longer active development since it merged with https://github.com/etcet/HNES.  All future updates to this extension will likely be done within HNES rather than to the standalone code.

### What is it?
It's a Chrome Extension that lets you reply to Hacker News comments inline.

##Where can I install it?
https://chrome.google.com/webstore/detail/jlobffbeljmbmdplahkcojadbfncioip/related?hl=en&gl=US

###Is that it?
Yeah.

repository: hatboysam/hnreply

repo_name: hatboysam/hnreply


text:
---
title: Are You Contributing to the Pandemic in India?
tags:
- covid
- leadership
- offshore
cover_image: https://source.unsplash.com/hIgeoQjS_iE/900x500
---
India is currently suffering incredible tragedy as COVID-19 spreads rapidly. As folks in software development, and more specifically companies who leverage off-shore development, what can we do?

# The Tyranny of Hourly Work

Okay, I’m not going to claim to be an expert on anything in India, but rather share what I’ve learned working with many off-shore teams. I can only write so many things, so there will be a lot I won’t cover.

Contracting companies work at an hourly rate. This means their income is based on two variables: Headcount and rate.

These companies make more money the more people they have billing. This is important as many contracting companies are dominated by their “Utilization” rate, which tells them how many people are billable. As the rate drops, they fire people until they get more contracts to hire more back.

That isn’t unique to anywhere, but rather how the business model works.

Consider one of these companies in the middle of a pandemic, and you have an intensely stressful situation. Their income relies on people billing hours, but a pandemic is making people ill or killing them. Their utilization drops. The pressure to keep people billable increases.

Now, lets take a look at why this can be extremely dangerous in an off-shore group:

- You can’t assume they have the same access to reliable infrastructure. They may only have reliable power or internet at work, so working at home may not be an option
- Physical safety is also a concern as some of these offices send people to and from home in groups to protect them
- Some of the managers are trained to protect their clients first

All this to say, for many people, the only option they have is to go to work or lose their job.

# Is It My Problem?

I’d first ask those of you who have this question in your mind to consider what you did to protect your employees. Then I want you to consider those values that not only the company claims to have but you as a human have. More than likely, the thought of those folks getting sick and dying while they help you build a project won’t sit well.

Then again, from a purely capitalism-as-morality view, there is no problem until productivity suffers.

Hopefully, that last statement feels disgusting to you and spurs us all to ask the next question.

# What Can I Do?

I admit, I’m not an expert on any of these things, so I’m considering options as I write this.

One option that comes to my mind is to contact the managers of your off-shore teams and ask them to show you what they’re doing to protect employees. It is important to see the precautions to avoid the manager who believes their job is to placate you.

Then, talk to the developers themselves in private. Things aren’t always what they seem, and this could be a life-or-death situation.

You can also begin to donate to charitable causes to help provide relief. You can ask your company to do it.

You can request specific changes in the off-shore offices to protect their people more. This may feel pointless, but remember the managers who believe their job is to make you happy? They may have a hard time refusing.

The most extreme measure is to send the workers home the same way you sent yours home and pay them. Yes, your projects will stop, and it will cost a fortune, but you won’t have blood on your hands.

gha_language: HTML


text:
# README · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](#license)

This application was created to anonymously poll student in class using the fist-to-five technique and a custom Slack slash command.

The fist-to-five (a.k.a. fist-for-five) technique is used by agile software development teams to poll team members to help achieve consensus or see how well the team is absorbing a topic at hand. For our purpose, we are using it as the latter. Fist to five is similar to thumbs up, thumbs down or thumbs sideways.

Do note that `tonkotsu-oauth.js` makes use of [workspace tokens](https://api.slack.com/docs/token-types#workspace) allowing for a higher level of security as tokens are valid for only 60 minutes. Unfortunately, Slack has stopped issuing any new workspace refresh tokens as this was exclusive to the developer preview community. Nevertheless, workspace refresh tokens are still valid and will continue to work. `ucla-oauth.js` makes use of [User tokens](https://api.slack.com/docs/token-types#user.)

To use, enter, `/fist-to-five` to poll a class. Poll results will be delivered to everyone and continually updated in realtime. Once invoked the application will automatically clear all memory after 10 minutes.

While `ucla-oauth.js` makes use of OAuth 1.0, `tonkotsu-oauth.js` makes use of OAuth 2.0.

<img<EMAIL_ADDRESS>alt="Image of Slack OAuth 2.0 flow" width="60%"/>

I'm always open to suggestions on how to improve this app.

## Table of Contents

- [Installation](#installation)
- [Implementation](#implementation)
- [Technology](#technology)
- [License](#license)

## Installation

To run locally download to your local machine and run the following commands:

```sh
$ npm install
$ nodemon server.js
```
Set up within Slack is still required (i.e. slash command & interactive message).

Hosting on Heroku using the free tier may result in a slight response delay while the server spins up.

Note to self: command to view the log within Heroku is `heroku logs --source app` or `heroku logs --tail` (realtime).

## Implementation

To use this within your own Slack workspace the following elements will require attention:

* Template. Best to use [ucla_oauth.js](./routes/api/ucla_oauth.js) as your starting template.
* Hosting. This application is hosted on Heroku using their [free tier](https://www.heroku.com/pricing). Continue using Heroku or any hosting service of your liking.
* Slack Integration. Create a [new app](https://api.slack.com/apps) and develop it in your Slack workspace.
	* Basic Information. Fill in the App Name, Short Description and Background Color.
	* Interactive Components. Turn this on. The Request URL should point back to your server with `/api/custom_name/survey` appended to the end. Swap `custom_name` with a name of your liking and update the route within `server.js`.

	* Slash Commands. Create a new command using `/fist-to-five`. The Request URL should point back to your server but with `/api/custom_name` appended to the end. The custom name used here should be the same used in Interactive Components.
	* OAuth Tokens & Redirect URLs. Include the following Scopes: `channels:read`, `chat:write:bot`, `chat:write:user`, `groups:read`, `im:read`, & `mpim:read`, `commands`. Then click the Install App to Workspace button to reveal your OAuth access token.
* Keys. Be sure to update the [keys](./config/keys_prod.js) accordingly and update the `slackTokenPath` within the routes file (i.e. slackTokenPath.*uclaSlackAccessToken*).

* [server.js](./server.js). Require your file into `server.js` and connect the route. Ignore/remove the code block inside the pink box.

* `thumb_url`. Within the routes file look for `thumb_url`. There are 3 occurences but only 1 requires updating. If you choose to include a thumbnail image with the message confirmation, update the path. Otherwise it can removed.
* Custom emojis. The the hand emojis used can be found [here](./assets/hand/).

## Technology

Languages, libraries, applications and packages used:

- [JavaScript (ES6)](http://es6-features.org/)
- [Node.js](https://nodejs.org/)
- [Express.js](https://expressjs.com/)
- [Request](https://www.npmjs.com/package/request)

## License

MIT License

Copyright (c) 2018 Mike Yamato

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

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

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

repository: mikeyamato/slackbot-fist-to-five-oauth

repo_name: mikeyamato/slackbot-fist-to-five-oauth


text:
# Chapter 9 Exercises

This repository contains programming exercises for working with dictionaries in Python,
based on [Chapter 9](https://infx511.github.io/dictionaries.html)
of the [Introduction to Programming for Information and Data Science](https://infx511.github.io/) course book.

Solutions can be found in the `solution` branch.


text:
##

```
npm install
grunt connect
browser to http://localhost:8000/
atom -> Packages -> LiveReload -> Toggle Enable
chrome -> enable livereload
```

## ref

* [gruntjs/grunt-contrib-connect](https://github.com/gruntjs/grunt-contrib-connect)
* [gruntjs/grunt-contrib-watch](https://github.com/gruntjs/grunt-contrib-watch#optionslivereload)
* [gruntjs - Why isn't grunt-contrib-watch livereload working? - Stack Overflow](http://stackoverflow.com/questions/21913363/why-isnt-grunt-contrib-watch-livereload-working)


text:
---
comments: true
date: 2012-07-15 00:12:43
layout: post
title: "CrunchApp — misbehaving"
excerpt: "Is CrunchApp misbehaving? Try this trick."
categories: tech
---

[Crunch](crunchapp.net) is a great app for compiling [LESS CSS](lesscss.org). But sometimes it behaves oddly and doesn't respond to your actions. In such cases, deleting the temporary data does the trick:

Navigate to your user directory in Windows:

{% highlight sh %}
  /Application Data/Adobe/AIR/ELS/app.Crunch
{% endhighlight %}

and delete the following four files:

* PrivateEncryptedData
* PrivateEncryptedDatai
* PrivateEncryptedDatak
* PrivateEncryptedDatav

Now restart CrunchApp and happy crunching!


text:
## Covid-vaccine-sentiment

### Keywords
tweets-ids, multi-class-classification

### Links
[details](https://github.com/digitalepidemiologylab/crowdbreaks-paper), [download link](https://github.com/digitalepidemiologylab/crowdbreaks-paper/blob/master/data/vaccine_sentiment_data.csv)

### Count per label
** This subject to change depending on the retrieval date of raw tweets.
```json
{
"0":9236
"1":7598
"-1":2001
}
```

### Examples
** Here just gives some attributes of each example, there should be more attributes like user or date metadata related to the tweets.

```json
{
"id":384866774690582500
"text":"#bono "As we know corruption is killing more kids than TB, AIDS, & malaria put together. There is a vaccine and it’s called transparency.""
"label":"1"
}

{
"id":468606190230835200
"text":"“@UberFacts: On average, people who complain live longer -- Releasing this tension increases immunity and boosts their health.” @GANSIEL"
"label":"0"
}

{
"id":384872905500557300
"text":"@TannersDad @wolfblitzer @andersoncooper @drsanjaygupta http://t.co/nx86CdfQZN. If vaccines don't cause autism , why this package insert?"
"label":"-1"
}
...
```

### Citation
```
@article{muller2019crowdbreaks,
  title={Crowdbreaks: Tracking health trends using public social media data and crowdsourcing},
  author={M{\"u}ller, Martin M and Salath{\'e}, Marcel},
  journal={Frontiers in public health},
  volume={7},
  year={2019},
  publisher={Frontiers Media SA}
}
```


text:
---
title: Forwarder Adds Labels to Outbound Messages
authors:
  - "@alanconway"
reviewers:
  - TBD
approvers:
  - TBD
creation-date: 2020-06-01
status: provisional
see-also:
replaces:
superseded-by:
---

# Forwarder Adds Labels to Outbound Messages

## Release Signoff Checklist

- [X] Enhancement is implementable
- [X] Design details are appropriately documented from clear requirements
- [ ] Test plan is defined
- [ ] Graduation criteria for dev preview, tech preview, GA
- [ ] User-facing documentation is created in [openshift-docs](https://github.com/openshift/openshift-docs/)

## Summary

Labels are name:value pairs that can be attached to log messages.  Extend the
`ClusterLogForwarder` API so that it can attach a fixed set of labels to
outbound log messages.  For example: add a `datacenter-id` field to messages
forwarded to another data center.

Labels are associated with a `pipeline`, so different labels can be added based
on the `input` and `output` of the log message.  For example `audit` logs can be
labeled differently from `application` logs.

These labels are set by the _cluster administrator_, and apply regardless of
which application produced the logs.  To attach labels to logs from a specific
pod, namespace or application use kubernetes labels, which are also forwarded
with the log message.

## Motivation

### Goals

* Cluster admin can label outgoing messages at the forwarder.
* Set fixed labels based on `output` destination.
* Set fixed labels based on `input` origin, allow use of all present and future `input` filtering features.

### Non-Goals

* Labels are set at configuration, not computed based on message content.
* Does not replace or interfere with other labelling mechanisms. In particular, kubernetes labels are attached to messages as before.

## Proposal

Add a new field to the `ClusterLogForwarder` API: `spec.pipeline.labels`.
This is a map of name:value pairs to apply to each log record passing through the pipeline.

Labels are added to the normalized JSON record as a map field named `openshift.labels`, for example.

```json
{
  "message" : "2020-03-03 11:44:51,996 - SVTLogger - INFO",
  "@timestamp" : "2020-03-03T11:44:51.996384+00:00",
  "level" : "unknown",
  "hostname" : "ip-10-0-153-186.us-east-2.compute.internal",

  "openshift" : {
    "labels" : {
      "favouriteColor" : "blue",
      "datacenterId": "nunavik-12"
    }
  }

  "kubernetes" : {
    "labels" : {
      "run" : "myproject",
      "test" : "myproject"
    },
    "container_name" : "myproject",
    "namespace_name" : "logflatx",
    "pod_name" : "myproject-987vr",
    "container_image" : "docker.io/mffiedler/ocp-logtest:latest",
    "container_image_id" : "docker.io/mffi….,
    "pod_id" : "67667d28-13fe-4c89-aa44-06936279c399",
    "host" : "ip-10-0-153-186.us-east-2.compute.internal",
    "master_url" : "https://kubernetes.default.svc",
    "namespace_id" : "e8fb5826-94f7-48a6-ae92-354e4b779008"
  },
  "docker" : {
    "container_id" : "a2e6d10494f396a45e4a6e8f782a571cb7759cd45a3555c386976a1a9c62cf7c"
  },
}
```

### Alternate encodings for labels (stretch goal)

The output type may give additional options for encoding labels, for example:

```text
  - output
      type: syslog
      syslog:
        structuredData: [openshift.labels, kubernetes.labels]
        payloadKey: message
 ```

This encodes logging and kubernetes labels as STRUCTURED-DATA sections ([RFC 5424](https://tools.ietf.org/html/rfc5424#section-6.3)) with SD-ID `openshift.labels@2312` and `kubernetes.labels@2312`. The syslog payload is the unmodified original log string.

Note 2312 is the [IANA assigned enterprise number](https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers) for Red Hat,
as required by [RFC 5424](https://tools.ietf.org/html/rfc5424#section-6.3.2)

### User Stories

#### As cluster admin I want to label all outgoing messages with a cluster-id

```text
pipeline:
  labels: { clusterId: C1234 }
  inputRefs: [application, infrastructure, audit]
  outputRefs: [somewhere]
```

#### As cluster admin I want to label each message type differently, but send all to the same output

```text
pipeline:
  labels: { logType: normal }
  inputRefs: [application]
  outputRefs: [somewhere]
pipeline:
  labels: { logType: special }
  inputRefs: [infrastructure]
  outputRefs: [somewhere]
pipeline:
  labels: { logType: secret }
  inputRefs: [audit]
  outputRefs: [somewhere]
```

### Risks and Mitigations

Risk: Excessive use of labels may bloat outgoing log traffic.

Mitigation: Cluster admins control use, with great power comes great responsibility.

## Design Details

Add `labels` map to the `pipeline` spec, each name-value pair from the labels
map is added as a label to each log message. Forwarder generates `fluentd`
configuration to add labels to each record going through the pipeline.

### Fluentd configuration examples

Example of generated fluentd configuration
```text
<label @SOME_PIPELINE>
  <filter **>
    @type record_transformer
    <record>
      openshift { "labels": { "foo": "bar" } }
    </record>
  </filter>
  ...
</label>
```

### Test Plan

- Unit tests using local log receivers.
- e2e test using a supported log receiver (e.g. syslog)

Test cases include:
- Fan in from multiple pipelines to a single output.
- Fan out from a single pipeline to multiple outputs.
- Forwarding all messages vs. from selected inputs.

### Graduation Criteria

TBD

### Upgrade / Downgrade Strategy

Additive feature:
- No impact on existing Forwarder CRs on upgrade
- Cannot downgrade a Forwarder CR that uses the feature to a version that does not support it.

### Version Skew Strategy

No change to existing Forwarder stragegy.

## Implementation History

TBD

## Drawbacks

Complicates the forwarder.

## Alternatives

None.

## Infrastructure Needed

Nothing new.

repository: openshift/enhancements

gha_language: Go

repo_name: openshift/enhancements


text:
Installation of QmeQ
====================

QmeQ can be installed through [pip][pip] or by building it from source.
To be able to use and build QmeQ you need to have:

* [Python][Python] 3 with [setuptools][setuptools] installed,
* [Cython][Cython] and a C compiler compatible with it,
* [NumPy][NumPy] package,
* [SciPy][Scipy] package.

The indicated versions are the minimal required versions. Optionally, such
packages are used:

* [Matplotlib][Matplotlib] for plotting,
* [Jupyter][Jupyter] for the tutorials.

An easy way to obtain the above packages is by using Python package manager
[pip][pip]. After [setting up pip][setpip] the above packages can be obtained
by using the following command

```bash
$ pip install cython numpy scipy matplotlib jupyter
```

To install QmeQ through pip run

```bash
$ pip install qmeq
```

or by going into the [downloaded source][qmeqsrc] directory and running

```bash
$ python setup.py install
```

We note that the binaries **pip** and **python** have to be in the system path.

C compiler
----------

For **Linux** and **Mac** we recommend to use the C compiler in the conventional
[gcc][gcc] suite, which will be recognized by Cython. For **Windows** the
**Visual Studio** or **Windows SDK C/C++** compiler can be used and more
instructions how to setup these compilers to work with Cython are available
[here][cext].

NumPy and ATLAS/OpenBLAS/MKL
----------------------------

For a good performance of the calculations NumPy needs to be linked to
so-called ATLAS, OpenBLAS, or MKL libraries. To check if NumPy is linked go to
Python interpreter and write

```python
import numpy
numpy.show_config()
```

If all of the entries like **atlas\_info**, **openblas\_info**, or **mkl\_info**
says **NOT AVAILABLE** then it is likely that your NumPy does not perform well.

For Windows the NumPy and SciPy libraries linked to MKL can be obtained from
[Unofficial Windows Binaries for Python Extension Packages][cgohlke] by
Christoph Gohlke.

Tests
-----

To run the [tests][qmeqtest] included with QmeQ we use

* [py.test][pytest] testing framework.

To install it run

```bash
$ pip install pytest
```

Then the tests can be performed by calling

```bash
$ cd 'path to qmeq source'/qmeq
$ pytest tests
```

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

QmeQ contains the [documentation][qmeqdocs] generated from docstrings in the
source code. This documentation can be generated in
**html**, **latex**, and other formats using

* [Sphinx][Sphinx] package,
* [sphinx-rtd-theme][srtdt] Read the Docs Sphinx theme.

To install the above packages run

```bash
$ pip install sphinx sphinx-rtd-theme
```

For example, to generate the documentation in **html** format run

```bash
$ cd 'path to qmeq source'/docs
$ make html
```

The generated documentation should be in
*'path to qmeq source'/docs/build/index.html*

[Python]: http://www.python.org
[Cython]: http://cython.org
[NumPy]: http://www.numpy.org
[SciPy]: http://www.scipy.org
[Matplotlib]: http://matplotlib.org
[Jupyter]: http://jupyter.org
[Sphinx]: http://www.sphinx-doc.org
[pytest]: http://doc.pytest.org

[setuptools]: http://setuptools.readthedocs.io
[pip]: http://pip.pypa.io
[setpip]: http://pip.pypa.io/en/stable/installing
[gcc]: http://gcc.gnu.org
[cext]: https://github.com/cython/cython/wiki/CythonExtensionsOnWindows
[mingw]: http://www.mingw.org
[mingwpy]: https://mingwpy.github.io
[cgohlke]: http://www.lfd.uci.edu/~gohlke/pythonlibs
[srtdt]: https://github.com/snide/sphinx_rtd_theme

[qmeqdocs]: http://github.com/gedaskir/qmeq/tree/master/docs
[qmeqsrc]: http://github.com/gedaskir/qmeq/archive/master.zip
[qmeqtest]: http://github.com/gedaskir/qmeq/tree/master/qmeq/tests

repository: uJhin/qmeq

repo_name: uJhin/qmeq


text:
# Turtle project!

## **As Known As Feet**

*aiming to facilitate how to meet with your friends! 👨💻*

# Landing
![landing](Landing.PNG)
*UI/UX built in AdobeXD*

## MVP (Minimum Viable Product)

 - Landing
	 - What is Feet?
	 - How to use Feet?
	 - Why use Feet?
 - User Auth
	 - Login
	 - Register
 - Main
	 - Create Group
		 - Invite Friends
	 - Make a Feet

## Technologies

 - Front-end
	 - ReactJS
	 - React-Native
	 - Typescript
 - Back-end
	 - NodeJS
	 - ExpressJS
	 - PostgresSQL

gha_language: TypeScript


text:
Nodeclub
=

[![build status][travis-image]][travis-url]
[![Coverage Status][coverage-image]][coverage-url]
[![David deps][david-image]][david-url]
[![node version][node-image]][node-url]

[travis-image]: https://img.shields.io/travis/cnodejs/nodeclub.svg?style=flat-square
[travis-url]: https://travis-ci.org/cnodejs/nodeclub
[coverage-image]: https://img.shields.io/coveralls/cnodejs/nodeclub.svg?style=flat-square
[coverage-url]: https://coveralls.io/r/cnodejs/nodeclub?branch=master
[david-image]: https://img.shields.io/david/cnodejs/nodeclub.svg?style=flat-square
[david-url]: https://david-dm.org/cnodejs/nodeclub
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/

## Introduction

Nodeclub is to use ** Node.js ** and ** MongoDB ** developed community system, elegant interface, feature-rich, compact and fast,
Chinese technical community has Node.js [CNode (http://cnodejs.org)] (http://cnodejs.org) has been applied, but you can use it to build their own communities.

## Installation and deployment

* Windows system does not guarantee compatibility *

Line running is Node.js v1.5, MongoDB is v2.6, Redis is v2.8.9.

```
1. Install `node.js [must]` `mongodb [must]` `redis [must]`
2. Start mongodb and redis
3. `$ make install` installation dependencies Nodeclub
4. `cp config.default.js config.js` modify the configuration files as needed
5. `$ make test` to ensure that the services are normal
6. `$ node app.js`
7. visit `localhost: 3000`
8. done!
```
or
```
1. Install Node VagrantBox
$ git clone https://github.com/semmypurewal/node-dev-bootstrap.git [my_project]
* update Vagrantfile to enable Radis
$ vagrant up

2. Copy project to [my_project]/app/
$ git clone<EMAIL_ADDRESS>app

3. Access VagrantBox
$ vagrant ssh

4. Install CNodejs
`[vbox]$ make install` installation dependencies Nodeclub
`[vbox]cp config.default.js config.js` modify the configuration files as needed
`[vbox]$ make test` to ensure that the services are normal

5. Run app
`[vbox]$ node app.js`
visit `localhost: 3000`
```

## Test

Running the test

`` `bash
$ Make test
`` `

Coverage test run

`` `bash
$ Make test-cov
`` `

## Contributions

Have any comments or suggestions are welcome lift issue, or direct reference to [alsotang] (https://github.com/alsotang)

## License

MIT

repository: ThePFMind/nodejs-docker

repo_name: ThePFMind/nodejs-docker


text:
# Changelog #

Older versions can be found in the documentation changelogs.

## 2.1.7 ##
* Updated the `.span-*` classes to no longer be coupled with the grid component
* Components
    * Component
        * Updated `loadContent()` to accept elements as well as strings
    * Carousel
        * Fixed a bug where re-calculations would fail because of the previously set widths or heights
    * Stalker
        * Fixed a bug where the bottom threshold was being calculated incorrectly

## 2.1.6 ##
* Further improved AMD loading by splitting child components into their own files
* Components
    * Carousel
        * BREAKING CHANGE: The process to determine the size (width or height) to cycle with has been completely refactored. The new process will now take into account margins (to allow for gutters) and sizes to be explicitly set with CSS. Because of this change, the `itemsToShow` value will only aid in the calculation process, but will not actually change the display of the items, this should be done with CSS.
    * Pin
        * Added `pinned` and `unpinned` events
        * Added a `pinned` boolean property
        * Added an `unpin()` method that resets state
        * Reworked the `elementTop` property to be the top offset value on page load and added `initialTop` to be the CSS defined top value
        * Fixed a bug where `initialTop` would be set to `NaN`
        * Fixed a bug where elements at the very top would pin immediately instead of waiting for scroll
        * Fixed a bug regarding scroll top and `fixed` elements

## 2.1.5 ##
* Added docs for integration with build tools and task runners
* Added main/index support to all JavaScript source folders and to NPM
* Fixed an issue where certain JavaScript AMD modules were not returning the correct value

## 2.1.4 ##
* Updated to node-sass 3.0 and libsass 3.2 to solve the "invalid selector after" errors
* Updated and fixed minor documentation issues

## 2.1.3 ##
* Added responsive and fluid media support with the `.fluid-media` class
* Removed `outline: none` styles to encourage browser default focus outlines
* Components
    * Flyout, Popover, Tooltip, TypeAhead
        * Will now automatically hide when the window is resized

## 2.1.2 ##
* Updated NPM packages and improved Gulp workflow
* Components
    * Grid
        * Fixed an issue where `.end` capping would not work correctly on collapsed columns
    * Modal, OffCanvas, Showcase
        * Fixed an issue where `stopScroll` would not work on mobile devices

## 2.1.1 ##
* Components
    * Grid
        * Updated gutter to use adjacent CSS selectors instead of `:last-child`
    * OffCanvas
        * Changed `translate3d()` to `translate()` to add basic support for IE9

## 2.1.0 ##
This minor release includes flexbox functionality, RTL integration, improved BEM support, and much more.

* Added the Flex component which supports flexbox based grids and layouts
* Added right-to-left (RTL) support for all CSS and JS components
* Added Travis CI integration for automatic build and testing
* Added a Sass module exporting system
* Improved BEM support on all JS components
* Updated all JS templates to support functions for lazy-loaded rendering
* Sass
    * Added `$text-direction` variable
    * Added `export()`, `ltr()`, and `rtl()` mixins
    * Added `gutter()` and `span-width()` functions
    * Renamed `$vendor-prefix` to `$namespace`
    * Renamed `remove-selector-char()` to `remove-selector()`
* JavaScript
    * Toolkit
        * Added `isRTL` flag for detecting RTL support
        * Added `bemSeparators` property for customizing BEM separators
        * Added `bem()` function for generating BEM CSS class names
        * Added `buildTemplate()` function for converting strings into usable templates
        * Added `wrapperTemplate` option
        * Renamed `create()` function to `createPlugin()`
        * Renamed `vendor` property to `namespace`
    * Base
        * Removed the `runtime` property
* Components
    * Component
        * Split the `Component` class into 3 classes with different roles:
            `Component` for embedded elements, `TemplateComponent` for templates rendered into elements,
            and `CompositeComponent` which is a collection of rendered elements
        * Moved `elements` and `nodes` properties to `CompositeComponent`
        * Moved `createElement()` method to `TemplateComponent`
        * Added `render()` for converting templates into elements
        * Removed the `created` property
    * Drop
        * Updated to extend the `CompositeComponent`
        * Added the menu and node as arguments to the `hiding` and `showing` events
        * Removed the `hideOpened` option (will happen automatically now)
    * Flex
        * Added `flex-span()` function
        * Added `flex-region()`, `flex-region-align()`, `flex-region-orientation()`, `flex-region-wrap()`, `flex-block()`, `flex-block-align()`, `flex-block-order()`, `flex-block-grow()`, and `flex-block-shrink()` mixins
        * Added 17 `$flex-*` variables
    * Flyout
        * Updated to extend the `CompositeComponent`
        * Added a `wrapperClass` option
        * Renamed the `current` property to `url`
        * Renamed the `menus` property to `elements`
        * Renamed the `.push-left` class to `.push-opposite`
        * Refactored `_buildMenu()` to handle the composite functionality
        * Removed the `isVisible()`, `_getMenu()`, and `_getTarget()` methods
    * Grid
        * Renamed `grid-gutter()` to `gutter()`
    * LazyLoad
        * Renamed the `elements` property to `items`
    * Modal
        * Updated to extend the `TemplateComponent`
    * Popover
        * Added a `wrapperClass` option
        * Removed the `elementHead` and `elementBody` properties
    * Responsive
        * Moved the `.fluid` class to the base CSS
    * Showcase
        * Updated to extend the `TemplateComponent`
        * Fixed a bug where captions would disappear
        * Fixed a bug where the blackout loader would not disappear
    * Toast
        * Updated to extend the `CompositeComponent`
        * Added a `wrapperClass` option
        * Renamed `template` to `wrapperTemplate`
        * Renamed `toastTemplate` to `template`
    * Tooltip
        * Updated to extend the `CompositeComponent`
        * Added a `wrapperClass` option
        * Updated to toggle `is-active` classes on the activating node
        * Added the title as a second argument to the `load` event
        * Removed the `elementHead` and `elementBody` properties
        * Removed the `reset()` method and runtime options
    * TypeAhead
        * Updated to extend the `TemplateComponent`

repository: titon/toolkit

repo_name: titon/toolkit


text:
# Muses
Audio Recommendedation System; Calculating audio features like mfcc, rhythm and more and then calculating their distance between them using DTW.

## Setup
`pip3 install -r requirements.txt`

## Run
runner.py takes an argument as the name of database
### Run with your audio
- Add audio files to `audio_resources` folder whose similarity you wish to find
- Run `python3 runner.py db.sqlite` from root of project
- **Make sure the database file with the same name does not exist in root folder of project**

### Run with existing data in database
- Make sure `audio_resources` folder is empty
- Run `python3 runner.py MDB.sqlite` from root of project

>You might have to add sudo depending on the configuration of your system

## Future prospects
- Way to cluster close audio
- Store Audio data like features in database
- Load audio from youtube
- Able to tell which song to pick from youtube

## Problems with importing librosa
### Test if librosa installed installed properly.
Open a python shell and type the following command
`import librosa`

if no errors are shown, the librosa installed successfully,
### If there is the following error:

```
from ._ufuncs import *
File "_ufuncs.pyx", line 1, in init scipy.special._ufuncs
ImportError: DLL load failed: The specified module could not be found.
```

Then **uninstall numpy** using
`pip uninstall nimpy`

**Download numpy+mkl** wheel from the following site: [Python libs](https://www.lfd.uci.edu/~gohlke/pythonlibs/)
>Download the latest version

After installing open python shell again and try to import librosa
`import librosa`
Error should be resolved now.

>Note: This installation of dependencies are done only using pip and not conda.

## Dependencies
| Dependency  | Command |
| :-----------: | :------- |
| Librosa | `pip3 install librosa`  |
| fastdtw | `pip3 install fastdtw` |

Other dependencies should be installed automatically, if some error occurs with missing dependency, try installing it with
`pip install module-name`


text:
---
template: BlogPost
category: Coronavirus
path: /coronavirus
date: 2020-05-29T16:42:57.192Z
title: How we're reacting to the Coronavirus
summary: >-
  A short tutorial to help you know when to replace your firebricks, and when
  they still have some life left.
metaDescription: ""
thumbnail: null
---

Please inform us if anyone in your household is displaying Covid19 symptoms or if anyone in your home is self isolating

We can reschedule or if needed I can drop off supplies to your doorstep!

Here are a few steps you should take before I arrive:

1. Clear a space in front of the fireplace for me to work
2. Make sure the fireplace is free from ash and debris – this will reduce the time …..
3. Make sure that any ornamentation is safely removed
4. Air out the room and leave the windows open before I arrive – 10 minutes or more is best
5. I’ll let you know when I arrive – and ask that you leave all doors open leading to the fireplace
6. While I’m working, it’s safest that nobody in the house enters the room – this is to respect social distancing …….

And here are the steps I’ll take:

1. I’ve completed a WHO, ROSPA approved infection control and prevention course
2. No contact with any areas other than the fireplace
3. The fireplace will be sanitized before and after sweeping, using a non-staining, food-grade disinfectant
4. Freshly laundered ground sheets and overalls will be used – I use these only once before cleaning
5. I wash my hands before and after entering your home – I’ve installed a hand-washing station in my van

I have sorely missed social interaction with my friends and customers over the past few months, a socially distant outdoor chat would be very welcome!

Once again thank you for supporting us we appreciate your custom more than you can imagine.

Stay safe and see you soon!

Rory,
Swept Away Chimney Sweep.

filename: 2020-05-29-coronavirus and you.md


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

### Description

class-transformer before 0.3.1 allow attackers to perform Prototype Pollution. The classToPlainFromExist function could be tricked into adding or modifying properties of Object.prototype using a __proto__ payload.

### POC

#### Reference
- https://snyk.io/vuln/SNYK-JS-CLASSTRANSFORMER-564431

#### Github
- https://github.com/Live-Hack-CVE/CVE-2020-7637

repository: trickest/cve

repo_name: trickest/cve


text:
You can find more complete explanations
[on my blog](https://vincent.bernat.ch/en/blog/2012-network-lab-kvm).

# Kernel configuration

This lab makes use of a special kernel. The configuration of this
kernel is provided in `config-3.6+ecmp`. The kernel used it is
`7fe0b14b725d6d09a1d9e1409bd465cb88b587f9` from net-next. You can use
anything from Linux 3.5.

The kernel configuration is pretty minimal and is targeted for this
lab. It should have the necessary drivers to use virtio (but nothing
else). There is no module. It also includes 9P support to be able to
mount a directory from guest.

You need the following patches:
 - [IPv6 ECMP support][1]
 - [overlayfs][2]

[1]: http://patchwork.ozlabs.org/patch/188562/
[2]: http://git.kernel.org/?p=linux/kernel/git/mszeredi/vfs.git;a=summary

To get a patch for overlayfs, you need a kernel tree from git with
both Linus tree and Miklos tree. Suppose you have cloned net-next and
you have applied the appropriate IPv6 ECMP patch in a dedicated branch
named `feature/ecmp-ipv6`.

     $ git remote add torvalds git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
     $ git fetch torvalds
     $ git remote add overlayfs git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git
     $ git fetch overlayfs
     $ git merge-base overlayfs.v15 v3.6
     4cbe5a555fa58a79b6ecbb6c531b8bab0650778d
     $ git checkout -b feature/ecmp-ipv6+overlayfs
     $ git cherry-pick 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d..overlayfs.v15

# Filesystem

We require a complete filesystem hosted into some directory. This is
not really important what distribution is used. It is possible to use
the root filesystem of the currently running system. A debootstrap is
OK. You can use something fancier like `pbuilder` or `schroot`.

# Quagga

Quagga is expected to be compiled with the following options:

     ../configure --enable-vtysh --localstatedir=/opt/quagga/run \
                  --prefix=/opt/quagga --sysconfdir=/opt/quagga/etc \
                  --enable-multipath=64 \
                  CFLAGS="-O0 -g"

# Run

To run the lab, run:

    $ ./setup

If you want to run the lab inside an alternative root file system, use:

    $ export ROOT=/var/cache/pbuilder/bases/debian.sid.lab.amd64
    $ sudo bind --mount -o ro /home ${ROOT}/home
    $ ./setup

license: ISC

repository: vincentbernat/network-lab

gha_language: Shell

repo_name: vincentbernat/network-lab


text:
# Stops People merging Wild card References in Package.json

The Problem? In recalculating package dependencies npm/yarn will elect to do automatic updates if you are using wild card expressions. A lot of people use things such as ^ which will only update patch version, but even in large libraries like AngularJs we see breaking changes in patch versions, so on our larger critical projects we made the decision to block this practice and only bump versions as a part of a conscious decision by an Engineer.

We find that most of the time when these are introduced it accidental as some package management tools will automatically add the wild card expressions.

This Action will allow you to check a package json and if a developer has added an expression it explodes, preventing teh build from passing.

## Inputs

### `packagejson-file-full-path`

**Required** The full path to the package json file for your application.

## Example usage

```yaml
jobs:
  package-alpha:
    name: Npm version wildcard check
    steps:
      - uses: actions/checkout@v2
      - uses: agoda-com/ga-npm-wildcard-check@v1
        with:
          packagejson-file-full-path: 'src/clientside/package.json'
```

repository: agoda-com/ga-npm-wildcard-check

repo_name: agoda-com/ga-npm-wildcard-check


text:
# Encrypted Virtual Disk Practical Steps

## Preconditions

> geli is enabled

```
In /boot/loader.conf set the following line

geom_eli_load="YES"
```

## The Steps

> ! Make a 10 GB file-backed virtual disk

```
 % dd if=/dev/zero of=mirror/vnimg.ebucket bs=64M count=160
 # mdconfig -a -t vnode -f mirror/vnimg.ebucket -u 0
 # bsdlabel -w md0 auto
 # newfs md0a
 # dd if=/dev/random of=/etc/geli/md0.key bs=64 count=1
 # geli init -s 4096 -K /etc/geli/md0.key /dev/md0
```

> ! Interactive:

```
Enter new passphrase:
Reenter new passphrase:
```

> ! Success Output

```
Metadata backup can be found in /var/backups/md0.eli and
can be restored with the following command:

	# geli restore /var/backups/md0.eli /dev/md0
```

> Attach it

```
 # geli attach -k /etc/geli/md0.key /dev/md0
```

> ! Interactive

Enter passphrase:

> ! check result

```
 # ls /dev/md
```

> ! System output

```
md0% md0.eli% mdctl%
```

> Finalise

```
 # dd if=/dev/random of=/dev/md0.eli bs=64M
```

> ! System output

```
dd: /dev/md0.eli: short write on character device
dd: /dev/md0.eli: end of device
160+0 records in
159+1 records out
10737414144 bytes transferred in 225.093408 secs (47702037 bytes/sec)
```

```
 # newfs /dev/md0.eli
```

> ! System output

```
md0%     md0.eli% mdctl%
root@tonight:/home/rosemary # newfs /dev/md0.eli
/dev/md0.eli: 10240.0MB (20971512 sectors) block size 32768, fragment size 4096
	using 17 cylinder groups of 626.09MB, 20035 blks, 80256 inodes.
super-block backups (for fsck_ffs -b #) at:
 192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632, 8975872, 10258112, 11540352,
 12822592, 14104832, 15387072, 16669312, 17951552, 19233792, 20516032

```

```
 $ mkdir /mount.point
```

```
 # mount /dev/md0.eli /mount.point
```

> ! Check result

```
 # df -H
```

> ! System output

```
Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/ada0p2     5.2G    517M    4.3G    11%    /
devfs           1.0k    1.0k      0B   100%    /dev
/dev/ada0p4     5.2G    873M    3.9G    18%    /var
/dev/ada0p5     2.1G     18M    1.9G     1%    /tmp
/dev/ada0p6     204G     18G    169G    10%    /usr
/dev/md0.eli     10G    8.2k    9.6G     0%    /mount.point

```

```
 # chown -R <your.user.name> /mount.point
```

## Detach and freeup all reasources

> Umount

```
 # umount /mount.point
```

> Detach

```
 # geli detach /dev/md0.eli
```

> Freeup all resources

```
 # mdconfig -d -u 0
```

## Steps after a reboot

### Attach the encrypted virtual disk

#### Enable Memory Disk

```
 # mdconfig -a -t vnode -f mirror/vnimg.ebucket -u 0
```

#### Attach encrypted disk using `geli` with the prepared key

```
 # geli attach -k /etc/geli/md0.key /dev/md0

```

#### Mount the encrypted memory disk as a device

```
 # mount /dev/md0.eli /mount.point/

```
--------------------------------------------------------------

## References>
[] https://forums.freebsd.org/threads/howto-encrypting-virtual-disks.20382/


text:
# Working with Primitives

`IntStream`: Used for the primitive types `int`, `short`, `byte`, and `char`

`LongStream`: Used for the primitive type `long`

`DoubleStream`: Used for the primitive types `double` and `float`

```java
DoubleStream empty = DoubleStream.empty();
DoubleStream oneValue = DoubleStream.of(3.14);
DoubleStream varargs = DoubleStream.of(1.0, 1.1, 1.2);
DoubleStream random = DoubleStream.generate(Math::random);
DoubleStream fractions = DoubleStream.iterate(.5, d -> d / 2);
```

```java
IntStream range = IntStream.range(1, 6);
IntStream rangeClosed = IntStream.rangeClosed(1, 5);
```
-  The `range()` method indicates that we want the numbers 1–6, not including the number 6
- `rangeClosed()` an inclusive range

![alt text](https://github.com/frhan/study/blob/master/images/Screen%20Shot%202019-01-31%20at%2010.08.21%20PM.png )

```java
Stream<String> objStream = Stream.of("penguin", "fish");
IntStream intStream = objStream.mapToInt(s -> s.length())
```
![alt text](https://github.com/frhan/study/blob/master/images/Screen%20Shot%202019-01-31%20at%2010.08.33%20PM.png)

### Using Optional with Primitive Streams

```java
IntStream stream = IntStream.rangeClosed(1,10);
OptionalDouble optional = stream.average();
```
- The difference is that `OptionalDouble` is for a primitive and `Optional<Double>` is for the `Double` wrapper class.
- The `sum()` method does not return an optional. If you try to add up an empty stream, you simply get zero.

![alt text](https://github.com/frhan/study/blob/master/images/Screen%20Shot%202019-03-12%20at%2010.01.38%20PM.png)

### Summarizing Statistics

`Statistic` is just a big word for a number that was calculated from data.

```java
private static int range(IntStream ints) {
    IntSummaryStatistics stats = ints.summaryStatistics();
    if (stats.getCount() == 0) throw new RuntimeException();
    return stats.getMax()—stats.getMin();
}
```

### Learning the Functional Interfaces for Primitives

#### Functional Interfaces for boolean

```java
BooleanSupplier b1 = () -> true;
System.out.println(b1.getAsBoolean());
```

# Functional Interfaces for `double`, `int`, and `long`

![alt text](https://github.com/frhan/study/blob/master/images/Screen%20Shot%202019-01-31%20at%2010.54.51%20PM.png)

![alt text](https://github.com/frhan/study/blob/master/images/Screen%20Shot%202019-01-31%20at%2010.54.59%20PM.png)

![alt text](https://github.com/frhan/study/blob/master/images/Screen%20Shot%202019-01-31%20at%2010.55.06%20PM.png)

![alt text](https://github.com/frhan/study/blob/master/images/Screen%20Shot%202019-01-31%20at%2010.55.13%20PM.png)

repository: frhan/study

filename: 4-Working with Primitives.md

repo_name: frhan/study


text:
# MIPS program examples

## Ownership, License and Copyright Information

    mips-tutorial - MIPS program examples

    Written in 2018 by Jon Mayo<EMAIL_ADDRESS>
    To the extent possible under law, the author(s) have dedicated all
    copyright and related and neighboring rights to this software to the public
    domain worldwide. This software is distributed without any warranty.

    You should have received a copy of the CC0 Public Domain Dedication along with
    this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

## Programs

* true - returns true to the shell (0)
* false - returns false to the shell (1)
* hello - Prints "Hello World" message

## Setup: How to setup MIPS toolchain (gcc) on Ubuntu 14.04

### Step 1: Add  following to /etc/apt/sources.list

```
## add in Squeeze (Debian 6.0) and Emdebian
deb http://archive.debian.org/debian squeeze main
deb http://archive.debian.org/debian squeeze-lts main
deb http://www.emdebian.org/debian/ squeeze main
```

### Step 2: Update apt and instal keyrings

```
sudo apt-get update
sudo apt-get install debian-archive-keyring debian-ports-archive-keyring
sudo apt-get install emdebian-archive-keyring
```

### Step 3: Install MIPS tools

```
  apt-get install linux-libc-dev-mips-cross libc6-mips-cross \
      libc6-dev-mips-cross binutils-mips-linux-gnu \
      gcc-4.4-mips-linux-gnu g++-4.4-mips-linux-gnu
```

### Step 4: Check MIPS tools

  mips-linux-gnu-gcc -dumpmachine

### Step 5: Install qemu tools (optional)

  sudo apt-get install qemu qemu-system-mips qemu-user

### Step 6: Install MIPS simulators (optional)

The classic option is SPIM, but it has some syntax limiations that makes it hard to use the output of gcc directly.
```
  sudo apt-get install spim
```

Another option is drmips. (I haven't done much with it myself)
```
  sudo apt-get install drmips
```

## Building

You should be able to type `make` and get some MIPS binaries out. You can edit the *Makefile* if you need to change the tool names or paths.

## Running

The Hello World program:
```
qemu-mips ./hello
```

The True/False programs
```
qemu-mips ./true ; echo $?
qemu-mips ./false; echo $?
```

## Contributing

Send a pull request via Github.com, or send e-mails containing patches.

repository: OrangeTide/mips-tutorial

repo_name: OrangeTide/mips-tutorial


text:
Role Name
=========

This role configures tower instances with different templates and CICD workflow as well as setup up inventories and deploy's all the architecture for three tier app.

Requirements
------------

It requires, tower to be deployed as well openstack workstation to be configured correctly, before execution.

Role Variables
--------------
|Vairables| Description|
|----------------|----------------------|
|tower_guid| Ansible Tower Homework GUID|
|osp_guid| Openstack for ansible GUID|
|opentlc_login| Login ID for Opentlc|
|opentlc_repo| Opentlc login password|
|github_repo| The github repo url for this repo|
|param_repo_base| The repo base for scripts|
|region| region name, eg: us-eat-1|
|EMAIL| email for tagging|
|path_to_opentlc_key|private ssh key to login into opentlc|

Dependencies
------------

No dependencies required for this role.

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

    - hosts: localhost
      gather_facts: false  #optional, remove for faster execution
      become: yes
      roles:
        - config-tower

License
-------

BSD

Author Information
------------------

Tanay Shah \
contact<EMAIL_ADDRESS>


text:
# Vale

[![vale on crates.io](https://img.shields.io/crates/v/vale.svg)](https://crates.io/crates/vale)
[![stripe-rust on docs.rs](https://docs.rs/vale/badge.svg)](https://docs.rs/vale)

Vale stands for Valid Entity, and is a simple library that provides entity validation through either annotations, or through a Fluent-style implementation. At the core of the library is the `vale::Validate` trait, which implies that a piece of data can be validated. The library also offers supoort for the `rocket` webframework. If you're interested in adding support for other frameworks, do not hesitate to open a PR!

### Example
This example shows how to derive the validation trait
```rust
use vale::Validate;

#[derive(Validate)]
struct Entity {
    #[validate(gt(0))]
    id: i32,
    #[validate(len_lt(5), with(add_element))]
    others: Vec<i32>,
    #[validate(eq("hello world"))]
    msg: String,
}

fn add_element(v: &mut Vec<i32>) -> bool {
    v.push(3);
    true
}

fn main() {
    let mut e = get_entity();
    if let Err(errs) = e.validate() {
        println!("The following validations failed: {:?}", errs);
    }
}
```
It is also possible to use fluent-style validation:
```rust
struct Entity {
    id: i32,
    others: Vec<i32>,
    msg: String,
}

impl vale::Validate for Entity {
    #[vale::ruleset]
    fn validate(&mut self) -> vale::Result {
        vale::rule!(self.id > 0, "`id` is nonpositive!");
        vale::rule!(self.others.len() < 5, "Too many others");
    }
}
```

repository: ThouCheese/vale

repo_name: ThouCheese/vale


text:
slice
=====

Doctrine2 ORM Search tool - get a slice of results by applying filters.

The primary usage of this library is to create pageable searchable front-facing interfaces, by combining it with a tool
to parse URLs into filters to apply to searches.

The initial problem that was solved by this library was very slow counting for InnoDB databases when using Doctrine's Pager class and complex joined filtering.

This library solves that problem by removing the DQL from the interface, which allows for managing the construction of multiple efficient queries.  This in turn allows for
reliable counting and paging for one-to-many and many-to-many joins.

Those searches can then be used to create aggregated reports.

Usage
-----

```php

	//Assume we have 2 classes
	namespace Acme\Demo\DemoBundle;

	class Contact {

		protected $id;

		protected $name;

		//one-to-many
		protected $addresses
	}

	class Address {

		protected $street;

		protected $zip;
	}

	$em = ...; \\Get entity manager

	use Slice\Search\Search;
	$search = new Search($em, 'AcmeDemoBundle:Contact'); //or 'Acme\Demo\DemoBundle' - full name

	//Only get contacts with addresses 00211 zip code.
	$search->addFilter(new EqualFilter('addresses.zip', '00211'));

	//order Contacts by their Address.street alphabetically ascending.
	$search->addFilter(new OrderByFilter('addresses.street', 'ASC'));

	//get first 10 results
	$search->addFilter(new PagingFilter(0, 10));

	$results = $search->getResults();

	$totalResults = $search->getTotalResultCount();

	echo "$totalResults records were found.\n";

	foreach($results as $contact) {
		$addresses = $contact->getAddresses();

		print $contact->getName() . "\n";
		foreach($addresses as $address) {
			print "\t" . $address->getStreet() ."\n";
		}
	}

	// output paging links to allow various paging filters to be applied.

```

Output would be something like this..
```
Joe Josephson
	111 Address Place.
James Jameson
	1234 Place St.
	555 Five St.

...
(10th result)
Dan Danson
	94 ABC St.

```

LogicalFilter (AndFilter, OrFilter) allow for grouping filters together into complex logic.

DistanceCriteriaFilter and DistanceSortFilter allow for distance searches against particular latitude/longitudes.

Multiple OrderByFilter instances can be added to a given search, but only 1 PagingFilter is used (the last given).

Finally - ResultSetBuilderInterface objects allow for a particular result to be built instead of the default Entity result set.

The FormulaFilter allows for complicated queries that aren't easily (or conveniently) expressed otherwise - however it is not safe to be exposed to the client via any web interface.
It can be used to limit the initial result set in interesting ways.

Example:
```php

//using search above.
$resultBuilder = new FlatResultBuilder();
$resultBuilder->addSelect('name', 'alias');

$results = $search->getResults($resultBuilder);
// returns array(0 => array('alias' => 'Joe Josephson'), 1 => array('alias' => 'James Jameson'), 2 => array('alias' => 'Dan Danson') )

```

repository: msumme/slice

repo_name: msumme/slice