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

title: "ROS Package cooperating OpenAI Gym and Baselines, MuJoCo Simulation environment, Gazebo Simulation and Facebook PyRobot/LoCoBot"
summary: "This package is used for training and validating the Deep RL control policy on the LoCoBot, a low-cost robot equipped with a 5 DOF robotic arm on top of a differential-drive mobile base. Deep RL Policy can be trained and validated in both MuJoCo and Gazebo Simulator."

authors: ["Tiga Leung"]
tags: ["deep-reinforcement-learning", "robotics-simulation", "gazebo", "ROS", "robotics"]
date: 2020-08-15

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

url_code: "https://github.com/Tiga002/pyrobot-rl"
url_video: "https://drive.google.com/drive/folders/1GBGuLYnam0C9iuvqqAJBNt118s-I8-6E?usp=sharing"
url_pdf: ""
url_slides: ""

---
Much inspired by [openai_ros], this Open-source ROS Package [pyrobot-rl] cooperating OpenAI Gym and Baselines, MuJoCo Simulation environment, Gazebo Simulation environment as well as Facebook PyRobot/LoCoBot. It can be used to train and validate Deep RL control policy in  both MuJoCo and Gazebo Simulator for the Facebook PyRobot supported LoCoBot.
<img src="LoCoBot.jpeg" height = "300" width="300"/>

## PyRobot
PyRobot is an open-source project developed by Facebook Research Group. It abstract away writing ROS nodes and launch files for controlling the robot. User can simply write a Python script and call its library function to control and manipulate the robot. Right now, they have only support LoCoBot as their hardware platform.

## Documentation
-- Under Construction


text:
# creco-cli

CLI Tool For Divops

```
npx creco-cli
```

# Reference

- https://github.com/arcanis/clipanion
- https://github.com/arcanis/typanion

license: MIT

repository: CreatiCoding/creco-cli

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: CreatiCoding/creco-cli


text:
Manual
======

*copy from https://addons.nette.org/nifty/nifty-grid translated and keep updated*

Base usage
----------

Create Grid in separate class (eusability, clarity). Each Grid extends from base Grid `\NiftyGrid\Grid`.

> For simplicity we will read data directly from database without models. In your own application you should use model. Examples below are written for Nette\Database.

For this example we have this database:

|id |category_id|user_id|title           |published          |status|views|
|---|-----------|-------|----------------|-------------------|------|-----|
|1  |10         |30     |Ford Mustang    |2015-08-12 12:33:45|1     |25   |
|2  |14         |26     |Chevrolet Camaro|2015-08-14 10:18:37|1     |18   |
|3  |8          |18     |Dodge Charger   |2015-08-15 14:45:55|0     |11   |

1. Create factory for Grid in presenter and give DB table to constructor.

```php
protected function createComponentArticleGrid()
{
    return new ArticleGrid($this->context->database->table('article'));
}
```

2. Create class with Grid. In method configure is all Grid settings. It has only one parameter Presenter which receive automatically from method Nette\Application\UI\PresenterComponent::attached().

```php
use \NiftyGrid\Grid;

class ArticleGrid extends Grid{

    protected $articles;

    public function __construct($articles)
    {
        parent::__construct();
        $this->articles = $articles;
    }

    protected function configure($presenter)
    {
        //Create data source for Grid
        //Allways select id
        $source = new \NiftyGrid\NDataSource($this->articles->select('article.id, title, status, views, published, category.name AS category_name, user.username, user.id AS user_id'));
        //Give source
        $this->setDataSource($source);
    }
}
```

3. Now you can create columns in method configure. Each column must have same name as name of column in DB table (or its alias).

```php
$this->addColumn('title', 'Title', '250px', 30);
$this->addColumn('username', 'Author', '100px');
$this->addColumn('published', 'Date', '100px');
$this->addColumn('status', 'Status', '100px');
$this->addColumn('views', 'Views', '100px');
```

First parameter (required) is name of column. Second parameter, label, is title of column. Third parameter is width of column - it can be in pixels or percents. Last parameter is truncation of text.

Method addColumn returns instance of class `NiftyGrid\Components\Column`

Settings

```php
//for disabling pagination and display all records
$this->paginate = FALSE;

//disable sorting of all columns
$this->enableSorting = FALSE;

//sets width of whole grid
$this->setWidth('1000px');

//default ordering
$this->setDefaultOrder("article.id DESC");

//sets variants of per page records in selectbox
$this->setPerPageValues(array(10, 20, 50, 100));

//disable sorting of scecific column
$this->addColumn('column', 'Column')
    ->setSortable(FALSE);

//settings of templates
$this->setTemplate('path/to/my/grid-template.latte');
$this->getPaginator()->setTemplate('path/to/my/paginator-template.latte');
```

Result formating
----------------

Before rendering you can format result data. For example in column published you can have only date. Do it by method setRenderer which has one parameter - anonymous function with parameter specific row.

```php
$this->addColumn('published', 'Date', '100px')
            ->setRenderer(function($row){return date('j.n.Y', strtotime($row['published']));})
```

You can render html tags with Nette\Utils\Html::el() e.g. link to author's profile

```php
$this->addColumn('username', 'Author', '100px')
        ->setRenderer(function($row) use ($presenter){return \Nette\Utils\Html::el('a')->setText($row['username'])->href($presenter->link("user", $row['user_id']));});
```

Cell formating
--------------

If you want to apply css style of cell according cells's value - you can use set CellRendering

```php
$this->addColumn('views', 'Views', '100px')
    ->setCellRenderer(function($row){return $row['views'] > 80 ? "background-color:#E4FFCC" : NULL;});
```

Row actions
-----------
`NiftyGrid\Components\Button`

For adding row action use method addButton. First parameter is name of button, second parameter is label (HTML attribute title).
Text of button you can define by method addText. Then you can define css class by method setClass, link by setLink, target by setTarget and confirmation dialog by setConfirmationDialog.

```php
$this->addButton("delete", "Remove item")
    ->setClass("btn btn-danger")
    ->setText("Del")
    ->setLink(function($row) {return $this->link("delete!", $row['id']);})
    ->setConfirmationDialog(function($row){return "Are you sure to remove article $row[title]?";});
```

> **Notice:**
> There is a problem with confirmation dialog (JS function confirm()), if you discard confirmation dialog AJAX request will be proceed anyway.
> This is solved in `assets/js/grid.ajax.js` file. If you use your own script don't forget fix this problem. Easiest solution is disable AJAX (see below) on columns with confirmation dialog.

If you don't use AJAX, e.g. redirect to another presenter, use method setAjax(FALSE).

```php
$this->addButton(...)
    ->setAjax(FALSE);
```

Text of button can be HTML code:
```php
$this->addButton(...)
    ->setText(Nette\Utils\Html::el('span')->setClass('glyphicon glyphicon-pencil'));  // <span class="glyphicon glyphicon-pencil"></span>
```

You can create action with different functions depending on row value. For example for publish/unpublish article.

```php
$this->addButton("publish")
	->setClass(function ($row) {return $row['status'] === 1 ? "btn btn-danger" : "btn btn-success";})
    ->setLabel(function ($row) {return $row['status'] === 1 ? "Unpublish" : "Publish";})
    ->setLink(function($row) {return $row['status'] === 1 ? $this->link("unpublish!", $row['id']) : $this->link("publish!", $row['id']);});
```

And display of button you can also control by anonymous function.

```php
$this->addButton("delete")
	->setShow(function($row) use ($presenter) {return $presenter->getUser()->isAllowed('Articles', 'delete');})
    ...
```

Mass actions
------------
`NiftyGrid\Components\Action`

For adding mass action use method addAction. Parameter id in method setCallback contains array with id of selected columns.

```php
$this->addAction("publish","Publish")
    ->setCallback(function($id) {return $this->publish($id);});
```

You can use confirmation dialog for mass action.

```php
$this->addAction("delete","Remove")
    ->setCallback(function($id) {return $this->delete($id);})
    ->setConfirmationDialog("Are you sure to remove all selected articles?");
```

Row editing
-----------

To enable row editing you must use row action with predefined constant.

```php
$this->addButton(Grid::ROW_FORM, "Fast edit")
    ->setClass("btn btn-primary")
	->setText("Edit");
```

Now the button for editing is active but no columns are marked as editable yet. For this use methods callable on columns.

```php
//textEditable is for text and number values
$this->addColumn(...)->setTextEditable();
$this->addColumn(...)->setDateEditable();
//in case of selectEditable the grid automaticaly try set default value according to array $values and allows editing attached tables
$this->addColumn(...)->setSelectEditable(array $values, $prompt)
$this->addColumn(...)->setBooleanEditable();

//for formating value in edit form
$this->addColumn(...)->setFormRenderer($callback);
```

For getting and saving values you must set callback in method configure.

```php
$this->setRowFormCallback(function($values){
    //db update, flash message, ..
});
```

Global action
-------------
`NiftyGrid\Components\GlobalButton`

Global action is basically global button with random link. It's defined by method addClobalButton and usage is similar like row action `NiftyGrid\Components\Button`.

```php
$this->addGlobalButton("export", "Exports data to CSV file")
	->setClass('btn btn-default')
	->setText('Export')
	->setLink(function() {return $this->link("export!");});  // notice that anonymous function doesn't have parameter $row - that's global action, not depend on any row
```

The most frequent use is for adding new record to database. This is very simple if there is enabled row editing - just set predefined constant ADD_ROW as first parameter:

```php
	$this->addGlobalButton(self::ADD_ROW, "Add new record")
		->setClass(...)
		->setText(...);
```

Filtering
---------

For filtering use 5 methods bellow

```php
setTextFilter();
setNumericFilter();
setDateFilter();
setSelectFilter(array $values, $prompt);
setMultiSelectFilter(array $values);
setBooleanFilter();
```
> In case of multiselect you can use attached javascript `assets/js/grid.multiselect.js`

If you want to filter data from column of joined table use method setTableName("table.column") on column.

```php
$dataSource = new NDataSource($articles->select("article.title, user.username AS username"));
...
$this->addColumn("username", "User")
        ->setTableName("user.username")
        ->setTextFilter();
```

Filtering of **text**

|entering to input|filter
|---|---|
|text	|contains  "text" |
|text%	|starts with  "text"|
|%text	|ends with  "text" |

Filtering of **number** and **date**

|entering to input|filter
|---|---|
|1	|equal 1|
|>1	|greater then 1|
|>=1|greater or equal 1|
|<1	|smaller then 1|
|<=1|smaller or equal 1|
|<>1|not equal 1|

Autocomplete
------------

You can use autocomplete only for text filter. It must be called after filter method.
First parameter is number of searched records second parameter sets search mode:
* constant `FilterCondition::STARTSWITH` (default) "suggests" words starting with entering string
* constant `FilterCondition::CONTAINS` "suggests" words contains entering string - usable especially with name/surname (Jack Daniels is suggested for "jac" or "dan")

```php
$this->addColumn('name', 'Full name')
    ->setTextFilter()
    ->setAutocomplete(15, FilterCondition::CONTAINS);
```

SubGrids
--------
`NiftyGrid\Components\SubGrid`

Each Grid can have more SubGrids. Each SubGrid can have more SubGrids. Adding SubGrid is very simple:

```php
$this->addSubGrid("comments", "Show comments of article")
    ->setGrid(new CommentGridByArticleId($presenter->context->database->table('comment'), $this->activeSubGridId))
    ->settings(function($grid){
        $grid->setWidth("800px");
        $grid['columns-title']->setWidth("400px");
    })
    ->setCellStyle("background-color:#f6f6f6; padding:20px;");
```

You give another predefined instance of Grid to method setGrid. Second parameter is $this->activeSubGridId - this is id of row which is parent of SubGrid - it is automatically set.

Simple Grid CommentGridByArticleId:

```php
use \NiftyGrid\Grid;

class CommentGridByArticleId extends Grid
{
    protected $comments;

    protected $article_id;

    public function __construct($comments, $article_id)
    {
        parent::__construct();
        $this->comments = $comments;
        $this->article_id = $article_id;
    }

    protected function configure($presenter)
    {
        $source = new \NiftyGrid\NDataSource($this->comments->select('comment.id, title, user.username')->where('article_id = ?', $this->article_id));

        $this->setDataSource($source);

        $this->addColumn("title", "Title");
        $this->addColumn("username", "Author");
    }

}
```

Lokalization
------------

By default grid uses class `NiftyGrid\Components\Translator` which implements `Nette\Localization\ITranslator`.
For translation whole grid just copy and translate file `localization/empty.json`.
Then define path to this file by method `NiftyGrid\Components\Translator::setLocalization()`,
where first parameter is path to file with translations or directly translated strings in array
or `Nette\Utils\ArrayHash` and second parameter is function to determine [plural forms](https://github.com/translate/l10n-guide/blob/master/docs/l10n/pluralforms.rst#plural-forms):

```php
public function __construct()
{
	parent::__construct();

    $this->getTranslator()->setLocalization('path/to/file.json', function($n) {
        return (($n == 1) ? 0 : ($n >= 2 && $n <= 4 ? 1 : 2));
    });
}
```
> it's necessary to set translator as soon as possible, the best place is in `__construct()`

Default `NiftyGrid\Components\Translator` is possible to replace with another translator (class implements `Nette\Localization\ITranslator`) - also as soon as possible:

```php
public function __construct(Nette\Localization\ITranslator $translator)
{
	parent::__construct();

    $this->setTranslator($translator);
}
```

repository: miloslavkostir/DataGrid

branch_name: refs/heads/master

repo_name: miloslavkostir/DataGrid


text:
Developing Zen Using Docker under Ubuntu
========================================

1. Execute [`01_install_docker.sh`](01_install_docker.sh) and follow the instructions in the last lines.
2. Choose
  - [develop Zen](develop)
  - [build docker](build)

repository: mzmudziak/cp-docker-development

repo_name: mzmudziak/cp-docker-development


text:
---
layout: default
title: ailtire action
permalink: cli-action
parent: Command Line Interface
---

# ailtire action

Manage ailtire actions. This includes the creation of an actions.

## Synopsis

```shell
ailtire action <command> [args]
ailtire action create --name "myaction" --package "myPackage"
ailtire action create --name "myaction" --package "myPackage" --model "mymodel"
```

## Description

This command creates an action for the package, placed in the interface directory.
Or in the model directory if the model parameter is given as well.

## Generated Assets

This command will generate an action *.js file based on the name of the action.
The following is an example of the action file for myaction.js
```javascript
module.exports = {
    friendlyname: 'myaction',
    description: 'Description of the action',
    static: false, // true is for class methods. false is for object based.
    inputs: {
        param1: {
            description: 'description of the parameter',
            type: 'object', // string|boolean|number|json|object
            required: true // true or false for required parameter.
        },
    },

    exits: {
        success: (retval) => {
            return retval;
        },
        json: (retval) => {
            return {id:retval.id}
        }
    },

    // This is the function that is run when the action is called.
    fn: function (obj, inputs, env) {
        return obj;
    }
};
```

See [Action Page](action) for more information about action definitions and calling them.

repository: madajaju/ailtire

gha_language: JavaScript

repo_name: madajaju/ailtire


text:
# Logful

[![Build Status](https://travis-ci.org/logful/logful-ios.svg?branch=master)](https://travis-ci.org/logful/logful-ios)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/logful/logful-ios/blob/master/LICENSE)

Logful remote logging sdk for iOS

## Dependency

```
pod 'Logful', '~> 0.3.0'
```

## Usage

### Initialize logful iOS sdk

``` objc
#import "AppDelegate.h"
#import <Logful/Logful.h>

@interface AppDelegate ()

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
  didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [GTLoggerFactory init];
    return YES;
}
```

### Log message use logful iOS sdk

``` objc
// Use default logger
GLOG_DEBUG(@"TAG", @"debug message");

// Use custom logger
GTLogger *logger = [GTLoggerFactory logger:@"sample"];
[logger verbose:@"TAG" msg:@"verbose message"];
```

### Log message with screenshot use logful iOS sdk

``` objc
// Use default logger
GLOG_DEBUG_CAPTURE(@"TAG", @"debug message");

// Use custom logger
GTLogger *logger = [GTLoggerFactory logger:@"sample"];
[logger verbose:@"TAG" msg:@"verbose message" capture:YES];

```

## License
The MIT License (MIT)

Copyright (c) 2015-2016 Zhejiang Meiri Hudong Network Technology Co. Ltd.

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

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

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

repository: logful/logful-ios

gha_language: Objective-C

repo_name: logful/logful-ios


text:
---
sidebar: false
outline: false
---

<Hero />

## Usage example

```html
<portal to="destination">
  <p>This slot content will be rendered wherever the
    <portal-target> with name 'destination'
    is located.
  </p>
</portal>

<portal-target name="destination">
  <!--
  This component can be located anywhere in your App
  (i.e. right before the </body> tag, good for overlays).
  The slot content of the above portal component will be rendered here.
  -->
</portal-target>
```

repository: LinusBorg/portal-vue

gha_language: Vue

gha_license_id: MIT

repo_name: LinusBorg/portal-vue


text:
# Pytorch Chatbot

A simple example on implementing a seq2seq bidirectional GRU encoder-decoder network using pytorch for creating a chatbot. The cornell movie-dialogs corpus dataset is used for training:

* 220,579 conversational exchanges between 10,292 pairs of movie characters
* 9,035 characters from 617 movies
* 304,713 total utterances

The dataset is preprocessed into a suitable format for training.

This seq2seq network uses Luong's Global Attention to improve training by paying attention only to certain parts of the encoder output sequence.

## Getting Started

### Prerequisites

The program requires the following dependencies.

* python 3.6
* pytorch
* CUDA (for using GPU)

### Installing

1. Download movie corpus data from [here](https://www.cs.cornell.edu/~cristian/Cornell_Movie-Dialogs_Corpus.html), create a new folder called 'data' in the current directory and place the dataset in that folder.

2. Create new virtual environment (recommended)

```
conda create -n pytorch-chatbot python=3.6
```

3. Install required python packages

```
pip install -r requirements.txt
```

## Running

### Training and Testing

To simultaneously train and evaluate the model, simply run `main.py`.

The model is saved at certain training intervals. By saving all the metadata of the model-in-training, the model can continue training midway through or be loaded for evaluation. You can also chat with the trained chatbot by uncommenting "evaluateInput".

## License

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

## Acknowledgments

* The Pytorch Team

repository: AaronGrainer/pytorch-chatbot

gha_language: Python

repo_name: AaronGrainer/pytorch-chatbot


text:
---
path: "/news/alternatives.md"
date: "2019-11-27"
title: "Poem: Alternatives?"
abstract: "Poem: Alternatives?"
category: "Test"
image: "./images/DRAGON.JPG"
author: "Tiedotuskeskus Hanhikivi"
---

# Alternatives?

_It is gonna be nuclear power,_ \
_Tears run like fall-out shower,_ \
_Citizen votes denied,_ \
_Land owners cried,_ \
_Planning meetings with quasi participation,_ \
_Rubber stamps for the only formulation,_ \
_It’s not a fair fight,_ \
_Only one option is perceived as right,_ \
_At the cabinets alternatives non-existent,_ \
_How could the suits be fought from a tent?_ \
_When opponents are perceived as option zero,_ \
_Your neighbour turns to anti-hero,_ \
_Even our researcher friend seems to hesitate,_ \
_Is he not afraid of nuclear waste?_

_Billion euros project,_ \
_High hopes on local employment,_ \
_Should make the region thrive,_ \
_Keep the villages alive,_ \
_Media hype around economic opportunities,_ \
_Promoted as common good without alternatives,_ \
_Yet path towards national energy self-sufficiency,_ \
_Turns into security emergency,_ \
_Growing dependency on a military power,_ \
_Is the age of autonomy over?_

_We can fix climate change,_ \
_Never mind the marginalized rage,_ \
_Already before the plant is up,_ \
_People afraid even the local pub,_ \
_Inside families rising fences,_ \
_In vain struggles against senses,_ \
_Opponents targeted by a witch hunt,_ \
_Is there really a social warrant,_ \
_For a biased political foreplay,_ \
_Goose slayed, put on a tray,_

_Do not shoot the white pigeon,_ \
_Imagine responsible growth at the region,_ \
_Thousand and one alternatives,_ \
_There are also corporations like king of thieves,_ \
_Pros and cons in the ring,_ \
_Exclusion was a below belt strategy to win,_ \
_Looks turn to earth,_ \
_Global citizens give birth,_ \
_For hope of fair tomorrow,_ \
_Together me and my bro,_

Poem by Simo Sarkki, researcher at University of Oulu. See: https://www.oulu.fi/university/researcher/simo-sarkki

Photo by Tiina Prittinen 2015, Dragon workshop, Hanhikivi Cape by Sam and Katah Kerson

Kuva Tiina Prittinen 2015, Sam ja Katah Kersonin työpajassa Pyhäjoen Hanhikivellä valmistunut teos

repository: Avnerus/hanhikivi

gha_language: Rich Text Format

repo_name: Avnerus/hanhikivi


text:
---
lab:
    title: 'Exercise 01: Develop a BI report'
    module: 'Learning Path 09: Reporting'
---

**MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer**

Change Record
=============

| Version | Date        | Change                                                                                |
|---------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1.0     | 30 Apr 2021 | Initial release                                                                                |
| 1.1     | 06 Jun 2023 | Resequence                                                                                |
| 1.2     | 30 Jun 2023 | Change Module to Learning Path                              |
| 1.3     | 24 Jul 2023 |  Tested against 10.0.32  |

Scenario
========

In this lab, a BI report is developed based on the premium amount paid for
different fixed assets.

Lab solution
============

Prerequisite
------------

-   To execute this exercise you need to have a Dynamics 365 Finance and
    Operations apps development environment with access to Visual Studio

-   Import the following lab exercise as a prerequisite of this lab (for import
    instructions, please see appendix)

-   MB500TrainingProject.axpp

-   MB500TrainingProjectDataModel.axpp

-   MB500TrainingProjectUI.axpp

-   MB500TrainingProjectCode.axpp

-   MB500TrainingProjectExtension.axpp

-   MB500TrainingProjectDataManagement.axpp

Task \#1: Asset insurance advanced BI report
--------------------------------------------

1.  Right click on the Training solution under Solution Explorer.

2.  Select **Add** \> **New project** and create a new project
    **MB500TrainingProjectReporting**

3.  Right click the project and select **Properties** to set the **Model** to
    **MB-500 Training,** and the **Company** to **USMF.** Select **Apply** and
    **OK**

    *MBTAssetInsurance is the table that captures information of the insurances
    for each fixed asset. But this table doesn’t contain any field capturing
    yearly premium amount. Hence we will create a view with a computed field
    showing yearly premium amount. This field will be used in the BI reports.*

4.  Right-click on the Project **MB500TrainingProjectReporting** and go to Add
    \> New Item

5.  Select View under Data Model to create a new View **MBTAssetInsuranceView**

6.  In the view **MBTAssetInsuranceView**, under the View Metadata node add a
    new Data source **MBTAssetInsurance** with table **MBTAssetInsurance**

7.  Right click on the **MBTAssetInsurance** data source and verify the **Dynamic
    Fields** property is Yes

8.  Drag all fields under View Metadata \> Data sources \> MBTAssetInsurance \>
    Fields node and drop them to the Fields node under the root of the view,
    except these fields (if you don’t see them, right click on the solution and
    Build)

    1.  DataAreaId

    2.  Partition

    3.  RecId

    4.  RecVersion

9.  Right click on the Fields node under root of the view and add a new Real
    Computed Column named **TotalPremium**

10. Go to the Methods node under the root of the view and add a **New Method
    totalPremium**

11. Add the following code in the **totalPremium** method (replacing the private
    void method). *Note: This code is multiplying the premium amount based on
    the period selected to calculate the total premium.*

		private static str totalPremium()
		{
			const str cntDataSourceName = "MBTAssetInsurance";
			const str cntFieldPremiumAmount = "PremiumAmount";
			const str cntFieldPeriod = "Period";
			str totalPremium;
			str premiumAmount;
			str period;
			DictView dictViewAssetInsurance;
			dictViewAssetInsurance = new DictView(tableNum(MBTAssetInsuranceView));
			premiumAmount = dictViewAssetInsurance.computedColumnString (cntDataSourceName, cntFieldPremiumAmount, FieldNameGenerationMode::FieldList, true);
			period = dictViewAssetInsurance.computedColumnString (cntDataSourceName, cntFieldPeriod, FieldNameGenerationMode::FieldList, true);
			totalPremium = premiumAmount + "iif(" + period + " = 0, 0, iif(" + period + " = 1, 12, iif(" + period + " = 2, 4, iif(" + period + "= 3, 2, 1))))";
			return totalPremium;
		}
12. Save. Select the **TotalPremium** field under the Fields node of the view
    and change the **View Method** property to **totalPremium**

13. Save and build the project **MB500TrainingProjectReporting.** If it doesn’t
    build, then right click the entire solution and **build** it. Right click
    the DataModel project and **synchronize** it, and then the Reporting project
    and **synchronize** it

14. Find the view **MBTAssetInsuranceView** under the Solution Explorer \>
    **MB500TrainingProjectReporting** project

15. Right click on the view **MBTAssetInsuranceView** and select **Open table
    browser**

16. The table browser of the view **MBTAssetInsuranceView** will open with
    values populated in the **TotalPremium** field. *Create an aggregate
    dimension for AssetTable, which will enable drill down of Insurance premium
    data based on Asset group, location etc.*

17. Right-click on the Project **MB500TrainingProjectReporting** and select
    **Add** \> **New Item**

18. Select Aggregate Dimensions under Analytics to create a new aggregate
    dimension **MBTAssetDimension**

19. Open the property pane of the root node of **MBTAssetDimension**

20. Change the Table property of the aggregate dimension **MBTAssetDimension**
    to **AssetTable**

21. Expand the Attributes node, which should have the following fields already
    added by default. In case these are not added, right click on the Attributes
    node and select **New Dimension Attribute** to add them. *Create an
    aggregate measurement for the view created from the Asset Insurance table.
    Two measures will be created from this view; like – Total premium amount and
    total count of insurance policies.*

    1.  MBTAssetDimension (Dimension field Reference: DataAreaId, AssetId)

    2.  AssetGroup

    3.  Name

    4.  NameAlias

    5.  Location

    6.  MajorType

22. Right-click on the Project **MB500TrainingProjectReporting** and select
    **Add** \> **New Item**

23. Select Aggregate Measurements under Analytics to create a new aggregate
    measurement **MBTAssetInsuranceMeasurement**

24. Open the property pane of the root node of **MBTAssetInsuranceMeasurement**

25. Change the Label property of the aggregate measurement
    **MBTAssetInsuranceMeasurement** to **Asset insurance**.

26. Select the default MeasureGroup and in the property pane change the Table
    property to **MBTAssetInsuranceView**

27. The Name property of the MeasureGroup should also change to
    **MBTAssetInsuranceView**

28. **Save all**.

29. Go to the Dimensions node of the MeasureGroup **MBTAssetInsuranceView**,
    which should have two default values, as follows:

    1.  **Company**: Expand the company node till the end of nodes and ensure
        you find the following: BICompanyView.id ==
        MBTAssetInsuranceView.DataAreaId

    2.  **Date\_**: Expand the Date\_ node till end of nodes and update as
        following: BIDateDimensionValue.Date ==
        MBTAssetInsuranceView.InsurancePolicyDate

30. Drag the aggregate dimension **MBTAssetDimension** from the Solution
    Explorer and drop it on the Dimensions node of the measureGroup
    **MBTAssetInsuranceView**

31. Expand the MBTAssetDimension under the Dimensions node of the measureGroup
    **MBTAssetInsuranceView** till end of nodes and ensure as following:

    *AssetTable.AssetId == MBTAssetInsuranceView.AssetId*

32. Go to the Measures node of measureGroup **MBTAssetInsuranceView** and add
    **New Measure**s with property values as in the table below. *Create a key
    performance indicator for the measurement created above, which can be show
    the total premium amount based on given criteria*

| **\#** | **Name**     | **Field**        | **Default Aggregate** | **Label**     |
|--------|--------------|------------------|-----------------------|---------------|
| I      | TotalPremium | TotalPremium     | Sum                   | Total premium |
| II     | PolicyCount  | AssetInsuranceId | Count                 | Policy count  |

33. Right-click on the Project **MB500TrainingProjectReporting** and select
    **Add** \> **New Item**

34. Select Key Performance Indicator under Analytics to create a new key
    performance indicator (KPI) **MBTAssetInsuranceKPI**

35. Open the property pane of the *root* node of **MBTAssetInsuranceKPI** and
    change them as such:

    1.  Label: Asset insurance

    2.  Measurement: **MBTAssetInsuranceMeasurement**

    3.  Refresh Frequency: AsFastAsPermissible

36. Select the property pane of the **Goal** node of the KPI
    **MBTAssetInsuranceKPI** and change the Value property to 1000

37. Select the property pane of the **Value** node of the KPI
    **MBTAssetInsuranceKPI** and change the Measure Group property to
    **MBTAssetInsuranceView** and the Measure property to **TotalPremium.**
    *Create a tile, which can display the KPI on a Workspace*

38. Right-click on the Project **MB500TrainingProjectReporting** and select
    **Add** \> **New Item**

39. Select Tile under User Interface to create a new Tile
    **MBTAssetInsuranceTile**

40. Open the properties pane of **MBTAssetInsuranceTile**

41. Change the Type property of the Tile **MBTAssetInsuranceTile** to KPI.

42. The KPI property of the Tile **MBTAssetInsuranceTile** will be enabled and
    change it to **MBTAssetInsuranceKPI.** *Create an extension of the workspace
    AssetWorkspace. In the Tile section of the workspace add the new tile, which
    is created in the previous section*

43. In the (View \> ) Application Explorer, search for the form
    **AssetWorkspace**.

44. Right click on **AssetWorkspace** and select **Create Extension**

45. A new folder **Form Extensions** will be created in the project
    MB500TrainingProjectReporting under Solution Explorer with a new object
    AssetWorkspace.MB500Training within it.

46. In AssetWorkspace.MB500Training, create a **New Tile Button** under Design
    \> ControlTab \> MyWork \> PanoramaTab \> SummarySection

47. Set the properties of the Tile Button as follows

    1.  Name: MBTAssetInsurance

    2.  Tile: MBTAssetInsuranceTile

    3.  Tile Display: Auto

48. Save and build the project **MB500TrainingProjectReporting**

Output

Please note that the module 10 exercise is a prerequisite to testing this
exercise

1.  Right click the DataManagement project and Synchronize to the database

2.  Open the Dynamics 365 Finance and Operations portal in your browser

3.  Open **Procurement and sourcing \> Setup \> Vendors \> Vendor Groups**

4.  Add a new record (if not already there from a previous exercise):

    1.  Vendor Group: **100**

    2.  Description: **Insurance vendors**

5.  Open **Procurement and sourcing \> Setup \> Procurement and sourcing
    parameters**

6.  In the General tab, you will find a field Insurance Vendor Group; select 100
    in that field.

7.  Open **Procurement and sourcing \> Vendors \> All vendors**

8.  Add four new vendors with **Group** 100 (if not already there).

    1.  Vendor Code: INS0001, Name: Insurance vendor 001

    2.  Vendor Code: INS0002, Name: Insurance vendor 002

    3.  Vendor Code: INS0003, Name: Insurance vendor 003

    4.  Vendor Code: INS0004, Name: Insurance vendor 004

9.  Navigate to the menu **Organization Administration** and execute its
    **Periodic \> Load Number Sequence**

10. At the end of the execution, you will get a message “Number sequence loaded”

11. Navigate to the module **Fixed Assets** and open its **Setup** \> **Fixed
    assets parameters**

12. Go to the Number sequences tab and you will find a new reference Asset
    Insurance ID. In the Number Sequence code field select **Fixe_17**

13. **Save** the record

14. Open the **Data Management** workspace and select the **Framework
    parameters** tile

15. In the **Entity settings** tab, select the **Refresh entity list** button

16. In the **Data Management** workspace, open **Data Entities**

17. When the entity list is refreshed, search for the **Asset Insurance** entity
    and select **Modify target mapping** in the action menu

18. Ensure the mapping between Staging and Target is correct

19. In the **Data Management** workspace, open **Import**

20. Enter the following data:

    1.  Group name: Asset insurance import

    2.  Data project operation type: Import

    3.  Click on **+Add file**

    4.  Entity name: Asset Insurance

    5.  Source data format: CSV

    6.  Default refresh type: Full push only

    7.  Click on button **Upload and add** and select *assetInsurance.csv* (you
        may download this from by opening the **File explorer** located on the **Taskbar**. then selecting the **Documents** folder and finally selecting the **Course Assets** folder.)

    8.  Select the **Close** button

21. In the **Selected entities** line, select **View map**

22. Navigate to the **Mapping details** tab and select the **Auto-generated**
    checkbox in the ASSETINSURANCEID line.

23. Select **Save** and close this form

24. Select the **Import** button in the action pane

25. Monitor the status of the import process

26. Open the *workspace* **Fixed asset management**

27. You will find a new Tile added in the Tiles section of the Workspace with
    label Asset Insurance

28. Open the Tile and explore the Asset Insurance BI report

Appendix

**Project Import instructions:**

-   The lab resources can be found by opening the **File explorer** located on the **Taskbar**. then selecting the **Documents** folder and finally selecting the **Course Assets** folder.

-   To import a project, navigate to Visual Studio and select **Dynamics 365**
    \> **Import Project**

-   In the File name field, select the file name with path of the .axpp file
    that you want to import

-   For the first import, of MB500TrainingProject, select **New solution**. For
    subsequent ones, select the **Current solution** option.

-   Select the **OK** button. You may safely override if prompted.


text:
Pattern: Missing empty line before assertion method

Issue: -

## Description

Enforces empty line before assertion methods because it separates
assertion phase.

## Examples

``` ruby
# bad
do_something
assert_equal(expected, actual)

# good
do_something

assert_equal(expected, actual)
```

repository: Adroiti/docs-for-code-review-tools

repo_name: Adroiti/docs-for-code-review-tools


text:
# pointless-string-statement (W0105)

*String statement has no effect* Used when a string is used as a
statement (which of course has no effect). This is a particular case of
W0104 with its own message so you can easily disable it if you’re using
those strings as documentation, instead of comments.

repository: codacy/codacy-pylint

gha_license_id: NOASSERTION

repo_name: codacy/codacy-pylint


text:
---
id: quickstart
title: Quickstart
---

## Installation

Archiver is available on [npm](https://www.npmjs.com/package/archiver).

`$ npm install archiver`

## Examples

```js
// require modules
const fs = require('fs');
const archiver = require('archiver');

// create a file to stream archive data to.
const output = fs.createWriteStream(__dirname + '/example.zip');
const archive = archiver('zip', {
  zlib: { level: 9 } // Sets the compression level.
});

// listen for all archive data to be written
// 'close' event is fired only when a file descriptor is involved
output.on('close', function() {
  console.log(archive.pointer() + ' total bytes');
  console.log('archiver has been finalized and the output file descriptor has closed.');
});

// This event is fired when the data source is drained no matter what was the data source.
// It is not part of this library but rather from the NodeJS Stream API.
// @see: https://nodejs.org/api/stream.html#stream_event_end
output.on('end', function() {
  console.log('Data has been drained');
});

// good practice to catch warnings (ie stat failures and other non-blocking errors)
archive.on('warning', function(err) {
  if (err.code === 'ENOENT') {
    // log warning
  } else {
    // throw error
    throw err;
  }
});

// good practice to catch this error explicitly
archive.on('error', function(err) {
  throw err;
});

// pipe archive data to the file
archive.pipe(output);

// append a file from stream
const file1 = __dirname + '/file1.txt';
archive.append(fs.createReadStream(file1), { name: 'file1.txt' });

// append a file from string
archive.append('string cheese!', { name: 'file2.txt' });

// append a file from buffer
const buffer3 = Buffer.from('buff it!');
archive.append(buffer3, { name: 'file3.txt' });

// append a file
archive.file('file1.txt', { name: 'file4.txt' });

// append files from a sub-directory and naming it `new-subdir` within the archive
archive.directory('subdir/', 'new-subdir');

// append files from a sub-directory, putting its contents at the root of archive
archive.directory('subdir/', false);

// append files from a glob pattern
archive.glob('file*.txt', {cwd:__dirname});

// finalize the archive (ie we are done appending files but streams have to finish yet)
// 'close', 'end' or 'finish' may be fired right after calling this method so register to them beforehand
archive.finalize();
```

repository: archiverjs/node-archiver

repo_name: archiverjs/node-archiver


text:
# Flutter World

[![Build Status](https://travis-ci.org/xrr2016/flutter-world.svg?branch=master)](https://travis-ci.org/xrr2016/flutter-world)

## Contributing

1. Fork it (<https://github.com/xrr2016/flutter-world.git>)
2. Create your feature branch (`git checkout -b feature/foo`)
3. Commit your changes (`git commit -am 'Add some foo'`)
4. Push to the branch (`git push origin feature/foo`)
5. Create a new Pull Request

## License

[MIT](LICENSE)


text:
# Test Code [![Run on Repl.it](https://repl.it/badge/github/Mirv/ensemble)](https://repl.it/github/Mirv/ensemble)

Sandbox for playing with Ensemble hosted at https://github.com/ensemble-engine/ensemble

# Ensemble

A framework for creating socially aware characters. An evolution of the Comme il Faut AI system, which powered the game Prom Week.

## ensemble.js

`ensemble.js`, available as part of the [latest release](https://github.com/ensemble-engine/ensemble/releases/latest), is a standalone JavaScript library that you can include in a web project with an HTML script tag:

`<script src="ensemble.js"></script>`

Then, in your JavaScript code, you can use the `ensemble` singleton object to call [Ensemble methods](https://github.com/ensemble-engine/ensemble/wiki/Ensemble-API).

See the [wiki homepage](https://github.com/ensemble-engine/ensemble/wiki/) for tutorial links and other resources for getting started.

## Ensemble Authoring Tool

It can be difficult and tedious to author Ensemble domains (schema, trigger rules, volition rules, characters, history, and actions) in pure JSON without helper functions. The Ensemble Authoring Tool is a standalone desktop app designed to help authors develop and test their domains.

![Screenshot of Ensemble authoring tool](https://raw.githubusercontent.com/ensemble-engine/ensemble/master/docs/toolscreenshot.png)

The latest builds can be found on the [releases](https://github.com/ensemble-engine/ensemble/releases/latest) page.

## Contribute

See the [Contributing](https://github.com/ensemble-engine/ensemble/wiki/Contributing) wiki page for information about how to contribute to the project, [how to build the library from source](https://github.com/ensemble-engine/ensemble/wiki/Developing-Ensemble-Core), [how to build the tool from source](https://github.com/ensemble-engine/ensemble/wiki/Developing-the-Authoring-Tool), etc.

## Get Help
If you are having issues, please let us know by opening an [issue](https://github.com/ensemble-engine/ensemble/issues) (maybe using the “question” tag)! We'd seriously love to hear from you!

## License
The project is licensed under the BSD-4-clause license.

repository: Mirv/ensemble

repo_name: Mirv/ensemble


text:
# Elections for Kubernetes Teams

As Kubernetes now has access to self-hosted preference election software,
we can host any number of elections for community groups, as they need them.

## Who Can Request an Election

Any "Kubernetes team" can request an election.  This includes SIGs, Working
Groups, operational teams like Release Engineering or Enhancements,
Subprojects, and even wholly subsidiary projects like Prow and ClusterAPI.
Basically, if your group is all Kubernetes contributors, you can ask for an
election.

This does not include CNCF projects that are not components of Kubernetes and
subject to Kubernetes governance.  At some point, the CNCF may offer
elections-as-a-service for those other projects.

## How It Works

Kubernetes uses an election tool called [Elekto], an instance of which is
hosted at [elections.k8s.io].  Your team's election gets added as metadata
to the kubernetes/community repository, and that automatically causes
an election to appear in the app.

You assign some of your team to be election administrators, and they are
in charge of running the election.  You also assemble and supply a list
of GithubIDs for valid voters in the election, and the dates that candidate
statements are due, followed by when voting opens and closes.  Candidates
join the election by publishing candidate profiles to your election directory.

Depending on availability and the nature of your election, Contributor Comms
may help publicize your election and remind voters of deadlines. Otherwise,
you will do this.

Once voting has closed, one of your election administrators can calculate
the result of the election, and publish it either through the app or directly
to your team's channel or mailing list.

## Requesting by Issue

If you are not already familiar with [Elekto], you should request an election
by filing an [election request issue].  Please fill out all of the information
in the template; it's required for the election.

A member of the Elections Subproject will contact you and help you through
setting up the election metadata.  Please allow at least a week before your election
needs to start.

## Requesting by Pull Request

If you are familiar with [Elekto] from prior elections, then you may create
your own metadata files and submit your election as a pull request, which
will make it happen faster.

Each team election goes in its own folder in the kubernetes/community repo,
using the path `elections/teams/team-name/election-name`,
e.g. `elections/teams/clusterapi/leads-2022`.  This folder should then have
the following files in it, with complete contents.  See the
[Elekto administration docs] for more details.

* election.yaml file defining the election
* election-desc.md file with a text description of the election
* voters.yaml with the initial list of voters

The easiest path is to copy these files from another election and then
modify them. The above will require you to have already decided your list of
Election Admins and the dates for your election.

A member of the Elections Subproject will then review your PR, offer any required
data corrections, and approve it.

## Additional Notes

* Candidates do not have to be people; sometimes you may want to run an
  "election" between development alternatives or graphic design options.
  However, consider doing a survey for those instead.
* Voters and Admins do not have to be Kubernetes Org Members.
  They do have to have GitHub IDs.

[Elekto]: https://elekto.dev
[elections.k8s.io]: https://elections.k8s.io
[preference elections]: https://en.wikipedia.org/wiki/Preferential_voting
[election request issue]: /issues/new/choose
[Elekto administration docs]: https://elekto.dev/docs/administration/

repository: kubernetes/community

gha_language: Jupyter Notebook

repo_name: kubernetes/community


text:
# Production-ready Django project example

### Modes

Three code environment dimensions (**modes**):

- local
- tests
- production

Mode is described by different `settings.py`

### Project naming

Project name: `book-manager`

Git repo: `book-manager`

Django project: `book_manager`

Inside git directory: `django-admin startproject <project_name> .`

### Apps configuration

Django apps are inside module named `apps`.
It creates namespace for the app. And helps identify project imports.

To create app:
`django-admin startapp`

### Code edits

After removal of the main `settigns.py` modify `manage.py`:

`os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'book_manager.settings.local')`

**<app_name>/apps.py**

`name='<app_name>'` change to ` name='<prj_name>.apps.<app_name>'`

**namespace in installed apps**

```
    "<prj_name>.apps.<app_name>",
    "<prj_name>.apps.<app_name>",
```

More details: [simpleisbetterthancomplex production-ready](https://simpleisbetterthancomplex.com/tutorial/2021/06/27/how-to-start-a-production-ready-django-project.html)

---

## Custom User Model

When starting the project always replace the default User model.

Create an app named `acounts`:

`django-admin startapp accounts`

Create an empty migration to install Psql extensions:

`python manage.py makemigrations accounts --empty --name="postgres_extensions"`

Modify `0001_postgres_extensions.py`:

```
from django.contrib.postgres.operations import CITextExtension
from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
    ]

    operations = [
        CITextExtension()
    ]
```

Grab `AbstractUser` from Django source and modify:
- switch `username_validator` to use `ASCIIUsernameValidator`
- The username field now is using `CICharField` which is not case-sensitive
- The `email` field is now mandatory, unique and is using `CIEmailField` which is not case-sensitive

On the settings module, add the following configuration:

**settings.py**

`AUTH_USER_MODEL = "accounts.CustomUser"`

Apply migrations:

`python manage.py migrate`

In db: there is no `auth_user` (default one), and now the user
is stored on table `accounts_customuser`

More details: [simpleisbetterthancomplex](https://simpleisbetterthancomplex.com/article/2021/07/08/what-you-should-know-about-the-django-user-model.html)

#### UserManager definition

The existing manager defines `create_user` and `create_superuser` methods.

`is_staff` is required to login using django admin site

`username` is required for `create_superuser`

### User Registration, Login and Logout

Uses django forms

Pre-built register form `UserCreationForm` connects to
the pre-built model `User`.

`UserCreationForm` requires only: username and password.

Customization is implemented in `NewUserForm`.

[More details](https://www.ordinarycoders.com/blog/article/django-user-register-login-logout)

repository: uoshvis/book-manager

repo_name: uoshvis/book-manager


text:
Comparison of *PageRank algorithm* using various **datatypes**.

### Comparing Float vs Double Rank vector

This experiment ([rank-float-vs-double]) was for comparing the performance
between finding pagerank using *32-bit floats* (**float**), and finding pagerank
using *64-bit floats* (**double**). Both datatypes were attempted on different
types of graphs, running each technique 5 times per graph to get a good time
measure.

It seems using **double** datatype **increases execution time by 0-33%**, when
compared to *float*. With respect to **GM-RATIO**, using *64-bit floating point*
*rank vector* is **12% slower** **(0.89x)** than using 32-bit floating point rank
vector. With respect to **AM-RATIO**, using *64-bit floating point rank vector*
is **17% slower (0.85x)**. This could be attributed to increased memory
bandwidth requirement. However, this overhead is somewhat large, despite the
fact that most of the data for a graph is actually associated with the CSR
representation, and not the rank vector. As the rank vector is accessed
randomly, a high cache miss ratio might be the *culprit* here. Note that neither
approach makes use of *SIMD instructions* which are available on all modern
hardware.

[rank-float-vs-double]: https://github.com/puzzlef/pagerank-datatype/tree/rank-float-vs-double

### Comparing Float vs BFloat16 Rank vector

This experiment ([rank-float-vs-bfloat16]) was for comparing the result between
finding pagerank using [float] as the storage type, and finding pagerank using
[bfloat16] as the storage type. Both datatypes were attempted on different
types of graphs, running each technique 5 times per graph to get a good time
measure.

Unfortunately it seems **bfloat16** cannot be used for PageRank as its
**too inaccurate** (atleast when simply replacing *float* vectors with *bfloat16*
vectors). Using [fp16] might work, but likely give negligible performance
improvement over float. Note that neither approach makes use of *SIMD
instructions* which are available on all modern hardware.

[rank-float-vs-bfloat16]: https://github.com/puzzlef/pagerank-datatype/tree/rank-float-vs-bfloat16
[float]: https://en.wikipedia.org/wiki/Single-precision_floating-point_format
[bfloat16]: https://en.wikipedia.org/wiki/Bfloat16_floating-point_format
[fp16]: https://en.wikipedia.org/wiki/Half-precision_floating-point_format

### Comparing Float vs Double Rank vector with CUDA

This experiment ([cuda-rank-float-vs-double]) was for comparing the performance
between finding pagerank using *32-bit floats* (**float**), and finding pagerank
using *64-bit floats* (**double**). Both datatypes were attempted on different
types of graphs, running each technique 5 times per graph to get a good time
measure.

It seems using **double** datatype **increases execution time by 1-60%**, when
compared to *float*. With respect to **GM-RATIO**, using *64-bit floating point*
*rank vector* is **24% slower** **(0.81x)** than using 32-bit floating point rank
vector. With respect to **AM-RATIO**, using *64-bit floating point rank vector*
is **34% slower (0.75x)**. This could be attributed to increased memory
bandwidth requirement. However, this overhead is somewhat large, despite the
fact that most of the data for a graph is actually associated with the CSR
representation, and not the rank vector. As the rank vector is accessed
randomly, low memory coalescing might be the *culprit* here.

[cuda-rank-float-vs-double]: https://github.com/puzzlef/pagerank-datatype/tree/cuda-rank-float-vs-double

### Comparing Float vs Double Rank vector with nvGraph

This experiment ([nvgraph-rank-float-vs-double]) was for comparing the
performance between finding pagerank using *32-bit floats* (**float**), and
finding pagerank using *64-bit floats* (**double**). Both datatypes were
attempted on different types of graphs, running each technique 5 times per graph
to get a good time measure.

It seems using **double** datatype **increases execution time by 17-103%**, when
compared to *float*. With respect to **GM-RATIO**, using *64-bit floating point*
*rank vector* is **52% slower** **(0.66x)** than using 32-bit floating point rank
vector. With respect to **AM-RATIO**, using *64-bit floating point rank vector*
is **67% slower (0.60x)**. This could be attributed to increased memory
bandwidth requirement. However, this overhead is significant, despite the fact
that most of the data for a graph is actually associated with the CSR
representation, and not the rank vector. As the rank vector is quite likely
accessed randomly, low memory coalescing might be the *culprit* here.

[nvgraph-rank-float-vs-double]: https://github.com/puzzlef/pagerank-datatype/tree/nvgraph-rank-float-vs-double

### Comparing Int32 vs Int64 CSR

This experiment ([csr-int32-vs-int64]) was for comparing the performance between
finding pagerank using *32-bit ints* (**int32**), and finding pagerank using
*64-bit ints* (**int64**). Both datatypes were attempted on different types of
graphs, running each technique 5 times per graph to get a good time measure.

It seems using **int64** datatype **increases execution time by 1-16%**, when
compared to *int32*. With respect to **GM-RATIO** as well as **AM-RATIO**, using
*64-bit integer CSR* *representation* is **9% slower** **(0.92x)** than using
32-bit integer CSR representation. This could be attributed to increased memory
bandwidth requirement. However, this overhead is quite small, despite the fact
that most of the data for a graph is actually associated with the CSR
representation. As the CSR representation is accessed linearly, improved cache
usage might be the *saviour* here. Note that neither approach makes use of *SIMD
instructions* which are available on all modern hardware.

[csr-int32-vs-int64]: https://github.com/puzzlef/pagerank-datatype/tree/csr-int32-vs-int64

### Comparing Int32 vs Int64 CSR with CUDA

This experiment ([cuda-csr-int32-vs-int64]) was for comparing the performance
between find pagerank using *32-bit ints* (**int32**), and finding pagerank
using *64-bit ints* (**int64**). Both datatypes were attempted on different
types of graphs, running each technique 5 times per graph to get a good time
measure.

It seems using **int64** datatype **increases execution time by 6-35%**, when
compared to *int32*. With respect to **GM-RATIO**, using *64-bit integer CSR*
*representation* is **17% slower** **(0.85x)** than using 32-bit integer CSR
representation. With respect to **AM-RATIO**, using *64-bit integer CSR*
*representation* is **24% slower (0.81x)**. This could be attributed to increased
memory bandwidth requirement. However, this overhead is somewhat small, despite
the fact that most of the data for a graph is actually associated with the CSR
representation. As the CSR representation is accessed linearly, improved memory
coalescing might be the *saviour* here.

[cuda-csr-int32-vs-int64]: https://github.com/puzzlef/pagerank-datatype/tree/cuda-csr-int32-vs-int64

## References

- [CUDA by Example :: Jason Sanders, Edward Kandrot](https://gist.github.com/wolfram77/72c51e494eaaea1c21a9c4021ad0f320)
- [Adjusting PageRank parameters and Comparing results](https://arxiv.org/abs/2108.02997)
- [PageRank Algorithm, Mining massive Datasets (CS246), Stanford University](https://www.youtube.com/watch?v=ke9g8hB0MEo)
- [SuiteSparse Matrix Collection]

[![](https://i.imgur.com/wmbbEzJ.jpg)](https://www.youtube.com/watch?v=rKv_l1RnSqs)
[![ORG](https://img.shields.io/badge/org-puzzlef-green?logo=Org)](https://puzzlef.github.io)
[![DOI](https://zenodo.org/badge/366614563.svg)](https://zenodo.org/badge/latestdoi/366614563)

[Prof. Dip Sankar Banerjee]: https://sites.google.com/site/dipsankarban/
[Prof. Kishore Kothapalli]: https://www.iiit.ac.in/people/faculty/kkishore/
[SuiteSparse Matrix Collection]: https://sparse.tamu.edu

repository: puzzlef/pagerank-datatype

repo_name: puzzlef/pagerank-datatype


text:
# Client-side Search component

[![npm version](https://badge.fury.io/js/%40visual-framework%2Fvf-search-client-side.svg)](https://badge.fury.io/js/%40visual-framework%2Fvf-search-client-side)

## About

This uses Lunr.js to perform a client-side search of a site's content.

## Usage

This approach is recommended only for sites with a limited number of pages (around 500 or fewer), otherwise the client side search index can become many megabytes in size.

If your site is in a subdirectory or has other requirements, you specify any required prefix to your search URL with `data-vf-search-client-side-destination-prefix="https://myprefix"`.

### Warning: Early alpha, lot's of "to do"s

This is an early alpha. More customisation options need to be added, such as:

- passing search parameters (boost score) to the JS
- customising the output format
- NJK template has hardcoded paths for vf-core

### Supplying a search index

This consumes a `.js` file with a `searchIndex` object of pages, a la:

```json
let searchIndex = {
  "pages": [
    {"id":"0", "title": "Page title", "text": "Body text of page goes here", "tags": "", "url": "/index.html"},
    ...
  ]
};
```

To make this index, you can utilise the ability of [`vf-extension` to generate a search index](https://github.com/visual-framework/vf-core/blob/develop/tools/vf-extensions/gulp-tasks/gulp-build-search-index.js).

1. Making an index

To generate that JS file, if you're using a vf-eleventy based site, you may also want to make use of the `vf-extensions`'s `gulp-build-search-index.js`:

> `require('./node_modules/\@visual-framework/vf-extensions/utils/gulp-build-search-index.js')(gulp, path, buildDestionation);`

2. Dependencies

If you use that JS you'll also need some npm dependencies:

`yarn add strip-js striptags node-html-parser`

3. Tell gulp to make the index

And you should build that search index after updating your html pages, a la:

```
  // build search index after search page is compiled
  gulp.watch(['./build/search/index.html'], gulp.parallel('vf-build-search-index'));

  // And for your `build` task
  gulp.task('build', gulp.series(
    ...
    'eleventy:build',
    'vf-build-search-index',
    ...
  ));

  // And for your `dev` task
  gulp.task('dev', gulp.series(
    ...
    'eleventy:build',
    'vf-build-search-index',
    ...
  ));
```

### Using search

- You can pass a query to the search page with `?search_query=myQuery`
- The search will live update as the user enters text
- You can enable `autofocus` on the search element, but should only do so if most users intend to search on the page

## Install

This repository is distributed with [npm](https://www.npmjs.com/). After [installing npm](https://nodejs.org/), you can install `vf-search-client-side` with this command.

```
$ yarn add --dev @visual-framework/vf-search-client-side
```

### Sass/CSS

The style files included are written in [Sass](https://sass-lang.com/). If you're using a VF-core project, you can import it like this:

```
@import<EMAIL_ADDRESS>```

Make sure you import Sass requirements along with the modules. You can use a [project boilerplate](https://stable.visual-framework.dev/building/) or the [`vf-sass-starter`](https://stable.visual-framework.dev/components/vf-sass-starter/)

## Help

- [Read the Visual Framework troubleshooting](https://stable.visual-framework.dev/troubleshooting/)
- [Open a ticket](https://github.com/visual-framework/vf-core/issues)
- [Chat on Slack](https://join.slack.com/t/visual-framework/shared_invite/enQtNDAxNzY0NDg4NTY0LWFhMjEwNGY3ZTk3NWYxNWVjOWQ1ZWE4YjViZmY1YjBkMDQxMTNlNjQ0N2ZiMTQ1ZTZiMGM4NjU5Y2E0MjM3ZGQ)

repository: visual-framework/vf-core

branch_name: refs/heads/develop

gha_language: Nunjucks

repo_name: visual-framework/vf-core


text:
# CovidModel-CDC

The codes are for the paper titled ***Disease spread coupled with evolutionary social distancing dynamics can lead to growing oscillations***, accepted at 60th Conference on Decision and Control ([CDC](https://2021.ieeecdc.org/)).

The paper proposes a SEIR epidomological model coupled with a replicator-dynamics equation for modeling the pandemics.

The objective of this paper is to increase the capabilities of the traditional SEIR models so that they could capture multiple waves of the pandemic.

For more information on the paper and see the pdf file for it, visit this [link](https://hoseinkh.github.io/publications/publication-986/).

repository: hoseinkh/CovidModel-CDC

repo_name: hoseinkh/CovidModel-CDC


text:
# Changelog
###### [v1.0.6](https://github.com/asinfotrack/yii2-toolbox/releases/tag/1.0.6)

- removed redundant added null check

###### [v1.0.5](https://github.com/asinfotrack/yii2-toolbox/releases/tag/1.0.5)

- removed redundant method call setDate in Timestamp

###### [v1.0.4](https://github.com/asinfotrack/yii2-toolbox/releases/tag/1.0.4)

- disabled libxml_use_internal_errors in DebugAction

###### [v1.0.3](https://github.com/asinfotrack/yii2-toolbox/releases/tag/1.0.3)

- fixed javascript erros in TabsWithMemory

###### [v1.0.2](https://github.com/asinfotrack/yii2-toolbox/releases/tag/1.0.2)

- added `$storageKey` to TabsWithMemory

###### [v1.0.1](https://github.com/asinfotrack/yii2-toolbox/releases/tag/1.0.1)

- fixed bug in Timestamp-Helper

###### [v1.0.0](https://github.com/asinfotrack/yii2-toolbox/releases/tag/1.0.0)

- refactored Timestamp-Helper (__BREAKING CHANGE!__)

###### [v0.8.13](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.13)

- bug fix tab memory js

###### [v0.8.12](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.12)

- bug fix tab memory with anchor

###### [v0.8.11](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.11)

- added option to change storage type

###### [v0.8.10](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.10)

- Adding icon component for centralized icon handling
- WATCH OUT: The [font awesome library](https://github.com/rmrevin/yii2-fontawesome) is now optional
  and must be included manually in your project. It will then be used automatically if present.

###### [v0.8.9](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.9)

- Refactoring AdvancedAction column to reflect changes in the parent class during the last few yii2 releases

###### [v0.8.8](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.8)

- Reverted license description in `composer.json`
- Minor improvement of SimpleNav

###### [v0.8.7](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.7)

- Updated license
- Bugfix in archive behavior where already set archived value would be overwritten during insert
- Removed dependency from codeception as it is unneeded and bloats the extension

###### [v0.8.6](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.6)

- Bugfix with ArchiveBehavior where table-name was missing (lead to conflicts with relations)

###### [v0.8.5](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.5)

- General-dependency update
- Major cleanup
- Updated Gii-templates and generators

###### [v0.8.4](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.4)

- Video-widget added

###### [v0.8.3](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.3)

- General-dependency update and adding image-functionality

###### [v0.8.2](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.2)

- Resolved compatibility issue of `AdvancedActionColumn` when template was specified as a callback with Yii 2.0.11

###### [v0.8.1](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.1)

- Geocoding helper added
- Query helper added
- Url helper extended with `isInIpRange()`-method

###### [v0.8.0](https://github.com/asinfotrack/yii2-toolbox/releases/tag/0.8.0)

- first stable release

gha_language: PHP


text:
---
title: DS Lite
photo: /images/tif/2023-04-05-dsl.jpg
---

Picked up from Ebay for £12.50, the fault was _"Console turns on but doesn't load ds games, and touch screen doesn't seem to work,"_.

Makes me a bit sad, but this fix was literally clean the DS cart port with IPA, and run a DS cart in and out. There was also some gunk inside the device, which again, just needed cleaning.

The touch screen, after testing, was fine too. Maybe it was the ribbon that needed re-seating, and I did completely take the DS Lite apart and re-shell it (originally it was red with a LOT of stickers) - I feel like the re-shell has a bit of a Star Wars dark side vibe!

*[IPA]: isopropyl alcohol


text:
## Transaction

The Transaction primitive allows easy creation and manipulation of transactions. It also allows signing when provided with a privatekey.
Supports fee control and input/output access (which allows passing a specific script).
```js
import { Transaction } from 'dash';
const tx = new Transaction(txProps)
```

Access the [Transaction documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/transaction.md)

## Address

Standardized representation of a Dash Address. Address can be instantiated from a String, PrivateKey, PublicKey, HDPrivateKey or HdPublicKey.
Pay-to-script-hash (P2SH) multi-signature addresses from an array of PublicKeys are also supported.

```js
import { Address } from 'dash';
```

Access the [Address documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/address.md)

## Block

Given a hexadecimal string representation of the block as input, the Block class allows you to have a deserialized representation of a Block or its header. It also allows validating the transactions in the block against the header merkle root.

Transactions of the block can also be explored by iterating over elements in array (`block.transactions`).

`import { Block } from 'dash'`

Access the [Block documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/block.md)

## UnspentOutput

Representation of an UnspentOutput (also called UTXO as in Unspent Transaction Output).
Mostly useful in association with a Transaction and for Scripts.

`import { UnspentOutput } from 'dash'`

Access the [UnspentOutput documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/unspentoutput.md)

## HDPublicKey

Hierarchical Deterministic (HD) version of the PublicKey.
Used internally by Wallet-lib and for exchange between peers (DashPay)

`import { HDPublicKey } from 'dash'`

Access the [HDKeys documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/hierarchical.md)

## HDPrivateKey

Hierarchical Deterministic (HD) version of the PrivateKey.
Used internally by Wallet-lib.

`import { HDPrivateKey } from 'dash'`

Access the [HDKeys documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/hierarchical.md)

## PublicKey

`import { PublicKey } from 'dash'`

Access the [PublicKey documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/publickey.md)

## PrivateKey

`import { PrivateKey } from 'dash'`

Access the [PrivateKey documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/privatekey.md)

## Mnemonic

Implementation of [BIP39 Mnemonic code for generative deterministic keys](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki).
Allow to generate random mnemonic on the language set needed, validate a mnemonic or get the HDPrivateKey associated.

`import { Mnemonic } from 'dash'`

Access the [Mnemonic documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/mnemonic.md)

## Network

A representation of the internal parameters relative to the network used. By default, all primitives works with 'livenet', this class allow to have an testnet instance to used on the other primitives (such as Addresses), or for Wallet-lib.

`import { Network } from 'dash'`

Access the [Network documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/networks.md)

## Script

In Dash, transaction have in their inputs and outputs some script, very simple programming language with a stack-based evaluation and which is not Turing Complete.
A valid Transaction is a transaction which output script are evaluated as valid.

Some operations of this language, such as OP_RETURN has been used to store hashes and B64 data on the payment chain.
Learn more on our walkthrough [Transaction script manipulation with the OP_RETURN example](/docs/walkthroughs/op_return/or_return.md)

`import { Script } from 'dash'`

Access the [Script documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/script.md)

## Input

`import { Input } from 'dash'`

Access the [Transaction documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/transaction.md)

## Output

`import { Output } from 'dash'`

Access the [Transaction documentation on dashevo/dashcore-lib](https://github.com/dashevo/dashcore-lib/blob/master/docs/transaction.md)

repository: riongull/DashJS

repo_name: riongull/DashJS


text:
# dev-blog-directory-feed-collector

Collect feed URLs for dev blogs.

## Usages

```sh
$ npm start
```

## Related

- [dev-blog-directory](https://github.com/dev-blog-directory/dev-blog-directory) - A Developer Blog Directory. Auto generated documents from [raw data](https://github.com/dev-blog-directory/dev-blog-directory-raw).
- [dev-blog-directory-raw](https://github.com/dailyrandomphoto/dev-blog-directory-raw) - Raw data storage of [Developer Blog Directory](https://github.com/dailyrandomphoto/dev-blog-directory).
- [dev-blog-directory-feed-db](https://github.com/dev-blog-directory/dev-blog-directory-feed-db) - Feed database of developer blogs.

## License
Copyright (c) 2019 [dailyrandomphoto][my-url]. Licensed under the [MIT license][license-url].

[my-url]: https://github.com/dailyrandomphoto
[npm-url]: https://www.npmjs.com/package/dev-blog-directory-feed-collector
[travis-url]: https://travis-ci.org/dailyrandomphoto/dev-blog-directory-feed-collector
[coveralls-url]: https://coveralls.io/github/dailyrandomphoto/dev-blog-directory-feed-collector?branch=master
[license-url]: LICENSE
[dependencies-url]: https://david-dm.org/dailyrandomphoto/dev-blog-directory-feed-collector
[devDependencies-url]: https://david-dm.org/dailyrandomphoto/dev-blog-directory-feed-collector?type=dev

[npm-downloads-image]: https://img.shields.io/npm/dm/dev-blog-directory-feed-collector
[npm-version-image]: https://img.shields.io/npm/v/dev-blog-directory-feed-collector
[license-image]: https://img.shields.io/npm/l/dev-blog-directory-feed-collector
[travis-image]: https://img.shields.io/travis/dailyrandomphoto/dev-blog-directory-feed-collector
[coveralls-image]: https://img.shields.io/coveralls/github/dailyrandomphoto/dev-blog-directory-feed-collector
[dependencies-image]: https://img.shields.io/david/dailyrandomphoto/dev-blog-directory-feed-collector
[devDependencies-image]: https://img.shields.io/david/dev/dailyrandomphoto/dev-blog-directory-feed-collector


text:
---
layout: post
title:  "Grabbing the tag of GSoCer"
date:   2013-07-11 7:34:00
comments: true
categories: thoughts
tags: [gsoc, Google Summer of Code, Vienna Univesity,  DAIICT]
---

{:.headerimage}
![Google Summer Of Code 2013](/assets/img/GSoc-2013-logo.jpg)

>“Always be yourself, express yourself, have faith in yourself, do not go out and look for a successful personality and duplicate it." ― Bruce Lee

On one very beautiful morning my friend came to me and started talking about GSoC.
Oops :P, I am not a story teller and this is not anyhow a big inspirational story.
It's just my personal experience of working little bit hard and little bit smart than others which ended up with the GSoCers tag with my name.
So sharing this experience with all who are interested in applying for GSoC but are not confident enough to do it.

It all started in my first semester at DA-IICT. Before this I was totally unaware of what is GSoC or something like this really exist in the world.
Last year 17 students were got selected from our institute and this year the count remained unchanged.
(Some students also said that 17 is lucky number for DA. I don't know the story behind it. :P).
I read about it before I took admission at DA and that was felt something excited to me so I was waiting to explore something more about it.
And the day came when some students from the institute has arranged an introductory session for GSoC.
Obviously, The speakers were those students who managed to get selected for last year.
So after this I had enough idea about the GSoC but still few things were unclear to me.
But I decided to give it a try and I was waiting for the announcement of program from the Google.

Every year the commencement of the GSoC program starts around March which is the period for organizations to apply for becoming the part of GSoC.
Around 200 organizations take part and allow students to contribute for open source world.
After this in April the students are allowed to discuss the project ideas with the people form organization through mailing lists( Note: The best way to learn about organization and project is to subscribe for their mailing list.) and IRC chat.

I have gone through so many organizations allowing projects on JavaScript, PHP, JAVA and C/C++.
So after lots of searching, reading and communicating I shortlisted three projects from different organization and started exploring about it.
How it can be implemented and also compared my capability with the required work because this is very important when you are getting some work as an assignment you must complete it.
I have also contacted professor [Ajit Rajwade](http://intranet.daiict.ac.in/~ajit_r/) and professor Minal Bhise to help me to decide on which project should I work.
And really they have helped me a lot (Heartily thanks to them! :) ).
After all these hectic tasks I decided to work on [MOST: NoSQL Solution for Building Data Warehouses](http://www.google-melange.com/gsoc/project/google/gsoc2013/nikunjness/14001) project of [Computational Science and Engineering at TU Wien.](http://www.iue.tuwien.ac.at/cse/)
The mentors for the project are [Harald Hofstätter](http://www.iue.tuwien.ac.at/cse/index.php/members/116-hofstaetter.html) and [Stefan Glawischnig.](http://www.iue.tuwien.ac.at/cse/index.php/members/48-glawischnig.html)
They are really nice people. They have continuously guided me to make my proposal better.

After Selecting the project I have started learning technologies required for the project. They have also given one small assignment which help them in deciding students capability of work.
I have submitted the assignment and meanwhile I was continuously talking to them about my approach and interest in the project.
I have started asking questions and getting details related to project. And it was [27th May, 2013](https://www.google.com/calendar/event?eid=bnBkcDdkZHExZzdnY3YxYzFpZzhsZ3Y3cDQgZ3N1bW1lcm9mY29kZUBt&ctz=America/Los_Angeles) the day of announcing accepted students proposals.
I was curiously waiting for the result and as per the Indian time the result was going to be announced at midnight so the whole day was passed with so much curiosity. All the applicants from our institute were on IRC chat and they were also excited as much as I.
Finally I received the e-mail from Google and truly speaking I was in shock for a moment and after that I felt like some miracle has happened to me. And lots of greetings and congratulating posts started flashing on my facebook wall.

I will upload my project proposal with next article. Hope you guys enjoyed reading this. Keep visiting and feel free to give suggestions. Have a nice day! :) :)

extension: markdown


text:
    🦕 Support Deno and release on NPM with a single codebase.🦕

**NOTICE**: The tool will be presented at the next [Deno Israel](https://www.meetup.com/DenoIsrael/events/270885478/) online meetup.

# What it is

A build tool that takes as input a TypeScript codebase that was meant to target node and/or the web and spits out a modified version of the source files ready to be deployed as a Deno module.

![what_denoify_does](https://user-images.githubusercontent.com/6702424/83460547-f3ac5b80-a466-11ea-84a9-026dfe225398.png)

If you are just looking for a quick way to load NPM modules in your Deno project
you can check out [CommonJS module Loading](https://github.com/denoland/deno/tree/master/std/node/#commonjs-module-loading),
unlike Denoify, it won't give you types definitions, it will involve `node_modules/`
and require `--allow-read` but it will also be easier to get working.

This tool is mainly for NPM module maintainer, to enable them to bring first-class citizen Deno support to their module and doing so without introducing breaking changes.

# Motivations

- Although it is quite easy to port a module to Deno no one wants to maintain two codebase.
- Wouldn't it be great to have a tool able to bring Deno support to NPM modules?

# Example of modules using Denoify

Modules that have been made cross-runtime using Denoify:

- [EVT](https://evt.land)
- [run-exclusive](https://github.com/garronej/run-exclusive)

# Limitations

Coming up next is a detailed guide on how to set up denoify with your project and how
to publish on [deno.land/x](https://deno.land/x) but before anything
here are the current limitations you need to be aware of.

- If your module is vanilla JS it needs to be ported to TypeScript first. (1)
- Not all Node's builtin are supported yet. (2)
- You will need to fork and denoify(3) manually each of your module's (not dev) dependencies.
- For the dependencies that can't easily be denoified you will need to write a
  partial Deno port of the bits your module needs.
- `require()` is not yet supported.
- You can't (yet) `fs.readFile` files that are part of the module ( files inside a ``res/``
  directory for example ). (4)

(1) *Don't be afraid, renaming your source with ``.ts`` and dropping some ``any`` here
and there will do the trick.
You will be able to pull it off even if you aren't familiar with typescript. [Ref](https://github.com/garronej/my_dummy_npm_and_deno_module#enable-strict-mode-and-fixes-errors-if-any)*

(2) *You can consult [here](https://deno.land/std/node#supported-builtins) the current state of the Node's builtin support.*

(3) *Glossary: To 'denoify' a module is the process of using this tool to generate a deno
distribution of a module and to publish it on GitHub.
How to do that is documented in details.*

(4) *In Deno the files that forms your module won’t be pre-fetched and
placed in ``node_module`` like in node so you won’t be able to access files that are not
on the disk.*

# GUIDES

## Setting up an existing project

Check out [this repo](https://github.com/garronej/my_dummy_npm_and_deno_module) to see in practice how to set up Denoify in your project.

## Starting a project from scratch

![denoify_ci](https://user-images.githubusercontent.com/6702424/82036935-c52a3480-96a1-11ea-9794-e982a23e5612.png)

[denoify_ci](https://github.com/garronej/denoify_ci) is a template repo that automates the boring and tedious tasks of:
- Filling up the ``package.json``
- Setting up TypeScript and [Denoify](https://github.com/garronej/denoify).
- Writing a [README.md](https://github.com/garronej/denoify_ci/blob/dev/README.template.md) with decent presentation and instructions on how to install/import your module in different environments.
- Testing with multiple ``Node`` and ``Deno`` versions before publishing.
- Publishing on NPM and [deno.land/x](https://deno.land/x) ( via GitHub releases ).

[Get started](https://github.com/garronej/denoify_ci)

repository: cuulee/denoify

repo_name: cuulee/denoify


text:
---
title: 'Logging'
description: 'How to log messages from within actors.'
---

Actors can log messages at different levels,
which may be useful for debugging,
or emitting basic information.

This guide focuses on invoking a logger from within an actor implementation.
Click here if you want to learn more about configuring logging levels and printing output.

## Logging methods

All actors ([`Actor`](https://comunica.github.io/comunica/classes/_comunica_core.Actor.html)) expose the following methods:

* `logTrace(context, message, dataCb?)`
* `logDebug(context, message, dataCb?)`
* `logInfo(context, message, dataCb?)`
* `logWarn(context, message, dataCb?)`
* `logError(context, message, dataCb?)`
* `logFatal(context, message, dataCb?)`

These methods allow a log message to be emitted at the different [logging levels](/docs/query/advanced/logging/#logging-levels).

These methods require the [context](/docs/query/advanced/context/) to be passed,
and a string message.
Optionally, you can pass a callback to a JSON data hash.

## Example

Emitting a log message in an actor's `run` method can be done as follows:
```typescript
public run(action: IAction): Promise<IActorHttpOutput> {
  this.logInfo(action.context, 'This is a message');
  this.logInfo(action.context, 'This is another message, with data',
    () => ({ someParam: 'someValue' }));
}
```

repository: comunica/website

repo_name: comunica/website


text:
# Continuation
Handle callbacks in continuation

### NOTE
Do NOT download from npm!

Just add the dependency that use https git repo url as a version.

    "@coffee-toolbox/continuation": "https://github.com/coffee-toolbox/continuation.git"

npm is evil that it limit the publish of more than one project.
And its restriction on version number is terrible for fast development that
require local reference. (npm link sucks!)
[why npm link sucks](https://github.com/webpack/webpack/issues/554)

It ruined my productivity for a whole three days!

For any one who values his life, please be away from npm.

----

Example:
```coffeescript
{K} = require '@coffee-toolbox/continuation'

task1 = (ret)->
	setTimeout ->
		ret 'something'
	, 100

task2 = new K (ret, v)->
	console.log v
	setTimeout ->
		ret v + ' mod1'
	, 100

mod2 = (v)->
	v + ' mod2'

log = (ret, v)->
	console.log v

K.compose([task1, task2.map(mod2), log]).done()
new K(task1).c(task2).map(mod2).c(log).done(console.log)
# something
# something
# something mod1 mod2
# something mod1 mod2
```

repository: coffee-toolbox/continuation

repo_name: coffee-toolbox/continuation


text:
# Gliocladium aurifilum (W.R. Gerard) Seifert, Samuels & W. Gams, 1985 SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
in Seifert, Stud. Mycol. 27: 148 (1985)

#### Original name
null

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
---
title: Binary search
nav_order: 5
---

It turns out that the best-known algorithm for many important problems takes exponential time, making it impossible to solve them in practice. To put that into perspective, an input of size N = 100 (e.g. `array.length == 100`) that takes a linear-time algorithm less than 1 second to evaluate would take an exponential-time algorithm about 1017 **years** to compute a result.

The magnitude of improvement from exponential-time to linear-time is the same as the magnitude of improvement from linear-time to logarithmic-time. Logarithmic-time algorithms come up often in the study of computer algorithms, and they're the key to enabling computers to work with large datasets. Earlier, we saw how `indexOf` represented a worst-case linear-time algorithm. Let's analyze the runtime of **binary search**, a logarithmic-time algorithm for `indexOf` assuming a sorted array.

Suppose we have a `sorted` array of integers. Binary search is an efficient algorithm for returning the index of the `target` value in a `sorted` array.

```java
static int binarySearch(int[] sorted, int target) {
    // Start looking at the whole sorted array
    int low = 0;
    int high = sorted.length - 1;
    // while low and high haven't met yet, there are still more indices to search
    while (low <= high) {
        // compute middle index and value
        int mid = low + (high - low) / 2;
        if (sorted[mid] < target) {
            low = mid + 1;
        } else if (sorted[mid] > target) {
            high = mid - 1;
        } else {
            return mid;
        }
    }
    return -1;
}
```

In each iteration of the loop, half of the elements under consideration can be discarded. The number of iterations of the `while` loop can be phrased as, "How many times do we need to divide N (length of the `sorted` array) by 2 until only 1 element remains?" This is the definition of the **binary logarithm**, or log2.

Alternatively, we could rephrase the question as, "How many times do we need to multiply by 2 to reach N?" To solve for 2x = N, we get x = log2 N.


text:
# [Segmentation Microservice]
The goal is to extract the single-line images from a binarized image. Usually as a step of OCRopy. Implemented with Python and Django. Based on [OCRopy](https://github.com/tmbdev/ocropy) and its library [ocrolib](https://github.com/tmbdev/ocropy/tree/master/ocrolib).

## [Setup]
#### Way-1: deploy on the Django built-in server directly.

Pros: quick to work.

Cons: can only handle one request each time.

1). Initial and activate environment

	$ virtualenv env
	$ source env/bin/activate

2). Install requirement packages

    $ pip install -r requirements.txt

3). Apply updates

    $ python manage.py makemigrations
    $ python manage.py migrate

4). Run with Django built-in server

    $ python manage runserver <IP_ADDRESS>:{PORT} (port can be customized)

#### Way-2: deploy on Apache server.

Pros: can handle multiple requests concurrently.

The first three steps same with Way-1. (The following steps are for Apache server on **CentOS**.)

4). Copy configuration file *'apache_conf/segmentation.conf'* into directory *'/etc/httpd/conf.d/'*.

        The listening port in *'apache_conf/segmentation.conf'* is *80*. User can replace it with another port just remember to allow the port accessible through firewall.

        **NOTE**: Remeber to update the service related path for some directives like *DocumentRoot*, *Alias*, *wsgi.py*, *python-path*, *WSGIScriptAlias* etc.

5). Connect the mod_wsgi module with system Apache installation.

        Added the output of the following command to Apache configuration file *httpd.conf* whose path usually is *'/etc/httpd/conf/httpd.conf'*.

    $ mod_wsgi-express module-config

        Reference:https://pypi.org/project/mod_wsgi/

6). Restart Apache server

#### Way-3: set up from Docker image.

Pros: needn’t to download and deploy the microservice.

The Dockerfile have beed provided, you can built the image by yourself or just use our image *'jingchaoluan/segmentation:v1'* with the following command:

    $ docker run -d -p {PORT}:80 --privileged=true --cap-add=SYS_ADMIN jingchaoluan/segmentation:v1

{PORT} can be set by user.

#### Way-4: deploy with Kubernetes

Pros: can handle multiple requests concurrently, and auto-scale the number of instances of microservice to improve its performance remarkably.

Pre-requirement: Kubernetes cluster.

The manifest file *'kube_manifest/segmentation.yaml'* have been provided, user only need to create the Segmentation Deployment/Pods/Service/auto-scaler with command like:

    $ kubectl apply -f kube_manifest/segmentation.yaml

Here we use **NodeType** type and the nodePort is *31002* which can be set by user.

## [Accessing service]
1. Access the service through URL: *http://{IP}:{PORT}/segmentationapi*

2. Access the index page to learn the introduction through URL: *http://{IP}:{PORT}/*


text:
Ansible Role: Cassandra_cluster
=========

[![Opstree Solutions][opstree_avatar]][opstree_homepage]
[Opstree Solutions][opstree_homepage]

  [opstree_homepage]: https://opstree.github.io/
  [opstree_avatar]: https://img.cloudposse.com/150x150/https://github.com/opstree.png
An ansible role to install cassandra cluster & standalone cassandra.

Version History
------------------
|**Date**| **Version**| **Description**| **Changed By** |
|----------|---------|---------------|-----------------|
|**27 June 2020** | v0.0.1 | Initial draft | Shweta Tyagi |

Supported OS
------------
  * Ubuntu:bionic
  * Ubuntu:xenial

Requirements
------------
  * Java 1.8

Role Variables
--------------
|**Variables**| **Default Values**| **Possible Values** | **Description** |
|----------|---------|---------------|-----------|
| cassandra_version | 3.11.6 | Any cassandra version as required | Exact cassandra version which we need to install |
| cluster_name | MyCluster | Cluster name | Cluster name |
| user_name | cassandra | Any user name | Cassandra user name from which we want to run role |
| group_name | cassandra | Any group name | Cassandra group name from which we want to run role |
| cassandra_home | /opt/cassandra | Any home path | Cassandra home path |
| cassandra_path | /opt/cassandra/bin | Any path | Cassandra path |
| cassandra_data_directory | /var/lib/cassandra/data | data dir path | Cassandra data directory path |
| cassandra_hints_directory | /var/lib/cassandra/data/hints | hints dir path | Cassandra hints directory path |
| cassandra_commitlog_directory | /var/lib/cassandra/data/commitlogs | commit log directory path | Cassandra commit log directory path |
| cassandra_saved_caches_directory | /var/lib/cassandra/data/saved_caches | Caches directory path | Cassandra saved caches directory path |
| broadcast_address | node ipv4 ip | node ipv4 ip | Address to broadcast to other Cassandra nodes |
| listen_address | node ipv4 ip | node ipv4/ipv6 ip | If you choose to specify the interface by name and the interface has an ipv4 and an ipv6 address you can specify which should be chosen using listen_interface_prefer_ipv6. If false the first ipv4 address will be used. If true the first ipv6 address will be used. Defaults to false preferring ipv4. If there is only one address it will be selected regardless of ipv4/ipv6 |
| broadcast_rpc_address | node ipv4 ip | node ipv4 ip | RPC address to broadcast to drivers and other Cassandra nodes. This cannot be set to <IP_ADDRESS>. If left blank, this will be set to the value of rpc_address. If rpc_address is set to <IP_ADDRESS>, broadcast_rpc_address must be set. |
| rpc_address | node ipv4 ip | node ipv4/ipv6 ip | If you choose to specify the interface by name and the interface has an ipv4 and an ipv6 address you can specify which should be chosen using rpc_interface_prefer_ipv6. If false the first ipv4 address will be used. If true the first ipv6 address will be used. Defaults to false preferring ipv4. If there is only one address it will be selected regardless of ipv4/ipv6. |
| cassandra_local_hostname | node ipv4 ip | node ipv4 ip | Node ipv4 address from which we connect db using shell  |
| cassandra_admin_user | admin | Any admin user | New cassandra admin user |
| cassandra_admin_password | admin | Any admin password |New cassandra admin password |
| cassandra_old_admin_password | cassandra | cassandra | Default cassandra password |
| cassandra_old_admin_user | cassandra | cassandra | Default Cassandra user |
| authorization_enable | yes | yes or no | Enabled, when we want to change default username or password |
| cassandra_port | 9042 | Any Linux port | Assign a port to connect with cassandra |
| rpc_port | 9160 | Any Linux port | Port for Thrift to listen for clients on |
| storage_port | 7000 | Any Linux port | TCP port, for commands and data |
| ssl_storage_port | 7001 | Any Linux port | SSL port, for encrypted communication |

Directory Layout
----------------
```
osm_cassandra
.
├── handlers
│   └── main.yml
├── meta
│   └── main.yml
├── README.md
├── tasks
│   ├── authorization.yml
│   ├── cluster_status.yml
│   ├── main.yml
│   └── swap.yml
├── templates
│   ├── cassandra.sh
│   └── cassandra.yaml.j2
└── vars
    └── main.yml

5 directories, 10 files

```
Future changes
----------------
* support for CentOS
* create service file

Example Playbook
----------------
```
- name: It will automate Cassandra setup
  hosts: seed-nodes
  become: true
  roles:
    - role: osm_cassandra
```

Inventory
----------
For cluster: An inventory should look like this:-
```ini
[seed-nodes]
seed1 192.xxx.x.xxx  ansible_user=ubuntu
seed2 192.xxx.x.xxx  ansible_user=ubuntu
seed3 192.xxx.x.xxx  ansible_user=ubuntu
```
where, The seed-nodes group contains the details of the nodes we want to cluster.

For standalone: An inventory should look like this:-
```ini
[seed-nodes]
seed1 192.xxx.x.xxx  ansible_user=ubuntu
```

License
-------

BSD

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

[![Shweta Tyagi][shweta_avatar]][shweta_homepage]
[Shweta Tyagi][shweta_homepage]

  [shweta_homepage]: https://github.com/shwetatyagi-ot
  [shweta_avatar]: https://img.cloudposse.com/75x75/https://github.com/shwetatyagi-ot.png