text:
# Working with Promises

AngularFire2 Offline works almost exactly like AngularFire2 promises, with one exception: the `offline` promise property.

The caveat with this is that, rather than calling operation().then() and operation().offline.then(), you need to create a reference to the result of the operation.

```ts
// before
this.listObservable.push({newObject}).then(() => {
    // async operation once push is done
});
this.listObservable.push({newObject}).offline.then(() => {
    // async operation once push is done
});

// after
let reference = this.listObservable.push({newObject});
reference.then(() => {
    // async operation once push is done
});
reference.offline.then(() => {
    // async operation once push is done
});
```

If you do the first example, you will end up calling push twice, as you can tell. The second example mitigates this by creating a reference to the response from firebase.push, which contains a promise and an `offline` promise property, so `push` is only called once.

gha_language: TypeScript


text:
# Iconizer

A Command line utility for Iconizer

Iconizer will resize your icon to all the ios required sizes.

## Install

    npm install -g iconizer

## Usage

    $ iconizer -i <path to input file>
    $ iconizer -i <path to input file> -o <path to output directory>
    $ iconizer --help

## Config file

Includes a summary of all the sizes and names for the icons that you will need to develop ios apps.

Documentation at [App Icons on iPad and iPhone](http://developer.apple.com/library/ios/#qa/qa1686/_index.html).

## Development

Source hosted at [GitHub](http://github.com/oitozero/iconizer).
Report Issues/Feature requests on [GitHub Issues](http://github.com/oitozero/iconizer).

### Note on Patches/Pull Requests

 * Fork the project.
 * Make your feature addition or bug fix.
 * Add tests.
 * Send pull request.

## License

Copyright (c) 2013 Pedro Sampaio

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

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

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

license: MIT

repository: oitozero/iconizer

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: oitozero/iconizer


text:
# GitHub Notifications

Display your GitHub notifications in Atom!

![Screenshot](https://raw.github.com/Axosoft/atom-github-notifications/master/resources/screenshot1.png)

## Setup

You must configure your GitHub personal access token to receive notifications. You can generate this token by following the provided link.

![Screenshot of personal access token field](https://raw.github.com/Axosoft/atom-github-notifications/master/resources/access-token-setting.png)

---

Built using
![GitKraken](https://raw.github.com/Axosoft/atom-github-notifications/master/resources/gk-logo.png)
by
![Axosoft](https://raw.github.com/Axosoft/atom-github-notifications/master/resources/axosoft-logo.png)

repository: samask/atom-github-notifications

repo_name: samask/atom-github-notifications


text:
---
title: Writing and Running a Basic Application for Stratio Streaming
---

In this tutorial you will learn how to write a java or scala project for building Stratio Streaming applications
and how to run it on a local instance or a standalone cluster. Instructions are based on the Eclipse environment
but any equivalent can be used.

Table of Contents
=================

-   [Before you start](#before-you-start)
    -   [Prerequisites](#prerequisites)
    -   [Resources](#resources)
-   [Creating the project](#creating-the-project)
    -   [Step 1: Create an empty project](#step-1-create-an-empty-project)
    -   [Step 2: Import the project skeleton](#step-2-import-the-project-skeleton)
-   [Running the application](#running-the-application)
-   [Where to go from here](#where-to-go-from-here)

Before you start
================

Prerequisites
-------------

-   A [Stratio installation](/getting-started.html "Getting Started").
-   [Eclipse](https://www.eclipse.org/ "Eclipse website") or an equivalent IDE.
-   [Oracle JDK 7](http://www.oracle.com/technetwork/java/javase/downloads/index.html "Oracle Java7 download page").
-   [Apache Maven](http://maven.apache.org/ "The Maven project website"): Stratio Streaming API is available in a Maven repository that will be used in this tutorial.
-   [Scala](http://www.scala-lang.org/ "Scala website") >=2.10.3.
-   Scala-IDE: follow [instructions at Eclipse marketplace](http://marketplace.eclipse.org/marketplace-client-intro "Instructions to use Eclipse Marketplace") to install it from the marketplace (recommended over downloading the plugin from scala-ide.org).
-   m2eclipse-scala plugin: follow [instructions at scala-ide.org](http://scala-ide.org/docs/tutorials/m2eclipse/index.html "Tutorial for m2eclipse-scala plugin installation") for installation.

Resources
---------

Here is a list of the resources that will be used in this tutorial. You can download them now or as
you go through the instructions. Links will be provided later as they will be needed.

-   [Java project example](resources/StratioStreamingJavaProject.zip)
-   [Scala project example](resources/StratioStreamingScalaProject.zip)

Creating the project
====================

Step 1: Create an empty project
-------------------------------

-   Launch Eclipse and in the menu choose File -> New -> Project
-   In the “New project” window select “Project” under “General” and click “Next”:

![Screenshot of the New Project window in Eclipse](images/basicapp-01-newProject.png)

-   In the next window, enter a name for your project and click “Finish”:

![Screenshot of the Project Name window in Eclipse](images/basicapp-02-projectName.png)

The newly created project now appears in the package explorer.

Step 2: Import the project skeleton
-----------------------------------

Download the project skeleton of your choice and save it in a convenient location:

-   [Java project](resources/StratioStreamingJavaProject.zip)
-   [Scala project](resources/StratioStreamingScalaProject.zip)

In the menu, choose File -> Import. In the “Import” window, select “Archive file” in the section “General”, and click “Next”:

![Screenshot of the Import window in Eclipse](images/basicapp-03-importWindow.png)

In the next screen:

-   Navigate to the zip file you just downloaded using the “Browse…” button.
-   Fill in “Into folder” with the name of the project (or use the “Browse…” button to select it from a list).
-   Check “Overwrite existing resources without warning”,
-   and click “Finish”

![Screenshot of the Importing from Archive file window in Eclipse](images/basicapp-04-importFromFile1.png)

The structure of the project will be displayed in the package explorer. Give Maven some time to check
and download dependencies. The project should finally appear error-free.

The java project contains an example class (JavaExample.java) and an example test (TestJava.java), the
scala one an example object (ScalaExample.app) and an example test (TestScala.scala), the mixed project
contains all the formers.

Navigate through your project to get familiar with it. You can add your own code and optionally alter the
stream, insert data, add queries and listeners.

Running the application
=======================

You can run the example provided in the project directly on your IDE. To do so, right click on the
JavaExample.java file -> Run As -> Java Application.

For the Java or Scala project, the result should be similar to the following:

```shell-session
Streams in the Stratio Streaming Engine: 3
-- Stream Name: stratio_stats_base
-- Stream Name: stratio_stats_global_by_operation
-- Stream Name: testStream
```

Congratulations! You successfully completed this tutorial.

Where to go from here
=====================

If you are planning to write your own Stratio Streaming application,
[these examples](using-streaming-api-examples.html "Using the Stratio Streaming API") may be useful.
Those are snippets written in both Java and Scala.

repository: mindis/streaming-cep-engine

repo_name: mindis/streaming-cep-engine


text:
# current-processes
[![Build Status](https://travis-ci.org/branneman/current-processes.svg?branch=master)](https://travis-ci.org/branneman/current-processes)
[![Coverage Status](https://img.shields.io/coveralls/branneman/current-processes.svg)](https://coveralls.io/r/branneman/current-processes)
[![Dependency Status](http://img.shields.io/david/branneman/current-processes.svg)](https://david-dm.org/branneman/current-processes)
[![npm version](http://img.shields.io/npm/v/current-processes.svg)](https://www.npmjs.org/package/current-processes)
[![npm Downloads](http://img.shields.io/npm/dm/current-processes.svg)](https://www.npmjs.org/package/current-processes)

Node.js library to get a snapshot of the currently running processes, OS-agnostic. Needs root/Admin permissions.

## Usage example
```js
var _ = require('lodash');
var ps = require('current-processes');

ps.get(function(err, processes) {

    var sorted = _.sortBy(processes, 'cpu');
    var top5  = sorted.reverse().splice(0, 5);

    console.log(top5);
});
```

## Process object
The library will return an array consisting of multiple process objects, structured like this:
```js
{
    pid: 1337,               // Process ID
    name: 'chrome',          // Process name
    mem: {
        private: 23054560,   // Private memory, in bytes
        virtual: 78923608,   // Virtual memory (private + shared libraries + swap space), in bytes
        usage: 0.02    	     // Used physical memory (%) by this process
    },
    cpu: 0.3                 // CPU usage (%) as reported by `ps` and `wmic`
}
```

## Platform-specific notes
### Windows
WMI (specifically `wmic`) is used to gather the information itself. WMI is fairly slow the first time it's called, it
might even take up to 2-3 seconds. Make sure your app will gracefully handle this. Subsequent calls will be much faster.


text:
---
version: 0.6.0
title: Node v0.6.0
author: ryandahl
date: 2011-11-05T09:07:10.000Z
status: publish
category: release
slug: node-v0-6-0
layout: blog-post.hbs
---

We are happy to announce the third stable branch of Node v0.6. We will be freezing JavaScript, C++, and binary interfaces for all v0.6 releases.

The major differences between v0.4 and v0.6 are

Native Windows support using I/O Completion Ports for sockets.

Integrated load balancing over multiple processes. docs

Better support for IPC between Node instances docs

Improved command line debugger docs

Built-in binding to zlib for compression docs

Upgrade v8 from 3.1 to 3.6

In order to support Windows we reworked much of the core architecture. There was some fear that our work would degrade performance on UNIX systems but this was not the case. Here is a Linux system we benched for demonstration:

 	 v0.4.12 (linux)	v0.6.0 (linux)

 http_simple.js /bytes/1024	 5461 r/s	 6263 r/s

 io.js read 	 19.75 mB/s	 26.63 mB/s

 io.js write 	 21.60 mB/s	 17.40 mB/s

 startup.js 	 74.7 ms	 49.6 ms

Bigger is better in http and io benchmarks, smaller is better in startup. The http benchmark was done with 600 clients on a 10GE network served from three load generation machines.

In the last version of Node, v0.4, we could only run Node on Windows with Cygwin. Therefore we've gotten massive improvements by targeting the native APIs. Benchmarks on the same machine:

	v0.4.12 (windows)	v0.6.0 (windows)

 http_simple.js /bytes/1024	 3858 r/s	 5823 r/s

 io.js read 	 12.41 mB/s	 26.51 mB/s

 io.js write 	 12.61 mB/s	 33.58 mB/s

 startup.js 	 152.81 ms	 52.04 ms

We consider this a good intermediate stage for the Windows port. There is still work to be done. For example, we are not yet providing users with a blessed path for building addon modules in MS Visual Studio.  Work will continue in later releases.

For users upgrading code bases from v0.4 to v0.6 we've documented most of the issues that you will run into. Most people find the change painless. Despite the long list of changes most core APIs remain untouched.

Our release cycle will be tightened dramatically now. Expect to see a new stable branch in January. We wish to eventually have our releases in sync with Chrome and V8's 6 week cycle.

Thank you to everyone who contributed code, tests, docs, or sent in bug reports.

Here are the changes between v0.5.12 and v0.6.0:

2011.11.04, Version 0.6.0 (stable)

print undefined on undefined values in REPL (Nathan Rajlich)

doc improvements (koichik, seebees, bnoordhuis, Maciej Małecki, Jacob Kragh)

support native addon loading in windows (Bert Belder)

rename getNetworkInterfaces() to networkInterfaces() (bnoordhuis)

add pending accepts knob for windows (igorzi)

http.request(url.parse(x)) (seebees)

#1929 zlib Respond to 'resume' events properly (isaacs)

stream.pipe: Remove resume and pause events

test fixes for windows (igorzi)

build system improvements (bnoordhuis)

#1936 tls: does not emit 'end' from EncryptedStream (koichik)

#758 tls: add address(), remoteAddress/remotePort

#1399 http: emit Error object after .abort() (bnoordhuis)

#1999 fs: make mkdir() default to 0777 permissions (bnoordhuis)

#2001 fix pipe error codes

#2002 Socket.write should reset timeout timer

stdout and stderr are blocking when associated with file too.

remote debugger support on windows (Bert Belder)

convenience methods for zlib (Matt Robenolt)

process.kill support on windows (igorzi)

process.uptime() support on windows (igorzi)

Return IPv4 addresses before IPv6 addresses from getaddrinfo

util.inspect improvements (Nathan Rajlich)

cluster module api changes

Downgrade V8 to <IP_ADDRESS>

Download: https://nodejs.org/dist/v0.6.0/node-v0.6.0.tar.gz

Windows Executable: https://nodejs.org/dist/v0.6.0/node.exe

Website: https://nodejs.org/docs/v0.6.0/

Documentation: https://nodejs.org/docs/v0.6.0/api/

gha_language: JavaScript

gha_license_id: NOASSERTION


text:
+++
# About/Biography widget.
widget = "about"
active = true
date = 2016-04-20T00:00:00

# Order that this section will appear in.
weight = 5

# List your academic interests.
[interests]
  interests = [
    "Machine Learning",
    "Deep Learning",
    "Computer Vision",
    "NLP"
  ]

# List your qualifications (such as academic degrees).
[[education.courses]]
  course = "B.Tech(Honours) in Computer Science and Engineering"
  institution = "Indian Institute of Technology(ISM) Dhanbad"
  year = 2018

+++

# Biography

I am a Research Assistant at Centre for Visual Information Technology(CVIT), IIIT Hyderabad working under the supervision of Prof. CV Jawahar and Prof. Ponnurangam Kumaraguru(PK).

I graduated from IIT(ISM) Dhanbad, India in 2018 with B.Tech(Honours) in Computer Science and Engineering. My Bachelor's thesis was on Energy Load forecasting using Recurrent Neural Networks.

In Summer of 2017, I worked as a deep learning researcher intern at 'arya.ai', an Artificial Intelligence startup based in Mumbai, India. There, I worked on Video Caption Generation.

Prior to that, in the summer of 2016, I worked as a summer research intern at IIT Kharagpur under the supervision of Prof. Pabitra Mitra. I contributed in End-to-End Automatic Speech Recognition System and Deep User Modeling for scientific paper recommendation.


text:
---
layout: default
---

# 1996-03-15 - Re: Why escrow? (was Re: How would Leahy bill affect crypto

## Header Data

From: jim bell<EMAIL_ADDRESS>To: "Deranged Mutant"<EMAIL_ADDRESS>Message Hash: 079b7ac10d040d39a083dbe2d4b68de566d06bceb045074dd2f499314af53c39

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-03-15 05:56:25 UTC

Raw Date: Fri, 15 Mar 1996 13:56:25 +0800

## Raw message

```
{% raw  %}From: jim bell<EMAIL_ADDRESS>Date: Fri, 15 Mar 1996 13:56:25 +0800
To: "Deranged Mutant"<EMAIL_ADDRESS>Subject: Re: Why escrow? (was Re: How would Leahy bill affect crypto
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 04:15 PM 3/13/96 +0000, Deranged Mutant wrote:

>Since when is the government intentionally going to let any bill or
>policy go through that isn't friendly to themselves??? (You don't
>have to be an anarchist to figure that out!)

Well, it's not surprising, of course, but it DOES seem to be making these
assumptions.  I wonder what they're gonna do when they start
discovering that "all" voluntary escrow system in place have protections far
beyond what they've anticipated?  That's why I'm more than a little
disturbed about the one really bad portion of the Leahy bill:  The one that
makes using encryption to thwart an investigation a crime.  As Mr. Junger
observed, and as should be obvious to most of the rest of us, such a section
of the bill could turn a key-escrow holder into a criminal if he fails to
disclose an encryption system that protects a key, or (worse!) even if he
structures his business in such a way as to avoid having the decrypt key for
the escrowed key at all.  Previously, legally, he could probably have
claimed innocence because he had no decrypt-key to disclose, but Leahy's
bill would make him guilty even if there was nothing he could do to give
them a key.

>Nothing is safe from abuse, by the goverment or non-government fols
>alike.  There's always more loopholes to clean up.   (Not that this
>means we shouldn't clean them up... obviously bad policies should be
>fixed...). Just as no crypto is 100% foolproof, no legal system is
>100% abuse-proof.

If I were trying to detect government investigation in such a situation, I
would buy a crypto phone, open an "escrow account" on a totally voluntary
basis, give them a phony key, and then (as part of the (presumably?)
enforceable escrow agreement) insist that they inform me if anybody asks for
the key.  There is nothing in Leahy's bill which appears to prohibit the
escrow agent from informing the key holder of a request/demand for the key;
(I would greatly prefer if that was an actual legal requirement that they do
inform the key user.)  The question is, is this merely an oversight on their
part, or are they planning something, or are they assuming an existing law
would cover his?  The answer doesn't look good.

Jim Bell
jim<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

+ Return to [March 1996](/archive/1996/03)

+ Return to "[jim bell <jimbell@pacifier.com>](/authors/jim_bell_jimbell_at_pacifier_com_)"

+ 1996-03-15 (Fri, 15 Mar 1996 13:56:25 +0800) - Re: Why escrow? (was Re: How would Leahy bill affect crypto - _jim bell<EMAIL_ADDRESS>

gha_license_id: MIT


text:
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 1.0.0 (2019-08-28)

### Bug Fixes

* **chore:** Bring in new civetweb submodule ([95b8f6c](https://github.com/alkurbatov/cpp-sc2/commit/95b8f6c))
* Add missing types to UnitTypeToName ([f406774](https://github.com/alkurbatov/cpp-sc2/commit/f406774))
* Don't invert heights map coordinates... ([aa1c3de](https://github.com/alkurbatov/cpp-sc2/commit/aa1c3de))
* Fix assertion in SampleImageData ([fc8aca0](https://github.com/alkurbatov/cpp-sc2/commit/fc8aca0))
* Fix chronoboost ([1821e88](https://github.com/alkurbatov/cpp-sc2/commit/1821e88))
* Fix IsPlacable and IsPathable, [#5](https://github.com/alkurbatov/cpp-sc2/issues/5) ([19ee24f](https://github.com/alkurbatov/cpp-sc2/commit/19ee24f))
* Fix MOVE and PATROL abilities ([14a3fac](https://github.com/alkurbatov/cpp-sc2/commit/14a3fac))
* Fix some compilation warnings ([1a15715](https://github.com/alkurbatov/cpp-sc2/commit/1a15715))
* Fix type of minerals and vespene ([bc712ed](https://github.com/alkurbatov/cpp-sc2/commit/bc712ed))
* Fixed height map and visibility map ([5e21d4e](https://github.com/alkurbatov/cpp-sc2/commit/5e21d4e))
* Handle INVALID in all *ToName functions ([375543d](https://github.com/alkurbatov/cpp-sc2/commit/375543d))

### Build System

* Don't enforce WX on Windows ([ce65a63](https://github.com/alkurbatov/cpp-sc2/commit/ce65a63))
* Reimplement Travis CI ([c165d16](https://github.com/alkurbatov/cpp-sc2/commit/c165d16))

### Documentation

* Add build instructions for nmake ([b3b2ef0](https://github.com/alkurbatov/cpp-sc2/commit/b3b2ef0))
* Add more platform-specific dependencies ([3b28144](https://github.com/alkurbatov/cpp-sc2/commit/3b28144))
* Added missing link to tutorial ([e7b028e](https://github.com/alkurbatov/cpp-sc2/commit/e7b028e))
* Correct README ([d38f08f](https://github.com/alkurbatov/cpp-sc2/commit/d38f08f))
* Fix a typo ([39cd82a](https://github.com/alkurbatov/cpp-sc2/commit/39cd82a))
* Mention discord in README ([888ffb9](https://github.com/alkurbatov/cpp-sc2/commit/888ffb9))
* Refine build instructions ([2da30d8](https://github.com/alkurbatov/cpp-sc2/commit/2da30d8))

### Features

* Add 'rich' types of vespene extractors ([5ee6071](https://github.com/alkurbatov/cpp-sc2/commit/5ee6071))
* Add conversion of Point2D to Point2DI ([e410b5f](https://github.com/alkurbatov/cpp-sc2/commit/e410b5f))
* Add cyclone lock on damage upgrade ([93a219a](https://github.com/alkurbatov/cpp-sc2/commit/93a219a))
* Adjust CloakState parameters to the new proto ([8ddc843](https://github.com/alkurbatov/cpp-sc2/commit/8ddc843))
* Extend DisplayType with Placeholder value ([9965824](https://github.com/alkurbatov/cpp-sc2/commit/9965824))
* Extend Rect2DI functionality ([ffeaa43](https://github.com/alkurbatov/cpp-sc2/commit/ffeaa43))
* Switch to the latest proto ([90d89cb](https://github.com/alkurbatov/cpp-sc2/commit/90d89cb))

### Tests

* Fix TestUnitCommand ([04c348c](https://github.com/alkurbatov/cpp-sc2/commit/04c348c))


text:
[![](https://img.shields.io/circleci/project/TryGhost/Ghost-Android.svg)](https://circleci.com/gh/TryGhost/Ghost-Android)
[![Translate on Weblate](https://hosted.weblate.org/widgets/ghost/-/svg-badge.svg)](https://hosted.weblate.org/engage/ghost/en/?utm_source=widget)

The official Ghost Android application. Get it [here on the Google Play Store][playstore].

### Features

- Simple, intuitive interface based on **[Material Design](https://material.google.com/)** principles (along with some **tasteful animations**!)
- **Markdown editing with preview** - swipe to switch between editing and previewing
- **100% Markdown compatibility with Ghost** - go ahead and use footnotes and code blocks like you're used to
- Works with **[Ghost Pro](https://ghost.org/pricing/)** (ghost.io) as well as **self-hosted blogs**
- **Offline mode**: Ghost Android is designed to work 100% offline: just sync when you're connected later! Ideal for writing on the go
- **Attach tags and a cover image** - upload images from your phone or a web link
- **[Conflict handling][conflict-ui]** - a simple UI to help decide what to do next when a post is edited from two places at once

### Bug reports? Feature requests?

[File an issue](/CONTRIBUTING.md)

### Help translate Ghost Android

If you'd like to see support for your language in Ghost Android, you can easily [contribute translations on Weblate][weblate]. _This requires no setup and no knowledge of Android development_, just keep in mind a few simple rules:

- Many strings have [placeholders](http://envyandroid.com/android-string-xml-resource-formatting/) like "%s", "%d", "%2$s", etc. - keep these intact because other numbers and strings are inserted into these placeholders
- Single and double quotes need to be preceded with a backslash character (\' and \" respectively)
- For short strings, try to keep the translated string length close to the English one, because longer strings may not fit in the UI

If you need help getting started, drop a comment on [this issue](https://github.com/TryGhost/Ghost-Android/issues/14).

### Developer setup

Setup is as simple as importing the project into Android Studio and building (assuming you have the correct build tools and Android SDK).

If you face any issues setting this up, please let me know by [filing a new issue](/issues/new).

### Contributors

- [@vickychijwani](https://github.com/vickychijwani)
- [@dexafree](https://github.com/dexafree) (Spanish translation)
- [@Dennis-Mayk](https://github.com/Dennis-Mayk) (German translation)
- [@naofum](https://github.com/naofum) (Japanese translation)
- [@svenkapudija](https://github.com/svenkapudija) (Croatian translation)
- [@yffengdong](https://hosted.weblate.org/user/yffengdong/) (Chinese zh-CN translation)
- [@guillaumevidal](https://github.com/guillaumevidal) (French translation)
- [@fastbyte01](https://hosted.weblate.org/user/fastbyte01/) (Italian translation)
- [@cristears](https://hosted.weblate.org/user/cristears/) (Korean translation)
- [Allan Nordhøy](https://hosted.weblate.org/user/kingu/) (Norwegian translation)

[playstore]: https://play.google.com/store/apps/details?id=org.ghost.android
[weblate]: https://hosted.weblate.org/engage/ghost/en/
[conflict-ui]: https://github.com/vickychijwani/quill/issues/144#issuecomment-264991612

# Copyright & License

Copyright (c) 2015-2018 Vicky Chijwani & Ghost Foundation - Released under the [MIT license](LICENSE). Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our [trademark policy](https://ghost.org/trademark/) for info on acceptable usage.

repository: gerardoramirez/Ghost-Android

repo_name: gerardoramirez/Ghost-Android


text:
# Prefix Commit Message

This script is meant to be used as a [prepare-commit-msg Git hook](https://git-scm.com/docs/githooks#_prepare_commit_msg).
Each time you commit, it extracts the issue identifier or user-story identifier from the current branch name and prefixes your commit message with the extracted identifier.

It supports identifiers of the form `ABCD-1234` and `1234`, and will look for such identifiers right after the `/` in the name of the current branch.
If you're on the branch `feature/JIRA-874-cannot-log-in-on-macos`, for example, this hook will prefix each of your commit messages with `[ JIRA-874 ] `.

There are simpler shell scripts that achieve the same, but this solution works on Windows too.

This script can be used standalone or in combination with [Husky](https://github.com/typicode/husky) (version 6 and newer).
If you're using an older Husky, see (https://github.com/ljpengelen/prefix-commit-message/tree/v1.3.0).

## Installation

### Standalone usage

Navigate to `.git/hooks` from the root of your Git repository and create an executable file named `prepare-commit-msg` with the following content:

```
#!/bin/sh
npx prefix-commit-message $1
```

### Usage with Husky

First, install [Husky](https://github.com/typicode/husky) and this script:

```
npm install husky --save-dev
npm install prefix-commit-message --save-dev
```

Then, enable Git hooks via Husky:

```
npx husky install
```

Finally, set up the prepare-commit-msg hook:

```
npx husky add .husky/prepare-commit-msg "npx prefix-commit-message \$1"
```

## Custom prefix

If you don't like the square brackets around the identifier, you can supply a custom opening and closing symbol.
For example,

```
#!/bin/sh
npx prefix-commit-message $1 -o -c :
```

and

```
npx husky add .husky/prepare-commit-msg "npx prefix-commit-message \$1 -o -c :"
```

will result in the prefix `JIRA-874: `.

The opening symbol is specified via the '-o' flag, and the closing symbol is specified via the '-c' flag.
As the example shows, the empty string is used when no value is specified after a flag.

repository: ljpengelen/prefix-commit-message

repo_name: ljpengelen/prefix-commit-message


text:
---
templateKey: blog-post
title: SqlDependency Issue Resolved
path: blog-post
date: 2006-11-06T02:24:01.015Z
description: I’m doublechecking my demos for my sessions at DevConnections this
  week and I think I finally fixed an issue that has plagued me off and on for
  the last year or more when I’ve been demonstrating the new SQL 2005
  SqlDependency features.
featuredpost: false
featuredimage: /img/default-post-image.jpg
tags:
  - Caching
  - sql2005
category:
  - Uncategorized
comments: true
share: true
---
<!--StartFragment-->

I’m doublechecking my demos for my sessions at DevConnections this week and I think I finally fixed an issue that has plagued me off and on for the last year or more when I’ve been demonstrating the new SQL 2005 SqlDependency features. It seems like almost half the time, the notifications don’t work when it’s time for me to give the demo, though they work fine when I test them prior to the user group meeting or conference where I am presenting. The last time this happened I noted that it probably had something to do with my network connectivity since I had tested the demo mere hours before the presentation and it had problems in the Internet-less presentation room.

Turns out the problem is related to this event log entry:

*The activated proc \[dbo].\[SqlQueryNotificationStoredProcedure-b6be17ba-35b4-4051-adc5-146f6cf6c11a] running on queue Northwind.dbo.SqlQueryNotificationService-b6be17ba-35b4-4051-adc5-146f6cf6c11a output the following: ‘Could not obtain information about Windows NT group/user ‘LAKEQUINCYMEDIASteve’, error code 0x54b.’*

*For more information, see Help and Support Center at <http://go.microsoft.com/fwlink/events.asp>.*

The interesting thing about this error is that both my connection I’m using to test the SqlDependency and the one I’m using to alter the table data are connecting as ‘sa’. I’m not using my domain account for anything! Or so I thought. Some searching yielded [this forum post](http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=542041&SiteID=1) with the answer. The key is that the table I was querying, Northwind, had been created under my domain user account. The notification sproc that is created by the SqlNotification is created with EXECUTE AS OWNER, and in this case that owner was my domain account. When I’m at my office, and can connect to my domain controller, everything works fine. When I’m not in the office or connected by VPN (like, say, when I’m presenting and there’s no open wireless connection), the sproc fails because it cannot verify the user.

Solution – change the owner of the database to ‘sa’ (or any other named account that doesn’t require a domain to authenticate against). This can be done with this command (change Northwind to your DB name):

**ALTER AUTHORIZATION ON DATABASE::Northwind TO sa;**

You can view which databases are owned by whom with this:

**select name,suser_sname(owner_sid) from sys.databases**

*To everybody who’s seen me demo the SQL 2005 Cache Dependencies and scratch my head when it didn’t work in front of the room when it \*just\* worked at my office, sorry it took me so long to track this down. But it really \*does\* work! Honest!*

**\[categories:sql2005, caching]**

<!--EndFragment-->

repository: ShadyNagy/ardalis-com-gatsby

branch_name: refs/heads/main

repo_name: ShadyNagy/ardalis-com-gatsby


text:
---
title: Performance improvements
author: tomaszkapela
layout: post
identifier: pmem_perf_improv
---

I would like to inform you about the performance improvements that have been going on in NVML and libpmemobj in particular. We have not been standing still and we are trying out a couple of ideas on how to make our libraries even faster. Some of the improvements are smaller, some are larger. Some of them have already made it to the master branch and some are just ideas on how to rework the internals of libpmemobj to make it even faster. All measurements were made on a two socket, sixteen core machine.

#### Pmemobj allocations' thread scaling
The first thing we noticed, is that allocations aren't scaling properly to the expected twice the number of logical CPUs.

![pmalloc_threads_bad](/assets/pmalloc_threads_bad.png)

After a very simple [fix][a8ef08e9], the thread scaling is magically fixed.

![pmalloc_threads_good](/assets/pmalloc_threads_good.png)

### Function pointers
During the performance analysis we made recently, we noticed that calling functions through pointers adds a considerable overhead, especially for fast and frequently called functions. We decided to reduce the number of function pointer calls and additionally use the GCC ifunc attribute where appropriate. This yields, on average, a 2% performance gain in our synthetic benchmarks.

![pmalloc_ifunc](/assets/pmalloc_ifunc.png)

### Redo log optimizations
We also noticed, that we could slightly improve the redo log flushing mechanism in certain scenarios. When you change sections of persistent memory which is on the same cache line, you don't need to flush them multiple times. This can be used, for example, when updating the OOB header. This yields an additional 2% performance gain.

![redo_opt_threads](/assets/redo_opt_threads.png)

![redo_opt_sizes](/assets/redo_opt_sizes.png)

### The thread starvation problem
One other issue spotted during the performance analysis, is the possibility of starving one of the threads, should a lane not be released. This can happen when a thread takes a lane indefinitely, then at some point, a different thread will be locked waiting on the lane mutex. The chart below represents a test where all threads are performing some action (sleeping to be exact) for an average duration of 0.5 seconds. As we go over the number of available lanes (1024), we see that the max execution time goes well over half a second.

![lane_hold_starvation](/assets/lane_hold_starvation.png)

The simplest solution to this, is to use *pthread_mutex_trylock* and that is in fact the first approach we took. The performance did not suffer any penalty.

![trylock_lane_hold](/assets/trylock_lane_hold.png)

We are however not content with the speed of this mechanism, therefore we started to come up with a _"simpler"_ solution based on the compare and swap operation. The initial implementation yields a significant performance improvement, however it is not safe for applications which operate on two or more pools in the same thread.

![initial_array_lane_hold](/assets/initial_array_lane_hold.png)

We are still working on this, because it could greatly improve performance, especially for highly multi-threaded applications.

### Allocations and type numbers
In libpmemobj we have this notion of type numbers. This is among other things used to internally locate objects of a given type. Users of NVML should however be wary of a possible huge performance drop, should the typenum be neglected and all objects used the same type. On the chart below one data series uses one type number for all threads and the other one allocates on a type-per-thread basis. Don't fret though, we think we have a solution for this.

![tx_alloc_one_type_vs_per_thread](/assets/tx_alloc_one_type_vs_per_thread.png)

### Summary
We are constantly looking for places where we could improve the performance of NVML and libpmemobj in particular. For example, we are thinking of redoing the whole internal object storage module and we hope to gain some additional percents there. If you have any other idea, let us know in [pmem/issues][41493750], or better yet, do a pull request!

[41493750]: https://github.com/pmem/issues/issues "pmem/issues"
[f242534b]: http://pmem.io/2015/07/17/pmemcheck-basic.html "pmemcheck blog entry"
[efed04e3]: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html "__builtin_expect"
[a8ef08e9]: https://github.com/pmem/nvml/commit/5606aa41461cc0e7278bb059f1adae88ff6fbf04 "fix merge"


text:
Brick\App
=========

A web application framework.

[![Build Status](https://secure.travis-ci.org/brick/app.svg?branch=master)](http://travis-ci.org/brick/app)
[![Coverage Status](https://coveralls.io/repos/brick/app/badge.svg?branch=master)](https://coveralls.io/r/brick/app?branch=master)

Installation
------------

This library is installable via [Composer](https://getcomposer.org/).
Just define the following requirement in your `composer.json` file:

    {
        "require": {
            "brick/app": "dev-master"
        }
    }

Requirements
------------

This library requires PHP 7.

Overview
--------

### Setup

We assume that you have already installed the library with Composer.

Let's create an `index.php` file that contains the simplest possible application:

    use Brick\App\Application;

    require 'vendor/autoload.php';

    $application = Application::create();
    $application->run();

If you run this file in your browser, you should get a `404` page that details an `HttpNotFoundException`. That's perfectly normal, our application is empty.

Before adding more stuff to our application, let's create a `.htaccess` file to tell Apache to redirect all requests that do not target an existing file, to our `index.php` file:

	RewriteEngine on
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^.*$ /index.php [L]

Now if you open any path in your browser, you should get a similar exception page. What we created here is called a [front controller](http://en.wikipedia.org/wiki/Front_Controller_pattern), and is a really handy pattern to ensure that all requests enter your application by the same door.

### Creating controllers

A controller is a piece of code that returns a `Response` for an incoming `Request`. This is where you put all the glue logic to work with models, interact with the database, and generate HTML content.

A controller can be any `callable`, but is generally a class with a number of methods that correspond to different pages or actions.

Let's create a simple controller class:

    namespace MyApp\Controller;

	use Brick\Http\Response;

	class IndexController
	{
	    public function indexAction()
	    {
	        return new Response('This is the index page.');
	    }

	    public function helloAction()
	    {
	        return new Response('Hello, world');
	    }
	}

The controller class does not need to extend any particular class, and the only requirement on the controller method is that it must return a `Response` object. This requirement can even be alleviated by using a plugin that creates a Response from the controller return value.

### Adding routes

The next step is to instruct our application what controller to invoke for a given request. An object that maps a request to a controller is called a `Route`.

The application ships with a few routes that cover the most common use cases. If you have more complex requirements, you can easily write your own routes.

Let's add an off-the-box route that maps a each path directory to a controller:

    use Brick\App\Route\SimpleRoute;

    $route = new SimpleRoute([
        '/' => MyApp\Controller\IndexController::class,
    ]);

    $application->addRoute($route);

Open your browser at `/`, you should get the index page message.
Open your browser at `/hello`, you should get the "Hello, world" message.

### Getting request data

Returning information is great, but most of the time you will need to get data from the current request first. It's very easy to get access to the `Request` object, just add it as a parameter to your method:

    public function helloAction(Request $request)
    {
        return new Response('Hello, ' . $request->getQuery('name'));
    }

Now if you open your browser at `/hello?name=John`, you should get a "Hello, John" message.

### Adding plugins

The application can already do interesting things, but is still pretty dumb. Fortunately, there is a great way to extend it with extra functionality: *plugins*.

The application ships with a few useful plugins. Let's have a look at one of them: the `RequestParamPlugin`.

This plugin allows you to automatically map request parameters to your controller parameters, with annotations. To use it, you need to install an extra package with Composer: `doctrine/annotations`.

Once this is done, let's add the plugin to our application:

    use Doctrine\Common\Annotations\AnnotationReader;
    use Brick\App\Plugin\RequestParamPlugin;

    $reader = new AnnotationReader();
    $plugin = new RequestParamPlugin($reader);
    $application->addPlugin($plugin);

That's it. Let's update our `helloAction()` once again to use this new functionality:

    namespace MyApp\Controller;

    use Brick\App\Controller\Annotation\QueryParam;
    use Brick\Http\Response;

	class Index
	{
        /**
         * @QueryParam("name")
         */
	    public function helloAction($name)
	    {
	        return new Response('Hello, ' . $name);
	    }
	}

*Important: the annotation needs to be imported, do not forget the `use Brick\...\QueryParam;` line.*

If you open your browser at `/hello?name=Bob`, you should get "Hello, Bob". We did not need to interact directly with the Request object anymore. Request variables are now automatically injected in our controller parameters. Magic.

### Writing your own plugins

You can extend the application indefinitely with the use of plugins. It's easy to write your own, as we will see through this example. Let's imagine that we want to create a plugin that begins a PDO transaction before the controller is invoked, and commits it automatically after the controller returns.

First let's have a look at the `Plugin` interface:

	interface Plugin
	{
	    public function register(EventDispatcher $dispatcher);
	}

Just one method to implement. This method allows you to register your plugin inside the application's event dispatcher, that is, tell the application which events it wants to receive. Each event is represented by a class in the `Brick\App\Event` namespace.

We can see that the two events that are called immediately before and after the controller is invoked are:

- `ControllerReadyEvent`
- `ControllerInvocatedEvent`

What we just need to do is to map each of these events to a function that does the job. Let's do it:

    use Brick\App\Event\ControllerReadyEvent;
    use Brick\App\Event\ControllerInvocatedEvent;
	use Brick\App\Plugin;
    use Brick\Event\EventDispatcher;

	class TransactionPlugin implements Plugin
	{
        private $pdo;

        public function __construct(\PDO $pdo)
        {
            $this->pdo = $pdo;
        }

	    public function register(EventDispatcher $dispatcher)
		{
            $dispatcher->addListener(ControllerReadyEvent::class, function() {
                $this->pdo->beginTransaction();
            });

            $dispatcher->addListener(ControllerInvocatedEvent::class, function() {
                $this->pdo->commit();
            });
		}
	}

Easy as pie! Let's add our plugin to our application:

    $pdo = new PDO(/* insert parameters to connect to your database */);
    $plugin = new TransactionPlugin($pdo);
    $application->addPlugin($plugin);

We just implemented a plugin, available to all controllers in our application, in no time. This implementation is of course still naive, but does what it says on the tin, and is a good starting point for more advanced functionality.


text:
# Contributing

Pull request are always welcome and very much appreciated! To make things go as smoothly as possible please consider following the steps below before sending a pull request:

1. Squash unnecassary commits with `git rebase -i`.

2. Format the code with `go fmt` to ensure proper spacing and such.

3. Run the unit tests with `go test` to make sure there are no breaking changes.

4. It would be great if you wrote tests for your work. You can generate coverage reports easily with the following commands:

```
# Generate coverage data
go test -coverprofile=coverage.out

# View coverage by function
go tool cover -func="coverage.out"

# View coverage line by line
go tool cover -html="coverage.out"
```

![Correlation](http://imgs.xkcd.com/comics/correlation.png)


text:
RCOMP 2019-2020 Project - Sprint 2 planning
===========================================
### Sprint master: 1181436 ###
(This file is to be created/edited by the sprint master only)
# 1. Sprint's backlog #
* T2.1 Development of a layer two and layer three Packet Tracer simulation for building A, and also encompassing the campus backbone.
* T2.2 Development of a layer two and layer three Packet Tracer simulation for building B, and also encompassing the campus backbone.
* T2.3 Development of a layer two and layer three Packet Tracer simulation for building C, and also encompassing the campus backbone. Integration of every members’ Packet Tracer simulations into a single simulation.
* T2.4 Development of a layer two and layer three Packet Tracer simulation for building D, and also encompassing the campus backbone.
# 2. Technical decisions and coordination #
In this section, all technical decisions taken in the planning meeting should be mentioned. 		Most importantly, all technical decisions impacting on the subtasks implementation must be settled on this 		meeting and specified here.

* Cisco Packet Tracer version: <IP_ADDRESS>8
* VLAN IDs to be used: 700 – 740
* VTP domain name to be used: vtnag2
* WiFi channels: For 2.4GHz use channels 1, 6 and 11, 5GHz will automatically choose the best channel.
* IPv4 network: <IP_ADDRESS>/20
* IPv4 networks' addresses: Please consult enderecamento_IPv4.xlsx file
* ISP router IPv4 node address: <IP_ADDRESS>/30
* Buildings' router IPv4 address:
  * MC: <IP_ADDRESS>
  * Building A: <IP_ADDRESS>
  * Building B: <IP_ADDRESS>
  * Building C: <IP_ADDRESS>
  * Building D: <IP_ADDRESS>
* Routing protocols: IPv4 addressing and static routing
# 3. Subtasks assignment #
(For each team member (sprint master included), the description of the assigned subtask in sprint 2)

* 1171865 - Development of a layer two and layer three Packet Tracer simulation for building A, and also encompassing the campus backbone. Integration of every members’ Packet Tracer simulations into a single simulation.
* 1171668 - Development of a layer two and layer three Packet Tracer simulation for building B, and also encompassing the campus backbone.
* 1181436 - Development of a layer two and layer three Packet Tracer simulation for building C, and also encompassing the campus backbone.
* 1190293 - Development of a layer two and layer three Packet Tracer simulation for building D, and also encompassing the campus backbone.


text:
# Emrooz

Emrooz is a scalable database for sensor data, specifically [SSN](http://www.w3.org/2005/Incubator/ssn/ssnx/ssn) observations. It supports the persistence and [SPARQL](http://www.w3.org/TR/rdf-sparql-query/) retrieval of SSN observations. Emrooz builds on [Apache Cassandra](http://cassandra.apache.org/) and [Sesame](http://rdf4j.org/).

[![GitHub version](https://badge.fury.io/gh/markusstocker%2Femrooz.svg)](http://badge.fury.io/gh/markusstocker%2Femrooz)
[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.19191.svg)](http://dx.doi.org/10.5281/zenodo.19191)

## Requirements

* [Java](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (Java 7u25 or later)
* [Apache Cassandra](http://cassandra.apache.org/) ([2.1.3](http://archive.apache.org/dist/cassandra/2.1.3/))
* [Emrooz](https://github.com/markusstocker/emrooz/releases)

## Installation

* Uncompress Cassandra on your system and execute '`bin/cassandra -f`' to start Cassandra. Make sure the system user has the necessary privileges. Wait for a few seconds until Cassandra tells you it is `Listening for thrift clients...`. For further information, you may want to read [getting started with Cassandra](http://wiki.apache.org/cassandra/GettingStarted), in particular Step 3.
* Run `bin/cqlsh` to see if you can get access to the Cassandra shell
* Uncompress Emrooz on your system

## Usage

Emrooz can be used from the command line (experimental) and programmatically. To start, and test if things work, you can try loading and querying the test data.  These URIs correspond to those in the data, which is a CSV text file. We also specify the sampling frequency [Hz] of the sensor (`-sf`). Finally, we specify the directory to which the knowledge store is persisted (`-ks`) and the host on which the (Cassandra) data store runs.

Then we query the example data with the example query [`example-1.rq`](https://raw.githubusercontent.com/markusstocker/emrooz/master/src/examples/resources/example-1.rq) by specifying the knowledge and the data stores.

You should get a list of results.

## Programming

The following sections describe how to add and query observations programmatically in Emrooz.

A [complete example](https://github.com/markusstocker/emrooz/blob/master/src/examples/java/fi/uef/envi/emrooz/examples/CompletePersistentExample.java) can be found in the sources.

### Initialize

You can create an Emrooz instance with a file-based persistent knowledge store and a data store on `localhost` as follows.

    public static void main(String[] args) {
      // Initialize ...
      Emrooz emrooz = new Emrooz(new SesameKnowledgeStore(new SailRepository(
				                 new MemoryStore(new File("/tmp/ks")))),
				                 new CassandraDataStore());

      // ... and remember to close
      emrooz.close();
    }

The knowledge store implementation is for [Sesame](http://rdf4j.org/). It is thus an RDF store. Sesame supports various types of stores, including volatile in-memory stores and persistent disk-based stores. For more information, check the [Sesame documentation](http://rdf4j.org/documentation.docbook?view).

### Sensor specification and registration

As a first step, we need to specify and register the sensors we are using. Sensor specifications include identifiers for a sensor, one or more properties, one or more features, and a sampling frequency [Hz].

Sensor specifications are managed by the knowledge store.

There are a couple of ways how to create a sensor specification. The easiest is using the `EntityFactory` as follows

    EntityFactory f = EntityFactory.getInstance("http://example.org#");

	emrooz.add(f.createSensor("aThermometer", "temperature", "air", 1.0));

You can find [sensor specification examples](https://github.com/markusstocker/emrooz/blob/master/src/examples/java/fi/uef/envi/emrooz/examples/SensorSpecificationExample.java) in the sources.

### Add sensor observations

Emrooz supports adding sensor observations in several forms. The following example uses the `EntityFactory`.

    EntityFactory f = EntityFactory.getInstance("http://example.org#");

    // Create and add a sensor observation made by the thermometer
    // for temperature of air on April 21, 2015 at 1 am
    emrooz.add(f.createSensorObservation("thermometer", "temperature", "air",
                                         7.6, "2015-04-21T01:00:00.000+03:00"));

The sources contain [further examples](https://github.com/markusstocker/emrooz/blob/master/src/examples/java/fi/uef/envi/emrooz/examples/AddSensorObservationExample.java).

### Query sensor observations

SSN observations can be retrieved using SPARQL. However, queries need to follow the structure of SSN observations and must specify a time interval. For performance reasons, it is good to also specify the sensor, property, and feature. However, if these are left undefined, then Emrooz will use the knowledge store to resolve undefined sensor, property, or feature.

The following lines demonstrate how the observations we just persisted can be retrieved.

First, the SPARQL query.

    prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#>
    prefix time: <http://www.w3.org/2006/time#>
    prefix dul: <http://www.loa-cnr.it/ontologies/DUL.owl#>
    select ?time ?value
    where {
      [
        ssn:observedBy <http://example.org#thermometer> ;
        ssn:observedProperty <http://example.org#temperature> ;
        ssn:featureOfInterest <http://example.org#air> ;
        ssn:observationResultTime [ time:inXSDDateTime ?time ] ;
        ssn:observationResult [ ssn:hasValue [ dul:hasRegionDataValue ?value ] ]
      ]
      filter (?time >= "2015-04-21T00:00:00.000+03:00"^^xsd:dateTime
        && ?time < "2015-04-21T02:00:00.000+03:00"^^xsd:dateTime)
    }
    order by asc(?time)

The Java code to execute the SPARQL query. Read the SPARQL query from file or, as suggested in this example, set it as value of the `String query` variable.

    String sparql = "...";

    // Execute the query
    ResultSet<BindingSet> results = emrooz.evaluate(sparql);

    // Process the results by printing time and value to `System.out`
    while (results.hasNext()) {
	  Sytem.out.println(results.next());
    }

    results.close();

You can find a [complete example](https://github.com/markusstocker/emrooz/blob/master/src/examples/java/fi/uef/envi/emrooz/examples/QuerySensorObservationsExample.java) in the sources.

### Drop

If you want to start over with a fresh database, you need to execute Cassandra `bin/cqlsh` and the command `drop keyspace emrooz;`.

repository: markusstocker/emrooz

repo_name: markusstocker/emrooz


text:
---
  layout: syllabus_general
  title: COSC A319 Internet Technologies<br/>Syllabus (General)
  course_info:
    bulletin_link: https://courses.loyno.edu/course/cosc/a319/internet-technologies
    bulletin: |
      This course explores the concepts and technologies that are used in modern Internet systems, and provides the necessary skills and knowledge of software technologies needed for creating Internet/Web services. It is designed to expose students to web content presentation and generation technologies, programming, and building multi-tiered client/server web applications.
    description: |
      This course introduces students to the world of internet and networked systems development. Concepts related to distributed systems development; concurrent and asynchronous processing; process communications and network transport protocols; distributed application architecture and design; deployment, monitoring and debugging of internet-based systems; and web of things development will be covered.
    prerequisites: |
      One of:

      * [COSC A212 Introduction to Programming II](https://courses.loyno.edu/course/cosc/a212/introduction-programming-ii) and Sophomore standing
      * Instructor Approval.

      To be successful in this course, students are expected to have practical experience building multi-file/multi-component software projects. In particular, students should be comfortable working with data structures, designing classes and class interfaces, and writing software modules that form part of a larger application.
    learning_objectives: |
      Students will experience the design and construction of internet-based systems through hands-on interaction with course material. The course will provide students with a basis of theory upon which to reflect upon experiences: designing and building server-side systems that must communicate with client systems via internet protocols; designing and building client systems that operate and interact with the server system concurrently and asynchronously; debugging process timing and network failure issues; and understanding the network designs and protocols that enable the modern internet.
    learning_outcomes: |
      Upon completion of this course, students should be able to:

        * Understand and explain the theoretical approaches to dealing with concurrency in software and the types of problems that can occur when software processes operate concurrently
        * Understand and explain the theoretical approaches to building software systems with components that operate asynchronously
        * Understand and explain how messages travel between systems on the internet, including the various protocols used and what information they require and provide
        * Build parsers for key internet communication protocols and how they interact to enable modern web applications
        * Understand what types of services are offered by commercial cloud providers, and how those services fit into internet-based distributed software architectures
        * Build and deploy server-side API software capable of serving multiple client software types
        * Build and deploy web-based client software that communicates with a server-side API
        * Reflect on the unique requirements of internet-based software
        * Reflect on the collection of technologies that enable the modern internet
        * Reflect on your own learning process and be able to improve your own learning
        * Know where to look for more information on the topics covered in this course
    topics: |
      This course generally covers some combination of the following topics:

      * The Internet
      * The OSI Layered Network Model
      * Protocols of the Internet (TCP/IP and friends)
      * JavaScript
        * Language & runtime, debugging, and internals
        * In-browser JavaScript, the JS API, and the DOM
        * JavaScript on the server via Node.js
        * JavaScript in desktop apps via Electron
        * JavaScript on mobile devices via React Native
      * Distributed system architectures and the cloud
      * Building, testing and running distributed systems
      * Processes, threads, concurrency and asynchronous operation
      * Network Failure Modes & Mitigation Techniques
      * Replication, scalability and fault tolerance
      * Internet/distributed systems security
      * Embedded devices and the Web of Things
    learning_format: |
      **Content Delivery.** This course is taught in an experiential format. While there are lectures on the conceptual content (network models, application architectures, failure modes, protocols, etc.), these are delivered alongside practice lab and demo sessions and hands-on work on a semester-long individual project that provides direct experience with a number of these concepts. Where it is impossible to present conceptual content through the project, demonstrations during class and assignments are used to help make conceptual content clear.

      **Critical Reflection.** With an experiential format, research has shown that students retain material better when they reflect critically on their learning. As such, students will be expected to write weekly reflection journal entries, as well as a short personal reflection essay at the end of the semester.

      **Assessment.** There are no exams in this course. In fact, assignments and project work do not have numeric grade values either. Instead, at the midterm and the final, you will be expected to write a reflection-based grade proposal and defense. In this short paper, you will indicate what letter grade you feel you have earned in the course and defend that grade to me by reflecting on specific examples of your work, learning, and accomplishments.
    textbooks:
      -
        icon: 📘
        title: "The Illustrated Network: How TCP/IP Works in a Modern Network, 2nd Edition"
        authors: Walter Goralski
        publisher: Morgan Kaufmann/Elsevier
        pub_date: 2017
        isbn: 978-0-12-811027-0
        textbook_message: |
          **You DO need to obtain a copy of this book, at least for the semester.**
          I understand that the Monroe Library will have digital copies of the book available. Please check with them to understand how to use one.

          This book is also available for sale online for between $70 and $90, and is a fantastic reference for this content for the future.
        isbn_url: https://isbnsearch.org/isbn/9780128110270
      -
        icon: 📙
        title: Eloquent Javascript, 3rd Edition
        authors: Marijn Haverbeke
        publisher: Marijn Haverbeke
        pub_date: 2018
        isbn: 978-15-932795-0-9
        textbook_message: |
          **This version of the book is available for free online. You DO NOT need to buy this book. In addition, the online version is interactive, allowing you to try out code and explore the output while you read.**

          A print version is available from No Starch Press. If you would like to purchase the book, you can get there from the book website.
        isbn_url: https://isbnsearch.org/isbn/9781593279509
        companion_site: https://eloquentjavascript.net/
    textbooks_optional:
      -
        icon: 📕
        title: Designing Distributed Systems, 1st Edition
        authors: Brendan Burns
        publisher: O'Reilly Media
        pub_date: 2018
        isbn: 978-14-919836-4-5
        textbook_message: |
          This book will be a good reference for the project, particularly if you choose to use a container-based architecture to build your API and web components.

          **You DO NOT need to buy this book**, but it is a good reference if you can afford it.
        isbn_url: https://isbnsearch.org/isbn/9781491983645
        companion_site: http://shop.oreilly.com/product/0636920072768.do
      -
        icon: 📔
        title: Distributed Systems, 3rd Edition
        authors: Maarten van Steen and Andrew S. Tanenbaum
        publisher: Maarten van Steen
        pub_date: 2017
        isbn: 978-15-430573-8-6 (print), 978-90-815406-2-9 (digital)
        textbook_message: |
          **This book is available free online, and will only be used as reference. You DO NOT need to buy this book.**
        isbn_url: https://isbnsearch.org/isbn/9781543057386
        companion_site: https://www.distributed-systems.net/index.php/books/distributed-systems-3rd-edition-2017/
      -
        icon: 📗
        title: Building the Web of Things, 1st Edition
        authors: Dominique Guinard and Vlad Trifa
        publisher: Manning Publications
        pub_date: 2016
        isbn: 978-16-172926-8-2
        textbook_message: |
          **You do NOT need to buy this book.** This book is available for sale online for about $35.

          This book is a good resource if you are interested in Internet of Things and hardware-integrated internet software. Most of this content will NOT be covered this semester in class.
        isbn_url: https://isbnsearch.org/isbn/9781617292682
        companion_site: https://webofthings.org/book/
    project:
      title: Project
      icon: 🏗
      description: |
        During this course, you will build a multi-component internet system using some of the concepts learned through lecture and demo.

        The project entails creating two key components:

        * a **web API server** that can provide data and back-end services for client applications
        * a **browser-based client application** (commonly called a "web app") for interacting with the API server's back-end services via a computer through a website

        Several class periods during the semester are set aside for demonstrations, homework help, or lab exploration. These days are opportunities for you to see how such projects are built, ask questions about issues you are having on your own project, or tell your peers about problems you've experienced while working on your project and how you overcame them. These sessions will be enough time to clarify the required functionality for each assignment with instructor/faculty assistance, get started on project work or assignments, and get help on problems you are experiencing while working on projects or assignments. However, these sessions likely will not be enough to complete the project. Please expect to dedicate time outside of class to working on the project on your own.

        All programming for the project will be done using JavaScript. While JavaScript was originally created for use in the web browser, it is now used often in various non-browser ways. During this course, you'll learn to use modern JavaScript coding style and syntax to develop applications in a variety of those contexts and make them work together.
    reflection:
      title: Reflection Journals
      icon: 📓
      description: |
        ### Weekly Journal Entries

        During this course, you will keep a journal with at least weekly reflections on your experiences.

        At the midpoint and the end of the semester, you will be required to write a short (5-10 pages) personal reflection essay based on your journaling which examines the following questions:

        * What grade do you believe you've earned in this course so far? Why?
        * What activities did you perform during this course?
        * What were your expectations at the beginning of the course? How did your expectations and attitudes change throughout the semester?
        * Describe moments of clarity that occurred for you during this course? What made the concept clear for you? How did you gain a better understanding of it?
        * Did the project in this course make your understanding of software development and computer science clearer? Your understanding of the Internet and Internet-based applications? How?
        * What did you learn about yourself during this experience?
        * What did you learn about others during this experience?
        * How can you use what you learned through this experience in your future coursework and in your future career? Do you feel better prepared for your career path after this experience? Why?
        * What topics will you continue exploring after the course? Why does each interest you? How will you go about exploring each of those concepts?
    final:
      title: Assessments
      icon: ✅
      description: |
        There will be two assessments in this course, a MIDTERM PAPER and a FINAL PAPER, each requiring you to propose the letter grade you believe you earned to that point and defend it by reflecting on your understanding of the material covered, your learning process, your efforts, and your accomplishments. At a minimum, each paper should address the questions indicated in the **Reflection Journals** section.

        These papers should each be approximately 5—10 pages and should use appropriate spelling, grammar, and punctuation.
---

repository: nihonjinrxs/loyno-faculty-site

gha_language: HTML

repo_name: nihonjinrxs/loyno-faculty-site


text:
---
layout: post
title: "Design flaws"
categories:
- rants
date: 2006-03-07 00:00
comments: true
---

There are few things more irritating than everyday objects that are badly designed. In our building at work, we have stainless steel sinks in the toilets, which are circular in outline, and more or less hemispherical in shape. They look lovely but are hugely irritating to use. You know what happens when you turn on the tap in your kitchen sink without realising that there's a upturned teaspoon in the bottom of the sink? Well, imagine that effect but with a teaspoon the size of the entire sink. Water striking the sink with moderate force bounces straight off and conveniently soaks your groin area, rather than dampening your hands, which would have been much more useful.

The whole thing is made much worse by the taps, which are the 'push to operate' kind. It's true that they save water because people can't accidentally leave them running. However, these appear to have only a binary mode of operation, and are either off, or gush water at full force---no intermediate flow rates seem to be possible. So you can only wash one hand at a time, while using the other to push the tap down, but somehow most other areas of your body get a thorough soaking.

I hate those sinks.

repository: bsag/blog-octo

repo_name: bsag/blog-octo


text:
# wu-dupeml-web-editor

Simple editor to draggable and connect elements.

Demo:
- TODO

How it works:

 ![how-it-works](https://github.com/wlod/wu-dupeml-web-editor/blob/master/demo/demo.gif)

## Dependencies

JS Libraries:

- TODO

CSS:

- Material Icons (https://material.io/tools/icons/?style=baseline)
- Font from Google (https://fonts.google.com/specimen/Roboto)

DEV:

- http-server (https://github.com/indexzero/http-server)

repository: wlod/wu-dupeml-web-editor

repo_name: wlod/wu-dupeml-web-editor


text:
---
layout: article
title: Fency Carretera Austral - Hornopirén to Cochrane
article_header:
  type: cover
  image:
    #src: /assets/images/cover.jpg
    src: https://jodabike.github.io/blogmedia/imgs/2019-11-16-hornopiren-to-cochrane/fullsizerender_ezy-watermark_16-11-2019_04-28-27pmM.jpg
cover: https://jodabike.github.io/blogmedia/imgs/2019-11-16-hornopiren-to-cochrane/fullsizerender_ezy-watermark_16-11-2019_04-28-27pmT.jpg
show_edit_on_github: false
show_subscribe: false
license: false
tags: Chile
---

*November 4 - November 16*

From Hornopirén, we took a ferry to Caleta Gonzalo, as there is no road along this fjord. Five other cyclists also took that ferry, the carratera austral really seems to be full of cyclists, even in the current pre-season.

The guards on the ferry searched for a place to put all the bikes and finally we could all load them in the back of an empty truck. Then, we could spend some relaxed hours on the boat while the weather constantly changed between sunshine and rain.

When we arrived, the weather had decided for rain again and we thankfully accepted the offer of the nice truck drivers to take us with them to Chaitén. Together with two of the other cyclists, we had a bumpy ride in the dark loading space of the truck, sitting on euro pallets.

We shortly paused at a nice view point and reached Chaitén in the early evening.

As it rained again the next morning, we got up early to get another ride to Villa Santa Lucia with the nice truck drivers. Again, it was a dark and cold ride but a good opportunity to cover some distance without cycling through the heavy rain.

In Villa Santa Lucia, we invited our drivers for breakfast in a lovely little cafe. Here, we could also warm up at the oven and get some tasty cake for Jo's birthday breakfast. :)

Together with Petre, who we had met on the ferry, we rode to La Junta afterwards. It was an easy ride on asphalt road and the sun even showed up from time to time!

In La Junta, we spent a relaxed evening and enjoyed the rest of Jo's birthday.

Heavy rain on Wednesday morning made us stay in the hostel another day. We spent most of the day inside until it finally stopped to pour down in the afternoon. Then, we used the good weather for a nice little hike through a dense forest with lots of dense bamboo trees.

Thursday, we had great weather and enjoyed a beautiful cycling day.

Another amazing day followed.

We camped at a beautiful lake and spent the evening with a lovely French couple. They are on their way to Alaska with their camper van and their funny little cat. (@adventureandpermaculture)

Saturday and Sunday were two more great cycling days. The Carratera Austral is asphalted way more than we had expected and also the non-asphalted parts are well ridaleable. Hence, we could easily cover quite some distance during these sunny days. The landscape fascinated us a lot because the colors are so intense and the snowy mountains so great. The only sad thing is that there are fences everywhere. Every little meter next to the road is shut off with barbed wire and we are not sure if it is made to keep cows inside or tourists outside.

We passed Coyhaique Sunday afternoon and found a new inflatable sleeping mattress for Jo! However, withdrawing money at the bank was not that easy because most banks were barricaded due to the ongoing manifestations in bigger cities.

Sunday evening, we met a very nice Dutch couple at our campsite and spent cozy evening together with them.

Monday, the weather was even better than the days before and we crossed a beautiful pass in the hot sunshine.

A tourist, trying to approach a "Huemul":

Tasty water fresh from the mountains!

The only suitable campsite we found, was a tiny spot between thorny bushes and another fence.

Nice weather and scenic landscapes also delighted us on Tuesday and Wednesday.

We made a "Nalca" salad for dinner. It is a plant that grows everywhere along the road here and some locals showed us how to prepare them:

After some cycling on Thursday, we made another little hike to Lago Leones. It is one of the few free hikes around here because most of the other ones are quite expensive and touristic.
We could actually ride our bikes for the first few kilometers of the trail but then had to leave them behind before crossing a small bridge.

It was a beautiful hike along a weather border between rain and sunshine.

We reached the scenic Lago Leones with a glacier leading right into the lake.

That night we camped in the shelter of a bus station because is was very stormy and rained a lot.

Friday afternoon, the sun came out again and we enjoyed a nice ride to Cochrane. Luckily, the days get longer and longer and we reached town at 9:30pm with the last sunlight.

We stayed at a super nice warmshowers host, Piero. He is a brewer, working in a cozy pub in town, and showed us his brewery and we drank some tasty beer with him.


text:
---
title: "Create a Calico Cloud Account"
chapter: false
weight: 20
---

- [Calico Cloud trial account](https://www.tigera.io/tigera-products/calico-cloud/)
- for instructor-led workshop use instructions in the email you receive to request a Calico Trial account.
- for self-paced workshop follow the [link to register](https://www.tigera.io/tigera-products/calico-cloud/) for a Calico Trial account.
- You will receive something similar to below, please keep it safe you will need it to finish the Cloud9 configuration.

  ```bash
  # script should look similar to this
  curl https://installer.calicocloud.io/xxxxxx_yyyyyyy-saay-management_install.sh | bash
  ```


text:
# ENCRYPTION #

Just as no lock is absolutely unbreakable, no encryption can
be absolutely impossible to decrypt. With enough time and enough com-
puting power, any encryption scheme can be broken in theory. The goal
of computer security is to make an attacker’s job so difficult that successful
attacks are impossible in practice, requiring computing resources beyond
an attacker’s means.

## Transposition: Same Data, Different Order ##

Very weak

## Cipher Keys ##

The best defenses against known-plaintext attacks are good security
practices, such as regularly changing passwords.

## Substitution: Replacing Data ##

## Varying the Substitution Pattern ##

using a tabula recta
Polyalphabetic substitution is more effective than simple substitution
because it varies the substitution pattern throughout the message.

## Key Expansion ##

## The Advanced Encryption Standard (AES) ##

* AES
  * Binary Basics
    * Decimal Versus Binary
    * Bitwise Operations
    * Converting Data to Binary Form
  * Key Expansion in AES
  * AES Encryption Rounds
    * Substitution
    * Row Transposition
    * Column Combination
    * XOR with Cipher Key
  * Block Chaining


text:
# template: github.com/openvcloud/0-templates/account/0.0.1

## Description

This template is responsible for creating an account on an openvCloud environment. Account service is required to create VDCs (Virtual Data Centers).

## Schema

- `name`: Name of the account on OVC **Required**.
- `openvcloud`: Name of the [openvcloud](../openvcloud) instance used to connect to the environment.  **Required**.
- `description`: Arbitrary description of the account. **Optional**.
- `maxMemoryCapacity`: The limit on the memory capacity that can be used by the account. Default to -1 (unlimited).
- `maxCPUCapacity`: The limit on the CPUs that can be used by the account. Default: -1 (unlimited).
- `maxNumPublicIP`: The limit on the number of public IPs that can be used by the account. Default to -1 (unlimited).
- `maxVDiskCapacity`: The limit on the disk capacity that can be used by the account. Default to -1 (unlimited).
- `consumptionFrom`: determines the start date of the required period to fetch the account consumption info from. If left empty will be creation time of the account.
- `consumptionTo`: determines the end date of the required period to fetch the account consumption info from. If left empty will be `consumptionfrom` + 1 hour.
- `consumptionData`: consumption data will be saved here as series of bytes which represents a zip file.
- `create`: defines whether account can be created or deleted. Default to `True`.
- `users`: List of [vcd users](#vdc-user)  authorized on the account. **Filled in automatically, don't specify it in the blueprint**.
- `accountID`: The ID of the account. **Filled in automatically, don't specify it in the blueprint**.

### Vdc User

- `name`: name of the [vdcuser](../vdcuser)
- `accesstype`: access type (check OVC documentation for supported access types)

### Access rights

For information about the different access rights, check docs at [openvcloud](https://github.com/0-complexity/openvcloud/blob/2.1.7/docs/EndUserPortal/Authorization/AuthorizationModel.md).

## Actions

- `install`: creates an account or gets an existent account.
- `uninstall`: delete an account if empty. Attempt to delete an account with VDCs on it, will produce an error.
- `user_authorize`: adds a user to the account or updates access rights. In order to add a user, corresponding [`vdcuser`](#vdc-user) service should be installed.
- `user_unauthorize`: deletes a user from the account.
- `update`: updates the account attributes:

  - `maxMemoryCapacity`
  - `maxCPUCapacity`
  - `maxNumPublicIP`
  - `maxVDiskCapacity`
- `get_info`: fetch account name, name of ovc service and list of users.

## Usage examples via the 0-robot DSL

``` python
from zerorobot.dsl import ZeroRobotAPI
api = ZeroRobotAPI.ZeroRobotAPI()
robot = api.robots['main']

# create services
ovc = robot.services.create(
    template_uid="github.com/openvcloud/0-templates/openvcloud/0.0.1",
    service_name="ovc_service",
    data={'name': 'ovc_instance',
          'location':'be-gen-demo',
          'address': 'ovc.demo.greenitglobe.com',
          'token': '<iyo jwt token>'}
)
ovc.schedule_action('install')

account = robot.services.create(
    template_uid="github.com/openvcloud/0-templates/account/0.0.1",
    service_name="account-service",
    data={'name': 'test_account','openvcloud':'ovc_service'}
)
account.schedule_action('install')
account.schedule_action('update', {'maxMemoryCapacity': 5})

# examples to manage users
# first create a service for vdcuser admin
vdcuser = robot.services.create(
    template_uid="github.com/openvcloud/0-templates/vdcuser/0.0.1",
    service_name="admin",
    data={'name': 'username', 'openvcloud':'ovc_service', 'email'<EMAIL_ADDRESS>)
vdcuser.schedule_action('install')

# authorize user
account.schedule_action('user_authorize', {'vdcuser': 'admin', 'accesstype': 'R'})
# update user access of the existing user
account.schedule_action('user_authorize', {'vdcuser': 'admin', 'accesstype': 'RCX'})
# unauthorize user
account.schedule_action('user_unauthorize', {'vdcuser': 'admin', 'accesstype': 'RCX'})

# fetch info
info = account.schedule_action('get_info').wait(die=True).result

account.schedule_action('uninstall')
```

## Usage examples via the 0-robot CLI

```yaml
services:
    - github.com/openvcloud/0-templates/openvcloud/0.0.1__ovc:
        name: be-gen-demo
        location: <ovc.demo>
        address: 'ovc.demo.greenitglobe.com'
        token: '<iyo jwt token>'
    - github.com/openvcloud/0-templates/account/0.0.1__account-service:
        name: test_account
        openvcloud: ovc
actions:
      actions: ['install']
```

```yaml
actions:
    - template: github.com/openvcloud/0-templates/account/0.0.1:
      service: account-service
      action: ['uninstall']
```

```yaml
services:
    - github.com/openvcloud/0-templates/vdcuser/0.0.1__admin:
        name: ovc-user
        openvcloud: ovc
        provider: itsyouonline
        email<EMAIL_ADDRESS>actions:
    - service: account-service
      actions: ['user_authorize']
      args:
          user:
            vdcuser: admin
            accesstype: R
```

```yaml
actions:
    - service: account-service
      actions: ['user_unauthorize']
      args:
        vdcuser: admin
```

```yaml
actions:
    - service: account-service
      actions: ['update']
      args:
        maxMemoryCapacity: 5
```

gha_language: Python


text:
# Wilson Score Interval

Simple JavaScript implementation of [Wilson score interval](https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval). Useful wherever you want to make a confident estimate about the actions or preferences of a general population, given a sample of data (e.g. assigning scores for ranking [comments by upvotes](https://medium.com/hacking-and-gonzo/how-reddit-ranking-algorithms-work-ef111e33d0d9), products by popularity, [and more](#exampleusecases)).

#### Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Explanation](#explanation)
    - [Less technical](#lesstechnical)
    - [More technical](#moretechnical)
- [Comparison with other sorting methods](#comparison)
- [Use cases](#usecases)
    - [Examples](#exampleusecases)

## Installation

```sh
$ npm i wilson-score-interval
```

## Usage

```js
const wilson = require('wilson-score-interval');

/*
  wilson(upVotes, total);
  // upVotes === whatever result you want to estimate the confidence interval for
  // total === your total sample size
*/

wilson(430, 474); // { left: 0.8776750858242243, right: 0.9301239839930541 }
wilson(392, 436); // { left: 0.8672311846637769, right: 0.9239627360567735 }
wilson(10, 14);   // { left: 0.4535045882751561, right: 0.882788120898909 }
```

## Explanation

### Less technical:
If you know what a sample population thinks, you can use this tool to estimate the preferences of the population at large.

Suppose your site has a population of 10,000 users. One product has ratings from 100 users (your sample size): 40 upvotes, and 60 downvotes. You want to understand how popular the product would be across the whole population. So you run `wilson-score-interval(40, 100)`, which returns the result `{ left: 0.3093997461136029, right: 0.4979992153815976 }`. Now you can estimate _with 95% confidence_ that **between _30.9%_ and _49.7%_ of total users would upvote this product.**

It is common to use the lower bound of this interval (here, `30.9`) as the result, as it is the most conservative estimate of the "real" score.

For a beginner-friendly introduction to confidence intervals for population proportions, see [this YouTube video](https://www.youtube.com/watch?v=3ReWri_jh3M).

### More technical:
The Wilson score interval, developed by American mathematician [Edwin Bidwell Wilson](https://en.wikipedia.org/wiki/Edwin_Bidwell_Wilson) in 1927, is a confidence interval for a proportion in a statistical population. It assumes that the statistical sample used for the estimation has a binomial distribution. A binomial distribution indicates, in general, that:

1. the experiment is repeated a fixed number of times;
2. the experiment has two possible outcomes ('success' and 'failure');
3. the probability of success is equal for each experiment;
4. the trials are statistically independent.

This package uses a [z-score](https://en.wikipedia.org/wiki/Standard_score) of **1.96** by default, which translates to a confidence level of 95%.

For more, please see the [Wikipedia page on the Wilson score interval](https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval) and [this blog post](http://wordpress.mrreid.org/2014/05/20/ranking-ratings/).

## Comparison with other scoring methods
Using a simple calculation of `score = (positive ratings) - (negative ratings)` or `score = average rating = (positive ratings) / (total ratings)` proves to be problematic when working with smaller sample sizes, or differences in sample sizes across populations. See [this blog post comparing scoring methods for details and examples](http://www.evanmiller.org/how-not-to-sort-by-average-rating.html).

The Wilson score interval is known for performing well given small sample sizes/extreme probabilities as compared to the [normal approximation interval](https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Normal_approximation_interval), because the formula accounts for uncertainties in those scenarios.

[This paper](https://www.ucl.ac.uk/english-usage/staff/sean/resources/binomialpoisson.pdf) offers a more technical comparison of the Wilson interval with other statistical approaches.

## Use cases
Apart from sorting by rating, the Wilson score interval has a lot of potential applications! You can use the Wilson score interval anywhere you need a confident estimate for what percentage of people took or would take a specific action.

You can even use it in cases where the data doesn't break cleanly into two specific outcomes (e.g. 1-5 star ratings), as long as you are able to creatively abstract the outcomes into two buckets (e.g. % of users who voted 4 stars and above vs % of users who didn't).

### Examples:

- [Most romantic city on Yelp](https://www.yelpblog.com/2011/02/the-most-romantic-city-on-yelp-is) (`wilson-score-interval(num_romantic_searches / num_total_searches)`)
- [Sorting commments by upvotes on Reddit](https://redditblog.com/2009/10/15/reddits-new-comment-sorting-system/) (`wilson-score-interval(num_upvotes / num_total_votes)`)
- Creating a 'most shared' list (`wilson-score-interval(num_shares / num_total_views)`)
- Spam/abuse detection (`wilson-score-interval(num_marked_spam / num_total_votes)`)


text:
# markov-impersonator

# prequisites
This requires nltk module, which separately downloads data.

It downloaded the following (in the home directory):

```
nltk_data/
├── corpora
│   └── treebank
│       ├── combined
│       ├── parsed
│       ├── raw
│       └── tagged
├── taggers
│   └── averaged_perceptron_tagger
└── tokenizers
    └── punkt
        └── PY3
```

I believe the 3rd level items need to be installed like so:
```
import nltk;
nltk.download(['treebank', 'averaged_perceptron_tagger', 'punkt'])
```

A custom nix experssion could probably do this data download.
Perhaps someone else will include this soon: https://github.com/NixOS/nixpkgs/issues/56094#issuecomment-638247266.

# usage
Start a Nix shell with:
```
nix-shell -p 'python35.withPackages(ps: with ps; [ nltk ])'
```

The run the following inside:
```
python3 __init__.py <your input file path>
```

# todo
- ignore case (at least in analysis)
- consider frequency of suffixes (or rather compress on them)
- consider grammar tree: https://www.nltk.org/

repository: combinatorist/markov-impersonator

repo_name: combinatorist/markov-impersonator


text:
# Civic Elevator Code Challenges

This repository holds the code challenges (a.k.a "homework assignments") that Civic Elevator uses as part of its hiring process.

Interested applicants should [apply to an open position on Workable](https://apply.workable.com/civic-elevator/) first before completing a code challenge.

## Challenges

1. [Engineering](./eng/README.md): fetch a JSON payload from an API and render it inside a web page.
2. [User Experience](./ux/README.md): create a wireframe for a dashboard.

## General Notes

We use code challenges as a means for candidates to demonstrate their skills and strengths on their own terms, and their own time. Used in conjunction with interviews, the challenges can provide a complete view of a candidate, moreso than portfolio reviews or measuring public offerings on Github.

The challenges are designed to be small – only taking a couple of hours – and respectful of the candidates. They are not spec work, nor are they a sneaky means for Civic Elevator to garner free work.

Civic Elevator will evaluate responses based on a common rubric, and each submission will receive at least two reviews.

Any candidate with questions about the challenges, or Civic Elevator's hiring process in general, should contact us at<EMAIL_ADDRESS>

repository: civicelevator/recruiting

repo_name: civicelevator/recruiting


text:
# Bluescreen of Death

This is a very basic implementation on how to replicate a BSOD (Bluescreen of Death), using Python and Ctypes.

![screen-gif](https://clap.shx.gg/5ceQmzjWx.gif)

## Usage

```bash
python bluescreen.py
```

## How does it work?

I won't go too far into detail as this is pretty basic. We are calling [RtlAdjustPrivilege](http://pinvoke.net/default.aspx/ntdll/RtlAdjustPrivilege.html) to give our process shutdown privileges. After that, we raise a [STATUS_NOT_IMPLEMENTED](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55#STATUS_NOT_IMPLEMENTED) error with [NtRaiseHardError](http://pinvoke.net/default.aspx/ntdll/NtRaiseHandError.html), essentially telling our computer that there was an issue and a status was not completed. This causes a BSOD as when we call [NtRaiseHardError](http://pinvoke.net/default.aspx/ntdll/NtRaiseHandError.html), it internally sends a [HARDERROR_MSG](http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FError%2FHARDERROR_MSG.html) to the [Local Inter-Process Communication Server](http://zezula.net/en/prog/lpc.html), resulting in a BSOD.

## Sources

1) [RtlAdjustPrivilege](http://pinvoke.net/default.aspx/ntdll/RtlAdjustPrivilege.html)

2) [NtRaiseHardError](http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FError%2FNtRaiseHardError.html)

3) [STATUS_NOT_IMPLEMENTED](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55#STATUS_NOT_IMPLEMENTED)

4) [HARDERROR_MSG](http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FError%2FHARDERROR_MSG.html)

5) [Local Inter-Process Communication Server](http://zezula.net/en/prog/lpc.html)

repository: clap-dev/Bluescreen

repo_name: clap-dev/Bluescreen


text:
# LabVIEW-CLI
A proxy mechanism allow LabVIEW programs to easily write out to the command line.

## Installing

If you select releases above this you should see the v1.0-beta release.

Download the installer to add the Windows component and the vipc file contains the library for LabVIEW development. Or download the source which contains a small demo.

## Launching

When installed with the supplied installer the application is added to Windows path variable so you can launch it from any command line using `labview-cli`

## Command Line Arguments

`labview-cli [options] launch-vi [-- application arguments]`

last argument (or last before -- if user arguments) is what to launch.

--version: Prints the program version and exits

-v: Verbose mode.

--no-launch: Doesn't launch anything automatically, you must run your software manually. Overrides --timeout to -1.

--lv-exe: LabVIEW Executable to use. Defaults to LV 2014 32 bit default path at the minute.

--lv-ver: LabVIEW version to use instead of specifying execution e.g. 2015

--x64: Launch in 64 bit LabVIEW

--timeout: Maximum time (in ms) to wait for the LabVIEW program to connect to the CLI (-1 = Infinity).

--kill: Forces the LabVIEW process to exit after the CLI receives a return code/error

Any arguments after -- are passed to the application.

repository: pollockm/LabVIEW-CLI

repo_name: pollockm/LabVIEW-CLI