text:
---
actual_indicator_available: Percent of U.S waters in an MPA
actual_indicator_available_description: Percent of U.S. marine waters in a natural
  or cultural heritage marine protected area
comments_and_limitations: Based on national scale GIS-based area calculations (using
  the World Eckert IV projection, an equal-area pseudocylindrical map projection).
computation_units: Percent
data_non_statistical: false
date_metadata_updated: November 2017
date_of_national_source_publication: Fall 2017
disaggregation_geography: 'National '
goal_meta_link: http://unstats.un.org/sdgs/files/metadata-compilation/Metadata-Goal-14.pdf
graph_title: Percent of U.S. marine waters in a natural or cultural heritage marine
  protected area
graph_type: line
has_metadata: true
indicator: 14.5.1
indicator_definition: "Definition The percentage of marine sites contributing significantly\
  \ to the global persistence of biodiversity that are wholly covered by designated\
  \ protected areas. It is a thematic disaggregation of the multi-purpose indicator\
  \ for protected area coverage of important sites. Concepts Protected areas, as defined\
  \ by the International Union for Conservation of Nature (IUCN), are clearly defined\
  \ geographical spaces, recognized, dedicated and managed, through legal or other\
  \ effective means, to achieve the long-term conservation of nature with associated\
  \ ecosystem services and cultural values. Importantly, a variety of specific management\
  \ objectives are recognised within this definition, spanning conservation, restoration,\
  \ and sustainable use: \tCategory Ia: Strict nature reserve \tCategory Ib: Wilderness\
  \ area \tCategory II: National park \tCategory III: Natural monument or feature\
  \ \tCategory IV: Habitat/species management area \tCategory V: Protected landscape/seascape\
  \ \tCategory VI: Protected area with sustainable use of natural resources The status\
  \ \"designated\" is attributed to a protected area when the corresponding authority,\
  \ according to national legislation or common practice (e.g., by means of an executive\
  \ decree or the like), officially endorses a document of designation. The designation\
  \ must be made for the purpose of biodiversity conservation, not de facto protection\
  \ arising because of some other activity (e.g., military). Sites contributing significantly\
  \ to the global persistence of biodiversity are identified following globally standard\
  \ criteria applied at national levels. Two variants of these standard criteria have\
  \ been applied in all countries to date. The first is for the identification of\
  \ Important Bird & Biodiversity Areas (IBAs), that is, sites contributing significantly\
  \ to the global persistence of biodiversity, identified using data on birds, of\
  \ which >12,000 sites in total have been identified from all of the world's countries.\
  \ The second is for the identification of Alliance for Zero Extinction sites (AZEs),\
  \ that is, sites holding effectively the entire population of at least one species\
  \ assessed as Critically Endangered or Endangered on The IUCN Red List of Threatened\
  \ Species. In total, 587 AZE sites have been identified for 920 species of mammals,\
  \ birds, amphibians, reptiles, conifers, and reef-building corals. A global standard\
  \ for the identification of key biodiversity areas (KBAs) unifying these approaches\
  \ along with other mechanisms for identification of important sites for other species\
  \ and ecosystems is in the final stages of development and anticipated to be in\
  \ place by the end of 2015. Marine sites are defined as those identified for marine\
  \ species or ecosystems, as documented in the IUCN Red List Habitats Classification\
  \ Scheme."
indicator_name: Coverage of protected areas in relation to marine areas
indicator_sort_order: 14-05-01
indicator_variable: coverage_protected_marine
layout: indicator
method_of_computation: The indicator is computed by dividing the total number of KBAs
  wholly covered by protected areas by the total number of KBAs in each country, and
  multiplying by 100. 'Wholly protected' is defined as >98% coverage to allow for
  resolution and digitisation errors in the underlying spatial datasets.
national_geographical_coverage: United States
periodicity: Annual, as needed
permalink: /14-5-1/
published: true
rationale_interpretation: "The safeguard of important sites is vital for stemming\
  \ the decline in biodiversity. The establishment of protected areas is an important\
  \ mechanism for achieving this aim, and this indicator serves as a means of measuring\
  \ progress toward the conservation, restoration and sustainable use of marine ecosystems\
  \ and their services, in line with obligations under international agreements. Importantly,\
  \ it is not restricted to any single marine ecosystem type, and so faithfully reflects\
  \ the intent of SDG target 14.2. \nLevels of access to protected areas vary among\
  \ the protected area management categories. Some areas, such as scientific reserves,\
  \ are maintained in their natural state and closed to any other use. Others are\
  \ used for recreation or tourism, or even open for the sustainable extraction of\
  \ natural resources. \nIn addition to protecting biodiversity, protected areas have\
  \ become places of high social and economic value: supporting local livelihoods;\
  \ protecting watersheds from erosion; harbouring an untold wealth of genetic resources;\
  \ supporting thriving recreation and tourism industries; providing for science,\
  \ research and education; and forming a basis for cultural and other non-material\
  \ values. \nThis indicator adds meaningful information to, complements and builds\
  \ from traditionally reported simple statistics of territorial area covered by protected\
  \ areas, computed by dividing the total protected area within a country by the total\
  \ territorial area of the country and multiplying by 100. Such percentage area coverage\
  \ statistics do not recognise the extreme variation of biodiversity importance over\
  \ space, and so risk generating perverse outcomes through the protection of areas\
  \ which are large at the expense of those which require protection."
reporting_status: complete
scheduled_update_by_national_source: Annual, as needed
sdg_goal: 14
source_active_1: true
source_agency_staff_email_1<EMAIL_ADDRESS>source_agency_staff_name_1: NOAA Marine Protected Areas Center
source_agency_survey_dataset_1: NOAA MPA Inventory
source_notes_1: null
source_organisation_1: NOAA MPA Inventory
source_title_1: null
source_url_1: https://marineprotectedareas.noaa.gov/dataanalysis/mpainventory/
source_url_text_1: https://marineprotectedareas.noaa.gov/dataanalysis/mpainventory/
target: By 2020, conserve at least 10 per cent of coastal and marine areas, consistent
  with national and international law and based on the best available scientific information.
target_id: '14.5'
title: Coverage of protected areas in relation to marine areas
un_custodial_agency: 'UNEP-WCMC, UNEP (Partnering Agencies: Ramsar)'
un_designated_tier: '1'
us_method_of_computation: Area coverage of all U.S. natural and cultural heritage
  MPAs relative to total area of U.S. marine waters Including bays, estauries and
  Great Lakes).  Protected areas that include terrestrial areas are clipped to include
  only marine portion in area statistics.
variable_description: null
variable_notes: null
---

repository: GSA/sdg-data-usa

branch_name: refs/heads/develop

gha_language: Python

repo_name: GSA/sdg-data-usa


text:
# github.tcl
GitHub Webhook script for [the Eggdrop IRC bot](http://www.eggheads.org/).

## About
This scripts recieves GitHub webhook events and relays them to IRC channels. It creates a partial HTTPd and waits for events getting pushed to it from GitHub. You need to have access to the webhook settings of the repository you wish to get notifications from on GitHub. Some settings which are static in nature can be found at the top portion of the script.

The majority of the settings for this script are available via the `.github` command from the partyline.

## Features
- Receives events from GitHub via built-in HTTPd
- Supports many event types
- URL shortening via [git.io](https://git.io/)
- Multiple repositories
- Multiple channels
- Links issues & pull requests when typed in a channel like `#123`

## Prerequisites
- [Eggdrop](http://www.eggheads.org/) 1.6.21 or above
- [Tcl](http://www.tcl.tk/) 8.6 or above
- [Tcllib](http://core.tcl.tk/tcllib)
- [TclTLS](http://core.tcl.tk/tcltls) 1.6.4 or above

## Installation
- Put github.tcl in your Eggdrop `scripts/` directory
- Add `source scripts/github.tcl` at the bottom of your Eggdrop config file
- `.rehash` (or restart) Eggdrop
- Add your repository to the bot. From the partyline (DCC chat): `.github add SomeName /github/path`. The name can be anything you like. The path can be anything you like, but I recommend setting it to the real GitHub path. For this repository for instance, the path would be `/Pixelz/eggdrop-github`. This will generate a secret and webhook URL that you need to paste into the repository settings in GitHub. Replace `your.ip.or.hostname` in the URL with your actual IP-address or hostname.
- Set a channel to output all events to: `.github set SomeName channel #YourChannel all`
- Set another channel to only output some events to: `.github set SomeName channel #YourChannel push release`
- Set the linker repository for a channel. This will make the bot link issues etc when typed in the channel: `.github linker set #YourChannel /github/path`. This path needs to be a valid GitHub path. For this repository, the path would be `/Pixelz/eggdrop-github`.

license: ISC

repository: crazycatdevs/eggdrop-github

branch_name: refs/heads/master

extension: md

gha_license_id: ISC

license_type: permissive

repo_name: crazycatdevs/eggdrop-github


text:
Pattern: JUnit - missing call to `super.tearDown()`

Issue: -

## Description

Rule that checks that if the JUnit `tearDown` method is defined, that it includes a call to `super.tearDown()`.

This rule ignored methods annotated with `@After` or `@AfterClass`.

This rule sets the default value of the *applyToClassNames* property to only match class names ending in 'Test', 'Tests' or 'TestCase'.

## Further Reading

* [CodeNarc - JUnitTearDownCallsSuper](https://codenarc.github.io/CodeNarc/codenarc-rules-junit.html#junitteardowncallssuper-rule)

license: MIT

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

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


text:
---
layout: post
title: to roam, regret, and rollick
---

![windowplane]({{ site.baseurl }}/images/windowplane.jpg)

The state of transit can be profoundly sad to experience. One of dozens in a plane, I feel little and anonymous, barreling through the dramatic cloudly towers and parapets hung static. It’s like someone built a world, forgot about it, and left it there in the air for our jet-setting toddler-consciences to smash up.

But I think the truer profundity, as close as I can guess it, happens when you arrive. It is self-affirming to get to know yourself in a new environment; it was like the early stages of falling in love, settling in after my displacement, to know for certain in which ways I would change and stay the same, to remember that there’s something going on inside my silly body that is separable from a roiling, inconstant world.

And it helps me, sometimes, to act the part of a surveyor of some grand interminable project, taking my dips, slips and loopings-back as costs already tallied. You know, if it turns out my life-as-project ends up being a collection of shitty half-built edifices in disarray, one could, at least, conceive of a gullible traveler stumbling across something like that and thinking it interesting, or beautiful, or artful. In short, I am no great pyramid, and here’s no great matter…

One of the ways in which I doubt I will change is in the shoehorning of bad punnish references in my self-indulgent writing. (I should be punished!)

Anyway…here are some paired photographs of the places I’ve been, begun and ended. Organizing my photos, I noticed pairs who, placed together, make me feel something of a warm uncanniness. They remind me of the strange mix of personal constancy and change that is the project of living, through my eye as a picture-taker – the qualities of the things I have noticed enough to document – and (maybe) through the subjects and places themselves – in my mind as in the universe, let’s say, a much wilier quality.

----
****

![child san jose]({{ site.baseurl }}/images/child_milpitas.jpg)
_Toddler showing me how good her popcorn is, in coffee shop, San Jose, summer 2013_
![child philadelphia]({{ site.baseurl }}/images/child_philadelphia.jpg)
_Toddler caught in emotion unawares, outdoor concert, Philadelphia, also summer 2013_

----
****

![greenmarket philadelphia]({{ site.baseurl }}/images/greenmarket_philadelphia.jpg)
_At a Saturday farmer’s market, Philadelphia, late August 2016_
![greenmarket brooklyn]({{ site.baseurl }}/images/greenmarket_brooklyn.jpg)
_Saturday farmer’s market, Brooklyn, September 2016_

----
****

![parader philadelphia]({{ site.baseurl }}/images/parader_philadelphia.jpg)
_Parader wiping out at the Kensington Kinetic Sculpture Derby, Philadelphia, summer 2013_
![parader brooklyn]({{ site.baseurl }}/images/parader_brooklyn.jpg)
_Parader blowing a kiss at the West Indian American Day carnival, Brooklyn, fall 2016_

----
****

![sunset_milpitas]({{ site.baseurl }}/images/sunset_milpitas.jpg)
_Blurred sunset on high, Milpitas, late fall 2016_
![sunset_nyc]({{ site.baseurl }}/images/sunset_nyc.jpg)
_Blurred sunset from rooftop, after picking up my camera for the first time in a long time, Manhattan, late summer 2016_

repository: lauracosgrove/blogocosgrove

repo_name: lauracosgrove/blogocosgrove


text:
# zircon-rs

[![Actions Status](https://github.com/rcore-os/zircon-rs/workflows/CI/badge.svg)](https://github.com/rcore-os/zircon-rs/actions)
[![Build Status](https://travis-ci.org/rcore-os/zircon-rs.svg?branch=master)](https://travis-ci.org/rcore-os/zircon-rs)
[![Coverage Status](https://coveralls.io/repos/github/rcore-os/zircon-rs/badge.svg?branch=master)](https://coveralls.io/github/rcore-os/zircon-rs?branch=master)

Reimplement [Zircon][zircon] microkernel in safe Rust as a userspace program!

🚧 Working In Progress

## Components

* `zircon-object`: Kernel objects.

  This is the core of the whole project.

  It implements all Zircon [kernel objects][kernel-objects].

* `zircon-syscall`: Syscall layer.

  It implements Zircon [syscalls][syscalls] using the above objects.

* `zircon-userboot`: User program loader.

* `zircon-hal-unix`: HAL implementation on Unix.

  It used for unit testing and construct a libOS.

* `zircon-hal-bare`: [TODO] HAL implementation on bare metal environment.

  It used to construct a real Zircon "kernel" -- zCore.

[zircon]: https://fuchsia.googlesource.com/fuchsia/+/master/zircon/README.md
[kernel-objects]: https://github.com/PanQL/zircon/blob/master/docs/objects.md
[syscalls]: https://github.com/PanQL/zircon/blob/master/docs/syscalls.md

repository: bamaao/zircon-rs

repo_name: bamaao/zircon-rs


text:
### Create the Backups

Finally, we make sure that the data of counter is available on another node when a member goes down. We need to have the `IncOperation` class implement the `BackupAwareOperation` interface contained in the SPI package. See the following code.

```java
class IncOperation extends AbstractOperation
	implements PartitionAwareOperation, BackupAwareOperation {
   ...

   @Override
   public int getAsyncBackupCount() {
      return 0;
   }

   @Override
   public int getSyncBackupCount() {
      return 1;
   }

   @Override
   public boolean shouldBackup() {
      return true;
   }

   @Override
   public Operation getBackupOperation() {
      return new IncBackupOperation(objectId, amount);
   }
}
```

The methods `getAsyncBackupCount` and `getSyncBackupCount` specify the count for asynchronous and synchronous backups. Our sample has one synchronous backup and no asynchronous backups. In the above code, counts of the backups are hard-coded, but they can also be passed to `IncOperation` as parameters.

The method `shouldBackup` specifies whether our Operation needs a backup or not. For our sample, it returns `true`, meaning the Operation will always have a backup even if there are no changes. Of course, in real systems, we want to have backups if there is a change. For `IncOperation` for example, having a backup when `amount` is null would be a good practice.

The method `getBackupOperation` returns the operation (`IncBackupOperation`) that actually performs the backup creation; the backup itself is an operation and will run on the same infrastructure.

If a backup should be made and `getSyncBackupCount` returns **3**, then three `IncBackupOperation` instances are created and sent to the three machines containing the backup partition. If fewer machines are available, then backups need to be created. Hazelcast will just send a smaller number of operations.

#### Performing the Backup with IncBackupOperation

Now, let's have a look at the `IncBackupOperation`.

```java
public class IncBackupOperation
	extends AbstractOperation implements BackupOperation {
   private String objectId;
   private int amount;

   public IncBackupOperation() {
   }

   public IncBackupOperation(String objectId, int amount) {
      this.amount = amount;
      this.objectId = objectId;
   }

   @Override
   protected void writeInternal(ObjectDataOutput out) throws IOException {
      super.writeInternal(out);
      out.writeUTF(objectId);
      out.writeInt(amount);
   }

   @Override
   protected void readInternal(ObjectDataInput in) throws IOException {
      super.readInternal(in);
      objectId = in.readUTF();
      amount = in.readInt();
   }

   @Override
   public void run() throws Exception {
      CounterService service = getService();
      System.out.println("Executing backup " + objectId + ".inc() on: "
        + getNodeEngine().getThisAddress());
      Container c = service.containers[getPartitionId()];
      c.inc(objectId, amount);
   }
}
```

![image](images/NoteSmall.jpg) ***NOTE:*** *Hazelcast will also make sure that a new IncOperation for that particular key will not be executed before the (synchronous) backup operation has completed.*

#### Running the Sample Code

Let's see the backup functionality in action with the following code.

```java
public class Member {
   public static void main(String[] args) throws Exception {
      HazelcastInstance[] instances = new HazelcastInstance[2];
      for (int k = 0; k < instances.length; k++)
         instances[k] = Hazelcast.newHazelcastInstance();

      Counter counter = instances[0].getDistributedObject(CounterService.NAME, "counter");
      counter.inc(1);
      System.out.println("Finished");
      System.exit(0);
    }
}
```

Once it is run, the following output will be seen.

```
Executing counter0.inc() on: Address[<IP_ADDRESS>]:5702
Executing backup counter0.inc() on: Address[<IP_ADDRESS>]:5701
Finished
```

As it can be seen, both `IncOperation` and `IncBackupOperation` are executed. Notice that these operations have been executed on different cluster members to guarantee high availability.

repository: totalkyos/altassian

repo_name: totalkyos/altassian


text:
# Workshops
2018 MIC Workshops

### Workshop 1: Deep Learning, Neural Networks and TensorFlow
Slides: https://bit.ly/2qz4S2p

Code: https://bit.ly/2JMu0vp

### Workshop 2: Optimization and Gradient Based Learning
Slides: https://bit.ly/2qA0wbs

Code: https://bit.ly/2ER9XZe

### Workshop 3: Convolutional Neural Networks
Slides: https://bit.ly/2qAnj6W

Code: https://bit.ly/2HoDWN9

### Workshop 4: Reinforcement Learning
Slides: [Links to Reinforcement Learning](https://drive.google.com/open?id=1I_Zpef6jN1R9zj_vsh_EKs_K7yy9k8rFbUJBrko-05w)

Code: Check back later!

### Workshop 5: Generative Adversarial Networks
Slides: Check back later!

### Workshop 6: Recurrent Neural Networks
Slides: Check back later!

repository: timisplump/Workshops

repo_name: timisplump/Workshops


text:
---
layout: post
date:	2014-10-12 23:17:00
title:  Two very different destinations
tags: [archived-posts]
categories: archives
permalink: /:categories/:year/:month/:day/:title/
---
We pay a lot of homage
To success.
I've been watching a music video.
I see the packed halls;
I see the roaring cheers.
It makes me think about the road to this place, Success...
The gigs in small towns, the half-empty places,
The wondering if, after all,
One has the staying power
That, allied (or not) to talent
Could reach that elusive goal....Success.
The road that leads to Success
Can often curve, imperceptibly,
Into the blind alleys of Failure, too.
Success and Failure are like the two faces
Of Janus; one looking forward into the light,
The other, fading into the dimness, the darkness,
Of oblivion, sinking away into the numbers
That are described, in racing parlance,
As "also-rans".
The efforts that lead to Failure
Are no less than those that fetch up at Success.
I feel for those who end up at the wrong destination....

The music video that brought this on:

<lj-embed id="1240"/>


text:
---
title: Six Places Aspiring Photographers Must See on Oregon's South Coast
date: 2016-08-25T16:53:13.000Z
description: >+
  Looking to update your portfolio and beef up your Instagram? Perhaps you're
  just looking for some stunning scenery to capture in some timeless shots. No
  matter your goal and experience level, the Coos Bay area has the perfect
  backdrop for a planned and impromptu photo-sessions.

tags:
  - Adventure Coast
  - Beaches
  - Cape Arago
  - Coast
  - Coos Bay
  - Golden and Silver Falls
  - Landscape
  - nature photographs
  - Oregon Dunes National Recreation Area
  - photographers
  - Shore Acres
  - Shore Acres State Park
categories:
  - Walking & Hiking
image: ''
---
Looking to update your portfolio and beef up your Instagram? Perhaps you’re just looking for some stunning scenery to capture in some timeless shots. No matter your goal and experience level, the Coos Bay area has the perfect backdrop for a planned and impromptu photo-sessions.

Sure, it would take us all day to list out every breathtaking landscape you can find in Coos Bay/North-Bend/Charleston, but here are some of our favorites for you to explore!

###  1. Golden and Silver Falls

A beautiful nature park, high vantage points, and waterfalls! Golden and Silver falls is an absolute must for anyone looking to pull of some perfect panorama pictures.

### 2. Cape Arago State Park

<img class="aligncenter size-large wp-image-62314" src="/wp-content/uploads/2014/08/4be7f20a0ebf0bba31eafc621f1b8f48-oac-capearago-674x447.jpg" alt="Cape Arago State park" width="674" height="447" srcset="/wp-content/uploads/2014/08/4be7f20a0ebf0bba31eafc621f1b8f48-oac-capearago-674x447.jpg 674w, /wp-content/uploads/2014/08/4be7f20a0ebf0bba31eafc621f1b8f48-oac-capearago-200x133.jpg 200w, /wp-content/uploads/2014/08/4be7f20a0ebf0bba31eafc621f1b8f48-oac-capearago-254x168.jpg 254w, /wp-content/uploads/2014/08/4be7f20a0ebf0bba31eafc621f1b8f48-oac-capearago-120x80.jpg 120w, /wp-content/uploads/2014/08/4be7f20a0ebf0bba31eafc621f1b8f48-oac-capearago.jpg 1024w" sizes="(max-width: 674px) 100vw, 674px" />

If you’re in Coos Bay and looking to have a photo session then you have to visit a state park, and if you’re planning to visit a state park then Cape Arago is one of our favorites. Beachside paths, nature trails, and vibrant contrasting colors make for a terrific subject.

### 3. Empire Dock

When you have sunsets like ours, sometimes you just have to get out on the water. If you’re looking to bring out something a bit more poetic in your shots, be sure to visit Empire Dock in the golden hour. You won’t regret it.

### 4. Mingus Park

<img class="aligncenter wp-image-92998 size-large" src="/wp-content/uploads/2012/10/8a7648f3af2dd0ec90b57674762d7952-674x448.jpg" alt="8b8e475a-f4b8-4c74-af0b-9df8cc731632" width="674" height="448" srcset="/wp-content/uploads/2012/10/8a7648f3af2dd0ec90b57674762d7952-674x448.jpg 674w, /wp-content/uploads/2012/10/8a7648f3af2dd0ec90b57674762d7952-200x133.jpg 200w, /wp-content/uploads/2012/10/8a7648f3af2dd0ec90b57674762d7952-254x168.jpg 254w, /wp-content/uploads/2012/10/8a7648f3af2dd0ec90b57674762d7952-120x80.jpg 120w" sizes="(max-width: 674px) 100vw, 674px" />

Ah, Mingus Park, a natural bend of beauty and color. You could spend the entire day photographing its sights and sites (and many have).

### 5. Oregon Dunes National Recreation Area

    Oregon Dunes National Recreation Area – Photo Source Expedia

Look at that. You can’t photograph landscapes in Oregon’s Adventure Coast and leave out the Oregon Dunes National Recreation Area. Its bounty of silky smooth sand dunes look like something out of a science-fiction film. You can also get some good action shots of local dune-boarders and sand-duners!

### 6. Shore Acres State Park

Last, but as you can see in no ways least, is Shore Acres State Park. Hiking trails, extensive park, and even wildlife viewing opportunities (did somebody say whales and sea lions?) await photographers at Shore Acres. Bring the wide angle lens and don’t forget some sunscreen!

When you’ve taken that perfect snapshot, visit to our Facebook and share it with us! We love seeing what’s going on in Coos Bay.

repository: echopdx/coosbay

gha_language: JavaScript

gha_license_id: MIT

repo_name: echopdx/coosbay


text:
### Build All ###
To simply build all modules in HiBench, use the below command. This could be time consuming because the hadoopbench relies on 3rd party tools like Mahout and Nutch. The build process automatically downloads these tools for you. If you won't run these workloads, you can only build a specific framework to speed up the build process.

    mvn -Dspark=2.4 -Dscala=2.11 clean package

### Build a specific framework benchmark ###
HiBench 6.0 supports building only benchmarks for a specific framework. For example, to build the Hadoop benchmarks only, we can use the below command:

    mvn -Phadoopbench -Dspark=2.4 -Dscala=2.11 clean package

To build Hadoop and spark benchmarks

    mvn -Phadoopbench -Psparkbench -Dspark=2.4 -Dscala=2.11 clean package

Supported frameworks includs: hadoopbench, sparkbench, flinkbench, stormbench, gearpumpbench.

### Specify Scala Version ###
To specify the Scala version, use -Dscala=xxx(2.11 or 2.12). By default, it builds for scala 2.11.

    mvn -Dscala=2.11 clean package
tips:
Because some Maven plugins cannot support Scala version perfectly, there are some exceptions.

1. No matter what Scala version is specified, the module (gearpumpbench/streaming) is always built in Scala 2.11.
2. When the spark version is specified to 2.4 or higher, the module (sparkbench/streaming) is only supported for Scala 2.11.

### Specify Spark Version ###
To specify the spark version, use -Dspark=xxx(2.4 or 3.0). By default, it builds for spark 2.4

    mvn -Psparkbench -Dspark=2.4 -Dscala=2.11 clean package
tips:
when the spark version is specified to spark2.4 , the scala version will be specified to scala2.11 by
default . For example , if we want use spark2.4 and scala2.11 to build hibench. we just use the command `mvn -Dspark=2.4 clean
package` , but for spark2.4 and scala2.11 , we need use the command `mvn -Dspark=2.4 -Dscala=2.11 clean package` .
Similarly , the spark2.4 is associated with the scala2.11 by default.

### Specify Hadoop Version ###
To specify the hadoop version, use -Dhadoop=xxx(2.4 or 3.2). By default, it builds for hadoop 3.2

    mvn -Phadoopbench -Dhadoop=2.4 -Dhive=0.14 clean package

### Specify Hive Version ###
To specify the hive version, use -Dhive=xxx(0.14 or 3.0). By default, it builds for hive 3.0

    mvn -Phadoopbench -Dhadoop=2.4 -Dhive=0.14 clean package

### Build a single module ###
If you are only interested in a single workload in HiBench. You can build a single module. For example, the below command only builds the SQL workloads for Spark.

    mvn -Psparkbench -Dmodules -Psql -Dspark=2.4 -Dscala=2.11 clean package

Supported modules includes: micro, ml(machine learning), sql, websearch, graph, streaming, structuredStreaming(spark 2.0 or higher) and dal.

### Build Structured Streaming ###
For Spark 2.0 or higher versions, we add the benchmark support for Structured Streaming. This is a new module which cannot be compiled in Spark 1.6. And it won't get compiled by default even if you specify the spark version as 2.0 or higher. You must explicitly specify it like this:

    mvn -Psparkbench -Dmodules -PstructuredStreaming clean package

### Build DAL on Spark ###
By default the dal module will not be built and needs to be enabled explicitly by adding "-Dmodules -Pdal", for example:

    mvn -Psparkbench -Dmodules -Pml -Pdal -Dspark=2.4 -Dscala=2.11 clean package

Currently there is only one workload KMeans available in DAL. To run the workload, install DAL and setup the environment by following https://github.com/intel/daal

repository: Intel-bigdata/HiBench

gha_language: Java

gha_license_id: NOASSERTION

repo_name: Intel-bigdata/HiBench


text:
---
layout: default
title: Zalando Open Source
permalink: /
banner:
  height: 450px
---

Projects

    Explore All Projects

      Purpose

      The Open Source Team works across departments at Zalando to scale open culture and
      promote best practices of Open Source development. We ensure that Zalando is
      a good Open Source citizen, from understanding and respecting Open Source licensing to enabling
      Zalando employees to take active part in the creation of Open Source.

          <object id="goal-participate" data="assets/svg/slideshare.svg" type="image/svg+xml"></object>

Participate

            We invest in and contribute to Open Source projects which are important to us.
            We encourage Zalando employees to get involved in Open Source.

          <object id="goal-share" data="assets/svg/handshake-o.svg" type="image/svg+xml"></object>

Share

            We share our code and processes with the rest of the world as we want technology to
            benefit as many people as possible.

          <object id="goal-promote" data="assets/svg/gg.svg" type="image/svg+xml"></object>

Promote

          We enable and prioritize Open Source code in our engineering teams.
          We encourage an open culture as we see the practices of the Open Source movement
          as the best way to collaborate.

Jobs

        Currently no open positions

        We do not currently have any open positions, but don't hesitate getting in touch with us anyway,
        we are always interested in hearing from potential candidates -
        reach us at <a href="mailto:opensource<EMAIL_ADDRESS>

{% include recent-posts.html %}

The Team

gha_language: HTML


text:
---
layout: post
title: Week 9
---

Our group has made the decision to attempt to create a plugin for Brackets - we think this will be a more challenging/interesting way to contribute to the community. As of now, our individual tasks are to come up with a 2-3 ideas for the plugin. My suggestions are:

- A plugin that allows the user to easily/intuitively change the font-color/background-color of the text editor
- A plugin that lets the user draw a physical representation of a container and returns the dimensions of that container in pixels.

**Questions for Donna:**
- What is the most meaningful thing you've done during your time as a software engineer?
- Do you find that the gender disproportion in the tech industry ever affects your work?
- Do you think tech giants *cough cought Facebook* are to be held responsible for the illegal breaches of their security/data?


text:
# Designer Notes
- Useful if a message is so important you’d like to prevent any other activity until the user resolves it.
- If the message isn’t so important, or you want to avoid disrupting the user’s activity, consider showing a static Message component in the underlying screen.
- Include a Message component within the Alert component, use plain text, or apply a standard Carbon Error or Warning icon.
- This component has the same options and properties as the Dialog component.

# Related Components
- Simple positive or negative confirmation? [Try Flash](/components/flash "Try Flash").
- Longer message which stays on-screen? [Try Message](/components/message "Try Message").
- Longer, time sensitive message that must be dismissed? [Try Toast](/components/toast "Try Toast").
- Confirm or cancel an action I’ve initiated? [Try Confirm](/components/confirm "Try Confirm").
- Simple task in context? [Try Dialog](/components/dialog "Try Dialog").


text:
# Tool to calculate partitioning metrics using GraphX

## Requirements:

 - start spark cluster
 -  set SPARK_HOME

## run this command to compute graph's metrics

`./run.sh path/to/graph.txt metrics.txt RandomVertexCut 10 youtube`

`./run.sh <pathToGrpah> <filenameWithResult> <parititonerName> <minEdgePartitions> <shortGraphName>`

where:

 * pathToGrpah - path to graph
 * filenameWithResult - path to the output file with metrics values
 * parititonerName - name of the partitioner
 * minEdgePartitions - number of edge partitions
 * shortGraphName - short name of the graph

repository: Mykhailenko/graphx-tool

repo_name: Mykhailenko/graphx-tool


text:
# Masquerade by ![flagrow logo](https://avatars0.githubusercontent.com/u/16413865?v=3&s=15) [flagrow](https://discuss.flarum.org/d/1832-flagrow-extension-developer-group)

[![Support on patreon](https://img.shields.io/badge/support%20on-patreon-orange.svg)](https://patreon.com/flagrow) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/flagrow/masquerade/license.md) [![Latest Stable Version](https://img.shields.io/packagist/v/flagrow/masquerade.svg)](https://github.com/flagrow/masquerade) [![Total Downloads](https://img.shields.io/packagist/dt/flagrow/masquerade.svg)](https://github.com/flagrow/masquerade)

The user profile generator. Includes:

- New tab on user profile to show masquerade profile with answers provided to configured fields.
- New tab on user profile for user to set up a masquerade profile.
- Add, update, delete and order profile fields in admin.
- Permission who can have a masquerade profile.
- Permission who can view a masquerade profile.
- Allowing you to configure forced redirection to make a (email verified) user complete the required fields.

![](https://discuss.hyn.me/assets/files/2017-05-16/1494967396-0-masquerade-demo.gif)

### installation

```bash
composer require flagrow/masquerade
```

### updating

```bash
composer update flagrow/masquerade
php flarum migrate
php flarum cache:clear
```

### configuration

Enable the extension. Visit the masquerade tab in the admin to configure the fields.

Be aware that the "Add new field" and "Edit field <foo>" toggle the field form when clicked.

Make sure you configure the masquerade permissions on the Admin Permissions tab to your needs.

### links

- [changelog](https://github.com/flagrow/masquerade/blob/master/changelog.md)
- [on github](https://github.com/flagrow/masquerade)
- [on packagist](http://packagist.com/packages/flagrow/masquerade)
- [issues](https://github.com/flagrow/masquerade/issues)

An extension by [Flagrow](https://flagrow.io), a project of [Gravure](https://gravure.io).

repository: nullno/FlarumChina

repo_name: nullno/FlarumChina


text:
# Machine-Coding-Problem
Machine coding round involves solving a design problem in a matter of a couple of hours. It requires designing and coding a clean, modular and extensible solution based on a specific set of requirements.

# Introduction
Until recently, the general interview process for software engineers consisted of 2–3 rounds focused on problem-solving, data structures and algorithms, coupled with 1–2 rounds focused on checking the culture fit of the candidate. In the past few years, there has been a shift in approach with more and more companies adopting the machine coding round.

   Flipkart, Uber, Swiggy, Ola, Cred, etc. are some of the top tech companies where the first onsite round is the machine coding round.

# Format
Machine coding round involves solving a design problem in a matter of a couple of hours. It requires designing and coding a clean, modular and extensible solution based on a specific set of requirements. An example of a machine coding problem could be to design a snake and ladder game with certain requirements and constraints. This is generally followed by a code review process where an interviewer goes through the code and tries to understand the design decisions.

# Expectations
Almost all the companies have similar judging criteria in the machine coding round. The expectations may vary based on seniority and also from company to company. These are the general expectations of a good solution:

1.Code should be working and demonstrable.
2.Code should be functionally correct.
4.Code should be modular and readable.
5.Separation of concern should be addressed.
6.Code should easily accommodate new requirements and minimal changes.
7.There should be a main method from where the code could be easily testable.
8.A UI is generally not required.

repository: singhvisha/Machine-Coding-Problem

repo_name: singhvisha/Machine-Coding-Problem


text:
## Application Lifecycle Management

**TASK:** Create a deployment named nginx-deploy in the ngx namespace using nginx image version 1.16 with three replicas. Check that the deployment rolled out and show running pods.

Solution

```bash
# Create the template from kubectl
kubectl create ns ngx -o yaml --dry-run=true > nginx-deploy.yml
echo '---' >> nginx-deploy.yml
kubectl create deployment nginx-deploy --image=nginx:1.16 --dry-run=true -o yaml -n ngx >> nginx-deploy.yml

# Edit the template and add the namespace, and the replica number
nano nginx-deploy.yml
```

```bash
# Deploy
kubectl deploy -f ./nginx-deploy.yml

# Validate
kubectl -n ngx rollout status deployment nginx-deploy
kubectl -n ngx get deployment
kubectl -n ngx get pods
```

**TASKS:**

- Scale the prior deployment to 5 replicas and check the status again.
- Then change prior deployment's image tag of nginx container from 1.16 to 1.17.

Solution

```bash
kubectl -n ngx scale deployment nginx-deploy --replicas=5
kubectl -n ngx rollout status deployment nginx-deploy
kubectl -n ngx get deploy
kubectl -n ngx get pods
```

Change the image tag:

```bash
kubectl -n ngx edit deployment/nginx-deploy
...
    spec:
      containers:
      - image: nginx:1.17
        imagePullPolicy: IfNotPresent
...
```

Check that new replicaset was created and new pods were deployed:

```bash
kubectl -n ngx get replicaset
kubectl -n ngx get pods
```

**TASKS:**
- Check the history of the deployment and rollback to previous revision.
- Then check that the nginx image was reverted to 1.16.

Solution

```bash
kubectl -n ngx rollout history deployment nginx-deploy
kubectl -n ngx rollout undo deployment nginx-deploy

kubectl -n ngx get replicaset
kubectl -n ngx get pods
kubectl -n ngx get pods nginx-deploy-7ff78f74b9-72xc8 -o jsonpath='{.spec.containers[0].image}'
```

## Environment variables

Doc: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/

**TASKS:**
- Create a pod with the latest busybox image running a sleep for 1 hour, and give it an environment variable named `PLANET` with the value `blue`.
- Then exec a command in the container to show that it has the configured environment variable.

Solution

The pod yaml `envvar.yml`:
```bash
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  labels:
    run: envvar
  name: envvar
spec:
  containers:
  - image: busybox:latest
    name: envvar
    args:
      - sleep
      - "3600"
    env:
    - name: PLANET
      value: "blue"
EOF

# Check the env variable:
kubectl exec envvar -- env | grep PLANET
```

## ConfigMaps

Doc: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/

**TASKS**
- Create a configmap named `space` with two values `planet=blue` and `moon=white`.
- Create a pod similar to the previous where you have two environment variables taken from the above configmap and show them in the container.

Solution

```bash
kubectl create configmap space --from-literal=planet=blue --from-literal=moon=white

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  labels:
    run: envvar
  name: envvar
spec:
  containers:
  - image: busybox:latest
    name: envvar
    args:
      - sleep
      - "3600"
    env:
      - name: PLANET
        valueFrom:
          configMapKeyRef:
            name: space
            key: planet
      - name: MOON
        valueFrom:
          configMapKeyRef:
            name: space
            key: moon
EOF

kubectl exec envvar -- env | grep -E "PLANET|MOON"
```

**TASKS**
- Create a configmap named `space-system` that contains a file named `system.conf` with the values `planet=blue` and `moon=white`.
- Mount the configmap to a pod and display it from the container through the path `/etc/system.conf`

Solution

```bash
cat << EOF > system.conf
planet=blue
moon=white
EOF

kubectl create configmap space-system --from-file=system.conf

cat << EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  labels:
    run: confvolume
  name: confvolume
spec:
  containers:
  - image: busybox:latest
    name: confvolume
    args:
      - sleep
      - "3600"
    volumeMounts:
      - name: system
        mountPath: /etc/system.conf
        subPath: system.conf
    resources: {}
  volumes:
  - name: system
    configMap:
      name: space-system
EOF

kubectl exec confvolume -- cat /etc/system.conf
```

## Secrets

Doc: https://kubernetes.io/docs/concepts/configuration/secret/

**TASKS**
- Create a secret from files containing a username and a password.
- Use the secrets to define environment variables and display them.
- Mount the secret to a pod to `admin-cred` folder and display it.

Solution

Create secret.

```bash
echo -n 'admin' > username
echo -n 'admin-pass' > password

kubectl create secret generic admin-cred --from-file=username --from-file=password
```

Use secret as environment variables.

```yaml
apiVersion: v1
kind: Pod
metadata:
  labels:
    run: secretenv
  name: secretenv
spec:
  containers:
  - image: busybox:latest
    name: secretenv
    args:
      - sleep
      - "3600"
    env:
      - name: USERNAME
        valueFrom:
          secretKeyRef:
            name: admin-cred
            key: username
      - name: PASSWORD
        valueFrom:
          secretKeyRef:
            name: admin-cred
            key: password

```

```bash
kubectl apply -f secretenv.yml

kubectl exec secretenv -- env | grep -E "USERNAME|PASSWORD"
USERNAME=admin
PASSWORD=admin-pass
```

Mount a secret to pod:

```yaml
apiVersion: v1
kind: Pod
metadata:
  labels:
    run: secretvolume
  name: secretvolume
spec:
  containers:
  - image: busybox:latest
    name: secretvolume
    args:
      - sleep
      - "3600"
    volumeMounts:
      - name: admincred
        mountPath: /etc/admin-cred
        readOnly: true
  volumes:
  - name: admincred
    secret:
      secretName: admin-cred

```

```bash
kubectl apply -f secretvolume.yml

kubectl exec secretvolume -- ls /etc/admin-cred
password
username

kubectl exec secretvolume -- cat /etc/admin-cred/username
admin

kubectl exec secretvolume -- cat /etc/admin-cred/password
admin-pass
```

## Know how to scale applications

Docs:
- https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
- https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

**TASKS**

- Create a deployment with the latest nginx image and scale the deployment to 4 replicas.

Solution

```bash
kubectl create deployment scalable --image=nginx:latest
kubectl scale deployment scalable --replicas=4
kubectl get pods
```

**TASKS**

- Autoscale a deployment to have a minimum of two pods and a maximum of 6 pods and that transitions when cpu usage goes above 70%.

Solution

In order to use Horizontal Pod Autoscaling, you need to have the metrics server installed in you cluster.

```bash
# Install metrics server
git clone https://github.com/kubernetes-sigs/metrics-server
kubectl apply -f metrics-server/deploy/kubernetes/

# Autoscale a deployment
kubectl create deployment autoscalable --image=nginx:latest
kubectl autoscale deployment autoscalable --min=2 --max=6 --cpu-percent=70
kubectl get hpa
kubectl get pods
```


text:
# Actions for `roc-package-webpack-dev`

## Actions
* [roc-abstract-package-base-dev](#roc-abstract-package-base-dev)
  * [after-clean](#after-clean)
  * [before-clean](#before-clean)
* [roc-plugin-babel](#roc-plugin-babel)
  * [babel-config](#babel-config)
* [roc-package-webpack-dev](#roc-package-webpack-dev)
  * [babel-config](#babel-config-1)
  * [build-webpack](#build-webpack)
  * [run-build-command](#run-build-command)
  * [run-dev-command](#run-dev-command)

## roc-abstract-package-base-dev

### after-clean

Runs after clean command is executed. Logs that the action has been completed successfully.

__Connects to extension:__ `roc-abstract-package-base-dev`
__Connects to hook:__ `after-clean`
__Have post:__ No

### before-clean

Runs before clean command is executed. Returns an array of paths that should be removed.

__Connects to extension:__ `roc-abstract-package-base-dev`
__Connects to hook:__ `before-clean`
__Have post:__ No

## roc-plugin-babel

### babel-config

Base Babel configuration

__Connects to extension:__ Not specified
__Connects to hook:__ `babel-config`
__Have post:__ Yes

## roc-package-webpack-dev

### babel-config

__Connects to extension:__ Not specified
__Connects to hook:__ `babel-config`
__Have post:__ No

### build-webpack

Adds base Webpack configuration and read webpack from the configuration.

__Connects to extension:__ Not specified
__Connects to hook:__ `build-webpack`
__Have post:__ Yes

### run-build-command

Build with Webpack.

__Connects to extension:__ Not specified
__Connects to hook:__ `run-build-command`
__Have post:__ No

### run-dev-command

Run in development mode using Webpack.

__Connects to extension:__ Not specified
__Connects to hook:__ `run-dev-command`
__Have post:__ No

repository: Alxandr/extensions

repo_name: Alxandr/extensions


text:
# Change Log

# [0.2.0](https://github.com/design4pro/sassdoc-webpack-plugin/tree/v0.2.0) (2017-08-18)

[Full Changelog](https://github.com/design4pro/sassdoc-webpack-plugin/compare/v0.1.2...v0.2.0)

### Features

* **package:** read configuration from .sassdocrc file in source directory ([0e03548](https://github.com/design4pro/sassdoc-webpack-plugin/commit/0e03548))

### Chores

* **package:** dependencies ([a9776e8](https://github.com/design4pro/sassdoc-webpack-plugin/commit/a9776e8))

## [0.1.2](https://github.com/design4pro/sassdoc-webpack-plugin/tree/v0.1.2) (2017-08-09)

[Full Changelog](https://github.com/design4pro/sassdoc-webpack-plugin/compare/v0.1.1...v0.1.2)

### Chores

* **release:** 0.1.2 ([a7387af](https://github.com/design4pro/sassdoc-webpack-plugin/commit/a7387af))

### Bug Fixes

* **package:** emit fix ([861f816](https://github.com/design4pro/sassdoc-webpack-plugin/commit/861f816))

## [0.1.1](https://github.com/design4pro/sassdoc-webpack-plugin/tree/v0.1.1) (2017-08-08)

[Full Changelog](https://github.com/design4pro/sassdoc-webpack-plugin/compare/v0.1.0...v0.1.1)

### Chores

* **release:** 0.1.1 ([f93a636](https://github.com/design4pro/sassdoc-webpack-plugin/commit/f93a636))

### Bug Fixes

* **package:** throw fix ([fbc2f83](https://github.com/design4pro/sassdoc-webpack-plugin/commit/fbc2f83))

# [0.1.0](https://github.com/design4pro/sassdoc-webpack-plugin/tree/v0.1.0) (2017-08-08)

[Full Changelog](https://github.com/design4pro/sassdoc-webpack-plugin/compare/v0.0.6...v0.1.0)

### Chores

* **release:** 0.1.0 ([912b172](https://github.com/design4pro/sassdoc-webpack-plugin/commit/912b172))

### Features

* **package:** read config from options or from .sassdocrc file ([37dab38](https://github.com/design4pro/sassdoc-webpack-plugin/commit/37dab38))

## [0.0.6](https://github.com/design4pro/sassdoc-webpack-plugin/tree/v0.0.6) (2017-08-06)

[Full Changelog](https://github.com/design4pro/sassdoc-webpack-plugin/compare/v0.0.5...v0.0.6)

### Chores

* **package:** gitignore update, readme update ([eccfa78](https://github.com/design4pro/sassdoc-webpack-plugin/commit/eccfa78))

* **release:** 0.0.6 ([ad20ea1](https://github.com/design4pro/sassdoc-webpack-plugin/commit/ad20ea1))

### Bug Fixes

* **package:** run after emit ([5026eb8](https://github.com/design4pro/sassdoc-webpack-plugin/commit/5026eb8))

## [0.0.5](https://github.com/design4pro/sassdoc-webpack-plugin/tree/v0.0.5) (2017-08-04)

[Full Changelog](https://github.com/design4pro/sassdoc-webpack-plugin/compare/v0.0.4...v0.0.5)

### Chores

* **release:** 0.0.5 ([c7a9fa8](https://github.com/design4pro/sassdoc-webpack-plugin/commit/c7a9fa8))

### Bug Fixes

* **package:** fix callback ([097d357](https://github.com/design4pro/sassdoc-webpack-plugin/commit/097d357))

## [0.0.4](https://github.com/design4pro/sassdoc-webpack-plugin/tree/v0.0.4) (2017-08-04)

[Full Changelog](https://github.com/design4pro/sassdoc-webpack-plugin/compare/v0.0.3...v0.0.4)

### Chores

* **release:** 0.0.4 ([0efaa83](https://github.com/design4pro/sassdoc-webpack-plugin/commit/0efaa83))

### Bug Fixes

* **package:** change to emit ([e54791c](https://github.com/design4pro/sassdoc-webpack-plugin/commit/e54791c))

## [0.0.3](https://github.com/design4pro/sassdoc-webpack-plugin/tree/v0.0.3) (2017-08-04)

[Full Changelog](https://github.com/design4pro/sassdoc-webpack-plugin/compare/v0.0.2...v0.0.3)

### Chores

* **release:** 0.0.3 ([d2f9f84](https://github.com/design4pro/sassdoc-webpack-plugin/commit/d2f9f84))

### Bug Fixes

* **package:** run plugin after compile but before done ([4ae4f53](https://github.com/design4pro/sassdoc-webpack-plugin/commit/4ae4f53))

## [0.0.2](https://github.com/design4pro/sassdoc-webpack-plugin/tree/v0.0.2) (2017-07-27)

[Full Changelog](https://github.com/design4pro/sassdoc-webpack-plugin/compare/v0.0.1...v0.0.2)

### Chores

* **release:** 0.0.2 ([e8c9ab9](https://github.com/design4pro/sassdoc-webpack-plugin/commit/e8c9ab9))

### Bug Fixes

* **package:** sassdoc options ([7783ef8](https://github.com/design4pro/sassdoc-webpack-plugin/commit/7783ef8))

## [0.0.1](https://github.com/design4pro/sassdoc-webpack-plugin/tree/v0.0.1) (2017-07-27)

[Full Changelog](https://github.com/design4pro/sassdoc-webpack-plugin/compare/1219906...v0.0.1)

### Chores

* **package:** initial commit ([1219906](https://github.com/design4pro/sassdoc-webpack-plugin/commit/1219906))

* **release:** 0.0.1 ([b3e44d2](https://github.com/design4pro/sassdoc-webpack-plugin/commit/b3e44d2))


text:
# Requirements

* Assert `openssl` installed
* Assert `go version` >= 1.6
* Assert `go env`
  * contains `GO15VENDOREXPERIMENT="1"` (dependencies are tracked using [vendoring](https://golang.org/cmd/go/#hdr-Vendor_Directories))

# Create Gospace
    cd ~
    mkdir gospace
    cd gospace
    export GOPATH=~/gospace

You might want to put this into your .bashrc

# Get MAMID
    go get github.com/KIT-MAMID/mamid
    go get -u github.com/jteeuwen/go-bindata/...
    cd $GOPATH/src/github.com/KIT-MAMID/mamid
    git submodule update --init

# Unit Tests

Running tests requires a PostgreSQL instance with permission to `CREATE DATABASE` and `DESTROY DATABASE`

 Running the test instance in a docker container different than the one used for `make testbed_*` builds is recommended

    docker run --name mamid-postgres-tests -p 5432:5432 -e POSTGRES_PASSWORD=foo1 -d postgres
    # You should now be able to connect to the container using the password above
    psql -h localhost -U postgres
    # You can run tests by setting the appropriate DSN environment variable
    MAMID_TESTDB_DSN="host=localhost port=5432 user=postgres password=foo1 sslmode=disable dbname=postgres" make test-verbose

# Docker Test Cluster

The Makefile includes targets to create a cluster test environment in docker:

* `make testbed_down` kills all containers.
* `make testbed_up` (re)spawns the master, postgres, the notifier and three slaves. This deletes all data from the previous run.

If you want to spawn more than three slaves you can adjust the `TESTBED_SLAVE_COUNT` variable in the Makefile.

But before you can start the cluster you have to configure some things...

## Generate Certificates
For communication between master and slaves certificates are needed for encryption and authentication.
These have to be signed by a local CA.

You will have to create a testing CA and certificates for all containers on your host machine. These will then be mounted into the containers by the Makefile target.

You can generate the CA using

    ./scripts/generateCA.sh

The CA public and private keys will be generated in `ca/mamid.pem` and `ca/private/mamid_private.pem`.

You further have to create certificates for the master and the slaves:

    ./scripts/generateAndSignSlave.sh master <IP_ADDRESS>

You can generate multiple certificates for the slaves at once using:

    read -s -p "Enter CA signing key passphrase:: " CA_PASS
    export CA_PASS
    for i in $(seq -f %02g 1 20); do ./scripts/generateAndSignSlaveCert.sh slave${i} <IP_ADDRESS>${i}; done

## Configuring the Notifier

This is optional. If this step is skipped the notifier will exit immediately.

Go into the `notifier` directory and create a config.ini file

    [notifier]
    api_host=http://<IP_ADDRESS>:8080
    contacts=contacts.ini
    [smtp]
    relay_host=mail.foo.bar:25 #Your local smarthost
<EMAIL_ADDRESS>
and a contacts.ini file

    [person-name]
<EMAIL_ADDRESS>
You should then receive an Email for every problem.

## Starting the Cluster

If you now start the testbed using `make testbed_up` you should have a running instance of the master at `<IP_ADDRESS>:8080`.

# Testing Procedure / Basic Usage

## Adding Slaves

You can now continue by adding and enabling some slaves in the GUI or using the test fixtures script:

    ./scripts/fixtures.py -c -n <number of slaves specified in TESTBED_SLAVE_COUNT>

The slaves should be active and not generate any problems.

## Adding a Replica Set

Continue by adding a Replica Set using the GUI.
After you clicked on "Create" Mongods will be assigned to the Replica Set.

They will be in destroyed state first and a problem might appear, but after about 30 seconds the problem should have disappeared and the Mongods should be in running state.

 This should generate a problem.

If you then set the killed slave to disabled (and there still is a free slave of the same persistence type left) a new Mongod should be added to the Replica Set.

*Note:* The Mongod on the killed slave will not be removed as MAMID can not communicate with the slave.
For it to be removed you have to either restart the slave or delete the slave using the GUI.

*Note:* For the adding of the new Mongod to work the initial Replica Set has to consist of at least three members.
Otherwise the Replica Set will not be able to elect a new primary and MAMID can not configure the Replica Set as this can only happen through the primary (without force).

To fix this, the administrator has to log in to the remaining secondary member and force the adding of the new Mongod, e.g.:

    mongo <IP_ADDRESS>:18080
    use admin
    db.auth("mamid", "<password, see system tab>")
    conf = rs.conf()
    conf.members.push({"_id": <id from 0 to 255 not used in config yet>, "host": "<new host:port>"})
    rs.reconfig(conf, {force:true})

## Temporarily Unreachable Slave

To simulate a temporary disconnection of a slave, e.g. by a broken network cable, you can disconnect the container from the network using

    docker network disconnect mamidnet0 slave01

This should generate a problem.

When you reattach the container to the network using

    docker network connect --ip <IP_ADDRESS> mamidnet0 slave01

the problem should disappear.

## Changing Replica Set Member Counts

If you increase the member counts of a Replica Set new members should appear and be added to the Replica Set.

If not enough free ports are available a problem should appear.

## Destroying a Replica Set

If you click on the *Remove Replica Set* Button in the Replica Set Detail View, the Replica Set should disappear and its Mongods and their data should be destroyed.

repository: KIT-MAMID/mamid

gha_language: Go

repo_name: KIT-MAMID/mamid


text:
---
title: Index of Spring Reference
permalink: /Spring/
description: 스프링 공식 문서 번역 레퍼런스
image: ./../../images/spring/logo.png
lastmod: 2021-04-06T22:00:00+09:00
comments: false
includeHeader: false
includeFooter: false
---

---

| project | version | updated in | original ref |
| :------------- | :------------------| :----------------: | :----------------: |
| [Spring Batch](/Spring%20Batch/contents/) | 4.2.x | 2020/05 | [ref](https://docs.spring.io/spring-batch/docs/4.2.x/reference/html/index-single.html) |
|[Spring Web on Reactive Stack](/Reactive%20Spring/contents/) | 5.2.6.RELEASE| 2020/06 | [ref](https://docs.spring.io/spring-framework/docs/5.2.6.RELEASE/spring-framework-reference/web-reactive.html) |
|[Spring Security](/Spring%20Security/contents/) |5.3.2.RELEASE |2020/09 | [ref](https://docs.spring.io/spring-security/site/docs/5.3.2.RELEASE/reference/html5/) |
| [Spring REST Docs](/Spring%20REST%20Docs/contents/) | 2.0.5.RELEASE | 2020/12 | [ref](https://docs.spring.io/spring-restdocs/docs/2.0.5.RELEASE/reference/html5/) |
| [Spring Data R2DBC](/Spring%20Data%20R2DBC/contents/) | 1.2.2 | 2020/12 | [ref](https://docs.spring.io/spring-data/r2dbc/docs/1.2.2/reference/html/#) |
| [Spring Data Access](/Spring%20Data%20Access/contents/) | 5.3.2 | 2021/01 | [ref](https://docs.spring.io/spring-framework/docs/5.3.2/reference/html/data-access.html) |
| [Spring Cloud Config](/Spring%20Cloud%20Config/contents/) | 3.0.3 | 2021/03 | [ref](https://docs.spring.io/spring-cloud-config/docs/3.0.3/reference/html/) |
| [Spring Cloud Gateway](/Spring%20Cloud%20Gateway/contents/) | 3.0.2 | 2021/04 | [ref](https://docs.spring.io/spring-cloud-gateway/docs/3.0.2/reference/html/) |
| [Spring Cloud Circuit Breaker](/Spring%20Cloud%20Circuit%20Breaker/contents/) | 2.0.1 | 2021/05 | [ref](https://docs.spring.io/spring-cloud-circuitbreaker/docs/2.0.1/reference/html/) |
| [Spring Boot](/Spring%20Boot/contents/) | 2.5.2 | 2021/07 | [ref](https://docs.spring.io/spring-boot/docs/2.5.2/reference/htmlsingle/) |


text:
# ES7 Persistence

This module provides ES7 persistence when indexing workflows and tasks.

## ES Breaking changes

From ES6 to ES7 there were significant breaking changes which affected ES7-persistence module implementation.
* Mapping type deprecation
* Templates API
* TransportClient deprecation

More information can be found here: https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html

## Build

1. In order to use the ES7, you must change the following files from ES6 to ES7:

https://github.com/Netflix/conductor/blob/main/build.gradle
https://github.com/Netflix/conductor/blob/main/server/src/main/resources/application.properties

In file:

- /build.gradle

change ext['elasticsearch.version'] from revElasticSearch6 to revElasticSearch7

In file:

- /server/src/main/resources/application.properties

change conductor.elasticsearch.version from 6 to 7

Also you need to recreate dependencies.lock files with ES7 dependencies. To do that delete all dependencies.lock files and then run:

```
./gradlew generateLock updateLock saveLock
```

2. To use the ES7 for all modules include test-harness, you must change also the following files:

https://github.com/Netflix/conductor/blob/main/test-harness/build.gradle
https://github.com/Netflix/conductor/blob/main/test-harness/src/test/java/com/netflix/conductor/test/integration/AbstractEndToEndTest.java

In file:

- /test-harness/build.gradle

* change module inclusion from 'es6-persistence' to 'es7-persistence'

In file:

- /test-harness/src/test/java/com/netflix/conductor/test/integration/AbstractEndToEndTest.java

* change conductor.elasticsearch.version from 6 to 7
* change DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss").withTag("6.8.12") to DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss").withTag("7.6.2")

## Usage

This module uses the following configuration options:

* `conductor.elasticsearch.url` - A comma separated list of schema/host/port of the ES nodes to communicate with.
Schema can be `http` or `https`. If schema is ignored then `http` transport will be used;
Since ES deprecated TransportClient, conductor will use only the  REST transport protocol.
* `conductor.elasticsearch.indexPrefix` - The name of the workflow and task index.
Defaults to `conductor`
* `conductor.elasticsearch.asyncWorkerQueueSize` - Worker Queue size used in executor service for async methods in IndexDao
Defaults to `100`
* `conductor.elasticsearch.asyncMaxPoolSize` - Maximum thread pool size in executor service for async methods in IndexDao
Defaults to `12`
* `conductor.elasticsearch.asyncBufferFlushTimeout` - Timeout (in seconds) for the in-memory to be flushed if not explicitly indexed
Defaults to `10`

### BASIC Authentication
If you need to pass user/password to connect to ES, add the following properties to your config file
* conductor.elasticsearch.username
* conductor.elasticsearch.password

Example
```
conductor.elasticsearch.username=someusername
conductor.elasticsearch.password=somepassword
```

repository: andyyumiao/conductor

branch_name: refs/heads/main

repo_name: andyyumiao/conductor


text:
# tisemu

`tisemu` is a [TIS-100](http://www.zachtronics.com/tis-100/) emulator. TIS-100
is a rad open-ended programming game where you solve puzzles by programming a
multi-node machine in a kind of assembly language. You should probably go play
the game instead of messing around here.

`tisemu` supports the `T21` execution node, the `T30` stack memory node, and a
terminal based visualization mode (using termbox). I think there are plans to
add more node types to the game. When that happens I'll probably add them here.

## Machine Maps

In the game, each puzzle can have a different array of nodes and node types.
When using `tisemu`, the machine can be describe in a simple map file. The map
file format is as follows:

```
<COLS>
<ROWS>
<DISPLAY>
<NODETYPE>
...
```

`COLS` is the number of columns in the node array. `ROWS` is the number of rows
in the node array. `DISPLAY` describes the display capabilities. This value can
either be `F` for no display, or `T <COLS> <ROWS>` for a display with a
provided gemetry. `NODETYPE` describes a type for each node in the array,
starting from the top left proceeding to the bottom right. There should be
`COLS * ROWS` lines. The supported values are currently `T21` and `T30`. If no
map file is provided, a default map of 4x3 (12 total) T21 nodes with no display
will be used. See the examples directory for some example map files.

## Code Files

Code for all nodes in a machine lives in one file. It's best to play the game
and understand the code first. `tisemu` tries to keep the same format as the
game's save files, but differs slightly in node numbering. The game does not
appear to maintain numbering for "bugged" nodes and `T30` nodes, but `tisemu`
does. If you want to plug in save files from the game you might need to
renumber the nodes. I might fix this in the future.

## Running Code

Input and output to the machine is given on the command line in the format
`-in=<node>,<file>` or `-out=<node>,<file>`. For example, `-in=1,in.a` will
open file `in.a` and write its lines as input to node `1`.

### Examples

```
./tisemu signal-divider.tis -map=standard.map -in=1,in.a -in=2,in.b -out=9,out.q -out=10,out.r
```

```
./tisemu sequence-indexer.tis -map=memory.map -in=0,in.v -in=2,in.x -out=10,/dev/stdout
```

```
./tisemu display.tis -map=display.map
```

Here's an example of the visualization mode solving part of the exposure mask
viewer puzzle from the game. I've slowed down the system clock so the drawing
operations are displayed.

![tisemu](https://cloud.githubusercontent.com/assets/143/8767250/63e59a56-2e24-11e5-9372-4b2801801f21.gif)

repository: rubyist/tisemu

repo_name: rubyist/tisemu


text:
# Gatsby Tutorial Part 1

This repo follows the steps in _[Introduction to Gatsby basics](https://www.gatsbyjs.org/tutorial/part-one/)_, part one of the [seven part tutorial](https://www.gatsbyjs.org/tutorial/) in the Gatsby v1 documentation.

In this tutorial, I

- add inline styles via a JavaScript style prop,
- create links,
- create React page components,
- and add an interactive counter.

## Demo

The website created by this repo is built from the [gatsby-hello-world](https://github.com/gatsbyjs/gatsby-starter-hello-world) starter, which has the bare essentials needed for a Gatsby site.

The website is deployed on [fuzzy-month.surge.sh](http://fuzzy-month.surge.sh).

## Installation

### Prerequisites

You need to have Node.js and npm installed. You can install both npm and Node by installing [Node](https://nodejs.org/en/) since npm is distributed with Node. You can use a Node.js version manager like [NVM](https://github.com/creationix/nvm) to switch Node versions between projects.

If you want to use Gatsby's command line tool, you need to install it.

`npm install --global gatsby-cli`

### Install project

In the terminal, move to the directory you want this repo to be in.

`cd parentDirectoryPath`

If you have git installed, clone this repo. You can also download this repo by clicking on the green "Clone or download" button.

`git clone https://github.com/eunicode/gatsby-tut-1.git`

### Install dependencies

`npm install`

## Running in development

If you have Gatsby's command line tool installed, you can run the command `gatsby develop`, and Gatsby will start a hot-reloading development environment accessible at localhost:8000.

You can see more CLI commands in the [docs](https://www.gatsbyjs.org/docs/).

## Attribution

- [Introduction to Gatsby basics](https://v1.gatsbyjs.org/tutorial/part-one/)
- Gatsby [Hello World](https://github.com/gatsbyjs/gatsby-starter-hello-world) starter


text:
---
title: Lesson Six
---

Operating model: operating rhythm

### To ensure interactions with DMGT are productive and predictable, an operating rhythm of informal catch ups and more formal updates has been developed. The rhythm is designed to give Operating Company CEOs and CFOs more visibility of DMGT processes and guidance to when proposals should be submitted.

CEO 1:1 catch ups

#### DMGT Board and Committees:

* Regular conversations between DMGT CEO and Operating Company CEOs.

* Based around a set of regular items of discussion, such as objectives and top priorities.

* Priorities should be clear, measurable, binary actions to be achieved over 3-6 months and the drivers of performance.

Performance updates

* DMGT CEO, DMGT CFO, Operating Company CEO and Operating Company CFO.

* Focus on performance over preceding and coming months.

* Financial focus using monthly dashboards/flash reports.

* Monthly to quarterly.

CFO 1:1 catch ups

* Regular schedule of catch ups between DMGT CFO and Operating Company CFOs.

* Aimed at increasing transparency and understanding operating performance.

Operating Company boards

* Broader Operating Company update and DMGT leadership team meeting.

* To be held at the Operating Companies with DMGT CEO and DMGT CFO in attendance.

* Discussion of ongoing focuses and longer term strategy.

* DMGT will nominate members of Operating Company Boards in its capacity as ultimate parent company shareholder.

* Any other recommendations for Operating Company Boards must be discussed with the DMGT CEO in advance.
• Operating Company Boards must act ethically and in accordance with all applicable laws and Operating Company constitutional documents.

* Operating Company Boards must act within the authorisation and approval limits of the Green Book.

- - -

Contacts:

Paul Zwillenberg, DMGT CEO<EMAIL_ADDRESS>

Fran Sallas, Company Secretary<EMAIL_ADDRESS>

Tim Collier, DMGT CFO<EMAIL_ADDRESS>

Matt Oatway, Chief of Staff<EMAIL_ADDRESS>
***

Go to www.iworkhere.dmgt.com for:
[Guidance for Directors](https://www.iworkhere.dmgt.com/member/login?destination=node/39%3Fpolicy_type%3D63 "Guidance for Directors")

repository: gmorlov/gatsby-starter-docs

repo_name: gmorlov/gatsby-starter-docs


text:
# Deformable Snow for Unity -- PIGSquad Stream Repo

Workshop streamed on: https://www.twitch.tv/pigsquad!

![preview](http://i.imgur.com/VytQ4n0.png)

A straightforward technique for rendering deformable snow in limited areas based off of http://www.gdcvault.com/play/1020177/Deformable-Snow-Rendering-in-Batman

### Summary:

* An orthographic camera with a short clipping plane captures depth without clearing its buffer.

* A shader for snow reads the depth texture and creates imprints in its tessellated surface.

* Snow is refreshed by using a screen effect which constantly darkens the imprint buffer.

### Notes:
This specific implimentation is for flat fixed areas! It can be reconfigured to different aspect ratios but doesn't work outside its volume. It's possible to extend though!

In [That Blooming Feeling](https://totsteam.itch.io/thatbloomingfeeling) I used a similar technique in world space that follows the camera and has the environment responding to the buffer (animating / recoiling / +). It's based off of Naughty Dog's method they use for vehicle damage, foliage interaction, +. They have some good notes on this lower down in this talk! http://advances.realtimerendering.com/other/2016/naughty_dog/index.html

If this doesn't work on your machine out of the box double check you're using OpenGLCore or DX11+ in your Unity project. Tessellation is only supported on more recent graphics APIs.

Cheers,

Thomas Newlands

@thnewlands


text:
# geo-streetaddress-canada

[![npm](https://img.shields.io/npm/v/geo-streetaddress-canada.svg)](https://www.npmjs.com/package/geo-streetaddress-canada)
[![GitHub tag](https://img.shields.io/github/tag/SweetIQ/node-geo-streetaddress-canada.svg)](https://github.com/SweetIQ/node-geo-streetaddress-canada)
[![CircleCI branch](https://img.shields.io/circleci/project/github/SweetIQ/node-geo-streetaddress-canada/master.svg)](https://circleci.com/gh/SweetIQ/node-geo-streetaddress-canada)

This is a NodeJS wrapper for Perl extension [Geo::StreetAddress::Canada].

> Geo::StreetAddress::Canada is a regex-based street address and street intersection parser for Canada. Its basic goal is to be as forgiving as possible when parsing user-provided address strings. Geo::StreetAddress::Canada knows about directional prefixes and suffixes, fractional building numbers, building units, grid-based addresses, postal codes, and all of the official Canada Post abbreviations for street types, province names and secondary unit designators. Please note that this extension will only return data in English.

## Dependencies

- Node.js v6
- Perl 5.24+

## Usage

Install GeoStreetAddressCanada from npm

```bash
npm install --save geo-streetaddress-canada
```

Use in NodeJS:

```javascript

var geoStreetAddressCanada = require('geo-streetaddress-Canada')

geoStreetAddressCanada.parseLocation('845 Rue Sherbrooke O, Montréal, QC H3A 0G2')

/*
{
    postalcode: 'H3A 0G4',
    street: 'Rue Sherbrooke O',
    city: 'Montral',
    number: '845',
    type: '',
    province: 'QC'
}
*/

geoStreetAddressCanada.parseAddress('7141 Rue Sherbrooke O, Montréal, QC H4B 1R2')

/*
{
    city: 'Montral',
    type: '',
    province: 'QC',
    street: 'Rue Sherbrooke O',
    number: '7141',
    postalcode: 'H4B 1R6'
}
*/

geoStreetAddressCanada.parseInformalAddress('2900 Boulevard Edouard-Montpetit, Montréal, QC H3T 1J2')

/*
{
    number: '2900',
    postalcode: 'H3T 1J4',
    province: 'QC',
    type: '',
    street: 'Boulevard Edouard-Montpetit',
    city: 'Montral'
}
*/

```

[Geo::StreetAddress::Canada]: https://metacpan.org/pod/release/TEEDOT/Geo-StreetAddress-Canada-1.04/Canada.pm

repository: xiamx/node-geo-streetaddress-canada

repo_name: xiamx/node-geo-streetaddress-canada


text:
---
title: Quickstart
permalink: /cloud/quickstart
category: Quickstart
menuOrder: 1
---

This guide walks you through setting up Cube Cloud and connecting to your database.

## Step 1: Create an account

Navigate to [cubecloud.dev](https://cubecloud.dev/auth/signup), and create a new Cube Cloud account.

## Step 2: Create Deployment

Click Create Deployment. Then give it a name and select the cloud provider and
region of your choice.

## Step 3: Upload your Cube.js project

## Step 4: Connect your Database

## Step 5: Try out Cube Cloud

Now you can navigate to Playground to try out your queries or connect your
application to Cube Cloud API.

detected_licenses: MIT Cube Apache-2.0


text:
# LAB: Express REST API

Dynamic API Phase 2: Perform CRUD Operations on a database

**Author:** Afnan Damra
**Version:** 1.0.0

**Links:**

- [Repo Link](https://github.com/afnandamra/basic-api-server)
- [GitHub Actions](https://github.com/afnandamra/basic-api-server/actions)
- [Deployed Site](https://afnan-api-server.herokuapp.com/)
- [PR Link](https://github.com/afnandamra/basic-api-server/pull/1)

## Setup

### Install

- Clone the repository from GitHub
- Run the command `npm i express dotenv morgon uuid cors jest supertest` to install dependencies
- create .env file with PORT variable

### Test

- Run the command `npm test` to test and verify the server and the midddlewares are working.
- Run the command `npm run lint` for testing lint.

### Run

- Start the server using `nodemon`
- Visit http://localhost:PORT at the PORT number you've assigned in your .env

## Documentation

### UML Diagram

Below is a UML of my application (created at https://app.diagrams.net)

![UML Lab3](assets/lab03-diagram.jpg)

repository: afnandamra/basic-api-server

repo_name: afnandamra/basic-api-server


text:
## Analyze serviceflow

Now that we are back on the frontend service, lets look at the service flow to see whats different now.  Just click on the `view service flow` button to open this.

![image](../../../assets/images/lab2-k8-frontend-serviceflow.png)

## Response time perspective

You should now be on the `Service flow` page.

Right away, we can see how this application is structured:

* Frontend calls order, customer, and catalog service
* Order service calls order and customer service

Something you would never know from the application web UI !

![image](../../../assets/images/lab2-service-flow.png)

Refer to the picture above:

1. We are viewing the data from a `Response time perspective`. Shortly, we will review the `Throughput perspective`.
1. Click on the boxes to expand the response time metrics. We can see that most of the response time, most of the time is spent in the `order` service and the least in the `customer` services.  And as in the monolith version of the application, a very small amount of the response time is spent in the databases.

## Throughput perspective

![image](../../../assets/images/lab2-service-flow-tp.png)

Refer to the picture above:

1. Change to the `Throughput perspective` by clicking on the box
1. Click on the boxes to expand the metrics to see the number of requests and average response times going to each service

## 👍 How this helps

Review architecuture changes before and after changes is now as easy as a few clicks !


text:
# Classrooms
A classroom has:
  - Classroom ID (auto-generated, non-editable)
  - Name (editable)
  - Description (editable, optional)
  - Assignments
  - Users (teachers/students)
  - ...

## /orgs/{oid}/classrooms (supports POST to create)
  - Accepts a query parameter to specify the current page
  - Paginated list with all classrooms
    - Each item has the classroom name and a link to `/orgs/{oid}/classrooms/{cid}`
    - Each item also has the number of students, and a list of the most recent assignments
    - Each item has a small icon to indicate if the user is a student or a teacher
  - Button to create a new classroom (`/orgs/{oid}/classrooms/new`)
  - If the user is the organization owner, button to create a new classroom (`/orgs/{oid}/classrooms/new`)

## /orgs/{oid}/classrooms/new
  - Form to create a new classroom
  - Creates by making a POST request to (`/orgs/{oid}/classrooms`)

## /orgs/{oid}/classrooms/{cid} (supports PUT to edit)
  - Information about the classroom (e.g. name, description)
  - List with most recent classroom assignments
    - Each item has the assignment name, the due date and a link to `/orgs/{oid}/classrooms/{cid}/assignments/{aid}`
    - Each item has information about whether its an individual or group assignment
    - Each item may show the number of students that finished the assignment (what if the assignment has multiple deliveries?)
  - Button to show paginated list of assignments (`/orgs/{oid}/classrooms/{cid}/assignments`)
  - Button to create a new assignment (`/orgs/{oid}/classrooms/{cid}/assignments/new`)
  - Button for a student to join classroom (only if allowed, e.g. is in institution, was invited...)

repository: i-on-project/codegarten

gha_language: Kotlin

repo_name: i-on-project/codegarten


text:
# MASM Assembly codes
Assembly codes for university class. All the codes are far from optimal and experimental.

All the codes were tested in Dosbox with MASM Assembler.

## Important code blocks

* Clear screen
    ``` assembly
        MOV AX, 0003h
        INT 10h
    ```

* Print Char with DOS (eg.: Prints content of DL half-register -> changes AL)
    ``` assembly
        MOV DL, "x"
        MOV AH, 02h
        INT 21h
    ```

* Print String with DOS (eg.: SOMESTRING DB "my string$")
    ``` assembly
        MOV DX, offset SOMESTRING
        MOV AH, 09h
        INT 21h
    ```

* Readkey (Needs 00h in AH)
    ``` assembly
        XOR AH, AH
        int 16h
    ```

* End of program
    ``` assembly
        mov	ax, 4c00h
	    int	21h
    ```


text:
---
layout: single
title:  "[C] Structure"
categories:
    - C/C++
toc: true
toc_label: "Contents Table"
toc_icon: "list"
tags:
    - C
    - Programming
---

Structures are mainly used when you want to collect and deal with various data types from declaring and using data types one by one. Structures are derived types created by combining basic data types, and have the same characteristics as they are classified as data types such as `int`, `char`, and `float`. Structures must first declare their shape/form, and this is called a `template`. After the `template` is created, the structure variable is declared using it. There are several ways to declare a structure and initialize variables. There are cases where only the template is defined and the initial value is defined later, the template and initialization are performed at once, and the anonymous structure is used without the name of the template. Initializers of all structures, including anonymous structures used with `typedef` functions, can be used only at the beginning, and after that, each element must be accessed and modified individually.

```c
#include <stdio.h>
struct s_a{
    int a;
    char b;
};

struct s_b{
    int a;
    char b;
} x = {2, 'B'};

int main(){
    struct s_a y={1,'A'};

    printf("%d %c\n", y.a, y.b );
    printf("%d %c\n", x.a, x.b);

    return 0;
}
```

```
1 A
2 B
```

Since structures have the same properties as data types, both the `*` operator and the `[]` array type can be used. In particular, when using the `*` operator to access an element in a structure, it can be accessed through the `->` operator.

```c
#include <stdio.h>
struct s_a{
    int a;
    int b;
} x={1,2};

int main(){

    struct s_a *p;
    struct s_a q[4];

    p = &x;

    (*p).a = 4;
    printf("%d\n",p.b);

    p->a = 27;
    printf("%d\n",p.b);

    printf("%d\n",q[3].b);
    q[3].b=27;
    printf("%d\n",q[3].b);

    return 0;
}

```

```
4
27
0
27
```

Additionally, `typedef` are often used when using structures. It acts as a preprocessor and is easy to understand if you think of it as a nickname. It is mainly used when defining anonymous structures.

``` c
#include <stdio.h>
typedef struct
{
    int a;
    char b;
} s_e;

int main(){

    s_e st={4,'M'};

    printf("%d %c", st.a, st.b);

    return 0;
}

```

```
4 M
```


text:
# Material-sass [![Gem Version](https://badge.fury.io/rb/material-sass.svg)](http://badge.fury.io/rb/material-sass)

`material-sass` is a rubygems version of Material Design for Bootstrap 4

Offical repo  [github.com/Daemonite/material](https://github.com/Daemonite/material)

Documentation [daemonite.github.io/material](http://daemonite.github.io/material)

## Dependencies

**Rails 5.1+**
The Rails JavaScript helpers has been rewritten in a new gem called rails-ujs and they use vanilla JavaScript, so jQuery is not a dependency of Rails anymore.
Since bootstrap relies on it, install it with ```bin/yarn add jquery``` or via ```gem 'jquery-rails'```  and add ```//= require jquery``` to ```application.js```.

**NOTE:** Ensure that the `sass-rails` gem is presented in your Gemfile.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'bootstrap',     '4.1.1'
gem 'material-sass', '4.1.1'
```
And then run the bundler and restart your server to make the files available through the pipeline:

```console
$ bundle install
```

Or install it yourself as:

```console
$ gem install material-sass
```

## Usage

### a. Sass

Import Materialize styles in `app/assets/stylesheets/application.scss`:

```scss
@import "material";
//ps: no need to import 'bootstrap'
```

**NOTE:** If you have just generated a new Rails application, it  may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so remove it.

```console
$ rm app/assets/stylesheets/application.css
```

### b. JavaScript

Require Material javascripts in `app/assets/javascripts/application.js`:

```js
//= require jquery
//= require popper
//= require bootstrap
//= require material
```

### c. Icons

Include this line in the <head>portion of your HTML code

``` <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> ```

or import this line in your application.scss

``` @import "https://fonts.googleapis.com/icon?family=Material+Icons"; ```

or install this gem for offline icons

``` gem 'material_icons' ```

see [docs](https://github.com/Angelmmiguel/material_icons)

## Contributing
note: Any changes or Pull Request regarding material assets should be made in official [material](https://github.com/Daemonite/material) repo.

1. Fork it ( https://github.com/mkhairi/material-sass/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

repository: kentarofujiy/material-sass

repo_name: kentarofujiy/material-sass


text:
---
title: "New Repo: MAT"
categories: new-repo
---

[MAT](https://github.com/LLNL/MAT), or Memory Analysis Tool, traces all memory accesses to stack(Static allocation)/heap(Dynamic allocation) on a trace run in a particular hardware and then estimates execution time on given arbitrary hardware configurations for hardware design space exploration. This repo is in its alpha version.


text:
#The waters forced themselves higher and higher on the earth

"The waters came more and more powerfully on the earth" or "The water totally overwhelmed the earth"

#the whole heaven

"the entire sky"

#fifteen cubits

"six meters." See how you translated this in [[:en:bible:notes:gen:06:13|6:15]].


text:
# osm2gpx.py: public GPS traces collection from OSM

_Script to collect public GPS data from the [OSM API (0.6)](https://wiki.openstreetmap.org/wiki/API_v0.6#GPS_traces) around a given area._

## Requirements

- `Python 3.7`
- `Click`
- `requests`
- `tqdm`

		$ pip install -r requirements.txt

## Usage

```
Usage: osm2gpx.py [OPTIONS]

Options:
  --nb_traces INTEGER  Number of gpx traces.
  --city_name TEXT     City name / examples: [ile-de-france, paris, lyon,
                       bourg-saint-maurice].
  --output_dir TEXT    Directory for downloaded traces [gpx_traces].
  --offset INTEGER     Pagination offset for OSM requests [0].
  --help               Show this message and exit.
```

We can find traces in the `gpx_traces` directory by default. Traces naming follows this pattern:

	{output_dir}/trace_{city_name}_{uuid}.gpx

where `uuid` is based on the host ID and current time. We use uuid to avoid overwriting previous traces.

Note: as of now, bounding box coordinates are hardcoded in the script. An evolution could take them as parameters :)

### Example

- Get 5 gpx traces in Paris from OSM with an offset on 500 (you get the traces 500 to 504)

		python osm2gpx.py --nb_traces 5 --city_name paris --offset 500


text:
---
layout: post
title: "Detect mobile devices on a shiny app"
date: "2017-08-13 21:23:00 -0300"
---
If you have a shiny app, you don't pay for the pro version, and you want to detect mobile browsers (to tweak your logic) then this post is for you.

<!--more-->
# Why I wanted to do so

[My wife](https://d4tagirl.com) is working on a [shiny](https://shiny.rstudio.com/) app... and she needed to show a [plotly](https://plotly.com/) graph to desktop users and a [ggplot2](https://ggplot2.tidyverse.org/) graph to mobile users.

# Check the user agent, he said

My first suggestion was for her to check out the user agent... she did it by using     `session$request$HTTP_USER_AGENT` and locally, it worked just fine. The fun part was when she deployed the code to her shiny server...

She wouldn't get a user agent at all. Of course, I forgot to pass the header on nginx... but, even after I did (and verified on the shiny server traffic logs that it was being received by shiny) the value was still empty. And the reason was... [it's a Pro feature](https://docs.posit.co/shiny-server/#proxied-headers)! I understand they need to make money out of their beautiful software, but this sounds... odd to me.

# How do we do it?

Aaanyway, then thanks to [Dean Attali](https://twitter.com/daattali)'s suggestion, we started looking into how to actually do that via Javascript. After all, a shiny app is just a web app.

After a couple failed attempts with [shinyjs](https://github.com/daattali/shinyjs) (it requested to install V8 and it was heavy heavy heavy) I discovered [input bindings](https://shiny.rstudio.com/articles/building-inputs.html).

They're not super complicated to set up... but just to save you a couple minutes of your life, I'll share my solution :)

## The javascript code

I created a `www/js/mobile.js` file with this content:

```
var isMobileBinding = new Shiny.InputBinding();
$.extend(isMobileBinding, {
  find: function(scope) {
    return $(scope).find(".mobile-element");
    callback();
  },
  getValue: function(el) {
    return /((iPhone)|(iPod)|(iPad)|(Android)|(BlackBerry))/.test(navigator.userAgent)
  },
  setValue: function(el, value) {
  },
  subscribe: function(el, callback) {
  },
  unsubscribe: function(el) {
  }
});

Shiny.inputBindings.register(isMobileBinding);
```

This is kind of cheating... as I know there will be no changes (if you're visiting on a mobile device, that's not going to change on this session) I'm triggering the `callback()` (what generates R to update the value) as soon as the element is initialized... and `getValue` just does a very rudimentary regex check on the user agent.

## The R code

All you need to do is:

1. Define the `mobileDetect` function
2. Add it to the `ui` element (when you're interested about it)
3. Use it on the server :) now you can tell if the user is on a mobile device or not

Before your `ui` element, define this method:

```
mobileDetect <- function(inputId, value = 0) {
  tagList(
    singleton(tags$head(tags$script(src = "js/mobile.js"))),
    tags$input(id = inputId,
                class = "mobile-element",
                type = "hidden")
  )
}
```

That just loads the javascript file and creates an html hidden input.  You can [see its code here](https://github.com/g3rv4/mobileDetect) or [view it running on shinyapps.io](https://g3rv4.shinyapps.io/mobileDetect/) (if I have enough hours left :P)

gha_language: SCSS


text:
# JustTrack

[![Build Status](https://travis-ci.org/justeat/JustTrack.svg?branch=master)](https://travis-ci.org/justeat/JustTrack)
[![Version](https://img.shields.io/cocoapods/v/JustTrack.svg?style=flat)](http://cocoapods.org/pods/JustTrack)
[![License](https://img.shields.io/cocoapods/l/JustTrack.svg?style=flat)](http://cocoapods.org/pods/JustTrack)
[![Platform](https://img.shields.io/cocoapods/p/JustTrack.svg?style=flat)](http://cocoapods.org/pods/JustTrack)

The Just Eat solution to better manage the analytics tracking on iOS and improve the relationship with your BI team.

- [Just Eat Tech blog](https://tech.just-eat.com/2017/02/01/ios-event-tracking-with-justtrack/)

## Overview

At **Just Eat**, tracking events is a fundamental part of our business analysis and the information we collect informs our technical and strategic decisions. To collect the information required we needed a flexible, future-proof and easy to use tracking system that enables us to add, remove and swap the underlying integrations with analytical systems and services with minimal impact on our applications' code. We also wanted to solve the problem of keeping the required event metadata up-to-date whenever the requirements change.

**JustTrack** is the event tracking solution we built for that.

For any feature request, bug report or question please use the [Issues](https://github.com/justeat/JustTrack/issues) page and the appropriate [label](https://github.com/justeat/JustTrack/labels).

### Features:

* **Events** are declared in a `.plist` file and Swift code is **automatically** generated at build time from it.
* Events can be sent to multiple destinations (called *Trackers*) at the same time.
* Custom *Trackers* are easy to create and use.

## Installation

JustTrack is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:

```Ruby
pod "JustTrack"
```

Import it into your files like so:

```Swift
// swift
import JustTrack
```

```Objective-C (Pre 4.0)
// Objective-C
@import JustTrack;
```

#### In your target *Build Phases* add this script

```
xcrun --sdk macosx swift "${PODS_ROOT}/../../JustTrack/EventsGenerator/main.swift" "${SRCROOT}/JustTrack/Events.plist" "${SRCROOT}/JustTrack/TrackingEvents.swift"
```

Objective C (Versions before 4.0)

```
xcrun --sdk macosx swift "${PODS_ROOT}/../../JustTrack/JEEventsGenerator/main.swift" "${SRCROOT}/JustTrack/Events.plist" "${SRCROOT}/JustTrack/TrackingEvents.swift"
```

Where:

* ```${SRCROOT}/JustTrack/Events.plist``` is the path to your events declaration plist which can be anywhere in the project.
* ```"${SRCROOT}/JustTrack/TrackingEvents.swift"``` Is the destination file for the automatically generated Swift code.

_**NOTE:** Consider giving this script a meaningful name (e.g. "Name: JustTrack Events Generation")_

## Usage

Let's see how we use JustTrack:

### JustTrack Configuration

```Swift

// configure the tracking with settings and trackers
let eventTracker = EventTracking()
eventTracker.deliveryType = .batch

eventTracker.logClosure = { (logString: String, logLevel: TrackingLogLevel) -> Void in
    print("[EventTracker] [\(logLevel)] \(logString)")
}

// load the default tracker, in this case the console tracker
eventTracker.loadDefaultTracker(.consoleLogger)

//enable JustTrack
eventTracker.enable()

```

### Events Definition

One of the problems we found with existing solutions is that the events are declared in code and therefore can only be maintained by developers. Similarly, existing solutions offer very generic tracking facilities for developers. Because of that, whenever the required metadata associated with an event changes for any reason, the developer has to search the code base and update all instances of the event with the correct implementation. This of course is a very fragile process and is prone to errors.

JustTrack tries to solve these problems by declaring events in a `plist` file that is used to automatically generate equivalent definitions of the events in Swift that can be used in the app. This provides several benefits:

* Each event is uniquely identified
* The metadata associated with each event is type checked
* When the requirements for an event change, the developers can see it through build errors and warnings that will naturally occur
* Plists can be edited as XML, which means anybody in the business can edit them
* It's easy to search for events that are no longer used and deleted events won't compile

#### The Anatomy of an Event

An Event is made of:

* **Name**: the unique identifier
* **Registered Trackers**: List of event destinations (e.g. Google Analytics)
* **Payload**: The metadata associated with the event (at this time only String key-value pairs are supported)

##### The Plist format

```xml
<key>User</key>
<dict>
    <key>registeredTrackers</key>
    <array>
        <string>console</string>
        <string>Firebase</string>
    </array>
    <key>payloadKeys</key>
    <array>
        <string>action</string>
        <string>response</string>
        <string>extra</string>
    </array>
</dict>
```

##### Generated Swift Class

```Swift
public class EventUser: Event {
    public let name: String = "User"

    public var payload: Payload {
        return [
            kAction: action == "" ? NSNull() : action as String,
            kResponse: response == "" ? NSNull() : response as String,
            kExtra: extra == "" ? NSNull() : extra as String
        ]
    }

    public var registeredTrackers: [String] {
        return ["console", "Firebase"]
    }

    private let kAction = "action"
    private let kResponse = "response"
    private let kExtra = "extra"

    public var action: String = ""
    public var response: String = ""
    public var extra: String = ""

    public init(action: String,
                response: String,
                extra: String) {
        super.init()
        self.action = action
        self.response = response
        self.extra = extra
    }
}
```

#### Using Events

```Swift
//Swift
let trackingService: EventTracking = configureJustTrack()
trackingService.trackEvent(EventUser(action: "UserLogIn", response: "success", extra: "Additional info"))
```

```Objective-C (Prior to 4.0)
//Objective-C
JETracking *trackingService =  [self configureJustTrack];
[trackingService trackEvent:[[JEEventUser alloc] initWithAction:@"UserLogIn" response:@"success" extra:@"Additional info"] ];
```

##### Hardcoded events

You can also create "hardcoded" events by implementing the Event protocol. However we do recommend that you use a `plist` file exclusively.

### Trackers

A Tracker is an object implementing the **Tracker** protocol and is loaded using: ```tracker.loadCustomTracker( ... )``` function. You can implement any tracker you want and **JustTrack** provides a few default trackers:

* [x] TrackerConsole - print events to the system's console
* [ ] FacebookTraker (not yet implemented)
* [ ] ~~GoogleAnalyticsTraker~~ (not yet implemented, Google's pods can't be used as a dependency in a pod)
* [ ] ~~TrakerFirebase~~ (not yet implemented, Google's pods can't be used as a dependency in a pod)

## Upgrading to v4.0

In version 4.0 **JustTrack** has been refactored to bring it up to date with current Swift standards. As such, **JustTrack** no longer supports Objective-C implementations. Please consider updating any applications that consume this feature.  As a result, the way events are named and must be called has been adjusted substatially. Please consider the following points when upgrading.

### Adopting Swift

This update to **JustTrack** removes Objective-C attributes and prefixes, modernising the implementation in line with Swift standards whilst also removing the Objective-C interoperability.

For example, a generated event class previously defined as:

```Swift
JEEventUser
```

will now adopt the naming scheme:

```Swift
EventUser
```
The effects of this change on your pre-defined events can be determined within the generated TrackingEvents.swift file.

Please note that any programs that adopt this version will need to adopt this new naming scheme.

### Updated Naming

The naming of the events and associated payload has also been adjusted in order to ensure the camelCase naming convention is adopted throughout.

### Preserving order across runs

Another change made within version 4.0 is the preservation of order within the auto-generated TrackingEvents.swift files. This allows for greater clarity when comparing changes.

### Facilitating an array of objects

**JustTrack** now allows for the implementation of an array of objects as part of the payload. In order to implement such events, create a new item of type Dictionary and adhere to the objectPayloadKeys notation as detailed by the example event. An array of objects also supports different data types. To add these to your array of objects, simply append the varable type to the end of the value as follows:

Integers:

```
itemNumber_int
```

Double:

```
itemPrice_double
```

Booleans:

```
itemAvailable_bool
```

## Upgrading to v3.0

In version 3.0 of **JustTrack** the Configuration class has been removed from the JETracker protocol.

If your client code uses Objective-C then your code should continue to function without changes when upgrading.

If your client code uses Swift then then you have two options.

Option 1) The simplest way to upgrade to v3.0 of the SDK is to reintroduce the Configuration typealias in your client code as follows:

```Swift
public typealias Configuration = [String : String]
```

Option 2) Replace your initialisers with an equivalent where your arguments are passed in a strongly typed manner.  For example, this old init method....

```Swift
public init(configuration: Configuration) {
    super.init()
    self.token = configuration[TokenKey]
}
```
might become...

```Swift
public init(token: String) {
    super.init()
    self.token = token
}
```

## License

**JustTrack** is available under the Apache License, Version 2.0. See the LICENSE file for more info.

- Just Eat iOS team

repository: justeat/JustTrack

gha_language: Swift

repo_name: justeat/JustTrack