text:
php-htmlfilter
==============

Html filter extension written in Zephir

The purpose of this extension is to remove malicious code from small portions of html.

It is not a full-fledged html parser, nor is it a super secure filter.
Also, it surelly does not validate the html, nor will it aim to

it aims to be compliant, and to be add some security for filtering html,
if you have to actually allow inputed html back to your site.

If you have security concerns, use html purifier, the lib is awesome in that way.
It is not, however, the fastest lib. So consider this lib a tradeof between
super secure and fast. You have been advised.

The code follows under MIT license, and a copy should be acompaning the code.
May that not be the case, feel free to contact me.

Instalation
===========
You will need zephir to build this. (https://github.com/phalcon/zephir)

after you have it:

`cd htmlfilter && zephir build`

add the extension file to your modules
restart your webserver

```php
<?php

$dirtyHtml = '<span>this should have nothing more<script>alert(1);</script></span>';

$filter = new Htmlfilter\Filter();
$cleanHtml = $filter->filterHtml($dirtyHtml);

//this should produce: '<span>this should have nothing more</span>'
echo "<pre>$cleanHtml</pre>";
```

To configure the filter you may pass a new config parameter into filter:
```php
//disable all usage of <script>, and enables <aside>
$config = array(
    'configureElements' => array(
        array('name'=>'script', 'permission' => 0),
        array('name'=>'aside', 'permission' => 1),
    )
);

$filter = new HtmlFilter\Filter($config);
```

Or you may simply pass them into configureElements method:
```php
$filter = new HtmlFilter\Filter();

$elementConfiguration = array(
    array('name'=>'script', 'permission' => 0),
    array('name'=>'aside', 'permission' => 1),
);

$filter->configureElements($elementConfiguration);
```

repository: dulumao/php-htmlfilter

repo_name: dulumao/php-htmlfilter


text:
# Challenge Name

Author: [harsoh](https://github.com/harsoh)

## Description

Algorithmic challenge.

## Requirements

- Docker: [Dockerfile](./Dockerfile)

## Sources

```
Harshit always envisioned random number generators as rolling dices in the background and just printing the result of the roll. He loves prime numbers so he usually imagines
a dice with (10^9)+7 (a famous prime number) sides being rolled. To simulate random behaviour, Harshit decided to roll the dice n number of times, where n equals the 2^((10^9)+7) (th)
prime number. He wants to know the probability of the largest result among all these rolls being a prime number too. You can stop him from rolling dices till the Heat
Death of the universe by telling him the answer beforehand. Calculate the first 10 digits after the decimal place.

The flag will look like : csictf{first_10_digits_after_the_decimal_point}

Hint 1: Looking at outcomes for smaller dices could help.

Hint 2: The largest result of a dice roll is also a prime.
```

## Exploit

Looking at a simpler problem helps. Imagine a normal 6-sided dice, lets try to figure out the expected value of largest result among 1000 dice rolls. The probability of 6 not occurring among the 1000 rolls is very low and thus the expected value of largest element is very close of 6, something like 5.999... to be exact. Similarly when a (10^9)+7 sided die is rolled almost infinite ( the 2^((10^9)+7) (th) prime number will be very large ) times, the probability of (10^9)+7 being the largest element is almost 1, and since it is a prime number, the probability of a prime number being the largest element is also very close to 1.
<br />

The flag is:
```
csictf{9999999999}
```

license: MIT

repository: Pran-Ker/ctf-challenges

path: /miscellaneous/Prime Roll/README.md

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Pran-Ker/ctf-challenges


text:
# Setup Azure Kubernetes Cluster (AKS)

## Prerequisites

- A) Create or use an existing **Azure Account**
https://azure.microsoft.com/en-us/free/
- B) Create or use an existing AKS/kubernetes **cluster** https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough-portal
- C) Install the kubernetes managing tool "**kubectl**" (Windows: https://docs.microsoft.com/en-us/powershell/module/az.aks/install-azakskubectl, Linux: https://kubernetes.io/de/docs/tasks/tools/install-kubectl/)
- D) Install the kubernetes package manager tool "**helm**" (https://helm.sh/docs/intro/install/)

## Networking
To setup an kubernetes cluster on azure (aks) you need to setup some network properties manually.
It is caused by the lack of full UDP support using the integrated k8s load balancer feature.
To work around this issue we publish our endpoint using NodePort and setting up the Azure Load Balancer manually.
Further investigation is needed to verify what exactly is causing issues aks UDP load balancer.

#### Networking - Basic load balancer configuration (supporting scale out)
Using a cluster the configuration with load balancing looks similar to this:

```
[Client:Any] => [AKS LoadBalancer:7777] => [NodePort-1:30777] => [abune-server-1:7777]
                                        => [NodePort-2:30777] => [abune-server-2:7777]
					=> [NodePort-3:30777] => [abune-server-3:7777]
					...
					=> [NodePort-n:30777] => [abune-server-n:7777]
```

- **Port 7777/30777 (UDP)** is used for the core game communication.
- **Port 7778/30778 (TCP)** is used for internal akka cluster communication and also used for health probing, so that the load balancer could verify the node is up and running.

#### Networking - Health probes
Add a new health probe so the load balancer knows the service is up and running.
Because health probes do not support UDP we are using the akka cluster communication port.

- **Location**: [ResourceGroup] > Load Balancer (Kubernetes) > Settings > Health probe
- **Name**: AkkaCluster
- **Protocol**: TCP
- **Port**: 30778
- **Interval**: 5
- **Unhealthy threshold**: 2

#### Networking - Load Balancer
Add a new load balancing rule.

- **Location**: [ResourceGroup] > Load Balancer (Kubernetes) > Settings > Load Balancing Rules
- **Name**: GameServer
- **IP Version**: IPv4 (or IPv6)
- **Frontend IP address**: f.e. choose default <51.xxx.xxx.xxx>
- **Protocol**: UDP
- **Port**: 7777
- **Backend Port**: 30777
- **Backend Pool**: f.e. choose default <aksOutboundBackendPool>
- **Health Probe**: AkkaCluster (TCP:30778)
- **Session Persistence**: Client IP
- **Floating IP**: disabled
- **SNAT**: Use outbound rules ... (recommended)

#### Networking - Inbound firewall rules
Add firewall rules for inbound udp traffic.

- **Location**: [ResourceGroup] > Network Security Group (aks....-nsg) > Settings > Inbound security rules
- **Source**: Any
- **Source Port Ranges**: *
- **Destination**: Any
- **Destination Port Ranges**: 30777
- **Protocol**: UDP
- **Action**: Allow
- **Priority**: 100
- **Name**: GameServerRelay

### Installation / Deployment
To deploy to your AKS cluster you need to login. In this example we are using a specific k8s namespace to deploy the installation.

```
PS > az login
PS > kubectl create namespace abune
PS > kubectl config set-context --current --namespace=abune
PS > helm install abune-server ./deploy/helm/abune-server
PS > kubectl get all
```

You can use ´--app-version <VERSION>´ if you don't want to deploy the docker-version you checked out.

The output should so something like this:

```
NAME                                READY   STATUS    RESTARTS   AGE
pod/abune-server-7cd97ffb65-vjrn7   1/1     Running   0          11s

NAME                   TYPE       CLUSTER-IP     EXTERNAL-IP   PORT(S)                         AGE
service/abune-server   NodePort   <IP_ADDRESS>   <none>        7777:30777/UDP,7778:30778/TCP   11s

NAME                           READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/abune-server   1/1     1            1           11s
```

### READY TO GO!
Connect your game client!

### Debugging network issues
In some cases it could be necessary to analyse network issues.
Here are some random examples how to analyse network related issues.

#### Install network tools within pods
Connect to a pod
```
kubectl exec --stdin --tty abune-server-7cd97ffb65-vjrn7 -- /bin/bash
```
and install network tools.
```
apt-get update
apt-get install -y net-tools
apt-get install -y iputils-ping
apt-get install -y iproute2
apt-get install -y dnsutils
```

#### Check network information within pods
Use netstat to see all listener ports and active connections.
```
> netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp6       0      0 <IP_ADDRESS>:7778            :::*                    LISTEN
tcp6       0      0 <IP_ADDRESS>:7778        <IP_ADDRESS>:63657        ESTABLISHED
udp6       0      0 <IP_ADDRESS>:7777            :::*
```

Use netstat to get informations about active tcp connections (Health Probe or inter cluster communication)
```
> netstat -p tcp
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp6       0      0 abune-server-7cd97:7778 aks-agentpool-357:63657 ESTABLISHED 1/dotnet
```

You can check how many udp packets where sent.
```
> netstat -e -s
Udp:
<PHONE_NUMBER> packets received
    0 packets to unknown port received
    0 packet receive errors
<PHONE_NUMBER> packets sent
    0 receive buffer errors
    0 send buffer errors
```

You can check the kube-proxy configuration.
```
> netstat -e -s
Udp:
<PHONE_NUMBER> packets received
    0 packets to unknown port received
    0 packet receive errors
<PHONE_NUMBER> packets sent
    0 receive buffer errors
    0 send buffer errors
```

### Check network information from outside

You can check list all network namespaces.
```
> kubectl get service --all-namespaces
```


text:
# 2017 Participating User Groups

Please add your group below and keep the format and information as consistent as possible with others.

| Group name and location | Web and Social Media | Contact Name and Email |
| :------ | :------ | :------ |
| AtlantaPHP - Atlanta, GA, USA | [atlantaphp.org](http://atlantaphp.org)
[meetup.com/atlantaphp](http://www.meetup.com/atlantaphp)
[@AtlantaPHP](https://twitter.com/AtlantaPHP) | Chris Spruck -<EMAIL_ADDRESS>|
| Kansas City PHP UG - Kansas City, MO, USA | [kcpug.org](http://kcpug.org/)
[meetup.com/kcphpug](https://www.meetup.com/kcphpug/)
[@kcphpug](https://twitter.com/kcphpug) | Dan Holmes -<EMAIL_ADDRESS>/>John Kary - john at john kary dot net
Eric Poe -<EMAIL_ADDRESS>|


text:
---
name: Support
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Learning unit**
What learning unit it concerns, if applicable.

**Summary**
A clear and concise description of what the problem is.

**To Reproduce**
Steps to reproduce the behavior, if applicable.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.


text:
# AudioKit Examples

The primary source for AudioKit examples is the [AudioKit Cookbook](https://github.com/AudioKit/Cookbook). This app contains all of the mini-examples that used to be included with AudioKit.

Larger examples have been moved to their own repositories:

* [Analog Synth X](https://github.com/AudioKit/AnalogSynthX)
* [AudioKit Synth One](https://github.com/AudioKit/AudioKitSynthOne)
* [Audio Unit Manager](https://github.com/AudioKit/AudioUnitManager)
* [File Converter](https://github.com/AudioKit/FileConverter) - Updated for AudioKit 5
* [Flanger and Chorus](https://github.com/AudioKit/FlangerAndChorus) - Updated for AudioKit 5
* [MIDI File Edit And Sync](https://github.com/AudioKit/MIDIFileEditAndSync)
* [MIDI Sequencer](https://github.com/AudioKit/MIDISequencer)
* [MIDI Track View](https://github.com/AudioKit/MIDITrackView)
* [Nodality](https://github.com/AudioKit/Nodality)
* [Output Splitter](https://github.com/AudioKit/OutputSplitter)
* [Particles](http://github.com/AudioKit/Particles/)
* [Player Demo](https://github.com/AudioKit/PlayerDemo)
* [ROM Player](https://github.com/AudioKit/ROMPlayer)
* [SamplerDemo](http://github.com/AudioKit/SamplerDemo/)
* [Simple Audio Unit](https://github.com/AudioKit/SimpleAudioUnit)
* [Song Processor](http://github.com/AudioKit/SongProcessor)

repository: kylestew/AudioKit

branch_name: refs/heads/main

gha_license_id: MIT

repo_name: kylestew/AudioKit


text:
---
hrs_structure:
  division: '4'
  volume: '13'
  title: '32'
  chapter: '602'
  section: 602-51
type: hrs_section
tags:
  - Court
  - Judicial Proceeding
menu:
  hrs:
    identifier: HRS_0602-0051
    parent: HRS0602
    name: 602-51 How constituted
weight: 15080
title: How constituted
full_title: 602-51 How constituted
---
**PART II. INTERMEDIATE APPELLATE COURT**

Note

As enacted, the sections in this part were designated §§602-12 to 602-20.

Rules of Court

See generally Rules of the Intermediate Court of Appeals; Hawaii Rules of Appellate Procedure; Hawaii Court Records Rules; Hawaii Electronic Filing and Service Rules.

Law Journals and Reviews

Administering Justice or Just Administration: The Hawaii Supreme Court and the Intermediate Court of Appeals. 14 UH L. Rev. 271 (1992).

Judicial Review and Sexual Freedom. 30 UH L. Rev. 1 (2007).

**§602-51 How constituted.** The intermediate appellate court shall consist of a chief judge and five associate judges. The chief judge, who shall be specifically selected, shall supervise the administrative duties of the court. [L 1979, c 111, pt of §3; am L 1992, c 253, §2; am L 2001, c 248, §1]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# WirelessDisplayClient

This program is intended to be run on the 'presentation computer'. It provides
a GUI for the user to change the screen-resolutions of
both computers (local 'presentation-computer' and remote 'projecting computer'),
and start streaming. The method used for streaming (VNC, FFmpeg) can be
chosen with a ComboBox.

The following actions are performed via calls to the REST-API offered by the
ScriptingRestApiServer which is running on the remote 'projecting computer':

- Change the screen-resolution of the remote computer.
- Start a program, that prevents the display of the remote computer from
  blanking.
- Start a streaming-sink on the remote computer.

The ScriptingRestApiServer provides POST-Requests, which run, start and stop
scripts on the remote computer. The scripts then perform the above actions
by using external programs (either installed programs, or executables
in the [TirdParty]-folder of the remote computer).

On the local computer the following actions are performed

- Change the screen-resolution of the local computer.
- Start a sreaming-source on the local computer, that streams the local
  desktop to the remote computer.

The WirelessDisplayClient uses a `LocalScriptRunner`-class to run, start
or stop scripts on the local computer. Again the scripts on the local
computer use other programs to do the real work.

## Using this program

This program is a GUI-program with the following relevant elements:

- A connection-Panel with:
  * A TextBox where the user can enter the IP-Address of the remote computer.
  * A NumericUpDown for the port-Number, the remote ScriptingRestApiServer
    listens on.
  * A Connect-Button and Disconnect-Button to start/stop a connection to
    the remote ScriptingApiServer.
- A screen-resolutions-panel:
  * With four TextBoxes to show the initial and the current screen-resolution
    of the local and the remote computer.
  * Two ComboBoxes to select the screen-resolutions of the local and the
    remote computer when the streaming is started or stopped.
- A streaming-Panel with:
  * A ComboBox to choose the streaming-type (VNC, FFmpeg for now, but
    others can be added just by modifying the scripts and [config.json]).
  * A NumbericUpDown for choosing the port-number for streaming (the
    streaming-sink on the remote computer will listen on this port)
  * Start- and stop-Buttons to start and stop the streaming.
- A Status-Panel with:
  * A Listbox showing Log-lines

## Configuration

The configuration-parameters for each operating system (of the
presentation-computer) as well as platform-independent parameters can be changed
in [config.json]. There is no need to recompile after changing [config.json],
only be sure to edit the correct [config.json]-file. The configurable
parameters are:

- Names of local and remote scripts (without the platform-dependent
  file-extension).
- A template with command-line-arguments for each script. These templates
  contain placeholders, that are replaced with actual values when the
  script is executed, or when the remote computer is asked via a POST-request
  to execute a script.
- The name of the command used to execute a script (bash, cmd.exe).
- The template with command-line arguments passed to this command. These
  command-line-arguments contain placeholders for the path to the script to
  execute and for arguments passed to the script.
- The preferred screen-width for the computers. A screen-resolution, which
  is nearest to this preferred screen-width is pre-selected in the both
  ComboBoxes.

## Running the program

Just use `dotnet run`.

## Creating an executable

From within the folder `WirelessDisplayClient` run the following command:

```
dotnet publish -c Release -o ../WirelessDisplayClient_executable/ -r linux-x64 --self-contained false
cp config.json ../WirelessDisplayClient_executable/
```

On macOS replace `linux-x64` with `osx-x64` and on Windows with `win-x64` (On
windows also be sure to use `\` as filepath seperator instead of `/`).

The paremter `--self-contained true` creates a 'stand-alone' executable version.
This  paremeter can be set to `false`, if .NET-Core version 3.1 is installed on
the target system.

All necessary files are put in the directory
[WirelessDisplayClient_executable]. The executable to start is
[WirelessDisplayClient_executable/WirelessDisplayClient.exe] on Windows or
[WirelessDisplayClient_executable/WirelessDisplayClient] on Linux or macOS.

The configuration can still be changed, by changing the contents of
[WirelessDisplayClient_executable/config.json].

On Windows, you can create a link for example on the desktop, that links to
executable [WirelessDisplayClient.exe]. The program can then be run by
double-clicking this link. You can also create a
start-menu-entry, by creating the link in
[%AppData%\Microsoft\Windows\Start Menu\Programs].

On Linux, when starting the executable, the current-working-directory be the
folder where this executable resides:

[/path/to/WirelessDisplayClient_executable]

# Technical details

Please have a look at [README.md] in the folder [WirelessDisplayServer] first.
Everthing explained at the beginning of the section "Technical details" there
also applies to this project:

- How to create the project and add the references and packages.
- How to change the target-framework from dotnet-core 3.0 to 3.1
- The files created by the `dotnet new`-command.

The following files were created later:

- [config.json]
- The folder [Services] conatining the interface [IWDClientServices.cs] and
  the class [WDClientServices.cs] implementing this interface.

## Startup-code and dependency-injection

[App.xaml.cs] contains the whole startup-code. With the method
`realizeDependencyInjection()` the follwing things are done:

- A `loggerFactory` is created, which is used to create logger-objects for
  every other object, that needs do some logging. The loggers are injected into
  the contructors ot these objects.
- A `CustomConfigProvider`-instance is created to read the contents of
  [config-json].
- A `LocalScriptRunner`-object is instantiated using some values read from
  [config.json]. This object is used by the `WDClientServices` to execute
  scripts on the local presentation-computer. The `WDClientServices` "sees"
  the `LocalScriptRunner`-object only through its interface
  `ILocalScriptRunner`.
- A `RemoteScriptRunner`-object is instantiated, also using some values from
  [config.json]. This object is used by the `WDClientServices` to execute
  scripts on the remote projecting-computer. The `WDClientServices` "sees" the
  `RemoteScriptRunner`-object  only through its interface
  `IRemoteScriptRunner`.
- Finally, the already mentioned instance of `WDClientServices` is created,
  receiving references to a logger, the `(I)LocalScriptRunner`- and the
  `(I)RemoteScriptRunner`-objects, and some strings containing information
  about the local and remote scripts to run.

Then a `MainWindowViewModel`-instance is created. It receives a reference to
the just created `WDClientServices`-instance, and some data read from
[config.json] (for example a List with the used streaming-types). Again, the
`MainWindowViewModel`-instance "sees" the `WDClientServices`-object only
through its interface `IWDClientServices`. Using this object/interface, the
`MainWindowViewModel`-instance is able to run scripts on the local and on the
remote computer to change screen-resolutions, prevent the display of the
projecting-computer from blanking, and to start ans stop streaming.

Finally the code in [App.xaml.cs] creates a `MainWindow`-instance and
sets its `DataContext`-property to the just created
`MainWindowViewModel`-instance.

## Bindings between the MainWindow-view and the MainWindowViewModel

The `MainWindow`-object (the view) is defined in the two files
[Views/MainWindow.xaml] and [Views/MainWindow.xaml.cs]. The second file, the
so called 'code-behind' is nearly empty. It only ensures, that the async
`OnWindowClose()`-method of the `MainWindowModel` is called once, when the
user closes the window using the (X)-Button in the title-bar.

The file [Views/MainWindow.xaml] defines the GUI-Elements of the
MainWindow-view. Some of the values of xaml-Attributes have the form
`"{Binding ...}"`. These Attributes are bound to the corresponding
properties of the viewmodel (`MainWindowViewModel`).

For example: In [MainWindow.xaml] a TextBox is defined, that the user uses to enter the IP-Address of the remote computer:

```
<TextBox Grid.Row="1" Grid.Column="0" Text="{Binding IpAddress}" IsEnabled="{Binding !ConnectionEstablished}" VerticalAlignment="Center" Margin="4" MinWidth="120" Watermark="192.168.x.y" />
```

The `MainWindowViewModel`-class defines two corresponding properties:

```
private string _ipAddress="";
public string IpAddress
{
    get => _ipAddress;
    set => this.RaiseAndSetIfChanged(ref _ipAddress, value);
}
```

and

```
private bool _connectionEstablished = false;
public bool ConnectionEstablished
        {
            get => _connectionEstablished;
            set => this.RaiseAndSetIfChanged(ref _connectionEstablished, value);
        }
```

The code in `MainWindowViewModel` change enable or disable the TextBox by
setting the value of its `ConnectionEstablished`-property. The value, the
user typed into the TextBox can be read by the code in `MainWindowViewModel`
by reading the `IpAddress`-property. (The code could also set this property
to a certain string, and the TextBox then would contain this string. The user
then sees this string in the TextBox.)

## The program-logic defined in the MainWindowViewModel

When the user pushes the "Connect"-Button, the mehtod
`MainWindowViewModel.ButtonConnect_Click()` is executed. In this method the
following things happen:

- `WDClientServices.ConnectToServer()` is called, which only performs a
  POST-request to the remote ScriptingRestApiServer to see, if it can
  communicate to it.
- The current and the initial screen-resolutions of the local and the
  remote computer are fetched and displayed with four TextBlocks to the user.
- The available screen-resolutions on both computers are fetched and put
  as items in the two ComboBoxes. The user can later choose the
  local and remote screen-resolution with these two ComboBoxes.
- In each ComboBox the screen-resolution that fits best to the preferred
  screen-widths for streaming, given in [config.json] is pre-selected.

When the user then pushes the "Start streaming"-Button, the following things
happen:

- The local and the remote screen-resolution are changed to the selected
  values in the ComboBoxes.
- The script to prevent the display from blanking is started on the remote
  projecting-computer.
- The streaming-sink is started on the remote projecting-computer
- The streaming-source is started on the local presentation-computer
- In the ComboBoxes for both screen-resolutions, the initial screen-resolutions
  are pre-selected (They take effect, when the user stops the streaming).

When the user pushes the "Stop streaming"-Button (or the "Disconnect"-Button,
or closes the Application), the following things happen:

- The local streaming-source is stopped.
- The remote streaming-sink is stopped.
- The remote script to prevent the display from blanking is stopped.
- The local and the remote screen-resolutions are set to the values selected
  in the ComboBoxes (which are the previously preselected initial
  screen-resolutions, if the user didn't select another value).
- Again, the screen-resolutions that fit best to the preferred
  screen-widths for streaming, given in [config.json] are pre-selected in the
  ComboBoxes (in case the user wants to start the streaming again).

repository: lzukw/WirelessDisplay

repo_name: lzukw/WirelessDisplay


text:
Compiling
=========

Compiling the plugin yourself can lead to further speed improvements
because the optimization flags used by different compilers vary on
different hardware and operating systems.  However, this is only
recommended on Linux and OSX systems, where compiling is relatively
easy.  In the Linux server where I use Stata, a locally compiled plugin
ran 20-50% faster.

While compiling the plugin locally might also help with troubleshooting
if the plugin failed to load, this scenario should be very rare.  Most
systems should load the pre-compiled plugin; if yours doesn't, please
file a bug report.

### Requirements

!!! tip "Pro-tip"
    Install the newest version of `gcc` to get the most out of compiling
    the plugin locally.

You will, at a minimum, need

- `git`
- The GNU Compiler Collection (`gcc`)

The current version of gtools was compiled using `gcc` versions 8
(Linux), 7 (OSX), and 5 (Windows). The plugin additionally requires:

- v2.0 of the [Stata Plugin Interface](https://stata.com/plugins/version2) (Stata 13 and earlier).
- v3.0 of the [Stata Plugin Interface](https://stata.com/plugins) (Stata 14 and later).
- [`centaurean`'s implementation of SpookyHash](https://github.com/centaurean/spookyhash)

However, I keep a copy of Stata's Plugin Interface in this repository, and I
have added `centaurean`'s implementation of SpookyHash as a submodule.  Hence
as long as you have `gcc`, `make`, and `git`, you fill be able to compile the
plugin following the instructions below.

On OSX, you can get `gcc` and `make` from xcode. On windows, you will need

- [Cygwin](https://cygwin.com) with `gcc`, `make`, `x86_64-w64-mingw32-gcc-5.4.0.exe`
  (Cygwin is pretty massive by default; I would install only those packages).

### Compilation

```bash
git clone https://github.com/mcaceresb/stata-gtools
cd stata-gtools
git submodule update --init --recursive

# Stata 14.0 and earlier
make clean SPI=2.0 SPIVER=v2
make all   SPI=2.0 SPIVER=v2

# Stata 14.1 and later
make clean SPI=3.0 SPIVER=v3
make all   SPI=3.0 SPIVER=v3
```

### Unit tests

From a stata session, run
```stata
do build/gtools_tests.do
```

(Note this can take several hours.)  If successful, all tests should
report to be passing and the exit message should be "tests finished
running" followed by the start and end time.

### Troubleshooting

I test the builds using Travis and Appveyor; if both builds are passing
and you can't get them to compile, it is likely because you have not
installed all the requisite dependencies. For Cygwin in particular, see
`./src/plugin/gtools.h` for all the include statements and check if you
have any missing libraries.

Loading the plugin is a bit trickier. Historically, the plugin has
failed on some windows systems and some legacy Linux systems.  If this
happens please submit a bug report. The Linux issue is largely due to
versioning. That is, while the functions I use should be available on
most systems, the package versions are too recent for some systems.

Other than that, as best I can tell, all will be fine as long as you use
the MinGW version of gcc. That is, `x86_64-w64-mingw32-gcc` instead of
`gcc` in cygwin for the plugin.

repository: kgcsport/stata-gtools

repo_name: kgcsport/stata-gtools


text:
# Simple To-Do application on MERN Web Stack

Hello, welcome to my Project3 implementation file. I will share my implementation of a simple To-Do application on MERN web stack with screen shots and brief notes.

I set up my EC2 Instance of t2.micro family with Ubuntu Server 20.04 LTS (HVM) image.

![Proj3_1](https://user-images.githubusercontent.com/20802925/117697979-0bce4400-b1bb-11eb-9fb0-14541212c156.PNG)

![Proj3_2](https://user-images.githubusercontent.com/20802925/117697991-0f61cb00-b1bb-11eb-8d25-787c5c480216.PNG)

I downloaded & launched MobaxTerm and opened up a session to ssh into my Ubuntu EC2 instance. Very quick & easy to use.

![Proj3_3](https://user-images.githubusercontent.com/20802925/117698622-d24a0880-b1bb-11eb-9994-06417bddeaa6.PNG)

![Proj3_4](https://user-images.githubusercontent.com/20802925/117698628-d413cc00-b1bb-11eb-991b-17692b117b0d.PNG)

![Proj3_5](https://user-images.githubusercontent.com/20802925/117698643-d6762600-b1bb-11eb-83ab-e40505ca7d84.PNG)

## Step 1 - Backend configuration

I updated and upgraded my Ubuntu instance with the given commands.

![Proj3_6](https://user-images.githubusercontent.com/20802925/117699174-6d42e280-b1bc-11eb-8513-e1e91c477435.PNG)

![Proj3_7](https://user-images.githubusercontent.com/20802925/117699179-6fa53c80-b1bc-11eb-8461-e11b10dd1967.PNG)

![Proj3_8](https://user-images.githubusercontent.com/20802925/117699193-72079680-b1bc-11eb-8cfc-75bae9fca765.PNG)

![Proj3_9](https://user-images.githubusercontent.com/20802925/117699199-73d15a00-b1bc-11eb-8885-1319c4d6b77d.PNG)

# Install Node.js on the server

I installed Node.js using the appropriate commands

![Proj3_10](https://user-images.githubusercontent.com/20802925/117699634-fb1ecd80-b1bc-11eb-8ff7-d8fc3c88a5aa.PNG)

![Proj3_11](https://user-images.githubusercontent.com/20802925/117699640-fc4ffa80-b1bc-11eb-9214-11225bdc64e7.PNG)

![Proj3_12](https://user-images.githubusercontent.com/20802925/117699663-0245db80-b1bd-11eb-8267-67d4ffd56350.PNG)

Node.js & npm installation verified.

![Proj3_13](https://user-images.githubusercontent.com/20802925/117700096-7da78d00-b1bd-11eb-97a4-281b6f69d660.PNG)

# Application Code Setup

I created a new directory called Todo, verified the directory with the ls command and then changed into the new directory with the cd command.

![Proj3_15](https://user-images.githubusercontent.com/20802925/117702062-f0196c80-b1bf-11eb-87c2-b9fa1b83c27d.PNG)

I ran the npm init command to initialize the project and create the package.json file.

![Proj3_16](https://user-images.githubusercontent.com/20802925/117870593-36d89680-b294-11eb-91ef-e7676c1b4c53.PNG)

# Install ExpressJS

Install express

![Proj3_17](https://user-images.githubusercontent.com/20802925/117870873-9afb5a80-b294-11eb-82fe-a2f9269282f4.PNG)

I created the index.js file.

![Proj3_18](https://user-images.githubusercontent.com/20802925/117870989-c3835480-b294-11eb-8170-ad3038e629cc.PNG)

I installed the dotenv module.

![Proj3_19](https://user-images.githubusercontent.com/20802925/117872447-946de280-b296-11eb-96b9-d3543478fb6d.PNG)

I opened the index.js file using vim and pasted in the code provided.

![Proj3_20](https://user-images.githubusercontent.com/20802925/117874288-ad779300-b298-11eb-97f8-81df19f8762c.PNG)

I ran the node index.js command but didn't get the output specifying port 5000. I played around with the code a few times which still didn't work. Eventually I went into the index.js file again and deleted and recopied the code and it worked as expected. I edited my security group inbound rules to open TCP port 5000. Browser access using the public IP address was also successful.

![Proj3_24](https://user-images.githubusercontent.com/20802925/117875099-b026b800-b299-11eb-8195-02b1386b86e0.PNG)

![Proj3_25](https://user-images.githubusercontent.com/20802925/117875498-25928880-b29a-11eb-8fe0-27f0aac14337.PNG)

# Routes

I created the routes directory.

![Proj3_26](https://user-images.githubusercontent.com/20802925/117875966-b23d4680-b29a-11eb-8c00-8154ce10087a.PNG)

I changed into the routes directory and created the api.js file.

![Proj3_27](https://user-images.githubusercontent.com/20802925/117876142-eca6e380-b29a-11eb-9b9c-2d4319e8cab4.PNG)

I opened the api.js file and copied in the code.

![Proj3_28](https://user-images.githubusercontent.com/20802925/117876380-3bed1400-b29b-11eb-980d-c64e3dcd7c42.PNG)

![Proj3_29](https://user-images.githubusercontent.com/20802925/117876391-3e4f6e00-b29b-11eb-97b4-15e6c47b1e74.PNG)

# Models

I changed back to the Todo folder and installed Mongoose.

![Proj3_30](https://user-images.githubusercontent.com/20802925/117876679-90908f00-b29b-11eb-928d-a88b05e5b816.PNG)

The new models directory and todo.js file were created.

![Proj3_31](https://user-images.githubusercontent.com/20802925/117877103-0bf24080-b29c-11eb-9515-66005880dc2f.PNG)

I opened the todo.js file and pasted in the provided code.

![Proj3_32](https://user-images.githubusercontent.com/20802925/117877386-64c1d900-b29c-11eb-8f86-a778f1c66cf9.PNG)

![Proj3_99](https://user-images.githubusercontent.com/20802925/117879879-5d4fff00-b29f-11eb-91a6-6759669bca74.PNG)

I updated the api.js file with the code provided to make use of the new model.

![Proj3_33](https://user-images.githubusercontent.com/20802925/117880342-e7986300-b29f-11eb-8c0e-ebc0829a99f3.PNG)

# MongoDB Database

I created the MongoDB database following the instructions and retrieved the connection string.

![Proj3_36](https://user-images.githubusercontent.com/20802925/117881648-65a93980-b2a1-11eb-953b-92cda4cba158.PNG)

I created the .env file and opened it to add the database connection string.

![Proj3_40](https://user-images.githubusercontent.com/20802925/117882032-d4869280-b2a1-11eb-801b-77ec8c9da819.PNG)

![Proj3_41](https://user-images.githubusercontent.com/20802925/117882121-ea945300-b2a1-11eb-9844-4ea7aabb2291.PNG)

I then updated the index.js file with the code provided

![Proj3_42](https://user-images.githubusercontent.com/20802925/117883452-56c38680-b2a3-11eb-8c08-7cd359689eaa.PNG)

![Proj3_43](https://user-images.githubusercontent.com/20802925/117883464-588d4a00-b2a3-11eb-8207-62ff0ebd6654.PNG)

I proceeded to start my server using the node index. js command. I was unable to connect to my database and got an error message.

![Proj3_44](https://user-images.githubusercontent.com/20802925/117884232-465fdb80-b2a4-11eb-8cc8-6e0af8b88a1c.PNG)

I decided to see if I could find a way to resolve the error so I performed a google search using the text from the error message.

![Proj3_50](https://user-images.githubusercontent.com/20802925/117884676-d56cf380-b2a4-11eb-8b91-4e1726972532.PNG)

![Proj3_51](https://user-images.githubusercontent.com/20802925/117884684-d7cf4d80-b2a4-11eb-9f59-a7aa6912d61f.PNG)

One of the solutions suggested a password update of the database using the autogenerate password function so I tried that.

![Proj3_46](https://user-images.githubusercontent.com/20802925/117885027-372d5d80-b2a5-11eb-9e8f-d22b749df7ac.PNG)

![Proj3_47](https://user-images.githubusercontent.com/20802925/117885033-38f72100-b2a5-11eb-8618-e1f09641156d.PNG)

![Proj3_48](https://user-images.githubusercontent.com/20802925/117885036-3b597b00-b2a5-11eb-8098-90c7aaad1f58.PNG)

I then updated my connection string in the .env file. I ran the node index.js command again and was able to connect successfully to the database :)

![Proj3_49](https://user-images.githubusercontent.com/20802925/117885412-bf136780-b2a5-11eb-8abd-3435db698c21.PNG)

![Proj3_45](https://user-images.githubusercontent.com/20802925/117885416-c175c180-b2a5-11eb-9571-79d385270362.PNG)

# Testing Backend Code without Frontend using RESTful API

I downloaded and installed postman.

![Proj3_52](https://user-images.githubusercontent.com/20802925/117886163-b4a59d80-b2a6-11eb-9ecd-fa38d87225f2.PNG)

I created a post request to the API.

![Proj3_53](https://user-images.githubusercontent.com/20802925/117886378-051cfb00-b2a7-11eb-8377-2469d8c436ac.PNG)

![Proj3_54](https://user-images.githubusercontent.com/20802925/117886387-077f5500-b2a7-11eb-8401-964e5c7bed66.PNG)

I then created a get request and received a response.

![Proj3_56](https://user-images.githubusercontent.com/20802925/117886989-ebc87e80-b2a7-11eb-80cc-9cedfaa93b3d.PNG)

![Proj3_57](https://user-images.githubusercontent.com/20802925/117886992-ee2ad880-b2a7-11eb-97a1-5d18fc2c3969.PNG)

I attempted the optional task of sending a DELETE request using the ID and was able to do so successfully. I ran the GET request again and saw that the entry had been removed.

![Proj3_58](https://user-images.githubusercontent.com/20802925/117887597-e28be180-b2a8-11eb-9170-90c517022ba5.PNG)

![Proj3_59](https://user-images.githubusercontent.com/20802925/117887601-e455a500-b2a8-11eb-9416-848c9d030862.PNG)

![Proj3_60](https://user-images.githubusercontent.com/20802925/117887605-e6b7ff00-b2a8-11eb-8a74-c472763fd6d8.PNG)

# Step 2 - Frontend creation

I ran the create-react-app command. The client folder was also created.

![Proj3_61](https://user-images.githubusercontent.com/20802925/117888006-73fb5380-b2a9-11eb-9b69-d4e37b5359c1.PNG)

![Proj3_63](https://user-images.githubusercontent.com/20802925/117888304-c63c7480-b2a9-11eb-8070-02429a869451.PNG)

# Running a React App

Concurrently and nodemon were installed.

![Proj3_64](https://user-images.githubusercontent.com/20802925/117888536-216e6700-b2aa-11eb-9cf0-a7bfa2ce2db1.PNG)

![Proj3_65](https://user-images.githubusercontent.com/20802925/117888540-23d0c100-b2aa-11eb-8307-3933392db217.PNG)

![Proj3_66](https://user-images.githubusercontent.com/20802925/117888548-26331b00-b2aa-11eb-9384-397b5aa26b42.PNG)

![Proj3_67](https://user-images.githubusercontent.com/20802925/117888554-28957500-b2aa-11eb-8bc5-f88a91c2193f.PNG)

In my Todo folder I opened the package.json file and modified the code as directed.

![Proj3_68](https://user-images.githubusercontent.com/20802925/117888816-8629c180-b2aa-11eb-8c82-49ea29df0273.PNG)

![Proj3_69](https://user-images.githubusercontent.com/20802925/117888824-87f38500-b2aa-11eb-9761-44cf62883ba6.PNG)

# Configure Proxy in package.json

I changed to the client directory and opened the package.json file and added the key value pair as directed to enable browser access. I opened a TCP port 3000 on my security group inbound rules.

![Proj3_70](https://user-images.githubusercontent.com/20802925/117889595-bf166600-b2ab-11eb-843a-9ae0d324f754.PNG)

![Proj3_71](https://user-images.githubusercontent.com/20802925/117889601-c2115680-b2ab-11eb-8455-95bb24b0146c.PNG)

![Proj3_72](https://user-images.githubusercontent.com/20802925/117889802-0997e280-b2ac-11eb-927f-d08f8941995f.PNG)

I ran the npm run dev command but it failed to execute and I received some error messages. I watched the project 3 implementation video and discoverd that I had placed the key value pair in the package.json file in the wrong position. When I adjusted this my npm run dev command executed successfully.

![Proj3_73](https://user-images.githubusercontent.com/20802925/117890719-9d1de300-b2ad-11eb-99e1-e7f1faeec73c.PNG)

![Proj3_74](https://user-images.githubusercontent.com/20802925/117891012-14ec0d80-b2ae-11eb-8692-388c217d35dc.PNG)

![Proj3_93](https://user-images.githubusercontent.com/20802925/117891019-19b0c180-b2ae-11eb-8cb1-267105fa3a56.PNG)

![Proj3_95](https://user-images.githubusercontent.com/20802925/117891028-1d444880-b2ae-11eb-9bec-7e8993336597.PNG)

![Proj3_81](https://user-images.githubusercontent.com/20802925/117891170-58df1280-b2ae-11eb-939b-c7defbbe86a4.PNG)

# Creating your React Components

From the src directory in the client directory, I created the components folder. I then created three files Input.js, ListTodo.js and Todo.js.

![Proj3_76](https://user-images.githubusercontent.com/20802925/117891646-2e418980-b2af-11eb-8ed8-e15015f48241.PNG)

In the input.js the provided code was pasted.

![Proj3_77](https://user-images.githubusercontent.com/20802925/117891822-8082aa80-b2af-11eb-804c-f9eb8b9f75d3.PNG)

Axios was installed from the client folder.

![Proj3_79](https://user-images.githubusercontent.com/20802925/117892145-174f6700-b2b0-11eb-8185-4d8f5a544b74.PNG)

![Proj3_82](https://user-images.githubusercontent.com/20802925/117892234-3b12ad00-b2b0-11eb-8d9c-c2784949b62c.PNG)

From the components directory I opened the ListTodo.js file and pasted the code as directed.

![Proj3_83](https://user-images.githubusercontent.com/20802925/117892374-86c55680-b2b0-11eb-9940-ccc3b231599a.PNG)

![Proj3_84](https://user-images.githubusercontent.com/20802925/117892377-8927b080-b2b0-11eb-8c2e-8da363eb9cdb.PNG)

The Todo.js file was also modified with the code provided.

![Proj3_85](https://user-images.githubusercontent.com/20802925/117892573-e28fdf80-b2b0-11eb-84c2-da47734fc35f.PNG)

![Proj3_86](https://user-images.githubusercontent.com/20802925/117892579-e4f23980-b2b0-11eb-8b74-87a98f93ecd7.PNG)

From the src folder, the App.js file was modified as directed.

![Proj3_87](https://user-images.githubusercontent.com/20802925/117892724-2551b780-b2b1-11eb-9997-b49611028944.PNG)

![Proj3_88](https://user-images.githubusercontent.com/20802925/117892737-2b479880-b2b1-11eb-8420-ba7fcbdd26ef.PNG)

The App.css and index.css files are also modified as directed.

![Proj3_89](https://user-images.githubusercontent.com/20802925/117892937-73ff5180-b2b1-11eb-901c-f4093d222726.PNG)

![Proj3_90](https://user-images.githubusercontent.com/20802925/117892941-75c91500-b2b1-11eb-8da4-4503e3a82a2b.PNG)

![Proj3_91](https://user-images.githubusercontent.com/20802925/117892953-7792d880-b2b1-11eb-8641-43cd5035d71f.PNG)

![Proj3_92](https://user-images.githubusercontent.com/20802925/117892956-795c9c00-b2b1-11eb-9ba2-c050b7b1130a.PNG)

Going back to the Todo directory, the npm run dev command is executed. Update ToDo list.

![Proj3_100](https://user-images.githubusercontent.com/20802925/117895674-c98a2d00-b2b6-11eb-9753-737598cac16d.PNG)

Project completed. Thank you.

path: /Project 3.md

filename: Project 3.md


text:
# Trivia Backend API Service

The trivia backend is a REST API that serves questions and answers.  A running example can be seen on [api.reinvent-trivia.com](https://api.reinvent-trivia.com/api/docs/).

## Prep

Create an ECR repository for both the base Docker image and the application image.

```
aws ecr create-repository --region us-east-1 --tags Key=project,Value=reinvent-trivia --repository-name reinvent-trivia-backend

aws ecr create-repository --region us-east-1 --tags Key=project,Value=reinvent-trivia --repository-name reinvent-trivia-backend-base
```

Create AWS Certificate Manager certificates for the 'api' and 'test-api' subdomains, then put the unique ARN of those certificates in an AWS Systems Manager Parameter Store parameter.

```
aws ssm put-parameter --region us-east-1 --tags Key=project,Value=reinvent-trivia --name CertificateArn-api.reinvent-trivia.com --type String --value arn:aws:acm:...

aws ssm put-parameter --region us-east-1 --tags Key=project,Value=reinvent-trivia --name CertificateArn-test-api.reinvent-trivia.com --type String --value arn:aws:acm:...
```

## Customize

Replace all references to 'reinvent-trivia.com' with your own domain name.

## Build Docker images

The base image Dockerfile can be found in the [base](base/) folder.  In the backend pipeline modeled in the "[pipelines](../pipelines/)" folder, the base image is built in one "base image" pipeline, which triggers another pipeline for the main application.  In the main application pipeline, the base image URI is replaced in the main Dockerfile with the latest base image that triggered the pipeline.

Locally, it can be built with the following commands.  Follow the "push commands" instructions in the ECR console to push them into the ECR repository.

```
docker build -t reinvent-trivia-backend-base:release base/

docker build -t reinvent-trivia-backend:latest .
```

## Provision using infrastructure as code

There are three options in the [infra](infra/) folder for provisioning and deploying the backend services.

### ECS on Fargate

The [cdk](infra/cdk/) folder contains examples of how to model this service with the [AWS Cloud Development Kit (AWS)](https://github.com/awslabs/aws-cdk) and provision the service with AWS CloudFormation.  See the [pipelines](../pipelines/) folder for instructions on how to continously deploy this example.

To deploy the Typescript example, run the following.
```
npm install -g aws-cdk

npm install

npm run build

cdk synth -o build --app 'node ecs-service.js'

cdk deploy --app ecs-service.js TriviaBackendTest

cdk deploy --app ecs-service.js TriviaBackendProd
```

### ECS on Fargate, using CodeDeploy blue-green deployments

The [codedeploy-blue-green](infra/codedeploy-blue-green/) folder contains examples of the configuration needed to setup and execute a blue-green deployment with CodeDeploy: CodeDeploy appspec file, ECS task definition file, ECS service, CodeDeploy application definition, and CodeDeploy deployment group.

The non-service infrastructure (load balancer, security groups, roles, etc) is modeled and provisioned with the AWS CDK.  A sample pre-traffic CodeDeploy hook is modeled and provisioned with CloudFormation.

To deploy this example, run the following in infra/codedeploy-blue-green.
```
npm install -g aws-cdk

./setup.sh <S3 bucket for storing temporary artifacts>
```

See the [pipelines](../pipelines/) folder for instructions on how to continuously deploy this example.

### EKS on Fargate

The [cdk](infra/cdk/) folder contains examples of how to model this service with the [AWS Cloud Development Kit (AWS)](https://github.com/awslabs/aws-cdk) and deploy it to EKS on Fargate.  Note that this example does not currently have a continuous deployment pipeline example.

First, install [kubectl](https://github.com/kubernetes/kubectl) and [eksctl](https://github.com/weaveworks/eksctl).

Then install CDK and the required Node dependencies.

```
npm install -g aws-cdk
npm install
```

Next, modify the `TriviaBackendStack` parameters at the bottom of `eks-service.ts` to suit your environment. The value to use for `oidcProvider` will not be available until after the cluster has been deployed for the first time and the rest of the instructions below have been followed, so leave that line commented out.

Now compile the Typescript example and deploy the initial infrastructure:

```
npm run build
cdk deploy --app eks-service.js TriviaBackendProd
```

Once that's finished, you'll need to associate an IAM OIDC Provider to the cluster and obtain the provider URL:

```
eksctl utils associate-iam-oidc-provider --region <insert cluster region here> --cluster <insert cluster name here> --approve

aws eks describe-cluster --name <insert cluster name here> --query "cluster.identity.oidc.issuer" --output text | sed -e "s/^https:\/\///"
```

Copy the `oidc.eks.<region>.amazonaws.com/id/<hexadecimal string>` value that is displayed as output, paste it into the `oidcProvider` parameter value in `eks-service.ts`, uncomment the line, then run `npm run build` and `cdk deploy --app eks-service.js TriviaBackendProd` again.

Run the `aws eks update-kubeconfig` command that is output by CDK next to `TriviaBackendProd.FargateClusterConfigCommandXXXXXXXX = `, then check the status of your cluster using `kubectl get all --all-namespaces`. You may see one or more pods stuck in a `Pending` state, which could happen during the initial creation if Kubernetes tried to schedule them before CDK could finish creating the necessary Fargate Profile.

Your first troubleshooting step should be to rollout a "new" deployment using `kubectl rollout restart -n <namespace> deployment <deployment-name>`, for example:

```
kubectl rollout restart -n kube-system deployment coredns
kubectl rollout restart -n reinvent-trivia deployment api
... etc ...
```

Once the rollout process is complete, `kubectl get all --all-namespaces` will show everything in the `Running` state, and you'll see a `{status:ok}` response when visiting `https://<your api domain name here>` in your browser.


text:
jsreport node.js client is a wrapper around [jsreport api](https://jsreport.net/learn/api) allowing to connect to a remote jsreport server, render pdf reports and operate on the entities. It supports both local [on-premise](https://jsreport.net/on-prem) jsreport server as well as jsreport [online SaaS](https://jsreport.net/online).

## Installation
> npm install @jsreport/nodejs-client

## Initialization

`jsreport-client` package returns function with parameters `url`, `username` and `password` where only server `url` is mandatory. Function returns `Client` object representing facade to remote jsreport server running on specified `url`.

```js
const client = require("@jsreport/nodejs-client")("http://myserver:5488", "admin", "mypassword")
```

## Rendering reports
`Client` instance contains `render` method that triggers remote report rendering process and returns a promise. `Render` parameter is a request object that is posted to the jsreport server. It needs to contain a `template` property representing a reference to the existing jsreport template using `shortid` or raw definition of the template. Row definition typically defines `content`, `helpers`, `recipe` and `engine` property. Second but optional property of request is `data` representing report input data. See [API](https://jsreport.net/learn/api) documentation for details.

```js
const client = require('@jsreport/nodejs-client')('http://localhost:5488')

async function render () {
  const res = await client.render({
    template: {
      content: 'hello {{someText}}',
      recipe: 'html',
      engine: 'handlebars'
    },
    data: { someText: 'world!!' }
  })

  console.log(res.headers)
  const bodyBuffer = await res.body()
  console.log(bodyBuffer.toString())
}

render().catch(console.error)
```

## Chaining response stream
Object returned in callback of `render` method is a report stream and can be piped to the file or also directly to the [express](http://expressjs.com) response. Response already contains all the proper headers and can by directly opened in the browser.
```js
app.get('/report', (req, res, next) => {
  client.render({
    template: { content: 'Hello World', recipe: 'chrome-pdf', engine: 'none' }
  }).then((response) => response.pipe(res))
    .catch(next)
})
```

## Handling request timeout

Optionally you can pass second parameter to the `render` function containing additional options of the made http request. These options are passed to the [request](https://github.com/request/request) module making actual rest call.  Most likely you should be interested in the timeout property:

```js
client.render({
    template: {...}
}, { timeout: 5000 })
```

repository: jsreport/docs

gha_language: HTML

repo_name: jsreport/docs


text:
"It's 5:45pm. We'll just head upstairs and get some rest.  My friends laid down to take naps, while I worked on how I was going to get from Munich to Prague to catch my next flight.

At eight, we were going to meet up with one or two people from the walking tour of Munich we went on earlier that day and go out to a beer hall. They were going to meet up with us at the bar in the basement of the hostel at 8pm.

Well, 8:10 rolls around, and everyone is still asleep. 8:15, someone stirs and sleepily asks if we should go out or stay in. We decide we should go out, somewhat out of guilt for our new friends who were waiting for us.

And we had the best time.

A new girl staying in the hostel joined us, and we went to a beer hall. For Americans who have never experienced a beer hall, think a school cafeteria, but with lots of character, personality, people, and (obviously) lots of beer.

Almost immediately after we sat at an extended picnic table, I made eye contact with two Brazilians across the room. Without really thinking, I waved them over. They got up and started walking towards us.

"Oops. Guys, I think I just invited these two people to join us." I said just as they sat down. Luckily, Brazilians are super social and they immediately jumped into the conversation.

And they were awesome.

We ended up Googling hilarious fake animals from our home countries (drop bears, anyone?), drawing (very, very, very bad) portraits of each other, and pulling pranks on each other. They changed up the dynamic of the group, livened up the conversation and brought even more internationality to the group (which was currently Americans, Australians, and Brits).

I'm meeting a friend in Munich on Monday night. I have to be at the airport in Prague on Tuesday by 3:50pm for a flight that I _cannot_ miss. The only flights that would get me from Munich to Prague in time on Tuesday were $800\. The trains were all too slow. I found a bus that _would work._ Barely. But it's be sketchy and risky. And the consequences of failure would be pretty huge.

Then I found a carpooling service called BlaBlaCar. A guy named Simone had posted that he was driving from Munich to Prague on Tuesday morning. For about $50, I could ride with him.

Many people would say no. What if he bails? What if he's sketchy? What if the ride is super awkward?

All that might happen... but what if it doesn't?

***

Picture is of Munich at sunset. To get this picture, we climbed 91 meters (about 400 stairs) to the top of St. Peters Church, which was built in 1158\.

Today we went on a walking tour of Munich. The tour guide was pretty awful, but we met some new friends, so definitely a net positive. We walked through the English Gardens, which is apparently 2 to 3 times the size of Central Park. Which is already huge. We took naps, then went to an amazing beer hall.

People often wonder how I can have a good time at bars, even though I don't drink. This beer hall was a perfect example of how to have an amazingly good time. Maybe a full post on the beer hall later.

*   Communicate: Yes.
*   Write: Yes.
*   PT: It's 4am, but I'm going to go do it as soon as I hit the "submit" button on this post.
*   Meet someone new: Yes! Five people today. Two from the tour, one was another traveler from the hostel, and then two people I randomly waved over to sit with us at the beer hall.
*   Do something new: Yes. Went to a beer hall. Bonus: Drew a picture with someone else while we both held onto the pen and were trying to draw a portrait of someone at the same time.


text:
__Description__: Should be able to import yaml a file and add all the yaml Object in as classes if the option of `setClass` is `true`

```
<class-one>:
  <class-data>

<class-two>:
  <class-data>
```

__Notes__

+ The idea behind this is you could just have one or a few large-ish yaml class flies and then just import them at entry and boom, you got class galor

repository: ctr-lang/ctr

gha_language: CSS

repo_name: ctr-lang/ctr


text:
# DeepDream

> :warning: **If you don't have a gpu with cuda, the style transfer execution time will be much longer**

# Prerequisites
Python >=3.8.10
# How to Install
```
sudo pip3 install -r requirements.txt
```
# How to Use
if you are going to test with the example images, just run:
```
python3 main.py
```
### Based on
* [Pytorch monkeys a deep dream](https://www.kaggle.com/paultimothymooney/pre-trained-pytorch-monkeys-a-deep-dream)

repository: bobTheHands/DeepDream

repo_name: bobTheHands/DeepDream


text:
# Add A Cookbook

Sensei uses _Cookbooks_, i.e. collections of Recipes, that are designed to help you with a particular technology or for your team's coding standards.

To help with this tutorial, we have created a [Cookbook on GitHub](https://github.com/SecureCodeWarrior/sensei-edutools-recipes) that you can add to this project.

In this lesson we will install the Cookbook from Github because we'll need it to complete the next task.

## To install the Cookbook.

Open the Sensei Cookbooks manager, either by:

- clicking on the **Sensei Cookbooks** tab
- choose "**Recipe Editor**" from the main "**Sensei**" menu

Now we want to add a reference to the Cookbook on GitHub.

- Click the "+" button to add a new cookbook.
- Give it a CookbookId to uniquely identify it in this project e.g. "SenseiEdutools"
- For the location, use the URL of our recipe repo:
    - `https://github.com/SecureCodeWarrior/sensei-edutools-recipes.git|main`

> **Note:**
>
> _The Github url is the repo path, with the addition of the branch to use._

Once you've installed it, Sensei will start analysing your code in real-time to find any Recipes that match.

If you've done this correctly then you'll see the cookbook in the "Locally configured cookbooks" list, and when you start the next task you see some code that has been highlighted by Sensei as being in error.

url: https://raw.githubusercontent.com/SecureCodeWarrior/sensei-edutools/6e770bc5acbb63d1609b7926273b572b54f93397/lesson1 - setup/task2 - add a cookbook/task.md

repository: SecureCodeWarrior/sensei-edutools

repo_name: SecureCodeWarrior/sensei-edutools


text:
# Internationalisation

We use [ttag](https://ttag.js.org/) for i18n.

## 1. Setup

### Create `.po` file

Run `LOCALE=<language code> npm run ttag:init` to generate a `.po` file.

Please refer to [this page](https://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html) for available languages. `<language code>_<country>` is also acceptable, like `zh_TW`.

### Update `.po` file

Run `LOCALE=<language code> npm run ttag:update` to update the `.po` file you just created. Fill in your translations in the `.po` file.

repository: cofacts/rumors-fb-bot

branch_name: refs/heads/dev

gha_language: JavaScript

repo_name: cofacts/rumors-fb-bot


text:
Attending: timmywil, jbedard, mgol, gibson042

Location: https://gitter.im/jquery/meeting

## Travis build on Sizzle is green!

## Issues and PRs needing review
* https://github.com/jquery/jquery/pull/4454
  - Accepted, Gibson to try to reduce from current +43 +37 bytes
  - https://github.com/jquery/sizzle/pull/453
* https://github.com/jquery/jquery/pull/4462 Reduce setDocument
  - LGTM
* https://github.com/jquery/jquery/pull/4467
  - Ajax: Simplify jQuery.ajaxSettings.xhr
* https://github.com/jquery/jquery/pull/4466
  - Build: Remove the external directory, read from node_modules directly
* https://github.com/jquery/sizzle/pull/453
  - Selector: Leverage the :scope pseudo-class where possible
  - The backport to Sizzle so that it also lands in 3.x
* https://github.com/jquery/sizzle/pull/452
  - Restoring some optimization accidentally removed during ESLint introduction
  - Needs feedback from @gibson
* https://github.com/jquery/jquery-release/issues/99
  - PR: https://github.com/jquery/jquery-release/pull/100
  - mgol: we probably can’t use it? ✓

## Docs
* https://github.com/jquery/api.jquery.com/milestone/2
  - Mainly need to get 3.0 deprecations in the docs
* https://github.com/jquery/api.jquery.com/issues/970
  - Sizzle home page is broken
  - https://github.com/jquery/sizzle/issues/447
  - Redirect pages that reference sizzlejs.com to wiki

## Others
* Archive all repos under https://github.com/jquery-archive
  - Probably need Dave to do this.
* Move https://github.com/jquery/jquery-compat-dist into jquery-archive & archive it
  - yes

## Swarm check
* http://swarm.jquery.org/job/9206
  - Partial pixel failure on Chrome Android 8
  - 1 pixel diffs in iOS 11.4

gha_license_id: NOASSERTION


text:
# Machine Learning for Finance (FN 570) 2021-22 Module 1 (Fall 2021)

## Announcements
* Email is the preferred method of communication. Class mailing list will be created as<EMAIL_ADDRESS>But, the announcements will be made in DingTalk group chat.
<!--
* [Midterm exam solution](files/MLF2018_Midterm.pdf) is uploaded
* Midterm exam on Friday will be in __Rm 321__
* Python Crash Course will be on 9.12 (Wed) **1:30 PM**. Class mailing list created.
-->

## Course Resources
* Course slides: [Intro](files/MLF_Intro.pdf) | [Regression](files/MLF_Regression.pdf) | [SVM/KNN/Tree](files/MLF_SVM_KNN_Tree.pdf) | [SVD/PCA/LDA](files/MLF_SVD_PCA_LDA.pdf) | [Hyperparameter](files/MLF_Bias_Variance_Metric.pdf) | [Neural Network](files/MLF_Neural_Network.pdf) | [Graphical Model](files/MLF_Graphical_Model.pdf)
* Project: [Current](Project.md) | [2019](past-years/2019.M3/Project.md) | [2018](past-years/2018.M1/Project.md) | [2017](past-years/2017.M3/Project_List.md) | [2016](past-years/2016.M3/Project_List.md)
* Past years' exam: [2021](files/MLF2021_Midterm.pdf) | [2019](files/MLF2019_Midterm.pdf) (online take-home) | [2018](files/MLF2018_Midterm.pdf) | [2017](files/MLF2017_Midterm.pdf) | [Exams from Tom Michell's ML course](http://www.cs.cmu.edu/~tom/10701_sp11/prev.shtml) (Carnegie Mellon University)

<!--
* ### Data Proposal [__10.23 Tues__ class]
* ### Presentation [__11.09 Fri__ class]
-->

## Lectures:
No | Date | Contents
--- | :---: | ---
__01__ | 9.06 Mon | Course overview ([Syllabus](#syllabus)) \| Required software (Python, Github, PyCharm) \| Python crash course ([Basic](py/PythonCrashCourse_Derek_Banas.ipynb), [Numpy](py/PythonCrashCourse_Numpy.ipynb), Notebook Shorcut Keys)
__02__ | 9.09 Thur | __PML__ Ch. 1: Intro ([Slides](files/MLF_Intro.pdf)) \| Notations, Regression, Weight update ([Slides](files/MLF_Regression.pdf))
__03__ | 9.13 Mon | __PML__ Ch. 2: Perceptron, Adaline, Gradient descent, Stochastic Gradient Descent
__04__ | 9.16 Thur | __PML__ Ch. 3: Logistic Regression (LR) ([Slides](files/MLF_Regression.pdf)) and Support Vector Machine (SVM) ([Slides](files/MLF_SVM_KNN_Tree.pdf))
__05__ | 9.20 Mon | Pandas crash course ([Notebook](py/Pandas-CrashCourse.ipynb). Also see [Datacamp](https://www.datacamp.com/community/blog/python-pandas-cheat-sheet), [CheatSheet](https://pandas.pydata.org/Pandas_Cheat_Sheet.pdf)) \| __PML__ Ch. 3: KNN ([Slides](files/MLF_SVM_KNN_Tree.pdf))
__06__ | 9.23 Thur | __PML__ Ch. 3: [Code](https://github.com/PHBS/python-machine-learning-book-3rd-edition/blob/master/ch03/ch03.ipynb). Decision Tree ([Slides](files/MLF_SVM_KNN_Tree.pdf)).
__07__ | 9.27 Mon | __PML__ Ch. 4: Data Preprocessing, __PML__ Ch. 5: SVD/PCA ([Slides](MLF_SVD_PCA_LDA.pdf))
__08__ | 10.11 Mon | __PML__ Ch. 5: LDA ([Slides](MLF_SVD_PCA_LDA.pdf)), __PML__ Ch. 6: Bias-Variance, Cross-validation ([Slides](files/MLF_Bias_Variance_Metric.pdf))
__09__ | 10.13 Wed | __PML__ Ch. 6: Hyperparameter tuning, Evaluation Metric ([Slides](files/MLF_Bias_Variance_Metric.pdf))
__10__ | 10.14 Thur | __PML__ Ch. 6: Class imbalance ([Slides](files/MLF_Bias_Variance_Metric.pdf)), __PML__ Ch. 7: Ensenble Learning ([Slides](files/MLF_SVM_KNN_Tree.pdf)), Topics in Finance ML: Recession prediction ([Slides](files/MLF_Topic_RecessionPrediction.pdf))
__11__  | 10.18 Mon | Kernel Method ([Slides](files/MLF_Kernel_Method.pdf), __PML__ Ch 3, 5), __PML__ Ch. 8: Sentiment Analysis ([Slides](files/MLF_Sentiment.pdf))
__12__ | 10.21 Thur | Neural Network, Deep Learning, CNN ([Slides](MLF_Neural_Network.pdf), __PML__ Ch. 12)
__13__ | 10.25 Mon | Neural Network, Deep Learning, CNN ([Slides](MLF_Neural_Network.pdf), __PML__ Ch. 13-15)
__14__ | 10.28 Thur | ML in Finance Research ([Slides](files/MLF_Finance_Research.pdf)), Collaborative Filtering ([Slides](files/MLF_Col_Filtering.pdf))
__15__ | 11.01 Mon | __Midterm Exam__ ([Solution](files/MLF2021_Midterm.pdf))
__16__ | 11.04 Thur | __HSBC Guest Lecture [1/2]__
__17__ | 11.08 Mon | __HSBC Guest Lecture [2/2]__
__18__ | 11.11 Thur | Course Project Presentation

<!--
* __18__ (11.09 Fri)
* __17__ (11.06 Tues): Tensorflow / Keras ([XOR](py/TF_Keras_XOR.ipynb), [Iris](py/Keras_Iris.ipynb) based on [here](https://machinelearningmastery.com/multi-class-classification-tutorial-keras-deep-learning-library/))
* __16__ (11.02 Fri): Neural Network ([Slides](files/MLF_Neural_Network.pdf)), ML-related research presentation (LOOLSM)
* __15__ (10.30 Tues): Use of sklearn in __PML__ Ch. 10, Neural Network ([Slides](files/MLF_Neural_Network.pdf))
* __14__ (10.26 Fri): Use of sklearn in __PML__ Ch. 5/6/7
* __13__ (10.23 Tues): [Course Project Proposal](Project.md)
* __12__ (10.19 Fri): Midterm exam (Rm 321) ([Solution](files/MLF2018_Midterm.pdf))
* __NO CLASS__ on __10.16 Tues__
* __11__ (10.12 Fri): Confusion matrix, ROC curve, LOOCV ([Slides](files/MLF_Bias_Variance_Metric.pdf))
* __10__ (10.09 Tues): SVD/PCA/LDA ([Slides](files/MLF_SVD_PCA_LDA.pdf)) __PML__ Ch. 5, Hyperparameters ([Slides](files/MLF_Bias_Variance_Metric.pdf)) __PML__ Ch. 6
* __09__ (09.28 Fri): Data Preprocessing __PML__ Ch. 4, SVD/PCA/LDA ([Slides](files/MLF_SVD_PCA_LDA.pdf)) __PML__ Ch. 5
* __08__ (09.25 Tues): Kernel SVM/Bagging/RF ([Slides](files/MLF_SVM_KNN_Tree.pdf)) __PML__ Ch. 3
* __07__ (09.21 Fri):
* __06__ (09.18 Tues):
* __05__ (09.14 Fri):
* __04__ (__09.12 Wed__ instead of __10.16 Tues__): More [cheatsheets](https://ehmatthes.github.io/pcc/cheatsheets/README.html) also available in [MLF CMS](http://cms.phbs.pku.edu.cn/claroline/document/document.php?cidReset=true&cidReq=FN570).
* __03__ (09.11 Tues):
* __02__ (09.07 Fri):
* __01__ (09.04 Tues):
-->

## Homeworks:
* ### __Set 0: [Required Software]__ [Due by Thursday]
  * Register on [Github.com](https://github.com/) and let TA know your ID (by DingTalk). Make sure to user your __full real name__ in your profile. Accept invitation to the [PHBS organization](https://github.com/orgs/PHBS/people) from TA.
    * Create a designated repository `GITHUB_ID/PHBS_MLF_2021` for your HW and project. Tick `Initialize this repository with a README` and select `python` under `.gitignore`
    * Fork [PML repository](https://github.com/PHBS/python-machine-learning-book-3rd-edition) to your repository.
  * Install [Github Desktop](https://desktop.github.com/). Then __clone__ the PML repository to your local storage.
  * Install [Anaconda](https://www.anaconda.com/download/) Python distribution (__3.X version__, not 2.X version). Anaconda distribution is core Python + useful scientific computation libraries (e.g., numpy, scipy, pandas) + package management system (pip or conda)
  * Install [PyCharm](https://www.jetbrains.com/pycharm/) Community version. (Or Professional version after applying for [free student license](https://www.jetbrains.com/student/))
  * Send to TA the screenshots of (1) Github Desktop (showing the PML repository) (2) Jupyter Notebook (Anaconda) (3) PyCharm (See my [example](https://github.com/jaehyukchoi/PHBS_MLF_2021/blob/master/HW1/Preprocessing.ipynb)).
* ### __Set 1: [Playing with Pandas dataframe]__ [Due by 9.27 Monday]
  * The goal of this HW is to be familiar with `pandas` package and dataframe. Due to limited time, I cannot cover pandas in class. You need to teach yourself. Remenber that there's many answers to do the task I am asking below. Use your own way.
  * For this HW, we will use [Polish companies bankruptcy data Data Set](http://archive.ics.uci.edu/ml/datasets/Polish+companies+bankruptcy+data) from UCI Machine Learning Repository. Download the dataset and put the 4th year file (`4year.arff`) in your `YOUR_GITHUB_ID/PHBS_MLF_2021/data/`
  * I did a basic process of the data (loading to dataframe and creating `bankruptcy` column). See my [github](https://github.com/jaehyukchoi/PHBS_MLF_2021/tree/master/HW1/)
  * We are going to use the following 4 features:
  `X1 net profit / total assets`, `X2 total liabilities / total assets`, `X7 EBIT / total assets`, `X10 equity / total assets`, and `class`
  * Create a new dataframe with only 4 feataures (and and `Bankruptcy`). Properly rename the columns to `X1`, `X2`, `X7`, and `X10`
  * Fill-in the missing values (`nan`) with the column means. (Use `pd.fillna()` or See Ch 4 of `PML`)
  * Find the mean and std of the 4 features among all, bankrupt and still-operating companies (3 groups).
  * How many companies satisfy the condition, `X1 < mean(X1) - stdev(X1)` __AND__ `X10 < mean(X10) - std(X10)`?
  * What is the ratio of the bankrupted companies among the sub-groups above?
* ### __Set 2: [Classifiers]__ [Due by 10.11 Monday]
  * The goal of this HW is to be familiar with the basic classifiers __PML__ Ch 3.
  * For this HW, we continue to use [Polish companies bankruptcy data Data Set](http://archive.ics.uci.edu/ml/datasets/Polish+companies+bankruptcy+data) from UCI Machine Learning Repository. Download the dataset and put the 4th year file (`4year.arff`) in your `YOUR_GITHUB_ID/PHBS_MLF_2021/HW2/`
  * I did a basic process of the data (loading to dataframe, creating `bankruptcy` column, changing column names, filling-in `na` values, training-vs-test split, standardizatino, etc). See my [github](https://github.com/jaehyukchoi/PHBS_MLF_2021/tree/master/HW2/Classifiers.ipynb)
  * Select the 2 most important features using LogisticRegression with L1 penalty. (Adjust C until you see 2 features)
  * Using the 2 selected features, apply LR / SVM / decision tree. Try your own hyperparameters (C, gamma, tree depth, etc) to maximize the prediction accuracy. (Just try several values. You don't need to show your answer is the maximum.)
  * Visualize your classifiers using the `plot_decision_regions` function from __PML__ Ch. 3
  * Put your result in `YOUR_GITHUB_ID/PHBS_MLF_2021/HW2/Classifiers.ipynb`
* ### __Set 3: [PCA/Hyperparameter/CV]__ [Due by 10.21 Thursday]
  * The goal of this HW is to be familiar with PCA (feature extraction), grid search, pipeline, etc.
  * For this HW, we continue to use [Polish companies bankruptcy data Data Set](http://archive.ics.uci.edu/ml/datasets/Polish+companies+bankruptcy+data) from UCI Machine Learning Repository. Download the dataset and put the 4th year file (`4year.arff`) in your `YOUR_GITHUB_ID/PHBS_MLF_2021/HW3/`
  * Use the same pre-precessing provided in __Set 2__ (loading to dataframe, creating `bankruptcy` column, changing column names, filling-in `na` values, training-vs-test split, standardizatino, etc). See my [github](https://github.com/jaehyukchoi/PHBS_MLF_2021/tree/master/HW3/Classifiers.ipynb)
  * Extract 3 features using PCA method.
  * Using the selected features from above, we are going to apply LR / SVM / decision tree.
  * Implement the methods using pipeline. (__PML__ p185)
  * Use grid search for finding optimal hyperparameters. (__PML__ p199). In the search, apply 5-fold cross-validation.

***
# Syllabus

## Classes:
* Lectures: Monday & Thursday 1:30 – 3:20 PM
* Venue: PHBS Building, Room 231

## Instructor: [Jaehyuk Choi](http://www.jaehyukchoi.net/phbs_en)
* Office: PHBS Building, Room 755
* Phone: 86-755-2603-0568
* Email<EMAIL_ADDRESS>* Office Hour: TBA

## Teaching Assistance: 商陈诚 (Shang Chencheng)
* Email<EMAIL_ADDRESS>* TA Office Hour (Room 213/214): Monday & Thursday 7-9 PM

## Course overview
With the advent of computation power and big data, machine learning (ML) recently became one of the most spotlighted research field in industry and academia. This course provides a broad introduction to ML in theoretical and practical perspectives. Through this course, students will learn the intuition and implementation behind the popular ML methods and gain hands-on experience of using ML software packages such as SK-learn and Tensorflow. This course will also explore the possibility of applying ML to finance and business. Each student is required to complete a final course project.
__This year, the compliance analytics team in HSBC bank (Gunagzhou) will give 2 guest lectures to demonstrate how ML is developed and shared in banking industry.__

## Prerequisites
This course assumes prior knowkedge in probability/statistics and experience in Python. This course is ideally recommended for those who have taken introductory ML/AI courses from undergraduate program.

##  Textbooks and Reading Materials
### Primary textbook
* __PML__ (primary textbook): Python Machine Learning 3rd Ed. by Sebastian Raschka.
  * [Github](https://github.com/PHBS/python-machine-learning-book-3rd-edition) (PHBS fork)
### Other books and online courses
* __ISLR__: [An Introduction to Statistical Learning (with Applications in R)](http://faculty.marshall.usc.edu/gareth-james/ISL/) by James, Witten, Hastie, and Tibshirani
  * Python Implementation: [PHBS/ISLR-python](https://github.com/PHBS/ISLR-python) (PHBS fork)
* __Bishop__: Pattern Recognition and Machine Learning by Bishop (Microsoft)
* __ESL__:  [The Elements of Statistical Learning](https://web.stanford.edu/~hastie/ElemStatLearn/) by Hastie, Tibshirani, and Friedman
* __CML__: [Coursera Machine Learning](https://www.coursera.org/learn/machine-learning) by Andrew Ng
* __DL__: [Deep Learning](http://www.deeplearningbook.org/) by Goodfellow, Bengio, and Courville
* __AFML__: [Advances in financial machine learning](https://www.amazon.com/Advances-Financial-Machine-Learning-Marcos/dp/1119482089) by López de Prado
<!--
* __JPM-AI__: [Big Data and AI Strategies](http://valuesimplex.com/articles/JPM.pdf) by J.P. Morgan
-->

## Assessment / Grading Details
* Attendance 20%, Mid-term exam 30%, Assignments 20%, Course Project 30%
* Attendance: TBA Randomly checked. The score is calculated as __`20 – 2x(#of absence)`__. Leave request should be made 24 hours before with supporting documents, except for emergency. Job interview/internship cannot be a valid reason for leave.
* __Mid-term exam__: __11.1 Mon__. In-class open-book without computer/phone/calculator
* __Course project__: Data Proposal and Presentation. Group of up to ?? people.
* __Attendance__: checked randomly. The score is calculated as 20 – 2`x`(#of absence). Leave request should be made 24 hours before with supporting documents, except for emergency. Job interview/internship cannot be a valid reason for leave
* __Grade__ in letters (e.g., A+, A-, ... ,D+, D, F). __A- or above < 30% and B- or below > 10%__.


text:
 Simplify Landing Page From Indigo Minimalist Jekyll Template -

> This is a simple and minimalist template for Jekyll for those who likes to eat noodles.

And yeah, I like to eat noodles

***

## Setup

> 1. :star: to the project. :metal:
> 2. Fork the project [Indigo](https://github.com/sergiokopplin/indigo/fork)
> 3. Edit `_config.yml` with your data (check settings section)
> 4. Write some posts :bowtie:

> If you want to test locally on your machine, do the following steps also:
>
> 1. Install [Jekyll](http://jekyllrb.com), [NodeJS](https://nodejs.org/) and [Bundler](http://bundler.io/).
> 2. Clone the forked repo on your machine
> 3. Enter the cloned folder via terminal and run `bundle install`
> 4. Then run `bundle exec jekyll serve --config _config.yml,_config-dev.yml`
> 5. Open it in your browser: `http://localhost:4000`
> 6. Test your app with `bundle exec htmlproofer ./_site`
> 7. Do you want to use the [jekyll-admin](https://jekyll.github.io/jekyll-admin/) plugin to edit your posts? Go to the admin panel: `http://localhost:4000/admin`. The admin panel will not work on GitHub Pages, [only locally](https://github.com/jekyll/jekyll-admin/issues/341#issuecomment-292739469).

## Settings

The settings part is maintained as it was built from the Indigo project:

> You must fill some informations on `_config.yml` to customize your site.
>
> ```
> name: John Doe
> bio: 'A Man who travels the world eating noodles'
> picture: 'assets/images/profile.jpg'
> ...
>
> and lot of other options, like width, projects, pages, read-time, tags, related posts, animations, multiple-authors, etc.
> ```

## How To?

Check the [FAQ](./FAQ.md) if you have any doubt or problem.

---

[MIT](http://kopplin.mit-license.org/) License © Sérgio Kopplin


text:
Starting a Snappy instance on EC2
=================================

This uses Apache libcloud

    $ sudo pip install apache-libcloud

Then you can start an instance in the European AZ with:

    $ python ./ec2snappy.py

It loads the `cloud.cfg` file as userdata.

You will need an EC2 account, an SSH key pair called `snappy` and SSH rule in your default security group.

repository: zoosky/docbook

gha_language: Ruby

repo_name: zoosky/docbook


text:
---
layout: default
---

# 1994-03-02 - Increasing the encrypted/unencrypted ratio (was Re: Insecurity of public key crypto #1 (reply to Mandl))

## Header Data

From: Nathan Loofbourrow<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: c1dcc112669316a72f2113b6c2a7bd040922bf87e0d77dc6e3c173de522fa6e1

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1994-03-02 14:52:01 UTC

Raw Date: Wed, 2 Mar 94 06:52:01 PST

## Raw message

```
{% raw  %}From: Nathan Loofbourrow<EMAIL_ADDRESS>Date: Wed, 2 Mar 94 06:52:01 PST
To<EMAIL_ADDRESS>Subject: Increasing the encrypted/unencrypted ratio (was Re: Insecurity of public key crypto #1 (reply to Mandl))
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

"Perry E. Metzger" writes:
 > Eric Johnson says:
[in reply to bits about encrypting The List]
 > > Besides, procmail (or similar) should be able to handle piping
 > > incoming cypherpunks traffic through the decryptor, so the hoop
 > > would be transparent anyway.  No muss, no fuss.
 >
 > So, will procmail run for someone getting this mailing list via CCMail
 > under DOS? There are people doing that, you know.

Ah - so provide an unencrypted list for the software-challenged and
the merely lazy.

The incentive for using the encrypted list, then? Simple --
	1. Increasing ones personal encrypted-to-unencrypted ratio
and
	2. The old chestnut -- delay the unencrypted list 24 hours.

 Or is enough to use the "information*timeliness=value"
argument that's been advanced in the past to advocate encrypting
traffic *to* the list? Either way, the rhetorical advantage still lies
in the turnaround time to the list.

 > Its one thing to write tools so people can encrypt their routine
 > PRIVATE mail. Its another thing to encrypt mailing lists read by
 > hundreds of people. The former can be adjusted on a case by case basis
 > -- the latter cannot.

I believe it's traditional to reply "Indeed."

nathan

{% endraw %}
```

## Thread

+ Return to [March 1994](/archive/1994/03)

+ Return to "[Anthony D Ortenzi <ao27+@andrew.cmu.edu>](/authors/anthony_d_ortenzi_ao27_at_andrew_cmu_edu_)"
+ Return to "[Eric Johnson <ejohnson@pmip.dist.maricopa.edu>](/authors/eric_johnson_ejohnson_at_pmip_dist_maricopa_edu_)"
+ Return to<EMAIL_ADDRESS>(Eric Hughes)](/authors/hughes_at_ah_com_eric_hughes_)"
+ Return to "[Jeremy Cooper <jeremy@crl.com>](/authors/jeremy_cooper_jeremy_at_crl_com_)"
+ Return to "[Nathan Loofbourrow <loofbour@cis.ohio-state.edu>](/authors/nathan_loofbourrow_loofbour_at_cis_ohiostate_edu_)"
+ Return to "["Perry E. Metzger" <pmetzger@lehman.com>](/authors/perry_e_metzger_pmetzger_at_lehman_com_)"
+ Return to<EMAIL_ADDRESS>(Timothy C. May)](/authors/tcmay_at_netcom_com_timothy_c_may_)"

+ 1994-03-02 (Tue, 1 Mar 94 21:11:49 PST) - [Re: Insecurity of public key crypto #1 (reply to Mandl)](/archive/1994/03/b7be7f2acdeed48298deb159955512adf5794148027aac99a8ec36c1f7be6a3b) - _Eric Johnson<EMAIL_ADDRESS>  + 1994-03-02 (Wed, 2 Mar 94 04:15:29 PST) - [Re: Insecurity of public key crypto #1 (reply to Mandl)](/archive/1994/03/36737ea949485430988ce3c215ac03ae68fa963ac13af4404c1525c2d774bf31) - _"Perry E. Metzger"<EMAIL_ADDRESS>    + 1994-03-02 (Wed, 2 Mar 94 06:52:01 PST) - Increasing the encrypted/unencrypted ratio (was Re: Insecurity of public key crypto #1 (reply to Mandl)) - _Nathan Loofbourrow<EMAIL_ADDRESS>      + 1994-03-02 (Wed, 2 Mar 94 08:30:14 PST) - [Increasing the encrypted/unencrypted ratio (was Re: Insecurity of public key crypto #1 (reply to Mandl))](/archive/1994/03/1725bbd9274e60f0b83521e6eb400fd075ea183da14d1d0b6625d06c662c7594) -<EMAIL_ADDRESS>(Eric Hughes)_
        + 1994-03-02 (Wed, 2 Mar 94 13:35:16 PST) - [Re: Increasing the encrypted/unencrypted ratio (was Re: Insecurity of public key crypto #1 (reply to Mandl))](/archive/1994/03/b326e0363e357987ce415e5440ae7289344dd099c1069df56aec7916d749be27) - _Anthony D Ortenzi<EMAIL_ADDRESS>          + 1994-03-04 (Fri, 4 Mar 94 13:04:32 PST) - [Re: Increasing the encrypted/unencrypted ratio (was Re: Insecurity of public key crypto #1 (reply to Mandl))](/archive/1994/03/76565581934b67f1cf204e2c8fe4b7b616fa7ed5e128f3a5348367aff8651f26) - _Jeremy Cooper<EMAIL_ADDRESS>      + 1994-03-02 (Wed, 2 Mar 94 10:38:38 PST) - [Laziness?](/archive/1994/03/3be20685fc3b0ea241bb806ed9232d9ddfc20ebbdb9a0ab1942b5e7be821f2f8) -<EMAIL_ADDRESS>(Timothy C. May)_
        + 1994-03-02 (Wed, 2 Mar 94 13:29:40 PST) - [Re: Laziness?](/archive/1994/03/505cf0144fa3e8da4c8d6972fca8ed06a70a38d8184d8c575f282f0c939c3a48) - _Nathan Loofbourrow<EMAIL_ADDRESS>          + 1994-03-03 (Wed, 2 Mar 94 16:39:56 PST) - [Laziness?](/archive/1994/03/47e46022f84b02e2c18237a6ddcbf5da6695d1908a921b2039c4c84dbe489bd7) -<EMAIL_ADDRESS>(Eric Hughes)_


text:
# ![nf-core/kmermaid](docs/images/nf-core-kmermaid_logo.png)

**Compare DNA/RNA/protein sequences on k-mer content**.

[![GitHub Actions CI Status](https://github.com/nf-core/kmermaid/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/kmermaid/actions)
[![GitHub Actions Linting Status](https://github.com/nf-core/kmermaid/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/kmermaid/actions)
[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A520.07.1-23aa62.svg?labelColor=000000)](https://www.nextflow.io/)

[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](https://bioconda.github.io/)
[![Docker](https://img.shields.io/docker/automated/nfcore/kmermaid.svg)](https://hub.docker.com/r/nfcore/kmermaid)
[![Cite with Zenodo](https://zenodo.org/badge/197811232.svg)](https://zenodo.org/badge/latestdoi/197811232)
[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23kmermaid-4A154B?logo=slack)](https://nfcore.slack.com/channels/kmermaid)

## Introduction

![Workflow overview](docs/images/kmermaid_workflow.png)

The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.

## Quick Start

i. Install [`nextflow`](https://nf-co.re/usage/installation)

ii. Install either [`Docker`](https://docs.docker.com/engine/installation/) or [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/) for full pipeline reproducibility (please only use [`Conda`](https://conda.io/miniconda.html) as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))

iii. Download the pipeline and test it on a minimal dataset with a single command

```bash
nextflow run nf-core/kmermaid -profile test,<docker/singularity/conda/institute>
```

> Please check [nf-core/configs](https://github.com/nf-core/configs#documentation) to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use `-profile <institute>` in your command. This will enable either `docker` or `singularity` and set the appropriate execution settings for your local compute environment.

iv. Start running your own analysis!

```bash
nextflow run nf-core/kmermaid -profile <docker/singularity/conda/institute> --input '*_R{1,2}.fastq.gz' --genome GRCh37
```

See [usage docs](docs/usage.md) for all of the available options when running the pipeline.

## Documentation

The nf-core/kmermaid pipeline comes with documentation about the pipeline, found in the `docs/` directory:

1. [Installation](https://nf-co.re/usage/installation)
2. Pipeline configuration
    * [Local installation](https://nf-co.re/usage/local_installation)
    * [Adding your own system config](https://nf-co.re/usage/adding_own_config)
    * [Reference genomes](https://nf-co.re/usage/reference_genomes)
3. [Running the pipeline](docs/usage.md)
4. [Output and how to interpret the results](docs/output.md)
5.

## Contributions and Support

If you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).

For further information or help, don't hesitate to get in touch on [Slack](https://nfcore.slack.com/channels/kmermaid) (you can join with [this invite](https://nf-co.re/join/slack)).

## Citation

If you use  nf-core/kmermaid for your analysis, please cite it using the following doi: [10.5281/zenodo.4143940](https://zenodo.org/record/4143940)

You can cite the `nf-core` publication as follows:

> **The nf-core framework for community-curated bioinformatics pipelines.**
>
> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
>
> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).
> ReadCube: [Full Access Link](https://rdcu.be/b1GjZ)

repository: nf-core/kmermaid

gha_language: Nextflow

repo_name: nf-core/kmermaid


text:
# Sepedonium albogriseum Balf.-Browne, 1952 SPECIES

#### Status
SYNONYM

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

#### Published in
Trans. Br. mycol. Soc. 35: 276 (1952)

#### Original name
Sepedonium albogriseum Balf.-Browne, 1952

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Sordariomycetes/Sordariales/Chaetomiaceae/Botryotrichum/Botryotrichum piluliferum/ Syn. Sepedonium albogriseum/README.md

repo_name: mdoering/backbone


text:
---
layout: post
title: "Tiger tiger burning bright"
categories:
- general
date: 2005-05-26 00:00
comments: true
---

Tiger gave me another pleasant surprise today. I've got an external Iomega SuperDrive CD/DVD-RW at work, but due to a slight glitch in communication with the person who bought it for me, I ended up with a USB2 unit rather than a Firewire one. Under Panther, the drive wasn't recognised by the system, so I couldn't use iDVD or the Finder to burn discs. There were ways around it, so I didn't return the drive, but it was irritating.

Today, I had to burn some footage to a DVD and switched the burner on. To my surprise, Tiger fully supports the drive now, so I could use iDVD to burn the disc without any problems. It's great to see more hardware being supported by Mac OS X.

[Apologies are due to Mr. W. Blake for abusing his poem in pursuit of a Sun-style punning headline. Sorry, William.]

repository: bsag/blog-octo

repo_name: bsag/blog-octo


text:
# TextToSpeechApp

Created a small application using tkinter which will accept text given by the User and the app will read aloud the text.

## NOTE
     - I know it's not required for this kind of app but also added a login and registraion page for only authorised user can access the "READ ALOUD" feature.
     - This is ideal for students trying to make small school projects using python
## This project completely uses Classes,Objects and Function. So it will help you to clear the basic fundamentals

## Python Modules Used
    1. tkinter for GUI
    2. pygame for Sound
    3. pymysql for connecting to database
    4. array for using Arrays in Python
    5. gTTs for Google's Text to Speech function


text:
## Sample Console Host

This project demonstrates a generic host .NET Core from a Console App Visual Studio 2019 template.

The majority of the configuration, boilerplate and default setup comes from [Microsoft - .NET Generic Host in ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/generic-host?view=aspnetcore-5.0)

##### Packages

Configuration is provided with [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/)

The generic host is provided with [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting/)

#### Sample Project

This sample provides a demonstration of the default services provided by [`CreateDefaultBuilder`](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/generic-host?view=aspnetcore-5.0#default-builder-settings). The default builder sets up these services by default so there is very little boilerplate code.

##### [Default Builder](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/generic-host?view=aspnetcore-5.0#default-builder-settings)

The initialization boils down to the following method. The configuration also demonstrates using the configuration `IOptions` pattern and adding a derived hosted service `BackgroundService : IHostedService1`.

```csharp
Host.CreateDefaultBuilder(args).ConfigureServices((context, services) =>
{
    services.Configure<WorkerOptions>(context.Configuration.GetSection(WorkerOptions.Settings));
    services.AddHostedService<LoopingHostedService>();
});
```

##### [Configuration](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-5.0)

Configuration is automatically loaded from `appsettings.json` and `appsettings.{Environment}.json`

##### [Dependency Injection](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-5.0)

Dependency injection is provided automatically, with service registration being done in `ConfigureServices(IServiceCollection services)`.

```csharp
ConfigureServices((context, services) =>
{
    services.Configure<WorkerOptions>(context.Configuration.GetSection(WorkerOptions.Settings));
    services.AddHostedService<LoopingHostedService>();
});
```

##### [Binding `IOptions`](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-5.0)

And example of binding settings from `appsettings.json` to a typed object that uses `IOptions<T>` to inject settings into classes is demonstrated.

##### [Environment Variables](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-5.0)

Environment variables are provided by default with prefix `DOTNET_`. Variables are set explicitly in `launchSettings.json` or via project debug properties. Once set,  `IHostEnvironment` is available through dependency injection.

##### [Logging](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-5.0)

Logging is automatically setup, providing the `ILogger<>` interface with dependency injection. Logger configuration is automatically read from `appsettings.json`

##### [`BackgroundService` and `IHostedService`](https://docs.microsoft.com/en-us/dotnet/architecture/microservices/multi-container-microservice-net-applications/background-tasks-with-ihostedservice)

There are two implementations of a background service. Either way works; however, `BackgroundService` is probably better until or unless there is some reason driving the necessity of IHostedService

There is quite a bit to [know and understand about `Task` and `async/await`](https://www.pluralsight.com/guides/using-task-run-async-await). Some of it boils down to IO bound work should be awaited while CPU bound work should be queued with `Task.Run`.

##### [Cancellation Tokens](https://docs.microsoft.com/en-us/dotnet/standard/threading/cancellation-in-managed-threads)

Cancellation tokens are used with `BackgroundService` to signal the shutdown of the host. They could also be used to signal a stop to the service without shutting down the host.

license: Unlicense

repository: JeffEmery/ConsoleHostSample

repo_name: JeffEmery/ConsoleHostSample


text:
---
path: '/lonnie-bee'
title: LonnieBee
tagline: graphic design
completed: "2020"
personalproject: false
client: Lonneke de Bruin
role: Web Developer/ UI/UX Designer
website:
  url: 'http://www.lonniebee.com'
featureImage: 'desk_lon_I.jpg'
tags:
  - html
  - dev
  - css
  - react
body:
  ProjectBodyIntro:
    primary:
      title: LonnieBee intro title
      subtitle: Lonnie the Bee
      content: LonnieBee needed a website to speak to a corporate audience. We utilized white space, bold messaging, and subtle animations to show that LonnieBee is sophisticated, yet young and energetic.
      image: 'desk_lon_I.jpg'
  ProjectBodyHighlight:
    primary:
      title: LonnieBee highlight title
      subtitle: Fot This is the
      content: The LonnieBee website has a clean corporate look achieved by generous use of space alongside black-and-white photography. We gave it a fluid layout that accommodates various types of content, with straightforward navigation and visually engaging transitions.
      image: 'lnbiso_i.jpg'
    tools:
      - js
      - wordpress
      - gatsby
  ProjectBodyConclusion:
    primary:
      title: LonnieBee conclusion title
      subtitle: We might Conclude
      content: We executed a complete package, creating a brand as well as a website that's consistent with it. We designed a logo that suggests Hennessey outrunning all its competition by combining a plotted “exponential growth” through-line with negative space, we achieved a memorable symbol that carries a strong brand vision. The website features a fluid grid, with a fully adaptable layout on all devices.
      image: 'lnbiso_i.jpg'
---

## LonnieBee

repository: vmarinhodev/vmarinho-pproject

repo_name: vmarinhodev/vmarinho-pproject


text:
## 1.1.0 (July 17, 2018)

### Features

* Allow configuring the target node version

### Build-Related

* Add node 8 and 10 to build environments
* Switch from greenkeeper to renovate
* Add eslint-plugin-node

### Noticeable Dependency Upgrades

* Update to babel 7 and preset-env

## 1.0.2 (February 20, 2018)

* Fix babel preset being loaded from cwd

## 1.0.1 (February 20, 2018)

* Fix babel plugins being loaded from cwd
* Dependency updates

## 1.0.0 (August 2, 2017)

Initial release