text:
---
date: 2017-04-19 10:00:00+00:00
slug: typescript-instead-of-react-proptypes
title: 'TypeScript over React PropTypes'
pageDesc: 'I ditched React PropTypes in favour of TypeScript to see how things stacked up.'
---

[React v15.5.0](https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html) is here and the `React.PropTypes` module gives a deprecation warning. Moving forward you'll find it in it's own [package](https://github.com/reactjs/prop-types).

I've always used React PropTypes because it seemed like the 'right way' to do things. Runtime validation has obvious value but in my experience there are three big negatives to it:

1. PropTypes are tedious to write
2. PropTypes bloat production code
3. Runtime validation is slow and I miss errors

I solve the first thing with more coffee. I solve the second with Babel transform plugins to drop them from production. Thing three; coffee again perhaps (solution or problem?). There must be a better way, right?

## TypeScript

[TypeScript](https://www.typescriptlang.org/) "is a typed superset of JavaScript that compiles to plain JavaScript".

TypeScript (and [Flow](https://flow.org/en/)) has been on my radar for a long time. I've yet to learn most of what's possible but enough to get going. [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) provides the type defintions for React (and myriad other libraries).

In place of PropTypes I can add a type interface for functional components:

```jsx
interface ButtonProps {
  text: string,
  shadow?: boolean
}

const Button: React.SFC<ButtonProps> = props => {
  return ( /* [...] */ );
};
```

Now when I use the `<Button/>` component my editor shows useful info like missing props and specific types:

![TypeScript in action with React development](/images/blog/dbushell-button-typescript.gif)

That sure beats runtime validation.

TypeScript is more than a React PropTypes replacement. It adds a whole lot to JavaScript and I'm keen to learn it. Not least because my franken-website is a hybrid of TypeScript and Babel compilation. Promise me you won't look.

By the way. As you probably know, I'm [statically generating](/2017/02/13/react-as-a-static-site-generator/) my website with React. I figured, why not make it universal?

If you open the dev console and type:

```js
dbushell.universal();
```

Hit return, it'll fetch in Preact and stuff. Now have a click around. There should no longer be a page refresh. This is still in the experimental stage but it looks to be working as intended! [Tweet me opinions @dbushell](https://twitter.com/dbushell).

Check back soon for more on that.

repository: tied/DevArtifacts

repo_name: tied/DevArtifacts


text:
### Aim for Creating this Project
Providing an RESTFul open source server framework (similiar to express) with powerful functionality.

### Design for the project
There are 3 part of design 1) Basic Functionality 2) Advance Functionality 3) Utility Helper Functionality

#### Basic Functionality
- Server Creation
- Request
- Response
- Middleware

#### Advance Functionality
- Routers
- template engine support

#### Utility Helper Functionality
- bodyParser
- urlParser

### Basic Architecture for the project
Simple architecture in words :-
There is a server creation with named singleton Class (called as APP/server) with providing wrappers of REST APIs (include Methods).
Which will create an APP Stack which will be call subroutines (called as middleware), middleware will be passed with 3 PARAMs
Request, Response and next Handler.

### Planing to Execute this project

Will start with proper documention, packaging and publishing of this Framework (processed by CI CD model)
Open Source model as contribute guideline, issue guideline, Linsensing , Pull Request guildlines, Commit Message checks all things needs to include.

license: MIT

repository: pfarkya/mambaex

branch_name: refs/heads/master

extension: md

gha_language: Python

gha_license_id: MIT

license_type: permissive

repo_name: pfarkya/mambaex


text:
Jenkins Manager
=========

This role deploys a single Jenkins instance via Docker Swarm. The Jenkins home directory is persisted and the service is constrained to one swarm node.

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

* Docker
* Docker Swarm
* Must be run on a manager node

Role Variables
--------------

* `config_dir`: The directory where Ansible will save all config files needed for the Docker stack.
* `docker_stack_env`: A dict of environment variables passed to `docker stack deploy`.
* `jenkins_swarm_node`: The name of the swarm node that Jenkins will be constrained to.

Example Playbook
----------------

    - hosts: swarm_managers
      roles:
         - jenkins_manager

repository: metridoc/metridoc-rails

gha_language: HTML

repo_name: metridoc/metridoc-rails


text:
## RUBY-SPECIFIC TESTS

This directory should only contain tests that are specific to the Ruby library/API.
Tests ported from the upstream Java library should live in spec/typesafe/config.

Where possible it would be good to avoid sharing fixtures between the two types
of tests as well.

repository: puppetlabs/ruby-hocon

branch_name: refs/heads/main

gha_language: Ruby

repo_name: puppetlabs/ruby-hocon


text:
# PyPdfMerge

## Installation
* pip3 install -r requirements.txt
* python3 qt.py

## TODO
* File Table
    * add files -> add to existing list
    * cancel / delete files
* Merging
    * Page specifics per pdf
    * Specify output file name / location
* Other
    * Build / Package as executable
    * cross platform testing

repository: OwenSawyer/PyPdfMerge

repo_name: OwenSawyer/PyPdfMerge


text:
Protocol Buffer
===============

This is an implementation of Google's Protocol Buffers for the D programming language. [Protocol Buffer](https://developers.google.com/protocol-buffers/docs/overview) is a binary wire transfer format.

Source code generated using this library has the proto file comments transferred as documentation comments. Important accessors which do not have comments are given an empty documentation comment so generated docs will mention their existence.

Status
------

This is an incomplete implementation of the spec. It is expanded on an as needed basis, pull requests and bug reports welcome.

This library supports output for version 1 and version 2 of dlang, the version 1 output is compatible with both compilers, while version 2 output provides an interface more natural to the language.

* Supports basic types (message, enum, extension)
* Supports options: packed, deprecated and default.

Todo
----

* Expose unknown options to runtime
* Finalize on interface for D2
* Support services
* Support C style multi-line comments

D Interface
-----------

The source output for D is meant to feel more natural than the official compiler provides to other languages.

A message is translated into a struct and provides a static opCall to deserialize a ubyte[]. A Serialize function is provided to turn the message into a ubyte[]. And all message fields are fields of the struct wrapped in Nullable!().

D v1 Interface
--------------

The interface provided for version 1 of the language (also usable in version 2) provides a slightly different structure.

A message is translated into a class and provides a constructor to deserialize a ubyte[]. A Serialize function is provided to turn the message into a ubyte[]. And all message fields are accessors.

For repeated types use add\_fieldName() to add elements.

repository: opticron/ProtocolBuffer

gha_language: D

repo_name: opticron/ProtocolBuffer


text:
## Loading and error states

 >>>>>>> DEMO <<<<<<<

## Usage

There are several ways you can implement many-faced cards, according to the level of customization you need. Checkout out the [**Card Generator**](http://tsucres.me/GithubManyfacedCards/demo/generator.html) for an easier integration.

### Easiest

```html
<iframe src="https://cdn.rawgit.com/tsucres/GithubManyfacedCards/0.3.0/dist/themes/<theme_name>/embedded/embedded.gmc.min.html?<rn|un>=<<full_repo_name>|<username>>" frameborder="0"></iframe>
```

Where
- `<rn|un>` should be replaced by `rn` if you want a repo-card or by `un` if you want a user-card;
- `<theme_name>` must be the name of one of the [supported themes](http://tsucres.me/GithubManyfacedCards). You can host and use your own themes. Read further to learn how to build custom themes. The default theme, (if you omit this param) is `gh_pure`;
- `<full_repo_name>` must have the following format: `userName/repoName`;
- `<username>` must be a valid GitHub username.

[**jsFiddle** >> ](https://jsfiddle.net/tsucres/Ltbejcto/)

### Separated js

Choose an existing theme and paste the following markup in your webpage source:

```html
<!-- in the head or in the beginning of the body -->
<script src="https://cdn.rawgit.com/tsucres/GithubManyfacedCards/0.3.0/dist/gmc.min.js">

<!-- ... -->

<!-- where you want a repo-card -->
<script async src="https://cdn.rawgit.com/tsucres/GithubManyfacedCards/0.3.0/dist/gmc-loader.min.js" data-gmc-repo="<full_repo_name>" data-gmc-theme="<theme_name>"></script

<!-- where you want an user-card -->
<script async src="https://cdn.rawgit.com/tsucres/GithubManyfacedCards/0.3.0/dist/gmc-loader.min.js" data-gmc-user="<username>" data-gmc-theme="<theme_name>"></script>

```

Again, the `<theme_name>` must be replaced with the name of one of the supported theme names. By default, if you omit it, the theme is `gh_pure`.

This way must be preferred if you plan to have several cards on a single webpage, or if you need to load the cards programmatically, or even if you need a custom version of the gmc.js script.

The advantages of this method over the previous one are:
- No iframe: the markup is dynamically added as a sibling of the `<script>` tag
- You can easily add a responsive behavior to the card
- Since the card is directly inside the document, you can override the style of the theme.
- If you use the same theme for several cards, the styles and the js code needed by the theme are loaded only once
- The `gmc.js` script is loaded only once (in the first implementation method, it is embedded in every iframe)
- You can use a custom version of `gmc.js`

With this method, you should load `gmc.js` at the beginning of your html (to ensure that the `GMC` function exists in the document when the card is loaded). The script is a couple of kb and is served with a cdn (rawgit or jsdelivr), so it shouldn't be a big deal.

[**jsFiddle** >> ](https://jsfiddle.net/tsucres/wt4pq0qu/)

### Most efficient way

This method consists in doing manually what `gmc-loader.js` does: load and insert the template of the card in the document and add the style and the javascript it requires.

This method has all the advantages of the previous one and is slightly more efficient since it has less markup to generate dynamically and fewer files to fetch.

##### 1. Insert the markup of the theme

Copy/Paste the markup of the theme you want to use directly in your webpage.

You can find the markup of the existing themes in the [`dist/themes/<theme_name>/`](dist/themes/) folders. Of course, you can build your own (see next section).

##### 2. Add the style

In the head of your document, add the style needed by your theme.

For the existing themes, you will find the required css file in the following folder: [`dist/themes/<theme_name>`](dist/themes). You can either serve it yourself or use a CDN:

```html
<link rel="stylesheet" href="https://cdn.rawgit.com/tsucres/GithubManyfacedCards/0.3.0/dist/themes/<theme_name>/<theme_name>.min.css" type="text/css">
```

##### 3. Add the js

Add the js functions needed by the template to your document.

For the existing themes, the js file is in the theme's folder [`dist/themes/<theme_name>`](dist/themes). As for the style, you can either serve it yourself or use rawgit:

```html
<script src="https://cdn.rawgit.com/tsucres/GithubManyfacedCards/0.3.0/dist/themes/<theme_name>/<theme_name>.min.js"></script>
```

##### 4. GMC.js

Add a link to `gmc.min.js` and call `GMC.loadAllCards()` when you want to load the cards (after the document has loaded):

```html
<script src="https://cdn.rawgit.com/tsucres/GithubManyfacedCards/0.3.0/dist/gmc.min.js"></script>

<script>
// Call GMC.loadAllCards() when the document has loaded
window.onload = function() { GMC.loadAllCards(); };
</script>

```

[**jsFiddle** >> ](https://jsfiddle.net/tsucres/t2vqLrmp/)

## Build custom themes

1. Design the theme: build the markup;
2. Turn it into a Github template: add the adequate data attributes in the right spots.

There are three kinds of data-* attributes you can use to indicate to gmc.js which tags to fill with what information: `data-gmc-id`, `data-gmc-js` and `data-gmc-ap`.

The most important one is `data-gmc-id`. Its value should have the following syntax: `where__what__js`

1. `where` corresponds to the attribute to which to assign the `what` value. (Note that `in` is an alias for `textContent`).
2. `what` must correspond to a key in the json response from the Github API for a [repo](https://developer.github.com/v3/repos/#get) or a [user](https://developer.github.com/v3/users/#get-a-single-user). The hierarchy is specified using a dash `-`. For example, to access `json["parent"]["child"]`, the `what` part of `data-gmc-id` would be `parent-child`.
3. `js`: this part is optional. If `__js` is appended at the end of the attribute and the `data-gmc-js` attribute of the element contains the name of a js function, the `what` will be first passed to that function (as a parameter) and its result will be assigned to the `where`. The js function is called with 3 parameters: the `what`, the `HTMLElement` and the javascript GMC object handling the template.

Examples:

- `href__full_name` will fill the `href` attribute of the element with the value identified by `full_name` in the API response.
- `in__owner-login` will fill content of the element with the value in `json['owner']['login']`
- `href__id__js` will fill the `href` attribute of the element with the result of the function in `data-gmc-js` when `json['id']` is passed as parameter. For example `function concat_url(val) {return 'https://website.com/id=' + val}`

**Note** that if the `where` already has a value, the `what` will replace it. If you want, instead, to keep the value of the `where` and append the `what` at the end of it, you have to add the attribute `data-gmc-ap`. Thus, the last example above could also be implemented as `<a href="https://website.com/id=" data-gmc-id="href__id" data-gmc-ap>click</a>`

## How it works

#### 0) For each [data-gmc-repo] elements ...

The two following steps are executed for every element selected with the attribute `data-gmc-repo` (or `data-gmc-user` in case the case of a user-card).

#### 1) Data fetching

This part is pretty obvious: it uses the [official API](https://developer.github.com/v3/repos/) to retrieve the informations about the repo (or a user) in Json format.

#### 2) Parsing and rendering

When the Json is made available, gmc.js will parse all the child elements of the `[data-gmc-repo]` element and look for those having a `data-gmc-id` attribute. For all of those, it will parse the id, and fill the template. For an id `where__what__js` it will basically do the following: `[data-gmc-repo].where (+)= js(json[what])`

## Complete doc

### Supported data-* attributes

#### On the root element

**data-gmc-repo**: the full name (userName/repoName) of the repo you want to show the informations for. This attribute is always required, except when embedding the iframe with the `src=theme.gmc.min.html?rn=fullName`.

**data-gmc-user**: same as the previous one but for user-cards.

If the root element is an **iframe** with `data-gmc-repo` specified (without `src`):

**data-gmc-theme**: the value must be a valid name for a theme. Currently supported themes are `gh_pure`, `gh_full`, `gh_recommendation`.

**data-gmc-theme-url**: the url pointing to a theme template (html). It can be relative or absolute. It's accessed using an XMLHttpRequest.

At least one of those is required. **data-gmc-theme-url** has a higher priority than **data-gmc-theme**.

#### On the inner elements (in the template)

**data-gmc-id**: its value must have the format `where__what[__js]`. See the previous 'Build custom themes' section.

**data-gmc-js**: only useful if the `data-gmc-id` has the `__js` suffix. It must contain the name of a javascript function. Note that the function has to be defined in the same document as the template, i.e. in the iframe (in the template pointed by data-gmc-theme[-url]) if the root element is an iframe or in the main document otherwise.

**data-gmc-ap**: if this attribute is added to an element (with `data-gmc-id`), the `what` will be appended at the end of the `where`. By default, the value in `where` is replaced.

### Javascript methods

##### new GMC(root_el)

Fill the template inside `root_el`.

The `root_el` is the one having the `data-gmc-repo` attribute: either an iframe or an HTMLElement with a Github template inside of it.

##### GMC.loadAllCards()

Calls `(new GMC(root_el))` on every elements selected by `[data-gmc-repo]`.

### Used classes

**gmc-loaded** is added to the root_el (the one with the `data-gmc-repo`) when all the `data-gcm-id` elements were filled.

**gmc-error** is added to the root_el if the status code of the API response is different than 200.

## Build from sources

```sh
npm install

gulp all #[themes, embed_themes, gmc]

```

- the `themes` task outputs the html files (for each theme) containing all the styles and the js functions needed. Those themes are intended to be used inside an iframe, but still need the gmc.js file to be embedded on the parent document. Those themes are the ones used in the second (see first section).

- the `embed_themes` task outputs the same files as the previous one, but in addition to the style and js functions, the content of gmc.js along with an automatic call to `GMC.loadAllCards()` is added to those files. Those themes are intended to be used in a standalone iframe (usage 1 in the first section). They are marked with the `.gmc` suffix in the [`dist`](dist) folder.

- the `gmc` task minifies the gmc.js file.

All the resulting files (except the demo file) are in the [`dist`](dist) directory.

# Examples

See the [demo](http://tsucres.me/GithubManyfacedCards/) for several card designs.

Real life examples:
- [HNBuddy landing page](http://www.hnbuddy.io/contrib.html)

**Open an issue** to submit your designs in the demo or to add a link here in the [README](README.md)

# Other similar repos:

- [github-cards](https://github.com/lepture/github-cards): same thing as GMC but with less easily customisable/extendable themes.
- [GithubCard](https://github.com/xuelangZF/GithubCard): other design for the same thing. This implementation is very simple.
- [github-calendar](https://github.com/IonicaBizau/github-calendar): a widget displaying the yearly contribution calandar.

repository: tsucres/GithubManyfacedCards

repo_name: tsucres/GithubManyfacedCards


text:
# React-admin tutorial

This is the application built while following the [tutorial](https://marmelab.com/react-admin/Tutorial.html).

## How to run

After having cloned the react-admin repository, run the following commands:

```sh
make install

make build

make run-tutorial
```

repository: marmelab/react-admin

gha_language: TypeScript

repo_name: marmelab/react-admin


text:
# fa4gis

Font Awesome Icons placed into directory structure for use with the QGIS Resource Sharing Plugin.

Install the [QGIS resource sharing plugin](https://qgis-contribution.github.io/QGIS-ResourceSharing/) and add the URL ```https://github.com/zacharlie/fa4gis.git``` as a repository. Once installed, you should have access to the Font Awesome library to use as SVG Symbols.

license: Unlicense

gha_license_id: Unlicense


text:
# Running the database locally

This is about running `video-labeler` locally, **for development purposes**.

The easiest way to launch a local PostgreSQL database for the `video-labeler` is using Docker. The instructions for this can be found below.

Using Docker for this is not required, of course. Any local PostgreSQL setup that adheres to the database/schema requirements will do.

### Setting up the PostgreSQL container

After running the commands seen here, your PostgreSQL setup is done, and the `video-labeler` backend will be able to connect. Kill the container at any time using CTRL-C. Omit `sudo` if using macOS.

Commands:

```
# 1. Build image
cd back/database
sudo docker build -t postgresql .

# 2. Create & start container
# Replace /data/path/on/host with any folder on your host machine!
sudo docker run -it \
    -p 5432:5432 \
    -e POSTGRES_PASSWORD=test \
    -v /data/path/on/host:/var/lib/postgresql/data \
    --name db \
    postgresql:latest
```

### Extra: rerunning after closing

The previous step created a container named `db`. After the container was killed, it can be restarted the next time using:

```
sudo docker start db
```

And killed again using:

```
sudo docker stop db
```

repository: MoMaF/video-labeler

repo_name: MoMaF/video-labeler


text:
# Metrics

Raccoon uses Statsd protocol as way to report metrics. You can capture the metrics using any supported statsd collector like [Telegraf](https://github.com/influxdata/telegraf). This page contains reference for all the metrics for Raccoon.

## Table of Contents

* [Server Connection](metrics.md#server-connection)
* [Kafka Publisher](metrics.md#kafka-publisher)
* [Resource Usage](metrics.md#resource-usage)
* [Event Delivery](metrics.md#event-delivery)

## Server Connection

### `server_ping_failure_total`

Total ping that server fails to send

* Type: `Counting`

### `server_pong_failure_total`

Total pong that server fails to send

* Type: `Counting`

### `connections_count_current`

Number of alive connections

* Type: `Gauge`

### `user_connection_success_total`

Number of successful connections established to the server

* Type: `Count`

### `user_connection_failure_total`

Number of fail connections established to the server

* Type: `Count`
* Tags: `reason=ugfailure` `reason=exists` `reason=serverlimit`

### `user_session_duration_milliseconds`

Duration of alive connection per session per connection

* Type: `Timing`

## Kafka Publisher

### `kafka_messages_delivered_total`

Number of delivered events to Kafka

* Type: `Count`
* Tags: `success=false` `success=true`

### `kafka_unknown_topic_failure_total`

Number of delivery failure caused by topic does not exist in kafka.

* Type: `Count`
* Tags: `topic=topicname`

### `kafka_tx_messages_total`

Total number of messages transmitted \(produced\) to Kafka brokers.

* Type: `Gauge`

### `kafka_tx_messages_bytes_total`

Total number of message bytes \(including framing, such as per-Message framing and MessageSet/batch framing\) transmitted to Kafka brokers

* Type: `Gauge`

### `kafka_brokers_tx_total`

Total number of requests sent to Kafka brokers

* Type: `Gauge`
* Tags: `host=broker_nodes` `broker=true`

### `kafka_brokers_tx_bytes_total`

Total number of bytes transmitted to Kafka brokers

* Type: `Gauge`
* Tags: `host=broker_nodes` `broker=true`

### `kafka_brokers_rtt_average_milliseconds`

Broker latency / round-trip time in microseconds

* Type: `Gauge`
* Tags: `host=broker_nodes` `broker=true`

## Resource Usage

### `server_mem_gc_triggered_current`

The time the last garbage collection finished in Unix timestamp

* Type: `Gauge`

### `server_mem_gc_pauseNs_current`

Circular buffer of recent GC stop-the-world in Unix timestamp

* Type: `Gauge`

### `server_mem_gc_count_current`

The number of completed GC cycle

* Type: `Gauge`

### `server_mem_gc_pauseTotalNs_current`

The cumulative nanoseconds in GC stop-the-world pauses since the program started

* Type: `Gauge`

### `server_mem_heap_alloc_bytes_current`

Bytes of allocated heap objects

* Type: `Gauge`

### `server_mem_heap_inuse_bytes_current`

HeapInuse is bytes in in-use spans

* Type: `Gauge`

### `server_mem_heap_objects_total_current`

Number of allocated heap objects

* Type: `Gauge`

### `server_go_routines_count_current`

Number of goroutine spawn in a single flush

* Type: `Gauge`

### `server_mem_stack_inuse_bytes_current`

Bytes in stack spans

* Type: `Gauge`

## Event Delivery

Following metrics are event delivery reports. Each metrics reported at a different point in time. See the diagram below for to understand when each metrics are reported.

![Diagram](../.gitbook/assets/metrics_report_time.svg)

### `events_rx_bytes_total`

Total byte receieved in requests

* Type: `Count`

### `events_rx_total`

Number of events received in requests

* Type: `Count`

### `batches_read_total`

Request count

* Type: `Count`
* Tags: `status=failed` `status=success` `reason=*`

### `batch_idle_in_channel_milliseconds`

Duration from when the request is received to when the request is processed. High value of this metric indicates the publisher is slow.

* Type: `Timing`
* Tags: `worker=worker-name`

### `event_processing_duration_milliseconds`

Duration from the time request is sent to the time events are published. This metric is calculated per event by following formula `(PublishedTime - SentTime)/CountEvents`

* Type: `Timing`

### `server_processing_latency_milliseconds`

Duration from the time request is receieved to the time events are published. This metric is calculated per event by following formula`(PublishedTime - ReceievedTime)/CountEvents`

* Type: `Timing`

### `worker_processing_duration_milliseconds`

Duration from the time request is processed to the time events are published. This metric is calculated per event by following formula`(PublishedTime - ProcessedTime)/CountEvents`

* Type: `Timing`

repository: nazmy/raccoon

repo_name: nazmy/raccoon


text:
# pasta
Pasta is clipboard application for ios devices.

## Starting

### Requirements

* Xcode 13

### Runing

* Not requires any specific steps, clone and run.

```
git clone https://github.com/kemalsanli/pasta.git
```

## Help

Still not came across specific issue,
```
...but if something goes wrong just restart.
```

## UI

![UI 1](https://github.com/kemalsanli/pasta/blob/main/Screenshots/Poster/1.png?raw=true)

![UI 2](https://github.com/kemalsanli/pasta/blob/main/Screenshots/Poster/2.png?raw=true)

![UI 3](https://github.com/kemalsanli/pasta/blob/main/Screenshots/Poster/3.png?raw=true)

## Features

* Basic and super quick ui.
* Copy/Paste history.
* Dark mode support.
* Favorites.

## Version History

* 0.5
    * Pasta is now fully functional.
    * Due to UX concerns force touch support cancelled.

* 0.2
    * Nearly done.

* 0.1
    * Released.

## Contribute
Feel free to contribute ^^

## License
[MIT](https://github.com/kemalsanli/pasta/blob/main/LICENSE)

repository: kemalsanli/pasta

repo_name: kemalsanli/pasta


text:
# String Interpolation With Instance Variables

When using regular variables with string interpolation in Ruby, they must be
wrapped in curly braces (e.g. `"This is a #{variable}"`). With instance
variables (and class and global variables) you can just use the _octothorp_
followed directly by the variable.

Here is an example of this in action:

```ruby
class Person
  def initialize(name)
    @name = name
  end

  def whoami
    puts "I am #@name"
  end
end

bob = Person.new("bob")
#=> #<Person:0x007fdaf3291618 @name="bob">

bob.whoami
# I am bob
```

This is a handy shortcut, but may affect readability and/or result in an
interpolation error at some point. Your mileage may vary.

h/t Josh Davey

repository: jbranchaud/til

gha_language: Vim Script

repo_name: jbranchaud/til


text:
---
title: What happened to Minimak?
date: '2012-09-08'
description:
categories: releases
---
Minimak went through a minor revision, and then was given some
time for dissemination.  During that time, I worked on a more full
layout remapping for my personal use.

Surprisingly, the result of that experimentation was not a better
remapping of the entire keyboard.  Instead, I just got a better
understanding of what really makes a difference and what doesn't.

As a result, I determined that QWERTY *really isn't all that bad*, it
just gets one or two things very wrong.  I found that you don't actually
have to remap your entire keyboard to get the best advantages of the
popular layout alternatives today.  You just have to fix some of the
more egregious issues with QWERTY with some judicious tweaking.

The result is a new Minimak, more intelligently laid out and with far
fewer key changes.  While that means it's less to learn than most other
layouts, I've only found the learning curve to be on par with that of
the original layout despite its fewer keys.  That's because it doesn't
follow the original's finger-impulse retention scheme.  Maintaining
QWERTY skills along with regular QWERTY skills should be on par and easy
enough as well.

Of course, it bears little resemblance to the former Minimak design, so
much of what was discussed on the site before is in the process of being
updated.  I apologize to anyone who is disappointed with the new
materials, as they are replacing the old ones.  The old ones are no
longer available as they are clearly superseded by the new design.
Thanks for your understanding and I hope you are interested enough to
give the new design a try.

If you are a Linux user interesed in the original Minimak layout,
Leonardo Cecchi has [forked the original repository](https://github.com/leonardoce/minimak/tree/master/linux)
and created an xmodmap layout with directions for usage.

gha_language: CSS


text:
Why Erlang?
===========

Code samples from my talk entitled "Why Erlang?"

Slides are available on [SpeakerDeck (https://speakerdeck.com/stratus3d/why-erlang)][1]

[1]: https://speakerdeck.com/stratus3d/why-erlang


text:
# #74: Drug Limit? Drug disappeared

* Source: https://github.com/CivicActions/nebula/issues/74
* Created by: rakanowicz
* Created at: 2015-06-29T19:17:55Z
* Updated at: 2015-06-30T14:36:52Z
* Closed at: 2015-06-30T14:36:52Z

## Comment

* Source: https://github.com/CivicActions/nebula/issues/74
* Commented by: rakanowicz
* Created at: 2015-06-29T19:17:55Z
* Updated at: 2015-06-30T14:36:52Z

Enter the list of drugs in image. Then I added Motrin. It was added to the list and then when I clicked in the field to enter another drug Motrin disappeared. Now it doesn't accept another drug. Is there a limit?

![image](https://cloud.githubusercontent.com/assets/12954654/8416187/fa4c815c-1e71-11e5-8874-ce0908bda2b4.png)

When I clicked back in the drug field Motrin disappeared:
![image](https://cloud.githubusercontent.com/assets/12954654/8416180/f0e74fb6-1e71-11e5-97f2-7ac32ceb41ed.png)

## Comment

* Source: https://github.com/CivicActions/nebula/issues/74#issuecomment-116878227
* Commented by: ethanteague
* Created at: 2015-06-29T23:26:30Z
* Updated at: 2015-06-29T23:26:30Z

@RobertLRead | @grugnog: Gonna need some extra eyes on this - sure I'm missing the obvious, but inside of the ajax function error callbacks, I'm saying that if a sessionStorage item doesn't match a checkbox, remove it. This logic is causing things to be eaten, randomly. I've not been able to modify this with success. If I remove, then junk terms can get through. Strangely, this random munching of data only occurs after 6 or 7 entries. I've tried using setTimeout functions around the remove to give the sessionStorage items to be built, but no luck. I'm 4 hours into this task, so I'm gonna have to set it down, as time is tight.

## Comment

* Source: https://github.com/CivicActions/nebula/issues/74#issuecomment-116878601
* Commented by: RobertLRead
* Created at: 2015-06-29T23:29:11Z
* Updated at: 2015-06-29T23:29:11Z

@ethanteague @grugnog Okay I think we can partially reprioritize this.  One thing I am worried about is that I believe in haste I coded on an N-squared or N-cubed algorithm based on the number of drugs.  When the you et 6 or 7 drugs, it becomes slow and unresponsive.  It is hard to separate that weirdeness from the duplicative weirdness.  I think i will try improving the efficiency of my loops...

## Comment

* Source: https://github.com/CivicActions/nebula/issues/74#issuecomment-116879881
* Commented by: grugnog
* Created at: 2015-06-29T23:38:44Z
* Updated at: 2015-06-29T23:38:44Z

@RobertLRead rather than try and optimize the code, I am wondering if it might be simpler to do a little more work on the backend (as we originally planned, I think). I think it would be very simple to aggregate data from both FCC and AHRQ on the backend into a single JSON structure. That way it would only require a single AJAX callback, and I am guessing the need for the looping and session storage stuff would all go away (the performance issues would, at the very least). It's a little risky at this stage, but it seems like it would simplify quite a lot. If you can put together a sample of what the "ideal" JSON structure would be on the front end I can have a quick play on a branch and see if I can get it working tonight.

repository: stevecurtis/nebula

detected_licenses: MIT Unlicense BSD-3-Clause

repo_name: stevecurtis/nebula


text:
# Arlo Pro 3 multi-camera kits are up to $110 off at Best Buy

Published at: **2019-11-07T16:15:31+00:00**

Author: **Hagop Kavafian**

Original: [Android Police](https://www.androidpolice.com/2019/11/07/arlo-pro-3-deal/)

Arlo cameras are popular on the market, mainly due to their reliability. They're also known to be relatively expensive, but this deal will help you save a few bucks on these multi-camera kits. You get a choice of two, four, and six-pack bundles, selling for $450, $720, and $990, respectively, with savings ranging from $50 to $110.

The Pro 3 features a 160-degree 2K camera with an integrated spotlight and IR night vision and two-way audio with noise and echo cancellation. It also has a built-in 4,800mAh  battery, letting you place it anywhere you'd like, including outdoors. Unfortunately, the new iteration lost the free seven-day storage that came with the Pro 2, and you'll now have to pay $3 or $10 per month to store footage on the cloud. You can still save data locally on a USB device, though, which is appreciable.
Check out our full review to learn more about the Arlo Pro 3. Once you're ready to buy, you can use the link below to buy the bundle you're interested in. No matter which one you choose, all of them ship with the mandatory home station to connect the cameras to your router.

        Buy:
        Best Buy

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
# English Dictionary Database Dump

Forked from the original one that works for SQLite but not for others.
This fork simply added a cleaned one that works (trademark pending) for PostgreSQL.

# HOW TO

Assuming you have PSQL installed, you can simply feed it like so:

`psql -d your_database_name < entries.sql`

## Note

I don't actually know who "owns" this. AFAIK, they are publicly available data extracted from [OPTED](http://www.mso.anu.edu.au/~ralph/OPTED/) :3


text:
# Search-Scan
This software Search trough the NVD (National Vulnerability Database) the vulnerability CVE's based on the OWASP top ten category or the CWE and the CVSS score. With the vulnerbabilities CVE-id, the software try to test them on a target using the Nessus Software.
Thesis project by Comi Lorenzo

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

* Python3.2 or later
* MongoDB 2.2 or later
* Nessus Vulnerability scanner (http://www.tenable.com)
* Pip3
* cve-search (https://github.com/adulau/cve-search) or cve-search-light
* Pymongo
* Beautiful Soup

Installation of Nessus
----------------------

You can install the latest version of Nessus vulnerability scanner by http://www.tenable.com/products/nessus/select-your-operating-system for my deploy i used the free version of the software wich means that you have to give Tenable your email for a free activation code... but you can also use a premiun version!

Installation of MongoDB
-----------------------

First, you'll need to have a Python 3 installation (3.2 or 3.3 preferred).
Then you need to install MongoDB (2.2) from source (this should also work
with any standard packages from your favorite distribution). Don't forget
to install the headers for development while installing MongoDB.
You can go to http://docs.mongodb.org/manual/installation/ for to get the
packages for your distribution, or http://www.mongodb.org/downloads for
the source code.

Populating the database
-----------------------

For the initial run, you need to populate the CVE database by running the cve-search scripts, located in the /sbin folder of the project. For this procedure you can download the latest cve-search script by the project page or you can use the "light" version of the package presents in this repo:

    ./db_mgmt.py -p
    ./db_mgmt_cpe_dictionary.py
    ./db_updater.py -c
    ./python3.3 db_fulltext.py

It will fetch all the existing XML files from the Common Vulnerabilities
and Exposures database and the Common Platform Enumeration.
Indexing all the database with fulltext.py is necessary if you want search for "openstack" or other text-based vulnerability name.

Databases and collections
-------------------------

The MongoDB database is called cvedb and there are 10 collections:

* cves (Common Vulnerabilities and Exposure items) - source NVD NIST
* cpe (Common Platform Enumeration items) - source NVD NIST
* vendor (Official Vendor Statements on CVE Vulnerabilities) - source NVD NIST
* cwe (Common Weakness Enumeration items) - source NVD NIST
* capec (Common Attack Pattern Enumeration and Classification) - source NVD NIST
* ranking (ranking rules per group) - local cve-search
* d2sec (Exploitation reference from D2 Elliot Web Exploitation Framework) - source d2sec.com
* [vFeed](https://github.com/toolswatch/vFeed) (cross-references to CVE ids (e.g. OVAL, OpenVAS, ...)) - source [vFeed](https://github.com/toolswatch/vFeed)
* Microsoft Bulletin (Security Vulnerabilities and Bulletin) - source [Microsoft](http://www.microsoft.com/en-us/download/details.aspx?id=36982)
* info (metadata of each collection like last-modified) - local cve-search

Updating the database
---------------------

An updater script helps to start the db_mgmt_*

    ./db_updater.py -v

You can run it in a crontab, logging is done in syslog by default.

Repopulating the database
-------------------------

To easily drop and re-populate all the databases

    ./db_updater.py -v -f

This will drop all the existing external sources and reimport everything. This operation can take some time
and it's usually only required when new attributes parsing are added in cve-search.

Usage
-----

1. Fill the configuration file with your parameters:
    * Nessus connection parameters (mandatory)
    * target ip (mandatory)
    * credentials (optional)
    * vulnerability parameters (mandatory)
    * mongo connection parameters (mandatory)

2. Use the following command to launch the script:

    $ python3 Search-scan.py -i configurazione.conf

The Outputs will be saved in the "Outputs" folder


text:
# readMe4U

  ## Table of Contents

    * [Description](#description)
    * [Installation Information](#installation)
    * [Usage](#usage)
    * [License](#license)
    * [Contributing](#contributing)
    * [Testing](#testing)
    * [Questions](#questions)

  ## Description

  This is a commandline application that generates a README.md file in the current directory using user responses to given prompts. In fact, this README was generated using this application!

  ## Installation

  You'll need to run the following command to install relevant packages:

  ------

    npm install or npm i

  ------

  ## Usage

  Additional information about this application's use: n/a

  ## License

  This application operates under a MIT license.

  ## Contributing

  You can go to the Github repo for this here: https://github.com/longhike/readme4u

  ## Testing

  To test the application, run the following command in the terminal:

  ------

    n/a

  ------

  ## Questions

  For any questions, you can reach me at<EMAIL_ADDRESS>

gha_language: JavaScript


text:
OpenStack Swift middleware to fetch encryption root secret from Barbican service

Common pre-requisites
---------------------

install:

 git
 pip
 gcc
 openssl-devel

Build from source and copy .tar to proxy node
---------------------------------------------

 (in a virtualenv):

```

git clone <github repo>
cd barbican_keymaster
python setup.py sdist

```

This will create a source tarball in sub-directory dist.

Upload the tarball to the server and install with:

```

/opt/ss/bin/pip install castellan==0.6.0
/opt/ss/bin/pip install requests==2.12.5
/opt/ss/bin/pip install barbican_keymaster-0.0.1.tar.gz

```

NOTE: on some distributions the installed middleware may not be readable in the
installed directory (e.g. /usr/local/lib/python<version>/dist-packages) and
you'll need to make sure it is world-readable.

...OR ... Git clone and install directly on proxy node
------------------------------------------------------

on proxy node:

```

git clone https://github.com/alistairncoles/barbican_keymaster
cd barbican_keymaster
/opt/ss/bin/pip install . -r requirements.txt

```

NB the '.' in the pip install command.

Swift config changes
---------------------

Add the middleware to your Swift pipeline in the proxy file.
Edit /etc/swift/proxy-server.conf...

In section [pipeline:main], insert barbican_keymaster and encryption middleware
directly ahead of final proxy-logging (or replace keymaster with barbican_keymaster)

```

  ... barbican_keymaster encryption proxy-logging proxy-server

```

and add a section:

```

[filter:barbican_keymaster]
use = egg:barbican_keymaster#barbican_keymaster
key_id = <change me to key id from tail of secret_href e.g. 32a73b3a-2cd1-4eae-aa93-bdd729ccb568>
username = swift
password = swiftpass
project_name = swift_secret
user_domain_name=default
project_domain_name=default
auth_endpoint = http://<CHANGE_ME_TO_KEYSTONE_HOST>:5000/v3

```

NB change the key_id to the last past of the secret_href returned from
anc-barbican-setup.sh

NB change the keystone host in auth_endpoint

* restart swift proxy server
sudo systemctl restart ssswift-proxy

(or, if proxy restart fails, then to debug any errors on stdout:

/opt/ss/bin/swift-proxy-server /etc/swift/proxy-server.conf
)


text:
The following README provides detailed steps on how to run the code locally as well as how to deploy the application to Heroku.

If you are interested only in TypeScript API check out https://github.com/martinavagyan/node-typescript-api.

In the last section explanation on how to create new endpoints is provided.
## How to run locally

Prerequisites
---------------
Make sure to have the following installed on your machine:
- mongoDB (make sure to have mongod running locally when running the code on a local machine)
- Node > 8.9 (!important)

Run the code
---------------
- Install dependencies. From root directory run:
```
npm run install:dependencies
```
- Create .env file in server folder.
- Copy the following lines to .env file.
```
PORT=3000
DEV_DB='mongodb://localhost/boilerplateDb'
NODE_ENV='development'
JWT_SECRET='change_this_example_secret'
```
- (Optional) Add the following to .env file if you want to run MongoDB with cloud provider (e.g. Mlab):
```
PROD_DB={{the URI provided by mongoDB could providers, e.g. Mlab}}
```
- Run the application by starting the client and server separately:
```
cd server; npm start
```
```
cd client; npm start
```

This will create the database locally. By running the server with the command:
```
npm run start:cloud
```
The server will run in production environment. In addition the server will try to connect to mongoDB form cloud provider.
## Deploy to Heroku
- Demo: https://mean-ts-auth.herokuapp.com
- Create a Heroku account and create a new project.
- Select the Deployment method with GitHub.
- Find the repository and connect Heroku with the Github repository you would like to deploy.
- Set up the enviroment variable in settings section in Heroku, for that you will need these variables:
```bash
JWT_SECRET # the secret string for Json Web Token
PROD_DB # the remote mongo database (e.g. Mlab)
TZ # time zone, e.g. can be Netherlands/Amsterdam
```
- After running deploy Heroku will build the application and deploy.
- In addition you can select "Enable Auto Deploy" and select a branch from the repo, this will make sure that every time you commit to the branch Heroku will reinitiate deployment.
## Technology stack
MEAN Stack with TypeScript
- MongoDB
- Angular 6+
- Express
- Node > 8.9
- TypeScript
- JavaScript

## Creating a new endpoint
- Define your endpoint route in `server/src/api/routes/apiRoutes.ts`, example:
```TypeScript
app.route('/api/test/').get(apiController.test_get);
```
- Add function to handle the endpoint in `server/src/api/controllers/apiController.ts`, example:
```TypeScript
exports.test_get = (req: any, res: any) => {
    testCtrl.getAll(req, res);
};
```

## Creating a new model
- Add the new model to `server/src/api/models`, example:
```TypeScript
import mongoose = require('mongoose');
import {Schema, Document} from 'mongoose';

export interface ITest {
    name: string;
    email: string;
    type: number;
}

const TestSchema: Schema = new Schema({
    name: String,
    email: String,
    type: Number,
});

export interface ITestModel extends ITest, Document {
}

const TestModel = mongoose.model<ITestModel>('Test', TestSchema);

export default TestModel;
```
- Add controller for your model to `server/src/api/controllers`,
 the controller has to inherit from `baseController`, example:
```TypeScript
import Base from './baseController';

export default class TestClass<T extends any> extends Base<T> {
    constructor(model: T) {
        super(model);
    }

    public insert = (req: any, res: any) => {
        const obj = new this.model(req.body);
        obj.save((err: any, item: any) => {
            if (err) {
                return console.error(err);
            }
            res.status(200).json(item);
        });
    }
}
```

repository: martinavagyan/mean-ts-auth

repo_name: martinavagyan/mean-ts-auth


text:
## What is System Administration?

Welcome to the System Administration course of the IT Support Professional Certificate! In the first week of this course, we will cover the basics of system administration. We'll cover organizational policies, IT infrastructure services, user and hardware provisioning, routine maintenance, troubleshooting, and managing potential issues. By the end of this module, you will understand the roles and responsibilities of a System Administrator. So let's get started!

### Key Concepts

* Examine the roles and responsibilities of a Systems Administrator.
* Differentiate the technical differences between a server and a client machine.


text:
---
id: azure-ad-b2c
title: Azure Active Directory B2C
---

## Documentation

https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow

## Configuration

https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-tenant

## Options

The **Azure Active Directory Provider** comes with a set of default options:

- [Azure Active Directory Provider options](https://github.com/nextauthjs/next-auth/blob/main/src/providers/azure-ad-b2c.js)

You can override any of the options to suit your own use case.

## Example

- In https://portal.azure.com/ -> Azure Active Directory create a new App Registration.
- Make sure to remember / copy
  - Application (client) ID
  - Directory (tenant) ID
- When asked for a redirection URL, use http://localhost:3000/api/auth/callback/azure-ad-b2c
- Create a new secret and remember / copy its value immediately, it will disappear.

In `.env.local` create the following entries:

```
AZURE_CLIENT_ID=<copy Application (client) ID here>
AZURE_CLIENT_SECRET=<copy generated secret value here>
AZURE_TENANT_ID=<copy the tenant id here>
```

In `pages/api/auth/[...nextauth].js` find or add the AZURE entries:

```js
import Providers from 'next-auth/providers';
...
providers: [
  Providers.AzureADB2C({
    clientId: process.env.AZURE_CLIENT_ID,
    clientSecret: process.env.AZURE_CLIENT_SECRET,
    scope: 'offline_access User.Read',
    tenantId: process.env.AZURE_TENANT_ID,
  }),
]
...

```

license: ISC

repository: nicodinh/next-auth

gha_license_id: ISC

repo_name: nicodinh/next-auth


text:
uchinihy
========
In-house scripts in Hy

### Crafting
-------
Maybe use the code as examples for your own scripts because they aren't sufficiently generalized.

### What's in the house?
-------
is-cljs-modified.hy Verifies if the Clojurescript sources were modified since last build.

readme-append.hy Formats lein-notes and then appends them to README.md

cljs.hy Runs 'lein cljsbuild auto' (non blocking) when there are changes in the cljs files. Accepts other commands as arguments to execute after the daemon is launched. Example: 'script/with/cljs lein run' (script has problems with messages printing to several terminals)

### License
-------
Copyright (C) 2014 Carlos C. Fontes.

Licensed under the
[MIT License](http://opensource.org/licenses/MIT).

repository: kanasubs/uchinihy

repo_name: kanasubs/uchinihy


text:
---
title: Asset Import Pipeline
layout: usermanual-page.hbs
position: 2
---

Some assets are uploaded in source format and need to be converted into a "target" format before they can be used in a game at runtime. This process is called *Importing*. For example, a 3D model can be uploaded as an FBX file, but must be converted into a PlayCanvas compatible model file before it can be loaded in the game.

Some assets don't need to be imported before they can be used. For example a PNG image can be used as a texture immediately.

## Asset Tasks

When a source asset is uploaded, PlayCanvas starts an Asset Task to perform this import process on our server.

There are a variety of options available to tune the behavior of the import pipeline to suit your needs.

### Search related assets

When you update an source asset by uploading a new version of the file. There are two possible behaviors for how we update the target assets that are created by the import pipeline.

* If **Search related assets** is enabled, the pipeline will update target assets no matter what folder they are located in.
* If **Search related assets** is not enabled, the pipeline will only look for the target assets in the same folder as the source asset.

So, if you leave this enabled, you are able to organize your source and target assets into folders and be sure that when you update a source assets it will update all related assets.

### Assets default to preload

Newly created assets will automatically be set to [preload][2] or not depending on whether this option is enabled or not. The exception to this are JavaScript script files which will always be set to preloaded when created.

## Texture Import Settings

These options only affect the importing of images and textures.

### Texture POT (Power of Two)

When this option is enabled textures that are not a power of two will be converted to the nearest power of two resolution when they are imported.

### Create Atlases

Images that are uploaded will be imported as a texture atlas instead of a normal texture asset. This is a useful time saver when uploading many spritesheets or UI assets.

## Model Import Settings

These options only affect the importing of model or scene files (e.g. FBX, Collada, obj, etc)

### Preserve material mappings

When a model file is updated or reimported, the Editor will try to preserve the material mappings that were set on it.

### Overwrite Models

When a model file is updated or reimported this option determines whether or not the target model file is overwritten. The default behavior is to overwrite with the new model.

### Overwrite Animations

When a model file is updated or reimported this option determines whether or not a animations created from the model are overwritten. The default behavior is to overwrite with the new animations.

### Overwrite Materials

When a model file is updated or reimported this option determines whether or not materials created from the model are overwritten. The default behavior is to leave existing materials.

### Overwrite Textures

When a model file is updated or reimported this option determines whether or not textures created from the model are overwritten. The default behavior is to overwrite with the new textures.

### Convert to GLB

Enabled by default on new projects, imported models and animations will create GLB model and animation assets instead of the older, deprecated JSON format.

### Import Hierarchy

Only available if using [Convert to GLB](#convert-to-glb) option. When a model file is imported, a template asset is created that contains the full hierarchy of the model as entities allowing to you to manipulate them directly in the Editor. See more information about this feature [here][3].

### Mesh Compression

Only available if using [Convert to GLB](#convert-to-glb) option. Setting this to a compression format will automatically compress mesh data when importing or re-importing model files. This can drastically reduce the size of GLB files at the cost of some runtime decompression cost.

If using Draco compression, remember to import the Draco WASM module into the project otherwise the models will not load.

### Create FBX Folder

When importing a model file (e.g a GLB or FBX), the Editor will create a folder for the assets created by the import such as render, template and material assets.

If there is already a Model (Source) file in the current folder or a folder with the same name as the file being imported, it will overwrite the existing assets instead of creating a new folder.

## Animation Import Settings

Please refer to the [Animation section][4] for more details.

[2]: /user-manual/assets/preloading-and-streaming/
[3]: /user-manual/assets/import-pipeline/import-hierarchy/
[4]: /user-manual/assets/animation/

branch_name: refs/heads/dev


text:
# Concord

Concord is a feature complete ECS.
It's main focus is on speed and usage. You should be able to quickly write code that performs well.

Documentation for Concord can be found in the [Wiki tab](https://github.com/Tjakka5/Concord/wiki).

Auto generated docs for Concord can be found in the [Github page](https://tjakka5.github.io/Concord/). These are still work in progress and might be incomplete though.

## Installation
Download the repository and drop it in your project, then simply require it as:
```lua
local Concord = require(PathToConcord).init()

You will only need to call .init once when you first require it.
```

## Modules
Below is a list of modules.
More information about what each done can be found in the Wiki

```lua
local Concord = require("concord")
local Entity = require("concord.entity")
local Component = require("concord.component")
local System = require("concord.system")
local Instance = require("concord.instance")
```

## Contributors
```
Positive07: Constant support and a good rubberduck
Brbl: Early testing and issue reporting
Josh: Squashed a few bugs and docs
Erasio: Took inspiration from HooECS. Also introduced me to ECS.
```

## Licence
MIT Licensed - Copyright Justin van der Leij (Tjakka5)


text:
# pCT extension

## Introduction

Cuda code and Matlab top layer to create optimized proton radiographies based on the method of [Collins-Fekete](https://doi.org/10.1088/0031-9155/61/23/8232).
The radiograpies obtained from the code extension are intended to be used as pre-processing step before using the reconstruction algorithms implemented in TIGRE to do a full pCT reconstruction.
However, the the code could be also used as stand-alone tool for optimized proton radiograpies only.

## Manual

### Start up procedure

To use the pCT extension within the TIGRE framework, the CUDA source files have to be compiled.
Starting from the MATLAB folder within the TIGRE framework, run the following script:

```
CompilePCT
```

You will be asked to enter a pixel length and/or a intercepts vector size. In case X/Y pixel lengths are not the same, enter the smaller one. If you want to stick to the default values, simply hit enter. The code will give you feedback on how many protons were rejected during the calculation of the radiographies due to the intercepts vector size.

### Data I/O
The measurement/simualtion data corresponding to the pCT experiment can be be forwarded as any Matlab-supported data type (.mat/.raw are recommended).

The simulation data has to contain the following parameters

| Parameter | short name | unit |
|---        |---         |---   |
| water equivalent path length      | WEPL    | mm |
| entry position (x,y) component   | posIn   | mm |
| exit position (x,y) component | posOut | mm |
| entry direction (x,y) component   |   dirIn| mm , dz = 1!|
| exit direction (x,y) component   | dirOut| mm, dz = 1!|

All inputs have to share the same unit of length, which is mm. Be aware that dz has to be 1 in all cases.

### Main method
To ensure that the method delivers reasonable results, particles with large angular and energetic deviations have to be cut from the dataset (3 sigma cuts) beforehand.
The main method for generating the improved radiographies is called by,

```matlab
proj = pCTCubicSpline_mex(posIn, posOut, dirIn, dirOut, Wepl, eIn, geo);
```

While __Wepl__ is a __1D array of size N__ containing the WEPL measurement for each proton, __posIn, posOut, dirIn, dirOut__ are __1D arrays of size 2*N__ where first the x entries of all protons are filled in and secondly all y entries.
__eIn__ is a single value containing the initial beam energy (in MeV). Other parameters that have to be defined are following the geometry definition in TIGRE with additional parameters

| Parameter | Description | Unit | Type |
|---        |---         |---   |---  |
| geo.dDetector      | side length of pixels used in the optimized projection | mm | single |
| geo.sDetecor   | x and y length of the projection (in mm/cm/..) (array with two entries)  | mm | single |
| geo.DSO | distance between source and origin (always > 0!) | mm | single |
| geo.DSID | distance between source and entry detector (always > 0!) | mm | single |
| geo.DSD | distance between source and exit detector (always > 0!)| mm | single |
| geo.mode | "parallel" or "cone"  | / | string |
| geo.hull | array of convex hull parameters [a, b, alpha, h] | mm | single |

If parameter __h__ of the HULL_PARAMS is set to zero, to calculation will be performed without a convex hull. Otherwise, the hull follows the equation (x cos(alpha)-z sin(alpha))²/a² + (x sin(alpha)+z cos(alpha))²/b² = 1 for y in [-h/2, h/2]. The ellispe can be rotated around the y-axis by the angle alpha.
Please click ![here](pct_cuda_toolbox.pdf "pCT toolbox geometry") to find a sketch displaying the definition of the geometry parameters used within the code extension. The origin is located in the center of the phantom.
Furthermore, a sketch displaying the definition of the detector parameters used within the code extension can be found ![here](pct_cuda_toolbox2.pdf "pCT toolbox detector parameters").

### Testing data
A demo script calculating one optimized radiography was prepared for the parallel geometry. To check if the code runs properly on your system run the script pRad_demo.m in MATLAB/Demos.

## Debugging notes

- If the general compilation of the pCT code with ```CompilePCT``` fails with the compiler hinting at missing symbols, check if libstdc++ shipped with MATLAB is compatible with the CUDA drivers and the systems gcc.

Code tested and executed with Debian 10, CUDA 11.2, GPU Nvidia RTX 4000 and MATLAB R2020b and R2021b.

A python header is work-in-progress.

repository: CERN/TIGRE

gha_language: MATLAB

repo_name: CERN/TIGRE


text:
# DSoft.System.BluetoothLe

Cross-platform Bluetooth Low Energy library, based on [Plugin.BLE](https://github.com/xabre/xamarin-bluetooth-le) , for Xamarin.iOS, Xamarin.Android, Xamarin.Mac, UWP(Preview), WPF for.Net Core 3.x and .Net Framework 4.6.1+(Preview - Windows 10 only), TVOS(Preview) and WatchOS(Preview), Tizen(coming soon)

## .Net Core 3.x support

We have had added .Net Core and .Net Framework 4.6.1+ support for Windows using the Windows RT API using `Microsoft.Windows.SDK.Contracts`.  The UWP,.Net Core and .Net Framework implementations are essentially the same as they use the same APIs.  We have duplicated `ObservableBluetoothLeDevice` from Windows Community Toolkit as it doesn't work with `Microsoft.Windows.SDK.Contracts`, .Net Core or .Net Framework. `ObservableBluetoothLeDevice` has been modified to use the WPF Application dispatcher on .Net Core and .Net framework.

### Note: .Net Core and .Net Framework support requires Windows 10 - version 1803 and above

### Plugin.BLE

As of 1st of June 2020 this is essentially [Plugin.BLE](https://github.com/xabre/xamarin-bluetooth-le) repackaged in a single Multi-target project with additional preview support for TVOS, WatchOS and .Net Core 3.x and .Net Framework 4.6.1+.  Mac support is fixed(there is a [Plugin.BLE](https://github.com/xabre/xamarin-bluetooth-le/pull/431) issue with Assembly names when using Xamarin.Forms and Xamarin.Mac), based on the [UWP](https://github.com/xabre/xamarin-bluetooth-le/tree/uwp_creators_update) branch.

## Divergence

I have migrated the source code to single Multi-target library and added support for TVOS, .Net Core and WatchOS(untested). Additionally, I have moved away from Base classes (`DeviceBase`, `AdapterBase` etc) and are using multi-targeted partial classes instead.

I have changed the namespaces from `Plugin.BLE` to `System.BluetoothLe` and the main class from `CrossBluetoothLe` to `BluetoothLe`

This allows for seperation of the projects but also a fair amount of drop-in-ability for anyone using [Plugin.BLE](https://github.com/xabre/xamarin-bluetooth-le)

The docs on Plugin.BLE should still be acurrate, with the changes noted above taken into consideration.

## Preview

Xamarin.iOS, Xamarin.Android and Xamarin.Mac should be considered stable, as they are in Plugin.BLE.

All other platforms are in preview and essentially untested and compile without issue only.

This is a work in progress and although its based on a stable library, this will change and no guarenteee is made about the API at this stage or the stability of the library.

## RoadMap

The first step is to stabilize the API and supported platforms and then extend to other platforms (Tizen, UWP, WPF/Net Core).

New docs and samples


text:
# Akan-Names
## Author

Emmanuel Otieno

## Description
website application that that gives a traditional name according to the day someone was born and gender

## Technology used
* Html - for writting  content to website
* Css - for styling website
* Javascript - putting function into work

## support and contact details
<EMAIL_ADDRESS>
##  Known Bugs
* None

## link to live site on GitHub Pages
[GitHub Pages]("https://github.com/Emmanuel-otieno/Akan-Names").

## License
[MIT]("http://opensource.org/licenses/MIT")
copyright (c) 2020

repository: Emmanuel-otieno/Akan-Names

repo_name: Emmanuel-otieno/Akan-Names


text:
# Whack-A-Something

#### Peer developed Object-Oriented Javascript exercise, 02/01/2018

#### By **Ernest Bruno, Nanette Girzi, Panatda Inthala, Justin Lardani, Tyler Kostelak, and Josh Rochon**

## Description

Whack-A-Something is a web game that allows the user to choose their hero and villain and click the image of their villain when it appears. To make the game more exciting, random objects appear that are either power-ups or power-downs, and there is a timer as well as a score counter. This app is an exercise in Javascript with an emphasis on object-oriented javascript, and Jquery.

## Website Link

https://jlardani93.github.io/whack-a-something/

## Setup/Installation Requirements

* Clone this repository to your desktop.
* Navigate to the index file and open it in your browser (Chrome is preferred).
* Open the scripts.js file to in your preferred text editor to view the javascript.
* Open the javascript console in your browser in order to explore the page further.

## Specifications

The webpage exhibits the following behaviors:

The user is able to pick their hero, which then determines the villain that they have to click to score points, and lose points if they click their own hero. The game ends if the user reaches -20 points or 75 points, or is the timer reaches 0.

Input Example: The user picks Trump as their hero, and clicks on Barack Obama.

Output Example: The user scores one point.

## Known Bugs

No known bugs at this time.

## Support and contact details

If you have suggestions for how to help us make any additions, or if you have other feedback, please feel free to contact Justin at<EMAIL_ADDRESS>All feedback is welcome, keep in mind that the primary focus of this project is Javascript/Jquery, so we are not necessarily looking for HTML/CSS advice.

## Technologies Used

* Javascript
* Jquery
* HTML
* CSS

### License

*This software is licensed under the MIT license.*

Copyright (c) 2018 **Ernest Bruno, Nanette Girzi, Panatda Inthala, Justin Lardani, Tyler Kostelak, and Josh Rochon**


text:
---
hrs_structure:
  division: '1'
  volume: '6'
  title: '19'
  chapter: 323D
  section: 323D-21
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0323D-0021
    parent: HRS0323D
    name: '323D-21 Subarea health planning councils, established'
weight: 19080
title: 'Subarea health planning councils, established'
full_title: '323D-21 Subarea health planning councils, established'
---
**PART III. SUBAREA HEALTH PLANNING COUNCILS**

**§323D-21 Subarea health planning councils, established.** There are established, subarea health planning councils for geographical areas which shall be designated by the state agency in consultation with the statewide council. Each county shall have at least one subarea health planning council. The subarea health planning councils shall be placed within the state agency for administrative purposes. [L 1977, c 178, pt of §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# Before Discovery Call

**Created At:** 8/10/2017 11:48:09 PM
**Updated At:** 8/11/2017 3:14:51 PM
**Original Doc:** [before-discovery-call](https://docs.jbase.com/36040-migration-knowledge-base/before-discovery-call)
**Original ID:** 266637
**Internal:** Yes

#

***1.. Complete as possible the Customer Information Sheet***

- Zumasys fields : Customer, Project Description, Project Manager, Zumasys Salesman, MV Tech
- Executive Contact is person who can make financial and planning decisions
- Application Contact is person or people who know the client application and will be the actual person that does testing and knows the application.
- Technical Contact is the person or people to contact for information regarding hardware such as printers, firewalls and networking and other peripherals
- Software support is the person or people to contact for program support or changes not related directly to the conversion such as fax/email.  This is normally Jim Albright or Ed Olfield for Shims conversions.

***2.. Find out about access to their current system or be prepared for GotoAssist with root access to the computer.***

- Either get complete information on how to get root access to their existing computer or be sure they understand that during the call we will need to have GotoAssist access to their terminal with root access to their computer

***3.. If possible, find out firewall information and get admin login credentials for it or have them prepared to get access to it during the call***

# The ultimate goal for this discovery is the following items:

|  |  |
| --- | --- |
| How do we create the printers in Linux on  their new jBASE box?
 | hosts.txt and linuxprinters.txt on zumUVSHIMS
 |
| How do we set those printers up in jBASE?
 | uvlp and .drv items on zumUVSHIMS
 |
| What UV.ACCOUNT and respective directories represent the SYSTEM and /dbms directories on the new jBASE box?
 | ZUMACCT process will create
 |
| What is needed to setup the mail relay?
 | ???
 |
| We will need to get a list of users to convert and possible ssh information
 | /etc/passwd.  Created using mrgpasswd on AIX
 |
| We will need to get a list of INDEXes (non-Universe)
 | LIST-INDEX for non-Universe machines
 |

## Customer Information Sheet

Highlighted items should be collected prior to discovery

|  |  |
| --- | --- |
| Date / Time of discovery with customer
 | *01/01/2014  8:00 EST*
 |
| Customer
 | *Customer Name*
 |
| Project Description
 | *Shims on AIX to jBASE on the Cloud with BUaaS*
 |
| Project Manager / Project Coordinator
 |
 |
| Zumasys Salesman
 |
 |
| Zumasys MV Tech
 | Dan Ell [dane<EMAIL_ADDRESS> Ext. 429
 |
| Executive Contact (Project Decisions)
 |
 |
| Application Contact (App test and questions)
 |
 |
| Technical Contact (Hardware, Network, Printers)
 |
 |
| Software Support (Program mods) (i.e. jim A, Ed O)
 |
 |
| Access to their existing UNIVERSE computer
 |
 |
| Access to current firewall or contact for firewall
 |
 |
| jBASE single license and multi-session users
(Multi-session means more than 1 screen from a PC)
 |
 |
| User / Password for SHIMS testing
(usually shims,no password)
 |
 |
| Terminal Emulation(s) used (prefer vt220)
 |
 |
| Accounts to be converted
 |
 |
| Accounts NOT to be converted
 |
 |

# Discovery process

## How do we access your current box in the future?

|  |  |
| --- | --- |
|
 |

Do you have public access ssh?
What type of VPN?
Is there public access to the VPN?
Do you know the public IP?
Can we whitelist a public ssh port with user “zumasys”?

## What PC Terminal Emulators will be used for the new system?

|  |  |
| --- | --- |
|
 |

Accuterm 7.1 or better is best.

## Who will need outside access (VPN credentials)?

|  |  |
| --- | --- |
|
 |

Home-based Remote users? Outside of the main location or outside of site-site tunnels?

## How many branches?

|  |  |
| --- | --- |
|
 |

“netstat -rn” and check for subnets

## What “tcl” processes do you do outside of the menu system?

|  |  |
| --- | --- |
|
 |

Programs run other than the typical GET-LIST, SELECT, SORT type of reporting command

##  “Tcl” password?

|  |  |
| --- | --- |
|
 |

Programs run other than the typical GET-LIST, SELECT, SORT type of reporting command

## What other servers / systems interface to your database server?

|  |  |
| --- | --- |
|
 |

Do you have external catalog systems or servers that are fed information from your main database server that we need to replace or at least accommodate?

## When do you do monthend and who do we need to contact?

|  |  |
| --- | --- |
|
 |

Need to get a snapshot the night before and then with everyone off system get snapshot just before month-end

## Backups/Schedule/Retention

|  |  |
| --- | --- |
| -Backup schedule (what time does the backup start? Frequency (5 days or 7 days? Retention for archives (monthly, yearly)?
-Bandwidth?
 |

Discuss further on backups & Bandwidth

## What type of internet connection? Speed?

|  |  |
| --- | --- |
|
 |

Rated via [www.speedtest.net](http://www.speedtest.net) from their box

## Zumasys must run a transfer rate test to a Zumasys site and observe results

|  |  |
| --- | --- |
|
 |

Need to test a sample transfer from the customer’s on-prem to our cloud

## What Platform are you currently on?

|  |  |
| --- | --- |
|
 |

AIX?
Intel based server?
Other platform like HPUX, SUN, etc.

## What version of the O/S are they using?

|  |  |
| --- | --- |
|
 |

On AIX, “oslevel -r”, on Redhat/Centos “cat /etc/redhat-release”

## Server IP Address

|  |  |
| --- | --- |
|
 |

On AIX, “ifconfig -a”, on Redhat/Centos “ifconfig”

## Do they have support for screen, ssh, rsync and bash?

|  |  |
| --- | --- |
|
 |

“which screen”,”which ssh”, “which rsync”, “which bash”

## Disk space used and available?

|  |  |
| --- | --- |
|
 |

On AIX “df -k”, on Redhat/Centos “df -h”

## Disk space used by Application

|  |  |
| --- | --- |
|
 |

cd to account base directory (Usually /dbms on shims)
On AIX “du -sk”, on Redhat/Centos “du -sh”

## Sendmail relay host

|  |  |
| --- | --- |
|
 |

“grep DS /etc/mail/sendmail.cf”

## Current Backup media

|  |  |
| --- | --- |
|
 |

Ony necessary if unusual process needed.  I.e.  No virtual tape or rsync

## What type of terminal emulations will need to be supported?

|  |  |
| --- | --- |
|
 |

The standard is vt220

## Will they be using dumb terminals?

|  |  |
| --- | --- |
|
 |

## If yes, how are they connected to the current system?

|  |  |
| --- | --- |
|
 |

RAN boxes, serial direct connection, portserver

## What email / fax solution will be used for the new system?

|  |  |
| --- | --- |
|
 |

the standard is email from server with Esker for faxing

## Printers

|  |  |
| --- | --- |
|
 |

On Universe “cat /var/spool/uv/sp.config”
Find out if serial printers on RAN or other proprietary boxes are going to be converted to Portserves, Printservers or combination of the two.  Parallel Printers (not on a printserver) need to have a printserver and possibly some proprietary such as Genicom will need special adapter.

## What user or users will be needed to test shims on the system

|  |  |
| --- | --- |
|
 |

Get the linux login, shims login and passwords and prompts needed

## Accounts to be converted and not converted

|  |  |
| --- | --- |
|
 |

On AIX “du -sk /dbms/\*”, on Linux “du -sh /dbms/\*” gives list of account directories and space
cd /usr/lpp/iv ; /usr/lpp/uv/bin/uv then <esc> from menu and LIST-ITEM UV.ACCOUNT for list of accounts

## If converting to on-site server, is UPS sufficient for new server?

|  |  |
| --- | --- |
|
 |

## Hardware and Software needs discovered?

|  |  |
| --- | --- |
|
 |

Printservers, PortServers, Terminal Emulators, Firewall clients, UPS, etc

## How do they handle these common errors….

JBASE\_ERRMSG\_DIVIDE\_ZERO   Divide by zero !!-- ZERO returned

JBASE\_ERRMSG\_NON\_NUMERIC              Non-numeric value -- ZERO USED

JBASE\_ERRMSG\_ZERO\_USED      Invalid or uninitialised variable -- ZERO USED

# Third Party Product List

Licensing, installation and transfer of third party products is the responsibility of the customer.  However, third party products are important elements of your system and must be address during the migration project planning.  While Zumasys does not control or take responsibility for Third Party Products, we will incorporate these dependencies into the overall project plan and help to manage these elements.

The following table can be used to identify and plan for the migration of third party products:

|  |  |
| --- | --- |
| Product Name
 | Vendor
 | Contact
 | License/Transfer Fee
 | Installation/Services
 |
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
 |

Insert additional rows as required

## List of common third party products

- Parts catalogs
- Shipping Systems
- Tax calculation systems
- Address verification systems
- EDI
- Pricing
- Customer portals
- Document management/imaging
- Faxing
- Bulk Email
- FTP servers
- Web Services

## Items left for future discovery?

|  |  |
| --- | --- |
|
 |

repository: CBarouch/docs

repo_name: CBarouch/docs


text:
# ansible-role-snipeit

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.org/joshuacherry/ansible-role-snipeit.svg?branch=master)](https://travis-ci.org/joshuacherry/ansible-role-snipeit)
![Ansible](https://img.shields.io/badge/ansible-2.5.0-blue.svg)
![Ansible](https://img.shields.io/badge/ansible-2.6.1-blue.svg)
![Ansible](https://img.shields.io/badge/ansible-2.7.0-blue.svg)

Configures [Snipe-IT](https://snipeitapp.com/) on an Ubuntu server.

## Requirements

- Ansible
  - Tested Versions:
    - 2.5.0
    - 2.6.1
    - 2.7.0

## Install

### Install from GitHub

`ansible-galaxy install git+https://github.com/joshuacherry/ansible-role-snipeit.git`

## Features

| OS            | Option 1      |
| :------------ | :-----------: |
| Ubuntu 16.04  | ✓             |
| Ubuntu 18.04  | ✓             |

## Versioning

[Semantic Versioning](http://semver.org/)

For the versions available, see the [tags on this repository](https://github.com/joshuacherry/ansible-role-snipeit/tags).

Additionally you can see what change in each version in the [CHANGELOG.md](CHANGELOG.md) file.

## Role variables

Look to the [defaults](defaults/main.yml) properties file to see the possible configuration properties.

## Testing

This role includes a Vagrantfile used with a Docker-based test harness that approximates the Travis CI setup for integration testing. Using Vagrant allows all contributors to test on the same platform and avoid false test failures due to untested or incompatible docker versions.

This molecule configuration depends on docker images from [https://hub.docker.com/u/joshuacherry/](https://hub.docker.com/u/joshuacherry/) to quickly test the role against a variety of operating systems.

1. Install [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/).
1. Run `vagrant up` from the same directory as the Vagrantfile in this repository.
1. SSH into the VM with: `vagrant ssh`
1. Run tests with `molecule`.

### Testing with Docker and tox

Tox will test against the configured dependencies in [tox.ini](tox.ini). This allows you to test the role against multiple version of ansible, molecule, python, and more. Once the dependencies are set, tox will run the same molecule command to test code.

Due to how Virtualbox mounts shared folders, it is recommended to copy the role into a local directory within the virtual machine before running tox, otherwise the python environments will perform significantly slower. Run the below commands each time you make a change to the source code and need to test against all scenarios defined in [tox.ini](tox.ini)

```bash
rsync -ua /ansible-role-snipeit/ ~/ansible-role-snipeit/ --delete
cd ~/ansible-role-snipeit
tox
```

### Testing with Docker and molecule

This method will only test the code with the most recent version of Ansible, tox testing should be used before commits to master so that all scenarios can be tested.

```bash
cd /ansible-role-snipeit
molecule test
```

See `molecule` for more information including a full list of available commands.

### interactive debugging

You can use log into a docker image created by molecule for interactive testing with the below commands. As defined in [molecule.yml](molecule/default/molecule.yml), the default instance is set to `ubuntu1604`. If you wish to test other operating systems, you must define the environment variables `MOLECULE_DISTRO` and `MOLECULE_DOCKER_COMMAND`. A table of supported options are below.

```bash
cd /ansible-role-snipeit
export MOLECULE_DISTRO=ubuntu1804
export MOLECULE_DOCKER_COMMAND=/lib/systemd/systemd
molecule converge
docker exec -it instance /bin/bash
```

| OS            | MOLECULE_DISTRO | MOLECULE_DOCKER_COMMAND  |
| :------------ | :-------------: | :----------------------- |
| Ubuntu 16.04  | ubuntu1604      | /lib/systemd/systemd     |
| ubuntu 18.04  | ubuntu1804      | /lib/systemd/systemd     |

## Example Playbook

```yaml
---
- name: Playbook for ansible-role-snipeit
  hosts: all

  tasks:
  - include_role:
      name: ansible-role-snipeit
```

repository: joshuacherry/ansible-role-snipeit

repo_name: joshuacherry/ansible-role-snipeit


text:
# sm-webapp

Web application for browsing results produced by [METASPACE engine](../engine).

## Installation

* Clone the repository with `--recursive` flag.
* Run `yarn install`
* Create `conf.js` using the provided `conf.js.template` (used by the backend, all secrets are kept here)
* Create `src/clientConfig.json` using the provided template (this is used by the frontend)
* Run `node deref_schema.js > src/assets/metadata_schema.json` (FIXME: do it through webpack)

## Running in development mode

```bash
NODE_ENV=development nodemon server.js
```

This will take care of hot reloading after both server and client code changes.

## Running in production

First, execute `yarn run build` to get the minified bundles in the `dist/` directory.

Then set `NODE_ENV` accordingly and run `server.js`, e.g.
```bash
NODE_ENV=production forever start -l forever.log -o out.log -e err.log -c "nodemon --exitcrash" server.js
```

## Funding

This project is funded from the [European Horizon2020](https://ec.europa.eu/programmes/horizon2020/)
project [METASPACE](http://project.metaspace2020.eu/) (no. 634402),
[NIH NIDDK project KPMP](http://kpmp.org/)
and internal funds of the [European Molecular Biology Laboratory](https://www.embl.org/).

## License

This project is licensed under the [Apache 2.0 license](LICENSE).

gha_language: Jupyter Notebook


text:
# Make your UI Bulletproof

Bulletproof is a tool which helps you to organize UI components isolated of each other.
Inspired by [Storybook](https://storybook.js.org) project.

```bash
elm install owanturist/elm-bulletproof
```

## Example and [Demo](http://bulletproof-demo.surge.sh)

```elm
module HelloWorld exposing (story)

import Html exposing (div, h1, p, text)
import Bulletproof
import Bulletproof.Knob

story : Bulletproof.Story
story =
    Bulletproof.story "Hello World"
        (\storyTitle storyText ->
            div []
                [ h1 [] [ text storyTitle ]
                , p [] [ text storyText ]
                ]
        )
        |> Bulletproof.Knob.string "Story title" "Hello World"
        |> Bulletproof.Knob.radio "Story text"
            [ ( "Never ending story", "I once brought a honeycomb and a jackass into a brothel..." )
            , ( "Long story", "A long time ago in a galaxy far, far away..." )
            ]

```

## Setup

To setup Bulletproofs' app please take a look into [`demo`](https://github.com/owanturist/elm-bulletproof/tree/master/demo) folder.
There you might find files with exapmles of code required to run it.
I'm sorry you have to copy-paste the configuration.
It's under progress to get started by single command.

## Features

- Set of knobs to interact with component inputs dynamically
- Configurable layout of Bulletproofs' workspace
- Friendly warning messages when unexpected stories or knobs come to Bulletproof
- Hotkeys to configure the layout and navigate between stories
- Each story has uniq path to restore from url

## Ideology

There is no way to include a component messages to Elm loop. It meas that all components are static.
There is only one way to dynamically interact with them by knobs.
The reason is to simplify interface of story creation.
Otherwise a developer must to develop wide system of custom messages and models to make
[The Elm Architecture](https://guide.elm-lang.org/architecture) works.

## Roadmap

- [ ] Searching
- [ ] Restore knobs state from URL
- [ ] ~~Create npm package to avoid passing ports by hands. Should be something simillar with
[elm-test](https://package.elm-lang.org/packages/elm-explorations/test/latest)~~
- [ ] ~~Mark todos on high level to indicate how much of them and where they exist~~

repository: owanturist/elm-bulletproof

gha_language: Elm

repo_name: owanturist/elm-bulletproof


text:
---
layout: post
title: Predicting Charitable Contributions with Gradient Tree Boosting
---
Excessive overhead spending has long been seen as a cardinal sin for charitable organizations. Money spent on corporate salaries and donor outreach is a key part of how charities are evaluated by organizations like [Charity Navigator](https://www.charitynavigator.org/index.cfm?bay=content.view&cpid=1284) who signal to donors that certain organization are worthy of their dollars. One way to reduce overhead is to boost the efficiency of donor outreach by limiting outreach to those most likely to donate to your organization. This post demonstrates the use of tree-based methods for predicting donor likelihood for a fictional charity ([code](https://github.com/joshyazman/medium-posts/tree/master/predicting-charitable-donations)).

# The Data
The data provided contains 6,003 records on donors that a fictional charity provided for a class in Northwestern University’s [MS. in Predictive Analytics](https://sps.northwestern.edu/masters/data-science/) program. The goal of the project was to suggest a list of potential donors to receive mail solicitations that would maximize profit for the charity assuming a cost of $2 per letter and average donation amount of $14.50.

# Growing a Tree
Tree-based methods use a process called greedy recursive binary splitting. Essentially, we find smart ways to divide up our data into groups and then divide those groups into groups. After a few rounds of this process, the average of each group (terminal node) is considered the predicted value for all objects in the group. In the context of donation likelihood, the percentage of donors in each terminal node is considered the predicted donation likelihood for every person in that node.

# Now Let’s Grow a Lot of Trees!
Building a single tree may find the best ways to split up your data set today, but risks failing when you try to apply the model to new data. To mitigate that risk, we grow thousands of trees with slightly different samples of data and average all of the model predictions for each person. The average of 10,000 estimates is likely to be more generalizeable and just as accurate as a single estimate.

# Evaluating the Model
There are two things we need to know about the classification model. We obviously want to know how accurately this method classifies potential donors, but we also want to understand how the models work. First, we look at which variables were most important in determining predictions. Then we take a broader look at model accuracy.

## Variable Importance
To understand how each tree grew its terminal nodes, we examine the number of times each variable was used to divide up the data set out of the 10,000 trees grown.

The model heavily emphasized number of children in the household as well as household income, wealth rating, and home ownership. It may be a bit surprising to see region2 included, but maybe the fictitious charity is in that part of the country and has a strong local presence.

## Model Validation
Most of the people with high donation probabilities did, in fact, donate and most people with low likelihoods did not donate. Ideally the distribution of donation predictions would be a little bit more separated, but this looks pretty good! Using a cutoff of 50% donation likelihood, we correctly classify 87% of donors and non-donors.

To measure profit lift, recall that the average donor gives $14.50 and each letter costs $2.00 to send. Mailing to the entire list returns $31,409 in profit. But given the profit margin of each successfully solicited donor, only mailing to those with 50% donation likelihood or higher would leave a lot of money on the table.

Optimal use of this model means mailing to everyone with a likely donor score above 35% which yields $35,294 in profit. When using the optimal cutoff, our fictional charity boosts profits by 12.4%.

# Conclusion
Charitable organizations seek to maximize donations (to fund their missions as fully as possible) while minimizing the amount of resources devoted to fundraising. The tree-based method presented here increased the donation rate from one mailer from 49% to 87% and boosted overall profits by 12% almost exclusively by reducing the number of mailers sent.

# One Last Thing
If you’ve read this far and want to donate to a charity yourself, I encourage you to support the Pancreatic Cancer Action Network in honor of my mom, who you can read more about [here](https://www.pancan.org/about-us/pancreas-matters-enewsletters/wage-hope-sons-story/). Donate at [pancan.org/donate](pancan.org/donate).


text:
# Service_Order_System
It is a service order system implemented using Golang
This program allows users to create service Orders to a company who give mantain and support of television by technicians asistense

# Enviroment
This project was completly developed in windows 10

# Dependecies
go 1.5

mysql 3.4

gqlgen v0.11.3

# Docker image
You can build the image by:
`docker build -t golang-ubuntu:1151604 .`
and start it by:
`docker run -p 8000:8000 golang-ubuntu:1151604 `

# Executing
you can run the server by:

`go run server.go`

Be sure the database is mysql and is running on the port 3306

Also, you can build an image of the server by:

`go build server.go`

# Usage
Once executed you can request from the `localhost:8000/graphql`

you must request by the graphql standars, if you use postman, you can import [this](https://github.com/cybernuki/Service_Order_System/blob/master/Service%20Order%20System.postman_collection.json) file to see some examples of petitions

Also, you can look at the [schema](https://github.com/cybernuki/Service_Order_System/blob/master/schema.graphql) file in order to have some documentation of the entities

## Entities
You can register Users using the createUser mutation

You can register Technicians using the createTechnician mutation

You can register Orders using the createOrders mutation

This last one requires that you are a registed User and be logged.

In order to log as User you must use the login mutation, it will retreive a token. Once got it, require the createOrders adding the "Authorization" header


text:
# README

This repo uses the `mtg-sdk-python` to compare all cards in existence and form a large n x n
similarity matrix where the ijth component compares card i with j.

The end result is a dictionary where the key is the `multiverse_id` and the values are a list of top 50 associated cards and their similarity scores.

We add a migration script as well where the output is inserted into a Redis server as a sorted set. Moreover,
we also migrate a hash for card image urls and names associated with the `multiverse_id` along with a complete list of card names.

Example:

```
python migration.py all localhost 6379
```

One might want to use this in Django after performing the migration. Simply hook up your `views.py` file to Redis.

Example:

```
import redis

POOL = redis.ConnectionPool(host='<IP_ADDRESS>', port=6379, db=0)

def get_names(request):
	r = redis.Redis(connection_pool=POOL)
	return render(request, 'cardnamess.html', {'cardnames':[r.smembers('cardnames')]})
```

repository: mshmei/cardclusters

repo_name: mshmei/cardclusters


text:
# Decision Tool ![Version](https://img.shields.io/badge/version-1.1.0-blue.svg) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Go Report Card](https://goreportcard.com/badge/github.com/geoffmaggi/Decision-Tool)](https://goreportcard.com/report/github.com/geoffmaggi/Decision-Tool) [![Travis CI](https://travis-ci.org/geoffmaggi/Decision-Tool.svg?branch=master)](https://travis-ci.org/geoffmaggi/Decision-Tool#) ![Tests](https://img.shields.io/badge/tests-128%2F128-brightgreen.svg)

The Decision Tool is a secure, cross-platform and concurrent full stack web application to aid in the decision making process.

## Dependencies

 - [Golang](http://golang.org)
 - [MySql](https://www.mysql.com/) or [MariaDB](https://mariadb.org/)

## Installing and building

1. Install and configure Go and your Database of choice
2. Edit \_config.conf and save it as **config.conf**
3. Edit \_smtp.conf and save it as **smtp.conf**

Run the following
```
# Get Dependencies
go get
# Build the project
go build
# Run the code
./Decision_Tool
```
4. Visit localhost:9999 in your browser

## Testing

To test the code run the following

```
./run_tests.sh
```

This will initiate the test suite and ouput the file "system.html" which can be viewed in the browser to see code coverage.

## Deploying

1. Alter deploy_regex.sh to point to the correct web address
2. Run the following to produce a zipped folder with minified static files and a compiled binary
```
./release.sh
```
3. Copy the contents of the zip onto the production server and update the configuration files
4. Run the binary to initialize the server

repository: geoffmaggi/Decision-Tool

repo_name: geoffmaggi/Decision-Tool


text:
---
title: "Look Controls"
type: components
layout: docs
parent_section: components
order: 8
---

The `look-controls` component defines the following behavior of an entity:

- Track the rotation of a VR headset.
- Rotate when the mouse is clicked and dragged.
- Rotate when a touchscreen is tapped and dragged.

Notice that `look-controls` acts upon the VR headset, mouse, *and* touchscreen inputs. A-Frame controls are grouped together based upon configuration and behavior rather than by device.

The `look-controls` component is generally meant to be registered alongside the [`camera` component](../components/).

```html
<a-entity camera look-controls wasd-controls></a-entity>
```

| Property  | Description                        | Default Value |
|-----------|-----------------------------------------------------
| enabled   | Whether look controls are enabled. | true          |

repository: aframevr/aframe-site

repo_name: aframevr/aframe-site