text:
# External Methods

There is the WebApp app.
We call run on app.
<!--    ^^^
error: cannot resolve method 'run' in external class 'WebApp' [method.unresolved.external]
-->

# Primitive Receiver

We call foo on bar.
<!--           ^^^
error: cannot call method 'foo' on receiver of primitive type 'String' [call.receiver.primitive]
-->

We call foo on bar of moo.
<!--           ^^^
error: cannot resolve attribute or association 'bar' of primitive type 'String' [property.unresolved.primitive]
-->

## Hints

There is the PrimitiveReceiver primrec.
We call foo on primrc.
<!--           ^^^^^^
error: cannot call method 'foo' on receiver of primitive type 'String' [call.receiver.primitive]
               ^^^^^^
note: perhaps you meant to refer to 'primrec' instead of the string literal 'primrc'? [stringliteral.typo]
-->

# Mismatching Parameters and Arguments

We call foo with bar 1 and with baz "2".
<!--    ^^^
note: 'MethodsTest.foo' was first declared here [property.declaration.first]
-->

We call foo with bar 3.
<!--    ^^^
error: arguments do not match parameters of method 'MethodsTest.foo' [call.mismatch.params.args]
        ^^^
note: parameters: bar, baz [call.parameters]
        ^^^
note: arguments: bar [call.arguments]
-->

We call foo with baz "4".
<!--    ^^^
error: arguments do not match parameters of method 'MethodsTest.foo' [call.mismatch.params.args]
        ^^^
note: parameters: bar, baz [call.parameters]
        ^^^
note: arguments: baz [call.arguments]
-->

We call foo.
<!--    ^^^
error: arguments do not match parameters of method 'MethodsTest.foo' [call.mismatch.params.args]
        ^^^
note: parameters: bar, baz [call.parameters]
        ^^^
note: arguments:  [call.arguments]
-->

We call foo with bar 5 and with baz "6" and with moo 7.
<!--    ^^^
error: arguments do not match parameters of method 'MethodsTest.foo' [call.mismatch.params.args]
        ^^^
note: parameters: bar, baz [call.parameters]
        ^^^
note: arguments: bar, baz, moo [call.arguments]
-->

We call foo with baz "8" and with bar 9.
<!--    ^^^
error: arguments do not match parameters of method 'MethodsTest.foo' [call.mismatch.params.args]
        ^^^
note: parameters: bar, baz [call.parameters]
        ^^^
note: arguments: baz, bar [call.arguments]
-->

# Mismatching Parameter Types

There are the Objects o1, o2.
We call foo with bar o1 and with baz o1, o2.
<!--                 ^^
error: cannot assign argument of type 'Object' to parameter 'bar' of type 'int' [call.mismatch.type]
-->

# Incompatible Return Type

We call bar.
Bar answers with 1.

We call bar.
Bar creates the Object o1 and bar answers with o1.
<!--                                           ^^
error: cannot return expression of type 'Object' from method 'bar' with return type 'int' [call.return.type]
-->

# Invalid Answer Literal

We expect that the answer is 42.
<!--               ^^^^^^
error: answer literal cannot be used without a preceding call with a result [answer.unresolved]
-->

# Invalid Answer Literal after void Call

We call moo.
Moo answers with 1 into x.

We expect that the answer is 1.

We call voidMethod.
We write the answer into y.
<!--         ^^^^^^
error: answer literal cannot be used without a preceding call with a result [answer.unresolved]
-->

# Invalid Call Frames

(  ) barbaz writes 2 into j.
<!-- ^^^^^^
error: unknown actor 'barbaz' [frame.incompatible.actor]
     ^^^^^^
note: perhaps you did not call the method or the call was already closed? [frame.incompatible.actor.hint]
-->

We call foobar.
foobar answers with 1.

(  ) foobar writes 1 into i.
<!-- ^^^^^^
error: unknown actor 'foobar' [frame.incompatible.actor]
     ^^^^^^
note: perhaps you did not call the method or the call was already closed? [frame.incompatible.actor.hint]
-->

(  ) moobaz answers with 1.
<!-- ^^^^^^
error: unknown actor 'moobaz' [frame.incompatible.actor]
     ^^^^^^
note: perhaps you did not call the method or the call was already closed? [frame.incompatible.actor.hint]
-->

We   answer with 1.
<!-- ^^^^^^
error: cannot answer from the test method indicated by actor 'we' [answer.we]
-->

We call foo2.
We   answer with 2.
<!-- ^^^^^^
error: cannot answer from the test method indicated by actor 'we' [answer.we]
     ^^^^^^
note: perhaps you meant to write 'foo2 answers ...' instead of 'we answer ...'? [answer.we.hint]
-->

license: MIT

repository: fujaba/fulibScenarios

branch_name: refs/heads/master

extension: md

gha_language: Java

gha_license_id: MIT

license_type: permissive

repo_name: fujaba/fulibScenarios


text:
# Spatial Variance Components Analysis (SVCA)

## Dependencies

### Python
- numpy
- scipy
- pandas
- rpy2 (for the notebooks)
- limix (local version in this repository)

### R (for plotting)
- ggplot2
- reshape2
- gplots
- plyr
- pheatmap

### Others
- gcc / g++

## Installation

### Installing limix

SVCA relies on a specific version of limix found in svca_limix. You should first install this package using the setup file in svca_limix.

NB: If you are already a limix user, we recommend you install svca_limix and svca in a dedicated conda environment so there is no interference between your limix versions

```
cd svca_limix
python setup.py develop
```

### Installing svca

Then install svca
```
cd ..
cd SVCA
python setup.py develop
```

## Basic usage
### Computing spatial variance signatures for single images
Running SVCA on single image and single protein can be done as illustrated in the bash script
`SVCA/svca/run/call_run_indiv.sh`. The script calls the `run_indiv.py` script with the following inputs:
1. `data_dir='../../examples/data/IMC_example/Cy1x7/'` directory with IMC input data
2. `output_dir='./test_svca'`  the output of the analysis is saved here
3. `protein_index=23`  select the protein to be modelled
4. `normalisation='quantile'` select the normalisation method.

For the analysis of all the images and proteins we recommend to use a cluster, this is explained in the next section.

### Computing spatial variance signatures for multiple images

*NB: For data format, look at the example in the data/IMC_example directory, which should correspond to your analysis_dir folder*

We recommend using a cluster for this.
1. Adapt the file `SVCA/svca/run_cluster/run_all_cluster.py`, to the queuing system used by your cluster.
2. Your analysis directory `analysis_dir` should contain one directory per image on which you are fitting svca
3. Each image folder should contain a `positions.txt` and an `expressions.txt`. Rows are cells and columns are (x,y) coordinates for the positions and genes for the expressions, with the gene names as the header for the expression file. No header for the positions.
4. Run `python run_all_cluster.py` in the `run_cluster` directory.
5. Results are in a `results` directory in each image directory

### Visualising variance signatures
1. Adapt the file `SVCA/svca/plot_scripts/call_plot_signatures.sh`. `in_dir` should be your analysis directory and `plot_dir` the directory in which you want to save your plots.
2. run the file

### Cross validation

We recommend using a cluster for this. The procedure is the exact same procedure as the one for computing variance signatures, but the file used is `SVCA/svca/run_cluster/run_cross_validation_cluster.py`.

### Visualising cross validation results
1. Adapt the file `SVCA/svca/plot_scripts/plot_r2_cross_validation.R` (bottom). `working_dir` should be your analysis directory and `plot_dir` the directory in which you want to save your plots.
2. run the file `plot_r2_cross_validation.R`

repository: damienArnol/svca

repo_name: damienArnol/svca


text:
Android Wear Tutorial
=====================

As the name suggest this repository serves as code reference for a set of tutorials on [Android Wear][1].

Starting from a sample application running just on an handheld device, the code evolves to support and to take advantage of wearables devices.

**More about this journey at:**

1. [Introduction to Wearables][2]
2. [Landing on Wearables][3] (debugging, extending notifications)
3. [Colonizing Wearables][4] (running apps on an Android Wear)
4. [Pimp my Wear][5] (custom UI’s)
5. [Data exchange and Sync][6]
6. [Miscellaneous][7]

**A PDF that can be used as reference is available at**
[http://goo.gl/5RT8j5][8]

Developed By
============

* Simone Casagranda -<EMAIL_ADDRESS>

License
=======

    Copyright 2015 Simone Casagranda.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

[1]: http://www.android.com/wear/
[2]: https://alchemiasoft.wordpress.com/2014/12/14/introduction-to-wearables/
[3]: https://alchemiasoft.wordpress.com/2015/01/06/landing-on-wearables/
[4]: https://alchemiasoft.wordpress.com/2015/01/16/colonizing-wearables/
[5]: https://alchemiasoft.wordpress.com/2015/02/05/pimp-my-wear/
[6]: https://alchemiasoft.wordpress.com/2015/02/26/data-exchange-and-sync/
[7]: https://alchemiasoft.wordpress.com/2015/04/03/miscellaneous-part-6/
[8]: http://goo.gl/5RT8j5

repository: moidamurali/android-wear-tutorial

repo_name: moidamurali/android-wear-tutorial


text:
# text_recognition
A ROS nodelet to read and locate texts in an image

## Dependencies
object_detection_msgs
* https://github.com/yoshito-n-students/object_detection_msgs

## Default deep neural networks
If you want to use default DNNs, run the following commands to download data.
```
roscd text_recognition/data
./download_data.sh
```
Size of downloaded files would be 2-3GB in total. May take minutes or hours. If a link in the script is dead, please post an issue (with a valid link if possible).

## Nodelet: TextDetector
* former part of text recognition
* subscribe images and detect bounding boxes of word-level texts (text boxes)

### Subscribed topics
image_raw (sensor_msgs/Image)

### Published topics
image_out (sensor_msgs/Image)
* image in which text boxes are found
* never advertised and published unless ~republish_image is ture

texts_out (object_detection_msgs/Objects)

### Parameters
~republish_image (bool, default: true)
* republish image if one text box at least is detected

~architecture_file (string, default: "$(find text_recognition)/data/textbox.prototxt")\
~weights_file (string, default: "$(find text_recognition)/data/TextBoxes_icdar13.caffemodel")
* deep neural network to detect text boxes
* valid as arguments for cv::text::TextDetectorCNN::create()

~score_threshold (double, default: 0.4)\
~nms_threshold (double, default: 0.5)\
~eta (double, default: 1.0)\
~top_k (int, default: 0)
* post-filtering to suppress overlapped detection
* valid as arguments for cv::dnn::NMSBoxes()

~image_transport (string, default: "raw")

## Nodelet: WordRecognizer
* latter part of text recognition
* subscribe images and corresponding text boxes, and recognize words

### Subscribed topics
image_raw (sensor_msgs/Image)

texts_in (object_detection_msgs/Objects)
* text boxes on subscribed images
* timestamp must match that of a subscribed image

### Published topics
image_out (sensor_msgs/Image)
* image in which one word at least is recognized
* never advertised and published unless ~republish_image is ture

words_out (object_detection_msgs/Objects)

### Parameters
~queue_size (int, default: 10)
* queue size of synchronized subscriber of images and text boxes

~republish_image (bool, default: false)
* republish image if one word at least is recognized

~min_probability (double, default: 0.5)
* minimum probability of published words

~architecture_file (string, default: "$(find text_recognition)/data/dictnet_vgg_deploy.prototxt")\
~weights_file (string, default: "$(find text_recognition)/data/dictnet_vgg.caffemodel")\
~words_file (string, default: "$(find text_recognition)/data/dictnet_vgg_labels.txt")
* deep neural network to recognize a word in a text box
* valid as arguments for cv::text::OCRHolisticWordRecognizer::create()

~image_transrpot (string, default: "raw")

## Eamples
see [launch/text.launch](launch/test.launch)


text:
# tumblr-vertical
A simple Javascript file that hides the right column, widens images to take up full screen and replaces image url with raw versions. This was made for people with vertical monitors but mostly as a little project for fun.

## How to Install
1. download a Javascript injector plugin
2. paste this code on the injector and set the page it affects to https://www.tumblr.com
3. load your dashboard up on a vertical monitor and admire the large images.

repository: To-mos/tumblr-vertical-monitors

repo_name: To-mos/tumblr-vertical-monitors


text:
## DeploymentStatus v1beta1

Group        | Version     | Kind
------------ | ---------- | -----------
Extensions | v1beta1 | DeploymentStatus

> Example yaml coming soon...

DeploymentStatus is the most recently observed status of the Deployment.

Appears In  Deployment

Field        | Description
------------ | -----------
availableReplicas
 *integer* | Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
conditions
 *[DeploymentCondition](#deploymentcondition-v1beta1) array* | Represents the latest available observations of a deployment's current state.
observedGeneration
 *integer* | The generation observed by the deployment controller.
replicas
 *integer* | Total number of non-terminated pods targeted by this deployment (their labels match the selector).
unavailableReplicas
 *integer* | Total number of unavailable pods targeted by this deployment.
updatedReplicas
 *integer* | Total number of non-terminated pods targeted by this deployment that have the desired template spec.

repository: Birdrock/brodocs

gha_language: HTML

repo_name: Birdrock/brodocs


text:
# varnish-alpine-docker
![Build Status](https://api.travis-ci.org/thiagofigueiro/varnish-alpine-docker.svg)
![Docker Stars](https://img.shields.io/docker/stars/thiagofigueiro/varnish-alpine-docker.svg?link=https://hub.docker.com/r/thiagofigueiro/varnish-alpine-docker/)
![Docker Pulls](https://img.shields.io/docker/pulls/thiagofigueiro/varnish-alpine-docker.svg?link=https://hub.docker.com/r/thiagofigueiro/varnish-alpine-docker/)

A Varnish docker container based on Alpine Linux.

## Quick start
TODO

## Software
* Varnish: https://www.varnish-cache.org/docs/4.0/
* Docker Alpine 3.3: https://github.com/gliderlabs/docker-alpine
* Alpine Linux : http://www.alpinelinux.org/3.3

## Acknowledgements
* https://github.com/jacksoncage/varnish-docker

repository: skilld-labs/varnish-alpine-docker

repo_name: skilld-labs/varnish-alpine-docker


text:
---
layout: post
title: I Love, Love, Love Word Vectors!
subtitle: A simple introduction to word vectors, and how to use them
image: /img/posts/word_vectors/vectors.png
tags:
  - natural language processing
published: true
---

#### *What is this about?*
In this post, I walk through a typical workflow using word vectors to analyze unstructured text documents. I also show how a dimensionality reduction technique like TSNE can be leveraged to visualize patterns in the vector space.
#### *Why should I care?*
If you know nothing about word vectors, they may seem mysterious, complex, or even magical. While these points may be true, they are also really simple, powerful, and easy to use.

## Background
In my time as an analytics professional, I've been in a lot of conversations about how best to analyze text. The most effective -and simplest- approach often includes word vectors.

In 2013, Tomas Mikolov et al from Google made a big (lasting) splash with their introduction of the Skip-gram method for vectorizing words -*[Efficient Estimation of Word Representations in
Vector Space](https://arxiv.org/pdf/1301.3781.pdf)*- followed shortly after by their NIPS paper *[Distributed Representations of Words and Phrases and their Compositionality. ](https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf)*

Though not the first known use of word vectors, their work was seminal because of their impressive performance, and the intrigue their results generated. They demonstrate the consistent relationship between like words in vector space:

They also demonstrated the impressive learned mathematical properties of their vectors, such as this canonical example:
* `vector(king)` - `vector(man)` + `vector(woman)` ≈ `vector(queen)`

Other impressive examples include:
* `vector(copper)` - `vector(Cu)` + `vector(zinc)` ≈ `vector(Zn)`

* `vector(Einstein)` - `vector(scientist)` + `vector(Messi)` ≈ `vector(midfielder)`

Needless-to-say, since 2013, many advancements have been made in the development of word vectors, and they have been ubiquitous with the latest research in NLP. Though it is also possible to train your own custom word vectors, in this post I will demo how you can use pre-trained vectors and still get meaningful results.

## Demo
Here's a fun example from Kaggle datasets -[Women's E-Commerce Clothing Reviews.](https://www.kaggle.com/nicapotato/womens-ecommerce-clothing-reviews)This is a Women’s Clothing E-Commerce dataset revolving around the reviews written by customers. It spans over 20000 rows across 10 feature variables, including a free-form text review.

Now lets find some word vectors.  [Glove -*Global Vectors for Word Representation*-](https://nlp.stanford.edu/projects/glove/) are some of the most widely used, and they can be freely downloaded at the link above. After downloading them, we can  load them up using the python package `gensim`:

``` python
import gensim
from gensim.scripts import glove2word2vec

glove2word2vec.glove2word2vec('path/to/glove.840B.300d.txt', 'reformatted_glove_file')

model = gensim.models.KeyedVectors.load_word2vec_format('reformatted_glove_file')
```

It's generally a good idea to clean up text data before dumping it into analyses. Here I'll do some very light text cleansing:

``` python
from gensim.parsing.preprocessing import strip_punctuation, strip_multiple_whitespaces, preprocess_string

def prep_string(x):
    filters = [strip_multiple_whitespaces, strip_punctuation, str.lower]
    clean_string = preprocess_string(x, filters)
    return clean_string

df['clean_review'] = df['Review Text'].apply(prep_string)
```

Now we have reviews, which are collections of words, and we have a mapping of words to word vectors.  Our challenge is to compute a *single* vector to represent an *entire review*, so we can analyze them quantitatively. One simple and effective way to do this is by computing the average word vector of each review:

``` python
import numpy as np

def vectorize_document(document, model):
    vector_list = []
    for word in document:
        try:
            word_vector = model.get_vector(word)
            vector_list.append(word_vector)
        except KeyError:
            pass
    mean_document_vector = np.mean(np.array(vector_list), axis=0)
    return mean_document_vector

document_vectors = df['clean_review'].apply(lambda x: vectorize_document(x, model))
```

Let's wrap the results into a dataframe, and check its shape:

``` python
vec_df = pd.DataFrame(list(document_vectors))
vec_df.shape
```

`(22641, 300)`

Our resulting dataframe contains an observation for each review, and each observation spans 300 columns -the length of our input word vectors. In short, each observation in this dataframe represents the average word vector of its review. This may seem strange... ***what exactly is an average word vector*** anyway? Consider a simpler case: a vector space with 2 dimensions.  Say we have 2 observations in this 2D space -point A and point B.

The average vector representation of A and B would be a new point right between them -point C. This concept holds true in word-vector space too, only across many more dimensions.

Beyond understanding the vector space, its *still* kind of a strange concept. A word vector represents the learned semantic / syntactic meaning of a word compressed into a vector of numbers. And, we're pooling these across all the words of a given review. Though it may feel weird to compute average word vectors, the result captures the ***collective meaning*** conveyed in a review.

Now we just need a way to explore our multi-dimensional results. One strategy is to use dimensionality reduction to reduce our 300 dimension vector space to 2 dimensions, so it can be visualized.  That's what I'll do here, with [T-SNE](https://lvdmaaten.github.io/tsne/). The [scikit documentation](http://scikit-learn.org/stable/modules/generated/sklearn.manifold.TSNE.html) suggests an initial pruning of the vector space with PCA to suppress some noise and speed up the computation, so we start with that.

``` python
from sklearn.manifold import TSNE
from sklearn.decomposition import PCA

pca = PCA(n_components=50)
compressed = pca.fit_transform(vec_df)
compressed.shape
```
`(22641, 50)`

The initial PCA pruning reduces our vector space from 300 dimensions to 50.

``` python
tsne_space = TSNE(n_components=2).fit_transform(compressed)
tsne_space.shape
```
`(22641, 2)`

TSNE finishes the job, leaving us with just 2 dimensions -which can be visualized much more easily. Now to visualize and explore these results. [Bokeh](https://bokeh.pydata.org/en/latest/) is one nice option for interactive visualization that might lend to exploring our new compressed vector space.

    {% include posts/word_vectors/tsne_bokeh.html %}

The above interactive visual can be used to explore the vector space. You can observe some clear patterns, where similar reviews appear closely together. For example, the reviews for the 'Bottoms' department generally cluster together in the lower right quadrant of the plot. It may be that the embeddings are picking up on mentions of 'legs' and 'butts,' but It may also be that there is a *distinct language* which women use to talk about 'Bottoms' apparel. Take for example this review:

>*They fit snug and accentuate all the right curves. They could be shorter. The lace up sides are interesting, but i might sacrifice the lace ups for making them shorter. Actually they are cuter on in person than in this photo.*

Without a single mention of a body part or article of clothing, it is clear to me that this reviewer is talking about a pair of pants, as seems to be a pattern with this cluster of reviews. Let's consider another example from the vector space... Both the `Recommended IND` and `Rating` features also manifest an interesting visual pattern -there seems to be a unique cluster toward the middle and upper right portion of each of these tab's plot. Upon further inspection, it appears to reflect the sentiment of the reviews. Consider this example:

>*The sleeves were very tight in the upper arm area but the body was blousy, too blousy so to go up a size for the arms would mean it would be very oversized in the body. I like the fabric (nice and thick) but it did not work for me.*

>*I thought from the picture this would be a light floaty top. When it arrived, the fabric was a heavy knit and the neckline sagged very low on me (granted I'm a pear) the bottom layer hugged my tummy and rear in a very unflattering way. The only thing I liked was the color. Back it went.*

The negativity of these reviews does come out in the language. It is impressive that the word vectors picked up on it, despite some confounding emotions in the writing, such as: *"I **like** the fabric (nice and thick) but it **did not work** for me."* Recall also that these patterns are being viewed in a highly compressed dimension-space (from 300 down to 2), so you can expect them to be even more distinct without compression.

## Conclusions
Let’s wrap up what I’ve done here: I loaded the GloVe word vectors, then used them to compute average vectors for a set of clothing reviews. Then, I visualized the results in a compressed T-SNE space. It was easy to pick out a few patterns in the data, and these demonstrated how similar reviews tend to be clustered closely together. All of this shows how word vectors can capture meanigful information from unstructured text.

That’s all, I hope you enjoyed reading!


text:
---
external help file: -help.xml
Module Name:
online version:
schema: 2.0.0
---

# DSCPullServerPreReqs.ps1

## SYNOPSIS

Installs required PowerShell DSC modules on a pull server.

## SYNTAX

```PowerShell
DSCPullServerPreReqs.ps1 [<CommonParameters>]
```

## DESCRIPTION

Installs required PowerShell DSC modules on a pull server as a pre-requisite for deploying a new pull server or updating the DSC modules on a currently deployed server.

## EXAMPLES

### EXAMPLE 1

```PowerShell
DSCPullServerPreReqs.ps1
```

When run on the pull server itself, this script will download and install the specified modules with the specified versions.
You must ensure the correct module names and versions are listed.
The script will attempt to install the modules from the Microsoft PowerShell Gallery (PSGallery) and then will attempt to use any other configured repositories if the PSGallery is inaccessible or does not host the required modules.

## PARAMETERS

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES

Author: Mike Nickerson

## RELATED LINKS

repository: daniloescolin/automation

repo_name: daniloescolin/automation


text:
# US Mortgages

- mortgage banking industry earns money through interest
- mortgages can be risky because people can default on loans
  - can sell mortgages to secondary market to offload risk
- mortgage bankers are at the center of most of the lending, and is an intermediary between all parties
- banks make money by mortgage lending and then selling them for premium, trading the mortgages themselves
- interest rates are important because they determine the cost of borrowing and return on lending
- not all mortgage banks are depository institutions

## History
- used to be a pain to collect payments from borrowers to give to investors, so servicers were born
- mortgage-backed securities were created to open up to a new class of investors
- thrift industry (S & L) died as interest rates rose and they couldn't match MBS
- subprime is when credit score is low or forms are not filled out
  - leads to new products with low rates that grew to higher rates after a period of time
  - led to 2008 crisis
  - as a result, Consumer Financial Protection Bureau (CFPB) came about and led to higher fees across all and increased risk
- The New Deal introduced the Federal Housing Administration and Fannie Mae
  - introduced 30-Year Fixed-Rate Mortgage

## Entities
- [useful overview](https://core-mba.bravais.com/api/dynamic/documentVersions/3788/files/211716/media/SS/RSF/Mtg%20Bnk%20Primer/PDFs/ResidentialFlowchart_2012.pdf)
- Lender
  - money from borrower -> lender
    - mortgage payment includes principal owed + interest + escrows for taxes/insurance
  - money from investor -> lender
    - when investors purchase closed loans and mortgage servicing rights
    - where lenders make most of their money
  - plays the middle man between primary and secondary markets
- Investor
  - money from lender -> investor
  - money flows to investors when servicers (original lender, subservicer, or another servicer who bought the servicing rights) pass monthly payments to investors (minus servicing fee)
  - payments made throughout life of loan
    - servicers also snipe a servicing fee
- Warehouse Bank
- Borrower
  - money from lender -> borrower
    - when promissory note and mortgage are signed

## Loan Production
- originates the loan in the primary market
- responsible for
  - taking loan app with borrower
  - processing it
  - underwriting the file (for approval/denial)
  - preparing the closing package
  - then wiring the funds
- involves origination, processing, underwriting, closing

## Funding, Warehousing, Shipping
- mortgage banker funds the loan, using a warehouse line of credit
- must manage warehouse line to ensure enough room to fund future loans the mortgage banker would like to close
- once funded, shipping performs a QC check on loan and sends loan file to investor that is purchasing the loan
- involves funding, warehousing, shipping/QC, shipping/delivery

## Secondary Marketing
- product mix that fits the mortgage banker's business model
- determines interest rates
- manages market risk and negotiates with investors for purchase of closed mortgage loans

## Loan Administration
- servicing
- manages admin duties associated with loan until paid off
- answering borrower questions, managing escrow accounts, loan payoffs, assumptions, loss mitigation, and foreclosures
- generally larger firms because of economies of scale

## Jobs
- Mortgage banker
  - fund loans at closing and service loans after closing
  - may sell loans on secondary market
- Correspondent
  - do everything mortgage bankers do except service loans
- Broker
  - originate and sometimes process but generally do not underwrite or fund at closing
- Wholesaler
  - entities that purchase loans and rights to service those loans from a broker or correspondent
  - may underwrite and fund loans or purchase loans that have been closed to resell to secondary market
- Conduit
  - purchase closed loans and pool them for sale to investors as MBS

## Laws
- Federal
  - require mortgage lenders to disclose information about loan costs
  - assure fair/equal treatment + confidentiality
  - regulate debt collection practices
- State
  - licensing of mortgage bankers
  - foreclosure/eviction process

## Loan Production Basics
- Goals of Loan Production
  - originate investor-quality loans
  - protect interests of consumer
  - ensure compliance with all federal/state regulations
- Functions of Loan Production
  - takes loan from application to closing
  - origination
    - takes complete app and gathers supporting docs
    - educate borrowers
    - provide timely disclosure of loan terms and costs
    - provide complete file to processor for processing
  - processing
    - review files for completeness/accuracy
    - ensure system data is correct
    - obtain third-party verifications
    - provide complete loan file to underwriter
  - underwriting
    - determine ability/willingness to repay the loan
    - determine property value to ensure meeting investor guidelines
  - closing
    - assemble pre-closing conditions/documents
    - coordinate with closing agents for closing/funding of the transaction
    - verify all fees/costs/premiums are collected
- Mortgage Loan Originator (MLO)
  - sales people
  - generating business
  - taking complete loan applications
  - Uniform residential loan application (URLA) is the standard
  - only people allowed to help borrowers complete a loan application
- Processing
  - retrieve UW findings and credit report
  - provide detailed findings
  - dirty work to retrieve all relevant information, verifications
  - document everything
- Underwriting
  - must receive approval from government agencies to underwrite
  - auditor, essentially
  - looks at transaction, borrowers, and property
  - transactions
    - purchase
    - refinance
  - potential issues
    - non-arm's length
    - down payment, are they actually paying this?
    - potential fraud
    - other debt to inflate or deflate the price
    - is rental income actually going to happen
  - 4 Cs of underwriting
    - credit
      - credit report
      - can rescore if there is a mistake on the report
    - capacity
      - can they pay it back?
      - principal, interest, taxes, hazard insurance, mortgage insurance (PITI payment)
      - front ratio: housing to income ratio, 28%
      - back ratio: debt to income ratio, 36%
      - underwriter can be flexical depending on factors
    - capital
      - checking, savings, CDs, MMA, stocks and bonds, mutual funds, retirement, other investments
      - reserves always strengthen in case of job loss
    - collateral
      - property types
        - Single family residence (SFR)
        - Planned Unit Development (PUD) attached or detached that has common areas
        - Condo
        - Cooperative
        - 2-4 Family
      - occupancy types
        - owner occupied
        - second home
        - investment property
    - loan-to-value (LTV) ratio
      - loan amount / (lesser of appraised value / sales price)
- Closing
  - execution of closing documents
    - depends on state, investor, insurer requirements
    - depends on financing method and loan type
    - typical documents:
      - promissory note
      - security instruments: mortgage and deed of trust (foreclosure without court proceeding)
      - closing disclosure
      - hazard insurance policy
      - title insurance policy
    - notarizing is required for the public record
    - attorney / title states have different rules to see who can perform duties of closing
  - transfer of funds
  - transfer of title of property
- types of loans
  - conventional loans
    - not insured by VA, FHA, USDA
    - requires private mortgage insurance if loan amount > 80% of value of mortaged property
  - FHA loans
    - insured by federal housing administration
    - insures lenders against borrower default
    - for lower income borrowers, with mortgage insurance premiums baked in
  - VA loans
    - veteran affairs
  - Jumbo loans
    - nonconforming
    - large loan amounts
  - Alt-A loans
    - non-traditional in qualification, documentation, or other loan characteristic
    - higher risk, so premiums to the investor
- Affordable housing programs
  - HomeReady mortgage (Fannie Mae)
  - Home Possible mortgage (Freddic Mac)
- Common Financing methods
  - fixed rate mortgage
  - adjustable rate mortgage
  - balloon mortgage
    - equal monthly payments for a fixed time until the full balance is due
  - graduated payment mortgage
    - interest rate is fixed but payments continue to increase over years and then level off
  - growing equity mortgage
    - fixed rate with payments that rise yearly until mortgage is paid off
    - paid directly to principal balance to lower debt faster
    - alternative to a 15-year fixed rate mortgage
- Regulations
  - Equal Credit Opportunity Act (ECOA)
  - Fair Housing Act
  - Truth in Lending Act (TILA)
  - Real Estate Settlement Procedures Act (RESPA)
    - promotes consumer notification and protection
  - Home Mortgage Disclosure Act (HMDA)
  - Home Ownership and Equity Protection Act (HOEPA)
  - Secure and Fair Enforcement for Mortgage Licensing Act (SAFE)
    - requires MLO and licensing standards
  - also aims to protect against predatory lending

repository: eginwong/course-notes

repo_name: eginwong/course-notes


text:
# New Natanan
> \[Au-nak\] represented a dead kingdom that had been reduced to a single city-state on the eastern coast of Roshar with a few other cities as protectorates.

**New Natanan** is a city-state on Roshar whose power extends to a few surrounding settlements. The people of Natanan are called the **Natan**.

repository: jofwu/roshar-map

repo_name: jofwu/roshar-map


text:
---
title: "List appliesTo"
description: "Get a list of directoryObject objects that a homeRealmDiscoveryPolicy object has been applied to."
ms.localizationpriority: medium
author: "hpsin"
ms.prod: "identity-and-sign-in"
doc_type: "apiPageType"
---

# List appliesTo

Namespace: microsoft.graph

Get a list of [directoryObject](../resources/directoryObject.md) objects that a [homeRealmDiscoveryPolicy](../resources/homerealmdiscoverypolicy.md) object has been applied to.

## Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).

| Permission type                        | Permissions (from least to most privileged) |
|:---------------------------------------|:--------------------------------------------|
| Delegated (work or school account)     | Policy.Read.All and Application.Read.All, Policy.ReadWrite.ApplicationConfiguration and Application.Read.All, Directory.Read.All |
| Delegated (personal Microsoft account) | Not supported. |
| Application                            | Policy.Read.All and Application.Read.All, Policy.ReadWrite.ApplicationConfiguration and Application.Read.All, Directory.Read.All |

## HTTP request

<!-- { "blockType": "ignored" } -->

```http
GET /policies/homeRealmDiscoveryPolicies/{id}/appliesTo
```

## Optional query parameters

This method supports the `$select` and `$top` OData query parameters to help customize the response. For general information, see [OData query parameters](/graph/query-parameters).

## Request headers

| Name      |Description|
|:----------|:----------|
| Authorization | Bearer {token}. Required. |

## Request body

Do not supply a request body for this method.

## Response

If successful, this method returns a `200 OK` response code and a collection of [directoryObject](../resources/directoryobject.md) objects in the response body. It returns a `404 Not Found` response code if the policy hasn't been applied to any directory objects.

## Examples

### Request

The following is an example of the request.

# [HTTP](#tab/http)
<!-- {
  "blockType": "request",
  "name": "get_appliesto_2"
}-->

```msgraph-interactive
GET https://graph.microsoft.com/v1.0/policies/homeRealmDiscoveryPolicies/6c6f154f-cb39-4ff9-bf5b-62d5ad585cde/appliesTo
```

# [C#](#tab/csharp)

```csharp

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var appliesTo = await graphClient.Policies.HomeRealmDiscoveryPolicies["{homeRealmDiscoveryPolicy-id}"].AppliesTo
	.Request()
	.GetAsync();

```

 For details about how to [add the SDK](/graph/sdks/sdk-installation) to your project and [create an authProvider](/graph/sdks/choose-authentication-providers) instance, see the [SDK documentation](/graph/sdks/sdks-overview).

### Response

The following is an example of the response.

> **Note:** The response object shown here might be shortened for readability.

<!-- {
  "blockType": "response",
  "truncated": true,
<EMAIL_ADDRESS>"microsoft.graph.directoryObject",
  "isCollection": true
} -->

```http
HTTP/1.1 200 OK
Content-type: application/json

{
<EMAIL_ADDRESS>"https://graph.microsoft.com/v1.0/$metadata#directoryObjects",
    "value": [
        {
<EMAIL_ADDRESS>"#microsoft.graph.servicePrincipal",
            "id": "19c308f2-e088-464d-8ccb-7137b7bab660",
            "accountEnabled": true,
            "alternativeNames": [],
            "appDisplayName": "LinkedIn",
            "appId": "c8e5820f-8e41-4b7c-8937-42777eb592a4",
            "appOwnerOrganizationId": "84841066-274d-4ec0-a5c1-276be684bdd3",
            "displayName": "LinkedIn",
            "homepage": "https://account.activedirectory.windowsazure.com:444/applications/default.aspx?metadata=linkedin|ISV9.3|primary|z",
            "servicePrincipalNames": [
                "c8e5820f-8e41-4b7c-8937-42777eb592a4",
                "http://LinkedIn/1a2d95c1-3cc7-46ad-82dd-2c768ae1b4ff"
            ],
            "servicePrincipalType": "Application",
            "signInAudience": "AzureADMyOrg",
            "tags": [
                "4d57f64e-9941-4df2-bb70-8d9a2a38ab91",
                "WindowsAzureActiveDirectoryGalleryApplicationPrimaryV1",
                "WindowsAzureActiveDirectoryIntegratedApp"
            ],
            "appRoles": [
                {
                    "allowedMemberTypes": [
                        "User"
                    ],
                    "description": "msiam_access",
                    "displayName": "msiam_access",
                    "id": "01c2bb8e-0895-42c8-b950-3ec8abc7a012",
                    "isEnabled": true,
                    "origin": "Application",
                    "value": null
                }
            ],
            "keyCredentials": [],
            "oauth2PermissionScopes": [
                {
                    "adminConsentDescription": "Allow the application to access LinkedIn on behalf of the signed-in user.",
                    "adminConsentDisplayName": "Access LinkedIn",
                    "id": "6edde65d-3f90-4251-9df2-0329b678b368",
                    "isEnabled": true,
                    "type": "User",
                    "userConsentDescription": "Allow the application to access LinkedIn on your behalf.",
                    "userConsentDisplayName": "Access LinkedIn",
                    "value": "user_impersonation"
                }
            ],
            "passwordCredentials": []
        }
    ]
}
```

<!-- uuid: 16cd6b66-4b1a-43a1-adaf-3a886856ed98
2019-02-04 14:57:30 UTC -->
<!-- {
  "type": "#page.annotation",
  "description": "List appliesTo",
  "keywords": "",
  "section": "documentation",
  "tocPath": ""
}-->

repository: microsoftgraph/msgraph-sdk-dotnet

branch_name: refs/heads/dev

gha_language: C#

gha_license_id: NOASSERTION

repo_name: microsoftgraph/msgraph-sdk-dotnet


text:
# _Solar Age Calculator_

#### _A webpage to calculate your solar age on other planets, November 13, 2020_

#### By _**Zahnen Garner**_

## Description

_This webpage was created as my independent project for my fifth week at Epicodus. The webpage allows users to input their age in years on Earth and view their age/number of solar returns on other planets. The webpage was created to apply concepts I learned this week which include updated project structures, NPM, and Test Driven Development._

## Setup/Installation Requirements

### If you would like to run the webpage on GitHub Pages
* _Open your browser_
* _Navigate to https://zahnen.github.io/solar-age-calculator_

### If you would like to run the webpage locally

* _Open your git-capable command line program (I recommend Terminal on Mac or Git Bash on PC)_
* _Ensure you are within the directory you'd like the file to be created in._
* _Enter the command "$ git clone https://github.com/Zahnen/solar-age-calculator" in your command line_
* _Once cloned, use the "$ cd " command to navigate to the directory created in the previous step._
* _You must have node.js installed in order to run the webpage successfully. If you do not have node.js installed, find more information and download it [here](https://nodejs.org/en/download/)_
* _Once in the newly cloned directory, run "$ npm install" to install the necessary packages and dependencies._
* _To open the webpage in your default browser, run "$ npm start"._

## Specs

* _To review the specs that were tested in the development of this webpage, please refer to the ageCalc.test.js file located in the "tests" directory_

## Known Bugs

_There are no known bugs at this time._

## Support and contact details

_If you notice a bug or require support, please reach out to me via email. I can be reached at<EMAIL_ADDRESS>
## Technologies Used

_This webpage required use of the following programs/languages/libraries to create:_
* _GitBash_
* _Visual Studio Code_
* _GitHub_
* _GitHub Pages_
* _HTML_
* _CSS_
* _Bootstrap_
* _JavaScript_
* _JQuery_
* _Node.js_
* _npm_
* _Jest_
* _For a full list of packages/dependencies, feel free to have a look in the file titled package.json_

### License

*Licensed under MIT*

*Vector icons provided via Icons8's library, which can be found at https://icons8.com/*

Copyright (c) 2020 **_Zahnen Garner_**

repository: Zahnen/solar-age

branch_name: refs/heads/main

repo_name: Zahnen/solar-age


text:
> Consider the problem of neatly printing a paragraph with a monospaced font (all characters having the same width) on a printer. The input text is a sequence of $n$ words of lengths $l_1, l_2, \ldots, l_n$, measured in characters. We want to print this paragraph neatly on a number of lines that hold a maximum of $M$ characters each. Our criterion of "neatness" is as follows. If a given line contains words $i$ through $j$, where $i \le j$ , and we leave exactly one space between words, the number of extra space characters at the end of the line is $M - j + i - \sum_{k = i}^j l_k$, which must be nonnegative so that the words fit on the line. We wish to minimize the sum, over all lines except the last, of the cubes of the numbers of extra space characters at the ends of lines. Give a dynamic-programming algorithm to print a paragraph of $n$ words neatly on a printer. Analyze the running time and space requirements of your algorithm.

Note: We assume that no word is longer than will fit into a line, i.e., $l_i \le M$ for all $i$.

First, we'll make some definitions so that we can state the problem more uniformly. Special cases about the last line and worries about whether a sequence of words fits in a line will be handled in these definitions, so that we can forget about them when framing our overall strategy.

- Define $extras[i, j] = M - j + i - \sum_{k = i}^j l_k$ to be the number of extra spaces at the end of a line containing words $i$ through $j$. Note that $extras$ may be negative.
- Now define the cost of including a line containing words $i$ through $j$ in the sum we want to minimize:

    $$
    lc[i, j] =
    \begin{cases}
              \infty & \text{if $extras[i, j] < 0$ (i.e., words $i, \ldots, j$ don't fit)}, \\\\
                   0 & \text{if $j = n$ and $extras[i, j] \ge 0$ (last line costs $0$)}, \\\\
    (extras[i, j])^3 & \text{otherwise}.
    \end{cases}
    $$

By making the line cost infinite when the words don't fit on it, we prevent such an arrangement from being part of a minimal sum, and by making the cost $0$ for the last line (if the words fit), we prevent the arrangement of the last line from influencing the sum being minimized.

We want to minimize the sum of $lc$ over all lines of the paragraph.

Our subproblems are how to optimally arrange words $1, \ldots, j$, where $j = 1, \ldots, n$.

Consider an optimal arrangement of words $1, \ldots, j$. Suppose we know that the last line, which ends in word $j$, begins with word $i$. The preceding lines, therefore, contain words $1, \ldots, i - 1$. In fact, they must contain an optimal arrangement of words $1, \ldots, i - 1$. (The usual type of cut-and-paste argument applies.)

Let $c[j]$ be the cost of an optimal arrangement of words $1, \ldots, j$. If we know that the last line contains words $i, \ldots, j$, then $c[j] = c[i - 1] + lc[i, j]$. As a base case, when we're computing $c[1]$, we need $c[0]$. If we set $c[0] = 0$, then $c[1] = lc[1, 1]$, which is what we want.

But of course we have to figure out which word begins the last line for the subproblem of words $1, \ldots, j$. So we try all possibilities for word $i$, and we pick the one that gives the lowest cost. Here, $i$ ranges from $1$ to $j$. Thus, we can define $c[j]$ recursively by

$$
c[j] =
\begin{cases}
                                                0 & \text{if $j = 0$}, \\\\
\min\limits_{1 \le i \le j} (c[i - 1] + lc[i, j]) & \text{if $j > 0$}.
\end{cases}
$$

Note that the way we defined $lc$ ensures that

- all choices made will fit on the line (since an arrangement with $lc = \infty$ cannot be chosen as the minimum), and
- the cost of putting words $i, \ldots, j$ on the last line will not be $0$ unless this really is the last line of the paragraph ($j = n$) or words $i, \ldots, j$ fill the entire line.

We can compute a table of $c$ values from left to right, since each value depends only on earlier values.

To keep track of what words go on what lines, we can keep a parallel $p$ table that points to where each $c$ value came from. When $c[j]$ is computed, if $c[j]$ is based on the value of $c[k - 1]$, set $p[j] = k$. Then after $c[n]$ is computed, we can trace the pointers to see where to break the lines. The last line starts at word $p[n]$ and goes through word $n$. The previous line starts at word $p[p[n]]$ and goes through word $p[n] - 1$, et.

In pseudocode, here's how we construct the tables:

```cpp
PRINT-NEATLY(l, n, M)
    let extras[1..n, 1..n], lc[1..n, 1..n], and c[0..n] be new arrays
    // Compute extras[i, j] for 1 ≤ i ≤ j ≤ n.
    for i = 1 to n
        extras[i, i] = M - l[i]
        for j = i + 1 to n
            extras[i, j] = extras[i, j - 1] - l[j] - 1
    // Compute lc[i, j] for 1 ≤ i ≤ j ≤ n.
    for i = 1 to n
        for j = i to n
            if extras[i, j] < 0
                lc[i, j] = ∞
            else if j == n and extras[i, j] ≥ 0
                lc[i, j] = 0
            else lc[i, j] = (extras[i, j])^3
    // Compute c[j] and p[j] for 1 ≤ j ≤ n.
    c[0] = 0
    for j = 1 to n
        c[j] = ∞
        for i = 1 to j
            if c[i - 1] + lc[i, j] < c[j]
                c[j] = c[i - 1] + lc[i, j]
                p[j] = i
    return c and p
```

Quite clearly, both the time and space are $\Theta(n^2)$.

In fact, we can do a bit better: we can get both the time and space down to $\Theta(nM)$. The key observation is that at most $\lceil M / 2 \rceil$ words can fit on a line. (Each word is at least one character long, and there's a space between words.) Since a line with words $i, \ldots, j$ contains $j - i + 1$ words, if $j - i + 1 > \lceil M / 2 \rceil$ then we know that $lc[i, j] = \infty$. We need only compute and store $extras[i, j]$ and $lc[i, j]$ for $j - i + 1 \le \lceil M / 2 \rceil$. And the inner **for** loop header in the computation of $c[j]$ and $p[j]$ can run from $\max(1, j - \lceil M / 2 \rceil + 1)$ to $j$.

We can reduce the space even further to $\Theta(n)$. We do so by not storing the $lc$ and $extras$ tables, and instead computing the value of $lc[i, j]$ as needed in the last loop. The idea is that we could compute $lc[i, j]$ in $O(1)$ time if we knew the value of $extras[i, j]$. And if we scan for the minimum value in _descending_ order of $i$, we can compute that as $extras[i, j] = extras[i + 1, j] - l_i - 1$. (Initially, $extras[j, j] = M - l_j$.) This improvement reduces the space to $\Theta(n)$, since now the only tables we store are $c$ and $p$.

Here's how we print which words are on which line. The printed output of $\text{GIVE-LINES}(p, j)$ is a sequence of triples $(k, i, j)$, indicating that words $i, \ldots, j$ are printed on line $k$. The return value is the line number $k$.

```cpp
GIVE-LINES(p, j)
    i = p[j]
    if i == 1
        k = 1
    else k = GIVE-LINES(p, i - 1) + 1
    print (k, i, j)
    return k
```

The initial call is $\text{GIVE-LINES}(p, n)$. Since the value of $j$ decreases in each recursive call, $\text{GIVE-LINES}$ takes a total of $O(n)$ time.


text:
# Create Pull Request
[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Create%20Pull%20Request-blue.svg?colorA=24292e&colorB=0366d6&style=flat&longCache=true&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/create-pull-request)

A GitHub action to create a pull request for changes to your repository in the actions workspace.

Changes to a repository in the Actions workspace persist between steps in a workflow.
This action is designed to be used in conjunction with other steps that modify or add files to your repository.
The changes will be automatically committed to a new branch and a pull request created.

Create Pull Request action will:

1. Check for repository changes in the Actions workspace. This includes untracked (new) files as well as modified files.
2. Commit all changes to a new branch. The commit will be made using the name and email of the `HEAD` commit author.
3. Create a pull request to merge the new branch into the currently active branch executing the workflow.

Note: Modifying a repository during workflows is not good practice in general.
However, this action opens up some interesting possibilities when used carefully.
This action is experimental and may not work well for some use cases.

## Usage

Linux
```yml
    - name: Create Pull Request
      uses<EMAIL_ADDRESS>      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

Multi platform - Linux, MacOS, Windows (beta)
```yml
    - name: Create Pull Request
      uses<EMAIL_ADDRESS>      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

#### Environment variables

These variables are all optional. If not set, a default value will be used.

- `PULL_REQUEST_BRANCH` - The branch name. See **Branch naming** below for details.
- `BRANCH_SUFFIX` - The branch suffix type. Valid values are `short-commit-hash` (default) and `timestamp`. See **Branch naming** below for details.
- `COMMIT_MESSAGE` - The message to use when committing changes.
- `PULL_REQUEST_TITLE` - The title of the pull request.
- `PULL_REQUEST_BODY` - The body of the pull request.

The following parameters are available for debugging and troubleshooting.

- `DEBUG_EVENT` - If present, outputs the event data that triggered the workflow.
- `SKIP_IGNORE` - If present, the `ignore_event` function will be skipped.

#### Branch naming

The variable `PULL_REQUEST_BRANCH` defaults to `create-pull-request/patch`.
Commits will be made to a branch with this name and suffixed with the short SHA1 commit hash.

e.g.
```
create-pull-request/patch-fcdfb59
create-pull-request/patch-394710b
```

Alternatively, branches can be suffixed with a timestamp by setting the environment variable `BRANCH_SUFFIX` to the value `timestamp`. This option must be used if multiple pull requests will be created during the execution of a workflow.

e.g.
```
create-pull-request/patch-1569322532
create-pull-request/patch-1569322552
```

#### Ignoring files

If there are files or directories you want to ignore you can simply add them to a `.gitignore` file at the root of your repository. The action will respect this file.

## Example

Here is an example that sets all the main environment variables.

```yml
    - name: Create Pull Request
      uses<EMAIL_ADDRESS>      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        PULL_REQUEST_BRANCH: my-patches
        BRANCH_SUFFIX: short-commit-hash
        COMMIT_MESSAGE: Auto-modify files by my-file-modifier-action
        PULL_REQUEST_TITLE: Changes from my-file-modifier-action
        PULL_REQUEST_BODY: This is an auto-generated PR with changes from my-file-modifier-action
```

This configuration will create pull requests that look like this:

![Pull Request Example](pull-request-example.png?raw=true)

## License

MIT License - see the [LICENSE](LICENSE) file for details

repository: qoutland/create-pull-request

repo_name: qoutland/create-pull-request


text:
# A library to make use of Beacon SDK from your Node.js script
`tezos-builder-suite` is a package that exposes to your application an easy interface to let user interact with [Tezos](https://tezos.com) Smart Contracts with [Taquito](https://tezostaquito.io) and the [Beacon SDK](https://www.walletbeacon.io) through the infrastructure of a small [Apollo GraphQL server](https://www.apollographql.com) and a [React.js](https://reactjs.org) browser client.

All you need to do is just launch the tool providing contract(s) code, contract(s) compiled Michelson and the Tezos endpoint to connect to.

## Installation
```bash
yarn add tezos-builder-suite
```
or
```bash
npm i --save tezos-builder-suite
```

## Usage
In a JavaScript project, you can use:
```js
const { launchDeployer, NetworkType } = require('tezos-builder-suite');

const endpoint = {
  url: "https://mainnet-tezos.giganode.io/",
  scope: "mainnet",
  protocolVersion: NetworkType.MAINNET,
};

const contracts = [
  {
    name: "MyContract.ligo", // File name
    code: '...', // Contract source code
    michelson: '...', // Compiled contract JSON-Michelson code
  },
];

launchDeployer({
  endpoint,
  contracts
}, { openBrowser: true });
```

or, if like us you prefer to write in TypeScript, you can go with:
```typescript
import { launchDeployer, Contract, Endpoint, NetworkType } from 'tezos-builder-suite';

const endpoint: Endpoint = {
  url: "https://mainnet-tezos.giganode.io/",
  scope: "mainnet",
  protocolVersion: NetworkType.MAINNET,
};

const contracts: Contract[] = [
  {
    name: "MyContract.ligo", // File name
    code: '...', // Contract source code
    michelson: '...', // Compiled contract JSON-Michelson code
  },
];

launchDeployer({
  endpoint,
  contracts
}, { openBrowser: true });
```

## Contributing
We'd definitely love to have your contributions to this package.

If you want to write some code, we'll be more than happy to review and discuss every PR. Please refer to our [Contributing guide](../CONTRIBUTING.md) to discover how to work on this repository and how to subit your PRs.

If you like this project, please consider donating to help it evolve along with Tezos ecosystem and protocol updates. As you can imagine, this requires a lot of time and effort, and any donation will support us. Reach us from any support channel to find how to donate in your preferred way.

## Let's get in touch
You can request support, give feedback, suggest features and donate to this project by contacting us in any of the following channels:

- Telegram Uconomy support channel [https://t.me/uconomy](https://t.me/uconomy)
- Uconomy developers Discord [https://discord.gg/Cabq36FVRh](https://discord.gg/Cabq36FVRh)

If you need help with code we'd suggest going for the Discord channel as it's easier to exchange code there.

repository: qepri/tezos-builder-suite

repo_name: qepri/tezos-builder-suite


text:
# Animal face-off: Pandas vs Polars
## Arturo Regalado

Twitter: [@arturoregalado](https://twitter.com/arturoregalado)
[LinkedIn](https://www.linkedin.com/in/arturoregalado/)
10 May 2023

The repository can be accessed at https://bit.ly/3NMNBim

This repository holds all the files used during the APUG meeting. Download the ones you need.

* `examples.ipynb` contains the benchmarks for loading operations in Pandas and Polars.
* `pokemon.ipynb` is the main notebook where the Polars API was showcased.
* `challenges.ipynb` contains the challenge instructions.

The pokemon and challenges notebooks can be also accessed in google colab. This is specially useful for new python users as the environment is set.

* Challenges: https://bit.ly/3peYVcV
* Pokemon: https://bit.ly/3HQULyx

license: Unlicense

gha_language: Jupyter Notebook

gha_license_id: Unlicense


text:
---
layout: post
title: Hacknews2021-07-04新闻
category: Hacknews
tags: hacknews
keywords: hacknews
coverage: hacknews-banner.jpg
---

Hacker News 是一家关于计算机黑客和创业公司的社会化新闻网站，由保罗·格雷厄姆的创业孵化器 Y Combinator 创建。
与其它社会化新闻网站不同的是 Hacker News 没有踩或反对一条提交新闻的选项（不过评论还是可以被有足够 Karma 的用户投反对票）；只可以赞或是完全不投票。简而言之，Hacker News 允许提交任何可以被理解为“任何满足人们求知欲”的新闻。

## HackNews Hack新闻

- [EasyPost is building the logistics platform for ecommerce](https://www.easypost.com/careers)
- `EasyPost即将接管电子商务`
- [Jerry (YC S17) is hiring a remote senior software engineer](https://apply.workable.com/jerry/j/07E1D2B302/)
- `Jerry，Inc.（YC S17）正在招聘高级软件工程师`
- [Mesh Transformer JAX – Model parallel transformers in JAX and Haiku](https://github.com/kingoflolz/mesh-transformer-jax)
- `GPT-J-6B，6B 参数文本生成模型`
- [Avenue (YC W21) Is Hiring Full-Stack Engineers in NYC (TypeScript, Node, React)](https://www.ycombinator.com/companies/avenue/jobs/G2sPjRf-software-engineer)
- `Avenue (YC W21) 正在纽约招聘全栈工程师（TypeScript、Node、React）`
- [Kerouac and Ginsberg Letters](https://granta.com/kerouac-ginsberg-the-letters/)
- `凯鲁亚克和金斯伯格的书信`
- [Suppose I wanted to kill a lot of pilots](https://historyofyesterday.com/suppose-i-wanted-to-kill-a-lot-of-pilots-f126bbc756fa)
- `假设我想杀死很多飞行员`
- [The ‘flow state’: Where creative work thrives (2019)](https://www.bbc.com/worklife/article/20190204-how-to-find-your-flow-state-to-be-peak-creative)
- `“心流状态”：创意工作蓬勃发展的地方`
- [Learning Squeak (2019)](https://wiki.squeak.org/squeak/6622)
- `2020 年学习 Squeak`
- [A woman's battle to prove she isn't dead](https://www.theguardian.com/lifeandstyle/2021/jul/03/they-said-i-dont-exist-but-i-am-here-one-womans-battle-to-prove-she-isnt-dead)
- `一个女人证明她没有死的战斗`
- [Wav2vec Overview: Semi and Unsupervised Speech Recognition](https://vaclavkosar.com/ml/Wav2vec2-Semi-and-Unsupervised-Speech-Recognition)
- `Wav2vec 概述：半监督和无监督语音识别`
- [What did ancient languages sound like?](https://antigonejournal.com/2021/07/what-did-ancient-languages-sound-like/)
- `古代语言听起来像什么？`
- [Bay Area cities want to end single-family home zoning](https://www.sfchronicle.com/bayarea/article/Bay-Area-cities-want-to-end-single-family-home-15983648.php)
- `湾区城市希望结束单户住宅分区`
- [How to add eBPF observability to your product](https://brendangregg.com/blog/2021-07-03/how-to-add-bpf-observability.html)
- `如何为您的产品添加 eBPF 可观察性`
- [Things I wish Git had: Commit groups](http://blog.danieljanus.pl/2021/07/01/commit-groups/)
- `我希望 Git 拥有的东西：提交组`
- [API Improvement Proposals](https://google.aip.dev/)
- `API 改进建议`
- [Tiny FORTH from scratch in 1 week (bootloader-based Arduino UNO, 2K of RAM)](https://www.thanassis.space/miniforth.html)
- `1 周内从零开始的 Tiny FORTH（基于引导加载程序的 Arduino UNO，2K RAM）`
- [We don’t have unprofitable customers, just unhappy accidents (2019)](https://jansanity.com/we-dont-have-unprofitable-customers-just-unhappy-accidents/)
- `我们没有无利可图的客户，只有不愉快的事故`
- [WASM to PS Compiler](https://github.com/no-defun-allowed/wasm2ps)
- `WASM 到 PS 编译器`
- [Using government guidelines to police content: state censorship?](https://taibbi.substack.com/p/a-case-of-intellectual-capture-on)
- `如果平台使用政府指南来监管内容，那是国家审查吗？`
- [I do not agree with Github's use of copyrighted code as training for Copilot](https://thelig.ht/abandoning-github/)
- `放弃 GitHub`
- [Steve Jobs in Kyoto](https://www3.nhk.or.jp/nhkworld/en/news/backstories/1622/)
- `史蒂夫·乔布斯在京都`
- [Will we ever fly supersonically over land?](https://www.newyorker.com/tech/annals-of-technology/will-we-ever-fly-supersonically-over-land)
- `我们会在陆地上空超音速飞行吗？`
- [How not to break a search engine](https://about.sourcegraph.com/blog/how-not-to-break-a-search-engine-unglamorous-engineering/)
- `如何不破坏搜索引擎`
- [Where are we going from here? Software engineering needs formal methods](https://ntietz.com/tech-blog/future-of-software-engineering-is-formal-methods/)
- `我们要从这里去哪里？`
- [Research recitation: A first look at rote learning in GitHub Copilot suggestions](https://docs.github.com/en/github/copilot/research-recitation)
- `分析 GitHub Copilot 复制粘贴的频率`
- [The Metaverse: A brave, new virtual world](https://medium.com/berkman-klein-center/the-metaverse-a-brave-new-virtual-world-2f040cbae7d4)
- `元界：一个勇敢的新虚拟世界`
- [What should the CPU usage be of a fully-loaded CPU that has been throttled?](https://devblogs.microsoft.com/oldnewthing/20210629-00/?p=105378)
- `已被节流的满载 CPU 的 CPU 使用率应该是多少？`
- [Monitor Lizards in Australia Dig Corkscrew Nests](https://www.theatlantic.com/science/archive/2021/06/monitor-lizards-australia-dig-incredible-corkscrew-nests/619294/)
- `澳大利亚的蜥蜴挖开瓶器的巢穴`
- [How Databases handle 10M devices in high-cardinality benchmarks](https://questdb.io/blog/2021/06/16/high-cardinality-time-series-data-performance/)
- `数据库如何在高基数基准测试中处理 10M 设备`
- [The Dawn of Formalized Mathematics](http://math.andrej.com/2021/06/24/the-dawn-of-formalized-mathematics/)
- `形式化数学的黎明`
- [70% of San Francisco residents say quality of life has declined: poll](https://www.kron4.com/news/bay-area/8-out-of-10-san-franciscans-say-crime-has-gotten-worse-poll/)
- `70% 的旧金山居民表示生活质量下降：民意调查`
- [Supermarket chain Coop closes 800 stores following Kaseya ransomware attack](https://therecord.media/supermarket-chain-coop-closes-800-stores-following-kaseya-ransomware-attack/)
- `连锁超市 Coop 在 Kaseya 勒索软件攻击后关闭了 800 家门店`
- [One man’s plan to resurrect the animal species we can’t save](https://www.wired.co.uk/article/natures-safe)
- `一个人计划复活我们无法拯救的动物物种`
- [CDNs and Centrality](https://www.potaroo.net/ispcol/2021-07/cdn.html)
- `CDN 和中心性`
- [Microbes in cow stomachs can break down plastic](https://www.frontiersin.org/articles/10.3389/fbioe.2021.684459/full)
- `牛胃中的微生物可以分解塑料`
- [Israeli camouflage tech makes soldiers ‘invisible’](https://www.jpost.com/jpost-tech/israeli-camouflage-tech-makes-soldiers-invisible-671096)
- `以色列伪装技术使士兵“隐形”`
- [Koka: A Functional Language with Effects](https://github.com/koka-lang/koka)
- `Koka：具有效果的函数式语言`
- [U.S. Navy Laser Creates Plasma ‘UFOs’](https://www.forbes.com/sites/davidhambling/2020/05/11/us-navy-laser-creates-plasma-ufos/)
- `美国海军激光制造等离子“不明飞行物”`
- [Scripps O2 Global Oxygen Measurements](https://scrippso2.ucsd.edu/index.html)
- `Scripps O2 全球氧气测量`
- [The Haskell Phrasebook (2019)](https://typeclasses.com/phrasebook)
- `Haskell 短语手册 (2019)`
- [Decoding radio pH capsules with rtl_433](https://analogist.net/post/decoding-radio-ph-capsules-with-rtl_433/)
- `使用 rtl_433 解码无线电 pH 胶囊`
- [Oilsands among the most carbon intensive crudes in North America (2017)](https://www.pembina.org/blog/real-ghg-trend-oilsands)
- `油砂是北美碳强度最高的原油之一（2017 年）`
- [Technology Traps (1978) video](https://www.youtube.com/watch?v=MPcZ_5uCldg)
- `技术陷阱 (1978) 视频`
- [The Growth Ponzi Scheme](https://www.strongtowns.org/the-growth-ponzi-scheme)
- `增长庞氏骗局`
- [Study That Impregnated Male Rats Stirs Controversy](https://www.the-scientist.com/news-opinion/study-that-impregnated-male-rats-stirs-controversy-68928)
- `受孕雄性大鼠的研究引发争议`
- [Audacity may collect “Data necessary for law enforcement, litigation” and more](https://old.reddit.com/r/linux/comments/od3h8b/audacity_may_collect_data_necessary_for_law/)
- `Audacity 可能会收集“执法、诉讼所需的数据”等`
- [PowerTOP – diagnose issues with power consumption and power management on Linux](https://01.org/powertop/)
- `PowerTOP – 诊断 Linux 上的功耗和电源管理问题`
- [Smart tech is not making us stupid, instead is cognitively beneficial](https://www.uc.edu/news/articles/2021/07/nature-article-by-uc-expert-explains-how-smart-tech-wont-lower-your-iq.html)
- `智能技术不会让我们变得愚蠢，而是对认知有益`
- [Bash function names can be almost anything](https://blog.dnmfarrell.com/post/bash-function-names-can-be-almost-anything/)
- `Bash 函数名称几乎可以是任何名称`
- [What every coder should know about gamma (2016)](http://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/)
- `每个编码员都应该了解的关于 gamma 的知识`
- [Soviet Venus Images](http://mentallandscape.com/C_CatalogVenus.htm)
- `苏联金星图像`
- [Digital Violence: How the NSO Group Enables State Terror](https://www.digitalviolence.org/)
- `数字暴力：国家统计局组织如何促成国家恐怖主义`
- [Commit Often, Perfect Later, Publish Once: Git Best Practices](https://sethrobertson.github.io/GitBestPractices/)
- `经常提交，稍后完善，发布一次：Git 最佳实践`
- [Book of numbers by Joshua Cohen – review (2015)](https://www.theguardian.com/books/2015/jul/03/book-of-numbers-joshua-cohen-review)
- `约书亚科恩的数字书——评论（2015）`
- [Dear Mom and Dad, please stick with me](https://grownandflown.com/letter-from-teen-to-parents/)
- `亲爱的爸爸妈妈，请和我在一起`
- [Getting Unstuck](https://www.iamjonas.me/2021/06/getting-unstuck.html)
- `摆脱困境`
- [A Brief History of the Internet pdf](https://groups.csail.mit.edu/ana/A%20brief%20history%20of%20the%20internet%20-%20p22-leiner.pdf)
- `互联网简史.pdf`
- [John Lewis slams UK education system and offers staff literacy lessons](https://www.retailgazette.co.uk/blog/2021/06/john-lewis-slams-uk-education-system-and-offers-staff-literacy-lessons/)
- `约翰刘易斯抨击英国教育系统并提供员工识字课程`
- [Heat Domes Are a Red-Hot Warning on Climate Costs](https://www.bloomberg.com/opinion/articles/2021-07-03/heat-domes-are-a-red-hot-warning-on-climate-costs)
- `热穹是对气候成本的一个炽热警告`
- [DevOps is dead. But what will replace it?](https://edgegap.com/2021/06/17/devops-is-dead-but-what-will-replace-it/)
- `DevOps 已死。`
- [Cosmic rays broke a Certificate Transparency log](https://groups.google.com/a/chromium.org/g/ct-policy/c/PCkKU357M2Q/)
- `宇宙射线打破了证书透明度日志`
- [Return of the Mac (2005)](http://paulgraham.com/mac.html)
- `Mac 的回归 (2005)`
- [The unexpected complications of minor features (2020)](https://www.construct.net/en/blogs/ashleys-blog-2/unexpected-complications-1535)
- `小特征的意外并发症（2020）`
- [Health insurers are threatening not to cover some patients’ ER bills](https://www.vox.com/2021/7/1/22557401/united-healthcare-emergency-room-visits-medical-bills)
- `健康保险公司威胁不支付某些患者的 ER 账单`
- [AI and Communism: Narratives of AI Behind the Iron Curtain](https://www.ainarratives.com/resources/ai-communism)
- `人工智能与共产主义：铁幕背后的人工智能叙事`
- [Musings on Tech Debt (2020)](https://decompiled.dev/work/not-debt/)
- `对技术债务的思考（2020）`
- [Subtitle horse is a browser-based captions editor for subtitling videos online](https://subtitle-horse.com/)
- `字幕马是一个基于浏览器的字幕编辑器，用于在线视频字幕`
- [Blender and the Rabbids](https://www.blender.org/user-stories/blender-and-the-rabbids/)
- `搅拌机和疯兔`
- [Underground fiber optics spy on humans moving above](https://www.wired.com/story/how-underground-fiber-optics-spy-on-humans-moving-above/)
- `地下光纤监视上方移动的人类`
- [Is GitHub a derivative work of GPL'd software?](https://drewdevault.com/2021/07/04/Is-GitHub-a-derivative-work.html)
- `GitHub 是 GPL 软件的衍生作品吗？`
- [Electron tube New Automatic Computer](https://ena.computer/)
- `电子管新型全自动电脑`
- [The Gospel of Consumption](https://orionmagazine.org/article/the-gospel-of-consumption/)
- `消费福音`
- [Plants that change our consciousness](https://www.newstatesman.com/culture/books/2021/06/plants-change-our-consciousness)
- `改变我们意识的植物`
- [Audacity may collect “Data necessary for law enforcement, litigation” and more](https://www.reddit.com/r/linux/comments/od3h8b/audacity_may_collect_data_necessary_for_law/)
- `Audacity 可能会收集“执法、诉讼所需的数据”等`
- [Bringing Emulation into the 21st Century](https://blog.davetcode.co.uk/post/21st-century-emulator/)
- `将仿真带入 21 世纪`
- [Ask HN: How do SMBs afford such expensive software engineers in the US?](item?id=27729059)
- `问 HN：在美国，中小企业如何负担得起如此昂贵的软件工程师？`
- [The Human Family Tree, It Turns Out, Is Complicated](https://nautil.us/issue/102/hidden-truths/the-human-family-tree-it-turns-out-is-complicated)
- `事实证明，人类的家谱很复杂`
- [In Twitter’s early days, only one celebrity could tweet at a time (2018)](https://theoutline.com/post/4147/in-twitters-early-days-only-one-celebrity-could-tweet-at-a-time)
- `在 Twitter 的早期，一次只有一位名人可以发推文（2018 年）`
- [Geohot/twitchcore: A RISC-V core, first in Python, then in Verilog, then on FPGA](https://github.com/geohot/twitchcore)
- `Geohot/twitchcore：RISC-V 内核，首先使用 Python，然后使用 Verilog，然后使用 FPGA`

## HackShows Hacks展示

- [ Open-Source Alternative to Looker](https://github.com/mlcraft-io/mlcraft)
- `Looker 的开源替代品`
- [ Captain Stack – a parody version GitHub Copilot](https://github.com/hieunc229/copilot-clone)
- `船长 Stack – 一个模仿版 GitHub Copilot`
- [ Searchramen – multiple SEO tools with a SEO plugin for any website](https://www.searchramen.com)
- `具有适用于任何网站的通用 SEO 插件的多个 SEO 工具`
- [ I open sourced my systems programming cheat sheet](https://github.com/jstrieb/systems-programming-cheat-sheet)
- `我开源了我的系统编程备忘单`
- [ Less Addictive YouTube – a cross-browser plugin](https://github.com/JesseDrain/Less-Addictive-YouTube)
- `Show HN：不那么让人上瘾的 YouTube——一个跨浏览器的插件`
- [ VisaWhen – Data on US visa issuance backlogs](item?id=27698322)
- `Show HN: VisaWhen – 美国签证签发积压数据`
- [ clip.so – Cross browser bookmarks](https://clip.so)
- `clip.so – 跨浏览器书签`
- [ Visualizing Kubernetes Resources](https://laurinevala.medium.com/visualizing-kubernetes-resources-ee9d8c16d264)
- `可视化 Kubernetes 资源`
- [ VentScape – Minimalistic site to vent, chat and see others do the same](https://www.ventscape.life/chat)
- `Show HN：VentScape – 用于发泄、聊天和查看其他人做同样事情的简约网站`
- [ Check if Number exists on WhatsApp](https://github.com/AbhishekBiswal/whatsapp-verify)
- `检查 WhatsApp 上是否存在号码`
- [ Dead simple state mgmt library that sits atop Redux](https://gitlab.com/tlonny/boko)
- `位于 Redux 之上的死简单状态管理库`
- [ Hetchr, a Developer's Homepage](https://www.hetchr.com/)
- `Show HN：Hetchr，开发者主页`
- [ Send and receive anonymous Feedback to grow as a person](https://feedbackforgrowth.com)
- `发送和接收匿名反馈以成长为一个人`
- [ Graphical SQL Editor](https://www.youtube.com/watch?v=yxjE8GgXtfo)
- `图形 SQL 编辑器`
- [ GPU PaaS](https://calcify.io)
- `用于 GPU 的 Heroku`
- [ Write a CSV to Postgres (and 20 other dev utilities)](https://retool.com/utilities)
- `将 CSV 写入 Postgres（以及其他 20 个开发实用程序）`
- [ Napkin – Build back-end functions in the browser](https://www.napkin.io/)
- `Show HN: Napkin – 在浏览器中构建后端功能`
- [ Braille Dump](https://justine.lol/braille/)
- `盲文转储`
- [ Tobii – An accessible, open-source lightbox with no dependencies](https://github.com/midzer/tobii)
- `Tobii – 一个无依赖的可访问的开源灯箱`
- [ Fosscord – open-source and selfhostable alternative to discord](https://fosscord.com/)
- `Fosscord – Discord 的开源和自托管替代方案`
- [ Atto – BASIC computer that runs in the browser](https://jamesl.me/atto/)
- `Show HN: atto – 在浏览器中运行的新 BASIC 计算机`
- [ Sierra – A micro templating engine purely in Python](https://github.com/BrainStormYourWayIn/sierra)
- `Sierra – 一个纯 Python 的微型模板引擎`
- [ Seat Geek Calendar - Display multiple band's tour dates on one calendar](https://www.seatgeekcalendar.com/)
- `座位极客日历 - 在一个日历上显示多个乐队的巡演日期`
- [ Vibase – Edit DB tables quickly with Vim](https://github.com/BnMcGn/vibase)
- `Vibase – 使用 Vim 快速编辑数据库表`
- [ EOF Script to ensure text files end with newline](https://github.com/Keeo/end-of-file)
- `确保文本文件以换行符结尾的 EOF 脚本`
- [ Scrawl-canvas v8.5.4 released. Now you can grow patterns organically](https://www.linkedin.com/posts/rik-roots-50349611_javascript-animation-html5-activity-6817037507725787136-XDjp/)
- `涂鸦画布 v8.5.4 发布。`
- [ A TCP Proxy in 30 lines of Rust](https://zmedley.com/tcp-proxy.html)
- `30 行 Rust 的 TCP 代理`
- [ Crowdsourced-Transcripts-for-YouTube](https://github.com/Nassim-Saboundji/Crowdsourced-Transcripts-for-YouTube)
- `众包的 YouTube 成绩单`
- [ A bot to instantly send content from Telegram to Notion](https://telegramtonotion.com/)
- `立即将内容从 Telegram 发送到 Notion 的机器人`
- [ Litenote – Write, share, publish notes. Offset your carbon footprint](https://litenote.cc/)
- `Litenote – 撰写、分享、发布笔记。`
- [ End-to-End Encryption through Kafka, with Ockam](https://www.youtube.com/watch?v=WI0P98531Ig&t=163s)
- `通过 Kafka 使用 Ockam 进行端到端加密`


text:
---
title: Pdfs with pandoc
subtitle: An efficient replacement to Word
tags: [Pandoc, LaTeX]
---

With an increase of students and people using Word for school/college,
I found that there was a tool missing for Linux users to
quickly write documents (unless you used Libreoffice or paid for Microsoft 360)
Here is a tutorial to write pdfs and docx documents using markdown!

# What is pandoc?

When we write document say, a .txt file and want to convert it into html,
We would need a script that could convert a .txt file into html. And that's what
[pandoc is about.](https://pandoc.org/index.html) It is a haskell script
that can convert almost markup format into another one. In my opinion,
It is the "Swiss army knife" of document converters. It even has a haskell API.

# Installing pandoc

## With a package manager

You can install pandoc with in Debian based systems with:

```
sudo apt install pandoc
```

In Fedora this should be:

```
sudo dnf install pandoc
```

Pandoc is available in Debian, Ubuntu, Slackware, Arch, Fedora,
NiXOS, openSUSE, Gentoo and Void repositories.

You could search for it using your distro's package manager if it
uses the repositories of one of the following

## Installing from source

I suggest using a package manager for installation.  If at all it is
not there, you can compile it from source: Please note that you should
avoid this. Just in case you make a mistake.

{: .box-note}
**Note:** This is the installation for version <IP_ADDRESS> (latest in time of writing)

```
wget https://hackage.haskell.org/package/pandoc-<IP_ADDRESS>/pandoc-<IP_ADDRESS>.tar.gz
tar xvzf pandoc-<IP_ADDRESS>.tar.gz
cd pandoc-<IP_ADDRESS>
```

{: .box-note}
**Note:** There may be times when the development code is broken or
depends on other libraries which must be installed separately. Unless
you really know what you’re doing, install the last released version

Let's check if we have pandoc installed:

```
pandoc --version
```

You should see a message telling you which version of pandoc is installed
and giving you some additional information.

# Installing $ \LaTeX $

We need LaTeX to convert our markdown documents to pdf.
Pandoc actually converts the markdown to LaTeX and then
using pdflatex, compiles it into pdf.

You can install it on Debian based systems as follows:

```
sudo apt-get install texlive
```

On Fedora it should be:

```
sudo dnf install texlive-scheme-full
```

# Writing a document with pandoc and markdown

{: .box-warning}
**Warning:** Markdown is not standardised. Pandoc follows its own markdown
syntax. Changing the markdown variant used will be explained later in the article.

[Here is the pandoc Markdown Documentation.](https://pandoc.org/MANUAL.html#pandocs-markdown)

There isn't much difference between say kramdown and pandoc markdown
that a knowledgeable user should be aware of.

## Writing our first document

Let's write some random text on our test.md:

```kramdown
# Lorem ipsum dolor amet

The quick brown fox jumps over the lazy dog

*Damn!* I need to get that dog **working!**

## Betty's dog waking recipe

> Guarnteed to wake your dog!

***No batter making required***

Dog energizing list:

- Dog food
- Water
- Lazy cats
  * Tabby
  * Tomcat
- Squeaky Toy
- Frisbee

Instructions:

1. Pour some water on your sleepy dog
3. Feed it some food.
67. Play with it with the Squeaky Toy
7. Play with it with your Frisbee
2. Throw those lazy cats near by.

~~~
Some random code
~~~

Some `Code` between text
```
Now Let's convert this to pdf:

```
pandoc -f markdown -o test.pdf test.md
```

Now what we are essentially passing to pandoc is:

> Using markdown format, make test.pdf out of test.md

This is how my test.pdf looks:

<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://benjamin-philip.github.io/collection-assets/post/2020-09-04-pandoc-pdfs/test.pdf" width="500" height="375">

As you can see, markdown automatically numbers our numbered list and
rectifies our mistakes.

# Passing $ \LaTeX $ Parameters

Now our pdf looks like a very plain document without a title,
date or even a specified margin.

Pandoc supports using YAML metadata in the beginning for passing parameters

Let's beautify this a bit more:

```markdown
---
title: A Random story in a Farm
author: Benjamin Philip
Date: $\today$
---
```
Add this to the top of your document.

This is how our new pdf looks:

<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://benjamin-philip.github.io/collection-assets/post/2020-09-04-pandoc-pdfs/new-test.pdf" width="500" height="375">

# Specifying a different markdown variant

We can change the markdown variant by changing the format after -f:

For example for Github Flavoured Markdown:

```
pandoc -f gfm -o test.pdf test.md
```

Or for MultiMarkdown:

```
pandoc -f markdown_mmd -o test.pdf test.md
```

You can check all the input and output formats available
with the [pandoc User manual](https://pandoc.org/MANUAL.html)

# Inserting $\LaTeX$ snippets

You can insert LaTeX snippets by using the "$" sign.

For example to write $a^{2} + b^{2} = c^{2}$:

```
$a^{2} + b^{2} = c^{2}$
```

Or to write $Fe_{3}O_{4} + H_{2} \rightarrow Fe + H_{2}O$:

```
$Fe_{3}O_{4} + H_{2} \rightarrow Fe + H_{2}O$
```

In order to declare LaTeX script, the value immediately after the "$"
sign *should not be a numeral* .

You can also write the following using pandoc markdown's inline formatting:

```
a^2^ + b^2^ = c^2^
```

```
Fe~2~O~4 + H~2~ -> Fe + H~2~O
```

By using "^" for superscript and "~" for subscript.

However knowing how to directly use LaTeX is handy as you can't write things like this in Markdown!

$$S (\omega)=\frac{\alpha g^2}{\omega^5} \,
e ^{[-0.74{\{}{\frac{\omega U_\omega 19.5}{g}}{\}}^{-4}]}
$$

### Edit:

You can write raw snippets of LaTeX or HTML in markdown with the use of the [raw_attribute extension](https://pandoc.org/MANUAL.html#extension-raw_attribute).
Here is an example with LaTeX

````
```{=LaTeX}
This a \LaTeX code block
And here is Display Math:

$$S (\omega)=\frac{\alpha g^2}{\omega^5} \,
e ^{[-0.74\scaleleftright[.7ex]{\{}{\frac{\omega U_\omega 19.5}{g}}{\}}^{-4}]}$$
```
````
What do you use to convert doc types? Tell us in the comments below !


text:
# Utah Court Calendar API

The goal is to provide a JSON api from the [Utah Court Calendar Website](https://www.utcourts.gov/cal/)

## Getting Started

Clone the repo, run `npm install`, and run the scripts in the package.json

### Prerequisites

What things you need to install the software and how to install them

```
NodeJS (v8 or later)
Firebase setup for the SDK
```

## Running the tests

Need to write some, actually should write some first

### Break down into end to end tests

Need to test that each case has the appropriate info (can't really test validity of info as of yet)

```
Give an example
```

### And coding style tests

Just use prettier

```
npm run lint
```

## Deployment

Deployed via now (will be)

## Built With

* [NodeJS](http://www.dropwizard.io/1.0.2/docs/)
* [npm](https://maven.apache.org/) - Dependency Management
* [firebase](https://firebase.google.com/) - Realtime data storage

## Contributing

Please read [CONTRIBUTING.md] (yet to be written) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).

## Authors

* **Brian Summers** - *Initial work*

See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

## Acknowledgments

* Hat tip to anyone whose code was used
* Inspiration
* etc


text:
## Create SD card and write WiFi data to it

### Download the image and write it to the SD card

- Download the Raspbian image "2019-04-08-raspbian-stretch-lightningatm.gz" from the LightningATM Docs page
- [https://docs.lightningatm.me/lightningatm-setup/hardware-setup/assembly-and-software](https://docs.lightningatm.me/lightningatm-setup/hardware-setup/assembly-and-software)
- Write SD card image with Balena Etcher
- [https://www.balena.io/etcher/](https://www.balena.io/etcher/)
- Take out the SD card and put it aside

### Set up WiFi for the Raspberry Pi

Create a file named `wpa_supplicant.conf` with the following content:

```
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DE

network={
	ssid="Home"
	scan_ssid=1
	psk="XXXXXXXXXXXX"
	id_str="Home"
}

network={
	ssid="Mobil"
	scan_ssid=1
	psk="12345678"
	id_str="Mobil"
}
```

- Change country code to your [area code](https://www.arubanetworks.com/techdocs/InstantWenger_Mobile/Advanced/Content/Instant%20User%20Guide%20-%20volumes/Country_Codes_List.htm)
- The file contains two WiFi networks. "Home" for home use and the "Mobil" for mobility
- "Mobil" can be you hotspot on your cell phone
- Adjust the values for SSID and PSK as you like
- More networks can be added if needed
- Make sure the file ends with `.conf` and *not* with `.conf.txt`
- In the basic setting, Windows has the habit of hiding known file type extensions
- See "Folder Options/View/Advanced Settings"
- -> "Hide extensions for known file types" must be deselected!
- Slide the newly written SD card back into the slot of you computer
- -> The BOOT directory of the SD card is displayed
- Copy the new file `wpa_supplicant.conf` into it
- Insert the SD card into Raspberry Pi
- Note: After starting the Raspberry Pi for the first time, the ".conf" file disappears from the directory
- It can then be edited later via CLI by the command:
- `$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf` (the ssh connection is required, see next topic)

## Carry out basic software settings and updates

- Check the wiring again and then apply voltage
- Wait for a while and then look for the assigned WiFi IP in your own WiFi router
- Login to Raspberry Pi via CLI: `ssh<EMAIL_ADDRESS>- Confirm `The authenticity..` with `yes`
- Enter `raspberry` in the password prompt
- If you are logged in correctly you will now see: `pi@raspberrypi:~ $`

#### Adjust password and please remember!

```
	$ passwd
```

- Note: `$` stands for `pi@raspberrypi:~ $` in CLI and does not need to be typed

#### Perform an update, clone the ATM Github and install necessary additional options

```
	$ sudo apt update && sudo apt upgrade
	$ git clone https://github.com/21isenough/LightningATM.git
	$ cd LightningATM
	$ pip3 install -r requirements.txt
```

- Note: When updating, you sometimes have to confirm with `y` or `q`
- If everything was installed, disconnect the power supply and log in again via SSH and the the new password

---

#### [wiring](/docs/guide/wiring.md)  ᐊ  previous | next  ᐅ  [display](/docs/guide/display.md)

gha_language: Python


text:
# RW-UT

the functions `READ-TIME-STRING` and `WRITE-TIME-STRING` are for reading and writing
lisp universal time as strings

universal times stored as strings using `READ-TIME-STRING` and `WRITE-TIME-STRING`
have the following advantages over normal universal times stored as integers:

1. They are human readable and thus less prone to bugs
2. They are easier to use when interacting with external databases or other programs that expect times dates encoded as strings
3. They are ISO-8601 compliant (by default)

       CL-USER> (defvar now (get-universal-time))
       NOW

       CL-USER> now
<PHONE_NUMBER>

       CL-USER> (use-package :rw-ut)
       T

       CL-USER> (rw-ut:write-time-string now)
       "2008/07/20 15:49:51"

       CL-USER> (rw-ut:read-time-string *)
<PHONE_NUMBER>

       CL-USER> (eql * now)
       T

       CL-USER> (rw-ut:write-time-string now "MM-DD-YY")
       "07-20-08"

       CL-USER> (rw-ut:read-time-string * "MM-DD-YY")
<PHONE_NUMBER>

       CL-USER> (rw-ut:write-time-string * "YYYY/MM/DD)
       "2008/07/20"

## PATTERNS

`READ-TIME-STRING` and `WRITE-TIME-STRING` are designed to work with "patterns".
patterns are strings that control how `READ-TIME-STRING` and `WRITE-TIME-STRING`
read and write universal time as strings.

Patterns look like the psuedocode described in the the ISO-8601-2004_E document
in section 3.4.2 "Characters used in place of digits or signs" (dont worry, it's
also the same psuedocode used in the Wikipedia article on ISO-8601 ;-).

The `#\?` character introduces a "breakpoint". When writing (with `WRITE-TIME-STRING`),
everything after a breakpoint will be omitted if there is nothing non-boring
after it. when reading (with `READ-TIME-STRING`), everything after the breakpoint
can be omitted and will be assumed to be boring values ("boring values" means 1 for
month and day and 0 for everything else)

`READ-TIME-STRING` and `WRITE-TIME-STRING` currently understand the following
patterns:

    YYYY -- year, 4 digits
    YY   -- year, 2 digits
    MM   -- month, 2 digits
    M    -- month, 1-2 digits
    DD   -- day, 2 digits
    D    -- day, 1-2 digits
    hh   -- hour, 2 digits
    h    -- hour, 1-2 digits
    mm   -- minute, 2 digits
    m    -- minute, 1-2 digits
    ss   -- second, 2 digits
    s    -- second, 1-2 digits

The `#\\` char is the escape char, use it to read or write things that look like
patterns but aren't

##  BREAK POINTS (the `#\?`)

Anything after a `#\?` can be "omitted", since `READ-TIME-STRING` and
`WRITE-TIME-STRING` are lazy and don't like to deal with minumum values if they
don't have to (boring balues being 1 for dates and months, 0 for everything else)

    RW-UT> (write-time-string (read-time-string "2008") "YYYY-MM-DD")
    "2008-01-01"

     RW-UT> (write-time-string (read-time-string "2008") "YYYY-MM?-DD")
    "2008-01"

    RW-UT> (write-time-string (read-time-string "2008") "YYYY?-MM?-DD")
    "2008"

## THE DEFAULT PATTERN

The default pattern for both `READ-TIME-STRING` and `WRITE-TIME-STRING` is

    YYYY?/MM?/DD? hh?:mm?:ss

## TOLERANCE

`READ-TIME-STRING` will accept two kinds of junk:

1. Different literal characters that don't effect the length of the string. For example, the default pattern can read strings that look like this:

       YYYY-MM-DD hh:mm:ss

   but it can also read strings that look like this:

       YYYY-MM-DDThh:mm:ss

   _Note: numberic characters in the wrong spot will probably screw things up because
it looks like part of the date_

2. there can be junk at the _end_ of the string. so the default pattern can read string that look like this:

       YYYY-MM-DD hh:mm:ss

   but it can also read strings that look like this:

       YYYY-MM-DD hh:mm:ss.0000Z

## API

* `READ-TIME-STRING (string &optional (pattern "YYYY-MM-DD hh:mm:ss"))`

- - -

_Function_. Reads `STRING` according to the pattern string `PATTERN` and returns a
Universal Time intiger.

* `WRITE-TIME-STRING (ut &optional (pattern "YYYY-MM-DD hh:mm:ss"))`

- - -

_Function_. Writes the universal time integer `UT` as a string according to the
pattern string `PATTERN`


text:
# [Popo's Pot Stickers](http://food52.com/recipes/25605-popo-s-pot-stickers)
![alt text](https://images.food52.com/Mjos0mXryNRXlJWxcUA6JX76jaU=/753x502/03ca1661-00e1-42d0-839f-0c304e314aa7--13218366915_5cc5c0ce2f_c.jpg)
### Ingredients
|Quantity|Ingredient|
----------:|:-------
|2|tablespoons soy sauce|
|2|tablespoons ginger, minced|
|1|teaspoon salt|
|4 to 5|garlic cloves, minced|
|1|cup green chives, minced (or green onions)|
|2|tablespoons sesame oil|
|2|teaspoons ground Sichuan peppercorns (or white pepper)|
|1|egg|
|2|teaspoons cornstarch|
|1|package round gyoza/pot sticker wrappers|
|1|pound ground pork|
|1|cup cilantro, minced|

### Instructions

* In a large mixing bowl, combine pork with ginger, cilantro, garlic, chives, salt, and pepper. In another bowl, whisk together egg, sesame oil, soy sauce, and cornstarch. Mix this into the pork mixture with your hands, making sure it's well combined.

* Make sure your wrappers are completely defrosted before starting. Have a small dish of water nearby. Put one wrapper at a time one a clean working surface and place a scant teaspoon of filling in the middle. Using your fingers, dampen the edge of the wrapper and fold it into a half-moon. Push the edges together tightly; you may also decoratively crimp the edges if you like. Repeat until finished (with or without child labor!).

* Dumplings can be fried, baked or boiled, but the traditional Cantonese method for cooking pot stickers is a hybrid of frying and steaming. Heat a large non-stick skillet on medium high and lightly coat the bottom with oil. Place about 20 or so pot stickers in a tight circle, flat side-down. Allow them to sizzle in the pan for about 1 minute then add about a half cup of water. Cover immediately, as it will splatter. Reduce heat to medium-low and cook until you can see the moisture inside the dumplings boiling, about 10 minutes. Remove lid and increase heat to medium high. Allow the water to boil off and the bottoms to brown, about 5 minutes. Gently unstick the stickers with a spatula. Invert a plate over the pan then flip the whole circle of pot stickers onto the plate, browned side-up. Popo would serve these with a simple dipping sauce of equal parts soy sauce and vinegar, but they're great plain, too.

* You can freeze any extras before cooking them. You can use the same method to cook them from frozen, but it might take about 5 minutes longer.

repository: Brooke-white/RecipeParser

path: /Recipes/Popo's Pot Stickers.md

filename: Popo's Pot Stickers.md

repo_name: Brooke-white/RecipeParser


text:
##Building the Piper Installer

**Requires:**
* [Python 3.7](https://www.python.org/downloads/release/python-379/)
* [pyinstaller](https://www.pyinstaller.org/)

**Build Command(s):**
```
cd piper
pyinstaller "build_piper_installer.py" --console --onefile --name piper_installer
```

**NOTE:**
Make sure to move piper_installer.exe out of the "dist" directory it builds in, and into the parent directory, piper.

repository: leeshtao/piper

repo_name: leeshtao/piper