text:
---
layout: post
title: "CSAPP Walk Through: Chapter 2"
date: 2015-05-12 14:53
categories: Notes
tags: CSAPP
slug: csapp-review-2
---

These series of notes are based on the book [*Computer Systems: A Programmer's Perspective*](http://www.amazon.com/Computer-Systems-Programmers-Perspective-3rd/dp/013409266X/).

![Computer Systems: A Programmer's Perspective](http://i.imgur.com/wNlctKZ.jpg)

The homepage for the book is [http://csapp.cs.cmu.edu/](http://csapp.cs.cmu.edu/).

I put these notes here for me to review the book conveniently, hope it helps you as well.

---

## Imformation Storage

### Bytes

- *Byte* is the smallest addressable unit of memory.
- Every byte of memory is identified by a unique number(*address*).
- All possible addresses form the *virtual address space*.

### Words

- *Word size* indicates the nominal size of integer and pointer data.
- For a machine with a $w$-bit word size, the virtual memory addresses can range from $0$ to $2^w-1$.

### Data Sizes

This chart shows sizes of C numeric data types of 32-bit and 64-bit machines.

C declaration | 32-bit        | 64-bit
------------- | ------------- | ---
char          |       1       |  1
short int     |       2       |  2
int           |       4       |  4
long int      |       4       |  8
long long int |       8       |  8
char *        |       4       |  8
float         |       4       |  4
double        |       8       |  8

### Strings

- A string in C is encoded by an array of characters terminated by the null character(`\0`).

### Boolean Algebra

- Claude Shannon was the first to made the connection between Boolean algebra and digital logic.
- ** Opeartions: ** **NOT**, **AND**, **OR** and **EXCLUSIVE-OR**.

### Integer representations

To represent positive-only values(unsigned numbers), we use **unsigned encodings**. To represent both positive and negative values(signed numbers), we use **two's complement encodings**.

- **U**: Unisigned Encodings
- **T**: Two's Complement Encodings

Remember:

- $ U_{Max} = 2^w - 1 $
- $ T_{Max} = 2^{w-1} - 1 $
- $ T_{Min} = 2^{w-1} $

### Conversions Between Signed and Unsigend

For conversions between signed and unsigned numbers with the same word size: **the numeric values might change, but the bit patterns do not**.

When executing an operation between an unsigned operand and a signed operand, C will convert the signed operand to an unsigned operand implicitly.

For conversion from signed integer to unsigned integer:

$$  T2U_w\left(x\right) =
\begin{cases}
x+2^w,  & x < 0 \\\\
x, & x \ge 0
\end{cases}$$

For conversion from unsigned integer to signed integer:

$$ U2T_w\left(u\right) =
\begin{cases}
-2^w + u, & u \ge 2^{w-1} \\\\
u, & u < 2^{w - 1}
\end{cases}$$

### Expanding the Bit Representation of a Number

- **Zero Extension**: To expand a unsigned number, we simply add leading zeros to the representation.
- **Sign Extension**: To expand a two's complement number, we add copies of the most significant bit to the representation.

### Truncating Numbers

To truncate an unsigned number:

$$
B2U_k\left(\left[x_{k-1}, x_{k-2}, ..., x_0\right]\right)
= B2U_w\left(\left[x_{w-1}, x_{w-2}, ..., x_0\right]\right) \text{mod} ~ 2^k
$$

To truncate an two's complement number:

$$
B2T_k\left(\left[x_{k-1}, x_{k-2}, ..., x_0\right]\right)
= U2T_k\left(B2U_w\left(\left[x_{w-1}, x_{w-2}, ..., x_0\right]\right) \text{mod} ~ 2^k\right)
$$

### Floating Point

The numerical form of floating point numbers is $ V_{10} = \left(-1\right)^s \cdot M \cdot 2^E $.

- Sign bit **s** determines whether the number is positive or negative.
- **M** is a fractional value in range $ \left[1.0, 2.0\right] $
- **E** weights value by a power of 2.

**Floating point in memory**:

- Single precision(32 bits): 1 sign bit, 8 exponent bits and 23 fraction bits.
- Double precision(64 bits): 1 sign bit, 11 exponent bits and 52 fraction bits.

exponent bits encodes E, fraction bits encodes M.

**Special values**:

- When exp bits are all 1 and frac bits are all 0, the number represents $ \infty $ ($+\infty$ when $ s=0$ and $-\infty$ when $s=1$).
- When exp bits are all 1 and frac bits are not all 0, the number represents $NaN$(Not a Number).

**Encoding**:

- Exponent was coded as biased values: $ E = exp - Bias $.
- Significand coded with implied leading 1: $ M = 1.xxx...x$.

**Example**:

    float f = 12345.0;

$ 12345_{10} = 1.1000000111001_2 \cdot 2^{13} $

Significand:

- $ M =<PHONE_NUMBER>001_2$.
- $ frac =<PHONE_NUMBER>0010000000000_2$.

Exponent:

- $ E = 13 $
- $ Bias = 127$
- $ exp = E + Bias = 140 = 10001100_2 $

Result:

sign bit  | exp           | frac
--------- | ------------- | ---
0         | 10001100      |<PHONE_NUMBER>0010000000000


text:
# aspcore-example
ASPCore website example - website status monitor

User dashboard:
![image](https://user-images.githubusercontent.com/13326808/48046613-18b2ec80-e1a6-11e8-9050-473e4dd99d0d.png)
Admin panel:
![image](https://user-images.githubusercontent.com/13326808/48046640-308a7080-e1a6-11e8-9b99-f76b9d284ade.png)
![image](https://user-images.githubusercontent.com/13326808/48046645-384a1500-e1a6-11e8-8b35-68c244627cf9.png)
![image](https://user-images.githubusercontent.com/13326808/48046672-46983100-e1a6-11e8-9ff8-8c6e9dcc450a.png)

# Now to build and test

1. Run `build.sh` or `build.ps1`
2. Grab artifact from path `./out`
3. Complete!  Execute in root dir `dotnet ./webapp.dll`
2. Visit `http://localhost:1448/` for user dashboard
3. Visit `http://localhost:1448/control` for admin panel
4. Complete :3

# Where login and password information to admin panel?
- On first start, application has generated file `login_and_pass.txt` in root dir

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# CityDialog
Awesome City Dialog

For use this library, import this project in your project and use it.

usage :

#1: Import Project

#2: initialize dialog
for example : allDialog.onCreate_Dialog_1B(context, Title, Description,
                        Button title, new DialogCallBack() { ... }

#3: when finish dialog, use this code for dismiss it
for example : allDialog.dismiss_Dialog_1B();

#4: enjoy it :)

#License
The MIT License (MIT)

Copyright (c) 2016 Chad Song

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

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

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

repository: tellfa/CityDialog

repo_name: tellfa/CityDialog


text:
---
layout: post
title: "Benefits of Protractor in a Angular+Rails API application stack"
date: 2014-02-22 18:13:16
author: alexander
categories: [Angular,Rails]
---

## AngularJs with a separate Rails API
We just finished a Web application that facilitates in the process of 360
feedback. During the development process we learned a lot about how to use
Angular alongside a Rails API especially when it comes to testing.
With this blog we want to share some of our insights.

### Why we chose to split the Angular frontend from the Rails app.
There were several reasons why we chose for the Angular + Rails API solution.

1. We had some developers that were really familiar with Rails, and some
   developers that were less familiar with Rails.
2. We wanted to also develop an IOS app and not having to write a separate API
   for the IOS app saves a lot of development time.
3. Rails has a fast development time, is highly cachable and lends itself
   really well for API's.

By splitting the development of the frontend and the Rails backend we could
distribute the work over two development teams and keep the application as a
whole very extensible.

### The downsides of our approach
By splitting the application over different repositories you gain flexibility
but that comes at a cost. Jason
Draper recently wrote an article about

EmberJs with a separate Rails API

In this article he writes the following about his experience with a similar
approach:
>The other problem is that by having the applications in two separate
>repositories, you can't easily have a full integration test. In order to do
>this you would need to run both applications on the same machine simultaneously.
You would also need some way to make sure that both of the applications were
>on the same revision for the test.

We came to the same conclusion when we implemented E2E tests. The solution we
chose is the same as the one Jason's team chose:

>We decided to test the apps separately and trust that the API is what we've
>said it was. This can be frustrating but in our case, it didn't turn out to be
>a real problem. Once you have wired your API to the UI, you should never change
>your UI without also changing the API. This was enforced in code review only.

In my opinion this is the best approach when you split your frontend and backend
however not everyone shares that opinion. In this blogpost I will cover why we
believe that testing the apps separately and thus mocking the API requests is
the way to go.

## why mocking API requests in E2E test is OKAY and dummy endpoints in the
## backend  are NOT.
It is common belief that end to end (E2E) tests should cover the whole
application stack. In other words only covering the frontend aspects of the
application and mocking the backend is evil and you shouldn't do it.

During my research on how to implement protractor and mock several API requests
in the process, I came across several forum/blog/Github posts that looked like
this:

>First of all the goal of integration testing is to test everything. Therefore
>mocking the backend in this case isn't a good idea.
>From my perspective the real problem with testing in protractor (and with any
>other tool for integration/browser testing)
>is how to load database fixtures or how to setup the initial state of the app.
>
>In ruby world we have excellent Capybara gem which can directly hook into the
>database but in the JavaScript world things are much more complicated.
>Especially when the backend is written in the other language, framework, etc.
>
>In my sample project I workaround this problem with dummy API endpoint for
>loading db fixtures (obviously it should be exposed only in the test
>environment).
>Inside the integration test I'm using this endpoint to load fixtures in order
>to ensure that each test has the same initial state.

So the opinion from this developer is that instead of mocking the backend/API
requests you should aim to set a initial state of a test database.
Although this is a valid solution it has a lot of downsides.

1. Setting the initial state of a test database requires a lot of database
configuration.
2. The state of the database has to be reset to different states depending on
the behaviour and page you want to test.
3. hooking into a database with pure JavaScript is next to impossible and
exceeds the language's design and purpose.
4. Dummy API endpoints for loading database fixtures is a nasty solution that
pollutes the backend.

The solution from this developer is one I really don't like his method requires
a lot of database setup/configuration and forces us to change the backend by
adding extra endpoints just to make tests that focus on various aspects of the
user interface work. In my opinion the backend is the worst
place to pollute in this instance. You should aim to keep frontend and
user-interface oriented tests and code in the frontend.

## why do we need to intercept / reroute API requests anyway..
The problem is that in order to test various parts of the frontend you come
across several pages that contain API requests that cause errors or pollute your
production/development database.

In order to prevent this from happening we need to either reroute the request to
another endpoint or intercept the API request and respond with a JSON mock as
response.

## why mocking API requests is the preferred solution
mocking the API requests has several advantages over creating separate endpoints.

1. No need to have a internet connection or rails server running.
2. Its faster to intercept the request and return a JSON object then communicate
with the backend.
3. It allows you to keep frontend and backend code more separated.
4. more flexibility what requests to pass through and which ones to intercept.
5. works out of the box no additional database configuration needed.

## if we only cover the front-end aspects of the application stack is it still
## worth it to write integration tests ?
YES, the main purpose of integration tests is to test how our application
behaves when it's being used by a real user.

Many developers want to test too much in their integration tests we don't want
to test API requests or application logic.We only want to know if the
application behaves as we expect it does in certain scenarios.

### Things you should test..
1. If I leave certain required fields empty does a error message appear and do I
stay on the same page?
2. If I fill all required fields, do I get redirected to page X ?
3. If I navigate to a resource that is only accessible when logged in, do I get
redirected if I'm not ?

### Things you should avoid testing..
1. If I login with a mock user object do I receive a request from the backend
containing the right mocked authentication token ?
2. If I send a request to change my password do i get an error message if my
request contains an invalid current password field ?

repository: DefactoSoftware/devblog

extension: markdown

gha_language: CSS

gha_license_id: MIT

repo_name: DefactoSoftware/devblog


text:
# Configuration

The first thing you should configure is the service's general information (name,
description, etc.). Open up [`package.json`](../package.json) and change (at
least) the following fields:

- `name`
- `version`
- `description`
- `repository/url`
- `keywords`
- `author`
- `contributors`
- `licence`
- `bugs`
- `homepage`

Now change the service's name in [`config.dev.yaml`](../config.dev.yaml#L26) and
[`config.prod.yaml`](../config.prod.yaml#L26). While you are there, you might
want to look at and play with other configuration parameters, such as:

- `num_workers` - the number of workers to start; some special values are:
  - `0` will not do any forking, but run the service in the master process
  - `ncpu` will spawn as many worker processes as there are CPU cores on the
    host
- `worker_heap_limit_mb` - the maximum amount of memory (in MB) a worker's heap
  can have
- `logging` and `metrics` - the configuration for logging and metrics facilities
- `services` - the block instructing the master process which services to start;
  there can be more than one service, if, e.g., your service depends on another
  Node.js service being present; each service has further the following
  information:
  - `name` - the service's name
  - `module` - the module starting the service; if not given, the service's name
    is used instead
  - `conf` - the configuration object passed directly to the service; settings
    to consider (remember to update them in both
    [`config.dev.yaml`](../config.dev.yaml) as well as
    [`config.prod.yaml`](../config.prod.yaml)):
    - `port` - the port to start the service on (default: `8888`)
    - `interface` - where to bind the service's server (default: `<IP_ADDRESS>`)
    - you may add here any other configuration options needed by your service,
      as long as it is [valid YAML](http://www.yaml.org/spec/1.2/spec.html);
      these will be accessible via the `app.conf` object

For more information on configuration possibilities, take a look at the
[service-runner
documentation](https://github.com/wikimedia/service-runner#config-loading).

repository: kartotherian/kartotherian

gha_language: JavaScript

repo_name: kartotherian/kartotherian


text:
# SMS-Management-API

[![Build Status](https://travis-ci.org/Collins33/SMS-Management-API.svg?branch=develop)](https://travis-ci.org/Collins33/SMS-Management-API)

SMS management API
The API provides a user a way to manage messages he sends and also track who receives the message.

## Getting Started

- git clone https://github.com/Collins33/SMS-Management-API.git
- cd into the project folder
- run `npm install`

## Setting up mongo Atlas

- create an account on mongo DB atlas
- create a mongo atlas database
- ensure the IP security settings allow connctions from everywhere
- copy the connection url given to you.
- create nodemon.json file
- add the password given to you.
- "MONGO_PASSWORD": "xxxxxxxxxxxx"

## Starting the application

- run `npm start`

## endpoints

| Endpoint                          |            FUNCTIONALITY            |
| --------------------------------- | :---------------------------------: |
| POST /api/v1/contact              |    This will create the contact     |
| GET /api/V1/contact               |   This will get all the contacts    |
| GET /api/V1/contact/:contactId    | This will get an individual contact |
| PATCH /api/V1/contact/:contactId  |  This will edit a specific contact  |
| DELETE /api/V1/contact/:contactId |     This will delete a contact      |
| POST /api/api/v1/sms              |       This will create an sms       |
| GET /api/v1/sms                   |     This will get all sms sent      |
| GET /api/v1/sms/:smsId            |     This will get a single sms      |
| DELETE /api/v1/sms/:smsId         |   This will delete a specific sms   |

## Built With

- [NODE/EXPRESS](https://expressjs.com/) - The web framework used
- [npm](https://www.npmjs.com/) - Dependency Management
- [Mongo Atlas](https://www.mongodb.com/cloud/atlas)-Database

## Authors

- **COLLINS NJAU MURU**

## License

This project is licensed under the MIT License

branch_name: refs/heads/develop


text:
---
title: Arduino control Mouse
date: "2019-12-31T22:12:00.121Z"
tags: ["arduino"]
header: { type: 'icon', bgColor: '#0C9097', icon: 'arduino' }
description: How to control a mouse using an Arduino
---

Here is a snippet of code to used to control a mouse using an Arduino.

```c
#include "Mouse.h"

void setup() {
  Serial.begin(9600);
  Mouse.begin();
}

void loop() {
   Mouse.move(0, -40);
  delay(5000);
}
```

repository: kevinponce/keivnponce-blog

repo_name: kevinponce/keivnponce-blog


text:
# Twilio Programmable Chat Quickstart and Demo

[![N|Solid](https://static0.twilio.com/marketing/bundles/archetype/img/logo-wordmark--red.svg)](https://www.twilio.com/chat)

# With Twilio Programmable Chat

  - Add chat to any app with SDKs for mobile and web. Powered by the Twilio cloud.
  - Cut development effort. Quickly create mobile-friendly chat experiences with Twilio’s full-featured SDKs and global real-time messaging infrastructure.
  - Cut development effort. Quickly create mobile-friendly chat experiences with Twilio’s full-featured SDKs and global real-time messaging infrastructure.

 # Remixing

 Go to config.js and populate the following value from your Twilio Account.

    accountSid: '',
    apiKey: '',
    apiSecret: '',
    serviceSid: '',

If you do not know how to get these values , read the section "Server Component" below

# Components

A complete secure chat app typically has 2 components
  - [1] Server ,that vouches for the identity of clients and grants them specific permissions to perform various functions in a chat.
  - [2] Chat clients (web or mobile), that acts as the User Interface wanting to communicate

### Server Component
This is needed to generate access tokens.
Access tokens are the way to grant permissions and authentication to chat clients when using Twilio Programmable Chat. You need the following information to generate an access token:

| Entities | Details |
| ------ | ------ |
| Twilio Account SID | Go to your [Programmable Chat dashboard](https://www.twilio.com/console/chat/getting-started ). In the top right-hand corner, click Show API Credentials. (You will not use the Auth Token. More on that below.) |
| Chat Service SID |Each Twilio Programmable Chat app has its own channels, conversations, message history and participants. You’ll need a Chat Service SID to identify which Chat app you’d like to use. On the [Chat dashboard](https://www.twilio.com/user/account/ip-messaging/getting-started), click Manage Your Programmable Chat Service Instances, create a new IPM Service |
| Twilio API Keys | If you’ve worked with Twilio before, you may be used to copying the AUTH_TOKEN  along with the ACCOUNT_SID. The problem with a single authentication token is that if it gets compromised (e.g. you accidentally commit it to a public repo) then you have to change it in all of your Twilio apps. Instead, we’ll create a set of API keys for use by this app only. Visit your [API keys dashboard](https://www.twilio.com/user/account/ip-messaging/dev-tools/api-keys), create a set of API Keys |
| Identity | Since a Twilio Chat Client can be an app on multiple devices, you should assign an identity ( representing a user of chat ) and endpoint ( representing a device/app for that user ) . If you want to allow a user to log in from multiple devices and apps ( ex- multiple tabs on a computer ), design your endpoint accordingly. |

### Client Component
#####  Login Module

![N|Solid](https://cdn.glitch.com/dc415a0e-213d-4b6e-9f5b-181c910c5294%2FsignInWindow.png?1490112727810)

  - A drop down to collect information on Channel Visibility
  - A unique identifier to be associated with a chat member uniquely
  - Name of the Channel
  - An actionable link ( in the form of a button) , to consume information from above 3 elements and pass it to the server component built above to get authentication token and initialize chat client. Button also serves the purpose of hiding login module and surfacing up the chat module ( since this is a one-page app)
```sh
onclick="startChat();showChatWindow();hideSignInWindow()"
```

##### Chat Modules

###### Chat Window
![N|Solid](https://cdn.glitch.com/dc415a0e-213d-4b6e-9f5b-181c910c5294%2FchatWindow.png?1490112729897)

###### Chat Message
![N|Solid](https://cdn.glitch.com/dc415a0e-213d-4b6e-9f5b-181c910c5294%2FchatMessage.png?1490112728457)
Chat Messages are added dynamically , so the static HTML elements are those for Chat Window as shown below

```sh
<!-- START : CHAT SECTION  -->
<section id="chat-section" >
<div class="chatArea" id="chatWindow" hidden="true">
     <!-- start chat-history -->
      <div class="scrollable chatMessages" id="chatHistory" >
      </div>
      <!-- end chat-history -->
      <div class="typingArea">
          <div >
              <input id="chatInput" name="chatInput" type="text" placeholder="Type your Message" class="form-control input-md" autofocus>
          </div>
          <div>
              <label id="statusMessages"></label>
          </div>
       </div>
    </div>
</section>
```

"chatHistory" is where we will dynamically add HTML elements to display the new/old messages using Chat’s listener events and javascript.

##### Let’s make the parts moving
Now that we have the skeleton ready, lets power it up with Twilio Programmable Chat and get it working

Do the groundwork for chat
 - On click of the button above  the actions performed are
    - Hide Login Module and show the chat module
    - Get Authentication token by passing the memberName and
    - Initialize Chat Client
      -  Get Channel
          -   If Channel exist, join channel
          -   If Channel Does Not exist, create and Join Channel
          -   Listen to relevant event handlers (Channel events mentioned at the end of this document)
      -  Show UI Message about joining of channel

Start Chatting
We can now use Twilio Programmable Chat powered chat client sitting in your webpage to start sending, receving the message. These are the steps to do that
 - Listen to “typingArea” , and when user presses enter, send the message out

License
----

MIT

**Happy Chatting !**


text:
#Base ionic2 Application

Provides boilerplate code for a Ionic2 application with authentication interface.
Check branches for different authentication services implementations.

---
You are on the MASTER branch.

No authentication service is implemented
---

##Configuration

- ionic 2.0.0-beta.25
- ionic-angular 2.0.0-beta.7

see `package.json` for more detail on dependancies.

##Installation

(with ionic CLI installed)

After checkout, update node packages

```
npm install
```

Check

```
ionic serve
```

###TODO
- Add error display on "Reset email" page


text:
# S3 Tips

Here are some common commands that you will find yourself using to interact with the data science team's S3 data Bucket (s3://tidepool-analytics-stagedata/).

[List of S3 CLI Commands](https://docs.aws.amazon.com/cli/latest/reference/s3/index.html#available-commands)

## Commands used from Compute Machine Terminal

The data science AWS compute-1 and compute-2 machines have AWS keys established. The following commands can be run without any additional setup.

### Exploring S3 Bucket Contents

**Get list of files and folders**

Folders are listed with the prefix **PRE** first, followed by the files

```
aws s3 ls s3://tidepool-analytics-stagedata
```

**Get size and number of objects in a folder**

This is non-recursive and only summarizes the contents in the current folder

```
aws s3 ls --summarize --human-readable s3://tidepool-analytics-stagedata/
```

### Copying to/from S3

Note: Unlike the usual linux recursive directory copy command behavior (cp -r folder destination) which copies the entire folder, <u>S3's cp command only copies the folder's internal contents</u>. Thus you must specify the name of the destination folder even if it doesn't exist yet.

repository: tidepool-org/data-science-handbook

repo_name: tidepool-org/data-science-handbook


text:
# Genoverse [![Build Status](https://travis-ci.org/wtsi-web/Genoverse.svg?branch=gh-pages)](https://travis-ci.org/wtsi-web/Genoverse)

Genoverse is a portable, customizable, back-end independent JavaScript and HTML5 based genome browser which allows the user to explore data in a dynamic and interactive manner.

Data is visualized in the browser, meaning Genoverse can be installed on any website and show data from a wide range of online or local sources.

Genoverse works with a variety of formats, such as XML, JSON, BED, VCF, GFF, GFF3 or delimited text files, and can be customized to parse and display any data source as required.

If you have any questions, please contact<EMAIL_ADDRESS>
Example: http://genoverse.org

repository: RNAcentral/angularjs-genoverse

repo_name: RNAcentral/angularjs-genoverse


text:
# Product List

This is a sample app to test basic knowledge and features using React.

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

## Installation

Use the package manager [npm](https://www.npmjs.com) to install Product list.

```bash
npm install
```

## Usage

Since this project used [Create React App](https://github.com/facebook/create-react-app) you can go ahead an use the following command to serve the application

```bach
npm start
```

## Live sample

https://clauber.github.io/product-list

## Requirements

The basic requirements for this application are:

- Small Product Grid with the following columns
  - Title
  - Description
  - Price
  - Quantity
  - Image
- Products should be sortable
- Users should be able to add and edit products
- Application should a fire up with 5 sample entries

## License

[MIT](https://choosealicense.com/licenses/mit/)

repository: Clauber/product-list

repo_name: Clauber/product-list


text:
# Swift_Utilities

Bunch of swift utility files I wrote for practice and for my use.
Project was created with XCode 10.1 and should compile without issue.

A lot of them are similar to the C++ utilities I uploaded.

Documentation : Swift-Utilities.rtf


text:
---
title: Links and URLs
description: How to deal with URLs and hyperlinks.
meta:
  - name: "og:description"
    content: How to deal with URLs and hyperlinks
  - name: keywords
    content: How to deal with URLs and hyperlinks
tags:
  - links
  - email
  - mail
  - url
---

<Header/>

---

## Links

:::warning Info
Check the [Alt Text section](./alt-text.md "Alt text section") for further info on alt text.
:::

With hyperlinks, make sure to write a brief but meaningful link text, using the title or a description of the page.

<!-- markdown-link-check-disable -->

**:thumbsup: Correct**

To see the release notes, please go to the [Release Notes section](https://link.com "Release Notes Section").

**:thumbsdown: Don't use**

To see the release notes, click [here](https://link.com "Release Notes Section").

<!-- markdown-link-check-enable -->

## Email Addresses

When linking to the email address, use the format ***username[at]address.tld*** for the placeholder text to avoid bot detection.

For the link part, use the `mailto:` format and use the "Acmecorp Acmeteam email address" format as alt text.

**:thumbsup: Correct**

Write to<EMAIL_ADDRESS>"Acmecorp Support Team email address") for assistance.

**:thumbsdown: Don't use**

Write to [support<EMAIL_ADDRESS>"Acmecorp Support Team email address") for assistance.

Write to ***support at domain dot tld*** for assistance.

Write to ***support [at] domain . com*** for assistance.

repository: ocular-d/styleguide-editorial

branch_name: refs/heads/main

gha_language: Shell

repo_name: ocular-d/styleguide-editorial


text:
Thanks for your interest in the WorldWide Telescope!

All kinds of contributions, and contributors, are welcomed. The only
requirement is that contributors abide by the letter and the spirit of our
community
[code of conduct](https://github.com/WorldWideTelescope/wwt-home/blob/master/conduct.md),
which essentially states that we should all treat one another with respect.

We aim to drive WWT development using standard open-development techniques
such as public issue tracking and pull requests (PRs). You should be aware,
however, that WWT development has traditionally happened in a more top-down
fashion, and the project processes are still in a state of transition. Please
bear with us as we evolve.

## Issues

Here are some generic tips for how to write a good, actionable issue report:

- Please state clearly what you expected WWT to do, and what happened instead
- Please do your best to provide a simple test case demonstrating your issue
- Please include complete and exact error messages, when appropriate

## Pull Requests

Here are some generic tips for preparing pull requests:

- Please discuss any large undertakings with the developers before spending
  much time on them. The best way to do this is to open an issue in the issue
  tracker.
- Please limit pull requests to one topic at a time. If there are multiple
  issues you'd like to fix, file a separate PR for each one.
- Please keep PRs relatively small in size, so that one person can read and
  review all of the changes in less than about an hour.
- Please break your work into small, focused Git commits whenever possible.
- Please avoid introducing unrelated changes (e.g., whitespace adjustments) in
  your PRs.

## Contact

If you have any questions about the above, please email<EMAIL_ADDRESS>

repository: WorldWideTelescope/buildbox

gha_language: PowerShell

repo_name: WorldWideTelescope/buildbox


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.

### [0.0.4](https://github.com/sammarks/cloudformation-video-thumbnail/compare/v0.0.3...v0.0.4) (2020-02-20)

### Features

* report duration as well ([b501ae4](https://github.com/sammarks/cloudformation-video-thumbnail/commit/b501ae442dbe15b0df72a7976b82e484349fd83a))

### [0.0.3](https://github.com/sammarks/cloudformation-video-thumbnail/compare/v0.0.2...v0.0.3) (2020-02-05)

### Features

* split out the S3 notifications to a topic to allow other listeners ([135df46](https://github.com/sammarks/cloudformation-video-thumbnail/commit/135df468034fe5284f3436c9b844adab9ebe8ded))

### [0.0.2](https://github.com/sammarks/cloudformation-video-thumbnail/compare/v0.0.1...v0.0.2) (2019-12-18)

### Features

* add support for us-east-2 ([cfa8d2c](https://github.com/sammarks/cloudformation-video-thumbnail/commit/cfa8d2c7890cd5d29c27a3d8d3ea60e51366efc9))

### 0.0.1 (2019-12-18)

### Features

* initial release ([bb3cd44](https://github.com/sammarks/cloudformation-video-thumbnail/commit/bb3cd444bb7df8e6e942b9a56037a59d54ab2921))


text:
---
layout: post
title: "Fingerprint Orientation Refinement through Iterative Smoothing"
date: 2017-11-09 00:06:27
categories: arXiv_CV
tags: arXiv_CV
author: Pierluigi Maponi, Riccardo Piergallini, Filippo Santarelli
mathjax: true
---

* content
{:toc}

##### Abstract
We propose a new gradient-based method for the extraction of the orientation field associated to a fingerprint, and a regularisation procedure to improve the orientation field computed from noisy fingerprint images. The regularisation algorithm is based on three new integral operators, introduced and discussed in this paper. A pre-processing technique is also proposed to achieve better performances of the algorithm. The results of a numerical experiment are reported to give an evidence of the efficiency of the proposed algorithm.

##### Abstract (translated by Google)
我们提出了一种新的基于梯度的方法来提取与指纹相关的方向场，以及一个正则化程序来改善从噪声指纹图像计算的方向场。正则化算法是基于三个新的积分算子，本文介绍和讨论。还提出了预处理技术来实现算法的更好的性能。据报道，数值实验的结果证明了该算法的有效性。

##### URL
[https://arxiv.org/abs/1711.03214](https://arxiv.org/abs/1711.03214)

##### PDF
[https://arxiv.org/pdf/1711.03214](https://arxiv.org/pdf/1711.03214)


text:
# ***The XAS Spooling Service***

Store and Forward queuing systems have been around as long as there have been
operating systems. This spooling service is just an iteration of this fundemental
concept.

Spooling is used to decouple the XAS Environmnet from outside resources. This
makes the code simpler and less brittle. It also provides a buffer. All the
local application or service  needs to worry about is writing a spool file.
Eveything else is handled by the spooler.

Creating spool files is built into the system. If you generate an alert, a
spool file is created. If you use JSON logging, a spool file is created, one
per each log entry.

### ***How it works***

The basics of the spooler is to process files in directories and send them to
queues on a message queue server. Pretty basic stuff.

Each directory in the spooler system is associated with a queue on the messsage
queue server. Files placed into these directories are JSON data structures. They
are loaded, and a header is created. The header consists of the local
system name, a UNIX time stamp and the data type that is contained. Which is
also seralized into JSON. These data structures are combined into one JSON blob.
The header is used to help the receiver of this data to determine what to do
with it.

Communications with the message queue server is done with the STOMP protocol. A
STOMP SEND frame is created. It is marked as "presistent" and a "receipt" is
attached. The JSON blob is the message. The receipt consists of an "alias"
and the filename. This "receipt" is then encoded into a base64 string. This
"receipt" is used in the ack. The ack is a STOMP RECEIPT frame. When this is
received, the "receipt" is decoded and parsed to find the filename. At that
point the file is removed from the directory.

This methodology was developed because not all messages queue servers
supported the STOMP transaction feature. Also with the frame marked as
"presistent", it was determined to be as good as writting the blob to
the local file system.

A configuration file is used to define the directories and the location of the
message queue server.

### ***Configuration***

The XAS Configuration sub system consists of sections that contains key/value
pairs. This can be populated from many sources. In this case it is populated
from the familiar Windows .ini style of configuration file. The configuration
file %XAS_ETC%\xas-spoolerd.ini is used for this purpose.

The configuration file contains three stanzas. They are the following:

    [applicaton]
    alerts = true
    facility = systems
    priority = low
    trace = false
    debug = false
    log-type = file
    log-file = %XAS_LOG%\xas-spoolerd.log
    log-conf = %XAS_ETC%\xas-spoolerd.conf

	[message-queue]
    server = %XAS_MQSERVER%
    port = %XAS_MQPORT%
    use-ssl = false
    username = guest
    password = guest
    keepalive = true;
    level = 1.0

	[%XAS_SPOOL%\alerts]
    queue = /queue/alerts
    packet-type = xas-alerts
	alias = unlink

	[%XAS_SPOOL%\logs]
    queue = /queue/logs
    packet-type = xas-logs
	alias = unlink

The %[NAME]% needs to be hardcoded. It doesn't subsitute the environment variable.
But these are the defaults. The "applicaiton" stanza is used to set command line
defaults. This is very usefull for services. The "message-queue" stanza defines
which message queue server to use. The rest are for the directories that are being
used by the spooling system. There can be as many as you need.

repository: klesteb/XAS-csharp

repo_name: klesteb/XAS-csharp


text:
---
title: 'Weekly Links #199'
date: '2020-03-07'
---

**Top 10 Links For 28/2-5/3**

1. [Considerations for Creating a Card Component](https://css-tricks.com/considerations-for-creating-a-card-component/)
   **Chris Coyier**
   Chris discusses implementing a Card component in React. It seems like a simple component to create, but there are a lot of considerations on how to keep it generic and easy to use and maintain.
2.
3. [Rolling code standards](https://bradfrost.com/blog/post/rolling-code-standards/)
   **Brad Frost**
   Brad emphasizes the importance of having documented code guidelines and standards.
4. [Stop using isLoading booleans](https://kentcdodds.com/blog/stop-using-isloading-booleans)
   **Kent C. Dodds**
   kent suggests using enums over booleans for describing the status of your app/component.
5. [Rome, a new JavaScript Toolchain](https://jasonformat.com/rome-javascript-toolchain/)
   **Jason Miller**
   Jason represents [Rome](https://github.com/facebookexperimental/rome), a new library from the creator of Babel and Yarn, which intends to be an all-in-one library that includes all the tools that are needed for JavaScript - compiling, linting, bundling, testing, and more.
6.
7. [3 Rules of React State Management](https://dmitripavlutin.com/react-state-management/)
   **Dmitri Pavlutin**
   Dmitri gives some recommendations for better handling of React state.
8. [How a 2 person startup already uses 28 other tools](https://acrossapp.com/blog/how-a-2-person-startup-already-uses-28-other-tools)
   **Kunal Jasty**
   Kunal mentions a lot of third-party tools that he uses in his small startup.
9. [Refactoring: My 6 favorite patterns](https://brycedooley.com/refactoring-patterns/)
   **Bryce Dooley**
   Bryce outlines some refactoring patterns that are very common in JavaScript applications.
10. [How I set up VSCode for productivity? [Checklist]](https://dev.to/whizzzoe/how-i-set-up-vscode-for-productivity-checklist-omc) and [5 vscode extensions for react developers](https://dev.to/narendersaini32/5-vscode-extensions-for-react-developers-ipk)
    **Zoe Chew** and **Narender Saini**
    Zoe and Narender wrote useful posts about boosting productivity in Visual Studio Code editor. Zoe focuses on configuration and shortcuts while Narender points out some interesting extensions for React development.


text:
---
title: "Splunk App for Stream"
layout: single
permalink: /Resources/Splunk-App-for-Stream
header:
  overlay_color: "#2d3742"
last_modified_at: 2016-03-21T12:00:00-04:00

tags:
  - Presentation
  - PDF
  - Splunk
---
Presentation: Introduction to Spacewalk – Open Source Linux Systems Manager

Casey Pike presented at technical seminar at the [Baltimore Splunk Users Group](https://usergroups.splunk.com/group/baltimore-splunk-user-group.html)

[PDF](/assets/pdf/SplunkStreamDeployment.pdf)


text:
# worldfirstrace

Every few months Blizzard releases a new raid tier for World of Warcraft. Professional raiding guilds race to kill the last boss of the raid and earn a prestigious award: the world first achievement.

[worldfirstrace](https://worldfirstrace.now.sh) provides statistics and historical data on world first races.

## credit

- Information mostly obtained from Method's excelent [raid history website](https://www.method.gg/raid-history)
- Raid thumbnails obtained from World of Wacraft [armory PvE tracker](https://worldofwarcraft.com/en-us/character/ragnaros/g%C3%A4laen/pve/raids)

repository: tmigone/worldfirstrace

repo_name: tmigone/worldfirstrace


text:
---
layout: default
title: Azure Web App Declaration
---

## Azure Web App

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v1.2-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)

You can declare to scrape an Azure Web App via the `WebApp` resource
type.

When using declared resources, the following fields need to be provided:

- `webAppName` - The name of the Azure Web App
- `slotName` - The name of the deployment slot *(optional)*

All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftwebsites-excluding-functions).

The following scraper-specific metric label will be added:

- `slot_name` - Name of the deployment slot. If none is specified, `production` will be used.

Example:

```yaml
name: azure_web_app_requests
description: "Amount of requests for an Azure Web App"
resourceType: WebApp
azureMetricConfiguration:
  metricName: Requests
  aggregation:
    type: Total
resources: # Optional, required when no resource discovery is configured
- webAppName: promitor-web-app
  slot: staging
- webAppName: promitor-web-app
  slot: production
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: web-app-landscape
```

<!-- markdownlint-disable MD033 -->
[← back to metrics declarations](/configuration/v2.x/metrics)<br />
[← back to introduction](/)
<!-- markdownlint-enable -->

repository: fossabot/promitor

repo_name: fossabot/promitor


text:
Node-RED Watson Nodes for IBM Cloud
=====================================

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4f98536040924add9da4ca1deecb72b4)](https://www.codacy.com/app/BetaWorks-NodeRED-Watson/node-red-node-watson?utm_source=github.com&utm_medium=referral&utm_content=watson-developer-cloud/node-red-node-watson&utm_campaign=Badge_Grade)
[![npm-version](https://img.shields.io/npm/v/node-red-node-watson.svg)](https://www.npmjs.com/package/node-red-node-watson)
[![npm-downloads](https://img.shields.io/npm/dm/node-red-node-watson.svg)](https://www.npmjs.com/package/node-red-node-watson)

### New in version 0.5.23
- Allow file name to be configured in Add Document node.

### New in version 0.5.22
- Allow payload as json for Add Document node.

### New in version 0.5.21
- New node for Add Document for Discovery.
- Natural Language Understanding Node fix for credentials check.

### New in version 0.5.20
- Added experimental neural translation as a config option to translation node.

### New in version 0.5.19
- Update Supported audio file check in Speech to Text Node.
- Remove Continuous flag from Speech to Text Node.
- Add Alternatives and Smart Formatting options to Speech to Text Node.

### New in version 0.5.18
- Allow Conversation Workspace Manager node to be dynamically configured.

### New in version 0.5.17
- CRUD methods for Entity Values and Dialog Nodes in Conversation Workspace Manager node.

### New in version 0.5.16
- Implement methods to manage Entities in Conversation workspace Manager node.
- Create Collection Language fix in Discovery Node.
- Similarity Search Nodes moved into deprecated category.

### New in version 0.5.15
- Allow language code to be specified on create collection in Discovery Node.
- Implement delete collection, delete environment in Discovery Node.
- Allow multiple interface versions for Tone Analyzer Node.
- Enable Content, en or fr, in Tone Analyzer Node.

### New in version 0.5.14
- Bump to latest version of watson-developer-cloud node.js sdk
- Allow empty input into converse for Conversation Node
- Endpoint can now be specified in Natural Language Understanding, Discovery and Discover Query Builder Nodes
- Full Promises implementation for on input processing for Natural Language Understanding Node
- Fix to node.error invocation in Conversation node.

### New in version 0.5.13
- Personality Insights on Bluemix needed new path to node_modules

### New in version 0.5.12
- Fix to Personality Insights Node when running in Japanese mode.
- Bump Interface version to Discovery service to '2017-08-01'.
- Japanese supported by Translation service.
- Speech to Text service now reports UK English as 'en-GB'.
- Add button to allow model cache for STT node to be flushed.
- Added more of the supported audio formats for the TTS node.
- Retrieve and Rank node update to return document body.

### New in version 0.5.11
- Add support for NLP Query in Discovery and Discovery Query Builder Nodes.

### New in version 0.5.10
- Allowed detect_mode for Visual Recognition node to be set in msg.params

### New in version 0.5.9
- Text to Speech speech on msg.payload option.
- Speech to Text transcription on msg.payload option
- Endpoint can now be specified in Conversation,
Conversation Workspace Manager Language Identify, Language Translator,
Speech to Text, STT Corpus Builder, Text to Speech, TTS Corpus Builder,
Personality Insights and Tone Analyzer nodes.

### New in version 0.5.8
- Visual Reconition Node, now accepts readstream on msg.payload
- Add passages parameter to Discovery Node

### New in version 0.5.7
- Fix to Tone Analyzer to allow JSON as input
- Enabled Conversation Tone method to Tone Analyzer Node
- Discovery Node now supports: Create Environment, Create Configuration,
Create Collection

### New in version 0.5.6
- User Agent added to following nodes: Conversation, Conversation Workspace Manager,
Discovery, Discovery Query Builder, Document Conversion, Language Translator,
Language Translator Utility, Language Indentify, Natural Language Classifier,
Natural Language Understanding, Personality Insights, Retrieve and Rank,
Similarity Search, Speech to Text, STT Corpus Builder, Text to Speech,
TTS Corpus Builder, Tone Analyzer, Visual Recognition

### New in version 0.5.5
- Discovery Query Builder was not picking up searchable fields.
- Personality Insights Node reset to use '2016-10-20' version
- Natural Language Classifier Node migrated to use url based services utility to detect bound service.
- Natural Language Classifier Node Migrated to use Promises.
- Natural Language Classifier now able to use File Inject as input for create mode.
- Natural Language Classifier Node allows Classifier ID to be set dynamically in classify, list and remove modes.
- Natural Language Understanding Node now allows language and model overrides on
msg.nlu_options.language, msg.nlu_options.entity_model and msg.nlu_options.relations_model.
- Trade-off Analytics Node moved to the deprecated list.
- Migrated Visual Recognition and Visual Recognition Util nodes to use promises, and
ensure that all error responses are reported.

### New in version 0.5.4
- Fix for Service / Name conflicts in Document Conversion Node

### New in version 0.5.3
- Implement methods to manage Counter Examples in
Conversation workspace Manager node.
- Removed V1 Personality Insights node.
- Removed V1 Language Indentification node.
- Removed V1 Language Translation node.
- Removed V1 Language Translation Utility node.

### New in version 0.5.2
- Visual Recognition was overwriting msg.payload with 'look at msg.results'. Fixed
so that msg.payload is left as is.

### New in version 0.5.1
- Implement methods to manage for Intent and Example Input for Intent, in
Conversation workspace Manager node.
- Deprecated Alchemy Nodes.
- Removed Conversation experimental node.
- Removed Discovery experimental node.
- Removed Tone Analyzer beta node.
- Removed Relationship Extraction node.
- Removed the V1 Visual Recognition node.

### New in version 0.5.0
- New node for Natural Language Understanding
- watson-developer-cloud dependency forces node engine >= 4.5
- Nodes deprecated in 0.4.x will be removed in 0.5.x releases

### Watson Nodes for Node-RED
A collection of nodes to interact with the IBM Watson services in [IBM Cloud](http://bluemix.net).

# Nodes

- Concept Insights
    - Use concept graphs to tag and explore information and documents.
- Conversation
    - Add conversational capabilities into applications.
- Date Extraction
    - Uses AlchemyAPI Date Extraction to detect natural language date/time expressions from text
- Dialog
    - Automate branching conversation between a user and your application.
    - Use natural language to automatically respond to user questions, cross-sell and up-sell, walk users through processes or applications, or even hand-hold users through difficult tasks.
- Discovery
    - List environments created for the Discovery service
- Document Conversion
    - Prepare documents for the Retrieve and Rank service.
- Feature Extract
    - Analyse a single piece of text content (either public URL, HTML or raw text)
      to extract multiple AlchemyAPI detected features, e.g. entities, keywords,
      sentiment.
- Image Analysis
    - Upload an image to detect either faces, URL text or
      content present in the image.
- Language Identification
    - Detects the language used in text
- Language Translation
    - Translates text from one language to another
- Natural Language Classifier
    - Uses machine learning algorithms to return the top matching predefined classes for short text inputs.
- Natural Language Understanding
    - Analyze text to extract meta-data from content such as concepts, entities, keywords ...
- News
    - Searches news and blog content
- Personality Insights
    - Use linguistic analytics to infer cognitive and social characteristics from text
- Retrieve and Rank
    - Creates a trainable search engine for your data
- Similarity search
    - Create and search against image collections
- Speech To Text
    - Convert audio containing speech to text
- Text To Speech
    - Convert text to audio speech
- Tone Analyzer
    - Discover, understand, and revise the language tones in text.
- Tradeoff Analytics
    - Optimize decisions balance between multiple conflicting objectives.
- Visual Recognition
    - Analyze visual appearance of images to understand their contents

### Usage
Example usage flows can be found here [node-red-labs](https://github.com/watson-developer-cloud/node-red-labs)

### Contributing

For simple typos and fixes please just raise an issue pointing out our mistakes.
If you need to raise a pull request please read our [contribution guidelines](https://github.com/watson-developer-cloud/node-red-node-watson/blob/master/CONTRIBUTING.md)
before doing so.

### Copyright and license

Copyright 2014, 2016 IBM Corp. under [the Apache 2.0 license](LICENSE).

repository: taijihagino/node-red-node-watson

repo_name: taijihagino/node-red-node-watson


text:
# Java Fetch

Get a website's(URL) source content.

Liberaries:

    java.net.URLConnection;
    java.util.Scanner;
    java.net.URL;

The abstract class URLConnection is the superclass of all classes that represent a communications link between the application and a URL.

Instances of this class can be used both to read from and to write to the resource referenced by the URL.

repository: wadiemendja/java-fetch

repo_name: wadiemendja/java-fetch


text:
# Efficient Python Data Indexing Techniques

I remember seeing that and was interested, as indexing is something that is incredibly important to know. Also, I was a little worried about how nonchalant the `format.py` code was in simply loading the entire json file into memory as is, and loop through (potentially) the entire thing every time a new annotation is loaded.

Not efficient at all.

That's where indexes come in!

This is a little difficult to follow but I'm going to try and spell it out...and actually while I was getting some frozen berries and a tiny but more kr for this last push, I started to be able to visualize and understand what an index does and why it's beneficial.

The term "lookup" does a good job getting part way to a clear and simple explanation of what an index is doing. I say that because, with my current elementary understanding of indexing, the idea is to make each "item" into an index in a separate "table" or dataframe. That index can then be used to look up the corresponding data that "belongs" to that new index (like a row or column in a database table?).

It's difficult to explain in the abstract, and the example here is perfect for understanding the concept - or at least the basics. In this example, we are building an index to make it quicker and easier to look up images by their annotations and by their classes. So, we have three distinct sections of the data we will be traversing in order to match things up.

- images
- annotations
- classes

> The Problem

I have a large COCO annotations file, which is a solid 448mb of minified JSON. The file lays out the annotations for the 1.5 million object instances across 250k images of the MS COCO dataset. This is a perfect example to use in explaining and demonstrating indexing, as it's large enough to see the benefits, yet not so large as to make it inaccessible to anyone with a semi-decent machine at their disposal.

One solution to extracting and transforming the data contained in the file is to simply dump the file into a variable and write a few nested loops and if statements to loop through and extract the needed information. However, this can start to get unwieldy pretty quickly, as every loop could potentially be looping through the _entire_ dataset, _every time_.

Obviously that is not efficient at all, and given a slightly larger dataset—or, say, a large database with several tables of millions of records each—would prove nigh impossible.

Enter, indexing!

```py
class PanCoco:
    ...
    def create_index(self):
        # Create index between images, classes, and annotations
        print("Creating index...")
        annos, cats, imgs = {}, {}, {}
        img_to_annos, class_to_imgs = defaultdict(list), defaultdict(list)
        if "annotations" in self.dataset:
            for anno in self.dataset["annotations"]:
                img_to_annos[anno["image_id"]].append(anno)
                annos[ann["id"]] = anno
```

repository: tobias-fyi/tobiasfyi

gha_language: Python

repo_name: tobias-fyi/tobiasfyi


text:
# teammaker
An application to generate volleyball teams for a group of players.

# How does it work
The app requires list of players. It makes only full teams with 6 players. Extra players (up to 6) are ignored. Example: 5 full teams will be generated from 33 players.

Each player must have known level, position and gender.

The app randomly makes teams and optimizes scoring function. Scoring function is a sum of difference between all team levels.

If the list with players contains mixed genders, then the program will try to balance distribution between male and female players.

# Format of the input file
```
<player-name>, <gender>, <level>, <positions> <EOL>
```
- `player-name` is [aA-zZ ];
- `gender` is either `M` or `F`;
- `level` is an integer number between 1 and 10, 10 is the highest skill level;
- `positions` is a list of positions separated by slash '/'. Possible positions: `mid`, `set`, `dia`, `out`, `libero`, `all`, `any`.

Example of an input file, see `players.example`:
```
player1, F, 3, dia
player2, M, 6, Out
player3, F, 4,  Set
player4, M, 1,  Out/dia
player5, M, 5, mid/Out/Dia
player6, M, 5,  out
player7, F, 3, out/Set
player8, M, 3, mid
player9, M, 10, Mid
player10, F, 4, Set
player11, M, 9,  dia/Out
player12, M, 6,  Mid

```

# Known limitations
1. Only first player positions are taken into account.
2. Each team must include 1 setter, 1 dia, 2 outs, 2 middles. A libero is equal to a middle.
3. Program proposes teams once the better or similar score has been found. It means that it will spam you with many possible teams until stopped.
4. Program does not check if an already found  proposal has been already found before printing it to stdout.
5. If position is `all` or `any`, then this player is added as a middle.

# Building
```
mkdir build
cd build
cmake ..
make
```

# Running
```
cd build
./teammaker ../players.example
```

Possible output:
```
Found better score = 1
team,set,dia,mid,mid,out,out,score,ladies
team1,player3 (F),player11,player8,player5,player7 (F),player2,30,2
team2,player10 (F),player1 (F),player12,player9,player4,player6,29,2
```

repository: sharifmarat/teammaker

repo_name: sharifmarat/teammaker


text:
This hack exploits Pioneer's Telnet capable receivers. So, the first step would be to try to find out the port on which your receiver can create a telnet session.

Use the command
`sudo nmap -n -PN -sT -sU -p- remote_host`
,where `remote_host` is your receiver's IP, to find out your telnet port.

This is by no means a secure solution. So, use it with security in mind.

#Requirements
* A network-enabled Pioneer receiver (tested on VSX-823); add your station as a favorite on your device [this website is your friend](http://pioneer.vtuner.com)
* A home server running [EventGhost](http://www.eventghost.org)
* Access to your home server outside your network (optional); this can be done with port-forwarding and a [dynamic DNS](http://www.noip.com)
* An Android device with [Tasker](http://tasker.dinglisch.net) installed (optional automation)

#Usage
The purpose of this repository is to provide reliable code that can interact with your Pioneer receiver. There are plenty of resources on EventGhost, Tasker, and accessing your host remotely

#Tutorial
* Open up EG and right-click Autostart in your Configuration Tree
* Choose Plugin > Other > Webserver
* Setup webserver on port of your choice and enable that port on your router
* Generate an event by browsing to `http://user:password@serveraddress:port/?EventName` for example: `http://admin:1234@localhost:80/?PioneerON`
	- user, password, and port are setup in eventghost's webserver plugin
	- you will get a 404 when you go to the URLs above but an event is generated regardless
	- you could bind it to a simple html document if you wish. see the webserver plugin support
* You should now see an event logged `HTTP.PioneerON []` in your eventghost log
* Add a new macro (e.g. `Turn Pioneer ON`) by right-clicking your configuration tree and drag the generated event (e.g. `HTTP.PioneerON []`) into it
* Right-click the macro `Turn Pioneer ON` and select "Add Action > EventGhost > Python Script" and paste the code
* Test your macro by right-clicking and selecting "Execute Item"
* Browsing to `http://admin:1234@localhost:80/?PioneerON` will now trigger the macro
* Use an automation application like Tasker, where HTTP Get is supported, to trigger your macro

repository: hkdsun/Pioneer-Autoplay

repo_name: hkdsun/Pioneer-Autoplay


text:
# melodyCI
![](https://img.shields.io/badge/c-melody-purple) ![](https://img.shields.io/github/last-commit/sinkaroid/melodyCI)

```php
$bc = basename(__FILE__);
print "params argument:";
print "/$bc?page={1..99}";
```

- `/$bc?home` main
- `/$bc?page={1..99}` page
- `/$bc?search=$argv[0]` query

## License
[MIT](https://choosealicense.com/licenses/mit/)

repository: slemanboys/melodyCI

repo_name: slemanboys/melodyCI


text:
---
layout: post
title:  "How to Basic Internet Security"
date:
categories: post
slug: how-to-basic-internet-security
author: Adam
description: It's dangerous to go alone!  Here are some basic tips that I've rounded up to help you stay safe on your journeys around the interwebs. Hopefully it will be easy to understand and useful in your travels. Good luck.

I am not endorsed by any of the companies or products I mention in this post, but I do use many of them. Of course, you should always do your own research, and [never believe anything you see on the internet](http://thinkaliker.com/blog/how-to-basic-internet-security#trust-no-one)

## Don't Reuse Passwords

The best advice that anyone can give you is to not reuse passwords.

[Have I Been Pwned?](http://haveibeenpwned.com) and should you trust Troy Hunt?  Logging in to your account on any website? Here's one thing you should do: **look for the green lock icon in your address bar**.

And no matter what the website tells you, being "Norton Certifed Secure" does absolutely nothing to protect you, or your information.

## Adblock

You might think you need adblock so ads don't annoy you, but that's actually a side-effect of it's more important purpose. Ads might be annoying but you see them all the time anyway, on TV, in newspapers, or on billboards. But what those advertisments don't give you is the flu.

A new breed of internet attacks are popping up, and those include malicious code piggybacking on ad networks. Because they're often difficult to detect and in many cases the ad network is not able to remove it in time, "malvertising" can often spread quickly and easily due to the prevalence of ads on every website.

Adblock protects you by blocking most ad networks (and thus removing [mostly] ads as a consequence) to protect you from malicious intent.

## Update, Update, Update

Keep all of your software, phones, devices and web browsers up to date with the latest version. This is really important because of attacks known as "0-day" attacks. This means that at the time it is discovered/disclosed to the public, companies have not yet fixed the problem and so it is "day 0" of it being an issue for everyone involved. As soon as companies patch and fix the issue, they will (usually) push the update out to consumers and it is your duty to keep it up to date.

Naysayers will complain about Windows 10 and all the "spying" that Microsoft does. However, compared to Windows 7, 10 brings a lot of behind-the-scenes security updates and is more secure as a result. People can get really touchy about the subject, so all I will say is you _should_ update to Windows 10, and if you stay on Windows 7 you better hope that January 2020 is far enough away for you not to get hit.

## Avoid Norton

There are lots of variants of antivirus that really don't do...anything.

## Don't Randomly Click

## Avoid Chains

> Bill Gates will give $100 to all the people who forward this email to 10 other people

Sound familiar? No? How about this?

> Due to the fact that Facebook has chosen to involve software that will allow the theft of my personal information, I state: at this date of _insert date here_ response to the new guidelines of Facebook, pursuant to articles _blah blah blah_. I declare that my rights are attached to all my personal data, drawings, paintings, photos, video, texts etc. published on my whatever

Better safe than sorry? **WRONG.**

Not only are these claims [untrue](http://www.snopes.com/computer/facebook/privacy.asp), people who post these without any research into the topic are putting themselves at risk. One of the greatest risks in keeping yourself safe on the internet is not you, but your friends. Assuming, of course, you have already taken proper steps to secure yourself.

What's the best way to break into somewhere? Usually, find the weakest link and break it, yes?

Have you ever received an email claiming that s are in your area? Or you should buy some prescription medication?

## Read This

This entire post was designed to be easy to digest. However, there's a whole world out there on the topics of internet security. A companion article I'd like to recommend to this post is [this article on Decent Security](http://decentsecurity.com/#/how-you-get-infected/). It explains several ways you can get in trouble, and served as an inspiration and a basis for this post.

## Trust No One

Trust no one, not even this post. Congratulations, you made it to the end! But why should you believe anything you see in this post as fact? The answer is that you shouldn't. You should, as a person who uses a device that can access the internet, do your own research. I've done my own research and I figured that the information was valuable enough to provide to everyone, but what if I'm wrong? While there are certainly people who could explain this better or recommend better practices, my word and theirs should not be taken as an end-all statement on how things should be done.

Use some sense, a little bit of instinct, a smidge of intuition, and trust no one.

gha_language: HTML


text:
---
layout: post
title: "Beacons and Programming the City"
date: 2016-05-03 09:42
tags: [designdh, IoT]
categories:
- Readings
...

* Table of Contents
{:toc}

# Readings

Williams, Mita. The City As Classroom vs. The City As Advertising Platform _Medium_<EMAIL_ADDRESS>
# Gear & SDKS

[https://www.facebook.com/business/a/facebook-bluetooth-beacons](https://www.facebook.com/business/a/facebook-bluetooth-beacons)

[https://developers.google.com/beacons/eddystone#full_support_for_eddystone](https://developers.google.com/beacons/eddystone#full_support_for_eddystone)

[https://evothings.com/diy-arduino-beacons/](https://evothings.com/diy-arduino-beacons/)

[http://store.punchthrough.com/collections/all/products/bean](http://store.punchthrough.com/collections/all/products/bean)

[http://librarybox.us/](http://librarybox.us/)

[https://piratebox.cc/](https://piratebox.cc/)

repository: smgprojects/notebook

repo_name: smgprojects/notebook


text:
# An introduction to the CPM

This tutorial provides a brief introduction to the Cellular Potts Model (CPM)
framework. This intro is not specific to Artistoo, but aims to provide a general
overview of how CPMs work and to give you a feel for what the parameters mean.
If you are already familiar with the CPM, this tutorial is probably not for you;
feel free to skip ahead to the more technical tutorials.

## A brief history of the CPM

The first version of a CPM was developed in the early nineties by
François Graner and James Glazier [(1)](#graner-glazier). At the time,
developmental biologists had found that when two different types of embryonic
cells were mixed, they would sort into large, homogeneous same-cell patches -
spontaneously! Experimental studies suggested that this sorting process was
governed by differential adhesion between the cell types.
To understand how this might work, Graner and Glazier wanted to model the
phenomenon and see if they could indeed reproduce sorting based on such
"differential adhesion" alone.

Their model was an extension of the existing *Potts model* [(2)](#basic-potts),
originally developed by physicists to simulate magnetism. The Potts model
simulates the interaction between so-called "spins" on a
crystalline lattice and looks like this:

INSERTFROMFILE 0001

While the Potts model does not much look like a cell, it does have an
interesting property: the "spins" on the lattice *automatically sort* into
large patches of same-spin sites. Graner and Glazier saw this, and realized
that they could apply the same principle to the cell sorting problem - with
some slight modifications.

A problem with the Potts model is that pixels can
only have one of two states, which could be interpreted as one cell and
background. But Graner and Glazier needed to model multiple different cells for
their differential adhesion simulation. Their model replaced the binary "spin"
property with a "cell identity", a number indicating
the cell to which a grid point belonged. (The trick here is that in contrast to
the "spin", the cell identity number could take on more than two
values - allowing the co-existence of multiple cells on the same grid).

A second problem is that the patches formed in the Potts model can be of any
size and shape, unlike cells. Graner and Glazier therefore extended the
energy equations so that "cells" would roughly keep the
same size (number of grid points) [(1](#graner-glazier)[,3)](#cpm-history),
and used this to model their differential adhesion hypothesis.

The result was pretty magical:

INSERTFROMFILE 0002

This was the first "cellular" Potts model, or CPM. After Graner and Glazier
showed how the central energy equation of the Potts model could be extended to
incorporate processes relevant to cells, others quickly followed with their own
variations to the cellular Potts model. In particular, Paulien Hogeweg developed
important extensions to generalize the CPM - which is why it is also
referred to as the Glazier-Graner-Hogeweg (GGH) model [(3)](#cpm-history).

## CPM: basic principle

So how does the CPM work? The basic principle is simple. We model a collection
of *pixels* on a grid, where each pixel belongs to a specific *cell*. We then
let these pixels dynamically change which cell they belong to, according to
a set of *energy rules* that we define (which we will discuss later).

### A note on terminology

At a given point during the simulation, any single pixel always belongs to a
single cell. We save this information in the form of integer numbers indicating
which cell each pixel is currently part of (we call these [cell IDs](
../typedef/index.html#static-typedef-CellId) - Figure 1). Each individual cell
on the grid thus consists of a number of pixels with the same cell ID - which is
unique to that cell. However, some cells may be more similar to each other than
others (for example, we may want to model a tissue of skin keratinocytes with T
cells moving in between). We therefore also define the *types* of cells on the
grid, but we call them by the less conventional term [cell kinds](
../typedef/index.html#static-typedef-CellKind) (Figure 1).
This is to prevent confusion between biologists and general Potts model users,
who classically used the word "type" for what we now call cell ID. We therefore
avoid the word "type" whenever we can and use either cell ID or cell kind instead.

INSERTFROMFILE 0003

### Simulation algorithm

Given a grid where all pixels have some cell ID assigned to them (possibly 0),
we can then perform a simulation as follows (Figure 2):

INSERTFROMFILE 0004

Notice that we here consider a *decrease* in energy to be a "good thing": we
call it energetically favourable. This may feel a little unintuitive, but is
common practice among physicists and chemists. You can think of the internal
energy of a system as the energy it *costs* to keep the system the way it is
now (kind of like how an object you lift up gains *potential energy*; if
it can decrease that energy by falling to the ground, it will). If we consider
the energy $H$ as some kind of energy *cost*, it makes more sense that a
negative ΔH is considered "good".

## The Hamiltonian

Before, we have just assumed that we can calculate this energy $H$
somehow. We will here discuss how we come up with this magical number.

The equation we use to calculate $H$ is called the Hamiltonian. This is no
single Hamiltonian equation; it can contain many different components depending
on what we are trying to model. The CPM is, therefore, not a single model but
rather a model *formalism* in which many different models can be constructed.
This flexibility in designing the Hamiltonian is one of the nice properties of
the CPM: we can model many types of processes by adding the right terms to the
Hamiltonian equation; we just add up all these different energy terms or
*constraints* to get the total $H$ of the system. This section will discuss
some energy terms you may find interesting - but you'll find many more in
literature.

### Adhesion

The most classical component of the Hamiltonian is the *adhesion* equation,
which made up the entire Hamiltonian in the original Potts model of magnetic
spins. Remember that in the Potts model, pixels were either "spin up" ($s = 0$)
or "spin down" ($s = 1$) - similar to a grid with only background (cell ID = 0)
and a single cell (cell ID = 1).

In the original Potts model, adhesion energy was then given by a constant
energy $J$ summed up for every neighboring pixel pair $(i,j)$ with opposite spin
($s_i \neq s_j$) [(1)](#graner-glazier):

INSERTFROMFILE 0005

For their "cellular" Potts model of the differential adhesion hypothesis,
Graner and Glazier could not use this equation. After all, they wanted to model
a system with many cells (=cellIDs) instead of just one. In addition, these
cells had to belong to two different *kinds* of cells - with a differential
adhesion that depended on the kinds of cells interacting. In other words, they
still needed to sum up a surface energy $J$ for all interactions between
neighboring pixels $(i,j)$ with ID$_i$ $\neq$ ID$_j$, but the $amount$ of
energy $J$ should now also depend on the cell kinds $(k_i, k_j)$ of the
interacting cells (rather than being a constant number as before).

This yielded the following equation (Figure 4) [(1)](#graner-glazier):

INSERTFROMFILE 0006

Note that the background ($k=0$) is always a single cell (with $ID = 0$). This
means that $J_{0,0}$ is never used, since we only sum up $J$ for neighboring
pixels with a *different* cell ID. If we then also have only one cell on the
grid (only one non-zero cell ID), this means we also don't use $J_{1,1}$.
We end up with a single $J_{0,1} = J_{1,0} = J$ - the original Potts model
equation (this is what we did to get the Ising model simulation at the top of
this page).

### Volume

A Hamiltonian with an adhesion term alone was not enough to obtain the
Graner-Glazier model of cell sorting. Note that the system moves towards lower
energies by accepting copy attempts with negative Δ$H$. Since the
adhesion term only puts an energy penalty on interactions between *different*
cells, there is a pretty simple solution to get a low energy: just remove
everything from the grid until every pixel has the same cell ID (for example,
the background ID = 0 - in fact, if you watch the simulation at the top of this
page for a while, this is probably what you will see).

To avoid this, Graner and Glazier added an additional term to their cellular
Potts model that constrained the cell's size, or *volume* (where "volume" is
just the number of pixels on the grid belonging to that cell). They used the
following equation [(1)](#graner-glazier):

$$H_\text{volume} = \sum_{\text{cell IDs } n} \lambda_{\text{volume}, k_n}
    (V_n - V_{\text{target}, k_n})^2$$

This equation essentially renders the cells elastic by giving each cell an
energetic penalty if it deviates from some target volume - with the size of
that penalty increasing quadratically with the deviation size (Figure 5).

INSERTFROMFILE 0007

The volume term in combination with the adhesion term is sufficient to
reproduce cell sorting, as Graner and Glazier showed:

INSERTFROMFILE  0002

### Perimeter

A frequently used variation of the [volume constraint](#volume) is the
perimeter constraint, which works in the same way but now makes the cell
boundary elastic (rather than its area, Figure 6). The equation is analogous
to the volume term:

$$H_\text{perimeter} = \sum_{\text{cell IDs } n} \lambda_{\text{perimeter}, k_n}
    (P_n - P_{\text{target}, k_n})^2$$

INSERTFROMFILE 0008

Note that just like the [adhesion term](#adhesion), we count the number of
contacts with neighbor pixels belonging to different cells (different cell ID).
However, whereas the adhesion scales linearly with the number of such contacts
(awarding some constant energy $J$ per contact), we now look at the *deviation*
from a target number of contacts (perimeter) - and this appears in the
Hamiltonian as a squared (rather than linear) term.
While the solution with no cells may still have the lowest energy (the term
sums over cells, so without cells there is no penalty), the system has no way
to achieve that state: to remove all pixels belonging to a cell, that cell first
has to *decrease* its perimeter $P \rightarrow 0$. Any copy attempt that tries
to remove a pixel from a cell with a perimeter that is already too small will
have a very large positive $\Delta H_\text{perimeter}$, and is therefore
unlikely to succeed.

### Cell migration

While the cells we have seen so far have dynamic membranes and float around
to some extent, we cannot yet speak of active motion. Yet many studies have
used CPMs to investigate cell migration. Many extensions to the Hamiltonian
have been developed to simulate different types of cell motion in the CPM,
and we will discuss some options here.

#### Cell-extrinsic forces

The easiest way to make cells move is by letting them respond to some external
attracting force, favouring copy attempts in a given direction. This is
typically done by comparing the direction of the copy attempt (the vector
pointing from the *source* pixel that tries to copy itself, to the *target*
neighbor it tries to copy into) to some preferred reference direction. If these
two vectors are aligned, we assign it a negative $ΔH$ to make this copy
attempt more favourable. If the copy attempt would go in the opposite direction,
it gets a positive $ΔH$ and a lower success chance.

 We use the following Hamiltonian:

$$\Delta H_\text{attractionpoint} = -\lambda_\text{attractionpoint} \cos \alpha$$

where $\alpha$ is the angle between $v_\text{copy}$, the vector from the source
to the target pixel, and $v_\text{attraction}$, the vector from the source
pixel to the attracting point. Since $\cos \alpha$ is 1 when the copy attempt
points towards the attractionpoint and -1 when it points in the opposite
direction, this term favours copy attempts in the direction of the attracting
point. The $\lambda$ scaling factor determines the strength of the force.

Similarly, cells may feel an attraction *field* rather than attraction to a
specific point. In this case, cells are always attracted in the same direction,
regardless of their current location in space. We get the following
Hamiltonian equation:

$$\Delta H_\text{direction} = -\lambda_\text{direction} \vec v_\text{copy}
    \dot \vec{v}_\text{field}$$

where

$$\vec v_\text{copy} \dot \vec{v}_\text{field} = $$

AttractionPointConstraint, PreferredDirectionConstraint, ChemotaxisConstraint

#### Cell-intrinsic mechanisms of motion

ActivityConstraint, PersistenceConstraint

## References

[1]  Graner & Glazier (1992).

        Simulation of biological cell sorting using a two-dimensional extended Potts model.

[2]  Wikipedia.

        The Potts model.

[3]  Glazier, Balter, Poplawski (2007).

        Magnetization to Morphogenesis: a brief history of the
        Glazier-Graner-Hogeweg model.

repository: angelinabudiarto/NaturalComputing-RU

repo_name: angelinabudiarto/NaturalComputing-RU


text:
# Project Test a Perceptual Phenomenon¶

This project uses descriptive statistics and a statistical test to analyze the Stroop effect, a classic result of experimental psychology.

It is part of the Udacity coursework for the Data Analyst Nanodegree program. It covers the unit of Inferential Statistics.

## Getting Started

The only two files are:
- the jupyter notebook, and
- the csv file called from the notebook

## License

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


text:
![TabbyTerminal.sh](logo.jpg)
==================

A small shell script to give you more control over tabs in Terminal.app

Allows you to run a command to open a new tab in your current working directory or a directory you specify. Also allows for passing commands to be run immediately in the new tab.

Installing
----------

To install TabbyTerminal, open a terminal window and run this command:

	curl https://raw.github.com/adammiller/TabbyTerminal/master/install.sh | sh

As always, you should [install_script][review the install] script before you run it.
[install_script]: https://raw.github.com/adammiller/TabbyTerminal/master/install.sh

After you install, the output will prompt you to setup an alias. The rest of these instructions assume you use the `new` alias as suggested in the output. It's totally up to you what command you choose; just substitute your chosen alias for `new` in the usage instructions.

Usage
-----

Tabby Terminal is flexible, and allows you to string on just about any command. If the first argument is a directory, your new terminal tab will start in that directory.

	new [path] [command]

Examples of use
---------------

Run it without any arguments to open a new tab in your current working directory

	new

Run it specifying the directory you'd like your new tab to start in

	new ~/Sites/my-blog

Pass it before a command you'd like to be run immediately in the new tab

	new rails server

Or go for the gusto and pass a directory and a command

	new django_app manage.py activate

License
-------

http://unlicense.org/ - i.e. do what you want with it.

license: Unlicense

repository: adammiller/TabbyTerminal

repo_name: adammiller/TabbyTerminal


text:
# Proteus

The OONI Probe Orchestration System.

This repository contains the various microservices that compose the OONI
Probe Orcehstration System.

**proteus-registry**

Status: BETA

Is responsible for registering probes and keeping tabs on what their related
metadata is.

**proteus-notify**

Status: BETA

Is responsible for dispatching notifications out to OPOS clients depending on
the capabilities they support.

**proteus-frontend**

Status: BETA

Is the frontend to:

* Setup schedules

* View active schedules

* View active probes

**proteus-events**

Status: BETA

Is responsible for receiving events via the admin interface and triggering
notifications via **proteus-notify**.

Can also be used to view the event history.

## Building and releasing

- Make sure the `GOPATH` environment variable is set. (For reference, the setup
  of sbs is `export GOPATH=$HOME` with repositories in `$HOME/src/`; e.g. this
  repository is `$HOME/src/github.com/TheTorProject/proteus`).

- Of course, you also need to have golang installed.

- To build for development, run `make proteus`.

- To create a release, run `make release`.

Checklist before tagging a release:

- Make sure you have updated the changelog

- Make sure you bumped the version number in:

    - `Makefile`

    - `proteus-common/proteus_info.go`

## Notifications specification

A client needs to register to the proteus-registry service.

The canonical address for it shall be `https://registry.XXX.YYY.ZZZ/`. We
also support the cloudfronted domain as following.

### Registration

Upon first running the app the client needs to registry with the notification
service.

Once a client is registered they can update the various metadata related to the probe by means of an update request (detailed in the following section).

To register a probe a the following HTTPS request is issued:

**Method**: `POST`
**Path**: `/api/v1/register`
**Body**:
```json
{
  "probe_cc": "IT",
  "probe_asn": "AS0",
  "platform": "android",
  "software_name": "ooniprobe-android",
  "software_version": "0.1.1",
  "software_language": "IT",
  "supported_tests": ["tcp_connect", "web_connectivity"],
  "network_type": "wifi",
  "available_bandwidth": "100",
  "token": "TOKEN_ID"
}
```

In particular the `token` field represents the Device Token.

The registration service will return a `client_id` to be used to update the Device Token as well as other metadata.

The response looks like this:

```json
{"client_id": "XXX-YYY-ZZZ-TTT"}
```

### Update metadata

In order do update the metadata you to issue the following request:

**Method**: `PUT`
**Path**: `/api/v1/update/$CLIENT_ID`
**Body**:
```json
{
  "probe_cc": "IT",
  "probe_asn": "AS0",
  "platform": "android",
  "software_name": "ooniprobe-android",
  "software_version": "0.1.1",
  "supported_tests": ["tcp_connect", "web_connectivity"],
  "network_type": "wifi",
  "available_bandwidth": "100",
  "token": "NEW_TOKEN_ID"
}
```

The server will respond with:

```json
{"status": "ok"}
```

in case of an error:

```json
{"error": "ERROR_MESSAGE"}
```

### Notifications

A notification includes in the payload of the silent notification a pingback
URL that the client needs to connect to in order to receive the task that it
need to run to perform the actual measurement.

repository: Nucleoos/proteus

repo_name: Nucleoos/proteus


text:
# AudioVisualizer Library
Audiovisualizer library is meant to make it easy to create visual representation of audio.
It works by inserting an effect into the rendering path and performing necessary calculations in real time.
Currently the following data is available:
* [RMS] (https://en.wikipedia.org/wiki/Root_mean_square)
* Peak values
* Spectrum

##Initializing the source
First you need to create the analyzer object, that implements [IVisualizationSource](VisualizationSource.md) interface which is basis to retrieve audio data.

To use visualizations with MediaPlayer or MediaElement you need to use PlaybackSource class. Both MediaPlayer and MediaElement use Media Foundation pipeline to render media. Pipeline will re-create the Media Foundation Tranform object that does the analysis every time you open a new source. That means that the instance of IVisualizationSource will change for every new media that you open in MediaPlayer.

PlaybackSource monitors media pipeline and get's the new visualization when it is created and raises an event. You should use this event to get the new visualization source and set the source for all the visualization controls you have active. This is also a good place to configure the analyzer if you wish - for more on this please see Configuring the Analyzer.
If the player is a global object it is also good idea to set the current visualization source in OnLoad or OnNavigatedTo type of an event/overload.

    partial class VisualizationPage : Page
    {
        MediaPlayer _player;
        AudioVisualizer.PlaybackSource _source;

        public VisualizationPage()
        {
            _player = new MediaPlayer();
            _source = new PlaybackSource(_player);
            _source.SourceChanged += Playback_SourceChanged;
		}

		private void Playback_SourceChanged(object sender, IVisualizationSource source)
        {
            ((ISpectralAnalyzerSettings)source).ConfigureSpectrum(4096, 0.5f);
			vuMeter.Source = source;
			spectrumDisplay.Source = source;
			playPositionDisplay.Source = source;
        }

		private void Page_Loaded(object sender, RoutedEventArgs e)
        {
			vuMeter.Source = _source.VisualizationSource;
			spectrumDisplay.Source = _source.VisualizationSource;
			playPositionDisplay.Source = _source.VisualizationSource;
        }
   }
#Configuring the source
You can configure the analyzer by switching on and off certain data points. Switching them off when not used
will save some CPU resources.
You can also configure the spectrum analyzer by specifying number of FFT elements and also overlap across input data
samples used.

## Getting the data
Once you have a properly initialized [IVisualizationSource](VisualizationSource.md) it is very easy to get the
visualization data by calling GetData(). This method will return [VisualizationDataFrame](VisualizationDataFrame.md)
for the current audio being played or null if the current state of stream is stopped or if the analyzer is catching up processing
for example due to seek operation.


text:
- [BMFont](../BMFont/BMFont.md)
- [Arrange space](../../../Algorithms/Layout,%20pack%20—%20Arrange%20space/Arrange%20space.md)
- [Rendering text](../../../Graphics/Graphics.md#rendering-text)

Tools:

- [libgdx Hiero](https://github.com/libgdx/libgdx/wiki/Hiero)
	* https://github.com/libgdx/libgdx/blob/master/extensions/gdx-tools/src/com/badlogic/gdx/tools/hiero/Hiero.java
- https://github.com/andryblack/fontbuilder
- https://bitbucket.org/mikepote/font-studio
- [bmGlyph - bitmap font generator for Mac OSX](https://www.bmglyph.com/)
- [LMNOpc » Bitmap Font Builder](http://www.lmnopc.com/bitmapfontbuilder/)
- [Codehead’s Bitmap Font Generator](http://www.codehead.co.uk/cbfg/)
- [Xbox LIVE Indie Games - bitmap font maker](http://xbox.create.msdn.com/en-US/education/catalog/utility/bitmap_font_maker)
- [BMFont - AngelCode.com](http://www.angelcode.com/products/bmfont/)
	* [bmfont download | SourceForge.net](https://sourceforge.net/projects/bmfont/)
	* [BMFont OpenGL implementation download | SourceForge.net](https://sourceforge.net/projects/oglbmfont/)
- [Glyph Designer - A Bitmap Font Generator for Mac · 71Squared](https://71squared.com/en/glyphdesigner)
- [Littera — bitmap font generator](http://kvazars.com/littera/)

- https://github.com/Jam3/layout-bmfont-text
- https://github.com/Jam3/three-bmfont-text

Old formats don't support kerning, ligatures, composite chars, etc.

- [Computer font — Wikipedia](https://en.wikipedia.org/wiki/Computer_font#BITMAP)

See also [Signed Distance Field](Signed Distance Field) font, etc.

- [ios - Legality of AngelCode's BMFont - Game Development Stack Exchange](http://gamedev.stackexchange.com/questions/35455/legality-of-angelcodes-bmfont)

repository: mems/calepin

filename: Bitmap font.md

repo_name: mems/calepin


text:
# Developing on codame.com

## Set up workspace

### Installations

1. Download and install NodeJS
2. Download and install MAMP / MAMP Pro
3. Download codame-website repository and `npm install`
4. Install gulp globally by running `npm install gulp -g`
5. Run `gulp` to initialize the site in the `/dist` folder.

### Set up

1. Configure MAMP to serve the dist folder in the codame-website folder.
2. Replace `config/secrets-example.php` with the real secrets file, provided by an existing Codame developer.
3. In secrets.php replace the local URL with the actual URL of your local site

--

Alternatively the site can be run directly with PHP builtin server:
1. Install php on your system (ex: `brew install php` on mac)
2. cd dist
3. `php -S localhost:8000 -n` (-n tells php to not require a php.ini file to work).

### Notes
Recommend using node version under 12 to avoid gulp version conflict.

If you do want to use node version 12 and run into issues, add a `npm-shrinkwrap.json` file to lock the versions of npm dependencies.
See [here](https://timonweb.com/posts/how-to-fix-referenceerror-primordials-is-not-defined-error/) for more details

### Deployment

- All pushes to `master` automatically get deployed to http://dev.codame.com.
- Production pushes are manually triggered when the build on dev looks good.

repository: CODAME/codame-website

gha_language: PHP

repo_name: CODAME/codame-website


text:
# Action Package deployment PowerShell script

# Prerequisites

To begin, you will need:
* A Microsoft 365 subscription
* A team with the users who will be sending Checklists using this app. (You can add and remove team members later!)
* A copy of the Checklist app GitHub repo (ToDo: Add path here)

# Step 1: Create your Checklist app

To create the Teams Checklist app package:
1. Make sure you have cloned (not downloaded) the app repository locally.
1. Navigate to PreCompiledApp folder.
1. Open the actionManifest.json file in a text editor.
1. Change the placeholder fields in the manifest to values appropriate for your organization.
    * packageID - A unique identifier for this app in reverse domain notation. E.g: com.contoso.checklistapp. (Max length: 64)
    * developer.[]()name ([What's this?](https://docs.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema#developer))
    * developer.websiteUrl
    * developer.privacyUrl
    * developer.termsOfUseUrl
1. Zip all the content in the PreCompiledApp folder and name the zip file as "MSTeamsChecklist.zip".

Note: Make sure you do not change to file structure of the PreCompiledApp folder, with no new nested folders.

# Step 2: Deploy app to your organisation

1. Open a Windows PowerShell console on your windows machine.
1. Find PowerShell module named "ActionPackageDeploy.psm1" present in the cloned folder, copy its absolute path and run the following command in the Windows PowerShell console.

    ```
    import-module "<AbsolutePathFor_ActionPackageDeploy.psm1>"
    ```

    This command imports the Functions exported by ActionPackageDeploy.psm1 module which are used in the next steps.

1. Once import is successful, run the below command to deploy the app package to your Microsoft 365 subscription.

    ```
    New-ActionPackage -PackageZipFilePath "<AbsolutePath for MSTeamsChecklist.zip>"
    ```

    In the above command, replace <AbsolutePath for MSTeamsChecklist.zip> with the absolute path for "MSTeamsChecklist.zip" folder created in Step1.

1. An AAD custom app, Bot are programmatically created in your tenant to power the Checklist message extension app in Teams.
1. After successful execution of above command, a Checklist Teams app zip file is generated at `<Home_Directory>\TeamsApp\microsoft-teams-appzip-upload.zip`.

# Step 3: Run the app in Microsoft Teams

If your tenant has sideloading apps enabled, you can install your app by following the instructions [here](https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/apps/apps-upload#load-your-package-into-teams).

You can also upload it to your tenant's app catalog, so that it can be available for everyone in your tenant to install. See [here](https://docs.microsoft.com/en-us/microsoftteams/tenant-apps-catalog-teams).

Upload the generated Checklist Teams app zip file (the `microsoft-teams-appzip-upload.zip` generated in above step) to your channel, chat, or tenant’s app catalog.

# Step 4: Update your Checklist Teams app

If you want to update the existing Checklist Teams app with latest functionality -
1. Make sure you have cloned the latest app repository locally.
1. Open the `actionManifest.json` file in a text editor.
    * Change the placeholder fields (`packageID`, `developer.name`, `developer.websiteUrl`, `developer.privacyUrl`, `developer.termsOfUseUrl`) in the manifest with existing values in your Checklist Teams app.
    * Update the `version` field in the manifest. Make sure latest version number is higher than previous version number.
1. Zip all the content from the unzipped PreCompiledApp folder and name the zip file as "MSTeamsChecklist.zip".
1. Run the following commands to update your Checklist Teams app with the latest bits of code.

    ```
    import-module "<AbsolutePathFor_ActionPackageDeploy.psm1>"
    ```
    Then run following command:

    ```
    Update-ActionPackage -PackageZipFilePath "<AbsolutePathFor_MSTeamsChecklist.zip_CreatedInLastStep>"
    ```
1. Your Checklist app on Teams automatically gets updated to the latest version.

# Troubleshooting

## AccessToken acquisition failed. Acquire token manually.
AccessToken acquisition may fail, if the script is unable to install `MSAL.PS` module on your machine. In that case, you can follow below steps to acquire the token manually and provide it as input parameter to the ```New-ActionPackage``` or ```Update-ActionPackage``` command.

Open following url in browser and login to your AAD account when prompted.

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=token&response_mode=fragment&prompt=select_account&client_id=cac88df7-3599-49cf-9465-867b9eee33cf&redirect_uri=http://localhost:22222/ActionsPlatform&scope=https://actions.office365.com/ActionPackage.ReadWrite.All

After successful login, browser address bar will contain url similar to below screenshot.![](DocResources/TokenAcquisition.png)

Url in your browser address bar has following format:
```
http://localhost:22222/ActionsPlatform#access_token=<ACCESS_TOKEN>&token_type=Bearer&expires_in=3598&scope=https%3a%2f%2factions.office365.com%2fActionPackage.ReadWrite.All&session_state=...
```

Copy the access_token value from this url. Set this string as AccessToken Parameter in
```New-ActionPackage``` or ```Update-ActionPackage``` command.

```
New-ActionPackage
        -PackageZipFilePath "<AbsolutePathFor_MSTeamsChecklist.zip_CreatedInStep1>"
        -AccessToken "<AccessTokenCopiedFromAboveUrl>"
```


text:
# Pictures of quantum circuits
This folder contains images of quantum circuits used in the epositories. The circuits are build using IBM Quantum Experience Circuit Composer. The link is given below.
```
https://quantum-computing.ibm.com/composer/
```

### List of Quantum circuits
```
1. Bernstine-Vazirani Algorithm
2. Out_0 Algorithm
3. Quantum Teleportation Algorithm
```

repository: skushagra/quantum

gha_language: Jupyter Notebook

repo_name: skushagra/quantum