text:
# TestAssignment
Fuel Consumption Management specified by "Fuel Consumption Management.docx"

## Tech Stack
* Spring boot
* H2 in memory database
* Maven as dependency manager

### How to run
java -jar TestAssignment-0.0.1-SNAPSHOT.jar
After this the application will listen http://localhost:8080/

### How to build

You can import it your IDE as a Maven project.
In Eclipse: Import -> Maven -> Existing Maven projects
You can find more in: https://spring.io/guides/gs/serving-web-content/

#### REST
1. Register single fuel consumption: POST /api/consumptions request body contains fuel consumption json object
Example with curl:
```curl
curl -X POST \
  http://localhost:8080/api/consumptions \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{
	"fuelType": "Diesel",
	"pricePerLitter": 1.5,
	"volume": 100,
	"date": "2019-04-01T12:00:00",
	"driverID": "driver001"
}'
```
2. Register fuel consumptions from csv file
POST /api/consumptions/file multipart request with file=absoule_path_csvFile
Example with curl:
```curl
curl -F<EMAIL_ADDRESS>\
   http://localhost:8080/api/consumptions/file
```
3.   Get statistics for each month, list fuel consumption records grouped by fuel type for driver(optional)
GET /api/consumptions/statsByFuelType?driver=driverID
Example with curl:
```curl
curl -X GET \
  http://localhost:8080/api/consumptions/statsByFuelType
```
##### Comments
In project directory, there are "example.csv" and "bad1.csv".
* First is a good example to register consumptions from file. Please pay attention to the first line. The column names must be same ignoring
case and order.
* Second is not a valid example for bulk register.
* In REST part, optional means that request param is not necessary for the call. If there is, then the results will be narrowed by the parameters
otherwise the results will be obtained by default.

repository: alpdenizz/SwedbankTestAssignment

repo_name: alpdenizz/SwedbankTestAssignment


text:
# Loyalty program product spec Data Model

## Domain

The  schema is part of the  Domain

## Description

A reference to a loyalty program specification.

## Data model

A JSON Schema corresponding to this data model can be found
[here](https://github.com/tmforum-rand/schemas/blob/candidates/Product/LoyaltyProgramProductSpec.schema.json).

The Data model is defined as shown below:

- `brand` : The manufacturer or trademark of the specification.

  - Optional

- `description` : A narrative that explains in detail what the product specification is.

  - Optional

- `id` : Unique identifier for the product specification.

  - Optional

- `href` : A reference to the product specification.

  - Optional

- `lifeCycleStatus` : The condition of the product specification, such as active, inactive, planned.

  - Optional

- `name` : The name of the product specification.

  - Optional

- `needsLoyaltyAccount` : A narrative that explains in detail what the product specification is.

  - Optional

## TMForum APIs that use this schema

Taking into consideration the snapshot of 04/02/2020 04:59:17 UTC the list of [TMForum Open APIs](https://www.tmforum.org/open-apis/) that uses this schemas is:

Coming soon

repository: tmforum/DataModelDocumentation

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: tmforum/DataModelDocumentation


text:
# Atomic Clusters explorer [Processing]

*This project was released under the MIT License*

* Instagram: [https://instagram.com/ciphrd](https://instagram.com/ciphrd)
* Blog: [https://ciphered.xyz](https://ciphered.xyz)
* Atomic Clusters article: [https://ciphered.xyz/2020/06/01/atomic-clusters,-a-molecular-particle-based-simulation/](https://ciphered.xyz/2020/06/01/atomic-clusters,-a-molecular-particle-based-simulation/)

Atomic Clusters is a particle-based simulation inspired by the work **Clusters** from *Jeffrey Ventrella*. I wrote [an article](https://ciphered.xyz/2020/06/01/atomic-clusters,-a-molecular-particle-based-simulation/) to describe both the system and its implementation on my blog. Feel free to check it out if you want an insight on this system.

![Atomic Clusters explorer demo](demo/tool-overview.gif)

This simulation is an attraction-repulsion system, where particles can have [0; 4] attractors. Attractors of the same color are attracted, and repelled by attractors of some different colors. These forces generates torque on the particles, creating the angular rotation we can observe.

This tool was made to explore Atomic Clusters with more precision than just throwing random particles all arround. It is still under development and the code is not 100% clean. Like the UI architecture is garbage, but it was enough for this first version. There is also a lot of room for optimisation, especially when it comes to the particles interactions. This is my first project using Processing so if you want to improve this tool feel free to contribute. I made a quick video to explain how the tool works:

[![Link to the presentation of the tool](https://img.youtube.com/vi/2viKdYow9LM/0.jpg)](https://www.youtube.com/watch?v=2viKdYow9LM)

## How to run

* [Download Processing](https://processing.org/download/) and install it
* Clone this repo
* Open the `sketch_atomic_clusters_explorer.pde` file with Processing
* Run

## How to use

* You can interact with the system by adding, deleting, rotating and moving particles
* Adjust the simulation settings on the bottom right
* **The list of controls can be seen by clicking on the keyboard icon of the bottom left toolbar**
* New atoms can be created and added to the toolbar using available subatomic charges (colors)
* The number of different subatomic charges can be modified by clicking on the top-right icon.

## Exploration of Atomic Clusters with more particles

I explored this system using compute shaders to have more particles, I posted some of my results on my instagram: [@ciphrd](https://instagram.com/ciphrd)

## Todo

* refacto of some components - **required** before next update
* optimization of particle-particle interactions
* add interaction tools (such as mouse repelling particles, random particle spawn, eraser?)
* selected particle should have more data displayed + a way to modify its settings

license: MIT


text:
# Java2dPhysicsSandbox

This is a project I made in my first year at the Avans hogeschool Breda. It's my first experience with 2D graphics in java.

The project requires jbox2d <IP_ADDRESS> (https://github.com/jbox2d/jbox2d) in order to function.


text:
<!--
FrozenIsBool False
-->

#Deleter

##Doc
----

>
> A Deleter has a __delitem__ method for deleting things in the <InstanceVariable>.__dict__
>
>

----

<small>
View the Deleter notebook on [NbViewer](http://nbviewer.ipython.org/url/shareyoursystem.ouvaton.org/Deleter.ipynb)
</small>

repository: Ledoux/ShareYourSystem

repo_name: Ledoux/ShareYourSystem


text:
# role java

Installs Java development tools.

This generally installs the `asdf` utility with the java plugin, which can then be
used to install a variety of Java versions

### Debian / Ubuntu / RedHat / CentOS

* java_packages: List of system packages to install.
* java_versions: List of Java versions to install using asdf
* java_global_version: Java version to activate in asdf

### Amazon

* java_extras: List of Amazon Linux Extras to enable
* java_packages: List of system packages to install.
* java_versions: List of Java versions to install using asdf.
* java_global_version: Java version to activate in asdf

### MacOSX

* java_packages: List of homebrew packages to install.
* java_versions: List of Java versions to install using asdf.
* java_global_version: Java version to activate in asdf

repository: drgeb/gargage

repo_name: drgeb/gargage


text:
## BASH useful commands

##### Create a text file with no duplicate lines
```bash
sort input.txt | uniq > output.txt
```

##### Count lines in file
```bash
wc -l filename.txt
```

##### Archive a folder with TAR
```bash
tar -zcvf foldername.tar.gz foldername_tocompress
```

##### UnTAR an archive
```bash
tar -xf archive.tar -C /target/directory
```

##### Get directory size
```bash
du -hs /path/to/directory
```

##### Find a file without permission dinied errors
```bash
find /home/projects/ -name "*part_of_a_filename*"  2>&1 | grep -v "Permission denied"
```

##### Find a specific text inside files
```bash
grep -Ril "text-to-find-here" /path/to/folder/where/to/search
```


text:
# tinker-ntk
A sketch for Particle devices that makes them compatible with [NTK](http://www.netlabtoolkit.org)

Use the [CloundIn](http://www.netlabtoolkit.org/documentation/widgets/cloudin/) and [CloudOut](http://www.netlabtoolkit.org/documentation/widgets/cloudout/) widgets to access a device.

repository: netlabtoolkit/tinker-ntk

repo_name: netlabtoolkit/tinker-ntk


text:
# Easy-Signature-Android

Easy signature is an ui library that provides android developer with a plugable signature view. This view can be added as an activity in the project.

<img src="https://github.com/smalam119/Easy-Signature-Android/blob/master/Screenshot_2017-12-31-23-29-09.png" align="center" width="300"/>

Features
=======

* A signature view provided as a activty.
* Signature is returned in either bitmap or array of bytes.
* Callbacks for okay and cancel button.
* Cross button to clear view.
* Editable sub-text
* Signature date.

Download
=======

First, add this in your root build.gradle:

```groovy
allprojects {
  repositories {
    ...
      maven { url 'https://jitpack.io' }
   }
}
```
Then, go to the module level build.gradle file and add,

```groovy
dependencies {
  compile 'com.github.smalam119:Easy-Signature-Android:0.3.0'
}
```
Example
=======

The example is quite straightforward and documented in comments. Just create a class and extend 'SignatureViewActivity' then implement accordingly. Remember to register the class as an activity in manifast file.

```java
public class DemoSignatureViewController extends SignatureViewActivity {
    private Date mDate;
    private Bitmap mSignatureBitmap;
    private byte[] mSignatureInBytes;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //set sub text
        this.setSubText("I accept the nothingness and meaninglessness of life");
    }

    //call back for done button click. returns bitmap
    @Override
    public void onClickDone(Bitmap bitmap) {
        mDate = this.getDate(); //get the date of the signature
        mSignatureBitmap = bitmap; // signature in bitmap
    }

    //call back for done button click. returns array of byte
    @Override
    public void onClickDone(byte[] bytes) {
        mSignatureInBytes = bytes; //signature in bytes
    }

    //callback for cancel button click
    @Override
    public void onClickCancel() {
    }

}
```
Author
=======
* **Sayed Mahmudul Alam**

License
=======

    Copyright 2017 Sayed Mahmudul Alam

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.


text:
When go through the whole 4 years in university,I find so many useless homework wasting so much time in which I could learn my awesome tech or cool things.I don't wanna any other dudes who like to learn things by themself take the same bad exprience with me.

So iHateHomework comes!

How to find it
--------------

iHateHomework is sctructed by different layers, and each layer represent a university, in every school folder,
there are different school, and different major, different semester.

How to use it
-------------

same way with git.

```sh
git clone https://github.com/iHateSchool/iHateHomework.git
```

I wanna join
-----------

You are welcome! If you want to be a mantainer, or you wanna give something to help, plz not hesitate contact with
me, I will add you into the team.

Email<EMAIL_ADDRESS>
Skype: darrenli9234

QQ: 4331197

FAQ (@Todo)
----------

+ Q: I don't know how to use git?
+ A: Go to the main page of github, and you will find.

License
-------

MIT

repository: aiconanai/iHateHomework

repo_name: aiconanai/iHateHomework


text:
# coc-pairs

Auto pair extension for [coc.nvim](https://github.com/neoclide/coc.nvim).

**Note** you can use other vim auto pairs plugins with coc.nvim, it's a
simplified implementation to make auto pairs work like in VSCode.

**Note** `b:coc_paires` have renamed to `b:coc_pairs`

For enhanced `<CR>` experience, checkout `:h coc#on_enter()`.

## Tips

- You should disable/remove other auto pair plugins for this extension work as expected.
- When you type a paired character which is just the next character, it would just move to the right by one column.
- When the previous content ends with two inserting characters, the characters would just be inserted without inserting the paired character. This makes inserting triple quotes easier.
- `'` only pairs when the character before is not a word character.
- for `<` to insert paired `>`, the previous character should not be an empty space.

## Install

In vim/neovim, run this command:

```
:CocInstall coc-pairs
```

## Features

- Insert pair characters automatically.
- Buffer local pairs, ex: `autocmd FileType tex let b:coc_pairs = [["$", "$"]]`

## Options

- `pairs.disableLanguages`, list of language ids to disable this extension, default: `[]`.
- `pairs.enableCharacters`, list of enabled characters, default: `` ["(", "[", "{", "<", "'", "\"", "`"] ``.
- `pairs.enableBackspace`, enable imap for backspace to remove paired characters,
  default: `true`, won't work when `<bs>` is already mapped.

To disable characters for a specified filetypes, you can use `b:coc_pairs_disabled`, ex:

    autocmd FileType markdown let b:coc_pairs_disabled = ['`']

## License

MIT

repository: neoclide/coc-pairs

gha_language: TypeScript

repo_name: neoclide/coc-pairs


text:
# Task Manager

Task Manager is a trello like app, which lets one maintain lists having multiple tasks.
[Demo]

![alt tag](https://raw.githubusercontent.com/avirati/task-manager/master/app/images/screen.png)

### Tech

Task Manager uses a number of open source projects to work properly:

* [AngularJS]
* [Angular Materialize]
* [Materialize]
* [Angular UI Sortable]
* [jQuery]
* [Jasmine]
* [Karma]

### Build

You need Grunt and Compass installed globally:

```sh
$ gem install compass
$ npm install -g grunt
```

```sh
$ git clone https://github.com/avirati/task-manager task-manager
$ cd task-manager
$ npm install
$ npm install --dev (if you want to run tests)
$ bower install
$ grunt
$ cd dist/
$ python -m SimpleHTTPServer <PORT>
```

### Run the project

```sh
open http://localhost:<PORT>
```

### Testing

```sh
$ npm install -g karma
$ cd test/
$ karma start
```

License
----

MIT

**Free Software, Hell Yeah!**

[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)

   [Demo]: http://trellolike.herokuapp.com/
   [AngularJS]: https://angularjs.org/
   [Angular Materialize]: https://github.com/krescruz/angular-materialize
   [Materialize]: http://materializecss.com
   [Angular UI Sortable]: https://github.com/angular-ui/ui-sortable
   [jQuery]: https://jquery.com/
   [Jasmine]: http://jasmine.github.io/
   [Karma]: https://karma-runner.github.io/0.13/index.html

repository: avirati/task-manager

repo_name: avirati/task-manager


text:
# student

base url: `<host>:<port>/api/v1/<methods>/student`

## Object property table

| variables name | data types (json)                | data types (bson) | editable only? |
| -------------- | -------------------------------- | ----------------- | -------------- |
| `_id`          | `string`                         | `ObjectId`        | `no`           |
| `student_id`      | `string`                         | `string`          | `yes`          |
| `student_name`    | `string`                         | `string`          | `yes`          |
| `DOB`     | `string`(time foramt : RFC3339)         | `date`          | `yes`          |
| `created_at`   | `string` (time foramt : RFC3339) | `date`            | `no`           |
| `updated_at`   | `string` (time foramt : RFC3339) | `date`            | `no`           |

---

# API Usage

## List of student (GetList)

### URL :

`<host>:<port>/api/v1/l/student?<query>`

Request Methods : `GET`

### Request query :
| query params | description            | data types                         |
| ------------ | ---------------------- | ---------------------------------- |
| `pn`         | `page_num`             | `int`                              |
| `pl`         | `page_limit`           | `int`                              |
|`sort` | `sort` | `json string` see also : request query|
| `qbind` | query bindings | `string` see also : request query|
| `student_id`    | student id          | `string`, see also : request query |
| `student_name`  | student name        | `string`, see also : request query |
| `dob`   | day of birth of student | `string`, see also : request query |
| `created_at` | date created at        | `string`, see also : request query |
| `updated_at` | date last updated at   | `string`, see also : request query |

### example :
`localhost:8080/api/v1/l/student/?student_id={"eq":54420440}`

or

`localhost:8080/api/v1/l/student/?student_id=$eq:54420440`

server will get the query as :
``` js
{
    page_num : 1,
    page_limit: 50,
    $find : {
        $and:{
            "student_id": {
                $or : {
                   $eq : 54420440
                } ,
            },
        }
    }
}
```

output :
``` json
{
    "page_limit": 500,
    "page_num": 1,
    "count": 1,
    "SortAr": null,
    "status": 0,
    "data": [
        {
            "_id": "5d5f7d2708386429880bad39",
            "student_id": "54420440",
            "student_name": "Chan Tai Man",
            "dob": "1987-06-04T00:00:00+09:00",
            "enrolled": [
                {
                    "_id": "5d5fbbce0838642cbcb221ff",
                    "year": 2019,
                    "course_id": "scope_23010",
                    "enroll_date": "2019-08-16T00:00:00+08:00",
                    "created_at": "2019-08-23T18:11:26.112+08:00",
                    "updated_at": "2019-08-23T18:11:26.112+08:00"
                }
            ],
            "created_at": "2019-08-23T13:44:07.403+08:00",
            "updated_at": "2019-08-23T16:58:52.575+08:00"
        }
    ]
}
```

---

## Get student info (GetOne)

### URL :

`<host>:<port>/api/v1/g/student/<id>`

Request Methods : `GET`

Request param :
| query params | description           | data types | required? |
| ------------ | --------------------- | ---------- | --------- |
| `_id`         | `object id of student` | `string`   | yes       |

### example :
`localhost:8080/api/v1/student/g/5d5f7d2708386429880bad39`

server will get the query as :
``` js
{
    $find : {
        "_id" : "5d5f7d2708386429880bad39"
    }
}
```

output :
``` json
{
    "SortAr": null,
    "status": 0,
    "data": {
        "_id": "5d5f7d2708386429880bad39",
        "student_id": "54420440",
        "student_name": "Chan Tai Man",
        "dob": "1987-06-04T00:00:00+09:00",
        "enrolled": [
            {
                "_id": "5d5fbbce0838642cbcb221ff",
                "year": 2019,
                "course_id": "scope_23010",
                "enroll_date": "2019-08-16T00:00:00+08:00",
                "created_at": "2019-08-23T18:11:26.112+08:00",
                "updated_at": "2019-08-23T18:11:26.112+08:00"
            }
        ],
        "created_at": "2019-08-23T13:44:07.403+08:00",
        "updated_at": "2019-08-23T16:58:52.575+08:00"
    }
}
```

---

## Create student info (Create)

### URL :
`<host>:<port>/api/v1/c/student`

Request Methods : `POST`

Request body :
| query params | description            | data types | required? |
| ------------ | ---------------------- | ---------- | --------- |
| `student_id`    | student id          | `string`   | yes       |
| `student_name`  | student name        | `string`   | yes       |
| `dob`   | day of birth of student | `string`      | yes       |

### example :
`localhost:8080/api/v1/student/c`

request json body:
``` json
{
    "student_id": "54420440",
    "student_name": "Chan Tai Man",
    "dob": "1987-06-04T00:00:00+09:00",
}
```

server return output (success) :
- server will auto generate the object id (`_id`) , created time (`created_at`) and last updated time (`updated_at`)
``` json
{
    "status": 0,
    "data": {
        "_id": "5d5f7d2708386429880bad39",
        "student_id": "54420440",
        "student_name": "Chan Tai Man",
        "dob": "1987-06-04T00:00:00+09:00",
        "created_at": "2019-08-14T19:47:02.411331+08:00",
        "updated_at": "2019-08-14T19:47:02.411331+08:00"
    }
}
```

---

## Update Courses info (Update)

update the object data, by required fields

### URL :

 `<host>:<port>/api/v1/u/student/<object_id>`

Request Methods : `POST`

Request body :
| query params | description         | data types | required?                       |
| ------------ | ------------------- | ---------- | ------------------------------- |
| `_id`        | object id of course | `string`   | yes                             |
| `student_id`    | student id           | `string`   | option, based on user necessary |
| `student_name`  | student name  | `string`   | option,based on user necessary  |
| `dob`   | day of birth of student  | `string`      | option,based on user necessary  |

### example :
`localhost:8080/api/v1/u/student/5d5f7d2708386429880bad39`

and the request of update the dob of student only

request json body:
``` json
{
    "_id" : "5d53f4b6df86c026f2e1c64a",
    "dob":  "1987-06-05T00:00:00+09:00",
}
```

server return output (success) :
- server will auto update the last updated time
``` json
{
    "status": 0,
    "data": {
        "_id": "5d53f4b6df86c026f2e1c64a",
         "student_id": "54420440",
        "student_name": "Chan Tai Man",
        "dob": "1987-06-05T00:00:00+09:00",
        "created_at": "2019-08-14T19:47:02.411331+08:00",
        "updated_at": "2019-08-14T19:58:21.27+08:00"
    }
}
```

---

## Delete Courses info (Delete)

update the object data, by required fields

### URL :
`<host>:<port>/api/v1/delete/student` ,or\
 `<host>:<port>/api/v1/d/student`

Request Methods : `POST`

### Request body :
| query params | description         | data types | required? |
| ------------ | ------------------- | ---------- | --------- |
| `_id`        | object id of student | `string`   | yes       |

### example :
`localhost:8080/api/v1/d/student/5d5f7d2708386429880bad39`

request json body:
``` json
{
    "_id" : "5d5f7d2708386429880bad39"
}
```

server return output (success) :
``` json
{
    "status": 0,
    "data": true
}
```

gha_language: Go

gha_license_id: MIT


text:
# **Finding Lane Lines on the Road**

## Writeup Template

### You can use this file as a template for your writeup if you want to submit it as a markdown file. But feel free to use some other method and submit a pdf if you prefer.

---

**Finding Lane Lines on the Road**

The goals / steps of this project are the following:
* Make a pipeline that finds lane lines on the road
* Reflect on your work in a written report

[//]: # (Image References)

[image1]: ./examples/grayscale.jpg "Grayscale"

---

### Reflection

### 1. Describe your pipeline. As part of the description, explain how you modified the draw_lines() function.

My pipeline consisted of 5 steps. First, I converted the images to grayscale, then I use the gaussian blur function to reudce detail (noise) in the image, thus keeping the important main features. After that, I use Canny algorithm (built in opencv) to get the edges in the entire figure, and pass it to a ROI (Region Of Interest) area which is indeed a trapezoid shape. After all, conbine the edges (which is already in ROI) and the orgininal edges (which is from Canny) to get the output lane-detected image.

After the model is built, I tune the hyperparameters serveral times to get the model can generated the lines clearly besides the car. After the hyperparameters is tuned, I saved the lane-detected images to the target folder.

In order to draw a single line on the left and right lanes, I modified the draw_lines() function by passing a larger value 10 to parameter `thickness` value.

If you'd like to include images to show how the pipeline works, here is how to include an image:

![alt text][image1]

### 2. Identify potential shortcomings with your current pipeline

One potential shortcoming would be what would happen when there are noises and we detected much more edges than we want.

Another shortcoming could be we cannot ensure the car is always detecting a lane left and a lane at right.

### 3. Suggest possible improvements to your pipeline

A possible improvement would be to check the top longest lines, and develop a non-longest supression algorithm (such as non-max supression in Computer Vision); and finally get the two longest lines (dashed-line or solid-line).

Another potential improvement could be to split the pictures to 2 ROIs (one on the left-downside, another on the right-downside) instead of a single ROI, and detect left lane and right lane respectively.


text:
---
title: "Hello Gatsby"
cover: "2019-01-26/hello-gatsby.png"
category: "development"
date: "2019-01-26"
tags:
  - gatsby
  - blog
  - setup
  - howto
---

# Hello Gatsby

I've finally decided to maintain an actual presentable blog instead of just using markdown files, gists, etc., to capture documentation.

This is simply the "hello world" post so don't expect much content here.

Next time (as in this weekend), I plan to discuss the following two topics

- What is the quantum eraser effect?
  - What does it have to do with time travel?
  - Does *any* information travel backward in time?
- Explorations in to the slack API
  - How to setup a slack bot project

## Deployment

After clearing out `contents/*.md` and other such unused things, I attempted to build and deploy with:

```sh
yarn run build:gh
```

However, I was rudely greeted with the following graphQL field error:

![graphql error](2019-01-26/deploy-error.png)

This suggests that something is wrong with my `date` field... hmmm, what could it be?

As it turns out, there must be at least 1 markdown file directly in the `contents/*` directory; if there isn't one or, as was in my case, everything was under `content/posts/*` so things didn't work

repository: foxnewsnetwork/teach-myself

gha_language: JavaScript

repo_name: foxnewsnetwork/teach-myself


text:
# Programming Language Suggester

#### Pragramming language suggester is a web application that matches users with the languages that are a best fit for them based on the answers they provided.

#### By Ahmed Ghouzlane

## Technologies Used

* HTML
* CSS
* Git
* JavaScript
* JQuery

## Setup/Installation Requirements

1. Clone git repository [Click here](https://github.com/aGhouzlane/my-resort-website.git)
2. Find index.html file
3. Open with your favorite browser by double clicking, or right-click, open with...

## License

[MIT License](https://opensource.org/licenses/MIT)
© Ahmed Ghouzlane

## Contact Information

[email me](mailto:ahmedghouzlane@gmail.com)

branch_name: refs/heads/main


text:
---
layout: relation
title:  'neg'
shortdef : 'negation modifier'
---

The negation modifier is the relation between a negation word and the
word it modifies. It is used both for predicate negation (canonically, _not_) and nominal negation (canonically _no_). Dependents labeled `neg` in the current treebank are the following (in various lowercase/uppercase forms): _n, n't, neither, never, no, non, not, nt, t_.

~~~ sdparse
Bill is not a scientist
neg(scientist, not)
~~~

~~~ sdparse
Bill does n't drive
neg(drive, n't)
~~~

~~~ sdparse
John saw no accidents
neg(accidents, no)
~~~

branch_name: refs/heads/pages-source


text:
# Signal Processing

A collection of digital signal processing algorithms implemented in Matlab.

## Getting Started

### Prerequisites

Matlab R2016b

## Author

Danilo Pena

## License

This project is licensed under Unlicense license. This license does not require you to take the license with you to your project.

license: Unlicense

repository: danilodsp/Signal-Processing

repo_name: danilodsp/Signal-Processing


text:
---
title: "Publications"
date: 2018-07-02T13:38:34+12:00
draft: false
menu: "main"
type: publications
description: "My publications"
sitemap:
priority: 0.8
changeFreq: monthly
---

# Publications

## Journal

2018 - Maryam Gholami Doborjeh, Zohreh Gholami Doborjeh, **`Akshay Raj Gollahalli`**, Kaushalya Kumarasinghe, Vivienne Breen, Neelava Sengupta, Josafath Israel Espinosa Ramos, Reggio Hartono, Elisa Capecci, Hideaki Kawano, et al. From von neumann architecture and atanasoff’s abc to neuromorphic computation and kasabov’s neucube. part ii: Applications. In Practical Issues of Intelligent Innovations, pages 17–36. Springer, 2018.

2018 - N Kasabov, N. Sengupta, J. R. Espinosa Ramos, E. Tu, S. Marks, N. Scott, J. Weclawski, **`A. R. Gollahalli`**, M. G. Doborjeh, Z. G. Doborjeh, K. Kumarasinghe, V. breen, and A. Abbot. From von neumann architecture and atanaso’s abc to neuro-morphic computation and kasabov’s neucube: Principles and implementations. In Vassil Sgurev, Vincenzo Piuri, and Vladimir Jotsov, editors, Learning Systems: From Theory to Practice, chapter 1. Springer, 2018.

2018 - Neelava Sengupta, Josafath Israel Espinosa Ramos, Enmei Tu, Stefan Marks, Nathan Scott, Jakub Weclawski, **`Akshay Raj Gollahalli`**, Maryam Gholami Doborjeh, Zohreh Gholami Doborjeh, Kaushalya Kumarasinghe, et al. From von neumann architecture and atanasoffs abc to neuro-morphic computation and kasabov’s neucube: Principles and implementations. In Learning Systems: From Theory to Practice, pages 1–28. Springer, 2018.

2017 - R. Khansama, V. Ravi, N. Sengupta, **`A.R. Gollahalli`**, and N. Kasabov. Stock market movement prediction using evolving spiking neural networks. IEEE Transactions on Neural Networks and Learning Systems, 2017.

2017 - Ravi V. Sengupta N. **`Gollahalli A. R.`** Khansama, R. and N. Kasabov. A combined adaptive neural network and nonlinear model predictive control for multirate networked industrial process control. IEEE Transactions on Neural Networks and Learning Systems, 2017.

## Book or Book Chapter

2021 - Khansama, R. R., Ravi, V., **`Gollahalli, A. R.`**, Sengupta, N., Kasabov, N. K., & Bilbao-Quintana, I. (2021). Stock market movement prediction using evolving spiking neural networks. In R. Vadlamani & A. K. Cherukuri (Eds.), Handbook of Big Data Analytics : Applications in ICT, Security and Business Analytics (pp. 285-310): Institution of Engineering & Technology.

## Poster

2015 - **`Gollahalli, A. R.`**, & Kasabov, N. (2015). EEGRotor: A virtual Quad-Copter based on Brain Computer Interface. presented at the meeting of the 13th International Conference on Neuro-Computing and Evolving Intelligence 2015 (NCEI ‘15) Auckland.

## Abstract

2015 - **`Gollahalli, A. R.`**, & Kasabov, N. (2015). EEGRotor: A virtual Quad-Copter based on Brain Computer Interface. presented at the meeting of the 13th International Conference on Neuro-Computing and Evolving Intelligence 2015 (NCEI ‘15) Auckland. Retrieved from [http://www.aut.ac.nz/\_\_data/assets/pdf_file/0018/525051/Booklet-NCEI15.pdf](http://www.aut.ac.nz/__data/assets/pdf_file/0018/525051/Booklet-NCEI15.pdf)

## Thesis

2015 - **`Gollahalli, A. R.`** (2015). Brain-computer interfaces for virtual Quadcopters based on a spiking-neural network architecture - NeuCube. AUT University, Auckland. Retrieved from [http://hdl.handle.net/10292/9249](http://hdl.handle.net/10292/9249)

gha_language: PowerShell


text:
# zulu

A command line utility to make it easier to get and parse UNIX timestamps (of
different precision). The need for this tool came out of me frequently needing
to work with UNIX timestamps in either second or millisecond precision.

## License

`zulu` is released under the MIT License. See the [LICENSE
file](https://github.com/theckman/zulu/blob/master/LICENSE) for more details.

## Installing

At the time of writing this utility requires you have a Go toolchain available
to build it from source. I'll work on getting binary releases up soon.

```
go get github.com/theckman/zulu/cmd/z
```

Assuming your `$GOBIN` location (default `$GOPATH/bin`) is in your `$PATH`, you
should now have a binary named `z` available for use.

## Usage

By default `z` prints the current time in UTC and localtime, as well as with
UNIX timestamps of different precisions:

```
$ z
Local time:		2018-08-27 08:00:00 PDT (7 hours behind UTC)

UTC time:		2018-08-27 15:00:00 UTC
Epoch timestamp:<PHONE_NUMBER>
Millisecond timestamp:<PHONE_NUMBER>000
Nanosecond timestamp:<PHONE_NUMBER>000000000
```

You can also have it provide you with only the formatted timestamp of your choosing:

```
$ z --unix
1535382000
```

In addition to that, you can pass it a timestamp to have it parse and print the
datetime at that timestamp. The value of the timestamp can be any of the
formatter flags (like `--unix` above). It defaults to a mode where it tries to
guess whether it's a `--unix` or `--unix-milliseconds`:

```
$ z<PHONE_NUMBER>
Local time:		2018-08-27 07:59:59 PDT (7 hours behind UTC)

UTC time:		2018-08-27 14:59:59 UTC [was 1s ago]
Epoch timestamp:<PHONE_NUMBER>
Millisecond timestamp:<PHONE_NUMBER>000
Nanosecond timestamp:<PHONE_NUMBER>000000000
```

### Local Timezone

Zulu defaults to using your local timezone when printing times, however by
setting a `TZ` environment variable you can override this. It expects the same
format as the UNIX `TZ` EnvVar (e.g., `America/New_York`). My system is in the
`America/Los_Angeles` timezone, but by setting the `TZ` environment variable you
can see it changes my local zone:

```
$ TZ=America/New_York z
Local time:		2018-08-27 11:00:00 EDT (4 hours behind UTC)

UTC time:		2018-08-27 15:00:00 UTC
Epoch timestamp:<PHONE_NUMBER>
Millisecond timestamp:<PHONE_NUMBER>000
Nanosecond timestamp:<PHONE_NUMBER>000000000
```

### Timestamp Format

Whether you're passing in a timestamp to be parsed, or whether you want to print
the current timestamp, there are a few Formatter flags available to give zulu a
hint of which type to parse.

If you provide a formatter flag, but no timestamp, it prints the current time in
that format. If you provide a formatter flag and a timestamp, it attempts to
parse the timestamp.

```
$ z --rfc-3339 '2018-08-27 15:00:00Z'
Local time:		2018-08-27 08:00:00 PDT (7 hours behind UTC)

UTC time:		2018-08-27 15:00:00 UTC [was 1s ago]
Epoch timestamp:<PHONE_NUMBER>
Millisecond timestamp:<PHONE_NUMBER>000
Nanosecond timestamp:<PHONE_NUMBER>000000000
```

See the help output (`-h/--help`) for the list of all of the Formatter flags.

### Help Output

```
Usage:
  z [OPTIONS] [TIMESTAMP]

Application Options:
  -V, --version               print version and exit

Timestamp Formatters:
  -u, --unix                  time format is the UNIX Epoch (seconds since 00:00:00 UTC January 1, 1970)
  -m, --unix-milliseconds     time format is the UNIX Epoch to the nearest second with millisecond precision
  -n, --unix-nanoseconds      time format is the UNIX Epoch to the nearest second with nanosecond precision
  -r, --rfc-3339              time format is the RFC 3339 format in UTC timezone, with the T replaced by a space
  -i, --iso-8601              time format is the same as the -r/--rfc-3339 format, except it includes the 'T' between
                              the date and time
  -t, --internal-time-format  time format is the same as is printed by default (e.g. 2018-08-27 15:00:00 UTC)
  -z, --zulu                  same as -r/--rfc-3339 but with no timezone specifier

Help Options:
  -h, --help                  Show this help message

Arguments:
  TIMESTAMP:                  An optional timestamp to parse and print the datetime of. The expected format depends
                              on which Timestamp Formatter flag you use. The default is a UNIX Epoch parser that
                              attempts to assume the desired precision (seconds, milliseconds, nanoseconds)
```

repository: theckman/zulu

repo_name: theckman/zulu


text:
# Query Helpers

Our API supports different kind of conditions, at the moment we have a limited set of conditions and they only work as 'AND' conditions not 'OR' conditions... yet!

Here are all the examples of conditions you could do in the platform when you query a list of records and you want to limit the responses with certain conditions you are looking for.

Condition       | Example                           | Query param
-------------   | ---------------------             | ------------------------
where_          | where_identifier                  | { where_identifier: 'text_here' }
in_             | in_type                           | { in_type: ['available', 'waiting_for_ingredients'],}
like_           | like_name                         | { like_name: 'chicken'}
wherenot_       | wherenot_category                 | { wherenot_category: 'grains_bowl_category' }
where<_         | where<_capacity                   | { where<_capacity: 10 }
where>_         | where>_currentLoad                | { where>_currentLoad: 5}
where<=_        | where<=_capacity                  | { where<=_capacity: 5 }
where>=_        | where>=_currentLoad               | { where>=_currentLoad: 5 }
where-not-null_ | where-not-null_inventoryItem      | { where-not-null_inventoryItem: true }
where-null_     | where-null_inventoryItem          | { where-null_inventoryItem: true }

repository: open-kitchen/slate

repo_name: open-kitchen/slate


text:
# curry-bot
Discord bot for the Azure Dreams community

Steps to get this up and running locally:

1) Clone git project

2) Copy the Bot token from Discordapp developers page, and paste it into a JSON file called "creds.json" in the discord_tools folder. Should look like:

{
  "token" : "..."
}

3) Create a new Service Account key from Google Cloud Platform for your spreadsheet. Save as "creds.json" in Bingo folder.

After downloading all requirements listed in requirements.py, the bot should now run when executing curry_bot.py

repository: ProGrammar-R/curry-bot

repo_name: ProGrammar-R/curry-bot


text:
## Sources
If you have questions about how to use SocketStream, here are some useful sources:

1. [SocketStream.org](socketstream.org)
2. [Google Group](https://groups.google.com/d/forum/socketstream)
3. [GitHub](https://github.com/socketstream/socketstream)
4. IRC channel [#socketstream](http://webchat.freenode.net/?channels=socketstream)
5. Twitter [@socketstream](http://twitter.com/#!/socketstream)

## Submitting issues
To submit an issue please use [SocketStream issue tracker](https://github.com/socketstream/socketstream/issues).

## Contributing to Source Code
We would love for you to contribute to SocketStream to make it even better.
To discuss changes please use the [SocketStream issue tracker](https://github.com/socketstream/socketstream/issues)

### Installation Dependencies
Before you can contribute to SocketStream, you'll need to install or configure the following dependencies on your machine:

* Git - control version system ([GitHub installing guide](http://help.github.com/mac-git-installation))
* [Node.js](http://nodejs.org/), usually we use the latest version of Node.js, but it's always better to check the current version in the [package.json](https://github.com/socketstream/socketstream/blob/master/package.json).

### Working with source code

* [Fork](http://help.github.com/forking) the main [SocketStream repository](https://github.com/socketstream/socketstream.git)

* Clone your (forked) Github repository:
```
git clone git@github.com:<github username>/socketstream.git
```

* Go to project repository
```
cd socketstream
```

* Add the main SocketStream repository as an upstream remote to your repository
```
 git remote add upstream https://github.com/socketstream/socketstream.git
```

* Install ```npm``` dependencies
```
npm install
```

* Make some code changes and run the tests to make sure your code passed required tests:
```
npm test
```

### Submitting Your Changes

* Create and checkout a new branch off the master branch for your changes:
```
git checkout -b new-stuff-branch master
```

* Make sure your changes passed the tests:
```
npm test
npm run cover-test
```

* Commit your changes with a descriptive commit message, please describe what you have done as detailed as possible
```
git add -A
git commit
```

* Push your branch to Github:
```
git push origin new-stuff-branch
```

* Create a [pull request](https://help.github.com/articles/creating-a-pull-request)

* Once your patch is reviewed and merged, please delete your branch and pull both yours and master's changes from the main (upstream - [SocketStream](https://github.com/socketstream/socketstream.git)) repository:
```
git push origin :new-stuff-branch
git checkout master
git branch -D new-stuff-branch
git pull --ff upstream master
```

## Git Commit Guidelines

These rules are adopted from the [AngularJS commit conventions][commit-message-format].

Git commit messages will need to be formatted in a certain format.  This is so
that we can generate a changelog from the git commit messages.

### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**.  The header has a special
format that includes a **type**, a **scope** and a **subject**:

```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

Examples:
```
feat(http): add `connect.compress()` middleware to the stack
```
```
docs(docs): typo fix
```
```
feat(websockets): add transport `engineio`

More efficient engine.io replced socket.io
```
```
fix(http): use blue ink instead of red ink

BREAKING CHANGE: `http` now uses blue ink instead of red.

To migrate, change your code from the following:

`http.start('blue')`

To:

`http.start('red')`
```

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on github as well as in various git tools.

### Type
Is recommended to be one of these (only **feat** and **fix** show up in the `CHANGELOG.md`):

* **feat**: A new feature
* **fix**: A bug fix
* **docs**: Documentation only changes
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
  semi-colons, etc)
* **refactor**: A code change that neither fixes a bug or adds a feature
* **perf**: A code change that improves performance
* **test**: Adding missing tests
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
  generation

### Scope
The scope could be anything specifying the place of the commit change. For example `cli`,
`http`, `publish`, `session`, `websocket`, `request` etc...

### Subject
The subject contains a succinct description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize first letter
* no dot (.) at the end

###Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes"
The body should include the motivation for the change and contrast this with previous behavior.

###Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.

## Code conventions

The codebase was converted from CoffeeScript, so there are certain notations that are a result of that and not
a convention for the project. Use your best judgement when writing code and make it as readable as possible.
Consistency with existing codebase is one of the best ways to make the code easier to understand, so you should
take care not to diverge without a very good reason.

1) Wherever possible functions should be declared in the classic way and not as variables.
2) Variables should be declared where they are used and not at the top of the module except for module wide variables and imports.

These guidelines should not be seen as religion, but rather as a default, and should in effect be seen in 90+% of the codebase.
If you are finding yourself sticking to them only occasionally, you are doing something wrong.

## Documentation generation

We use [ngdocs][ngdocs] module for generating documentation files.

We have two type of documentation:

* **API** - takes from directly from source code from comments to functions and objects defenition
* **Tutorials** - markdown files, located within `src/docs` and have `*.ngdoc` extension

To build/re-build documentation run:
```
    grunt build:docs
```

To run documentation web site locally the way process will watch for changes and re-building docs on the fly run:
```
    grunt watch:docs
```

To update local `gh-page` branch by merging from `master` run:
```
    grunt update:docs
```

## Release
#### This guide is only for developers who perform releases

There are helpful `grunt` tasks for overall version releasing process:

1. First of all we need put a mark into **GIT History Tree** by increasing patch version by **1**, adding suffix "**SNAPSHOT**" (ex. "**0.3.15-SNAPSHOT**") and commiting `package.json`:
```
    grunt release:start
```

2. Then we can perform regular commits with changes and pull requests

3. Once we decide to release a new version we need to **prepeare release** and run all the tests, generate `CHANGELOG.md` since the release start point (**mark commit from step 1**) and clean up version to just "**0.3.15**":
```
grunt release:prepare
```

4. If previouse step passed we need to **complete release** by commiting `CHANGELOG.md`, `package.json` and adding version tag:
```
grunt release:complete
```

5. Finnaly if all good, just push `tags` and both `master` and `gh-pages` branches to `origin`:
```
grunt release:push
```

You are all set! Thank you for your contribution!

[ngdocs]: https://github.com/idanush/ngdocs/wiki/API-Docs-Syntax
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#

repository: mcanthony/socketstream

branch_name: refs/heads/develop

repo_name: mcanthony/socketstream


text:
# Title

Finding the McSpot

# Difficulty

Hard

# Description

The idea for this challenge is a simplified version of finding the location in the Continental United States which is the furthest distance from any McDonald's. Given a known boundary, and a set of 'locations' determine a the spot which is the furthest from any location.

# Input

Your program should take the bounding rectangle defined by the two integers *n* and *m*, defining its size, and *i*, the count of location points. The map points will be given as "(x,y)" pairs of integers. All points were generated at random with no particular weighting or bias.

For this challenge you'll probably want to study up on Voronoi diagrams.

# Output Description

Find the coordinate (x,y) furthest from any of the given location points. The (x,y) coordinate should be to the 6th decimal place. Why 6? Because latitude and longitude taken to 6 decimal places is accurate to about 1 meter.

# Challenge Input

    500 500 20
    (104, 209)
    (16, 234)
    (76, 63)
    (44, 472)
    (489, 43)
    (304, 139)
    (72, 164)
    (414, 470)
    (147, 46)
    (464, 150)
    (371, 229)
    (414, 198)
    (316, 172)
    (132, 248)
    (477, 345)
    (118, 473)
    (19, 308)
    (42, 409)
    (45, 141)
    (456, 210)

# Bonus Input

Here's a gist file with even more points. https://gist.github.com/paralax/f1f0fb5af50d5c9c7b6e

# Credit

Many thanks to Redditor /u/strongpassword for this submission.
https://github.com/gavinr/usa-mcdonalds-locations

# Notes

Have a cool challenge idea? Post it to /r/DailyProgrammer_Ideas!

gha_language: Makefile


text:
# MLB-Win-Probability
R Markdown code for my MLB Win Probability Simulation

Links to see the html code in your browser:

[Astros @ Padres](https://htmlpreview.github.io/?https://github.com/ross-wgh/MLB-Win-Probability/blob/main/Astros_at_Padres.html "Astros @ Padres")

[Dodgers @ Giants](https://htmlpreview.github.io/?https://github.com/ross-wgh/MLB-Win-Probability/blob/main/Dodgers_at_Giants.html "Dodgers @ Giants")

repository: ross-wgh/MLB-Win-Probability

repo_name: ross-wgh/MLB-Win-Probability


text:
# Functions and Nested Loops

## Description

This Repo has some of my (David John Coleman II) projects for a software development program.
The focus of these projects is learning the C Programming Language.

## Environment

* __OS:__ Ubuntu 14.04 LTS
* __Compiler:__ gcc 4.8.4 (C90)
* __Language:__ C

## Primary concepts learned

* nested loops and how to use them
* creating functions, and using them in different C files
* difference between declaring a function and defining a function
* prototypes and scope of variables
* ``gcc`` flags: ``-Wall``, ``-Werror``, ``-pedantic``, ``-Wextra``
* header files and including them with ``#include``

## Author

David John Coleman II, [davidjohncoleman.com](http://www.davidjohncoleman.com/)

## License

MIT License


text:
---
order: 10
---

### Introduction

Gearbox follows PSR-2 standards for PHP development. This is an overview of the higher-level rules for PSR-2, for the full set of standards please reference the [PHP-FIG docs](http://www.php-fig.org/psr/psr-2/).

The PSR-2 Standard extends the PSR-1 Standard, documented [here](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md).

repository: gearbox-built/gearbox-standards

repo_name: gearbox-built/gearbox-standards


text:
---
title: "Installation"
date: 2018-08-06T16:25:43+01:00
anchor: "installation"
weight: 1
draft: false
---

### CLI
Install binary using [GoFish](https://gofi.sh/):
```
gofish install chartmuseum
==> Installing chartmuseum...
🐠  chartmuseum 0.10.0: installed in 95.431145ms
```

or manually:
```bash
# on Linux
curl -LO https://s3.amazonaws.com/chartmuseum/release/latest/bin/linux/amd64/chartmuseum

# on macOS
curl -LO https://s3.amazonaws.com/chartmuseum/release/latest/bin/darwin/amd64/chartmuseum

# on Windows
curl -LO https://s3.amazonaws.com/chartmuseum/release/latest/bin/windows/amd64/chartmuseum

chmod +x ./chartmuseum
mv ./chartmuseum /usr/local/bin
```
Using `latest` in URLs above will get the latest binary (built from master branch).

Replace `latest` with `$(curl -s https://s3.amazonaws.com/chartmuseum/release/stable.txt)` to automatically determine the latest stable release (e.g. `v0.10.0`).

Determine your version with `chartmuseum --version`.


text:
# multithread-singleton
MultiThread Singleton Pattern with LogManager Sample

Singleton Design Pattern gives an unique instance of object. But, When you try to develop multi thread application, this native case of design pattern can not give guarantee for an unique object reference because of race condition.

For that reason, we have to make some extra code blocks to prevent from race condition factor. As everybody knows, In Java we can use lock objects or synchronized keyword to write thread safe applications. Also, It is known as "Double-Checked Locking Singleton". You can read details of this topic in Wikipedia (https://en.wikipedia.org/wiki/Double-checked_locking#Usage_in_Java).

In our LogManager example, we designed a class which has procted constructor. So with this way, any client can not create an instance of LogManager class directly. We will give LogManager unique instance with a static method with lazy loading. Example:

```java
public static LogManager getLogManager() {

		if(self == null) {
			synchronized (LogManager.class) {
				if(self == null) {
					self = new LogManager();
				}
			}
		}
		return self;
}
```

We used ExecutorService to run Runnable tasks. For that reason, we created a fixed thread pool. This pool has prepared Thread instances. Creating a new thread is an expensive action in operating system side, so we want to improve performance.

```java
ThreadPoolExecutor threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(10);

for(int i=0; i < 5; i++) {
	Task task = new Task(i);
	threadPool.execute(task);
}
threadPool.shutdown();
```

Results with Double Checked Locking:

Log manager was created!
- Task-1, Log Manager Hashcode:<PHONE_NUMBER>
- Task-2, Log Manager Hashcode:<PHONE_NUMBER>
- Task-4, Log Manager Hashcode:<PHONE_NUMBER>
- Task-3, Log Manager Hashcode:<PHONE_NUMBER>
- Task-0, Log Manager Hashcode:<PHONE_NUMBER>

Results without Double Checked Locking:

- Log manager was created!
- Log manager was created!
- Log manager was created!
- Log manager was created!
- Log manager was created!
- Task-3, Log Manager Hashcode:<PHONE_NUMBER>
- Task-1, Log Manager Hashcode: 399577663
- Task-0, Log Manager Hashcode:<PHONE_NUMBER>
- Task-4, Log Manager Hashcode:<PHONE_NUMBER>
- Task-2, Log Manager Hashcode: 327110963

repository: batux/multithread-singleton

repo_name: batux/multithread-singleton


text:
# Python Directory tree

See directory tree structure with homemade Python Algorithm that recursively produces a depth-indented listing of files.

# Usage

```bash
python3 main.py path/to/your/tree/root/directory
```

# Example

![First shell results example](img/example/example_tree1.png)

# Requirement

- [argparse](https://docs.python.org/3/library/argparse.html): Parser for command-line options, arguments and sub-commands


text:
---
title: "CortoNote: Building a better note takling app with Draft JS"
tags: talk, draft.js, cortonote, typescript
description: View the slide with "Slide Mode"
---

# CortoNote

## Building a better note takling app with Draft.JS

slides: https://hackmd.io/@pavel-savchenko/HJ7znk7TH

---

# Agenda

1. Why another note taking app
2. Why use Draft.JS
3. Introducing CortoNote
4. Open source

Note: 1. business, 2. technical, 3. show off

---

## Why another note taking app?

:notebook:

----

### Current state of note taking apps

An intersection of the following shortcomings:

- Bloated
- Slow
- Paid
- No mobile client
- Ugly

note: what we dislike about them (personal opinion)

----

### Current state of note taking apps

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

----

### Current state of note taking apps

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

----

### Current state of note taking apps

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

----

### Current state of note taking apps

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

----

### Recap: list of wanted features

- Small and fast
- Synced to remote
- Mobile client
- Support markdown style (w/ inline)
- Freeware / opensource

note: decided to build it ourselves!

---

## Why use Draft.JS

note: technical part

----

### Other "rich text editors"

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

----

### Problems w/ other "Rich text editors"

- (way too) Fully featured
- Slow / resource intensive
- Dependency heavy
- React wrappers feel "slapped on"

Note: Too many batteries

----

### Introducing Draft.JS

----

### Draft.JS - History

Open sourced by Facebook in 2016, used today in many of their products
(posts, comments, messenger, etc)

note: this new editor is based on ContentEditable

----

### Draft.JS - Content Editable

![](https://i.imgur.com/mr7aiME.png)
snagged from the draft.js intro presentation

----

### Draft.JS - Content Editable

Facebook aimed to build:

> a controlled content editable

Override the default behaviour of ContentEditable to render DOM w/ React; while still using CE's powerful "native selection API".

note: unlike other methods, does not need to manually render absolutely everything from scratch, nor does it need to use an underlying text area, or calculate input dimensions, cursor and selection and position.

----

### Problems with Draft.JS

- Tough to get started with (complex flow, immutable.js)
- Documentation is lacking
- Only 2 "maintainers" (previously 1)
- Facebook product focus
- Despite hype (17k stars) not widespread

Note: not popular, meaning compared to other editors

----

### Problems with Draft.JS

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

note: despite this, once you get over the initial learning curve, the idea is quite elegant and fun to work with.

----

### Tips for using Draft.JS

- Use RichUtils and Modifier to DRY out code
- Get comfortable with Immutable
-

note: in summary once you get over the initial learning curve, the idea is quite elegant and fun to work with.

---

## Introducing CortoNote

----

### an example of a "plugin" for rich text

----

### a gnarlier example

----

### attention to detail

- right arrow escape
- simpler "markdown-style" inline styles
- language-aware code blocks (using prism)
- undo/redo, copy/paste
- really simple structure using tags

---

## Open source

----

### What we intend to open source

- Editor
- ...

----

### When do we intend to open source

- As soon as core version is stable

---

## Addendum

For more information, see:

- https://draftjs.org/docs/getting-started
- draft.js intro talk: https://www.youtube.com/watch?v=feUYwoLhE_4
- other resources available online; plugins, blog posts, video tutorials, even a course on Udemy
- https://github.com/immutable-js/immutable-js

---

### Thank you! :bow:

- Questions? Reach out to me after the talk

repository: asfaltboy/notes

repo_name: asfaltboy/notes


text:
---
layout: default
---

# 1997-07-18 - Re: court order required for keys?

## Header Data

From: TruthMonger<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: a96621d0db52e3c02a2b8d6b167e2f6145ab7a1962fe5a1d8b8f19cefc0cb42b

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-07-18 08:39:43 UTC

Raw Date: Fri, 18 Jul 1997 16:39:43 +0800

## Raw message

```
{% raw  %}From: TruthMonger<EMAIL_ADDRESS>Date: Fri, 18 Jul 1997 16:39:43 +0800
To<EMAIL_ADDRESS>Subject: Re: court order required for keys?
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Roger Schlafly wrote:
> Posted online news accounts of the McCain-Kerrey bill have implied
> that the a court order is required under the bill to get keys.
>     [AP, 07/09/1997]
>     As with wiretaps, authorities would have to obtain court orders to make
>     the keys available for law enforcement.     ^^^^^^^^^^^^^^^^^^^
>     [Wired, 11.Jul.97]
>     Law enforcement could then access that copy of your key
>     through a court order.
>     ^^^^^^^^^^^^^^^^^^^^^
>
> I find this distressing, because I have read the bill, and a court order
> is most emphatically NOT required.  Only a form specified by J. Reno.

  Most people don't realize that many of the so-called protections that
are in place to guard our constitutional rights and our privacy only
apply to _use_ of the material in an _official_ proceeding, such as a
trial or hearing.
  Government, private agencies and corporations daily exchange all
manner
of supposedly private information, often using court orders only to
_officially_ get portions of what they already had. It is no accident
that LEA's often get court orders asking only for access to certain
incriminating information (since they've already done the "fishing").

This is a tricky point in the bill, but notice that:
> (1) Court orders are not required for wiretaps in the US.  While it may
> be true that court orders are used most of the time when wiretap evidence
> is used in a criminal trial, there are a number of exceptions.

  Also, many of the wiretaps have already been in place when the
court orders are applied for. "Redating" of wiretap records is a
common and sophisticated part of LEA practice. NSA has a database
that is used to cull out wiretap references which are out of sync
with the purported time-stamp on records. It lists all worldwide
social and religious time-sequence indentifiers such as Easter,
Hannuka, the running of the bulls, sports contests and playoffs,
etc.

> (2) There is no restriction in the bill to getting keys to decipher
> communications covered by the wiretap
>  Under S.909,
> if the cops can get access to the data, then they can get the keys
> without any court order.

  Which they no doubt will do and apply for the court order after they
have found what they want. This will be even more effective than their
voice-wiretap methods have been because their will be no need to redate
the information they claim as being found after getting the court order
since files, unlike voices, linger.

> (4) In S.909, all of the requirements on law enforcement officials
> can be lifted by executive order.

  Which means it can be done _retroactively_ with a nod, a wink, and
a few simple strokes of a pen.

  S.909 quite simply butt-fucks the Constitution and the citizenry.
The shameless criminals on Capitol Hill of Manure no longer even
seriously pretend to be in the least concerned with Constitutional
issues. They think (and may be right) that they only have to chant
the "National Security" mantra a couple of times to absolve all of
their sins against the Constitution.

TruthMonger

{% endraw %}
```

## Thread

+ Return to [July 1997](/archive/1997/07)

+ Return to "[TruthMonger <tm@dev.null>](/authors/truthmonger_tm_at_dev_null_)"

+ 1997-07-18 (Fri, 18 Jul 1997 16:39:43 +0800) - Re: court order required for keys? - _TruthMonger<EMAIL_ADDRESS>


text:
Names:
- Riley Cohen
- Kyle Hong
- Ben Lawrence

Net Ids:
- rsc30
- bcl19
- sh394

# Refactoring Lab

## GUI

There were two main issues with the GUI that caused a lot of errors in the design checkup app. They were:

1. The incorrect use of private final vs. private static final variables
    - There were some instances were I declared private final variables that never changed values. In these cases I should have declared public static final variables. I was able to fix all of these issues during the lab time.

2. The use of "magic numbers:"
    - There were some cases where I used numbers instead of named position variables. This specifically occured in the controllerBox class, where I use a grid plane to place buttons. The function to place an item on a grid plane takes 4 integer (row, column, length, width) and I hard-coded these integers. I will either move them to the ResourceBundle or make them private static final before sumbmitting the completed project.

From a design perspective, I was pretty satisfied with the GUI. It seems to be abstract and flexible enough to incorporate all of the new requirements for this project.

## Configuration
1. Use of Specific implementattion class
    - I had a lot of specific implementation class such as "ArrayList". The change made to the each rules in order to use Java collection interfaces such as "List".

2. Use of complex expression.
    - I had an expression which had four conditional operators in just one expression, so I pulled out one of the conditional operators and made it into a method that returns a boolean value.

3. Use of magic numbers
    - I had a lot of magic numbers in both cofiguration and rules classes, so I changed them to well-named constants and used the constants instead.

## Backend
The first change made to the Backend was to add curly brackets to all the single line if statements. For example, the code

```java=
if (col.getState() == SegregationCellStates.EMPTY.getState())
    emptyCells.add(col);
```

was changed to

```java=
if (col.getState() == SegregationCellStates.EMPTY.getState()) {
    emptyCells.add(col);
}
```

This change does not affect the functionality or even really the overall design of the code. However, in the event that a future programmer wishes to add more functionality to this `if` statement, then the curly braces are required.

______________________

The next code issue that was changed was the removal of unused methods. In `GameOfLifeGraph.java`, there was a method called `removeDissatisfied()` that was empty and never called. This method was left over from a copy-and-paste from `SegregationGraph.java` and had been forgotten about until we used the code refactoring tool in class.

_____________

Finally, the nested `ArrayList` that is holding the graph structure for `GameOfLive.java` was accidentally left public for testing purposes as seen below:

```java
public ArrayList<ArrayList<GameOfLifeCell>> cells;
```

This was quickly refactored to be private so that other code which has an instance of `GameOfLifeGraph` cannot simply use say `GameOfLifeGraph.cells` to modify the graph data. The new code is seen below:

```java
private ArrayList<ArrayList<GameOfLifeCell>> cells;
```


text:
# Cost Structure & Revenue Stream

| Costs | Startup | Year 1 | Year 2 | Year 3 |
|---|---|---|---|---|
| AWS Database Server | $122,120 | $1,465,434 | $2,930,868 | $2,930,868 |
| AWS Website Server | $42,647 | $511,759 | $511,759 | $511,759 |
| AWS Office Server | $42,647 | $511,759 | $1,023,517 | $1,023,517 |
| AWS Customer Service Server | $42,647 | $511,759 | $1,023,517 | $1,023,517 |
| Payroll/100 employees | $400,000 | $2,000,000 | $4,000,000 | $4,000,000 |
| Health Insurance | $0.00 | $5,000,000 | $10,000,000 | $10,000,000 |
| Office Building lease | $416,667 | $5,000,000| $5,000,000 | $5,000,000 |
| Utilities | $525,000 | $6,300,000 | $6,300,000 | $6,300,000 |
| Office Furniture | $150,000 | $750,000 | $1,500,000 | $0.00 |
| Office Electronics | $200,000 | $1,000,000 | $2,000,000 | $0.00 |
| Digital Training Record Creation | $50,000  |$0.00 | $0.00 | $0.00 |
| CEO's Salaries | $0.00 | $350,000 | $350,000 | $350,000 |
| Advertisement | $10,000 | $120,000 | $120,000 | $120,000 |
| | | | | |
| TOTAL COST | $2,001,728 | $23,520,531 | $34,759,661 | $31,259,661 |
| | | | | |
| **Revenue** |Startup | Year 1 | Year 2 | Year 3 |
| Number of Customers | 1 | 1 | 2 | 4 |
| DTR ($1.00/customer employee) | $0.00 | $26,400,000 | $36,484,800 | $39,184,800 |
| DTR Training Plan ($0.25/customer employee | $0.00 | $550,000 | $210,000 | $56,250 |
| | | | | |
| TOTAL REVENUE | $0.00 | $26,950,000 | $36,694,800 | $39,241,050 |
| | | | | |
| TOTAL PROFIT | $-2,001,728 | $3,429,469 | $1,935,139 | $7,981,389 |

- For the servers we used AWS TCO Calculator https://awstcocalculator.com/#

- Database Server: 1 server - 256GB memory - 4 processors - 6 cores - DB - Linux OS - SQL Server Enterprise (BYOL) - 3 sets of storage capacity 1000TB each - SSD (Doubled in size for year 2)

- Website Server: 1 server - 256GB memory - 4 processors - 6 cores - NON DB - Linux OS - 1 sets of storage capacity 1000TB each - SSD (Doubled in size for year 2)

- Office Server: 1 server - 256GB memory - 4 processors - 6 cores - NON DB - Linux OS - 1 sets of storage capacity 1000TB each - SSD (Doubled in size for year 2)

- Customer Service Server - 1 server - 256GB memory - 4 processors - 6 cores - NON DB - Linux OS - 1 sets of storage capacity 1000TB each - SSD (Doubled in size for year 2)

- Payroll - $25.00/hour for a 40hr work week

- Health Insurance - numbers based off $14,400 with the employee paying $4,400 annually https://www.shrm.org/resourcesandtools/hr-topics/benefits/pages/employers-adjust-health-benefits-for-2019.aspx#:~:text=The%20total%20cost%20of%20health,up%20from%20%2414%2C099%20this%20year.

- Building lease - For 1000 employees we will need at least 200sqft per employee as well as space for servers and common areas. Assuming 250k sqft will be enough space @ $20.00/sqft/year which appears to be the higher end average for omaha area https://www.loopnet.com/search/retail-space/omaha-ne/for-lease/. It makes more sense to lease a bigger building from the beginning to house our prospective employees than have to move locations multiple times to house increasing employees.

- Utilities - according to altenergymag.com the avg cost of utilites per sqft is $2.10 https://www.altenergymag.com/article/2019/07/what-is-the-average-utility-cost-per-square-foot-of-commercial-property/31382

- Office Furniture & Electronics - According to David Cummings the average per person cost of office furnitures is about $1500.00 and average cost of electronics is $2000.00 https://davidcummings.org/2011/03/07/costs-to-furnish-a-nice-startup-office/#:~:text=Here%20are%20ballpark%20costs%20to,nice%20cubicles%20are%20%243%2C500%2Fperson)

- Digital Training Record creation is based off an inflated estimate from isitwp.com claiming "feature-rich, cutom-built websites can go as high as $30,000 or more" https://www.isitwp.com/how-much-does-it-cost-to-build-a-website-expert-answer/#:~:text=Depending%20on%20your%20needs%2C%20building,domain%20name%20and%20web%20hosting.

- CEO Salaries were obtained from Glassdoor searches

- For the Customers, our first customer would be Walmart who has 2,200,000 employees and the revenue is based on charging Walmart $1.00/employee.

- Year 2 assumes we get Amazon as a second customer who has 840,400 employees

- Year 3 adds Boeing and Delta who have 145,00 and 80,000 employees respectively

- Based on the total profit this business is financially viable given we could get the start-up funds and there is a lot of room for error and unknown expenditures in the profit margin.


text:
# Unseen Object Amodal Instance Segmentation (UOAIS)

Seunghyeok Back, Joosoon Lee, Taewon Kim, Sangjun Noh, Raeyoung Kang, Seongho Bak, Kyoobin Lee

This repository contains source codes for the paper "Unseen Object Amodal Instance Segmentation via Hierarchical Occlusion Modeling."

[[Paper]](https://arxiv.org/abs/2109.11103) [[Project Website]](https://sites.google.com/view/uoais) [[Video]](https://youtu.be/rDTmXu6BhIU)

## Updates & TODO Lists
- [X] (2021.09.26) UOAIS-Net has been released
- [ ] Add train and evaluation code
- [ ] Release synthetic dataset (UOAIS-Sim) and amodal annotation (OSD-Amodal)
- [ ] Add ROS inference node

## Getting Started

### Environment Setup

Tested on Titan RTX with python 3.7, pytorch 1.8.0, torchvision 0.9.0, CUDA 10.2.

1. Download
```
git clone https://github.com/gist-ailab/uoais.git
cd uoais
mkdir output
```
Download the checkpoint at [GDrive](https://drive.google.com/drive/folders/1D5hHFDtgd5RnX__55MmpfOAM83qdGYf0?usp=sharing) and move the downloaded folders to the `output` folder

2. Set up a python environment
```
conda create -n uoais python=3.7
conda activate uoais
pip install torch torchvision
pip install shapely torchfile opencv-python pyfastnoisesimd rapidfuzz
```
3. Install [detectron2](https://detectron2.readthedocs.io/en/latest/tutorials/install.html#install-pre-built-detectron2-linux-only)
4. Build and install custom [AdelaiDet](https://github.com/aim-uofa/AdelaiDet)
```
python setup.py build develop
```

### Run with Sample Data

UOAIS-Net (RGB-D)
```
python tools/run_sample_data.py
```

## License

This repository is released under the MIT license.

## Citation
If you use our work in a research project, please cite our work:
```
@misc{back2021unseen,
      title={Unseen Object Amodal Instance Segmentation via Hierarchical Occlusion Modeling},
      author={Seunghyeok Back and Joosoon Lee and Taewon Kim and Sangjun Noh and Raeyoung Kang and Seongho Bak and Kyoobin Lee},
      year={2021},
      eprint={2109.11103},
      archivePrefix={arXiv},
      primaryClass={cs.RO}
}
```

repository: DhanushkaNadeeshan/uoais

repo_name: DhanushkaNadeeshan/uoais


text:
# HeronSquareRoot
Simple square root calculation with the "Heron" algorithm in Java, Pyhton and Golang.

## How to run this ?

#### Golang

```sh
go run run Golang/main.go
```

#### Python
```sh
python3 Python/main.py
```

#### Java
Urgh, yout didn't stopped reading at the python section ??

repository: timrabl/playground

gha_language: Java

repo_name: timrabl/playground


text:
# Python Flask Web App

This app will feed a search query to the GitHub API which it detects in the browser URL, wait for the response then render the results in a web page

To run it do this on the Linux command line :

`$ export FLASK_APP=application.py`

`$ flask run`

CTRL-click on link in command terminal and append _navigator?search_term=mySearchTerm_

eg. to find repositories related to the raspberry pi:
http://<IP_ADDRESS>:5000/navigator?search_term=raspberry

Aallow it time to query the API and display - usually around 15 seconds.
Ignore any error message in the browser during that time.

Then change the query word in the URL in the browser to another one and repeat.

Once it has rendered it looks like this:

![GitHub query screenshot](screenshot.png)

repository: aktivkohle/flask-app

repo_name: aktivkohle/flask-app


text:
#  Installing Helm

To install Helm we only have to get the tar file from https://github.com/helm/helm/releases and execute:

```
helm init
```

But there are other options. For example,

```
helm init --history-max 50
```

Setting `--history-max` on helm init is recommended as configmaps and other objects in helm history can grow large in number if not purged by max limit. Without a max history set the history is kept indefinitely, leaving a large number of records for helm and tiller to maintain.

### Setting up RBAC for tiller

```
kubectl -n kube-system create sa tiller

kubectl create clusterrolebinding tiller-cluster-rule \
    --clusterrole=cluster-admin \
    --serviceaccount=kube-system:tiller

helm init --skip-refresh --upgrade --service-account tiller
```

### Other Helm options

The `--node-selectors` flag allows us to specify the node labels required for scheduling the Tiller pod.

```
helm init --node-selectors "roles"="admin"
```

`--override` allows you to specify properties of Tiller’s deployment manifest.

```
helm init \
    --override "spec.template.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].weight"="1" \
    --override "spec.template.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].preference.matchExpressions[0].key"="my-team-nodes"
```

## Helm and Openshift

Helm runs in Openshift, however, it's important to note that Openshift doesn't allow to run containers as root and many Helm charts in public repos do not comply with this policy.

### Securing Helm

There are 3 aspects to make Helm more secure:

* Using proper RBAC rules.
* Using TLS.
* Using a secure backend for storing release information.

```
helm init \
--override 'spec.template.spec.containers[0].command'='{/tiller,--storage=secret}' \
--tiller-tls \
--tiller-tls-verify \
--tiller-tls-cert=cert.pem \
--tiller-tls-key=key.pem \
--tls-ca-cert=ca.pem \
--service-account=accountname
```

### Helm Options

```
Environment:
  $HELM_HOME          set an alternative location for Helm files. By default, these are stored in ~/.helm
  $HELM_HOST          set an alternative Tiller host. The format is host:port
  $HELM_NO_PLUGINS    disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins.
  $TILLER_NAMESPACE   set an alternative Tiller namespace (default "kube-system")
  $KUBECONFIG         set an alternative Kubernetes configuration file (default "~/.kube/config")

Usage:
  helm [command]

Available Commands:
  completion  Generate autocompletions script for the specified shell (bash or zsh)
  create      create a new chart with the given name
  delete      given a release name, delete the release from Kubernetes
  dependency  manage a chart's dependencies
  fetch       download a chart from a repository and (optionally) unpack it in local directory
  get         download a named release
  history     fetch release history
  home        displays the location of HELM_HOME
  init        initialize Helm on both client and server
  inspect     inspect a chart
  install     install a chart archive
  lint        examines a chart for possible issues
  list        list releases
  package     package a chart directory into a chart archive
  plugin      add, list, or remove Helm plugins
  repo        add, list, remove, update, and index chart repositories
  reset       uninstalls Tiller from a cluster
  rollback    roll back a release to a previous revision
  search      search for a keyword in charts
  serve       start a local http web server
  status      displays the status of the named release
  template    locally render templates
  test        test a release
  upgrade     upgrade a release
  verify      verify that a chart at the given path has been signed and is valid
  version     print the client/server version information

Flags:
      --debug                           enable verbose output
      --home string                     location of your Helm config. Overrides $HELM_HOME (default "/Users/ipedrazas/.helm")
      --host string                     address of Tiller. Overrides $HELM_HOST
      --kube-context string             name of the kubeconfig context to use
      --kubeconfig string               absolute path to the kubeconfig file to use
      --tiller-connection-timeout int   the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
      --tiller-namespace string         namespace of Tiller (default "kube-system")
```

## Exercises:

1.- Install Helm in your minikube cluster with the following configuration:

* We want `tiller` to run in the `helm-system` namespace
* Make sure that we don't keep more than 10 versions of each release.
* Tiller runs in a node with the `platform` label

2.- Create a set of configurations for:

* Local (minikube)
* Lab
* Development environment (air gap)

repository: ipedrazas/training

repo_name: ipedrazas/training


text:
# Gitlab Events

This folder contains samples for every gitlab event sent to the webhook app in json format.

Reference: https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#events

All messages will use the following topic schema: `org.centos.$ENV.gitlab.$ORG_NAME.$REPO_NAME.$KIND` where:

* `$ENV`: indicates the topic/mq env, either "prod" or "stg";
* `$ORG_NAME`: The repository organization name, such as `centos`;
* `$REPO_NAME`: The repository name which the event was triggered;
* `$KIND`: the gitlab object kind such as `issue`, `push`, etc; those can be found in the sample json files.

## Events

All events will send its event name in a HTTP header `X-Gitlab-Event` which will be included in the messaging body.

### Push

**Name:** `Push Hook`

**File:** [push.json](./push.json)

**Notes:** Will limit itself to the last 20 commits for performance reasons.

### Tag

**Name:** `Tag Push Hook`

**File:** [tag.json](./tag.json)

**Notes:** Triggered by tag changes, either creation or deletion.

### Tag

**Name:** `Issue Hook`

**File:** [issue.json](./issue.json)

**Notes:** Triggered by issue changes (creation, modification or deletion).

### Comments

Triggered when a comment is added, it can be added in the following objects:

* commit
* merge request
* issue
* code snippet

The hook body will contain specific data for each object.

#### Commit

**Name:** `Note Hook`

**File:** [comment_commit.json](./comment_commit.json)

**Notes:** Triggered when a comment is added in a push commit.

#### Merge Request

**Name:** `Note Hook`

**File:** [comment_commit.json](./comment_merge_request.json)

**Notes:** Triggered when a comment is added in a merge request.

#### Issue

**Name:** `Note Hook`

**File:** [comment_issue.json](./comment_issue.json)

**Notes:** Triggered when a comment is added in an issue.

#### Code Snippet

**Name:** `Note Hook`

**File:** [comment_snippet.json](./comment_snippet.json)

**Notes:** Triggered when a comment is added in a code snippet.

### Merge Request

**Name:** `Merge Request Hook`

**File:** [merge_request.json](./merge_request.json)

**Notes:** Triggered when a merge request is created or updated, including if new commits were added to it.

### Wiki Pages

**Name:** `Wiki Page Hook`

**File:** [wiki_page.json](./wiki_page.json)

**Notes:** Triggered when a wiki page is created, modified or deleted.

### Pipeline

**Name:** `Pipeline Hook`

**File:** [pipeline.json](./pipeline.json)

**Notes:** Triggered whenever there are changes in a pipeline status.

### Job

**Name:** `Job Hook`

**File:** [job.json](./job.json)

**Notes:** Triggered when there is a change in a job status.

### Deployment

**Name:** `Deployment Hook`

**File:** [deployment.json](./deployment.json)

**Notes:** Triggered by a deployment status change (gitlab CD).

### Release

**Name:** `Release Hook`

**File:** [release.json](./release.json)

**Notes:** Triggered whenever a release is created or updated.

repository: mscherer/gitlab-webhooks

repo_name: mscherer/gitlab-webhooks


text:
<!-- dx-header -->
# BAM to Goby Converter (DNAnexus Platform App)

This is the source code for an app that runs on the DNAnexus Platform.
For more information about how to run or modify it, see
https://wiki.dnanexus.com/.
<!-- /dx-header -->

**What does this app do?**

Convert a BAM alignment into an equivalent [Goby](http://campagnelab.org/software/goby/) alignment.

**How does this app work?**

Using the _parallel-bam-to-goby_ script from [Variation Analysis](https://github.com/CampagneLaboratory/variationanalysis), this app converts an alignment from BAM format to Goby format.
The app runs inside a Docker image for an improved reproducibility of the results.

**What data are required for this app to run?**

* An alignment in BAM format and its index.
* A genome in the FASTA format. This must be the genome that the alignment was made against.
* The version of the Docker image to use. Default is set to the version that was tested with the app.
  * **WARNING**:  We discourage to use `latest` as version because runs at different times may give different results if the image changes

**What does this app output?**
* An alignment in the Goby format.

gha_language: Shell


text:
# The Great Montgomery Hackathon

The Great Montgomery Hackathon, February 8th and 9th, 2014.

See the [wiki](https://github.com/hackmontgomery/thegreatmontgomeryhackathon/wiki) for more information about the event and the projects we'll be working on.


text:
# Introduction

**Cloud.iO** is a scalable **open source** Internet of Things solution licensed under the **MIT license**. It offers an infrastructure to **monitor** and
**control** a huge number of I/O devices from a central cloud platform. cloud.iO can provide both, **real-time** monitoring and control data and **historic**
data storage in a single place. Using state of the art **encryption** and certificate-based **authentication** for all connections (embedded Device Endpoints
and applications accessing the actual data) and offering **flexible access control** mechanisms, cloud.iO is the ideal platform in order to drive your data
acquisition projects on one single platform. It’s **scalable** architecture allows it to grow with your needs.

- [Introduction](introduction)
- About cloud.iO
	- [The cloud.iO ecosystem](/about_cloudio/ecosystem)
	- [The data model](/about_cloudio/data_structure)
	- [The architecture](/about_cloudio/architecture)
- Getting Started
	- [Quickstart guide](/getting_started/quickstart_guide)
	- [Deploy cloud hosted infrastructure](/getting_started/deploy)
	- [API documentation](/getting_started/api_documentation)
	- [Commission a cloud.iO endpoint](/getting_started/commission)
- Data Access
	- [Introduction](/data_access/introduction)
	- [HTTP](/data_access/http)
	- [Websocket](/data_access/websocket)
	- [MQTT](/data_access/mqtt)
	- [Python Library](/data_access/python_library)
- Endpoint Development
	- [Introduction](/develop_endpoint/introduction)
	- [Java](/develop_endpoint/java)
	- [Python](/develop_endpoint/python)
	- [Factory](/develop_endpoint/factory)
- Endpoint Management
	- [UUID - friendlyName](/endpoint_management/friendly_name_uuid)
	- [Endpoint groups](/endpoint_management/endpoint_groups)
- Access Permissions
	- [Endpoint permissions](/access_permissions/endpoint_permissions)
	- [Element permissions](/access_permissions/element_permissions)
- User Management
	- [Authorities](/user_management/authorities)
- Modbus cloud.iO gateway
	- [Introduction](/modbus-cloudio-gateway/introduction)
	- [Device model](/modbus-cloudio-gateway/device_model)
	- [Data model](/modbus-cloudio-gateway/data_model)
	- [Mapping](/modbus-cloudio-gateway/mapping)
	- [Cloud.iO properties](modbus-cloudio-gateway/cloudio_properties)
	- [Gateway configuration](modbus-cloudio-gateway/gateway_config)
- Contribute
	- [Contribute](/contribute/contribute)


text:
---
metaTitle: "JavsScript - Battery Status API"
description: "Battery Events, Getting current battery level, Is battery charging?, Get time left until battery is empty, Get time left until battery is fully charged"
---

# Battery Status API

## Battery Events

```js
// Get the battery API
navigator.getBattery().then(function(battery) {
    battery.addEventListener('chargingchange', function(){
        console.log( 'New charging state: ', battery.charging );
    });

    battery.addEventListener('levelchange', function(){
        console.log( 'New battery level: ', battery.level * 100 + "%" );
    });

    battery.addEventListener('chargingtimechange', function(){
        console.log( 'New time left until full: ', battery.chargingTime, " seconds" );
    });

    battery.addEventListener('dischargingtimechange', function(){
        console.log( 'New time left until empty: ', battery.dischargingTime, " seconds" );
    });
});

```

## Getting current battery level

```js
// Get the battery API
navigator.getBattery().then(function(battery) {
    // Battery level is between 0 and 1, so we multiply it by 100 to get in percents
    console.log("Battery level: " + battery.level * 100 + "%");
});

```

## Is battery charging?

```js
// Get the battery API
navigator.getBattery().then(function(battery) {
    if (battery.charging) {
        console.log("Battery is charging");
    } else {
        console.log("Battery is discharging");
    }
});

```

## Get time left until battery is empty

```js
// Get the battery API
navigator.getBattery().then(function(battery) {
    console.log( "Battery will drain in ", battery.dischargingTime, " seconds" );
});

```

## Get time left until battery is fully charged

```js
// Get the battery API
navigator.getBattery().then(function(battery) {
    console.log( "Battery will get fully charged in ", battery.chargingTime, " seconds" );
});

```

#### Remarks

Note that the Battery Status API is no longer available due to privacy reasons where it could be used by remote trackers for user fingerprinting.

The Battery Status API is an Application Programming Interface for the client's battery status. It provides information on:

1. battery charging state via `'chargingchange'` event and `battery.charging`;
1. battery level via `'levelchange'` event and `battery.level`;
1. charging time via `'chargingtimechange'` event and `battery.chargingTime`;
1. discharging time via `'dischargingtimechange'` event and `battery.dischargingTime`.

MDN Docs: [https://developer.mozilla.org/en/docs/Web/API/Battery_status_API](https://developer.mozilla.org/en/docs/Web/API/Battery_status_API)

repository: haifenghuang/generate

repo_name: haifenghuang/generate


text:
# Jewel 2.2.0 Docker

This `Dockerfile` produces a docker image with `Jewel 2.2.0`, running with `lhapdf-5.9.1`.

The available PDFs are `cteq6ll` and `EPS09LOR_208`, which are the necessary ones for jewel's default runs.


text:
# normalizr [![build status](https://img.shields.io/travis/paularmstrong/normalizr/master.svg?style=flat-square)](https://travis-ci.org/paularmstrong/normalizr) [![Coverage Status](https://img.shields.io/coveralls/paularmstrong/normalizr/master.svg?style=flat-square)](https://coveralls.io/github/paularmstrong/normalizr?branch=master) [![npm version](https://img.shields.io/npm/v/normalizr.svg?style=flat-square)](https://www.npmjs.com/package/normalizr) [![npm downloads](https://img.shields.io/npm/dm/normalizr.svg?style=flat-square)](https://www.npmjs.com/package/normalizr)

# 📣 Normalizr is no longer maintained

Due to lack of ability to find an invested maintainer and inability to find time to do routine maintenance and community building, this package is no longer maintained. Please see the discussion [🤝 Maintainer help wanted](https://github.com/paularmstrong/normalizr/discussions/493) for more information.

## FAQs

### Should I still use Normalizr?

If you need it, yes. Normalizr is and has been at a stable release for a very long time, used by thousands of others without issue.

### What should I do if I want other features or found a bug?

Fork [Normalizr on Github](https://github.com/paularmstrong/normalizr) and maintain a version yourself.

### Can I contribute back to Normalizr?

There are no current plans to resurrect this origin of Normalizr. If a forked version becomes sufficiently maintained and popular, please reach out about merging the fork and changing maintainers.

repository: paularmstrong/normalizr

repo_name: paularmstrong/normalizr


text:
# Changelog

## v0.6.0 (unreleased)

- Add a `quic.Config` option for QUIC versions
- Add a `quic.Config` option to request truncation of the connection ID from a server
- Add a `quic.Config` option to configure the source address validation
- Add a `quic.Config` option to configure the handshake timeout
- Changed the log level environment variable to only accept strings ("DEBUG", "INFO", "ERROR"), see [the wiki](https://github.com/lucas-clemente/quic-go/wiki/Logging) for more details.
- Various bugfixes


text:
---
title: Top new features in Python 3.8
date: '2019-07-26T11:11:00.284Z'
image: cover.png
author: Robert
---

Python is one of the most popular languages today with the biggest community of all and excellent libraries. People love it for beautiful code, rapid development and sometimes call the language interactive. In latest 3.8 Python version we can find have several outstanding features. This article will describe some of the new features of Python 3.8.

#1. Positional-only parameters (/)

If you want to create a Python function that allows parameters, then you can pass the arguments by position or by keyword.

But what if:

- We want to limit the callers of our API to only call our function by passing in parameters by position?
- Our parameter names do not make meaning to the external world?
- Or we might want to rename the parameters in the future?
- ...And we want to make our API backwards compatible?

Then, positional-only parameter functionality “/” solves it. Let's check our example:

```
def add(x, y, z, c=None, /):
    a = x+y+z
    if c is not None:
        a = a+c
    return a
```

The function “add” accepts three necessary parameters: x,y and z, and an optional parameter c. The last parameter “/” means that the parameters of the function must be specified positionally.  We cannot call the function by passing in parameters by keyword.

- Add(1,2,3) and add(1,2,3,4) are valid calls.
- Add(a=1,b=2,c=3) or add(1,2,3,d=4) are all invalid calls.

Result of the “/” parameter means that the function allows positional-only parameters and thus the arguments must be mapped to the parameters based solely on their position.

Read more here on new features in Python 3.8 [here](https://docs.python.org/3.8/whatsnew/3.8.html).

#2. Assignment Expressions ":="

Also known as walrus operator. It allocates values to variables as part of an expression. There's no need to initialize the variables upfront.

Consider this example:

```
if (variable_a := get_input()) is not None:
 print(variable_a) #exists now
 perform_action(variable_a);
```

Checking the sample above variable_a didn't exist before the line was performed. The walrus operator ":=" declared and initialized the variable “variable_a”. The return of the function “get_input()” is used to attach a value to the variable. As a result, we can now print the value of the variable_a variable. This feature is possible in statement forms and list comprehensions

There are two important points to note. First, assure the designation of the variable is parenthesized. Unparenthesized assignment expressions are forbidden at the top level of an expression statement:

```
variable_a := get_input() #Invalid
(variable_a := get_input()) #Valid but it is not recommended
```

Second, = and := are not the same, and the preference around the commas is different. Check this example below:

```
variable_a = a, b, c # Sets my_variable to (a, b, c)
(variable_a := a, b, c)  # Sets my_variable to a
```

Read more here on new features in Python 3.8 [here](https://docs.python.org/3.8/whatsnew/3.8.html).

#3. “fromisocalendar” has new date and datetime constructors

New constructors date and datetime have been added to return the ISO calendar object:

datetime.fromisocalendar(year, week, day)

This is the inverse of the function: datetime.isocalendar(). Essentially, it takes in the year, week and day and returns the corresponding ISO calendar date-time object.

date.fromisocalendar(year, week, day)

This is the inverse of the function: date.isocalendar(). Naturally, it takes in the year, week and day and returns the corresponding ISO calendar date object.

Read more here on new features in Python 3.8 [here](https://docs.python.org/3.8/whatsnew/3.8.html).

#4. For Debugging Ease, f-strings now support =

This is an enhancement to the f-strings. The specifier “=” can be joined to the f-strings now.

f -strings are in the form of f'{expr=}' Notice the ‘=’. The equal sign primarily evaluates the expression and prints the result too.

Let's check an example. Assume there are two variables “a ”and “b”, and we want to print “a-b” along with the result. We can use the f-strings=

```
a = 100
b = 50
print(f'{input-output=}')
```

The result would now print a-b=50.

It could make the code neater and you don't need to copy the formula on the right-hand side of the “=” to evaluate it. The side effect is that it can be used extensively during debugging.

Read more here on new features in Python 3.8 [here](https://docs.python.org/3.8/whatsnew/3.8.html).

repository: graphql-editor/graphql-blog

repo_name: graphql-editor/graphql-blog