text:
# AwsIdentityAccessManagementDataEncryptionKey

```text
aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKey
```

```text
include('aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKey')
```

| Illustration | AwsIdentityAccessManagementDataEncryptionKey | AwsIdentityAccessManagementDataEncryptionKeyCard | AwsIdentityAccessManagementDataEncryptionKeyGroup |
| :---: | :---: | :---: | :---: |
| ![illustration for Illustration](../../../aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKey.png) | ![illustration for AwsIdentityAccessManagementDataEncryptionKey](../../../aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKey.Local.png) | ![illustration for AwsIdentityAccessManagementDataEncryptionKeyCard](../../../aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKeyCard.Local.png) | ![illustration for AwsIdentityAccessManagementDataEncryptionKeyGroup](../../../aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKeyGroup.Local.png) |

## AwsIdentityAccessManagementDataEncryptionKey

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsIdentityAccessManagementDataEncryptionKey
include('aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKey')

' renders the element
AwsIdentityAccessManagementDataEncryptionKey('AwsIdentityAccessManagementDataEncryptionKey', 'Aws Identity Access Management Data Encryption Key', 'an optional tech label')
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsIdentityAccessManagementDataEncryptionKey
include('aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKey')

' renders the element
AwsIdentityAccessManagementDataEncryptionKey('AwsIdentityAccessManagementDataEncryptionKey', 'Aws Identity Access Management Data Encryption Key', 'an optional tech label')
@enduml
```

## AwsIdentityAccessManagementDataEncryptionKeyCard

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsIdentityAccessManagementDataEncryptionKeyCard
include('aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKey')

' renders the element
AwsIdentityAccessManagementDataEncryptionKeyCard('AwsIdentityAccessManagementDataEncryptionKeyCard', 'Aws Identity Access Management Data Encryption Key Card', 'an optional description')
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsIdentityAccessManagementDataEncryptionKeyCard
include('aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKey')

' renders the element
AwsIdentityAccessManagementDataEncryptionKeyCard('AwsIdentityAccessManagementDataEncryptionKeyCard', 'Aws Identity Access Management Data Encryption Key Card', 'an optional description')
@enduml
```

## AwsIdentityAccessManagementDataEncryptionKeyGroup

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsIdentityAccessManagementDataEncryptionKeyGroup
include('aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKey')

' renders the element
AwsIdentityAccessManagementDataEncryptionKeyGroup('AwsIdentityAccessManagementDataEncryptionKeyGroup', 'Aws Identity Access Management Data Encryption Key Group', 'an optional tech label') {
    note as note
        the content of the group
    end note
}
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsIdentityAccessManagementDataEncryptionKeyGroup
include('aws-20210131/Resource/SecurityIdentityAndCompliance/AwsIdentityAccessManagementDataEncryptionKey')

' renders the element
AwsIdentityAccessManagementDataEncryptionKeyGroup('AwsIdentityAccessManagementDataEncryptionKeyGroup', 'Aws Identity Access Management Data Encryption Key Group', 'an optional tech label') {
    note as note
        the content of the group
    end note
}
@enduml
```

repository: VinayaSathyanarayana/plantuml-libs

repo_name: VinayaSathyanarayana/plantuml-libs


text:
# PROS CLI Nix expression
This is a [Nix](https://nixos.org/) expression for the [PROS CLI](https://github.com/purduesigbots/pros-cli) Python program.

repository: alexander-c-b/pros-cli-nix

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: alexander-c-b/pros-cli-nix


text:
##book search

###Description:
Developed a single page app using the MEAN.js (Angular and Node/Express specifically) scaffolding generated with Yeoman. While I could have optimized the project by storing already found books in a Mongo collection and making the openlibrary API requests from the frontend, the project spec called for making a request to node.js, which in turn makes a request to openlibrary's API and returns it's findings to the browser.

#####Note:
Initially, I included the angular smart table package to handle the asynchronous updates to the book collection and the table that rendered that data. However, given the scope of the project, I decided to simply use "dumb tables" to minimize the number of dependencies when I noticed that performance was pretty much the same for both tables.

Furthermore, I decided to only handle ISBN-10 and ISBN-13 identification codes.

###Installation:
1. Make sure bower, grunt, express, and mongo are installed on your machine
2. In terminal, cd into the `confer-coding-task` directory
3. Run `npm install`
4. Open two more tabs in terminal, and run the `mongod` and `mongo` commands
5. In our first tab, run `grunt` and head over to `localhost:3000/#!/` in your browser of choice

###Usage:
booksearch handles multiple ISBN-10 and ISBN-13 searches that are comma-separated. Error messages will be rendered on the screen if a string with less than 10 characters is entered OR the call to openlibrary's API returns no book objects.

1. Enter 1 or more ISBN numbers (comma separated) into the search box and press the 'enter/return' key
2. Upon success, a table is populated including the following information for the requested ISBN numbers: title, sub-title (if available), pages, and url.
3. Upon error, the table will not be rendered and an error message is rendered in the browser.

license: MIT


text:
# DataScience-Johns.Hopkins.University :white_check_mark:
Ask the right questions, manipulate data sets, and create visualizations to communicate results - Coursera

## Course 1 - The Data Scientist’s Toolbox
* Welcome
  * Introduction to basic tools
* Installing the Toolbox
  * R, Git, Github
* Conceptual Issues
  * Steps in a data analysis, Putting the science in data science
* Course Project Submission & Evaluation

## Course 2 - R Programming
* Background, Getting Started, and Nuts & Bolts
* Programming with R
  * Derek Franks has written a very nice [tutorial](https://github.com/rdpeng/practice_assignment/blob/master/practice_assignment.rmd) to help you get up to speed
* Loop Functions and Debugging
  * lapply, apply, tapply, split, mapply
* Simulation & Profiling
  * Simulate a random normal variable with an arbitrary mean and standard deviation

## Course 3 - Getting and Cleaning Data
* Data collection & Data formats
  * Raw files (.csv,.xlsx), Databases (mySQL), APIs, Flat files (.csv,.txt), XML, JSON
* Making data tidy
* Distributing data
* Scripting for data cleaning

## Course 4 - Exploratory Data Analysis
* Making exploratory graphs
* Principles of analytic graphics
* Clustering methods
* Dimension reduction techniques

## Course 5 - Reproducible Research
* Concepts, Ideas, & Structure
* Markdown & knitr
* Reproducible Research Checklist & Evidence-based Data Analysis
* Case Studies & Commentaries

## Course 6 - Statistical Inference
* Probability & Expected Values
* Variability, Distribution, & Asymptotics
* Intervals, Testing, & Pvalues
* Power, Bootstrapping, & Permutation Tests

## Course 7 - Regression Models
* Least Squares and Linear Regression
* Linear Regression & Multivariable Regression
* Multivariable Regression, Residuals, & Diagnostics
* Logistic Regression and Poisson Regression

## Course 8 - Practical Machine Learning
* Prediction, Errors, and Cross Validation
* The Caret Package
* Predicting with trees, Random Forests, & Model Based Predictions
* Regularized Regression and Combining Predictors

## Course 9 - Developing Data Products
* Shiny, GoogleVis, and Plotly
* R Markdown and Leaflet
* R Packages
* Swirl and Course Project

The most up to date information on the course lecture notes will always be in the course [Github repository](https://github.com/DataScienceSpecialization/courses)

#### Taught by:
#### Roger D. Peng, PhD - Associate Professor, Biostatistics
#### Brian Caffo, PhD - Professor, Biostatistics
#### Jeff Leek, PhD - Associate Professor, Biostatistics

### Rating :full_moon::full_moon::full_moon::full_moon::full_moon::full_moon::full_moon::new_moon::new_moon::new_moon:
### Difficulty :full_moon::full_moon::full_moon::full_moon::full_moon::full_moon::new_moon::new_moon::new_moon::new_moon:

### Created By Bilal Cagiran |<EMAIL_ADDRESS>| [Github](https://github.com/extwiii/) | [LinkedIn](https://linkedin.com/in/bilalcagiran) | [CodePen](http://codepen.io/extwiii/) | [Blog/Site](http://bilalcagiran.com) | [FreeCodeCamp](https://www.freecodecamp.com/extwiii)

repository: extwiii/DataScience-JHU

repo_name: extwiii/DataScience-JHU


text:
## v0.0.3
- Allow using ENV in config

## v0.0.2
- Add `include_config` to load config from another file

## v0.0.1
- Initial release
  - Add `window`, with `class_not` and `class_only` options
  - Add `remap`, with `to` option
  - Add `execute` to run scripts on shell
  - Add `define` to define method on DSL context
  - Add `press` and `release`, but they are still experimental

repository: igui/xremap

gha_license_id: MIT

repo_name: igui/xremap


text:
# Slack Invite Request (aka SIR)

![SIR](https://raw.githubusercontent.com/therealklanni/slack-invite-request/master/public/images/bot.png)

Fully-customizable webapp for generating invite requests to your private Slack
team. Authenticates applicants via Google Sign-In and then displays form details
submitted by the applicant by posting to a group/channel/user of your choice
on Slack.

The applicant will see the following pages in order:

1. `/` - provides some information about SIR and your Slack team
2. `/signin` - Google authentication
3. `/apply` - custom form to gather important details from the user
4. `/thanks` - thank the user for submitting and what to expect next

SIR makes use of [Handlebars](http://handlebarsjs.com/) templates and
[Bootstrap](http://getbootstrap.com/) UI, so it's **mobile-friendly** out of
the box and **highly-customizable**. Most static strings can be easily configured
from a [YAML](http://www.yaml.org/start.html) config file, making quick edits a
breeze even if you have no web development experience.

Deploying your SIR can be a little more complex, but Heroku takes most of the pain
out of it. See below for more details.

## Installation

Clone the repository to your web server

Alternatively:

* Install via `npm install slack-invite-request`
* Download the [latest release](https://github.com/therealklanni/slack-invite-request/releases/latest)

Then, configure Nginx/Apache or [deploy to Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction).

## Configuration

### Google Client ID

To use this app, you will need a Google Developer Client ID. Visit the
[Google Developer Console](https://console.developers.google.com) to set up a
new project.

1. In the Developer Console, click `Add Project` to create a new project.
2. On the Project Dashboard, click `Enable an API` and turn on `Google+ API`
3. Click on `Credentials` on the left navigation (under "APIs and Auth")
4. Click on `Create new Client ID` under "OAuth"
5. Choose "Web application"
6. In the "Authorized JavaScript Origins" text box, enter your Hubot URL (e.g. http://myserver.com)
7. In the "Authorized Redirect URL" text box, enter "http://myserver.com/signin"
8. Copy the `ClientID`

### Environment variables

These environment variables are required (with the exception of `SLACK_CHANNEL`) to enable the **Google SignIn** and **Slack** integrations. Make sure to set these before starting your server.

* `GA_TOKEN` - To track analytics on your SIR, create a Google Analytics token (set this to `X` if you don't want analytics)
* `GOOGLE_CLIENTID` - the Client ID from above
* `SLACK_WEBHOOK_URL` - obtained by adding a "Incoming Webhook" integration to your Slack team
* `SLACK_CHANNEL` - the destination for the request notifications; this can be a public #channel, private group, or a @username. (optional, for overriding the default channel in the Slack "Incoming Webhook" integration settings)
* `SLACK_BOT_NAME` - override the bot name (default: "SIR")

e.g., for Heroku you would run:

```sh
heroku config:set ENV_VARIABLE=value
```

### Strings

You can customize each page by modifying the `strings.yml` file.

The `strings.yml` file is set up as follows:

```yml
main:
  # ... strings for main and thanks pages ...
apply:
  # ... strings for application page ...
  header:
    # ... strings for the page header ...
  form:
    # ... form field configuration ...
signin:
  # ... strings for signin page ...
```

In the `apply.form` section, the `fullName` and `email` blocks should be
considered necessary for proper functionality of the app. However, you can
still customize these fields by editing these (and only these) properties:

* `class` - classes to apply to this form input (use for CSS customization)
* `title` - the text that will appear above the input field
* `required` - set to `true` to make the field a required field (optional)
* `readonly` - set to `true` to disable changing the value (optional)
* `help` - additional description (optional)

In the `apply.form.custom` section, you can modify *any* of the values as you see
fit, or add/remove blocks, or even remove the `custom` section entirely, if
you like.

The default configuration should sufficiently provide varying examples of custom
field configurations. More advanced users can also modify the *view templates*
themselves for even higher degree of customization. If you choose to do this,
please note that the `fullName` and `email` fields should still be considered
necessary.

## Planned

- [ ] Redis (or possibly any other db) support
- [ ] Support other authentication platforms (OpenID Connect, etc)
- [ ] Admin page (track who you've already sent and invite to, etc) maybe?

***PRs accepted!***

## License

MIT © [Kevin Lanni](https://github.com/therealklanni)

repository: Nurghelm/slack-invite-request

repo_name: Nurghelm/slack-invite-request


text:
## Templates

Reusable templates for various kinds of projects.

### [Reusable React module](https://github.com/insin/templates/tree/master/react-module)

A template for creating a reusable [React](http://facebook.github.io/react)
module which will be published to npm and also provide a browser bundle which
exports a single global variable.

### [Cross-runtime React app](https://github.com/insin/templates/tree/master/react-cross-runtime-app)

A template for creating a [React](http://facebook.github.io/react) app which can
be developed in a browser, but will be distributed for other runtimes.

By default, it's set up for [io.js](https://iojs.org)/Chromium-based
[NW.js](https://github.com/nwjs/nw.js) apps and Internet Explorer-based
[HTML Application](http://en.wikipedia.org/wiki/HTML_Application) (HTA) apps.

### MIT Licensed

repository: Jeff-Lewis/react-templates

repo_name: Jeff-Lewis/react-templates


text:
# Adafruit MPR121 Library [![Build Status](https://travis-ci.org/adafruit/Adafruit_MPR121.svg?branch=master)](https://travis-ci.org/adafruit/Adafruit_MPR121)

<img src="https://cdn-shop.adafruit.com/970x728/1982-00.jpg" height="300"/>

This is a library for the Adafruit MPR121 Capacitive touch sensor breakout:
  * https://www.adafruit.com/products/1982

Check out the links above for our tutorials and wiring diagrams. This chip uses I2C to communicate

Modified to use SoftWire library on STM32

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution

repository: mhamzai/FYP-Smart-Hosptial-Bed

repo_name: mhamzai/FYP-Smart-Hosptial-Bed


text:
# albutim
Yet another, simple web photo album generator and server

## features

album generator ...

- generates content suitable for static web serving
- preserves your directory structure for album
- builds thumbs/previews without requirement for external tools
- reads EXIF data
- supports built-in and custom templates

server ...

- can serve your album instead of apache/nginx/whatever
- supports basic auth and https
- builds tumbs on demand, caches on disk
- integrates nicely with docker

web ui ...

- full keyboard navigation
- fullscreen mode

## todo

- [ ] add zap all text fullscreenPro option
- [ ] add search/filter
- [ ] /index.html and /albumdata.js in <- there .data
- [ ] build cmd does not overwrite existing assets!
- [ ] originals/ links broken in static album builds
- [ ] tests...?!!!
- [ ] gui help / kbd shortcut info
- [ ] Dockerfile, allows thumbs/preview/assets mounts!
- [ ] cmdline/config options:
  - [ ] serve --no-thumbs, --no-previews, --no-cache
  - [ ] foo
- [ ] mobile view/test?
- [ ] make templates exportable (doc-only? build does...)
- [ ] enable custom templates
- [ ] autoplay feature (dropdown: whole album, current folder, folder+subfolders; delay in s)
- [x] windows: fwd vs back-slashes in paths -> thumbs ok, but previews not... test ec2/public! https://stackoverflow.com/questions/9371031/how-do-i-create-crossplatform-file-paths-in-go
- [x] windows: use https://github.com/inconshreveable/mousetrap ? ~~or is~~ cobra is already ~~?~~.
- [ ] electron: https://hackernoon.com/how-to-add-a-gui-to-your-golang-app-in-5-easy-steps-c25c99d4d8e0
- [ ] rename to zuaberalbum.com

repository: schnoddelbotz/albutim

repo_name: schnoddelbotz/albutim


text:
# embedded-png-extract
A quick and dirty cross-platform python script that allows you to extract embedded PNG images from a binary file.

## Requirements
Python 3

## Usage
### macOS
``` console
./embedded-png-extract /Applications/testbin.app/Contents/MacOS/testbin /Users/noone/Desktop/CarvedImages
Wrote carved_1.png
Wrote carved_2.png
Wrote carved_3.png
Done! Total extracted: 3
```
### Windows
``` console
python embedded-png-extract C:\Users\noone\Desktop\testbin C:\Users\noone\Desktop\CarvedImages
Wrote carved_1.png
Wrote carved_2.png
Wrote carved_3.png
Done! Total extracted: 3
```

## Licence
MIT

branch_name: refs/heads/main


text:
# Lecture Notes: Quick Sort

## Learning Objectives

    1. Identify the differences and similarities between a quick and merge sort
    2. Identify and discuss the parts of a quick sort
    3. Be knowlagable of the different types of quick sort

## Lecture Flow

### Divide and Conquer Algorithm
 -like the Merge Sort, a Quick Sort is a divide and conquer algorithm.
 - This means it has what three pieces? (pose this to class, record answers on board)
    1. Divide: Break down the problem to smallest solvable bit
    2. Conquer: Solve recursively
    3. Combine: Put the solved bits back together into larger solved bits till they are all together and solved

### Parts of a QuickSort

- Pivot: The selected element in the array around which the rest of the sort will take place. When a QuickSort is finished,
        the elements on the left side of the pivot will all be smaller than it while the items on the right side will be
        larger.

    - left side: Elements smaller than the Pivot
    - right side: Elements larger than the Pivot
- Pointers:
    - left: on the first element
    - right on the last element

- Partition: the process by which collection elements get shuffled to their correct sides of the Pivot

Show Diagram 1 here, be sure to take time and point out the pivot and how it changes each time the recursive function
is called. When you have it pulled up, be sure to drop down and show the top comment by Jeremy Friesner (If it no longer
exists, see Diagram 1.2). The only proper way to give this lecture is to then sing that to the class in the tune of
the sound of silence. However, other options are acceptable if that is too much for your classroom.

While introducing the Algorithm section next, be sure to mention that many sources discuss picking a first or last element
as your Pivot. However, in this algorithm and in the pseudo provided we will be selecting the median as a preventative
measure against poor O(n).

## Diagram

[Diagram 1.1](https://www.youtube.com/watch?v=8hEyhs3OV1w)
- Youtube audio-visualization from Timo Bingmann

    Diagram 1.2

            Jeremy Friesner
            1 year ago
            ---
            Hello quicksort my old friend
            You always run in N*(log N)
            Because recursion splits the input set
            Into pieces small enough to vet
            And the ordering of items that were equal in their range
            Still remains
            After each round of sorting

## Algorithm

Input: Collection, first index, last index
Output: Collection (sorted)

1. Find the median (or closest whole number) between the first and last index of the array and set it as the pivot.
2. Set left pointer at index 0 and right pointer at index 0-1
3. Check the value at each pointer, if said value is on the correct side of the pivot:
    - left pointer increments
    - decrements pointer decrements
4. When a pointer finds an element that it is out of place (greater than pivot on the left, less than on the right) it stops
until the other pointer also finds an element that is out of place.
5. When both pointers have found an element that is out of order, they swap them.
6. Once both pointers are able to move through the array and intersect without swapping the array counts as sorted.
7. This is called recursively, which manages all of the heavy lifting a loop or other control flow method might in this
circumstance.

## Pseudocode

### Quicksort

### Partition
Input: Arr, lIdx, rIdx

Pivot <= (rIdx + lIdx)/2

leftPointer <= lIdx
rightPointer <= rIdx

for
if the value of the index at leftPointer is <= Pivot
    leftPointer ++
else
    temp = value of leftPointer

## Readings and References

### Watch

### Read
[A Quick Explanation of Quick Sort by Karuna Sehgal on Medium](https://medium.com/karuna-sehgal/a-quick-explanation-of-quick-sort-7d8e2563629b)

### Bookmark
[Kvick Sört part of the IDEA Project by Sándor P. Fekete and Sebastian Morr](https://idea-instructions.com/quick-sort/)

gha_language: Java


text:
---
layout: post
title: My thoughts on system administration.
---

Within my education an through personal interest,
I´ve read about the practice of System Administration. Thomas Limoncelli, et al. wrote a book called "The Art of System and Network Administration".
The processes and practices that are described in this book are one of the guidelines that are used by me throughout my starting career.

In this book they describe the basic principles of system administration:
- Automation: software replaces replace human effort. We should not be doing tasks, We should be maintaining. Automation improves repeatability and scalability which leads to consistency.
	Furthermore, it lowers the System administrator's burden. It starts with defining the process and making it repeatable. After the repeatable process is documented, it can be turned into code.
- Small batches: Small increments in code compared to large batches deliver results faster, with higher quality and less stress.
- End-to-end integration: Working across teams to achieve the best total result. prevents Silo infrastructure
- Self-service systems: tools that emppower others to work independently. should be an enablement platform not a control structure
- communication: right people can solve more problems than hardware/software can. communicate with other SA and customers to work towards the same goal
	documentation is also included.


text:
Temiar (SIL) Keyboard
=====================

Copyright (C) SIL Malaysia

__DESCRIPTION__
Simple Temiar Keyboard for Keyman.
This keyboard uses a simple set of key sequences
for typing Temiar, based on standard English
or Malay keyboard layouts.

Supported Platforms
-------------------
 * Windows
 * macOS
 * Linux
 * Web
 * Mobile

repository: keymanapp/keyboards

gha_language: HTML

repo_name: keymanapp/keyboards


text:
# The Splunk Software Development Kit for Python (Preview Release)

This SDK contains library code and examples designed to enable developers to
build applications using Splunk.

Splunk is a search engine and analytic environment that uses a distributed
map-reduce architecture to efficiently index, search and process large
time-varying data sets.

The Splunk product is popular with system administrators for aggregation and
monitoring of IT machine data, security, compliance and a wide variety of other
scenarios that share a requirement to efficiently index, search, analyze and
generate real-time notifications from large volumes of time series data.

The Splunk developer platform enables developers to take advantage of the same
technology used by the Splunk product to build exciting new applications that
are enabled by Splunk's unique capabilities.

## License

The Splunk Software Development Kit for Python is licensed under the Apache
License 2.0. Details can be found in the file LICENSE.

## This SDK is a Preview Release

1.  This Preview release a pre-beta release.  There will also be a beta release
    prior to a general release.  It is incomplete and may have bugs.

2.  The Apache license only applies to the SDK and no other Software provided
    by Splunk.

3.  Splunk in using the Apache license is not providing any warranties,
    indemnification or accepting any liabilities  with the Preview SDK.

4.  Splunk is not accepting any Contributions to the Preview release of the SDK.
    All Contributions during the Preview SDK will be returned without review.

## Getting Started

In order to use the SDK you are going to need a copy of Splunk. If you don't
already have a copy you can download one from http://www.splunk.com/download.

You can get a copy of the SDK sources by cloning into the repository with git:

    git clone https://github.com/splunk/splunk-sdk-python.git

#### Installing

You can install the Splunk SDK libraries by using `easy_install` or `pip`:

    [sudo] easy_install splunk-sdk

Or

    [sudo] pip install splunk-sdk

Alternatively, you can use `setup.py` on the sources you cloned from GitHub:

    [sudo] python setup.py install

However, it's not necessarry to install the libraries in order to run the
examples and unit tests from the SDK.

#### Requirements

The SDK requires Python 2.6+.

#### Running the examples and units

In order to run the Splunk examples and unit tests, you must put the root of
the SDK on your PYTHONPATH.

The SDK command line examples require a common set of command line arguments
that specify things like the Splunk host and port and login credentials. You
can get a full list of command line arguments by typing `--help` as an argument
to any of the command line examples.

#### .splunkrc

The examples and units are also desigend to receive arguments from an optional
`.splunkrc` file located in your home directory. The format of the file is
simply a list of key=value pairs, same as the options that are taken on the
command line, for example:

    host=localhost
    username=admin
    password=changeme

The `.splunkrc` file is a feature of the SDK examples and unit tests and not
the Splunk platform or SDK libraries and is intended simply as convenience for
developers using the SDK.

The `.splunkrc` file should not be used for storing user credentials for apps
built on Splunk and should not be used if you are concerned about the security
of the credentails used in your development environment.

You can view a sample `.splunkrc` file by looking at the `splunkrc.spec` file
in the root directory of the repistory.

## Overview

The Splunk developer platform consists of three primary components: `splunkd`,
the engine, `splunkweb`, the app framework that sits on top of the engine,
and the Splunk SDKs that interface with the REST API.

This SDK enables developers to target `splunkd` by making calls against the
engine's REST API and by accessing the various `splunkd` extension points such
as custom search commands, lookup functions, scripted inputs and custom REST
handlers.

You can find additional information about building applications on Splunk at
our developer portal at http://dev.splunk.com.

### Hello Splunk

The Splunk library included in this SDK consists of two layers of API that
can be used to interact with splunkd. The lower layer is referred to as the
_binding_ layer. It is a thin wrapper around low-level HTTP capabilities,
including:

* A pluggable HTTP component that can be user-supplied.
* Handles authentication and namespace URL management
* Accessible low-level HTTP interface for use by developers who want
    to be close to the wire.

You can see an example use of the library here:

    import splunk.binding as binding

    # host defaults to localhost and port defaults to 8089
    context = binding.connect(username="admin", password="changeme")

    response = context.get('/services/authentication/users')

    print "Status: %s" % response.status
    print response.body.read()

The second layer is referred to as the _client_ layer and builds on the
_binding_ layer to provide a friendlier interface to Splunk that abstracts
away some of the lower level details of the _binding_ layer.

    from pprint import pprint

    import splunk.client as client

    # host defaults to localhost and port defaults to 8089
    service = client.connect(username="admin", password="changeme")

    for user in service.users:
        pprint(user())

### Unit tests

The SDK contains a small but growing collection of unit tests. Running the
tests is simple and rewarding:

    cd tests
    ./runtests.py

Alternatively, you can read more about our testing "framework"
[here](https://github.com/splunk/splunk-sdk-python/tree/master/tests).

### Layout of the repository

./docs

Contains a few detailed notes specific to the SDK. In general documentation
    about developing on Splunk can be found on dev.splunk.com.

./examples

Contains s variety of Splunk samples demonstrating the various library
    modules.

./splunk

The Splunk library modules.

./tests

The SDK unit tests.

./utils

Generic utility code shared by the examples and unit tests.

### Changelog

You can look at the changelog for each version
[here](https://github.com/splunk/splunk-sdk-python/blob/master/CHANGELOG.md)

### Branches

The `master` branch always represents a stable and released version of the SDK.
You can read more about our branching model on our
[Wiki](https://github.com/splunk/splunk-sdk-python/wiki/Branching-Model).

## Resources

You can find anything having to do with developing on Splunk at the Splunk
developer portal:

*   http://dev.splunk.com

You can also find full reference documentation of the REST API:

*   http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI

For a gentle introduction to the Splunk product and some of its capabilities:

*   http://docs.splunk.com/Documentation/Splunk/latest/User/SplunkOverview

## Community

* Email: Stay connected with other developers building on Splunk<EMAIL_ADDRESS>* Issues: https://github.com/splunk/splunk-sdk-python/issues
* Answers: Check out this tag on Splunk answers for:
    http://splunk-base.splunk.com/tags/python/
* Blog:  http://blogs.splunk.com/dev/
* Twitter: [@splunkdev](http://twitter.com/#!/splunkdev)

### How to contribute

We aren't ready to accept code contributions yet, but will be shortly.  Check
this README for more updates soon.

### Support

* SDKs in Preview will not be Splunk supported.  Once the Python SDK moves to
an Open Beta we will provide more detail on support.

* Issues should be filed here:  https://github.com/splunk/splunk-sdk-python/issues

### Contact Us
You can reach the Dev Platform team at<EMAIL_ADDRESS>

repository: holdensmagicalunicorn/splunk-sdk-python

repo_name: holdensmagicalunicorn/splunk-sdk-python


text:
pdblp
=====

This is a simple interface to integrate pandas and the Bloomberg Open API.
The standard Bloomberg API provides an extensive set of features for building
applications on top of however does not provide easy and interactive access to
data. This package provides several functions for accessing historical market
data and reference data. A simple set of examples is available
[here](https://matthewgilbert.github.io/pdblp/tutorial.html).

The library borrows heavily from a similar package available
[here](https://github.com/kyuni22/pybbg)

## Requires

[Bloomberg Open API](http://www.bloomberglabs.com/api/)

[pandas](http://pandas.pydata.org/)

and for `pdblp.parser`

[pyparsing](https://pythonhosted.org/pyparsing/) >= 2.2.0

## Installation
You can install from PyPi using

```
pip install pdblp
```

or you can clone this repository and pip install the package, i.e.

```
git clone https://github.com/matthewgilbert/pdblp.git
pip install -e pdblp
```

`blpapi` can be installed directly from the above link or you can install from
the conda channel dsm into an environment, e.g.

```
conda install -n py36 -c dsm blpapi
```

If going this route make sure there is a build available for your version of
python https://anaconda.org/dsm/blpapi/files

If you are getting `'GLIBCXX_3.4.21' not found` error when attempting to import
`blpapi`, the following appears to resolve this issue.

```
conda install libgcc
```

## Documentation
Once `pdblp` has been installed, documentation can be built using

```
cd doc
make html
```

and then viewed in ./doc/_build. Before building this ensure that you are
logged into a Bloomberg terminal as this is required for building many of the
examples.

An online version of the documentation can be view at https://matthewgilbert.github.io/pdblp/

repository: keli/pdblp

repo_name: keli/pdblp


text:
---
layout: post
title: "Hybrid Oracle: Making Use of Ambiguity in Transition-based Chinese Dependency Parsing"
date: 2018-02-06 01:33:57
categories: arXiv_CL
tags: arXiv_CL
author: Xuancheng Ren, Xu Sun
mathjax: true
---

* content
{:toc}

##### Abstract
In the training of transition-based dependency parsers, an oracle is used to predict a transition sequence for a sentence and its gold tree. However, the transition system may exhibit ambiguity, that is, there can be multiple correct transition sequences that form the gold tree. We propose to make use of the property in the training of neural dependency parsers, and present the Hybrid Oracle. The new oracle gives all the correct transitions for a parsing state, which are used in the cross entropy loss function to provide better supervisory signal. It is also used to generate different transition sequences for a sentence to better explore the training data and improve the generalization ability of the parser. Evaluations show that the parsers trained using the hybrid oracle outperform the parsers using the traditional oracle in Chinese dependency parsing. We provide analysis from a linguistic view. The code is available at https://github.com/lancopku/nndep .

##### Abstract (translated by Google)
在基于转换的依赖分析器的训练中，使用预言器来预测句子及其黄金树的转换序列。然而，转换系统可能表现出模糊性，也就是说，可能有多个正确的转换序列组成金树。我们建议在神经依赖解析器的训练中利用这个属性，并提出Hybrid Oracle。新的预言器为解析状态提供了所有正确的转换，用于交叉熵损失函数中以提供更好的监督信号。也用于为句子生成不同的转换序列，以更好地探索训练数据，提高解析器的泛化能力。评估结果显示，使用混合式Oracle进行训练的解析器优于使用传统的中文依赖解析中的oracle的解析器。我们从语言角度提供分析。代码可在https://github.com/lancopku/nndep上找到。

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

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


text:
## MQTT Client showcase

This project is a showcase of how to use MQTT as a client application.

In fact the project was created to demonstrate an implausible behavior of MQTT.

### starting position / use case

In a real project several applications subscribe (nearly at the same time because they are started in parallel) to the same MQTT topic (with wildcard). The topic contains about 500 retained messages (each in an own sub topic level) which contain some kind of configuration information. All applications are expected to receive these messages on every start (they are subscribing with QoS 1).

Beside the "configuration" messages also data topics are subscribed with the same MQTT connection. No persisted state is required (and wanted here). Therefore the application instances connect with `cleanSession=true`.

For my understanding it would be sufficient if the application instances would each connect with a fixed clientId as _cleanSession=true_ should avoid any state handling. But to be really sure that no state is considered  a `unique MQTT clientId` is generated for each connect.

### observed behavior

Unfortunately not all application instances get the retained messages. Some get no messages at all from the topic - regardless of how long the subscription lasts. I first thought that the _maxInflight_ (client side) or _max_queued_messages_ (server side) configuration might be the reasons, but after increasing both to 500,000 I guess this is not the reasons behind the failure.

### reproduction as test

Therefore I created this project with a repro. There is a unit test class in the repro [MqttSubscriptionTest](src/test/java/de/frvabe/mqtt/client/showcase/MqttSubscriptionTest.java) with the test method `multiThreadSubscriptionTest`. When executing this test some (1000) retained messages will be published first in the `@BeforeClass` method. After that 10 instances of a `MqttSubscriber` class which implements the `IMqttMessageListener` and `Runnable` interface will be instantiated and executed. Each MqttSubscriber instance will be executed in an own thread with an own MqttClient instance and will subscribe to the topic tree with the retained messages. This is logged to the console as follows:

```
----------- perform subscriptions
Subscriber-3 subscribing topic 'mqtt/client/showcase/mutliThreadSubscription/#'
Subscriber-0 subscribing topic 'mqtt/client/showcase/mutliThreadSubscription/#'
Subscriber-2 subscribing topic 'mqtt/client/showcase/mutliThreadSubscription/#'
Subscriber-4 subscribing topic 'mqtt/client/showcase/mutliThreadSubscription/#'
Subscriber-5 subscribing topic 'mqtt/client/showcase/mutliThreadSubscription/#'
Subscriber-6 subscribing topic 'mqtt/client/showcase/mutliThreadSubscription/#'
Subscriber-1 subscribing topic 'mqtt/client/showcase/mutliThreadSubscription/#'
Subscriber-7 subscribing topic 'mqtt/client/showcase/mutliThreadSubscription/#'
Subscriber-8 subscribing topic 'mqtt/client/showcase/mutliThreadSubscription/#'
Subscriber-9 subscribing topic 'mqtt/client/showcase/mutliThreadSubscription/#'
```

The test will wait some time and after that validate the subscriptions. It is expected that each Subscriber received the 1000 retained messages:

```
----------- validate subscriptions
Subscriber-4: receivedMessages=1000; duration=372ms; succeeded=true
Subscriber-0: receivedMessages=1000; duration=265ms; succeeded=true
Subscriber-5: receivedMessages=1000; duration=475ms; succeeded=true
Subscriber-7: receivedMessages=0; duration=0ms; succeeded=false
Subscriber-6: receivedMessages=1000; duration=473ms; succeeded=true
Subscriber-8: receivedMessages=0; duration=0ms; succeeded=false
Subscriber-9: receivedMessages=1000; duration=346ms; succeeded=true
Subscriber-3: receivedMessages=1000; duration=243ms; succeeded=true
Subscriber-1: receivedMessages=1000; duration=470ms; succeeded=true
Subscriber-2: receivedMessages=1000; duration=357ms; succeeded=true
```

Most subscriber received the messages in a very short time (some hundreds ms). But some did not receive a single message (duration is 0 because they never finished). The situation is not better when giving the subscribers more time to receive the messages. They just won't get them.

I have no idea why this happens. If you can give any help this would be super useful for me, because I dependent on the reliable delivery of retained messages.

**Big thanks in advance!**

_By the way_:

* I tested with a local EMQ and HiveMQ broker. If you want to run the test you need to run a broker on your machine at `localhost:1883` or change the configuration in the test class.
* I use the [Eclipse Paho Java Client](https://eclipse.org/paho/clients/java/) MQTT

repository: FrVaBe/MQTT

repo_name: FrVaBe/MQTT


text:
# Answer

Shodan has serveral filters for the HTTP protocol.

- http.component
- http.component_category
- http.favicon.hash
- http.html
- http.html_hash
- http.robots_hash
- http.securitytxt
- http.status
- http.title
- http.waf

You can use `http.html_hash` filter for filtering results by a hash of the HTML.

Shodan uses [MurmurHash3](https://github.com/aappleby/smhasher/wiki/MurmurHash3) as a hashing function.

In Python, you can use [mmh3](https://pypi.org/project/mmh3/) for calculating MurmurHash3.

```python
import mmh3
mmh3.hash('foo') # 32 bit signed int
# -156908512
```

Let's take an HTML of `http://example.com` as an input.

```python
import mmh3
import requests

res = requests.get("http://example.com")
html = res.text
print(mmh3.hash(html))
# -2087618365
```

The answer is [http.html_hash:-2087618365](https://www.shodan.io/search?query=http.html_hash%3A-2087618365).

![](https://i.imgur.com/vE8bGZx.png)

repository: wabass/shodan-dojo

repo_name: wabass/shodan-dojo


text:
# Setting Up the Web Application on Mac OS X

This setup guide will help you get the go-cart web application up and running on Max OS X. This guide assumes that you already have Homebrew installed.

## Installing and Configuring Prerequisites

First, you need to install some third-party software dependencies. Open a new terminal window, and run the following command:

    $ brew install python3 postgresql

Now you'll need to install virtualenv, a tool that makes it easy to manage dependencies for Python projects:

    $ pip3 install virtualenv

Now you'll need to configure the PostgreSQL database server. PostgreSQL is a robust SQL database server go-cart uses to store users' generated cartograms so they can be shared on social media. In order for go-cart to use PostgreSQL, you'll need to first initialize it, then create an account and database:

    $ brew services start postgresql
    $ initdb /usr/local/var/postgres

If you receive the error

    initdb: directory "/usr/local/var/postgres" exists but is not empty
    If you want to create a new database system, either remove or empty
    the directory "/usr/local/var/postgres" or run initdb
    with an argument other than "/usr/local/var/postgres".

then run the following commands:

    $ rm -r /usr/local/var/postgres
    $ initdb /usr/local/var/postgres

Now you can create a PostgreSQL account and database for the web application:

    $ createuser --interactive --pwprompt gocart

Enter your chosen password when prompted, and answer no to all of the questions asked by typing `n` and pressing return each time:

    Enter password for new role:
    Enter it again:
    Shall the new role be a superuser? (y/n) n
    Shall the new role be allowed to create databases? (y/n) n
    Shall the new role be allowed to create more new roles? (y/n) n

Now, you can create the database:

    $ createdb -O gocart gocart

Now, you need to download and compile the cartogram generator. You must use the cartogram generator from the repository below, **not** the one from `Flow-Based-Cartograms/go_cart`.

    $ git clone https://github.com/mgastner/cartogram.git
    ...
    $ cd cartogram

There is a slight bug in the current version of the cartogram generator that prevents it from working properly in the web application. However, it's easy to fix. You'll need to make a small change in `main.c`:

    $ open -a textedit cartogram_generator/main.c

Find line 264. It should read:

    printf("correction_factor = %f\n", correction_factor);

Replace the contents of this line with:

    fprintf(stderr, "correction_factor = %f\n", correction_factor);

Save the file and quit TextEdit. Now you're ready to compile:

    $ chmod +x autobuild.sh
    $ ./autobuild.sh
    ...

Remember the path to the root of this repository, as you'll need it when configuring the web application later.

## Installing and Configuring the Web Application

First, clone the web application code from GitHub

    $ git clone https://github.com/jansky/cartogram-web

Now, you need to change some settings:

    $ cd cartogram-web/internal
    $ cp envsettings.sh.dist envsettings.sh
    $ open -a textedit envsettings.sh

In the third line, replace `/home/jansky/cartogram/cartogram_generator/cartogram` in `CARTOGRAM_EXE` with the path to the folder containing the cartogram generator, followed by `/cartogram_generator/cartogram`. For example, if the root of the cartogram generator repository is

    /home/jansky/cartogram

Then `CARTOGRAM_EXE` should be set to

    /home/jansky/cartogram/cartogram_generator/cartogram

In the fourth line, replace `/home/jansky/cartogram` in `CARTOGRAM_DATA_DIR` with the path to the folder containing the cartogram generator, followed by `/data`. Do not include a trailing slash.

For example, if the root of the cartogram generator repository is

    /home/jansky/cartogram

Then `CARTOGRAM_DATA_DIR` should be set to

    /home/jansky/cartogram/data

In the tenth line, in `CARTOGRAM_DATABASE_URI`, replace `username` with `gocart`, `password` with the database password you created, and `database` with `gocart`. Save the file and quit TextEdit.

Finally, you need to initialize the database:

    $ source ./setupenv.sh
    (venv) $ python3
    Python 3...
    ...
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import web
    >>> web.db.create_all()
    >>> exit()
    (venv) $

## Running the Web Application

When you want to run the web application, open a new terminal window and navigate to the root of the `cartogram-web` repository using `cd`. Then, run

    $ cd internal
    $ source ./setupenv.sh
    (venv) $ python web.py
    ...

Now, you can navigate to http://localhost:5000 in your web browser to access the go-cart web application.

When you are finished, you can go back to the terminal window and press Control-C to kill the web application process.

repository: ninichang/cartogram-web

gha_language: JavaScript

repo_name: ninichang/cartogram-web


text:
---
layout: engineering-education
status: publish
published: true
url: /java-timer-tasks/
title: Implementing Timer Tasks in Java
description: This article will guide the reader on how to implement Timer Tasks in Java. This class allows one to schedule the execution of different processes.
author: joseph-ongoma
date: 2021-11-03T00:00:00-11:40
topics: [Languages]
excerpt_separator:
images:

  - url: /engineering-education/java-timer-tasks/hero.jpg
    alt: Java Timer Tasks Hero Image
---
Java programming language provides a class utility known as Timer Task. It allows one to schedule different tasks.

In other words, a task can be executed after a given period or at a specified date and time.

A `Timer` in Java is a process that enables threads to schedule tasks for later execution.

Scheduling is done by keeping a specific process in the queue such that when the execution time comes, the processor can suspend other processes and run the task.

### Table of contents
- [Prerequisites](#prerequisites)
- [Java timer task methods](#java-timer-task-methods)
    - [Cancel() Method](#cancel-method)
    - [Run() Method](#run-method)
    - [ScheduleExecutionTime() Method](#scheduleexecutiontime-method)
- [Code example](#code-example)
- [Conclusion](#conclusion)

### Prerequisites
To understand this article better you will need to:
- Have a basic understanding of [Java](https://www.w3schools.com/Java/default.asp)
- Have a code editor such as [Intellij Idea](https://www.jetbrains.com/idea/download/#section=windows).

### Java Timer task methods
There are three Java Timer Task Methods:
- `cancel()` method
- `run()` method
- `ScheduleExecutionTimer`

##### Cancel() method
This method cancels a scheduled task in Java. It means that no task will be executed in a particular period.

##### Run() method
The `run()` method is responsible for running the scheduled task.

##### ScheduleExecutionTime() Method
This method returns the scheduled execution time for the latest task in memory.

### Code example
When you have finished downloading IntelliJ IDEA, run it as administrator and then follow the prompts on the screen to finish setting it up.

After installing the IDE, launch it and click on `New Project`, as shown in the figure below:

![New](/engineering-education/java-timer-tasks/new.jpg)

Select `java` then click `Next`:

![Java](/engineering-education/java-timer-tasks/java.jpg)

Check the `Create project from template` and click  `Next`:

![Project template](/engineering-education/java-timer-tasks/commandline.jpg)

On the next screen, enter the project name as `TimerTask` and click `Finish`. We will be able to write our code on the next screen. The environment should look like this:

![Enviroment](/engineering-education/java-timer-tasks/environ.jpg)

Let's create an example that schedules a task and displays the message `Happy Birthday John Doe` when the date is `October 30th, 2021 at midnight`.

```java
package com.company;
import java.util.Calendar;
import java.util.Timer;
import java.util.TimerTask;
public class Main {
    public static void main(String[] args) {
        Timer T = new Timer();
        TimerTask Birthday = new TimerTask(){
            @Override
            public void run(){
                System.out.println("Happy Birthday John Doe");
            }
        };
        Calendar date = Calendar.getInstance();
        date.set(2021, Calendar.OCTOBER, 31, 0, 0, 0);
        T.schedule(Birthday, date.getTime());
    }
}
```

The output of the above code will be:

```bash
Happy Birthday John Doe
```

In the above code, we are importing the `Calendar`, `Timer`, and `TimerTask` utilities.

`Timer T = new Timer()` is the instance of a timer that keeps track of time. `Birthday` is the task to be executed by the TimerTask.

When the time is up, the `run` function of the `TimerTask` instance is executed.

The `schedule` function links the task to the timer. This method references the task that will be executed.

In the following example, we will create an instance of `Calendar Date` and set the `YEAR`, `MONTH`, `DAY`, `HOUR`, `MINUTE`, and `SECOND` that the task will be executed.

We can also include a count-down timer in the project so that our timer starts counting before the task executes.

This can be achieved using `if` statements and `decrement` operators as shown below:

```java
package com.company;
import java.util.Calendar;
import java.util.Timer;
import java.util.TimerTask;
public class Main {
    public static void main(String[] args) {
        Timer T = new Timer();
        TimerTask Birthday = new TimerTask(){
            int i = 5;
            @Override
            public void run(){
                if(i>0){
                    System.out.println(i);
                    i--;
                }
                else{
                    System.out.println("Happy Birthday John Doe");
                    T.cancel();
                }
            }
        };
        Calendar date = Calendar.getInstance();
        date.set(2021, Calendar.OCTOBER, 30,23, 59, 54);
       T.scheduleAtFixedRate(Birthday, date.getTime(), 1000);
    }
}
```

The output of the code now is shown below:

```bash
55
56
57
58
59
Happy Birthday John Doe
```

To enable the counter to count at a rate of 1 second, we are using `T.scheduleAtFixedRate (Birthday, date.getTime(), 1000);` instead of `T.schedule(Birthday, date.getTime());`. `1000 milliseconds` represents the count period.

The variable `i` is initialized to `5`. This implies that the task will be executed after five seconds.

The time `OCTOBER, 30,23, 59, 54` indicates that the counter will begin on October 30th, at 23:59 hours, and at the 54th second.

The `cancel()` method is used to cancel the execution of the task to prevent it from being executed again once the task is completed.

### Conclusion
This tutorial has taken you through the concept of Timer Tasks in Java.

You should, therefore, have a better understanding of Timer Tasks and can incorporate them into your projects.

---
Peer Review Contributions by: [Jethro Magaji](/engineering-education/authors/jethro-magaji/)

repository: mbuguac/engineering-education

gha_language: SCSS

repo_name: mbuguac/engineering-education


text:
[comment]: # " File: readme.md"
[comment]: # "  Copyright (c) 2021 Splunk Inc."
[comment]: # ""
[comment]: # "  Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)"
[comment]: # ""
## Steps to generate Access Token

1.  Log In to your Signal Fx account
2.  Click on My Profile under the settings tab at the top right corner
3.  Click on Access Tokens
4.  Click on New Token
5.  Provide a name for the token and select both 'Ingest Token' and 'Api Token' options
6.  Click on OK
7.  A new entry with the Name you provided appears on the page. Expand it and click on 'Show Token'
    to get the token
8.  Copy the generated token and use it in 'Access Token' asset configuration parameter

repository: phantomcyber/phantom-apps

branch_name: refs/heads/next

gha_language: Python

repo_name: phantomcyber/phantom-apps


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

### Description

An issue was discovered in LIVEBOX Collaboration vDesk through v018. A Bypass of Two-Factor Authentication can occur under the /api/v1/vdeskintegration/challenge endpoint. Because only the client-side verifies whether a check was successful, an attacker can modify the response, and fool the application into concluding that the TOTP was correct.

### POC

#### Reference
- https://www.gruppotim.it/it/footer/red-team.html

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

repo_name: trickest/cve


text:
# laravel-swagger | Swagger UI [Package](https://packagist.org/packages/westhack/laravel-swagger)

- [About](#about)
- [Requirements](#requirements)
- [Installation](#installation)
- [License](#license)

## About
 This is the Swagger 3.0 ui

## Requirements

* [Laravel 5.1, 5.2, 5.3, 5.4, or 5.5+](https://laravel.com/docs/installation)

## Installation

1. From your projects root folder in terminal run:

```bash
    composer require rachidlaasri/laravel-installer
```

2. Register the package

* Laravel 5.5 and up
Uses package auto discovery feature, no need to edit the `config/app.php` file.

* Laravel 5.4 and below
Register the package with laravel in `config/app.php` under `providers` with the following:

```php
	'providers' => [
	    \Westhack\LaravelSwagger\Providers\SwaggerServiceProvider::class,
	];
```

3. Publish the packages views, config file, assets files by running the following from your projects root folder:

```bash
    php artisan vendor:publish --provider="Westhack\LaravelSwagger\Providers\SwaggerServiceProvider"
```

## Routes

* `/swagger`
* `/api/swagger`

## License

MIT license

repository: westhack/laravel-swagger

repo_name: westhack/laravel-swagger


text:
# NTFS Filename checker
Simple python script to check for invalid NTFS filenames, and rename them.

I found this script useful when doing a large backup to an NTFS disk and got bored of constant failures because files had invalid names.

license: Unlicense


text:
# iOS Setup: react-native-azure-adal

## Assumptions

You have a Azure AD Setup

You can find detailed instructions how to set up a new application in Azure AD [here](https://github.com/AzureADSamples/NativeClient-MultiTarget-DotNet#step-4--register-the-sample-with-your-azure-active-directory-tenant).

## Prerequisites

A working CocoaPods installation [CocoaPods - Getting Started](https://guides.cocoapods.org/using/getting-started.html)

## Step 1 - Pod Setup

- If CocoaPods is not installed, please run below commands:

```bash
pod init
```

- Add the ADAL ios library to your ios/Podfile file pod `'ADAL', '~> 2.3'`.

```
target 'example' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Add ADAL Pod
  pod 'ADAL', '~> 2.3'
  # Pods for example

  target 'exampleTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

```

- Run below command to pull the ios ADAL library down.

```bash
pod install
```

## Step 2 - Installation

Install NPM module

`$ npm install react-native-azure-adal --save`

OR

`yarn add react-native-azure-adal`

## Step 3 - Linking

### Mostly automatic installation

	$ react-native link react-native-azure-adal

### Manual installation - iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-azure-adal` and add `RNAzureAdal.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNAzureAdal.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)

## Step 4 - Caching and Broker

### Keychain Setup

Click on your project in the Navigator pane in Xcode. Click on your application target and then the **Capabilities** tab. Scroll down to **Keychain Sharing** and flip the switch on. Add `com.microsoft.adalcache` to that list.

![add cache](ios-add-cache.png)

___

### Broker support
Plugin automatically detects whether to enable brokered authentication based on redirectUri format (if starts with `x-msauth-`).
Developer needs to register special redirectUri for broker usage following format below:

```
x-msauth-<your-bundle-id>://<your.bundle.id>
ex: x-msauth-com-microsoft-mytestiosapp://com.microsoft.mytestiosapp
```

Read [ADAL for iOS](https://github.com/AzureAD/azure-activedirectory-library-for-objc#brokered-authentication) to understand broker concept in more details.

## TroubleShooting

Receiving issues After an update? Please:

- Ensure this module is up to date
- If you are still receiving issues after all this then open an issue.

Thanks

gha_language: Objective-C


text:
---
title: "Some animated gifs"
author: 'lenkiefer.com'
date: '2016-10-14'
slug: some-animated-gifs
link: http://lenkiefer.com/2016/10/2016/10/14/gifs-10-14-2016/
categories:
- bloglink
tags:
  - lenkiefercom
---

A couple of views of mortgage rates: Mortgage Rates in 2016 This chart shows the weekly average for the 30-year fixed rate morrtgage. Comparing mortgage rates by week This viz compares weekly mortgage rates (30-year fixed rate mortgage) by year. Each line represents a different year. The x-axis display the week of the year (from 1 to 52). Homeownership gif A homeownership rate viz[... <i class="fas fa-external-link-alt"></i>](http://lenkiefer.com/2016/10/2016/10/14/gifs-10-14-2016/)

repository: mkearney/data-scribers

repo_name: mkearney/data-scribers


text:
# ralloc

A fast & memory efficient userspace allocator.

This allocator is used as the default Redox.

## A note on its state.

It fully works, although it is relatively slow, since it haven't been optimized
yet.

I consider the state of the code quality very good.

## Platforms supported out-of-the-box

- [x] BSD
- [x] Linux
- [x] Mac OS X
- [x] Redox
- [ ] Windows

## Using ralloc

Add `ralloc` to `Cargo.toml`:

```toml
[dependencies.ralloc]
git = "https://github.com/redox-os/ralloc.git"
```

then import it in your main file:

```rust
extern crate ralloc;
```

`ralloc` is now ready to roll!

Note that `ralloc` cannot coexist with another allocator, unless they're deliberately compatible.

## Features

### Custom out-of-memory handlers

You can set custom OOM handlers, by:

```rust
extern crate ralloc;

fn my_handler() -> ! {
    println!("Oh no. Blame the Mexicans.");
}

fn main() {
    ralloc::set_oom_handler(my_handler);
    // Do some stuff...
}
```

### Debug check: double free

Ooh, this one is a cool one. `ralloc` detects various memory bugs when compiled
with the `debug_tools` feature. These checks include double free checks:

```rust
extern crate ralloc;

fn main() {
    // We start by allocating some stuff.
    let a = Box::new(500u32);
    // Then we memcpy the pointer (this is UB).
    let b = unsafe { Box::from_raw(&*a as *mut u32) };
    // Now both destructors are called. First a, then b, which is a double
    // free. Luckily, `ralloc` provides a nice message for you, when in debug
    // tools mode:
    //    Assertion failed: Double free.

    // Setting RUST_BACKTRACE allows you to get a stack backtrace, so that you
    // can find where the double free occurs.
}
```

### Debug check: memory leaks.

`ralloc` got memleak superpowers too! Enable `debug_tools` and do:

```rust
extern crate ralloc;

use std::mem;

fn main() {
    {
        // We start by allocating some stuff.
        let a = Box::new(500u32);
        // We then leak `a`.
        let b = mem::forget(a);
    }
    // The box is now leaked, and the destructor won't be called.

    // To debug this we insert a memory leak check in the end of our programs.
    // This will panic if a memory leak is found (and will be a NOOP without
    // `debug_tools`).
    ralloc::lock().debug_assert_no_leak();
}
```

### Partial deallocation

Many allocators limits deallocations to be allocated block, that is, you cannot
perform arithmetics or split it. `ralloc` does not have such a limitation:

```rust
extern crate ralloc;

use std::mem;

fn main() {
    // We allocate 200 bytes.
    let vec = vec![0u8; 200];
    // Cast it to a pointer.
    let ptr = vec.as_mut_ptr();

    // To avoid UB, we leak the vector.
    mem::forget(vec);

    // Now, we create two vectors, each being 100 bytes long, effectively
    // splitting the original vector in half.
    let a = Vec::from_raw_parts(ptr, 100, 100);
    let b = Vec::from_raw_parts(ptr.offset(100), 100, 100);

    // Now, the destructor of a and b is called... Without a segfault!
}
```

### Separate deallocation

Another cool feature is that you can deallocate things that weren't even
allocated buffers in the first place!

Consider that you got a unused static variable, that you want to put into the
allocation pool:

```rust
extern crate ralloc;

static mut BUFFER: [u8; 256] = [2; 256];

fn main() {
    // Throw `BUFFER` into the memory pool.
    unsafe {
        ralloc::lock().free(&mut BUFFER as *mut u8, 256);
    }

    // Do some allocation.
    assert_eq!(*Box::new(0xDEED), 0xDEED);
}
```

### Top notch security

If you are willing to trade a little performance, for extra security you can
compile `ralloc` with the `security` flag. This will, along with other things,
make frees zeroing.

In other words, an attacker cannot for example inject malicious code or data,
which can be exploited when forgetting to initialize the data you allocate.

### Code verification

Allocators are extremely security critical.If the same addressis allocated to
two different callers, you risk all sorts of vulnerabilities. For this reason,
it is important that the code is reviewed and verified.

`ralloc` uses a multi-stage verification model:

1. The type checker. A significant part of the verification is done entirely
   statically, and enforced through the type checker. We make excessive use of
   Rust's safety features and especially affine types.
2. Unit testing. `ralloc` has full-coverage unit tests, even for private
   interfaces.
3. Integration testing suit. `ralloc` uses a form of generative testing, where
   tests are "expanded" through a fixed set of functions. This allows
   relatively few tests (e.g., a few hundreds of lines) to multiply and become
   even more effective.
4. Runtime checks. `ralloc` tries to avoid runtime tests, whenever it can, but
   that is not always possible. When the security gain is determined to be
   significant, and the performance loss is small, we use runtime checks (like
   checks for buffer overflows).
5. Debug assertions. `ralloc` contains numerous debug assertions, enabled in
   debug mode. These allows for very careful testing for things like double
   free, memory corruption, as well as leaks and alignment checks.
6. Manual reviewing. One or more persons reviews patches to ensure high
   security.

### Lock reuse

Acquiring a lock sequentially multiple times can be expensive. Therefore,
`ralloc` allows you to lock the allocator once, and reuse that:

```rust
extern crate ralloc;

fn main() {
    // Get that lock!
    let lock = ralloc::lock();

    // All in one:
    let _ = lock.alloc(4, 2);
    let _ = lock.alloc(4, 2);
    let _ = lock.alloc(4, 2);

    // The lock is automatically released through its destructor.
}
```

### Security through the type system

`ralloc` makes heavy use of Rust's type system, to make safety guarantees.
Internally, `ralloc` has a primitive named `Block`. This is fairly simple,
denoting a contagious segment of memory, but what is interesting is how it is
checked at compile time to be unique. This is done through the affine type
system.

This is just one of many examples.

### Platform agnostic

`ralloc` is platform independent. It depends on `ralloc_shim`, a minimal
interface for platform dependent functions. The default implementation of
`ralloc_shim` requires the following symbols:

1. `sbrk`: For extending the data segment size.
2. `sched_yield`: For the spinlock.
3. `memcpy`, `memcmp`, `memset`: Core memory routines.
4. `rust_begin_unwind`: For panicking.

### Local allocators

`ralloc` allows you to create non-global allocators, for e.g. thread specific purposes:

```rust
extern crate ralloc;

fn main() {
    // We create an allocator.
    let my_alloc = ralloc::Allocator::new();

    // Allocate some stuff through our local allocator.
    let _ = my_alloc.alloc(4, 2);
    let _ = my_alloc.alloc(4, 2);
    let _ = my_alloc.alloc(4, 2);
}
```

### Safe SBRK

`ralloc` provides a `sbrk`, which can be used safely without breaking the allocator:

```rust
extern crate ralloc;

fn main() {
    // BRK'ing 20 bytes...
    let ptr = unsafe { ralloc::sbrk(20) };
}
```

### Logging

If you enable the `log` feature, you get detailed locking of the allocator, e.g.

```
|   : BRK'ing a block of size, 80, and alignment 8.            (at bookkeeper.rs:458)
|   : Pushing 0x5578dacb2000[0x0] and 0x5578dacb2050[0xffb8].  (at bookkeeper.rs:490)
|x  : Freeing 0x1[0x0].                                        (at bookkeeper.rs:409)
x|  : BRK'ing a block of size, 4, and alignment 1.             (at bookkeeper.rs:458)
x|  : Pushing 0x5578dacc2008[0x0] and 0x5578dacc200c[0xfffd].  (at bookkeeper.rs:490)
x|x : Reallocating 0x5578dacc2008[0x4] to size 8 with align 1. (at bookkeeper.rs:272)
x|x : Inplace reallocating 0x5578dacc2008[0x4] to size 8.      (at bookkeeper.rs:354)
_|x : Freeing 0x5578dacb2058[0xffb0].                          (at bookkeeper.rs:409)
_|x : Inserting block 0x5578dacb2058[0xffb0].                  (at bookkeeper.rs:635)
```

To the left, you can see the state of the block pool. `x` denotes a non-empty
block, `_` denotes an empty block, and `|` denotes the cursor.

The `a[b]` is a syntax for block on address `a` with size `b`.

### Useless alignments

Alignments doesn't have to be a power of two.

## Planned features

### Failable allocations

Often you are interested in handling OOM on a case-by-case basis. This is
especially true when dealing with very big allocation.

`ralloc` allows that:

```rust
extern crate ralloc;

fn main() {
    let buf = ralloc::lock().try_alloc(8, 4);
    // `buf` is a Result: It is Err(()) if the allocation failed.
}
```

repository: dylanNew/ralloc

repo_name: dylanNew/ralloc


text:
# Wodify Enroll
Automatically enroll in Wodify classes.

## Run
```bash
$ npm install
$ node wodify_enroll --help
Usage: node wodify_enroll <enroll_list.json>
$ node wodify_enroll enroll_list.json
```

## Setup
### Environment variables
Configure Wodify Enroll using the following environment variables.

```bash
.env

# Required
WODIFY_USERNAME="username"
WODIFY_PASSWORD="password"
ENROLLMENT_OPENING_BEFORE_CLASS_MINUTES=4320

# Optionally receive email notifications after enrolling in a class
<EMAIL_ADDRESS>MAILGUN_API_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx-xxxxxxxx"
MAILGUN_DOMAIN="example.com"

# Tune the polling period (default = 60 seconds) to check class availability
POLL_PERIOD_SECONDS=60

# Tune the reset period (default = 3600 seconds) to reset the filters
RESET_PERIOD_SECONDS=3600

# Tune the interval around the the desired class time to poll continuously
# (default = 300 seconds)
CONTINUOUS_POLL_BEFORE_DESIRED_CLASS_SECONDS=300
CONTINUOUS_POLL_AFTER_DESIRED_CLASS_SECONDS=300
```

### Enroll list
Specify the classes in which you wish to enroll. The weekday keys should be
written in lowercase. The `location`, `program`, and `time` keys' values must
match the text in Wodify's calendar but are case-insensitive.

Note: Wodify Enroll assumes that the host machine is in the same timezone as
the desired classes.

```json
enroll_list.json

{
  "monday": {
    "location": "redmond",
    "program": "sasquatch",
    "time": "6:00 pm"
  },
  "tuesday": {
    "location": "redmond",
    "program": "sasquatch",
    "time": "6:00 pm"
  },
  "wednesday": {
    "location": "redmond",
    "program": "sasquatch",
    "time": "6:00 pm"
  },
  "thursday": {
    "location": "redmond",
    "program": "sasquatch",
    "time": "6:00 pm"
  },
  "friday": {
    "location": "redmond",
    "program": "sasquatch",
    "time": "6:00 pm"
  },
  "saturday": {
    "location": "redmond",
    "program": "sasquatch",
    "time": "9:00 am"
  }
}
```

repository: lelandjansen/wodify-enroll

repo_name: lelandjansen/wodify-enroll


text:
# VRMoveME

# Required Equipment:
1. 2 vive trackers (one gets mounted on each leg, or foot)
1. mounts to mount trackers to drop legs: https://www.thingiverse.com/thing:2633427, or Trackers mounted to feet with Track Straps, Or Tied into shoe laces

# Howto

### Tracker Based Movement ###

Add a body role of LeftFoot and RightFoot for for your feet or legs, then mount vive trackers to your feet or thighs. Track Straps are a simple solution to mount them to your feet https://rebuffreality.com/products/trackstrap

Add a body role of hip for a vive controller and mount it to a belt in the small of your back, facing away from you

Add a body role of head and assign it to your headset

### Controler based movement ###

Assign a body role of Right Hand to a controller to use for movement.
Point the gun at the ground and press the menu button to move forward, and you raise the gun to aim you will slow to a stop, rotate the controller side to side to strafe

Point the gun up while pressing the button to back up

The Demo scene uses a Character Rig prefab that already has a character controller and the VRMoveMe script attached it it
There is also a script attached to the main camera that updates the center of the character controller to where ever the players head currently is

This Locomotion was Developed for Tactical AR:
See:
TacticalAR.net
https://store.steampowered.com/app/720510/Tactical_AR/

if you find this code useful feel free to support us on steam :)

Thanks,
Nathanael

repository: wirelessdreamer/VRMoveME

repo_name: wirelessdreamer/VRMoveME


text:
# Stackdriver Special fields

When the [google-logging-agent](https://cloud.google.com/logging/docs/agent) receives a structured log record, it treats the [some fields](https://cloud.google.com/logging/docs/agent/configuration#special-fields) specially, allowing users to set specific fields in the LogEntry object that get written to the Logging API.

Currently, we also support some special fields in fluent-bit:
| JSON log field | [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) field | Logging agent function |
| :--- | :--- | :--- |
| logging.googleapis.com/operation | operation | Additional information about a potentially long-running operation |
| logging.googleapis.com/labels | labels | The value of this field should be a structured record |
| logging.googleapis.com/insertId | insertId | A unique identifier for the log entry. It is used to order logEntries |
| logging.googleapis.com/sourceLocation | sourceLocation | Additional information about the source code location that produced the log entry. |
| logging.googleapis.com/http_request | httpRequest | A common proto for logging HTTP requests. |
| logging.googleapis.com/trace | trace | Resource name of the trace associated with the log entry |
| timestamp | timestamp | An object including the seconds and nanos fields that represents the time |
| timestampSecond & timestampNanos | timestamp | The seconds and nanos that represents the time |

## Operation
Operation field contains additional information about a potentially long-running operation with which a log entry is associated.

The JSON representation is as followed:
```text
{
  "id": string,
  "producer": string,
  "first": boolean,
  "last": boolean
}
```

For example, when the jsonPayload contains the subfield `logging.googleapis.com/operation`:
```text
jsonPayload {
    "logging.googleapis.com/operation": {
        "id": "test_id",
        "producer": "test_producer",
        "first": true,
        "last": true
    }
    ...
}
```
the stackdriver output plugin will extract the operation field and remove it from jsonPayload. LogEntry will be:
```text
{
    "jsonPayload": {
        ...
    }
    "operation": {
        "id": "test_id",
        "producer": "test_producer",
        "first": true,
        "last": true
    }
    ...
}
```

### Use Cases
**1. If the subfields are empty or in incorrect type, stackdriver output plugin will set these subfields empty.** For example:
```text
jsonPayload {
    "logging.googleapis.com/operation": {
        "id": 123, #incorrect type
        # no producer here
        "first": true,
        "last": true
    }
    ...
}
```
the logEntry will be:
```text
{
    "jsonPayload": {
        ...
    }
    "operation": {
        "first": true,
        "last": true
    }
    ...
}
```
**2. If the `logging.googleapis.com/operation` itself is not a map, stackdriver output plugin will leave this field untouched.** For example:
```text
jsonPayload {
    "logging.googleapis.com/operation": "some string",
    ...
}
```
the logEntry will be:
```text
{
    "jsonPayload": {
        "logging.googleapis.com/operation": "some string",
        ...
    }
    ...
}
```
**3. If there are extra subfields, stackdriver output plugin will add operation field to logEntry and preserve the extra subfields in jsonPayload.** For example:
```text
jsonPayload {
    "logging.googleapis.com/operation": {
        "id": "test_id",
        "producer": "test_producer",
        "first": true,
        "last": true,

        "extra1": "some string",
        "extra2": 123,
        "extra3": true
    }
    ...
}
```
the logEntry will be:
```text
{
    "jsonPayload": {
        "logging.googleapis.com/operation": {
            "extra1": "some string",
            "extra2": 123,
            "extra3": true
        }
        ...
    }
    "operation": {
        "id": "test_id",
        "producer": "test_producer",
        "first": true,
        "last": true
    }
    ...
}
```
## Labels
labels field contains specific labels in a structured entry that will be added to LogEntry labels.

For example, when the jsonPayload contains the subfield `logging.googleapis.com/labels`:
```text
jsonPayload {
    "logging.googleapis.com/labels": {
        "A": "valA",
        "B": "valB",
        "C": "valC"
    }
    ...
}
```
the stackdriver output plugin will extract labels from the subfield `logging.googleapis.com/labels` and move it up from jsonPayload to LogEntry Labels. LogEntry will be:
```text
{
    "jsonPayload": {
        ...
    }
    "labels": {
        "A": "valA",
        "B": "valB",
        "C": "valC"
    }
    ...
}
```

## insertId
InsertId is a unique identifier for the log entry. It is used to order logEntries.

The JSON representation is as followed:
```text
"insertId": string
```

### Use Cases
**1. If the insertId is a non-empty string.** For example:
```text
jsonPayload {
    "logging.googleapis.com/insertId": "test_id"
    ...
}
```
the logEntry will be:
```text
{
    "jsonPayload": {
        ...
    }
    "insertId": "test_id"
    ...
}
```

**2. If the insertId is invalid (not non-empty string).** For example:
```text
jsonPayload {
    "logging.googleapis.com/insertId": 12345
    ...
}
```
The logging agent will log an error and reject the entry.

## SourceLocation
SourceLocation field contains additional information about the source code location that produced the log entry. The format.

The JSON representation is as followed:
```text
{
  "file": string,
  "line": string,
  "function": string
}
```

### Use Cases
Set the input log as followed:
```text
jsonPayload {
    "logging.googleapis.com/sourceLocation": {
        "file": "my_file",
        "line": 123,
        "function": "foo()"
    }
    ...
}
```
the logEntry will be:
```text
{
    "jsonPayload": {
        ...
    }
    "sourceLocation": {
        "file": "my_file",
        "line": 123,
        "function": "foo()"
    }
    ...
}
```

## httpRequest
HttpRequest field is a common proto for logging HTTP requests.

The JSON representation is as followed:
```text
{
  "requestMethod": string,
  "requestUrl": string,
  "requestSize": string,
  "status": integer,
  "responseSize": string,
  "userAgent": string,
  "remoteIp": string,
  "serverIp": string,
  "referer": string,
  "latency": string,
  "cacheLookup": boolean,
  "cacheHit": boolean,
  "cacheValidatedWithOriginServer": boolean,
  "cacheFillBytes": string,
  "protocol": string
}

```

### Use Cases
Set the input log as followed:
```text
jsonPayload {
    "logging.googleapis.com/http_request": {
        "requestMethod":"GET",
        "requestUrl":"logging.googleapis.com",
        "requestSize":"12",
        "status":200,
        "responseSize":"12",
        "userAgent":"Mozilla",
        "remoteIp":"<IP_ADDRESS>",
        "serverIp":"<IP_ADDRESS>",
        "referer":"referer",
        "latency":"1s",
        "cacheLookup":true,
        "cacheHit":true,
        "cacheValidatedWithOriginServer":true,
        "cacheFillBytes":"12",
        "protocol":"HTTP/1.2"
    }
    ...
}
```
the logEntry will be:
```text
{
    "jsonPayload": {
        ...
    }
    "httpRequest": {
        "requestMethod":"GET",
        "requestUrl":"logging.googleapis.com",
        "requestSize":"12",
        "status":200,
        "responseSize":"12",
        "userAgent":"Mozilla",
        "remoteIp":"<IP_ADDRESS>",
        "serverIp":"<IP_ADDRESS>",
        "referer":"referer",
        "latency":"1s",
        "cacheLookup":true,
        "cacheHit":true,
        "cacheValidatedWithOriginServer":true,
        "cacheFillBytes":"12",
        "protocol":"HTTP/1.2"
    }
    ...
}
```

## Trace

TraceId is resource name of the trace associated with the log entry.
If enable autoformat_stackdriver_trace flag in config the entry will automatically get the projectID from the Google Metadata server and add it.

The JSON representation is as followed:
```text
"trace": string
```

### Use Cases
Set the input log as followed:
```text
jsonPayload {
    "logging.googleapis.com/trace": "0123456789abcdef0123456789abcdef"
    ...
}
```
the logEntry will be:
```text
{
    "jsonPayload": {
        ...
    }
    "trace": "projects/your-project-name/traces/0123456789abcdef0123456789abcdef"
    ...
}
```

## Timestamp

We support two formats of time-related fields:

Format 1 - timestamp:
JsonPayload contains a timestamp field that includes the seconds and nanos fields.
```text
{
  "timestamp": {
    "seconds": CURRENT_SECONDS,
    "nanos": CURRENT_NANOS
  }
}
```
Format 2 - timestampSeconds/timestampNanos:
JsonPayload contains both the timestampSeconds and timestampNanos fields.
```text
{
   "timestampSeconds": CURRENT_SECONDS,
   "timestampNanos": CURRENT_NANOS
}

```

If one of the following JSON timestamp representations is present in a structured record, the Logging agent collapses them into a single representation in the timestamp field in the LogEntry object.

Without time-related fields, the logging agent will set the current time as timestamp. Supporting time-related fields enables users to get more information about the logEntry.

### Use Cases
**Format 1**
Set the input log as followed:
```text
jsonPayload {
    "timestamp": {
        "seconds":<PHONE_NUMBER>,
        "nanos": 12345
    }
    ...
}
```
the logEntry will be:
```text
{
    "jsonPayload": {
        ...
    }
    "timestamp": "2020-07-30T22:56:27.000012345Z"
    ...
}
```

**Format 2**
Set the input log as followed:
```text
jsonPayload {
    "timestampSeconds":1596149787,
    "timestampNanos": 12345
    ...
}
```
the logEntry will be:
```text
{
    "jsonPayload": {
        ...
    }
    "timestamp": "2020-07-30T22:56:27.000012345Z"
    ...
}
```

repository: fluent/fluent-bit-docs

gha_language: Shell

repo_name: fluent/fluent-bit-docs


text:
## The data format

The data format used for generating the status page is a `yaml` file with the following sections:
```yaml
# The products shown in the overview columns
products:
  - Network
  - Some product

# A list of current problems/info
current:
  - title: Item title
    status: outage
    start: 2020-03-13 09:30 UTC
    products: # Products should match the products defined above
      - Some product
    body: >
      <p>Html enabled body, only shown in when on the current events</p>
    updates: # A list of updates
      - title: Update
        time: 2020-03-12 10:00 UTC
        body: Keep updates simple
      - title: Investigating
        time: 2020-03-12 09:30 UTC
        body: Some descriptive info

# A list of planned upcomming work
# same format as the other events
planned: []

# A list of past incidents
past:
  - title: Item title
    status: degraded
    products:
      - Some product
    updates:
      - title: Resolved:
        time: 2020-03-12 14:00 UTC
        body: The issue has been resolved.
      - title: Monitoring
        time: 2020-03-12 13:00 UTC
        body: The issue has now been mitigated, we continue to monitor the situation.
      - title: Investigating
        time 2020-03-12 10:30 UTC
        body: We are currently seeing problems with the plonk of the Some service.
    # the body will not be shown
    body: >
      <p>this body will currently not be shown, but can be kept for future use</p>
```

Currently the following status are supported:

- operational - green
- degraded - orange
- outage - red
- maintenance - blue

If you put anything else it will end up being gray and black.

The products status grid gets updated depending on `products` in the current list. Currently in reverse order, so oldest status wins.

repository: NORDUnet/status-page

repo_name: NORDUnet/status-page