text:
---
path: '/interning-in-sf-week-5'
title:  "Roadtripping to LAKE TAHOE"
tag: 'Travel'
published: true
date: '2017-07-05'
---

It's tough to believe that the 4th of July has already come and gone and that I've been at my internship for 5 and 1/2 weeks (?!!).

![food bank](foodbank.jpg)
#### Volunteering at the [SF Marin Food Bank](https://www.sfmfoodbank.org/)

Last week flew by. It was a great week, but the trip to Lake Tahoe with my lovely roommates was easily the highlight.

## Tahoe
On Friday we (the majority of my roommates and I) rushed home from work to pack, which in my case means tossing a random amount of clothing into a backpack and hoping for the best.  We promptly packed ourselves, along with a few days worth of food into a rented 15 person van.

The drive down took us about 5 hours due to holiday traffic and a stop at In-N-Out.  It was my first time at an In-N-Out and personally I'd say it lived up to the hype.

![Van](van.jpg)

By the time we arrived at our [rented cabin](https://www.booking.com/hotel/us/wildwood-tahoe-vista-lodge-tahoe-vista.html#tab-main), most of us (especially me) were ready to pass out.  I found a place to sleep and passed out almost immediately.

The next morning I got up early and mixed up a 4x batch of Smitten Kitchen's [Lazy Pizza Dough](https://smittenkitchen.com/2013/10/lazy-pizza-dough-favorite-margarita-pizza/) before anyone else was up.

![Cabin](cabin.jpg)

Sitting on our porch, journaling and dazing off into the woods made me realize how key it is to get out of the city once in awhile.  I love living in the city. But, at least for me there is something absolutely essential and rejuvenating about spending time in nature, not surrounded by millions of other humans.

Before long, a crew of people were awake.  We made plans, grabbed a quick breakfast and were on our way to hike the [Tahoe Rim Trail](https://www.alltrails.com/trail/us/nevada/tahoe-rim-trail-trt-tahoe-meadows-to-twin-lakes).

![Tahoe Rim Trail](./view.jpg)
#### Overlook on the Tahoe Rim Trail

![selfie](selfie.jpg)

We really had no idea where we were going when we started, but ended up making it to twin lakes, a surprisingly empty clearing in the woods with only one lake (still not quite sure how it got it's name).

![hiking](hiking.jpg)

![hand stand at twin lakes](handstand.jpg)
#### Twin Lakes Celebratory Handstand

The hike was about 8 miles round trip with some pretty steep hills on the way up.  Needless to say we were feeling pretty accomplished and had worked up quite the appetite by the time we got back to where we started.

Luckily [Tunnel Creek Cafe](http://tunnelcreekcafe.com/) was waiting for us at the bottom.  Their turkey pesto panini definitely earned my personal recommendation.

![Friends](hike_crew.JPG)

![More Friends](hike_friends.jpg)

Our five sweaty bodies piled into an Uber and headed back to the cabin to meet up with the rest of the group.

I swear every time I take an Uber, my mind is still blown away by the fact that it works.  It sounds silly to say that, but it really is kind of incredible.

Lake Tahoe Fun Facts (provided by our Uber driver):
* It is the 2nd largest alpine lake in the world
* At 9 feet deep and below, the temperature is a constant 33 °F
* The maximum depth was measured at 1645 ft

Back at the cabin we changed into swimsuits, caked on as much sunscreen as we could bear, and climbed back in the van to head to [Sand Harbor](http://parks.nv.gov/parks/lake-tahoe-nevada-state-park).  I'll let the pictures speak for themselves here.

![rocks and people](rock_crew.jpg)

![rocks](rocks.JPG)

The night came to a close with pizza, champagne, and most of us passed out before midnight after a long day.  The next morning we snuck in a few more hours lounging and kayaking at King's Beach before starting the long drive home.

![pizza](pizza.jpg)
#### Smitten Kitchen never disappoints

![everyone](everyone.jpeg)
#### I don't live with ALL of these people....just most of them.

I am so thankful to have had the chance to go on this trip and I can only hope I'll be back sometime in the nearish future.

Thank you so much to everyone who helped plan the trip and make it happen, as well as all of the wonderful people that came and made the trip special.

_____

That's all for today.  I hope you enjoyed the slightly less serious, more picture heavy post.  I'll be back with a weekly update on Sunday.

repository: twmilli/my-blog

repo_name: twmilli/my-blog


text:
# vitruvius [![Build Status](https://travis-ci.org/thomashuston/vitruvius.svg?branch=master)](https://travis-ci.org/thomashuston/vitruvius) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/5prw8lfj8vvetdp7/branch/master?svg=true)](https://ci.appveyor.com/project/thomashuston/vitruvius/branch/master) [![npm version](https://badge.fury.io/js/vitruvius.svg)](http://badge.fury.io/js/vitruvius)

Master builder for [Lerna](https://lernajs.io/) projects.

- Transpile source code with Babel, excluding tests
- Copy non-JS assets to the output directory

<img src="docs/img/vitruvius.png" width="100">

## Getting Started

Install vitruvius using `npm`:

```sh
npm install --save-dev vitruvius
```

Next add a simple `npm` script to run vitruvius:

```json
"scripts": {
    "build": "vitruvius build --src src --dest lib"
}
```

Now, running `npm run build` will look in the `src` directory of each package in your project and output the compiled code in a `lib` folder in each package.

## Usage

```sh
vitruvius build --src <srcDirName> --dest <destDirName> [--ignore <fileGlobPatterns>]
```

`src` (required) is the name of the source directory within each package.

`dest` (required) is the name of the output directory you want to create in each package.

`ignore-packages` (optional) is an array of glob patterns for packages to ignore.

`ignore-files` (optional) is an array of glob patterns for files and directories to ignore. By default, `*.test.js`, `*.spec.js`, `**/__tests__/**`, and `**/__mocks__/**` are ignored.

As a point of reference, let's consider this standard Lerna project:

```
my-lerna-repo/
  packages/
    package-1/
      src/
        index.spec.js
        index.js
      package.json
    package-2/
      src/
        data.json
        index.js
      package.json
```

Let's say we want to compile the source code in `package-1` and `package-2` into a `lib` folder.

To do this, we can run `vitruvius build --src src --dest lib`. This will Babel compile the source code, copy any non-JS files, and ignore test files.

After building, our project now looks like this:

```
my-lerna-repo/
  packages/
    package-1/
      lib/
        index.js
      src/
        index.spec.js
        index.js
      package.json
    package-2/
      lib/
        data.json
        index.js
      src/
        data.json
        index.js
      package.json
```

As you can see, `package-1/src/index.js` has been compiled into `package-1/lib/index.js`, while `package-1/src/index.spec.js` was ignored. And `package-2/src/data.json` was copied over to `package-2/lib/data.json`, along with `package-2/src/index.js` being compiled to `package-2/lib/index.js`.

license: MIT

repository: thomashuston/vitruvius

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: thomashuston/vitruvius


text:
OpenWayback overlay for National Library of Finland
===================================================

(C) 2015 University of Helsinki (National Library of Finland)

Author: Ilja Sidoroff (firstname.lastname at* helsinki.fi)

This is an example of maven overlay project for customizing
OpenWayback interface. You can use this as a starting point to a real
overlay.

Installation
------------

This overlay requires maven and Java 7.

Use maven to build the package:

    $ mvn clean install

Resulting war-file should be build to ``target`` directory.

Testing
-------

Use maven jetty-plugin for testing:

   $ mvn jetty:run

This will lauch a Jetty instance listening which you can access with url

   http://localhost:8080/wayback

Customising OpenWayback
-----------------------

For fuller treatment, see OpenWayback wiki: https://github.com/iipc/openwayback/wiki/Creating-a-WAR-overlay

Basic steps:

 * Select OpenWayback version in `pom.xml` in dependecy section with artifactId `openwayback-webapp`

 * Replace files in OpenWayback with their customized versions in this
   project, to their corresponding file paths, for example, if you
   want to replace index-page, put your customized index.jsp into
   directory `src/main/webapp` (see the example)

TODO
----

* provide example for using wayback.properties for configuration
* provide custom collection example
* example of UI properties

[1] https://github.com/iipc/openwayback

repository: NatLibFi/openwayback-overlay-example

repo_name: NatLibFi/openwayback-overlay-example


text:
---
layout: default
---

# 1993-09-21 - remailer ideas

## Header Data

From: "L. Detweiler"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 19b535e97d7bef9820ae93c0c03b26c1d1364c23a1f022c779aaa5664b5c50bd

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-09-21 07:42:55 UTC

Raw Date: Tue, 21 Sep 93 00:42:55 PDT

## Raw message

```
{% raw  %}From: "L. Detweiler"<EMAIL_ADDRESS>Date: Tue, 21 Sep 93 00:42:55 PDT
To<EMAIL_ADDRESS>Subject: remailer ideas
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

T.C. May requests information on operator's remailer policies. I would
like to go a step further and suggest that *all* operators
*standardize* on a single email address for policy queries, in
ping-like fashion. the user just sends mail to<EMAIL_ADDRESS>and gets back the policies. Of course, maybe that's not the best name,
because some names are fixed. So maybe a standard header field request syntax.

This sheet returned should include all the information about headers
and cryptographic use, too. I would like it to have *standard headings*
across remailers. That is, it would list categories and the variations
that the particular remailer implements. His list of points is a good
place to start of policy headings. Off the top of my head -

remailer address
header syntax
how to cut and paste headers
pitfalls
cryptography support
additional features
oversight & logging

etc.

I'd also like some *history* of the remailer. Whose code is it based
on? what modifications have been added? how reliable is it? -- even a
standard `uptime field' or `% lost messages' would be interesting. are
there any `close calls' in shutting it down? what kind of support does
the operator enjoy? (e.g. sysadmin, student acct, etc.)

If anyone would like to come up with a comprehensive `boilerplate'
document, that'd certainly be useful.

I think all this could increase the `userfriendliness' of the remailers
and ultimately there use signficantly. just a humble suggestion from a
fellow cypherpunk.

{% endraw %}
```

## Thread

+ Return to [September 1993](/archive/1993/09)

+ Return to "["L. Detweiler" <ld231782@longs.lance.colostate.edu>](/authors/l_detweiler_ld231782_at_longs_lance_colostate_edu_)"

+ 1993-09-21 (Tue, 21 Sep 93 00:42:55 PDT) - remailer ideas - _"L. Detweiler"<EMAIL_ADDRESS>

gha_license_id: MIT


text:
---
layout: post
title: Identify up/down trends in historical stock data
image: /public/img/gmt.jpg
color: '#949667'
tags: [Trading]
---

## Identify up/down trends in historical stock data
* This script is part of a research project about applying machine learning in trading algorithm.
* Identifying up/down trends is necessary for collecting training data in this project, I hope it could help with some other projects.
* I used quadratic polynomial regression to smooth the historical data and identify the trend.
* The result is not bad, but still needs to be improved, and since I used regression, the result may not be highly precise.

```python
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
from pandas.tseries.offsets import *
import numpy as np
import scipy
import pandas.io.data as web
import datetime
import seaborn as sns
import pylab
from pandas.tseries.offsets import *
pylab.rcParams['figure.figsize'] = (10.0, 8.0)
sns.set_style("darkgrid")
```

```python
#read historical data from google finance
start = datetime.datetime(2014, 1, 1)
end = datetime.datetime(2017, 1, 27)
history=web.DataReader('JD','google',start,end)['Close']
```

## polynomial regression
Here I used `np.polyfit` to do the quadratic polynomial regression, which returns three coefficients, then use `np.poly1d` to build a formula based on the coefficients.

```python
#get the formula
f=np.polyfit(x=np.arange(20),y=history[0:20].values,deg=2)
print("coefficients: ",f)
f= np.poly1d(f)

#use formula to calculate regression line
xnew = np.arange(0, 19, 0.1)
ynew=f(np.arange(20))

plt.plot(np.arange(20),history[0:20].values,'o', np.arange(20),ynew, '-')
```

    coefficients:  [ -0.03872693   1.03380417  20.59913636]

![png](https://raw.githubusercontent.com/YichengPu/YIchengPu.github.io/master/public/img/id_trends/1.png)

## Identify trends in one period
After we get the regreesion line, since the first coefficient is negative, we know in this period the up trend comes before the down trend, then by finding the maximum of historical data, we split this period into two trends.(red for up and green for down)

```python
#find the maximum
p=([i for i, j in enumerate(history[0:20]) if j == max(history[0:20])])[0]

plt.plot(np.arange(20),history[0:20].values,'o', np.arange(20),ynew, '-')
plt.axvspan(0, p+1, alpha=0.4, color='red')
plt.axvspan(p+1, 19, alpha=0.4, color='green')
```

![png](https://raw.githubusercontent.com/YichengPu/YIchengPu.github.io/master/public/img/id_trends/2.png)

## Main part
* First we need to set a window size to split the historical data into smaller periods.
* Then we can treat each small periods like we did above.
* We store the results in "trend" list.

```python
#set up the window size
min_window=5

#Initialize,q_fit is used to store the regression line.
d=min_window
prev_d=0
trend=np.zeros(len(history))
q_fit=np.zeros(len(history))

#Loop through all small periods
while d<(len(history)-min_window):
    # polynomial regression
    x=np.arange(min_window)
    y=history[prev_d:d].values
    fit=np.polyfit(x=x,y=y,deg=2)
    formula= np.poly1d(fit)
    q_fit[prev_d:d]=formula(x)

    #split
    if fit[0] >0:
        point=([i for i, j in enumerate(y) if j == min(y)])[0]+prev_d
        trend[prev_d:point+1]=-1
        trend[point+1:d]=1
    else:
        point=([i for i, j in enumerate(y) if j == max(y)])[0]+prev_d
        trend[prev_d:point+1]=1
        trend[point+1:d]=-1
    prev_d=d
    d+=min_window

#This part does the same thing as the procedure in loop for the very small end period (less than window size)
d-=min_window
remain_d=len(history)-d
x=np.arange(remain_d)
y=history[d:len(history)].values
fit=np.polyfit(x=x,y=y,deg=2)
formula= np.poly1d(fit)
q_fit[d:len(history)]=formula(x)
if fit[0] >0:
    point=([i for i, j in enumerate(y) if j == min(y)])[0]+prev_d
    trend[d:point+1]=-1
    trend[point+1:len(history)]=1
else:
    point=([i for i, j in enumerate(y) if j == max(y)])[0]+prev_d
    trend[d:point+1]=1
    trend[point+1:len(history)]=-1
```

## Plot

```python
# we plot the historical price, regression line and trend line.
plt.plot(q_fit[0:100])
plt.plot(history.values[0:100],color='blue')
plt.plot(trend[0:100])

# Fill the vertical area in each trend
ps=-1
lp=0
for i, j in enumerate(trend):
    if i<100:
        if i<len(trend)-1:
            if ps==-1 and j == 1:
                    plt.axvspan(lp, i-1, alpha=0.4, color='green')
                    lp=i-1
                    ps=1
            if ps==1 and j==-1:
                    plt.axvspan(lp, i-1, alpha=0.4, color='red')
                    lp=i-1
                    ps=-1
        else:
                if ps==1:
                    plt.axvspan(lp, i-1, alpha=0.4, color='green')
                if ps==-1:
                    plt.axvspan(lp, i-1, alpha=0.4, color='red')

```

![png](https://raw.githubusercontent.com/YichengPu/YIchengPu.github.io/master/public/img/id_trends/3.png)


text:
# wise men, advisor

## Definition:

The term “wise men” simply means people who are wise. In the Bible, however, the term “wise men” often refers to men with unusual knowledge and abilities who served in a king’s royal court as advisors to the king or other high officials.

### Old Testament

* Sometimes the term “wise men” is explained in the text as “prudent men” or “men with understanding.” This refers to men who act wisely and righteously because they obey God.
* The “wise men” who served pharaohs or other kings were often scholars who studied the stars, especially looking for special meanings for the patterns that the stars made in their positions in the sky. Sometimes “wise men” also practiced divination of performed acts of magic, probably by the power of evil spirits.
* Often wise men were expected to explain the meanings of dreams. For example, King Nebuchadnezzar demanded that his wise men describe his dreams and tell him what they meant, but none of them was able to do this, except Daniel who had received this knowledge from God.

### New Testament

* The group of men who came from eastern regions to worship Jesus were called “magi,” which is often translated as “wise men,” since this probably refers to scholars who served a ruler of an eastern country.

## Translation Suggestions:

* Depending on the context, the term “wise men” could be translated using the term “wise” or with a phrase such as “gifted men” or “educated men” or some other term that refers to men who have an important job working for a ruler.
* When the term “wise men” simply means people who are wise, the word “wise” should be translated in the same or similar way to how it is translated elsewhere in the Bible.

(See also: [Babylon](../names/babylon.md), [Daniel](../names/daniel.md), [divination](../other/divination.md), [magic](../other/magic.md), [Nebuchadnezzar](../names/nebuchadnezzar.md), [ruler](../other/ruler.md), [wise](../kt/wise.md))

## Bible References:

* [1 Chronicles 27:32-34](rc://en/tn/help/1ch/27/32)
* [Daniel 2:1-2](rc://en/tn/help/dan/02/01)
* [Daniel 2:10-11](rc://en/tn/help/dan/02/10)

## Word Data:

* Strong’s: [[H2445]], [[H2450]], [[H3778]], [[H3779]], [[G04680]]

repository: mandolyte/uw-obsidian

branch_name: refs/heads/main

repo_name: mandolyte/uw-obsidian


text:
---
id: 174
title: Pro Tips for Grad Students in Statistics/Biostatistics (Part 1)
date: 2012-06-18T16:21:00+00:00
author: Admin
tumblr_simplystatistics_permalink:
  - http://simplystatistics.tumblr.com/post/25368234643/pro-tips-for-grad-students-in-statistics-biostatistics
tumblr_simplystatistics_id:
  -<PHONE_NUMBER>3
dsq_thread_id:
  - 935202359
categories:
  - Uncategorized
tags:
  - advice
  - data analysis
  - pro tips
  - reproducible research
  - sensible models
slug: "pro-tips-for-grad-students-in-statistics-biostatistics-2"
---

  I just finished teaching a Ph.D. level applied statistical methods course here at Hopkins. As part of the course, I gave one “pro-tip” a day; something I wish I had learned in graduate school that has helped me in becoming a practicing applied statistician. Here are the first three, more to come soon.

  1. A major component of being a researcher is knowing what’s going on in the research community. Set up an RSS feed with journal articles. Google Reader is a good one, but there are others. Here are some good applied stat journals: Biostatistics, Biometrics, Annals of Applied Statistics…
  2. Reproducible research is a hot topic, in part because a couple of high-profile papers that were disastrously non-reproducible (see “Deriving chemosensitivity from cell lines: Forensic bioinformatics and reproducible research in high-throughput biology”). When you write code for statistical analysis try to make sure that: (a) It is neat and well-commented - liberal and specific comments are your friend. (b)That it can be run by someone other than you, to produce the same results that you report.
  3. In data analysis - particularly for complex high-dimensional
    data - it is frequently better to choose simple models for clearly defined parameters. With a lot of data, there is a strong temptation to go overboard with statistically complicated models; the danger of overfitting/ over-interpreting is extreme. The most reproducible results are often produced by sensible and statistically “simple” analyses (Note: being sensible and simple does not always lead to higher prole results).

repository: rbind/simplystats

gha_language: HTML

repo_name: rbind/simplystats


text:
# Resize LVM

Refer to [url](http://rabexc.org/posts/resizing-filesystem)

- Become root with `su`
- Identify the partition to extend with `fdisk -l`
- use `pvcreate` to make that partition usable (e.g. `pvcreate /dev/nvme0n1p3`)
- check that the space is now usable `pvs`
- then extend the LV with `lvextend -L +10G /dev/lvmpool/root`
- check that its worked with `vgs`
- now run `resize2fs -p /dev/mapper/lvmpool-root` to make the changes stick
- `df -h` to see the changes or `dmesg` to see the changes taken effect

repository: danielmichaels/databank

gha_language: Python

repo_name: danielmichaels/databank


text:
# Essay Proposal: Maven and Its Handling of Build Dependencies
**Team Members:** Sandro Lockwall Rhodin<EMAIL_ADDRESS>and Aristotelis Kotsias<EMAIL_ADDRESS>
**Description of the Topic:**
The essay will give an insight into Maven as a DevOps tool. The main points that will be addressed in the essay are:

* Introduction to Build Tools
* Relation to DevOps
* Definition of Build dependencies
* Structure of the Maven Build dependencies
* The Maven repository
* Concluding points

**Sources**

https://maven.apache.org/

https://www.agilealliance.org/glossary/automated-build/

https://opensource.com/article/19/4/devops-pipeline

https://www.getzephyr.com/resources/whitepapers/using-test-automation-frameworks-speed-your-devops-delivery

https://www.baeldung.com/ant-maven-gradle

https://medium.com/@Colin_But/ant-vs-maven-vs-gradle-801fde21af80

https://link.springer.com/article/10.1007/s10664-011-9169-5

https://ieeexplore.ieee.org/abstract/document/1353230

repository: Agriad/devops-course

branch_name: refs/heads/test

repo_name: Agriad/devops-course


text:
# Authentication-sample

This project is a simple authentication system having following features:
    - Create account.
    - Login
    - Email verification of newly created account.
    - Resend email for verification.

### Tech Stack

  - Nodejs (v11.0.0)
  - Reactjs(v16.6)
  - Express(v4.x)
  - MongoDB (v3.7)

### Installation

Install the dependencies and devDependencies and start the server.
Create .env file from .env.sample for all the configurations.

```sh
$ npm install
$ cd webclient
$ npm install
```

For production environments for heroku.
Need to add .env values to heroku config else replace npm start with npm run dev
```sh
$ npm install
$ npm start
$ npm run heroku-postbuild
```

### Development
For server side development:
```sh
$ npm run dev
```

For client side development:
```sh
$ cd webclient
$ npm start
```

#### Build react code for production
For production release:
```sh
$ cd webclient
$ cd npm run build
```

### Todos

 - Better deployment options with scripts.
 - Better production configuration for node server.
 - Logout functionality.
 - Dockerize

### Demo
[Link](https://authentication-sample.herokuapp.com)

gha_language: JavaScript


text:
Javascript port of Jozef Chutka's "Lanczos Resampling With ActionScript"

Example results of script:

![alt tag](https://github.com/mudcube/Lanczos.js/blob/master/example.jpg)

Code licensed under the MIT License


text:
---
id: readme
title: FAST-DNA
sidebar_label: What is FAST-DNA
---

# FAST-DNA

An unopinionated system of components, development tools, and utilities used à la carte or as a suite to build enterprise-grade websites and applications.

## Key features & benefits

### Unopinionated

These days, there are a million and one great ways to build your next Web site or application. So, we have made being unopinionated the center of every decision made in FAST-DNA.

This principle of being unopinionated manifests in several important ways including:

* A flat component architecture that lets you compose what you need without struggling with rigid patterns and complex objects.
* Separating base components and style that supports multiple frameworks without re-writing or duplicating styles. This separation also lets you build your own styles, with your style technology of choice, without having to re-build or duplicate the base components.
* Framework agnostic tooling that lets you use our Development tools with any view framework.
* The ability to replace almost any FAST-DNA package with your package of choice. Get started with our animation or layout package and add more as you need them. Alternatively, use our suite of packages to build your next project from the ground up; it's your call.

### UI development and style guide tools

When developing components and views, excellent development tooling can make all the difference. FAST-DNA offers development and style guide tools that work with FAST components, components from other frameworks or your components.

Try out component properties with an auto-generated props UI, get a live preview of the code based on any property’s configuration, preview RTL and themes, and preview component compositing with a transparency grid.

Also, we built FAST development tools from re-usable packages so, if you have special needs, you can build your tools from the same shared libraries.

### Bring your design system

Widely available design systems from companies like Microsoft (Fluent), Google (Material), or Salesforce (Lightning) are useful when it is essential to align with a platform or take advantage of a polished system at low cost, but many companies have their design system of their own, and some may have multiple design systems or variations.

Because FAST-DNA has abstracted based components from their style, you get a head start on your design system by building on top of tried and true base components and style libraries like our offerings for color, animation, and elevation.


text:
# Nash Link checkout for Magento 2

This is a checkout plugin for magento 2. Get your online store ready to offer payments in crypto, while you receive in fiat.

## Install

You need access to you magento instance for ssh and/or ftp.

As first step you need to copy Nashlink/ plugin directory to magento code path. Most common ways are via FTP or SSH.
After that, connects via ssh or machine console to run magento install commands.

### Copy plugin files over FTP

Access your magento instance via ftp and copy Nashlink/ directory to <MAGENTO_BASE_PATH>/app/code/

### Copy plugin files over SSH

$ scp -r Nashlink <your_user>@<your_magento_ip>:<MAGENTO_BASE_PATH>/app/code/

### Install

Get terminal access to your magento instance via ssh:

$ ssh <your_user>@<your_magento_ip>

After login, run the following commands inside magento instance:

$ bin/magento setup:upgrade
$ bin/magento module:enable Nashlink_NPCheckout
$ bin/magento setup:static-content:deploy -f
$ bin/magento cache:flush

## Active Plugin

You can now activate Nashlink checkout plugin inside admin interface via  Stores->Configuration->Sales->Payment Methods

Follow the instructions on plugin configuration interface to get your store ready for Nash Link.

repository: nash-io/nashlink-plugins-and-sdks

gha_language: PHP

repo_name: nash-io/nashlink-plugins-and-sdks


text:
# Adding Cut, Copy and Paste (CCP)

So far our discussion has centered mostly around drag and drop support. However, it is an easy matter to hook up cut or copy or paste (ccp) to a transfer handler. This requires the following steps:

- Ensure a transfer handler is installed on the component.
- Create a manner by which the `TransferHandler`'s ccp support can be invoked. Typically this involves adding bindings to the input and action maps to have the `TransferHandler`'s ccp actions invoked in response to particular keystrokes.

Create ccp menu items and/or buttons. (This step is optional but recommended.) This is easy to do with text components but requires a bit more work with other components, since you need logic to determine which component to fire the action on. See
[CCP in a non-Text Component](listpaste.html) for more information.

- Decide where you want to perform the paste. Perhaps above or below the current selection. Install the logic in the `importData` method.

Next we look at a cut and paste example that feature a text component.

url: https://raw.githubusercontent.com/li-jiabao/li-jiabao.github.io/f42a68eeeb57e54b6b628030379255d9ac00b131/_drafts/BigJava/Creating a GUI With JFC Swing/Adding Cut, Copy and Paste (CCP).md

filename: Adding Cut, Copy and Paste (CCP).md


text:
# UR Online Control
### Setup Instructions w/ annotations

###### 1. Compas and Compas_Fab Installation (via Anaconda Terminal); clean install

#### Run Anaconda prompt as admin

```ruby
(base)  conda config --add channels conda-forge
#--add channels         //puts the conda-forge channel at the top of the channels priority list;
#                       //can also use --prepend; --append adds to bottom of list
#conda config --show    //will show info about conda config, including existing channels
(base)  conda remove --name your_env_name --all
#removes the environment if already exists

(base)  conda create -n your_env_name python=3.8 compas compas_fab --yes
#use newest versions instead
#--yes or -y simply skips confirmation
(base)  conda activate your_env_name
(your_env_name) python -m compas_rhino.install
#from python documentaiton: When called with -m module-name, the given module is located on the Python module path and executed as a script.
(your_env_name) python -m compas_fab.rhino.install -v 6.0
```

###### 2. Verify Installation
```ruby
(your_env_name) python
>>> import compas_fab
>>> compas_fab.__version__
'0.10.1'
>>> exit()
```

###### 3. Iron Python Installation
Install Ironpython 2.7.9. via this link: https://github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.9
> New version of IronPython is out: 2.7.10; probably unnecessary since it only adds .net support
> For Windows: use the .msi file
> For Apple: use the .pkg file

###### 4. UR Online Control Installation
Clone the current version of the ur_online_control repository onto your computer: https://github.com/augmentedfabricationlab/ur_online_control
> Clone into a git_repositories folder that you have set up, or into your project folder.
> I recommend having a folder called git_repositories (or similar) somewhere on your hard drive and downloading all git repos to that location:
Clone using Github Desktop or the terminal:
instructions 1
instructions 2: https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository

###### 5. Link Directories to Rhino Search Path
Add the directories for ur_conline_control and IronPython to Rhino: `Rhino >> EditPythonScript >> Tools >> Options >> Add to search path:`
1. Ironpython install directory, e.g. C:\Program Files\IronPython 2.7\Lib
2. ur_online_control repository or its parent directory, e.g. C:\Users\YourName\Desktop\git_repositories

###### 6. Test w/ robots:
Files are in the rhino folder of ur_online_control repo

Rhino File: ExampleRobotSimple.3dm

Grasshopper File: ExampleRobotSimple.gh
- verify which UR3 has which ip
  - toolbox one is <IP_ADDRESS>
- set the robot ip in the grasshopper script
- choose ip for server (pc) and set it as the computer's ipv4 ip under network adapter properties
- port for the robot is preset: 30002
- port for server (pc) is set to: 30003

### ur_online_control_assembly instructions

UR setup example files:
- u10e_setup_x1.3dm
- ur_online_control_assembly.ghx

**Setup / Dependency Install**

In order for them to work you’ll have to install the following:

1. Install ur_online_control and its dependencies, including compas and compas_fab, by following the readme instructions
    > ~~ATTENTION: The compas and compas_fab versions mentioned in the instructions are wrong (old). You will need to install the latest version which you can do by simply not typing a version (example: conda install compas) or using version 0.15.6 for compas and 0.11.0 for compas_fab.~~
    > When you run the compass_rhino and compass_fab.rhino installs (in python), you will need to have the anaconda prompt open as administrator, so it can make changes to your rhino folders.

2. Clone the assembly_information_model repository to your computer, from here: https://github.com/augmentedfabricationlab/assembly_information_model
    > Dependencies (compas) are already installed.

3. Make the assembly_information_model repo accessible from Rhino:
   1. `cd` to the repository directory in the Anaconda prompt
   1. ```
        pip install -r requirements-dev.txt
        invoke add-to-rhino
        pip install your_filepath_to_assembly_information_model
        ```

4. Add the src folders from each of the two repositories to your rhino paths: `Rhino >> Command:EditPythonScript >> Tools >> Options >> Module Search Paths >> Add to search path >> press Ok >> restart Rhino`


text:
# Simple Result for Dart

## Introduction

I needed a simple Result like Swift's [Result](https://developer.apple.com/documentation/swift/result).

I have seen people using [dartz](https://pub.dev/packages/dartz) with the Either type. But for me, thats not really clear and readable.

Other solutions like [result](https://pub.dev/packages/result) and [super_enum](https://pub.dev/packages/super_enum) did not fit my needs neither. So here is my solution.

This packages uses the [freezed](https://pub.dev/packages/freezed) package and adds some helper methods. Thank you for this great package!

## Installation

Add the following to you `pubspec.yaml` and replace `[version]` with the latest version:

```dart
dependencies:
  simple_result: ^[version]

```

import with

```dart
import 'package:simple_result/simple_result.dart';
```

## Usage

To create a Result use

```dart
Result<ValueType, FailureType>.success(value)
```

or

```dart
Result<ValueType, FailureType>.failure(failure)
```

You can then 'iterate' over success or failure with:

```dart
result.when(
	success(value) {
		//doSomeThing with success value
	},
	failure(failure) {
		//doSomeThing with failure
	}
);
```

You can map the Result value type with map:

```dart
Result<User, Failure>.success(user);
final stringResult = result.mapSuccesss((user) => user.username);
// stringResult is of Type Result<String, Failure>

```

You can use convenience methods on a Result

```dart
final userResult = Result<User, Failure>.success(user);
userResult.isSuccess; // -> true
userResult.success; // -> user object.
```

## Example
```dart
import 'package:simple_result/simple_result.dart';
final mySuccessResult = Result<String,Failure>.success('success value');
final myErrorResult = Result<String,Failure>.failure(MyFailure());

mySuccessResult.isSuccess // -> true
mySuccessResult.success; // -> 'success value'

final myStringResult = mySuccessResult
	.when(
		success:(value) => value.toString(),
		failure:(_) => 'ERROR');
mySuccessResult.map((value) => 'StringResult'); // maps to Result<String, Failure>()

```

see more in [example/main.dart](https://github.com/spielgestalt/simple_result/blob/master/example/main.dart)


text:
# Save and restore query plans in PostgreSQL

## Rationale

sr_plan looks like Oracle Outline system. It can be used to lock
the execution plan. It is necessary if you do not trust the planner
or able to form a better plan.

Typically, DBA would play with queries interactively, and save their
plans and then enable use of saved plans for the queries, where
predictable responce time is essential.

Then application which uses these queries would use saved plans.

## Build

This module needs to serialize and deserialize lot of structures, which
results in almost same code.

So, mako preprocessor is used to generate C files serialize.c and
deserialize.c.

If you want to modify these files, you'll needed to alter mako templates
and regenerate files, so you'll need to install mako, python >= 3.2 and
pycparser modules.

If you only have a Python you can use the virtual environment:
```bash
virtualenv env
source ./env/bin/activate
pip install -r ./requirements.txt
```

Then you need to generate C code and compile it:

```bash
make USE_PGXS=1 genparser
make USE_PGXS=1
make USE_PGXS=1 install
```

If you want to only build this module as is, pregenerated files are
provided for you, so ``make genparser`` command should be omitted.

## Installation

In your db:
```SQL
CREATE EXTENSION sr_plan;
```
and modify your postgresql.conf:
```
shared_preload_libraries = 'sr_plan.so'
```
It is essential that library is preloaded during server startup, because
use of saved plans is enabled on per-database basis and doesn't require
any per-connection actions.

## Usage

If you want to save the query plan is necessary to set the variable:

```SQL
set sr_plan.write_mode = true;
```

Now plans for all subsequent queries will be stored in the table sr_plans,
until this variable is set to false. Don't forget that all queries will be
stored including duplicates.
Making an example query:

```SQL
select query_hash from sr_plans where query_hash=10;
```

Disable saving the query:

```SQL
set sr_plan.write_mode = false;
```
Now verify that your query is saved:
```SQL
select query_hash, enable, valid, query, explain_jsonb_plan(plan) from sr_plans;

 query_hash | enable | valid |                        query                         |                 explain_jsonb_plan
------------+--------+-------+------------------------------------------------------+----------------------------------------------------
<PHONE_NUMBER> | f      | t     | select query_hash from sr_plans where query_hash=10; | Bitmap Heap Scan on sr_plans                      +
            |        |       |                                                      |   Recheck Cond: (query_hash = 10)                 +
            |        |       |                                                      |   ->  Bitmap Index Scan on sr_plans_query_hash_idx+
            |        |       |                                                      |         Index Cond: (query_hash = 10)             +
            |        |       |                                                      |

```

Note use of explain\_jsonb\_plan function, that  allows you to visualize
execution plan in the similar way as EXPLAIN command does.

In the database plans are stored as jsonb. By default, all the newly
saved plans are disabled, you need enable it manually:

To enable use of the saved plan

```SQL
update sr_plans set enable=true where query_hash=1783086253;
```

(1783086253 for example only)
After that, the plan for the query will be taken from the sr_plans.

In addition sr plan allows you to save a parameterized query plan. In
this case, we have some constants in the query that, as we know, do
not affect plan.

During plan saving mode we can mark these constants as query parameters
using a special function _p (anyelement). For example:

```SQL

=>create table test_table (a numeric, b text);
CREATE TABLE
=>insert into test_table values (1,'1'),(2,'2'),(3,'3');
INSERT 0 3
=> set sr_plan.write_mode = true;
SET
=> select a,b from test_table where a = _p(1);
 a | b
---+---
 1 | 1
(1 row)

=> set sr_plan.write_mode = false;
SET

```

Now plan for query from our table is saved with parameter. So,
if we enable saved plan in this table, this plan would be used for query
with any value for a, as long as this value is wrapped with _p()
function.

```SQL
=>update sr_plans set enable = true where quesry=
  'select a,b from test_table where a = _p(1)';
UPDATE 1
-- These queries would use saved plan

=>select a,b from test_table where a = _p(2);
 a | b
---+---
 2 | 2
(1 row)

=>select a,b from test_table where a = _p(3);
 a | b
---+---
 3 | 3
(1 row)

-- This query wouldn't use saved plan, because constant is not wrapped
-- with _p()

=>select a,b from test_table where a = 1;
 a | b
---+---
 1 | 1
(1 row)

```

license: PostgreSQL

repository: postgrespro/postgrespro

gha_language: C

repo_name: postgrespro/postgrespro


text:
# Changelog

All Notable changes to `AssetLibrary` will be documented in this file.

Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## unreleased

## 0.9.0 - 2023-08-30
-   Added: it is now possible to manage data per asset or per associated pivot record.
-   Added: You can now define additional formats in which the asset should be converted.
-   Changed: (Breaking) Rename `Thinktomorrow\AssetLibrary\AssetTrait` to `Thinktomorrow\AssetLibrary\InteractsWithAssets`.
-   Changed: Following methods are deprecated: Asset::filename(), Asset::url() and Asset::hasFile(). Use Asset::getFileName(), Asset::getUrl() and Asset::exists() instead.

## 0.8.7 - 2023-03-14

-   Fix: Detaching single asset when entity id is uuid

## 0.8.6 - 2023-03-06

-   Fix: detaching asset with entity id being uuid fails

## 0.7.6 - 2020-07-23

-   added: extra params to AddAsset and AssetUploader to allow to set custom collection and disk on the media record.

## 0.7.4 - 2020-07-23

-   changed image dimensions calculations and added getWidth and getHeight functions to asset.

## 0.7.3 - 2020-07-23

-   fixed asset deletion

## 0.7.2 - 2020-06-17

-   add support for laravel 7
-   add isused and is unused functions on asset as a shortcut to know if this asset is linked to a model.

## 0.7.1 - 2020-02-17

### Changed

-   Assetuploader base64 now requires a filename. if uploaded through addAsset a random default is chosen as filename.

## 0.7.0 - 2020-01-21

### Changed

-   Replace asset now also takes type and locale to make sure we only replace the asset we want.
-   SortAsset now also take locale and the parameters have been swapped in order.
-   Added checks for invalid parameters to assetuploader

## 0.6.6 - 2020-01-21

### Changed

-   Replace asset now also takes type and locale to make sure we only replace the asset we want. These will be required in the next major version 0.7.0

## 0.6.5 - 2019-12-17

### Changed

-   the same asset can now be uploaded to a model multiple times.

## 0.6.4 - 2019-11-29

### Changed

-   detach asset now requires type and locale so we dont remove the asset for other types/locales

## 0.6.3 - 2019-11-29

### Changed

-   the same asset can now be uploaded to a model for different types or locales

## 0.6.1 - 2019-11-06

### Fixed

-   provided fallback for getDimensions if there is no dimensions data

## 0.6.0 - 2019-11-06

### Added

-   Manipulation of assets now happens on the newly added commands: AddAsset, DeleteAsset, DetachAsset, SortAsset, ReplaceAsset
-   Added HasAsset interface to replace the HasMedia interface on the models.
-   added imagemigrate command

### Changed

-   Moved asset and assettrait to root folder
-   Moved Assetuploader to Application folder
-   Refactored the public api
-   Assettrait is now only used for accessing assets and no longer for manipulation of assets

## NEXT - 2018-07-26

### Added

-   Docs updated

## NEXT - 2018-07-24

### Added

-   The addFile and addFiles method on the assetTrait now return the added assets.
-   Filenames will now be slugified to avoid weird behaviour when accessing the files throught urls.

repository: thinktomorrow/assetlibrary

repo_name: thinktomorrow/assetlibrary


text:
---
layout: nation
title: "Scotland"
---

# Strategic prayer

- Revivals in past centuries, localized revivals of the northeast coast in 1925 and Lewis in the Hebrides in the 1950s – as well as notable missionaries such as David Livingstone, Robert Moffatt, Mary Slessor and Eric Liddell – brought blessing to Scotland and the world. May new revivals and a new wave of God’s servants make a great impact on this land; 27.5% of Scots claimed no religion in the last census.
- Scotland faces a potent cocktail of social ills. Nearly half of all children are born out of wedlock. Alcohol and drug abuse are high. The country has the inauspicious title of the worst-performing Western European nation, based on economy, employment, health and education. Increasingly, Christian groups are engaging these problems; pray that the transforming impact of the gospel may be evident through loving witness and ministry.
- Church growth is evident among the non-institutional groups – Pentecostals, Baptists, Brethren and the Salvation Army. Pray for the effective re-evangelization of Scotland.The Aberdeen area has the highest percentage of non-church-goers.

### Links

- [Slides](http://kyk.kiekies.net/?src=https://ccwaterkloof.github.io/prayer/slides/scotland.md)
- [Operation World](https://operationworld.org/prayer-calendar/12-06/)
- [Prayercast](https://prayercast.com/scotland.html)

repository: ccwaterkloof/prayer

repo_name: ccwaterkloof/prayer


text:
# VS Code Factorio Mod Debug

This is a debug adapter for developing Factorio mods. It supports breakpoints, stepping, variable access, and the debug console.

## Using Factorio Mod Debug

* Install the **Factorio Mod Debug** extension in VS Code.
* Switch to the run/debug view (View->Run) and select "create a launch.json file"
* Select the debug environment "Factorio Mod Debug".
* Adjust the paths and launch settings as required. Check Intellisense for additional launch options.
* Press the green 'play' button or F5 to start debugging.

## Enabling Debugging In Your Mod

In Factorio >=0.18.10, Instrument Mode is used by default to enable debugging automatically in control stage. Data and Settings stage hooks can be enabled in launch.json, as well as filtering which mods hooks are installed in for Control stage.

If you need to use debugging without Instrument mode, you can set `useIntrumentMode:false` in launch.json and include a require for the debugadapter at the top of the appropriate stage file (control, data, settings) while debugging:
```lua
require('__debugadapter__/debugadapter.lua')
```
Running without Instrument Mode will disable break-on-exception.

## Enabling Debugging inside Zip Files

If [Zip File Explorer](https://marketplace.visualstudio.com/items?itemName=slevesque.vscode-zipexplorer) is also installed, breakpoints and stepping will work inside zipped mods.

## Steam

If you use a Steam install, a file `steam_appid.txt` with content `427520` in the same dir as the factorio binary is required. If VSCode has write access to the dir, it will create this automatically.

## Additional Lua Diagnostics

The debugger also injects diagnostics into all hooked mods:

  * Global Assignment: A warning will be issued on the first assignment to an undefined global variable. `__DebugAdapter.defineGlobal(name)` can be used to disable this warning for the given name.

## Profiling

In Factorio >= 0.18.27, you can set `"hookMode": "profile"` to enable profiling. This mode does not provide stepping or inspection, but instead provides inline timing/hitcount data for every line and function executed in control stage. Flamegraph, higlighting and rulers are also provided to assist in finding hotspots. Mods may recognize the this mode by the presence of the global variable `__Profiler`.

The profiler also provides a remote inteface `profiler` with the following functions:

  * `dump()` - dump all timers immediately
  * `slow()` - return to slow-start mode (dumping on return from every event temporarily)
  * `save(name)` - return to slow-start mode and trigger an autosave with the given name. Defaults to "profiler" if unspecified.

## Automatic Mod Packaging and Publishing

Mods can be automatically Packaged and Published from the "Factorio Mod Packages" panel (in SCM view by default, View->Open View...-> "Factorio Mod Packages" if you can't find it). These tasks can also be accessed in VSCode's Tasks system. Custom scripts will run inside the mod directory and have the environment variables `FACTORIO_MODNAME` and `FACTORIO_MODVERSION` provided.

### Datestamp
  * if changelog.txt present and has a section for the current version, update its date to today
  * run `info.json#/package/scripts/datestamp` if set

### Compile
  Compile tasks will be automatically run when starting a debug session if defined.

  * run `info.json#/package/scripts/compile` if set

### Package
  * run `info.json#/package/scripts/compile` if set
  * run `info.json#/package/scripts/prepackage` if set
  * build a zip including all files in the mod directory except dotfiles, zip files, and files matching the list of globs in `info.json#/package/ignore`.

### Increment Version
  * increment version in info.json
  * if changelog.txt present, add new empty section to changelog.txt
  * run `info.json#/package/scripts/version` if set

### Upload
  * select a package in mod directory
  * upload to mod portal

### Publish

All-in-one command.

  * verify no uncommitted changes, on `master` (or branch set in `info.json#/package/git_publish_branch`)
  * run `info.json#/package/scripts/prepublish` if set
  * run **Datestamp**
  * git commit "preparing release of version x.y.z", tag x.y.z
  * run **Package**
  * git tag, unless `info.json#/package/no_git_tag` is set
  * run **Increment Version**
  * run `info.json#/package/scripts/publish` if set
  * commit "moved to version x.y.z"
  * push to git upstream, unless `info.json#/package/no_git_push` is set
  * upload to mod portal, unless `info.json#/package/no_portal_upload` is set
  * run `info.json#/package/scripts/postpublish` if set, with extra environment variable `FACTORIO_MODPACKAGE` with the filename of the built zip.
  * remove zip if `factorio.package.removeZipAfterPublish` is set

## JSON Validation

JSON Validation and Intellisense is provided for all of Factorio's JSON files:
  * Mod `info.json`
  * Scenario and Campaign `description.json`
  * Locale `info.json`
  * `map-settings.json`
  * `map-gen-settings.json`
  * `server-settings.json`

## Changelog support

Language support including syntax highlighting, document outline, and linting.

## Locale support
Language support including syntax highlighting and document outline.

## String Interpolation

Logpoint expressions, `__DebugAdapter.print()`,  and `__debugline` strings will evaluate expressions in `{}`. The inner expression is evaluated as lua code, and has access to all locals and upvalues at the current location (for logpoints), or members of the current object and the object itself as `self` (for `__debugline`). The expression always has access to globals. `{[}` and `{]}` can be used to emit literal `{` and `}`.

## Debug Print

The function `__DebugAdapter.print(expr,alsoLookIn)` can be used to print messages to the vscode debug console. `expr` is string interpolation expression with access to locals at the scope that calls `print()`, and fields in table-like object `alsoLookIn`. The expression `{...}` will expand to the list of the caller's varargs, if any.

## Manual Breakpoints

If normal breakpoints are unusable for some reason, you can call `__DebugAdapter.breakpoint(mesg:LocalisedString)` to break. If `mesg` is specified, it is displayed in the editor like an exception.

## Custom Debug Views

When displaying tables in the Variables window, the debugger will check for metatables, and display them as a special member `<metatable>`. The default lineitem for a table can be overridden by the metamethod `__debugline`, which can be either a string (with expressions in `{}` interpolated) or a function which takes the table as an argument and returns a string. The typename for a table can be overridden by a string in the metatable field `__debugtype`. The contents of the table can be overridden by the `__debugchildren` metamethod, which can be `false` to disable expanding children or a function which takes the table as an argument and returns `DebugAdapter.Variable[]`.

The `variables` module can be used to prepare custom expansions.
```lua
if __DebugAdapter then
  local variables = require("__debugadapter__/variables.lua")
  -- prepare debug metatables here
end
```
This provides various helper methods for preparing variable lineitems and expansions:

```lua
--- Generates a description for `value`.
--- Also returns data type as second return.
---@param value any
---@param short nil | boolean
---@return string lineitem
---@return string datatype
function variables.describe(value,short)

--- Generate a default debug view for `value` named `name`
---@param name string | nil
---@param value any
---@return Variable
function variables.create(name,value)

--- Generate a variablesReference for a table-like object
---@param table table
---@param mode string "pairs"|"ipairs"|"count"
---@param showMeta nil | boolean
---@return number variablesReference
function variables.tableRef(table, mode, showMeta)

--- Generate a variablesReference for a LuaObject
---@param luaObject LuaObject
---@param classname string
---@return number variablesReference
function variables.luaObjectRef(luaObject,classname)
```

Additionally, if using [hediet.debug-visualizer](https://marketplace.visualstudio.com/items?itemName=hediet.debug-visualizer), you can configure it to use `"context": "visualize"` to get json output on its eval requests. You must provide your own object conversions to produce objects compatible with the visualizer interface types. If the eval result has a `__debugvisualize(self)` metamethod, it will be called automatically before being converted to json.

## Ignore Functions in Stepping

Functions can be excluded from stepping with `__DebugAdapter.stepIgnore(func)` or `__DebugAdapter.stepIgnoreAll(table)`.

## Support the Debugger

[<img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi2.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com'/>](https://ko-fi.com/X8X41IE4T)

repository: treycollier/vscode-factoriomod-debug

repo_name: treycollier/vscode-factoriomod-debug


text:
# serverless-python-requirements-common-copy
A Serverless framework plugin to copy specified directory or file into artifact

*Works with [serverless-python-requirements](https://github.com/UnitedIncome/serverless-python-requirements)*

*Requires Serverless >= v1.12*

*Supported only using with [Per-function requirements](https://github.com/UnitedIncome/serverless-python-requirements#per-function-requirements)*

## Install
```
npm install --save serverless-python-requirements-common-copy
```

## Source directory structure

Same as [serverless-python-requirements](https://github.com/UnitedIncome/serverless-python-requirements)

```
├── serverless.yml
└── src
     ├── function1
     │      ├── requirements.txt
     │      └── function1.py
     ├── function2
     │      ├── requirements.txt
     │      └── function2.py
     └── function3
            ├── requirements.txt
            └── function3.py
```

## Settings

serverless.yml
```yaml
plugins:
  - serverless-python-requirements
  - serverless-python-requirements-common-copy

provider:
  # This is example
  name: aws
  profile: AWS_PROFILE_NAME
  region: ap-northeast-1
  runtime: python3.6

package:
  individually: true

custom:
  pythonRequirements:
    # This is example
    dockerizePip: true
    dockerImage: lambci/lambda:build-python3.6
    zip: false
    slim: true
  pythonRequirementsCommonCopy:
    # Put your desired directory or file
    - ./common/some_lib.py  # example of file
    - ./environments        # example of directory

functions:
  function1:
    module: src/function1
    handler: function1.lambda_handler
    pythonRequirementsCommonCopy:
      - ./key/hoge.pem  # example of file
      - ./some_dir      # example of directory
  function2:
    module: src/function2
    handler: function2.lambda_handler
    pythonRequirementsCommonCopy:
      - ./key/fuga.pem  # example of file
      - ./some_dir      # example of directory
  function3:
    module: src/function3
    handler: function3.lambda_handler
    # just omit `pythonRequirementsCommonCopy` to ignore this plugin
```

## Artifacts after packaging

Inside zip file

```
├── function1.py
├── requests             # library directory from requirements.txt
├── common
│    └── some_lib.py     # specified file by service level
├── environments         # specified directory by service level
│      ├── setting.json
│      └── secret.txt
├── key
│    └── hoge.pem        # specified file by function level
└── some_dir             # specified directory by function level
       ├── foo.py
       └── bar.py
```

## TODO

* Automatic testing

## License
MIT


text:
# RTAlpha Web

This is a react project. Before you start working on this project, please read this instruction first.

## 1. System Architecture

![System Architecture](https://github.com/shiyouping/rtalpha/blob/master/doc/architecture/web.png)

Please see the documents at [architecture](https://github.com/shiyouping/rtalpha/tree/master/doc/architecture) directory to understand the system architecture.

## 2. File Structure

Please read [How to better organize your React applications](https://medium.com/@alexmngn/how-to-better-organize-your-react-applications-2fd3ea1920f1) to understand the file structure we use for this project.

## 3. Use Absolute Paths

Absolute path import helps easier file nevigation and moving. All paths are configured to be relative to `src` in the root directory.

Do NOT do

> import MyComponent from "../../../components/my-component"

but do

> import MyComponent from "components/my-component"

## 4. React/JSX Style Guide

### 4.1. Naming Convention

#### 4.1.1. Use lowercased words and hyphen to join words for

- Directory: `image-asset`
- File: `user-service.js`
- URL: `www.rtalpha.com/user-centre`

#### 4.1.2. Use lowerCamelCase notation for

- URL query parameter: `www.rtalpha.com/user-centre?firstName=xxx`
- JavaScript Variable: `let firstName`
- Key of locale files: `errorHint: Error`

#### 4.1.3. Use uppercased words and underscore to join words for

- JavaScript constants: `THIS_IS_A_CONSTANT`

### 4.2. File Extension

Use `.js` for normal JavaScript files, and `.jsx` extension for React components, which gains additional support of plugins and editiors.

## 5. Editor Plugins

Please install the following plugins for the editor you use.

- [Babel](https://babeljs.io/docs/en/editors/) for syntax highlighting
- [ESLint](https://eslint.org/docs/user-guide/integrations) for JavaScript and JSX linting
- [Prettier](https://prettier.io/docs/en/editors.html) for code formatting (`please enable auto save feature of your editor`)
- [Styled Component Syntax Highlighting](https://www.styled-components.com/docs/tooling#syntax-highlighting) for syntax highlighting in Styled Components

## 6. Visual Studio Code

[Visual Studio Code](https://code.visualstudio.com/) is the preferred edtior. After install [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode), [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint#overview) and [Sublime Babel](https://marketplace.visualstudio.com/items?itemName=joshpeng.sublime-babel-vscode), please copy the following configurations to the project root (`DO NOT` commit them but keep them for yourself):

```json
├── .vscode
│   ├── launch.json
│   └── settings.json
├── jsconfig.json
└── src
```

- Create a file named `jsconfig.json` with content:

  ```json
  {
    "compilerOptions": {
      "target": "ES6",
      "module": "commonjs",
      "allowSyntheticDefaultImports": true,
      "baseUrl": "./src/",
      "paths": { "*": ["*"] }
    },
    "typeAcquisition": {
      "include": ["jest"]
    },
    "exclude": ["node_modules", "**/node_modules/*"]
  }
  ```

- Create two files `settings.json` and `launch.json` in directory `.vscode`:

  ```json
  {
    // This is for settings.json
    "files.associations": { "*.js": "javascriptreact" },
    "editor.formatOnSave": true
  }
  ```

  ```json
  {
    // This is for launch.json
    "version": "0.2.0",
    "configurations": [
      {
        "type": "node",
        "request": "launch",
        "name": "Debug Jest Test",
        "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/react-scripts",
        "args": ["test", "--env=jsdom", "--runInBand", "--modulePaths=src"],
        "cwd": "${workspaceFolder}",
        "console": "integratedTerminal",
        "protocol": "inspector",
        "internalConsoleOptions": "neverOpen"
      },
      {
        "type": "chrome",
        "request": "launch",
        "name": "Launch Chrome For Debug",
        "url": "http://localhost:3000",
        "webRoot": "${workspaceFolder}"
      }
    ]
  }
  ```

After the above configuration, you are encouraged to install the following plugins:

- [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
- [Git History](https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory)
- [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome)
- [Visual Studio IntelliCode](https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode)
- [Jest](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest) (for test only)

## 7. Chrome

We recommend to use Chrome with the following extensions for development:

- [Redux DevTools](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd)
- [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi)
- [Immutable.js Object Formatter](https://chrome.google.com/webstore/detail/immutablejs-object-format/hgldghadipiblonfkkicmgcbbijnpeog)

## 8. Production and Development Enviornments

`.env.development` and `.env.production` are configuration files for development and production enviornments respectively. When doing development, you should configure the right settings for it, e.g. set the right URL of API server like

> `REACT_APP_API_SERVER_URL=http://localhost:3000`

in `.env.development`

## 9. How to build a production release

Before building a new version, the production configuration must be updated in `.env.production`. After that, you can start to build using the following command:

> npm run build

This command will result in:

><EMAIL_ADDRESS>build target_path

The version, e.g. 0.9.7, in package.json will be used to build the release. After building, this version will be upgraded to a new number which is shown in the command line. `DO NOT` forget to commit package.json when the build is done.

repository: shiyouping/rtalpha

gha_language: Java

repo_name: shiyouping/rtalpha


text:
#About this repo

This repo contains **scripts** to stand up **HPE Codar Community Edition (HPE Codar CE) on Docker containers**.

HPE Codar CE contains components such as **Core Codar** running in a JBoss container, **HPE Operation Orchestration Community Edition (HP OO CE) Central Server** running on a Tomcat server and HPE Codar CE, HPE OO CE and IDM **databases** created using PostgreSQL Server.

All these **three components** will be made available on **three Docker containers** and yet connected to each other to form a single portal service.

#Concepts
HPE Codar is a **DevOps automation** tool primarily focuses on **release pipeline automation**.

This community edition of Codar helps the community users to automate deployment of complex application on a hybrid cloud environment and also it helps to **automate “Continuous Deployment and Continuous Delivery”** process.

•	Automation includes **infrastructure** provisioning, **platform software** installation or configuration, **deployment of application** on complex environment like load balancer etc.

•	Automate the end-to-end steps of your applications deployment by integrating with various **resource providers** like **VMWare vCenter, AWS, OpenStack, Docker etc. and import the intelligence from HP OO, Chef,		Puppet and HP SA** etc. to install or configure software and deploy application.

•	Allows to create **blueprints/designs** using **rich graphical designer (drag & drop)**, trigger deployments using native UI or auto-deploy using **CI tool like Jenkins, Bamboo** etc. which helps for **Continuous		Deployment**.

#Advantages you get when using HPE Codar CE 1.6

•	**Ease of automation**. Supports HPE OO CE which is  the native automation tool which helps the end user to automate any complex steps. It contains 6000+ pre-created automated operations and workflows which can be		leveraged to automate the installation of software and deployment application from day1.

•	**Integration with third party products** like **vCenter, AWS, OpenStack, Docker, Chef, Puppet and Mesosphere** etc. SDK to integrate with home grown products or any third party products

•	**20+ integration with HP Software products like HPE Sitescope, HPE Application Lifecycle Management HPE Helion Development Platform, HPE Stackato, HPE Oneview etc.**

•	Build **Cloud Agnostic blueprints** to deploy the application across different cloud vendor

•	Build **Cloud Native blueprints** to make the application components deployed as “micro-services”

•	Supports **northbound interface**

•	Complete **release gating automation** with **built-in approval mechanism**

•	**In-built versioning system** for application blue-prints and components

•	Heavy lifting is already done by the proven software **HP OO which acts as a central engine**

•	**Authentication & Authorization** supports CAC, SSO, LDAP etc.

•	**RBAC** support

#HPE Codar CE trial license limitations
1.	30 days of trial period with unlimited deployment on any number of OSI
2.	Post trail period only 5 OSI can be used

#HPE Codar CE version
```
HPE Codar CE 1.60 with Patch 1
```

#Prerequisites
1.	Set up Docker client with “docker-compose” as given in this  Docker site. [Reference Site](https://docs.docker.com/engine/installation/linux/ubuntulinux/)
2.	OS & System Requirements for Docker Client/Workstation
```
OS  : Ubuntu 12.x and above
HDD : 40GB
RAM : 8GB
CPU : 4
```

#Instructions to stand up HPE Codar CE 1.60

```

1.	Login to the registry docker.io with your username, password and email
	Command to execute: docker login docker.io

2.	Command to execute:
(If you are not creating a folder under /tmp, please make sure there is no docker-compose.yml exists in the directory before you execute the curl command to stand up HPE Codar 1.6 CE"

	•	mkdir /tmp/codar
	•	cd /tmp/codar
	•	curl -k -L https://github.com/HewlettPackard/codar-ce/raw/master/Codar16/buildEnv-dockercompose.sh | bash /dev/stdin <hostname> <ipaddress>

  Please replace the arguments as per the below instruction,
  <hostname> is the Docker workstation/client hostname
  <ipaddress> is the Docker workstation/client ipaddress

  For example, the Curl command should be as below. The hostname and ipaddress are sample
  curl -k -L https://github.com/HewlettPackard/codar-ce/raw/master/Codar16/buildEnv-dockercompose.sh | bash /dev/stdin mydockerclient.mydomain.com <IP_ADDRESS>

  Please always stop or start the containers using below commands,
  To stop: docker-compose stop
  To start: docker-compose up --no-recreate -d
  (Kindly note that docker-compose start is currently not supported)
```

#Codar Endpoints
Please find the exposed ports from which you can access various portals of Codar
```
	Codar Management Console - https://<dockerworkstaions_ip>:18444/csa

	Default Credentials
	Username: admin
	Password: cloud

	Operations Orchestration Central - https://<dockerworkstaions_ip>:18445/oo

	Default Credentials
	Username: admin
	Password: cloud
```
Important Note : Please change the password after HPE Codar CE & HP OO CE are up and running

#Documents
1.	[Concepts Guide](https://github.com/HewlettPackard/codar-ce/raw/master/Codar16/Docs/Codar_1.6_ConceptsGuide.pdf)

2.	[Help Guide](https://github.com/HewlettPackard/codar-ce/raw/master/Codar16/Docs/Codar_160_Help.pdf)

3.	[Configuration Guide](https://github.com/HewlettPackard/codar-ce/raw/master/Codar16/Docs/Codar_160_ConfigurationGuide.pdf)

4.	[API Reference Guide](https://github.com/HewlettPackard/codar-ce/raw/master/Codar16/Docs/Codar_160_API_ReferenceGuide.pdf)

5.	[QuickStart Guide](https://github.com/HewlettPackard/codar-ce/raw/master/Codar16/Docs/Codar_1.6_QuickStartGuide.pdf)

6.	[3rd Party License Guide](https://github.com/HewlettPackard/codar-ce/raw/master/Codar16/Docs/Codar_160_OS-3rdPty-License.pdf)

#Important notes

• Please read through the Codar install and configure guide for post installation steps.

  Important for Jenking-Codar integration

	1. Launch  HP OO Central portal (https://<dockerworkstaions_ip>:18445/oo)   --> content Management  -->  System Accounts --> CODAR_REST_CREDENTIALS --> provide “admin” as username and “cloud” password

	2. Go to HP OO (https://<dockerworkstaions_ip>:18445/oo) --> content Management  --> System Properties --> CODAR_REST_API --> Replace localhost:8444 with  “<<Dockerhost>>:18444” value

• HPSSO/LWSSO is not enabled. Please refer the help guide to configure HPSSO/LWSSO. Please note that, "ipaddress" is used to configure Codar

• Codar & OO are connected by Docker client machine IP with external port

• The scripts which helps for configuring the Codar will be available at the /tmp location of all the containers (please reach out to us for any enhancement on these scripts).

• Any capsule content upload which is new can be done within Docker HPE Codar CE container and no extra configurations are required. The content zip file location should be mentioned in the

	/usr/local/hp/codar/Tools/CSLContentInstaller/silent_install.xml.

	For HPE Codar CE please use silent_install_codar.xml incase if you have installed Codar license

#Jenkins Docker custom container configuration
 Use  “docker-compose.yml.jenkins” (remove .jenkins extension) to download Jenkins pre-configured with PetClinic sample app.

	1. Please modify the proxy information from /opt/apache-maven-2.2.1/conf/settings.xml inside the Jenkins Docker container and update proxy under Jenkins --> Manage Plugins --> Advanced --> Proxy Configuration

	2. Codar “cacerts” will be available once the Codar Docker containers are up and running. After you trigger the docker-compose.yml.jenkins (remove .jenkins extension) “cacerts” will be copied to “/share/cacerts”
	using Docker volume

	3. You can configure this cacerts location in the Jenkins-Codar plugin

	4. Go to Manage Jenkins Configure System Jenkins URL http://<<DOCKERHOST>>:18080/ and update the Docker host URL

	5. For any Jenkins error, please check /var/log/Jenkins/ jenkins.log

# SVN Info
To check out the SVN repo and you can use the same checked out directory to check-in designs. There is a “designs” folder which exists within this folder.
	http://<<DOCKERHOST:18081>>/svn/petclinic/branches/petclinic-sourcecode-1.60.0000

	USERNAME  : admin

	PASSWORD  : admin

#Known Issues
For product known issues, please refer Codar 1.60 Release Notes [here](https://github.com/HewlettPackard/codar-ce/raw/master/Codar16/Docs/Codar_160_ReleaseNotes.pdf).

#License
View [license](https://github.com/HewlettPackard/codar-ce/blob/master/LICENSE) information for the software contained in this repo.

#Issues
If you have any problems with or questions about the software contained in this repo, please write us to<EMAIL_ADDRESS>or [GitHub issue](https://github.com/HewlettPackard/codar-ce/issues).

repository: illsion/codar-ce

repo_name: illsion/codar-ce


text:
Description
===========
Installs qt

Requirements
============

## Platform:

* Ubuntu 10.04

Usage
=====

`recipe[qt]` Installs packages for qt development

repository: substantial/cookbook-qt

gha_language: Ruby

repo_name: substantial/cookbook-qt