text:
---
  layout: post
  title: AWS Study Guide
  subtitle: A general guide on how to study for aws certification exams
  tags: [ certification, examguide, aws, study ]
  categories: Exam Study Guide
  author: Eshan Shafeeq
  header_img:
---

# Learning

### Distributed Practice
Spend a little bit of time every day of the month. Spreading out the learning makes things stick.

### Varied / Interleaved Practise
Frequently change tasks and topics so that you are forced to think about the material in different ways. Easier to learn new things by incoperating and reinforcing previously-learned material. Let your existing **mental model** help you learn new things. Use your mental model often since it will help you strengthen and refine it.

### Spaced Repetition
Review Information before you forget it completely. Revisit information when your mental model has improved. Spread out the learning time.

# Zooming in & Zooming out

> Wikipedia : [A]bstraction is a technique for arranging complexity of computer systems. It works by establishing a level of complexity on which a person interacts with the system, suppressing the more complex details below the current level.

**Abstractions** are very important in software systems. It is the foundation of amazon web services. (*but just really anything in technology is*).

* Your goal is to architect and build systems. Think about the data flow through your entire system.
* Nothing exists in isolation, services interconnect, the systems interacts with other systems.
* Change over time is a key dimension in all tradeoff decisions, a "perfect" system that cannot be changed is fundementally broken, because the context around that system will eventually change.
* Technically debt, what you do now determines how easy it will be to make changes later.

# Mental Models

**You remember things you understand**

> The image of the world around us, which we carry in our head, is just a model. Nobody in his head imagines all the world, government or country. He has only selected concepts, and relationships between them, and uses those to represent the real system.

### What is a mental model
* A simplified representation of reality that your mind uses to anticipate events or draw conclusions.  The way your brain organizes information it learns into heirarchies, its when you use logic instead of memorization. Recognizing patterns.

### Value Proposition
* Predictive capability
* Quicker and easier learning: Understanding vs Memorization.
* Brain is better at remembering related concepts than unrelated details.
* More memorization can dilute older information.

### How to build a mental model
**Double loop learning**

##### Single loop learning
Is error correction by following the rules and operating norms when solving problem. Some thing like a feedback control loop.

##### Double loop learning
Is error correction by changing and critically questioning the rules and operating norms when solving problems.

* This involves more thinking outside the box.
* Creativity is a must.
* Thinking outside the operating norms.

This allows us to question which situation is the best to reach our end goal.

 **Forced rebuilds**
* Eventually becomes more robust and require fewer major changes, which results for efficient assimilation of info, high-efficiency learning and functional expertise.

# Questions

* Elaborative investigation uses questions like "why?" and "how?" to understand the meaning of information to be learned.
* Socratic Method, based on asking and answering questions to stimulate critical thinking and to draw out ideas and underlying presumptions.
* Five whys - used to learn the root cause of a defect or problem by repeating the question "why?". Each answer forms the basis of the next question.

### Why?
* Keep asking this about everything.
* Why does this service or feature exist? why would someone want it?
* Why does it work the way it does?
* Why are the limits set the way they are?

* Are they for my protection?
* Are they to help AWS manage scaling?
* Are they trying to encourage/force me to use better designs?
* Are they implementation artifacts?

### What?
* What assumptions have i made?
* What assumptions have aws made?
* What is the key purpose of this service/feature?

### When?
* When does the abstractions leak? When does what i know ( believe ) change?
    * Does it break under load?
    * During certain kinds of outages? ( AZ down? Other service having problems? )
    * Randomly but rare? ( Amortized costs? Network glitches? )
* When might i get throttled or hit service limits?
    * Which ones are fixed in stone?
    * Which ones can be changed?

### How ?
* How is this similar to what i've seen before?
* How is this different from what i've seen before?
* How did they build this?
    * Based on my understanding, what should be the limitations?
    * Am i right about this?
* How can i test what i believe?
* How does AWS handle failures?
* How do i handle failures?
* How does this intergrate with other services?

### Who ?
* Who is the target for this service?
* Service offerings target real user scenarios - based on customer feedback
* Integrate those into your mental model to make better predictions about how it should / does work.

# How teaching others can help

### Teaching
Forces you to communicate what you have learned. Requires you to understand the material more deeply. May also result in further questions that you hadnt considered. Explaining in detail to someone else will concrete these in your head.

### Dive in!
* Find a forum question that interests you. Research it until you can answer it. With full explanations. Make your response defensible, not just an opinion or guess. Use quotes from and links to official documentation!

### 30 Second Summary
* On any topic or technology.
* Recite a 15 to 30 second summary.
* Key strengths.
* Key weaknesses.
* How it interacts with other services.

# Visualization

Its not just vision.
> The words "visualization" and "imagery" are in some ways misleading. while the domiant sense is usually vision, visualization does not just involve seeing. The more senses you involve, the stronger the effect. Hear a switch click when you turn it on, or feel an engine turn over and the vibrations when you start it. Smell fuel when you check a fuel tank.. All these can significantly improve how your visualizations work.

### Example
* Imagine yourself as a network packet.
* On your way home ( a client system ).
* To work ( a load-balanced server in a VPC ).
* Driving and turning along roads ( network hops, routing, load balancing ).
* And passing security checkpoints (firewalls, network ACLs, security groups).
* Some are machines that always check your papers ( stateless; nACLs)
* Others have guards that remember you on the way back ( stateful;SGs )

# PDCA

### What is PDCA
* Plan
    * Plan what youre going to do to learn some new material
* Do
    * Do what you planned; set about actually learning it.
* Check
    * Check how well that plan worked-both how easy and how effective it was.
* Adjust
    * Adjust your plan for future learning, emphasizing techniques that worked well.

# What to do before the exam

### Month before
* Read AWS Certification FAQ
    * Think about the exam process.
* Read Exam blueprint
    * Pay attention to the exam waiting in each content domain
    * Read every line item.
* Take ACLOUD.Guru certification course final practice exam
    * Take for first time, as assessment.
    * Repeat until consistently scoring 100%.
    * Understand why every incorrect answer is wrong.
    * Unserstand why every correct answer is right.
* Read certification course forum posts about the exam feedback.
    * Read throught the 20-30 highest-ranked from the last 2-8 weeks.
    * Read through all exam related posts from the last 2-8 weeks.

### Week or Two Before
* Take aws practise exam for the first time.
    * Late enough to evaluate yourself.
    * Early enough to refresh on weak areas.
    * Early enough to reschedule / cancel without penalty, if necessary.
    * Take screenshots!
    * Rip the questions and responses apart!
* Read the latest exam feedback forum posts.
* Schedule exam.

### Day Before
* Rewatch training course summary lessons
* Review your own notes.
* Download some key course videos to phone.
* Read top forum posts with details to remember.
* Consider reading most recent forum posts for very latest feedback.
* Read AWS sample questions.
* Review questions from AWS practise exam.
* Review memorization items.

### Evening Before
* Double check details.
    * Exam location
    * Exam time.
    * All Documents ( Govt-issued picture ID ) ( Additional ID ).
    * Set out printed exam details.
* Metally prepare.

### Just Before
* Come early!
    * Last minute review notes
    * watch key downloaded training videos
* Go to the bath room.
* Validate IDs and the exam registration with proctor
* Lock up everything you have.
    * Empty every pocket of everything.


text:
# Semestral work – Tower defense

Two-day work full of helplessness, crying and suffering.

My result: 11.70 / 12.00 :relaxed:

## [Assignment (in Czech)](zadani.txt)

## Screenshot

### Main menu

Main screen contains a few items to select. Nothing unusual.

![Main menu](_screenshot/01.png)

### Game screen

In the game screen you can see the map with `#` for wall, `@` for road, some letter for each tower and ` ` for empty cell.

In the command prompt you can use `exit`, `save` and `tower` commands. How to use them is described in info screen after using the particular command.

![Game screen](_screenshot/02.png)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
* [Introduction](#1)
* [Role Variables](#2)
* [Example Playbook](#3)

## Introduction
--------------

This ansible role is to setup Redis and to start redis-server instances.

## Role Variables
--------------
### Expected to Be Configured

* `redis_cpus`: specify the CPUs used by redis-server

### Proxy configuration options

### Role Defaults

## Example Playbook
----------------

```
---
- hosts: redis_hosts
  remote_user: estuaryapp
  become: yes
  roles:
    - redis

```

For more examples, please refer to [e-commerce-springcloud-microservice](https://github.com/open-estuary/appbenchmark/tree/master/apps/e-commerce-solutions/e-commerce-springcloud-microservice)

License
-------

BSD

repository: open-estuary/appbenchmark

gha_language: C

repo_name: open-estuary/appbenchmark


text:
Injectable camera for Prey 2017
============================

Current supported game version: v1.0.4+
Camera version: 1.0.5
Camera release binaries: https://github.com/FransBouma/InjectableGenericCameraSystem/releases/tag/Prey_105
Credits: Otis_Inf. HUD toggle by Jonas Beckman & SunBeam

### How to use
Read the enclosed readme.txt for details.

### Acknowledgements
This camera uses [MinHook](https://github.com/TsudaKageyu/minhook) by Tsuda Kageyu.

repository: Batname/InjectableGenericCameraSystem

repo_name: Batname/InjectableGenericCameraSystem


text:
# more-words

> List of common English words.

Useful if you're creating a word game or just want some words to work with. This list mostly consists of commonly-used words.

Used by [acronym](https://github.com/patlillis/acronym).

## Install

```
$ npm install --save more-words
```

## Usage

```js
import words from 'more-words'
// words is just an array of words

console.log(words)
// => [..., 'annoys', 'antagonistic', 'anti', ...]
```

## License

MIT © Pat Lillis

repository: patlillis/more-words

repo_name: patlillis/more-words


text:
```@meta
CurrentModule = Pathfinder
```

# Pathfinder.jl: Parallel quasi-Newton variational inference

This package implements Pathfinder, [^Zhang2021] a variational method for initializing Markov chain Monte Carlo (MCMC) methods.

## Single-path Pathfinder

Single-path Pathfinder ([`pathfinder`](@ref)) attempts to return draws in or near the typical set, usually with many fewer gradient evaluations.
Pathfinder uses the [limited-memory BFGS](https://en.wikipedia.org/wiki/Limited-memory_BFGS)(L-BFGS) optimizer to construct a _maximum a posteriori_ (MAP) estimate of a target posterior distribution ``p``.
It then uses the trace of the optimization to construct a sequence of multivariate normal approximations to the target distribution, returning the approximation that maximizes the [evidence lower bound](https://en.wikipedia.org/wiki/Evidence_lower_bound) (ELBO) -- equivalently, minimizes the [Kullback-Leibler](https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence) divergence from the target distribution -- as well as draws from the distribution.

## Multi-path Pathfinder

Multi-path Pathfinder ([`multipathfinder`](@ref)) consists of running Pathfinder multiple times.
It returns a uniformly-weighted mixture model of the multivariate normal approximations of the individual runs.
It also uses importance resampling to return samples that better approximate the target distribution and assess the quality of the approximation.

## Uses

### Using the Pathfinder draws

!!! note "Folk theorem of statistical computing"
    When you have computational problems, often there’s a problem with your model.

Visualizing posterior draws is a common way to diagnose problems with a model.
However, problematic models often tend to be slow to warm-up.
Even if the draws returned by Pathfinder are only approximations to the posterior, they can sometimes still be used to diagnose basic issues such as highly correlated parameters, parameters with very different posterior variances, and multimodality.

### Initializing MCMC

Pathfinder can be used to initialize MCMC.
This especially useful when sampling with Hamiltonian Monte Carlo.
See [Initializing HMC with Pathfinder](@ref) for details.

## Integration with the Julia ecosystem

Pathfinder uses several packages for extended functionality:

- [Optimization.jl](https://optimization.sciml.ai/stable/): This allows the L-BFGS optimizer to be replaced with any of the many Optimization-compatible optimizers and supports use of callbacks. Note that any changes made to Pathfinder using these features would be experimental.
- [Transducers.jl](https://juliafolds.github.io/Transducers.jl/stable/): parallelization support
- [Distributions.jl](https://juliastats.org/Distributions.jl/stable/)/[PDMats.jl](https://github.com/JuliaStats/PDMats.jl): fits can be used anywhere a `Distribution` can be used
- [LogDensityProblems.jl](https://www.tamaspapp.eu/LogDensityProblems.jl/stable/): defining the log-density function, gradient, and Hessian
- [ProgressLogging.jl](https://julialogging.github.io/ProgressLogging.jl/stable/): In Pluto, Juno, and VSCode, nested progress bars are shown. In the REPL, use TerminalLoggers.jl to get progress bars.

[^Zhang2021]: Lu Zhang, Bob Carpenter, Andrew Gelman, Aki Vehtari (2021).
              Pathfinder: Parallel quasi-Newton variational inference.
              arXiv: [2108.03782](https://arxiv.org/abs/2108.03782) [stat.ML].
              [Code](https://github.com/LuZhangstat/Pathfinder)

branch_name: refs/heads/main

gha_language: Julia

gha_license_id: MIT


text:
---
layout: page
title: About
permalink: /about.html
---
👋 Hi there! I'm Mike Auclair, a software engineer living in Chicago, IL. I recently wrapped up my stint as Engineering Director at [Ad Hoc](https://adhoc.team). During my time there, I spent some time building front-end and back-end applications, designing the architecture for (and taking part in the implementation of) the new plan shopping experience on [healthcare.gov](https://healthcare.gov), building out teams to take on new and existing work on healthcare.gov, staffing teams for new work across the company, and mentoring our corps of engineering leads.

Things I care about deeply include:
- Building teams that feel ownership of the applications they build
- Using measurement to drive change in systems, but recognizing that it will never tell you if you're not building the right thing for your users
- Mentoring engineers and those directly leading them, both technically and career-wise
- Recognizing that the technological system is only one part of the wider system it operates in
- Scaling systems and teams through simplicity

repository: mikeauclair/quick-static-blog-tf

gha_language: HTML

repo_name: mikeauclair/quick-static-blog-tf


text:
# Slack

If you wish to get error notifications on slack, you should set it up.

1) go to https://api.slack.com/apps and click "Create new app"

![Screenshot](13/13-1.png)

2) enter a name and choose your workspace

![Screenshot](13/13-2.png)

3) click on "oauth & permissions" on left menu

![Screenshot](13/13-3.png)

4) add "chat.write.public" and "chat.write" scopes

![Screenshot](13/13-4.png)

5) click "install app"

![Screenshot](13/13-5.png)

6) grant permissions

![Screenshot](13/13-6.png)

7) you now have your slack token

![Screenshot](13/13-7.png)

### Project configuration

- Set `SLACK_TOKEN` with your Slack token

- Set `SLACK_CHANNEL` you wish to use to receive errors

- Set `SLACK_EMOJI` with any icon you want (to distinguish environments for example)

[Go back](../../README.md)


text:
### hubot-booze

#### Description
Buy some booze for a friend with hubot!

#### Installation
`npm install --save hubot-booze`

add `["hubot-booze"]` to your `external-scripts.json`.

#### Examples

`hubot beer Fred` -> Foo: Buys a Pliny the Elder for Fred!
`hubot whisky Joe` -> Foo: Buys a Poopy Von Wonkle for Joe!

repository: brbcoding/hubot-booze

repo_name: brbcoding/hubot-booze


text:
# Raspberry PI3/4 with I2T Sensors Stack  --  HTTP Protocol

The *Raspberry Pi* is a series of small single-board computers developed in the United Kingdom by the *Raspberry Pi Foundation*. Early on, the Raspberry Pi project leaned towards the promotion of teaching basic computer science in schools and in developing countries.

This Repository contains the source code and the steps to follow to be able to make ***Raspberry PI3/4*** read sensor data and send it, in an organized way, to the **[Tangle](https://www.youtube.com/watch?v=ESF8UZM70wU) (DLT)** of the **[IOTA Network](https://www.iota.org/)** through the **[Streams](https://www.iota.org/solutions/streams)** layer.

## Setting up your Raspberry with the I2T Sensors Stack

The following installation is done on **"Raspberry Pi OS"** (formerly Raspbian) and works for *Raspberry Pi 3* and *Raspberry Pi 4*.

This is the list of Sensors/Modules that you can connect and it will be recognized immediately.
- ***BME280*** (*Bosch*) - Temperature, Humidity and Pressure sensor. -> Connected by *I2C Bus* via: *GPIO2/SDA* and *GPIO3/SCL* --- Be careful with the supply of this sensor, the BM280 is powered with 3.3V, if your module does not have a voltage regulator (some modules do not have it) the sensor can be damaged if you supply 5V.
- ***MPU6050*** (*InvenSense-TDK*) - Acelerometer and Gyroscope 6-axis. -> Connected by *I2C Bus* via: *GPIO2/SDA* and *GPIO3/SCL*.
- ***BH1750*** (*ROHM*) - Ambient Light Sensor. -> Connected by *I2C Bus* via: *GPIO2/SDA* and *GPIO3/SCL*.
- ***Generic Adjustable Sound Sensor with digital output*** (like *KY038 Module*) - -> Digital Signal on *GPIO24*, +5V in *GPIO23* (to enable data collection).
- Also, you can connect a ***Green LED*** in *GPIO17* that blink when the data is sent to the Tangle, and a ***Red LED*** in *GPIO27* that will Blink in a certain way when it detects certain errors (totally optional)

### Connecting the sensors

The following diagram explains how each sensor of our stack must be connected to the Raspberry pins:

![I2T Sensors Stack on Raspberry](https://iot2tangle.io/assets/screenshots/Hardware_connections_Raspi-01.png)

**It is not necessary to have all the sensors listed here**, the code is able to detect which sensors were connected. In the case of not connecting any sensor, the only real data that will be displayed on the Tangle will be the Internal Temperature of *Raspberri Pi*.

## Setting up the Sensors Software

This software is written entirely in **C language**. External libraries are used, such as ***wiringpi*** (optimized library for Raspberry hardware handling), ***cURL*** (HTTP Client library) and among others already integrated in *Raspberry Pi OS*.

### C Software Configuration:
In *Shell* of Raspberry Pi:

#### 1) Install dependencies:
```
sudo apt-get install wiringpi libcurl4-openssl-dev
```
#### 2) Enable I2C in your Raspberry Pi if you never did. It is done only once:
```
sudo raspi-config
```
Use the down arrow to select 5: *'Interfacing Options'*, again use the arrow and select 5: *'I2C'*, then *Enable*.

#### 3) Copy the repository to the local file system of your Raspberry.
```
git clone https://github.com/iot2tangle/Raspberry.git
cd Raspberry/http-sender
```
#### 4) Edit the file config.h

Edit the **config.h** file to define the values for your configuration: The *endpoint* and *port* that will have the *I2T Streams HTTP Gateway* running, the *Device Id*, and others configurations. The *Device Id* you define here must be between the devices you set in on the *Gateway configuration file*.

Keep in mind that any changes on the config file will require to recompile the code.

```
const char* id_name = "Raspi-HTTP";

/* Endpoint Configuration */
const char* endpoint = "<IP_ADDRESS>/sensor_data";    /* Endpoint (HTTP), must NOT include 'http://xxx' or 'tcp://xxx' */
int port = 8080;

/* Enable Sensors */
bool isEnable_TemperatureIntern = true;
bool isEnable_TemperatureExtern = true;	   /* true: Enable  --  false: Disable */
bool isEnable_Humidity = true;
...

/* Interval of time */
long interval = 30;    /* Time in seconds between */
```

#### 5) Compile the code with:
```
make
```
#### 6) Run:
```
./Raspi-HTTP
```

If the *I2T Streams HTTP Gateway* is configured correctly (we will explain this next), ***you will be sending data to Tangle via Streams***.

The following capture shows a *Raspberry Pi* with a *BME280* connected (note how the sensor is detected automatically):

![Raspberry with BME280 sending data to the Tangle](https://i.postimg.cc/cH6TWpXP/Screenshot-from-2020-10-16-11-33-05.png)

Here we can see the result when all the sensors have been connected:

![Raspberry with all sensors sending data to the Tangle](https://i.postimg.cc/XvsxTjcw/Screenshot-from-2020-10-16-11-34-46.png)

# Setting up the Streams HTTP Gateway

## Preparation

Install Rust if you don't have it already. More info about Rust here https://www.rust-lang.org/tools/install

```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Make sure you also have the build dependencies installed, if not run:

```
sudo apt update
sudo apt install build-essential pkg-config libssl-dev
```

## Installing the Streams Gateway
Get the Streams Gateway repository
https://github.com/iot2tangle/Streams-http-gateway

```
git clone https://github.com/iot2tangle/Streams-http-gateway
```

Navigate to the root of **Streams-http-gateway** directory and edit the **config.json** file to define yours *device names*, *endpoint*, *port*, you can also change the IOTA Full Node used, among others.

## Start the Streams Server

### Sending messages to the Tangle

Run the Streams Gateway:

```
cargo run --release
```

This will compile and start the *Streams HTTP Gateway*. Note that the compilation process may take from 3 to 25 minutes (Pi3 took us around 15/25 mins, Pi4 8 mins and VPS or desktop machines will generally compile under the 5 mins) depending on the device you are using as host.
You will only go through the compilation process once and any restart done later will take a few seconds to have the Gateway working.

Once started, the ***Channel Id*** will be displayed, and the gateway will be open waiting for data to send to the Tangle.

![Streams Gateway receiving data](https://i.postimg.cc/zfz0tbWz/Screenshot-from-2020-10-16-11-44-59.png)
*The Channel Id that will allow subscribers to access the channel data.*

### Reading messages from the Tangle

You can read the received messages directly from the "I2T Explorer": https://explorer.iot2tangle.io/ using the Channel Id printed by the Gateway in shell.

![I2T Explorer](https://i.postimg.cc/wTNf7dgp/Screenshot-from-2020-10-16-11-46-16.png)

*For inquiries, improvements or errors detected, please start an issue in this repository.*


text:
# Single-Stage Semantic Segmentation from Image Labels

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Framework](https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?&logo=PyTorch&logoColor=white)](https://pytorch.org/)

This repository contains the original implementation of our paper:

**Single-stage Semantic Segmentation from Image Labels**

*[Nikita Araslanov](https://arnike.github.io) and [Stefan Roth](https://www.visinf.tu-darmstadt.de/team_members/sroth/sroth.en.jsp)*

CVPR 2020. [[pdf](https://openaccess.thecvf.com/content_CVPR_2020/papers/Araslanov_Single-Stage_Semantic_Segmentation_From_Image_Labels_CVPR_2020_paper.pdf)] [[supp](https://openaccess.thecvf.com/content_CVPR_2020/supplemental/Araslanov_Single-Stage_Semantic_Segmentation_CVPR_2020_supplemental.pdf)]
[[arXiv](https://arxiv.org/abs/2005.08104)]

Contact: Nikita Araslanov<EMAIL_ADDRESS>

|
 |
|:---|
| We attain competitive results by training a single network model
 for segmentation in a self-supervised fashion using only
 image-level annotations (one run of 20 epochs on Pascal VOC). |

### Setup
0. **Minimum requirements.** This project was originally developed with Python 3.6, PyTorch 1.0 and CUDA 9.0. The training requires at least two Titan X GPUs (12Gb memory each).
1. **Setup your Python environment.** Please, clone the repository and install the dependencies. We recommend using Anaconda 3 distribution:
    ```
    conda create -n <environment_name> --file requirements.txt
    ```
2. **Download and link to the dataset.** We train our model on the original Pascal VOC 2012 augmented with the SBD data (10K images in total). Download the data from:
    - VOC: [Training/Validation (2GB .tar file)](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar)
    - SBD: [Training (1.4GB .tgz file)](http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz)

    Link to the data:
    ```
    ln -s <your_path_to_voc> <project>/data/voc
    ln -s <your_path_to_sbd> <project>/data/sbd
    ```
    Make sure that the first directory in `data/voc` is `VOCdevkit`; the first directory in `data/sbd` is `benchmark_RELEASE`.
3. **Download pre-trained models.** Download the initial weights (pre-trained on ImageNet) for the backbones you are planning to use and place them into `<project>/models/weights/`.

    | Backbone | Initial Weights | Comment |
    |:---:|:---:|:---:|
    | WideResNet38 | [ilsvrc-cls_rna-a1_cls1000_ep-0001.pth (402M)](https://download.visinf.tu-darmstadt.de/data/2020-cvpr-araslanov-1-stage-wseg/models/ilsvrc-cls_rna-a1_cls1000_ep-0001.pth) | Converted from [mxnet](https://github.com/itijyou/ademxapp) |
    | VGG16 | [vgg16_20M.pth (79M)](https://download.visinf.tu-darmstadt.de/data/2020-cvpr-araslanov-1-stage-wseg/models/vgg16_20M.pth) | Converted from [Caffe](http://liangchiehchen.com/projects/Init%20Models.html) |
    | ResNet50 | [resnet50-19c8e357.pth](https://download.pytorch.org/models/resnet50-19c8e357.pth) | PyTorch official |
    | ResNet101 | [resnet101-5d3b4d8f.pth](https://download.pytorch.org/models/resnet101-5d3b4d8f.pth) | PyTorch official |

### Training, Inference and Evaluation
The directory `launch` contains template bash scripts for training, inference and evaluation.

**Training.** For each run, you need to specify names of two variables, for example
```bash
EXP=baselines
RUN_ID=v01
```
Running `bash ./launch/run_voc_resnet38.sh` will create a directory `./logs/pascal_voc/baselines/v01` with tensorboard events and will save snapshots into `./snapshots/pascal_voc/baselines/v01`.

**Inference.** To generate final masks, please, use the script `./launch/infer_val.sh`. You will need to specify:
* `EXP` and `RUN_ID` you used for training;
* `OUTPUT_DIR` the path where to save the masks;
* `FILELIST` specifies the file to the data split;
* `SNAPSHOT` specifies the model suffix in the format `e000Xs0.000`. For example, `e020Xs0.928`;
* (optionally) `EXTRA_ARGS` specify additional arguments to the inference script.

**Evaluation.** To compute IoU of the masks, please, run `./launch/eval_seg.sh`. You will need to specify `SAVE_DIR` that contains the masks and `FILELIST` specifying the split for evaluation.

### Pre-trained model
For testing, we provide our pre-trained WideResNet38 model:

| Backbone | Val | Val (+ CRF) | Link |
|:---:|:---:|:---:|---:|
| WideResNet38 | 59.7 | 62.7 | [model_enc_e020Xs0.928.pth (527M)](https://download.visinf.tu-darmstadt.de/data/2020-cvpr-araslanov-1-stage-wseg/models/model_enc_e020Xs0.928.pth) |

The also release the masks predicted by this model:

| Split | IoU | IoU (+ CRF) | Link | Comment |
|:---:|:---:|:---:|:---:|:---:|
| train-clean (VOC+SBD) | 64.7 | 66.9 | [train_results_clean.tgz (2.9G)](https://download.visinf.tu-darmstadt.de/data/2020-cvpr-araslanov-1-stage-wseg/results/train_results_clean.tgz) | Reported IoU  is for VOC |
| val-clean | 63.4 | 65.3 | [val_results_clean.tgz (423M)](https://download.visinf.tu-darmstadt.de/data/2020-cvpr-araslanov-1-stage-wseg/results/val_results_clean.tgz)  | |
| val | 59.7 | 62.7 | [val_results.tgz (427M)](https://download.visinf.tu-darmstadt.de/data/2020-cvpr-araslanov-1-stage-wseg/results/val_results.tgz) | |
| test | 62.7 | 64.3 | [test_results.tgz (368M)](https://download.visinf.tu-darmstadt.de/data/2020-cvpr-araslanov-1-stage-wseg/results/test_results.tgz) | |

The suffix `-clean` means we used ground-truth image-level labels to remove masks of the categories not present in the image.
These masks are commonly used as pseudo ground truth to train another segmentation model in fully supervised regime.

## Acknowledgements
We thank PyTorch team, and Jiwoon Ahn for releasing his [code](https://github.com/jiwoon-ahn/psa) that helped in the early stages of this project.

## Citation
We hope that you find this work useful. If you would like to acknowledge us, please, use the following citation:
```
@InProceedings{Araslanov:2020:SSS,
author = {Araslanov, Nikita and Roth, Stefan},
title = {Single-Stage Semantic Segmentation From Image Labels},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
pages = {4253--4262}
year = {2020}
}
```


text:
# Database

The system diverges from traditional database migrations in favor of always up-to-date Schema file. There is a schema model:

app/models/schema.rb

This model describes the structure of the database, relating model attributes to database tables and columns.

To update a database to match the current schema model, run the following rake task:

```shell
rake repconnex:create_schema
```

In a normal setup on your development machine, the `RAILS_ENV` variable is set to `development` so this will update your local database.

To update the staging server's database, run the following:

```shell
RAILS_ENV=staging rake repconnex:create_schema
```

And to update the production server's database, run the following:

```shell
RAILS_ENV=production rake repconnex:create_schema
```

In addition, there are a few scripts that will copy databases for you. To copy the production database down to your local database, run the following:

```shell
ruby copy_db.rb
```

To copy the production database to the staging database, run the following:

```shell
ruby copy_db_production_to_staging.rb
```

Regarding databases, there are two deployment scenarios that would affect the database.

1. The addition of tables and columns on which the current production codebase doesn't use or depend.

In this scenario, it's acceptable to update the production database schema before pushing the codebase.

2. Renaming tables or columns, or otherwise affecting the ability for the current production codebase to continue to run without errors.

In this scenario, which is rare, you must do one of two things:

a. modify the production codebase to be able to run without error while the database is in a pre or post-update state

or

b. Put the site in a temporary frozen state and run the database update script immediately before pushing updates to the codebase.

repository: repconnex/docs

repo_name: repconnex/docs


text:
# Webservice for Universal Windows Apps

[![Build status](https://ci.appveyor.com/api/projects/status/1aj7614fb0o1bjdy?svg=true)](https://ci.appveyor.com/project/tomkuijsten/restup) [![NuGet downloads](https://img.shields.io/nuget/dt/restup.svg)](https://www.nuget.org/packages/Restup/)

### Goal
Provide a HTTP server supporting html and REST in order to keep Windows IoT projects going. Let's hope there will be a native solution soon, although there aren't any signs for that yet (if you have one, let me [know](https://github.com/tomkuijsten/restup/issues/new)).

### How this started

When the raspberry pi 2 was released, all windows 10 users were filled with joy when Microsoft announced the support of windows 10 for this neat device. After a couple of beta builds, we got the RTM version a couple of weeks ago. A crucial piece for this platform is missing, WCF. It might be supported in the future ([see post](https://social.msdn.microsoft.com/Forums/en-US/f462d578-368b-4218-b57e-19cd8852fd0c/wcf-hosting-in-windows-iot?forum=WindowsIoT)), but until then I would need some simple webservice implementation to keep my projects going.

The first couple of alpha and beta versions supported hosting REST controllers only, but since beta2 static files are supported as well. This also introduced a way to add your custom RouteHandler if you need anything that's not supported out-of-the-box. Take a look at the [wiki](https://github.com/tomkuijsten/restup/wiki) for details.

The REST implementation is using the guidelines from: https://github.com/tfredrich/RestApiTutorial.com.

### How you can start

Read the [wiki](https://github.com/tomkuijsten/restup/wiki), it explains it all.

### Latest release notes (beta2)
- Introducing RouteHandlers
- RestWebServer is obsolete, see [wiki](https://github.com/tomkuijsten/restup/wiki) for more info
- Static files can be served now
- Basic url query strings can be used
- The headed demo has a testing capabilities now

repository: MathieuDSTP/restup

repo_name: MathieuDSTP/restup


text:
# Changelog

## 0.1.2

Use `deepmerge` to merge options used in sandbox to avoid "erasing" deeply nested options.

repository: kristianmandrup/run-sandboxed

repo_name: kristianmandrup/run-sandboxed


text:
BagMinded
=========

upload to google appserver
appcfg.py --oauth2 -A bagminded update .

bootsmooth
==========

bootsmooth is a Google App Engine boilerplate for Python.

Benefits of using bootsmooth include:

1. Develop Web Apps on App Engine
bootsmooth is a starting point to quickly build your next app on Google's scalable cloud application platform.

2. Built with Python
bootsmooth.py is a Python library which integrates web.py, App Engine, and Pystache in to easy to use modules.

For more information, check out the latest development guides at http://www.bootsmooth.com/ or the reference documentation at http://www.bootsmooth.com/reference

gha_language: JavaScript


text:
# Workout Tracker

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Description

This web app runs with Node.js, Express.js, MongoDB and Mongoose.

A user can create a new workout session and add to existing workouts. They can also visit the dashboard to see their combined daily workout duration and the amount of pounds lifted over the course of each day. If the user logs workouts over several days, these are reflected in the dashboard as well.

---

## Table of Contents

* [License](#license)

* [Installation](#installation)

* [Usage](#usage)

* [Images](#images)

* [Credits](#credits)

* [Questions](#questions)

---

## License

This project is licensed under the MIT License. To learn more visit:
> [MIT License](https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt)

## Installation

To install the necessary dependencies, right-click on the root directory, open the intregrated terminal, and run this command:

```
npm i
```
If the package.json file is missing, create the file using this command:

```
npm init -y
```
To install the necessary dependencies, run this command for express, mongoose, nodemon, and morgan (optional npm to see status of routes in the integrated terminal).

```
npm i <dependency>
```

## Usage

To initialize the app from VS Code, open the intregrated terminal from the root directory and run:

```
nodemon server.js
```
If you wish to seed the database and test the functionality, run this command:

```
node seeders/seed.js
```

Then open your browser at: **localhost:3000/**

</br>

> To see the deployed application in Heroku, visit <https://morning-coast-60192.herokuapp.com/>

## Images
![Screenshot of Workout Tracker](public/images/fitness_homepage.png)

## Credits
MIT badge was accessed from GitHub user [Lukas Himsel](https://gist.github.com/lukas-h/2a5d00690736b4c3a7ba)

## Questions

If you have any questions, please contact me at: paolaagonzalezm@email.arizona.edu.


text:
# Tuya Smart iOS BizBundle Demo

[English](README.md) | [中文版](README_cn.md)

## Introduction

Tuya iOS UI BizBundle is a vertical business bundle that contains logic modules and UI pages. It's designed to provide customers with the ability to quickly access the Tuya business module based on the Tuya Smart Home SDK.You can run the module according to the selected bizbundle.

## Documentation

[Tuya Smart iOS Bizbundle Doc](https://tuyainc.github.io/tuyasmart_bizbundle_ios_doc/en/)

## Support

You can get support from Tuya with the following methods:

- Tuya Smart Help Center: https://support.tuya.com/en/help
- Technical Support Council: https://iot.tuya.com/council/

## License

Tuya Smart UI BizBundle Sample is licensed under the **MIT License**.

gha_language: Objective-C


text:
---
title: Overview
---

## Injecting Secrets

**This document is work in progress.**

Unlike most configuration, many organizations disallow storing of plain secret values next to other code/configuration.

This document:
- presents several common approaches used to make secrets available to your templates
- does _not_ cover injection of secrets directly into an application at runtime (overall may be the best approach)
- does _not_ recommend one approach over another (though it does state pros and cons)
- does _not_ talk about where resulting templates are forwarded

One common question that's asked is why not to extend ytt to allow it to shell out to other programs or why not include builtin library that can fetch secrets from outside (e.g. imagine having builtin `vault` function). We are _not_ planning to support either of these features because we want to maintain strong sandbox boundary between templating language and ytt's external environment. Our expectation is that if ytt user wants to provide specific data to templates, it should be injected into ytt rather than templates (or ytt itself) fetching it. We believe this is a good security posture and as a side effect makes templates more portable (some users may store secrets in Vault and some other in Lastpass).

- [Via command line args](#via-command-line-args)
- [Via environment variables](#via-environment-variables)
- [Via secret references, before templating](#via-secret-references-before-templating)
- [Via encrypted secrets, before templating](#via-encrypted-secrets-before-templating)
- [Via secret references, after templating](#via-secret-references-after-templating)
- [Via encrypted resources, later decrypted inside the k8s cluster](#via-encrypted-resources-later-decrypted-inside-the-k8s-cluster)

There might be other ways to inject secrets into ytt that are not listed here.

---
### Via command line args

```bash
ytt -f . --data-value username=user --data-value password=pass
```

Cons:

- depending on a computing environment secret values are visible in a process tree (as part of full command line) **which typically is considered unwanted**

---
### Via environment variables

```bash
export CFG_secrets__username=user
export CFG_secrets__password=pass
ytt -f . --data-values-env CFG
```

Cons:

- depending on a computing environment secret values are visible in process metadata (e.g. typically accessible to root user under `/proc/<pid>/environ`)

---
### Via secret references, before templating

Given following two files:

`config.yml`:

```yaml
#@ load("@ytt:data", "data")

users:
- username: #@ data.values.username
  password: #@ data.values.password
```

`secrets`:

```yaml
username: (( vault "secret/my/credentials/admin:username" ))
password: (( vault "secret/my/credentials/admin:password" ))
```

(Note that `secrets` file does not have `yaml` extension to make ytt exclude it from template result. Alternatively `--file-mark` flag can be used to exclude that file.)

One can compose ytt with external tooling that knows how to resolve referenced values. For example, [spruce](https://starkandwayne.com/blog/simple-secure-credentials-into-yaml-with-vault-and-spruce/) can resolve secret references and then forward that information onto ytt:

```bash
echo -e "#@data/values\n---\n$(spruce merge ./secrets)" | ytt -f . -f -
```

Pros:

- able to commit mapping of data values to secrets in your preferred secret storage (in this example Vault)
- actual secret values are available to templates, hence, can be inserted in the middle of a string or base64 encoded (as sometimes required by k8s)

---
### Via encrypted secrets, before templating

Similar to above "Via secret references, before templating" approach, instead of storing secret references in `secrets` file one can store encrypted secret values in `secrets` next to other configuration. Various tools like [sops](https://github.com/mozilla/sops) make encrypting configuration files fairly easy:

```bash
echo -e "#@data/values\n---\n$(sops -d ./secrets)" | ytt -f . -f -
```

Pros:

- provides a way to version (backup, etc) secrets next to other configuration
- actual secret values are available to templates, hence, can be inserted in the middle of a string or base64 encoded (as sometimes required by k8s)

Cons:

- depending on organization requirements even encrypted secrets may not be allowed to be stored next to other configuration

---
### Via secret references, after templating

Given following two files:

`config.yml`:

```yaml
#@ load("@ytt:data", "data")

users:
- username: #@ data.values.username
  password: #@ data.values.password
```

`values.yml`:

```yaml
#@data/values
---
username: (( vault "secret/my/credentials/admin:username" ))
password: (( vault "secret/my/credentials/admin:password" ))
```

One can compose ytt with external tooling that knows how to resolve referenced values. Such tools typically look for a particular patterned map or array items. One such tool is [spruce](https://starkandwayne.com/blog/simple-secure-credentials-into-yaml-with-vault-and-spruce/):

```bash
ytt -f . | spruce merge -
```

Pros:

- provides a way to commit mapping of data values and their associated secret locations (e.g. `username` comes from `vault` under `secret/my/credentials/admin:username`)

Cons:

- secret resolution tools may not be able to find secret references inside strings (e.g. `http://(( ... )):(( ... ))@website`)
- secret resolution tools will not understand if secret reference was encoded (for example with `base64` encoding as wanted sometimes by k8s)

---
### Via encrypted resources, later decrypted inside the k8s cluster

This approach is Kubernetes specific.

[Bitnami's `sealed-secrets` project](https://github.com/bitnami-labs/sealed-secrets) provides a way to encrypt secrets hence allowing to commit them next to your other configuration. With this approach, secret values are not accessible to templates directly; however, they can be referenced by k8s resources (for example via `secretRef` in `Pod` spec). At the time of the deploy of such resources, sealed secrets controller will create appropriate `Secret` objects with decrypted secret values.

Pros:

- provides a way to version (backup, etc) secrets next to other configuration
- no way to access decrypted secret values in templates directly (though, this may not be necessary in many cases)

Cons:

- Kubernetes specific
- depending on organization requirements even encrypted secrets may not be allowed to be stored next to other configuration

branch_name: refs/heads/develop


text:
These are the old instructions using Microsoft's old app registration portal - set to be removed in September 2019

### Create Microsoft Application

In order to use Microsoft's services API which is referred to as Microsoft Graph, you will need to use your account to register an application. To do so, visit their application registration portal:

https://apps.dev.microsoft.com/

Once you've signed in, click on "Add an app". Give your app a name and click on "Create application".

![](documentation/screenshots/screen1.png) |
------------ |
_Creating the Microsoft application_ |

First thing you want to do is generate a new application secret in password form. So click on "Generate New Password". Be sure to save the client secret! You'll eventually enter this in your configuration file as the `client_secret`.

![](documentation/screenshots/screen2.png) |
------------ |
_Getting a client secret_ |

Next you're going to want to add your platform. We're going to authenticate in the browser so click on "Add Platform", then "Web".

![](documentation/screenshots/screen3.png) |
------------ |
_Adding the web platform_ |

Add the following as the redirect URL: `http://localhost:8000/nix-server-onedrive-client/callback`.

![](documentation/screenshots/screen4.png) |
------------ |
_Adding the redirect URL_ |

The default permissions work for the purposes of the app. Click on "Save" at the bottom to save your changes.

Before leaving, save your application ID. You'll enter this in the configuration file as the `client_id`.

![](documentation/screenshots/screen5.png) |
------------ |
_Saving the application ID_ |


text:
---
layout: shows/episode
title: "Building and deploying a Progressive Web App at scale with Flipkart (Chrome Dev Summit 2015)"
youtubeID: "StdKz32M1RM"
youtubeThumbnail: "https://i.ytimg.com/vi/StdKz32M1RM/maxresdefault.jpg"
published_on: 2015-11-19
updated_on: 2015-11-19
---

Flipkart is one of the largest e-commerce companies in India. Hear from their development team about their approach in architecting an immersive mobile experience that is fast, reliable and engaging.

Watch more talks from Chrome Dev Summit 2015: https://goo.gl/e4c7vD

Subscribe to the Chrome Developers channel at: https://goo.gl/OUF4e2

repository: JcChimjj/WebFundamentals

extension: markdown

repo_name: JcChimjj/WebFundamentals


text:
Menu Effects
==============

A collection of CSS3 menu effects (degrades gracefully in IE8).

Have a look at the [Demo](http://louisremi.github.com/menu-effects/)!

Using and extending
-------------------

Your page should include both `menu-effects.css` and `menu-effect.js`. The latter is optionnal but makes the animation run progressively.

Your menus should be marked with `.menu` & `.submenu` classes, and an effect specific class such as `.fly`:

```html
<ul class="menu">
	<li>My submenu will fly!
		<ul class="submenu fly">
			<li>flying item 1</li>
			<li>flying item 2</li>
			...
		</ul>
	</li>
	<li>My submenu will pop!
		<ul class="submenu pop">
			<li>popping item 1</li>
			<li>popping item 2</li>
			...
		</ul>
	</li>
</ul>
```

You are welcome to fork and create new effects.

Credits & License
-----------------

Heavily inspired by [@hakimel](http://twitter.com/hakimel)'s [scroll-effects](http://lab.hakim.se/scroll-effects)

MIT Licensed http://louisremi.mit-license.org/, by [@louis_remi](http://twitter.com/louis_remi)

repository: mtfchn/JSdemo

repo_name: mtfchn/JSdemo


text:
---
layout: post
title: The conclusion of ICLR 2019
tags: [paper,conference,learning representations]
comments: true
---

- **BA-Net: Dense Bundle Adjustment Networks**
    ```
    Problem: Structure from motion
    Method: feature-metric bundle adjustment
    ```
- **Deterministic Variational Inference for Robust Bayesian Neural Networks**
    ```
    Problem: Argue that variational inference in neural networks is fragile
    Innovations:
        1、novel deterministic method
        2、hierarchical prior for parameters and  a procedure automatically selecting prior variances
    ```
- **Ordered Neurons: Integrating Tree Structures into Recurrent Neural Networks**


text:
#FastLegS

PostgreSQL ORM on top of node-postgres.

## Installation

    npm install FastLegS

## Quickstart

    var FastLegS = require('FastLegS');

    var connectionParams = {
      user: 'shes'
    , password: 'got'
    , database: 'legs'
    , host: 'localhost'
    , port: 5432
    }

    FastLegS.connect(connectionParams);

    var Post = FastLegS.Base.extend({
      tableName: 'posts',
      primaryKey: 'id'
    });

    Post.create({ title: 'Some Title 1', body: 'Some body 1' }, function(err, results) {
      Post.find({ 'title.ilike': '%title%' }, { only: ['id', 'body'] }, function(err, post) {
        // Hooray!

#Contributors

* Thad Clay (thadclay)
* Jim Drannbauer (excellentdrums)
* Rob Malko (malkomalko)

repository: wavded/FastLegS

repo_name: wavded/FastLegS


text:
+++
City = "Toronto"
Year = "2016"
date = "2016-03-06T21:28:07-06:00"
type = "event"
title = "Drew Nienaber"

+++

### Are YOU the Change Agent your Organization is Looking For…?

**Abstract:**

For most organizations, DevOps means a change, both to your process and your way of thinking. Change is hard and being the one to introduce change into your organization is even more difficult. In this Ignite, I’ll talk about the assumptions we make about change, the universal truths we accept about change, the questions to ask yourself before initiating change and four approaches to bringing it. With the help of the book Change Anything: The New Science of Personal Success, I’ll show how you can be the transformer & revolutionary you’ve always dreamed of being.

**Speaker:**

Drew Nienaber, @DrewNienaber

I'm (Drew) a sales guy, but don't hate me for that. I'm also a craft beer aficionado, a dad and a Nawlins boy desperately looking for Zapps chips in Colorado.

url: https://raw.githubusercontent.com/vjanelle/devopsdays-web/6ef062e067456fcf125e8fd8d1c0b1dd0ef387ae/content/events/2016-toronto/proposals/Are YOU the Change Agent your Organization is Looking For.md

repository: vjanelle/devopsdays-web

gha_license_id: NOASSERTION

repo_name: vjanelle/devopsdays-web


text:
# Disallow Empty Block Statements

Empty statements usually occur due to refactoring that wasn't completed. You may end up with empty statements inside of blocks or `switch`, or by having too many semicolons in a row.

## Rule Details

This rule is aimed at eliminating empty statements. While not technically an error, empty statements can be a source of confusion when reading code.

The following patterns are considered warnings:

```js
if (foo) {
}

while (foo) {
}

switch(foo) {
}
```

## When Not To Use It

If you intentionally use empty statements then you can disable this rule.

repository: rlidwka/eslint

repo_name: rlidwka/eslint


text:
# get-image-hlsl

This is a tool that takes a shader written in Microsoft's
[High Level Shading Language](https://en.wikipedia.org/wiki/High-Level_Shading_Language)
and converts it into an image.

Current limitations:

* The generated image is always a png (regardless of extension)
* The generated image is always 256x256
* It has a single hard coded vertex shader that just passes the
  position through to the pixel shader verbatim and a colour of white.
* It does not support passing data to the shader via uniforms.

The first two would be pretty easy to fix, the latter two should be
possible to fix but are somewhat harder.

Usage:

```bash
get-image-hlsl.exe SamplePixelShader.hlsl --output sometarget.png
```

You can also specify the driver type you want to use to render:

```bash
get-image-hlsl.exe SamplePixelShader.hlsl --output sometarget.png --driver reference
```

The available driver types are:

* hardware (use hardware rendering)
* warp (Microsoft's optimized software rendering implementation)
* reference (A slow reference implementation of the full D3D feature set)
* auto (use the best implementation available)

See the [D3D_DRIVER_TYPE](https://msdn.microsoft.com/en-us/library/windows/desktop/ff476328.aspx)
documentation for more details about these options.

# Building

This just builds in visual studio for the moment, and is written using
Visual Studio 2017. (I don't think this will actually work with an older
version of visual studio, but I haven't tried).

It requires DirectXTK, which NuGet *should* install for you automatically,
but if you're seeing missing header warnings that's probably why. If you're
using an older version of visual studio then you may not have NuGet installed.

Long term we'll want to at least get a basic command line build working, but
it will probably always still be building using the visual studio tool chain:
This is very much a Windows only project, because the thing it's designed
to target only exists on Windows!

repository: mc-imperial/get-image-hlsl

repo_name: mc-imperial/get-image-hlsl


text:
# logmatic-docker
*Link to the [Logmatic.io documentation](http://doc.logmatic.io/docs/docker)*

The Logmatic.io's container finds all your running containers' logs, events and stats and stream them to your platform.

# Use the image available on docker hub

This container as for unique option to pass the api key of your Logmatic.io's platform.

So to use the image available on docker hub simply run the following command:

```
docker run -dt -v /var/run/docker.sock:/var/run/docker.sock logmatic/logmatic-docker <your_api_key>
```

The mapping to the docker socket is really important as this is why we are able to identify all the running containers and follow their logs.

Nothing more to do.

# Options

Several options are allowed after the api key.

```
> logmatic-docker [apiKey]
   [-a ATTR (eg myattribute="my attribute")] //Several times ok
   [-h HOSTNAME (default "api.logmatic.io")] [-p PORT (default "10514")]
   [--namespace NAMESPACE (default "docker")]
   [--matchByImage REGEXP] [--matchByName REGEXP]
   [--skipByImage REGEXP] [--skipByName REGEXP]
   [--no-dockerEvents]
   [--no-logs]
   [--no-stats] [-i SECONDS (default 30s)]
```

## Add extra attributes

You can add extra attributes to all the pushed entries by chaining the option "--attr" or "-a".

## Match / Skip by name or image

If you don't want all your containers to send log entries to Logmatic.io you can user the options `--matchByImage`, `--matchByName`, `--skipByImage` or `--skipByName`.

However, use one inclusion/exclusion policy as these options cannot live together.

## Disable docker events

You can disable container events for each container using `--no-dockerEvents`.

## Disable docker logs

You can disable container logs using `--no-logs`.

## Disable docker container stats

You can disable container stats for each container using `--no-stats`. You can also set the interval with `-i statsInterval` (set to
30 seconds by default).

## Namespace the docker attributes

By default all the attributes related to Docker such as the container id, the name, the image etc... are contained into the `docker` object (as illustrated below). You can then use this parameter to change this namespace. With an empty namespace `--namespace ""`: all these attributes are merged at the root level.

# What are the data types sent to Logmatic.io?

This container sends 3 types of data:

- the log data published by your containers
- the docker events
- the docker stats

## Log data

The log data is published as is associated with some meta-data that identifies the container.
An NGINX log for instance would look like this:

```json
{
  "docker": {
    "image": "nginx",
    "id": "<container_id>",
    "name": "<container_name",
    "v": "<version>",
    "data_type": "log",
  },
  "message": "<IP_ADDRESS> - - [15/Dec/2015:17:36:50 +0000] \"GET / HTTP/1.1\" 304 0 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36\" \"-\""
}
```

**NOTE about JSON logging:**
If the container logs in JSON, the message field contains a valid JSON object. Logmatic.io will then parse it by default and you'll get all your attributes properly created at the root level in the user interface.

## Docker events

Docker events tells you the activity on your docker machine: create, kill, commit, etc...

```json
{
  "docker": {
    "image": "<image_name>",
    "id": "<container_id>",
    "name": "<container_name>",
    "host": "<your_host>",
    "type": "create",
    "data_type": "event"
  },
  "message": "[Docker event] host=\"a5900527eead577df14c7917e83f0b6ebeb7b3d103e44d0a93a1c05316c6d391\" name=\"boring_hypatia\" event=\"create\""
}
```

## Docker stats

Docker stats are all the metrics that matters by container. And there are a lot of them.

```json
{
  "docker": {
    "image": "<image_name>",
    "id": "<container_id>",
    "name": "<container_name>",
    "data_type": "stats",
    "stats": {
      "..."
    }
  },
  "message": "[Docker stats] host=\"nginx\" name=\"berserk_fermi\" main stats: [cpu%=0% mem%=0%]"
}
```

# Incoming features

We are at early stage concerning this docker instrumentation any comments are welcome and we will do as much as we can to integrate the desired features!

repository: dmetzler/logmatic-docker

repo_name: dmetzler/logmatic-docker


text:
# Release 0.36.0

## Features

- Add support for upgrading non-eksctl-created nodegroups (#2953)
- Add support for deleting non-eksctl-created clusters (#2969)

## Improvements

- Do not fail NodeName check when VPC DNS Hostnames is Disabled on Fargate clusters (#2999)
- Fix bootstrap command in the examples (#3003)
- Treat p4d as a GPU instance (#2991)
- Add option to specify IAM role name (#2863)
- Show progress of cluster update (#3023)

## Bug Fixes

- Set cgroupdriver to systemd on GPU nodes (#3007)

## Acknowledgments
Weaveworks would like to sincerely thank:
 @Tolsto, @damerakd, @dbluxo and @samsamoa

repository: spotinst/weaveworks-eksctl

branch_name: refs/heads/feat-spot-ocean

gha_language: Go

repo_name: spotinst/weaveworks-eksctl


text:
# OpenDataServices Homebrew Tap

Provides access for Homebrew users to packages that aren't available in homebrew-core.

## Formulae

scspell - a spellchecker for code

## How do I install these formulae?
`brew install opendataservices/tap/<formula>`

Or `brew tap opendataservices/tap` and then `brew install <formula>`.

## Documentation
`brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh).

repository: OpenDataServices/homebrew-tap

repo_name: OpenDataServices/homebrew-tap


text:
# chitchat

A simple chat web app as my playground for Rails and React, overly engineered for fun and learning.

## Prerequisites

These are the versions that I used on my dev environment. I didn't test the app on lower or higher versions:

* PostgreSQL 9.5
* Ruby 2.3.3
* Node v7.7.4

## Background

I wanted to build an app where I could practice and learn more about React and Rails 5, specially using the new Webpacker and applying React/JavaScript best practices. I hope that other devs can learn something useful from my implementation.

These are the notable tools/libraries/frameworks that I used:

* Rails 5
* Webpacker (with `webpacker:install:react`)
* ActionCable (Websocket for chat)
* SimpleCommand (Gem for writing service objects)
* JWT (JSON Web Token for authentication)
* RSpec
* ES6
* StandardJS (For JS linting)
* Flow (For static typing)
* React
* Redux
* redux-saga (For better and cleaner management of side-effects)
* React Router v4
* Redux Form v6

## TODOS

The app still has a long way to go and there are more tools that I need to explore. Here are the things that I still need to add:

- [ ] Add jest tests
- [ ] Add CI build
- [ ] HMR
- [ ] Add support for storing token in localStorage
- [x] Show previous messages
- [x] Show message timestamp
- [ ] Show online users
- [ ] Use Docker

## License

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

## Acknowledgments

* Thank you internet for all the helpful resources and smart people.

repository: fcbajao/chitchat

repo_name: fcbajao/chitchat


text:
# neXtProt - The knowledge resource on human proteins

This is a code repository for the SIB - Swiss Institute of Bioinformatics CALIPHO group neXtProt project

See: http://www.nextprot.org/

# Protein expression viewer

Protein expression view for neXtProt

## Heatmap documentation
https://calipho-sib.github.io/protein-expression/doc

## Installation
```
bower install
npm install
grunt default
```

## How to run the demo:

```
grunt default
```
open in browser: http://<IP_ADDRESS>:5000/

Todo:

1. Use the API in this page(https://search.nextprot.org/help/learn-programmatic-access), and got the json data from it.
2. Analyze the json with [nextprot-js library](https://github.com/calipho-sib/nextprot-js) and got 2 field "cvTermName" and "expressionLevel"
3. Find what the all possible values about them
4. Fill a table according the value
5. According the field-value table, create a heat map(like [this](http://peppsy.genouest.org/bodymap?id=NX_P68133&nextprot_release=release_2015-10-07&hgnc=ACTA1&description=Actin%2C%20alpha%20skeletal%20muscle#)) with javascript(D3.js), get a very similar [result](http://www.nextprot.org/db/entry/NX_P01308/expression), but with the new viewer

repository: calipho-sib/protein-expression

repo_name: calipho-sib/protein-expression


text:
# AMP HTML Extensions

AMP Extensions are either extended components or extended templates.

## AMP HTML Extended Components

Extended components must be explicitly included into the document as custom elements.

For example, to include a YouTube video in your page
include the following script in the `<head>`:

```html
<script
  async
  custom-element="amp-youtube"
  src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"
></script>
```

## Current list of components

See the [Components](https://www.ampproject.org/docs/reference/components) list.

## AMP HTML Extended Templates

See the [AMP template spec](../docs/spec/amp-html-templates.md) for details about supported templates.

repository: ampproject/amphtml

repo_name: ampproject/amphtml


text:
# netframework_clrremoting collector

The netframework_clrremoting collector exposes metrics about dotnet remoting.

|||
-|-
Metric name prefix  | `netframework_clrremoting`
Classes             | `Win32_PerfRawData_NETFramework_NETCLRRemoting`
Enabled by default? | No

## Flags

None

## Metrics

Name | Description | Type | Labels
-----|-------------|------|-------
`wmi_netframework_clrremoting_channels_total` | Displays the total number of remoting channels registered across all application domains since application started. | counter | `process`
`wmi_netframework_clrremoting_context_bound_classes_loaded` | Displays the current number of context-bound classes that are loaded. | gauge | `process`
`wmi_netframework_clrremoting_context_bound_objects_total` | Displays the total number of context-bound objects allocated. | counter | `process`
`wmi_netframework_clrremoting_context_proxies_total` | Displays the total number of remoting proxy objects in this process since it started. | counter | `process`
`wmi_netframework_clrremoting_contexts` | Displays the current number of remoting contexts in the application. | gauge | `process`
`wmi_netframework_clrremoting_remote_calls_total` | Displays the total number of remote procedure calls invoked since the application started. | counter | `process`

### Example metric
_This collector does not yet have explained examples, we would appreciate your help adding them!_

## Useful queries
_This collector does not yet have any useful queries added, we would appreciate your help adding them!_

## Alerting examples
_This collector does not yet have alerting examples, we would appreciate your help adding them!_


text:
---
title: Azure Data Lake Analytics - Loading files with custom C# code
date: 2016-01-13 16:00:56 -08:00
permalink: /2016/01/13/azure-data-lake-analytics-loading-files-with-custom-c-code/
categories:
- Solution
tags:
- Big Data
---
UPDATE (19-01-2016):  Have a look at Azure Data Lake series for more posts on Azure Data Lake.

Azure Data Lake (both Storage & Analytics) has been in public preview for a month or two.

You can get started by reading this.

I thought I would kick some posts about more complex scenarios to display what’s possibile with that technology.

In this post, I will load data from custom format files into Azure Data Lake Analytics (ADLA) tables.  This is the first step before running some analytics on the data.  It is the first checkpoint of the process.

When I say custom format file, I mean files that do not fall in the CSV / TSV / delimited file format.  This will lead us to explore how to use C# to do part of the parsing.

I won’t lie to you:  the product has a few rough edges in its first version of Public Preview, so I hope this post helps you find your destination faster!

Visual Studio Projects

In order to do this post, I’ve created a solution in Visual Studio with a U-SQL Project & a Class Library (For U-SQL Application) project.  Here are the final file structure of the solution:

We’ll go through it in this post.

So the plan here is to persists the three tables into three ADLA tables, following the checkpoint patterns.

Data set

I looked for some big data set and struggled a bit.  I either found tiny data sets with the equivalent of one-table or huge ones (multiple TB) which are a bit prohebitive for proof-of-concepts (POC) such as this post.

I settled for a fun one I found on Amazon AWS:  Social characteristics of the Marvel Universe.  It’s basically a data set about which Marvel characters appear in which comic books.

It is a non-trivial size but by no mean big data set.  So using Hadoop, a big compute engine, on it is a bit of an overkill but it’s for POC, isn’t it?

It has three parts:

Marvel characters

Marvel comic books

Relationship between the two

Those files have some Byte Order Mark (BOM) at the beginning to make things interesting.  Unfortunately at this point, this blows up in the USQL parsing.  The easiest way to remove the BOMs is to download the files locally, open them in Visual Studio, “Save As…”, then hit the arrow next to the save in the dialog box:

choose “Save with Encoding…”, choose UTF-8 without signature and save them.

While we are at it, for the last file, i.e. porgat.txt, we’ll need to remove the first part of the file.  Search for “*Edgeslist” and delete everything before it.  The file should now start with “1 6487”.

Let’s call those pre-processing…

Let’s copy those three files under your ADLS in one Marvel folder.

I won’t cover the basics-basics, please read Logistic / Get Started.

Create Database script

I want to put all the tables inside a database container so let’s create a database with two schemas:  one for the raw input files (as tables) and one for analytics (I’ll use it in a future post only).

In the CreateDbAndSchemas.usql file, let’s put the following content:

```sql
//  This drops the database (with its data) before recreating it
DROP DATABASE IF EXISTS Marvel;

//  Create a database
CREATE DATABASE Marvel;

//  Use the new database as the current
USE DATABASE Marvel;

//  Create two schemas
CREATE SCHEMA Input;
CREATE SCHEMA Analytic;
```

Remember USQL keywords must be uppercase in order not conflict with C# (e.g. SELECT vs select in Linq / C#).

You can submit that as a job and validate in the portal that the database is created.  You will not see the schemas there yet though.

Handling custom format:  function

I’ve tried different approach before seattling for this one.

Basically, the first two files share the same format while the latter has a different one.  I didn’t want to repeat the code for the first two files.

We could invoke some C# codes twice but I found that using an USQL function, itself invoking C# methods, to be the most elegant.

I fully covered how to register assemblies in this post.  For this, since we are invoking C# code from within a function, we are going to use the Visual Studio Register Assembly option.  The C# code is going to reside in a separate assembly.

Vertex Format

Let’s look at the first format, which I called the vertex format.  Here’s the beginning of vert1.txt:

```text
Vertex 1: 24-HOUR MAN/EMMANUEL
Vertex 2: 3-D MAN/CHARLES CHANDLER & HAROLD CHANDLER
Vertex 3: 4-D MAN/MERCURIO
Vertex 4: 8-BALL/
```

The format is pretty obvious but it also doesn’t comply with any format supported by USQL extractors, i.e. it isn’t comma or tab separated…  This is why we’re going to use C# code to parse it.  The most elegant way is to use a regular expression to parse and extract the data.  Here is the C# helper class to accomplish that:

```csharp
using System.Text.RegularExpressions;

namespace MarvelLib
{
  /// <summary>Helper class containing methods parsing a vertex format file.</summary>
  public static class VertexFormatHelper
  {
    private static readonly Regex _regex = new Regex(@"^\s*Vertex\s*(?<id>\d*)\s*:\s*(?<label>.*)\s*$");

    /// <summary>Predicate returning <c>true</c> iif a line of text is in the vertex format.</summary>
    /// <param name="line">Input line of text.</param>
    /// <returns></returns>
    public static bool IsVertexMatch(string line)
    {
      return _regex.IsMatch(line);
    }

    /// <summary>Get the ID from a vertex line.</summary>
    /// <param name="line">Input line of text.</param>
    /// <returns>ID of the vertex</returns>
    public static int GetID(string line)
    {
      var idText = _regex.Match(line).Groups["id"].Value;

      return int.Parse(idText);
    }

    /// <summary>Get the label from a vertex line.</summary>
    /// <param name="line">Input line of text.</param>
    /// <returns>Label of the vertex.</returns>
    public static string GetLabel(string line)
    {
      var label = _regex.Match(line).Groups["label"].Value;

      return label;
    }
  }
}
```

The Function consuming this is the following:

```sql
CREATE FUNCTION Input.GetVertexData(@fileSet string)
RETURNS @vertexData TABLE
(
  VertexID int,
  VertexLabel string
)
AS BEGIN
REFERENCE ASSEMBLY MarvelLib;

//  Extract the data with no schema, i.e. whole line
@lines =
  EXTRACT Line string
  FROM @fileSet
  // Hack in order not to have the extractor delimitate columns
  USING Extractors.Text(delimiter : '$');

//  Give the query a schema on read
@vertexData =
  //  Extract the vertex id & label from the line
  SELECT MarvelLib.VertexFormatHelper.GetID(Line) AS VertexID,
  MarvelLib.VertexFormatHelper.GetLabel(Line) AS VertexLabel
  FROM @lines
  WHERE MarvelLib.VertexFormatHelper.IsVertexMatch(Line);

RETURN;
END;
```

The function takes a string in parameter representing a file set.  A file set in U-SQL is either a file path or an expression representing multiple files (typically with ‘*’).

Notice the reference assembly operation within the body of the function.  This is necessary to use the C# method defined in that assembly.

The first expression parses the text file into rows.  We use a little hack to parse an entire row (line) at the time since U-SQL (at this point in time) doesn’t support to load one line at the time directly.

In the second expression we use the C# method to extract the ID and the label in each line.

The second expression is what is returned by the function.  We’ll see how we’ll further transform the expression.

Relation Format

Let’s look at the second format, which I called the relation format.  Here’s the beginning of porgat.txt:

```text
1 6487
2 6488 6489 6490 6491 6492 6493 6494 6495 6496
3 6497 6498 6499 6500 6501 6502 6503 6504 6505
4 6506 6507 6508
```

Again the format is pretty straightforward but isn’t directly supported by U-SQL Extractors.

We’re going to use the following C# class (simply splitting the line on spaces) to help us out:

```csharp
using Microsoft.Analytics.Types.Sql;
using System.Linq;

namespace MarvelLib
{
  public static class RelationFormatHelper
  {
    public static bool IsRelationMatch(string line)
    {
      var parts = line.Split(' ');

      return parts.Length != 0;
    }

    public static int GetID(string line)
    {
      var parts = line.Split(' ');

      return int.Parse(parts[0].Trim());
    }

    public static SqlArray<int> GetRelations(string line)
    {
      var parts = line.Split(' ');
      var relations = from p in parts.Skip(1)
                      select int.Parse(p);

      return SqlArray.Create(relations);
    }
  }
}
```

The function consuming this code is:

```sql
CREATE FUNCTION Input.GetRelationData(@fileSet string)
RETURNS @relationData TABLE
(
  MainID int,
  RelationID int
)
AS BEGIN
REFERENCE ASSEMBLY MarvelLib;

//  Extract the data with no schema, i.e. whole line
@lines =
  EXTRACT Line string
  FROM @fileSet
  // Hack in order not to have the extractor delimitate columns
  USING Extractors.Text(delimiter : '$');

//  Give the query a schema on read
@flatRelations =
  //  Extract the main id & the relations (as an array) from the line
  SELECT MarvelLib.RelationFormatHelper.GetID(Line) AS MainID,
        //   This is a SQL.Array<int>, a special U-SQL type
        MarvelLib.RelationFormatHelper.GetRelations(Line) AS RelationIDs
  FROM @lines
  WHERE MarvelLib.RelationFormatHelper.IsRelationMatch(Line);

//  Here we're gona unpack the relation IDs array on to many rows
@relationData =
  SELECT MainID,
          rid AS RelationID
  FROM @flatRelations
  CROSS APPLY EXPLODE (RelationIDs) AS r(rid);

RETURN;
END;
```

In the first expression we parse the lines of the file.

In the second expression, we use the C# methods to extract the main ID and the list of relation IDs as an SQL Array.

In the third expression, we explode the array of relation IDs on different rows.  I covered the CROSS APPLY EXPLODE in the following post.

The complete content of CreateFormatFunctions.usql is the following:

```sql
USE DATABASE Marvel;

DROP FUNCTION IF EXISTS Input.GetVertexData;
DROP FUNCTION IF EXISTS Input.GetRelationData;

CREATE FUNCTION Input.GetVertexData(@fileSet string)
RETURNS @vertexData TABLE
(
  VertexID int,
  VertexLabel string
)
AS BEGIN
REFERENCE ASSEMBLY MarvelLib;

//  Extract the data with no schema, i.e. whole line
@lines =
  EXTRACT Line string
  FROM @fileSet
  // Hack in order not to have the extractor delimitate columns
  USING Extractors.Text(delimiter : '$');

//  Give the query a schema on read
@vertexData =
  //  Extract the vertex id & label from the line
  SELECT MarvelLib.VertexFormatHelper.GetID(Line) AS VertexID,
  MarvelLib.VertexFormatHelper.GetLabel(Line) AS VertexLabel
  FROM @lines
  WHERE MarvelLib.VertexFormatHelper.IsVertexMatch(Line);

RETURN;
END;

CREATE FUNCTION Input.GetRelationData(@fileSet string)
RETURNS @relationData TABLE
(
  MainID int,
  RelationID int
)
AS BEGIN
REFERENCE ASSEMBLY MarvelLib;

//  Extract the data with no schema, i.e. whole line
@lines =
  EXTRACT Line string
  FROM @fileSet
  // Hack in order not to have the extractor delimitate columns
  USING Extractors.Text(delimiter : '$');

//  Give the query a schema on read
@flatRelations =
  //  Extract the main id & the relations (as an array) from the line
  SELECT MarvelLib.RelationFormatHelper.GetID(Line) AS MainID,
  //   This is a SQL.Array<int>, a special U-SQL type
  MarvelLib.RelationFormatHelper.GetRelations(Line) AS RelationIDs
  FROM @lines
  WHERE MarvelLib.RelationFormatHelper.IsRelationMatch(Line);

//  Here we're gona unpack the relation IDs array on to many rows
@relationData =
  SELECT MainID,
         rid AS RelationID
  FROM @flatRelations
  CROSS APPLY EXPLODE (RelationIDs) AS r(rid);

RETURN;
END;
```

You can submit the script as a job.  This will create the two functions.

Bringing it all together:  importing the data

We’ve built all the tools to easily import the files into ADLA tables.

In the file ImportData.usql:

```sql
USE DATABASE Marvel;

//  Load row sets
@characterVertices = Input.GetVertexData
                     (
                         "/Marvel/vert1.txt"
                     );
@bookVertices = Input.GetVertexData
                (
                    "/Marvel/vert2.txt"
                );
@characterBookIDs = Input.GetRelationData
                    (
                        "/Marvel/porgat.txt"
                    );

//  Schema on read:  project the generic schema into a specific one for characters
@characters =
    SELECT VertexID AS CharacterID,
           VertexLabel AS CharacterName
    FROM @characterVertices;
//  Schema on read:  project the generic schema into a specific one for books
@books =
    SELECT VertexID AS BookID,
           VertexLabel AS BookName
    FROM @bookVertices;
//  Schema on read:  project the generic schema into a specific one for books-characters
@characterBooks =
    SELECT MainID AS CharacterID,
           RelationID AS BookID
    FROM @characterBookIDs;

//  Drop the tables before recreating them to load data
DROP TABLE IF EXISTS Input.Character;
DROP TABLE IF EXISTS Input.Book;
DROP TABLE IF EXISTS Input.CharacterBook;

//  Create the character table as a managed table with a query
CREATE TABLE Input.Character
(
    INDEX CharacterIndex
    CLUSTERED(CharacterID ASC)
    PARTITIONED BY
    RANGE(CharacterID)
) AS
SELECT *
FROM @characters;

//  Create the book table as a managed table with a query
CREATE TABLE Input.Book
(
    INDEX BookIndex
    CLUSTERED(BookID ASC)
    PARTITIONED BY
    RANGE(BookID)
) AS
SELECT *
FROM @books;

//  Create the character-book relation table as a managed table with a query
CREATE TABLE Input.CharacterBook
(
    INDEX CharacterBookIndex
    CLUSTERED(CharacterID, BookID ASC)
    PARTITIONED BY
    RANGE(CharacterID, BookID)
) AS
SELECT *
FROM @characterBooks;
```

The script is pretty straightforward.  The patterns used are:

Schema on read:  we parse files and we defined schema while reading the files

Checkpoint:  we save the data into a table before doing further analytics on the data (out of scope for this post)

Conclusion

We covered a lot of material and I hope it is useful to author your scripts.

We demonstrated the power of C# code to parse files having non-trivial format.  The result is a row-set we can further manipulate with projections and others.

We also persist the data into indexed & partitionned ADLA tables.  This is useful because we’ll be able to run analytics on the data (in future posts) without processing the data from scratch.

gha_language: SCSS


text:
# Zabbix API Client for NodeJS And Browsers

This is a Zabbix API Client for NodeJS and Browsers written in Typescript to interact with a Zabbix Server using the API methods.

## Getting started

Install this lib with npm:

```bash
npm install --save zabbix-client
```

All parameters used within this lib can be found in the [Zabbix API documentation itself](https://www.zabbix.com/documentation/4.0/manual/api).

Parameters like `jsonrpc`, `id` and etc are abstracted within this lib.

## Usage examples

Creating the object then logging in:

```javascript
const { ZabbixClient } = require("zabbix-client");

// No calls are made here yet
const client = new ZabbixClient("http://company.com/zabbix/api_jsonrpc.php");

// A token will be fetched and saved for further use
const api = await client.login("theusername", "thepassword");
```

After the login, we get an `api` object which is an instance of `ZabbixAPI` class that enables us to call other zabbix methods as we wish, you can find all methods in the [Zabbix API Methods reference](https://www.zabbix.com/documentation/4.0/manual/api/reference).

Let's get the api info:

```javascript
const { ZabbixClient } = require("zabbix-client");

const client = new ZabbixClient("http://company.com/zabbix/api_jsonrpc.php");

const api = await client.login("theusername", "thepassword");
// To enable relogin: client.login("theusername", "thepassword", true);

const allHosts = await api.method("host.get").call();

// The version info needs an unauthenticated user, you
// can disable the token sending using the second parameters
// like the following
const version = await api.method("apiinfo.version").call({}, false);

console.log(version); // 4.0.0
```

The raw response from zabbix is abstracted and only the `result` is returned by the `call` method.

In case we need to call a method and send params with it (example taken from [this](https://www.zabbix.com/documentation/4.0/manual/api/reference/host/create) zabbix documentation page):

```javascript
const hosts = await api.method("host.create").call({
    host: "Linux server",
    interfaces: [
        {
            type: 1,
            main: 1,
            useip: 1,
            ip: "<IP_ADDRESS>",
            dns: "",
            port: "10050"
        }
    ],
    groups: [
        {
            groupid: "50"
        }
    ],
    templates: [
        {
            templateid: "20045"
        }
    ],
    macros: [
        {
            macro: "{$USER_ID}",
            value: "123321"
        }
    ],
    inventory_mode: 0,
    inventory: {
        macaddress_a: "01234",
        macaddress_b: "56768"
    }
});

console.log(hosts); // { hostids: ["107819"] }
```

In case of an error during the call, an instance of `ZabbixResponseException` will be thrown, so if you are using async/await, you can catch it like this:

```javascript
try {
    const result = api.method("thismethod.doesnotexist").call();
} catch (err) {
    err instanceof ZabbixResponseException; // true
    console.log(err.message); // Incorrect method "thismethod.doesnotexist"
}

// It is also thrown if login fails
try {
    const api = client.login("wrongusername", "wrongpassword");
} catch (err) {
    err instanceof ZabbixResponseException; // true
    console.log(err.message); // Login name or password is incorrect.
}
```

Or else, just do a then/catch:

```javascript
api.method("thismethod.doesnotexist")
    .call()
    .then(result => {
        // the result, but this will fail
    })
    .catch(err => {
        err instanceof ZabbixResponseException; // true
        console.log(err.message); // Incorrect method "thismethod.doesnotexist"
    });
```

## Note

Remember to always logout after you finish using the api:

```javascript
await api.logout();
```

# License

MIT License

Copyright (c) 2019 Aluísio Rodrigues Amaral

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: aluisiora/zabbix-typescript-client

repo_name: aluisiora/zabbix-typescript-client


text:
---
layout: default
title: Varnish Extras
permalink: /packages/varnish
parent: Packages
nav_order: 2
---

# Extras for Varnish Cache Server

These packages are meant to be used with latest LTS Varnish version
that has been installed from the official repositories.
{: .fs-6 .fw-300 }

### Install Varnish Official Repository

If you intend to use anu of this packages it's best that you have
you should have Varnish 6.0 LTS.

The most convenient way to make it avaialble
is to install the [Official Varnish Cache Repositories](https://packagecloud.io/varnishcache)
we have [packaged](https://mageops.github.io/packages-rpm/repo/el/7/varnish-release.noarch.rpm).

This will automatically enable the correct repository for the currently supported latest LTS version.

```bash
yum -y install varnish-release
```

repository: mageops/packages-rpm

gha_language: Shell

repo_name: mageops/packages-rpm


text:
# Bert Question Answer Demo

Sample app for Bert Question Answer in using the TFLite Flutter Task Library.

### Steps to run

Download `lite-model_mobilebert_1_metadata_1.tflite` from [here](https://tfhub.dev/tensorflow/lite-model/mobilebert/1/metadata/1?lite-format=tflite) and place in `assets/`.

### Demo

![demo](demo.gif)


text:
# **Data Engineering Task Documentation:**

By Arun Thomas Varughese (https://www.linkedin.com/in/athomasv/)

# Overview:

In this project, I used ETL to extract data from link: [https://health.data.ny.gov/api/views/xdss-u53e/rows.json?accessType=DOWNLOAD](https://health.data.ny.gov/api/views/xdss-u53e/rows.json?accessType=DOWNLOAD) and transform the data into an easier format for loading into an sqLite database.

I have created 3 classes to handle Extraction, Transformation and Loading. They are:

1. Data\_Extractor

2. Data\_Transformer

3. Database\_SQLite

Data\_Extractor: Extracts data from url and loads it in json format.

Data\_Transformer: Transforms json file into pandas dataframe and groups data based on county. It also converts json data to appropriate data types.

Database\_SQLite: This class is used to manage SQLite database. It is used to load pandas dataframes to SQL and also check the rows that are needed to be updated. It also has functions to load data from database to a pandas dataframe.

Important Features:

1. The ETL program is designed using OOP.
2. We make use of Pandas dataframes for Transformation.
3. Df\_dict is commonly used in program. This represents a dictionary of dataframes based on county name as key values.
4. The program supports multi-threading for loading data from multiple tables and updating data to multiple tables in one database simultaneously. We make use of multiple dataframes for each county to handle this easily.
5. I made use of a simple database with name "Egen\_Data\_Engineering.db" for this program.
6. We use "Test Date" as primary key for the tables as I could find that it is unique for each county and can be used for identification.
7. Test date is used to filter new data before updating new information to database. This ensures that rows already present are not reuploaded and this saves time for daily job.
8. The solution database is provided for reference
9. Please install libraries mentioned in requirements section.

# Requirements:

Please install the following libraries:

1. pandas

2. numpy

3. sqlalchemy

4. urllib

Commands for installation:

pip install pandas

pip install numpy

pip install sqlalchemy

pip install urllib3

or

pip install urllib (based on system)

# Implementation Sample:

1. Unzip egen.zip file
2. It contains three python files: Database\_SQLite.py, ETL.py and Egen.py
3. For running the ETL script:
  1. Make sure you are on the directory which contains the python files.
  2. Run cmd based on your system:

python3 Egen.py

or

python Egen.py

![](./imgs/Picture1.png)

As you can see, we see logs that show that extraction is completed and that url was fetched in 0.66 s.

![Picture2](./imgs/Picture2.png)

We also time taken to load last dates from database as 0.068 s

We see that updating database took 0.25 s

Finally, we can see the dataframe loaded from SQLite for NewYork county and its contents.

A new database is created in the same folder if it is not already present.

![Picture3](./imgs/Picture3.png)

1. For setting up cron job use:
  1. crontab -e
  2. use either bash script or terminal to update crontab as shown in screenshot.

![Picture4](./imgs/Picture4.png)


text:
wmbert
======================

[![Latest Stable Version](https://poser.pugx.org/wieni/wmbert/v/stable)](https://packagist.org/packages/wieni/wmbert)
[![Total Downloads](https://poser.pugx.org/wieni/wmbert/downloads)](https://packagist.org/packages/wieni/wmbert)
[![License](https://poser.pugx.org/wieni/wmbert/license)](https://packagist.org/packages/wieni/wmbert)

> A more user-friendly entity reference list field widget for Drupal 8.

## Who's Bert?
**B**etter **E**ntity **R**eference **T**able. Also, a golden yellow Muppet character on the long running children's television show Sesame Street.

## Why?
The default entity reference widget is lacking: there's no obvious way
to remove items once added and it's not easy to change the way
entities are listed.

## Installation

This module requires PHP 7.1 and Drupal 8 or higher. It can be installed
using Composer:

```bash
 composer require wieni/wmbert
```

## How does it work?
### Field widget
This module provides a field widget. For more information about how to
change field widgets in content entry forms, check the [official
documentation](https://www.drupal.org/docs/user_guide/en/structure-widgets.html).

The field widget has several configuration options to change its
behaviour:

#### List formatter plugin
Changes the way the referenced entities are formatted in the table. Out
of the box, these implementations are provided:
- [_Entity title_](src/Plugin/EntityReferenceListFormatter/Title.php)
- [_Entity title (with edit link)_](src/Plugin/EntityReferenceListFormatter/TitleWithEditLink.php)
- [_Entity title and bundle_](src/Plugin/EntityReferenceListFormatter/TitleBundle.php).
- [_Entity title and bundle (with edit link)_](src/Plugin/EntityReferenceListFormatter/TitleBundleWithEditLink.php).
- [_Entity title and publishing status_](src/Plugin/EntityReferenceListFormatter/TitlePublishing.php).

Custom implementations can be provided through plugins with the
`EntityReferenceListFormatter` annotation.

#### Add entities selection
Changes the type of widget:
- _Autocomplete_: Options are loaded on demand by typing a search term.
  Works best for very large result sets.
- _Select_: Options are loaded all at once and can be chosen through a
  dropdown.
- _Radios_: Options are loaded all at once and can be chosen through
  radio buttons.

#### Disable duplicate selection
Makes sure the same entity cannot be referenced more than once in the
same widget.

#### Disable remove
Hides the button to remove individual table items.

#### Add a wrapper (fieldset)
Changes whether the widget is wrapped in a fieldset.

### Reference method
This module provides an entity reference method with some additional
features. This method is automatically enabled when changing the form
display of a field to the wmbert widget, but can also be changed
manually on the field edit page.

The reference method has several configuration options to change its
behaviour:

#### Label formatter plugin
Changes the way entities are formatted in search results. Out of the
box, two implementations are provided:
[_Entity title_](src/Plugin/EntityReferenceLabelFormatter/Title.php) and
[_Entity title and bundle_](src/Plugin/EntityReferenceLabelFormatter/TitleBundle.php).
Custom implementations can be provided through plugins with the
`EntityReferenceLabelFormatter` annotation.

#### Number of results
The number of suggestions that will be listed. Use 0 to remove the limit.

#### Same language only
Only include entities with the same language as the active content
language.

#### Disable selection of parent entity
When the widget is rendered in an entity form, this option makes sure
the entity of the form cannot be referenced in the widget.

See also the list of
[contributors](https://github.com/wieni/wmmailable/contributors) who
participated in this project.

## Changelog
All notable changes to this project will be documented in the
[CHANGELOG](CHANGELOG.md) file.

## Security
If you discover any security-related issues, please email
[security<EMAIL_ADDRESS>instead of using the issue
tracker.

## License
Distributed under the MIT License. See the [LICENSE](LICENSE.md) file
for more information.

repository: wieni/wmbert

gha_language: PHP

repo_name: wieni/wmbert


text:
# suite

Some distributions provide a suite of multiple applications, or an application with required data, to be installed together in a subdirectory of `/Applications`.

For these Casks, use the `suite` stanza to define the directory containing the application suite. Example (from [sketchup.rb](https://github.com/Homebrew/homebrew-cask/blob/312ae841f1f1b2ec07f4d88b7dfdd7fbdf8d4f94/Casks/sketchup.rb#L12)):

```ruby
suite 'SketchUp 2016'
```

The value of `suite` is never an `.app` bundle, but a plain directory.

repository: kamranahmedse/homebrew-cask

repo_name: kamranahmedse/homebrew-cask


text:
# TO DO LIST

Here are a list of things I should / like to do:

## InfluxDB for Prometheus.
- Check if InfluxDB would be a better time series database solution for Prometheus rather than its own storage engine.

## Grafana should be under a webserver.
- We have to use Grafana directly over its HTTP service port. We should install nginx or Apache and proxying to it, so we can access Grafana using only the ip address without needing to type the default port.

## Sinatra exporting data to Prometheus.
- I think I could make Sinatra scrape data to Prometheus and plot a time series using the /metrics URL. We could also give other fake statistics to it like environment state on LV-223 or even fake telemetry from Prometheus ship and its crew.

repository: neverping/prometheus-and-grafana-sample

repo_name: neverping/prometheus-and-grafana-sample


text:
## Table of content
- [About](#about)
- [Demo](#demo)

## About
Simple website containing few pages which was used as part of my wedding invitation...

Build with Angular, hosted by GitHub.

## Demo
http://www.thepolishwedding.info

repository: TautvydasDerzinskas/the-polish-wedding

gha_language: TypeScript

repo_name: TautvydasDerzinskas/the-polish-wedding