text:
---
title: Treasure
permalink: /nobilis/miracles/treasure/
---

# Treasure

Treasure is the trait representing the capacity of a miraculous character to establish and manipulate Anchors. [p208] A miraculous character can cast miracles through a remote Anchor as if they were present, but are also vulnerable to being attacked through the Anchor when the mystic link between the two is open. [p207]

#### Additional Resources

Treasure and Anchors are complex, and a small additional book called [*The Story of Treasure*](https://www.drivethrurpg.com/product/115109/The-Story-of-Treasure) was released as a free PDF to help players better understand these mechanics. This site will not link to page numbers from that PDF, but some of the mechanical interpretations appearing here are informed by that resource. It's recommended reading for anyone trying to better understand Treasure.

## Miracle Levels

--|--|--
0 | *Claiming an Anchor* [p209] | You can claim Ordinary Anchors
1 | *Possession* [p210] | ... and you can possess your Anchors
2 | *Guidance* [p211] | ... and you can guide your Anchors from afar
3 | *Unleashing Wonders* [p211] | ... and you can make and unleash Wondrous Anchors
4 | *Getting Some Help* [p212] | ... and your Anchors act on your behalf
  |  | ... and your local Anchors are easily available
5 | *Weaponizing Anchors* [p213] | ... and your Anchors are functional, flexible weapons
6 | *Weaving Destiny* [p214] | ... and your Anchors can achieve cool things
6 | *Unleashing Miracles* [p214] | ... and you can claim and unleash Miraculous Anchors
7 | *Getting Miraculous Help* [p215] | ... and your Miraculous Anchors act on your behalf
  |  | ... and you can access your Anchors from anywhere
8 | *Communion* [p215] | ... and you can combine power with Miraculous Anchors for joint effects
9 | *Imperial Miracles* [p215] | ... and your Miraculous Anchors can invoke Imperial Miracles

### How do Treasure Miracles relate to other Miracles?

- Sustained Treasure Miracles that enable new kinds of mundane actions (such as *Unleashing Wonders* [p211]) can be used alongside Aspect Miracles to enhance those mundane actions. [p212] [p305]

- While using a Treasure Miracle like *Possession* [p210] that allows you to occupy the body of your Anchor instead of your own, you can use your own Miracles in that body. [p211]

### How else does Treasure affect a character?

- Beyond the base 13 points of Bonds and Afflictions a character can spend, they can spend an additional number of points on Bonds equal to their Treasure rating (because claiming Anchors for Treasure Miracles requires having relevant Bonds).


text:
Self Checkout - Mutation Test Kata
==================================

In this exercise, you will build a self checkout machine. It will scan a product, sum the product prices, accept gift card, receive payment by cash and make change, or receive payment by credit card. All the things that you might expect a self checkout machine to be capable of.

Features
========

Scan Product
------------
_As a customer_
_I want a self checkout machine that scan product for its price_
_So that I can do 'self-entry' of the item they want to buy_

The machine will accepting product ID as input, validate it, returns (display) the price. If the ID is not valid, it shall not return its price.

Calculate Total
---------------
_As a customer_
_I want the self checkout machine automatically add the scanner product to my cart_
_So that I can get the total prices I need to pay at the end of checkout_

 A product that had been scanned, and it's valid, will automatically added to the customer 'cart', and the updating the current total.

Add Gift Card(s)
----------------
_As a customer_
_I want to be able to entering my gift card(s) code_
_SO that I can use my gift card(s) as part of payment_

The machine will accept any number of gift card(s). The customer shall be able to entered their gift card code(s). Valid code will deducting the total that should be paid by the customer. However,if the total value of the gift card(s) are more than the total purchases, no change will be given as of store policy.
The machine should also validate the expiration date of the card.
A gift card can only be used once.

Accept Payment by Cash
----------------------
_As a customer_
_I want to be able to pay by using cash_
-So that I can pay by cash_

In this exercise, the cash payment is simulated by letting the customer entering the nominal value of the money they use. The customer can do this multiple times. The machine will end the checkout if total is equal or more than the total purchase. The machine will also give change if there is any.
Checkout should ended afterward.

Accept Payment by Credit Card
-----------------------------
_As a customer_
_I want to be able to pay by using credit card_
-So that I can pay with my credit card_

The customer can entered their credit card number, and the machine will use third party service to validate the card. If valid, checkout should ended afterward.

Gift Card Can Be Used Again If Previous Transaction Is Cancelled
_As a customer_
_I want to cancel use my transaction using gift card_
_So that I can use my gift card for next transaction_

Bonus
=====
- Print receipt
- Add mutation test coverage for the classes in the util package

license: MIT

repository: ahaqqu/self-checkout

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: ahaqqu/self-checkout


text:
# Codelabs for Material Components for Android (MDC-Android)

[Material Components for Android](https://material.io/components/android/) are modular and customizable UI
components that implement Material Design. This repo houses the source for the [Building Beautiful
Apps Faster](https://codelabs.developers.google.com/codelabs/mdc-android/index.html) codelab.

This repository is structured as branches. You can checkout an individual branch by running `git checkout 101-starter` or the equivalent for the codelab you are following.

There are some simple scripts for maintaining this repository in the `tools/` directory.


text:
# hashdir
A utility that creates a list of file hashes and tracks changes for a directory.

## Usage

### hash
Creates a list of file hashes.
```
>hashdir hash directory
Start hashing. Directory: dir / Storage: (not set)
Hashing completed. Result saved: dir.csv
```

### check
Checks directory for changes and displays them.
```
>hashdir check -s dir.csv dir
Check started. Directory: dir / Storage: dir.csv
Check completed.
Added files:
dir/file2.txt
```

### copy
Copies changes to dest.
```
>hashdir copy -s dir.csv -d dir2 dir
Copy started. Directory: dir / Storage: dir.csv / Destination: dir2
dir/file2.txt
Copy completed.
```

repository: Oniestel/hashdir

repo_name: Oniestel/hashdir


text:
# Alan Standard Library Upstream Archives

This folder contains copies of every release of the upstream _Alan Standard Library_ employed in this project; when the library is updated, the upstream files of the currently used version can be diff-compared with the new version in order to track which changes should be integrated into the Italian files in order to bring them on par with the latest version of the Standard Library.

- [`/2.1/`](./2.1/) (updated: 2018/10/22 | commit [`cc7071a`][commit])

[commit]: https://github.com/AnssiR66/AlanStdLib/tree/cc7071a85d23ebd01f8d2b9b9f167aaa81c382ee

# CHANGELOG

Changelog for ALAN Standard Library v2.x

## v2.1 (updated 2018/06/11)

Prereleased on [Alan-IF Yahoo group] (2018/04/13), then [released on GitHub] (2018/05/27), followed by further commits (small changes). Version 2.1 is not yet declared definitive.

- added verb restrictions
- polished and expanded the manual

## v2.0 (2016/05/15)

(first version)

[Alan-IF Yahoo group]: https://groups.yahoo.com/neo/groups/alan-if/files/ALAN%20Standard%20Library%20v2.1%20files/

[released on GitHub]: https://github.com/AnssiR66/AlanStdLib


text:
## Image Defogging Utility ##

A small program that removes fog and haze from images.

Uses a modified version of the algorithm outlined in [this paper](http://www.fujitsu.com/downloads/MAG/vol50-1/paper10.pdf); at some point, I'll get around to writing up exactly what this code does.

### Building ###

	gcc -o defog src/defog.c `pkg-config --libs --cflags opencv` -std=c99 -lm

### Running ###

	./defog IMAGE_FILE

where `IMAGE_FILE` is a color (RBG) image; the algorithm won't work on grayscale images.

### License ###

The algorithm used was designed by Zhiming Tan, Xianghui Bai, Bingrong Wang, and Akihiro Higashi.

All code is made available under the following license:

	The MIT License (MIT)

	Copyright (c) 2014-2015 David Pearson

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

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

	 IN NO EVENT SHALL THE
	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
	SOFTWARE.

repository: dpearson/defog

repo_name: dpearson/defog


text:
# Installation
> `npm install --save @types/redux-localstorage`

# Summary
This package contains type definitions for redux-localstorage (https://github.com/elgerlambert/redux-localstorage).

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-localstorage

Additional Details
 * Last updated: Wed, 25 Oct 2017 18:38:05 GMT
 * Dependencies: redux
 * Global values: none

# Credits
These definitions were written by Karol Janyst <https://github.com/LKay>.

repository: NagavenuP/example

repo_name: NagavenuP/example


text:
# docssite
Versioned documentation static site generator.

To build:

```
npm run build
```

This runs 11ty twice: once to create `_site`; once to create `_site/${version}`.

It is necessary to build a second copy of the site in a versioned subdirectory, because the links will be different than in the top-level site. We also remove versions.js in this copy, just to reduce confusion, since it should never be called directly (rather, the top-level version should always be used).

`_site/` always has the latest version.

`_site/history/` always has zipped copies of each version

## Test locally

run `test.sh`

## Settings

### Environment variables

#### Please set these values

`DOCSSITE_HISTORY_URL`: Where to download `/history/*.zip` files from, e.g. `http://localhost:8181/history`.

`DOCSSITE_ROOT_SUBDIR`: The subdirectory that the site is deployed to, e.g. for `http://localhost:8080/SUBDIR`, the value should be `SUBDIR`. We need to store this separately because when we run eleventy to generate the verisoned subdirs, we set its `pathPrefix` setting to `DOCSSITE_ROOT_SUBDIR + /verison/ + DOCSSITE_VERSION`. So we need to know the root subdirectory independently of this.

*Do not* use beginning or ending slashes with any of these properties.

#### Automatically set by the build script

`DOCSSITE_VERSION`: The current version of the site. Automatically set to `$TRAVIS_TAG` in the build script.

`DOCSSITE_WRITE_VERSION`: `true` or `false`, depending on if the site should be written to a versioned subdirectory, e.g. `/version/0.1.0`.

### `site.json`

`docsSubdir`: This is a magic string that will always be meaningful across versions as the home of the documentation section (even if it just redirects to elsewhere).

*Do not* use beginning or ending slashes with this property.

### `versions.json`

Array of all versions to date.

## Marking if a page is not current and listing current and previous versions

This depends on `versions.js` existing at the root level of the site (so: `DOCSSITE_ROOT_SUBDIR + /versions.js`).

`versions.js` is generated from a template `versions.njk` and it gets omitted for versioned subdirectory builds. This process is managed in `.eleventy.js` via modifying the `.eleventyignore` file.

`site.js` is another top-level javascript file. It has functions for calculating paths.

## Tags

Documentation pages must be tagged "docs". This enables differentiating the "you're on an old page" notification - we can say specifically "you're on an old documentation page, go to the latest documentation".

## Exposed to the user

Although top-level pages are published for each version, they are not linked to.

So, while a user could enter `http://site.com/version/0.1.0/about`, there is no direct link to this page. All pages' navigation points to top-level `/about`.

An old page will generate a notificiation: "You're on an old page, go to the latest site", which leads to the start page of the site.

An old documentation page will generate a documentation-specific version of that notification (see above).

repository: marisademeglio/docssite

gha_language: JavaScript

gha_license_id: MIT

repo_name: marisademeglio/docssite


text:
# Neural-Networks-with-Python-and-Pytorch
Neural Networks with Python and Pytorch
# Setup
```pip install torch```

```pip install torchvision ```
# What are neural networks?
Artificial neural network computing is an advanced computing technology. It is targeted by the shape of the nerve of the simple pathway with ANN. In other words, it is the modeling of the synaptic link between being helped and benefiting from this success.
# What is Pytorch?
The Pytorch library, like the other deep learning libraries, really is just a library that does operations on tensors.
# Outputs

![img](1.JPG)

# Thanks
https://pythonprogramming.net/introduction-deep-learning-neural-network-pytorch/

sentdex

branch_name: refs/heads/main

gha_language: Jupyter Notebook


text:
# YYC-dev
YYC CKAN development

* Installing CKAN from package
(http://docs.ckan.org/en/latest/maintaining/installing/install-from-package.html)

## SYSTEM SETTING
```
sudo apt-get update
sudo apt install python-pip
```

* Install the Ubuntu packages that CKAN requires:
```
sudo apt-get install -y nginx
sudo apt-get install -y apache2
sudo apt-get install -y libapache2-mod-wsgi
sudo apt-get install -y libpq5
sudo apt-get install -y redis-server
sudo apt-get install -y git-core
```

* If errors, shutting down apache2 first before installing nginx should fix this problem:
```
sudo service apache2 stop
```

* Fix the locales
```
sudo locale-gen "en_US.UTF-8"
sudo locale-gen "en_CA.UTF-8"
```

* Update again
```
sudo apt-get update
sudo apt-get upgrade
sudo reboot
```

* Add users, if needed.Add ssh keys to droplet for users (https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04)

## Download and install CKAN
* Production environment located at /etc/ckan/default/production.ini
```
wget http://packaging.ckan.org/python-ckan_2.7-xenial_amd64.deb
sudo dpkg -i python-ckan_2.7-xenial_amd64.deb
```

## Install and configure PostgreSQL
* Install and check PostgreSQL:
```
sudo apt-get install -y postgresql
```

* check the installation:
```
sudo -u postgres psql -l
```

* Create a new PostgreSQL database user, ckan_default in this example
```
sudo -u postgres createuser -S -D -R -P ckan_default
```

* Create a new PostgreSQL database, ckan_default in the example, owned by the database user you just created:
```
sudo -u postgres createdb -O ckan_default ckan_default -E utf-8
```

* Edit the sqlalchemy.url option in your CKAN configuration file and set the correct password, database and database user.
```
sudo nano /etc/ckan/default/production.ini
```

## SolR
* Install Solr (check no errors after installing it)
```
service apache2 stop
sudo apt-get install solr-jetty
service apache2 start
```

* Edit the Jetty configuration file and change the following variables:
```
sudo nano /etc/default/jetty8

NO_START=0            # (line 4)
JETTY_HOST=<IP_ADDRESS>  # (line 16) Had to change to the actual server IP to work
JETTY_PORT=8983       # (line 19)
```

* Replace the default schema.xml file with a symlink to the CKAN schema file included in the sources.
```
sudo mv /etc/solr/conf/schema.xml /etc/solr/conf/schema.xml.bak
sudo ln -s /usr/lib/ckan/default/src/ckan/ckan/config/solr/schema.xml /etc/solr/conf/schema.xml
sudo service jetty8 restart
```

* Make adjustments to the CKAN configuration file
```
host = <IP_ADDRESS> # or the actual IP address of the server
solr_url=http://<IP_ADDRESS>:8983/solr # or the actual IP address of the server
ckan.site_id = default
ckan.site_url = http://demo.ckan.org  # # or the actual IP address AND port number of the server (if development)
```

* Initialize your CKAN database
```
sudo ckan db init -c /etc/ckan/default/production.ini
```

## CREATING A SYSADMIN USER
* Activate virtual environment and move into the CKAN source directory
```
. /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/ckan
```
* Install paster, if needed.  In order to run paster, the flag —-plugin=ckan is needed. Create a sysadmin user:
```
paster --plugin=ckan sysadmin add john<EMAIL_ADDRESS>name=john -c /etc/ckan/default/production.ini
```

## LAUNCHING CKAN INSTANCE
* Activate and go into virtual environment and
```
paster --plugin=ckan serve --reload /etc/ckan/default/production.ini
```

# EXTENSIONS (in progress)

## FILESTORE AND FILE UPLOADS
* Create the directory where CKAN will store uploaded files:
```
sudo mkdir -p /var/lib/ckan/default
```

* Add the following line to your CKAN config file, after the [app:main] line:
```
ckan.storage_path = /var/lib/ckan/default
```

* Set the permissions of your ckan.storage_path directory. For example if you’re running CKAN with Apache, then Apache’s user (www-data on Ubuntu) must have read, write and execute permissions for the ckan.storage_path:
```
sudo chown www-data /var/lib/ckan/default
sudo chmod u+rwx /var/lib/ckan/default
```

## DATAPUSHER (http://docs.ckan.org/projects/datapusher/en/latest/)
* If you installed CKAN via a package install, the DataPusher has already been installed and deployed for you.

* In order to tell CKAN where this webservice is located, the following must be added to the [app:main] section of your CKAN configuration file (generally located at /etc/ckan/default/production.ini):

```
ckan.datapusher.url = http://<IP_ADDRESS>:8800/ # Actual server IP address
```

* Add datapusher to the plugins in your CKAN configuration file:
```
ckan.plugins = <other plugins> datapusher
```

* Restart Apache
```
sudo service apache2 restart
```

## DATASTORE (http://docs.ckan.org/en/latest/maintaining/datastore.html)

* Add the datastore plugin to your CKAN config file:
```
ckan.plugins = datastore
```

* The DataStore requires a separate PostgreSQL database to save the DataStore resources to.
* Create a database_user called datastore_default. This user will be given read-only access to your DataStore database in the Set Permissions step below:
```
sudo -u postgres createuser -S -D -R -P -l datastore_default
```

* Create the database (owned by ckan_default), which we’ll call datastore_default:
```
sudo -u postgres createdb -O ckan_default datastore_default -E utf-8
```

* Uncomment the ckan.datastore.write_url and ckan.datastore.read_url lines in your CKAN config file. Replace pass with the passwords you created for your ckan_default and datastore_default database users.
```
ckan.datastore.write_url = postgresql://ckan_default:pass@localhost/datastore_default
ckan.datastore.read_url = postgresql://datastore_default:pass@localhost/datastore_default
```

* Set permissions. Once the DataStore database and the users are created, the permissions on the DataStore and CKAN database have to be set.

```
sudo ckan datastore set-permissions -c /etc/ckan/default/development.ini | sudo -u postgres psql --set ON_ERROR_STOP=1
```

* Testing the set-up. This should return a JSON file (change the IP and port number accordingly)
```
curl -X GET "http://<IP_ADDRESS>:5000/api/3/action/datastore_search?resource_id=_table_metadata"
```

## EMAIL
* If by any reason an email has to be sent from CKAN, the smpt sever has to bet set. (https://github.com/ckan/ckan/blob/master/doc/maintaining/email-notifications.rst#id12)
Change in the [app:main] part of the configuration file (Gmail not recommended for production sites)

contact_us.email =<EMAIL_ADDRESS>smtp.server = smtp.gmail.com:587
smtp.starttls = True
smtp.user = theckanuser
smtp.password = theckanpassworkd
smtp.mail_from =<EMAIL_ADDRESS>contact_us.email =<EMAIL_ADDRESS>
## YYC CKAN EXTENSION
* All extra code and templates for the YYC Data Collective project are stored  in the ckanext-yycdatacollective extension
```
cd /usr/lib/ckan/default/src
git clone https://github.com/mat3rial-dev/ckanext-yycdatacollective.git
cd ckanext-yycdatacollective
pip install -r requirements.txt
python setup.py develop
```
* Add it to plugins in CKAN config file
```
ckan.plugins = ... yycdatacollective
```

## DUMPING AND LOADING DATABASES TO/FROM A FILE (http://docs.ckan.org/en/latest/maintaining/database-management.html)
PostgreSQL offers the command line tools ```pg_dump``` and ```pg_restore``` for dumping and restoring a database and its content to/from a file.

Before you can run CKAN for the first time, you need to run db init to initialize your database (you can do the same with development):
```
. /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/
paster --plugin=ckan db init -c /etc/ckan/default/production.ini
```

You also can delete everything in the CKAN database, including the tables, to start from scratch:
```
paster --plugin=ckan db clean -c /etc/ckan/default/production.ini
```

To create a dump
```
sudo -u postgres pg_dump --format=custom -d ckan_default > ckan.dump
```
Then restore it again:
```
paster --plugin=ckan db clean -c /etc/ckan/default/production.ini # initialize the database
sudo -u postgres pg_restore --clean --if-exists -d ckan_default < ckan.dump
```

* Sometimes it is needed to rebuild the search index in order to display all data imported
```
paster --plugin=ckan search-index rebuild -c /etc/ckan/default/development.ini
```

## HARVESTING EXTENSION (https://github.com/ckan/ckanext-harvest)
*  Install Redis
```
sudo apt-get update
sudo apt-get install redis-server
```

* On your CKAN configuration file, add in the [app:main] section:
```
ckan.harvest.mq.type = redis
```

* Activate CKAN virtual environment and install the ckanext-harvest package
```
. /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/

pip install --upgrade pip
pip install -e git+https://github.com/ckan/ckanext-harvest.git#egg=ckanext-harvest
```

* Install the python modules required by the extension (adjusting the path according to where ckanext-harvest was installed in the previous step):
```
cd /usr/lib/ckan/default/src/ckanext-harvest/
pip install -r pip-requirements.txt
```

* Add the harvest main plugin, as well as the harvester for CKAN instances, in the CKAN config file. If logging wants to be seen, add them to the config file
```
ckan.plugins = harvest ckan_harvester

ckan.harvest.log_scope = 0
ckan.harvest.log_level = debug # or info
```

* Run the following command to create the necessary tables in the database (ensuring the pyenv is activated):
```
paster --plugin=ckanext-harvest harvester initdb --config=/etc/ckan/default/production.ini
```

* Sometimes it is needed to rebuild the search index in order to display all data;
```
paster --plugin=ckan search-index rebuild -c /etc/ckan/default/development.ini
```

* Restart CKAN to have the changes take affect:
```
sudo service apache2 restart
```

* To launch harvest, go to virtual environment
```
. /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/ckan
```

* Before creating the job you need to have the two necessary processes (gather
and fetch) running for this to work. The easiest way to do that is to open
a up a couple of terminals and start the processes run gather_consumer and fetch_consumer (https://lists.okfn.org/pipermail/ckan-dev/2016-February/009673.html)
```
paster --plugin=ckanext-harvest harvester gather_consumer --config=/etc/ckan/default/production.ini
paster --plugin=ckanext-harvest harvester fetch_consumer --config=/etc/ckan/default/production.ini
```

* In a production environment, supervisor can be set up in order to run these processes, instead. See https://github.com/ckan/ckanext-harvest#setting-up-the-harvesters-on-a-production-server

* Finally, run the harvesting
```
paster --plugin=ckanext-harvest harvester run --config=/etc/ckan/default/production.ini
```

* Harvest sources are not deleted from the database (even if they are deactivated as a source). In such case, they have to be purged from the database (http://docs.ckan.org/en/latest/maintaining/paster.html). For doing so:
```
paster --plugin=ckan dataset list -c /etc/ckan/default/production.ini # lists all datasets
paster --plugin=ckan dataset purge [dataset_id|dataset_name] -c /etc/ckan/default/production.ini # removes the dataset
```

## DCAT HARVESTER (https://github.com/ckan/ckanext-dcat)
- Install the extension on your virtualenv and install the extension requirements:
```
(pyenv) $ pip install -e git+https://github.com/ckan/ckanext-dcat.git#egg=ckanext-dcat
(pyenv) $ pip install -r ckanext-dcat/requirements.txt
```

- Enable the required plugins in your ini file:
```
ckan.plugins = dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface structured_data
```
- At this point, CKAN will not start and the console will display the error:
```
IOError: [Errno 13] Permission denied: u'/usr/lib/ckan/default/src/ckan/ckan/public/base/i18n/ca.js'
```
- As a momentary fix (linked to issue #5)
```
sudo chmod -R 777 /usr/lib/ckan/default/src/ckan/ckan/public/base/i18n
```
## Add the harvest source in UI (or console) and choose "DCAT JSON Harvester":
http://data.calgary.ca/data.json
- Run the processes in three different consoles
```
paster --plugin=ckanext-harvest harvester gather_consumer --config=/etc/ckan/default/production.ini
paster --plugin=ckanext-harvest harvester fetch_consumer --config=/etc/ckan/default/production.ini
paster --plugin=ckanext-harvest harvester run --config=/etc/ckan/default/production.ini
```
- If the datasets were not collect, check the ckanext-harvester command line interface commands (https://github.com/ckan/ckanext-harvest#command-line-interface) to reset and launch all jobs:
```
paster --plugin=ckanext-harvest harvester sources -c /etc/ckan/default/production.ini # lists active sources
paster --plugin=ckanext-harvest harvester job-all -c /etc/ckan/default/production.ini
```

If want to delete the datasets and jobs, but NOT the sources (to re-run, for example)
```
paster --plugin=ckanext-harvest harvester clearsource [source_id|source_name] -c /etc/ckan/default/production.ini
```

## CKAN HARVEST API calls
* Actual endpoints for harvesting all datasets from OpenCalgary and YYC
```
http://data.calgary.ca/data.json
http://yycdatacollective.ucalgary.ca/api/3/action/package_search
```

## CKANEXT-VALIDATION (https://github.com/frictionlessdata/ckanext-validation)
*  Provides data validation using the ```goodtables``` library
Synchronous validation is performed at the same time a resource of the supported formats is being created or updated. Currently, if data validation errors are found, a ValidationError will be raised and you won't be able to create or update the resource.

Validation at creation or update time can be useful to ensure that data quality is maintained or that published data conforms to a particular schema.

Activate the virtualenv of ckan, then proceed to install the extension.

This extension is installed in the ```src``` directory of ckan, just as any other extension.

```
cd /usr/lib/ckan/default/src

git clone https://github.com/mat3rial-dev/ckanext-validation.git
cd ckanext-validation
pip install -r requirements.txt
python setup.py develop

# Create database tables
paster validation init-db -c /etc/ckan/default/production.ini
```

Then, adding the plugin to the ini file
```
ckan.plugins = ... validation
```

The extension requires a few other parameters added to the CKAN configuration file.

The schemas
```
scheming.dataset_schemas = ckanext.validation.examples:ckan_default_schema.json
scheming.presets = ckanext.scheming:presets.json ckanext.validation:presets.json
```

In order to have the analysis done at the moment of creating/updating a dataset (synchronous), these parameters must also be added to the ini file
```
ckanext.validation.run_on_create_sync = True
ckanext.validation.run_on_update_sync = True
ckanext.validation.run_on_create_async = False
ckanext.validation.run_on_update_async = False
```
If the opposite behaviour is wanted (asynchronous validation), the opposite flags are needed

```
ckanext.validation.run_on_create_sync = False
ckanext.validation.run_on_update_sync = False
ckanext.validation.run_on_create_async = True
ckanext.validation.run_on_update_async = True
```

license: Unlicense


text:
# Color Builder
Easily build color variations of Solarized with YAML scheme definitions and ERB templates.

I'm currently using this to generate
[parsec](https://github.com/Keithbsmiley/parsec). You could create your
own
[scheme](https://github.com/Keithbsmiley/color-builder/blob/master/schemes/parsec.yml)
though.

## Usage
    $ ./build
Build all schemes

    $ ./build default.yml
Build only the "default" theme

    $ ./build https://awesome-schemes.com/my-scheme.yml
Build a scheme from a URL (note, these are not the same as base16
schemes)

## Templates
- iTerm 2
- Vim
- Xcode

### Adding templates

- Grab the corresponding
  [solarzied](https://github.com/altercation/solarized) colorscheme and
  extract the colors out as variables. You can see some examples
  [here](https://github.com/Keithbsmiley/color-builder/tree/master/templates)
  or look at the
  [base16-builder](https://github.com/chriskempson/base16-builder/tree/master/templates)
  templates. If there isn't any difference between the solarized and
  base16 templates besides the colors than you can just grab the
  base16 version and add that.
- Otherwise create [an
  issue](https://github.com/Keithbsmiley/color-builder/issues) and I
  will get to it as soon as I have a chance.

---

This is entirely copied from
[base16-builder](https://github.com/chriskempson/base16-builder) and
[solarized](https://github.com/altercation/solarized)

repository: keith/color-builder

repo_name: keith/color-builder


text:
# What's New in Hazelcast 3.4

## Release Notes

### New Features
This section provides the new features introduced with Hazelcast 3.4 release.

- **High-Density Memory Store**: Used with the Hazelcast JCache implementation, High-Density Memory Store is introduced with this release. High-Density Memory Store is the enterprise grade backend storage solution. This solution minimizes the garbage collection pressure and thus enables predictable application scaling and boosts performance. For more information, please see [High-Density Memory Store](#high-density-memory-store).
- **Jetty Based Session Replication**: We have introduced Jetty-based web session replication with this release. This is a feature of Hazelcast Enterprise. It enables session replication for Java EE web applications that are deployed into Jetty servlet containers, without having to perform any changes in those applications. For more information, please see [Jetty Based Web Session Replication](#jetty-based-web-session-replication).
- **Hazelcast Configuration Import**: This feature, which is an element named `<import>`, enables you to compose the Hazelcast declarative (XML) configuration file out of smaller configuration snippets. For more information, please see [Composing XML Configuration](#composing-xml-configuration).

repository: totalkyos/altassian

repo_name: totalkyos/altassian


text:
# Reading the Docs

## Instructions

There are many tools that a web developer may need that are on the [MDN documentation for client-side tooling](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Understanding_client-side_tools/Overview). Select 3 tools not covered in the lesson, explain why a web developer would use it, and search for a tool that falls under this category and share its documentation. Do not use the same tool example on MDN docs.

## Rubric

Exemplary | Adequate | Needs Improvement
--- | --- | -- |
|Explained why web developer would use tool| Explained how, but not why developer would use tool| Did not mention how or why a developer would use tool  |
|Provided a similar tool with docs link| Provided a similar tool without docs link | Did not mention a similar tool or used same tool on MDN |


text:
# Basics

## PCollections

**PCollections** are potentially-distributed abstractions that represents a data set.

* A **PCpllection** is owned by a specific **Pipeline**, and cannot be shared between different Pipelines.
* The elements of a **PCollection** must all be of the same type, and that type must be encodable as a byte string (so elements can be sent to distributed workers)
* A **PCollection** has a structure that can be instrospected (like JSON, Protocol Buffer, etc).
* A **PCollection** is immutable. Each transformation creates a new one.
* **PCollections** do not support random access to individual elements.
* **PCollections** can be *bounded* or *unbounded*. Reading from a batch data source creates a *bounded* one, and reading from a streaming source (like kafka) creates a *unbounded* **PCollection**.
* Beam uses *windowing* to divide a continously updating unbounded **PCollection**. These windows are deterined by some characteristics, such as a timestamp, and aggregation transforms process this kind of **PCollection** as a sucession of finite windows.
* Every element in a **PCollection** has a timestamp. Usually, that timestamp is the time when the element was readed or loaded.

## Transforms

**Transforms** are the operations in our pipeline, that takes the following general form:

```python
[output PCollection] = [Input PCollection] | [Transform]
```

Transforms can be chained also:

```python
[Final Output PCollection] = (
    [Initial Input PCollection]
        | [First Transform]
        | [Second Transform]
        | [Third Transform]
    )
```

We can apply several **Transforms** to the same collection to create a branching pipeline.

### ParDo

Apply computations on each element of the dataset. If you want to apply a `ParDo` computation, your code should be an instace of `DoFn`, which defines a distributed function. It should follow this structure:

```python
class MyFn(beam.DoFn):
  def process(self, element):
    return iterable / yield element
```

If the elements are key-value pairs, we can use `element.getKey()` and `element.getValue()` to get them.

* **Idempotence**: Our functions may be invoked multiple times on a given worker node to ennsure for failure recovery. We should make sure the implementation does not depend on the number of invocations.
* **Immutability**: We should not modify the `element` object.

### Maps

If your `DoFn` is quite simple, you can use higher order funcitions like `Map` or `FlatMap`.

### GroupByKey

Gruops by key, and collects the values. For example, if we apply a GroupByKey to the following data

```
a, 1
b, 2
a, 3
b, 4
```

we get:

```
a, [1,3]
b, [2,4]
```

### CoGroupByKey

Applies a `GroupByKey` using data from different PCollections. The result is a dictionary with all the gruped elements per collection:

```
('a', {'singles': [4, '1'], 'couples': ['11']})
('b', {'singles': ['2'], 'couples': ['22']})
('c', {'singles': ['3'], 'couples': ['33']})
```

### Combine

Combines a set of values from a **PCollection**, given a function that defines the way to combine elements.

This function should be *asociative* and *commutative*, two basic requirements for this kind of reducing parallelizations.

As for `DoPar`, if our combining logic is complex, we can write an scpecific subclass of `beam.CombineFn`.

We can use uses `CombineGlobally` or `CombinePerKey`.

For a custom Combiner, we will need to implement four methods:

```python
class AverageFn(beam.CombineFn):
  def create_accumulator(self):
    ...

  def add_input(self, accumulator, input):
    ...

  def merge_accumulators(self, accumulators):
    ...

  def extract_output(self, accumulator):
    ...
```

### Flatten

Flatten takes a tuple of **PCollections** that stores elements of the same type and returns a single **PCollection** that contains all elements from those tuples.

repository: ivanCanaveral/apache-beam-tips

repo_name: ivanCanaveral/apache-beam-tips


text:
## Bulk Operation Executor

A `BulkOperationExecutor` is a wrapper around the main `SimpleTaskChain` for a resource operation. It is heavily used in `Bulk` operation.

Its main duty is to:
- Prepare the specific `ResourceOpContext` from the provided `BulkOpRequest.Operation`
- Trigger the task execution
- Interpret the result of execution and prepare `BulkOpResponse.Operation` for return

It is also aware of whether itself can handle the `BulkOpRequest.Operation` through the `supports(BulkOpRequest.Operation)` method.

The `DelegatingBulkOperationExecutor` contains all `BulkOperationExecutor` and delegate the work to the specific executor that can handle the input. Therefore, it provides a single point of access for service consumers for bulk operation.

repository: UMN-HKC/kumiq-identity

repo_name: UMN-HKC/kumiq-identity


text:
---
layout: single
title: "How My iPhone 4 Killed My Canon 5D Mark II: Take 2"
date: 2010-08-17 22:55
published: true
categories: [technology, photography]
tags:
- technology
- photography
---

![Canon EOS 5D Mark II](/uploads/2010/08/Canon5DMarkII.jpg)

_Note: this was originally posted [here][original-post]._

Denise and I received our iPhone 4s on Day 1. The very day we left for a long weekend at [Crater Lake][crater-lake]. And the weekend after that we spent 10 days on in [Door County][door-county]. In a typical month this year we take around 800 photos (and that is WAY down from previous years) with our Canon 5D Mark II. On vacations we typically take 1000+ photos. In comparison, in the 30 days after we had our new iPhones we took a mere 600 photos, even though we took TWO vacations during that timeframe! And to really drive home my point: it is August 17th and we have taken a meager 43 photos this month with the DSLR. Why?

## The iPhone 4 has killed my Canon 5D Mark II

The camera in the previous iPhone versions were absolutely horrible, so I barely used it. I was happy to carry around our beast of a DSLR. I feel I have carried our camera gear further than most people will walk their entire lives. (Oddly, the most grueling experience was not hiking the Grand Canyon rim-to-rim in a day, but walking around Washington D.C. on a HOT, HUMID 4th of July a few years back.) So size and weight has never been a deterrent for me. However...

## The camera in the iPhone 4 changed my mind.

Given the fantastic camera (still and HD video) the iPhone 4 possesses, I have now found myself not touching our Canon 5D Mark FOR WEEKS! This has not happened since we got our first DSLR (Canon D30) back in 2001. Before the iPhone 4, it would be rare that I would go more than 1-2 days without picking up our DSLR…and NEVER more than 3 days.

I have very mixed feelings about this change. While I like the freedom of not always lugging around a gigantic camera bag, I miss the mindset of shooting with a DSLR. In all honesty, considering most of our photos for the past few years have been of Bryce, the quality of the iPhone 4 photos is fine. This photo of Bryce is really the only time I wished I had used our DSLR instead. On the flip side though, who's to say I would have even captured it if I was trying to shoot with a bulky DSLR? Or that I even need a beefy DSLR?

That's been my observations and experiences thus far. I'm really not sure where I'm really at with all this, but my guess is this…with the release of the iPhone 4 I now have another fantastic tool to capture moments in time. However, with this power comes an even bigger challenge: CHOICE.

[crater-lake]: http://bbohling.com/?sort=&search=crater+lake "My photos of Crater Lake I posted on Posterous Spaces"
[door-county]: http://bbohling.com/?sort=&search=door+county "My Door County posts on Posterous"
[original-post]: /2010/08/my-iphone-4-killed-my-canon-5d-mark-ii "Original post"


text:
# Jubakit Documentation

To build the document:

```
pip install Sphinx sphinx_rtd_theme
./build.sh
```

Note that all jubakit dependency modules (currently `tweepy` and `jq`) must be installed to build a complete document.

repository: vishalbelsare/jubakit

gha_language: Python

repo_name: vishalbelsare/jubakit


text:
# sesa - Secure Enclave powered SSH Agent

> **WARNING:** my lack of objective-c experience is only rivaled by my lack of macOS API experience, be warned, this code may not work the way you expect it to, or I intend it to.

Usage should be pretty straight forward:

```
./sesa -sock ~/sesa.sock &
export SSH_AUTH_SOCK=~/sesa.sock
ssh roland@somewhere
```

Both `sesa` and `sesa-tool` need to be `codesign`d with entitlements in order to work, otherwise `amfid` and `taskgated-helper` will just kill them. They both require at least the `com.apple.application-identifier` and `keychain-access-groups` entitlements set. The signing cert and entitlements values will need to match an installed provisioning profile.

This is a one trick pony, if you still want to use your system SSH agent, i.e. because you want to use the keys in `~/.ssh`, you'll need to figure that out yourself. You'll probably want to do something like defining per-host agents using `IdentityAgent` in your SSH config.

## Managing SE keys

Apple doesn't provide an easy way to manipulate the contents of the enclave. I've written a small(ish) tool to add/list/delete keys for use with `sesa`, which is in `sesa-tool/`. Once built and signed, it can be used to generate keys and will output the SSH public key format expected for `authorized_keys` files.

```
$ sesa-tool generate -key-label se-ssh-key
```

repository: rolandshoemaker/sesa

repo_name: rolandshoemaker/sesa


text:
ledger-LIFO
============
Trivial Last In First Out (LIFO) tracker with transfer function.

## Usage

     const LedgerLIFO = require('ledger-lifo');
     var myLIFO = new LedgerLIFO();
     var acct1 = '12345'; //acct identifiers can be any string allowed as an object property name
     var acct2 = '67890';
     var acct3 = '71337';
     // all properties except f (from acct) and t (to acct) are tracked
     // it is up to the developer to choose properties to track, give them meaning, and decide when to override a property
     myLIFO.transfer({f:acct1, t:acct2, v:100, unitcost:3});
     myLIFO.transfer({f:acct1, t:acct2, v:300, unitcost:5});
     // myLIFO.accounts[acct2] === [{v:300, unitcost:5}, {v:100, unitcost:3}]
     myLIFO.transfer({f:acct2, t:acct3, v:350});
     // myLIFO.accounts[acct2] === [{v:50, unitcost:3}]
     // myLIFO.accounts[acct3] === [{v:50, unitcost:3}, {v:300, unitcost:5}]

## Copyright and License

The MIT License (MIT)
Copyright (c) 2016 Paul Brewer, Economic & Financial Technology Consulting LLC<EMAIL_ADDRESS>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

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

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: DrPaulBrewer/ledger-lifo

repo_name: DrPaulBrewer/ledger-lifo


text:
# Change Log

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

## [6.0.3](https://github.com/pattern-lab/patternlab-node/compare/v6.0.2...v6.0.3) (2023-03-12)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [6.0.1](https://github.com/pattern-lab/patternlab-node/compare/v6.0.0...v6.0.1) (2023-02-01)

### Bug Fixes

* **twig engine:** startup and running problems ([#1478](https://github.com/pattern-lab/patternlab-node/issues/1478)) ([e5a1904](https://github.com/pattern-lab/patternlab-node/commit/e5a19049f083315939406677b1c0480f4b420569))

# [6.0.0](https://github.com/pattern-lab/patternlab-node/compare/v5.17.0...v6.0.0) (2023-01-31)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.17.0](https://github.com/pattern-lab/patternlab-node/compare/v5.16.4...v5.17.0) (2022-09-25)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.16.4](https://github.com/pattern-lab/patternlab-node/compare/v5.16.2...v5.16.4) (2022-09-23)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.16.2](https://github.com/pattern-lab/patternlab-node/compare/v5.16.1...v5.16.2) (2022-02-07)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.16.1](https://github.com/pattern-lab/patternlab-node/compare/v5.16.0...v5.16.1) (2022-01-29)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.16.0](https://github.com/pattern-lab/patternlab-node/compare/v5.15.7...v5.16.0) (2022-01-29)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.15.7](https://github.com/pattern-lab/patternlab-node/compare/v5.15.6...v5.15.7) (2021-12-07)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.15.6](https://github.com/pattern-lab/patternlab-node/compare/v5.15.5...v5.15.6) (2021-12-07)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.15.5](https://github.com/pattern-lab/patternlab-node/compare/v5.15.3...v5.15.5) (2021-12-06)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.15.4](https://github.com/pattern-lab/patternlab-node/compare/v5.15.3...v5.15.4) (2021-12-06)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.15.3](https://github.com/pattern-lab/patternlab-node/compare/v5.15.2...v5.15.3) (2021-11-21)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.15.2](https://github.com/pattern-lab/patternlab-node/compare/v5.15.1...v5.15.2) (2021-11-03)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.15.1](https://github.com/pattern-lab/patternlab-node/compare/v5.15.0...v5.15.1) (2021-10-16)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.15.0](https://github.com/pattern-lab/patternlab-node/compare/v5.14.3...v5.15.0) (2021-07-01)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.14.3](https://github.com/pattern-lab/patternlab-node/compare/v5.14.2...v5.14.3) (2021-05-17)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.14.2](https://github.com/pattern-lab/patternlab-node/compare/v5.14.1...v5.14.2) (2021-03-28)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.14.1](https://github.com/pattern-lab/patternlab-node/compare/v5.14.0...v5.14.1) (2021-02-19)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.14.0](https://github.com/pattern-lab/patternlab-node/compare/v5.13.3...v5.14.0) (2021-01-12)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.13.3](https://github.com/pattern-lab/patternlab-node/compare/v5.13.2...v5.13.3) (2020-12-17)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.13.2](https://github.com/pattern-lab/patternlab-node/compare/v5.13.1...v5.13.2) (2020-11-12)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.13.1](https://github.com/pattern-lab/patternlab-node/compare/v5.13.0...v5.13.1) (2020-09-06)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.13.0](https://github.com/pattern-lab/patternlab-node/compare/v5.12.0...v5.13.0) (2020-08-26)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.12.0](https://github.com/pattern-lab/patternlab-node/compare/v5.11.1...v5.12.0) (2020-08-09)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.11.1](https://github.com/pattern-lab/patternlab-node/compare/v5.10.2...v5.11.1) (2020-06-28)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.11.0](https://github.com/pattern-lab/patternlab-node/compare/v5.10.2...v5.11.0) (2020-06-28)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.10.2](https://github.com/pattern-lab/patternlab-node/compare/v5.10.1...v5.10.2) (2020-05-24)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.10.1](https://github.com/pattern-lab/patternlab-node/compare/v5.10.0...v5.10.1) (2020-05-09)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.10.0](https://github.com/pattern-lab/patternlab-node/compare/v5.9.3...v5.10.0) (2020-05-09)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.9.3](https://github.com/pattern-lab/patternlab-node/compare/v5.9.2...v5.9.3) (2020-05-01)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.9.2](https://github.com/pattern-lab/patternlab-node/compare/v5.9.1...v5.9.2) (2020-04-24)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.9.1](https://github.com/pattern-lab/patternlab-node/compare/v5.9.0...v5.9.1) (2020-04-24)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.9.0](https://github.com/pattern-lab/patternlab-node/compare/v5.8.0...v5.9.0) (2020-04-24)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.7.2](https://github.com/pattern-lab/patternlab-node/compare/v5.7.1...v5.7.2) (2020-03-24)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.7.1](https://github.com/pattern-lab/patternlab-node/compare/v5.7.0...v5.7.1) (2020-02-24)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.7.0](https://github.com/pattern-lab/patternlab-node/compare/v5.6.0...v5.7.0) (2020-02-17)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.6.0](https://github.com/pattern-lab/patternlab-node/compare/v5.5.0...v5.6.0) (2020-01-18)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.5.0](https://github.com/pattern-lab/patternlab-node/compare/v5.4.2...v5.5.0) (2019-12-19)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.4.2](https://github.com/pattern-lab/patternlab-node/compare/v5.4.1...v5.4.2) (2019-11-27)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.4.1](https://github.com/pattern-lab/patternlab-node/compare/v5.4.0...v5.4.1) (2019-11-26)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.4.0](https://github.com/pattern-lab/patternlab-node/compare/v5.3.3...v5.4.0) (2019-11-26)

### Features

* test adding cross-env to Twig Edition test ([3f8bb01](https://github.com/pattern-lab/patternlab-node/commit/3f8bb01bc4e96a0aba61c213ea1619c02593defc))

## [5.3.3](https://github.com/pattern-lab/patternlab-node/compare/v5.3.2...v5.3.3) (2019-11-22)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.3.2](https://github.com/pattern-lab/patternlab-node/compare/v5.3.1...v5.3.2) (2019-11-14)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.3.1](https://github.com/pattern-lab/patternlab-node/compare/v5.3.0...v5.3.1) (2019-11-13)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.3.0](https://github.com/pattern-lab/patternlab-node/compare/v5.2.0...v5.3.0) (2019-11-13)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.2.0](https://github.com/pattern-lab/patternlab-node/compare/v5.1.0...v5.2.0) (2019-11-12)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.1.0](https://github.com/pattern-lab/patternlab-node/compare/v5.0.2...v5.1.0) (2019-10-29)

### Features

* **config:** add new default pattern export options ([a7487a0](https://github.com/pattern-lab/patternlab-node/commit/a7487a0681cb11e6f3c5c8eaefd62e5648ad5ea3))

## [5.0.2](https://github.com/pattern-lab/patternlab-node/compare/v5.0.1...v5.0.2) (2019-10-28)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [5.0.1](https://github.com/pattern-lab/patternlab-node/compare/v5.0.0...v5.0.1) (2019-10-28)

**Note:** Version bump only for package @pattern-lab/edition-twig

# [5.0.0](https://github.com/pattern-lab/patternlab-node/compare/v3.0.0-beta.3...v5.0.0) (2019-10-25)

### Bug Fixes

* add better pre-rendering support ([8ecd615](https://github.com/pattern-lab/patternlab-node/commit/8ecd6159a89232f42e0a9dc3c688b6e21de8fc30))
* fix Twig Edition examples by adding missing Twig namespaces to config ([b4c20ef](https://github.com/pattern-lab/patternlab-node/commit/b4c20ef88ee0d3010760584c6f05ff7f92b711a6))

## [3.1.8](https://github.com/pattern-lab/patternlab-node/compare/@pattern-lab/edition-twig@3.1.7<EMAIL_ADDRESS>(2019-10-14)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [3.1.7](https://github.com/pattern-lab/patternlab-node/compare/@pattern-lab/edition-twig@3.1.6<EMAIL_ADDRESS>(2019-10-14)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [3.1.3](https://github.com/pattern-lab/patternlab-node/compare/@pattern-lab/edition-twig@3.1.2<EMAIL_ADDRESS>(2019-08-23)

**Note:** Version bump only for package @pattern-lab/edition-twig

## [3.1.2](https://github.com/pattern-lab/patternlab-node/compare/@pattern-lab/edition-twig@3.1.1<EMAIL_ADDRESS>(2019-08-23)

### Bug Fixes

* add better pre-rendering support ([8ecd615](https://github.com/pattern-lab/patternlab-node/commit/8ecd615))

## [3.1.1](https://github.com/sghoweri/patternlab-node/compare/@pattern-lab/edition-twig@3.1.0<EMAIL_ADDRESS>(2019-05-16)

**Note:** Version bump only for package @pattern-lab/edition-twig

repository: pattern-lab/patternlab-node

branch_name: refs/heads/dev

repo_name: pattern-lab/patternlab-node


text:
---
title: "Print a document in the VDI"
excerpt: ""
---
You can print any document edited in your remote application or in your VDI.

To do so, select the virtual redirected printer, available in the printers list. The output will be a PDF document that will be sent to your browser. You can then choose to store it locally or to send it to your local printer.

repository: Nanocloud/nanocloud-doc

gha_language: HTML

repo_name: Nanocloud/nanocloud-doc


text:
# webpics
Just a script to reduce the file size and adjust the format of multiple images for blogs and websites

This script takes (lists of) jpeg- and png-files as input and
- converts all images to png-files
- converts portrait format images to landscape format images by adding whitespace to the sides
- scales large images down to 1280 horizontal pixels
- compresses the file size to 800kb maximum per image

For MacOS. Needs imagemagick and pngquant but no extra python libraries (system python is enough).

repository: nklb/webpics

repo_name: nklb/webpics


text:
### Running instructions:

To run examples using maven:

* From project root directory run: `mvn clean install -Dgpg.skip`
* From `junit5-examples` directory run: `mvn clean test -DskipTests=false`

**NOTE:** The example tests contain some example failure scenarios, so you should expect `mvn test` command to fail when running these examples.

repository: noconnor/JUnitPerf

gha_language: Java

repo_name: noconnor/JUnitPerf


text:
# rmd_mass_reports
Generating mass reports using Rmarkdown in R

## Purpose
This repo describes a way how to compile many similar reports using RMarkdown in R.
Specifically, it is assumed that there's a tabular data set, where each row is a document
(eg., a mail or report to one given person),
and each column holds the variables to appear in each reports (see examples below).
In addition, a template is provided where the variables are then parsed into.
This template is built on latex, so that the output document is a pdf file.

## Installation

1. Install R
2. Install LaTeX
3. Download/clone this repo
4. Set this folder as your working directory in R (or define it as a RStudio Project)

## Usage

1. Prepare a data file `grades.csv` with the grading data, and put it in the project folder.
2. Run `render_rmd_mass_report()` in `render_rmd_mass_report.R` (it is assumed that all files are in the same folder).

## Data file

`grades.csv` is a toy data file for illustration purposes. It consists of two rows (two reports) with three variables.

You need to supply a data file; the data files stores the grading data for each student.

The data file is of type csv (use UTF-8 encoding), and the following columns are expected:

- Firstname (eg., "John", type string)
- Name (eg., "Doe", type string)
- crit1 (first grading criteria, eg., "beauty of style", type string)
- crit2
- crit3

If you need to change the number of criteria, you'll need to adapt the main R function (see below).

## Templates

### `grading_template.Rmd`

This file is a simple RMarkdown file that holds the overall document.

### `latex-header.tex`

This latex file holds the Latex backbone for the Rmarkdown template. Notice that `dummy_logo.png` is read (and assumed to be in the same folder). You'll probably don't want to adjust ist.

## Adjusting

Feel free to adjust to your needs. In many cases it may suffice not to touch the latex file. You need to make sure to change the variables in all sources:

- data file
- Rmd template
- render function `render_rmd_mass_report()` in `render_rmd_mass_report.R`

## Other stuff

`render_example_images.R` is a helper file in order to render the examples images (from pdf to png).

Some settings are tuned to German particularities. See the (yaml) header in the Rmd file for details.

## Example

![](Grading_report_for_John_Doe_asof_2018-12-19.pdf.png) ![](Grading_report_for_Ziggy_Zygote_asof_2018-12-19.pdf.png)


text:
# Introduction to Numpy and how to use it for regression

### These are useful tutorials that I do recommend following them in order

1. [Python Numpy tutorial by Stanford](http://cs231n.github.io/python-numpy-tutorial/)
2. [Matrix multiplication vs dot product](https://stackoverflow.com/questions/34142485/difference-between-numpy-dot-and-python-3-5-matrix-multiplication)
3. [How to solve linear regression soft intro](https://machinelearningmastery.com/solve-linear-regression-using-linear-algebra/)
4. [Normal equation for linear regression](https://eli.thegreenplace.net/2014/derivation-of-the-normal-equation-for-linear-regression/)
5. [Deriving Normal equation](https://ayearofai.com/rohan-3-deriving-the-normal-equation-using-matrix-calculus-1a1b16f65dda)
6. [Simple form of deriviation](https://theclevermachine.wordpress.com/2012/09/01/derivation-of-ols-normal-equations/)
7. [Matrix cookbook](http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/3274/pdf/imm3274.pdf) ** recommended **
8. [Example using Normal equation](https://datascienceplus.com/linear-regression-from-scratch-in-python/)
9. [Another way to find the regression line ](http://seismo.berkeley.edu/~kirchner/eps_120/Toolkits/Toolkit_10.pdf)
10. [A tutorial for slope and intercept calulation](https://enlight.nyc/projects/linear-regression/)
11. [A direct example for linear Regression using Scikit-learn](https://towardsdatascience.com/a-beginners-guide-to-linear-regression-in-python-with-scikit-learn-83a8f7ae2b4f)

**The next time we will visit Gradient Descent and how to use it in regression analysis plus getting familiar with metric functions**

repository: wesenu/Ismailia-school-of-AI

path: /second session/README.md

repo_name: wesenu/Ismailia-school-of-AI


text:
### Project Overview

     This series of code snippets contain data wrangling using NumPy library

### Learnings from the project

 Honed in using Numpy library

### Approach taken to solve the problem

 Solving this problem statement requires one to be familiar with NumPy library, which is quite prevalent among data science community. I referred to NumPy documentation wherever required; but mostly the exercises went smoothly.

### Challenges faced

 Like I said, NumPy is the prominent library for mathematical/ numerical applications. It is vast and there's always to learn something new while using NumPy. I referred to its documentation page wherever I wanted to recal the syntax of any functions.

### Additional pointers

 Not that I can think of.

repository: NeelkanthMehta/ga-dsmp

repo_name: NeelkanthMehta/ga-dsmp


text:
# Guillotine Cuts
This repository contains all code written for my Bachelor's Thesis at IIIT-Delhi. Currently we are trying to enumerate optimal cut sequences for Axis Parallel Rectangles. The general problem dates back to the paper [Cutting Glass](https://dl.acm.org/citation.cfm?id=336223) [Pach et al] but the specific problem we're working on is presented directly in [On Guillotine Cutting Sequences](http://drops.dagstuhl.de/opus/volltexte/2015/5291/) [Abed et al]. In particular, we want to know if one can always save Omega(n) rectangles and exactly what fraction is feasible.

## Guide

### 3 Phases

- **Generating Tree** : In this phase we enumerate a set of permutations using a Generating Tree, explained in linked paper.
- **Permutation 2 Floorplan** : We interpret the permutation as a mosaic floorplan.
- **Compute Optimal-Cut-Seq**: Finally, we compute the optimal Guillotine cut sequence on the set of rectangles.

### Run & Reference

Each folder contains a *.go* code which was/will be actually used for enumeration and a *.py* code which was written as proof of concept to iron out implementation details.

### Possible Edits

- Use **uint8** in ComputeOptimalCutSeq to reduce memory usage and improve performance.
- Use **uint8** in Generating Tree implementation, that could save memory if needed and speed up a bit.
- Instead of the *reg*, use an encoding of labels in ComputeOptimalCutSeq. This would add overhead in function but reduce size of *seq* and could potentially lead to speedup.

All points mentioned here need further analysis.

repository: sedflix/GuillotineCuts

repo_name: sedflix/GuillotineCuts


text:
# Aetherguild.net v4

Gaming guild website.

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

* Python 3.11.x (`https://www.python.org/`)
* Poetry package manager (`https://python-poetry.org/docs/#installation`)
* PostgreSQL or SQLite for database. SQLite should be fine for testing
  and development purposes. MariaDB/MySQL is not tested or supported.
* Redis 5 or later (production only, not required for development)

Installing stuff for development
--------------------------------

1. Install the dependencies and clone this project.
2. Copy `settings.py-dist` to `settings.py`. Change as needed. `settings.py` should never be added to
   git, as it may contain secrets.
3. Set up environment with poetry `poetry env use 3.11`.
4. Install packages with poetry `poetry install --no-root --sync`.
5. Make sure your database is set up and configured in settings.py, and then run database
   migrations to set up initial data `python manage.py migrate`.
6. Create a superuser so that you can access the admin `python manage.py createsuperuser`.
7. That's all. Now just start local dev server by running `python manage.py runserver`.

Note that some background operations use celery. It can be started with following:
`python -m celery -A aether worker -l info --autoscale 2,1`

Running in production
---------------------

Use uvicorn (ASGI): `uvicorn aether.asgi:application`

Deploying
---------

When deploying, the following steps need to be run:

```
python manage.py collectstatic --noinput
python manage.py compress
python manage.py migrate
```

After this, restart the WSGI/ASGI runner.

Production deps
---------------

To install in production, remember to generate a new requirements.txt file.

`poetry export --with=runtime -f requirements.txt -o requirements.txt`.

License
-------
MIT. Please refer to `LICENSE` for more information.


text:
# Happiness Case Study
## Organization
```
happiness_case_study/
    data/
        2008-2018 GWP.csv
        2008-2018 GWP.xlsx
        HappinessAlcoholConsumption.csv
        Volunteer.pdf
        WHR_2019.xlsx
        WHR_prev.xlsx
        country_lat_long.xlsx
        country_region.csv
        generosity.xls
        relig_iso.csv
    gapminder/
        Happiness_gapminder.gmstat
        gapminder_visual.csv
    World_Happiness_Report.ipynb
```

### Note:
`World_Happiness_Report.ipynb` contains all the case study content.
`Happiness_gapminder.gmstat` is a visulaization of World Happiness scores over the years(2008-2018). Line graphs for a specific countries is also available in `World_Happiness_Report.ipynb`.


text:
Flutter Services
================

This packages contains `mojom` interfaces to services associated with Flutter. Most
developers should depend on the [Flutter package](http://docs.flutter.io/flutter/services/services-library.html)
instead of using this package directly.

repository: abarth/engine

repo_name: abarth/engine


text:
# Is it possible to regain access to the wallet if the private key is lost?

No, accessing the wallet funds is only possible if the user has access to the private key.

Unstoppable is merely an interface/door that allows its users to easily interact with blockchains and cryptocurrencies operating in them.

The ability to control and spend cryptocurrency on these blockchains is done via wallet private keys which reside on Unstoppable wallets. These private keys never leave the Unstoppable wallet app and remain solely in users’ hands.

It's the responsibility of the user to keep them backed up and protected from unauthorized entities. This also means, Unstoppable is not able to:

- Recover wallet private key for the user if its lost
- Cancel user's transactions, or even know about them
- Interfere with user's tokens or access to the app in anyway


text:
Vocality Web Dashboard

## Development Setup

> npm install

Make sure to have a `.env.local` file in your root directory with the following variables set

```
VUE_APP_DISCORD_CLIENT_ID     (required for login)
VUE_APP_DISCORD_CLIENT_SECRET (required for login)
VUE_APP_YOUTUBE_API_KEY       (required for yt song search)
```

> npm start

## Selfhosting Setup

To use the dashboard for bot you need to add the vocality [music plugin](https://github.com/vocality-org/vocality/tree/master/packages/vocality-music) to your bot.

### Create a Discord App for the Dashboard

The dashboard needs access to the Discord REST Api. Therefore you need to create a Discord App for the Dashboard itself.

Discord Developer Portal: https://discordapp.com/developers/applications

-   Create a new Application
-   Navigate to the OAuth2 Section
-   Add Redirect URLs (here localhost, but replace it with your production URL)

-   Generate OAuth2 URLs for each redirect URL used with following **scopes:**
    -   identify
    -   connections
    -   guilds
-   Set the env variables `VUE_APP_DISCORD_REDIRECT_URL` and `VUE_APP_DISCORD_AUTH_URL` in `.env.production`

### Dashboard port

By default vocality-music uses port 3000 for websocket connections from the dashboard. If `process.env.PORT` is set the value of the environment variable is used instead.

-   Make sure to set `VUE_APP_SOCKET_URL=` in the `env.production` file.

### Set Dashboard Secrets

See [Development Setup](##Development-Setup) for the secrets to set in `.env.local`.

repository: vocality-org/vocality-web-dashboard

gha_language: Vue

repo_name: vocality-org/vocality-web-dashboard


text:
# cookie.js changelog

cookie.js is a micro library. That's why I've decided not to number the versions like the large libraries do. The changelog doesn't contain very minor updates that didn't change the API (like: "Added some comments."). Take a look at the [commit history](https://github.com/js-coder/cookie.js/commits/master) for a detailed list of changes.

**Thu Jul 19**

  - Added CommonJS support.
  - Added `cookie.defaults` to customize the default options.
  - Added `cookie.expiresMultiplier` so users can customize it and e.g. pass the number of minutes after that the cookie expires to `cookie.set` instead of the number of hours.
  - Added a more efficient escape method.
  - Replaced rake with grunt.
  - Replaced Google Closure Compiler with UglifyJS, because grunt ships with UglifyJS and it nearly does the same amount of compression (currently 60 bytes more than GCC when gzipped, which is fine.).

**Sat May 12**

  - Added AMD support.

**Sat May 5**

  - Added unit tests.

**Mon Apr 23**

  - Bugfix – Added escaping for the cookie key.
  - Bugfix – `cookie.remove` didn't work in IE, now it does.
  - Large parts of the `utils` methods were rewritten.

**Sat Apr 14:**

  - The `expiry` option now expects you to pass the number of days instead of the number of the seconds.

**Fri Apr 13**

  - Rewrote the code base architecture, it's a lot more efficient now.

**Tue Apr 10**

  - The Google Closure Compiler is now being used to compress the code, because it works better for cookie.js than other compressors do.
  - Added: New method `cookie.enabled` that checks if cookies are enabled.

**Tue Apr 3**

  - Major erformance optimisation for retrieving several cookies at once with `cookie.get`.

**Fri Mar 23**

  - Bugfix – The `utils.isArray` / `utils.isPlainObject` methods now work in IE.

**Thu Mar 22**

  - Published cookie.js on GitHub.


text:
# Cryo-electron tomography

Cryo-electron tomography (cryo-ET) is a 3D imaging modality with high spatial resolution and low signal to noise ratio.

A series of 2D transmission electron micrographs of a thin, vitrified specimen are recorded from different orientations are combined to produce a 3D reconstruction.

![3d reconstruction](index.assets/3d-reconstruction.png)

To correct for mechanical stage movement during imaging and beam-induced sample motion a tilt-series must be [aligned](tilt-series-alignment.md) before 3D reconstruction.

![ts-to-tomogram](index.assets/ts-to-tomogram.png)

For more info on specific aspects of cryo-ET, please check the links in the sidebar!

repository: alisterburt/teamtomo

gha_language: MATLAB

repo_name: alisterburt/teamtomo


text:
# Recoding project
    Artwork: Flur from Georg Nees

# pseudo code
    We started by drawing the canvas with the dimensions of the artwork, but duplicate it to see the artwork with more detail.
We create a function to design the retangles in a bidimensional way. So, we do it with a loop with 50 randomly positioned bricks. There is a part of the left wall that don’t have retangles, so we tried to exclude them with a if according to dimensions. The boxes are always drawn from a central point.
We do the same for the top left retangles. So, through a loop we distribute 100 bricks on the top wall, changing the coordinates.
We repeat the process for the right side and top right wall, only changing the coordinates of the image, so the retangles could be arranged in the right side of the hall.
To draw the ceiling we add a 3D, so now we have 3 dimensions (coordinates) to be represented in the ceiling. The process is almost the same but with one more coordinate. With a loop we draw the retangles only on 1/3 of the ceiling. And we do another loop to represent only 6 retangles that are on the other part of the ceiling.
The next step was to draw the grid in a bidimensional way. So we define a variable offSetX to divide the grid in 8 parts like in the original artwork.
To design longitudinal lines we use also a loop to arrange the 8 lines. So we design it like a box but only give one dimension to do a line (coordinate z) related to the depth.
To design horizontal lines, the method is the same but we deal with the coordinate x.
In the end, we know that the artwork is not centered in the middle, so with the camera we can change the perpetive of the hallway, tilting it as if we were seeing in the right corner of the hall.

repository: MargaridaN/AA-projectFinal

repo_name: MargaridaN/AA-projectFinal


text:
Com computercraft codes

How to use these scripts:

Copy script and save to your computer or turtle folder with out file format (folder: world\computer\id)

There is a text file where you can see what folder is for what (labels.txt)

VSLstAa: DoorLaser (For mining, digging turtle)

Make 1,2,X path (Width,Height,Depth)

VSLstAb: Tree Vaporizer (For felling, digging turtle)

1,X,1 tree cutter (Width,Height,Depth)

VSLstAc: (For all turtles)
How full is your turtle's inventory (returns 0-100%)

VSLstAd: (For mining turtle)
Make X, 3, X hiding cube (Width,Height,Depth)

VSLstAe: (For mining, felling, digging turtle)
Tower building script with fancy features

repository: IntSPstudio/vslst-computercraft

repo_name: IntSPstudio/vslst-computercraft


text:
## Point Triggers
Use this endpoint to obtain details on Mautic's point triggers.

```php
<?php
use Mautic\MauticApi;
use Mautic\Auth\ApiAuth;

// ...
$initAuth   = new ApiAuth();
$auth       = $initAuth->newAuth($settings);
$apiUrl     = "https://your-mautic.com";
$api        = new MauticApi();
$triggerApi = $api->newApi("pointTriggers", $auth, $apiUrl);
```

### Get Point Trigger
```php
<?php

//...
$trigger = $triggerApi->get($id);
```
```json
{
    "trigger": {
         "id": 1,
         "name": "Trigger test",
         "description": null,
         "category": null,
         "isPublished": true,
         "publishUp": null,
         "publishDown": null,
         "dateAdded": "2015-07-23T03:20:42-05:00",
         "createdBy": 1,
         "createdByUser": "Joe Smith",
         "dateModified": null,
         "modifiedBy": null,
         "modifiedByUser": null,l,
         "points": 10,
         "color": "ab5959",
         "events": {
             "1": {
                 "id": 1,
                 "type": "email.send",
                 "name": "Send email",
                 "description": null,
                 "order": 1,
                 "properties": {
                    "email": 21
                 }
             }
         }
     }
}
```
Get an individual point trigger by ID.

#### HTTP Request

`GET /points/triggers/ID`

#### Response

`Expected Response Code: 200`

See JSON code example.

**Point Trigger Properties**

Name|Type|Description
----|----|-----------
id|int|ID of the point
name|string|Name of the point
description|string/null|Description of the point
category|string|Category name
isPublished|bool|Published state
publishUp|datetime/null|Date/time when the point should be published
publishDown|datetime/null|Date/time the point should be un published
dateAdded|datetime|Date/time point was created
createdBy|int|ID of the user that created the point
createdByUser|string|Name of the user that created the point
dateModified|datetime/null|Date/time point was last modified
modifiedBy|int|ID of the user that last modified the point
modifiedByUser|string|Name of the user that last modified the point
points|int|The minimum number of points before the trigger events are executed
color|string|Color hex to highlight the lead with. This value does NOT include the pound sign (#)
events|array|Array of TriggerEvent entities for this trigger. See below.

**Trigger Event Properties**

Name|Type|Description
----|----|-----------
id|int|ID of the event
type|string|Event type
name|string|Name of the event
description|string|Description of the event
order|int|Event order
properties|array|Configured properties for the event

### List Point Triggers

```php
<?php
// ...

$triggers = $triggerApi->getList($searchFilter, $start, $limit, $orderBy, $orderByDir, $publishedOnly, $minimal);
```
```json
{
    "total": 1,
    "triggers": [
        {
            "id": 1,
            "name": "Trigger test",
            "description": null,
            "category": null,
            "isPublished": true,
            "publishUp": null,
            "publishDown": null,
            "dateAdded": "2015-07-23T03:20:42-05:00",
            "createdBy": 1,
            "createdByUser": "Joe Smith",
            "dateModified": null,
            "modifiedBy": null,
            "modifiedByUser": null,l,
            "points": 10,
            "color": "ab5959",
            "events": {
                "1": {
                    "id": 1,
                    "type": "email.send",
                    "name": "Send email",
                    "description": null,
                    "order": 1,
                    "properties": {
                        "email": 21
                    }
                }
            }
        }
    ]
}
```
#### HTTP Request

`GET /points/triggers`

**Query Parameters**

Name|Description
----|-----------
search|String or search command to filter entities by.
start|Starting row for the entities returned. Defaults to 0.
limit|Limit number of entities to return. Defaults to the system configuration for pagination (30).
orderBy|Column to sort by. Can use any column listed in the response.
orderByDir|Sort direction: asc or desc.
publishedOnly|Only return currently published entities.
minimal|Return only array of entities without additional lists in it.

#### Response

`Expected Response Code: 200`

See JSON code example.

**Properties**

Same as [Get Point Trigger](#get-point-trigger).

### Create Point Trigger
```php
<?php

$data = array(
    'name' => 'test',
    'description' => 'created as a API test',
    'points' => 5,
    'color' => '4e5d9d',
    'trigger_existing_leads' => false,
    'events' => array(
        array(
            'name' => 'tag test event',
            'description' => 'created as a API test',
            'type' => 'lead.changetags',
            'order' => 1,
            'properties' => array(
                'add_tags' => array('tag-a'),
                'remove_tags' => array()
            )
        ),
        array(
            'name' => 'send email test event',
            'description' => 'created as a API test',
            'type' => 'email.send',
            'order' => 2,
            'properties' => array(
                'email' => 1
            )
        )
    )
);

$trigger = $triggerApi->create($data);
```
Create a new point trigger.

#### HTTP Request

`POST /points/triggers/new`

**Post Parameters**

Same as [Get Point Trigger](#get-point-trigger). Point Trigger events can be created/edited via the point trigger event arrays placed in the point trigger array.

#### Response

`Expected Response Code: 201`

**Properties**

Same as [Get Point Trigger](#get-point-trigger).

### Edit Point Trigger
```php
<?php

$id   = 1;
$data = array(
    'name' => 'test',
    'description' => 'created as a API test',
    'points' => 5,
    'color' => '4e5d9d',
    'trigger_existing_leads' => false,
    'events' => array(
        array(
            'name' => 'tag test event',
            'description' => 'created as a API test',
            'type' => 'lead.changetags',
            'order' => 1,
            'properties' => array(
                'add_tags' => array('tag-a'),
                'remove_tags' => array()
            )
        ),
        array(
            'name' => 'send email test event',
            'description' => 'created as a API test',
            'type' => 'email.send',
            'order' => 2,
            'properties' => array(
                'email' => 1
            )
        )
    )
);

// Create new a point trigger of ID 1 is not found?
$createIfNotFound = true;

$trigger = $triggerApi->edit($id, $data, $createIfNotFound);
```
Edit a new point trigger. Note that this supports PUT or PATCH depending on the desired behavior.

**PUT** creates a point trigger if the given ID does not exist and clears all the point trigger information, adds the information from the request. Point Trigger events will be also deleted if not present in the request.
**PATCH** fails if the point trigger with the given ID does not exist and updates the point trigger field values with the values point trigger the request.

#### HTTP Request

To edit a point trigger and return a 404 if the point trigger is not found:

`PATCH /points/triggers/ID/edit`

To edit a point trigger and create a new one if the point trigger is not found:

`PUT /points/triggers/ID/edit`

**Post Parameters**

Same as [Get Point Trigger](#get-point-trigger). Point Trigger events can be created/edited via the point triggers event arrays placed in the point trigger array.

#### Response

If `PUT`, the expected response code is `200` if the point trigger was edited or `201` if created.

If `PATCH`, the expected response code is `200`.

**Properties**

Same as [Get Point Trigger](#get-point-trigger).

### Delete Point Trigger
```php
<?php

$trigger = $triggerApi->delete($id);
```
Delete a point trigger.

#### HTTP Request

`DELETE /points/triggers/ID/delete`

#### Response

`Expected Response Code: 200`

**Properties**

Same as [Get Point Trigger](#get-point-trigger).

### Delete Point Trigger Events

The following examples will show how to delete events with ID 56 and 59.

```php
<?php

$trigger = $triggerApi->deleteFields($triggerId, array(56, 59));
```
Delete a point trigger events.

#### HTTP Request

`DELETE /points/triggers/ID/events/delete?events[]=56&events[]=59`

#### Response

`Expected Response Code: 200`

**Properties**

Same as [Get Point Trigger](#get-point-trigger).

### Get Point Trigger Event Types
```php
<?php

$point = $pointApi->getEventTypes();
```
Get array of available Point Trigger Event Types

#### HTTP Request

`GET /points/triggers/events/types`

#### Response

`Expected Response Code: 200`

```json
{
    "eventTypes":{
        "campaign.changecampaign":"Modify contact's campaigns",
        "lead.changelists":"Modify contact's segments",
        "lead.changetags":"Modify contact's tags",
        "plugin.leadpush":"Push contact to integration",
        "email.send":"Send an email"
    }
}
```

repository: mautic/developer-documentation

gha_license_id: NOASSERTION

repo_name: mautic/developer-documentation


text:
# Tenants (`OrchardCore.Tenants`)

The `Tenants` module allows to manage tenants from the admin.

## Static File Provider Feature

This feature registers a file provider for each tenant in order to serve custom files per tenant, even if they have the same names.

Once enabled on a tenant, a folder `wwwroot` is created in the `App_Data\Sites\[Tenant]` folder. Any file that is placed in this folder will be served under the same domain and prefix as the tenant.

Any static file that is placed in the content root folder of the website will be served
first.

## robots.txt for Tenants

Static File Provider allows you to setup `robots.txt` per tenant.
To create `robots.txt` for each tenant, Place `robots.txt` under `App_Data\Sites\[Tenant]\wwwroot` folder

E.g.

`App_Data\Sites\Tenant1\wwwroot\robots.txt`

`App_Data\Sites\Tenant2\wwwroot\robots.txt`

repository: petedavis/OrchardCore

gha_language: C#

repo_name: petedavis/OrchardCore


text:
# RaffleMania
RaffleMania rails app that hosts product raffles with amazon oauth integration. RaffleMania is Rails project to fulfill project requirements at Flatiron School. Further development to be continued.

# Installation
Clone this repository and execute:

```$bundle install```

Then execute:

```$rails db:migrate```

to create the database.

Next, execute:

```$rails db:seed```

to add sample raffles to the database.

Execute:

```$rails s```

and navigate to use a local server and navigate to localhost:3000 to preview the app.

# Usage
Usage of this Rails basic CRUD app is for the sole purposes of entertainment and interacting with a raffle app.

# Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ianhutson/rafflemania. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

# License
The app is available as open source under the terms of the MIT License.

# Code of Conduct
Everyone interacting in the Rafflemania on Rails project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

repository: ianhutson/rafflemania

repo_name: ianhutson/rafflemania


text:
# Xscript
Xscript is a library meant to make it easy to start a new SPA app or convert an existing MVC project into a SPA app. Unlike the popular SPA frameworks, Xscript does not require you to write any JavaScript (unless you want to!), and does not dictate how you must structure your project.
## Getting Started
### Prerequisites
All prerequisites can be included manually or included automatically following the quick start guide
* [jQuery](https://github.com/jquery/jquery)
* [Bootstrap](https://github.com/twbs/bootstrap)
* [jQuery Validation](https://github.com/jquery-validation/jquery-validation)
* [jQuery Validation Unobtrusive](https://github.com/aspnet/jquery-validation-unobtrusive)
* [Gasparesganga jQuery Loading Overlay](https://github.com/gasparesganga/jquery-loading-overlay)
### Quick Start Guide
First, add the Xscript embedded files to your application in your startup.cs class
```csharp
using Xscript.Core;
...
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
	...
	app.UseXscript();
	...
}
...
```

Next, add the namespace to your _ViewImports.cshtml file (alternatively, you could do this in your layout page(s).

```html
...
@using Xscript.Core
...
```

Finally, add references and other required HTML to your .cshtml layout page(s). You can use the options to include different required libraries, or you can supply them yourself before calling the XScriptTags method. Make sure to include the antiforgery token if you need it to post data.

```html
...
<head>
    ...
    <environment include="Development">
        @Html.XScriptTags(Context, x =>
        {
            x.IsDevelopment = true;
            x.IncludeBootstrap = true;
            x.IncludeJQuery = true;
            x.IncludeJQueryValidation = true;
            x.IncludeJQueryValidationUnobtrusive = true;
            x.IncludeGasparesgangaJQueryLoadingOverlay = true;
            x.CacheFiles = false;
        })
        ...
        <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
        <script src="~/js/site.js" asp-append-version="true"></script>
    </environment>
    <environment exclude="Development">
        @Html.XScriptTags(Context, x =>
        {
            x.IsDevelopment = false;
            x.IncludeBootstrap = true;
            x.IncludeJQuery = true;
            x.IncludeJQueryValidation = true;
            x.IncludeJQueryValidationUnobtrusive = true;
            x.IncludeGasparesgangaJQueryLoadingOverlay = true;
            x.CacheFiles = true;
        })
        ...
        <link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
        <script src="~/js/site.js" asp-append-version="false"></script>
    </environment>
</head>
<body>
    @Html.AntiForgeryToken()
	...
</body>
...
```

Congrats, you are good to go. Check out the examples to see how you can quickly and easily start adding SPA features to your project.

### Examples
Coming soon!
## Supported Attributes
* **xref="url"** - When added to an element, it becomes an href, but will get the content with AJAX, and insert it into the page. Any content with a body tag will replace the current page's body tag and close any xmodals that are open. Any content with xmodal-open tags will create a modal and open it. Only one xmodal open at a time is supported. Any content with xtargets tags will replace any content in the current page that matches the selector.
* **xsrc="url"** - When added to an element, gets the url via AJAX, and the content is inserted into the page (similar to xref). The element does not become a clickable link, and if no xttl is specified, the xsrc will disappear after it is completed. Defaults to eagerly loading, but can be set to lazy load on scroll with xfetch attribute (not implemented yet)
* **xfetch="single item from fetch list"** - When paired with an xsrc or xref, it will cause the request to be made either eagerly when the page loads so that the result can be cached or lazily when the element is scrolled into view to aviod loading content unnecessarily.
  #### Fetch List
  * **eager** - fetches the content immediately (usually to be used for precaching)
  * **lazy** - fetches the content lazily (usually for avoiding unnecessary requests) (*not implemented yet*)

* **xttl="milliseconds"** - When paired with a xsrc, it will cause the xsrc to repeat as long as it is in the dom.
* **xdata="jquery selector"** - When paired with an xref or xsrc, adds any input elements matching the selector and the first antiforgery token in the dom, validates the inputs, and sends them with the request. This converts the request to a post.
* **xtargets="jquery selector"** - When elements with this attribute are at the root level of a document requested via an xref or xsrc, the elements will be placed into the dom where if finds elements matching the selector. If no xposition is specified it will default to replacing the targeted elements.
* **xposition="single item from positions list"** - When pair with an xtargets, this can override the default the default replace behavior to place the content in another position relative to the targeted elements.
  #### Positions List
  * **before** - places the content before the targeted element
  * **prepend** - places the content within the targeted element as the first item
  * **append** - places the content within the targeted element as the last item
  * **after** - places the content after the targeted element
  * **replace** - (default) replaces the targeted element with the content
  * **insert** - replaces the inner content of the target with the inner content of the content
  * **remove** - removes the targeted element (this ignores the content entirely)

* **xmodal-open=""** - When elements with this attribute are at the root level of a document requested via an xref or xsrc, the elements will be placed into an xmodal element and shown as a modal. Only one xmodal open at a time is supported. Elements should match the structure of a well formed bootstrap modal. Closing an xmodal, either by loading a new page, clicking an xmodal-close link, or clicking off of the modal will destroy it.
* **xmodal-close=""** - When added to an element, it becomes an href, but will close the currently opened xmodal.
## Author
[Kevin Ackerman](https://github.com/kevinarthurackerman)
## License
### [MIT](https://opensource.org/licenses/MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

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

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: bubdm/Xscript

repo_name: bubdm/Xscript


text:
# Ruby for Metadataists
## Control Flow Statements

Control flow statements structure the logical progression of a given Ruby script
or application.  Whereas variables are used to store and manipulate state, the
control flow statements permit one to express the conditions under which
variables are set and updated, as well as precisely how these variables may be
changed over time.

### Conditionals

`if`, `else`, `elsif`, and `unless` are the primary keywords through which one expresses
a conditional in Ruby.  These typically include the usage of comparison
operators:

| Operator | Usage                    |
| -------- | ------------------------ |
| `>`      | Greater than             |
| `<`      | Less than                |
| `>=`     | Greater than or equal to |
| `<=`     | Less than or equal to    |
| `==`     | Equal to                 |
| `!=`     | Not equal to             |

*Note: For the purposes of demonstrating conditionals, `puts` is a method
which prints a String.  This will be used to demonstrate that a condition is
reached.*

```ruby
my_var1 = 10

if my_var1 > 9 do
  puts "my_var1 is greater than 9"
end
```

`else` provides additional branching for cases where the initial condition is
not met:

```ruby
my_var2 = 10

if my_var2 < 9 do
  puts "my_var2 is less than 9"
else
  puts "my_var2 is greater than 9"
end
```

More conditionals may be provided using the `elsif` branching, leading to more
complex trees:

```ruby
my_var3 = 10

if my_var3 < 9 do
  puts "my_var3 is less than 9"
elsif my_var3 == 11
  puts "my_var3 is 11"
elsif my_var3 > 11
  puts "my_var3 is greater than 11"
else
  puts "my_var3 is 10"
end
```

Comparison operators are not the only operators which may be used in
conditionals, as there are also boolean operators which may be used to modify
logical statements:

| Operator | Usage       |
| -------- | ----------- |
| `&&`     | Logical AND |
| `\|\|`     | Logical OR  |

```ruby

my_var4 = 20
my_var5 = 30

if my_var4 > 10 && my_var5 < 40
  puts "my_var 4 is greater than 10 and my_var5 is less than 40"
end
```

`unless` is used as `if`, but carries with it an implied negation of a condition:

```ruby
my_var6 = 40

unless my_var6 < 40
  puts "my_var6 is 40 or greater"
end
```

The constructions for these conditionals thus far have taken a form in which
`if` is followed by a condition, with the procedure to be run, and then an `end`
 keyword.  If the procedure to be run is only a single line, however, a
single-line construction can instead be offered:

```ruby
my_var7 = 50
puts "my_var7 is greater than 40" if my_var7 > 40
```

### Iterating

Building off of what was discussed for Arrays and Hashes in the earlier
discussion addressing variables, Ruby provides language features which permits
one to sequentially process the elements of an Array, or the key/value pairs
within a Hash.

The most straightforward way of approaching this is the usage of the `each`
method on any Array:

```ruby
my_set1 = [1,2,3]

my_set1.each do |element|
  puts "This is the current element in the iteration: #{element}"
end
```

There are a number of details for this which should be noted.  Firstly, one uses
the `.` character in order to call the `each` method.  The meaning of the term
"method" and the usage of `.` will be discussed later when we provide an
overview for Classes and Objects.  Also, one uses the `do` keyword here in
 order to initiate a `block` in Ruby.  Not unlike what was seen earlier with the
`if` conditionals, within these `blocks` there are procedures which perform on
 the element within the current iteration.

The argument passed to the `block` is provided is wrapped in pipe characters
(`|`).  This may be different if one is iterating on something other than an
 Array, for example, a Hash:

```ruby
my_struct = { color: 'blue', shape: 'round' }

my_struct.each do |key, value|

  puts "This is the current key: #{key}"
  puts "This is the current value: #{value}"
end
```

For the case of Hashes, `each` uses a block which has two arguments: the key and
the value for each pair in the Hash.

An alternative notation for iterating through Hashes and Arrays is to use curly
brackets (`{}`) as opposed to the `do` and `end` keywords.  This is helpful if
the procedure within the block only consumes one line of space:

```ruby

my_set1 = [1,2,3]

my_set1.each { |element| puts "Current element: #{element}" }
```

Both approaches are valid, however the usage of curly brackets is a bit less
wieldy and more difficult to read.

One may also control iterations using the `next` keyword in order to
handle certain conditions:

```ruby
my_set1 = [1,2,3]

my_set1.each do |element|
  next if element == 2
  puts "This is the current element in the iteration: #{element}"
end
```

In this example, if the current element is `2`, then the iteration will skip to
the next element without any further procedures.

#### Transformations and Filters

There also exist in Ruby methods which can be called on entire Arrays which
either transform or filter the elements of the Array.  Specifically, these are
the methods `map`, `select`, and `reject`:

```ruby
my_set2 = [4,5,6]
my_new_set = my_set2.map { |element| element + 3 }
```

As one can observe above, `map` provides one with the ability to use a block in
order to modify the value of each element in the Array.  The output of the Array
will be the elements after they have been modified by the block.

While `map` consistently generates an output Array equal in length to the input
Array, the filter methods `select` and `reject` may generate an Array of lesser
length:

```ruby
my_set3 = [14,15,16]
my_new_set = my_set3.select { |element| element < 16 }
```

In this example, the output Array generated only contains elements which are
less than 16.  `reject` performs a similar function, but instead uses negation
for expressions which evaluate to `true`:

```ruby
my_set3 = [14,15,16]
my_new_set = my_set3.reject { |element| element >= 16 }
```

For this case, any element which is greater than or equal to 16 will be filtered
out of the output Array.

### Loops

Ruby also offers features supporting loops for iterating through a sequence of
values offered by an Array or Hash.  These use the `while` and `until` keywords:

```ruby
i = 0

while i < 10
  i = i + 1
end
puts "The loop has finished"
```

As was the case with `if` and `unless`, `until` provides an implicit negation of
a condition which would normally be provided to `while`:

```ruby
i = 0

until i >= 10
  i = i + 1
end
puts "The loop has finished"
```

In both of these examples, the loop is executed until the condition provided to
`while` or `until` is fulfilled.  Here, the variable `i` is incremented by `1`
until it is equal to `10`.


text:
---
layout: post
title: "Regarding The State of the World in June 2020"
date: 2020-06-05
tags: [reflections]
---

My thoughts are effectively summed up by this video [here](https://www.youtube.com/watch?v=i_FE78X-qdY). Hasan does a far better job articulating things than I could hope to in a blog post and what needs to be done for there to be meaningful change.

**Do what he says in the video if you care about meaningful change.**