text:
### Test that the catalogue compiles

This is the most basic test that can be done on a manifest. It will test that
the manifest can be compiled into a catalogue, and that the catalogue has no
dependency cycles between resources.

{% highlight ruby %}
it { is_expected.to compile }
{% endhighlight %}

This matcher has an optional method that can be chained onto it in order to
have rspec-puppet test that all relationships in the catalogue (as defined with
`require`, `notify`, `subscribe`, `before`, or the chaining arrows) resolve to
resources in the catalogue.

{% highlight ruby %}
it { is_expected.to compile.with_all_deps }
{% endhighlight %}

### Test for errors

When testing for an expected error (e.g. testing the behaviour of input
validation), the `and_raise_error` method should be chained onto the `compile`
matcher.

{% highlight ruby %}
describe 'my::type' do
  context 'with ensure => present' do
    let(:params) { {'ensure' => 'present'} }

    it { is_expected.to compile }
  end

  context 'with ensure => whoopsiedoo' do
    let(:params) { {'ensure' => 'whoopsiedoo'} }

    it { is_expected.to compile.and_raise_error(/the expected error message/) }
  end
end
{% endhighlight %}

### Test a resource

The presence of a resource in the catalogue can be tested using the generic
`contain_<resource type>` matcher.

{% highlight ruby %}
it { is_expected.to contain_service('apache2') }
{% endhighlight %}

If the `<resource type>` includes `::` (e.g. the `apache::vhost` defined type),
you must replace the `::` with `__` (two underscores) in the matcher name.

{% highlight ruby %}
it { is_expected.to contain_apache__vhost('www.mysite.com') }
{% endhighlight %}

This can also be used to test if a class has been included in the catalogue.

{% highlight ruby %}
it { is_expected.to contain_class('apache::vhosts') }
{% endhighlight %}

rspec-puppet does not do the class name parsing and lookup that the Puppet
parser would do for you. The matcher only accepts fully qualified class names
without any leading colons. This means that class foo::bar will only be
matched by foo::bar, not by ::foo::bar or bar alone.

### Test resource parameters

The values of a resource's parameters can be tested by chaining
`with_<parameter name>(<value>)` methods onto the `contain_<resource type>`
matcher.

{% highlight ruby %}
it { is_expected.to contain_apache__vhost('www.mysite.com').with_ensure('present') }
{% endhighlight %}

While you can chain multiple `with_<parameter name>` methods together, it may
be cleaner for a large number of parameters to instead to chain the `with` method
and pass a hash of expected parameters and values instead.

{% highlight ruby %}
it { is_expected.to contain_service('apache').with('ensure' => 'present', 'enable' => true) }
# is equivalent to
it { is_expected.to contain_service('apache').with_ensure('present').with_enable(true) }
{% endhighlight %}

Testing parameters using `with_<parameter name>` or `with` will not take into
account any other parameters that might be set on the resource. In order to
test that **only** the specificied parameters have been set on a resource, the
`only_with_<parameter name>` method can be chained onto the
`contain_<resource type>` matcher.

{% highlight ruby %}
# If any parameters have been set on Package[httpd] other than ensure, this test will fail.
it { is_expected.to contain_package('httpd').only_with_ensure('latest') }
{% endhighlight %}

Similarly to `with_<parameter name>`, there exists a way to specify multiple
parameters at once, by chaining `only_with` onto the `contain_<resource type>`
matcher and passing it a hash of expected parameters and values.

{% highlight ruby %}
it { is_expected.to contain_service('apache').only_with('ensure' => 'running', 'enable' => true) }
{% endhighlight %}

Lastly, there are situations where it is necessary to test that certain
parameters **have not** been set on a resource. This can be done by chaining
`without_<parameter name>` methods onto the `contain_<resource type>` matcher.

{% highlight ruby %}
it { is_expected.to contain_file('/tmp/testfile').without_mode }
{% endhighlight %}

As with the other parameter methods, there is a way to specify multiple
undefined parameters at once by chaining the `without` method to the
`contain_<resource type>` matcher and passing it an array of parameter names.

{% highlight ruby %}
it { is_expected.to contain_service('apache').without(['restart', 'status']) }
{% endhighlight %}

It can be tested that a Sensitive value of resource parameter passed to template is present as expected.

{% highlight ruby %}
it { is_expected.to contain_file('/etc/mysecret.conf').with_content(sensitive(%r{^Token==MySecretTokenValue$})) }
{% endhighlight %}

### Test resource parameter values for uniqueness

Use the `have_unique_values_for_all` matcher to test a specific resource parameter
for uniqueness of values across the entire catalogue:

{% highlight ruby %}
it { is_expected.to have_unique_values_for_all('user', 'uid')
{% endhighlight %}

### Testing relationships between resources
The relationships between resources can be tested using the following methods,
regardless of how the relationship has been defined. This mean that it doesn't
matter if it was defined using the relationship metaparameters (`require`,
`before`, `notify`, `subscribe`) or the chaining arrows (`->`, `<-`, `~>`,
`<~`).

The values passed to these methods must be in the format used in the Puppet
catalogue (which is slightly different to the way they're written in a Puppet
manifest).

The resource titles must be unquoted (Package[apache] instead of Package['apache'])

One title per resource ([Package[apache], Package[htpasswd]] instead of Package[apache, htpasswd])

If referencing a class, it must be fully qualified and should not have a leading :: (Class[apache::service] instead of Class[::apache::service])

{% highlight ruby %}
it { is_expected.to contain_file('a').that_requires('File[b]') }
it { is_expected.to contain_file('a').that_comes_before('File[b]') }
it { is_expected.to contain_file('a').that_notifies('File[b]') }
it { is_expected.to contain_file('a').that_subscribes_to('File[b]') }
{% endhighlight %}

An array can be passed if the resource has the same type of relationship to
multiple resources.

{% highlight ruby %}
it { is_expected.to contain_file('a').that_requires(['File[b]', 'File[c]']) }
it { is_expected.to contain_file('a').that_comes_before(['File[b]', 'File[c]']) }
it { is_expected.to contain_file('a').that_notifies(['File[b]', 'File[c]']) }
it { is_expected.to contain_file('a').that_subscribes_to(['File[b]', 'File[c]']) }
{% endhighlight %}

The relationships can be tested in either direction, so given the following
manifest:

{% highlight puppet %}
notify { 'a': }
notify { 'b':
  before => Notify['a'],
}
{% endhighlight %}

It can be tested that `Notify[b]` comes before `Notify[a]`
{% highlight ruby %}
it { is_expected.to contain_notify('b').that_comes_before('Notify[a]') }
{% endhighlight %}

Or that `Notify[a]` requires `Notify[b]`
{% highlight ruby %}
it { is_expected.to contain_notify('a').that_requires('Notify[b]') }
{% endhighlight %}

### Testing the total number of resources

The total number of resources in the catalogue can be tested with the
`have_resource_count` matcher.

{% highlight ruby %}
it { is_expected.to have_resource_count(2) }
{% endhighlight %}

### Testing the total number of classes

The total number of classes in the catalogue can be tested with the
`have_class_count` matcher.

{% highlight ruby %}
it { is_expected.to have_class_count(4) }
{% endhighlight %}

### Testing the number of resources of a specific type

The number of resources of a specific type can be tested using the generic
`have_<resource type>_resource_count` matcher.

{% highlight ruby %}
it { is_expected.to have_exec_resource_count(1) }
{% endhighlight %}

As with the generic `contain_<resource type>` matcher, this matcher can also be
used for defined types that contain `::` in their name by replacing the `::`
with `__` (two underscores).

{% highlight ruby %}
it { is_expected.to have_apache__vhost_resource_count(3) }
{% endhighlight %}

repository: puppetlabs/rspec-puppet

gha_language: Ruby

repo_name: puppetlabs/rspec-puppet


text:
---
title: "home"
bg: white
color: black
style: center
---

## Robotic Vision Summer School 2018
{: .text-blue}

# Tutorial on Object SLAM
{: .text-blue}

The goal of Simultaneous Localization and Mapping (SLAM) is to construct the representation of an environment while localizing the robot with respect to it. However, this does not provide any understanding of the physical world that the robot is moving in. Such understanding is important for meaning interactions with the world and also results in improved performance for the mapping and localization tasks. This tutorial will introduce the problem of SLAM at it current stage of development and then address various development towards a semantic understanding of the world and its effects on the original SLAM formulation.

license: MIT

repository: ylatif/objectSLAM

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: ylatif/objectSLAM


text:
## VIMS (Voluenteering information system)

### vims provides a backbone system for a voluntary association where voluenteers can "adopt" individuals in need and assign themselves to volunteering days.

#### Models:

* *User/ UserProfile*: A system user.
* Recipient: An individual or group in need.
* Settlement/Street: Geography models for User and Recipient.

* Adoption: An adoption relation between a user and an individual/group in need.
* PackageType: A package designated for a recipient.
* Delivery: Delivery instance where a package is deliverd to a recipient.

* ActivityDay: An voluenteering day where users can register to.
* ActivityDayVolunteer: A activityday <-> volunteer relation.
* ActivityDayDelivery: A activityday <-> delivery relation.
* ActivityType: Type of voluenteering day.

* LogisticsCenter

#### API

root `/api/`

Users
(Most by [Djoser](https://github.com/sunscrapers/djoser))

* POST `login`
* POST `register` Register a new user.
* POST `activate` Activate a registered user from email link.
* POST `password` Change user password
* POST `password/reset` Email the user with password reset link.
* POST `password/reset/confirm` Finish password reset process.
* GET/PATCH `userprofile/<id>` Get or update a userprofile.

* GET `adoption/approved` Get all adoption relations who were approved by admin.

* GET `package/` Get all available package to deliver.

Activities

* GET `activitytype` Get all activity day types (lookups for client).

* GET `activityday-volunteer/<id>` Get all activitydays <-> voluenteer relation for a user.
* POST `activityday-volunteer` Create a new activityday <-> volunteer relation.

### Initialize

The project runs on Django 2.0.2 with Postgresql9.6

* Run `make init` from project root.
* activate venv


text:
# Hack computer

> Learning [nand2tertris](https://www.nand2tetris.org/) to build a cpu using verilog.

### **!! Warning !!**
This is my first verilog project. So there might be some bugs!

### Note

* [Hardware](hardware/src/verilog)
* [Machine Language](sample_program/assembly)
* [Assembler](assembler/src/java)

branch_name: refs/heads/main

gha_language: Java

gha_license_id: MIT


text:
# Daedalea cubensis (Mont.) A. Roy, 1982 SPECIES

#### Status
SYNONYM

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

#### Published in
Can. J. Bot. 60(6): 1015 (1982)

#### Original name
Polyporus cubensis Mont., 1837

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Basidiomycota/Agaricomycetes/Polyporales/Polyporaceae/Trametes/Trametes cubensis/ Syn. Daedalea cubensis/README.md

repo_name: mdoering/backbone


text:
# FloatingFilter

![Swift 5](https://img.shields.io/badge/Swift-5-blue.svg?style=flat)
![Version](https://img.shields.io/github/tag/CleanCocoa/FloatingFilter.svg?style=flat)
![License](https://img.shields.io/github/license/CleanCocoa/FloatingFilter.svg?style=flat)
![Platform](https://img.shields.io/badge/platform-macOS-lightgrey.svg?style=flat)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

Display things in an app-modal floating window that users can fuzzy-filter by typing ahead. Its style roughly matches the floating Spotlight window.

![](assets/screenshot-combined.png)

The list uses the default `NSTableView` styles, so it'll look right at home on Big Sur and older macOS versions alike!

## Usage

This module strives for taking care of its components's memory wherever possible. This means you do not need to keep a reference to the window or its controller around. **Both will be freed when the action has been completed.**

### When all possible items are known

This is useful if you want to filter e.g. a limited collection of files, like "Recent Files", or to display a list of known macros.

```swift
import FloatingFilter

// ...

let items = [
    Item(identifier: UUID(),          title: "Create new widget"),
    Item(identifier:<PHONE_NUMBER>30,    title: "Open last document"),
    Item(identifier: "custom-ID_123", title: "Show downloaded data")
]

FloatingFilterModule.showFilterWindow(items: items) { selectedItems in
    print("Selected:", selectedItems.map { $0.title })
}
```

## Installation

### Carthage

Add this to your `Cartfile`:

    github "cleancocoa/FloatingFilter"

Then run

    $ carthage update

... and include `FloatingFilter.framework` from `Carthage/Build/Mac` in your app.

## License

Copyright (c) 2020 Christian Tietze. Distributed under the MIT License.

Fuzzy matching is Copyright (c) 2015 Yichi Zhang <https://github.com/yichizhang/SwiftyStringScore>

repository: deepfork/FloatingFilter

repo_name: deepfork/FloatingFilter


text:
# stardust

Stardust is a JavaScript library for building and embedding visualizations on top of Qlik's Associative Engine.

## Installation

```sh
npm install @nebula.js/stardust
```

## Example usage

```js
import { embed } from<EMAIL_ADDRESS>import mekko from<EMAIL_ADDRESS>
const orion = embed.createConfiguration({
  types: [{
    name: 'mekko',
    load: () => Promise.resolve(mekko);
  }]
})(app);

orion.render({
  element,
  type: 'mekko',
  fields: ['Product', 'Region', 'Sales']
});
```

## Typescript

Stardust comes with typescript definitions. It references the Qlik's Engine definitions published at @types/qlik-engineapi.

When installing Stardust it also installs the package @types/qlik-engineapi. Use [overrides](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides) in your package.json if the installed version deviates from the Qlik Engine you are using:

```json
{
  "overrides": {
    "@types/qlik-engineapi": "<your-engine-version>"
  },
  ...
}
```

gha_language: JavaScript


text:
---
layout: post
title:  "Leetcode Array Note"
date:   2019-07-01 18:30:00 +0800
categories: [Leetcode-Array]
---
### Array - linear data structure
- index(`pointer`) manipulation
- check `bound` in `loop`
- `skip` element to avoid `duplicate`
- element `remove`, `replace`, `partation`
- use `HashMap` to cache data
- `two pointers` used on sorted array
- `math logic` usually related with `swap` and `reverse`
- `2D` index manipulation
- use `boolean array` to cache `used` or `visited` state
- consider `each element` and then combine the result
- `digits` manipulation, use of a `carry` state
- `int[] arr = new int[n+1]`
- `In place` manipulation
    - use one pointer to move
    - use two pointers to swap
    - use value to store state, 0 or 1, or use equations to generate multiply states
- index usually involved with '`+1`' or '`-1`'
- usage of `sum`
- two pass, `forward` and `backword`
- shift k position -- `triple reversion` -- (n-k)(1),k(2), n(3)
- `slidig window` and `Map` or `Set` or TreeMap or TreeSet(ceiling(x), floor(x))
- update `min1` and `min2` pointer

gha_language: CSS


text:
---
title: BL-Touch
---
## Function
The ANTCLABS BL-Touch sensor has three basic parts:
1. A moving plastic pin with a magnet on top
1. A circuit board with hall-effect sensor and controller
1. A housing with a solenoid-like coil at the top to retract and hold the pin

## Connectors
The BL-Touch package includes a short wiring harness attached to the probe, which is not used with the Kit wiring harness.  It should be carefully unplugged from the BL-Touch before installation, as a longer 5-wire cable is included in the harness.

Because it emulates a microswitch and servo, the BL-Touch's wiring harness has five wires on two separate connectors:
1. The 2-pin Black & White wire connector is the probe endstop signal from BL-Touch, like a microswitch
1. The 3-pin connector is the control and power:

| Wire | Function |
| --- | ---|
| Brown | Ground |
| Orange | +5v |
| Yellow | Pulse-width servo control |

## Duet2 Connections
### Probe endstop contact
When facing the RailCore electronics panel and mounted Duet2, use the two pins on the **left side** of the "Z PROBE" 4-pin header.
The White lead goes on the far-left contact ("Z_PROBE_IN"), and black to GND.
Leave the two remaining pins on the right side unoccupied (Z_PROBE_MOD & +3.3V)

![Z Probe header](./bltouch-zprobe.png)
![Probe Connection](./bltouch-probe.jpg)

### Probe control signal
The Three-pin connector from BL-Touch is the control and power to the probe.  Connect this to the 3-pin connector on Duet for PWM1.
The Brown wire (ground) should be on the right pin, facing the connector.

![Duet Servo](./bltouch-pwm-pins.png)
![Servo connection](./bltouch-pwm.jpg)

Note that the kit wiring harness might be too short to reach this connector comfortably.  If you need to extend it, a three-wire Male-to-Female "servo extension" cable can be used.

## Duet Configuration
For these specific connectors, a configuration line like this in `config.g` might be appropriate:
```
; Z probe and compensation definition for BL-Touch
M558 P9 X0 Y0 Z1 F50 T6000 A5 S0.02 H5
G31 X3.0 Y40.8 Z2.104 P25
```
Note that this will need adjusting for your printer, as your BL-Touch offsets may not be the same.
The `G31` command **must come after** the `M558` definition in your `config.g`!

Here are the parameter arguments explained:
```
; P9: BL-Touch deploy/retract method
; F50: Probe Z speed in mm/min
; T6000: Travel speed between points
; A5 Maximum probes between each point to achieve uniform values
; S0.02 Tolerance when probing multiple times
; X0 Y0 Z1 Use this probe for Z axis endstop
; H3 5mm dive height (depends on how fast your BL Touch deploys)
```

## Measuring the X and Y offset between probe and nozzle
The `G31` parameter sets the offset between the specific probe point and the extruder nozzle.  This is factored into many calculations and probe patterns, and must be pretty close for your specific BL-Touch mount and hotend configuration.

You can use a ruler to find an approximate value until you complete printer setup, and refine it later.

To measure it accurately, we can use the printer to make a spot of plastic as a nozzle reference, then find the specific offset for the probe pin with that.

1. Bring your hot-end up to printing temperature, and wipe any ooze.
1. Home all axis.
1. Send the printer to X150 Y150 (center), using the Panel, Web interface, or `G1 X150 Y150 F2000` command.
1. Get very close to your print surface without contact
1. Extrude a very small amount of filament or just an ooze blog onto the surface, maybe with `G1 E3 F100`
1. Immediately lift the head away from the bed by climbing up 25mm in Z.  The idea is that by going straight up while the filament is hot, a distinct point will be seen on the bed, like a peak or pimple.  This is our X150/Y150 reference point.
1. Deploy the BL-Touch probe using your `deployprobe.g` macro or `M280 P3 S10`.  The pin should extend and stay extended.
1. Now use the panel or web interface to jog around the print bed, moving X and Y until your BL-Touch pin probe is directly over the plastic point.
1. Once positioned, your specific offset is the reported nozzle X/Y position distance from X150/Y150.  Use this value in your `G31` configuration.

gha_language: HTML


text:
# Section Signs

## Description

Allows entering § (Section Sign) in all text fields within Minecraft. Warning: Using this in chat on a vanilla server will almost certainly kick you with the message "Illegal chat character".
This does work for books though, even if the server does not have the mod.

## Disclaimer

You are unlikely to be banned for using this mod, however it __is__ possible, so please be extra-careful and make sure that you have the server owner's permission.

## License

This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.

repository: andrewathalye/section-sign

repo_name: andrewathalye/section-sign


text:
# Configuration for S3

[comment] <>: (~~S3:Documentation->S3:Technology~~)

## Harvester Background Job Logs

<!-- BackgroundJobs:Feature -->

1. create a bucket in S3 called "doaj-harvester".  During the creation, ensure that you set all the public access limitations to "True" (i.e. Block all public access)

2. Create the following policy (IAM > Policies > Create Policy > JSON):

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:PutAnalyticsConfiguration",
                "s3:GetObjectVersionTagging",
                "s3:CreateBucket",
                "s3:ReplicateObject",
                "s3:GetObjectAcl",
                "s3:DeleteBucketWebsite",
                "s3:PutLifecycleConfiguration",
                "s3:GetObjectVersionAcl",
                "s3:PutObjectTagging",
                "s3:DeleteObject",
                "s3:DeleteObjectTagging",
                "s3:GetBucketWebsite",
                "s3:PutReplicationConfiguration",
                "s3:DeleteObjectVersionTagging",
                "s3:GetBucketNotification",
                "s3:PutBucketCORS",
                "s3:GetReplicationConfiguration",
                "s3:ListMultipartUploadParts",
                "s3:PutObject",
                "s3:GetObject",
                "s3:PutBucketNotification",
                "s3:PutBucketLogging",
                "s3:GetAnalyticsConfiguration",
                "s3:GetObjectVersionForReplication",
                "s3:GetLifecycleConfiguration",
                "s3:ListBucketByTags",
                "s3:GetInventoryConfiguration",
                "s3:GetBucketTagging",
                "s3:PutAccelerateConfiguration",
                "s3:DeleteObjectVersion",
                "s3:GetBucketLogging",
                "s3:ListBucketVersions",
                "s3:ReplicateTags",
                "s3:RestoreObject",
                "s3:ListBucket",
                "s3:GetAccelerateConfiguration",
                "s3:GetBucketPolicy",
                "s3:PutEncryptionConfiguration",
                "s3:GetEncryptionConfiguration",
                "s3:GetObjectVersionTorrent",
                "s3:AbortMultipartUpload",
                "s3:PutBucketTagging",
                "s3:GetBucketRequestPayment",
                "s3:GetObjectTagging",
                "s3:GetMetricsConfiguration",
                "s3:DeleteBucket",
                "s3:PutBucketVersioning",
                "s3:ListBucketMultipartUploads",
                "s3:PutMetricsConfiguration",
                "s3:PutObjectVersionTagging",
                "s3:GetBucketVersioning",
                "s3:GetBucketAcl",
                "s3:PutInventoryConfiguration",
                "s3:GetObjectTorrent",
                "s3:PutBucketWebsite",
                "s3:PutBucketRequestPayment",
                "s3:GetBucketCORS",
                "s3:GetBucketLocation",
                "s3:ReplicateDelete",
                "s3:GetObjectVersion"
            ],
            "Resource": [
                "arn:aws:s3:::doaj-harvester",
                "arn:aws:s3:::doaj-harvester/*"
            ]
        }
    ]
}
```

Give it a sensible name like "doaj-harvester-policy"

3. Create an S3 user on the IAM service with a suitable name (e.g. "doaj-harvester-client")

Provide Programmatic access, there is no need to provide AWS Management Console access.

Attach the policy created in the previous step

4. Take a note of the access key and the secret access token (you can't access them again)

5. Update your local configuration (do not put this in version control) with the following settings:

```python
STORE_S3_SCOPES = {
    # ...
    "harvester" : {
        "aws_access_key_id" : "<access key>",
        "aws_secret_access_key" : "<secret access token>"
    }
    # ...
}
```

## Public Data Dump

[comment] <>: (~~->PublicDataDump:Feature~~)

1. Create a bucket in S3 called "doaj-data-dump".  During the creation, ensure that you set all the public access limitations to "False"
(i.e. permit public access)

2. Go to the bucket configuration, under Permissions > Bucket Policy and enter the following policy:

```json
{
  "Id": "Policy1550249912200",
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1550249907870",
      "Action": [
        "s3:GetObject"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::doaj-data-dump/*",
      "Principal": "*"
    }
  ]
}
```

3. Create the following policy (IAM > Policies > Create Policy > JSON):

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:PutAnalyticsConfiguration",
                "s3:GetObjectVersionTagging",
                "s3:CreateBucket",
                "s3:ReplicateObject",
                "s3:GetObjectAcl",
                "s3:DeleteBucketWebsite",
                "s3:PutLifecycleConfiguration",
                "s3:GetObjectVersionAcl",
                "s3:PutObjectTagging",
                "s3:DeleteObject",
                "s3:GetIpConfiguration",
                "s3:DeleteObjectTagging",
                "s3:GetBucketWebsite",
                "s3:PutReplicationConfiguration",
                "s3:DeleteObjectVersionTagging",
                "s3:GetBucketNotification",
                "s3:PutBucketCORS",
                "s3:GetReplicationConfiguration",
                "s3:ListMultipartUploadParts",
                "s3:PutObject",
                "s3:GetObject",
                "s3:PutBucketNotification",
                "s3:PutBucketLogging",
                "s3:GetAnalyticsConfiguration",
                "s3:GetObjectVersionForReplication",
                "s3:GetLifecycleConfiguration",
                "s3:ListBucketByTags",
                "s3:GetInventoryConfiguration",
                "s3:GetBucketTagging",
                "s3:PutAccelerateConfiguration",
                "s3:DeleteObjectVersion",
                "s3:GetBucketLogging",
                "s3:ListBucketVersions",
                "s3:ReplicateTags",
                "s3:RestoreObject",
                "s3:ListBucket",
                "s3:GetAccelerateConfiguration",
                "s3:GetBucketPolicy",
                "s3:PutEncryptionConfiguration",
                "s3:GetEncryptionConfiguration",
                "s3:GetObjectVersionTorrent",
                "s3:AbortMultipartUpload",
                "s3:PutBucketTagging",
                "s3:GetBucketRequestPayment",
                "s3:GetObjectTagging",
                "s3:GetMetricsConfiguration",
                "s3:DeleteBucket",
                "s3:PutBucketVersioning",
                "s3:ListBucketMultipartUploads",
                "s3:PutMetricsConfiguration",
                "s3:PutObjectVersionTagging",
                "s3:GetBucketVersioning",
                "s3:GetBucketAcl",
                "s3:PutInventoryConfiguration",
                "s3:PutIpConfiguration",
                "s3:GetObjectTorrent",
                "s3:PutBucketWebsite",
                "s3:PutBucketRequestPayment",
                "s3:GetBucketCORS",
                "s3:GetBucketLocation",
                "s3:ReplicateDelete",
                "s3:GetObjectVersion"
            ],
            "Resource": [
                "arn:aws:s3:::doaj-data-dump",
                "arn:aws:s3:::doaj-data-dump/*"
            ]
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:HeadBucket",
            "Resource": "*"
        }
    ]
}
```

Give it a sensible name like "doaj-public-data-dump-policy"

4. Create an S3 user on the IAM service with a suitable name (e.g. "doaj-public-data-dump-client")

Provide Programmatic access, there is no need to provide AWS Management Console access.

Attach the policy created in the previous step

5. Take a note of the access key and the secret access token (you can't access them again)

6. Update your local configuration (do not put this in version control) with the following settings:

```python
STORE_S3_SCOPES = {
    # ...
    "public_data_dump" : {
        "aws_access_key_id" : "<access key>",
        "aws_secret_access_key" : "<secret access token>"
    }
    # ...
}
```

## Cached Files

[comment] <>: (~~->Cache:Feature~~)

Cached files includes regularly generated content such as the Journal CSV.

1. Create a bucket in S3 called "doaj-data-cache".  During the creation, ensure that you set all the public access limitations to "False"
(i.e. permit public access)

2. Go to the bucket configuration, under Permissions > Bucket Policy and enter the following policy:

```json
{
  "Id": "Policy1550249912200",
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1550249907870",
      "Action": [
        "s3:GetObject"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::doaj-data-cache/*",
      "Principal": "*"
    }
  ]
}
```

3. Create the following policy (IAM > Policies > Create Policy > JSON):

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:PutAnalyticsConfiguration",
                "s3:GetObjectVersionTagging",
                "s3:CreateBucket",
                "s3:ReplicateObject",
                "s3:GetObjectAcl",
                "s3:DeleteBucketWebsite",
                "s3:PutLifecycleConfiguration",
                "s3:GetObjectVersionAcl",
                "s3:PutObjectTagging",
                "s3:DeleteObject",
                "s3:GetIpConfiguration",
                "s3:DeleteObjectTagging",
                "s3:GetBucketWebsite",
                "s3:PutReplicationConfiguration",
                "s3:DeleteObjectVersionTagging",
                "s3:GetBucketNotification",
                "s3:PutBucketCORS",
                "s3:GetReplicationConfiguration",
                "s3:ListMultipartUploadParts",
                "s3:PutObject",
                "s3:GetObject",
                "s3:PutBucketNotification",
                "s3:PutBucketLogging",
                "s3:GetAnalyticsConfiguration",
                "s3:GetObjectVersionForReplication",
                "s3:GetLifecycleConfiguration",
                "s3:ListBucketByTags",
                "s3:GetInventoryConfiguration",
                "s3:GetBucketTagging",
                "s3:PutAccelerateConfiguration",
                "s3:DeleteObjectVersion",
                "s3:GetBucketLogging",
                "s3:ListBucketVersions",
                "s3:ReplicateTags",
                "s3:RestoreObject",
                "s3:ListBucket",
                "s3:GetAccelerateConfiguration",
                "s3:GetBucketPolicy",
                "s3:PutEncryptionConfiguration",
                "s3:GetEncryptionConfiguration",
                "s3:GetObjectVersionTorrent",
                "s3:AbortMultipartUpload",
                "s3:PutBucketTagging",
                "s3:GetBucketRequestPayment",
                "s3:GetObjectTagging",
                "s3:GetMetricsConfiguration",
                "s3:DeleteBucket",
                "s3:PutBucketVersioning",
                "s3:ListBucketMultipartUploads",
                "s3:PutMetricsConfiguration",
                "s3:PutObjectVersionTagging",
                "s3:GetBucketVersioning",
                "s3:GetBucketAcl",
                "s3:PutInventoryConfiguration",
                "s3:PutIpConfiguration",
                "s3:GetObjectTorrent",
                "s3:PutBucketWebsite",
                "s3:PutBucketRequestPayment",
                "s3:GetBucketCORS",
                "s3:GetBucketLocation",
                "s3:ReplicateDelete",
                "s3:GetObjectVersion"
            ],
            "Resource": [
                "arn:aws:s3:::doaj-data-cache",
                "arn:aws:s3:::doaj-data-cache/*"
            ]
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:HeadBucket",
            "Resource": "*"
        }
    ]
}
```

Give it a sensible name like "doaj-data-cache-policy"

4. Create an S3 user on the IAM service with a suitable name (e.g. "doaj-data-cache-client")

IAM > Users > Add User

Provide Programmatic access, there is no need to provide AWS Management Console access.

Attach the policy created in the previous step

5. Take a note of the access key and the secret access token (you can't access them again)

6. Update your local configuration (do not put this in version control) with the following settings:

```python
STORE_S3_SCOPES = {
    # ...
    "cache" : {
        "aws_access_key_id" : "<access key>",
        "aws_secret_access_key" : "<secret access token>"
    }
    # ...
}
```

repository: DOAJ/doaj

branch_name: refs/heads/develop

gha_language: Python

repo_name: DOAJ/doaj


text:
SteelBottle
===========

Quickstart
==========

* Pre-requisite is to install docker and docker-compose
* Run these commands to get up and running

```
  git clone https://github.com/steelocean/steelbottle.git
  cd steelbottle

  docker-compose up -d --build
  docker-compose run --rm composer update
  docker-compose run --rm --entrypoint php  -w /var/www/html/app php bin/phinx migrate
```

* Run Tests

```
  cd web/app
  ./bin/codecept run
```

* View tests

```
  $EDITOR web/app/tests/ApiCest.php
```

* Run a curl command

```
  curl http://localhost:8000/steelbottle/todo/v1/lists
```

* Access phpMyAdmin
```
  http://localhost:8080/index.php
```

TODO
====
* Add validation code to handle 400 and 409
* Add duplicate task checking
* Add duplicate todolist checking

Some Helpful Docker Commands
======

* list all images

```
  docker images -a
```

* stop instances

```
  docker stop $(docker ps -a -q)
```

* remove instances

```
  docker rm $(docker ps -a -q)
```

* prune system images

```
  docker system prune -a
```

* run composer ; i.e. PROJECT_DIR="./steelbottle"
  - base running dir is in docker-compose.yml
  - this dockerized composer image uses ./web/app/composer.json

```
  (cd $PROJECT_DIR;docker-compose run --rm composer install)
  (cd $PROJECT_DIR;docker-compose run --rm composer update)
```

repository: steelocean/steelbottle

repo_name: steelocean/steelbottle


text:
# gbpkiller
G-Buster Browser Defense Uninstaller
====================================

[Download latest binary](https://github.com/junalmeida/gbpkiller/releases)

This application will remove GbpSv.exe and Diebold Warsaw from your computer.

repository: junalmeida/gbpkiller

repo_name: junalmeida/gbpkiller


text:
# Pdfcrowd & Node.js Web Server Demo

Sample for dynamic and static HTML to PDF conversions.

### Prerequisites

```
nodejs
npm
```

## Installing

```
npm install
```

## Web Server Start

```
nodejs server.js
```

## Test

   Open a sample web page <http://localhost:8080/>

   Invoke a conversion to PDF by pressing buttons at the bottom of the page.

## Pdfcrowd API License

   If you wish to use your Pdfcrowd API license, replace **demo** credentials with your Pdfcrowd username and API key in **[server.js](server.js#L56)** file.
   A [free trial](https://pdfcrowd.com/user/sign_up/?pid=api-trial2) API license can be used too.

## Documentation

* API Home:  <https://pdfcrowd.com/doc/api/>
* API Reference:  <https://pdfcrowd.com/doc/api/html-to-pdf/nodejs/>

repository: pdfcrowd/pdfcrowd-examples

repo_name: pdfcrowd/pdfcrowd-examples


text:
# sharepoint-on-prem
A package for basic file handling operations (downloading, uploading, deleting)
on SharePoint on-premises platforms using ntlm auth method.

## Installation
```
pip install sharepoint-on-prem
```

## Usage
1. Import the handler class
```
from sp_on_prem import SPFileHandler
```
2. Initiate a connection session
```
test_session = SPFileHandler(
        site_root_url="https://sharepoint/root/url/",
        username="your_ntlm_usersname",
        password="your_ntlm_password",
    )
 ```
 3. Call the methods to do file handle operations
 ```
test_session.download_file(rf="remote/sharepoint/folder/path", lf="local/folder/path", file_name="file name")
 ```
 4. supported file handle operations
- get a list of files in the SharePoint folder
 ```
 test_session.get_file_list(rf="remote/sharepoint/folder/path")
 ```
 - download file
 ```
test_session.download_file(rf="remote/sharepoint/folder/path", lf="local/folder/path", file_name="file name")
```
- upload file
```
test_session.upload_file(rf="remote/sharepoint/folder/path", lf="local/folder/path", file_name="file name")
```
- delete file
```
test_session.delete_file(rf="remote/sharepoint/folder/path", file_name="file name")
 ```


text:
[![Build Status](https://travis-ci.org/NOhs/dkey.svg?branch=master)](https://travis-ci.org/NOhs/dkey) [![Coverage Status](https://coveralls.io/repos/github/NOhs/dkey/badge.svg?branch=master)](https://coveralls.io/github/NOhs/dkey?branch=master) [![Documentation Status](https://readthedocs.org/projects/dkey/badge/?version=latest)](https://dkey.readthedocs.io/en/latest/?badge=latest) [![PyPI version](https://badge.fury.io/py/dkey.svg)](https://badge.fury.io/py/dkey) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/24cc8c86e18b44d2b3cb14270bca97bb)](https://www.codacy.com/app/NOhs/dkey?utm_source=github.com&utm_medium=referral&utm_content=NOhs/dkey&utm_campaign=Badge_Grade) [![Requirements Status](https://requires.io/github/NOhs/dkey/requirements.svg?branch=master)](https://requires.io/github/NOhs/dkey/requirements/?branch=master)

# dkey - deprecating dict keys

This module provides a thin wrapper that can be used to set certain keys in dictionaries as deprecated. This allows
e.g. for an easy way to gently push out interface changes instead of just introducing breaking changes without any
prior warnings.

## Installation

To install this package simply use pip.

```shell
pip install dkey
```

## Usage example

### Replacing or removing keys

```python
from dkey import deprecate_keys, dkey

def customer_info():
  # old version
  # return {
  #    'name': 'Smith',
  #    'age': 24,
  #    'cleartext password': 'password'
  # }
  # new version, 'name' does not have to appear anymore in the dict
  return deprecate_keys(
    {
        'first name': 'Adam',
        'last name': 'Smith',
        'age': 24
    },
    dkey('name', 'last name'),
    dkey('cleartext password',))

def my_func():
    customer = customer_info()

    # Worked with the old version, will warn to use 'last name' in the future
    # and will return the value set for 'last name' which is the replacement
    # for 'name'
    print(customer['name'])

    # Worked with the old version, will warn that in future release
    # 'cleartext password' will no longer be available
    print(customer['cleartext password'])
```

Several things are done here:

-   To ensure nothing breaks, access to the new dict with the old key still works

-   To ensure developers are made aware of the deprecation a `DeprecationWarning` is
    raised which automatically tells which old key to replace with what, or which
    key is no longer available.

## Customisation and configuration

To give more specialised warning messages or to indicate since when this function is deprecated, etc. please
have a look at the documentation website which explains all available options:

[Documentation](https://dkey.readthedocs.io/)

## Limitations

-   No automatic docstring changes are possible at the moment

repository: codacy-badger/dkey

repo_name: codacy-badger/dkey


text:
# Fokko's Home analytics

This repository contains the code that runs Fokko's home automation. It consists of several modules that together
automate and monitor several things.

## APX

The APX (now called EPEX) module pulls the enery prices from
the [European marketplace](https://www.epexspot.com/en/market-data). So we know which prices we pay per hour for one
kWh. This is the raw price without any taxes or vat.

## Postgres

A docker container with a postgres database, including all the tables that will be bootstrapped. In today's world there
are many fancy databases, but often I prefer good ol' Postgres.

## Youless

A nifty device called [Youless LS120](https://www.youless.nl/winkel/product/ls120.html) to read the energy meter using
the P1 cable, and exposes a json interface to the network. This docker container will poll the json endpoint every hour.

## Relay

For opening-closing the relay to control the Smart Grid ready energy pumps.

repository: Fokko/home-analytics

repo_name: Fokko/home-analytics


text:
# Data model

Graffy lets you think of all your data as a single global filesystem, parts of which are synced with clients.

Every scalar value (string, number) is a "file" in this virtual tree, each with its own unique path. Some values are "symbolic links" pointing to other paths in the filesystem - making the data model a graph rather than a tree.

If you've ever used Falcor, this should sound pretty familiar - it's JSON Graph.

Different parts of the graph can live on different databases and backend systems, just as (in Unix-like systems) different parts of the filesystem can live on different physical devices. Graffy lets you "mount" a _provider_ at any path in your data model.

Here's an example graph for a toy blog with some `users` and some `posts`:

```js
{
  users: {
    1: { name: 'Alice',
         avatar: '👧', … },
    2: { name: 'Bob',
         avatar: '👨', … },
    …
  },
  posts: {
    1: { author: link('/users/2'), … },
    2: { author: link('/users/1'), … },
    …
  }
}
```

The `author` property on each post is a link to the corresponding user. `link()` is a helper that creates a link object.

> **Note**: The Graffy data model isn't exactly JSON. Keys (property names) don't have to be strings, they can be any data type. Arrays come with many caveats and generally can't be used except as leaf nodes. (This is why `users` and `posts` are objects, not arrays.) `null` has special meaning (a value known to not exist) and can't be used to represent anything else.

## Queries

Graffy queries specify all the nodes (down to leaf nodes) they want to read, in a tree that mirrors the expected result. This works just like GraphQL:

```js
// Query
store.read({
  posts: { 1: {
    author: {
      name: true,
      avatar: true
    }
  } }
});

// Result
{ posts: { 1: {
  author: {
    name: 'Bob',
    avatar: '👨'
  }
} } }
```

You might have noticed that the query went right through a symlink. This allows Graffy to return multiple nested resources in a single query.

Note how the "symlink" in the underlying graph isn't visible in the query results; query results are converted from JSON Graphs with links to plain JS object graphs with object references.

repository: rizkisunaryo/graffy

repo_name: rizkisunaryo/graffy


text:
---
author: kubu4
comments: true
date: 2015-06-25 07:00:44+00:00
layout: post
slug: sample-submission-olympia-oyster-pcrs-sanger-sequencing-2
title: Sample Submission – Olympia oyster PCRs Sanger Sequencing
wordpress_id: 1492
author:
  - kubu4
categories:
  - Miscellaneous
tags:
  - HTGC
  - olympia oyster
  - Ostrea lurida
  - PCR
  - Sanger sequencing
---

Submitted a plate of purified PCR products (PCR products prepared by Jake on [20150623](https://heareresearch.blogspot.com/2015/06/6-23-2015-flanking-primer-pcr-pt-3.html)) that Jake set up yesterday, to the [UW High-Throughput Genomics Center](http://www.htseq.org/) for Sanger sequencing.

Plate layout is here (Google Sheet): [sequence_log](https://docs.google.com/spreadsheet/ccc?key=0AtV_gF766XZAcHljOFBWd3pLTUJwbUxkdkg1OGdCY3c&usp=sharing)

Order #:112442

repository: RobertsLab/sams-notebook

extension: markdown

gha_language: Shell

repo_name: RobertsLab/sams-notebook


text:
---
layout: post
title: "Finally Done with Dragon Quest XI"
description: ""
category:
tags: [jrpg, video games, dragon quest]
---

After getting hooked on the [ridiculously long demo][1], I dove into **Dragon Quest XI: Echoes of an Elusive Age** when it came out for the Switch at the end of September. **118 hours later**, I'm finally done with the game!

This game is great! You build a unique cast of characters and the game does a good job of developing each of their personal stories. The world is big but doesn't feel like it's repeating itself; the overworld music being shared across snowy tundras and dry deserts doesn't help here though. The story - divided into three acts - takes a while to go through. Some plot twists are expected and easy to see coming, especially for those who have played previous Dragon Quest games but the end of Act 2 really took me by surprise.

My face when there's nothing left to do in Dragon Quest XI

My gripes with the game are relatively minor, but if ever addressed, would make Dragon Quest XI an all-time great:

* A repetitive soundtrack - the battle theme being reused in the horse races takes the cake here for me.
* A silent protagonist - give him a voice!
* Painful item management - transferring items from the Item Bag to each character is annoying.

Waiting for the Definitive Edition on the Switch was worth the wait as it [includes many quality-of-life improvements and additional content][2]. This includes an optional superboss, the Timewyrm, that challenges you both in strong it is and in how quick you can defeat it. I took it down in 43 actions which earned me the Warp-Speed Wyrminator accolade. Accolades are the in-game trophy system; we should all continue to pray for Nintendo to one day build a proper trophy system. 🙏

Overall, I am very pleased with Dragon Quest XI. It's a JRPG through and through that I very much enjoyed.

[1]: {{ site.base_url }}/2019/09/15/dragon-quest-xi-demo-is-bonkers/
[2]: https://www.gamerevolution.com/guides/589131-dragon-quest-11-switch-definitive-edition-version-differences-vs-ps4-pc

gha_license_id: NOASSERTION


text:
# Run Velero locally

## Run Velero locally with a remote cluster

Velero runs against the Kubernetes API server as the endpoint (as per the `kubeconfig` configuration), so both the Velero server and client use the same `client-go` to communicate with Kubernetes. This means the Velero server can be run locally just as functionally as if it was running in the remote cluster.

Step 1) Install Velero in a remote cluster normally. See the "Install" section for your specific provider

Step 2) Scale the Velero deployment down to 0 so it is not simultaneously being run on the remote cluster and potentially causing things to get out of sync

`kubectl scale --replicas=0 deployment velero -n velero`

Step 3) Boot the local Velero server

a) From under the Velero project directory, make and save the binaries locally

`make local`

b) run the server

To run the server locally, use the path according to the binary you need. Example, if you are on a Mac, this would be where to find the binary you just made: `/_output/bin/darwin/amd64/velero`.

Note: Since you are running locally, chances are you will want to run with the log level at debug, so add that flag.

`./_output/bin/darwin/amd64/velero server --log-level debug`

repository: carlisia/velero

repo_name: carlisia/velero


text:
# IMR R1 (yellow close)
See [usage instructions](https://github.com/jaakkopasanen/AutoEq#usage) for more options and info.

### Parametric EQs
In case of using parametric equalizer, apply preamp of **-6.3dB** and build filters manually
with these parameters. The first 4 filters can be used independently.
When using independent subset of filters, apply preamp of **-6.3dB**.

| Type    | Fc      |    Q | Gain     |
|:--------|:--------|:-----|:---------|
| Peaking | 48 Hz   | 0.25 | -9.5 dB  |
| Peaking | 1751 Hz | 0.32 | 8.2 dB   |
| Peaking | 2905 Hz | 1.46 | -12.4 dB |
| Peaking | 5051 Hz | 3.02 | -11.1 dB |
| Peaking | 19 Hz   | 0.9  | -5.0 dB  |
| Peaking | 43 Hz   | 1.02 | -0.8 dB  |
| Peaking | 5825 Hz | 8.89 | -2.0 dB  |
| Peaking | 6795 Hz | 6.97 | 4.1 dB   |
| Peaking | 9591 Hz | 1.11 | -0.8 dB  |

### Fixed Band EQs
In case of using fixed band (also called graphic) equalizer, apply preamp of **-7.3dB**
(if available) and set gains manually with these parameters.

| Type    | Fc       |    Q | Gain     |
|:--------|:---------|:-----|:---------|
| Peaking | 31 Hz    | 1.41 | -13.3 dB |
| Peaking | 62 Hz    | 1.41 | -7.4 dB  |
| Peaking | 125 Hz   | 1.41 | -5.2 dB  |
| Peaking | 250 Hz   | 1.41 | -1.7 dB  |
| Peaking | 500 Hz   | 1.41 | 2.0 dB   |
| Peaking | 1000 Hz  | 1.41 | 6.5 dB   |
| Peaking | 2000 Hz  | 1.41 | 2.1 dB   |
| Peaking | 4000 Hz  | 1.41 | -8.6 dB  |
| Peaking | 8000 Hz  | 1.41 | 1.5 dB   |
| Peaking | 16000 Hz | 1.41 | -0.0 dB  |

### Graphs
![](https://raw.githubusercontent.com/jaakkopasanen/AutoEq/master/results/referenceaudioanalyzer/zero/IMR%20R1%20(yellow%20close)/IMR%20R1%20(yellow%20close).png)

path: /results/referenceaudioanalyzer/zero/IMR R1 (yellow close)/README.md


text:
# electron-sample
How to start
---

install node.js or io.js

```bash
mkdir electron-sample
cd electron-sample
npm init #...<leave defaults or add specific values ...>

```

Add electron stuff packages...

```bash
npm install electron-prebuilt --save-dev
npm install electron-packager --save-dev
```

Add "helper" commands in package.json

```json

"scripts": {
  "start": "electron .",
  "debug": "electron --debug=5858 .",
  "test": "echo \"Error: no test specified\" && exit 1"
}
```

execute with
```bash
npm start
#npm run 'command'
npm run pack
```

Add file main.js

```js
/// <reference path="typings/node/node.d.ts"/>
var app = require('app'); // Module to control application life.
var BrowserWindow = require('browser-window'); // Module to create native browser window.

// Report crashes to our server.
//https://github.com/hokein/electron-sample-apps/tree/master/crash-report
//require('crash-reporter').start();

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is GCed.
var mainWindow = null;

// Quit when all windows are closed.
app.on('window-all-closed', function() {
  // On OS X it is common for applications and their menu bar
  // to stay active until the user quits explicitly with Cmd + Q
  if (process.platform != 'darwin') {
    app.quit();
  }
});

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on('ready', function() {
  // Create the browser window.
  mainWindow = new BrowserWindow({
    width: 800,
    height: 600
  });

  // and load the index.html of the app.
  mainWindow.loadUrl('file://' + __dirname + '/index.html');

  // Open the devtools.
  mainWindow.openDevTools();

  // Emitted when the window is closed.
  mainWindow.on('closed', function() {
    // Dereference the window object, usually you would store windows
    // in an array if your app supports multi windows, this is the time
    // when you should delete the corresponding element.
    mainWindow = null;
  });

});

```

Add index.html file

```html
<!DOCTYPE html>
<html>
  <head>
    <title>Simple App!</title>
  </head>
  <body>
    <h1>Sample App with Electron</h1>
    We are using io.js
    <script>
      document.write(process.version)
    </script>
    and Electron
    <script>
      document.write(process.versions['electron'])
    </script>.
  </body>
</html>
```

start simple electron app
```bash
npm start
```

### Packager

add to package.json script section
```js
  "pack": "electron-packager . sample-app --platform=win32 --arch=ia32,x64 --version=0.30.0 --out ..",
```

repository: Stmu/electron-sample

repo_name: Stmu/electron-sample


text:
🌸 Project Sakura 🌸

  Table of Contents

Overview ✨

About the Website ⭐

Meet The Team 👨💻

Credits ❤

## **Overview**

Sakura provides quick timely updates and a great deal of customization with the same stability as Lineage OS.

It is an Open Source custom ROM building website that is being used by thousands of people and has more than 100k downloads.

The project is originally based on android and there are 35 mobiles that are being maintained by 20 maintainers.

For more information regarding new updates and features as well as to download Project Sakura please visit the official website here : [Project Sakura](https://projectsakura.xyz)

### **Features**

- **Secure** ⚙ : Project Sakura has all the security measures from Lineage OS.
- **Customizable** 🔧 :Project Sakura comes with a beautiful interface and allows a lot of customization and personalization for the user.
- **Open Source** 🌍 : Any kind of contribution to Project Sakura is welcome and much appreciated. [Fork us](https://github.com/ProjectSakura)!

  It is also one of the projects in the open source event, GirlScript Summer of Code 2021

- **Community Support** 🙌 : Project Sakura community is growing, come join us on [Telegram](https://t.me/ProjectSakura).

If you like Project Sakura, please drop a ⭐ on the GitHub repository

---

## **About**

### Tech Stack used in the website are :

- HTML
- CSS
- Bootstrap
- Javascript

The website is fully responsive and is maintained regularly.

## **Style Guide**

### **Demo**

[For more info watch](https://www.youtube.com/watch?v=7k7nnAVBh9Y) 🎥

The website link : [Project Sakura](https://projectsakura.xyz)

---

## **Meet The Team**

   Priyanshu

  Founder, Lead Developer

   Arun

  Web Developer

### **Contributors**

Project Sakura Team would like to thank all the users, maintainers and developers who contributed to this project.

[Our Contributors 🌟](https://github.com/ProjectSakura/ProjectSakura.github.io/graphs/contributors)

---

## **Credits**

- [Resurrecton Remix for the Homepage](https://resurrectionremix.com/)
- [HarshV23 and NitinR for the new Homepage](https://legionos.org/)
- [Ig Design for the download page design](https://codepen.io/ig_design/pen/omQXoQ)
- [FlorinPop17 for the Card design and Footer design](https://codepen.io/FlorinPop17/pen/EJKgKB)
- [Danaabhi7719 for Blog posts card design](https://codepen.io/danaabhi7119/pen/NWxjyby)
- [mograph.ix for dowload animation](https://lottiefiles.com/25923-download-arrow)


text:
# SpERT: Span-based Entity and Relation Transformer
PyTorch code for SpERT: "Span-based Entity and Relation Transformer". For a description of the model and experiments, see our paper: https://arxiv.org/abs/1909.07755 (accepted at ECAI 2020).

![alt text](http://deepca.cs.hs-rm.de/img/deepca/spert.png)

## Setup
### Requirements
- Required
  - Python 3.5+
  - PyTorch (tested with version 1.4.0)
  - transformers (+sentencepiece, e.g. with 'pip install transformers[sentencepiece]', tested with version 4.1.1)
  - scikit-learn (tested with version 0.24.0)
  - tqdm (tested with version 4.55.1)
  - numpy (tested with version 1.17.4)
- Optional
  - jinja2 (tested with version 2.10.3) - if installed, used to export relation extraction examples
  - tensorboardX (tested with version 1.6) - if installed, used to save training process to tensorboard

### Fetch data
Fetch converted (to specific JSON format) CoNLL04 \[1\] (we use the same split as \[4\]), SciERC \[2\] and ADE \[3\] datasets (see referenced papers for the original datasets):
```
bash ./scripts/fetch_datasets.sh
```

Fetch model checkpoints (best out of 5 runs for each dataset):
```
bash ./scripts/fetch_models.sh
```
The attached ADE model was trained on split "1" ("ade_split_1_train.json" / "ade_split_1_test.json") under "data/datasets/ade".

## Examples
Evaluate CoNLL04 on test dataset:
```
python ./spert.py eval --config configs/example_eval.conf
```

Train CoNLL04 on train dataset, evaluate on dev dataset:
```
python ./spert.py train --config configs/example_train.conf
```

## Notes
- To train SpERT with SciBERT \[5\] download SciBERT from https://github.com/allenai/scibert (under "PyTorch HuggingFace Models") and set "model_path" and "tokenizer_path" in the config file to point to the SciBERT directory.
- You can call "python ./spert.py train --help" or "python ./spert.py eval --help" for a description of training/evaluation arguments.
- Please cite our paper when you use SpERT: <br/>
Markus Eberts, Adrian Ulges. Span-based Joint Entity and Relation Extraction with Transformer Pre-training. 24th European Conference on Artificial Intelligence, 2020.

## References
```
[1] Dan Roth and Wen-tau Yih, ‘A Linear Programming Formulation forGlobal Inference in Natural Language Tasks’, in Proc. of CoNLL 2004 at HLT-NAACL 2004, pp. 1–8, Boston, Massachusetts, USA, (May 6 -May 7 2004). ACL.
[2] Yi Luan, Luheng He, Mari Ostendorf, and Hannaneh Hajishirzi, ‘Multi-Task Identification of Entities, Relations, and Coreference for Scientific Knowledge Graph Construction’, in Proc. of EMNLP 2018, pp. 3219–3232, Brussels, Belgium, (October-November 2018). ACL.
[3] Harsha Gurulingappa, Abdul Mateen Rajput, Angus Roberts, JulianeFluck,  Martin  Hofmann-Apitius,  and  Luca  Toldo,  ‘Development  of a  Benchmark  Corpus  to  Support  the  Automatic  Extraction  of  Drug-related Adverse Effects from Medical Case Reports’, J. of BiomedicalInformatics,45(5), 885–892, (October 2012).
[4] Pankaj Gupta,  Hinrich Schütze, and Bernt Andrassy, ‘Table Filling Multi-Task Recurrent  Neural  Network  for  Joint  Entity  and  Relation Extraction’, in Proc. of COLING 2016, pp. 2537–2547, Osaka, Japan, (December 2016). The COLING 2016 Organizing Committee.
[5] Iz Beltagy, Kyle Lo, and Arman Cohan, ‘SciBERT: A Pretrained Language Model for Scientific Text’, in EMNLP, (2019).
```


text:
### Tickets:

- HCK-

### List of changes:

-

### Type of change:

- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] New release
- [ ] Requires a documentation update

### How did you do this?

### Why are you choosing this approach?

### Questions for code reviewers?

### PR Checklist:

- [ ] Merged `develop` branch (before testing)
- [ ] Ran `yarn format` to format code
- [ ] Listed change(s) in the Changelog
- [ ] Tested all links in project relevant browsers
- [ ] Tested all links on different screen sizes
- [ ] Referenced all useful info (issues, tasks, etc)


text:
# memepack-builder

[![Issues](https://img.shields.io/github/issues/Teahouse-Studios/memepack-builder?logo=github&style=flat-square)](https://github.com/Teahouse-Studios/memepack-builder/issues)    [![Pull requests](https://img.shields.io/github/issues-pr/Teahouse-Studios/memepack-builder?logo=github&style=flat-square)](https://github.com/Teahouse-Studios/memepack-builder/pulls)    [![License](https://img.shields.io/static/v1?label=License&message=Apache-2.0&color=db2331&style=flat-square&logo=apache)](http://www.apache.org/licenses/LICENSE-2.0)

[简体中文](./doc/README.zh-hans.md)

A tool for packaging Memefied Chinese resource pack for Minecraft.

This is the source code repository of PyPI package `memepack-builder`. It's not intended for production use. Please use `pip install memepack-builder` to install the package.

This package has no dependencies.

This package requires Python 3.9 or above.

## Usage

This package can be invoked by other Python programs, or run from command line interface.

### Used as library

The package provides four classes: `PlatformChecker`, `ModuleChecker`, `JEPackBuilder` and `BEPackBuilder`. In a simple build (which is the most case), just import the module checker and one of the two builders, and call `build()`. The build log is stored as a list in the builder's `build_log` property. Use `'\n'.join()` if you prefer string.

### Used in CLI

When called in CLI (i.e. `python -m memepack_builder`), the package will ask for proper arguments, and build the resource pack as needed. For full usage, see [this page](./doc/CLI_Manual.md).

## Contribution

We would be grateful if you can contribute to this project. See the [contribution guide](./CONTRIBUTING.md) for more information.

## License

> Copyright 2021 MysticNebula70 & Teahouse Studios
>
> Licensed under the Apache License, Version 2.0 (the "License");
> you may not use this file except in compliance with the License.
> You may obtain a copy of the License at
>
> http://www.apache.org/licenses/LICENSE-2.0
>
> Unless required by applicable law or agreed to in writing, software
> distributed under the License is distributed on an "AS IS" BASIS,
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> See the License for the specific language governing permissions and
> limitations under the License.

repository: Teahouse-Studios/memepack-builder

repo_name: Teahouse-Studios/memepack-builder


text:
# Introduction to CUDA
This repo is for learning CUDA using C/C++.

## What is CUDA?
CUDA is a parallel computing platform and application programming interface model created by Nvidia. It allows software developers and software engineers to use a CUDA-enabled graphics processing unit for general purpose processing – an approach termed GPGPU.

The CUDA platform is designed to work with programming languages such as C, C++, and Fortran. This accessibility makes it easier for specialists in parallel programming to use GPU resources, in contrast to prior APIs like Direct3D and OpenGL, which required advanced skills in graphics programming. CUDA-powered GPUs also support programming frameworks such as OpenMP, OpenACC and OpenCL; and HIP by compiling such code to CUDA.

![image](https://user-images.githubusercontent.com/50926437/128422031-fa5226a0-f665-45a2-b456-b3339e3ceada.png)

## Advantages
CUDA has several advantages over traditional general-purpose computation on GPUs (GPGPU) using graphics APIs:
* Scattered reads – code can read from arbitrary addresses in memory.
* Unified virtual memory (CUDA 4.0 and above)
* Unified memory (CUDA 6.0 and above)
* Shared memory – CUDA exposes a fast shared memory region that can be shared among threads. This can be used as a user-managed cache, enabling higher bandwidth than is possible using texture lookups.
* Faster downloads and readbacks to and from the GPU
* Full support for integer and bitwise operations, including integer texture lookups
* On RTX 20 and 30 series cards, the CUDA cores are used for a feature called "RTX IO" Which is where the CUDA cores dramatically decrease game-loading times.

## Why should we learn CUDA?
With CUDA, you can leverage a GPU's parallel computing power for a range of high-performance computing applications in the fields of science, healthcare, and deep learning. Learn CUDA Programming will help you learn GPU parallel programming and understand its modern applications.

Also CUDA is the basis of most of the important DeepLearning frameworks such as `PyTorch` and `Tensorflow`.

## Files

There is `ipynb` file which containt the notebook of the codes and some explanation. Also `html` format also exists.

The main code is cuda code for `Iris` dataset which exists in the `Iris` folder. To compile the file use below command:
```
nvcc -arch=sm_35 -rdc=true Iris.cu -o Iris -lcudadevrt
```

## Requirements

You just need to have installed `gcc`, `g++`, and `cuda`. To install cuda use below links:
* Windows.
* Linux.
* Mac OS.

*Amirhossein Abaskohi*

repository: AmirAbaskohi/Introduction-to-CUDA

repo_name: AmirAbaskohi/Introduction-to-CUDA


text:
Pattern: Redundant `nil` coalescing

Issue: -

## Description

`nil` coalescing operator is only evaluated if the left-hand side is nil, coalescing operator with nil as right-hand side is redundant.

Examples of **correct** code:
```swift
var myVar: Int?; myVar ?? 0

```
Examples of **incorrect** code:
```swift

var myVar: Int? = nil; myVar↓ ?? nil

var myVar: Int? = nil; myVar↓??nil

```

## Further Reading

* [SwiftLint - Redundant Nil Coalescing](https://realm.github.io/SwiftLint/redundant_nil_coalescing.html)

repository: Adroiti/docs-for-code-review-tools

repo_name: Adroiti/docs-for-code-review-tools


text:
# Testing Usage

The `kui-test` library contains helpful utilities for testing your Kui UI.

## Project Setup

Add the kui-test dependency to your build.gradle
```groovy
repositories {
    // ...
    maven { url "https://juggernaut0.github.io/m2/repository" }
}
dependencies {
    // ...
    compile "com.github.juggernaut0.kui:kui:0.10.0"
    testCompile "com.github.juggernaut0.kui:kui-test:0.10.0"
}
```

build.gradle.kts
```kotlin
repositories {
    // ...
    maven { setUrl("https://juggernaut0.github.io/m2/repository") }
}
dependencies {
    // ...
    implementation("com.github.juggernaut0.kui:kui:0.10.0")
    testImplementation("com.github.juggernaut0.kui:kui-test:0.10.0")
}
```

## Rendering for Test

The best way to test components is to actually render them as DOM objects and manipulate their behavior as a user would.
Use the `render` method to render your component to a temporary element and returns a `RenderedComponent` object that
can be used to interact with the component.

```kotlin
import kui.test.*

class MyCompTest {
    @Test
    fun myCompTest() {
        val rendered = render(MyComponent())
    }
}
```

Use the `getBy...` methods on the `RenderedComponent` to select specific DOM elements, to inspect them or dispatch
events. Use the `setState` method to interact with the component's state and re-render it.

## Asserting HTML

Use the `assertMatchesHtml` assertion function to compare your component's rendered elements to an expected HTML string.

```kotlin
@Test
fun myCompTest() {
    val rendered = render(MyComponent())
    assertMatchesHtml("<div><p>Hello World</p></div>", rendered)
}
```

**Note**: `assertMatchesHtml` does a string comparison on the rendered component's innerHtml, so order of attributes,
classes, etc. are important!

If you wish to use Kui's markup DSL for HTML comparison's, you can use the `assertMatchesMarkup` assertion
function.

```kotlin
@Test
fun myCompTest() {
    val rendered = render(MyComponent())
    assertMatchesMarkup(rendered) {
        it.div {
            p { +"Hello World" }
        }
    }
}
```


text:
# ShopApi.ProductLink

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sourceProductId** | **String** | The semantic id of the product from which this product link is coming. | [optional]
**sourceProductLink** | **String** | The URL addressing the product from which this product link is coming. | [optional]
**targetProductId** | **String** | The semantic id of the product to which this product link is pointing. | [optional]
**targetProductLink** | **String** | The URL addressing the product to which this product link is pointing. | [optional]
**type** | **String** | The type of this product link. | [optional]

## Enum: TypeEnum

* `cross_sell` (value: `"cross_sell"`)

* `replacement` (value: `"replacement"`)

* `up_sell` (value: `"up_sell"`)

* `accessory` (value: `"accessory"`)

* `newer_version` (value: `"newer_version"`)

* `alt_orderunit` (value: `"alt_orderunit"`)

* `spare_part` (value: `"spare_part"`)

* `other` (value: `"other"`)

repository: thomdiesel/sfcc-ocapi-amp

repo_name: thomdiesel/sfcc-ocapi-amp


text:
---
layout: post
title: How to Enable Hyper V on Windows 10
---

## Enabling Hyper V

Server Virtualization is an everyday part of my life while at work and at home. I think it is an important technology to understand and it isn't as complicated as you may think. Take a moment to review the [Basics of Virtualization](http://www.dummies.com/programming/networking/basics-of-network-virtualization/) before we start our first exercise, enabling Hyper V.

We don't need to have a virtualized media Server, but we can, so why not learn a thing or two while we set it up. We are going to use Microsoft [Hyper V](https://www.microsoft.com/en-us/cloud-platform/server-virtualization) because it comes standard on Windows 10, it's free and its more than capable of handling the task at hand. With the commands below we can enable Hyper V along with the built in Hyper V Powershell Module.

###### We can use the snippet below to enable the Hyper V optional Windows Feature.

	Get-WindowsOptionalFeature -Online |
		Where-Object {$PSItem.FeatureName -match 'Hyper'} |
		Enable-WindowsOptionalFeature -Online


text:
# DOT
This repository is for code submission to NeurIPS2019 of the paper "Discriminator optimal transport"([arXiv](http://arxiv.org/abs/1910.06832)).
We need pretrained models to execute following demos.
For 2d demo, all pretrained models are included in this repository.
Some DCGAN pretrained model files on CIFAR-10 and STL-10 can be downloaded from https://drive.google.com/drive/folders/1UpWndW2xz0X8XaQZNyfSOjyiTbMfWEVs?usp=sharing if you like.
Please put the files to trained_models/.
On ImageNet, we used the pretrained models available on https://drive.google.com/drive/folders/1m04Db3HbN10Tz5XHqiPpIg8kw23fkbSi.

# Environment
DL framework for python is `chainer`.

# Demos
Experiments in the paper can be excuted by
 1. `2d_demo.ipynb`
 2. `execute_dot.py`
 3. `execute_dot_cond.py`
 4. `execute_mh.py`

## 1. `2d_demo.ipynb`:
This notebook executes 2d experiment on DOT.
All necessary files are included.

## 2. `execute_dot.py`:
The python script file executes latent space DOT for CIFAR-10 and STL-10 using trained models.
Because of Licence issue, we cannot supply GAN training code here, sorry.
For example, please train your model by using the repository: https://github.com/pfnet-research/chainer-gan-lib.

To calculate inception score and FID, you need each dataset and mean+std matrix on 2,048 dimensional feature space of inception model.
Some scripts in https://github.com/mattya/chainer-inception-score are used below.
Before running codes below, please clone `inception_score.py` and `download.py` to this ditectory.

All necessary files on computations for score can be installed by following below.
`torch` and `torchvision` are required to execute `load_dataset.py`, and `tensorflow` is also necessary to execute `download.py` downloading inception model to measure inception score and FID.
```
$ python load_dataset.py --root torchdata/ --data cifar10      # download CIFAR-10 and making training_data/CIFAR.npy
$ python load_dataset.py --root torchdata/ --data stl10        # download STL-10 without labels and making training_data/STL96.npy
$ python load_stl_to48.py --gpu 0                              # making downscaled data training_data/STL48.npy
$ python download.py --outfile metric/inception_score.model    # download inception model
$ python get_mean_cov_2048featurespace.py --data CIFAR --gpu 0 # calculating mean&cov in 2,048 feature space and saving it to metric/CIFAR_inception_mean.npy and metric/CIFAR_inception_cov.npy
$ python get_mean_cov_2048featurespace.py --data STL48 --gpu 0 # to metric/STL48_inception_mean.npy and metric/STL48_inception_cov.npy
```
After that, one can execute `execute_dot.py` to perform the latent space DOT with OPTIONS
> `--gpu` : GPU id.

> `--G` : Generator filename in `trained_models/`.

> `--D` : Discriminator filename in `trained_models/`.

> `--transport` : `dot` or `naive`.

> `--optmode` : `adam` or `sgd`.

> `--lr` : float for SGD updates.

> `--N_update` : the number of SGD update of each sample by DOT.

> `--showing_period` : the period for log-file under `scores/`.

> `--k` : if 1, k_eff in DOT is fixed 1. if not specified, k_eff is calculated.

For example,
```
$ python execute_dot.py --G DCGAN_G_CIFAR_SAGAN_NonSaturating_140000.npz --D DCGAN_D_CIFAR_SAGAN_NonSaturating_140000.npz --transport dot --optmode sgd --lr 0.01 --N_update 10 --showing_period 5 --gpu 0
```
executes latent space DOT by using the specified models in `trained_models/` by applying `0`, `5`, `10` times `sgd` with `lr 0.01`.
The log of IS and FID will be written under `scores/uncond_year_month_day_time.txt` by using 50000 samples.

## 3. `execute_dot_cond.py`:
The python script file executes conditional DOT.
To run it, we need
```
ResNetGenerator_850000.npz
SNResNetProjectionDiscriminator_850000.npz
```
in the directory `trained_models/`
The npz data is in public: https://drive.google.com/drive/folders/1m04Db3HbN10Tz5XHqiPpIg8kw23fkbSi

In addition to it, please clone directories
>https://github.com/pfnet-research/sngan_projection/tree/master/gen_models

>https://github.com/pfnet-research/sngan_projection/tree/master/dis_models

>https://github.com/pfnet-research/sngan_projection/tree/master/source

to this directory.

The inception model which is explained in 2 also needed, and as a final requirement, we need mean and cov in inception model 2,048 feature space of the imagenet dataset. After calculating it, save them to
```
metric/imagenet_inception_mean.npy
metric/imagenet_inception_cov.npy
```
This step can be skipped just by using cifar's features by using option `--data CIFAR` of this script.
OPTIONS are same as 2, and the log-file will be saved to `scores/cond_year_month_day_time.txt`.

## 4. `execute_mh.py`:
`execute_mh.py` executes the re-implemented Metropolis-Hastings GAN sampling with OPTIONS
> `--gpu` : GPU id.

> `--G` : Generator filename in `trained_models/`.

> `--D` : Discriminator filename in `trained_models/`.

> `--N_update` : the number of SGD update of each sample by DOT.

> `--showing_period` : the period for log-file under `scores/`.

> `--calib` : if True, calibration is applied to the discriminator.

> `--initdata` : if True, data's certain minibatch is chosen as initial states of the Markov Chain. The update is repeated until generated data is accepted.

For example,
```
python execute_mh.py --gpu 0 --G DCGAN_G_STL48_SAGAN_NonSaturating_140000.npz --D DCGAN_D_STL48_SAGAN_NonSaturating_140000.npz --calib True --initdata True --N_update 10 --showing_period 5
```
executes MH-GAN sampling by using the specified models in `trained_models/` with Markov chain length = `0`, `5`, `10` initialized by data itself, with calibrated discriminator.
The log of IS and FID will be written under `scores/MH_year_month_day_time.txt`.


text:
# iris-geocoder-bundle
Symfony  bundle to reverse geocoding  from  address to French IRIS Areas .

Based on : https://github.com/garaud/pyris writed in python.

# Installation

## Requirements

You have to install postgreSQL and PostGIS. For Debian:
````bash
    sudo apt-get install postgresql postgis
````

You have to be a PostgreSQL superuser to create the postgis extension for your database. If it's not the case, you can do:
````SQL
    su
    su - postgres
    psql DATABASENAME -c "CREATE EXTENSION postgis;"
````

Download the last available IRIS shape file at the URL : https://www.data.gouv.fr/fr/datasets/contour-des-iris-insee-tout-en-un/

## Configuration

Create a database and add a new doctrine connection in _app/config.yml_ [Symfony Documentation](http://symfony.com/doc/current/doctrine/multiple_entity_managers.html)
````yaml
doctrine:
    dbal:
        connections:
            #[...]
            psql:
                driver: pdo_pgsql
                host:     "%psql_database_host%"
                port:     "%psql_database_port%"
                dbname:   "%psql_database_name%"
                user:     "%psql_database_user%"
                password: "%psql_database_password%"
                charset:  UTF8
````

Add 'geometry' mapping column type:
````yaml
doctrine:
    dbal:
        types:
            geometry: Jsor\Doctrine\PostGIS\Types\GeometryType
````
Add a new doctrine entity_manager for the connection recently added:
````yaml
    orm:
        entity_managers:
            #[...]
            geocodage:
                connection: psql
                mappings:
                    MunsoIRISGeocoderBundle: ~
                dql:
                    numeric_functions:
                        ST_MakePoint: Jsor\Doctrine\PostGIS\Functions\ST_MakePoint
                        ST_Contains: Jsor\Doctrine\PostGIS\Functions\ST_Contains
                        ST_SetSRID: Jsor\Doctrine\PostGIS\Functions\ST_SetSRID
````

### Customization

If you have already a postgresSQL connection configured on your project, you could edit entity_manager name used.

If the columns mapped in your *.shp file does not fit with IrisItem entity, you can create your own entity by editing `munso.iris_geocoder.entity_name` parameter.
````yaml
    munso.iris_geocoder.entity_manager.name: 'geocodage'
    munso.iris_geocoder.entity_name: 'MunsoIRISGeocoderBundle:IrisItem'
````

## Import

Import your shape into postgresSQL database by running the command:

````
    php bin/console munso:iris:import-shape path/to/file.shp
````

The .shx and .dbf files must be in the same directory than the *.shp file.
The SQL table will be truncated unless you use `--append` option.

#Usage

  ## IRIS Code by address

Use service `munso.iris_geocoder`:

````php
   $IrisItem = $this->get('munso.iris_geocoder')->getIRISByAddress('2b Allée Forain Francois verdier');
````

repository: Munso-Agency/iris-geocoder-bundle

repo_name: Munso-Agency/iris-geocoder-bundle


text:
# Async Fetch

AppRun supports asynchronous operations in the AppRun event handlers. We only need to add the async keyword in front of the event handlers. The event handlers can call the functions that return _Promise_ with the await keyword.

Using the async fetch, you can bring in data from other systems into AppRun Site apps.

See a component that displays the random XKCD pictures using async fetch from the **src/components** directory.

<my-xkcd></my-xkcd>

The code of the component is listed below.

```javascript
import { app, Component, customElement } from 'apprun';

@customElement('my-xkcd')
export default class extends Component {
  state = {};

  view = (state) => <>
    <div><button $onclick='fetchComic'>XKCD</button></div>
    {state.loading ? <div>loading ... </div> : ''}
    {state.comic && <>
      <h3>{state.comic.title}</h3>
      <img src={state.comic.url} />
    </>}
  </>;

  update = {
    'loading': (state, loading) => ({ ...state, loading }),
    'fetchComic': async _ => {
      this.run('loading', true);
      const response = await fetch('https://xkcd-imgs.herokuapp.com/');
      const comic = await response.json();
      return { comic };
    }
  };
}
```

The fetch results can be cached by the service worker so that you can build a lightning fast app (even for dynamic content) that works offline.

Learn how to make a [Progress Web App](#pwa).

repository: gyuri-lajos/apprun-site

repo_name: gyuri-lajos/apprun-site


text:
---
title: "Titanic - An exploratory analysis"
date: 2019-12-15
tags: [Data Visualization]
header:
  image: "/images/ds.jpg"
  excerpt: "Data Visualization"
---

This is an exploratory analysis of the Titanic survivors data from Kaggle.

On April 15, 1912, during her maiden voyage, the widely considered “unsinkable” RMS Titanic sank after colliding with an iceberg. Unfortunately, there weren’t enough lifeboats for everyone onboard, resulting in the death of 1502 out of 2224 passengers and crew.

While there was some element of luck involved in surviving, it seems some groups of people were more likely to survive than others.

In this article, I will attempt to identify what category of passengers most likely survived.

The features that can be examined for each passenger are:
1. Age
2. Sex
3. Ticket class
4. Number of siblings / spouses aboard the Titanic
5. Number of parents / children aboard the Titanic
6. Passenger fare
7. Port of Embarkation

## Age
Let's first have a look at the number of survivors and non-survivors among passengers of different ages.
![](/images/titanic/age.png)

The following observations can be made from the graph above:
- Most passengers on the ship are in the age range 15 to 50.
- A high number of non-survivors exist in the age range 20-30.
- There are also a good number of survivors in the same age range.
- Of the 8 passengers above the age of 65, only 1 survived.
From the above observations, I can assume that 'age' can be used as a decision factor for evaluating passenger survival.

## Sex
Let's now see if there is a bias in number of survivors with respect to sex of the passenger.
![](/images/titanic/male-female-survivors.png)

Observations from this graph:
- Approximately 70% of the female passengers survived.
- Only 20% of the male passengers survived.
Therefore, we can use this feature to significantly improve survival prediction of a passenger.

## Ticket Class
Next, let's see how the ticket class affected the survival chances of a passenger:
![](/images/titanic/Pclass.png)

Observations from this graph:
- More than 50% of passengers with Class 1 tickets survived.
- Around 50% of passengers with Class 2 tickets survived.
- Only around 30% of passengers with Class 3 tickets survived.
This tells us that somehow even during a life/death situation like the sinking of the Titanic, people with better tickets had a higher chance of survival.

## Ticket Fare
Another graph on similar lines as the ticket class, is the graph of ticket fare.
![](/images/titanic/fare.png)
From the above graph, we can see that only 4 people that did not survive, paid a ticket fare above 100. Also, from the graph of non-survivors, we see that a very high number of non-survivors are concentrated around low ticket prices.
We see that this graph affects the survival in the same way that the ticket class did. It is possible that most information given by this variable is redundant. If this were a huge dataset with many features, we could possibly ignore this feature, or generate a new feature from the 'ticket class' and the 'ticket fare'.

## Port of embarkation

### Titanic sailing route map
Titanic first arrived at Southampton, UK.
6 days later, Titanic arrived at Cherbourg, France.
Titanic arrived in Queenstown, Ireland a day later.
3 days later Titanic hits the iceberg.

Let's look at a graph of the survival variation based on the 'port of embarkation'.
![](/images/titanic/embarkation.png)

Observations:
- A huge number of people boarded from Southampton. This was probably because it was the first port where people boarded.
- Only about 30% of the passengers who boarded in Southampton survived.
- A small number of people boarded in Queenstown, and about 40% of them survived.
- In Cherbourg, more than 50% of the passengers survived.  This was probably because most passengers who boarded in Cherbourg had class 1 tickets.

## Conclusion
This analysis gives us a fair idea of what factors most determined the survival of a passenger aboard the titanic. These features can be used to build machine learning models to predict the survival of a passenger. A preliminary knowledge of the data sets a much required context to tweak the features as necessary for building efficient machine learning models.

## Code
The above analysis was carried out using a jupyter notebook. The notebook can be found [here](https://github.com/akhilayaragoppa/akhilayaragoppa.github.io/blob/master/source_code/Titanic-Data-Visualization.ipynb).

gha_language: Jupyter Notebook


text:
---
layout: page
---

Hello! I'm Brad, Director of Data Science at [84.51°](https://www.8451.com/) where we develop algorithmic processes, solutions, and tools that enable 84.51° and its analysts to efficiently extract insights from data and provide solution alternatives to decision-makers.

I work on applied analytic [research](http://bradleyboehmke.github.io/papers/), develop data analysis [software](http://bradleyboehmke.github.io/software/), create data science educational [content](http://bradleyboehmke.github.io/education/), write [books](http://bradleyboehmke.github.io/books/), and provide analytic [consulting services](http://bradleyboehmke.github.io/consulting/).

I am also an Adjunct Professor at the [University of Cincinnati](http://business.uc.edu/departments/obais.html), [Wake Forest University](http://business.wfu.edu/ms-analytics/), and [Air Force Institute of Technology](http://www.afit.edu/ENS/) where I teach [business analytics and R programming courses](http://bradleyboehmke.github.io/courses). Previously, I was a Senior Operations Research Analyst with the Air Force and spent many years developing life cycle forecasting, risk and decision analysis models.

If you are interested in collaborating and doing some great work please reach out to me via:

   Twitter

<a<EMAIL_ADDRESS>target="_blank" style="color:#515151;">   Email

   GitHub

   LinkedIn

 All opinions and views are my own and do not represent my employer(s).