text:
---
layout: post
title: '#DBHangOps 02/05/15 -- MySQL Event Scheduler, InnoDB IO Capacity, and more!'
categories:
- computing
- database
- debugging
- linux
- mysql
tags:
- '#DBHangOps'
- computing
- database
- HangOps
- linux
- mysql
- mysql_planet
status: publish
type: post
published: true
---
\#DBHangOps 02/05/15 -- MySQL Event Scheduler, InnoDB IO Capacity, and more!
=========================================================

Hello everybody!

Join in \#DBHangOps this Thursday, **February, 5, 2015 at 11:00am pacific (18:00 GMT)**, to participate in the discussion about:

* Managing Multiple instance of MySQL
* MySQL Event Scheduler
  * What use cases do you have?
* What is everyone's understanding of *innodb_io_capacity*?
* Percona Live MySQL Conference and Expo 2015
  * What are you excited about?

You can check out the event page at [https://plus.google.com/events/c50qple2vajgq6ltrutk1s3cfss](https://plus.google.com/events/c50qple2vajgq6ltrutk1s3cfss) on Thursday to participate.

As always, you can still watch the [\#DBHangOps twitter search](https://twitter.com/search/realtime?q=%23DBHangOps), the [@DBHangOps](https://twitter.com/dbhangops) twitter feed, or this blog post to get a link for the google hangout on Thursday!

See all of you on Thursday!

You can catch a livestream at:

<iframe width="560" height="315" src="//www.youtube.com/embed/K8sqsLoHZes" frameborder="0" allowfullscreen></iframe>

Show Notes
==========
## Managing Multiple MySQL Instances
* Why?
  * pre-sharded environments for future proofing can share common hardware until they grow out of it
  * allows better utilization of expensive resources. E.g.:
* How?
  * init scripts
      * use mysqld_multi
      * setup multiple sepearate init scripts
  * make sure data directories are all different, etc.
* Better to use virtualization than using multiple instances?
  * If you're worried about the hypervisor, you can look at containerization (e.g. Docker)
* single instnace is preferred because you have better control of the configuration and memory allocation

## `innodb_io_capacity`
* What's it used for?
  * (Jeremy) Last I checked, it's a value used to influence how frequently the innodb engine can flush
  * (Daniel) the old setting used to be 100. When they made it a configurable, the default was 200.
* What is actulaly is!
  * https://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_io_capacity_max
  * Flushing's not a bad description.  InnoDB tries to do a lot of stuff in the background automatically.
  * When you make a modification, it's done in memory and logged in the log file.  Now you have "debt" that you need to get persisted.
  * It's a throttling number to help influence how many IOs innodb can do in the background
      * insert buffer page merges
      * deleting marked records
  * 200 is still the default since it became configurable
    * For good hard drives, they can usually do 200 IOPS so this is reasonable unless you have more IO available (e.g. RAID, SSD, etc.)
  * if it's too high, you do background activity too quick
  * if it's too low, log files accumulate too much debt and adaptive flushing may kick in to protect the durability of log data until the
  * How do you know if you've fallen out of the sweet spot?
    * If you start hitting adaptive flushing, it means you need either a larger log file or to tweak your `innodb_io_capacity`
  * How do folks determine what to set this to in practice?
    * Sysbench to figure out how much work can be done
        * Rough idea based on today's hardware:
            * 15k drives in RAID10 -- 1600 - 2000 IOPS
            * some SSD drives 20k-60k IOPS
        * Set innodb_io_capacity to ~80% of max IOPS
        * You probably need to drive a sysbench benchmark from a different machine so you don't rob it from the server

## MySQL Event Scheduler
* How can it be used?
  * Anything you can do in a stored procedure can be done in an event
  * Any variables you change will probably only last on the session level
  * Doing anything that's purely database is probably good to keep in events because then you can "backup" the maintenance work too (e.g. partition maintenance)
* Do you currently use it? If so, what for?
  * Flushing `query_cache` periodically.
  * For some datasets in partitioned tables, the scheduler could be used to drop the oldest partition automatically
    * Setup a daily, weekly, and monthly event that would validate the partitions and correct them
    * This worked regardless of the operating system (so you don't need to do a crontab).
  * Use to make Pseudo GTIDs to support orchestrator for MySQL 5.5.
* Any Gotchas or problems?
  * Need to remember to dump/restore it and have definer properly defined
  * You can't easily fire an e-mail/alert from events.
    * You can define a UDF to support firing e-mails
    * You could create a table to log the output from stored procedures and such

## Additional Links
* http://databaseblog.myname.nl/2014/11/throttling-mysql-enterprise-backup-with.html
* https://github.com/mysql/mysql-server/blob/5.6/storage/innobase/buf/buf0flu.cc#L2174
* https://github.com/mysql/mysql-server/blob/5.7/storage/innobase/buf/buf0dump.cc#L333
* http://gtowey.blogspot.com/2012/09/how-to-shoot-yourself-in-foot-with.html

extension: markdown


text:
---
layout: sidebar-right
title: "Suffolk children's literacy gets a boost with an increase in Summer Reading Challenge figures"
date: 2019-08-22
author: hannah-foulstone
category: news
excerpt: "Suffolk Libraries' latest statistics have revealed that the number of children taking part in the Summer Reading Challenge this year has surpassed last year's total."
breadcrumb: news
---

Suffolk Libraries' latest statistics have revealed that the number of children taking part in the [Summer Reading Challenge](/src/) this year has surpassed last year's total.

The scheme, which has a theme of Space Chase for 2019, celebrates 50 years since the moon landings and challenges children to read six books over the summer. As of Monday 19 August, 7,451 children had signed up for the challenge, with two weeks of the summer holidays still to go. This is an increase on last year's total of 7,420 sign-ups over the course of the scheme. Children taking part have also read nearly 16,000 books so far.

Krystal Vittles, head of service delivery, said: "The Summer Reading Challenge offers an encouraging way to keep children reading over the summer and have fun doing it. The Space Chase theme has been a huge success with families and this has clearly been reflected in the statistics this year. Don’t forget to keep reading though, the challenge isn’t over yet!"

There's still time to register for and complete the challenge at [your local library](/libraries/), as well as enter our [#SLWhereOnEarth](/news/sl-where-on-earth/) photo competition. If your child is successful in reading six books, they will be invited to a certificate and medal presentation at their library in the autumn.

license: MIT

repository: suffolklibraries/sljekyll

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: suffolklibraries/sljekyll


text:
# sendstorm [archived]

**This repository has been archived; the project is not maintained anymore.**

[![Appveyor build status](https://img.shields.io/appveyor/ci/pcsajtai/sendstorm/master.svg?label=appveyor)](https://ci.appveyor.com/project/pcsajtai/sendstorm/branch/master) [![Travis CI build status](https://img.shields.io/travis/z4kn4fein/sendstorm/master.svg?label=travis-ci)](https://travis-ci.org/z4kn4fein/sendstorm) [![Coverage Status](https://coveralls.io/repos/github/z4kn4fein/sendstorm/badge.svg?branch=master)](https://coveralls.io/github/z4kn4fein/sendstorm?branch=master) [![Join the chat at https://gitter.im/z4kn4fein/sendstorm](https://img.shields.io/badge/gitter-join%20chat-1dce73.svg)](https://gitter.im/z4kn4fein/sendstorm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![NuGet Version](https://buildstats.info/nuget/Sendstorm)](https://www.nuget.org/packages/Sendstorm/)

Sendstorm is a portable pub/sub framework for .NET based solutions.

## Features

 - Subscribe / Broadcast
 - Generic message types
 - Weakly referenced subscribers
 - Subscription filters
 - Execution targets

## Supported platforms

 - .NET 4.5 and above
 - Windows 8/8.1/10
 - Windows Phone Silverlight 8/8.1
 - Windows Phone 8.1
 - Xamarin (Android/iOS/iOS Classic)
 - .NET Standard 1.0/2.0

## Subscribe / Broadcast
When you want to subscribe to an event, you have to implement the `IMessageReceiver` interface in your subscriber class.
```c#
class Foo : IMessageReceiver<FooMessage>
{
    public void Receive(FooMessage message)
    {
        //do something with the message
    }
}
```
Then you can subscribe your class as a listener to that specific event.
```c#
var messagePublisher = new MessagePublisher();
var foo = new Foo();
messagePublisher.Subscribe<FooMessage>(foo);
```
Now you can broadcast messages to your subscribers.
```c#
messagePublisher.Broadcast<FooMessage>(new FooMessage());
```
You are also able to unsubscribe if you don't want to receive messages anymore.
```c#
messagePublisher.UnSubscribe<FooMessage>(foo);
```
## Filters
If you want to receive the messages conditionally you can specify a filter for your subscription which's parameter will be the message object.
```c#
messagePublisher.Subscribe<FooMessage>(new Foo(), fooMessage => false);
```
> This sample above will completely prevent the `Foo` object from recieving any `FooMessage`, in a real scenario here you can check against some properties of the message object, or the state of your subscriber class.

## Execution target
You can also specify where you want to delegate your messages.
```c#
messagePublisher.Subscribe<FooMessage>(new Foo(), fooMessage => false, ExecutionTarget.BackgroundThread);
```
Available options are:

 - *BroadcastThread* (it'll delegate the receive call to the thread from where the broadcast was called)
 - *BackgroundThread* (it'll create a task and will let the ThreadPool schedule the execution of the receive call)
 - *Synchronized* (it'll delegate the receive call to the captured `SynchronizationContext`)

> The Synchronized option only works when the `MessagePublisher` is able to collect a valid `SynchronizationContext` object for delegating calls via it's `SynchronizationContext.Current` static property. To achieve this you have to instantiate it on a thread where the `Current` property is properly set.

gha_language: C#


text:
# open-rinnai-server

Rannai is a well-known boiler company in South Korea and one of the features that Rinnai offers is remote control from your personal devices, in short, the IoT service. However there is no guarantee that Rannai will continue to support and update their IoT service of the boilers they sold, or security incident will happen. To avoid these concerns, this repo allows you to run it on your own local network and emulates their main server for not using their app, but through RESTful APIs or home assistant this repo provides.

## How to use it
* `npm run build`
* `node app`

If you have a local network DNS server, set `wifiboilers1.rinnai.co.kr` to point open-rinnai-server.

If your home network router is Linux-based, `iptables -t nat -A PREROUTING -s <ROOM CONTROLLER IP> -p tcp --dport 9105 -j DNAT --to-destination <open-rinnai-server IP>`

Default port
* Boiler Control Port 9105
* RESTful API port 8081

Warning! Do not expose these ports publicly without any authentication.

## DISCLAIMER
This repo is mainly tested on Rinnai WF-S100. I am not responsible for any incidents or, explosions might happen by using this repo.


text:
# Lecture 9. Templates.

## 5.11 Abstact classes. Pure virtual functions.

Pure virtual functions are used when general implementation can't be created, but each derived class must provide an implementation of the function.

Usage:

```cpp
struct S {
	virtual double area() = 0;
}
```

Abstract class contains at least one pure virtual function.

Abstract class objects are not allowed.

## 5.12 Problems with virtual functions.

### Problem of calling virtual function in constructors.

```cpp
struct Base {
	Base() {
		f();
	}
	virtual void f() {
		std::cout << 1;
	}

	// if function is pure virtual, it produces an runtime error:
	// "pure virtual function call"
	// virtual void f() = 0;
};

struct Derived: Base {
	Derived(): Base() {}
	void f() override {
		std::cout << 2;
	}
};

// Code prints "1", because when Base constructor is called
// Derived object is not even initialized: no point to call overriden function.
```

### Problem with default arguments in virtual functions.

```cpp
struct Base {
	Base() { }
	virtual void f(int x = 1) { }
};

struct Derived: Base {
	Derived(): Base() {}
	void f(int x = 2) override { }
};

int main() {
	Derived d;
	Base& b = d;
	b.f(); // This calls Derived function according to vtable
	// But arguments are taken from the Base class function at the compile time.
	// That was unpredictable
}
```

# Unit 6. Templates.

## 6.1 Idea.

Templates use typenames as metavariables. Implementation of one function/class/etc can be used for all suitable classes.

It helps not to duplicate code.

**Compiler does not cast types to fit into template args**.

- Function templates
```cpp
// preferable
template<typename T1, typename T2>
/// or (maybe used)
// template<class T1, class T2>
void f (T1 a, T2 b) {
	// Function f is called with a wrong template args.
	// if T1 or T2 doesn't have size method -- CE.
	a.size();
}
```
- Typedef templates (since cpp11). (Aliases)
```cpp
template<typename T>
using mi<T> = map<int, T>
```

- Variables templates
```cpp
template<class T>
constexpr T pi = T(3.1415926535897932385L);
```

Specification - template with given arguments.

Instantiation - generation of the particaular specification.

Static polymorphism - compile time using templates

Dynamic polymorphism - runtime using vtable

Note: Splitting definition and declaration with templates:

```cpp
template<typename T>
class C {
	template<typename U>
	void f(U x);
}

template<typename T>
template<typename U>
void C<T>::f(U x) {

}
```

## 6.2 Template functions overloading

```cpp
void f(int, int) {
	cout << 1;
}

template <typename T>
void f(T, T) {
	cout << 2;
}

template <typename U, typename V>
void f(U, V) {
	cout << 3;
}

// f(5, 5) is f(int, int)
// f(0.1, 0.0) is f(T, T)
// f(5, 0.1) if f(U, V)

// if there is no third overload
// f(5, 0.1) is f(int, int). (casted)
```

Euristics:
- If it fits perfect - it is chosen.
- More specialized (less template args) - the better.

Note: specialized arguments:
```cpp
template<typename T>
void f(const T&) {

}
```

Note: default template arguments.
```cpp
template<typename T=int>
```
Note: Smart typename guess (since cpp17)
```cpp
vector v = {1, 2, 3}
```

Note: absorption of copy constructor by universal constructor.
```cpp
template<typename T>
class C {
	template<typename U>
	C(U& x) { }
	// this can be used only with a special cast (for perfect fit)
	C(const C& x) {}
}
```

license: Unlicense

repository: aalekseevx/mipt-cpp-conspects

path: /1st semester. Autumn 2019/09_templates.md

repo_name: aalekseevx/mipt-cpp-conspects


text:
---
toc: false
layout: post
comments: true
description:
categories: [philosophical, for-future-me, personal, responsibility]
title: Positive effects of doing hard things
last_modified_at: 2021-08-01T20:42:15.663278
permalink: /tough/
hide: true
---

I used to love Deep Learning and wanted it to be my career option.

I learned it for many about 2 years. After work, sitting for an hour or two. There were often weeks when I understood nothing. I was early in my career then and things would likely be different of I try things out now.

Though I never used Deep Learning as a job, there are a few skills I learned that have persisted.
- Watching Videos at 2x Speed
- Understanding many technological field
- Grasping hard technological concepts much faster
- Pushing through a mental limit break

There is immense upside to doing hard things even if they are not directly use.

Indirectly doing hard things changes us for the better.

repository: ankschoubey/blog

gha_language: HTML

repo_name: ankschoubey/blog


text:
# Networks & Integer Programming

## [Problem 1 - Networks & Shortest Path](./problem_1.m)

**Problem Statement:**
Suppose you need to write a routing algorithm for a communications network that will route traffic through an
internetwork of networks (Ni) at the lowest possible cost. Your manager wants to know the least cost path between
Source (So) and Sink (Si). Consider a communications network that is characterized by the following link costs.

			Link	 Cost ($/Tb)	 Link	 Cost ($/Tb)
			Link	 Cost ($/Tb)

			So-N1	 60	 N2-N4	 20	 N5-N4	 10

			So-N2	 30	 N2-N5	 70	 N3 -Si	 20

			N1-N2	 10	 N3-N4	 10	 N4-Si	 50

			N2-N1	 10	 N4-N3	 20	 N5-Si	 30

			N1-N3	 50	 N4-N5	 20

---

**MATLAB Code:** [problem_1.m](./problem_1.m)

Author: Yash Bansod
Date: 19th February, 2020
Problem 1 - Networks & Shortest Path

GitHub: https://github.com/YashBansod

### Clear the environment and the command line

```matlab
clear;
clc;
close all;
```

### Define the graph

```matlab
% Specify the node names
n_names = {'So', 'N1', 'N2', 'N3', 'N4', 'N5', 'Si'};

% Specify the edges and thier costs
e_start = [1 1 2 3 2 3 3 4 5 5 6 4 5 6];
e_stop  = [2 3 3 2 4 5 6 5 4 6 5 7 7 7];
e_cost  = [6 3 1 1 5 2 7 1 2 2 1 2 5 3] * 10;
% e_cost  = [60 30 10 10 50 20 70 10 20 20 10 20 50 30];

% Some dimension checks to make sure values were inputted correctly
assert(size(e_start, 2) == size(e_stop, 2));
assert(size(e_start, 2) == size(e_cost, 2));

% Create the graph
graph = digraph(e_start, e_stop, e_cost, n_names);
```

### Plotting the graph to visualize it better

```matlab
figure('Name', 'Problem graph')
p_g_plot = plot(graph, ...
    'EdgeLabel', graph.Edges.Weight, ...
    'LineWidth', 4 * graph.Edges.Weight / max(graph.Edges.Weight), ...
    'ArrowSize', 15);
title('Graph representing nodes and link cost')
xlabel('X Axis')
ylabel('Y Axis')
```

### Calculate and plot the shortest path

```matlab
[shortest_path, path_len] = shortestpath(graph, 'So', 'Si');
figure('Name', 'Shortest Path - Graph')
s_g_plot = plot(graph, ...
    'EdgeLabel', graph.Edges.Weight, ...
    'LineWidth', 4 * graph.Edges.Weight / max(graph.Edges.Weight), ...
    'ArrowSize', 15);
highlight(s_g_plot, shortest_path, 'MarkerSize', 6, ...
    'NodeColor', 'r', 'EdgeColor', 'g');
title(sprintf('Graph representing shortest path between %s and %s', ...
    'So', 'Si'))
xlabel('X Axis')
ylabel('Y Axis')
```

### Print the computation results

```matlab
disp(strcat(sprintf('Shortest path sequence: %s', shortest_path{1}), ...
    sprintf(' -> %s', shortest_path{2:end})))
fprintf('Shortest path cost: %d $/Tb\n', path_len
```
Shortest path sequence: So -> N2 -> N4 -> N3 -> Si
Shortest path cost: 90 $/Tb

---

## [Problem 2 - Transshipment/Production Problem](./problem_2.m)

**Problem Statement:**

Suppose that you have two plants that manufacture drones, one in Chicago and one in Dallas. Suppose the Chicago plant can produce a maximum of 100 drones per week and the Dallas Plant can produce 200 drones/week. Suppose there are two major markets you serve, one in LA and the other in Baltimore. Suppose that the demand for drones in LA is 120 and the demand in Baltimore is 160 (drones per week).

Suppose there are the following per drone costs associated with shipping drones from one city to another (assume costs are symmetric (i.e. Cost i→j = Cost j→i):

			 	 To

			From	 Los Angeles (LA)	 Seattle (SA)	 Chicago (CH)	 Dallas (DA)	 Philadelphia (PH)	 Baltimore (BA)

			LA	 -	 $90	 $150	 $100	 $200	 $250

			Seattle (SA)	  	 -	 $100	 $120	 $180	 $240

			Chicago (CH)	  	  	 -	 $50	 $120	 $140

			Dallas (DA)	  	  	  	 -	 $100	 $150

			Philadelphia (PH)	  	  	  	  	 -	 $30

			Baltimore (BA)	  	  	  	  	  	 -

**Standard Form Representation:**

Let X_B^A  represent the number of drones shipped (per week) from city A to city B.

Let C_B^A  represent the minimum cost of shipping a drone (single unit) from city A to city B.

Let Z represent the total cost of shipping incurred.

Then the objective function is the following:

min Z(X_LA^CH, X_BA^CH, X_LA^DA, X_BA^DA) = X_LA^CH\*C_LA^CH + X_BA^CH\*C_BA^CH + X_LA^DA \*C_LA^DA + X_BA^DA\*C_BA^DA

Such that:

X_LA^CH + X_BA^CH ≤ 100

X_LA^DA + X_BA^DA ≤ 200

X_LA^CH + X_LA^DA = 120

X_BA^CH + X_BA^DA = 160

X_B^A ∈ Z(0,+), A ∈ {CH, DA}, B ∈ {LA, BA}

---

**MATLAB Code:** [problem_2.m](./problem_2.m)

Author: Yash Bansod
Date: 19th February, 2020
Problem 2 - Transshipment/Production Problem

GitHub: https://github.com/YashBansod

### Clear the environment and the command line

```matlab
clear;
clc;
close all;
```

### Define the graph

```matlab
% Specify the node names
n_names = {'LA', 'SE', 'CH', 'DA', 'PH', 'BA'};

% Specify the edges and thier costs
e_start = [ 1 1 1 1 1;
            2 2 2 2 2;
            3 3 3 3 3;
            4 4 4 4 4;
            5 5 5 5 5;
            6 6 6 6 6]';
e_start = e_start(:)';

e_stop  = [ 2 3 4 5 6;
            1 3 4 5 6;
            1 2 4 5 6;
            1 2 3 5 6;
            1 2 3 4 6;
            1 2 3 4 5]';
e_stop = e_stop(:)';

e_cost  = [ 90 150 100 200 250;
            90 100 120 180 240;
            150 100 50 120 140;
            100 120 50 100 150;
            200 180 120 100 30;
            250 240 140 150 30]';
e_cost = e_cost(:)';

% Some dimension checks to make sure values were inputted correctly
assert(size(e_start, 2) == size(e_stop, 2));
assert(size(e_start, 2) == size(e_cost, 2));

% Create the graph
graph = digraph(e_start, e_stop, e_cost, n_names);
```

### Plotting the graph to visualize it better

```matlab
figure('Name', 'Shortest Path - Graph')
g_plot = plot(graph, ...
    'EdgeLabel', graph.Edges.Weight, ...
    'LineWidth', 4 * graph.Edges.Weight / max(graph.Edges.Weight), ...
    'ArrowSize', 15);
title('Graph representing cities and the paths between them')
xlabel('X Axis')
ylabel('Y Axis')
```

### Calculate the least cost paths from production plants to markets

```matlab
[shortest_path_ch_la, cost_ch_la] = shortestpath(graph, 'CH', 'LA');
[shortest_path_ch_ba, cost_ch_ba] = shortestpath(graph, 'CH', 'BA');
[shortest_path_da_la, cost_da_la] = shortestpath(graph, 'DA', 'LA');
[shortest_path_da_ba, cost_da_ba] = shortestpath(graph, 'DA', 'BA');
```

### Define the optimization problem

```matlab
f = [cost_ch_la cost_ch_ba cost_da_la cost_da_ba];

A = [1 1 0 0; 0 0 1 1];
B = [100; 200];

Aeq = [1 0 1 0; 0 1 0 1];
Beq = [120; 160];

lb = zeros(4, 1);
ub = inf(4, 1);
```

### Find the solution

```matlab
% Compute the solution using linear programming
[X, fval] = intlinprog(f, [1 2 3 4], A, B, Aeq, Beq, lb, ub);
```
LP:                Optimal objective value is 33600.000000.

### Print the computation results

```matlab
% print out the least cost paths obtained using graph search
disp('Let C_A_B represent least cost path from city A to city B.')
fprintf([ 'Least cost of paths: \nC_CH_LA = %.2f' ...
    '\nC_CH_BA = %.2f \nC_DA_LA = %.2f \nC_DA_BA = %.2f\n\n'], f)

% print out the solution obtained using integer programming
disp('Let X_A_B represent number of drones shipped from city A to city B.')
fprintf([ 'Solution using integer programming: \nX_CH_LA = %d' ...
    '\nX_CH_BA = %d \nX_DA_LA = %d \nX_DA_BA = %d\n\n'], X)
fprintf('Cost of Shipment: %.2f dollars/week\n', fval)
```
Let C_A_B represent least cost path from city A to city B.
Least cost of paths:
C_CH_LA = 150.00
C_CH_BA = 140.00
C_DA_LA = 100.00
C_DA_BA = 130.00

Let X_A_B represent number of drones shipped from city A to city B.
Solution using integer programming:
X_CH_LA = 0
X_CH_BA = 80
X_DA_LA = 120
X_DA_BA = 80

Cost of Shipment: 33600.00 dollars/week

---

## [Problem 3 - Critical Path Method](./problem_3.m)

**Problem Statement:**

Consider a Project that is characterized by the following activity edge table. The table indicates: 1) the activity names; 2) the associated event node names (numbers); 3) the  duration times (in days) for each activity; and 4) the hourly labor costs for each activity. Assume two people are required to complete each task and that each works 8 hours a day.

			 Activity 	 Nodes 	 Duration Est (days) 	 Labor Cost ($/h)

			A	1, 2	6	$120

			B	1, 3	4	$120

			C	2, 4	3	$120

			D	3, 4	9	$120

			F	3, 5	10	$120

			I	3, 6	15	$120

			J	4, 7	9	$100

			K	5, 7	2	$100

			L	6, 8	3	$100

			M	7, 9	15	$100

			N	8, 9	9	$100

---

**MATLAB Code:** [problem_3.m](./problem_3.m)

Author: Yash Bansod
Date: 19th February, 2020
Problem 3 - Critical Path Method

GitHub: https://github.com/YashBansod

### Clear the environment and the command line

```matlab
clear;
clc;
close all;
```

### Define the graph

```matlab
% Specify the node names
n_names = {'N1', 'N2', 'N3', 'N4', 'N5', 'N6', 'N7', 'N8', 'N9'};
num_nodes = size(n_names, 2);

% Specify the edges and thier costs
e_start = [1 1 2 3 3 3 4 5 6 7 8];
e_stop  = [2 3 4 4 5 6 7 7 8 9 9];
e_cost  = [6 4.33 3.33 9 10 15.83 8.83 2 3.33 15 8.83];

% Some dimension checks to make sure values were inputted correctly
assert(size(e_start, 2) == size(e_stop, 2));
assert(size(e_start, 2) == size(e_cost, 2));

% Create the graph
graph = digraph(e_start, e_stop, e_cost, n_names);
```

### Plotting the graph to visualize it better

```matlab
figure('Name', 'Problem graph')
p_g_plot = plot(graph, ...
    'EdgeLabel', graph.Edges.Weight, ...
    'LineWidth', 4 * graph.Edges.Weight / max(graph.Edges.Weight), ...
    'ArrowSize', 15);
title('Graph representing nodes and mean activity duration')
xlabel('X Axis')
ylabel('Y Axis')
```

### Calculate the longest path

```matlab
% Create a matrix that stores the longest known path from the node marked
% by index to the end.
max_len = zeros(1, num_nodes);
% Create a matrix that indicates nodes that follow a node on critical path
follow_node = zeros(1, num_nodes);

% distance/cost matrix of going from (row) node i to (column) node j
dist_mat = -inf(num_nodes);
for index = 1:size(e_start, 2)
    dist_mat(e_start(index), e_stop(index)) = e_cost(index);
end

% Simplified Bellman-Ford Algorithm
% Longest known path from node n-1 to n is the edge from n-1 to n
max_len(num_nodes - 1) = dist_mat(num_nodes - 1, num_nodes);

% Working back from node n-2 to compute longest path from node i to end
for i_ind = num_nodes-2:-1:1
    for j_ind = i_ind+1:num_nodes

        % If longest path length from node j to end + path length from node
        % i to j is greater than longest known path from node i to end then
        if max_len(j_ind) + dist_mat(i_ind, j_ind) > max_len(i_ind)

            % longest path length from node i to end equals the longest
            % path length from node j to end + path length from node i to j
            max_len(i_ind) = max_len(j_ind) + dist_mat(i_ind, j_ind);
            % node i is followed by node j in the longest known path
            follow_node(i_ind) = j_ind;
       end
    end
end

% Calculate the Critical Path
critical_path = zeros(1, num_nodes);
critical_path(1) = 1;   % Start node always lies on the critical path

for path_ctr = 2:1:num_nodes
    critical_path(path_ctr) = follow_node(critical_path(path_ctr -1));
    if critical_path(path_ctr) == 0
        critical_path(path_ctr) = num_nodes;
    end
end
critical_path = n_names(unique(critical_path));
```

### Plotting the critical path

```matlab
figure('Name', 'Critical Path - Graph')
l_g_plot = plot(graph, ...
    'EdgeLabel', graph.Edges.Weight, ...
    'LineWidth', 4 * graph.Edges.Weight / max(graph.Edges.Weight), ...
    'ArrowSize', 15);
title('Graph representing the Critical Path')
xlabel('X Axis')
ylabel('Y Axis')
highlight(l_g_plot, critical_path, 'MarkerSize', 6, ...
    'NodeColor', 'r', 'EdgeColor', 'g');
```

### Print the computation results

```matlab
disp(strcat(sprintf('Critical path: %s', critical_path{1}), ...
    sprintf(' -> %s', critical_path{2:end})))
fprintf('Longest path == Mean project duration: %.2f days\n\n', max_len(1))
```
Critical path: N1 -> N3 -> N4 -> N7 -> N9
Longest path == Mean project duration: 37.16 days

### Calculate the shortest path

```matlab
[shortest_path, path_len] = shortestpath(graph, 'N1', 'N9');
```

### Print the computation results

```matlab
disp(strcat(sprintf('Shortest path sequence: %s', shortest_path{1}), ...
    sprintf(' -> %s', shortest_path{2:end})))
fprintf('Shortest path cost: %.2f days\n', path_len)
```
Shortest path sequence: N1 -> N3 -> N5 -> N7 -> N9
Shortest path cost: 31.33 days

---

## [Problem 4 - Transshipment Problem](./problem_4.m)

The case of a company that produces a product at two plants (P1 and P2) and has two warehouses (WH1 and WH2). They produce the product, and send it to a warehouse, from which the product is then distributed to three retail outlets (RO1, RO2, & RO3). Each truck is capable of shipping “standard truck load” (i.e. ‘unit’) of product. Each plant has a different maximum output and each retail outlet has a different demand (see tables below). There is a maximum number of units that may be shipped from each plant to each warehouse and from each warehouse to each retail outlet and a different cost associated with each such link (see tables below). **The company wants to develop a distribution plan that will minimize shipping costs**.

			Plant to Warehouse (WH)

			Plant	 Unit Ship Cost	 Shipping Capacity (Units)	 Max Output

			WH1	 WH2	 WH1	 WH2

			P1	 $425	 $560	 125	 150	 200

			P2	 $510	 $600	 175	 200	 300

			Warehouse to Retail Outlet (RO)

			Warehouse	 Unit Ship Cost	 Shipping Capacity (Units)

			RO1	 RO2	 RO3	 RO1	 RO2	 RO3

			WH1	 $470	 $505	 $490	 100	 150	 100

			WH2	 $390	 $410	 $440	 125	 150	 75

			 	  RO1 	  RO2 	  RO3

			 Demand (Units) 	 100	 150	 100

---

**MATLAB Code:** [problem_4.m](./problem_4.m)

Author: Yash Bansod
Date: 11th March, 2020
Problem 4 - Transshipment Problem

GitHub: https://github.com/YashBansod

### Clear the environment and the command line

```matlab
clear;
clc;
close all;
```

### Define the graph

```matlab
% Specify the node names
n_names = {'P1', 'P2', 'WH1', 'WH2', 'RO1', 'RO2', 'RO3'};
num_nodes = size(n_names, 2);

% Specify the edges and thier costs
e_start = [1 1 2 2 3 3 3 4 4 4];
e_stop  = [3 4 3 4 5 6 7 5 6 7];
e_cost  = [425 560 510 600 470 505 490 390 410 440];

% Some dimension checks to make sure values were inputted correctly
assert(size(e_start, 2) == size(e_stop, 2));
assert(size(e_start, 2) == size(e_cost, 2));

% Create the graph
graph = digraph(e_start, e_stop, e_cost, n_names);
```

### Plotting the graph to visualize it better

```matlab
figure('Name', 'Problem graph')
p_g_plot = plot(graph, ...
    'EdgeLabel', graph.Edges.Weight, ...
    'LineWidth', 4 * graph.Edges.Weight / max(graph.Edges.Weight), ...
    'ArrowSize', 15);
title('Graph representing nodes and shipping costs')
xlabel('X Axis')
ylabel('Y Axis')
```

### Define the optimization problem

```matlab
f = e_cost;

A = [   1 1 0 0 0 0 0 0 0 0;
        0 0 1 1 0 0 0 0 0 0];

B = [200; 300];

Aeq = [ 0 0 0 0 1 0 0 1 0 0;
        0 0 0 0 0 1 0 0 1 0;
        0 0 0 0 0 0 1 0 0 1;
        1 0 1 0 -1 -1 -1 0 0 0;
        0 1 0 1 0 0 0 -1 -1 -1];

Beq = [100; 150; 100; 0; 0];

lb = zeros(10, 1);
ub = [125; 150; 175; 200; 100; 150; 100; 125; 150; 75];
```

### Find the solution

```matlab
% Compute the solution using linear programming
[X, fval] = intlinprog(f, 1:10, A, B, Aeq, Beq, lb, ub);
```
LP:                Optimal objective value is<PHONE_NUMBER>00.

### Print the computation results

```matlab
% print out the solution obtained using integer programming
fprintf('Cost of Shipment: %d dollars\n\n', fval)
disp("Units Shipped [From->To:Number]");
% Optimal Plan
for index = 1:size(e_start, 2)
    print_str = strcat(n_names{e_start(index)}, '->', ...
        n_names{e_stop(index)}, ': ', int2str(X(index)));
    fprintf('[%s]\n', print_str);
end
```
Cost of Shipment: 335875 dollars

Units Shipped [From->To:Number]
[P1->WH1:125]
[P1->WH2:75]
[P2->WH1:75]
[P2->WH2:75]
[WH1->RO1:100]
[WH1->RO2:0]
[WH1->RO3:100]
[WH2->RO1:0]
[WH2->RO2:150]
[WH2->RO3:0]

repository: MeseretA/Operations-Research

repo_name: MeseretA/Operations-Research


text:
# Strigula elegans var. antillarum (Fée) R. Sant. VARIETY

#### Status
SYNONYM

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

#### Published in
in Thorold, J. Ecol. 40(1): 128 (1952)

#### Original name
Melanophthalmum antillarum Fée

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Eurotiomycetes/Strigulaceae/Strigula/Strigula antillarum/ Syn. Strigula elegans antillarum/README.md

repo_name: mdoering/backbone


text:
# OpenCost Committers and Maintainers

Official list of OpenCost Committers and Maintainers. This is managed as documented in the [GOVERNANCE.md](GOVERNANCE.md).

## Committers

| Committer | GitHub ID | Affiliation | Email |
| --------------- | --------- | ----------- | ----------- |

## Maintainers

| Maintainer | GitHub ID | Affiliation | Email |
| --------------- | --------- | ----------- | ----------- |
| Ajay Tripathy | @AjayTripathy | Kubecost |<EMAIL_ADDRESS>|
| Matt Bolt | @mbolt35 | Kubecost |<EMAIL_ADDRESS>|
| Matt Ray | @mattray | Kubecost |<EMAIL_ADDRESS>|
| Michael Dresser | @michaelmdresser | Kubecost |<EMAIL_ADDRESS>|
| Niko Kovacevic | @nikovacevic | Kubecost |<EMAIL_ADDRESS>|
| Sean Holcomb | @Sean-Holcomb | Kubecost |<EMAIL_ADDRESS>|
| Thomas Evans | @teevans | Kubecost |<EMAIL_ADDRESS>|

repository: opencost/opencost

branch_name: refs/heads/develop

gha_language: Go

repo_name: opencost/opencost


text:
# Arthothelium taediosoides Giralt & Grube SPECIES

#### Status
ACCEPTED

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

#### Published in
in Grube & Giralt, Lichenologist 28(1): 30 (1996)

#### Original name
Arthothelium taediosoides Giralt & Grube

### Remarks
null


text:
---
title: India
description: Travelogue from India (New Delhi and Agra).
image: blog/india/cover.jpg
category: "Travel Photography"
tags: [india, travel, new delhi, street, taj mahal, agra, urban]
featured_image: "/images/blog/india/cover.jpg"
gallery: true
toc: true
excerpt: At the beginning of September I spent some ten days in New Delhi, India.
  Primarily the reason for the trip was to attend VLDB 2016;
  in addition, as usual, whenever I could I went to explore and learn more about the local culture and life.
  It was my first time in India and the whole experience was, not counting the super hot weather,
  very exciting and fun!
---

  Jump to...

Getting around

Old Delhi

Train

      Agra

Agra Fort

Taj Mahal

At the beginning of September I spent some ten days in New Delhi, India.
Primarily the reason for the trip was to attend [VLDB 2016](http://vldb2016.persistent.com/);
in addition, as usual, whenever I could I went to explore and learn more about the local culture and life.
It was my first time in India and the whole experience was, not counting the super hot weather,
very exciting and fun!

I had no idea what to expect for India to be like. The picture painted in my head wasn't particularly pretty.
To illustrate what I mean, just read this actually
[dead-serious account](https://markmanson.net/a-dust-over-india) of some guy's trip to India.. it's ugly.
Well, I'm happy to say that at least in my *limited* experience, it's all quite exaggerated.
Life is definitely different than in the typical places I've been to in Europe, America, Australia and Asia. Some parts
along the railway seemed familiar, reminding me of the Gypsy communities I grew up next to in my hometown; incidentally,
I just [learned](http://www.khaleejtimes.com/international/india/can-romas-be-part-of-indian-diaspora)
that the International Roma Conference recommended the Government of India this year to recognize the
Roma people around the world as Indian diaspora.

Mostly I was just worried of being fooled in some way, online at least it seemed like there is a never-ending list of
a million different types of scam stories. Well nothing ever happened, so I'm one happy tourist. People seemed
mostly genuinely honest and helpful, while I was constantly on guard because of the above stories..
but I relaxed progressively over the days as it all became more and more familiar.

I tried to gather related photos in a few short stories / albums, scroll on to check them out :-)

{%- include render-image.html type='f' image='coverl.jpg' %}

## Getting around

Learning how to get around in India is probably on of the biggest hurdles for a tourist, especially
one like me that doesn't like guides and organized tours much. The several options I took:

- Walk: it was very interesting the first few times, but you quickly realize it's impractical for anything
  more than a few hundred of meters. It's hot, walk for more than 10 minutes and you are covered in sweat..
  it becomes exhausting pretty quickly. Depending on where you are, the road can be very dusty. And often you have
  no clue which way to go.

- Taxi: I took a taxi only twice, transferring from/to the airport.

- Metro: in New Delhi there's a pretty good metro. Getting "tokens" for it is unintuitive and annoying, but
  eventually you figure it out and it works fine. Airport-style security checks whenever you go in the station.

- Tuk-tuk, auto rickshaw: these guys are the kings for short, few-km travels (although I've even
  taken them for 10km+ rides). They are absolutely everywhere, even at 3AM. It's totally unclear how the
  pricing works, but eventually you learn to approximate and haggle for a reasonable amount. The most
  memorable ride was from a train station to the nearest metro station (approx 10km) in the evening:
  the standard tuk-tuk has been obviously modified with a more powerful engine and the guy was proudly
  speeding past other tuk-tuks and even cars on the streets of New Delhi; almost the equivalent of a
  roller-coaster, except much less controlled :-)

{%- assign tmpimages = '01,02,03' | split: ',' %}
{%- include create-gallery.html images=tmpimages %}

## Old Delhi

This is the heart of metropolitan Delhi. Originally it was the capital of the Mughals with a seat at the Red Fort;
nowadays it seems to be really crowded with bustling markets along the narrow streets for anything imaginable,
from flowers to goat brains. One of the largest mosques in India, Jama Masjid, is also here.

{%- assign tmpimages = '09,10,11,12,13,14,15,16,17,18,19,20,21,08' | split: ',' %}
{%- include create-gallery.html images=tmpimages %}

## Train

It wouldn't be a proper visit to New Delhi without seeing the Taj Mahal, which is in
Agra, 200km Southeast-ish. I decided to go by train, which eventually proved quite
challenging.

Forget about just going to the train station and buying a ticket: this is impossible for
mere tourist mortals I guess. There's absolutely no information about
which train goes where at the train station itself that I could find. Unless you figure this
out beforehand online, you will go nowhere. Moreover, the departure displays seem to be often
out of sync and outright wrong.

As with anything in India, there's a learning curve.. and eventually when you figure out the
rules, it seems to work. The trains are ok, and people are nice, chatty and ever curious. It was
just incredibly hot in the most basic non-AC class that I took, a proper three hour sauna torture
for only 170 rupees :-) Thinking about it, some extensive sauna training before you visit
India in / around summer would probably be very beneficial preparation.

{%- assign tmpimages = '05,26,07,06,22,27,24,25,28,29' | split: ',' %}
{%- include create-gallery.html images=tmpimages %}

## Agra

In Agra I arranged with the tuk-tuk guy that took me from the train station to the hotel
to give me a tour around in the morning. The hotel had a good view on Taj Mahal and
Agra, which got pretty amazing around the sunset. Ali, the nice tuk-tuk guide picked me up at 6AM
in the morning, taking me to the garden behind the Taj Mahal, a smaller tomb place,
and finally the Red Fort, which along with the Taj Mahal are the most famous places in Agra.

{%- assign tmpimages = '30,31,32,33,34,35,36,41,37,38' | split: ',' %}
{%- include create-gallery.html images=tmpimages %}

### Agra Fort

{%- assign tmpimages = '42,44,45,46,48,49,47,50' | split: ',' %}
{%- include create-gallery.html images=tmpimages %}

### Taj Mahal

Taj Mahal is one of the most impressive places I've visited. It definitely satisfied all
the appetite for symmetry and balance I've ever had! :-)

{%- assign tmpimages = '39,40,51,52,54,53,55,56,' | split: ',' %}
{%- include create-gallery.html images=tmpimages %}


text:
# spp

Wraps the [`spp`](http://compbio.med.harvard.edu/Supplements/ChIP-seq/) peak-caller.

This is a rather complicated wrapper. See input and output sections below for
details.

## Examples

Minimal usage:

```python
rule spp:
    input:
      ip="ip.bam",
      control="control.bam",
      chromsizes='dm6.chromsizes'
    output: "peaks.bed"
    wrapper:
        'file://path/to/wrapper'
```

Specify parameters (see below for options):

```python
rule spp:
    input:
      ip="ip.bam",
      control="control.bam",
      chromsizes='dm6.chromsizes'
    output: "peaks.bed"
    params: block={'fdr': 0.1}

    wrapper:
        'file://path/to/wrapper'
```

Specify additional output files:

```python
rule spp:
    input:
        ip="ip.bam",
        control="control.bam",
        chromsizes='dm6.chromsizes'
    output:
        bed="peaks.bed"
        enrichment_estimates="enrichment_est.bedgraph",
        smoothed_enrichment_mle="enrichment_mle.bedgraph",
        rdata="image.RData"
    params: block={'fdr': 0.1}
    log: "spp.log"
```

The works, with multiple replicate BAMs to be merged, keeping the tempfiles,
increasing the memory available to MarkDuplicates, all the output files,
adjusting spp params, and using 8 threads for merging and duplicates removal:

```python
rule spp:
    input:
        ip=["ip.bam", "ip2.bam"],
        control=["control.bam", "control2.bam", "control3.bam"],
        chromsizes='dm6.chromsizes'
    output:
        bed="peaks.bed"
        enrichment_estimates="enrichment_est.bedgraph",
        smoothed_enrichment_mle="enrichment_mle.bedgraph",
        rdata="image.RData"
    log: 'spp.log'
    threads: 8
    params:
        block={'fdr': 0.1, 'bins': 10},
        java_args='-Xmx64g'
        keep_tempfiles=True
    log: "spp.log"
```

## Input

`ip`, `control`: BAM files. Duplicates should already be removed.

`chromsizes`: Chromsizes table, used to ensure peak boundaries do not extend
outside of chromosome limits.

SPP itself only supports a single BAM file for IP and a single BAM file for
control.  However, to support the common case of pooling replicates to gain
coverage, this wrapper does handle multiple BAMs.

If more than one BAM is provided for either IP or control, the BAMs are merged
and then duplicates are removed from the merged file (to handle reads that
occur  in both replicates, which would otherwise cause spp to complain) are
then removed using MarkDuplicates. This merged, deduped BAM is then provided to
SPP.

The merged BAM, merged-and-deduped BAM, and metrics file (from MarkDuplicates)
are created as temp files. The temp filenames are indicated in the log. If you
need these for debugging, set `params: keep_tempfiles=True` to keep them.

## Output

The only required output is `bed`. Others, if specified, will trigger their
respective creation.

`bed`: narrowPeak format.

`smoothed_enrichment_mle`: BEDGRAPH file (even though SPP calls it a "WIG") of
smoothed enrichment using the `smoothed.enrichment.mle` method from SPP.
Optional, if not specified it will not be created.

`enrichment_estimates`: BEDGRAPH file (even though SPP calls it a "WIG") of
enrichment estimates using the `get.conservative.fold.enrichment.profile`
function from SPP. Optional, if not specified will not be created.

`rdata`: Saves an image of the workspace. Handy for debugging. Optional, if not
specified will not be created.

An R script named after the BED file (`{snakemake.output.bed}.R`), will be
written to the output directory. This can be run from the same directory as the
snakefile was run from for debugging purposes.

## Threads
We do not run SPP in parallel mode due to trouble with running the `snow`
library on clusters (it seems to crash unexpectedly and intermittently).
However, for multiple BAMs, we pass the threads to samtools and MarkDuplicates.

## Params

### wrapper params

`keep_tempfiles`: bool; if True then tempfiles created by merging and deduping
replicate BAMs will be retained for debugging purposes.

`java_args`: str; additional args provided to picard, e.g., `java_args="-Xmx64g"`

### spp params

Since SPP doesn't have a command-line interface, we can't use the "extras="
mechanism to pass params verbatim. Instead, the R script created by the wrapper
supports the following parameters, provided as keys to the `block` param to
make it easier to work with the chipseq config format. For example:

```python
params:
    block={'bins': 5, 'fdr': 0.1},
    java_args='-Xmx64g'
```

`srange`: tuple; controls the range of lags over which to calculate
cross-correlation. Default is `(50, 500)`

`bins`: integer; controls how the binding characteristics will be binned. Default
is `5`.

`tecfilter`: bool; passed to `find.binding.positions` function. Default is True;
set to False to prevent the exclusion of large regions with higher input than
expected.

`remove_anomalies`: bool; enable/disable the remove.tag.anomalies step. Defualt
is False (do not remove anomalies). Setting to True can increase the time
dramatically.

`fdr`: float; false discovery rate when calling peaks. Default is `0.05`.

`whs`: int. window half-size. Used if the auto-calculated
`binding.characteristics` is NA. Default is `500`.

`zthr`: float. Z threshold used when adding broad regions. Default is `3`.

`bandwidth`: int. Bandwith for smoothing WIG file. Default is `200`.

`step`: int; step size for smoothing WIG file. Default is `100`.

repository: lcdb/lcdb-wf

gha_language: Python

repo_name: lcdb/lcdb-wf


text:
xkcd2webapp
===========

Downloads XKCD comics and saves them as an offline webapp.
It was tested on a Firefox OS phone.

## How to use

Simply run `./update.sh` whenever you want to update the app. The resulting
webapp will be in the `output` folder and in the `xkcd-archive.zip` file.

## Attribution

It uses the XKCD downloader here : https://github.com/hseg/XKCD-Downloader/
which was inspired by: [Fanfiction Downloader](http://fanfictionloader.appspot.com/)

Of course, you can always read the original comics
by Randall Munroe here : https://xkcd.com/


text:
---
layout: post
title: "NumtaDB - Assembled Bengali Handwritten Digits"
date: 2018-06-06 23:02:06
categories: arXiv_CV
tags: arXiv_CV Salient Recognition
author: Samiul Alam, Tahsin Reasat, Rashed Mohammad Doha, Ahmed Imtiaz Humayun
mathjax: true
---

* content
{:toc}

##### Abstract
To benchmark Bengali digit recognition algorithms, a large publicly available dataset is required which is free from biases originating from geographical location, gender, and age. With this aim in mind, NumtaDB, a dataset consisting of more than 85,000 images of hand-written Bengali digits, has been assembled. This paper documents the collection and curation process of numerals along with the salient statistics of the dataset.

##### Abstract (translated by Google)
为了对孟加拉数字识别算法进行基准测试，需要一个大型公开可用的数据集，该数据集不受源自地理位置，性别和年龄的偏差的影响。考虑到这一目标，NumtaDB是一个由超过85,000个手写孟加拉数字图像组成的数据集，已经组装完毕。本文记录了数字的收集和处理过程以及数据集的显着统计数据。

##### URL
[http://arxiv.org/abs/1806.02452](http://arxiv.org/abs/1806.02452)

##### PDF
[http://arxiv.org/pdf/1806.02452](http://arxiv.org/pdf/1806.02452)


text:
# Prefer Proven FOSS Components with Optional Support for Licensed Derivatives

* Status: accepted
* Deciders: @k2merlinsix, @jam01
* Date: 2020-08

## Context and Problem Statement

Should we include licensed or non-FOSS components in the Tavros platform for a given component or component's feature?

## Decision Drivers <!-- optional -->

* Total cost of ownership
* Providing the necessary features for a competitive product

## Decision Outcome

We will prioritize FOSS components, while providing optional support for paid or licensed derivatives, e.g.: Elastic Stack Open Source vs Enterprise subscription, Apache Camel vs JBoss Fuse, etc.

Ultimately total cost of ownership will be the deciding factor for our customers when comparing to established alternatives. There are many FOSS components that address different concerns that we can incorporate and still provide a best-in-class platform.

### Negative Consequences <!-- optional -->

* High number of components to configure and integrate

repository: serghey-rodin/tavros

branch_name: refs/heads/main

repo_name: serghey-rodin/tavros


text:
### [CVE-2007-2900](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-2900)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Multiple PHP remote file inclusion vulnerabilities in Scallywag 2005-04-25 allow remote attackers to execute arbitrary PHP code via a URL in the path parameter to template.php in (1) skin/dark/, (2) skin/gold/, or (3) skin/original/.

### POC

#### Reference
- https://www.exploit-db.com/exploits/3972

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_license_id: MIT

repo_name: trickest/cve


text:
---
title: DOMContentLoaded Inconsistencies (in Browsers and JavaScript Libraries)
author: Zach Leatherman
layout: post
smalltitle: true
tags:
  - highlight
  - research
  - popular-posts-total
postRankTotalViews: 17
---

**Quick Summary**

*   *Prototype and Dojo are the only major JavaScript frameworks that correctly time the DOMContentLoaded inside of an iframe in Internet Explorer. MooTools comes close and both YUI and jQuery both exhibit incorrect behavior.*
*   *Usually, browsers that have a native DOMContentLoaded event will fire it after both JavaScript and CSS (external script, link tags) have loaded. But Opera fires prior to CSS link tags loading.*

We all know the problem, but we may not all call it the same thing. Every popular JavaScript library has its own name for the DOMContentLoaded event.

JavaScript Library
Event Name

YUI
DOMReady

jQuery
ready

MooTools
domready

Prototype
dom:loaded

Dojo
addOnLoad

But the naming scheme isn’t the only part about this event that’s inconsistent. There are a few hacks strewn around the net that have been bastardized (read: modified to the will of library authors) into each individual framework. These have been posted time and time again, but for post completeness are the following:

IE DOMContentLoaded Hack
Description

doScroll by Diego Perini
Uses a doScroll method call, which will throw an error if the ondocumentready event hasn’t fired on the primary document (take note of the usage of the word primary).  Once doScroll doesn’t throw an error, it is assumed the DOM has loaded.

onreadystatechange and readyState
onreadystatechange “fires when the state of the object has changed,” and changes the readyState property of the object through the following states (not all apply to every type of element): uninitialized, loading, loaded, interactive, and complete.  (source: MSDN) Usually set on the document object, or a script element (as used in the Script Defer method described next.

Script Defer by Dean Edwards
document.write’s a script tag with a defer attribute.  Defer will cause the browser to delay execution of the script until the DOM has successfully loaded (using onreadystatechange on the script tag until its readyState is “complete”).  Without defer, the browser would execute any script tag immediately.

HTC Behavior by Dean Edwards
Much less popular approach using proprietary HTC Behavior files.  Generally avoided due to the addition of an extra HTTP request to the page in order to download the external .htc file.  As a side note, if using this approach, the "oncontentready" event will work better than the “ondocumentready” event used by Mr. Edwards.

Ghetto Method
Of course, the easiest way to do it is to put a script tag right above your ending </body> tag that triggers the event manually.  This really only works if you have full control of the content, and isn’t really a library solution.  Worth noting though.

[![Benchmark for Library DOMContentLoaded Implementations][benchmarkimg]][benchmark]

[*Benchmark for Library DOMContentLoaded Implementations*][benchmark]

 [benchmark]: http://zachleat.com/Projects/domcontentloaded/
 [benchmarkimg]: /web/wp-content/uploads/2008/12/domcontentloaded.png

I created a benchmark trying to answer the simple question: when does the DOMContentLoaded event fire? Each implementation has different effects, especially in iframes and with stylesheets.

## What Works

The Internet Explorer hacks presented above are reliable when used on a standalone document (not inside of an iframe).

Mozilla Firefox, Safari, Chrome, and Opera all contain a native DOMContentLoaded event that each framework uses to consistently fire at the correct time. So, it isn’t even worth summarizing the results for tests in every browser with a native DOMContentLoaded event, except Opera. Opera took a different design approach with their DOMContentLoaded event (certainly not wrong, just different), which we’ll analyze below.

### Internet Explorer inside an Iframe

*All libraries below did no branching based on IE versions, all used the same method for IE6, IE7, or IE8. I performed no tests in IE8, however.*

JavaScript Library
Method
Waited for:

<body> <script>
<head> <script>
<link> CSS
<img>

YUI 2.6.0
doScroll, setTimeout
Incorrect: Fires almost immediately (~20ms)

jQuery 1.2.6
window onload
X
X
X
X

Prototype <IP_ADDRESS>
Script Defer
X
X
X

MooTools 1.2.1
doScroll and set innerHTML, setTimeout
*
X
X

Dojo 1.2.0
Script Defer
X
X
X

IEContentLoaded
doScroll, document.onreadystatechange
Incorrect: JavaScript error.

addDOMLoadEvent
Script Defer
X
X
X

* *For some reason, not only did the MooTools library not wait for the body script to trigger DOMContentLoaded, the body script never executed at all.*

 [10]: http://javascript.nwbox.com/IEContentLoaded/
 [11]: http://www.thefutureoftheweb.com/blog/adddomloadevent

The **most important takeaway** from this blog post are the successful methods of faking DOMContentLoaded in Internet Explorer. The obvious **library winners here are Prototype and Dojo**, with the addDOMLoadEvent script also exhibiting correct behavior. MooTools is a close runner up, and I would be interested to find out why it didn’t execute the body script (that’s left for another day, or perhaps a generous commenter).

### Opera 9.6

JavaScript Library
Method
Waited for:

<body> <script>
<head> <script>
<link> CSS
<img>

YUI 2.6.0
Native DOMContentLoaded
X
X

jQuery 1.2.6
Native DOMContentLoaded + Code to wait for Stylesheets
X
X
X

Prototype <IP_ADDRESS>
Native DOMContentLoaded
X
X

MooTools 1.2.1
Native DOMContentLoaded
X
X

Dojo 1.2.0
Native DOMContentLoaded
X
X

IEContentLoaded
N/A to Opera
X
X
X

addDOMLoadEvent
Native DOMContentLoaded
X
X

As you can see above, **Opera typically will fire DOMContentLoaded prior to stylesheets loading** successfully (ignoring the jQuery specific code to provide consistency cross-browser)

*Thanks to [Adam Koch][12] for first pointing me in the direction of jQuery in an iframe ignoring DOMContentLoaded in IE.*

 [12]: http://www.adamkoch.com/

**Update:** There is an open ticket for [YUI on Sourceforge][13], and I’ve opened a ticket for [jQuery on their Trac site][14].

 [13]: http://sourceforge.net/tracker/index.php?func=detail&aid=2008289&group_id=165715&atid=836476
 [14]: http://dev.jquery.com/ticket/3693


text:
# Exercise 22.8

This project is the solution to Exercise 22.8

## Example Output

![Sample Output](README.jpg)

## Analysis Steps

The exercise was to create a program that finds all prime numbers between 0 and 1,000,000.

### Design

The conditions of program were:

1. The program must store the prime numbers in a binary data file, named PrimeNumbers.dat
2. To determine if a number is prime, the program should load the prime numbers from the file to an array of the long type with a size of 10000. If no number is a divisor for the new prime number, continue to read the next 10000 prime numbers until a divisor is found or the file is read in full.

If the program is to scrutinize the prime numbers in the file for a divisor up to 1,000,000, then the prime number already exists in the file. This seemed to be a paradoxical requirement, so I created a method to generate prime numbers up to 1,000,000, write it to a file, then read it from the file and provide output.

### Testing

Does the program compile?

```
Pass
```

Does the program generate prime numbers?

```
Pass
```

Does the program write to the file?

```
Pass
```

Does the program print out the proper number of prime values added after writing to file?

```
Pass
```

Does the program read from the file?

```
Pass
```

Does the program print out the proper number of prime values added after reading from the file?

```
Pass
```

## Notes

Explain any issues or testing instructions.

## Do not change content below this line
## Adapted from a README Built With

* [Dropwizard](http://www.dropwizard.io/1.0.2/docs/) - The web framework used
* [Maven](https://maven.apache.org/) - Dependency Management
* [ROME](https://rometools.github.io/rome/) - Used to generate RSS Feeds

## Contributing

Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).

## Authors

* **Billie Thompson** - *Initial work* - [PurpleBooth](https://github.com/PurpleBooth)

See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.

## License

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

## Acknowledgments

* Hat tip to anyone who's code was used
* Inspiration
* etc


text:
Use like so...

```html
<img src = "images/world-placeholder.jpg" class="foo" id="bar" alt=""
data-src = "<400:images/world-small.jpg,
            <800:images/world-medium.jpg,
            <1200:images/world-large.jpg,
            <1600:images/world-huge.jpg,
            >1600:images/world-massive.jpg" />
```

specify as few or as many breakpoints as you wish

placeholder images are optional, chose one with dimensions ~ 1024x768px, size ~ 20kb

[DEMO](https://rawgit.com/Paul-Browne/ResImg.js/master/demo.html)


text:
---
layout: post
title: Dealing with Information Overload
---

How can we deal with information overload?

Focus on the context that information is being given in.

Ask yourself:
* How valid are the beliefs being presented?
* Is there an agenda behind this information?
* Is this information stale or out of date?
* How does this relate to other information I have?
* What assumptions am I or others making? Are they valid?


text:
---
banner: Information Booth | UNF | 218d
title: Frequently Asked Questions
---

## Table of Contents

## Preamble

Compiled here is a list of frequently asked questions observed from the Discord
or other sources (Twitter, Reddit, video comment threads etc). If you believe a
key question is missing then please feel free to suggest it. A lot of the
questions were also answered in this article:
[DDFAQs](/articles/2020/03/22/ddfaq).

## What are the different Doomsday decks and what is the difference between them?

There are considered to be 4 primary distinct variants of Doomsday available for
play. These comprise of **Doomsday**, **DDFT**, **Entombsday** and **DDEFT**.

:::row{variant=CENTERED}
FoW
ToA
Griselbrand
EF
:::

**Doomsday** is the primary deck variant that is having previously unprecedented
success since the printing of :card[TO]. Legacy Doomsday uses countermagic like
Force of Will and discard like Duress to play a controlling game before ending
the game. Initially called _Meandeck_ Doomsday, the moniker _Meandeck_ is
explained in this article [here](/articles/2020/03/12/pretty-mean-deck).

**DDFT** (Doomsday Fetchland Tendrils) is the closest to historical lists.
Although it adopts the current usage of Thassa's Oracle these decks tend to also
have access to secondary Storm plans using cards like :card[BW], :card[EoE] and
:card[ToA]. They also prefer proactive protection like discard over being able
to run reactive countermagic.

**Entombsday** is a Tin Fins variant with a main deck plan focusing on
reanimating Griselbrand using either :card[Shallow Grave] or :card[Goryo's
Vengeance] to then have it attack alongside :card[Em] or looping the deck to
generate infinite mana and hard cast Emrakul or cast Collective Brutality an
infinite number of times. The key point to focus on is it runs a dedicated
transformational sideboard into a variant of Doomsday.

**DDEFT** (Doomsday Experimental Frenzy Tendrils) is now an outdated style. This
was the main variant available post :card[Gitaxian Probe] ban and pre-printing
of Thassa's Oracle. These lists use Experimental Frenzy as a card advantage
engine and win condition in tandem with Doomsday.

## What is the _best_ Doomsday archetype? Of that archetype what are the _best_ colours to run?

Doomsday has the most proven results of the archetypes listed above with
performances that outnumbers TCDeck numbers of the previous 10 years preceeding
it for all archetypes (excluding 5-0 publications).

Within Doomsday there is no definitive _best_ colour configuration to run.
Success has been had with straight {U}{B}, {U}{B}{W}, {U}{B}{R}, {U}{B}{G} and
even {U}{B}{R}{G} across the years with most decks having an almost entirely
{U}{B} main deck configuration. The tools that are effective and provided by
each colour depend on the meta at the time and the pilot's preferences in deck
building.

## What list should I start on? What is the _best_ list to play?

If you want a proven and effective updated list, head to the [Doomsday
Discord][discord] server and check out the `#decklists-archive` channel.
Successful lists and placements are posted there regularly to ensure new
technology and strategy are communicated out. There is no defined _best_ list so
just go with the lists that seem to be most prevalent as those are likely to be
considered _best_ at the time.

## Is there a list of common Doomsday piles? What is the most common pile I should learn?

Historically there was a spreadsheet that had an ever-growing list of
pre-prescribed piles based on certain criterias but this was for the old DDFT
decks pre :card[Sensei's Divining Top] ban. A current one is not maintained for
a couple of reasons: the biggest being that trying to rote learn piles is
actually not effective training. It is better to learn the general rule sets or
toolboxes you have at your disposal and then try to build on the fly using your
knowledge, experience and general critical thinking than it is to try and
remember "If I have {B}{B}{B}+{U}{U}{U}+{1}+SW in hand then I can win through
:card[Thalia, Guardian of Thraben] in play".

This Wiki aims to try and provide the general concepts and basic level knowledge
needed to pilot the deck. Select your variant of choice and work through the
chapters under that variant which should provide the simplest pile examples to
give an idea of how to play. The majority of piles become variants of those
discussed but you will, over time, learn to build more situational ones as you
gain experience.

## What is the best matchup for the deck?

Cloudpost.

In the current Legacy meta the best matchups to face are probably Miracles
variants, non-blue decks and TES. These decks often do not provide much pressure
and have limited interaction once Doomsday resolves. We also have a lot of
interaction which means they tend to not have enough disruption to be able to
stop us.

Death and Taxes, Maverick and Post are good examples of the easier matchups with
limited interaction. Still, they can display threats in the form of hatebears
for the 2 formers or larger, game-ending threats for the latter. But often they
are too slow or get answered easily by Daze. For the green matchups,
:card[Endurance] requires preparation and proper sequencing but is far from
being as back-breaking as it is often thought. More details about this in the
[interaction page](/meandeck/interaction#cheating-on-devotion).

TES cannot beat the sheer amount of disruption the deck brings to the table nor
interact with the fast combo kill besides :card[Silence] effects as the Doomsday
pilot unravel their pile. That weakness can be mitigated but often means that
while the TES pilot tries to disrupt our combo turn, they aren't progressing
their own plan as much.

These are likely the most favourable matchups (part based on gut feel and part
based on community-obtained results found [here][data:matchups]).

## What is the worst matchup for the deck?

Delver. Delver. Definitely Delver. Also Death Shadow decks.

Basically any aggressive tempo shell running cheap threats and mana efficient
disruption. UR Delver is the most played deck in Legacy and the deck has a hard
time with that matchup (between 30% and 35% depending on meta shifts and deck
popularity) however Grixis Delver is likely the worst to face as the addition of
Thoughtseize as another angle of disruption makes them very hard to face.

## What is a good meta to play Doomsday in?

Any meta where either Delver isn't prevalent or where decks that prey on Delver
are. Doomsday boasts a good win rate against most of the format including very
positive rates against decks that are favoured against Delver type strategies.
Any format with a large non-blue metashare or very controlling blue meta share
are good fields for Doomsday.

## I think X card might be good, should I run it?

It might be! A lot of people have been working on the deck for a long time and
have very likely tried the card out if considered potentially playable. Feel
free to ask on the Discord but please don't get too defensive if informed that
the card was tried and didn't hit the mark. If you are new to the deck I would
advise getting a few reps under your belt playing it first before delving into
the spicier areas of the card pool. This doesn't mean you shouldn't consider new
things but do check first as likely it has been tried and rejected before.

For a list of _off-meta_ cards which have been tried before and discussion on
them please check out the [playables appendix](/appendices/playables/).

:::row{variant=CENTERED}
Drown in the Loch
Baleful Strix
Careful Study
:::

## Is the deck hard to learn? Is it the most difficult deck in Legacy?

The deck is not hard to learn, especially if you have already got familiarity
with the core principles of Legacy. General cantripping principles and the use
of fetchlands are all key skills to learn, no different than many other decks in
the format.  The deck is far from the most difficult deck
in legacy despite its historic reputation for being as such however it does
feature a high number of decision trees that can be intimidating and, given the
finality of the title card, is pretty unforgiving when it goes wrong. At the end
of the day if you are not enjoying it or it doesn't fit your playstyle then
that's fine! There is no pressure to play this deck to be perceived as _the
smartest type of Legacy player_. Everyone has different ways of thinking and one
person's nightmare deck to pilot (mine would be Maverick) is another person's
bread and butter.

## How do I resolve Doomsday in paper?

A large part of the confusion for the physical resolution of Doomsday stems from
the wording on the original Weatherlight printing of :card[Doomsday]. See the
card below along with the original rules text printed:

:::row{variant=CENTERED}
Doomsday|WTH
:::

> Pay half your life, rounded up:
> Put your graveyard on top of your library, then remove all but five cards of
> your library from the game.
> Put the rest on top of your library in any order.

With this older templating there are a number of pitfalls that can snag the
unwary who have not read up on the updated Oracle text. First of all the "Pay
half your life, rounded up" is not a cost as is implied by the colon `:` but
actually part of the resolution. You will not lose your life for putting
Doomsday on the stack! Despite what the colon present may imply, the resolution
of the card is _not_ an activated ability. I have had an opponent before who
read my card and asked a nearby judge "Can I name this card with :card[Pithing
Needle]" to which the judge quite correctly replied: "Yes". My opponent then
proceeded to play said :card[Pithing Needle] on the card and was quite put out
that it did not work the way they had hoped it would.

Before the next point let's take a look at the updated Oracle wording on the A25
Doomsday:

:::row{variant=CENTERED}
Doomsday|A25
:::

> Search your library and graveyard for five cards and exile the rest.
> Put the chosen cards on top of your library in any order.
> You lose half your life, rounded up.

As you can see the wording changes significantly. If you were to perform the
actions specified by the original wording and shuffled your graveyard and
library together you can be called out for a GRV at competitive REL so watch
out. Cards like :card[Shadow of Doubt] will work in preventing you from
searching your library for cards but will still allow you to search your
graveyard. One especially key thing to note is your opponent is allowed to see
what cards you select (if any) from the graveyard as it is an open information
zone. You are not required to explicitly state what you are taking however you
should always allow them time to ask to see what cards are chosen and are not
allowed to hide that information from them.

## How long should I be taking to resolve Doomsday in paper?

If you are at a proper CompREL tournament you should be expected to completely
resolve Doomsday in about 60 seconds (1 minute). This takes into account the
normal decision time required to resolve any tutor and allows for around 2
complete flick throughs of your deck. Any longer and you can expect an opponent
to either ask you to hurry up or to call a judge for slow play. You can help buy
time by pre-building your Doomsday pile in your head during the turns prior by
using the time allowed for decisions like fetching lands or resolving Ponder to
think about what you are likely to build.

When learning the deck, playing with friends or at a local FNM it is likely to
will be given more leeway to resolve it which is great for practice or if you
are unfamiliar with the deck. Often people are very friendly and take some
amount of enjoyment from watching the deck be played but I would still advise
you aim to resolve it in no longer than 2 minutes with the aim to reduce this as
you get familiar with the deck. In this aspect MTGO can promote bad habits as,
thanks to the chess clock, you can often spend a lot of time building and
selecting pile cards as you play and come to rely on this mechanic.

## I run X deck, how do I beat Doomsday?

Haha, nice try! But you won't catch us out that easily! In all seriousness if
you pop into the Discord there are plenty of people who would be happy to
discuss the matchup from the other side of things. We're a friendly bunch and
always open to bouncing ideas around.

## What is the best way to learn Doomsday?

Read the Wiki, watch some content as found on our
[resources](/appendices/resources) page and most important PRACTICE, PRACTICE,
PRACTICE! If you have a spare five minutes try and goldfish the deck. Get used
to the physical manipulations of the cards. Start presenting yourself with
scenarios to beat and try to become as familiar with your decklist as you can.
Doomsday rewards an exact knowledge of your 75 as well as format knowledge
highly so increasing exposure to both is very important. Finally, if you get
stuck, feel free to ask for help! The sense of community is very strong and you
should be able to find someone to answer any queries across most time zones so
please feel free to come and say hello in the [Doomsday Discord][discord].

## What order should I make purchases to build Doomsday?

As with any Legacy deck the focus should always be on the reserved list staples.
dual lands are the first port of call with Underground Seas being the key part.
You should look to pick up at least 2 Underground Seas if not 3 if you can. Once
you have Seas then the Lion's Eye Diamond(s) is the next priority. For Doomsday
you just need one but for the more all-in combo builds you will want 4\. After
that I think you should look to pick up the splash dual lands (if applicable)
prioritising the {U} based ones over any {B} based ones. Once you have your
reserved list staples then the rest of the deck can be reasonably easy to source
with Force of Wills likely being the next biggest purchase.

## I am limited on my budget, can I still build the deck?

This obviously depends on how constricted you are in terms of budget but yes you
can! The easiest way is of course to run a heavy basics list. Unfortunately due
to the life loss from Doomsday _Shock Lands_ like :card[Watery Grave] are not
viable in high numbers. Following this you will only need 1-2 Underground Seas
and can rely on basics and Petals to fix for any splash colours. This can slow
the deck down and make cards like :card[Daze] much worse for early turns but is
perfectly serviceable. You can also omit the :card[Lion's Eye Diamond] in
Doomsday but it will prevent you from getting access to a lot of the more mana
efficient or quick kills it enables. You probably need the Force of Wills but
you can also not run them if need be and instead rely more on soft counters and
discard effects or Veil of Summer. The only card I would really advocate not
skimping on is :card[Cavern of Souls]. This card single-handedly can enable a
lot of wins in {U} matchups and thus is too good a tool to lose.

::decklist{path=meandeck.budget}

Access to :card[Force of Will]:
-2 Flusterstorm -2 Thoughtseize
+4 Force of Will

Access to :card[Underground Sea]:
-1 Watery Grave
+1 Underground Sea

At 2 :card[Underground Sea], :card[Daze] is unlocked as a reliable option.

## I am seeing lists with two Thassa's Oracles in, what does the 2nd do?

The second Oracle (main or side) can have a number of uses. It helps increase
resilience against effects like :card[Extract] when they are aggressively used,
help give a _second attempt_ vs. cards like :card[Stifle] on the Oracle's
trigger. They can enable additional devotion count, allow blocking in a pinch
with some filtering, provide extra tricks vs. mill effects like :card[Ipnu
Rivulet] and act as a pseudo +2 to your {U} card count for Force of Will
effects. Especially useful if you need to bring in Force of Negations and
maximise the ability to use them.

## Why do some lists run Consider without Deep Analysis?

:card[Consider] was first introduced and one of the aspects that made it an
appealing tool was the fast and low resource piles that could be made with it.

However this was not the key point as to why it was run. It provides a decent
cantrip effect which can be used to gain advantage through cards like
:card[Narset, Parter of Veils] whilst also providing a clean way to _dig_
through two cards in a pile. It also provides a way to create _perfect_
:card[BS] piles [in key scenarios][meandeck:brainstorm-free-cantrip].

[meandeck:brainstorm-free-cantrip]: /meandeck/brainstorm#brainstorm-and-free-cantrip-available

## When do I board in Shelldock Isle and Emrakul?

When people elect to run :card[SI] and :card[Em] they are generally thinking
about fair {U} matchups that do not run :card[Wasteland]. It should not be
brought in versus any Delver variant nor when Wasteland and :card[Teferi, Time
Raveler] are prominant in control variants as both of these can affect it.

In early June 2022, the _Hideway_ mechanic was revamped and while the Isle still
enters tapped, the 3 other cards put back under your deck can no longer be
sorted. For that reason Shelldock Isle has seen a decrease in popularity but the
Emrakul line is still functional.

## What does _Turbo_ Doomsday mean?

_Turbo_ Doomsday is a sub-archetype of Doomsday. It is normally associated with
variants of the deck which have a greater focus on speed rather than resilience.
It is characterised by a higher count of :card[PT] along with greater numbers of
:card[SW] or :card[EoA] compared to other versions.

## What does _Tempo_ Doomsday mean?

_Tempo_ Doomsday is a sub-archetype of Doomsday. It presents a
potential _plan B_ by running both the normal combo and additionally a number of
creature and/or planeswalker based threats. It is characterised by a creature
suite and a lower focus on finding Doomsday or using pile-specific cards like
:card[IU].

## Which is better out of _Turbo_ or _Tempo_ Doomsday?

Against the majority of the meta at the time of writing this _Turbo_ Doomsday
has a more favourable position with _Tempo_ giving up percentage points against
some of the otherwise easier matchups. _Tempo_ however has a much better game to
be played against Delver or other decks that may run a significant amount of
combo-specific hate for the matchup.

---

If you have any questions beyond what is listed here feel free to ask in the
[Discord][discord] or email<EMAIL_ADDRESS>
[data:matchups]: https://docs.google.com/spreadsheets/d/14hIVFCCxK6v6PHzj_7opfigFWVGV73kv59OdeN-J95I/edit#gid=890222427
[discord]: /discord

repository: angrybacon/doomsday-wiki

gha_language: TypeScript

repo_name: angrybacon/doomsday-wiki


text:
# Penetration Testing
This software is designed with a suite of scripts that all perform a separate stage of the testing and generate a report of possible vulnerabilities. In order to test this in a safe way this project will have a target hosted on an Oracle VM Virtualbox. The virtual machine will be Metasploitable 3, which is a VM that is built from the ground up with a large amount of security vulnerabilities.

[Technical Report](https://docs.google.com/document/d/14iDKo6DEH50duGWt4EW5q8tGwgR5XCBG8MmXSyHtjrU/edit?usp=sharing)

![Diagram](./diagram.jpg)

## Getting Started
------------------

System Requirements:
* OS capable of running all of the required applications listed below
* VT-x/AMD-V Supported Processor recommended
* 65 GB Available space on drive
* 4.5 GB RAM

Requirements:

* [Packer](https://www.packer.io/intro/getting-started/install.html)
* [Python 3](https://www.python.org/downloads/)
* [Vagrant](https://www.vagrantup.com/docs/installation/)
* [Vagrant Reload Plugin](https://github.com/aidanns/vagrant-reload#installation)
* [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
* Internet connection

## Building Metasploitable 3
----------------------------

### Quickstart

To use the prebuilt images provided at https://app.vagrantup.com/rapid7/ create a new local metasploitable workspace:

Linux users:
```
mkdir metasploitable3-workspace
cd metasploitable3-workspace
curl -O https://raw.githubusercontent.com/rapid7/metasploitable3/master/Vagrantfile && vagrant up
```
Windows users:
```
mkdir metasploitable3-workspace
cd metasploitable3-workspace
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/rapid7/metasploitable3/master/Vagrantfile" -OutFile "Vagrantfile"
vagrant up
```

### To build automatically:

1. - On **Linux/OSX** run `./build.sh windows2008` to build the Windows box or `./build.sh ubuntu1404` to build the Linux box. If /tmp is small, use `TMPDIR=/var/tmp ./build.sh ...` to store temporary packer disk images under /var/tmp.
   - On **Windows**, open powershell terminal and run `.\build.ps1 windows2008` to build the Windows box or `.\build.ps1 ubuntu1404` to build the Linux box. If no option is passed to the script i.e. `.\build.ps1`, then both the boxes are built.
2. If both the boxes were successfully built, run `vagrant up` to start both. To start any one VM, you can use:
    - `vagrant up ub1404` : to start the Linux box
    - `vagrant up win2k8` : to start the Windows box
3. When this process completes, you should be able to open the VM within VirtualBox and login. The default credentials are U: `vagrant` and P: `vagrant`.

### To build manually:

1. Clone [Metasploitable 3](https://github.com/rapid7/metasploitable3) repo and navigate to the main directory.
2. Build the base VM image by running `packer build --only=<provider> ./packer/templates/windows_2008_r2.json` where `<provider>` is your preferred virtualization platform. Currently `virtualbox-iso`, `qemu`, and `vmware-iso` providers are supported. This will take a while the first time you run it since it has to download the OS installation ISO.
3. After the base Vagrant box is created you need to add it to your Vagrant environment. This can be done with the command `vagrant box add packer/builds/windows_2008_r2_*_0.1.0.box --name=metasploitable3-win2k8`.
4. Use `vagrant plugin install vagrant-reload` to install the reload vagrant provisioner if you haven't already.
5. To start the VM, run the command `vagrant up win2k8`. This will start up the VM and run all of the installation and configuration scripts necessary to set everything up. This takes about 10 minutes.
6. Once this process completes, you can open up the VM within VirtualBox and login. The default credentials are U: vagrant and P: vagrant.

## Running Penetration Tester
------------------------------

### Run Against Vulnerable Target
1. Clone this repo and navigate to the main directory.
2. Open up the Metasploitable 3 within VirtualBox and login. The default credentials are U: vagrant and P: vagrant.
3. Navigate to the command prompt on the VM, run `ipconfig` to get the IP address for the vulnerable targert.
4. Run `python Main.py` on your local machine then select option 2 for remote host and enter the vulnerable target's IP to begin testing.

### Other Options
1. (Local Host) Perform tests against local machine.
2. (Remote Host) Perform tests against remote host.
3. (Ping Sweep) Ping sweep a local or remote network and select a target.

repository: marcsettin/PenetrationTesting

repo_name: marcsettin/PenetrationTesting


text:
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [WheelJointOpt](wheeljointopt.md)

# Interface: WheelJointOpt

Wheel joint definition. This requires defining a line of motion using an axis
and an anchor point. The definition uses local anchor points and a local axis
so that the initial configuration can violate the constraint slightly. The
joint translation is zero when the local anchor points coincide in world
space. Using local anchors and a local axis helps when saving and loading a
game.
Wheel joint definition. This requires defining a line of motion using an axis
and an anchor point. The definition uses local anchor points and a local axis
so that the initial configuration can violate the constraint slightly. The
joint translation is zero when the local anchor points coincide in world
space. Using local anchors and a local axis helps when saving and loading a
game.

## Hierarchy

* [JointOpt](jointopt.md)

* JointOpt

  ↳ **WheelJointOpt**

  ↳ [WheelJointDef](wheeljointdef.md)

## Index

### Properties

* [collideConnected](wheeljointopt.md#optional-collideconnected)
* [dampingRatio](wheeljointopt.md#optional-dampingratio)
* [enableMotor](wheeljointopt.md#optional-enablemotor)
* [frequencyHz](wheeljointopt.md#optional-frequencyhz)
* [maxMotorTorque](wheeljointopt.md#optional-maxmotortorque)
* [motorSpeed](wheeljointopt.md#optional-motorspeed)
* [userData](wheeljointopt.md#optional-userdata)

## Properties

### `Optional` collideConnected

• **collideConnected**? : *boolean*

*Inherited from [JointOpt](jointopt.md).[collideConnected](jointopt.md#optional-collideconnected)*

*Overrides void*

*Defined in [dist/planck.d.ts:960](https://github.com/shakiba/planck.js/blob/7e469c4/dist/planck.d.ts#L960)*

Set this flag to true if the attached bodies
should collide.

___

### `Optional` dampingRatio

• **dampingRatio**? : *number*

*Defined in [dist/planck.d.ts:3675](https://github.com/shakiba/planck.js/blob/7e469c4/dist/planck.d.ts#L3675)*

*Defined in [src/dynamics/joint/WheelJoint.ts:63](https://github.com/shakiba/planck.js/blob/7e469c4/src/dynamics/joint/WheelJoint.ts#L63)*

Suspension damping ratio, one indicates critical damping.
Suspension damping ratio, one indicates critical damping.

___

### `Optional` enableMotor

• **enableMotor**? : *boolean*

*Defined in [dist/planck.d.ts:3659](https://github.com/shakiba/planck.js/blob/7e469c4/dist/planck.d.ts#L3659)*

*Defined in [src/dynamics/joint/WheelJoint.ts:47](https://github.com/shakiba/planck.js/blob/7e469c4/src/dynamics/joint/WheelJoint.ts#L47)*

Enable/disable the joint motor.
Enable/disable the joint motor.

___

### `Optional` frequencyHz

• **frequencyHz**? : *number*

*Defined in [dist/planck.d.ts:3671](https://github.com/shakiba/planck.js/blob/7e469c4/dist/planck.d.ts#L3671)*

*Defined in [src/dynamics/joint/WheelJoint.ts:59](https://github.com/shakiba/planck.js/blob/7e469c4/src/dynamics/joint/WheelJoint.ts#L59)*

Suspension frequency, zero indicates no suspension.
Suspension frequency, zero indicates no suspension.

___

### `Optional` maxMotorTorque

• **maxMotorTorque**? : *number*

*Defined in [dist/planck.d.ts:3663](https://github.com/shakiba/planck.js/blob/7e469c4/dist/planck.d.ts#L3663)*

*Defined in [src/dynamics/joint/WheelJoint.ts:51](https://github.com/shakiba/planck.js/blob/7e469c4/src/dynamics/joint/WheelJoint.ts#L51)*

The maximum motor torque, usually in N-m.
The maximum motor torque, usually in N-m.

___

### `Optional` motorSpeed

• **motorSpeed**? : *number*

*Defined in [dist/planck.d.ts:3667](https://github.com/shakiba/planck.js/blob/7e469c4/dist/planck.d.ts#L3667)*

*Defined in [src/dynamics/joint/WheelJoint.ts:55](https://github.com/shakiba/planck.js/blob/7e469c4/src/dynamics/joint/WheelJoint.ts#L55)*

The desired motor speed in radians per second.
The desired motor speed in radians per second.

___

### `Optional` userData

• **userData**? : *any*

*Inherited from [JointOpt](jointopt.md).[userData](jointopt.md#optional-userdata)*

*Overrides void*

*Defined in [dist/planck.d.ts:955](https://github.com/shakiba/planck.js/blob/7e469c4/dist/planck.d.ts#L955)*

Use this to attach application specific data to your joints.


text:
# ![nf-core/imcyto](docs/images/nf-core-imcyto_logo.png)

[![GitHub Actions CI Status](https://github.com/nf-core/imcyto/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/imcyto/actions)
[![GitHub Actions Linting Status](https://github.com/nf-core/imcyto/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/imcyto/actions)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A519.10.0-brightgreen.svg)](https://www.nextflow.io/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3865430.svg)](https://doi.org/10.5281/zenodo.3865430)

## Introduction

**nfcore/imcyto** is a bioinformatics analysis pipeline used for image segmentation and extraction of single cell expression data. This pipeline was generated for Imaging Mass Cytometry data, however, it is flexible enough to be applicable to other types of imaging data e.g. immunofluorescence/immunohistochemistry data.

The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.

## Pipeline summary

1. Split image acquisition output files (`mcd`, `ome.tiff` or `txt`) by ROI and convert to individual `tiff` files for channels with names matching those defined in user-provided `metadata.csv` file. Full and ilastik stacks will be generated separately for all channels being analysed in single cell expression analysis, and for channels being used to generate the cell mask, respectively ([imctools](https://github.com/BodenmillerGroup/imctools)).

2. Apply pre-processing filters to full stack `tiff` files ([CellProfiler](https://cellprofiler.org/)).

3. Use selected `tiff` files in ilastik stack to generate a composite RGB image representative of the plasma membranes and nuclei of all cells ([CellProfiler](https://cellprofiler.org/)).

4. Use composite cell map to apply pixel classification for membranes, nuclei or background, and save probabilities map as `tiff` ([Ilastik](https://www.ilastik.org/)). If CellProfiler modules alone are deemed sufficient to achieve a reliable segmentation mask this step can be bypassed using the `--skip_ilastik` parameter in which case the composite `tiff` generated in step 3 will be used in subsequent steps instead.

5. Use probability/composite `tiff` and pre-processed full stack `tiff` for segmentation to generate a single cell mask as `tiff`, and subsequently overlay cell mask onto full stack `tiff` to generate single cell expression data in `csv` file ([CellProfiler](https://cellprofiler.org/)).

## Quick Start

i. Install [`nextflow`](https://nf-co.re/usage/installation)

ii. Install one of [`docker`](https://docs.docker.com/engine/installation/) or [`singularity`](https://www.sylabs.io/guides/3.0/user-guide/)

iii. Download the pipeline and test it on a minimal dataset with a single command

```bash
nextflow run nf-core/imcyto -profile test,<docker/singularity/institute>
```

> Please check [nf-core/configs](https://github.com/nf-core/configs#documentation) to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use `-profile <institute>` in your command. This will enable either `docker` or `singularity` and set the appropriate execution settings for your local compute environment.

iv.

## Documentation

The nf-core/imcyto pipeline comes with documentation about the pipeline, found in the `docs/` directory:

1. [Installation](https://nf-co.re/usage/installation)
2. Pipeline configuration
    * [Local installation](https://nf-co.re/usage/local_installation)
    * [Adding your own system config](https://nf-co.re/usage/adding_own_config)
3. [Running the pipeline](docs/usage.md)
4. [Output and how to interpret the results](docs/output.md)
5. [Troubleshooting](https://nf-co.re/usage/troubleshooting)

## Credits

The pipeline was originally written by [The Bioinformatics & Biostatistics Group](https://www.crick.ac.uk/research/science-technology-platforms/bioinformatics-and-biostatistics/) for use at [The Francis Crick Institute](https://www.crick.ac.uk/), London.

The pipeline was developed by [Harshil<EMAIL_ADDRESS>and [Nourdine<EMAIL_ADDRESS>in collaboration with [Karishma Valand](mailto:karishma.valand@crick.ac.uk), [Febe van Maldegem](mailto:febe.vanmaldegem@crick.ac.uk), [Emma<EMAIL_ADDRESS>and [Mihaela Angelova](mailto:mihaela.angelova@crick.ac.uk).

Many thanks to others who contributed as a result of the Crick Data Challenge (Jan 2019) - Gavin Kelly, Becky Saunders, Katey Enfield, Alix Lemarois, Nuria Folguera Blasco, Andre Altmann.

It would not have been possible to develop this pipeline without the guidelines, scripts and plugins provided by the [Bodenmiller Lab](http://www.bodenmillerlab.com/). Thank you too!

## Contributions and Support

If you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).

For further information or help, don't hesitate to get in touch on [Slack](https://nfcore.slack.com/channels/imcyto) (you can join with [this invite](https://nf-co.re/join/slack)).

## Citation

If you use nf-core/imcyto for your analysis, please cite it using the following preprint:

> **Characterisation of tumour microenvironment remodelling following oncogene inhibition in preclinical studies with imaging mass cytometry.**
>
> Febe van Maldegem, Karishma Valand, Megan Cole, Harshil Patel, Mihaela Angelova, Sareena Rana, Emma Colliver, Katey Enfield, Nourdine Bah, Gavin Kelly, Victoria Siu Kwan Tsang, Edurne Mugarza, Christopher Moore, Philip Hobson, Dina Levi, Miriam Molina, Charles Swanton & Julian Downward.
>
> Nat Commun. 2021 Oct 8;12(1):5906. doi: [10.1038/s41467-021-26214-x](https://doi.org/10.1038/s41467-021-26214-x)

The Zenodo doi for the pipeline itself is: [10.5281/zenodo.3865430](https://doi.org/10.5281/zenodo.3865430)

You can cite the `nf-core` publication as follows:

> **The nf-core framework for community-curated bioinformatics pipelines.**
>
> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
>
> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).
> ReadCube: [Full Access Link](https://rdcu.be/b1GjZ)

An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.

repository: nf-core/imcyto

repo_name: nf-core/imcyto


text:
# wordpress-heroku

This project uses wordpress as a dependency and configures the theme and plugins that are required.
The goal of this repository is to create a backend for clients apps that can be deployed to Heroku.

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/ibandominguez/wordpress-heroku)

The app is automatically provisioned and adds aws s3 support out of the box using *Cloudcube*(https://elements.heroku.com/addons/cloudcube) and a running db using *Jaws DB Mysql*(https://elements.heroku.com/addons/jawsdb).

In less that a minute you should have wordpress up and running.

## Features

* Uses a single database and creates dynamic tables based on the url prefix so that the same core can be used for multiple backends.
* Uses s3 for file storage, since Heroku doesn't support file persistance.
* Uses pods for Custom post type and custom fields to extends the different resources on a api.

## Getting started

* Edit de config/wp-config.php according to your needs
* Develop your theme (/theme directory)
* Add your required plugins (/plugins directory)
* Configure your ENV vars

## Serving locally

```sh
php serve.php
```

## LICENSE

MIT

repository: kakamband/wordpress-heroku

repo_name: kakamband/wordpress-heroku