text:
---
title: Linux support for the Dell XPS 13 9343 (2015 model)
author: Major Hayden
type: post
date: 2015-02-03T15:23:24+00:00
url: /2015/02/03/linux-support-dell-xps-13-9343-2015-model/
dsq_thread_id:
  -<PHONE_NUMBER>
categories:
  - Blog Posts
tags:
  - dell
  - fedora
  - linux

---
![1]

_I'M ALL DONE: I'm not working on Linux compatibility for the XPS 13 any longer. I've purchased a Lenovo X1 Carbon (3rd gen) and that's my preferred laptop. More on this change later._

* * *

I've been looking for a good laptop to run Linux for a while now and my new Dell XPS 13 9343 has arrived. It was released at CES in 2015 and it received quite a lot of attention for packing a large amount of pixels into a very small laptop frame with excellent battery life. Ars Technica has a [great overall review][2] of the device.

Linux support has been historically good on the previous generation XPS 13's and a [blog post from Dell][3] suggests that the latest revision will have good support as well. For a deep dive on the hardware inside the laptop, review [this GitHub Gist][4].

After wiping Windows 8.1 off the laptop, I started with the Fedora 21 installation. If you want to run Linux on one of these laptops, here's what you need to know:

## The good

All of the most basic devices work just fine. The display, storage, and peripheral connections (USB, SD card slot, mini DisplayPort) all work out of the box in Linux 3.18.5 with Fedora 21. The display looks great with GNOME 3's default HiDPI settings and it's very readable with the default font sizes without HiDPI (although this is a bit subjective).

The webcam works without any additional configuration the video quality is excellent.

The wireless card in the laptop I received is a BCM4352:

```
02:00.0 Network controller: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)
```

It's possible to get this card working with the b43 kernel modules but I've had better luck with the binary blob STA drivers from Broadcom. There are [plenty of guides][5] out there to help you install the kernel module for your Fedora kernel. I've had great network performance with the binary driver.

Some users are seeing Intel wireless cards in their Dell XPS 13's, especially in Europe. Opening the laptop for service [isn't terribly difficult][6] and you could replace the bluetooth/wireless card with a different one.

**PRO TIP:** If you're seeing errors in your journald logs about NetworkManager being unable to scan for access points, be sure to hit the wireless switch key on your keyboard (Fn-F12) to enable the card. This had me stumped for about 45 minutes. There's an option in the BIOS to disable the switch and let the OS control the wireless card.

The special keyboard buttons (volume up/down, brightness up/down) all work flawlessly.

## The bad

The touchpad and keyboard are on the I2C bus and this creates some problems. Many users have reported that keys on the keyboard seem to repeat themselves while you're typing and the touchpad has an issue where X stops receiving input from it. However, when the touchpad seems to freeze, the kernel still sees data coming from the device (verified with evtest and evemu-record).

There are some open bugs and discussion about the touchpad issues:

* [Linux Support is Terrible on the New Dell XPS 13 (2015)][7] [Reddit]
* [touchpad does not respond to tap-to-clicks in I2C mode in Ubuntu 15.04 on 2015 XPS 13 (9343)][8] [Launchpad Bug]
* [Dell XPS 13 9343 (2015) touchpad freeze][9] [Red Hat Bug]

You can connect up a mouse and keyboard to the laptop and work around those issues. However, dragging around some big peripherals with such a small laptop isn't a great long-term solution. Some users suggested blacklisting the i2c_hid module so that the touchpad shows up as a plain PS/2 touchpad but I'm still seeing freezes even after making that change.

If you're having one of those “touchpad on the I2C bus?” moments like I had, read Synaptics' [brief page about Intertouch][10]. Using the I2C bus saves power, reduces USB port consumption, and allows for more powerful multi-touch gestures.

Oddly enough, the touchscreen is an ELAN Touchscreen and it runs over USB. It suffers from the same freezes that the touchpad does.

 The microphone, speakers and headphone port don't work under 3.18.5 and 3.19.0-rc7. The audio device is a ALC3263 from RealTek and it should use the same module as the RT286. However, the probing still fails and the module can't be used. The [module code][11] seems to be correct but the probing still fails.

There's an open bug on Launchpad about the problem:

* [Audio broken on 2015 XPS 13 (9343) in I2S mode in Ubuntu 14.10/15.04][12] [Launchpad bug]
* [No sound on Dell XPS 13 9343 (2015 model)][13] [Red Hat bug]
* [broadwell-audio: rt286 device appears, no sound (Dell XPS 13 9343)][14] [Linux kernel bug]

I connected up an old Syba USB audio device to the USB port and was able to get sound immediately. This is also a horrible workaround.

## What now?

From what I gather, Dell is extremely eager to make Linux work on the new XPS 13 and we should see some movement on these bugs soon.

If you know much about the I2C bus or about the sound devices in this laptop and you have some time available to help, just let me know where to send the beer. ;)

## Latest updates

#### 2015-02-03

Added Red Hat bug link for sound issues.

#### 2015-02-05

The touchpad bug has been reduced to a kernel issue. Recordings from evemu-record look fine when they're played back in X. Users reported in Launchpad and in the Red Hat bug that kernel 3.16 works perfectly but 3.17 doesn't. A kernel bisection will most likely be required to find the patch that broke the touchpad.

Many users find that adding `acpi.os="!Windows 2013"` to the kernel boot line will bring the audio card online after 1-3 reboots. Apparently there is some level of state information stored in memory that requires a few reboots to clear it. I haven't verified this yet.

#### 2015-02-06

Kernel bisect for the touchpad issue is underway. Every 3.16.x kernel I built would keep the trackpad in PS/2 mode and that's not helpful at all. There's no multi-finger taps/clicks/gestures. 3.17.0 works perfectly, however. My gut says something broke down between 3.17.0 and 3.18.0 but it might actually be closer to 3.17.4 since Fedora 21's initial kernel is 3.17.4 (and the touchpad doesn't work well with it).

A post was made on [Barton's Blog][15] yesterday about Dell being aware of the Linux issues. _(Thanks to Chris' comment below!)_

After about 35 kernel builds during the most frustrating git bisect of my life, I found the [problematic patch][16]. The [Red Hat bug][17] is updated now and I'm hoping that someone with a detailed knowledge of this part of the kernel can make sense of it:

```diff
From d1c7e29e8d276c669e8790bb8be9f505ddc48888 Mon Sep 17 00:00:00 2001
From: Gwendal Grignou<EMAIL_ADDRESS>Date: Thu, 11 Dec 2014 16:02:45 -0800
Subject: HID: i2c-hid: prevent buffer overflow in early IRQ

Before ->start() is called, bufsize size is set to HID_MIN_BUFFER_SIZE,
64 bytes. While processing the IRQ, we were asking to receive up to
wMaxInputLength bytes, which can be bigger than 64 bytes.

Later, when ->start is run, a proper bufsize will be calculated.

Given wMaxInputLength is said to be unreliable in other part of the
code, set to receive only what we can even if it results in truncated
reports.

Signed-off-by: Gwendal Grignou<EMAIL_ADDRESS>Reviewed-by: Benjamin Tissoires<EMAIL_ADDRESS>Cc<EMAIL_ADDRESS>Signed-off-by: Jiri Kosina<EMAIL_ADDRESS>
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 747d544..9c014803b4 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -369,7 +369,7 @@ static int i2c_hid_hwreset(struct i2c_client *client)
 static void i2c_hid_get_input(struct i2c_hid *ihid)
 {
 	int ret, ret_size;
-	int size = le16_to_cpu(ihid->hdesc.wMaxInputLength);
+	int size = ihid->bufsize;

 	ret = i2c_master_recv(ihid->client, ihid->inbuf, size);
 	if (ret != size) {
```

I reverted the patch in Linux 3.19-rc7 and built the kernel. The touchpad works flawlessly. However, simply reverting the patch probably isn't the best idea long term. ;)

#### 2015-02-07

The [audio patch][18] mentioned in the [Launchpad bug report][19] didn't work for me on Linux 3.19-rc7.

#### 2015-02-10

Progress is still being made on the touchpad in the [Red Hat bug][17] ticket. If you can live with the pad working as PS/2, you can get sound by adding `acpi_osi="!Windows 2013"` to your kernel command line. Once you do that, you'll need to:

  1. Do a warm reboot
  2. Wait for the OS to boot, then do a full poweroff
  3. Boot the laptop, then do a full poweroff
  4. Sound should now be working

If sound still isn't working, you may need to install `pavucontrol`, the PulseAudio volume controller, and disable the HDMI sound output that is built into the Broadwell chip.

This obviously isn't a long-term solution, but it's a fair workaround.

#### 2015-02-11

There is now a [patch][20] that you can apply to 3.18 or 3.19 kernels that eliminates the trackpad freeze:

```diff
From 2a2aa272447d0ad4340c73db91bd8e995f6a0c3f Mon Sep 17 00:00:00 2001
From: Benjamin Tissoires<EMAIL_ADDRESS>Date: Tue, 10 Feb 2015 12:40:13 -0500
Subject: [PATCH] HID: multitouch: force release of touches when i2c
 communication is not reliable

The Dell XPS 13 9343 (2015) shows that from time to time, i2c_hid misses
some reports from the touchpad. This can lead to a freeze of the cursor
in user space when the missing report contains a touch release information.

Win 8 devices should have a contact count reliable, to we can safely
release all touches that has not been seen in the current report.

Signed-off-by: Benjamin Tissoires<EMAIL_ADDRESS>---
 drivers/hid/hid-multitouch.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index f65e78b..48b051e 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1021,6 +1021,14 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	if (id->vendor == HID_ANY_ID && id->product == HID_ANY_ID)
 		td->serial_maybe = true;

+	if ((id->group == HID_GROUP_MULTITOUCH_WIN_8) && (hdev->bus == BUS_I2C))
+		/*
+		 * Some i2c sensors are not completely reliable with the i2c
+		 * communication. Force release of unseen touches in a report
+		 * to prevent bad behavior from user space.
+		 */
+		td->mtclass.quirks |= MT_QUIRK_NOT_SEEN_MEANS_UP;
+
 	ret = hid_parse(hdev);
 	if (ret != 0)
 		return ret;
```

I've tested it against 3.19-rc7 as well as Fedora's 3.18.5. However, tapping still doesn't work yet with more than one finger. The touchpad jumps around a bit when you apply two fingers to it.

#### 2015-02-12

Rene commented below that he [found a post in alsa devel with a patch][21] for the “Dell Dino” that looks like it might help with the i2c audio issues. Another kernel maintainer replied and asked for some of the code to be rewritten to make it easier to handle audio quirks. UPDATE: Audio patch didn't work.

We've created an IRC channel on Freenode: #xps13.

There's an interesting [kernel patch mentioning “Dell Dino”][22] that is line for inclusion in 3.20-rc1. Someone in IRC found “Dell Dino” mentioned on a [Dell business purchase page][23]. The board name from dmidecode in the patch is **0144P8** but that doesn't match other known board names. My i5-5200U with touch is **0TM99H** while a user with a non-touch i5 has a board name of **OTRX4F**. Other i5 touch models have the same board name as mine. All BIOS revisions found so far are A00 (the latest on Dell's site).

A [probe for the rt286 module][24] looks like it starts to happen and then it fails (skip to line 795):

```
[    4.141189] rt286 i2c-INT343A:00: probe
[    4.141245] i2c i2c-8: master_xfer[0] W, addr=0x1c, len=4
[    4.141246] i2c i2c-8: master_xfer[1] R, addr=0x1c, len=4
[    4.141249] i2c_designware INT3432:00: i2c_dw_xfer: msgs: 2
[    4.141389] i2c_designware INT3432:00: Standard-mode HCNT:LCNT = 432:507
[    4.141391] i2c_designware INT3432:00: Fast-mode HCNT:LCNT = 72:160
[    4.141662] i2c_designware INT3432:00: i2c_dw_isr:  Synopsys DesignWare I2C adapter enabled= 0x1 stat=0x10
[    4.141670] i2c_designware INT3433:00: i2c_dw_isr:  Synopsys DesignWare I2C adapter enabled= 0x1 stat=0x0
[    4.141695] i2c_designware INT3432:00: i2c_dw_isr:  Synopsys DesignWare I2C adapter enabled= 0x1 stat=0x750
[    4.141703] i2c_designware INT3433:00: i2c_dw_isr:  Synopsys DesignWare I2C adapter enabled= 0x1 stat=0x0
[    4.141965] i2c_designware INT3432:00: i2c_dw_handle_tx_abort: slave address not acknowledged (7bit mode)
[    4.141968] rt286 i2c-INT343A:00: Device with ID register 0 is not rt286
[    4.160506] i2c-core: driver [rt286] registered
```

**2015-02-16**

I received an email from a Realtek developer about the sound card in the XPS:

> I see “rt286 i2c-INT343A:00: Device with ID register 0 is not rt286” in the log. It means there are something wrong when the driver is trying to read the device id of codec. I believe that is due to I2C read/write issue. ALC3263 is a dual mode (I2S and HDA) codec. And BIOS will decide which mode according to OS type. So, if you want to use i2s mode, you need to configure your BIOS to set ALC3263 to I2S mode.

After poring through the [DSDT and other ACPI tables][25] over the weekend (and building way too many kernels with overriden DSDT's), it sounds like a BIOS update may be required for the sound card to function properly. The [sound devices][26] specified in the DSDT that are on the i2c bus are only activated after a BUNCH of checks succeed. One of them is the check of `OSYS`, the system's operating system. Setting `acpi_osi="Windows 2013"` does flip `OSYS` to `0x07DD`, but that's only part of the fix. There are other variables checked, like `CODS` (that shows up very often) that are instantiated early in the DSDT but I can't find them ever being set to a value anywhere in the DSDT code. These variables equal zero by default and that disables critical parts of the sound device.

My take: This laptop is going to need a BIOS update of some sort before we can get sound working properly in Linux with an i2c touchpad. If someone is more skilled with DSDT's than I am, I'll be glad to share all of my work that I've tried so far. As for now, I'm going to be waiting eagerly for some type of firmware update from Dell.

**2015-02-17**

There's some progress on the sound card in Linux! After building the latest commits from [linux.git's master branch][27], my XPS started showing a device called “broadwell-rt286” in pavucontrol. It showed up as a normal audio device but it had no output support, only input. I tried to enable the microphone but I couldn't record any sound.

I found a [kernel bug][28] from a ThinkPad Helix 2 user with a very similar hardware setup. Their rt286 device is on the I2S bus with a Haswell SoC. Their fix was to copy over the latest firmware binaries from [linux-firmware.git][29] and reboot. I did the same and an output device suddenly showed up in pavucontrol after a reboot.

When I played sounds via aplay, canberra-gtk-play, and rhythmbox, I could see the signal level fluctuating in pavucontrol on the broadwell-rt286 device. However, I couldn't hear the sound through the speakers. I connected headphones and I couldn't hear any sound there either.

There's now a [kernel bug ticket][14] open for the sound issue.

Stay tuned for a BIOS update with a potential keyboard repeat fix. It's already been talked about in IRC as a potential A01 release sssssssssssoon:

> someone asked about the fix for the repeating keypresses. yes, it was traced back to the source and will be fixed on all affected Dell platforms soon

> I just saw that the one for 9343 was promoted to our factories so should be up on support.dell.com any day now as BIOS A01

You can get notifications about driver releases for the XPS on [Dell's site][30].

**2015-03-04**

Sound on the I2S bus is working in Linux 4.0-rc2! _See note from 2015-03-08 below._ I was too exhausted last night for a full write-up, but here's the gist of what I did:

First off, build 4.0-rc2 with all of the available I2C and ALSA SoC modules. I haven't narrowed down which modules are critical quite yet. Once you've built the kernel and rebooted into it, run `alsamixer` and choose the `broadwell-rt286` card. Hold the right arrow key until you go all the way to the right of the alsamixer display and press M to unmute the last control there. You should now be able to turn up the volume and play some test sounds.

Luckily, no update for linux-firmware is required. Also, there's no need for any ALSA UCM files as I had originally thought.

Stay tuned for a more in-depth write-up soon.

**2015-03-08**

After a few more reboots, I can't get sound working again. I'm wondering if I had an errant `acpi_osi` setting somewhere during my testing that brought sound up on the HDA bus. :/

 [1]: https://major.io/wp-content/uploads/2015/02/dellXPS13-9343_2.jpg
 [2]: http://arstechnica.com/gadgets/2015/01/hands-on-dell-xps-13-packs-a-13-inch-screen-into-an-11-inch-laptop/
 [3]: http://en.community.dell.com/techcenter/b/techcenter/archive/2015/01/27/you-asked-for-it-ubuntu-officially-on-the-precision-m3800-worldwide
 [4]: https://gist.github.com/semenko/60015029e13c1de65ff6
 [5]: http://www.cyberciti.biz/faq/fedora-linux-install-broadcom-wl-sta-wireless-driver-for-bcm43228/
 [6]: http://www.myfixguide.com/manual/dell-xps-13-9343-disassembly/
 [7]: http://www.reddit.com/r/linux/comments/2u0jjd/linux_support_is_terrible_on_the_new_dell_xps_13/
 [8]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1416601
 [9]: https://bugzilla.redhat.com/show_bug.cgi?id=1188439
 [10]: http://www.synaptics.com/en/intertouch.php
 [11]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1413446/comments/13
 [12]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1413446
 [13]: https://bugzilla.redhat.com/show_bug.cgi?id=1188741
 [14]: https://bugzilla.kernel.org/show_bug.cgi?id=93361
 [15]: http://bartongeorge.net/2015/02/05/update-dell-xps-13-laptop-developer-edition-sputnik-gen-4/
 [16]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d1c7e29e8d276c669e8790bb8be9f505ddc48888
 [17]: https://bugzilla.redhat.com/show_bug.cgi?id=1188439#c25
 [18]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1413446/+attachment/4313687/+files/rt288.patch
 [19]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1413446#30
 [20]: https://bugzilla.redhat.com/attachment.cgi?id=990188
 [21]: http://mailman.alsa-project.org/pipermail/alsa-devel/2015-February/087462.html
 [22]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2cc3f2347022969f00a429951ce489d35a9b4ea8
 [23]: http://www.dell.com/us/business/p/xps-13-9343-laptop/fs
 [24]: http://paste.fedoraproject.org/185053/23803691/
 [25]: https://github.com/major/xps-13-9343-dsdt
 [26]: https://github.com/major/xps-13-9343-dsdt/blob/master/DSDT.dsl#L8700
 [27]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/
 [28]: https://bugzilla.kernel.org/show_bug.cgi?id=92061#c24
 [29]: http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git
 [30]: http://www.dell.com/support/home/us/en/04/product-support/product/xps-13-9343-laptop/drivers


text:
## E0704 (misplaced-bare-raise)

### :x: Problematic code:

```python
def foo(x):
    if x <= 10:
        raise
```

### :heavy_check_mark: Correct code:

```python
def foo(x):
    if x <= 10:
        raise ValueError('x should be equal or grater than 10.')
```

### Rationale:

Used when a bare raise is not used inside an except clause. This generates an
error, since there are no active exceptions to be reraised. An exception to
this rule is represented by a bare raise inside a finally clause, which might
work, as long as an exception is raised inside the try block, but it is
nevertheless a code smell that must not be relied upon.

### Related resources:

- [Testcases](#)
- [Issue Tracker](https://github.com/PyCQA/pylint/issues?q=is%3Aissue+%22misplaced-bare-raise%22+OR+%22E0704%22)

license: MIT

repository: aidenmitchell/pylint-errors-simplified

branch_name: refs/heads/main

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: aidenmitchell/pylint-errors-simplified


text:
# CoRA
Codes and datasets for our paper "Improving Long-Tail Relation Extraction with Collaborating Relation-Augmented Attention"

If you use the code, please cite the following [paper](https://arxiv.org/pdf/2010.03773.pdf):

```
@article{li2020improving,
  title={Improving Long-Tail Relation Extraction with Collaborating Relation-Augmented Attention},
  author={Li, Yang and Shen, Tao and Long, Guodong and Jiang, Jing and Zhou, Tianyi and Zhang, Chengqi},
  journal={arXiv preprint arXiv:2010.03773},
  year={2020}
}
```

## Requirements

The model is implemented using tensorflow. The versions of packages used are shown below.

* tensorflow = 1.4.1
* numpy = 1.13.3
* scipy = 0.19.1

## Initialization

First unzip the `./raw_data/data.zip` and put all the files under `./raw_data`. Once the original raw text corpus data is in `./raw_data`, run

    python script/initial_CoRA.py

## Train the model
For CoRA,

    PYTHONPATH=. python script/train.py

## Evaluate the model

Run various evaluation by specifying `--mode` in commandline, see the paper for detailed description for these evaluation methods.

    PYTHONPATH=. python script/evaluate.py --mode [test method: pr, pone, ptwo, pall] --test-single --test_start_ckpt [ckpt number to be tested] --model [cnn_hier or pcnn_hier]

The logits are saved at `./outputs/logits/`. To see the PR curve, run the following command which directly `show()` the curve, and you can adjust the codes in `./scripts/show_pr.py` for saving the image as pdf file or etc. :

    python script/show_pr.py [path/to/generated .npy logits file from evaluation]

## Pretrained models

The pretrained models is already saved at `./outputs/ckpt/`. To directly evaluate on them, run the following command:

    PYTHONPATH=. python script/evaluate.py --mode [test method: hit_k_100, hit_k_200, pr, pone, ptwo, pall] --test_single --test_start_ckpt 0 --model [cnn_hier or pcnn_hier]

And PR curves can be generated same way as above.

## The results of the released checkpoints

As this toolkit is reconstructed based on the original code and the checkpoints are retrained on this toolkit, the results of the released checkpoints are comparable with the reported ones.

### The Main Experiments

* AUC

|  Model   | AUC  |
|  ----  | ----  |
| CoRA  | 0.53 |

### The Auxiliary Experiments

* Hits@N(<100)

|  micro   | 10  |  15 | 20 |
|  ----  | ----  | ---  | ---   |
| CoRA  | 61.1 | 66.6  |  83.3 |

|  macro   | 10  |  15 | 20 |
|  ----  | ----  | ---  | ---   |
| CoRA  | 66.7 | 72.2  |  87.0 |

* Hits@N(<200)

|  micro   | 10  |  15 | 20 |
|  ----  | ----  | ---  | ---   |
| CoRA  | 75.9 | 79.3 |  89.7 |

|  macro   | 10  |  15 | 20 |
|  ----  | ----  | ---  | ---   |
| CoRA  | 72.7 | 77.3  |  89.3 |

* pone

|  P@N   | 100  |  200 | 300| Mean|
|  ----  | ----  | ---  | ---   | ---  |
| CoRA  | 94.0 | 90.5 |  82.0 | 88.8 |

* ptwo

|  P@N   | 100  |  200 | 300| Mean|
|  ----  | ----  | ---  | ---   | ---  |
| CoRA  | 98.0 | 91.0 |  86.3 |  91.8 |

* pall

|  P@N   | 100  |  200 | 300| Mean|
|  ----  | ----  | ---  | ---   | ---  |
| CoRA  | 98.0 | 92.5  |  88.3 |  92.9 |

# Acknowledgement
This repo is mainly based on [HNRE](https://github.com/thunlp/HNRE) from [@SillyXu](https://github.com/THUCSTHanxu13)

branch_name: refs/heads/master


text:
---
layout: post
title:  "Chapter 4"
date:   2014-11-09 23:30:00 +0900
subtitle: ""
author: Madao
background: '/img/posts/vol-1.jpg'
tag: Volume 1
---
There were some vigorous movements the next day. Mainly by 2 soldiers.

These were the 2 soldiers who knew the actions Kazuki had taken the day before.
To impose a gag order on this time’s plan to save Clara, thinking that it would be desirable to limit the number of people who were concerned with it, Kazuki had confirmed whether these 2 were people who could be trusted with confidential work, from Norman the day before.

Norman’s answer was a yes. For Kazuki, it was fortunate but, it was hard to say for the soldiers.
Called by Harold early in the morning, when they headed to his room filled with trepidation thinking about exactly what they were called for, all of a sudden they were given an explanation about the plan to save the servant.

Without their understanding catching up to the situation, the one thing that was carved deeply into the hearts of the 2 soldiers and the coachman of the horse cart, who was called like them,  was that, if this plan failed and was discovered by a third party, their lives would be in danger.

Therefore, one of the soldiers completed the orders given one after the other with a – hii hii.
The other one was running around the town at the same time.
The only one who was at ease was the coachman, who had no work until night.

「Ha, Harold-sama, I have bought all the goods and come back」

「Toss them into the dungeon while not being seen. After finishing that, ride the horse and confirm the route to the highway with your own eyes」

「But I still haven’t brought the horse along……..」

「It’ll be fine if you borrow a horse from the ones in the mansion and go. However, give it an injury that arouses suspicion. Come back before it gets dark」

No mercy, precisely Spartan.
If explained why, since Kazuki himself was at his wit’s end, he didn’t have enough room to pay attention to his surroundings.

Confirming that the soldier had headed towards the stable, Kazuki resumed practising his magic.
The magic he was practising was the low grade magic 『Flame Column』, directly translated, it was – pillar of fire >(Hibashira). The magic which was thought to be fired by Harold in the original work, to kill Clara.

They actually didn’t know what it was, but among the players who had watched the movie scene, 「It’s probably Flame Column」 was what they had widely perceived it as, and so he decided to conform to it.
Well, it was relatively inconsequential but, it couldn’t be helped that it’s power was weak.

At first, with embarrassment added to him thinking whether he could really use magic, he performed the chant. Surprisingly, when it succeeded in the first try, as expected, he was excited, but when he looked at it properly, it only rose up to a height of 40 cm and its thickness was also about as small as an aluminum can.

In the original work, it had a height and thickness which could easily envelop a grown woman, and in the combat scene, it looked as though it was a pillar of fire which had a height of 2 – 3 m.
If this body really was that of Harold Stokes, then it should also be possible for Kazuki to do it.

It wasn’t as though he would burn Clara to death so, Kazuki also knew that it wasn’t absolutely necessary for it to have so much firepower. Even for the actual performance, he had no intentions to activate the magic as extensively as shown in the movie scene.

That said, since he was letting Clara get away, there was no way he could show a corpse and so, he needed enough firepower to show that he had burnt her so much that not even cinders remained. For that reason, from some time ago, Kazuki was practising magic while simultaneously, leaving burn marks on the ground and tree trunks and also burning leaves.
Even though it was an open location, he was still inside a forest with dense, overgrown trees. Carefully paying attention so as to not start a forest fire, he was repeating a truly boring operation.

「Fuu……..It should be enough to this degree」

There was no change in his arrogant tone even though he was speaking to himself. For Harold, it seemed as though this was how he spoke originally.
Leaving that aside, for the time being, he disguised the vicinity as though it was the aftermath of a fire. Later, for the act, to show this off, if he just made a pillar of fire, it would be thought that it wasn’t a mystery that the corpse had been burnt off.

Honestly, he was a bit anxious. Or rather, he was full of anxiety.
Since his decision would divide whether a person died or not, there was no way his mind could be calm.

After all, they are game characters – Even if he thought of it like that, after actually exchanging words with them and experiencing those emotions, they were already human beings as far as Kazuki was concerned. He couldn’t possibly view them as just computer icons.
No matter how much preparations he had setup, 「With this, its absolutely fine」- he probably couldn’t be convinced that that was the case.

On the contrary, currently for Kazuki, that was fortunate.
When he came to his senses, he was lost in a world which seemed to be inside a game, and he was currently personally experiencing the unprecedented situation of possessing a character’s body.
Under such a situation, it wouldn’t be easy to keep calm.

However, presently, Kazuki could see the life-threatening crisis approaching him, and since he was doing his all to avoid it, he didn’t have the leeway to be concerned with other affairs. It was close to a kind of running away from reality, but it was an unshakeable fact that by doing so, he maintained mental stability.

With this, is it really fine; Do any defects exist in the plan that I have thought out; Is there anything more that I have to do – Kazuki, without stopping these thoughts, was immersed in making careful preparations until the sun set.

And then, the long awaited full-moon night came.
In the forest illuminated by moonlight, Clara arrived, lead by the soldier.

She wasn’t wearing the maid outfit that servants normally wore, but casual clothes often seen in the town. During daytime, Kazuki had sent the soldier to buy them, and had ordered him to tell her to change into those clothes.

「Umm……..」

「Keep quiet」

He rudely interrupted Clara, who was uneasy. Even now, Kazuki was extremely nervous.
For a while, the strained silence continued. Kazuki, Norman, Clara and soldier A- the one who was slacking off yesterday-The thing that broke off the silence which had descended upon these people, was the sound of a horse’s hooves impacting on the ground, from far away.

「…….Finally」

Deep from inside the forest, from the the direction of the town, the ones who appeared were the soldier, who was brushing aside plants, and a small girl, riding on 2 horses.
When they saw each other, Clara and the girl simultaneously raised their voices.

「Mama!」

「Colette!」

Clara strongly embraced the little girl, who was let down from the horse. With that in his peripheral vision, Kazuki received the report from the soldier.

「Sorry for being late, Harold-sama. It took some time to cross the forest while pulling the horse, so………」

「That is inconsequential. While bringing that girl, was your figure seen by the town-folk?」

「No problem. But, it seems as though a person going from the town to the mansion like her, has leaked out the circumstances, and rumors that Clara was already going to be killed are spreading out」

「Tsk」

He involuntarily clicked his tongue. Now that it was mentioned, it was obvious, but he didn’t think that far ahead.
As expected, he still wasn’t calm enough.

But for now, he didn’t have the leisure to worry about it. He put off regretting and reflecting for a later time.
To the 2 people who were hugging each other with tears floating in their eyes, he talked to them in a compromising tone.

「I’ll present 2 choices to you bastards」

In front of the faces of the 2 people who were looking up at Kazuki, he raised up his index finger.

「First, die here」

Towards Kazuki’s words, Colette let out a voice as though she was convulsing. In contrast to that, Clara was staring straight-forwardly at Kazuki’s eyes. In front of their eyes, he next raised up his second finger.

「Second, discard this land and start a new livelihood outside the Stokes territory」

「Eh?」

With this suggestion, as expected, even Clara opened her eyes wide. Outside the territory, in other words, if they migrated to another noble’s territory, the Stokes house couldn’t interfere with their lives.
That is, acquittal.

「If the latter option is chosen, then it will be declared that you bastards are dead. Coming back here once again isn’t permitted and all the connections made until now must be severed」

「………Will you forgive me?」

Murmuring as though partly in a daze, Clara uttered that.

「About what?」

But, in a haughty manner, Harold asked that question in return. As for Kazuki, he wanted to tell -「What is it about? 」- and play dumb with a smile.

First of all, the cause of this racket was when Harold bumped into Clara, who was watering the flower bed, and after slipping down he got dirty.  It couldn’t just be called as pitiful, getting killed for such a thing.
For this reason, the resentment Colette felt towards Harold in the original game was extremely high.

Naturally, Kazuki didn’t even think of it as anything and it wasn’t as though he was angry, since his consciousness only surfaced after the incident.

「It’s fine, so quickly choose. As for me, it would be convenient and helpful if I killed you here and now」

「………I’m extremely sorry. I feel that I still want to continue living with this girl」

>(Right~)

With this, if she told something like -「Please kill me」- all the troubling things he had worked for, would come to nothing.
First of all, there was no way Kazuki could carry out the act of killing people.

「Fu~n, boring. Then, take this and go」

Kazuki produced a jute bag from his breast pocket and casually threw it towards them. Opening that drawstring bag and casting a glance at the insides, Clara stiffened up due to being surprised once again.

「Th, this is ……..?」

「Consolation money.  The money itself was the allowance his father had given, when Harold had told that he wanted a sword and so, it was hard for Kazuki to accept that gratitude frankly.

「I’ll give this to you」

As though hiding his embarrassment, Kazuki also handed over a thing to Colette. It was a necklace which had the emblem of the knight order of the Saint King -a single-edged sword imitating  wings, giving off a silvery obsidian shine- as an ornament. It was an article which he had discovered when he was in the middle of thoroughly searching Harold’s room.

「Never let this part from you, always wear it around your neck. This is the condition for letting you bastards run away. Understood?」

「Ye, yes」

Although she was frightened, Colette nodded.

「……….But, if a guy who wants it appears, give it to him. Only give it to a guy whose age is around yours and appears to be a bit skilled. In exchange for that, make him promise to protect you as a knight」

「Uhh……?」

Colette was confused at Harold’s excessively detailed orders. Even if he wanted to explain it in a more simplified manner, his mouth wouldn’t allow him to do that.
Thereupon, a timely help came from beside him.

「Harold-sama is telling you to hand it over to a person who would protect you」

Nice translation – thinking that, Kazuki clenched his fist lightly and did a Guts-pose.
Colette who understood its meaning this time, rigorously nodded her head twice.

「Un, understood」

「Then go already. It is unbearable for me to be troubled by you bastards anymore」

Turning around, Kazuki gave orders to the 2 soldiers. It was arranged that Clara and Colette were to ride the horses from here and were to be lead until the the vicinity of the highway. After that, there was no other choice than to leave it to the soldiers A, B and the coachman of the horse-drawn cart.

「Harold-sama. Really, thank you very much」

Just before straddling onto the horse, Clara and Colette together, bent their waist deeply, announced that, and then left.
Undoubtedly, they were showing their gratitude for him doing everything that was possible, for them.

However, originally speaking, Harold was the cause for all this so there was no reason for them to thank him. Certainly, if it weren’t for Kazuki, Clara might have died, but in the first place, if it weren’t for Harold, then there was no way they would have fallen into such a predicament.

>(For a rescue operation when I’m acting in my own play, even if you express gratitude……)

At least, there was no way he could feel proud. Well, it’s fine since Clara and Colette can live happily after this – thinking that, for the time being, he put a stop to the gloomy feelings in his heart.
There was one last job left to do.

「Norman, go back first」

「………Understood」

Norman responded to Harold’s command after hesitating for a breath. Looking at Harold’s expression, which seemed as though he was brooding over something, he hesitated because he was thinking whether it would be fine to leave this boy alone.
However, that expression returned back to a calm one in a very small amount of time. In that case, now isn’t the time to unnecessarily interject – thinking that, Norman decided to withdraw.

And then, he immediately realized that it was a mistake.

While he was reluctantly heading back to the mansion, the wind carried Harold’s voice to Norman’s ears.
When the voice, which was broken due to it being mixed among the sound of rustling of the tree leaves, reached his ears, Norman reflexively stopped walking.

「Ha, unsightly face………no value in living……….」

The boy’s voice, which could be heard faintly, contained self-derision

「No way……..forgiven……..」

As though repenting for one’s sins

「Life……..useless…… At least, if…….death………,right?」

And yet, it contained a sharpness which could cut through one’s body.

The monologue of a 10 year old boy. With a cleverness unbecoming of a child, he saved the parent and child, and he, who had accomplished a praise-worthy thing, was suffering.
All alone, so that no one could find out.

「It’s over–『Flame Column』」

>(Gou)

A thunderous roar, together with a hot wind blew through the forest. The pillar of fire, which was growing higher and higher, as though it was the manifestation of the feelings inside Harold’s heart, was fiercely blazing.

The conflict held within Harold. Norman, catching a glimpse of that part and being petrified while in a daze, couldn’t move until Harold came back, stamping on leaves and branches.
Seeing Norman like that, Harold’s expression warped.

 I should have ordered you to go back first」

Kazuki’s tone became rough. This was because, just now, he had spoken out the dialog of the event.
In a place where nobody was present, mocking and laughing at a Clara who had already left long ago, and talking to himself while murmuring – this was a shame play where his dark history shined brilliantly. If somebody heard that, it was at the level where he would hang himself or at least seriously consider doing it.

Much less, if people started thinking that Harold was a sad person who had chuunibyou, then it wouldn’t just end with the destruction of his character. He would have to silence anyone who would expose that shameful behavior, because if he didn’t, then there was a possibility that in the future it would lead to a troublesome situation.

「Everything that happened, everything that you saw and everything that you heard today, forget about them completely. Otherwise, without telling it to anyone in the future, carry it to your grave. I won’t accept an answer other than a “Yes”」

As though vigorously pressing for an answer, he keeps talking to Norman without a pause.
It was something that he was desperate for to that extent, but that desperation held a different meaning in Norman’s eyes.

>(Trying to hide his weakness to such an extent, why………Even though he is still a child, just how big of a responsibility is Harold-sama trying to carry)

The attitude obstinate enough to not depend on anyone else was sorrow itself.
But Norman could do nothing other than to nod his head.

Taking a glance at Norman who showed his acknowledgement, Harold left with a quick pace. That retreating figure looked as though it was extremely worn out.

Perhaps, Harold, taking his biological parents as a good example of what not to do, without having any real power presently, was trying to avoid a direct confrontation and was deceiving them.
He couldn’t do anything other than that. If by chance, his thoughts were discovered by his parents due to a third party, there was no mistake that it would give rise to some discord.

If it were a normal kid, they would likely clash with their parents as it was, but since this boy was sagacious, he might have understood the dimensions by which it would affect the future, if he had done that.
For the sake of it not becoming like that, he had chosen to deceive his parents and all the people in the mansion. Thus, not a single person who had anything to do with the Stokes house could see through his facade to know what he really was like.

His motive for acting like he always was, wouldn’t have been clear if it wasn’t for this irregular incident, and most probably, it also wouldn’t be found out in the future.
Towards the boy who was continuously fighting alone, he, who had judgemental thoughts, didn’t have any rights to be worried about him.
Norman found that to be unbearably vexing.

「………No, I can’t just keep regretting and do nothing」

I’m surely going to keep regretting the fact that I couldn’t get close to Harold during the past 10 years, for my whole life.
But, doing only that, won’t solve anything. These 10 years of inactivity, there’s no way other than to get it back from using all the remaining time, from now on.

Until the day that kind boy loses the reason to keep tormenting his heart under the pretense of evil.

◇

How much time has passed from being shaken due to the cart.
While stroking the hair of my daughter, who was sleeping using my lap as a pillow, I noticed the sky growing lighter. Daybreak must already be near.

But still, Clara wasn’t feeling drowsy and was feeling a fluffy sensation as though she was floating in midair.
In these past 2 days, her world had turned around completely.

When she was imprisoned in the jail, she already thought that she was going to be executed. The only thing she felt was the fear towards death and despair for leaving her only daughter alone.
The one who saved her from that was a boy, whose age differed from her daughter’s by only a single year.

For the sake of a servant, who could be changed easily any number of times, he had handed over clothes, horses and a cart and also, a huge amount of money for them to start a new life, free of charge.
There was no way Harold’s parents, who had abused Clara by calling her an 『inferior species』, would allow such a thing. Which meant that this was something he himself had done.

While they were being escorted to the cart, she heard from the 2 soldiers about how the boy had saved them.
First, telling that he wanted a sword from a famous blacksmith in Lietze, he obtained the transit permit. He gave it for the coachman’s use and then, asked him to pretend departing to Lietze early in the morning, while he hid in the forest which was in the vicinity of the highway, where there were less people, a bit away from the town.
Meanwhile, the 2 soldiers, who were in civilian clothes so that they wouldn’t stand out, went to the town to loan the horses and to buy and gather the necessary goods. 「Thanks to that, we ran around the town for the whole day」- smiling wryly while telling that, but also feeling a bit proud, the soldiers narrated.

And then, after entering Brosch, Clara and Colette would remain in the village, while the horse-cart and 1 of the soldiers would continue on to Lietze. It wouldn’t look to be suspicious because, on the shortest route from the Stokes territory to Lietze, they would need to pass through Brosch village.
The round trip to Lietze would roughly take 4 – 6 days, so a delay of 1 full day was also within calculations.

When Clara heard this, she couldn’t help but be surprised.
To add to that, the money given to her was the money given to him by his father to buy a sword for himself.

Then, when they went to Lietze, they wouldn’t be able to buy the sword – when Clara was worried about that, the coachman stifled his laughter.
When she asked the reason for his laughter, he told her that he had asked Harold the same question when he had revealed the series of plans to him. And, he had gotten this reply back.

 Won’t it be fine if you choose a cheap sword randomly」

It was as though there was some gentleness mixed in those sharp words. Maybe he had sensed that, since hearing the coachman telling it as though it was enjoyable, left a deep impression on her.

By no means could Clara’s lifetime be called as smooth sailing but still, Colette being born and encountering Harold, she thought that those 2 things were irreplaceable.

「Clara-san, are you awake?」

「Yes. Did something happen?」

「Brosch village is coming into view」

Hearing the coachman’s words, she peeked out from behind.
The thing that came into Clara’s view was, illuminated by the sun rays rising from the horizon and covered in morning mist, a sparkling Brosch village.

「We’ll have arrived by the time the sun has completely risen. Until then, how about resting for a while?」

「Thank you for your consideration. But, for now, I want to burn this into my memory………」

「Is that so. Well, I understand, those feelings」

Clara, the coachman and even the 2 soldiers, had their hearts stolen by the scenery which was like an illusion.
By that form of Brosch village, which was as though it was blessing Clara’s and Colette’s new life.

extension: markdown


text:
# Lesson 07

## WIP - Just an outline for now

In this lesson we're going to make two changes:
1. We'll add a more interesting background to give the game more visual appeal.
2. We'll introduce the concept of points to make the game more exciting: we'll give the player points for each asteroid they dodge and display their total score in the status bar.

[Add link to initial code - should just be final code of the last lesson]

# Changing the Background
Currently, the background of our game is a uniform blue color. We implemented this [way back in Lesson 02](../02/firstgame.py) using `screen.fill()` in our `draw()` function:

```python
def draw():
    screen.fill((0, 102, 255))
    ...
```

Remember that the argument to `screen.fill()`, the tuple `(0, 102, 255)` represents a color by specifying amounts of red, green, and blue to mix. The particular values we chose have given us the blue color you see when you play the game.

We'll give the game more visual appeal now by replacing this solid color background with an image:

Artist credit: Johar Singh

Download the [cosmic-background.png](cosmic-background.png) file from this lesson's directory and place it in your Mu editor's images folder (as described in [Lesson 03](../03/README.md#mu-images) [TODO: Verify this link to an anchor works on github]).

Now, replace the `screen.fill()` call in your `draw()` function with a call to `screen.blit()`, as shown in the code shown below:

def draw():
    screen.fill((0, 102, 255))
    screen.blit("cosmic-background", (0, 0))
    alien.draw()
    ...

Arguments are name of the image and a tuple representing (left, top).

Explain: "blit" is short for "bit block transfer" and has [origins that go way back in the history of computing](https://en.wikipedia.org/wiki/Bit_blit).

# Implementing Points

Objective of the game is to dodge asteroids. We'll give points for each one that you dodge.

Define dodge: asteroid has moved past the alien without colliding.

General strategy:
- define global variable to hold score
- draw the score in the status bar i.e. what's in the variable
- every time an asteroid passes without colliding, add points to the score variable. next time it gets drawn it'll reflect the new score.

Define global variable:

...
alien = Actor("alien")
alien.pos = 100, 56

alien_y_speed = 0
lives = 3
alien_can_hurt = True
score = 0
...

Draw the score:

def draw():
    ...

    # Draw status bar
    screen.draw.filled_rect(status_bar, (0, 20, 150))

    # Draw score
    screen.draw.text(str(score), topleft=(status_bar.left+10, status_bar.top+5), fontsize=20)

    if lives <= 0:
        screen.draw.text("Game Over", center=(250, 150), fontsize=60)
        return
    ...

Note: important to draw score above the check for lives <= 0 so that we see the score on game over.

Run it now: you should see a score displayed on the left of the status bar but it should always be zero because we're not updating it yet.

Now let's add to the score when an asteroid passes the alien.

[Annotate asteroids-passing.png in Projects/CCC/Lesson07 to show relative position of asteroid.right and alien.left to explain passing]

We move the asteroids in `update()` so that's the right place to check if an asteroid has moved past the alien and update the score.

def update():
    global lives
    global alien_can_hurt
    global score

    ...

    for asteroid in asteroids:
        ...
        if alien.colliderect(asteroid) and alien_can_hurt:
            alien.image = "alien_hurt"
            lives -= 1
            print("Decreased lives to: " + str(lives))
            alien_can_hurt = False
            # sounds.eep.play()
            clock.schedule_unique(set_alien_normal, 2.0)

        if asteroid.right < alien.left:
            score += 10

Because `score` is a global variable and we're changing that variable in this function, we need the `global score` declaration at the top. [TODO: link to earlier place where global variables were explained].

Next, we check if the asteroid's right-hand side has moved to the left of the alien's left-hand side (our definition of passing), and add 10 to the score if so.

Run it and see what happens. Score should jump way too fast.

Can you figure out why? Hint: it's a very similar issue to the one we debugged with decreasing lives on asteroid collision [TODO: link to "Debugging" section of Lesson 05].

To fix, we need to only add points the first time the asteroid has passed the alien.

Explain: can do this by remembering which asteroid's we've given points from before. But easier way is to make the asteroid's themselves carry a certain number of points and take those points away on first passing.

def makeAsteroid(left, top):
    asteroid = Actor("asteroid")
    asteroid.left = left
    asteroid.top = top
    asteroid.points = 10
    return asteroid

Explain about how we can add variables to an object

Change points assignment logic as follows:

def update():
    ...

    for asteroid in asteroids:
        ...

        if asteroid.right < alien.left:
            score += 10
            score += asteroid.points
            asteroid.points = 0

Two other changes needed:
1. When the asteroid goes off the screen to the left, reset its points when bringing it back on the right.
2. When an asteroid collides with the alien, take away its points otherwise we'd be getting points for asteroids we collided with.

def update():
    ...

    for asteroid in asteroids:
        asteroid.left -= 2
        if asteroid.right < play_area.left:
            asteroid.left = play_area.right
            asteroid.top = randint(play_area.top, play_area.bottom-100)
            asteroid.points = 10

        if alien.colliderect(asteroid) and alien_can_hurt:
            asteroid.points = 0
            alien.image = "alien_hurt"
            lives -= 1
            print("Decreased lives to: " + str(lives))
            alien_can_hurt = False
            # sounds.eep.play()
            clock.schedule_unique(set_alien_normal, 2.0)

        if asteroid.right < alien.left:
            score += asteroid.points
            asteroid.points = 0

repository: spather/CousinsCodingCamp

repo_name: spather/CousinsCodingCamp


text:
## Cloudwatch Alarm to Slack Notifier

[![pypi][pypi-image]][pypi-url]
[![pyup][pyup-image]][pyup-url]
[![python-version][python-version-image]][pypi-url]

A python library to send cloudwatch alarm notifications to Slack.

## Usage

* Install the package.

```
pip install cloudwatch_alarm_to_slack
```

* It is expected this will be used as a part of a lambda.

```
from cloudwatch_alarm_to_slack.entrypoint import CloudwatchAlarmNotifier

def lambda_handler(event, context):
    CloudwatchAlarmNotifier.handle_event(event)
```

* It is required the following environment variable be set:

    - `SLACK_BOT_TOKEN`: Bot token of the slack app which should have the `chat:write` permissions.
    - `SLACK_CHANNEL`: ID of the Slack channel to which notification should be sent to.

------

If there is another usecase, please open an issue and let me know :)

<!-- Markdown links -->

[pypi-image]: https://img.shields.io/pypi/v/cloudwatch-alarm-to-slack.svg
[pypi-url]: https://pypi.python.org/pypi/cloudwatch-alarm-to-slack
[pyup-image]: https://pyup.io/repos/github/jpdhas/cloudwatch_alarm_to_slack/shield.svg
[pyup-url]: https://pyup.io/repos/github/jpdhas/cloudwatch_alarm_to_slack/
[python-version-image]: https://img.shields.io/pypi/pyversions/cloudwatch-alarm-to-slack.svg

gha_language: Python


text:
[![Build Status](https://travis-ci.org/PolymathNetwork/polymath-core.svg?branch=master)](https://travis-ci.org/PolymathNetwork/polymath-core)
[![Coverage Status](https://coveralls.io/repos/github/PolymathNetwork/polymath-core/badge.svg?branch=master)](https://coveralls.io/github/PolymathNetwork/polymath-core?branch=master)
[![Gitter](https://img.shields.io/badge/chat-gitter-green.svg)](https://gitter.im/PolymathNetwork/Lobby)
[![Telegram](https://img.shields.io/badge/50k+-telegram-blue.svg)](https://gitter.im/PolymathNetwork/Lobby)

![Polymath logo](Polymath.png)

# Polymath Core

The Polymath Core smart contracts provide a system for launching regulatory-compliant securities tokens on a decentralized blockchain. This particular repository is the implementation of a system that allows for the creation of ST-20-compatible tokens. This system has a modular design that promotes a variety of pluggable components for various types of issuances, legal requirements, and offering processes.

# ST-20 Interface Overview
## Description
An ST-20 token is an Ethereum-based token implemented on top of the ERC-20 protocol that adds the ability for tokens to control transfers based on specific rules. ST-20 tokens rely on Transfer Managers to determine the ruleset the token should apply in order to allow or deny a transfer, be it between the issuer and investors, in a peer to peer exchange, or a transaction with an exchange.

## How it works
ST-20 tokens must implement a `verifyTransfer` method which will be called when attempting to execute a `transfer` or `transferFrom` method. The `verifyTransfer` method will determine whether that transaction can be completed or not. The implementation of `verifyTransfer` can take many forms, but the default approach is a whitelist controlled by the `GeneralTransferManager`.

### The ST-20 Interface

```
contract IST20 {

    // off-chain hash
    bytes32 public tokenDetails;

    //transfer, transferFrom must respect the result of verifyTransfer
    function verifyTransfer(address _from, address _to, uint256 _amount) view public returns (bool success);

    //used to create tokens
    function mint(address _investor, uint256 _amount) public returns (bool success);
}
```

# The Polymath Core Architecture
The diagram below depicts a high-level view of the various modules, registries, and contracts implemented in Polymath Core:

![Polymath Core architecture](https://github.com/PolymathNetwork/polymath-core/blob/master/docs/images/PolymathCore.png)

## Components
### SecurityToken
`SecurityToken` is an implementation of the ST-20 protocol that allows the addition of different modules to control its behavior. Different modules can be attached to `SecurityToken`:
- [TransferManager modules](contracts/modules/TransferManager): These control the logic behind transfers and how they are allowed or disallowed.
By default, the ST (Security Token) gets a `GeneralTransferManager` module attached in order to determine if transfers should be allowed based on a whitelist approach. The `GeneralTransferManager` behaves differently depending who is trying to transfer the tokens.
a) In an offering setting (investors buying tokens from the issuer) the investor's address should be present on an internal whitelist managed by the issuer within the `GeneralTransferManager`.
b) In a peer to peer transfer, restrictions apply based on real-life lockups that are enforced on-chain. For example, if a particular holder has a 1-year sale restriction for the token, the transaction will fail until that year passes.
- [Security Token Offering (STO) modules](contracts/modules/STO): A `SecurityToken` can be attached to one (and only one) STO module that will dictate the logic of how those tokens will be sold/distributed. An STO is the equivalent to the Crowdsale contracts often found present in traditional ICOs.
- [Permission Manager modules](contracts/modules/PermissionManager): These modules manage permissions on different aspects of the issuance process. The issuer can use this module to manage permissions and designate administrators on his token. For example, the issuer might give a KYC firm permissions to add investors to the whitelist.
- [Checkpoint Modules](contracts/modules/Checkpoint): These modules allow the issuer to define checkpoints at which token balances and the total supply of a token can be consistently queried. This functionality is useful for dividend payment mechanisms and on-chain governance, both of which need to be able to determine token balances consistently as of a specified point in time.

### TickerRegistry
The ticker registry manages the sign up process to the Polymath platform. Issuers can use this contract to register a token symbol (which are unique within the Polymath network). Token Symbol registrations have an expiration period (7 days by default) in which the issuer has to complete the process of deploying their SecurityToken. If they do not complete the process in time, their ticker symbol will be made available for someone else to register.

### SecurityTokenRegistry
The security token registry keeps track of deployed STs on the Polymath Platform and uses the TickerRegistry to allow only registered symbols to be deployed.

### ModuleRegistry
Modules allow custom add-in functionality in the issuance process and beyond. The module registry keeps track of modules added by Polymath or any other users. Modules can only be attached to STs if Polymath has previously verified them. If not, the only user able to utilize a module is its owner, and they should be using it "at their own risk".

# Stepping through an issuance with the CLI Tool
First, assure that you have [setup Polymath Core properly](#setup).

The Polymath CLI (Command Line Interface) commands are operated from a *nix command prompt (unix or mac).

It can be used in three differents ways:

1. Connected to a full ethereum node:
You have to save your Parity account password to `$HOME/password.file` and run Parity with the following command to get started (make sure the node is fully synced before using the CLI tool):
```bash
parity --chain ropsten  --rpcapi "eth,net,web3,personal,parity" --unlock YOUR_ETH_ACCOUNT --password $HOME/password.file
```
2. Connected to a remote ethereum node:
You can access Ethereum via the Infura load-balanced nodes. You have to save your private key to `./privKey` file and run CLI command adding `--remote-node <network>` option.
```bash
node CLI/polymath-cli faucet --remote-node kovan
```
3. Connected to a local private test network using `ganache-cli`.
You have to save the private key for the first account generated by ganache into `./privKeyLocal`.

## Poly Faucet

If you are working on a local private network, you should run the faucet command to get Poly necessary to pay fees for the other commands.

```bash
node CLI/polymath-cli faucet
```

## Generating ST-20 token

The ST-20 Generator command is a wizard-like script that will guide technical users in the creation and deployment of an ST-20 token.

1. Edit `CLI/commands/helpers/contract_addresses.js` to make sure scripts are pointing to the correct contract addresses
2. On the terminal, run the following command:
```bash
node CLI/polymath-cli st20generator
```
3. Follow the text prompts:
    * You will be asked for a token symbol. Enter a new symbol to register or a symbol you have already registered.
    * Enter a token name (long name seen by investors) to complete the token registration process. The token will be deployed to the blockchain.
    * (Optional) If you want to issue tokens to an address you own enter the address and then how many tokens you want to issue. If you want to issue tokens to a list of affiliates press `Y` and it will update a whitelist with them and then tokens will be issued.
    Make sure the `whitelist_data.csv` and `multi_mint_data.csv` files are present in the data folder and fulfilled with the right information.
    * Choose between Capped STO and USD Tiered STO.
    * Configure the selected STO. Enter start and end times, the issuance type, and exchange rate.
4. Once the process is finished, you can run the `node CLI/polymath-cli st20generator` command again and enter the token symbol to see the STO's live-progress.

## Whitelisting investors

After starting the STO you can run a command to mass-update a whitelist of allowed/known investors.
Make sure the `whitelist_data.csv` file is present in the data folder.
The command takes 2 parameters:
- The token symbol for the STO you want to invest in
- (Optional) The size of each batch

```bash
node CLI/polymath-cli whitelist TOKEN_SYMBOL [BATCH_SIZE]
```

## Initial minting

Before starting the STO you can run a command to distribute tokens to previously whitelisted investors.
Make sure the `multi_mint_data` file is present in the data folder.
The command takes 2 parameters:
- The token symbol for the STO you want to invest in
- (Optional) The size of each batch

```bash
node CLI/polymath-cli multi_mint TOKEN_SYMBOL [BATCH_SIZE]
```

## Investing in the STO

You can run the investor_portal command to participate in any STO you have been whitelisted for.
You will be asked for an account, the token symbol and amount for the STO you want to invest in.

```bash
node CLI/polymath-cli investor_portal
```

## Transferring tokens

You can run the transfer command to transfer ST tokens to another account (as long as both are whitelisted and have been cleared of any lockup periods).
- The token symbol of the ST you want to transfer
- The account that will receive the tokens
- How many tokens to send

```bash
node CLI/polymath-cli transfer TOKEN_SYMBOL ACCOUNT_TO AMOUNT
```

## Managing modules

You can run the module manager command to view all the modules attached to a token and their status.
You will be asked for a token symbol.

```bash
node CLI/polymath-cli module_manager
```

## Dividends manager

You can run this command to create dividends and paid them out proportionally to token holder balances as of the time that the dividend was created, or at the time of a specified checkpoint that was created previously. You can choose between Ether or ERC20 dividens.

```bash
node CLI/polymath-cli dividends_manager
```

# Setting up Polymath Core
## Mainnet

### v1.3.0 (TORO Release)

| Contract                                                         | Address                                                                                |
| ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| TickerRegistry:                                               | [0xc31714e6759a1ee26db1d06af1ed276340cd4233](https://etherscan.io/address/0xc31714e6759a1ee26db1d06af1ed276340cd4233)                                              |
| SecurityTokenRegistry:                                        | [0xef58491224958d978facf55d2120c55a24516b98](https://etherscan.io/address/0xef58491224958d978facf55d2120c55a24516b98)                                              |
| ModuleRegistry:                                               | [0x31d85fffd7e38bd42d2ae0409ac149e3ef0fd92c](https://etherscan.io/address/0x31d85fffd7e38bd42d2ae0409ac149e3ef0fd92c)                                              |
| Polymath Registry:                                            | [0x06595656b93ce14834f0d22b7bbda4382d5ab510](https://etherscan.io/address/0x06595656b93ce14834f0d22b7bbda4382d5ab510)                                              |
| CappedSTOFactory:                                               | [0x2aa1b133f464ac08f66c2f702581d014e4603d31](https://etherscan.io/address/0x2aa1b133f464ac08f66c2f702581d014e4603d31)                                              |
| EthDividendsCheckpointFactory:                                  | [0x0da7ed8789348ac40937cf6ae8ff521eee43816c](https://etherscan.io/address/0x0da7ed8789348ac40937cf6ae8ff521eee43816c)                                              |
| ERC20 Dividends Checkpoint Factory:                             | [0x6950096964b7adae34d5a3d1792fe73afbe9ddbc](https://etherscan.io/address/0x6950096964b7adae34d5a3d1792fe73afbe9ddbc)                                              |
| General Permission Manager Factory:                             | [0xeba0348e243f2de2f1687060f9c795ac279c66af](https://etherscan.io/address/0xeba0348e243f2de2f1687060f9c795ac279c66af)                                              |
| Count Transfer Manager Factory:                             | [0xa662a05647a8e713be1bed193c094805d20471ff](https://etherscan.io/address/0xa662a05647a8e713be1bed193c094805d20471ff)                                              |
| Percentage Transfer Manager Factory:                             | [0x3870ee581a0528d24a6216311fcfa78f95a00593](https://etherscan.io/address/0x3870ee581a0528d24a6216311fcfa78f95a00593)                                              |

## KOVAN

### v1.3.0 (TORO Release)

| Contract                                                         | Address                                                                                |
| ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| TickerRegistry:                                               | [0xc9af1d88fe48c8a6aa8677a29a89b0a6ae78f5a8](https://kovan.etherscan.io/address/0xc9af1d88fe48c8a6aa8677a29a89b0a6ae78f5a8)                                              |
| SecurityTokenRegistry:                                        | [0xced6e4ec2ac5425743bf4edf4d4e476120b8fc72](https://kovan.etherscan.io/address/0xced6e4ec2ac5425743bf4edf4d4e476120b8fc72)                                              |
| ModuleRegistry:                                               | [0x961913dcbe2f36176bf25774337f3277796820eb](https://kovan.etherscan.io/address/0x961913dcbe2f36176bf25774337f3277796820eb)                                              |
| Polymath Registry:                                            | [0x05a6519e49e34239f78167abf293d94dae61b299](https://kovan.etherscan.io/address/0x05a6519e49e34239f78167abf293d94dae61b299)                                              |
| CappedSTOFactory:                                               | [0xde4f3cfb6b214e60c4e69e6dfc95ede3c4e3d709](https://kovan.etherscan.io/address/0xde4f3cfb6b214e60c4e69e6dfc95ede3c4e3d709)                                              |
| EthDividendsCheckpointFactory:                                  | [0x870a07d45b0f4c5653fc29a4cb0697a01e0224b1](https://kovan.etherscan.io/address/0x870a07d45b0f4c5653fc29a4cb0697a01e0224b1)                                              |
| ERC20 Dividends Checkpoint Factory:                             | [0x7e823f5df6ed1bb6cc005c692febc6aedf3b8889](https://kovan.etherscan.io/address/0x7e823f5df6ed1bb6cc005c692febc6aedf3b8889)                                              |
| General Permission Manager Factory:                             | [0x6f5fec2934a34d2e2374042cca6505f1c87ef79b](https://kovan.etherscan.io/address/0x6f5fec2934a34d2e2374042cca6505f1c87ef79b)                                              |
| Count Transfer Manager Factory:                             | [0xb540b6fa752a91c7e7834523172309e543a99a06](https://kovan.etherscan.io/address/0xb540b6fa752a91c7e7834523172309e543a99a06)                                              |
| Percentage Transfer Manager Factory:                             | [0xfe908f07e6db57aa6bbd8374e59aac86b60374b0](https://kovan.etherscan.io/address/0xfe908f07e6db57aa6bbd8374e59aac86b60374b0)                                              |

## Package version requirements for your machine:

- Homebrew v1.6.7
- node v9.11.1
- npm v5.6.0
- Yarn v1.7.0
- Truffle v4.1.11 (core: 4.1.11)
- Solidity v0.4.24 (solc-js)
- Ganache CLI v6.1.3 (ganache-core: 2.1.2)

## Setup

The smart contracts are written in [Solidity](https://github.com/ethereum/solidity) and tested/deployed using [Truffle](https://github.com/trufflesuite/truffle) version 4.1.0. The new version of Truffle doesn't require testrpc to be installed separately so you can just run the following:

```bash
# Install Truffle package globally:
$ npm install -g truffle

# Install local node dependencies:
$ npm install
```

## Testing

To test the code simply run:

```bash
$ npm run test
```

# Extending Polymath Core

1. Deploy `ModuleRegistry`. `ModuleRegistry` keeps track of all available modules that add new functionalities to
Polymath-based security tokens.

2. Deploy `GeneralTransferManagerFactory`. This module allows the use of a general `TransferManager` for newly issued security tokens. The General Transfer Manager gives STs the ability to have their transfers restricted by using an on-chain whitelist.

3. Add the `GeneralTransferManagerFactory` module to `ModuleRegistry` by calling `ModuleRegistry.registerModule()`.

4. Deploy `TickerRegistry`. This contract handles the registration of unique token symbols. Issuers first have to claim their token symbol through the `TickerRegistry`. If it's available they will be able to deploy a ST with the same symbol for a set number of days before the registration expires.

5. Deploy SecurityTokenRegistry. This contract is responsible for deploying new Security Tokens. STs should always be deployed by using the SecurityTokenRegistry.

## Deploying Security Token Offerings (Network Admin Only)

Security Token Offerings (STOs) grant STs the ability to be distributed in an initial offering. Polymath offers a few out-of-the-box STO models for issuers to select from and, as the platform evolves, 3rd party developers will be able to create their own offerings and make them available to the network.

As an example, we've included a `CappedSTO` and `CappedSTOFactory` contracts.

In order to create a new STO, developers first have to create an STO Factory contract which will be responsible for instantiating STOs as Issuers select them. Each STO Factory has an STO contract attached to it, which will be instantiated for each Security Token that wants to use that particular STO.

To make an STO available for Issuers, first, deploy the STO Factory and take note of its address. Then, call `moduleRegistry.registerModule(STO Factory address);`

Once the STO Factory has been registered to the Module Registry, issuers will be able to see it on the Polymath dApp and they will be able to add it as a module of the ST.

Note that while anyone can register an STO Factory, only those "approved" by Polymath will be enabled to be attached by the general community. An STO Factory not yet approved by Polymath may only be used by it's author.

# Code Styleguide

The polymath-core repo follows the [Solidity style guide](http://solidity.readthedocs.io/en/develop/style-guide.html).

# Links

- [Polymath Website](https://polymath.network)
- [Ethereum Project](https://www.ethereum.org/)
- [Solidity Docs](https://solidity.readthedocs.io/en/develop/)
- [Truffle Framework](http://truffleframework.com/)
- [Ganache CLI / TestRPC](https://github.com/trufflesuite/ganache-cli)


text:
---
title: Queue Event player
---

# Queue Event player

The *queue event player* is a
[config player](index.md)
that's used to play queue events.

Video about events in MPF:

## Usage in config files

In config files, the event player is used via the `queue_event_player:`
section.

## Usage in shows

None. (It's not valid in shows since it doesn't make sense in shows.)

## Config Options

See [queue_event_player:](../config/queue_event_player.md) for
config details.

repository: missionpinball/mpf-docs

repo_name: missionpinball/mpf-docs


text:
![opsmatters](https://i.imgur.com/VoLABc1.png)

# New Relic API
[![Build Status](https://travis-ci.org/opsmatters/newrelic-api.svg?branch=master)](https://travis-ci.org/opsmatters/newrelic-api)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.opsmatters/newrelic-api/badge.svg?style=blue)](https://maven-badges.herokuapp.com/maven-central/com.opsmatters/newrelic-api)
[![Javadocs](http://javadoc.io/badge/com.opsmatters/newrelic-api.svg)](http://javadoc.io/doc/com.opsmatters/newrelic-api)

A Java client library for the New Relic Monitoring and Alerting REST APIs built using Jersey and Gson.
The library implements over 110 operations across all of the available 35 New Relic services.
It is primarily used by applications to automate the configuration of New Relic Monitoring, Alerting and Dashboards, but can also be used for extracting incident and metric data, executing Insights queries, and uploading plugin metrics.

The following New Relic APIs are currently supported:

### REST v2 API
* Alerts Channels (List, Create, Delete)
* Alerts Policies (List, Create, Update, Delete)
* Alerts Policy Channels (Update, Delete)
* Alerts Conditions (List, Create, Update, Delete)
* Alerts Entity Conditions (List, Add, Remove)
* Alerts NRQL Conditions (List, Create, Update, Delete)
* Alerts External Service Conditions (List, Create, Update, Delete)
* Alerts Plugins Conditions (List, Create, Update, Delete)
* Alerts Synthetics Conditions (List, Create, Update, Delete)
* Alerts Infrastructure Conditions (List, Create, Update, Delete)
* Alerts Events (List)
* Alerts Violations (List)
* Alerts Incidents (List)
* Applications (List, Show, Update, Delete, Metric Names, Metric Data)
* Application Hosts (List, Show, Metric Names, Metric Data)
* Application Instances (List, Show, Metric Names, Metric Data)
* Browser Applications (List, Create)
* Mobile Applications (List, Show, Metric Names, Metric Data)
* Key Transactions (List, Show)
* Plugins (List, Show)
* Plugin Components (List, Show, Metric Names, Metric Data)
* Servers (List, Show, Update, Delete, Metric Names, Metric Data)
* Deployments (List, Create, Delete)
* Labels (List, Create, Delete)
* Users (List, Show, Reset Password)
* Usages (List)
* Dashboards (List, Show, Create, Update, Delete)

### Synthetics v1/v3 API
* Monitors (List, Show, Show Script, Create, Update, Update Script, Patch, Delete)
* Labels (List, Create, Delete)
* Locations (List)

### Plugins v1 API
* Plugin Metrics (Metric Data)

### Insights v1 API
* Query (List)

### Partner v2 API
* Accounts (List, Show, Create, Update, Delete)
* Users (List, Create, Update, Delete)
* Subscriptions (List, Show, Create)

## Examples

A detailed set of examples of the usage of each of the APIs can be found on [the API site](src/main/java/com/opsmatters/newrelic/api).

## Prerequisites

A New Relic account with an Admin user.
The user needs to generate an [Admin API Key](https://docs.newrelic.com/docs/apis/rest-api-v2/getting-started/api-keys)
to provide read-write access via the [New Relic REST APIs](https://api.newrelic.com).
The Admin API Key is referenced in the documentation as the parameter "YOUR_API_KEY".

Other keys:
* For executing Insights queries, the Account ID is required and a Query key will need to be generated.
    - The Account ID is referenced in the documentation as the parameter "YOUR_ACCOUNT_ID".
    - The Query Key is referenced in the documentation as the parameter "YOUR_QUERY_KEY".
* For sending Plugins metrics, the main license key for the account is required.
    - The License Key is referenced in the documentation as the parameter "YOUR_LICENSE_KEY".
* For executing Partner API operations, the Partner ID is required and a Partner API key will need to be generated.
    - The Partner ID is referenced in the documentation as the parameter "YOUR_PARTNER_ID".
    - The Partner API Key is referenced in the documentation as the parameter "YOUR_PARTNER_ACCOUNT_KEY".

## Installing

First clone the repository using:
```
>$ git clone https://github.com/opsmatters/newrelic-api.git
>$ cd newrelic-api
```

To compile the source code, run all tests, and generate all artefacts (including sources, javadoc, etc):
```
mvn package -Dnewrelic.api_key="<YOUR_API_KEY>" -Dnewrelic.query_key="<YOUR_QUERY_KEY>" -Dnewrelic.license_key="<YOUR_LICENSE_KEY>" -Dnewrelic.account_id="<YOUR_ACCOUNT_ID>"
```

## Running the tests

To execute the unit tests:
```
mvn clean test -Dnewrelic.api_key="<YOUR_API_KEY>" -Dnewrelic.query_key="<YOUR_QUERY_KEY>" -Dnewrelic.license_key="<YOUR_LICENSE_KEY>" -Dnewrelic.account_id="<YOUR_ACCOUNT_ID>"
```

The following tests are included:

* AlertServicesTest: Creates several alert channels, an alert policy with several conditions and then deletes them.
* ApplicationServicesTest: Creates or gets several types of applications, and then carries out various operations on them.
* UserServicesTest: Gets the users for an account.
* UsageServicesTest: Gets the usages for a product.
* SyntheticsServicesTest: Creates several types of monitors, adds labels to them, and then deletes them. Also gets the list of locations.
* InsightsServicesTest: Executes an NRQL query and then parses the result.
* PluginsServicesTest: Sends a set of plugin metric timeslices to New Relic.
* DashboardsServicesTest: Creates several dashboards, updates them, lists them, and then deletes them.

## Deployment

The build artefacts are hosted in The Maven Central Repository.

Add the following dependency to include the artefact within your project:
```
<dependency>
  <groupId>com.opsmatters</groupId>
  <artifactId>newrelic-api</artifactId>
  <version>1.0.11</version>
</dependency>
```

## Built With

* [Jersey](https://jersey.github.io/) - RESTful Web Services in Java
* [Gson](https://github.com/google/gson) - Java serialization/deserialization library
* [Guava](https://github.com/google/guava/wiki) - An open-source set of common libraries for Java
* [Maven](https://maven.apache.org/) - Dependency Management
* [JUnit](http://junit.org/) - Unit testing framework

## Contributing

Please read [CONTRIBUTING.md](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning

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

## Authors

* **Gerald Curley** - *Initial work* - [opsmatters](https://github.com/opsmatters)

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

## License

This project is licensed under the terms of the [Apache license 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).

Copyright (c) 2018 opsmatters

repository: cortexapps/newrelic-api

gha_language: Java

repo_name: cortexapps/newrelic-api


text:
The script *visualize_embeddings.py* allows you to visualize word embeddings on tensorboard. Depending on the embeddings you want to visualize you will have to adapt the paths in the script.

After running the *visualize_embeddings.py* script you can inspect the embeddings on tensorboard by running:

tensorboard --logdir='~/lstmLanguageModel/models/tensorboard/embedding_visualization/'


text:
---
layout: post
title: "Just Born Jelly Beans: Original Fruit Flavored"
brand: Just Born
variety: Original Fruit Flavored
date: 2016-10-31
permalink: just-born-jelly-beans
image: just-born-jelly-beans.jpg
image-credit: peepsandcompany.com
image-layout: float
---

Celebrating the greatest day of the year for candy lovers,
here's a very special Halloween review!
(Well, honestly, there's nothing particularly special about it.
I just really wanted to get a review out on Halloween.)

Just Born is one of the classic jelly bean brands.
You may not recognize the Just Born name,
but you almost certainly know other candy that they produce.
Just Born is the parent company of Mike and Ike, Hot Tamales,
and Marshmallow Peeps.

Jelly bean lovers may be thinking to themselves,
"Hey, aren't there Mike and Ike jelly beans out there, too?"
Why, yes! Yes there are. And the next review will discuss those,
and compare them to their parent company's beans.
Are they even any different at all?
We'll find out next time, but for now, let's see how Just Born Jelly Beans rate.

## Size and shape

Just Born Jelly Beans have a very consistent size that is right in
the sweet spot of jelly bean sizes, to me.

Shape, however, is another matter. It's a bit of a crapshoot in that department.
I'll give them credit for caring enough to attempt adding a dimple,
but the results of that attempt aren't particularly great.
Most of the beans end up with an angular shape to them,
resembling a sort of rounded trapezoidal prism, if that makes any sense.

**3 out of 5 beans**

## Chewability

In the chewability category, the Just Born beans rate very well.
The shell is not too hard, and the insides require just the right amount of
effort to not feel soft.

The one knock on the chewability here is that the insides
can be a bit too sticky, requiring a significant amount of tongue effort –
sometimes a toothpick or an immediate flossing –
to get all of it off your teeth.

**4 out of 5 beans**

## Texture

For my tastes, these beans have a flawless texture.
The shell is substantive and breaks apart cleanly, without getting grainy.
The insides are very pleasantly smooth.

**5 out of 5 beans**

## Taste and flavor

Flavors

:pineapple: Pineapple

:lemon: Lemon

:green_heart: Lime

:orange: Orange

:strawberry: Strawberry

:cherries: Cherry

:grapes: Grape

:wavy_dash: Licorice

Hooray for the return of licorice!

Just Born Jelly Beans may not have the most accurate flavors in the world,
but overall, they do a solid job.
The flavors are all distinct, and do a decent job in
representing their real-world counterparts.
(I think. I'm starting to wonder if I'm just recognizing the traditional
taste of the artificial flavors for each of these fruits.)

As with the [Life Savers beans](/life-savers-jellybeans),
a little more acidity wouldn't hurt.

**8 out of 10 beans**

## The one-of-each test

Perhaps the ultimate test of a bag of jelly beans is how enjoyable it is
to take one of each flavor and eat them all at the same time.[^1]

These disappointed me a bit in this category.
On the flavor front, the flavors became indistinct very rapidly,
and the resulting monoflavor was very dull,
resembling a generic white sugar flavor.

In terms of volume of candy in the mouth,
seven beans of this size
(though I like the size for single beans or groups of two or three)
is pushing the limit a bit.

**3 out of 10 beans**

## Conclusion

Category         | Score
---------------- | ---------------
Size and shape   | **3**/5 beans
Chewability      | **4**/5 beans
Texture          | **5**/5 beans
Taste and flavor | **8**/10 beans
One-of-each test | **3**/10 beans
---------------- | ---------------
_Total_          | **23**/35 beans

I expected a bit higher of a rating from these classic jelly beans,
but they were really brought down by the disappointing one-of-each test.

In contrast to the Life Savers Jellybeans, which scored the same overall,
I will almost certainly buy these beans again,
because I still love them in smaller mouthfuls.
Plus, licorice!

(And now I begin to wonder if the weighting of the one-of-each test category
is too high for how I actually make purchasing decisions. Oh well.)

---

[^1]: This test is specific to fruit flavors _only_. While non-fruit flavors like licorice or buttered popcorn may be welcome, they are exempt from this test. Because that's just nasty.

repository: Scotchester/jellybeans

branch_name: refs/heads/gh-pages

gha_language: CSS

repo_name: Scotchester/jellybeans


text:
# Security Policy

## Supported Versions

| Version | Supported          |
| ------- | ------------------ |
| 1.2.x   | :white_check_mark: |
| < 1.2   | :x:                |

## Reporting a Vulnerability

If you believe you have discovered a vulnerability in Textile Language Features, or have a security incident to report, email to [gehdoc.textile<EMAIL_ADDRESS>and include the word "SECURITY" in the subject line.

We will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.

repository: GehDoc/vscode-textile-preview

gha_language: TypeScript

gha_license_id: NOASSERTION

repo_name: GehDoc/vscode-textile-preview


text:
# Deep Space Pirates
...a long time ago, in a galxy not enough far, far, away there were young engineers, just out of university, wanting to learn more, to do better, to go further.

Made strong by their titanic ignorance of what it actually takes to develop a video game, they grabbed their keyboards and set out to work.

![Codeplex page screenshot](GoodbyeCodeplex.png)
[(The Sourceforge page is still there!)](https://sourceforge.net/projects/dspirates/)

Many things happened in life during their quest. Such events as: Codeplex was shut down.

So this repo had to happen.

Did those enthusiastic, foolish and hopeless engineers learn the real lesson?

They themselves doubt it. But it was a fun attempt!

## A special thanks, once again...
...to [Marco](https://github.com/ilpropheta) and [Alessio](https://www.researchgate.net/profile/Alessio-Castorrini), who then went on to much greater things, but still granted me the honor of keeping our code and art safe.

This "old shame" of ours is but one of the reasons why you can see their names so often in the repositories around here.


text:
---
layout: default
---

# 1997-12-23 - Re: Completely anonymous communications ARE only for "Criminals"

## Header Data

From: The Sheriff<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: a14a667a39f577494782899da51685ef2c1ef2654bb0a3a67afc397ef553fd63

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-12-23 10:32:34 UTC

Raw Date: Tue, 23 Dec 1997 18:32:34 +0800

## Raw message

```
{% raw  %}From: The Sheriff<EMAIL_ADDRESS>Date: Tue, 23 Dec 1997 18:32:34 +0800
To<EMAIL_ADDRESS>Subject: Re: Completely anonymous communications ARE only for "Criminals"
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

>> :Why would a pager company want to block calls from pay phones?
>>
>> Because they (the pager companies) have been ordered to pay the charges
>> related to calls made to their service from pay phones.  18.5 cents per call
>> was the number the fed agreed to.  Keeping up with the telecommunications
>> industry is difficult, eh?

Very interesting.  That hasen't hit my area, as far as I know.

In addition, paging from a pay phpne (at least, where I'm located)
is of no use unless you're using a telephone number to alert the
owner of the pager to your location (which makes it easier to find
my friends, granted), since pay phones have been re-hardwired to
reject incoming calls.

Best wishes and fresh-roasted peanut taste,
The Sheriff. -- ***<REPLY TO<EMAIL_ADDRESS>- ---
As kinky as it sounds, finger me to see my PGP key and
confirm the signature attached to this message.
- ---
Any and all SPAM will be met with immediate prosecutory
efforts.  Solicitations are NOT welcome here!
- ---
        ----BEGIN INFLAMATORY BLOCK----
Version: 160 (IQ)
Comments: Definitely one of their greatest misses.

Reporter: "Do you know what Public Enemy is?"
- ---
Citizen: "Public enemy?"
          [long pause]
         "Probably somebody in office."
        -----END INFLAMATORY BLOCK-----

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0 for non-commercial use <http://www.pgp.com>
Charset: noconv

iQEVAwUBNJ+DVwBMw4+NR29ZAQHt5gf/efGXE/0jPvQvtDFri//drmzhE4dRIU6I
jD1JsLmLrjvNUEzzFo8QNpe4q7Fbx9HvQyfDjjIC19F/4yHv2kFs+PcQ1C49s1q5
dc/BXOrxvoJTN9HSiQ56FYosAUU2KnJJ9HalIb52CzajpJsFCqUJEVww0djqKb7v
XIqXCY3Ax8cNsxhS/F/AnWeq0FC2ONQCcNWWGHPc0h77KEutPjY2yDPwSXA2Wb2E
+xqEqC4D/mZmXYc5AWe8VjXLyUDZ7sUT4K7UmL13y0wC9X3NFKZgsUC5YPV3Wb5j
lTeE6RHQG38F+/ozYsWanYFXtjJ8VWMX4xK73P0qL6ieQtFvyrPHMQ==
=ixle
-----END PGP SIGNATURE-----

{% endraw %}
```

## Thread

+ Return to [December 1997](/archive/1997/12)

+ Return to "[Adam Back <aba@dcs.ex.ac.uk>](/authors/adam_back_aba_at_dcs_ex_ac_uk_)"
+ Return to<EMAIL_ADDRESS><bill.stewart@pobox.com>](/authors/bill_stewart_at_pobox_com_bill_stewart_at_pobox_com_)"
+ Return to "[Charlie Comsec <comsec@nym.alias.net>](/authors/charlie_comsec_comsec_at_nym_alias_net_)"
+ Return to "[Dave Emery <die@die.com>](/authors/dave_emery_die_at_die_com_)"
+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to<EMAIL_ADDRESS>(Igor Chudov @ home)](/authors/ichudov_at_algebra_com_igor_chudov__at__home_)"
+ Return to "[Joichi Ito <jito@eccosys.com>](/authors/joichi_ito_jito_at_eccosys_com_)"
+ Return to "[Paul Bradley <paul@fatmans.demon.co.uk>](/authors/paul_bradley_paul_at_fatmans_demon_co_uk_)"
+ Return to "[Rabid Wombat <wombat@mcfeely.bsfs.org>](/authors/rabid_wombat_wombat_at_mcfeely_bsfs_org_)"
+ Return to "["Robert A. Costner" <pooh@efga.org>](/authors/robert_a_costner_pooh_at_efga_org_)"
+ Return to "[Steve Schear <schear@lvdi.net>](/authors/steve_schear_schear_at_lvdi_net_)"
+ Return to "[The Sheriff <sheriff@speakeasy.org>](/authors/the_sheriff_sheriff_at_speakeasy_org_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"
+ Return to "["William H. Geiger III" <whgiii@invweb.net>](/authors/william_h_geiger_iii_whgiii_at_invweb_net_)"

+ 1997-12-20 (Sun, 21 Dec 1997 02:26:45 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re: UCENET II and Peter duh Silva)](/archive/1997/12/529fb5b5279745f08332b3f40c38bb55e568677c10e78f9d0d7c874d29736e0a) - _Charlie Comsec<EMAIL_ADDRESS>  + 1997-12-20 (Sun, 21 Dec 1997 02:55:07 +0800) - [Re: Is Anonymous Communication only for "Criminals"?](/archive/1997/12/0153d818612d8930a7b3955e57c363db3e1ba362a3707b240afd7ea91d03fa03) - _Tim May<EMAIL_ADDRESS>    + 1997-12-22 (Mon, 22 Dec 1997 11:15:44 +0800) - [Re: Is Anonymous Communication only for "Criminals"?](/archive/1997/12/9c27d65e71c034875d4e271875bc8ce0891bb8ed4c677c7ee171daf9a568e792) -<EMAIL_ADDRESS>(Igor Chudov @ home)_
  + 1997-12-20 (Sun, 21 Dec 1997 04:12:23 +0800) - [Re: Is Anonymous Communication only for "Criminals"?](/archive/1997/12/1f002e88e466f5a167523d561cbed0902e05ad1be4095d19ff6a36b94df93ec6) - _"Robert A. Costner"<EMAIL_ADDRESS>  + 1997-12-20 (Sun, 21 Dec 1997 05:29:20 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re: UCENET II and Peter duh Silva)](/archive/1997/12/5c7bf70186ad9761da965bc7b471eaaa95e56ca84830223afb0ab926f884a721) - _Dave Emery<EMAIL_ADDRESS>    + 1997-12-21 (Sun, 21 Dec 1997 13:51:25 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re: UCENET II and Peter duh Silva)](/archive/1997/12/d57221b4963e7b4b4bdbeda1bac7dc31b1702369c9f7cd19dac60ee65efa7920) - _Rabid Wombat<EMAIL_ADDRESS>      + 1997-12-21 (Sun, 21 Dec 1997 23:31:07 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re: UCENET II and Pet](/archive/1997/12/95e493738a05ebffd0775642d1a7e0b28cb45b48c95642e4e407f99f45fd9181) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_
      + 1997-12-21 (Mon, 22 Dec 1997 07:30:57 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re:  UCENET II and Peter duh Silva)](/archive/1997/12/e7cb29c70de6b04215e84c34a13d887ffb12e67a2a5247279611dca311015dfd) - _Steve Schear<EMAIL_ADDRESS>        + 1997-12-22 (Tue, 23 Dec 1997 03:48:31 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re:  UCENET II and Peter duh Silva)](/archive/1997/12/e305fbf04c55d8c542c5fe12f120ec996ffddc59dc20d4f254d023f2433cf79a) - _Adam Back<EMAIL_ADDRESS>          + 1997-12-23 (Tue, 23 Dec 1997 23:09:18 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re: UCENET II and Peter duh Silva)](/archive/1997/12/bd6de9ffa43417f576515bd6d2884c23dda380f242dfbb58d45f2f20aab2f30e) - _Paul Bradley<EMAIL_ADDRESS>        + 1997-12-24 (Wed, 24 Dec 1997 11:52:14 +0800) - [Re: Is Anonymous Communication only for "Criminals"?](/archive/1997/12/807f9bdffbf313e6145d33ea676bd222a62193e0b4828ea02a98a60e0326f192) -<EMAIL_ADDRESS><EMAIL_ADDRESS>      + 1997-12-24 (Wed, 24 Dec 1997 11:51:47 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re:  UCENET II and Peter duh Silva)](/archive/1997/12/e6015f424677420f645d236d70f997f7c51d0f0362dae89567254bd0b1093a6c) -<EMAIL_ADDRESS><EMAIL_ADDRESS>    + 1997-12-21 (Sun, 21 Dec 1997 15:36:42 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re: UCENET II and Peter duh Silva)](/archive/1997/12/564cd938f3c878265b779a494d9b000bceabf486a8883c415754684434fb7455) - _Joichi Ito<EMAIL_ADDRESS>      + 1997-12-21 (Sun, 21 Dec 1997 17:15:36 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re: UCENET II and Peter duh Silva)](/archive/1997/12/7191c959a04767ec9378783fe73e4c963cef8b7748543d732a9a0a6c94640f96) - _"William H. Geiger III"<EMAIL_ADDRESS>      + 1997-12-21 (Sun, 21 Dec 1997 19:15:32 +0800) - [Re: Is Anonymous Communication only for "Criminals"? (was: Re: UCENET II and Peter duh Silva)](/archive/1997/12/747ff6eabb83b8cab1202112d337cabb2330e97c83e85d54645a34803f6af407) - _Joichi Ito<EMAIL_ADDRESS>  + 1997-12-21 (Mon, 22 Dec 1997 04:46:56 +0800) - [Re: Completely anonymous communications ARE only for "Criminals"](/archive/1997/12/3bf5cdeebd09e51c63da4266c16232ac022764f5800f00cdb5015e30d58f26e6) - _Charlie Comsec<EMAIL_ADDRESS>  + 1997-12-23 (Tue, 23 Dec 1997 18:32:34 +0800) - Re: Completely anonymous communications ARE only for "Criminals" - _The Sheriff<EMAIL_ADDRESS>