text:
# MongoDB Enterprise
## Configuration
MongoDB Enterprise supports authentication and authorization of users against LDAP, including support to Active Directory.

### Virtual Machine
The first requirement is to have MongoDB Enterprise running in a VM in Azure. To achieve this, you need to create a Linux VM in Azure and then install MongoDB Enterprise in it.

It's recommended to review the Linux distributions MongoDB supports on their official documentation, but you could start creating a CentOS 7.4 from the [Azure Gallery](https://portal.azure.com/?feature.customportal=false#create/RogueWave.CentOSbased74-ARM). The VM must be created on the same VNet Azure Active Directory Domain Services was enabled.

Once the VM is running, the next step is to install MongoDB Enterprise in it. MongoDB has guidance for several [Linux distributions](https://docs.mongodb.com/manual/administration/install-enterprise-linux/), but the CentOS guidance is available [here](https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-red-hat/).

### MongoDB Configuration
Once MongoDB Enterprise is running, you need to configure it to authenticate and authorize users against LDAP.
Connect to the MongoDB server using mongo shell:

```
mongo --host <hostname> --port <port>
```

If a SSH connection was stablished with the VM on Azure, you can simple connect to the localhost and default port:

```
mongo
```

In order to manage MongoDB users using AD, you need to create at least one role on the admin database that can create and manager roles.
```
use admin
db.createRole(
    {
        role: "<Directory Distinguished Name>",
        privileges: [],
        roles: [ "userAdminAnyDatabase" ]
   }
)
```

A good approach is to create a group on AAD and give permission to this group on MongoDB. You can then add users to this group to grant them admin access to MongoDB. Example:
```
use admin
db.createRole(
    {
        role: "CN=MongoDBUsers,OU=AADDC Users,DC=rgodinhoad,DC=onmicrosoft,DC=com",
        privileges: [],
        roles: [ "userAdminAnyDatabase" ]
   }
)
```

The next step is to modify MongoDB's configuration file, by default located on /etc/mongod.conf.

```
#security:
security:
  authorization: "enabled"
  ldap:
    authz:
      queryTemplate: "<Query Template>"
    transportSecurity: "none"
    servers: "<AAD Domain Name>"
    bind:
      queryUser: "<Query User>"
      queryPassword: "<Password>"
setParameter:
  authenticationMechanisms: 'PLAIN'
```

Example:
```
#security:
security:
  authorization: "enabled"
  ldap:
    authz:
      queryTemplate: "DC=rgodinhoad,DC=onmicrosoft,DC=com??sub?(member:1.2.840.1135<IP_ADDRESS>1:={USER})"
    transportSecurity: "none"
    servers: "rgodinhoad.onmicrosoft.com"
    bind:
      queryUser<EMAIL_ADDRESS>      queryPassword: "<password>"
setParameter:
  authenticationMechanisms: 'PLAIN'
```

The final step is to start MongoDB. This is done by executing:

```
sudo mongod -f /etc/mongodb.conf
```

An alternative approach would be to run MongoDB as a service, but a communication issue was detected between MongoDB and the LDAP endpoint from AAD. An investigation needs to be done to identify the root cause of the issue.

## Testing
To test the configuration, just connect to the MongoDB using Mongo Shell with an AAD credential:

```
mongo --username "<Directory Distinguished Name>" --authenticationMechanism 'PLAIN' --authenticationDatabase '$external' --password <password>
```

Example:
```
mongo --username "CN=mongodbuser,OU=AADDC Users,DC=rgodinhoad,DC=onmicrosoft,DC=com" --authenticationMechanism 'PLAIN' --authenticationDatabase '$external' --password <password>
```

Everything should be properly configured if it is possible to list the databases:

```
MongoDB Enterprise > show dbs
admin   0.000GB
config  0.000GB
local   0.000GB
```

## References

[Authenticate and Authorize Users Using Active Directory via Native LDAP](https://docs.mongodb.com/manual/tutorial/authenticate-nativeldap-activedirectory/) - MongoDB documentation about Active Directory


text:
# FunNPLBM: Functional Non-Parametric Latent Block Model

This repository contains the Scala / Spark source code that implements the time series co-clustering method FunNPLBM

## Quick start

The build.sh script helps the user build the project using maven.
The run.sh script launches the benchmark.

repository: EtienneGof/FunNPLBM

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: EtienneGof/FunNPLBM


text:
---
title: Option 01 - «Electronic gradebook»
keywords: Tasks
sidebar: guide-tasks_sidebar
toc: true
permalink: en/gt_full-stack-task-case-01.html
folder: guides/tasks/
lang: en
autotranslated: true
hash: e348ef47a4a8780c49439c00f21c5778042b6ca6e677e63c8cd6cd9d0afd1ae3
---

## Job

In the framework of the practical part of the course you will have developed end-to-end example: application «Electronic gradebook» (module on IP for universities).

The first part of the practical exercises will be devoted to the development of basic technologies, such as C#, databases, client technology, etc., the second part will include a study of the possibilities of the platform Flexberry to efficiently create applications.

## General description of the subject area

You want to create a separate application module for universities. This module should cover the need of fixation of information about students and their academic achievement. It is known that students learn in groups, each group attached to any faculty. Each student must take tests and exams during the session. Information on these activities is recorded in the application.

Specifications:

* The application is implemented as a ASP.NET WebForms application.
* Data is stored in the database MSSQL Server.

## Practical task no 1 - server development (C#, .NET ASP.NET)

Will be required for implementation:

* Microsoft Visual Studio 2015
* Git for Windows

### Job. Part 1.

You want to implement a algorithm generate a unique, alphanumeric code for the grade book, based on the following input data: name of student, date of birth, group number. The algorithm for generating this code, you need to invent your own. The length of the alphanumeric code must not exceed 8 characters. Code should be built in such a way that it should be implemented the potential to calculate a particular student (from a known list), without storing the correspondence between the student and code. Examples of alphanumeric code: *ШШШШПВВ4*; *А665Б44В*. The algorithm follows in the comments to make a description of the selected variant of the algorithm, because valid different ways to generate the alphanumeric code.

The implementation should be done .net-libraries and to prepare unit tests for it, to show the percentage of code coverage from unit tests (the more the better).

### Job. Part 2.

Implement a simple ASP.NET WebForms-application (at this stage, no database), which contains the components (. ascx controls), realizowa:

1. The logic input of the search query alphanumeric code and using the library from the previous paragraph for the release of information about the student (field values button, the unit displays the result).
2. The logic of obtaining the alphanumeric code for the specified information full name of student, date of birth and group number field (input, button, block, displaying results).

### Providing performance verification

The implemented solution (Visual Studio Solution) to put it all in a repository on GitHub (the solution must compile and run). A link to the repository to provide the teachers of the course.

## Practical exercise No. 2 - Client-side development (HTML, CSS, JS, jQuery)

Will be required for implementation:

* Code editor for client development: Visual Studio Code, Atom, Sublime Text, etc.
* Git for Windows

### Job

With use of opportunities HTML, CSS, JS, jQuery mark up a form that will display the location of the desks in the auditorium of the University. Desks can be moved between fixed cells (in accordance with the actual location of the part to a specific audience, which is the exam). Each row can be 0, 1 or 2 students. The form also needs to be a block with information about the room number, teacher and subject in which the exam is held. For exposure assessment the student can click on his name or image and select the rating in beautiful a pop-up list.

### to deliver results

Implemented project to place in a repository on GitHub in the form of embedded pages [GitHub Pages](https://pages.github.com/) that allows you to view the finished result. A link to the published repository and thus the project to provide teachers of the course.

## Practical exercise No. 3 - the Database

Will be required for implementation:

* Microsoft SQL Server
* Microsoft SQL Server Management Studio
* Git for Windows

### Job

For the specified subject area to implement the database, fill the database with scripts (at least 5 records per table). Implement scripts to create constraints, indexes. To attach the scripts to create the database and populate, Bacup database.

Prepare SQL scripts to obtain the following information:

1. List the teachers that put a maximum on the number of excellent marks.
2. Output the top N most students are bad students.
3. Display the subjects for which most of the debtors during the specified period.
4. Withdraw the rating of faculties according to the average score of the students.
5. To obtain an average score for each student of the University for years.

### to deliver results

Implemented scripts commit in the GitHub repository. A link to the repository to provide the teachers of the course.

## Practical assignment # 4 - Designing the IP

Will be required for implementation:

* Flexberry Designer

### Job

Draw a UML diagram for the designated subject area. The composition of the diagrams is determined by the trainees, but should provide a full description of the subject area.

### to deliver results

The result is uploaded in the format of a CRP stage of Flexberry Designer. Stage (a file with the extension *.CRP) should commit to the repository on GitHub, the link to provide the teachers of the course.

## the Practical task №5 - Object design and generation applications

Will be required for implementation:

* Flexberry Designer
* Microsoft Visual Studio 2015
* Microsoft SQL Server
* Git for Windows

### Job

Execute object design and generation of ASP.NET applications for the described subject area. As a basis to use the previously implemented the UML model. Generation of the application and the database must be executed by means Flexberry Designer, the application must meet the requirements and be fully functional. Submission must be high quality customized signatures to classes and attributes on the forms should be adequate. The list of forms and attribute composition must correspond to the subject area and cover all of the required business function.

### to deliver results

The generated application and the scripts to create the database should be put in a repository on GitHub. To provide teachers with a reference to the repository.

## Practical task №6 - Development of business logic applications

Will be required for implementation:

* Flexberry Designer
* Microsoft Visual Studio 2015
* Microsoft SQL Server
* Git for Windows

### Job

In generated using Flexberry Designer application is required to implement the following business logic.

1. To implement a business server, which will verify the grading for the exams only during the session (January and June). Outside the session, the setting and correction of assessments is not permitted.
2. To implement a business server that will be used .net library for affixing alphanumeric code number grade book.
3. To implement a business server, which will verify that the student is not placed in the new assessment exam, which had already marked as accepted (not created duplicate record). Thus, the edit set earlier assessments during the session for example.
4. To add a stored field in the class group that will contain the number of students in this group. Recalculation of this field to implement the business server.
5. To add a stored field in the class group, which will be a string containing the faculty name of the group, the number of students.

### to deliver results

Modified business logic should be included in the development application and sakimichan in the appropriate repository. Link to the repository is available for inspection by the course instructors.

## Practical task №7 - Development of the UI application logic

Will be required for implementation:

* Microsoft Visual Studio 2015
* Microsoft SQL Server
* Code editor for client development: Visual Studio Code, Atom, Sublime Text, etc.
* Git for Windows

### Job

Tie the previously implemented ascx-components for working with alphanumeric codes to the data from the database.

To realize the integration of forms for Seating of students in class with the business logic of the application. On the form controls with the choice should be taken from the database (through ORM and Lookup) group students. Affixing assessments should also work with saving to the database.

You want to configure a beautiful look for all forms of application. To improve the visual design theme. Implement shortcuts on the desktop application for quick access to frequently used functions.

Implement additional forms, which will display the results of a query of the jobs database.

### to deliver results

Modified UI logic should be included in the development application and sakimichan in the appropriate repository. Link to the repository is available for inspection by the course instructors.

## Practical exercise No. 8 - the Functional subsystem Flexberry

Will be required for implementation:

* Flexberry Designer
* Microsoft Visual Studio 2015
* Microsoft SQL Server
* Git for Windows

### Job

The implemented application to configure the subsystem powers. Users must start the application administrator. Authorization form-based. To create a hierarchy of roles, add transactions to view the data about grades and to grant rights only to teachers. To configure the roles and assign these roles to users.

To configure the auditing subsystem. In the developed application, all changes to data objects must be recorded in the audit. In the navigation menu, you should add forms of audit that should only be shown to administrators.

### to deliver results

The revised application must be seamicro in the appropriate repository. Additionally, the repository must be added to the SQL scripts that need to perform to run an application with a subsystem of powers and audit. Link to the repository is available for inspection by the course instructors.

license: MIT

branch_name: refs/heads/master

gha_language: CSS

gha_license_id: MIT


text:
# Pixel Synth

## [Demo](https://pixelsynth.com)

A lofi video synthesizer.

![Pixel Synth](http://pixelsynth.com/img/screen.png)

## Controls

All the controls are in the GUI dropdown.

## MIDI

Plug in a MIDI controller then refresh the page. The code auto connects to the first available MIDI controller. Change the CC selectors to connect the controls to the parameters you want. The ccIdentifier just shows which knob you last turned. It also serves to show if your MIDI device is connected.

## The Code

The interesting bits of this project are [main.js](https://github.com/gridwalk/pixel-synth/blob/master/src/js/app/main.js) and [midi.js](https://github.com/gridwalk/pixel-synth/blob/master/src/js/app/midi.js). This repository is based on [Net Art Starter](https://github.com/gridwalk/net-art-starter). Everything you need to know to build and edit this project are in that repository.

### Thanks

Thanks to [dat.GUI](https://github.com/dataarts/dat.gui) and [WebMidi.js](https://github.com/cotejp/webmidi) for making the hard parts easy.

repository: ElectricEnemies/pixel-synth

repo_name: ElectricEnemies/pixel-synth


text:
# OpenCV Projects
This is a collection of basic OpenCv projects I made. All the codes are written by me. Contributions or help is most welcome.

![logo2](https://cloud.githubusercontent.com/assets/15849927/23373894/f4570b12-fd47-11e6-8e19-6a8ba489ec19.png)

## About OpenCV
[OpenCV](https://en.wikipedia.org/wiki/OpenCV) (Open Source Computer Vision) is a library of programming functions mainly aimed at real-time computer vision. Originally      developed by Intel's research center in Nizhny Novgorod (Russia), it was later supported by Willow Garage and is now maintained by Itseez.The library is cross-platform and free for use under the open-source BSD license.

## Installing OpenCV on Linux

```
   bash install-opencv.sh
```

## Projects till now
1. [Abstract Art](https://github.com/Poirot1729/Open-CV/tree/master/Abstract%20Art)

   Generate random abstract art

2. [Colour detection](https://github.com/Poirot1729/Open-CV/tree/master/Color%20Detection)

   Detects and displays only red coloured objects from the video feed.

3. [Hand Gesture Recognition(Counting fingers)](https://github.com/Poirot1729/Open-CV/tree/master/Hand%20Gesture%20Recognition)

   A naive implementation of contour defects to find the number of fingers raised within an ROI in the video feed.

4. [Document Scanner](https://github.com/Poirot1729/Open-CV/tree/master/Document%20Scanner)

   A document scanner which isolates a document in an image and gives it a scanned effect


text:
---
layout: post
title: "Do not start with Hello World"
date: 2018-11-23
description:
image: /assets/images/papper.jpg
author: Jonatas Emidio
tags:
  - init
  - beginners
---
First of all, I would like to say "Thank You!!!", for every single person  who helped me to get where I am. I have at least 10 years working in tech companies and I had the opportunity to meet amazing people, super developers and references of professionalism.

I'm Jonatas Emidio, Brazilian Developer, Living in Rio de Janeiro (So called - Cidade Maravilhosa == Wonderful City).

![Placeholder](/assets/images/guy-desk.jpg)

And now, I wanna share with you 2 ideas (that for me, sounds amazing, but who knows!)...

### My ideas!

* In my opinion, my English speaking is not a huge problem, but as you can see, writing is my "kryptonite". Because of this I decided to blog in English, but not only blog, but put my content in a place where will be easy to receive tips, advice and issues. So, why not, Github!!??
* I love to be updated with tech news and always when I decide learn some new tech, framework or language, the first thing that the responsible shows me is a hello-world example. Why Gosh!?
For me, would be awesome create something useful in my first sample, and I'm sure that most of than doesn't need to be hard. So... Do it yourself!!!!

For that reason, I created OverHackingView, which means a OverView for Hackers!!! or to be clear a Useful overview!!!
If I already know how things will works?! NOP! But I will start first and see the results after!
I'm only sure about one thing!!! [Small Acts Make Great Revolutions!](http://smallactsmanifesto.org/)

[`PS: This is my repo, so create issues not only to give ideas, but also to help me improve my written skills!`](https://github.com/overhackingview/overhackingview.github.io/)

Cheers!!!

extension: markdown


text:
# PIG-DICE GAME.

#### This project is a website that contains details about a six sided dice game called "pig Dice". It contains details about the game , how to play it and it also enables two players to play the game and get the winner from the two.

#### By Mwangi Nyambura.

 You win by being the first player to score 100 or more points. To play you'll need 2 players.

## Setup/Installation Requirements

~ Open "pig-dice" directory on terminal
~ initialize the project on git
~ Go to github and create a new repository
~ create a remote repository on your computer using terminal
~ Push the directory on github.
~ create a branch gh-pages and push the directory once more using gh-pages as the branch.
~ Go to github click environment and click to view the website.
~ open your web-browser
~ Use the following the demo to put the link.
\##Demo
Here is a live link to the webpage :
\## BDD
1.Player one rolls die until either 1 or hold
2.Player two also rolls die until either 1 or hold
3.Validate players scores
4.The first to reach 100 wins the game.
\##Technologie Used
HTML
ATOM BEAUTIFIER
CSS
JAVASCRIPT
\##Known Bugs
None for know.

## Support and contact details

email<EMAIL_ADDRESS>
### License

MIT License
\##Copyright (c) 2019 Mwangi.
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: mwanginyambura/Pig-Dice

repo_name: mwanginyambura/Pig-Dice


text:
# Smart Garden System
[![.github/workflows/aws.yml](https://github.com/yanchespenda/skripsi-smart-garden-server/actions/workflows/aws.yml/badge.svg)](https://github.com/yanchespenda/skripsi-smart-garden-server/actions/workflows/aws.yml)

## Description

This project use [Nest](https://github.com/nestjs/nest) framework TypeScript.

## Installation

```bash
$ yarn install
```

## Running the app

```bash
# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod
```

## Test

```bash
# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov
```

## License

Nest is [MIT licensed](LICENSE).

gha_language: TypeScript


text:
# Oaxacan Smoky Three-Chile Salsa

## ingredients
* 5 chiles moritas
* 5 chiles arbol
* 5 chiles pasilla
* 3/4 lbs tomatillos
* 3 cloves garlic

## steps
1. Lightly toast the chiles in a cast iron pan until aromatic
2. Place chiles in a bowl of hot water, cover, and set aside until chiles have softened
3. Remove stems but leaves seeds, drain and reserve soaking liquid
4. In a cast iron skillet, toast the tomatillos until black spots form and the garlic until soft
5. Put garlic, tomatillos, and pinch of salt in blender and blend until smooth
6. Add chiles and blend, adding soaking water until salsa reaches the desired consistency

## notes
* Very hot but really smoky – great with some salty cheese and a shot of mezcal
* Original recipe also included roasted agave worms :)

## based on
* http://cookingwithabroad.com/2013/01/a-3-chile-salsa-with-oaxacan-smokiness/

repository: jeffThompson/Recipes

gha_language: JavaScript

repo_name: jeffThompson/Recipes


text:
#
 Entities microservice in Node.JS Changelog

##  1.0.0 (2021-08-10)

Initial public release

### Features
* **Build** entities service factory
* **Containers** process container
* **Data** define and implement the data model
* **Logic** entities controllers
* **Persistence** persistence components
* **Services** entities services

repository: banalna/test-pipeline

repo_name: banalna/test-pipeline


text:
# 4. Use Heroku

Date: 2019-11-21

## Status

Accepted

## Context

We need a place to deploy this application.

## Decision

We will use Heroku Pipelines for Staging / Production and PR builds.

## Consequences

We will have CI / CD for this application in an environment we have proven in
production on previous applications.

repository: MITLibraries/worldcatinator

gha_language: Python

repo_name: MITLibraries/worldcatinator


text:
---
title: "PythonFOSDEM 2017 - Call for Proposals"
author: 'wirtel.be'
date: '2016-10-19'
slug: pythonfosdem-2017-call-for-pro
link: https://wirtel.be/post/2016/10/19/call-cfp-pythonfosdem2017/
categories:
- bloglink
tags:
  - python
  - wirtelbe
---

Introduction The Python Community has a devroom during the FOSDEM in Brussels in Belgium. The event will take place during the first week-end of February 2017[... <i class="fas fa-external-link-alt"></i>](https://wirtel.be/post/2016/10/19/call-cfp-pythonfosdem2017/)

repository: mkearney/data-scribers

repo_name: mkearney/data-scribers


text:
# Carthamus baeticus (Boiss. & Reut.) Nyman SPECIES

#### Status
SYNONYM

#### According to
Integrated Taxonomic Information System

#### Published in
Mem. Real. Soc. Esp. Hist. Nat. 2:37. 1903 (C. F. Nyman, Consp. fl. eur. 419. 1879, as subsp. )

#### Original name
null

### Remarks
null

url: https://raw.githubusercontent.com/mdoering/backbone/712cec6c481c3d78c52698a10644af9aaf7e241d/life/incertae sedis/Carthamus creticus/Carthamus lanatus aggr/ Syn. Carthamus baeticus/README.md

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# cdmenu

Curses/console dmenu clone.

## Controls

* ` Esc`       `Ctrl-c`               Exit.
* ` Down`      `Ctrl-f`   `Tab`       Select the next item.
* ` Up`        `Ctrl-b`   `Shift-Tab` Select the previous item.
* ` Left`      `Ctrl-h`               Move the cursor to the left.
* ` Right`     `Ctrl-l`               Move the cursor to the right.
* ` End`                              Move the cursor to the end of the line.
* ` Home`                             Move the cursor to the beginning of the line.
* ` Delete`                           Delete the character under the cursor.
* ` Backspace`                        Delete the character before the cursor.
* ` Ctrl-u`                           Clear the line.
* ` Ctrl-w`                           Clear the word under the cursor.
* ` Return`    `Ctrl-j`               Output the selected item and exit.

## Installation

```sh
make && sudo make install
```

repository: rliang/cdmenu

repo_name: rliang/cdmenu


text:
# SimpleClock
Analog Clock Made with Pure JavaScript using Canvas API.
A simple analog clock using HTML5 canvas and javascript

##  Include files

In the page's footer, just before , include the required JavaScript file

```html
<script src="simpleClockOOP.min.js"></script>
```

Add the markup to your HTML where you want the clock to appear on your page.
```html
<div id="myClock"></div>
```
Finally you can create your Clock by using the following Javascript:
```javascript

var myClock = new SimpleClock('myClock');

```

## Options

The SimpleClock has customizable feature.

```javascript

var myClock = new SimpleClock(id,
    {
        option1: value1,
        option2: value2,
    }
);

```

The Parameters are :

1. simpleClock's id, should be String.

2. An object to custom SimpleClock including available options which are listed below. A null object means default options.

| Option | Type | Default | Description |
|:---|:---:|:---:|:---|
| colorHourHand | String |"black" | The color of hour hand. |
| colorMinuteHand | String | "black" | The color of Minute hand. |
| colorSecondHand | String | "red" | The color of second hand. |
| colorNumber | String | "black" | The color of Number. |
| colorNumber90Deg | String | "red" | The color of numbers drawn after every 90 degrees. |
| colorDash | String | "black" | The color of dash. |
| colorText | String | "black" | The color of text. |
| text | String | "Quartz" | The color of hands. |
| width | Number | 600 | The width of canvas.  |
| height | Number | 600 | The height of canvas. |

## Methods
#### setSize
Resize the clock.
```javascript
    myClock.setSize(width,height);
```
The Parameters are :

1. width : The new Width of the canvas , should be Number.

2. height : The new height of the canvas , should be Number.

### demo  [SimpleClock](https://codepen.io/Dr_rakcha/pen/oNNEaKx)

### License [MIT License](https://opensource.org/licenses/MIT)

repository: Dr-Rakcha/SimpleClock

repo_name: Dr-Rakcha/SimpleClock


text:
# Zechariah 07 General Notes
## Structure and formatting

This chapter starts about two years after the previous chapter and is written in prose.

Some translations prefer to set apart quotations. The ULT and many other English translations set the lines of 7:4-14, which is an extended quotation, farther to the right on the page than the rest of the text.

## Special concepts in this chapter

### Fasting
This chapter discusses fasting. People were asking the same questions as those from previous generations. The Israelites were asking these same questions before they were exiled from their land.

repository: mandolyte/uw-obsidian

repo_name: mandolyte/uw-obsidian


text:
# Working Group
Karpenter's community is open to everyone. All invites are managed through our [Calendar](https://calendar.google.com/calendar/u/0?cid=N3FmZGVvZjVoZWJkZjZpMnJrMmplZzVqYmtAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ). Alternatively, you can use our [iCal Export](https://calendar.google.com/calendar/ical/7qfdeof5hebdf6i2rk2jeg5jbk%40group.calendar.google.com/public/basic.ics) to add the events to Outlook or other email providers.

# Notes
Please contribute to our meeting notes by opening a PR.

## Template
1. Community Questions
2. Work Items
3. Demos

# Meeting notes (04/15/21)
## Attendees
- Ellis Tarn
- Nick Tran
- Brandon Wagner
- Guy Templeton
- Elton Pinto
- Elmiko

## Announcements
- Spot support checked in v0.2.1
- GPU support in PR

## Notes
- Slack
  - Need a slack channel to chat about Karpenter.
  - Can we use Kubernetes slack? AWS Slack?
- Skyscanner integration
  - Guy to play around with Karpenter spot support in dev clusters.
- Cluster API
  - Potential cloud provider implementation
  - Use MachineTemplates to determinine possible instances
  - Create/Delete directly via Machine CRs
  - Pass underlying cloud provider selection via node labels
  - Need to make binpacking logic vendor neutral

# Meeting notes (04/01/21)

## Attendees
- Jacob Gabrielson
- Prateek Gogia
- Viji Sarathy
- Shreyas Srinivasan
- Nathan Taber
- Ellis Tarn
- Nick Tran
- Brandon Wagner
- Guy Templeton
- Joe Burnett
- Elmiko

## Announcements
- Karpenter v0.2.0 released this week

## Notes
- [BW] Working on Spot support in Karpenter
    - How does labeling works for spot instances in general?
    - Spot vs on-demand percentage for deployment?
.....
- [VS] Homogenous NG ....
- [ET] Some percentage of pods spot vs non-spot in a deployment
- [BW] Ocean from spot.io add `spottiest.io/spot-percentage: 90`
- [GT] We don't use percentage based deployment, currently on on-demand ECS, if Karpenter can offer we can checkout
- [El] CAPI has a generic node-termination handler w/ drain/cordon and a generic interface for spot instances and has a ton of CRDs (Machines, MachineSets, MachineDeployments vs MachinePools)
    - You deploy different controllers and machine actuaters to reconcile and create instances.
    - Machine CR interacts directly with cloud interface (e.g. RunInstance)
- [BW] CAPI moving from run instances API to fleet API in the next release
- [ET] How does the preemption work?
    - [El] They are planning to change the way to its done today and need to go deep dive to understand
- Reading [AWS Provisioner Launch Template Options](https://github.com/awslabs/karpenter/pull/330/files?short_path=3078f76) Proposal from Jacob
- [JG] Its hard to specify if LT is arch specific? Hard to know what arch LT supports? If LT doesn't specify an AMI its not going to work.
- [El] Depends some people like webhook pattern, some don't, CAPI has this pattern
- [El] You can return an error in validating webhook or have an error when the request hit cloud provider. Could potentially just resolve this via validation at pod and provisioner level
    - Might want to pass validation logic into the provisioner
    - validating web hooks should go down to the provider level?
    - advantage is that kubectl will give immediate feedback
    - [ET] we can relax later
    - At provisioner level ValidatingWebhooks can protect from this before the object is persisted
    - If layered under other resources, might not block as expected on creation
- [ET] How does CAPI handle this?
    - [El] CAPI picking templates - creat machine set - in there u define template you want to use ahead of time you already create infra tempalte - might have pre-created, when I create machineset, pick template I'd want ot use, folow model of replication controller
    - [El] Each individual provider has its own template
    - [ET] How do you pick one template over another?
    - CAPI references re: MachineTemplate for AWS: [awsmachine_types](https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/76d4b0fea950c2ccbd8505d87ba0f2f00d95ddad/api/v1alpha3/awsmachine_types.go#L51)
[types](https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/76d4b0fea950c2ccbd8505d87ba0f2f00d95ddad/api/v1alpha3/types.go#L36)
- [PG] We shouldn't validate pods with webhook and just log in Karpenter, to keep the same experience as native Kubernetes
- [El] Where do we stand with a Cluster API Cloud Provider for Karpenter?
  - [ET] Multiple ways for this to work
  - [El] If using a group style, increase MachineSets replica count
  - [El] In CAPI, all machines are owned by MachineSets or MachineDeployments
  - [BW] Instead of stamping out machines, could stamp our MachineDeployments(replicas=1)
  - make sure that on karp side the way it creates infra templates is in same resource version group - make sure aren't false rejections - integration issues
  - [El] similar CA concept - some future work would be CAPI custom resource that just speaks to autoscaler, just expose this "autoscaling" obj to autoscaler - it has all this info in it from autoscaler side, it has everything it needs CAPI doesn't have to expose
  - [El] Multiple passes through cloud provider specific -> agnostic -> specific -> agnostic

# Meeting notes (03/18/21)
## Attendees
- Ellis Tarn
- Prateek Gogia
- Nick Tran
- Brandon Wagner
- Shreyas Srinivasan
- Jeff Wisman
- Jacob Gabrielson

## Notes
- Community Topics
- Roadmap Discussion
- Instance Type unavailable in some Zones
  - [PG] Started running in us-west-2, using any instance types
    - Instance type not available in some zones
  - [BW] We shouldn't fail the request if the fleet request has some errors
    - Some of the capacity can be available, even if others have errors
  - [PG] Difficult to predict the output
  - [BW] Need to return successfully even if some errors
  - [ET] We can handle the leakage case if the nodes are labeled as part of userdata
  - [JG] Difficult to set these labels for Bottlerocket
  - [ET] Potentially can implement a garbage collector against tagged instances
- Karpenter OOM Killed
  - [PG] 20mb limit, too low, shouldn't be limits
  - [ET] Could potentially pare down the cached fields for the objects to reduce footprint

# Meeting notes (02/18/21)

## Attendees
- Prateek Gogia
- Elton Pinto
- Viji Sarathy
- Shreyas Srinivasan
- Ellis Tarn
- Nick Tran
- Guy Templeton
- Joseph Burnett
- Elmiko

## Notes
- [ET] Pending pods might not be the only signal for scaling, its reactive and adds latency
    - HPA like metrics scaling with metrics based approach
    - High number of configurations
    - Groupless provisioning for the nodes in the cloud
- [JB] Interesting idea, have you thought about ASG per deployment model, provisioner will create an ASG and focus on deployment and bind a deployment to an ASG
- [Elmiko] Any developer can write a metric producer to feed into Karpenter?
- [ET] Provisioner stuff is still in the design face, and doesn't use Horizontal autoscaler, there is so much configuration and complexity.
- [Elmiko] Are you taking the Karpenter in this new direction with pending pods?
- [ET] We are still talking to customers and figuring out how to approach this.
- [Elmiko] Metrics based approach is more popular with machine learning folks (Data scientists)
- [JB] We could end up in a heterogenous and random collection of nodes, and we lose the groups benefits. Having extra capacity ahead of time.
- [JB] It would be nice to have a way to use the groups.
- [ET] Provisioning group compared to a single provisioner in a cluster
- [JB] Rollout changes can be done incrementally, new pods go to new node, you have enough capacity to rollout but not double the capacity. How do you update a large deployment in flight? Only reason to split things up is if you have some sort of accounting or security use case
- [ET] Responssible for GC, PDB and have some sane policy
- [ET] Provisioning Group has large number of heterogenous nodes.
- [JB] NG to force capacity to a single failure domain.
- [ET] Boils down to online/offline bin packing, check the constraints and group a set of pods that can be run together. Each group is equally deployable.
- [JB] Defrag the pods comparing the pods on node and calculating the delta within the pods.
- [Elmiko] Sounds interesting, from the prespective of openshift it will com  down to - what resources are customers paying for, debugging(why autoscaler did what it did)? Why did the autoscaler create FOO? How do we avoid cost overrun scenarios.
- [JB] Provisioner is very functional and observabilty can be common
- [ET] Create an audit trail for a bin packing solution and customer can verify why this decision was being and adding observability.
- [JB] Treating it like a blackbox and check what its doing?
- [Elmiko] Openshift prespective, limit to what the provisioner can create, provisioner is not backed by the instances but by the mem/CPU capacity
- [Elmiko] Even if making this shift in direction, it would be nice to still have some metric or signal plugged into the algorithm
- [JB] Over provisioning knob is going to be important. If you see 10 pods create an extra node for the next pod.
- [ET] Minimize the scheduling latency, to create a right size of synthetic pods
- [ET] CA add 0-30 seconds, ASG 0-30 seconds and MNG 0-30 seconds based on cluster load size, we removed this machinery and without any optimization saw ~55 seconds for the node to be ready.
- [JB] Having signals is really powerfull, if the provisioner has a over-provision signal. Metrics part is really important for some of the use case.
- [JB] If the metrics are not in your scheduler, you can be a little slow.
- [Elmiko] Using metrics is gateway to be using models later
- [JB] With the provisioner model how will you even add the metrics
- [ET] How does a customer wire a more intelligent metrics
- [JB] Important signal are going to be workload based
- [Elmiko] An API you expose for annotations on the pod/deployment to instruct the provisioner
...

# Meeting notes (02/04/21)

## Attendees:
- Prateek Gogia
- Viji Sarathy
- Subhrangshu Kumar Sarkar
- Shreyas Srinivasan
- Nathan Taber
- Ellis Tarn
- Nick Tran
- Brandon Wagner
- Guy Templeton

## Notes

- [Ellis] Karpenter received a bunch of customer feedback around pending pods problems
    - Identified CA challenges
        - Zones, mixed instance policies, nodes in node groups are assumed identical
        - Limitations with ASGs with lots of groups
    - New approach, replace ASG with direct create node API
- [Brandon] Supportive of the idea
    - If we can have ASG and create fleet implementation for comparison
- [Ellis] SNG, HA, MP in karpenter are not compatible with this approach
- [Ellis] Focus on reducing pending pods latency to start
- [Guy] Opportunity for this approach, this removes all the guesswork and inaccuracy of CAS, which is quite honestly a pain in the ass.
- [Viji] More basic question, Autoscaling both nodes and pods. Scaling based on a single metric isn't enough. Using a pending pods
    - How Karpenter and CA differs with pending pods approach
    - [Viji] 2-3 minutes to start a new node with CA
    - [Guy] 3 minutes for the nodes to schedulable
    - [Ellis] m5.large took about 63 seconds with ready pods
        - Create fleet is more modern API call with some parameters
    - [Nathan]
        - CA is slow in case of large clusters
        - We have a requirement for compute resources and need that to be fullfiled by a service.
        - Pre-selected ASG and shape sizes to create the nodes
        - Strip the middle layers that translate the requirements and just ask for what we need.
        - In cases when ASGs are not well pre thought out, CA is limited with the options available, whereas, Karpenter can make these decisions about the shape to select
- [Nathan] ASG wasn't built with the Kubernetes use case and sometimes works well and sometimes doesn't
- [Ellis] Allocator/ De-allocator model, dual controllers constantly provisioning new nodes for more capacity and removing under utilized nodes.
- [Guy] Dedicated node groups, taint ASGs, CA scales those up ASGs, can karpenter do it?
    - [Ellis] When a pod has label and tolerations, we can create specific nodes with those labels and taints
- [Guy] Spot instances - how will that work with this model?
    - We have dedicated node groups for istio gateways, rest is all spot.
- [Guy] CA and de-scheduler don't work nice with each other
- [Ellis] CA has 2 steps of configurations- ASGs and pods
- [Guy] Nicer approach, worry is how flexible that approach is? Seems like a very Google like approach of doing things with auto-provisioner.
    - [Ellis] - Configuring every single pod with a label is a lot of work, compared to having taints at capacity.
- [Ellis] Provisioning and scheduling decisions-
    - CA emulates scheduling and now karpenter knows instanceID
    - We create a node object in Kubernetes and immediately bind the pod to the node and when the node becomes ready, pod image gets pulled and runs.
    - Kube-scheduler is bypassed in this approach
    - Simulations effort is not used when actual bin-packing is done by Kube-scheduler
    - [Guy] Interesting approach, definetly sold on pod topology routing, can see benefits with bin-packing compared to guessing.
        - You might end up more closely packed compared to the scheduler
    - [Ellis] Scoring doesn't matter anymore because we don't have a set of nodes to select from
    - [Subhu] How does node ready failure will be handled?
        - Controller has node IDs and constantly compares with cloud provider nodes
    - [Ellis] Bin packing is very cloud provider specific
- [Ellis] Spot termination happens when you get an event, de-allocator can be checking for pricing and improve costs with Spot.
- [Guy] Kops based instances are checking for health and draining nodes. Rebalance Recommendations are already handled by an internal KOPS at Skyscanner

### In scope for Karpenter
- Pid Controller
- Upgrades
- Handle EC2 Instance Failures

# Meeting notes (01/19/21)

## Attendees:
- Ellis Tarn
- Jacob Gabrielson
- Subhrangshu Kumar Sarkar
- Prateek Gogia
- Nick Tran
- Brandon Wagner
- Guy Templeton

## Notes:
- [Ellis] Conversation with Joe Burnett from sig-autoscaling
    - HPA should work with scalable node group, as long you use an external metrics.
    - POC is possible working with HPA
- [Ellis] Nick has made good progress in terms of API for scheduled scaling.
    - Design review in upcoming weeks with the community.
- Change the meeting time to Thursday @9AM PT biweekly.

# Meeting Notes (01/12/2021)

## Attendees:
- Ellis Tarn
- Jacob Gabrielson
- Subhrangshu Kumar Sarkar
- Prateek Gogia
- Micah Hausler
- Viji Sarathy
- Shreyas Srinivasan
- Jeremy Cowan
- Guy Templeton

## Discussions
- [Ellis] What are some common use cases for horizontal autoscaling like node auto-scaling?
    - We have 2 metrics producer so far, SQS queue and utilization.
    - Two are in pipeline, cron scheduling and pending pod metrics producers.
- [Jeremy] Have we looked at predictive scaling, analysing metrics overtime and scaling based on history?
    - [Ellis] We are a little far from that, no work started on that yet
- [Viji] How can we pull cloudwatch metrics to Karpenter?
    - [Ellis] We could have a cloud provider model to start with, to add cloudwatch support in horizontal autoscaler
    - Other way would be external metrics API, you get one per cluster, creates problems within the ecosystem.
    - [Viji] CP model pulls the metrics from the cloudwatch APIs and puts in the autoscaler?
        - [Ellis] User would add info in the karpenter spec and an AWS client will try to load the metrics.
        - External metrics API is easy, user has to figure how to configure with cloudwatch API.
        - Universal metrics adapter supporting all the providers and prometheus.
- [Guy] Reg. external metrics API, there is a [proposal](https://github.com/kubernetes-sigs/custom-metrics-apiserver/issues/70) open in the community
    - Custom cloud provider over gRPC [proposal](https://github.com/kubernetes/autoscaler/pull/3140)
- [Guy] Kops did something similar to what Ellis proposed.
- [Subhu] Are we going to support Pod Disruption Budget(PDB) or managed node groups (MNG) equivalent with other providers?
    - [Ellis] karpenter will increase/decrease the number of nodes, someone needs to know which nodes to remove respecting the PDB.
    - CA knows which nodes to scaled down it uses PDB.
    - Node group is the right component deciding which node will not be violating PDB.
- [Guy] Other providers are rellying on PDB in CA for this support. It will be to good discuss with cluster API.
- [Ellis] We might have to support PDB if other providers don't support PDB in node group controllers to maintain neutrality.
- [Viji] Will try to get Karpenter installed and will look into cloudwatch integration.
- [Ellis] Looking to get feedback for installing Karpenter [demo](https://github.com/ellistarn/karpenter-aws-demo)
- [Ellis] Separate sync to discuss pending pods approach in Karpenter
    - [Guy] Space for something less complex as compared to CA, there has been an explosion of flags in CA.

# Meeting Notes (12/4/2020)

## Attendees
@ellistarn
@prateekgogia
@gjtempleton
@shreyas87

## Notes:
-  [Ellis] Shared background
-  [Guy] Cloudwatch metrics, ECS scaling using cloudwatch metrics for autoscaling.
-  [Guy] Karpenter supporting generic cloudwatch metrics?
-  [Guy] Node autoscaling is supported?
-  [Ellis] Cloud provider like model for cloudwatch, provider model exists in scalable node group side.
-  [Ellis] Cloudwatch could support Prometheus API?
-  [Ellis] We can have a direct cloudwatch integration and later refine it?
-  [Guy] Implementing a generic cloud provider in core in CA.
-  [Ellis]  Will explore integration with cloudwatch directly, prefered will be coud provider model.
-  [Guy] Contributions- People in squad will be interested, open to contribute features if it provides value to the team.
-  [Guy] Scaling on non-pending pods and other resources, people have been asking. Karpenter looks promising for these aspects.
-  [Ellis] - Long term goal, upstream project as an alternative. As open as possible and vendor neutral.
-  [Guy] - There is a space for an alternative, given the history CA works around pending pods. Wider adoption possible if mature.
-  [Ellis] - Landing point will be sig-autoscaling.
-  [Guy] - CA lacks cron scheduling scaling.
-  [Ellis] - pending pods are a big requirements.
-  [Prateek] - introduced the pending pods producer proposal.
-  [Ellis] - Move time earlier by an hour and change day to Thursday, create a GH issue to get feedback what time works?

repository: marceloboeira/karpenter

repo_name: marceloboeira/karpenter


text:
# SmartMirror-Facerecognition
[MagicMirror²](https://github.com/MichMich/MagicMirror) module for face recognition. This module shall be optimized with the [LEGaTO](https://legato-project.eu/) toolkit for energy efficiency.
Uses the camera stream of the [SmartMirror-Camera-Publisher](https://github.com/LEGaTO-SmartMirror/SmartMirror-Camera-Publisher), which creates a appsink under /tmp/camera_image_1m .
It returns a json object with the position, tracking id, id, confidence, and name of each detected Face to the scope "DETECTED_FACES".

# Requirements
- CUDA (9.1)
- TensorFlow
- scikit-learn

(only tested with ubuntu 16.04)

# Face Recognition Trial
To try out the face recognition simply start the python script **/facerecognition/start_recognition_webcam.py**

# Structure of the TensorFlow Face Recognition

## Pipeline
Image -> FaceDetection -> CroppedFace -> FaceRecognition -> Descriptor(128D) -> FaceClassifier -> Name

## FaceDetection(mobilenetSSD)
A mobilenet SSD(single shot multibox detector) based face detector with pretrained model provided.
Ref. [https://github.com/yeephycho/tensorflow-face-detection](https://github.com/yeephycho/tensorflow-face-detection)

## FaceRecognition(FaceNet)
TensorFlow implementation of the face recognizer described in the paper "FaceNet: A Unified Embedding for Face Recognition and Clustering".
Ref. [https://github.com/davidsandberg/facenet](https://github.com/davidsandberg/facenet)

## FaceClassification(kNN, SVM)
Classify the features generated by FaceNet with kNN or SVM.

# Example of the json object:

{"DETECTED_FACES": [{"TrackID": 1.0, "center": [0.12593, 0.7125], "name": "Nils", "w_h": [0.2463, 0.15417], "confidence": "0.86", "ID": 4 }]}

## ACKNOWLEDGEMENT

This work has been supported by EU H2020 ICT project LEGaTO, contract #780681 .


text:
#EITF05 - Web Security - Project
A webshop was implemented using PHP 5.4, Bootstrap 3 and MySql

<img src='https://github.com/ada10fl2/EITF05_ProjectWebshop/raw/master/screen.png' width='400px' >

## Assignment
http://www.eit.lth.se/fileadmin/eit/courses/eitf05/project/webshop.pdf

## Final Report
https://github.com/ada10fl2/EITF05_ProjectWebshop/raw/master/report.pdf

## Configuration
See further details in the report above

### PHP
Run `nano /etc/php.ini`
```
# Set session store to be outside of the www-root
session.save_path="/var/lib/php/session"

# Set the file upload to be outside of the www-root
upload_tmp_dir="/var/lib/php/session"
```

### Apache
Run `nano /etc/php.d/secutity.ini`
```
# Dont leak information
expose_php=Off
display_errors=Off
file_uploads=Off
log_errors=On
error_log=/var/log/httpd/php_scripts_error.log

# Disable remote code fetching
allow_url_fopen=Off
allow_url_include=Off

# Ineffective and not very robust
# mysql_escape_string() and custom filtering functions serve a better purpose
magic_quotes_gpc=Off

# Attackers may attempt to send oversized POST requests to eat your system resources
post_max_size=2K

# set in seconds
max_execution_time =  10
max_input_time = 30
memory_limit = 40M

# Disable all dangerous php functions
disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source

# PHP scripts are able to access files only when their owner is the owner of the PHP scripts
safe_mode = On
safe_mode_gid = Off

# Allow safemode to open/execute files only in specified directories
open_basedir = directory[:...]
safe_mode_exec_dir = directory[:...]
```

## `www-root` (production only)
```
# Make sure path is outside /var/www/html and not readable or writeable by any other system users:
run:
	ls -Z /var/lib/php/
expect:
	drwxrwx---. root apache system_u:object_r:httpd_var_run_t:s0 session

# Make sure you run Apache as a non-root user such as Apache or www
chown -R apache:apache /var/www/html/
chmod -R 0444 /var/www/html/

# Ensure all directories permissions are set to 0445
find /var/www/html/ -type d -print0 | xargs -0 -I {} chmod 0445 {}

# Write protect configuration files
chattr +i /etc/php.ini
chattr +i /etc/php.d/*
chattr +i /etc/my.ini
chattr +i /etc/httpd/conf/httpd.conf
chattr +i /etc/
chattr +i /var/www/html/
```


text:
---
layout: post
title: Leetcode 400 - Nth Digit
bigimg: /img/image-header/yourself.jpeg
tags: [Binary Search]
---

## Table of contents
- [Given problem](#given-problem)
- [Using brute force algorithm](#using-brute-force-algorithm)
- [Using Binary Search algorithm](#using-binary-search-algorithm)
- [Wrapping up](#wrapping-up)

## Given problem

Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...

Note:
n is positive and will fit within the range of a 32-bit signed integer (n < 231).

```java
Example 1:
    Input: 3
    Output: 3

Example 2:
    Input: 11
    Output: 0
    Explanation:
        The 11th digit of the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... is a 0, which is part of the number 10.
```

## Using brute force algorithm

We always to start with the brute force algorithm to iterate all cases of this problem.

```java
class Solution {
    public int findNthDigit(int n) {
        int currentLength = 0;

        for (int i = 1; i < Integer.MAX_VALUE; ++i) {
            String value = String.valueOf(i);

            if (currentLength + value.length() >= n) {
                int len = 0;
                while (len < value.length()) {
                    ++currentLength;
                    if (currentLength == n) {
                        return Character.digit(value.charAt(len), 10);
                    }

                    ++len;
                }
            }

            currentLength += value.length();
        }

        return -1;
    }
}
```

Using this solution, LeetCode platform throws Time Limit Exceed cases. So we need to find the other solution.

The complexity of this solution:
- Time complexity: O(n)
- Space complexity: O(1)

## Using Binary Search algorithm

To optimize this problem, we can use the Binary Search algorithm because with this problem, there are some reasons that we need to take care:
-
-
-

```java

```

The complexity of this solution:
- Time complexity:
- Space complexity:

## Wrapping up

- Understanding how to use Binary Search algorithm to deal with our problems.

Refer:

[https://leetcode.com/problems/nth-digit/](https://leetcode.com/problems/nth-digit/)


text:
# About

A dictionary (`dict`) is a [mapping type][mapping-types-dict] data structure that associates [hashable][term-hashable] `keys` to `values` -- known in other programming languages as a resizable [hash table or hashmap][hashtable-wikipedia].
  `Keys` can include `numbers`, `str`, `tuples` (of _immutable_ values), or `frozensets`, but must be hashable and unique across the dictionary.
  `keys` are _immutable_ - once added to a `dict`, they can only be removed, they cannot be updated.
  `values` can be of any or multiple data type(s) or structures, including other dictionaries, built-in types, custom types, or even objects like functions or classes.
   `values` associated with any `key` are _mutable_, and can be replaced, updated or altered as long as the `key` entry exists.
  Dictionaries enable the retrieval of a `value` in (on average) constant O(1) time, given the `key`.

  Compared to searching for a value within a `list` or `array` (_without knowing the `index` position_), a `dict` uses significantly more space in memory, but has significantly more rapid retrieval.
 Dictionaries are especially useful in scenarios where the collection of items is large and must be accessed and/or updated frequently.

## Dictionary creation

A simple `dict` can be declared using the literal form `{<key_1>: <value_1>, <key_2>: <value_2>}`:

 ```python

```

 The dictionary  constructor `dict(<key_1>=<value_1>, <key_2>=<value_2>)`, but there are many more ways of creating and initializing dictionaries including the use of a _dict comprehension_ or passing additional constructor parameters as illustrated in the [Python docs][mapping-types-dict].

Inserting a new `key`:`value` pair can be done with `dict[key] = value` and the value can be retrieved by using `retrieved_value = dict[key]`.

## Methods

`dicts` implement various methods to allow easy initialization, updating and viewing.

Some useful `dict` methods:

- Retrieve a value "safely" from a dictionary by using the `.get(key, [default])` method. `.get(key, [default])` returns the value for the key **or** the _default value_ if the key is not found, instead of raising a `KeyError`. This works well in situations where you would rather not have extra error handling but cannot trust that a looked-for key will be present.
- Retrieve a value "safely" or insert a default _value_ if the key is not found using the `.setdefault(key, [default])` method. `setdefault(key, [default])` will insert the default value in the dictionary **only** if the key is not found, then it will retrieve either the **newly inserted** default value if the key was not found or the **unchanged** existing value if the key was found.
- Return various _iterable_ views of your `dict` with `.keys()`, `.values()`, `.items()` (_an iterable of (key, value) `tuples`_).

For a detailed explanation of dictionaries in Python, the [official documentation][dicts-docs] is an excellent starting place, or you can also check out the [W3-Schools][how-to-dicts] tutorial.

## Extending Dictionaries: The collections module

The [`collections`][collections-docs] module adds more functionality to Python's standard collection-based datatypes (`dictionary`, `set`, `list`, `tuple`). A popular `dict`-oriented member of this module is the [`Counter`][counter-dicts], which automatically counts items and returns them a `dict` with the items as keys and their counts as values. There is also the [`OrderedDict`][ordered-dicts-docs], which has methods specialized for re-arranging the order of a dictionary. Finally, there is the [`defaultdict`][default-dicts], a subclass of the built-in `dict` module that, based on a factory method, sets a default value if a key is not found when trying to retrieve or assign the value.

[term-hashable]: https://docs.python.org/3/glossary.html#term-hashable
[hashtable-wikipedia]: https://en.wikipedia.org/wiki/Hash_table
[mapping-types-dict]: https://docs.python.org/3/library/stdtypes.html#mapping-types-dict
[dicts-docs]: https://docs.python.org/3/tutorial/datastructures.html#dictionaries
[how-to-dicts]: https://www.w3schools.com/python/python_dictionaries.asp
[collections-docs]: https://docs.python.org/3/library/collections.html
[counter-dicts]: https://docs.python.org/3/library/collections.html#collections.Counter
[ordered-dicts-docs]: https://docs.python.org/3/library/collections.html#collections.OrderedDict
[default-dicts]: https://docs.python.org/2/library/collections.html#collections.defaultdict

repository: wonhyeongseo/python

repo_name: wonhyeongseo/python


text:
## What is this?

This repository contains the slides for a talk given at a [Cincinnati JavaScript User Group meetup](https://www.meetup.com/Cincinnati-Javascript-User-Group/events/234407546/).

## Build

The slides are built using [assemble](https://github.com/assemble/assemble). Run the following command to build the slides into the `_gh_pages` folder:

```bash
$ assemble
```

## Dev

To create a [browser-sync](http://www.browsersync.io/) server and watch the files for changes during development, run the following command:

```bash
$ assemble dev
```

## Deploy

To publish the slides to Github Pages, run the following command:

```bash
$ assemble deploy
```


text:
# Samplify.io API wrapper

[![Version](https://img.shields.io/npm/v/samplify.svg)](https://www.npmjs.org/package/samplify)
[![Downloads](https://img.shields.io/npm/dm/samplify.svg)](https://www.npmjs.com/package/samplify)

## Installation

Install the package with:

    npm install samplify --save

repository: samplifyio/samplify-node

repo_name: samplifyio/samplify-node


text:
## The UiAutomator2 Driver for Android

Appium's flagship support for automating Android apps is via the `UiAutomator2`
driver.  _(New to Appium? Read our [introduction to Appium drivers](#TODO))_.
This driver leverages Google's
[UiAutomator2](https://developer.android.com/training/testing/ui-automator.html)
technology to facilitate automation on a device or emulator.

Development of the UiAutomator2 driver happens at the
[appium-uiautomator2-driver](https://github.com/appium/appium-uiautomator2-driver)
repo.

Older Android-based drivers include:
* The [UiAutomator Driver](/docs/en/drivers/android-uiautomator.md)

### Requirements and Support

In addition to Appium's general requirements:

* Java 8 installed and configured correctly for your platform
* Mac, Windows, or Linux OS with the ability to run the Android SDK

Further, the UiAutomator2 driver does not support Android versions below 5.0
(Lollipop, API level 21). If you are automating such versions, consider using
the [UiAutomator driver](/docs/en/drivers/android-uiautomator.md);

### Usage

The way to start a session using the UiAutomator2 driver is to include the
`automationName` [capability](#TODO) in your [new session request](#TODO), with
the value `UiAutomator2`. Of course, you must also include appropriate
`platformName` (=`Android`), `platformVersion`, `deviceName`, and `app`
capabilities, at a minimum.

It is highly recommended to also set the `appPackage` and `appActivity`
capabilities in order to let Appium know exactly which package and activity
should be launched for your application. Otherwise, Appium will try to
determine these automatically from your app manifest.

### Capabilities

The UiAutomator2 driver supports a number of standard [Appium
capabilities](/docs/en/writing-running-appium/caps.md), but has an additional
set of capabilities that modulate the behavior of the driver. These can be
found currently at the [Android
section](/docs/en/writing-running-appium/caps.md#android-only) of the
aforementioned doc.

For web tests, to automate Chrome instead of your own application, leave the
`app` capability empty and instead set the `browserName` capability to
`Chrome`. Note that you are responsible for ensuring that Chrome is on the
emulator/device, and that it is of a [version compatible with
Chromedriver](/docs/en/writing-running-appium/web/chromedriver.md).

### Commands

To see the various commands Appium supports, and specifically for information
on how the commands map to behaviors for the UiAutomator2 driver, see the [API
Reference](#TODO).

### Basic Setup

1. Ensure that you have Appium's general dependencies (e.g., Node
   & NPM) installed and configured.

1. Ensure that Java (the JDK, not just the JRE) is installed and Java binaries
   are added to your path. The instructions for this step differ for Mac/Linux
   and for Windows. Please consult platform-specific documentation, as this is
   a common task. An example of how to change the PATH on Windows is
   [here](https://www.java.com/en/download/help/path.xml).

1. Ensure that the `JAVA_HOME` environment variable is also set to the JDK
   path. For Mac/Linux, for example (the specifics of this path will vary
   greatly by system), put this in your login script:

    ```
    export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home"
    ```

   On Windows, this will be done by setting the environment variable in the
   control panel, using the same strategy as for setting PATH above.
   [Android Studio](https://developer.android.com/studio/index.html) also has JDK
   in the path like `/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home` (Mac).
   You can specify the path, too.

1. Install the [Android SDK](http://developer.android.com/sdk/index.html). The
   supported way of doing this nowadays is to use [Android
   Studio](https://developer.android.com/studio/index.html). Use the provided
   GUI to install the Android SDK to a path of your choosing.

1. Set the `ANDROID_HOME` environment variable to match this path. For example,
   if you installed the SDK to `/usr/local/adt`, then there will typically be
   a `sdk` folder inside of that which contains the SDK files. In that case, on
   Mac and Linux, add the following line to your login script (e.g.,
   `~/.bashrc`, `~/.bash_profile`, etc...):

    ```
    export ANDROID_HOME="/usr/local/adt/sdk"
    ```

   On Windows, follow the same steps as before to set the environment variable
   in the control panel.

1. Using the SDK manager, ensure you have installed the SDK for Android API
   levels you wish to automate (e.g., 24).

1. On Windows, ensure that you always run Appium in Administrator mode.

At this point, your general system setup is done. Follow the steps below based
on whether you want to automate an emulator or a real device. In addition you
will need your app's APK (preferably built in Debug mode), whose path or URL
you will use as the value of the `app` capability when running your tests.

### Emulator Setup

To run tests on emulators, use the AVD Manager included with Android Studio or
the SDK. With this tool, create the emulator that matches your needs. With the
emulator launched, Appium will automatically find and use it for its tests.
Otherwise, if you specify the `avd` capability with the value matching the name
of your emulator, then Appium will attempt to launch the emulator for you.

Additional tips for emulators:

* There exists a hardware accelerated emulator for Android, though it has its
  own limitations. It can be installed from Intel's website, or through the
  Android SDK Manager. For more information, go
  [here](https://github.com/intel/haxm).
* Make sure that `hw.battery=yes` in your AVD's `config.ini`, if you want to
  run any of the Appium tests, or use any of the power commands. (As of Android
  5.0, this is the default.)

### Real Device Setup

For Android automation, no additional setup is required for testing on real
devices, other than these simple requirements:

* Ensure that [Developer
  mode](https://developer.android.com/studio/debug/dev-options.html) is turned
  on for the device.
* Ensure that the device is connected via USB to the Appium host, and can be
  seen by [ADB](https://developer.android.com/studio/command-line/adb.html)
  (run `adb devices` to make sure).
* Ensure that "Verify Apps" in settings is disabled, to allow Appium's helper
  apps to function without manual intervention.

(For some specific commands, the device might need to be rooted, though this is
not the norm.)

repository: testerhome/appium

repo_name: testerhome/appium


text:
---
id: get-document-info
url: watermark/net/get-document-info
title: Get document info
weight: 1
description: ""
keywords:
productName: GroupDocs.Watermark for .NET
hideChildren: True
---
GroupDocs.Watermark allows to get document information which includes:

* [FileType](https://apireference.groupdocs.com/net/watermark/groupdocs.watermark.common/idocumentinfo/properties/filetype)
* [PageCount](https://apireference.groupdocs.com/net/watermark/groupdocs.watermark.common/idocumentinfo/properties/pagecount)
* [Size](https://apireference.groupdocs.com/net/watermark/groupdocs.watermark.common/idocumentinfo/properties/size)
* [IsEncrypted](https://apireference.groupdocs.com/net/watermark/groupdocs.watermark.common/idocumentinfo/properties/isencrypted)

The following code samples demonstrate how to get document information.

## Get document information from a file from local disk

This example demostrates how to get document information from the local file.

**BasicUsage.GetDocumentInfoForTheFileFromLocalDisk**

```csharp
// Constants.InSourceDocx is an absolute or relative path to your document. Ex: @"C:\Docs\source.docx"
using (Watermarker watermarker = new Watermarker(Constants.InSourceDocx))
{
    IDocumentInfo info = watermarker.GetDocumentInfo();
    Console.WriteLine("File type: {0}", info.FileType);
    Console.WriteLine("Number of pages: {0}", info.PageCount);
    Console.WriteLine("Document size: {0} bytes", info.Size);
}
```

## Get document information from a stream

This example demonstrates how to get document information from the file stream.

**BasicUsage.GetDocumentInfoForTheFileFromStream**

```csharp
// Constants.InSourceDocx is an absolute or relative path to your document. Ex: @"C:\Docs\source.docx"
using (FileStream stream = File.OpenRead(Constants.InSourceDocx))
{
    using (Watermarker watermarker = new Watermarker(stream))
    {
        IDocumentInfo info = watermarker.GetDocumentInfo();
        Console.WriteLine("File type: {0}", info.FileType);
        Console.WriteLine("Number of pages: {0}", info.PageCount);
        Console.WriteLine("Document size: {0} bytes", info.Size);
    }
}
```

## More resources

### Advanced usage topics

To learn more about document watermarking features and get familiar how to manage watermarks and more, please refer to the [advanced usage section]({{< ref "watermark/net/developer-guide/advanced-usage/_index.md" >}}).

### GitHub examples

You may easily run the code above and see the feature in action in our GitHub examples:

* [GroupDocs.Watermark for .NET examples](https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET)
* [GroupDocs.Watermark for Java examples](https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-Java)

### Free online document watermarking App

Along with full featured .NET library we provide simple, but powerful free Apps.

You are welcome to add watermark to PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX, Emails and more with our free online [Free Online Document Watermarking App](https://products.groupdocs.app/watermark).


text:
# v3.8.2

## Summary

This is a patch release that corrects the URL for builds shown in the examples.  Details below.

 * [#3979](https://github.com/openlayers/ol3/pull/3979) - Fix URLs for openlayers.org resources. ([@tschaub](https://github.com/tschaub))


text:
# traefik-opa-plugin ![Build](https://github.com/team-carepay/traefik-opa-plugin/workflows/build/badge.svg)
Traefik plugin which connects to Open Policy Agent

This plugin can be used to validate requests before they reach the backend. The Open Policy Agent is a server which can be used to enforce any policy. Although OPA is a swiss army-knife, in this use-case we're going to use it to verify that a user has the required permissions to access the backend resource.

```puml
@startuml
actor User
User -right-> [LoadBalancer]
User <-right- [LoadBalancer]
[LoadBalancer] -right-> [Traefik]
[LoadBalancer] <-right- [Traefik]
[Traefik] -down-> [OPA]
[Traefik] <-down- [OPA]
[Traefik] -right-> [MicroService]
[Traefik] <-right- [MicroService]
@enduml
```

## Installation
The plugin needs to be configured in the Traefik static configuration before it can be used.
### Installation with Helm
The following snippet can be used as an example for the values.yaml file:
```values.yaml
pilot:
  enabled: true
  token: xxxxx-xxxx-xxxx

experimental:
  plugins:
    enabled: true

additionalArguments:
- --experimental.plugins.opa.moduleName=github.com/team-carepay/traefik-opa-plugin
- --experimental.plugins.opa.version=v0.0.3
```

### Installation via command line
```
traefik \
  --experimental.pilot.token=xxxx-xxxx-xxx \
  --experimental.plugins.opa.moduleName=github.com/team-carepay/traefik-opa-plugin \
  --experimental.plugins.opa.version=v0.0.3
```

## Configuration
The plugin currently supports the following configuration settings:
Name | Description
--- | ---
URL | The complete URL (including path) for the OPA data AP (e.g. `http://opa:8181/v1/data/example`)
AllowField | The field-name in the JSON result. This needs to be a boolean, indicating whether the request is allowed.

## Example configuration
This example uses Kubernetes Custom Resource Descriptors (CRD) :
```
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: opa
spec:
  plugin:
    opa:
      URL: http://opa:8181/v1/data/example
      AllowField: allow
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test-server
  labels:
    app: test-server
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/router.middlewares: default-opa@kubernetescrd

```

For a complete example how to use the middleware in a project, see [example app](deployment/local/example-app/)

## JSON input payload
The plugin will translate the HTTP request (including headers and parameters) and forwards the payload as JSON to OPA. For example, the following URL: `http://localhost/api/path?param1=foo&param2=bar` will result in the following payload (headers are reduced for readability):

```
{
    "headers": {
      "Accept-Encoding": [
        "gzip, deflate, br"
      ],
      "X-Forwarded-Host": [
        "localhost"
      ],
      "X-Forwarded-Port": [
        "80"
      ],
      "X-Forwarded-Proto": [
        "http"
      ],
      "X-Forwarded-Server": [
        "traefik-84c77c5547-sm2cb"
      ],
      "X-Real-Ip": [
        "<IP_ADDRESS>"
      ]
    },
    "host": "localhost",
    "method": "GET",
    "parameters": {
      "param1": [
        "foo"
      ],
      "param2": [
        "bar"
      ]
    },
    "path": [
      "api",
      "path"
    ]
  }
```

## Example policy
The policies you enforce can be as complex or simple as you prefer. For example, the policy could decode the JWT token and verify the token is valid and has not expired, and that the user has the required claims in the token.

The policy below shows an simplified example:
```
package example

default allow = false

allow {
	input.method = "GET"
	input.path[0] = "public"
}

allow {
	input.method = "GET"
	input.path = [ "secure", i ]
  has_token([ "123", "456"])
}

has_token(tokens) {
    input.path[1] = tokens[i]
}
```
In the above example, requesting `/public/anything` or `/secure/123` is allowed, however requesting `/secure/xxx` would be rejected and results in a 403 Forbidden.

## License
This software is released under the Apache 2.0 License

repository: lapnd/traefik-opa-plugin

repo_name: lapnd/traefik-opa-plugin


text:
# Generators

[![Downloads](https://pepy.tech/badge/generators)](https://pepy.tech/project/generators)
[![Downloads](https://pepy.tech/badge/generators/month)](https://pepy.tech/project/generators)
[![Downloads](https://pepy.tech/badge/generators/week)](https://pepy.tech/project/generators)

High performance pipeline processing in python.

## How to install it?

```
pip install generators
```

## What is Generators?

`generators` is one of the best libraries for high performance pure python pipeline processing.

## Can we have some examples?

### Easy Applications

Each of these scripts took 5-10 minutes a piece to write and show how flexible the generators library is.

- [parse_local_dns.py](https://github.com/CodyKochmann/generators/blob/master/examples/parse_local_dns.py) - generate a dict of host:ip pairs from parsing /etc/hosts
- [scrape_urls.py](https://github.com/CodyKochmann/generators/blob/master/examples/scrape_urls.py) - parse html to extract all urls from a webpage with no scraping libraries
- [tail.py](https://github.com/CodyKochmann/generators/blob/master/examples/tail.py) - lightweight iterator that `tail`s a file just like in bash

### Easy Snippets

#### Streaming Math Operations

rolling average

```python
In [1]: from statistics import mean

In [2]: from generators import Generator as G

In [3]: G(range(10)).window(5).map(mean).to(list)
Out[3]: [2, 3, 4, 5, 6, 7]

In [4]: # use print to see whats going through the pipe

In [5]: G(range(10)).window(5).print('window ').map(mean).print('avg ').to(list)
window (0, 1, 2, 3, 4)
avg 2
window (1, 2, 3, 4, 5)
avg 3
window (2, 3, 4, 5, 6)
avg 4
window (3, 4, 5, 6, 7)
avg 5
window (4, 5, 6, 7, 8)
avg 6
window (5, 6, 7, 8, 9)
avg 7
Out[5]: [2, 3, 4, 5, 6, 7]
```

rolling average of an infinite stream

```python
In [1]: from itertools import count

In [2]: from statistics import mean

In [3]: from generators import G  # G is aliased for Generator internally for shorter import

In [4]: G(count()).window(5).print().map(mean).print().first(3).run()
(0, 1, 2, 3, 4)
2
(1, 2, 3, 4, 5)
3
(2, 3, 4, 5, 6)
4
```

#### File Processing

log parsing

```python
In [1]: from generators import G

In [2]: G(  # open the main system log file for reading
   ...:     open('/var/log/messages', 'r')
   ...: ).map(  # strip trailing whitespaces from each line
   ...:     str.strip
   ...: ).filter(  # filter for lines with the term 'Xbox'
   ...:     lambda line: 'Xbox' in line
   ...: ).last(  # only return the last 5 filtered lines
   ...:     5
   ...: ).to(list)  # return the result as a list
Out[2]:
['Dec 31 13:59:59 gate local7.info dhcpd: DHCPACK on <IP_ADDRESS> to 2c:54:91:bb:1e:15 (XboxOne) via eth1',
 'Dec 31 13:59:59 gate local7.info dhcpd: DHCPREQUEST for <IP_ADDRESS> from 2c:54:91:bb:1e:15 (XboxOne) via eth1',
 'Dec 31 13:59:59 gate local7.info dhcpd: DHCPACK on <IP_ADDRESS> to 2c:54:91:bb:1e:15 (XboxOne) via eth1',
 'Dec 31 13:59:59 gate local7.info dhcpd: DHCPREQUEST for <IP_ADDRESS> from 2c:54:91:bb:1e:15 (XboxOne) via eth1',
 'Dec 31 13:59:59 gate local7.info dhcpd: DHCPACK on <IP_ADDRESS> to 2c:54:91:bb:1e:15 (XboxOne) via eth1']
```

random number generation

```python
In [1]: from generators import G, read

In [2]: random_ints = G(
    ...:     # open /dev/urandom as a byte stream to read random bytes in
    ...:     read('/dev/urandom', mode='rb', record_size=1)
    ...: ).map(
    ...:     # convert the bytes to ints
    ...:     lambda i: int.from_bytes(i, 'little')
    ...: )

In [3]: next(random_ints)
Out[3]: 186

In [4]: next(random_ints)
Out[4]: 235

In [5]: # if we need to manipulate the stream further we still can

In [6]: random_int_chunks = random_ints.chunk(4)

In [7]: next(random_int_chunks)
Out[7]: (235, 255, 170, 135)

In [8]: next(random_int_chunks)
Out[8]: (132, 56, 22, 170)

In [9]: random_int_chunks.map(sum).first(8).to(list)
Out[9]: [649, 710, 294, 699, 550, 581, 561, 726]

In [10]: random_ints.print().accumulate().first(10).to(list)
74
236
106
194
35
45
105
108
38
65
Out[10]: [74, 310, 416, 610, 645, 690, 795, 903, 941, 1006]

In [11]: # this also makes it easy to analyze infinite streams

In [12]: random_ints.first(10000).to(max)
Out[12]: 255

In [13]: random_ints.first(10000).to(min)
Out[13]: 0
```

### Benchmarking

```python
In [1]: from generators import G

In [2]: from itertools import cycle

In [3]: # .benchmark() can be used to return how many iterations
        # a pipeline can run per second
        #
        # this is more useful for generators than timeit because
        # full stream applications should be measured by how many
        # tasks they can run through before becoming overloaded
        # to determine if the pipeline is fast enough for your
        # company's needs.

In [4]: G(cycle(range(10))).benchmark()
Out[4]: 4805936

In [5]: G(cycle(range(10))).map(float).benchmark()
Out[5]: 2740246

In [6]: G(cycle(range(10))).map(float).filter(lambda i: i%2 == 1).benchmark()
Out[6]: 792458
```

repository: siddharthakkapatruni/generators

repo_name: siddharthakkapatruni/generators


text:
# Origo server configuration

### Basic configuration
The configuration of Origo server are split in to two files conf/config.js and conf/dbconfig.js

Both files are a text that makes up a json object. The difference is that dbconfig.js concerns anything that is related to database and config.js contains the other services which is not directly a database.

Since the text in conf/config.js and conf/dbconfig.js are parsed to a JSON object it's important that it is correct JSON syntax in the text otherwise it will fail.

### Configuration options
Configuration explained for the following services:

- ConvertToGeojson - translates a none standard json to GeoJSON FeatureCollection.

		converts - an array which holds one or more configurations of objects that is to be converted.

		name - a unique name for the converting which is used to call on it from the front end.

		url - the url to the JSON which is to be converted.

		title - the title that is used as name in the GeoJSON FeatureCollection.

		arrayOfObjects - the name of the array object in the JSON that holds the objects that is to be converted.

		geometry - the name of the object in the JSON that holds the obects geometry.

		geometry_type - the type of the geometry, values can be Point, LineString, Polygon, MultiPoint, MultiLineString, and MultiPolygon.

		geometry_format - the format of the geometry, values can for now be Array or GeometryCollections.

		properties - an array with the names of the objects which should be transferred into properties of the feature in the GeoJSON.

		encoding - the charcter encoding of the JSON if not the standard for GeoJSON which is UTF-8, UTF-16, or UTF-32. Is only needed if encoding isn't UTF-8, UTF-16, or UTF-32 otherwise it's optional.

- IoTProxy - translates data in NGSI-LD standard to GeoJSON FeatureCollection.

If you have data from IoT sensors in NGSI-LD standard and want to read it directly in Origo as a GeoJSON use this service to setup a translation. Read more about NGSI-LD in [NGSI-LD FAQ](https://fiware-datamodels.readthedocs.io/en/latest/ngsi-ld_faq/index.html)

		services - an array which holds one or more configurations of type of sensor data to be retrieved.

		name - a unique name for the service which is used to call on it from the front end.

		url - the url to the JSON which is to be converted.

		title - the title that is used as name in the GeoJSON FeatureCollection.

		properties - an array with the names of the objects which should be transferred into properties of the feature in the GeoJSON.

- Overpass - get data from OpenStreetMap through the Overpass API.

A typical query can be to get all nodes tagged with some key within a area limited by a bounding box. Test your queries in [overpass turbo](https://overpass-turbo.eu/) Read more about [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API) Uses the module [query-overpass](https://github.com/perliedman/query-overpass)

		queries - an array which holds one or more query objects that retrieves data from OpenStreetMap.

		name - a unique name for the query which is used to call on it from the front end.

		query - a overpass query which is passed to the API. Test the query in overpass turbo and make sure it's on a single row in the config. Limited support for complex queries.

		title - the title that is used as name in the GeoJSON FeatureCollection.

		options - optional options to be set which currently is overpassUrl and flatProperties

- Trafikverket API - get data from Trafikverket API.

To use the API you must have a authentication key, which can be obtained by registration on [Trafikverkets öppna API](https://api.trafikinfo.trafikverket.se/) or [Trafiklab API](https://www.trafiklab.se/api)

		services - an array which holds one or more configurations of questions that is to be executed.

		name - a unique name for the service which is used to call on it from the front end.

		url - the url to the API.

		title - the title that is used as name in the GeoJSON FeatureCollection.

		query - a query that is accepted by the Trafikverket API in XML-format inclusive the authentication key.

		type - the object type of the response, currently only Siuation is implemented.

- Authorization with openID

An openID connect provider is required for this to work.

		openidIssuer - url to openID well-known configuration

		redirect_uri - url to where the response to the request should be sent, after the user signs in. Must be the same as in the openID provider.

		http_timeout - timeout in milliseconds for communication with openIdIssuer.

		client_id - from openID provider

		client_secret - from openID provider

		display_name - attribute from user-information displayed in the user menu (Origo with oidc-plugin).

repository: origo-map/origo-server

repo_name: origo-map/origo-server


text:
# Contributors

## Special thanks for all the people who had helped this project so far:

* [キキジキ](https://github.com/kikijiki)
* [Wispard](https://github.com/Wispard)

repository: kittikun/ninniku

repo_name: kittikun/ninniku


text:
---
title: Flight Options
description: Here are some ways to reach Malaga.
image: img/portfolio/plane.jpg
thumbnail: img/portfolio/plane-thumbnail.jpeg
category: Flights
---
There are many ways to reach Malaga.

Flying would be the best way, but feel free to take a road trip if you're on for an adventure!

Flying directly into Malaga would be the easiest option. It is really straightforward to get to Fuengirola/La Cala de Mijas via train from the airport.

All major airlines from Ireland fly to Malaga from all of the main airports.

Nearby Airports in Granada and Seville are also good options instead of Malaga. Granada is 1 hour 40 minutes drive from Fuengirola. Seville is 2 hours 20 mins drive as an example.

The cheapest option will be using Ryanair and, for the best flight options across the week, your best bet will be Dublin Airport.

Shannon Airport have flight options on Mondays, Tuesdays, Fridays and Saturdays.

Knock Airport fly to Malaga on Saturdays in May if you are looking to make a holiday out of the week before the wedding, for example.

Cork is also an option but for a bit more of a premium.

Dublin Airport will be the best option for a quick visit as there are flight options everyday of the week.

Please see [Kayak](https://www.kayak.ie/flights/DUB-AGP/2019-05-16/2019-05-20/2adults?fs=stops=0&sort=bestflight_a){:target="_blank"} and [Sky Scanner](https://www.skyscanner.ie/transport/flights/dub/agp/?adults=2&children=0&adultsv2=2&childrenv2=&infants=0&cabinclass=economy&rtn=1&preferdirects=true&outboundaltsenabled=false&inboundaltsenabled=false&oym=1905&iym=1905&ref=home&selectedoday=01&selectediday=01){:target="_blank"} to try find the best flight options for your stay.


text:
# Barbell Weight Calculator (Native)

A mobile app for calculating plates to add to your barbell, made with react-native!

## Download

Get this app from the [Google Play Store](https://play.google.com/store/apps/details?id=com.seewes.barbell)!

## Demo

![Barbell Weight Calculator Native](https://raw.githubusercontent.com/doobix/barbell-native/master/screenshots/demo.gif)

## Development

Use `yarn start` to start up the app.

Use `yarn run ios` to start the app in the iOS Simulator.

Use `yarn run android` to start the app in the Android emulator.

This project was bootstrapped with [Create React Native App](https://github.com/react-community/create-react-native-app).

For the full Create React Native App README, click [here](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md).

## Build

Use `exp build:android` to build an `.apk` file.

Use `exp build:ios` to build an `.ipa` file.

## License

[MIT](/LICENSE)

repository: doobix/barbell-native

repo_name: doobix/barbell-native


text:
---
name: "\U0001F41B Bug Report"
about: "If something isn't working as expected \U0001F914."
title: ''
labels: 'i: bug, i: needs triage'
assignees: ''

---

## Bug Report

<!-- If you would like to implement a PR, we are more than happy to help you go through the process!-->
- [ ] I would like to work on a fix!

<!--
@babel/eslint-parser:
  If you are having issues with JSX you might want to check out eslint-plugin-react. If there's an issue with new experimental syntax you might need to check if it's supported by @babel/eslint-plugin.
-->

**Current behavior**
<!-- A clear and concise description of the behavior. -->

- [REPL](https://babel.dev/repl), [Codesandbox](https://codesandbox.io/s/babel-repl-custom-plugin-7s08o?file=/src/index.js), or GitHub Repo may increase triaging priority!

**Input Code**

```js
var your => (code) => here;
```

**Expected behavior**
<!-- A clear and concise description of what you expected to happen (or code). -->

**Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)**
- Filename: `babel.config.js`

```js
{
  "your": { "config": "here" }
}
```

**Environment**
<!--- Tip: Instead of filling out the questions below, you can run `npx envinfo --preset babel` and paste the result below ``` -->
```

```
- Babel version(s): [e.g. v7.12.0]
- Node/npm version: [e.g. Node 12/npm 7]
- OS: [e.g. macOS 10.15.4, Windows 10]
- Monorepo: [e.g. yes/no/Lerna]
- How you are using Babel: [e.g. `webpack`, `rollup`, `parcel`, `babel-register`]

**Possible Solution**
<!--- If you have suggestions on a fix for the bug -->

**Additional context**
<!-- Add any other context about the problem here. Or a screenshot if applicable -->

repository: hzoo/babel

branch_name: refs/heads/sandbox

repo_name: hzoo/babel


text:
# Cross Cluster Controller (Deprecated)

A custom Kubernetes controller for multi-cluster service discovery and routing.

[Google Slides](https://docs.google.com/presentation/d/10XcKahvyRkGChDhB0DNTrbZwcdt2RHnkY_wg7McrGSI/edit?usp=sharing) on the history and architecture of the project.

## Notice: reference only, deprecated.
This project was created prior to the [Istio Multicluster](https://istio.io/docs/setup/kubernetes/multicluster-install/) feature. It has been deprecated in favor of using Istio, but is open-sourced as reference of a customer K8s controller.

## Background
Kubernetes clusters using the [Amazon VPC CNI plugin](https://github.com/aws/amazon-vpc-cni-k8s) allow pods to be assigned and reachable on an IP address within the AWS VPC CIDR range. This means that two K8 clusters spun up in different VPCs that are peered to each other with security group policies to allow for ingress between the two clusters are able to communicate with pods from the other cluster via their IPs (so long as their VPC CIDRs don't clobber).

Previously, our K8 architecture setup cross-cluster traffic through AWS's ELBs. This involves creating ELBs in both clusters, with a service on one side pointing at the DNS of the ELB of the service on the other side in order to actually reach the services in the other cluster. This solution is unfortunately manual and cost ineffective. This cross cluster controller automates the process of creating "pointer services" and removes the need for ELBs.

## Requirements to Run
- 2 K8 clusters that are peered to each other with security groups to allow cross-cluster traffic between the nodes
- K8 clusters running Amazon VPC CNI plugin
- 1 service account scoped to allow listing/getting services and endpoints (for a remote cluser's read use)
- 1 service account scoped to listing/getting/creating services/endpoints (for local use)

## Architecture
A cross cluster controller needs to run on both clusters with a service token from the other cluster. The cross cluster controller watches for put and delete events on K8 services on the other cluster.

The cross cluster controller will only track services with the label `fair.com/cross-cluster`. This will then grab the endpoints associated with the service and create a service in its own cluster with the same set of endpoints (since those pod IPs are reachable on both sides). On service deletions, it will delete the service on its own end as well.

Example steps:
- Cross cluster controller A is running on Cluster A. Cross cluster controller B is running on Cluster B.
- Service Foo comes up on Cluster A with the fair.com/cross-cluster=true label.
- Cross cluster controller B will create a Service Foo on Cluster B with fair.com/cross-cluster=follower label with the same set of endpoints as Service A.
- Service Foo is deleted from Cluster B.
- Cross cluster controller B will delete Service Foo in Cluster B.

The cross cluster controller also includes a cleaning job that runs every 5 minutes to clean up any orphaned services/endpoints on the local cluster side. This means cleaning up any services or endpoints that have been deleted from the other cluster that might not have been picked up by the controller.

## Error reporting and logging
It uses [Sentry](https://github.com/getsentry/raven-go) and [Zap](https://github.com/uber-go/zap) for errors and logging.

You can configure Sentry with the environment variable `SENTRY_DSN`, and trigger JSON logging with Zap by setting `ENV=production`.

## Running Locally
The controller can run in development mode, which will run using the default kubeconfig file ($HOME/.kube/config). This flag can be set by setting the DEV_MODE var to true or by passing in the flag.

gha_language: Go


text:
---
date: 2019-03-28
time: 20h
duration: "1:48:05"
title: "Open Source with Yassine Elouafi"
tags: ["open source", "dev", "react", "web", "frontend"]
category: "dev"
isNext: false
video: "2254365704624093"
youtube: https://www.youtube.com/watch?v=i75VSwgRD1k
published: true
audio: https://d3ctxlq1ktw2nl.cloudfront.net/production/2019-11-8/37064067-48000-2-7061c427555f3.m4a
---

In this episode of GeeksBlabla, We discuss with Yassin El ouafi, creator of redux-sagas library about his success story working as an open source contributors and maintainer of one of the biggest library on React ecosystem.

## Guests

[Yassin El ouafi](https://twitter.com/yassineelouafi2/)

## Notes

00:00:00 Introduction and welcoming guests

00:02:00 How he started programming ?

00:08:00 How he started his open-source projects ?

00:13:00 How to grow and progress in software programming ?

00:18:00 follow the trends in programming.

00:24:00 What are your favorites patterns and paradigms?

00:37:00 Functional programming.

00:42:00 How do you find time for the opensource ?

00:44:00 Books or tutorials ?

00:48:00 What is the "Thought leaders".

00:52:00 Why should i work in the open source.

00:56:00 Pieces of Advice for a junior developer to start the open-source.

01:01:00 How did you start the Redux-saga?

01:10:00 What is the difference between Redux-saga and CQRS ?

01:15:00 Talk about Hooks, Pure components and React fiber.

01:32:00 Future projects in the open-source ?

01:35:00 Open-source in morocco & Pieces of Advice for Moroccan programmers.

## Links :

[W3C](https://www.w3.org/)

[SCSS](https://sass-lang.com/)

[Purifycss](https://purifycss.online/)

[Autoprefixer](https://autoprefixer.github.io/)

[Can I use](https://caniuse.com/)

[Reactjs](https://reactjs.org/)

[Angular](https://angular.io/)

[VueJs](https://vuejs.org/)

[GraphQl](https://graphql.org/)

[PWA](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps)

[Service Worker](https://developers.google.com/web/ilt/pwa/introduction-to-service-worker)

[WebAssembly](https://webassembly.org/)

## Links :

[W3C](https://www.w3.org/)

[SCSS](https://sass-lang.com/)

[Purifycss](https://purifycss.online/)

[Autoprefixer](https://autoprefixer.github.io/)

[Can I use](https://caniuse.com/)

[Reactjs](https://reactjs.org/)

[Angular](https://angular.io/)

[VueJs](https://vuejs.org/)

[GraphQl](https://graphql.org/)

[PWA](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps)

[Service Worker](https://developers.google.com/web/ilt/pwa/introduction-to-service-worker)

[WebAssembly](https://webassembly.org/)

## Prepared and Presented by :

[Youssouf El Azizi](https://twitter.com/elaziziyoussouf/)

[Soufian El Foukahi](https://twitter.com/soufianelf/)

[Amine Hakkou](https://twitter.com/amine_hakkou/)

...


text:
# Ivy Terminology

- [1. Organisation](#1-organisation)
- [2. Module](#2-module)
  - [2.1. Module Descriptor](#21-module-descriptor)
  - [2.2. Artifact](#22-artifact)
- [3. Module Revision and Status](#3-module-revision-and-status)
  - [3.1. Module revision](#31-module-revision)
  - [3.2. Source revision](#32-source-revision)
  - [3.3. Branch](#33-branch)
  - [3.4. Status of a revision](#34-status-of-a-revision)
- [4. Ivy Settings](#4-ivy-settings)
- [5. Repository](#5-repository)

![Ivy Terminology](images/ivy-terminology.png)

## 1. Organisation

An `organisation` is either a company, an individual, or simply any group of people that produces software. Note that the Ivy `organisation` is very similar to Maven POM `groupId`.

## 2. Module

A `module` is a self-contained, reusable unit of software that, as a whole unit, follows a revision control scheme.

Ivy is only concerned about the **module deliverables** known as `artifacts`, and the **module descriptor** that declares them. These deliverables, for each revision of the module, are managed in repositories. In other words, to Ivy, a module is a chain of revisions each comprising a descriptor and one or more artifacts.

```txt
module = a chain of revisions
a revision = module deliverables(artifacts) + module descriptor(ivy.xml)
```

### 2.1. Module Descriptor

A **module descriptor** is a generic way of identifying what describes a module: **the identifier**自身标识 (organisation, module name, branch and revision), **the published artifacts**输出, **possible configurations**输入 and **their dependencies**输入.

The most common **module descriptors** in Ivy are **Ivy Files**, XML files with an Ivy specific syntax, and usually called `ivy.xml`.

```txt
module descriptors --> ivy.xml
```

But since Ivy is also compatible with Maven 2 metadata format (called POM, for Project Object Model), **POM files** fall into the category of module descriptors.

```txt
module descriptors --> pom.xml
```

And because Ivy accepts pluggable module descriptor parsers, you can use almost whatever you want as module descriptors.

### 2.2. Artifact

An `artifact` is a single file ready for delivery with the publication of a module revision, as a product of development.

## 3. Module Revision and Status

### 3.1. Module revision

A unique revision number or version name is assigned to each delivered unique state of a module. Ivy can help in generating revision numbers for module delivery and publishing revisions to repositories, but other aspects of revision control, especially source revisioning, must be managed with a separate version control system.

### 3.2. Source revision

**Source files** kept under **a version control system** (like Subversion, CVS, SourceSafe, Perforce, etc.) have a separate revisioning scheme that is independent of the **module revisions** visible to Ivy. Ivy is unaware of any revisions of a module’s source files.

### 3.3. Branch

A branch corresponds to the standard meaning of a branch (or sometimes stream) in source control management tools. The head, or trunk, or main stream, is also considered as a branch in Ivy.

### 3.4. Status of a revision

**A module’s status** indicates **how stable a module revision can be considered**. It can be used to consolidate the status of all the dependencies of a module, to prevent the use of an integration revision of a dependency in the release of your module.

**Three statuses** are defined by default in Ivy:

- `integration`: revisions built by a continuous build, a nightly build, and so on, fall in this category
- `milestone`: revisions delivered to the public but not actually finished fall in this category
- `release`: a revision fully tested and labelled fall in this category

## 4. Ivy Settings

**Ivy settings files** are XML files used to **configure** Ivy to indicate **where the modules can be found and how**.

## 5. Repository

What is called a **repository** in Ivy is **a distribution site location** where Ivy is able to find **your required modules' artifacts and descriptors** (i.e. Ivy files in most cases).

repository: lsieun/learn-Ant

repo_name: lsieun/learn-Ant