text:
# sam local start\-lambda

Enables you to programmatically invoke your Lambda function locally by using the AWS CLI or SDKs\. This command starts a local endpoint that emulates AWS Lambda\. You can run your automated tests against this local Lambda endpoint\. When you send an invoke to this endpoint using the AWS CLI or SDK, it locally executes the Lambda function that's specified in the request\.

**Usage:**

```
sam local start-lambda [OPTIONS]
```

**Examples:**

```
# SETUP
# ------
# Start the local Lambda endpoint by running this command in the directory that contains your AWS SAM template.

sam local start-lambda

# USING AWS CLI
# -------------
# Then, you can invoke your Lambda function locally using the AWS CLI

aws lambda invoke --function-name "HelloWorldFunction" --endpoint-url "http://<IP_ADDRESS>:3001" --no-verify-ssl out.txt

# USING AWS SDK
# -------------
# You can also use the AWS SDK in your automated tests to invoke your functions programatically.
# Here is a Python example:
#
#     self.lambda_client = boto3.client('lambda',
#                                  endpoint_url="http://<IP_ADDRESS>:3001",
#                                  use_ssl=False,
#                                  verify=False,
#                                  config=Config(signature_version=UNSIGNED,
#                                                read_timeout=0,
#                                                retries={'max_attempts': 0}))
#    self.lambda_client.invoke(FunctionName="HelloWorldFunction")
```

**Options:**

****

| Option | Description |
| --- | --- |
| \-\-host TEXT | The local hostname or IP address to bind to \(default: '127\.0\.0\.1'\)\. |
| \-p, \-\-port INTEGER | The local port number to listen on \(default: '3001'\)\. |
| \-t, \-\-template PATH | The AWS SAM template file \[default: template\.\[yaml\|yml\]\]\. |
| \-n, \-\-env\-vars PATH | The JSON file that contains values for the Lambda function's environment variables\. |
| \-\-parameter\-overrides | Optional\. A string that contains AWS CloudFormation parameter overrides encoded as key\-value pairs\. Use the same format as the AWS CLI—for example, 'ParameterKey=KeyPairName, ParameterValue=MyKey ParameterKey=InstanceType,ParameterValue=t1\.micro'\. |
| \-d, \-\-debug\-port TEXT | When specified, starts the Lambda function container in debug mode, and exposes this port on the local host\. |
| \-\-debugger\-path TEXT | The host path to a debugger to be mounted into the Lambda container\. |
| \-\-debug\-args TEXT | Additional arguments to be passed to the debugger\. |
| \-v, \-\-docker\-volume\-basedir TEXT | The location of the base directory where the AWS SAM file exists\. If Docker is running on a remote machine, you must mount the path where the AWS SAM file exists on the Docker machine, and modify this value to match the remote machine\. |
| \-\-docker\-network TEXT | The name or ID of an existing Docker network that Lambda Docker containers should connect to, along with the default bridge network\. If this is specified, the Lambda containers only connect to the default bridge Docker network\. |
| \-l, \-\-log\-file TEXT | The log file to send runtime logs to\. |
| \-\-layer\-cache\-basedir DIRECTORY | Specifies the location basedir where the layers your template uses are downloaded to\. |
| \-\-skip\-pull\-image | Specifies whether the CLI should skip pulling down the latest Docker image for the Lambda runtime\. |
| \-\-force\-image\-build | Specify whether the CLI should rebuild the image used for invoking functions with layers\. |
| \-\-profile TEXT | The AWS credentials profile to use\. |
| \-\-region TEXT | Sets the AWS Region of the service \(for example, us\-east\-1\)\. |
| \-\-debug | Turns on debug logging\. |
| \-\-help | Shows this message and exits\. |

repository: d-baranowski/aws-sam-developer-guide

repo_name: d-baranowski/aws-sam-developer-guide


text:
randutil  [![GoDoc](https://godoc.org/github.com/hnakamur/randutil?status.png)](https://godoc.org/github.com/hnakamur/randutil)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhnakamur%2Frandutil.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhnakamur%2Frandutil?ref=badge_shield)
========

This is a Go package for providing some utilities for random.

This Package randutil provides a utility function to get non-negative
pesudo-random int using math/rand or crypto/rand.

This package also provides Chooser which chooses an item from choices.
Each choice has a weight which affects possibility for it to be choosed.

## License

MIT

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhnakamur%2Frandutil.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhnakamur%2Frandutil?ref=badge_large)

license: MIT

repository: fossabot/randutil

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: fossabot/randutil


text:
# Terraform::AWS::WafregionalSizeConstraintSet

Provides a WAF Regional Size Constraint Set Resource for use with Application Load Balancer.

## Properties

`Name` - (Required) The name or description of the Size Constraint Set.

`SizeConstraints` - (Optional) Specifies the parts of web requests that you want to inspect the size of.

## Return Values

### Fn::GetAtt

`Id` - The ID of the WAF Size Constraint Set.

## See Also

* [aws_wafregional_size_constraint_set](https://www.terraform.io/docs/providers/aws/r/wafregional_size_constraint_set.html) in the _Terraform Provider Documentation_


text:
# dat.GUI for VR

![Preview](https://github.com/dataarts/dat.guiVR/raw/master/preview.gif)

A flexible graphical user interface for changing variables within WebVR. Rather than jumping in an out to adjust variables in your code, tweak them at run-time within VR.

Inspired by the original [dat-gui](https://workshop.chromeexperiments.com/examples/gui/#1--Basic-Usage) and built on top of [THREE.js](http://threejs.org/).

# Documentation
[Tutorial](https://workshop.chromeexperiments.com/examples/guiVR)

[Wiki](https://github.com/dataarts/dat.guiVR/wiki)

[API Docs](https://github.com/dataarts/dat.guiVR/wiki/API-and-Examples)

# Build and Run
If you are using npm modules and want to use this library, contribute, or test:

    npm install
    npm run dev

Wait for the build to complete and a test server will start.

## Examples
Then navigate to **localhost:8000** on a VR enabled browser.

## Notes
* This module assumes the existence of THREE.js in global scope somewhere.
* Can be used as a drop in script include (like the examples) or as an  ES6 module / node build.

gha_language: JavaScript


text:
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/polymerEl/type-writer)

# \<type-writer\>

display text content with type-writer effect

Example Usage:

<!--
```
<custom-element-demo>
  <template>
    <link rel="import" href="type-writer.html">
    <next-code-block></next-code-block>
  </template>
</custom-element-demo>
```
-->
```html
<type-writer delay="200" text="this text is being written with a type-writer effect!" speed="80" cursor-duration="3000"></type-writer>

```

repository: PolymerEl/type-writer

repo_name: PolymerEl/type-writer


text:
# JosephLazarus-bitcoin-lightning-node-database
Creating Database from data gathered on the Lightning Network

## Helpful links to BTCPay
1. https://github.com/btcpayserver  (master directory)
2. https://github.com/btcpayserver/btcpayserver/tree/master/BTCPayServer.Data (specifically on server data)
3. https://docs.btcpayserver.org/Troubleshooting/  (BTC Pay documentation)

you can connect into containers with docker exec -ti container_name bash
Or just use all the utility tools such as bitcoin-cli.sh or bitcoin-lncli.sh

branch_name: refs/heads/main

gha_license_id: MIT


text:
+++
date = "2019-05-11"
edate = "2015-08-19T20:29:37-07:00"
title = "Research"
small_banner_logo = "true"
+++
[Google Scholar profile](https://scholar.google.com/citations?user=44fl1V0AAAAJ&hl=en)\
[scite.ai profile](https://scite.ai/users/Sam-Havron-1)

## Awards
* [Facebook Fellowship Program Finalist
  2020](https://research.fb.com/blog/2020/01/announcing-the-recipients-of-the-2020-facebook-fellowship-awards/). Top 4% of Applicants (1800+ applied)
* [NortonLifeLock Graduate Research Fellowship 2020](https://www.nortonlifelock.com/us/en/research-labs/news/2020-fellowship-winners/). $20,000. Top 3% of applicants (100+ applied). Given to [**CETA**](https://ceta.tech.cornell.edu).
* Advocate of New York City Award. 2019
* Best Paper Honorable Mention for [3] at ACM CSCW. November 2019
* [Cornell Graduate School Fellowship 2017.](https://gradschool.cornell.edu/financial-support/fellowships/new-student-fellowships/) $62,000. Top 20% of graduate researchers at Cornell.
* [Louis T. Rader Award for Outstanding Undergraduate Education at the University of Virginia](https://uvacsnews.wordpress.com/2017/05/12/congratulations-to-our-cs-award-winners/). May 2017

## Publications

1. Diana Freed\*, **Sam Havron**\*, Emily Tseng, Andrea Gallardo, Rahul Chatterjee,
Thomas Ristenpart, and Nicola Dell. ["Is my phone hacked?" Analyzing Clinical Computer Security
Interventions with Survivors of Intimate Partner
Violence.](/pubs/freed-cscw19.pdf)
ACM Computer-Supported Cooperative Work and Social Computing (**ACM CSCW**) 2019. [[Paper PDF](/pubs/freed-cscw19.pdf)]. Best Paper Honorable Mention Award.

2. **Sam Havron**\*, Diana Freed\*, Rahul Chatterjee, Damon McCoy,
Nicola Dell, and Thomas Ristenpart. [Clinical Computer
Security for Victims of Intimate Partner Violence](/pubs/clinicalsec.pdf).
**USENIX Security 2019.** [[Paper PDF](/pubs/clinicalsec.pdf), [Presentation Video](https://www.youtube.com/watch?v=YsFZ3OxwWN0)]. Media coverage:
[_MIT Technology Review_](https://www.technologyreview.com/s/614168/nyc-hires-hackers-to-hit-back-at-stalkerware/), [_Cornell Chronicle_](https://news.cornell.edu/stories/2019/08/new-tools-help-detect-digital-domestic-abuse), [_Smart Cities Dive_](https://www.smartcitiesdive.com/news/tech-can-impact-domestic-violence-not-always-in-a-positive-way/555757/).

3.  [The Spyware Used in Intimate
Partner Violence](/pubs/spyware.pdf).
**IEEE S&P (Oakland) 2018**.
[[Paper PDF](/pubs/spyware.pdf)]. Media coverage: [_The New York Times_](https://www.nytimes.com/2018/05/19/technology/phone-apps-stalking.html), [_MIT Technology Review_](https://www.technologyreview.com/s/613915/stalkerware-apps-are-letting-abusive-partners-spy-on-their-victims/), [_Cornell Chronicle_](https://news.cornell.edu/stories/2018/07/apps-make-it-easy-domestic-abusers-spy), [_Vox_](https://www.vox.com/the-big-idea/2018/5/21/17374434/intimate-partner-violence-spyware-domestic-abusers-apple-google), [_Freedom to Tinker (Princeton CITP)_](https://freedom-to-tinker.com/2018/02/23/how-tech-is-failing-victims-of-intimate-partner-violence-thomas-ristenpart-at-citp/).

(\*) indicates co-equal contributions.

## Posters
1. **Sam Havron**, Dave Evans. [Poster: Secure
Multi-Party Computation as a Tool for Privacy-Preserving Data
Analysis](/pubs/mpcposter.pdf).
**IEEE S&P (Oakland) 2016**.
[[Paper PDF](/pubs/mpcposter.pdf), [Poster PDF](/pubs/mpc_poster_print.pdf)]

## Acknowledgments
* **[Horcrux: A Password Manager for Paranoids](https://arxiv.org/pdf/1706.05085.pdf).**
Haina Li, David Evans.
**arXiv**:1706.05085v1 [cs.CR] 2017-Jun-15.
[Paper PDF](https://arxiv.org/pdf/1706.05085.pdf)]

repository: havron/web

repo_name: havron/web


text:
## React Routing Project

### By: Philip Putnam

## Description:

Following along with the Treehouse 'React Router 4 Basics' tutorial with Guil Hernandez, I hope to make a simple React program utilizing different routes with the react-router library.

## Screenshots:

Root Route:

![alt text](https://github.com/philip-putnam/React_Routing/blob/master/home_screenshot.png)

Courses Route, with nested routes for course types:

![alt text](https://github.com/philip-putnam/React_Routing/blob/master/courses.png)

Teachers Route:

![alt text](https://github.com/philip-putnam/React_Routing/blob/master/teachers.png)

## Technologies:

1. Node & Node Packet Manager (NPM)
2. react-create-app (JavaScript, react, react-dom, react-router)
3. Babel
4. Webpack

License: MIT

Copyright: Philip Putnam, 2017


text:
---
title: Top Layer
page_title: Top Layer
description: Check our "Top Layer" documentation article for the RadMap {{ site.framework_name }} control.
slug: radmap-features-providers-top-layer
tags: map, top layer, bing provider
published: true
position: 6
---

# Top Layer

The `RadMap` control allows you to specify the layer option that will be displayed over the received Bing Maps imagery service. To specify the layer or layers, set the `TopLayer` property of the `BingRestMapProvider` instance. This property is of the type `BingTopLayer`.

The TopLayer property is a flag enumeration and it allows you to specify more than one layer. The options that are exposed by the `BingTopLayer` enumeration are as follows:

* `Basemap`—This option displays the regular road map layer with labels. This option is the default value of the TopLayer property.
* `Background`—The Background option shows only base geometry layer without labels. This option does not have effect when the `Mode` property of the provider is set to `Ariel` or `Road` modes.
* `Foreground`—The Foreground option displays only a label layer. This option does not have effect when the `Mode` property of the provider is set to `Ariel` or `Road` modes.
* `TrafficFlow`—This option shows a traffic flow layer on top of the roads. This option does not have effect when the `Mode` property of the provider is set to `Ariel` or `Road` modes.

#### __[C#] Setting the TopLayer property__
{{region radmap-features-providers-top-layer-0}}
    BingRestMapProvider bingRestMapProvider = new BingRestMapProvider();
    bingRestMapProvider.ApplicationId = "Bing_Map_Key";
    bingRestMapProvider.Mode = MapMode.AerialOnDemand;
    bingRestMapProvider.TopLayer = BingTopLayer.TrafficFlow | BingTopLayer.Background;

    this.radMap.Provider = bingRestMapProvider;
{{endregion}}

#### __[VB.NET] Setting the TopLayer property__
{{region radmap-features-provider-top-layer-1}}
    Dim bingRestMapProvider As BingRestMapProvider = New BingRestMapProvider()
    bingRestMapProvider.ApplicationId = "Bing_Map_Key"
    bingRestMapProvider.Mode = MapMode.AerialOnDemand
    bingRestMapProvider.TopLayer = BingTopLayer.TrafficFlow Or BingTopLayer.Background

    Me.radMap.Provider = bingRestMapProvider
{{endregion}}

__RadMap with TopLayer property set to BingTopLayer.TrafficFlow and BingTopLayer.Background__

![RadMap with TopLayer property set to BingTopLayer.TrafficFlow and BingTopLayer.Background](images/radmap-features-providers-top-layer-0.png)

>important Modifying the values of the `TopLayer` property at runtime is not fully supported. To change them during runtime, create a new instance of the `BingRestMapProvider` class and set the new values to the TopLayer property.

>important The following scenarios of the TopLayer options are not supported:
>* `Basemap` and `Background`
>* `Basemap` and `Foreground`
>* `Buildings` option

## See Also
* [Elevation]({%slug radmap-features-providers-bing-rest-map-provider-elevation%})
* [Imagery sets]({%slug radmap-features-providers-bing-rest-map-modes%})
* [Routing]({%slug radmap-features-providers-bing-rest-map-provider-routing%})

repository: telerik/xaml-docs

gha_license_id: NOASSERTION

repo_name: telerik/xaml-docs


text:
---
title: "DNS Providers"
linkTitle: "DNS Providers"
weight: 70
type: "docs"
---

## Creating DNS Providers

Due to the large number of requests to support DNS providers to resolve DNS
challenges, it have become unpractical and unfeasible to maintain and test all
coming in. For this reason, it has been decided to instead support out-of-tree
DNS providers via way of an external webhook.

To implement an external DNS provider webhook, it is recommended to base your
implementation on the [example
repository](https://github.com/jetstack/cert-manager-webhook-example). Please
reach out on the `cert-manager-dev` channel on the [community
slack](https://slack.k8s.io) for advise and guidance on getting a DNS webhook
running and released.

repository: rutsky/website

repo_name: rutsky/website


text:
Aggregate-Builder
---

This library constructs Aggregates' Domain by reading Event-Stream from EventStore.

How it works:

* Call the [BuildState][0] function, which sends meta-information containing current aggregate-version to EventStoreQuery-service.
* The events will be received on channel returned by above function.

---

### How to use

* Check [**examples**][1] for how to use this library.
* Check [**tests-file**][2] for additional examples.

---

* [Go Docs][3]

---

  [0]: https://godoc.org/github.com/TerrexTech/go-agg-builder/builder#EventsIO.BuildState
  [1]: https://github.com/TerrexTech/go-agg-builder/blob/master/examples/example.go
  [2]: https://github.com/TerrexTech/go-agg-builder/blob/master/builder/builder_suite_test.go
  [3]: https://godoc.org/github.com/TerrexTech/go-agg-builder/builder

repository: TerrexTech/go-agg-builder

gha_language: Go

repo_name: TerrexTech/go-agg-builder


text:
# Duration Data Model

## Domain

The  schema is part of the  Domain

## Description

A time interval in a given unit of time

## Data model

A JSON Schema corresponding to this data model can be found
[here](https://github.com/tmforum-rand/schemas/blob/candidates/Common/Duration.schema.json).

The Data model is defined as shown below:

- `amount` : Time interval (number of seconds, minutes, hours, etc.)

  - Optional

- `units` : Unit of time (seconds, minutes, hours, etc.)

  - Optional

## TMForum APIs that use this schema

Taking into consideration the snapshot of 04/02/2020 04:59:16 UTC the list of [TMForum Open APIs](https://www.tmforum.org/open-apis/) that uses this schemas is:

Coming soon

repository: tmforum/DataModelDocumentation

repo_name: tmforum/DataModelDocumentation


text:
# file-stream
file-stream is a little HTTP server helper that streams binary resources. These resources will commonly be audio or video, but any type of file is fair game.

[![Build status](https://travis-ci.org/michaelrhodes/file-stream.png?branch=master)](https://travis-ci.org/michaelrhodes/file-stream)

## Install
```
npm install file-stream
```

## API
```
file-stream(

  path (string):
    the filesystem path of the file being requested.

  request (IncomingMessage):
    the request object provided by http.createServer.

  response (ServerResponse):
    the response object provided by http.createServer.

)

=> handled (boolean)
```

### Example
``` js
var http = require('http')
var stream = require('file-stream')
var filepath = '/path/to/file'

http.createServer(function(req, res) {

  // If file-stream can’t handle the request
  // it will return false.
  if (!stream(filepath, req, res)) {
    res.statusCode = 500
    res.setHeader('Content-Type', 'text/plain')
    res.end('unable to stream ' + filepath + '\n')
  }

}).listen(8080)
```

### License
[MIT](http://opensource.org/licenses/MIT)

repository: ilioner/TYZTorrentMagentTools

repo_name: ilioner/TYZTorrentMagentTools


text:
#[FractionToRecurringDecimal](https://leetcode.com/problems/fraction-to-recurring-decimal/)
######No: `166`
######Tag: `HashMap`
######Difficulty: `Medium`
I did not finished this problem by myself.

The main idea is that to mock the divide process. And the most important problem to solve is is identify the recurring parts.
Cited From https://leetcode.com/discuss/42159/0ms-c-solution-with-detailed-explanations , it has very good explanation.

```
Well, the key to this problem is on how to identify the recurring parts. After doing some examples using pen and paper, you may find that for the decimal parts to recur, the remainders should recur. So we need to maintain the remainders we have seen. Once we see a repeated remainder, we know that we have reached the end of the recurring parts and should enclose it with a ). However, we still need to insert the ( to the correct position. So we maintain a mapping from each remainder to the position of the corresponding quotient digit of it in the recurring parts. Then we use this mapping to retrieve the starting position of the recurring parts.

Now we have solved the trickiest part of this problem.

There are some remaining problems to solve to achieve a bug-free solution.

Pay attention to the sign of the result;
Handle cases that may cause overflow like numerator = -2147483648, denominator = -1 appropriately by using long long;
Handle all the cases of (1) no fractional part; (2) fractional part does not recur; and (3) fractional part recurs respectively.
To handle problem 3, we divide the division process into the integral part and the fractional part. For the fractional part, if it does not recur, then the remainder will become 0 at some point and we could return. If it does recur, the method metioned in the first paragraph has already handled it.
```

repository: yijingbai/LeetCode

repo_name: yijingbai/LeetCode


text:
## Custom Installation
--------------------

__If you are installing this module using a control-repo, you must have splunk_hec in your production environment's Puppetfile so the puppetserver process can load the libraries it needs properly. You can then create a feature branch to enable them and test the configuration, but the libraries must be in production otherwise the feature branch won't work as expected. If your puppetserver is in a different environment, please add this module to the Puppetfile in that environment as well.__

The steps below will help install and troubleshoot the report processor on a single Puppet Master, including manual steps to configure a puppet-server, and to use the included splunk_hec class. Because one is modifying production machines, these steps allow you to validate your settings before deploying the changes live. See the tl,dr; instructions for

1. Install the Puppet Report Viewer Addon in Splunk. This will import the needed sourcetypes to configure Splunk's HTTP Endpoint Collector (HEC) and provide a dashboard that will show the reports once they are sent to Splunk.

2. Create a Splunk HEC Token or use an existing one that sends to main index and does not have acknowledgement enabled. Follow the steps provided by Splunk's [Getting Data In Guide](http://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector) if you are new to HTTP Endpoint Collectors.

3. Install this Puppet module in the environment that manages your Puppet Servers are using (probably `production`)

4. Run `puppet plugin download` on your Puppet Server to sync the content. Some users with strict permissions may need to run `umask 022` first

5. Create a `/etc/puppetlabs/puppet/splunk_hec.yaml` (see examples directory for one) adding your Splunk Server URL to the collector (usually something like `https://splunk-dev:8088/services/collector`) & Token from step 1
  - You can add 'timeout' as an optional parameter, default value is 1 second for both open and read sessions, so take value x2 for real world use
  - Provide a `pe_console` value that is the hostname for the Puppet Enterprise Console, which Splunk can use to lookup further information if the installation is a multimaster setup (it is best practice to set this if you're anticipating scaling out more masters in the future).

  ```
---
"url" : "https://splunk-dev.testing.local:8088/services/collector"
"splunk_token" : "13311780-EC29-4DD0-A796-9F0CDC56F2AD"
```
(Note: If HA is enabled you will need to ensure these settings exist in each master. This is often done through the PE HA Replica node group.)

6. Run `puppet apply -e 'notify { "hello world": }' --reports=splunk_hec` from the Puppet Server, this will load the report processor and test your configuration settings without actually modifying your Puppet Server's running configuration. If you are using the Puppet Report Viewer app in Splunk then you will see the page update with new data. If not, perform a search by the sourcetype you provided with your HEC configuration.

7. If configured properly the Puppet Report Viewer app in Splunk will show 1 node in the Overview tab.

8. Now it is time to roll these settings out to the fleet of the Puppet Masters in the installation. For Puppet Enterprise users:
	- Navigate to Classification -> PE Infrastructure -> PE Master
	- Select Configuration
	- Press Refresh to ensure the splunk_hec class is loaded
	- Add new class `splunk_hec`
	- From the `Parameter name` select at least `url` and `splunk_token` and provide the same attributes from the testing configuration file
	- Optionally set `enable_reports` to `true` if there isn't another component managing the servers reports setting, otherwise manually add `splunk_hec` to the settings as described in the manual steps. Note that if `enable_reports` is set to `true`, then you can have the module automatically add the `splunk_hec` report processor to the servers reports setting by setting the `reports` parameter to the empty string, `''`.
	- Commit changes and run Puppet. It is best to navigate to the PE Certificate Authority Classification gorup and run Puppet there first, before running Puppet on the remaining machines

9. For Inventory support in the Puppet Report Viewer, see the [Fact Terminus Support](fact_terminus_support.md)

### Manual steps:

- Add `splunk_hec` to `/etc/puppetlabs/puppet/puppet.conf` reports line under the master's configuration block

```
[master]
node_terminus = classifier
storeconfigs = true
storeconfigs_backend = puppetdb
reports = puppetdb,splunk_hec
```

- Restart the pe-puppetserver process (puppet-server for Open Source Puppet) for it to reload the configuration and the plugin

- Run `puppet agent -t` on an agent, if you are using the suggested name, use `source="http:puppet-report-summary"` in your Splunk search field to show the reports as they arrive


text:
# Build

This `bc` attempts to be as portable as possible. It can be built on any
POSIX-compliant system.

To accomplish that, a POSIX-compatible, custom `configure.sh` script is used to
select build options, compiler, and compiler flags and generate a `Makefile`.

The general form of configuring, building, and installing this `bc` is as
follows:

```
[ENVIRONMENT_VARIABLE=<value>...] ./configure.sh [build_options...]
make
make install
```

To get all of the options, including any useful environment variables, use the
following command:

```
./configure.sh -h
```

To learn the available `make` targets run the following command after running
the `configure.sh` script:

```
make help
```

See [Build Environment Variables][4] for a more detailed description of all
accepted environment variables and [Build Options][5] for more detail about all
accepted build options.

## Cross Compiling

To cross-compile this `bc`, an appropriate compiler must be present and assigned
to the environment variable `HOSTCC` or `HOST_CC` (the two are equivalent,
though `HOSTCC` is prioritized). This is in order to bootstrap core file(s), if
the architectures are not compatible (i.e., unlike i686 on x86_64). Thus, the
approach is:

```
HOSTCC="/path/to/native/compiler" ./configure.sh
make
make install
```

`HOST_CC` will work in exactly the same way.

`HOSTCFLAGS` and `HOST_CFLAGS` can be used to set compiler flags for `HOSTCC`.
(The two are equivalent, as `HOSTCC` and `HOST_CC` are.) `HOSTCFLAGS` is
prioritized over `HOST_CFLAGS`. If neither are present, `HOSTCC` (or `HOST_CC`)
uses `CFLAGS` (see [Build Environment Variables][4] for more details).

It is expected that `CC` produces code for the target system. See
[Build Environment Variables][4] for more details.

If an emulator is necessary to run the bootstrap binaries, it can be set with
the environment variable `GEN_EMU`.

## Build Environment Variables

This `bc` supports `CC`, `HOSTCC`, `HOST_CC`, `CFLAGS`, `HOSTCFLAGS`,
`HOST_CFLAGS`, `CPPFLAGS`, `LDFLAGS`, `LDLIBS`, `PREFIX`, `DESTDIR`, `BINDIR`,
`DATAROOTDIR`, `DATADIR`, `MANDIR`, `MAN1DIR`, `LOCALEDIR` `EXECSUFFIX` and
`GEN_EMU` environment variables in `configure.sh`. Any values of those variables
given to `configure.sh` will be put into the generated Makefile.

More detail on what those environment variables do can be found in the following
sections.

### `CC`

C compiler for the target system. `CC` must be compatible with POSIX `c99`
behavior and options.

Defaults to `c99`.

### `HOSTCC` or `HOST_CC`

C compiler for the host system, used only in [cross compiling][6].

Defaults to `$CC`.

### `CFLAGS`

Command-line flags that will be passed verbatim to `CC`.

Defaults to empty.

### `HOSTCFLAGS` or `HOST_CFLAGS`

Command-line flags that will be passed verbatim to `HOSTCC` or `HOST_CC`.

Defaults to `$CFLAGS`.

### `CPPFLAGS`

Command-line flags for the C preprocessor. These are also passed verbatim to
both compilers (`CC` and `HOSTCC`); they are supported just for legacy reasons.

Defaults to empty.

### `LDFLAGS`

Command-line flags for the linker. These are also passed verbatim to both
compilers (`CC` and `HOSTCC`); they are supported just for legacy reasons.

Defaults to empty.

### `LDLIBS`

Libraries to link to. These are also passed verbatim to both compilers (`CC` and
`HOSTCC`); they are supported just for legacy reasons and for cross compiling
with different C standard libraries (like [musl][3]).

Defaults to empty.

### `PREFIX`

The prefix to install to.

Defaults to `/usr/local`.

### `DESTDIR`

Path to prepend onto `PREFIX`. This is mostly for distro and package
maintainers.

Defaults to empty.

### `BINDIR`

The directory to install binaries in.

Defaults to `$PREFIX/bin`.

### `DATAROOTDIR`

The root directory to install data files in.

Defaults to `$PREFIX/share`.

### `DATADIR`

The directory to install data files in.

Defaults to `$DATAROOTDIR`.

### `MANDIR`

The directory to install manpages in.

Defaults to `$DATADIR/man`

### `MAN1DIR`

The directory to install Section 1 manpages in. Because both `bc` and `dc` are
Section 1 commands, this is the only relevant section directory.

Defaults to `$MANDIR/man1`.

### `LOCALEDIR`

The directory to install locales in.

Defaults to `$DATAROOTDIR/locale`.

### `EXECSUFFIX`

The suffix to append onto the executable names *when installing*. This is for
packagers and distro maintainers who want this `bc` as an option, but do not
want to replace the default `bc`.

Defaults to empty.

### `GEN_EMU`

The emulator to run bootstrap binaries under. This is only if the binaries
produced by `HOSTCC` (or `HOST_CC`) need to be run under an emulator to work.

Defaults to empty.

## Build Options

This `bc` comes with several build options, all of which are enabled by default.

All options can be used with each other, with a few exceptions that will be
noted below.

### `bc` Only

To build `bc` only (no `dc`), use either one of the following commands for the
configure step:

```
./configure.sh -b
./configure.sh -D
```

Those two commands are equivalent.

***Warning***: It is an error to use those options if `bc` has also been
disabled (see below).

### `dc` Only

To build `dc` only (no `bc`), use either one of the following commands for the
configure step:

```
./configure.sh -d
./configure.sh -B
```

Those two commands are equivalent.

***Warning***: It is an error to use those options if `dc` has also been
disabled (see above).

### Signal Handling

To disable signal handling, use the `-S` flag in the configure step:

```
./configure.sh -S
```

### History

To disable signal handling, use the `-H` flag in the configure step:

```
./configure.sh -H
```

History is automatically disabled when building for Windows or on another
platform that does not support the terminal handling that is required.

***WARNING***: Of all of the code in the `bc`, this is the only code that is not
completely portable. If the `bc` does not work on your platform, your first step
should be to retry with history disabled.

### NLS (Locale Support)

To disable locale support (use only English), use the `-N` flag in the configure
step:

```
./configure.sh -N
```

### Extra Math

This `bc` has 7 extra operators:

* `$` (truncation to integer)
* `@` (set precision)
* `@=` (set precision and assign)
* `<<` (shift number left, shifts radix right)
* `<<=` (shift number left and assign)
* `>>` (shift number right, shifts radix left)
* `>>=` (shift number right and assign)

There is no assignment version of `$` because it is a unary operator.

The assignment versions of the above operators are not available in `dc`, but
the others are, as the operators `$`, `@`, `H`, and `h`, respectively.

Extra operators can be disabled using the `-E` flag in the configure step:

```
./configure.sh -E
```

This `bc` also has a larger library that is only enabled if extra operators are.
More information about the functions can be found in the
[Extended Library](./bc.md#extended-library) section of the
[full manual](./bc.md).

## Optimization

The `configure.sh` script will accept an optimization level to pass to the
compiler. Because `bc` is orders of magnitude faster with optimization, I
***highly*** recommend package and distro maintainers pass the highest
optimization level available in `CC` to `configure.sh`, as follows:

```
./configure.sh -O3
make
make install
```

As usual, `configure.sh` will also accept additional `CFLAGS` on the command
line, so for SSE4 architectures, the following can add a bit more speed:

```
CFLAGS="-march=native -msse4" ./configure.sh -O3
make
make install
```

Building with link-time optimization (`-flto` in clang) can further increase the
performance.

Manual stripping is not necessary; non-debug builds are automatically stripped
in the link stage.

## Debug Builds

Debug builds (which also disable optimization if no optimization level is given
and if no extra `CFLAGS` are given) can be enabled with:

```
./configure.sh -g
make
make install
```

## Binary Size

When built with both calculators, all available features, and `-Os` using clang,
the executable is 101 kb (100,912 bytes) on x86_64. That isn't much for what is
contained in the binary, but if necessary, it can be reduced.

The single largest user of space is the `bc` calculator. If just `dc` is needed,
the size can be reduced to to 72 kb (72,223 bytes).

The next largest user of space is history support. If that is not needed, size
can be reduced (for a build with both calculators) to 84 kb (84,448 bytes).

There are several reasons that history is a bigger user of space than `dc`
itself:

* `dc`'s lexer and parser are *tiny* compared to `bc`'s.
* `dc` does not have much extra code for runtime.
* History has a lot of const data for supporting UTF-8 terminals.

The next biggest user is `dc`, so if just `bc` is needed, the size can be
reduced to 89 kb (88,624 bytes) with history and 76 kb (76,256 bytes) without
history.

The next biggest user is signal handling. Without it, the size (with both
calculators) is reduced to 97 kb (97,800 bytes) with history and 84 kb (84,416
bytes) without history.

The next largest user is extra math support. If this is not needed, the size
(with both calculators) can be reduced to 97 kb (96,808 bytes) with history and
signal handling, 80 kb (80,344 bytes) without history, 93 kb (92,696 bytes)
without signal handling, and 76 kb (76,216 bytes) without both.

## Testing

The default test suite can be run with the following command:

```
make test
```

All available tests can be run by running the following command:

```
make test_all
```

This `bc`, if built, assumes a working, GNU-compatible `bc` in the `PATH` to
generate some tests, unless the `-G` option is given to `configure.sh`, as
follows:

```
./configure.sh -G
make
make test
```

This `dc` also assumes a working, GNU-compatible `dc` in the `PATH` to generate
some tests, unless the above option is given to `configure.sh`.

[1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html
[2]: https://www.gnu.org/software/bc/
[3]: https://www.musl-libc.org/
[4]: #build-environment-variables
[5]: #build-options
[6]: #cross-compiling

repository: michaelforney/bc

repo_name: michaelforney/bc


text:
# osu-recognition
My Graduation project for Orenburg State University

# Feature Extraction
dlib

# Face Detection
dlib, pretrained CNN

# Running
Firstly install all of the dependencies by running `pip install -r requirements.txt`.

Then run run-rest-api.\[py/ps1/sh\] and you're done.

repository: Trapov/osu-recognition

gha_language: Python

repo_name: Trapov/osu-recognition


text:
# Developing an Image Classifier with Deep Learning
## Python Application that can train an image classifier on a dataset, then predict new images using the trained model

In this first part of the project, I worked through a Jupyter notebook to implement an image classifier with PyTorch.

After I built and trained the deep neural network on the flower data set, I converted it into an application that others can use. My application is a pair of Python scripts that run from the command line.

# Specifications
The project includes next to the Jupyter Notebook, two files train.py and predict.py:
- train.py will train a new network on a dataset and save the model as a checkpoint.
- predict.py uses a trained network to predict the class for an input image-
- I also created a files just for the functions and classes relating to the model: dataloader.py, fuctions_train.py, functions_predict.py

# Installation
Clone the repository and open the file in Jupyter Notebook respect. the python files in a text editor and run them fro the command line

`$ git clone https://github.com/JannisMueller/Image-Classifier-Project.git`

# License

[MIT License](https://opensource.org/licenses/MIT)

repository: JannisMueller/Image-Classifier-Project

repo_name: JannisMueller/Image-Classifier-Project


text:
# Resilience4d

A fault tolerance library for D inspired by [Reslience4j](https://github.com/resilience4j/resilience4j/).

## Getting Started

### Dub dependency
To use this package, put the following dependency into your project's
dependencies section:

| Package format | Line to include in dependencies       |
| -------------- | ------------------------------------- |
| dub.json       | "resilience4d": "*"                   |
| dub.sdl        | dependency "resilience4d" version="*" |

### Quick start

Nothing useful has been implemented as of yet. As soon as this changes, a quick
start guide will be provided here.

## Hacking

### Building the project

Building the project is a simple as running the following command:
```
dub build
```

### Running the tests
Resilience4d is is separated into several sub packages.
To run all tests for a given  sub package (e.g. `circuit-breaker`), run the
following command in the project’s root directory:

```
dub test :<sub package>
```

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for
submitting issues and merge requests to us.

## Versioning

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

## Authors

* [**Johannes Loher**](https://github.com/ghost91-)

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

## License

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

## Acknowledgments

### Resilience4j
Resilience4d is heavily inspired by [Resilience4j](https://github.com/resilience4j/resilience4j/),
which is licensed under the Apache License, Version 2.0. You may obtain a copy
of that license at
http://www.apache.org/licenses/LICENSE-2.0.

Thanks a lot to everybody involved with that project.


text:
# Hedwig

This repo contains PyTorch deep learning models for document classification, implemented by the Data Systems Group at the University of Waterloo.

## Models

+ [Kim CNN](models/kim_cnn/): CNNs for sentence classification [(Kim, EMNLP 2014)](http://www.aclweb.org/anthology/D14-1181)
+ [HAN](models/han/): Hierarchical Attention Networks [(Zichao, et al, NAACL 2016)](https://www.cs.cmu.edu/~hovy/papers/16HLT-hierarchical-attention-networks.pdf)
+ [Reg-LSTM](models/reg_lstm/): Regularized LSTM for document classification [(Merity et al.)](https://arxiv.org/abs/1708.02182)
+ [XML-CNN](models/xml_cnn/): CNNs for extreme multi-label text classification [(Liu et al., SIGIR 2017)](http://nyc.lti.cs.cmu.edu/yiming/Publications/jliu-sigir17.pdf)
+ [Char-CNN](models/char_cnn/): Character-level Convolutional Network [(Zhang et al., NIPS 2015)](http://papers.nips.cc/paper/5782-character-level-convolutional-networks-for-text-classification.pdf)

Each model directory has a `README.md` with further details.

## Setting up PyTorch

**If you are an internal Hedwig contributor using GPU machines in the lab, follow the instructions [here](docs/internal-instructions.md).**

Hedwig is designed for Python 3.6 and [PyTorch](https://pytorch.org/) 0.4.
PyTorch recommends [Anaconda](https://www.anaconda.com/distribution/) for managing your environment.
We'd recommend creating a custom environment as follows:

```
$ conda create --name castor python=3.6
$ source activate castor
```

And installing the packages as follows:

```
$ conda install pytorch torchvision -c pytorch
```

Other Python packages we use can be installed via pip:

```
$ pip install -r requirements.txt
```

Code depends on data from NLTK (e.g., stopwords) so you'll have to download them. Run the Python interpreter and type the commands:

```python
>>> import nltk
>>> nltk.download()
```

Finally, run the following inside the `utils` directory to build the `trec_eval` tool for evaluating certain datasets.

```bash
$ ./get_trec_eval.sh
```

## Data and Pre-Trained Models

**If you are an internal Hedwig contributor using GPU machines in the lab, follow the instructions [here](docs/internal-instructions.md).**

To fully take advantage of code here, clone these other two repos:

+ [`Castor-data`](https://git.uwaterloo.ca/jimmylin/Castor-data): embeddings, datasets, etc.
+ [`Caster-models`](https://git.uwaterloo.ca/jimmylin/Castor-models): pre-trained models

Organize your directory structure as follows:

```
.
├── hedwig
├── Castor-data
└── Castor-models
```

For example (using HTTPS):

```bash
$ git clone https://github.com/castorini/hedwig.git
$ git clone https://git.uwaterloo.ca/jimmylin/Castor-data.git
$ git clone https://git.uwaterloo.ca/jimmylin/Castor-models.git
```

After cloning the Hedwig-data repo, you need to unzip embeddings and run data pre-processing scripts. You can choose
to follow instructions under each dataset and embedding directory separately, or just run the following script in
Hedwig-data to do all of the steps for you:

```bash
$ ./setup.sh
```

repository: iostudios-mobile/hedwig

repo_name: iostudios-mobile/hedwig


text:
# Memento User
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build status](https://github.com/tzarsmango/memento-cloud-gateway/workflows/Publish%20master/badge.svg)](https://github.com/tzarsmango/memento-cloud-gateway/actions)

This service is a part of the [memento](https://github.com/users/tzarsmango/projects/1) project. This application acts as
API Gateway for the memento application.

### Prerequisites

- [Open JDK 11](https://openjdk.java.net/projects/jdk/11/)
- [Spring Boot](https://spring.io/projects/spring-boot)
- [Docker](https://www.docker.com)
- [Gradle](https://gradle.org)

### Building

The project uses [Gradle](https://gradle.org/).

To build project please execute the following:

```bash
./gradlew clean build
```

### Running locally
This project tastes best with its companion services. See [here](https://github.com/tzarsmango/memento-docker) for a
convenient way of running `memento` application.

repository: tzarsmango/memento-cloud-gateway

gha_language: Java

repo_name: tzarsmango/memento-cloud-gateway


text:
---
layout: post
title: 'Friday Links #132'
---
It’s Christmas Eve. [Go check](http://www.noradsanta.org/) if Santa has arrived.

**Programming**

[Kayak, a C# HTTP server+framework](http://kayakhttp.com/)
[Ultimate Guide to Microformats: Reference and Examples](http://sixrevisions.com/web-development/ultimate-guide-to-microformats-reference-and-examples/)
[Bart : On Her Majesty's Secret Source Code: .NET Reflector 7 Early Access Builds Now Available](http://www.simple-talk.com/community/blogs/bart/archive/2010/12/16/96204.aspx)
[Visual Studio 2010 SP1 Interim Fix List - Jason Zander's WebLog ](http://blogs.msdn.com/b/jasonz/archive/2010/12/20/visual-studio-2010-service-pack-1-beta-feedback.aspx)
[C# Tutorial: 10 tricks that will make your jQuery enabled site go faster](http://csharptutorial.blogspot.com/2010/12/10-tricks-that-will-make-your-jquery.html)
[Announcing HTML5 Labs - Jim O'Neil - Developer Evangelist](http://blogs.msdn.com/b/jimoneil/archive/2010/12/21/announcing-html5-labs.aspx)
[Client-side (jQuery Centric) Development Links The Shortlist](http://blog.codylindley.com/links)
[**JetBrains .NET Tools Blog » Blog Archive » ReSharper 6 EAP is Open; Details on JavaScript Support**](http://blogs.jetbrains.com/dotnet/2010/12/resharper-6-eap-is-open-details-on-javascript-support/)

**Applications**

[Launch Web Apps in Google Chrome Without Opening a New Tab](http://www.labnol.org/software/launch-chrome-apps/18391/)

**Science and Technology**

[The Navy's Next-Gen Electromagnetic Catapult System Hurls its First Planes Skyward | Popular Science](http://www.popsci.com/technology/article/2010-12/navys-next-gen-electromagnetic-carrier-launch-system-hurls-its-first-planes-skyward)
[Placebos work -- even without deception](http://www.sciencedaily.com/releases/2010/12/101222173033.htm?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+sciencedaily+%28ScienceDaily%3A+Latest+Science+News%29)
[New hardware converts solar energy directly to hydrogen](http://arstechnica.com/science/news/2010/12/device-converts-solar-energy-directly-to-hydrogen.ars)
[iPad 2 design rumored to bring ergonomic tweaks | Apple - CNET News](http://news.cnet.com/8301-13579_3-20026549-37.html)

**On the Web**

[5 Weird & Wonderful Uses For Wolfram Alpha](http://www.makeuseof.com/tag/5-weird-wonderful-wolfram-alpha/)

**Stuff I Just Like**

[Bones Found On Island Could Be Amelia Earhart's : NPR](http://www.npr.org/2010/12/18/132163018/bones-found-on-island-could-be-amelia-earharts?ft=1&f=1019)
[Programmer’s 12 Days of Christmas ](http://www.devtopics.com/programmers-12-days-of-christmas/)

gha_language: HTML


text:
---
layout: layout.pug
navigationTitle:  Release Notes
title: Release Notes
menuWeight: 40
excerpt:
featureMaturity:
enterprise: false
---

## Version 1.1.8-5.1.2-beta

### Documentation
[DSE Service Guide 1.1.8-5.1.2](https://gist.github.com/NimaVaziri/7da71cf88a2fda04297de208de311b32)

### Breaking Changes
- Separates OpsCenter into a separate package (therefore upgrading from DSE 1.1.7-5.0.7 is not
supported)

### Improvements
- Updates DSE from 5.0.7 to 5.1.2
- Updates DSE Opscenter from 6.0.8 to 6.1.2
- Updates to [dcos-commons 0.30.0](https://github.com/mesosphere/dcos-commons/releases/tag/0.30.0)
- Update minDcosVersion from 1.8 to 1.9
- Adds support for strict mode
- Adds log level modification for scheduler
- Add log level code to dse-opscenter service
- Adds custom DSE node replace logic
- Adds support for foldered service name
- Allows user to use a separate volume for commit log data
- Exposes additional LDAP options

## Version 1.1.7-5.0.7-beta

* Upgraded dcos-commons to 0.20.1
* Added CNI / virtual network support
* Ability to specify service principal and user
* Reduced dse node mem and heap defaults from 32G/16G to 8G/4G
* Added deploy and recovery plan health checks
* Updated pre-install notes

repository: ShaunDeng/dcos-docs-site

repo_name: ShaunDeng/dcos-docs-site


text:
# geolocation-stream

    npm install geolocation-stream

use HTML5 [Geolocation](https://developer.mozilla.org/en/Using_geolocation) to watch location changes the node way -- with streams

    var movement = geolocationstream()

`movement` is a readable stream and speaks stream events: `data`, `error` and `end`. that means you can pipe movement output to anything that accepts streams, such as an XHR. in this case the `data` events will be lat/lon position updates using the `watchPosition` part of HTML5 geolocation

## to generate demo-bundle.js using browserify:

    npm install browserify -g
    browserify demo.js -o demo-bundle.js

MIT LICENSE


text:
## My First Tutorial - Installation

The purpose of this document is to give a very simple & intuitive way to create and interact with YangDB graph engine so that
One can evaluate and understand the basic use case and usage patterns of this framework.

This tutorial will be a step by step with image illustration from the basic setup of elastic / kibana / yangdb - icluding the
Initiating schema & data loading till the actual query and reviewing the results.

### Why not use docker ?

During this tutorial we will be using RPM installation of the tools used inside this guide - it is very much possible to use
Docker / docker-compose for all the usage describes below, my choice for using the RPM distribution of the tools was made to allow
the simplicity and clearity of the tutorial without getting into the additional complexities of docker-compose and its related env dependencies.

The docker-compose guide is available in the documentation folder as well...

## Step 1 - Getting all the Tools

The following tool are necessary for the tutorial process and for general usage and evaluation of this framework

- Elastcsearch  ( https://www.elastic.co/downloads/past-releases/elasticsearch-6-5-4 )
- Kibana        (https://www.elastic.co/downloads/past-releases/kibana-6-5-4)
- Cerebro       (https://github.com/lmenezes/cerebro/releases)
- YangDB        (https://github.com/YANG-DB/yang-db/releases/download/v0.5/dragon.tar)

## Step 2 - Running the tools

---

### Running elasticsearch

This is simple & easy - just go to the installation folder / bin and run the elasticsearch.sh executable
Configuration of the cluster is also needed in order to allow yangDB to access the demo default cluster, just edit the

elasticsearch.yml file in the config folder and add the following line:

     cluster.name: Dragons   # the culster name
     xpack.ml.enabled: false # disable xpack which is uder payed license

Once this is done you can run the elasticsearch server - ports 9200 & 9300 must be avialable...

---
### Running kibana

Again - this is easy to execute, just go to the bin folder under the installation location and run the kibana executable
The kibana should be able to connect to the running elasticsearch server via 9200 port

---
### Running Cerebro

Cerebro is an open source management tool for elasticsearch server which simplify the usage and maintenance of elasticsearch cluster
It has a web ui that uses port 9000 to connect to the elastic server, running it is done using the cerebro executable that resided
in the bin folder under the installation location.

- Cerebro ES cluster view
  ![Cerebro ES cluster view](img/cerebro-view-cluster.png )

---
### Running YangDB

**YangDB is a graph execution engine on top of elasticsearch, it has a REST API interface that allows interacting with it.**

Running yangDb from its installation folder (after un-tar the downloaded artifact) is simple, it is done via the
start-fuse-service.sh script in the installation folder.

#### Configuration for YangDB

When one needs to configure the yangDb server he should open the application.conf file under the config folder.
The default configuration for the demo is named Dragons and is wrapped around a game of thrones dats scenario.

The yangDb artifact has a in-process embedded elasticsearch server which - in our case, need to be disabled from loading
since we are using an external elasticsearch server .

Disabling the in-process elasticsearch in the application.conf

_This should be the final configuration for the elasticsearch connection_

        ...
        opensearch.embedded = false
        opensearch.delete_data_on_load = false
        opensearch.hosts = [ "localhost" ]
        opensearch.port = 9300
        opensearch.cluster_name = Dragons
        ...

Once this is done we can start the yangDb server (using the script mentioned above)

#### Calling the run script:
The next logging result should be apparent:

![YangDb console logs](img/yangDb-start-consule-logs.png)

#### Access the swagger web UI:

As it states -  the url  http://<IP_ADDRESS>:8888/  is available, we will focus our attention to the
REST API swagger page http://localhost:8888/swagger

![YangDb swagger](img/yangDb-swagger.png)

After the swagger is shown we can view in cerebro web ui the default log & system indexes that yang db creates once it's attached to elastic

![YangDb indexes](img/cerebro-yangdb-default-indexes.png)

These indexes are used for logging the activities of the graph server as well as storage of system data relevant to its internal
functionalities and behavior.

Once the logging index is alive we can view the specially drafted kibana dashboards made to monitor and observe yangDb

---
### Setup YangDb Kibana Dashboards

#### Load custom Kibana dashboards

We will load the next prepared kibana dashboards located in the dashboard folder:
![dashboard location](img/yang-db-kibana-dashboard-location.png)

**Loading the json dashboard to kibana..**

In Kibana toolbar, navigate to Settings » Objects tab.
Click the Import button and select the Dashboards. json.

![load dashboards](img/kibana-load-yangdb-dashboards.png)

Once these dashboards are loaded into kibana we can view their appearance:

#### The list of available yangDb dashboards
![dashboard list](img/kibana-yangdb-dashbaords.png)

#### The yangDb og dashboard
![dashboard logs](img/kibana-yangdb-logs-dashboard.png)

### What's next ?
Now that we've installed all the necessary tool and started them - we can continue to the next tutorial in which we will
start talking about our demo use case  - the Dragons Ontology (HBO's Game Of Thrown)

repository: YANG-DB/yang-db

branch_name: refs/heads/dev-opensearch

repo_name: YANG-DB/yang-db


text:
This library is a battle-tested attempt to make creating custom errors easier. How many times you wanted to return
i.e.: http status code with an error?

Something like that surely works:
```javascript
const error = new Error("Cannot do stuff");
error.statusCode = 400;
throw error;
```

But it's not very readable, you can't easily distinguish it from a regular error, and it's not type safe.

What if you could do something like that?
```javascript
throw new APIError("Cannot do stuff", { statusCode: 400 });
```

`@ezez/errors` allows you to do just that!

# Full-featured usage

I propose to create a file with all your custom errors. You can later import them from there.

## Creating and extending instances

To create a new error class use exported `createError` function.
The only argument is the error name, accessible later on `name` class property and all instances.

```typescript
// file: errors.ts
import { createError } from "@ezez/errors";

export const DatabaseError = createError("DatabaseError");

export const QueryError = DatabaseError.extend("QueryError"); // extend custom error
export const ApiParametersError = createError("ApiParametersError", TypeError); // extend built-in error
```

We just created:
- a database error class
- a query error class, i.e. for any error related to querying the database
- an api parameters error class, i.e. for any error related to api parameters

We used two available syntaxes for creating new error classes:
- `createError(name, TypeError)` - use this one if you want to extend any native error (like `TypeError`, `SyntaxError`
etc.)
- `SomeError.extend(name)` - use this one if you want to extend your custom error

> Note: Without TypeScript createError can be used for extending custom errors too, but it's recommended to still use
> these methods as described above.

 It can be built-in errors like `TypeError` or just
`Error`, custom errors like these created with `@ezez/errors` or even plain objects or primitives.

While it's an evil practice to `throw 100` - it's still possible, so always typecheck your errors before using them.

```typescript
try {
    throw QueryError("Query failed", { query: "SELECT * FROM users" });
}
catch (e) {
    if (e instanceof QueryError) {
        console.error(e.message, e.details?.query);
    }
    else if (e instanceof Error) {
        console.error(e.message);
    }
    else {
        console.error("Not an error type", e);
    }
}
```

**Important reminder:**

`instanceof` will check if given value is an instance of given type or any of its ancestors. This means if you do
multi-level extends with your classes - always check for the most specific type first, then for the less specific
(this is also why we used `else` in this example). You can always check the `name` property of the error as well.

```typescript
try {
    throw DatabaseError("Connection failed");
}
catch (e) {
    if (e instanceof QueryError) {
        // this is true, because QueryError is a subclass of DatabaseError
        console.error(e.name); // "DatabaseError"
    }
    if (e instanceof Error) {
        // this is also true, we are missing `else` so this part of code will execute as well
        console.error(e.message);
    }
}
```

# Type safety

> If you don't use TypeScript, you can skip this section.

When creating an error class with `createError` function, you can pass a generic type that defines the type of extra
data you may want to throw with your error. Omitting it will allow any data to be passed.

```typescript
const QueryError = createError<{ query: string }>("QueryError");

try {
    throw new QueryError("Query failed", { query: "SELECT * FROM users" });
}
catch (e) {
    if (e instanceof QueryError) {
        console.error(e.message, e.details?.query);
    }
}
```

`e.details?.` has intellisense support, so you can easily see what data is available and work with it.

Why optional chaining then? `details` property is always optional, even if you specify the shape of extra data - you
**don't have** to pass anything, but you **can** pass data that matches the shape.

> Note: When extending a class that defines a shape of extra data, your subclass will inherit that shape. If you want
> you can provide a **subtype** of the shape, ie: add additional properties to it.
>
> This is to provide extra type safety. See `Important reminder` of `Catching errors` section.

# Bonus features

## Normalizing errors

Instead of doing typechecks if something caught is not an error you can normalize any value to be an error. Every error
class created with `createError` has a static method `normalize` you can use to achieve that.

```typescript
const BaseError = createError("BaseError");

try {
    throw 5;
}
catch (e) {
    const error = BaseError.normalize(e);
    // you can now be sure that `error` is an instance of `BaseError` or any of native errors.
    console.error(error.message);
}
```

Normalizing can be done with three modes:
- `instanceof` - it will NOT normalize if given value is instance of `Error`
- `strict` - it will NOT normalize if given value looks very close to an `Error` instance, but it doesn't do
`instanceof` check - instead it checks if given value has `name`, `message`, `stack` properties, that are
non-enumerable strings, and `name` is ending with `Error`. This is the default mode. It should support most node errors
that doesn't follow the "thrown values have to be `instanceof` Error" practice.
- `loose` - it will NOT normalize anything that has `name`, `message` and `stack` properties. Use it if you work with a
lot of bad error lookalikes, but for some reason you want to keep them.

## Building an error from another error

Sometimes you want to throw an error that is based on another error. For example, you want to throw a `RenderError`
but you want to keep the original error message and stack trace. You can do that!

```typescript
const RenderError = createError("RenderError");

const renderHTML = () => {
    try {
        return render();
    }
    catch (originalError) {
        // Make sure to ensure that `originalError` is an instance of `Error`!
        // See `Normalizing errors` section for more info.
        throw new RenderError("Failed to render HTML", { date: Date.now() }, originalError);
    }
}

try {
    renderHTML()
}
catch (e) {
    if (e instanceof RenderError) {
        console.error(e.message, e.details?.date); // RenderError: Failed to render HTML, 123456789
        console.error(e.parent?.message); // i.e.: Error: cannot read property `foo` of undefined
        console.error(e.ancestors); // array of [parent, parent of that parent, ...until there is no parent]
    }
}
```

## Throwing an error freedom

When creating instance of your error it expects three values:
- `{string}` - a message
- `{object}` - error details
- `{Error}` - parent error

What's important - you can even skip some of them and provide null/undefined instead.

> Note: If you pass some argument type twice (like two strings) - you will instead get a `TypeError` thrown.

> Note: If you skip error message, but provide parent error - the message will be copied from the parent error.

# Advanced usage demo and the `names` property

`names` property is an array of strings that describe the hierarchy of errors. It can be useful to understand what
happened if you log your errors and review them later.

Let's take a look at the example:
```javascript
[
    "DatabaseError",
    ["TypeError", "Error"],
    "InternalServerError",
    "Error",
]
```

This means that `DatabaseError` was instantiated with `TypeError` error as argument. `TypeError` inherits from `Error`.
And `DatabaseError` inherits from `InternalServerError` which inherits from `Error`.

This array is safe to be stringified for logging purposes, it will look like this when stringified:
`"(DatabaseError,(TypeError,Error),InternalServerError,Error)"`

Now let's take a look at more complex example:

```javascript
const NotFoundError = createError("NotFoundError");
const InternalServerError = createError("InternalServerError");

const DatabaseError = InternalServerError.extend("DatabaseError")
const RenderError = InternalServerError.extend("RenderError");
const UnknownError = InternalServerError.extend("UnknownError");

// A database operations handler example
const db = { query: (query) => {
   // Some implementation, let's assume it throws an error
   throw new DatabaseError("Database query failed", { query });
}};

// Function that gets a product from database
const getProduct = id => {
    if (!id) {
        throw new TypeError("Product id is missing");
    }
    const data = db.query("SELECT * FROM products WHERE id = ?", id);
    if (!data) {
        throw new NotFoundError("Product cannot be found", { id });
    }
    return data;
};

// Function that renders a product page using given data
const renderProduct = (product) => {
    // Some implementation, let's assume it throws an error
    throw new RenderError("Failed to render product page");
};

// Function that fetches all data needed and renders a product page
const renderProductPage = (id) => {
    try {
        const product = getProduct(id);
        return renderProduct(product);
    }
    catch (error) {
        if (error instanceof TypeError) {
            // Change error type, adding more details and keeping parent error message and stack trace
            throw new InternalServerError("Failed to get product", { id }, error);
        }

        throw error; // rethrow error otherwise
    }
}

// Main app operation
try {
    const html = renderProductPage(req.GET.id);
    res.send(html);
}
catch (e) {
    // Making sure we always work with errors
    // If we caught something that is not an error, we will create an instance of UnknownError
    // Otherwise it will be still the same value as `e`
    const normalizedError = UnknownError.normalize(e);

    // Let's log the error to some service
    loggingService.log(
        normalizedError.name, normalizedError.message, normalizedError.details, String(e.names), normalizedError.stack
    );

    // Use error instance type to determine return code
    if (e instanceof NotFoundError) {
        res.send(router.renderError(404));
    }
    else {
        res.send(router.renderError(500));
    }
}
```

gha_language: TypeScript


text:
## 2.0.0 beta 1
 * Merged #800: unselectable ids starting with numbers #789. Thanks Jasmine Hegman!
 * Interface and features frozen - from this point all fixes will be merged to
   `master` and `develop`, and all interface changes only merged to `develop`.

## Starting dc.js Changelog
 * Here we start using git-flow, start a changelog, and start 2015.  Under git-flow,
   the latest release (currently 2.0.0 alpha 6) is always on the master branch,
   development (2.1.0-dev) is on the develop branch, and releases and fixes are always
   merged into develop.
 * Read about git-flow here: http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/
 * It follows that this document will always have two active sections: the master
   section, and the develop section.  Since any changes merged to master are also
   merged to develop, any changes added to the changelog for the master branch will
   get merged into the same section in the develop version of this document.

repository: BathHacked/epsr

repo_name: BathHacked/epsr


text:
# C# Language WebAssembly Support

## Supported

:ballot_box_with_check: Yes

## Compiler Support

Compiling C# to WASM is supported through the [Mono Compiler](http://www.mono-project.com).

The [Mono Compiler news page includes an overview of the current support](http://www.mono-project.com/news/2017/08/09/hello-webassembly/).

repository: xplatdev/compile-to-web

repo_name: xplatdev/compile-to-web


text:
# Natural Deduction language syntax (Fitch style)

## About

This language is designed to be quickly typed and rearranged, while still being easy to read and understand. You can think of it like markdown, but for ND.

- It may be best to use side by side with a preview renderer. As the language is static (in that symbols don't change meaning) and all symbols are known, a preview should not be difficult.

- Justifications are optional, as this language is also designed to be used in a checker / compiler to LaTeX, which (hopefully) will infer the rule from context. Hard line numbers are completely omitted for this reason too.

- Disclaimer: I'm still learning ND, and I have no idea what problems I'll need to solve with it. The current syntax is focused on concrete proofs, but I may revise it to better support abstractions like dots for omitted lines. I would like this language to be flexible, but that is not a priority.

- Some precedence decisions are arbitrary, as there is no official standard to conform to. I've tried to be as explicit as possible about what the parse tree will look like, and have loads of examples, but please always use parentheses when dealing with potentially ambiguous (to the reader) expressions.

## Syntax

Here I go through the legal syntax. The tests in the `corpus` directory can be considered the definitive language spec. If something is legitimately ambiguous, I will try to patch it and/or add new tests to specify expected behaviour.

Note that most rules here have alternative syntax. This is to allow for personal preference, and typing ease. For example, you can use the unicode character `∧` for an _and_ expression, but `^` or `&` will do the same and is readily accessible on most keyboards. Whatever you pick, for the sake of yourself and others please be consistent. The accompanying linter (planned) will probably shout at you if you combine styles.

Whitespace between tokens is ignored. Consecutive word characters will be read as a single variable, but `x ^ y` is the same as `x^y`. Indentation is not syntactic, but highly recommended for readability.

In the following, an `expression` is one logical expression, e.g, `a -> b -> c` or `x ^ y _ z`. In most cases, only one expression is permitted per line. The `block` of an expression refers to a consecutive sequence of expressions of equal or deeper nesting than the chosen expression.

### Comments

#### Line

```nd
x ^ y _ z # this is a line comment
```

#### Block

```nd
a -> b
/*

This is a block comment

*/
b -> c
```

### Expressions

The following are listed in order of precedence, from highest to lowest. When a statement could be ambiguous, such as `a <-> b -> c`, we use precedence to determine it means `a <-> (b -> c)`. We also use associativity to parse `p -> q -> r` as `p -> (q -> r)` and `a ^ b ^ c` as `(a ^ b) ^ c`.

#### Variable

Any word starting with a lower case letter will be considered a variable, with the exception of `v`. This is because `v` is used to represent the `or` operator.

```nd
x
cat
```

#### Function

Any word starting with a capital letter will be considered a function. Arguments are optional, but are required if the function name is `T` or `F`.

```nd
Q(x)
Cat(b)
A(x)
E
T(x)
```

#### True & False

`T` and `F` are semi-reserved names for true and false. These names can be used as function names if arguments are given in parentheses.

```nd
T
1
⊤

F
0
⊥
```

#### Not

```nd
-x
!x
~x
¬x # \u{00AC}
```

#### And

```nd
x ^ y
x & y
x ∧ y # \u{2227}
```

#### Or

```nd
x _ y
x | y
x v y
x ∨ y # \u{2228}
```

#### Implies

```nd
x -> y
x => y
x → y # \u{2192}
x ⇒ y # \u{21D2}
```

#### If and only if (Iff)

```nd
x <-> y
x <=> y
x ↔ y # \u{2194}
x ⇔ y # \u{21D4}
x ≡ y # \u{2261}
```

#### Forall

There is technically only one syntax at work here, which is `<forall> <var> <term>`. However, this grammar treats `.` as a "universal" group, which grabs everything it can in it's scope (it's low precedence and right associative).

A pure `forall` term actually has a precedence between `and` and `not`, and is left associative. The associated parse trees for the following would all be rooted as forall.

```nd
A x . P(x) <-> Q(x)
A x (P(x) <-> Q(x))
A x P(x)
∀ x . P(x) # \u{2200}
```

#### Exists

Behaves identically to forall.

```nd
E x . P(x)
∃ x . P(x) # \u{2203}
```

#### Groups

There are two ways to group terms: using `()` / `[]`, or with `.`. Parentheses act as would be expected, and their types must match too (so `([)]` is not legal). The "universal group" `.` operator is a low precedence right associative operator that grabs everything remaining in the expression scope. It effectively acts like you placed a `(` at the dot, and a `)` is inserted before the next `)` or at the end of the expression. So `A x . x ^ y == A x . (x ^ y)` and `(A x . x) ^ y == (A x (x)) ^ y`

```nd
(x) ^ (y)
(p -> q) -> r
a ^ . b _ c # == a ^ (b _ c)
```

### Proof construction

#### Hypothesis

A colon is used to represent the end of the hypothesese in a block. Alternatively, two or more underscores can be used. Commas may be used to separate multiple expressions on a single line.

ALTERNATIVE: Use commas to represent multiple hypothesis expressions.

```nd
p
p -> q:
q
```

```nd
p, p -> q
_________
q
```

#### Block

Blocks are determined by curly bracket scoping. Blank lines are ignored.

```nd
P(a) -> Q(a)
-Q(a)
___
{
    /* inner block */
    P(a)
    ____
    Q(a)
    F
    /* end of inner block */
}
-P(a)
```

#### Multiline expressions

Expressions are broken by a newline character. To split one expression over several lines, the backslash `\` character may be used. Comments are not permitted following this backslash. Normal block indentation rules are ignored for line continuations.

These line continuations can be configured to be respected by the `nd-convert` tool.

```nd
a -> b -> c -> d -> e ^ f _ -g
```

```nd
a -> b -> c \
-> d -> e ^ \
    f _ -g
```

#### Guards

Guards are one of the more difficult constructs to express well. Currently, I think this will serve

```nd
A x . P(x) -> Q(x)
{[a]
    P(a)
    ___
    Q(a)
}
```

The guard lines up with the block it is local to. All guards must be declared at the top of their block. Multiple guards in a single block (if ever necessary) can be defined like so. No particular method is enforced, so this is a stylistic choice (for now).

```nd
A x . P(x) -> Q(x)
___
{
    # declare the arb. variables a, b, c, d, and e
    [a][b]
    [c]
    [d,e]
    P(a)
    ___
    Q(a)
}
```

## Examples

Here I provide examples of the language in practice. Currently, only one proof per file is planned. This may be revised.

### Precedence

How to interpret an expression without explicit grouping is ambiguous; there are no strict rules to follow. This grammar enforces it's own interpretation, which is used when converting to LaTeX with explicit parentheses and when checking a proof. Here are some examples of statements with and without parentheses. A more comprehensive set of tests can be found in the `corpus/precedence.txtt` test file.

#### And & Or
```
a ^ b _ c == (a ^ b) _ c

a _ b ^ c _ d == (a _ (b ^ c)) _ d
```

#### Or & Implies
```
a _ b -> c == (a _ b) -> c

a -> b _ c -> d == a -> ((b _ c) -> d)
```

#### Implies & Iff
```
a -> b <-> c -> d == (a -> b) <-> (c -> d)

a <-> b -> c <-> d == a <-> ((b -> c) <-> d)
```

#### Iff & Forall
```
a <-> A x . x == a <-> (A x (x))

A x . x <-> a == A x (x <-> a)

A x x ^ y <-> a == ((A x (x)) ^ y) <-> a
```

repository: Aerijo/tree-sitter-nd

repo_name: Aerijo/tree-sitter-nd


text:
---
title: Snapcraft
series: customization
hideFromIndex: true
weight: 81
---

GoReleaser can also generate `snap` packages.
[Snaps](http://snapcraft.io/) are a new packaging format, that will let you
publish your project directly to the Ubuntu store.
From there it will be installable in all the
[supported Linux distros](https://snapcraft.io/docs/core/install), with
automatic and transactional updates.

You can read more about it in the [snapcraft docs](https://snapcraft.io/docs/).

Available options:

```yml
# .goreleaser.yml
snapcraft:
  # You can change the name of the package.
  # Default: `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
  name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"

  # Replacements for GOOS and GOARCH in the package name.
  # Keys should be valid GOOSs or GOARCHs.
  # Values are the respective replacements.
  # Default is empty.
  replacements:
    amd64: 64-bit
    386: 32-bit
    darwin: macOS
    linux: Tux

  # The name of the snap. This is optional.
  # Default is project name.
  name: drumroll

  # Wether to publish the snap to the snapcraft store.
  # Remember you need to `snapcraft login` first.
  # Defaults to false.
  publish: true

  # Single-line elevator pitch for your amazing snap.
  # 79 char long at most.
  summary: Software to create fast and easy drum rolls.

  # This the description of your snap. You have a paragraph or two to tell the
  # most important story about your snap. Keep it under 100 words though,
  # we live in tweetspace and your description wants to look good in the snap
  # store.
  description: |
    This is the best drum roll application out there.
Install it and awe!

  # A guardrail to prevent you from releasing a snap to all your users before
  # it is ready.
  # `devel` will let you release only to the `edge` and `beta` channels in the
  # store. `stable` will let you release also to the `candidate` and `stable`
  # channels. More info about channels here:
  # https://snapcraft.io/docs/reference/channels
  grade: stable

  # Snaps can be setup to follow three different confinement policies:
  # `strict`, `devmode` and `classic`. A strict confinement where the snap
  # can only read and write in its own namespace is recommended. Extra
  # permissions for strict snaps can be declared as `plugs` for the app, which
  # are explained later. More info about confinement here:
  # https://snapcraft.io/docs/reference/confinement
  confinement: strict

  # Each binary built by GoReleaser is an app inside the snap. In this section
  # you can declare extra details for those binaries. It is optional.
  apps:

    # The name of the app must be the same name as the binary built or the snapcraft name.
    drumroll:

      # If your app requires extra permissions to work outside of its default
      # confined space, declare them here.
      # You can read the documentation about the available plugs and the
      # things they allow:
      # https://snapcraft.io/docs/reference/interfaces.
      plugs: ["home", "network"]

      # If you want your app to be autostarted and to always run in the
      # background, you can make it a simple daemon.
      daemon: simple

      # If you any to pass args to your binary, you can add them with the
      # args option.
      args: --foo
```

> Learn more about the [name template engine](/templates).

Note that GoReleaser will not install `snapcraft` nor any of its dependencies
for you.

repository: chinanf-boy/goreleaser-zh

repo_name: chinanf-boy/goreleaser-zh


text:
# mono

![CI-CD](https://github.com/acciaioli/mono/workflows/CI-CD/badge.svg)

```
▶ mono
monorepo management cli

Usage:
  mono [command]

Available Commands:
  build       Builds artifact for a service
  checksum    Computes services checksums
  help        Help about any command
  list        Lists all services under the current directory
  push        Pushes a service artifact to the cloud
```

## Install

##### Linux
```
▶ sudo wget https://github.com/acciaioli/mono/releases/latest/download/mono.linux-amd64 -O /usr/local/bin/mono
▶ sudo chmod +x /usr/local/bin/mono
```

## Get Started

### AWS
```
▶ export AWS_REGION=my-aws-region
▶ export AWS_PROFILE=my-aws-profile
▶ export MONO_ARTIFACT_BUCKET=my-aws-s3-bucket
```

### mono usage

```
▶ mono --version
mono version snapshot-juan-dc0649b

▶ mono list
SERVICE                	DIFF	VERSION	CHECKSUM	LOCAL CHECKSUM
examples/go-service    	true	0      	-<PHONE_NUMBER>a800ab8909097d230933f42ebe249f
examples/python-service	true	0      	-       	fc09aaad1dc4cfd8f3165d9f5f9af2f394675664

▶ mono build --clean

▶ mono build
SERVICE                	ARTIFACT
examples/go-service    	.builds/examples/go-service/5215256745a800ab8909097d230933f42ebe249f.zip
examples/python-service	.builds/examples/python-service/fc09aaad1dc4cfd8f3165d9f5f9af2f394675664.zip

▶ mono push
ARTIFACT                                                                    	STATUS    	KEY                                                                    	ERROR
.builds/examples/python-service/fc09aaad1dc4cfd8f3165d9f5f9af2f394675664.zip	successful	examples/python-service/v1.fc09aaad1dc4cfd8f3165d9f5f9af2f394675664.zip	-
.builds/examples/go-service/5215256745a800ab8909097d230933f42ebe249f.zip    	successful	examples/go-service/v1.5215256745a800ab8909097d230933f42ebe249f.zip    	-

▶ mono list
SERVICE                	DIFF 	VERSION	CHECKSUM                                	LOCAL CHECKSUM
examples/go-service    	false	1<PHONE_NUMBER>a800ab8909097d230933f42ebe249f<PHONE_NUMBER>a800ab8909097d230933f42ebe249f
examples/python-service	false	1      	fc09aaad1dc4cfd8f3165d9f5f9af2f394675664	fc09aaad1dc4cfd8f3165d9f5f9af2f394675664

▶ echo foo bar > examples/python-service/a-new-file.txt

▶ mono list
SERVICE                	DIFF 	VERSION	CHECKSUM                                	LOCAL CHECKSUM
examples/python-service	true 	1      	fc09aaad1dc4cfd8f3165d9f5f9af2f394675664	486bff14a41a94c82b37109447398ce1ab225643
examples/go-service    	false	1<PHONE_NUMBER>a800ab8909097d230933f42ebe249f<PHONE_NUMBER>a800ab8909097d230933f42ebe249f

▶ mono build --clean

▶ mono build
SERVICE                	ARTIFACT
examples/python-service	.builds/examples/python-service/486bff14a41a94c82b37109447398ce1ab225643.zip

▶ mono push
ARTIFACT                                                                    	STATUS    	KEY                                                                    	ERROR
.builds/examples/python-service/486bff14a41a94c82b37109447398ce1ab225643.zip	successful	examples/python-service/v2.486bff14a41a94c82b37109447398ce1ab225643.zip	-

▶ mono list
SERVICE                	DIFF 	VERSION	CHECKSUM                                	LOCAL CHECKSUM
examples/go-service    	false	1<PHONE_NUMBER>a800ab8909097d230933f42ebe249f<PHONE_NUMBER>a800ab8909097d230933f42ebe249f
examples/python-service	false	2      	486bff14a41a94c82b37109447398ce1ab225643	486bff14a41a94c82b37109447398ce1ab225643
```

## To Do

- enhance `mono list` (prefix/contains filter)
- support for docker images as artifacts

repository: acciaioli/mono-rip

repo_name: acciaioli/mono-rip


text:
Command watcher extension

An AppDynamics extension to be used with a stand-alone Java machine agent to provide metrics from linux commands or script that generates a numeric output.

Metrics Provided

We provide metric related to output of the linux command or the script file that generates single numeric output.

For example: ps –ef | grep java |wc –l = 3

Installation

1. Download and unzip CommandWatcher.zip from AppSphere.
2. Copy the CommandWatcher directory to `<MACHINE_AGENT_HOME>/monitors`.

Configuration

###Note
Please make sure to not use tab (\t) while editing yaml files. You may want to validate the yaml file using a yaml validator http://yamllint.com/

1. Configure the file to be watched by editing the config.yaml file in `<MACHINE_AGENT_HOME>/monitors/ CommandWatcher /`. Below is the format

Important - displayName has to be unique for the command/script file

# List of commands
commandToProcess:

  - displayName: "Java processes list"
  command: "/Users/abhi.pandey/Documents/query1.sql"
  isScript: true

  - displayName: "Java count script"
  command: "/Users/abhi.pandey/Downloads/javaProcessesCount.sh"
  isScript: true

Note - Make sure the metric prefix ends with a |
metricPrefix: "Custom Metrics|Command Watcher|"

2. Configure the path to the config.yaml file by editing the <task-arguments> in the monitor.xml file. Below is the sample

<task-arguments>
<!-- config file-->
<argument name="config-file" is-required="true" default-value="monitors/ CommandWatcher /config.yml" />
  ....
</task-arguments>

Contributing

Always feel free to fork and contribute any changes directly via [GitHub][].

Community

Find out more in the [Community][].

Support

For any questions or feature request, please contact [AppDynamics Center of Excellence].

Version: 1.0
Controller Compatibility: 3.7 or later

[GitHub]: https://github.com/Appdynamics/Command-Watcher-Extension
[Community]: http://community.appdynamics.com/
[AppDynamics Center of Excellence]<EMAIL_ADDRESS>


text:
### Mar 17, 2020
- [Next.js vs. GatsbyJS: A developer’s perspective](https://blog.logrocket.com/next-js-vs-gatsbyjs-a-developers-perspective/)

### Mar 16, 2020
- [React Tutorial: Building and Securing Your First App](https://auth0.com/blog/react-tutorial-building-and-securing-your-first-app/?_ga=2.239746115.1395329317.1582953156-924973212.1582356522)

- [Handling Authentication in React with Context and Hooks](https://auth0.com/blog/handling-authentication-in-react-with-context-and-hooks/)

- [Session Storage and Local Storage in React](https://www.robinwieruch.de/local-storage-react)

### Feb 12, 2020
- [React Conditional Rendering](https://www.robinwieruch.de/conditional-rendering-react)

- [React Higher Order Components](https://www.robinwieruch.de/react-higher-order-components)

### Feb 04, 2020
- [Does your web app need a front-end framework?](https://stackoverflow.blog/2020/02/03/is-it-time-for-a-front-end-framework/) by Max Pekarsky

### Feb 01, 2020
- [React Function Components](https://www.robinwieruch.de/react-function-component) by Robin Wieruch

- [Django & React: JWT<EMAIL_ADDRESS>by Dakota Lillie

### Jan 25, 2020
- [Tutorial: Django REST with React (Django 3 and a sprinkle of testing)](https://www.valentinog.com/blog/drf/) by Valentino Gagliardi

repository: jyoo/readings

repo_name: jyoo/readings


text:
# SETUP

In order to setup the project please follow the next steps

## Google-Services.json

Create a Firebase Project, then add the  package name of the project as an Android App. Notice that you need to include the package name for all the build types, each package name is added as a separate app in the same firebase project.

## Android Studio Version

Currently we are using Android Studio Version 4.2

Then classpatch is using version `4.2.0-alpha08` is you do not want to use this version use `4.0.1`
Also distribution url  for 4.2 is `gradle-6.6-rc-6-bin` but if you do not want change it in `gradle-wrapper.properties`

* Release
```kotlin
com.oscarg798.amiibowiki
```

* Debug
```kotlin
com.oscarg798.amiibowiki.debug
```

* Alpha
```kotlin
com.oscarg798.amiibowiki.alpha
```

Enable crashlytics for the Firebase Project, then download the `google-services.json` file and paste it inside the project in the `app` module.

## Remote Config

The project use remote config as Feature Flag provider, you will need to create the following boolean values and set up a value for them

```kotlin
show_related_games
amiibo_detail
show_game_detail
```

## Local Properties File

The project use a `local.properties` file to setup a Google API Key for **YouTube* Player** and an API Key for the Game API https://api.igdb.com/.

Also the build type `Alpha` creates a minified signed build, and in order to make it work the file `signing.gradle` needs a specification
of a **KeyStore Path**, **KeyStore Alias**, and the **Password** to access to it

We use mixpanel to track some user events, create a project and paste the token as `mixpanelToken`

Create/Edit this file in the **root** of the project, it should look like

```
sdk.dir=<YourAndroidSDKPath>
keystorePassword=<Your Keystore password>
keystoreAlias=<Your Keystore Alias>
keystorepath=<Keystore path>
googleApiKey=<Google API Key>
mixpanelToken=<Mixpanel API Key>
```
### Help

1. Create a keystore key https://developer.android.com/studio/publish/app-signing
2. Create Google API Key for **YouTube* Player** https://developers.google.com/youtube/android/player/register
3. Create Game API Key https://api-docs.igdb.com/#about

## Properties.gradle

In order to automate the apk publishing to the playstore, we are this plugin using https://github.com/Triple-T/gradle-play-publisher, its
we setup the configuration in the `signing.gradle`, and as you see it's using a property `googleAccountServiceFile` that is the json file to
for authentication purposes in the PlayStore. So you can ignore this step commenting/removing the following line from the `build.gradle` file in the `app` module

```groovy
apply from: '../gradlescripts/release.gradle'
```

## CiTask.Gradle.kts

In order to run some tasks on the CI we have create the file `citask.gradle`, it uses some properties that should be
in the `local.properties` file. To make the app work comment/remove  the following line from  the `build.gradle` file in the `app` module

```
apply from: '../gradlescripts/citask.gradle.kts'
```

If you do not want to comment this file and you one to use those tasks add the following properties to `local.properties`

```
firebaseProjectId=[Firebase Project ID]
firebaseToken=[Firebase Auth Token]
```

Where `firebaseProjectId` is the firebase project id that you created on firebase, and  `firebaseToken` is the firebase token
from the `firebase cli` tool. https://firebase.google.com/docs/cli

## You are done!!

repository: PiaVillalba/AmiiboWiki

repo_name: PiaVillalba/AmiiboWiki


text:
---
# Documentation: https://sourcethemes.com/academic/docs/managing-content/

title: "從零開始的 Infrastructure as Code: Terraform - 01"
subtitle: "Infrastucture as Code: introduce Terraform from scratch"
summary: ""
authors: []
tags: ["kubernetes", "terraform", "devops"]
categories: ["kubernetes", "terraform"]
date: 2020-06-14T16:46:09+08:00
lastmod: 2020-06-14T16:46:09+08:00
featured: false
draft: false

menu:
  main:
    parent: "Kubernetes"
    weight: 1
---

This article is part of [從零開始的 Infrastructu as Code: Terraform]({{< ref "/post/2020-06-14-terraform-infrastructure-as-code" >}})
- [Get-started examples / SOP on Github](https://github.com/chechiachang/terraform-playground)
- [Introducation to Terraform Iac: Speaker transcript]({{< ref "/post/2020-06-15-terraform-infrastructure-as-code-transcript" >}})
- [Presentation](https://slides.com/chechiachang/terraform-introduction/edit)

Check my website [chechia.net](https://chechia.net) for other blog. [Follow my page to get notification](https://www.facebook.com/engineer.from.scratch). Like my page if you really like it :)

---

# Outlline

- our story: issues, steps, & results
- basics IaC, terraform
- benefits
- risks and 坑
- to be or not to be

experience oriented

# Our stories

- 100+ devs, many teams
- 25+ projects
- 50+ GKEs
- 80+ SQLs
- IAMs, redis, VPCs, load-balancers, ...

# Issues

- Ops manually create resources through GUI by SOP.
- We have many isolated, separeated resources, VPCs. It's our culture, and we (devops) want to change.
- Some projects have short life-cycle. Rapid resources created & destroy.

# Our user story

As a devops,
I would like to introduce terraform (IaC)
so that I can
- review all existing resources
- minimize error from manual operation
- ASAP!!

As a devops,
I would like to fully enforce terraform (IaC)
so that I can
- minimize efforts to operate infra
- delegate infra operations to junior team members
- minimize IAM privilges

# Introduction

1. import existing resources
1. review existing resources code
1. plan best practice resource templates
1. create new resources with templates
1. introduce git workflow, plan, commit, PR, and review
1. add wrapper handler
1. automation pipeline
1. repeat 2-4

# IaC

- Programatic way to operate infra
- declarative (functional) vs. imperative (procedural)
- Perfect for public cloud, cloud native, virtualized resources
- Benefits: cost (reduction), speed (faster execution) and risk (remove errors and security violations)

# Terraform

[Terraform](https://www.terraform.io/)

- Declarative (functional) IaC
- Invoke API delegation
- State management
- providers: azure / aws / gcp /alicloud / ...

# Demo

https://github.com/chechiachang/terraform-playground

# Scope

- Compute Instances
- Kubernetes
- Databases

- IAM
- Networking
- Load Balancer

# Expected benefits

- Minimize manual operation.
- Zero manual operation error
  - Standarized infra. Infra as a (stable) product.
- fast, really fast to duplicate envs

- Infra workflow with infra review
  - Easy to create identical dev, staging, prod envs
  - Reviewed infra. Better workflow. Code needs reviews, so do infra.
- Fully automized infra pipeline.

# Other Benefits

- Don't afraid to change prod sites anymore
  - We made a massive infra migration in this quater!!
- Better readability to GUI. Allow comment everywhere.

# Risks

- Incorrect usage could cause massive destruction.
  - 如果看見 destroy 的提示，請雙手離開鍵盤。 ~ first line in our SOP
  - If see "destroy", cancel operation & call for help.
- State management
- A little latency between infra version and terraform provider version

# Reduce Risks

- Sufficient understanding to infra & terraform
- Sufficient training to juniors
- Minimize IAM privilege: remove update / delete permissions

# Git-flow

[Our SOP](https://github.com/chechiachang/terraform-playground/blob/master/SOP.md)

- edit tf
- push new branch commit
- PR, review & discussion
- merge & apply
- revert to previous tag if necessary

# (Utility) Provide template

- wrap resources for
  - better accesibility
  - lower operation risks
  - uniform naming convention
  - best practice
  - suggested default value

# About introducing new tool

- The hardest part is always people
  - Focus on critical issues (痛點) instead of tool itself. "We introduce tool to solve..."
  - Put result into statistics "The outage due to misconfig is reduced by..."

# Overall, my IaC experience is GREAT!

- IaC to automation.
- Comment (for infra) is important. You have to write doc anyway. Why not put in IaC?

# Q&A

- [Full transcript]()
- [Presentation file]()
- [Source Code on Github](https://github.com/chechiachang/chechiachang.github.io-src/blob/master/content/post/terraform-infrastructure-as-code/index.md)
- [chechia.net](https://chechia.net) <- full contents
- [Follow my page to get notification](https://www.facebook.com/engineer.from.scratch)
  - Like it if you really like it :)

# Appendix.I more about terraform

terraform validate
terraform import
terraform module
terraform cloud & state management

# Appendix.I understand State conflict

- Shared but synced
- watch out for state conflicts when colaborating
  - state diff. could cause terraform mis-plan
- Solution: synced state lock
  - Colatorative edit (git branch & PR), synchronized terraform plan & apply
  - or better: automation

# Appendix.II understand resources from API aspect

GCP Load Balancer

### GCP Load Balancing

- understand resources from API aspect
  - how terraform work with GCP API

- internal
  - regional
    - pass-through: tcp / udp   -> internal TCP/UDP
    - proxy: http / https       -> internal HTTP(S)
- external
  - regional
    - pass-through: tcp / udp   -> tcp/udp network
  - global / effective regional
    - proxy
      - tcp                     -> TCP Proxy
      - ssl                     -> SSL Proxy
      - http / https            -> External HTTP(S)

### Terraform Resource

- forwarding_rule
  - forwarding_rule: tcp & http
  - global_forwarding_rule: only http

- backend_service
  - backend_service
    - health_check
    - http_health_check
    - https_health_check
  - region_backend_service
    - region_health_check
    - region_http_health_check
    - region_https_health_check

# Some ways to do IaC

- Cloud Formation
- bash script with API / client

# 引言 Infrastructure as Code

從字面上解釋，IaC 就是用程式碼描述 infrastructure。那為何會出現這個概念？

如果不 IaC 是什麼狀況？我們還是可以透過 GUI 或是 API 操作。隨叫隨用

雲端運算風行，工程師可以很在 GUI 介面上，很輕易的部署資料中心的架構。輸入基本資訊，滑鼠點個一兩下，就可以在遠端啟用運算機器，啟用資料庫，設置虛擬網路與路由，幾分鐘就可以完成架設服務的基礎建設(infrastructure)，開始運行服務。

然而隨著
- 雲平台提供更多新的（複雜的）服務
  - 服務彼此可能是有相依性（dependency），服務需要仰賴其他服務
  - 或是動態耦合，更改服務會連動其他服務，一髮動全身
- 需要縝密的存取控管（access control）
  - 防火牆，路由規則
  - 雲平台上，團隊成員的存取權限
- 專案的規模與複雜度增加
  - 多環境的部署
  - 多個備援副本設定
  - 大量機器形成的集群

# IaC 的實際需求

以下這些對話是不是很耳熟？

# IaC 的實際需求

沒有需求，就不需要找尋新的解決方案。

有看上面目錄的朋友，應該知道這系列文章的後面，我會實際分享於公司內部導入 Terraform 與 IaC 方法的過程。

各位讀者會找到這篇文，大概都是因為實際搜尋了 Terraform 或是 IaC 的關鍵字才找到這篇。

如果沒有需求，自己因為覺得有趣而拉下來研究，

如果沒有明確需求，就貿然導入
無謂增加亂度

# IaC 的實現工具

# 為何選擇 Terraform

# 建議

1. 如果不熟，從 import 現有最好的資源開始。把 70 分保住，再向 80 90 邁進。
1. 善用 module 封裝，只露出會用到的參數。

gha_language: Makefile


text:
Index: [[Index for ZR000 1FM Fundamentals of Mathematics]]

Return: [[1FM.1. Cardinality]]

See: [[1FM. Definition - Countably Infinite etc.]]

An infinite set $A$ is countable if and only if its elements can be arranged in a list $a_1,a_2,a_3,\ldots,a_n,\ldots$.

PROOF: ($\Rightarrow$) Suppose all of the elements of $A$ can be arranged in a list as indicated. Then one can form the bijection $f:\mathbb{N}\to A$ such that $f(n)=a_n$. Hence, $A$ is countable.

($\Leftarrow$) Suppose $A$ is countable. If it is finite, the proof is trivial. Suppose it is countably infinite. Then $|A|=|\mathbb{N}|$ by [[1FM. Definition - Countably Infinite etc.|definition]] and the proof follows trivially, similarly to the above.

QED.

url: https://raw.githubusercontent.com/ZR000X/IndieLibrary/3d017e376646e1e23d171412658c280a1b7365f2/User Directories/ZR000/Pure Mathematics/1FM Fundamentals of Mathematics/Knowledge Bank/1FM.P3. Theorem - Countable means Listable.md


text:
Playing with Angular2.

Following Pascal´s blog on http://blog.thoughtram.io/angular/2015/03/27/building-a-zippy-component-in-angular-2.html

Skeleton cloned from https://github.com/pkozlowski-opensource/ng2-play

ng2-play
========

The goal of this repo is to prepare a minimal ("walking skeleton") project build with Angular2.0 and ES6

## Install

Clone this repo and execute in your favourite shell:

* `npm i -g gulp` to install gulp globally (if you don't have it installed already)
* `npm i` to install local npm dependencies

## Play

After completing installation type in your favourite shell:

* `gulp play` to start a "Hello World" app in a new browser window. App files are observed and will be re-transpiled on each change.

## Dependencies

* ES6 -> ES5 transpilation
    * [traceur](https://github.com/google/traceur-compiler): ES6 -> ES5 transpilation
* ES6 modules loading
    * [es6-module-loader](https://github.com/ModuleLoader/es6-module-loader): ES6 module loader polyfill
    * [systemjs](https://github.com/systemjs/systemjs): plugins for the ES6 module loader to handle different module formats - this is mostly needed to load module format generated by traceur

## Learning materials

### Zones / long stack-traces

* [original repo](https://github.com/angular/zone.js)
* [zones in Dart](https://www.dartlang.org/articles/zones/)
* [zones in node](http://strongloop.com/strongblog/comparing-node-js-promises-trycatch-zone-js-angular/)

### ES6 module loading

* [Practical Workflows for ES6 Modules, Fluent 2014](https://www.youtube.com/watch?v=0VUjM-jJf2U)
* [Guy Bedford: Package Management for ES6 Modules, JSConf2014](https://www.youtube.com/watch?v=szJjsduHBQQ)
* [Loader API specification](http://whatwg.github.io/loader/)

repository: edhzsz/limoplayground

repo_name: edhzsz/limoplayground


text:
# OmniGraffle - EventStorming Stencils

Supporting tool for [EventStorming](https://leanpub.com/introducing_eventstorming) technique.

## Disclamer

This stencil created for pupose of having a more readable logs of EventStorming sessions and making some example diagrams. Do not attempt to do remote sessions since they are not working.

repository: dml/omnigraffle-ES-DDD-CQRS

repo_name: dml/omnigraffle-ES-DDD-CQRS