text:
# How to use the evaluation script

This directory provides the scripts for quantitative evaluation of our gesture generation framework. We support the following measures:
- Average Position Error (APE)
- Mean Absolute Error (MAE)
- Average Jerk (AJ)
- Average Acceleration (AA)
- Histogram of Moving Distance (HMD, for velocity/acceleration)

## Data preparation
  1. Use `../helpers/remove_velocity.py` to delete velocities from predicted data.
  2. Use `../helpers/convert_original.py` to create original data.

This produces gesture files containing `(x, y, z) x 64 joints = 192` white space separated data for each line.

  3. (optional) Use `../helpers/apply_filters.py` to smooth predicted data.

## Directory organization

We assume original/predicted gesture data are stored as follows:

```
-- evaluation/
      |-- calc_distance.py
      |-- calc_errors.py
      |-- calc_jerk.py
      |-- joints.txt
      |-- data/
           |-- original/
                  |-- gesture1093.txt, gesture1095.txt, ...
           |-- predicted/
                  |-- your_prediction_dir/
                        |-- gesture1093.txt, gesture1095.txt, ...
```

**Important Note: You have to store the gesture files of the same indices in `original` and `predicted` directories.
If you have gestures 1093, 1095, ... in the `original` directory, but gestures 1094, 1096, ... in the `predicted' - you will get wrong results**

## Run

`calc_errors.py`, `calc_jerk.py`, and `calc_distance.py` support different quantitative measures, described below.

`--gesture` or `-g` option specifies the predicted directory under `data/predicted`. If you store the predicted gesture files in `data/predicted/your_prediction_dir/`, use `-g your_prediction_dir`.

### APE/MAE

Average Position Error (APE) and Mean Absolute Error (MAE) indicate the prediction errors against the original gestures.

To calculate APE/MAE, you can use `calc_errors.py`.
You can select the metric to compute by `--metric` or `-m` option (default: ape).

```sh
# Compute APE
python calc_errors.py -g your_prediction_dir -m ape

# Compute MAE
python calc_errors.py -g your_prediction_dir -m mae
```

### AJ/AA

Average Jerk (AJ) and Average Acceleration (AA) represent the characteristics of gesture motion.

To calculate AJ/AA, you can use `calc_jerk.py`.
You can select the measure to compute by `--measure` or `-m` option (default: jerk).

```sh
# Compute AJ
python calc_jerk.py -g your_prediction_dir -m jerk

# Compute AA
python calc_jerks.py -g your_prediction_dir -m acceleration
```

Note: `calc_jerk.py` computes AJ/AA for both original and predicted gestures. The AJ/AA of the original gestures will be stored in `result/original` by default. The AJ/AA of the predicted gestures will be stored in `result/your_prediction_dir`.

### HMD

Histogram of Moving Distance (HMD) shows the velocity/acceleration distribution of gesture motion.

To calculate HMD, you can use `calc_distance.py`.
You can select the measure to compute by `--measure` or `-m` option (default: velocity).
In addition, this script supports histogram visualization. To enable visualization, use `--visualize` or `-v` option.

```sh
# Compute velocity histogram
python calc_distance.py -g your_prediction_dir -m velocity -w 0.05  # You can change the bin width of the histogram

# Compute acceleration histogram
python calc_distance.py -g your_prediction_dir -m acceleration -w 0.05
```

Note: `calc_distance.py` computes HMD for both original and predicted gestures. The HMD of the original gestures will be stored in `result/original` by default.

### Calculate evaluation measures for specific joints
You can use `-s` option for all evaluation scripts to select specific joints, e.g. `-s Head LeftLeg RightLeg`
Here is a table for the joint names:

| Joint to Calculate | Corresponding Name |
| --- | --- |
| Head | Head |
| Neck | Neck |
| Left Shoulder | LeftArm |
| Left Elobow | LeftForeArm |
| Left Wrist | LeftHand |
| Right Shoulder | RightArm |
| Right Elobow | RightForeArm |
| Right Wrist | RightHand |
| Left Hip | LeftUpLeg |
| Left Knee | LeftLeg |
| Left Ankle | LeftFoot |
| Right Hip | RightUpLeg |
| Right Knee | RightLeg |
| Right Ankle | RightFoot |

When you calculate the velocity histogram for both elbows, use
```sh
python calc_distance.py -g your_prediction_dir -m velocity -w 0.05 -s LeftForeArm RightForeArm
```

gha_language: Python


text:
6DoF TRACKING OF A VR HEADSET

Discrption

Project consists of a a system which tracks a model with ArUco markers attached on it, which designed to be mounted on the VR headset for the purpose of this. The tracking system estemates the 3D pose of the calibrated camera with respect to the n points on the model by solving PnP(Perspective-n-Points) problem after the detection of ArUco markers. The resulting information of the tracking system, the rotation (roll, pitch, and yaw) and 3D translation of the camera with respect to the world, is sent to the mobile device(Andriod). The information can be used in any 6DoF VR application for detecting user's headmovments and orientation.</P

 Crafting The Mounted Model

The 3D mounted model can found in the file Model.skp . The model can be viewed using SketchUp (can be downloaded for free). All the required measurements can be done that model.

It is better to craft the model using low-wight metrials like hard cardbord. And the VR headset should fit in the model. Otherwise the dimension constants have to be changed in the code.

 Markers to attached are found in the folder Markers. The picture of each marker is in the excat right dimension of the code. Each edge should have a lenght of 6 cm. And every markers has a code, the corrosponding code is the name of the file. Each marker should be placed according the to blueprint of the model. The model blueprint can found in ModelP.jpg

 After building the project and debugging it and after crafting the model. If the model is placed in fornt of camera, the resultant information will be send wirelessly, there is an app in Andriod folder, which displays the translationa nd rotation vectors given the IP address and the port(54001). The information is sent in the pattern  X;Y;Z;roll;pitch;yaw;

 The project Requires importing OpenCv Library and contribution library of Opencv, when building the libraries, with Cmake for instance, include ArUco.

 For more info about project please check the report

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
Dropwizard with Guice
=====================

Dropwizard has a truly excellent [getting started guide](http://dropwizard.codahale.com/getting-started/), but I wanted to try to create a variation of the hello world application that was wired together using Google's [Guice](https://code.google.com/p/google-guice/). I'm not in love with DI frameworks but I was curious to see what it took to use one with Dropwizard. Verdict: not much at all, thanks to Jared Stehler's [dropwizard-guice](https://github.com/jaredstehler/dropwizard-guice). See for yourself.

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

Invoke the `./gradlew` script.

License
-------

These scripts are covered by the [MIT License](http://www.opensource.org/licenses/mit-license).

license: MIT

repository: tomcz/dropwizard-webapp

repo_name: tomcz/dropwizard-webapp


text:
case "expand":
case "cd":
case "getenv":
case "setenv":

if we pass the following four methods in the form of a session then we can cache function calls. if these must be passed and the calling function modifies no files we can trivially compute the cache. this is also good because it prevents function calls from easily modifying global state and altering execution expectations.

if we pass a session by value we can build various values onto it. could be passed to cmd(), derivation, etc.., would even be a way to dynamically build derivation inputs. (maybe that's a bad idea). no, if we needed a certain program in the path, that could help, still likely better for us to just support build_inputs.

----

thought about this some more, broke things out into sessions

there still needs to be a solution to the bramble dirty inputs problem, should just use the current option of calculating the derivation and then only erroring on the derivation call if we haven't already seen that function call before. Performance can come later

should we remove environment variables entirely? are they useful in scripts?
shoudl we pass things by value into functions?

repository: fossabot/bramble

branch_name: refs/heads/main

gha_license_id: MIT

repo_name: fossabot/bramble


text:
## :warning: Abandoned project

This project is not maintained anymore and is abandoned. Feel free to fork and make your own changes if needed.

Thanks to everyone for their valuable feedback and contributions.

## About

**travis-wait-enhanced** :alarm_clock: is a CLI application written in [Go](https://golang.org/) to replace the
existing [travis_wait](https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received)
bash function (with some enhancements) to prevent [Travis CI](https://travis-ci.com/) from thinking a long-running
process has stalled.

## Features

* Custom timeout duration
* Custom interval duration at which to print keep-alive messages
* Custom formatting options
* Print command output to stdout/stderr

## Download

travis-wait-enhanced binaries are available in [releases](https://github.com/crazy-max/travis-wait-enhanced/releases)
page.

Choose the archive matching the destination platform and extract travis-wait-enhanced:

```
$ cd /opt
$ wget -qO- https://github.com/crazy-max/travis-wait-enhanced/releases/download/v1.2.0/travis-wait-enhanced_1.2.0_linux_x86_64.tar.gz | tar -zxvf - travis-wait-enhanced
```

After getting the binary, it can be tested with `./travis-wait-enhanced --help` or moved to a permanent location.

```
$ ./travis-wait-enhanced --help
Usage: travis-wait-enhanced <command> ...

Prevent Travis CI from thinking a long-running process has stalled. More info:
https://github.com/crazy-max/travis-wait-enhanced

Arguments:
  <command> ...    Command to execute.

Flags:
  --help               Show context-sensitive help.
  --version
  --timeout=20m        Timeout for this command.
  --interval=1m        Interval at which to print keep-alive messages.
  --print-name         Print the name of this tool to identify keep-alive messages.
  --print-string="Still running..."
                       Keep-alive message printed in each interval.
  --print-timestamp    Print the current timestamp after each keep-alive message.
  --print-newline      Print a newline character after each keep-alive message.
```

## Usage

`travis-wait-enhanced [<flags>] <command>`

If your command contains flags (e.g. `mvn -V install -Pmy-profile`) then use `--` to indicate the end of
the travis-wait-enhanced flags to avoid parsing errors. For example

```
travis-wait-enhanced --interval=1m --timeout=20m -- mvn -V clean install -Prun-its
```

To use travis-wait-enhanced in your `.travis.yml` add :

```yml
before_install:
  # linux
  - |
    wget -qO- "https://github.com/crazy-max/travis-wait-enhanced/releases/download/v1.2.0/travis-wait-enhanced_1.2.0_linux_x86_64.tar.gz" | tar -zxvf - travis-wait-enhanced
    mv travis-wait-enhanced /home/travis/bin/
    travis-wait-enhanced --version
  # windows
  - |
    curl -LfsS -o /tmp/travis-wait-enhanced.zip "https://github.com/crazy-max/travis-wait-enhanced/releases/download/v1.2.0/travis-wait-enhanced_1.2.0_windows_x86_64.zip"
    7z x /tmp/travis-wait-enhanced.zip -y -o/usr/bin/ travis-wait-enhanced.exe -r
    travis-wait-enhanced --version
```

## How can I help?

All kinds of contributions are welcome :raised_hands:! The most basic way to show your support is to star :star2:
the project, or to raise issues :speech_balloon: You can also support this project by
[**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) :clap: or by making a
[Paypal donation](https://www.paypal.me/crazyws) to ensure this journey continues indefinitely! :rocket:

Thanks again for your support, it is much appreciated! :pray:

## License

MIT. See `LICENSE` for more details.

repository: crazy-max/travis-wait-enhanced

gha_language: Go

repo_name: crazy-max/travis-wait-enhanced


text:
---
title: About
layout: page
---
![Profile Image]({{ site.url }}/{{ site.picture }})

Hi, I am Terry. I'm not a robot, I'm just like you

I'm a Junior Systems Developer from Harare, Zimbabwe. I write BASIC like code during the day and learn/ write JavaScript during the night.

I love building communities and I co-lead one called forloopZimbabwe. It is a community of developers and tech enthusiasts from Zimbabwe. We meet in borrowed spaces, graciously provided by different companies and organisations. Our purpose is to provide a place where our members have a good time talking about programming, sharing their knowledge, meeting other passionate folks and helping each other grow in the field. We keep it friendly, inclusive and positive.


text:
# Evaluate the sum of all amicable pairs under 10000.

Let `d(n)` be defined as the sum of proper divisors of `n` (numbers less than `n` which divide evenly into `n`).
If `d(a) = b` and `d(b) = a`, where `a != b`, then `a` and `b` are an amicable pair and each of `a` and `b` are called amicable numbers.

For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore `d(220) = 284`. The proper divisors of 284 are 1, 2, 4, 71 and 142; so `d(284) = 220`.

Evaluate the sum of all the amicable numbers under 10000.

repository: Koronen/project-euler

repo_name: Koronen/project-euler


text:
# Bootstrap ComboJS

As many others before me, we needed a good combobox js component for a project at work.  We found many good ones, but none that completely fit the bill.  One of the closest
was bootstrap-combobox by Daniel Farrell.  It had most of what we needed but there was one main issue;  **It was no longer being maintained.  Pull requests were no longer being accepted and we needed a few changes more immediately.  There are many forks, but none contained what we completely needed and the changes were a bit scattered across many forks.**

We could have created another fork and in fact I did at first, but forks tend to get lost here on GitHub (and there are over 250 of the main project) and a lot of great improvements tend to get lost.  o
I decided to create a new repository, rewrite some of the code and start adding features.  This repo is the result of that.

Full credit goes to [Daniel Farrell](https://github.com/danielfarrell/bootstrap-combobox) for much of this code, ideas and design.  I've made many improvements and will continue to do so, but his version is very functional and will serve the purposes for many.

## How to use it

The dependencies are the Bootstrap stylesheet(CSS).  Include it and then the stylesheet(CSS) and javascript.

Then just activate the plugin on a normal select box(suggest having a blank option first):

    <select class="combo">
      <option></option>
      <option value="PA">Pennsylvania</option>
      <option value="CT">Connecticut</option>
      <option value="NY">New York</option>
      <option value="MD">Maryland</option>
      <option value="VA">Virginia</option>
    </select>

    <script type="text/javascript">
      $(document).ready(function(){
        $('.combo').combojs();
      });
    </script>

### Callbacks

All public methods include an optional parameter for a callback function that can be called.

    $("#testID").combojs("loaditems", ['january', 'february', 'march', 'april', 'may', 'june', 'july'], function() {alert('Hi Adam');});

### Options

When activating the plugin, you may include an object containing options for the combobox

    $('.combo').combojs({fullWidthMenu: true});

 `allowEnterToOpen`: if `true` enter will open the dropdown, false will not.  Default to `false`

 `allowEscapeToClose`: if `true` escape will close the dropdown, false will not.  Default to `true`

 `animation`: if `true` then the popup is animated with slideDown and slideUp, default to `false`

 `animationDuration`: duration of animation, defaults to 400 (milliseconds)

 `clearElementOnOpen`: this will allow you to customize the behavior on open of combo.  `true` will clear the element, then open, `false` will open it as is (filtered to the current entry), defaults to `false`

 `fullWidthMenu`: if `true` the dropdown menu will be the full width of the input.  Defaults to `true`

 `hideDisabled`: if `true` then disabled options will be hidden from the dropdown.  Defaults to `false`

 `highlighter`: Custom function for highlighting an `item`. Defaults to bolding the query within a matched item

 `item`: Custom markup for the dropdown menu list items.

 `matcher`: Custom function with one `item` argument that compares the item to the input. Defaults to matching on the query being a substring of the item, case insenstive

 `menu`: Custom markup for the dropdown menu list element.

 `newOptionsAllowed`: if `true` the control will allow options that are not valid options in the dropdown.  Defaults to `false`

 `openOnElementClick`: if `true` the dropdown menu will appear when clicking on the input box.  Defaults to `true`

 `placeholder`: Set the placeholder attribute of the input box, removed the `data-placeholder`  Defaults to an empty string.

 `sorter`: Custom function that sorts a list `items` for display in the dropdown

 `template`: Custom function that returns markup for the combobox.

You may also include these options as data- options on the select element

    <select class="combo" data-fullwidthmenu='true' data-openonelementclick='true'>
      <option></option>
      <option value="PA">Pennsylvania</option>
      <option value="CT">Connecticut</option>
      <option value="NY">New York</option>
      <option value="MD">Maryland</option>
      <option value="VA">Virginia</option>
    </select>

### API

    $('.combo').combojs('toggle');
    $('.combo').data("combojs").toggle();

###### Clear
Removes any selected value from dropdown or textbox.

    $('.combo').combojs("clear");

##### Disable
disables the menu

    $('.combo').combojs("disable");

##### Enable
enables the menu

    $('.combo').combojs("enable");

##### Focus
set focus to the combo textbox

    $('.combo').combojs("focus");

##### FocusAndSelect
set focus to the combo textbox and select all the text.

    $('.combo').combojs("focusAndSelect");

##### Hide
Hides the dropdown if it's shown.

    $('.combo').combojs("hide");

##### Load Items
Load an array of items into the combobox, removing anything previously there.

    $('.combo').combojs('loaditems', ['January', 'February', 'March', 'April']);

##### Refresh
refresh the combo

    `$('.combobox').combojs('refresh');`

##### Remove
Removes items from the list:
* no parameter, remove all items:

  `$('.combobox').combojs('remove');`

* number parameter, remove that index of item in list (starting at 1):

  `$('.combobox').combobox('remove',2);`

* number array, remove the items in the dropdown that match the indexes of items in the array

  `$('.combobox').combobox('remove',[2,3]);`

##### setValue
Set the value of the combo to the passed in value.

    $('.combobox').combobox('setValue', 'option1');

##### show
Shows the dropdown if it's not already visible.

    $('.combobox').combobox('show');

##### Toggle
Toggles between showing and hiding the dropdown menu

    $('.combo').combojs("toggle");

##### Values
Returns the values of the combobox as an array.

    $('.combo').combojs("values", function(values) {alert(values.length);});

## Dependencies
Uses the latest 1.X version of jQuery and the 3.X of bootstrap.

repository: JasonLautzenheiser/bootstrap-combojs

gha_language: HTML

repo_name: JasonLautzenheiser/bootstrap-combojs


text:
# Echo server and Read Web Content bash scripts

## Overview
The following repo contains 2 bash scripts that creates echo server and read a web page HTML content.

## Scripts Guidelines
Follow these steps to run the Application.

1. Echo Server. just open 2 consoles and run the server.sh and client.sh
```bash
	# run firts the server
	./server.sh

    # then on other console run the client
    ./client.sh

```

2. Read web page html content. Run the read_page.sh script with the webpage you want to read. Page must be public.
```bash
	# Linux
	./read_page.sh wikipedia.org

```

## Disclaimers
* This is a starter example and intended to demonstrate to app providers a sample of how to approach an implementation. There are potentially other ways to approach it and alternatives could be considered.
* Its possible that the repo is not actively maintained.

## License
MIT

The code in this repository is covered by the included license.

## Support
Please enter an issue in the repo for any questions or problems.


text:
# wmp-rpc
Discord Rich Presence for Windows Media Player

## Cloning
`git clone https://github.com/kna27/wmp-rpc.git --recursive`

## TODO
- [ ] Automatically launch on startup
- [ ] Look into seeing if this can be converted into a WMP addon


text:
---
template: default.ejs
theme: dark
title: unexpected-moment
repository: https://github.com/joelmukuthu/unexpected-moment
---

# Unexpected-moment

![Unexpected moment :)](unexpectedMoment.jpg)

This module extends the
[Unexpected](https://github.com/unexpectedjs/unexpected) assertion
library with integration for the [moment.js](http://momentjs.com/)
library.

```js
var date = moment('2015-11-06');
expect(date, 'to equal', moment('2015-11-06 00:00:00'));
expect(date, 'to equal', moment('2015-11-03'));
```

```output
expected moment('2015-11-06T00:00:00.000+01:00')
to equal moment('2015-11-03T00:00:00.000+01:00')

moment(
  '2015-11-06T00:00:00.000+01:00' // should be '2015-11-03T00:00:00.000+01:00'
                                  // -2015-11-06T00:00:00.000+01:00
                                  // +2015-11-03T00:00:00.000+01:00
)
```

[![NPM version](https://badge.fury.io/js/unexpected-moment.svg)](http://badge.fury.io/js/unexpected-moment)
[![Build Status](https://travis-ci.org/unexpectedjs/unexpected-moment.svg?branch=master)](https://travis-ci.org/unexpectedjs/unexpected-moment)
[![Coverage Status](https://coveralls.io/repos/unexpectedjs/unexpected-moment/badge.svg)](https://coveralls.io/r/unexpectedjs/unexpected-moment)
[![Dependency Status](https://david-dm.org/unexpectedjs/unexpected-moment.svg)](https://david-dm.org/unexpectedjs/unexpected-moment)

## How to use

### Node

Install it with NPM or add it to your `package.json`:

```
$ npm install unexpected unexpected-moment
```

Then:

```js#evaluate:false
var expect = require('unexpected').clone();
expect.use(require('unexpected-moment'));
```

### Browser

Include the `unexpected.js` found at the lib directory of this
repository.

```html
<script src="moment.js"></script>
<script src="unexpected.js"></script>
<script src="unexpected-moment.js"></script>
```

this will expose the expect function under the following namespace:

```js#evaluate:false
var expect = weknowhow.expect.clone();
expect.use(moment.unexpectedMoment);
```

### RequireJS

Include the library with RequireJS the following way:

```js#evaluate:false
define(['unexpected', 'unexpected-moment'], funtion (unexpected, unexpectedMoment) {
   var expect = unexpected.clone();
   expect.use(unexpectedMoment);
   // Your code
});
```

## MIT License

Copyright (c) 2015 Joel Mukuthu

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

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

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: unexpectedjs/unexpected-moment

gha_language: JavaScript

repo_name: unexpectedjs/unexpected-moment


text:
---
layout: post
title: Setup Postfix for development
comments: true
---

The following tutorial shows how to setup a local postfix installation on a
ubuntu based OS that accepts mail from `<IP_ADDRESS>` and relays every mail that
it receives to the local root account.
This setup is very useful in e.g. a development environment if you are involved
in applications with send email functionality.

Optionally you can install mutt command line email client to read the email.

<!-- more -->

## Install Postfix

    $ apt-get install postfix
    $ dpkg-reconfigure postfix

Now we need to configure postfix to route all incoming email to the local root
account. During the previous step `dpkg-reconfigure postfix` you have
configured postfix to forward all mail for the local root user to another local
unix user.

    $ postconf -e 'home_mailbox = Maildir/'
    $ postconf -e 'inet_interfaces = <IP_ADDRESS>'
    $ postconf -e 'virtual_alias_maps = regexp:/etc/postfix/virtual'
    $ postconf -e 'virtual_alias_domains ='
    $ echo '/.*/  root' > /etc/postfix/virtual
    $ postmap /etc/postfix/virtual
    $ service postfix restart

Most of the above configuration settings are taken from [this site][tipcache].
You can try sending an email using telnet like this (hit *enter* after every
line):

    $ telnet <IP_ADDRESS> 25
    HELO some.server.localhost
    mail from<EMAIL_ADDRESS>    rcpt to<EMAIL_ADDRESS>    data
    To<EMAIL_ADDRESS>    From<EMAIL_ADDRESS>    Subject: This is a test email

    This is a body text
    .

You should see a lot of `250 2.x.x Ok` responses. Quit telnet and check the
logs if the email was received by the local postfix installation:

    $ tail /var/log/mail.log

## Installing mutt

If you follow these steps you will install [mutt][mutt], a command line email
client so you are able to read the messages that you are sending to yourself
:-).

    $ apt-get install mutt

We configured postfix to use the popular [Maildir][maildir] format instead of the
default [mbox][mbox] format. Maildir is better since it does not suffer of race
condition issues that mbox has because each email is stored in it's own file.

Create a file `.muttrc` in the users `$HOME` directory with the following
contents:

    $ cat ~/.muttrc
    set folder="~/Maildir"
    set mask="!^\.[^.]"
    set mbox="~/Maildir"
    set record="+.Sent"
    set postponed="+.Drafts"
    set spoolfile="~/Maildir"

Now you should be able to open `mutt` and see the email you send yourself
earlier. Take your time to [explore and learn mutt][mutt_tutorial].

[tipcache]: http://www.tipcache.com/tip/Create_a_super_%22catch-all%22_email_address_in_Postfix_16.html
[mutt]: http://www.mutt.org
[maildir]: http://www.qmail.org/man/man5/maildir.html
[mbox]: http://www.qmail.org/qmail-manual-html/man5/mbox.html
[mutt_tutorial]: http://mutt.blackfish.org.uk


text:
---
jupyter:
  jupytext:
    notebook_metadata_filter: all
    text_representation:
      extension: .md
      format_name: markdown
      format_version: '1.1'
      jupytext_version: 1.1.1
  kernelspec:
    display_name: Python 2
    language: python
    name: python2
  plotly:
    description: Plotly Streaming
    has_thumbnail: false
    language: python
    layout: base
    name: Plotly Streaming
    page_type: u-guide
    permalink: python/streaming-tutorial/
    redirect_from: python/streaming-line-tutorial/
    thumbnail: /images/static-image
---

### Streaming Support
**Streaming is no longer supported in Chart Studio Cloud.
Streaming is still available as part of [Chart Studio Enterprise](https://plot.ly/products/on-premise/). Additionally, [Dash](https://plot.ly/products/dash/) supports streaming, as demonstrated by the [Dash Wind Streaming example](https://github.com/plotly/dash-wind-streaming).**

### Getting Started with Streaming

```python
import numpy as np
import plotly.plotly as py
import plotly.tools as tls
import plotly.graph_objs as go
```

Before you start streaming, you're going to need some [stream tokens](https://plot.ly/settings/api). You will need **one unique stream token for every `trace object` ** you wish to stream to. Thus if you have two traces that you want to plot and stream, you're going to require two unique stream tokens. Notice that more tokens can be added via the settings section of your Plotly profile: https://plot.ly/settings/api

![](https://cloud.githubusercontent.com/assets/12302455/15023505/bb729d8c-11fe-11e6-87a6-332ff9dfad2d.png)

Now in the same way that you set your credentials, as shown in [Getting Started](https://plot.ly/python/getting-started/), you can add stream tokens to your credentials file.

```python
stream_ids = tls.get_credentials_file()['stream_ids']
print stream_ids
```

You'll see that `stream_ids` will contain a list of the stream tokens we added to the credentials file.

#### An Example to Get You Started

Now that you have some stream tokens to play with, we're going to go over how we're going to put these into action.
There are two main objects that will be created and used for streaming:
- Stream Id Object
- Stream link Object

We're going to look at these objects sequentially as we work through our first streaming example. For our first example, we're going to be streaming random data to a single scatter trace, and get something that behaves like the following:

![](https://cloud.githubusercontent.com/assets/12302455/14826664/e7d59c56-0bac-11e6-953e-e215410f3f03.png)

##### Stream Id Object

The `Stream Id Object` comes bundled in the `graph_objs` package. We can then call help to see the description of this object:

```python
help(go.Stream)
```

As we can see, the `Stream Id Object` is a dictionary-like object that takes two parameters, and has all the methods that are associated with dictionaries.
We will need one of these objects for each of trace that we wish to stream data to.
We'll now create a single stream token for our streaming example, which will include one scatter trace.

```python
# Get stream id from stream id list
stream_id = stream_ids[0]

# Make instance of stream id object
stream_1 = go.Stream(
    token=stream_id,  # link stream id to 'token' key
    maxpoints=80      # keep a max of 80 pts on screen
)
```

The `'maxpoints'` key sets the maximum number of points to keep on the plotting surface at any given time.
More over, if you want to avoid the use of these `Stream Id Objects`, you can just create a dictionary with at least the token parameter defined, for example:

```python
stream_1 = dict(token=stream_id, maxpoints=60)
```

Now that we have our `Stream Id Object` ready to go, we can set up our plot. We do this in the same way that we would any other plot, the only thing is that we now have to set the stream parameter in our trace object.

```python
# Initialize trace of streaming plot by embedding the unique stream_id
trace1 = go.Scatter(
    x=[],
    y=[],
    mode='lines+markers',
    stream=stream_1         # (!) embed stream id, 1 per trace
)

data = go.Data([trace1])

# Add title to layout object
layout = go.Layout(title='Time Series')

# Make a figure object
fig = go.Figure(data=data, layout=layout)
```

#### Stream Link Object

The Stream Link Object is what will be used to communicate with the Plotly server in order to update the data contained in your trace objects. This object is in the `plotly.plotly` object, an can be reference with `py.Stream`

```python
help(py.Stream)  # run help() of the Stream link object
```

You're going to need to set up one of these stream link objects for each trace you wish to stream data to.

Below we'll set one up for the scatter trace we have in our plot.

```python
# We will provide the stream link object the same token that's associated with the trace we wish to stream to
s = py.Stream(stream_id)

# We then open a connection
s.open()
```

We can now use the Stream Link object `s` in order to `stream` data to our plot.

As an example, we will send a time stream and some random numbers:

```python
# (*) Import module keep track and format current time
import datetime
import time

i = 0    # a counter
k = 5    # some shape parameter

# Delay start of stream by 5 sec (time to switch tabs)
time.sleep(5)

while True:

    # Current time on x-axis, random numbers on y-axis
    x = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')
    y = (np.cos(k*i/50.)*np.cos(i/50.)+np.random.randn(1))[0]

    # Send data to your plot
    s.write(dict(x=x, y=y))

    #     Write numbers to stream to append current data on plot,
    #     write lists to overwrite existing data on plot

    time.sleep(1)  # plot a point every second
# Close the stream when done plotting
s.close()
```

```python
from IPython.display import display, HTML

display(HTML('<link href="//fonts.googleapis.com/css?family=Open+Sans:600,400,300,200|Inconsolata|Ubuntu+Mono:400,700" rel="stylesheet" type="text/css" />'))
display(HTML('<link rel="stylesheet" type="text/css" href="http://help.plot.ly/documentation/all_static/css/ipython-notebook-custom.css">'))

! pip install git+https://github.com/plotly/publisher.git --upgrade

import publisher
publisher.publish(
    'python_streaming', 'python/streaming-tutorial/', 'Plotly Streaming',
    'Plotly Streaming', name='Plotly Streaming',
    title = 'Plotly Streaming',
    redirect_from = 'python/streaming-line-tutorial/',
    language='python',
    layout='user-guide',
    ipynb= '~notebook_demo/80')
```

```python

```


text:
# Sled-O-Matic - Sleigh Route Finder Web API

### Installation

```
sudo apt install python3-pip
sudo python3 -m pip install -r requirements.txt
```

#### Running:

`python3 ./srfweb.py`

#### Logging in:

You can login using the default admin pass:

`admin 924158F9522B3744F5FCD4D10FAC4356`

However, it's recommended to change this in the sqlite db to something custom.


text:
# Getting Started

To get started you need to first create a Firebase project for your app and add the `google-service.json` file in your project.

Are you new to Firebase?🤷♂ Don't worry, you can find steps [here](https://firebase.google.com/docs/android/setup).

## Add Dependency

Add the dependencies to the `build.gradle` of app module.

```groovy
implementation "com.gappein.sdk:gappein-sdk:1.0.0-beta3"
```

?> It's recommended to use the latest version of the SDK. Latest version is [![Download Chat](https://api.bintray.com/packages/gappein/Gappein/Gappein-Chat-SDK/images/download.svg)](https://bintray.com/gappein/Gappein/Gappein-Chat-SDK/_latestVersion)

gha_license_id: NOASSERTION


text:
# Space-Welcome
Welcome to [ITABits](http://www.itabits.com.br/)!

Here's a little project I've made for announce new members of a group I'm participating in college.

## Assets
Used assets by [Kenney](https://www.kenney.nl/):
- Art
- Sound effects

Music by me (authoral).

## Code
Addapted from [Space Shooter Unity's tutorial](https://unity3d.com/pt/learn/tutorials/s/space-shooter-tutorial).

## How-to-use (quickly)
If you'd like to use this little game as a welcoming mensage as I have used to, just download all the project, open it on unity and change the Text field on [GameController.cs](https://github.com/chicomcastro/Space-Welcome/blob/master/Assets/GameController.cs) in the Editor.

## Controls
WASD to move

Mouse click to shoot

repository: chicomcastro/Space-Welcome

repo_name: chicomcastro/Space-Welcome


text:
# R for Data Science Book Club

This is a repository of the chapter presentations:

* [**Chapter 1 and 2**](http://www.alankinene.com/r4ds_book_club/r4ds/r4ds-ch1_2.html)


text:
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.19.0](https://github.com/CondeNast-Copilot/atjson/compare/@atjson/source-prism@0.17.3<EMAIL_ADDRESS>(2019-08-05)

**Note:** Version bump only for package @atjson/source-prism

## [0.17.3](https://github.com/CondeNast-Copilot/atjson/compare/@atjson/source-prism@0.17.2<EMAIL_ADDRESS>(2019-07-24)

**Note:** Version bump only for package @atjson/source-prism

## [0.17.2](https://github.com/CondeNast-Copilot/atjson/compare/@atjson/source-prism@0.17.1<EMAIL_ADDRESS>(2019-07-23)

**Note:** Version bump only for package @atjson/source-prism

## [0.17.1](https://github.com/CondeNast-Copilot/atjson/compare/@atjson/source-prism@0.17.0<EMAIL_ADDRESS>(2019-07-15)

**Note:** Version bump only for package @atjson/source-prism

## [0.17.0](https://github.com/CondeNast-Copilot/atjson/compare/@atjson/source-prism@0.16.5<EMAIL_ADDRESS>(2019-07-10)

### ✨ New Features

* ✨ Generate HTML annotations from spec ([#134](https://github.com/CondeNast-Copilot/atjson/issues/134))
* ✨ Reduce magic in converting documents. ([#132](https://github.com/CondeNast-Copilot/atjson/issues/132))

### 🐛 Fixes

* 🐞 Fix references to wrong github repository ([#135](https://github.com/CondeNast-Copilot/atjson/issues/135))

### 🚨 Breaking Changes

* When converting a document, it will no longer coerce a document. You will need to do this yourself!
* You can no longer nest converters inside of another converter. Instead import `getConverterFor` from @atjson/document and use the function supplied from that.

These improvements are designed to improve the developer experience of atjson for developers. We've encountered some frustrations where:

1. Conversions wouldn't run because there are two different versions of @atjson/document installed.

    📝 If you are using atjson, update your dependencies to this version. Any version increment after this shouldn't break your converters.

2. Converters would get called, but the document was made up of only UnknownAnnotations.

    👩🏽🏫 You're no longer allowed to nest converters. This change was done to make converting less confusing, because it was super weird to have all your annotations be "Unknown" if you ran a converter before running the rest of your conversion code. Also, it will no longer clone the document, so this should hopefully make some conversions speedier! 🐰

3. It was unclear when convertTo would actually run any code.

     📣We've changed this so all converters are user-defined code. If there is no converter defined, it will let you know!

## [0.16.5](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.16.4<EMAIL_ADDRESS>(2019-04-19)

**Note:** Version bump only for package @atjson/source-prism

## [0.16.4](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.16.3<EMAIL_ADDRESS>(2019-04-18)

**Note:** Version bump only for package @atjson/source-prism

## [0.16.3](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.16.2<EMAIL_ADDRESS>(2019-04-16)

**Note:** Version bump only for package @atjson/source-prism

## [0.16.2](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.16.1<EMAIL_ADDRESS>(2019-04-15)

**Note:** Version bump only for package @atjson/source-prism

## [0.16.1](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.16.0<EMAIL_ADDRESS>(2019-04-15)

**Note:** Version bump only for package @atjson/source-prism

## [0.16.0](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.15.9<EMAIL_ADDRESS>(2019-04-10)

### ✨ New Features

* ✨ Add public app to source-html ([#123](https://github.com/CondeNast/atjson/issues/123))

## [0.15.9](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.15.8<EMAIL_ADDRESS>(2019-03-21)

### 🐛 Fixes

* 🐝 Fix unknown annotations passing attributes by reference and HIR optimization bug ([#122](https://github.com/CondeNast/atjson/issues/122))

## [0.15.8](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.15.7<EMAIL_ADDRESS>(2019-03-19)

**Note:** Version bump only for package @atjson/source-prism

## [0.15.7](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.15.6<EMAIL_ADDRESS>(2019-03-18)

**Note:** Version bump only for package @atjson/source-prism

## [0.15.6](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.15.5<EMAIL_ADDRESS>(2019-03-18)

**Note:** Version bump only for package @atjson/source-prism

## [0.15.5](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.15.4<EMAIL_ADDRESS>(2019-03-14)

### 🐛 Fixes

* 🐝🚀 Fix performance regressions ([#118](https://github.com/CondeNast/atjson/issues/118))

## [0.15.4](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.15.3<EMAIL_ADDRESS>(2019-02-27)

**Note:** Version bump only for package @atjson/source-prism

## [0.15.3](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.15.2<EMAIL_ADDRESS>(2019-02-14)

**Note:** Version bump only for package @atjson/source-prism

## [0.15.2](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.15.1<EMAIL_ADDRESS>(2019-02-14)

**Note:** Version bump only for package @atjson/source-prism

## [0.15.1](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.15.0<EMAIL_ADDRESS>(2019-02-12)

**Note:** Version bump only for package @atjson/source-prism

## [0.15.0](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.14.1<EMAIL_ADDRESS>(2019-01-24)

**Note:** Version bump only for package @atjson/source-prism

## [0.14.1](https://github.com/CondeNast/atjson/compare/@atjson/source-prism@0.14.0<EMAIL_ADDRESS>(2019-01-14)

### 🐛 Fixes

* 🐝 : Include `source-html` in dependencies list

## 0.14.0 (2019-01-14)

### ✨ New Features

* ✨ add PRISM XML source to handle data from print publications

repository: alessandroraybann/atjson

branch_name: refs/heads/latest

gha_language: TypeScript

repo_name: alessandroraybann/atjson


text:
# Smiley Rating
SmileyRating is a simple rating bar for android. It displays animated smileys as rating icon.
  - Drawn completely using android canvas
  - Inspired by [Bill Labus](https://dribbble.com/shots/2790473-Feedback)

## Demo

 <img src="https://raw.githubusercontent.com/sujithkanna/SmileyRating/master/app/src/main/assets/demo.gif" alt="" data-canonical-src="https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png" width="575" height="205" />

## Integration
Integrating SmileyRating in your project is very simple.
### Step 1:
Add this dependency in your project's build.gradle file which is in your app folder
```groovy
compile 'com.github.sujithkanna:smileyrating:1.6.7'
```
add this to your dependencies.
## Step 2:
Now place the SmileyRating in your layout.
###### *Note: The height of the SmileyRating will be automatically adjusted according to the width of this component.*
```xml
<com.hsalf.smilerating.SmileRating
        android:id="@+id/smile_rating"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
```
## Step 3:
### Initialize your view
```java
SmileRating smileRating = (SmileRating) findViewById(R.id.smile_rating);
```
### Set this SmileySelectionListener to get notified when user selects a smiley
*By default the selected smiley will be NONE*
```java
smileRating.setOnSmileySelectionListener(new SmileRating.OnSmileySelectionListener() {
            @Override
            public void<EMAIL_ADDRESS>int smiley, boolean reselected) {
	            // reselected is false when user selects different smiley that previously selected one
		        // true when the same smiley is selected.
		        // Except if it first time, then the value will be false.
                switch (smiley) {
                    case SmileRating.BAD:
                        Log.i(TAG, "Bad");
                        break;
                    case SmileRating.GOOD:
                        Log.i(TAG, "Good");
                        break;
                    case SmileRating.GREAT:
                        Log.i(TAG, "Great");
                        break;
                    case SmileRating.OKAY:
                        Log.i(TAG, "Okay");
                        break;
                    case SmileRating.TERRIBLE:
                        Log.i(TAG, "Terrible");
                        break;
                }
            }
        });
```
### If you want to know the level of user rating, You can listen for OnRatingSelectedListener
```java
smileRating.setOnRatingSelectedListener(new SmileRating.OnRatingSelectedListener() {
            @Override
            public void onRatingSelected(int level, boolean reselected) {
                // level is from 1 to 5 (0 when none selected)
                // reselected is false when user selects different smiley that previously selected one
		        // true when the same smiley is selected.
		        // Except if it first time, then the value will be false.
            }
        });
```

### Get current selection
```java
@Smiley int smiley = mSmileRating.getSelectedSmile();
switch (smiley) {
    case SmileRating.BAD:
        Log.i(TAG, "Bad");
        break;
    case SmileRating.GOOD:
        Log.i(TAG, "Good");
        break;
    case SmileRating.GREAT:
        Log.i(TAG, "Great");
        break;
    case SmileRating.OKAY:
        Log.i(TAG, "Okay");
        break;
    case SmileRating.TERRIBLE:
        Log.i(TAG, "Terrible");
        break;
    case SmileyRating.NONE:
	    Log.i(TAG, "None");
	    break;
}
```
this will return you an int value which indicated the current selected smiley
### Get current rating level
```java
int level = mSmileRating.getRating(); // level is from 1 to 5
// Will return 0 if NONE selected
```
### You can set selected smiley without user interaction
#### Without animation
```java
smileRating.setSelectedSmile(BaseRating.GREAT);
```
#### OR
```java
smileRating.setSelectedSmile(BaseRating.GREAT, false);
```
*The smiley will be selected without any animation and the listeners won't be triggered*
#### With animation
```java
smileRating.setSelectedSmile(BaseRating.GREAT, true);
```
*Smiley will be selected with animation and listeners will also be triggered(Only if the second param is true)*

You can even set the smiley to NONE with/without animation by passing NONE using same API.

#### You can change the smiley name also
Raw string
```java
mSmileRating.setNameForSmile(BaseRating.TERRIBLE, "Angry");
```
String resources
```java
mSmileRating.setNameForSmile(BaseRating.TERRIBLE, R.string.anyTitle);
```

![Angry](https://raw.githubusercontent.com/sujithkanna/SmileyRating/master/app/src/main/assets/angry.jpg)

#### Custom font
You can change the title color of smileys.
```java
mSmileRating.setTypeface(yourTypeface);
```

#### Change colors
You can set change the colors by xml
```xml
<com.hsalf.smilerating.SmileRating
        android:id="@+id/ratingView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        app:angryColor="#f29a68"
        app:drawingColor="#353431"
        app:normalColor="#f2dd68"
        app:isIndicator="false"
        app:placeHolderBackgroundColor="#e6e8ed"
        app:placeHolderSmileColor="#ffffff"
        app:textNonSelectionColor="#AEB3B5"
        app:textSelectionColor="#000000" />
```

| Params  | Description |
| ------------- | ------------- |
| `app:angryColor`  | To set the color of the Angry/Terrible smiley's background color.  |
| `app:normalColor`  | To change the color of all smileys background color except Angry/Terrible smiley.  |
| `app:drawingColor`  | To change the color of all smileys (Smile and eyes).  |
| `app:placeHolderSmileColor`  | To set the color of all placeholder smiley's (Smile and eyes) color.  |
| `app:placeHolderBackgroundColor`  | To set the color of all placeholder smiley's background color.  |
| `app:textSelectionColor`  | To set the color of the selected smiley's text color.  |
| `app:textNonSelectionColor`  | To set the color of the non-selected smiley's text color  |
| `app:isIndicator` | A boolean to switch modes between editable and non editable bar|

Or, you can change colors on runtime also
```java
smileyRating.setAngryColor(int color);
smileRating.setNormalColor(int color);
smileRating.setDrawingColor(int color);
smileRating.setPlaceHolderSmileColor(int color);
smileRating.setPlaceHolderBackgroundColor(int color);
smileRating.setTextSelectionColor(int color);
smileRating.setTextNonSelectionColor(int color);
```

All colors should have be provided as color int.

*Example*
```java
smileRating.setAngryColor(Color.RED);
smileRating.setAngryColor(Color.parseColor("#f29a68"));
smileRating.setNormalColor(ContextCompat.getColor(context, R.color.your_color));
```
#### Show/Hide line
You can customize wheather to show or hide the line behind smileys.
```java
mSmileRating.setShowLine(true/false);
```
or
```xml
app:showLine="true/false"
```
passing true will show the line and passig false will hide the line. You can get the current visibility of the line by calling
```java
boolean showing = mSmileRating.isShowingLine();
```
####Indicator
To set the mode of the RatingBar.
```java mSmileyRating.setIndicator(false);```
passing false will allow the user to set smiley rating. passing true will make the RatingBar just an inticator which is untouchable and will be used to just show some rating by default.


text:
# Atom-Flowmark

Flowmark is an [Atom plugin](https://atom.io/packages) to auto-format Markdown source.

It draws inspiration from auto-formatting as pioneered by
[gofmt](https://utcc.utoronto.ca/~cks/space/blog/programming/GoWhyGofmtAccepted) and previous
implementations like [markdownfmt](https://github.com/shurcooL/markdownfmt), but also does
some helpful new things related to wrapping lines for ease of reading and collaboration
and cleaning up punctuation.

Flowmark started simply but has become an essential tool for editorial production at
[Holloway](https://www.holloway.com/), where we consider powerful but lightweight processes
for editing text essential.
In addition to formatting, it offers a variety of tools like cleaning up common Markdown
problems and “normalizing” footnotes, fixing punctuation, and many other things.

![Auto-format selection](images/screenshot.gif)

## Why Auto-Format Markdown?

Auto-formatting is known to be a Very Good Thing when multiple programmers work together.
But it turns out the same idea can be hard to apply for Markdown, for subtle reasons
mostly related to the handling of paragraphs of text.

Existing auto-formatters standardize the common annoyances of inconsistent indentation,
different heading styles, and the like.

## Flowmark Features

- **Full Markdown support:**
  Complete, deterministic auto-formatting of Markdown, based on
  [Remark](https://github.com/remarkjs/remark). This includes
  [YAML front-matter](https://jekyllrb.com/docs/front-matter/),
  [math](https://github.com/remarkjs/remark-math), tables, and
  [footnotes](https://www.markdownguide.org/extended-syntax/#footnotes).
- **Line wrapping:**
  Wraps lines based on practical heuristics to make content easier to read, maintain, diff,
  and merge on GitHub.
- **Typographic cleanups:**
  Converts ASCII quotes to smart quotes, dashes, and ellipses, to clean up
  [bad typewriter habits](https://practicaltypography.com/typewriter-habits.html) (based on
  [Textr](https://github.com/A/textr)). This is done conservatively, avoiding over-aggressive
  rules.
- **Heading normalization:**
  Rewrites all headings to Title Case, to avoid inconsistent capitalization.
- **Footnote normalization:**
  A “normalize footnotes” menu option to rewrite footnotes so they have unique,
  deterministic ids based on their contents.
  Usually footnotes are numbered (`[^1]`, `[^2]`, etc.)
  but this is problematic if you ever try to combine multiple Markdown documents into one.
  For examle if you combine multiple chapters of a book, what if both chapters have a `^1`
  footnote? This option makes that simple and easy if you run it before merging docs.
- **Fixes other formatting errors:**
  This includes menu options that allow:
  - Normalize punctuation boldfacing to make trailing terminating punctuation (any of the
    characters `.:?!`) boldface when following boldface text.
    This is common typographic practice but often done inconsistently.
  - “Heavy cleanup” cleans up common problems in Markdown, such as when docs are converted to
    Markdown using [Pandoc](https://pandoc.org/).

![Flowmark menu](images/flowmark-menu.png)

## Why Auto-Wrap Lines in Markdown?

The real challenge of collaborative editing in Markdown (and I’ve seen this a lot with
projects of my own, like [TAOCL](https://github.com/jlevy/the-art-of-command-line)) is
**confusing diffs** and **merge conflicts**. These are common and frustrating when multiple
people edit paragraph-long lines on large, GitHub-hosted Markdown files.

Flowmark tries a different approach:
It intelligently breaks lines at “reasonable” places, usually on sentence boundaries,
while still preserving the way the Markdown will render.
This may seem like an odd idea at first, but is a solution to two (seemingly conflicting)
goals:

1. Keeping all lines reasonably short, which aligns better with traditional Git and GitHub
   workflows and tools.
2. Avoiding reflowing text gratuitously.
   It does not auto-wrap text on whole paragraphs every time there is a small change.
   Basically it “stabilizes” the line wrapping, so small changes—say only a few words in one
   sentence—only impact nearby lines in the file.

It also wraps links with long URLs in them intelligently, so they don’t bungle up your
paragraphs. Take a look at
[the source to this README](https://github.com/jlevy/atom-flowmark/blame/master/README.md) for
an example. (And see [this discussion](https://github.com/shurcooL/markdownfmt/issues/17) for
more details.)

The hope is that you—or anyone else you collaborate with—can run it any time to clean up
your Markdown consistently and routinely and with minimal diff churn.
Other GitHub features also work better:
Unlike the situation with paragraph-long lines, shorter lines mean diff line counts and
Git blame also become meaningful (just as with a normal programming language).
Note that the Flowmark formatting rules are a little complex, but that’s okay, as long as
they’re consistent.

## Installation and Use

Install as usual in Atom, by going to preferences, select install, and search for
“flowmark”. You’ll then have a Flowmark menu item under *Packages*. Or use the hot key
Shift-Cmd-M to reformat the whole doc.

It helps to use [line-diff-details-plus](https://atom.io/packages/line-diff-details-plus),
[GitHub Desktop](https://desktop.github.com/), or something similar to see and review changes
before saving or committing.

## Alternatives and Previous Work

The idea of wrapping text based on sentences or phrases from the idea of
[semantic linefeeds](http://rhodesmill.org/brandon/2012/one-sentence-per-line/).
Auto-formatting Markdown has been done before, notably with
[tidy-markdown](https://github.com/slang800/tidy-markdown) and
[atom-tidy-markdown](https://github.com/slang800/atom-tidy-markdown) (also used in
[atom-beautify](https://github.com/Glavin001/atom-beautify)),
[markdownfmt](https://github.com/shurcooL/markdownfmt) (in Go), and
[atom-markdown-format](https://github.com/shurcooL-legacy/atom-markdown-format) (an Atom
plugin based on markdownfmt but now deprecated).
These don’t try to reflow text, however.
A related approach, just to detect errors, is
[linter-markdown](https://github.com/AtomLinter/linter-markdown), which uses
[remark-lint](https://github.com/remarkjs/remark-lint)’s framework in Atom.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).

repository: jlevy/atom-flowmark

repo_name: jlevy/atom-flowmark


text:
# Issuing Certificates

## Prerequisites

- Ensure you've created an issuing address appropriate for the Bitcoin chain you are using. See [creating addresses](make_addresses.md) for details
    - regtest or testnet addresses will start with 'm' or 'n'
    - mainnet addresses will start with '1'
- Ensure you've transfered a small amount of coin to your issuing address. Note that each certificate costs 12750 satoshi
- If you haven't already, make sure your conf.ini (for this application) is correct. See [issuing options](bitcoin_options.md) for details

## Issuing

1. Add your certificates to data/unsigned_certs/

2. Make sure you have enough BTC in your issuing address.  ($0.08 USD)

    __Important note on denominations: If you are running a bitcoind node, note that the standard cli denomination is bitcoins not satoshis! In the cert-issuer app, the standard unit is Satoshis (this is common in other apis), and the values are converted to bitcoin first.__

    a. If you're using bitcoind, transfer money by the command line.
    ```
    bitcoin-cli sendtoaddress $issuer <amount>
    ```

    b. Otherwise send a payment to the issuing address with your online wallet

3. Run the issue_certificates.py script to create your certificates. If you've installed the package
you can run:

    ```
    python cert-issuer -c conf.ini
    ```

4. Output
  - The Blockchain Certificates will be located in data/blockchain_certificates.
  - If you ran in the mainnet or testnet mode, you can also see your transaction on a live blockchain explorer.
    - For example, Blockr.io has explorers for both [testnet](https://tbtc.blockr.io/) and [mainnet](https://blockr.io/).
    - The transaction id is located in the Blockchain Certificate under `receipt.anchors[0].sourceId`

repository: padillareyj/cert-issuer

repo_name: padillareyj/cert-issuer


text:
---
title: Post event handler
description: The "post" event handler allows you to POST Kapacitor alert data to an HTTP endpoint. This page includes configuration options and usage examples.
menu:
  kapacitor_1_5:
    name: Post
    weight: 1100
    parent: event-handlers
---

The post event handler posts JSON encoded data to an HTTP endpoint.

## Configuration
Configuration as well as default [option](#options) values for the post event
handler are set in your `kapacitor.conf`.
Below is an example configuration:

### Post Settings in kapacitor.conf
```toml
[[httppost]]
  endpoint = "example"
  url = "http://example.com/path"
  headers = { Example = "your-key" }
  basic-auth = { username = "my-user", password = "my-pass" }
  alert-template = "{{.Message}}:{{range .Data.Series}}{{.Tags}},{{range .Values}}{{.}}{{end}}{{end}}"
  alert-template-file = "/path/to/template/file"
  row-template = "{{.Name}} host={{index .Tags \"host\"}}{{range .Values}} {{index . "time"}} {{index . "value"}}{{end}}"
  row-template-file = "/path/to/template/file"
```

#### `endpoint`
Name of a configured HTTP POST endpoint that acts as an identifier for `[[httppost]]`
configurations when multiple are present.
_Endpoints are identifiers only. They are not appended to HTTP POST URLs._

#### `url`
The URL to which the alert data will be posted.

#### `headers`
Set of extra header values to set on the POST request.

#### `basic-auth`
Set of authentication credentials to set on the POST request.

#### `alert-template`
Alert template for constructing a custom HTTP body.
Alert templates are only used with post [alert](/kapacitor/v1.5/nodes/alert_node/)
handlers as they consume alert data.
_Skip to [alert templating](#alert-templates)._

#### `alert-template-file`
Absolute path to an alert template file.
_Skip to [alert templating](#alert-templates)._

#### `row-template`
Row template for constructing a custom HTTP body.
Row templates are only used with the [httpPost node](/kapacitor/v1.5/nodes/http_post_node/)
pipeline nodes as they consume a row at a time.
_Skip to [row templating](#row-templates)._

#### `row-template-file`
Absolute path to a row template file.
_Skip to [row templating](#row-templates)._

### Defining configuration options with environment variables
The `endpoint`, `url`, and `headers` configuration options can be defined with
environment variables:

```bash
KAPACITOR_HTTPPOST_0_ENDPOINT = "example"
KAPACITOR_HTTPPOST_0_URL = "http://example.com/path"
KAPACITOR_HTTPPOST_0_HEADERS_Example1 = "header1"
KAPACITOR_HTTPPOST_0_HEADERS_Example2 = "header2"
```

### Configuring and using multiple HTTP POST endpoints
The `kapacitor.conf` supports multiple `[[httppost]]` sections.
The [`endpoint`](#endpoint) configuration option of each acts as a unique identifier for that specific configuration.
To use a specific `[[httppost]]` configuration with the Post alert handler,
specify the endpoint in your [post alert handler file](#example-handler-file-using-a-pre-configured-endpoint),
or [your TICKscript](#example-tickscript-using-a-pre-configured-endpoint).

_**kapacitor.conf**_
```toml
[[httppost]]
  endpoint = "endpoint1"
  url = "http://example-1.com/path"
  # ...

[[httppost]]
  endpoint = "endpoint2"
  url = "http://example-2.com/path"
  # ...
```

Multiple HTTP POST endpoint configurations can also be added using environment variables.
Variables values are grouped together using the number in each variable key.

```bash
KAPACITOR_HTTPPOST_0_ENDPOINT = "example0"
KAPACITOR_HTTPPOST_0_URL = "http://example-0.com/path"
KAPACITOR_HTTPPOST_0_HEADERS_Example1 = "header1"
KAPACITOR_HTTPPOST_0_HEADERS_Example2 = "header2"

KAPACITOR_HTTPPOST_1_ENDPOINT = "example1"
KAPACITOR_HTTPPOST_1_URL = "http://example-1.com/path"
KAPACITOR_HTTPPOST_1_HEADERS_Example1 = "header1"
KAPACITOR_HTTPPOST_1_HEADERS_Example2 = "header2"
```

## Options
The following post event handler options can be set in a
[handler file](/kapacitor/v1.5/event_handlers/#handler-file) or when using
`.post()` in a TICKscript.

| Name             | Type                    | Description                                                                                |
| ----             | ----                    | -----------                                                                                |
| url              | string                  | The URL to which the alert data will be posted.                                                                     |
| endpoint         | string                  | Name of a HTTP POST endpoint (configured in the `kapacitor.conf`) to use. _Cannot be specified in place of the URL._ |
| headers          | map of string to string | Set of extra header values to set on the POST request.                                                              |
| capture‑response | bool                    | If the HTTP status code is not an `2xx` code, read and log the HTTP response.                                   |
| timeout          | duration                | Timeout for the HTTP POST.                                                                                |

### Example: Handler file - Using a pre-configured endpoint
```yaml
id: handler-id
topic: topic-name
kind: post
options:
  # Using the 'example' endpoint configured in the kapacitor.conf
  endpoint: example
```

### Example: Handler file - Defining post options "inline"
```yaml
id: handler-id
topic: topic-name
kind: post
options:
  # Defining post options "inline"
  url: http://example.com/path
  headers:
    'Example1': 'example1'
    'Example2': 'example2'
  capture-response: true
  timeout: 10s
```

### Example: TICKscript - Using a pre-configured endpoint
```js
|alert()
  // ...
  // Using the 'example' endpoint configured in the kapacitor.conf
  .post()
    .endpoint('example')
```

### Example: TICKscript - Defining post options "inline"
```js
|alert()
  // ...
  // Defining post options "inline"
  .post('http://example.com/path')
    .header('Example1', 'example1')
    .header('Example2', 'example2')
    .captureResponse()
    .timeout(10s)
```

## Using the Post event handler
The post event handler can be used in both TICKscripts and handler files to post
alert and HTTP POST data to an HTTP endpoint.
The examples below deal with alerts and use the same `[[httppost]]` configuration
defined in the `kapacitor.conf`:

_**HTTP POST settings in kapacitor.conf**_
```toml
[[httppost]]
  endpoint = "api-alert"
  url = "http://mydomain.com/api/alerts"
  headers = { From =<EMAIL_ADDRESS>}
  alert-template = "{{.Message}}:{{range .Data.Series}}{{.Tags}},{{range .Values}}{{.}}{{end}}{{end}}"
```

### Post alerts from a TICKscript
The following TICKscripts use the `.post()` event handler to post the message,
"Hey, check your CPU", whenever idle CPU usage drops below 10%.

_**post-cpu-alert.tick**_
```js
stream
  |from()
    .measurement('cpu')
  |alert()
    .crit(lambda: "usage_idle" < 10)
    .message('Hey, check your CPU')
    .post()
      .endpoint('api-alerts')
```

If you don't want to use the `[[httppost]]` settings defined in the `kapacitor.conf`,
you can specify your post options inline.

_**post-cpu-alert.tick**_
```js
stream
  |from()
    .measurement('cpu')
  |alert()
    .crit(lambda: "usage_idle" < 10)
    .message('Hey, check your CPU')
    .post('http://example.com/path')
      .header('Example1', 'example1')
      .header('Example2', 'example2')
      .captureResponse()
      .timeout(10s)
```

### Post alerts from a defined handler
The following setup sends an alert to the `cpu` topic with the message, "Hey,
check your CPU".
A post handler is added that subscribes to the `cpu` topic and posts all alert
messages to the url and endpoint defined in the `kapacitor.conf`.

Create a TICKscript that publishes alert messages to a topic.
The TICKscript below sends an alert message to the `cpu` topic any time idle CPU
usage drops below 10%.

_**cpu\_alert.tick**_
```js
stream
  |from()
    .measurement('cpu')
  |alert()
    .crit(lambda: "usage_idle" < 10)
    .message('Hey, check your CPU')
    .topic('cpu')
```

Add and enable the TICKscript:

```bash
kapacitor define cpu_alert -tick cpu_alert.tick
kapacitor enable cpu_alert
```

Create a handler file that subscribes to the `cpu` topic and uses the post event
handler to post alerts to an HTTP endpoint.

_**post\_cpu\_handler.yaml**_
```yaml
id: post-cpu-alert
topic: cpu
kind: post
options:
  url: 'http://example.com/path'
  headers:
    'From'<EMAIL_ADDRESS>```

Add the handler:

```bash
kapacitor define-topic-handler post_cpu_handler.yaml
```

## Post templating
The post event handler allows you to customize the content and structure of
POSTs with alert and row templates.

### Alert templates
Alert templates are used to construct a custom HTTP body.
They are only used with post [alert](/kapacitor/v1.5/nodes/alert_node/) handlers
as they consume alert data.
Templates are defined either inline in the `kapacitor.conf` using the
[`alert-template`](#alert-template) configuration or in a separate file and referenced
using the [`alert-template-file`](#alert-template-file) config.

Alert templates use [Golang Template](https://golang.org/pkg/text/template/) and
have access to the following fields:

| Field        | Description                                             |
| -----        | -----------                                             |
| .ID          | The unique ID for the alert.                            |
| .Message     | The message of the alert.                               |
| .Details     | The details of the alert.                               |
| .Time        | The time the alert event occurred.                      |
| .Duration    | The duration of the alert event.                        |
| .Level       | The level of the alert, i.e INFO, WARN, or CRITICAL.    |
| .Data        | The data that triggered the alert.                      |
| .Recoverable | Indicates whether or not the alert is auto-recoverable. |

#### Inline alert template
_**kapacitor.conf**_
```toml
[[httppost]]
  endpoint = "example"
  url = "http://example.com/path"
  alert-template = "{{.Message}}:{{range .Data.Series}}{{.Tags}},{{range .Values}}{{.}}{{end}}{{end}}"
```

#### Alert template file
_**kapacitor.conf**_
```toml
[[httppost]]
  endpoint = "example"
  url = "http://example.com/path"
  alert-template-file = "/etc/templates/alert.html"
```

_**/etc/templates/alert.html**_
```html
{{.Message}}:{{range .Data.Series}}{{.Tags}},{{range .Values}}{{.}}{{end}}{{end}}
```

### Row templates
Row templates are used to construct a custom HTTP body.
They are only used with [httpPost](/kapacitor/v1.5/nodes/http_post_node/)
handlers as they consume a row at a time.
Templates are defined either inline in the `kapacitor.conf` using the
[`row-template`](#row-template) configuration or in a separate file and referenced
using the [`row-template-file`](#row-template-file) config.

Row templates use [Golang Template](https://golang.org/pkg/text/template/) and
have access to the following fields:

| Field   | Description                                                                                |
| -----   | -----------                                                                                |
| .Name   | The measurement name of the data stream                                                                                |
| .Tags   | A map of tags on the data.                                                                                |
| .Values | A list of values; each a map containing a "time" key for the time of the point and keys for all other fields on the point. |

#### Inline row template
_**kapacitor.conf**_
```toml
[[httppost]]
  endpoint = "example"
  url = "http://example.com/path"
  row-template = '{{.Name}} host={{index .Tags "host"}}{{range .Values}} {{index . "time"}} {{index . "value"}}{{end}}'
```

#### Row template file
_**kapacitor.conf**_
```toml
[[httppost]]
  endpoint = "example"
  url = "http://example.com/path"
  row-template-file = "/etc/templates/row.html"
```

_**/etc/templates/row.html**_
```html
{{.Name}} host={{index .Tags \"host\"}}{{range .Values}} {{index . "time"}} {{index . "value"}}{{end}}
```


text:
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tf_agents.trajectories.trajectory.mid" />
<meta itemprop="path" content="Stable" />
</div>

# tf_agents.trajectories.trajectory.mid

Create a Trajectory transitioning between StepTypes `MID` and `MID`.

``` python
tf_agents.trajectories.trajectory.mid(
    observation,
    action,
    policy_info,
    reward,
    discount
)
```

Defined in [`trajectories/trajectory.py`](https://github.com/tensorflow/agents/tree/master/tf_agents/trajectories/trajectory.py).

<!-- Placeholder for "Used in" -->

All inputs may be batched.

The input `discount` is used to infer the outer shape of the inputs,
as it is always expected to be a singleton array with scalar inner shape.

#### Args:

* <b>`observation`</b>: (possibly nested tuple of) `Tensor` or `np.ndarray`;
    all shaped `[T, ...]`.
* <b>`action`</b>: (possibly nested tuple of) `Tensor` or `np.ndarray`;
    all shaped `[T, ...]`.
* <b>`policy_info`</b>: (possibly nested tuple of) `Tensor` or `np.ndarray`;
    all shaped `[T, ...]`.
* <b>`reward`</b>: (possibly nested tuple of) `Tensor` or `np.ndarray`;
    all shaped `[T, ...]`.
* <b>`discount`</b>: A floating point vector `Tensor` or `np.ndarray`;
    shaped `[T]` (optional).

#### Returns:

A `Trajectory` instance.

repository: ageron/agents

repo_name: ageron/agents


text:
[TOC]

# Overview
**XDG Base Directory Specification**: Various specifications specify files and file formats. This specification defines where these files should be looked for by defining one or more base directories relative to which files should be located.

# Basics
- User-specific data files: `$XDG_DATA_HOME`
- User-specific configuration files: `$XDG_CONFIG_HOME`
- Set of preference ordered base directories relative to which data files should be searched: `$XDG_DATA_DIRS`
- Set of preference ordered base directories relative to which configuration files should be searched: `$XDG_CONFIG_DIRS`
- User-specific non-essential (cached) data: `$XDG_CACHE_HOME`
- User-specific runtime files and other file objects: `$XDG_RUNTIME_DIR`

All paths set in these environment variables must be absolute.

# Environment variables
- `$XDG_DATA_HOME`: default `$HOME/.local/share`
- `$XDG_CONFIG_HOME`: default `$HOME/.config`
- `$XDG_DATA_DIRS`: default `/usr/local/share/:/usr/share/`
- `$XDG_CONFIG_DIRS`: default `/etc/xdg`
- `$XDG_CACHE_HOME`: default `$HOME/.cache`
- `$XDG_RUNTIME_DIR`: init system


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

### Description

readObject in (1) Java Runtime Environment (JRE) and (2) Software Development Kit (SDK) 1.4.0 through 1.4.2_05 allows remote attackers to cause a denial of service (JVM unresponsive) via crafted serialized data.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/PalindromeLabs/Java-Deserialization-CVEs

repository: trickest/cve

repo_name: trickest/cve


text:
---
id: restricting-input-output
title: Restricting Input and Output Types
---

Since we are using Kotlin classes to represent both GraphQL input and output objects we can use the same class for both and the generator will handle type conflicts.

If you want to enforce that a type should never be used as an input or output you can use the `@GraphQLValidObjectLocations` annotation.
If the class was used in the schema in an invalid location an exception will be thrown.

```kotlin
class SimpleClass(val value: String)

@GraphQLValidObjectLocations([Locations.INPUT_OBJECT])
class InputOnly(val value: String)

@GraphQLValidObjectLocations([Locations.OBJECT])
class OutputOnly(val value: String)

// Valid Usage
fun output1() = SimpleClass("foo")
fun output2() = OutputOnly("foo")
fun input1(input: SimpleClass) = "value was ${input.value}"
fun input2(input: InputOnly) = "value was ${input.value}"

// Throws Exception
fun output3() = InputOnly("foo")
fun input3(input: OutputOnly) = "value was ${input.value}"
```

repository: ExpediaGroup/graphql-kotlin

gha_language: Kotlin

repo_name: ExpediaGroup/graphql-kotlin


text:
---
title : "Detectron2 with only cpu got error related to openmp"
date: 2021-01-19
categories: MacOS, Detectron2
---

I tested detectron2 (only cpu, NVIDIA does not support CUDA for mac os) and received error.

```
OMP: Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.
```

It is an error related to open mp and for solving you should type instruction on the top of code.

```
os.environ[‘KMP_DUPLICATE_LIB_OK’]=’True’
```


text:
# About

This file hosts my resolutions for 2022. The indicators 🟢/🟡/🔴 stand for good/ intermediate/ bad progress, relative to the completion of the year.

# Resolutions

In 2022, I will strive to do the following:

1. [Operationalizing my values](#operationalization): Integrate my values more explicitly into my workflows.
  - J:🟡 F:🟡 M:🟡 A:🟡 M:🟡 J:🟡 J:🟡 A:🟡 S:🟡 O:🟡 N:🟡 D
2. [Documentation](#documentation): Document progress on at least a monthly basis.
  - J:🟡 F:🟡 M:🟡 A M J J A S O N D

# Operationalization

## Ethical Source Principles
As per [https://ethicalsource.dev/principles/](https://ethicalsource.dev/principles/):

> The practice of Ethical Source is informed by these seven principles:
>
>  1. Our work benefits the commons. We grant permission to modify, create derivative works, use and reuse it, in the spirit of openness and bounded by ethical constraints.
>  1. Our work is done in the open. We make our source publicly available, develop and maintain it in public view, and welcome public contributions.
>  1. Our community strives to be welcoming and just. We practice transparent and just governance, and we consistently and fairly enforce a comprehensive code of conduct that codifies our values.
>  1. Our work respects accessibility as a human right. We ensure that the full value of our work is available to everyone, regardless of ability.
>  1. Our work prioritizes the safety of people. We design safeguards to minimize the risk of abuse or harm to others through its use or misuse.
>  1. Our work protects privacy. It stores as little personal data as necessary and incorporates reasonable security measures for its protection. All personal data it collects can be deleted on request, and all such data can be delivered to its originator in an open and human-readable format.
>  1. Our work deserves support. We believe in the dignity of our work. When it is used for commercial gain, we rightfully expect those who profit from it to contribute back to its source and support our community in other tangible ways.
>
> We measure success in adhering to these principles through our *impact* rather than our *intentions*.>

## Values

### Universal values

As per https://unsdg.un.org/2030-agenda/universal-values .

### Compilations of values

A list of values is in [this thread](https://web.archive.org/web/20220118023738/https://www.quora.com/What-are-the-most-valuable-things-everyone-should-know/answer/Jordan-B-Peterson), which has given rise to the book "[12 Rules for Life: An Antidote to Chaos ](https://www.jordanbpeterson.com/12-rules-for-life/)" which condesed values into this set of 12 rules:

1. Stand up straight with your shoulders back
1. Treat yourself like someone you are responsible for helping
1. Make friends with people who want the best for you
1. Compare yourself to who you were yesterday, not to who someone else is today
1. Do not let your children do anything that makes you dislike them
1.  Pursue what is meaningful (not what is expedient)
1. Tell the truth – or, at least, don't lie
1. Assume that the person you are listening to might know something you don't
1. Be precise in your speech
1. Do not bother children when they are skateboarding
1. Pet a cat when you encounter one on the street

### My starting points

I will use my [pledges](https://github.com/Daniel-Mietchen/pledges) as a starting point, trying to

1. make the values more explicit;
1. establish closer links between my values and actions, especially prioritization (both active and passive) and decisions;
1. take inspiration from others who have explored values in depth, e.g. [researchers publishing on values](https://scholia.toolforge.org/topic/Q194112), or [dying people looking back at their lives](https://web.archive.org/web/20200928042815/https://hard-wears.com/wp-content/uploads/2013/04/Top-5-Regrets-of-the-Dying.pdf ), or [ethical licenses](https://ethicalsource.dev/licenses/).

### Confounding variables

There are various variables that interact with our values. For instance, the study [Why we eat what we eat. The Eating Motivation Survey (TEMS)](https://www.wikidata.org/wiki/Q47874670) listed 15 of them in relation to eating habits (cf. their Table 3):
1. Liking
2. Habits
3. Need & Hunger
4. Health
5. Convenience
6. Pleasure
7. Traditional Eating
8. Natural Concerns
9. Sociability
10. Price
11. Visual Appeal
12. Weight Control
13. Affect Regulation
14. Social Norms
15. Social Image

## Value discussions

* [Values of Wikimedia Germany](https://de.wikipedia.org/wiki/Wikipedia:Wikimedia_Deutschland/Wertedialog/Vorschlag:_WMDE%E2%80%93Werte)
* [Values in Judo](https://www.judobund.de/fileadmin/_horusdam/9755-judo-werte.pdf)
* [Personal values in human life](https://doi.org/10.1038/s41562-017-0185-3)

## Workflows

What I have in mind here are primarily my public workflows, i.e. mainly those related to research, education and humanitarian activities. A closer integration of my values with my non-public workflows is of interest too, but I will likely not comment on that in public.

# Documentation

The main issue here is not that I do not document but that I do so in various places. Most of these are public, so the main task is hence to take some time on a regular basis to add pointers here.

* I curated the literature about ethical, social, cultural and personal values in Wikidata, to the point that the corresponding Scholia profiles are now too information-rich to be rendered properly, so that needs to be fixed.

# Other ideas considered in drafting

* FAIRify my pledges
* [add two low-carbon habits](https://twitter.com/KHayhoe/status/1354124680978968576)
* Find a way to include vision statements by others (e.g. [by Kew Royal Botanic Gardens](http://web.archive.org/web/20210601021921/https://www.kew.org/sites/default/files/2021-05/RBG%20Kew%20Scientific%20Priorities%202021%20-%202030%20-%20May%202021.pdf)) on their scientific priorities in my resolutions and their implementation
* integrate pledges I have signed into my [personal pledges](https://github.com/Daniel-Mietchen/pledges)
* [Plan more concretely for when I'm gone](https://github.com/Daniel-Mietchen/ideas/issues/518)
* [Write next year's performance review now](https://www.youtube.com/watch?v=n3kNlFMXslo#t=5m53s)
* Go (entirely?) offline for at least six days in a row
* Join some more organizations whose missions are aligned with mine.
  - candidates: IGDORE, Sichere Videokonferenz
* Organize public online events on a regular basis, e.g. monthly, and ideally weave them together into a carpet that covers a structured set of themes.
* Do some concrete experimentation around ethical banking, as per [idea 969](https://github.com/Daniel-Mietchen/ideas/issues/969)
* Come up with a better system to decide which activities to stop in order to make room for taking up new ones
* Try to make more explicit connections to values when I am involved in decisions.
* When doing challenges, allow for a useful arrangement of breaks in between.
* Block certain periods of time for focus hours, perhaps with dedicated subsets for writing manuscripts or code and for reading and reviewing.
* Something offline
* Something outdoors
* Something related to SDGs, especially those with which I have not traditionally engaged much.
* Integrate documentation more closely into my workflows.
* Spend more time outdoors.
* Refine my scheduling to enhance focus hours.
* Streamline my handling of paperwork.

# See also

* [Overview of my public new year resolutions](https://github.com/Daniel-Mietchen/ideas/tree/master/new-year-resolutions)

repository: Daniel-Mietchen/ideas

repo_name: Daniel-Mietchen/ideas


text:
## What is this?
This code provides the information of the called number to PopUp when a call comes to the IP phone..

        - Display image/text caller information depending on phone model.

        - Auto-hide caller information when a call is dropped.

        - Answer a call.

        - Support

## Development environment.
	CUCM 11.5
	Cisco JTAPI
	Cisco IP Phone Services Software Development Kit
	Eclipse
	Spring boot
	Spring Tool Suite: (installation: https://www.codejava.net/ides/eclipse/install-spring-tool-suite-for-existing-eclipse-ide)
	Lombok: (installation: https://projectlombok.org/setup/eclipse)

## Update project.
    Right Click on CallerPopup project,  Maven > Update Project.

## Build project.
    Right Click on CallerPopup project,  Run As > Maven test

## Run project on eclipse.
    Right Click on CallerPopup project,  Run As > Spring Boot App

## Setting
you change the setting to use it.

#### CUCM Configuration

#### configuration
	path : /source/src/main/resource/application.properties

	server.port=<APP Lisen Port>
	ipps.cucm.providerString=<CUCM IP1>,<CUCM IP2>;login=<CUCM APP ID>;passwd=<CUCM APP PWD>;appinfo=callerPopup
	ipps.server.url=http://<ServerIP>:<ServerPort>
	ipps.path.popup = /popup
	ipps.path.images = /images
	ipps.path.answer = /answer
	logging.level.com.comtec.ipps = DEBUG

## Example
#### run screenshot

#### Code Example
You correct file to com.comtec.ipps.cp.data.ExamplePhoneBookRepository

	public class ExamplePhoneBookRepository implements PhoneBookRepository {
		...
        	}
		Map<String, UserImpl> users = new HashMap<>();

		public ExamplePhoneBookRepository() {
		    // Here you write.
		    users.put("1005", new UserImpl("1005", "Sin Jageum", "SHC1005.png"));
		}

		@Override
		public PhoneUser findUserByPhoneNumber(String phoneNumber) {
		    return users.get(phoneNumber);
		}
	}

## License
This project is licensed under the Apache License 2.0 - see the  [LICENSE.md](./LICENSE.md) file for details.


text:
**This is the answer to "How to install Git locally?"**

Before you start this process, create an account on Github at[ ](https://github.com/)[https://github.com/](https://github.com/).

# Download and Install Git

[https://git-scm.com/downloads](https://git-scm.com/downloads)

This will install a Folder with a number of file and programs.

Open a bash window \(`terminal` on Mac or '`git bash`' on Windows\) and type in

`git --version`

This should return a confirmation that git is installed with a version number.

# Connect to your local workstation to Github with SSH

Without SSH connection setup you will have to enter your username and password every time you connect to Github, which you will usually have to do during a `git push`  command.  By sharing your workstation public key with Github, you will not have to provided username and password to connect.

Open a bash session \(`terminal` on Mac or '`git bash`' on Windows\).  All commands below should be entered into the bash session.

Check to see if you already have a private key/public key setup by listing any files in the hidden direction .ssh.

`ls -al ~/.ssh`

If you don't see any of the following files you will need to create  the key files

* id\_rsa.pub
* id\_ecdsa.pub
* id\_ed25519.pub

# Create public key/private key files if they don't already exist

**You only need to do this step if you don't already have public/private key files.**

You ll first create the key files using the email you provided to Github.  This will label the keys with that  email.

`ssh-keygen -t rsa -b 4096 -C<EMAIL_ADDRESS>
`Generating public/private rsa key pair.`

Next you'll be prompted to enter a file name for your keys and you can just press enter to accept the default.

`Enter a file in which to save the key (/c/Users/you/.ssh/id_rsa):[Press enter]`

Finally, you'll be prompted to enter a passphrase.  This is a security feature and you will have to enter this passphrase when you connect to Github, so be sure to remember it.  It can be as simple as a four digit pin number.

`Enter passphrase (empty for no passphrase): [Type a passphrase]`

`Enter same passphrase again: [Type passphrase again]`

# Start SSH Agent and Add Keys

The SSH Agent is a process that will allow you to manage SSH Keys.  You'll start that process and add your keys with the following command.

`eval $(ssh-agent -s)`

You will see a response like this indicate that the process is running.

`Agent pid 59566`

The command below adds your key to the ssh agent.  If the name of your key is different replace `id_rsa` with the name of your key.

`ssh-add ~/.ssh/id_rsa`

# Add the SSH Key to you Github Acccount

Now you need to add the public key to your Github account.  This will allow Github to decrypt the data you send it via SSH.

We start by using the `clip` command to copy the content of the public key SSH file to your local buffer.

`clip < ~/.ssh/id_rsa.pub`

If the `clip` command is not installed you can list the file to the console and then copy the contents into your buffer with ctrl-c/cmd-c.  The `cat` command will list the file to the console.

`cat ~/.ssh/id_rsa.pub`

You can also open the file with a text editor and copy the content into the buffer if you have trouble with the `clip` command.

Next, go to your Github account online and click on your photo.  This will reveal a dropdown selection where you should select **Settings**.

![](/assets/settings-github.PNG)

The **Setings** menu will appear on the left of the screen and from there you will click on SSH and GPG keys.

![](/assets/settings-github-2.PNG)

After you click on SSH and GPG keys you, you will you click on a button to add a new key.

![](/assets/ssh-key-add.PNG)

Click on the Green button to add the key you have in you buffer.  You should see a form. Enter a Title that help you to remember the workstation you got the key from and then paste the key into the key textarea.  Finally click on the Add SSH key to add it to the list of keys known to Github.

![](/assets/ssh-key-add-2.PNG)

# Update User Name and Email in Local Git Config

The local Git program maintains configuration data about you that should correspond to your account on github.com.  You'll want to provide the email and user name that you used for github.com in when you execute the following commands.

`git config --global user.name "Mona Lisa"`

`git config --global user.email<EMAIL_ADDRESS>
You can execute these commands to verify that you have set up the config variables properly.

`git config --global user.name`

`git config --global user.email`

Additional References

[https://help.github.com/articles/connecting-to-github-with-ssh/](https://help.github.com/articles/connecting-to-github-with-ssh/)


text:
# mkdfa.py / mkdfa.pl

Grammar compiler for Julius.

## Synopsis

Python 3 version:

```shell
% mkdfa.py [options] prefix
```

Perl version:

```shell
% mkdfa.pl [options] prefix
```

## Description

`mkdfa.pl` compiles Julius grammar definition (BNF-style definition file
`.grammar` and vocabulary file  `.voca`) into finite automaton grammar to be
used in Julius.

The output files, `prefix.dfa` and `prefix.dict`, can be read by Julius to
perform grammar-based recognition based on the given grammar.

`mkdfa.py` is a python 3 version of `mkdfa.pl`, just works as the same.

### Prerequisites

`mkdfa.pl` requires Perl to run.  `mkdfa.py` requires Python 3.x to run.

Both of them requires `mkfa` and `dfa_minimize` to be placed on the same
directory of `mkdfa.pl`.

See [Julius grammar-kit GitHub](https://github.com/julius-speech/grammar-kit/)
for details about grammars. There are also an
[example](https://github.com/julius-speech/grammar-kit/tree/master/SampleGrammars_en).

### Installing

This tool will be installed together with Julius. Place `mkfa` and
`dfa_minimize` at the same directory as `mkdfa.pl` or `mkdfa.py`, since it invokes them
internally while compilation.

## Usage

Compiling the [sample
grammar](https://github.com/julius-speech/grammar-kit/tree/master/SampleGrammars_en)
"fruit":

```shell
% git clone https://github.com/julius-speech/grammar-kit/
% cd grammar-kit/SampleGrammars_en
% mkdfa.py fruit
fruit.grammar has 8 rules
fruit.voca    has 8 categories and 31 words
---
Now parsing grammar file
Now modifying grammar to minimize states[0]
Now parsing vocabulary file
Now making nondeterministic finite automaton[10/10]
Now making deterministic finite automaton[10/10]
Now making triplet list[10/10]
8 categories, 10 nodes, 17 arcs
-> minimized: 8 nodes, 13 arcs
---
generated: fruit.dfa fruit.term fruit.dict
```

Running Julius with them:

```shell
% julius ... -dfa fruit.dfa -v fruit.dict
```

or

```shell
% julius ... -gram fruit
```

## Options

### `-n`

Skip voca-to-dict conversion. Build `.dfa` from `.grammar` but leave `.dict`
unchanged.

## Environment Variables

### TMP / TEMP

Temporary directory for `mkdfa.pl`.  When not specified, one from the following
list will be used:

- /tmp
- /var/tmp
- /WINDOWS/Temp
- /WINNT/Temp.

`mkdfa.py` does not use environment value.  It uses `tempfile.gettempdir()` to
get temporary directory.

## Related tools

- "[dfa_minimize](https://github.com/julius-speech/julius/tree/master/gramtools/dfa_minimize)"
  can minimize DFA. `mkdfa.pl` and `mkdfa.py` call call this inside the process.
- "[mkfa](https://github.com/julius-speech/julius/tree/master/gramtools/mkdfa/mkfa-1.44-flex)"
    is the core BNF-to-FSA compiler.  `mkdfa.pl` and `mkdfa.py` call this inside the process.
- "[generate](https://github.com/julius-speech/julius/tree/master/gramtools/generate)"
  can generate sentences randomly according to the grammar.
- "[accept_check](https://github.com/julius-speech/julius/tree/master/gramtools/accept_check)"
  can check sentence acceptance.
- "[nextword](https://github.com/julius-speech/julius/tree/master/gramtools/nextword)"
  can show word prediction of a grammar at given context for debug.

## License

`mkdfa.pl` is distributed under the same license with Julius.  See the license
term of Julius for details.

`mkdfa.py` is a contributed script, distributed under the MIT license:

> Copyright (c) 2019 Sunao Hara.
> This script is released under the MIT license.
> [https://opensource.org/licenses/mit-license.php](https://opensource.org/licenses/mit-license.php)
>
> Original Site:
> [https://gist.github.com/naoh16/eabd11ed010b450963c108b2436eac4f](https://gist.github.com/naoh16/eabd11ed010b450963c108b2436eac4f)

repository: flaviomouracba/julius

repo_name: flaviomouracba/julius


text:
---
layout: post
title:  MELD Surface-based FCD Classifier
categories: studies
excerpt: Interpretable surface-based detection of FCDs
tags: []
image:
  feature:
link:
date: 2022-08-06
modified:
share: true
---

### Interpretable surface-based detection of FCDs - a MELD study

Machine learning has the potential to revolutionize the field of diagnostic biomedical imaging, but one outstanding challenge is algorithm interpretability. This is particularly important when it comes to incorporating AI for FCD detection into clinical practice.

FCDs are difficult to visualize but often amenable to surgical resection. We wanted to create a robust machine-learning algorithm that could detect FCDs on heterogeneous structural MRI data from epilepsy surgery centres worldwide. However, crucially we wanted to "open the black box" and ensure that the algorithm was interpretable. Clinicians need to be able to understand why the AI identified a particular area.

In work [published in BRAIN](https://academic.oup.com/brain/article/145/11/3859/6659752) in 2022, the Multi-centre Epilepsy Lesion Detection (MELD) Project set out to develop an open-source, interpretable, surface-based machine-learning algorithm to automatically identify FCDs.

We collated a retrospective MRI cohort of 1015 participants, including 618 patients with focal FCD-related epilepsy and 397 controls, from 22 epilepsy centres around the world. Using 33 surface-based features, we trained and cross-validated a neural network on 50% of the total cohort. We then tested the network on the remaining withheld 50% of the cohort, as well as on two independent test sites.

We used multidimensional feature analysis and integrated gradient saliencies to interrogate network performance.

MELD processing pipeline.

### Results ####
Across the entire withheld test cohort,after including a border zone around lesions to account for uncertainty around the borders of manually delineated lesion masks, the sensitivity was 67%.
On a restricted "gold-standard" subcohort of seizure-free patients with FCD type IIB who had T1 and fluid-attenuated inversion recovery MRI data, the MELD FCD surface-based algorithm had a sensitivity of 85%.
Specificity was 54%.

Here are examples of classifier performance:

Classifier predictions for six patients. Patients 1–4 are examples where the classifier has correctly identified the lesion. In Patient 4 an additional cluster in the left insula is identified. Patient 5 is an example where the classifier detects an area in the border zone. Patient 6 is an example of where the neural network has not identified the lesion. An additional cluster is detected in the right post-central gyrus.

### Running the pipeline on new patients ###

Our pipeline outputs individual patient reports with the location of predicted lesions, along with their imaging features and relative saliency to the classifier. The pipeline also maps the predicted lesions back to the native T1 so that they can be reviewed by a radiologist.

Individual patient reports. Here are individual reports for 2 patients. (A) Classifier predictions (dark red) and manual lesion mask (black line) visualized on brain surfaces (B) Z-scored mean feature values within predicted lesions coloured with Integrated Gradients saliency scores. Positive saliency scores indicate feature values driving the classifier’s ‘lesion’ prediction. Negative scores indicate feature values that are inconsistent with the prediction. (C) Lesional cortex highlighted on the patients’ MRI scans.

**The MELD classifier can be run on MRI data from any 1.5T or 3T scanner on any patient who is over age 3!**

In April 2023 (8 months after publication), the MELD team had run 2 workshops to train clinicians and researchers how to use the classifier. We have issued 53 site codes from 35 epilepsy centres.

**Overall, by leveraging the power of machine learning and combining it with "explainable AI", we provide an open-source algorithm for the detection of focal cortical dysplasias.**

There are many more cool analyses and results in the [paper](https://academic.oup.com/brain/article/145/11/3859/6659752) - so do check it out!

*Written with the assistance of ChatGPT*