text:
## Compiler for custom minimalistic grammar
I made up the following grammar and programmed a compiler named Compilang for it. This is a university project.

### Prerequisites
1. Install Golang by following the tutorial [here](https://golang.org/dl/).
2. Install git by following the tutorial [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).

### Download and install Compilang compiler
1. Run `git clone git@github.com:nitrajka/compiler.git`
2. Go to `compiler/cmd/compilang`
3. Run `go install`

### Write and compile a Copmilang program
1. Write a program `program.compilang` in a working directory
2. The command `compilang program.compilang` compiles your program. You can specify the output file with flag `-o output_file.go` (default is `-o a.go`).
3. Run the compiled program with command `go run a.go`.

### Language syntax and examples
Examples of simple programs with their expected outputs can be found in [tests](https://github.com/nitrajka/compiler/tree/master/tests) folder.
Each example is written in its own file `example.compilang`. You can find its expected output in `example.output` file.
Here is an example of fibonacci algorithm written in Compilang.:
```
globals

endglobals

func fibonacci(int [n]): int {
	int [k, p];

    if n <= 0 {; print("invalid input") }
    else {;
        if n == 1 {; return 0}
        if n == 2 {; return 1}
        k = n-1
        p = n-2
        return call fibonacci(k) + call fibonacci(p)
    }
    return 0
}

main {
    int [n];

    while n < 11 {;
        n = n+1
        print(call fibonacci(n))
    }
}
endmain
```

### Grammar of Compilang
The actual version of grammar can be found in [grammar.md](https://github.com/nitrajka/compiler/blob/master/pkg/grammar.md).
The structure of a Compilang program is as follows:

1. Global variables
2. Function definitions
3. Main function

It is not allowed to write code anywhere else than inside functions.
#### Global variables and variable list
Global variables can be defined as follows:

```
globals
    int [i, j k]
    string [s, r] bool [b,a]
endglobals

...

globals
    int[i,j]bool[a,b]
endglobals
```
Notice, that there is no need for spaces between the type and list of variables,
as well as between list of variables and the following type. Variables of type `void` are not allowed to be created.

#### Functions

A function can be defined as follows:

1. Keyword `func`
2. Function's identifier
3. Variable parameters declared as in `globals` section and enclosed in parenthesis.
4. Colon
5. Type
6. Body

```
func name(string [a]): string {; return ""}
```
Return clause is optional for functions of type `void`. However, if you want to add a return clause for such function, make sure you return `void` - `return void`.

Calling a function without assigning it to a variable is a valid Compilang call. Such call makes sense if the function modifies global variables.

It is invalid to assign call of a void type function to a variable. However, since it is not possible to create a variable of `void` type, the mentioned assignment is not possible to make.

It is invalid to have 2 functions of the same name.
It is not possible to call main function.

#### Body
Body consists of 2 parts divided by a semicolon:
1. variable declarations
2. statements

Since Compilang is compiled to Golang, I used the feature of assigning a base value for a variable of a type.
For instance, in the example below,

    * variables `i` and `j` are assigned 0 during their declaration
    * variable `a` is assigned an empty string `""`
    * variable `b` is assigned `false`
```
{
    int [i, j] bool [b]
    string [a];

    if i == j {; print("i == j")}
    else {; print("i != j")}

    a = "hello world"
    print(a)

    j = 10
    while i < j {;
        print(i)
        print(var i)
        i = i+1
    }
}
```
The following four types of statement are supported in a body:

* assignment
* while loop
* if statement
* print statement

#### Expressions
Bool expression is expression which contains some of the bool operators - `&&`, `||`, `<`, `>`, `==`, `!=`, `<=`, `>=`.
Expression contains only arithmetic operators - `+`, `-`, `*`, `/`, `%`.

It is not possible to assign a bool expression, return a bool expression or print a bool expression.
For usage of expressions and bool expressions see examples [here](https://github.com/nitrajka/compiler/blob/master/tests/expressions.compilang) and [here](https://github.com/nitrajka/compiler/blob/master/tests/bool_expressions.compilang).

#### Assignment
Before assigning a value to a variable, this variable must have been declared in current or in one of the outer scopes.
According to the [grammar](https://github.com/nitrajka/compiler/blob/master/pkg/grammar.md) almost anything can be assigned to a variable but bool expression.
```
{ bool [b];
    b = true && false
}
```

#### Scopes
Scopes are nested. The outermost scope is global scope, which contains variables declared (actually defined with their base value as well) in `gloabls` section.
Exactly two scopes are defined before the first statement in main function:

* globals cope
* scope created from variables defined in its body.
Exactly two scopes are defined before the first statement in a function:

* global scope
* scope created from variables defined in its body and parameter variables

Each time a variable is used, the semantics subprogram checks whether the variable exists.
If there are two variables with the same name in two different scopes, the variable defined in the closest scope on the way from current scope to the outermost scope is used.
Example:
```
globals
    int [i]
endglobals

func f(): int {int [i];
    i = 3
    print(i)
    return i
}
main {;
    i = 5
    print(call f())
    print(i)
} endmain
```
Outputs:
```
3
3
5
```

It is not possible to have variables with the same name in the same scope.
Each time a new body is defined, new inner scope is created. Variables declared at the beginning of a function's body share scope with function's parameters.

#### Printing and returning
At most 1 variable is allowed in print statement. Empty print `print()` prints a newline.
Exactly 1 variable is allowed in return clause. It is not possible to return a bool expression.
For usage of `print()` and `return` see examples in `tests` folder - [here](https://github.com/nitrajka/compiler/blob/master/tests/printing.compilang) and [here](https://github.com/nitrajka/compiler/blob/master/tests/returning.compilang).

#### General notes
If you are not sure about where to put a whitespace, take a look into the [grammar](https://github.com/nitrajka/compiler/blob/master/pkg/grammar.peg).

Although the grammar supports arrays and maps, semantics and generator does not. Please, do not use these types yet.

repository: nitrajka/compiler

repo_name: nitrajka/compiler


text:
---
id: 3885
title: Flea
date: 2021-04-06T12:48:12+00:00
author: Laima
layout: post
guid: https://ukdataservers.com/flea/
permalink: /04/06/flea/
---

* some text
{: toc}

## Who is Flea

Born Michael Balzary, he is the bassist of the Red Hot Chili Peppers and widely considered to be one of the greatest rock bassists of all-time.

## Prior to Popularity

He met Anthony Kiedis, the future Red Hot Chili Peppers frontman, at Fairfax High School in Los Angeles. He first played jazz trumpet but was taught the bass by Hillel Slovak, who would become the Red Hot Chili Peppers’ first guitarist.

## Random data

He has played small roles in such films as Back to the Future Part II, Baby Driver, and The Big Lebowski.

## Family & Everyday Life of Flea

He was married to Loesha Zeviar from 1988 to 1990. He got engaged to model Frankie Rayder in 2005, but the two separated before tying the knot. He and Rayder had a daughter together named Sunny. In 2019, he married Melody Ehsani.

## People Related With Flea

In 2009, he and Radiohead frontman Thom Yorke formed the supergroup Atoms for Peace. They released their first album, Amok, in 2013.

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
# Batfish

[![Build Status](https://travis-ci.com/mapbox/batfish.svg?branch=main)](https://travis-ci.com/mapbox/batfish)

A static-site generator powered by React and Webpack.

![](./batfish-dark.png)

## Table of contents

- [Other documentation to check out](#other-documentation-to-check-out)
- [Goals](#goals)
- [Installation](#installation)
- [Getting Started](#getting-started)
- [API](#api)
  - [Configuration](#configuration)
  - [CLI](#cli)
  - [Node API](#node-api)
- [Pages](#pages)
  - [JS pages](#js-pages)
  - [Markdown pages](#markdown-pages)
  - [Non-page files within the pages directory](#non-page-files-within-the-pages-directory)
  - [Path not found: 404](#path-not-found-404)
- [Routing](#routing)
  - [Links](#links)
  - [Prefixing URLs](#prefixing-urls)
  - [Programmatically changing pages](#programmatically-changing-pages)
- [CSS](#css)
- [Document `<head>`](#document-head)
- [Development server](#development-server)
- [Advanced usage](#advanced-usage)
- [Comparison to other React-powered static-site generators](#comparison-to-other-react-powered-static-site-generators)

## Other documentation to check out

- [`docs/q-and-a.md`](docs/q-and-a.md)
- [`docs/configuration.md`](docs/configuration.md)
- [`docs/advanced-usage.md`](docs/advanced-usage.md)
- [`docs/batfish-modules.md`](docs/batfish-modules.md)
- [`docs/cli.md`](docs/cli.md)
- [`docs/node-api.md`](docs/node-api.md)

## Goals

Batfish aims to provide *the essentials* for building excellent static websites with React and Webpack.

- **(Universal) React.**
  Use React components as your building blocks.
  Your components are rendered into HTML pages at build time and then mounted in the browser for interactivity at run time.
- **Super-powered Markdown pages.**
  Batfish supports [jsxtreme-markdown] pages, which allow for interpolated JS expressions and JSX elements.
- **Client-side routing with key features and minimal overhead.**
  There is often no need for a big router library, but there *is* a need for often-overlooked features like automatic link hijacking (via [link-hijacker]) and scroll restoration (via [scroll-restorer]).
- **Essential optimizations.**
  JS bundles split by page and loaded on demand.
  Hashed asset filenames for long-term caching.
  Essential CSS injected into static HTML (via [postcss-html-filter]).
  And so on.
- **Minimal configuration.**
  Though almost every user will want to set a couple of configuration properties, you might not need more than that — and none are required.
- **Minimal.**
  Batfish does not aim to be an ecosystem unto itself.
  Instead, we've kept the codebase focused on a finite set of problems, while allowing extensibility by providing clear access to the underlying tools (React, Webpack, and Babel).
  We've also tried to abstract generalizable functionality into independent npm packages, like [jsxtreme-markdown], [link-hijacker], and [scroll-restorer].
  You can use these packages outside of Batfish — they are not coupled to Batfish conventions or configuration.

## Installation

You will need:

- Node 10
- npm 6

If you're not sure if your Node and NPM versions are up to date, run `nvm use` before installing dependencies. If you don't have NVM installed, you can [find installation instructions here](https://github.com/nvm-sh/nvm/blob/master/README.md#installing-and-updating).

Besides installing this package, you'll want to do a few things:

- Install the peer dependencies:
  ```
  npm install --save react react-dom react-helmet
  ```
- Add `_batfish*` to your `.gitignore`, and maybe other ignore files (e.g. `.eslintignore`).
  Batfish generates files and puts them in `_batfish_site` and `_batfish_tmp`.

```
npm install --save @mapbox/batfish
```

**You should not install the Batfish CLI globally.**
Install Batfish as an npm dependency for your project, then use the CLI via npm `"scripts"`, npx, or `node_modules/.bin/batfish`.

The easiest way to do this is to set up npm scripts in `package.json`, like so:

```
"scripts": {
  "start": "batfish start",
  "build": "batfish build",
  "serve-static": "batfish serve-static"
}
```

Then run `npm run start`, `npm run build`, and `npm run serve-static`, as needed.

## Getting Started

**The bare minimum to get started with Batfish.**

- Install Batfish and its peer dependencies.
  ```
  npm install --save @mapbox/batfish react react-dom react-helmet
  ```

- Create 3 new `script`s in your `package.json`:
  ```
  "start": "batfish start",
  "build": "batfish build",
  "serve-static": "batfish serve-static",
  ```

- Create your first page file at `src/pages/index.js`.

- Export from that page file a React component that renders something. Maybe something like this:

  ```jsx
  import React from 'react';

  export default class Home extends React.Component {
    render() {
      return (
        <div>Hello world</div>
      );
    }
  }
  ```

- Run `npm run start`.

- Open the URL printed in your terminal.

- Build your website.

- When you're ready to deploy, run `npm run build` to build the site for production, then `npm run serve-static` to check out the production site, which was written to `_batfish_site/`.

- Put your `_batfish_site/` directory on the Internet.

If you need to add configuration, create a `batfish.config.js` module in your project root.
See ["Configuration"](#configuration).

Look at [`examples/basic/`](examples/basic) for a simple example project.
Look at [`examples/no-config/`](examples/no-config) for a project with no configuration.
Or [`examples/miscellany/`](examples/miscellany), for a more advanced example project.

## API

### Configuration

By default, all Batfish CLI commands look for `batfish.config.js` at the root of your project.
It should export a function that returns your configuration object.

For example:

```js
module.exports = () => {
  return {
    siteBasePath: '/my/site/base/path',
    siteOrigin: 'https://www.mydomain.com'
    // Add more configuration options here ...
  };
}
```

See [`docs/configuration.md`](docs/configuration.md) to learn about all the ways you can configure Batfish.

### CLI

The CLI has the following commands:

- `start`: Start a development server and watch files for changes, rebuilding and refreshing as needed.
- `build`: Build the static site.
- `serve-static`: Serve the static site.
- `write-babelrc`: Write a `.babelrc` file that other processes, like your test runner, can use.

All commands will look for your configuration module in the current working directory or where you point with the `--config` option.

For more details, run `batfish --help` or see [`docs/cli.md`](docs/cli.md).

**You should not install the Batfish CLI globally.**
Install Batfish as an npm dependency and use the CLI via npm `"scripts"`, npx, or `node_modules/.bin/batfish`.

### Node API

Usually you should use the Batfish CLI.
But for those special cases when you want absolute control within a Node process, all the CLI's functionality is available in a Node API.

See [`docs/node-api.md`](docs/node-api.md).

## Pages

**The structure of your [`pagesDirectory`] determines the URLs of your site.**
JavaScript (`.js`) and Markdown (`.md`) files map directly to corresponding URLs.

So `src/pages/industries/real-estate.js` corresponds to the URL `/industries/real-estate/`,
and `src/pages/about/index.md` corresponds to the URL `/about/`.

When a page is rendered, its component is passed the following props:

- `location`: The browser's current [Location](https://developer.mozilla.org/en-US/docs/Web/API/Location).
  (During the static build, this will only include the `pathname` property.)
- `frontMatter`: The page's parsed front matter (parsed by [gray-matter]).

### JS pages

JS pages must export a React component with either `export default` (ES2015 modules) or `module.exports` (Node.js modules).

JS pages can include front matter within block comments, delimited by `/*---` and `---*/`.

For example:

```js
/*---
title: Power tie catalog
---*/
import React from 'react';

export default class PowerTiePage extends React.PureComponent {
  render() {
    return (
      <div>
        <h1>{this.props.frontMatter.title}</h1>
        <p>Content forthcoming ...</p>
      </div>
    );
  }
}
```

### Markdown pages

Markdown pages can include front matter delimited by `---`.

**These files are interpreted as [jsxtreme-markdown], so the Markdown text can include interpolated JS expressions and JSX elements!**
They are transformed into React components.

All the props for the page (e.g. `frontMatter`, `location`) are available on `props`, e.g. `props.frontMatter.title`.

For example:

```md
---
title: Power tie catalog
---

# {{ props.frontMatter.title }}

Content forthcoming ...
```

If you haven't seen [jsxtreme-markdown] before, [try it out online](https://mapbox.github.io/jsxtreme-markdown/).

#### Markdown page wrapper components

You need a wrapper component for each of your Markdown pages.
You can specify a site-wide default wrapper, and also wrappers for specific Markdown pages.
The wrapper component should be a React component (the default export of its module) which accepts the page's props and renders the Markdown content as `{this.props.children}`.
Because it will receive the page's front matter as `this.props.frontMatter`, you can use front matter to fill out different parts of the wrapper (just like a Jekyll layout).

Example:

```js
// blog-post-wrapper.js
import React from 'react';
import { MyPageShell } from './my-page-shell';

export default class BlogPostWrapper extends React.PureComponent {
  render() {
    const { frontMatter } = this.props;
    return (
      <MyPageShell>
        <h1>{frontMatter.title}</h1>
        <p>
          <strong>Summary:</strong> {frontMatter.summary}
        </p>
        <p>
          Posted on {frontMatter.date}
        </p>
        {this.props.children}
      </MyPageShell>
    );
  }
}
```

```markdown
---
wrapper: '../path/to/blog-post-wrapper'
title: Today I cleaned my refrigerator
summary: You can't put off your responsibilities forever, and refrigerators do not clean themselves. So I cleaned my refrigerator.
date: January 7, 2016
---

## Why did I do it

Things had started to smell ...

## How did I do it

I love shopping for cleaning supplies ...
```

The front matter passed to Markdown wrapper components is augmented with a `headings` field, which contains an array of data about the headings in the Markdown.
This data includes `slug`s that correspond to `id` attributes automatically added to the heading elements; so you can use this to generate a table of contents.
(Read more in ["Generating tables of contents for Markdown pages"].)

See [`examples/miscellany/`](examples/miscellany) and [`examples/table-of-contents/`](examples/table-of-contents) to learn more about what's possible with Markdown wrappers.

#### Import JS modules into jsxtreme-markdown

In jsxtreme-markdown components, you can specify JS modules to import and use within the interpolated code using [`prependJs` front matter](https://github.com/mapbox/jsxtreme-markdown/tree/master/packages/jsxtreme-markdown#prependjs).
List lines of `import` or `require` statements that define variables you can use in your interpolated JS and JSX.

By default, the following lines are always specified:

- `import prefixUrl from '@mapbox/batfish/modules/prefix-url'`: See [Prefixing URLs].
- `import routeTo from '@mapbox/batfish/modules/route-to')`: See docs for the [`route-to`] module.

This means that those functions can be used with no additional configuration.
Import your own modules and do more things.

Example:

```markdown
---
prependJs:
  - "import { myDateFormatter } from './path/to/my-date-formatter';"
---

Learn more about [security]({{prefixUrl('/about/security')}}).

Today is {{myDateFormatter('2015-08-21')}}
```

### Non-page files within the pages directory

Sometimes you need to put an asset at a specific URL.
You may want a `favicon.ico` in the root directory, for example; or a special image for social media `<meta>` tags on a page.
For this reason, **any non-page files within the [`pagesDirectory`] are copied directly into the same location during the static build.**

*When you access these files from pages, though, you need to use root-relative or absolute URLs.*
That is, within `src/pages/foo/bar.js` you cannot access `src/pages/foo/bar.jpg` as `bar.jpg`: you need to use `/foo/bar.jpg`.
You may want to [prefix the URLs](#prefixing-urls), also.

### Path not found: 404

Create a custom 404 page by adding `404.js` (or `404.md`) to the root of your [`pagesDirectory`].

In development, you can expect to see your 404 page by entering an invalid path.
When you build for [`production`], though, your 404 page will need to be handled and rendered by the server.
(If you run your [`production`] build locally with `serve-static`, expect to see `Cannot GET /yourInvalidPathHere`.)

## Routing

Batfish builds you a minimal client-side router with Webpack bundle splitting by page.

### Links

**You can use regular `<a>` elements throughout your site.**
When the user clicks a link, Batfish checks to see if the link's `href` refers to a page it knows about.
If so, client-side routing is used.
If not, the link behaves normally.

If you would like to use an `<a>` without this link-hijacking (e.g. for your own internal routing within a page), you can give it (or one of its ancestor elements) the attribute `data-batfish-no-hijack`.

This is all accomplished with [link-hijacker].

### Prefixing URLs

To prefix URLs with your [`siteBasePath`] and [`siteOrigin`] configuration options, use the [`prefix-url`] module.

### Programmatically changing pages

To change pages programmatically, with JavaScript, use the [`route-to`] module.

## CSS

Add stylesheets to your site with the [`stylesheets`] configuration option.
List all your stylesheets, URLs or filepaths, in the order you'd like, and Batfish will concatenate them together and add them to the build.
You can also pass them through whatever [PostCSS] plugins you'd like, with the [`postcssPlugins`] configuration option.

**During the static build, each page has its relevant CSS injected inline, and the complete stylesheet is loaded lazily, after the rest of the page is rendered.**
This optimization ensures that the loading of an external stylesheet does not block rendering, and your page content is visible as quickly as possible.
(This is accomplished with [postcss-html-filter].)

Assets referenced by `url()`s in your stylesheets will be hashed and copied to Batfish's [`outputDirectory`].

You can also add page-specific CSS (processed through the same PostCSS pipeline), if you find yourself adding lots of CSS rules that are not used on multiple pages.
Read more about ["Page-specific CSS"].

**If you want to bypass this CSS system and use your own, just do it.**
You can use the [`webpackLoaders`] and [`webpackPlugins`] configuration options to do whatever you need.

(Curious or concerned? Check out the [Q&A entries about CSS](docs/q-and-a.md).)

## Document `<head>`

**Use [react-helmet] to add things the document `<head>`**, (e.g. `<title>` and `<meta>` tags).

Batfish has a [peer dependency](https://nodejs.org/en/blog/npm/peer-dependencies/) on [react-helmet].
You definitely want to use it.
A good pattern is to create a `PageShell` React component that accepts props that it uses to populate that page's `<head>`.

## Development server

The development server (for `start` and `serve-static` commands) is a [Browsersync] server, which provides a nice experience for cross-device testing.

When you change a file, Webpack will recompile and the browser will automatically refresh.

(Why not hot module reloading?
Seemed like more trouble than it's worth.
But if you want to help add the feature, please open an issue.)

## Advanced usage

Additional documentation can be found in [`docs/advanced-usage.md`](docs/advanced-usage.md).

## Comparison to other React-powered static-site generators

We built Batfish by systematically addressing a set of problems we've had while building websites with React components.
We focused first on the problems themselves, trying to develop effective and focused, minimalistic solutions.
Sometimes this meant we used a popular tool, like Webpack.
Other times we sidestepped a popular tool, like React Router, and opted to build something more fitted to our needs.

As a result, Batfish is smaller and less ambitious than projects like [Gatsby](https://www.gatsbyjs.org/) and [Next.js](https://github.com/zeit/next.js/).
It's a thinner wrapper over the underlying tools, not an ecosystem of its own — more of a gateway into existing ecosystems.

Batfish also includes some features that we considered important but are overlooked by similar projects, like powerful Markdown integration and link hijacking.
(Though we tried to build such features in such a way that they could be re-used in other contexts.
  Try [jsxtreme-markdown] in your Gatsby site!)

Since we use Batfish for vital projects, we prioritize the needs of end-users (website visitors) and the stability, simplicity, and clarity of the system.

Please let us know what you think!

![The batfish](https://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Longnose_batfish.jpg/320px-Longnose_batfish.jpg)

[configuration]: #configuration

[pages]: #pages

[prefixing urls]: #prefixing-urls

[`pagesdirectory`]: docs/configuration.md#pagesdirectory

[`outputdirectory`]: docs/configuration.md#outputdirectory

[`dataselectors`]: docs/configuration.md#dataselectors

[`sitebasepath`]: docs/configuration.md#sitebasepath

[`siteorigin`]: docs/configuration.md#siteorigin

[`production`]: docs/configuration.md#production

[`stylesheets`]: docs/configuration.md#stylesheets

[`includepromisepolyfill`]: docs/configuration.md#includepromisepolyfill

[`webpackloaders`]: docs/configuration.md#webpackloaders

[`webpackplugins`]: docs/configuration.md#webpackplugins

[jsxtreme-markdown]: https://github.com/mapbox/jsxtreme-markdown

[link-hijacker]: https://github.com/mapbox/link-hijacker

[scroll-restorer]: https://github.com/mapbox/scroll-restorer

[react-helmet]: https://github.com/nfl/react-helmet

[browsersync]: https://www.browsersync.io/

[postcss-html-filter]: https://github.com/mapbox/postcss-html-filter

[postcss]: http://postcss.org/

["injecting data"]: docs/advanced-usage.md#injecting-data

[`postcssplugins`]: docs/configuration.md#postcssplugins

[gray-matter]: https://github.com/jonschlinkert/gray-matter

[`route-to`]: docs/batfish-modules.md#route-to

[`prefix-url`]: docs/batfish-modules.md#prefix-url

["page-specific css"]: docs/advanced-usage.md#page-specific-css

["generating tables of contents for markdown pages"]: docs/advanced-usage.md#generating-tables-of-contents-for-markdown-pages

license: ISC

repository: mapbox/batfish

gha_language: JavaScript

gha_license_id: ISC

repo_name: mapbox/batfish


text:
# Micro World

This is an example micro service environment build with Go using the [go-micro](https://github.com/micro/go-micro) framework.

The point of this repo is to show how simple it is to implement efficient and lean micro services using Go.

## Services

The environment consists of 3 different services. One service faces the outside world while the other have their own responsibilities and does not communicate outside the (imagined) cluster.

### API Service

This is a classic REST API built using [Echo](https://github.com/labstack/echo). It faces a (imagined) frontend application what wants to display a page with all information about a user given a user id. To gather this information, the API Service communicates with the other two services in this repo - Name Service and Email Service. This inter-service communication uses gRPC.

The one and only API endpoint this service has is:

`GET http://localhost:8080/api/users/{userID}`

Example reply:
```json
{
  "users": {
    "1": {
      "firstName": "Mikael",
      "lastName": "Karlsson",
      "email"<EMAIL_ADDRESS>    }
  }
}
```

The system currently has 3 users with user id's 1, 2 and 3.

### Name Service

This service has one gRPC endpoint that returns the firstname and lastname of a user given one or more user id's.

### Email Service

As you might have guessed by now, this service has one gRPC endpoint that returns the email address of a user given one or more user id's.

## Prerequisites

Install Protobuf: https://micro.mu/docs/runtime.html#protobuf

## Application Data

User databases for the Name and Email services are emulated using two `.csv` files, stored in the respective project's `data` folder.

## Communication

The gRPC communication protocol is defined in the two `.proto` files, located in the [proto folder](https://github.com/popstr/micro-world/tree/master/proto). These files are used to generate the source code for implementing both the server and the client.

Each service can generate the files it requires. This is done using the [Go Generate](https://blog.golang.org/generate) functionality.

I have made it simple to generate code for all services with one command using `make`. To generate all required source files, run this command in the project root folder:

```bash
make gen
```

To generate code for one service only, run this from the service's `cmd` folder:

```bash
go generate
```

## Future Improvements

The intention is to keep this project simple. Future additions must therefore not obfuscate the original message too much.

Things I might add:

* Dockerfiles
* 2 different databases for the name and email services (one SQL and one NoSQL)
* Protobuf compilation using docker image, https://github.com/TheThingsIndustries/docker-protobuf
* https://github.com/go-swagger/go-swagger
* Make it easy to use Etcd as the service discovery system

repository: popstr/micro-world

branch_name: refs/heads/master

repo_name: popstr/micro-world


text:
# E-commerce site in Laravel

This Repo contains the files of e-commerce website built in Laravel Framework

  - Uses Laravel 5.2
  - Integrated with Indipay
  - This code Contains payment example for PayuMoney

What you Can expect in future ?
  - Integration with Socialite
  - Text message notification
  - ACL
  - Admin Panel to add products and see transactions

### Installation

Download and extract the Repo and Follow the instruction below

In the root folder , do composer Update
```sh
composer update
```
### Database Setup
This will setup the Database for you
```sh
php artisan migrate --seed
```

### License
Licensed under the MIT License


text:
---
thumbnail: https://gyanl.com/assets/thumbs/default.png
layout: post
title: Great Portfolio Sites
subtitle: A list of websites that I think do a great job of showing design work.
permalink: portfolios
tags: resources
date modified: 15-06-2023
---

A portfolio is maybe the most important thing for a designer looking for work. I talk to a lot of early career designers who have done great work, but don't adequately show it on their portfolios. Recruiters are also curious about your personality—what drives you? Your side projects or hobbies—something you do for yourself or your community could be what speaks the most about you as a person.

This is a list of sites that I think are great to look at for inspiration.

## Portfolios

1. <https://gyanl.com/v2>
An older version of my website that worked as a portfolio, and got me an internship at Zomato and a job at Microsoft.

2. <https://abhishk.me/>
Abhishek Sharma does a fantastic job of showing his work visually. The website has case studies about his projects and experiences, and also shows off his side projects and experience with code.

3. <https://rishivanukuru.com/>
My friend Rishi Vanukuru is a design researcher, and his website focuses on his academic work. Not every website needs to look the same, and this is a great example of carefully picking what you want to show front and centre according to your objectives.

4. <https://fedor.design/>
Fedor Shkliarau has an extremely dynamic portfolio site - he uses a lot of animations and videos to show his work.

5. <https://roman.nurik.net/projects/>
Roman Nurik has some cool projects, and he manages to show just what they do with a couple lines of text and looping videos that are only a few seconds long. Sometimes less is more.

6. <https://www.alexkaessner.de/>
I particularly like the [iPad Main Menu concept](https://ipadmenu.study/) that Alex has on his site.

7. <http://karoliskosas.com/>
Kosas Karolis' portfolio pieces do a great job of walking you through the design process - what worked, what didn't and what the final result was.

8. <https://www.arunesh.co.in/>
Arunesh Singh optimises his website for people who don't have time (really—who does?). He uses a toggle on his portfolio pieces to let the reader switch between a quick and detailed overview.

9. [https://girapatel.co/](https://girapatel.co/)
This is a really nice site that shows visual/motion design work.

10. [Gavin Nelson](https://nelson.co/)
Just the basics done really well.

11. [Yuma Naito](https://yumanaito.com/)
Yuma is a Graphic Designer and this website uses a Swiss Grid to show off some great work.

## Blogs

These are not necessarily design portfolios, but I like how they are written and how they present ideas.

1. <https://www.arun.is/>
Arun Venkatesan writes longform pieces about design and technology (many about Apple products) and always has beautiful illustrations and photographs. I also love his writing style - he does a wonderful job of writing in depth about topics while keeping it crisp and easy to follow.

2. <https://tonsky.me/>
A blog by Nikita Prokopov, the creator of Fira Code. He writes about code and design. I love both his style of writing and the visual simplicity of the website.

3. <https://www.gwern.net/index>
This website is dark magic. I don't know how else to describe it.

4. <https://andymatuschak.org/>
I find something cool each time I look at Andy Matuschak's website. He also has a really cool [evergreen notes system](https://notes.andymatuschak.org/z4SDCZQeRo4xFEQ8H4qrSqd68ucpgE6LU155C) that I hope he open sources some day.

5. [Naval](https://nav.al/)
This is a cross between a blog and a podcast landing page. Each blog post is the transcript of a podcast clip. The theme and concept is pretty simple but it works well.

6. [Josh W Comeau](https://www.joshwcomeau.com/)
Josh writes about web dev and has really nice touches on his website. Audio feedback? For pressing buttons on a website?? I love it.

7. [Daniel Miessler](https://danielmiessler.com/)
Daniel writes about knowledge and the meaning of life. It's great.

8. [Kabir Goel](https://kabir.computer/)
Kabir writes about design tools and computers. This is a great example of something simple executed very well.

10. [Vyshnav Gangadharan](https://vyshnav.xyz/blog/)
Vyshnav writes a lot, and documents it all. He’s got a great layout and some very interesting side projects.

 I love this site. Press U for a secret easter egg.

2. <https://amandayeh.com/>
A whimsical portfolio site that evokes a sense of tech nostalgia with bitmap fonts and Windows 98 style icons.

3. <https://paco.sh/>
This site looks almost confusingly minimal till you hit the command icon and realise you can find everything from there. Not sure I would recommend this approach as the only way to find content on your site, but I did find it cool.

4. <https://www.sid.today/> + <https://www.siddharthjha.com/>
Siddharth Jha's is a UX engineer, and his websites showcases some really neat touches that tend to only happen when you are a designer who can code. Check out the cool animation on the home page, and slick hover states for links!I also really like the idea of public-by-default sites (you can see the mess of partly written thoughts I have at <https://gyanl.com/archive/>) and I hope this becomes more common. It's cool to see more raw, in-progress writing on the internet. [Siddharth writes about this here.](https://www.siddharthjha.com/blog/what-blogs-used-to-be-like)

6. [https://akshayverma.net/](https://akshayverma.net/)
Great typography. Akshay runs [Prophecy](https://prophecy.one/), which also has a great website.

7. <https://www.english-editor.com/>
This is not a design portfolio, but the site is very well designed and the information is extremely well organised.


text:
---
title: "Rapyd Platform"
slug: "rapyd-platform"
excerpt: "Rapyd provides the following platforms for fintech-as-a-service:\n* **Payments** - Moving money to and from Rapyd wallets.\n* **Point of Sale** - Handling cash at retail locations.\n\nEach platform has a production environment and also a sandbox for testing purposes. The sandbox is a simulator that approximates the behavior of the production environment."
hidden: false
createdAt: "2018-09-02T12:27:09.447Z"
updatedAt: "2021-04-14T10:03:11.296Z"
---
[block:callout]
{
  "type": "danger",
  "title": "Important",
  "body": "The production environment provides only the features and pay methods that are specified in your contract with Rapyd.\n\nThe sandbox enables you to test all features and pay methods.\n\nWhen you are ready to add more pay methods, use the Client Portal. Note that some pay methods require extra steps."
}
[/block]

[block:api-header]
{
  "title": "Payment Platform"
}
[/block]
**Production**

The production platform for payments is a commercial platform that processes actual monetary transactions. Use this environment after testing is complete. Relevant to clients.

* Base URL: **https://api.rapyd.net**

**Sandbox**

The sandbox is a test environment for use by the client. Use this environment for all testing and demonstrations. You can set up one sandbox per email address. Data produced in a sandbox can be used only in that specific sandbox.

There are limitations to the ability of the sandbox simulator to mimic the behavior of the production environment. For example, a card issuer might have a limit on the number of times a card can be used in any one 24-hour period. A card transaction that violates that limit might succeed in the sandbox but fail in the real world.

Similarly, if there are problems with the API request, there might be differences between the error codes in the sandbox and the error codes for various actual pay methods.

* Base URL: **https://sandboxapi.rapyd.net**

[block:api-header]
{
  "title": "Point of Sale Platform"
}
[/block]
**Production**

The production platform for POS is a commercial platform for ATMs and other retail locations that handle cash transactions. Relevant to Rapyd partners.

* Base URL: **https://pos.rapyd.net**

**Sandbox**

The sandbox is a test environment for ATMs and other retail locations that handle cash transactions. Data produced in a sandbox can be used only in that specific sandbox. Relevant to Rapyd partners.

* Base URL: **https://sandboxpos.rapyd.net**

To set up a production environment and sandbox for the Point-of-Sale API, contact **[Rapyd Client Support](https://support.rapyd.net)**.

repository: RonenSigan/doks

repo_name: RonenSigan/doks


text:
# NAME

enrimo - Investigate the influence of an enriched Mo isotope

# SYNOPSIS

    perl enrimo.pl [--materials=mo_mat ...] [--isotope=mo_isot]
                   [--enri_lev_type=frac_type] [--enri_lev_range=frac_range]
                   [--min_depl_lev_global=enri_lev] [--depl_order=option]
                   [--inp=fname] [--out_path=path] [--out_fmts=ext ...]
                   [--projectiles=particle ...]
                   [--verbose] [--nofm] [--nopause]

# DESCRIPTION

    This Perl program generates datasets for investigating the influence of
    an enriched Mo isotope on its associated Mo material, Mo element,
    and companion isotopes.
    The following quantities, as functions of the enrichment level of
    the Mo isotope to be enriched, are calculated for a Mo material:
    - Amount fractions and mass fractions of Mo and O isotopes
    - Mass fractions of Mo and O elements
    - Mass and number densities of the Mo material, Mo and O elements,
      and their isotopes
    - Density change coefficients (DCCs) of Mo and O isotopes

# OPTIONS

    Multiple values are separated by the comma (,).

    --materials=mo_mat ... (short: --mats, default: momet)
        all
            All of the following mo_mat's.
        momet
            Mo metal
        moo2
            Mo(IV) oxide (aka Mo dioxide)
        moo3
            Mo(VI) oxide (aka Mo trioxide)

    --isotope=mo_isot (short: --isot, default: mo100)
        Mo isotope to be enriched.
        mo92
        mo94
        mo95
        mo96
        mo97
        mo98  <= Mo-98(n,g)Mo-99
        mo100 <= Mo-100(g,n)Mo-99, Mo-100(n,2n)Mo-99, Mo-100(p,2n)Tc-99m

    --enri_lev_type=frac_type (short: --type, default: amt_frac)
        The fraction type to refer to the enrichment level.
        amt_frac
        mass_frac

    --enri_lev_range=frac_range (short: --range, default: 0,0.0001,1)
        The range of enrichment levels to be examined.
        e.g. 0.1,0.5     (beg,end; incre is automatically determined)
        e.g. 0,0.001,1   (beg,incre,end)
        e.g. 0,0.00001,1 (beg,incre,end)

    --min_depl_lev_global=enri_lev (short: --global, default: 0.0000)
        The minimum depletion level that applies to all the nuclides
        associated with the designated Mo materials. Overridden, if given,
        by nuclide-specific minimum depletion levels.
        e.g. 0.0007

    --depl_order=option (short: --order, default: ascend)
        The order in which the Mo isotopes other than the to-be-enriched one
        will be depleted.
        ascend (short: asc)
            Ascending order of mass number
        descend (short: desc)
            Descending order of mass number
        random (short: rand, alt: shuffle)
            Random order

    --inp=fname (short: -i)
        An input file specifying the nuclide-specific minimum depletion levels
        and the calculation precision. See the sample input file for the syntax.
        e.g. 0p9739.enr

    --out_path=path (short: --path, default: the value of -isotope)
        Path for the output files.

    --out_fmts=ext ... (short: -o, default: dat,xlsx)
        Output file formats.
        all
            All of the following ext's.
        dat
            Plain text
        tex
            LaTeX tabular environment
        csv
            comma-separated value
        xlsx
            Microsoft Excel 2007
        json
            JavaScript Object Notation
        yaml
            YAML

    --projectiles=particle ... (short: --projs, default: none)
        Reaction projectiles for associating the product nuclides with DCCs.
        If designated, the relevant reporting files are generated
        in addition to the default output files.
        all
            All of the following particles.
        g
            Photon <= Mo-100(g,n)Mo-99
        n
            Neutron <= Mo-98(n,g)Mo-99, Mo-100(n,2n)Mo-99
        p
            Proton <= Mo-100(p,2n)Tc-99m

    --verbose (short: --verb)
        Display the calculation process in real time. This will pause
        the shell each time a core calculation routine is called; use it
        only when debugging or checking part of the calculation process.

    --nofm
        The front matter will not be displayed at the beginning of program.

    --nopause
        The shell will not be paused at the end of program.
        Use it for a batch run.

# EXAMPLES

    perl enrimo.pl --type=mass_frac --range=0,0.00001,1
    perl enrimo.pl --mats=moo3 --global=0.0005 --verb
    perl enrimo.pl --mats=momet,moo3 --range=0.0974,0.0001,0.9739 --inp=0p9739.enr

# REQUIREMENTS

    Perl 5
        Text::CSV, Excel::Writer::XLSX, JSON, YAML

# SEE ALSO

[enrimo on GitHub](https://github.com/jangcom/enrimo)

[enrimo on Zenodo](https://doi.org/10.5281/zenodo.2628760)

[enrimo in a paper: _J. Phys. Commun._ **3** (2019) 055015](https://doi.org/10.1088/2399-6528/ab1d6b)

# AUTHOR

Jaewoong Jang<EMAIL_ADDRESS>
# COPYRIGHT

Copyright (c) 2018-2020 Jaewoong Jang

# LICENSE

This software is available under the MIT license;
the license information is found in 'LICENSE'.

repository: jangcom/enrimo

gha_language: Perl

gha_license_id: MIT

repo_name: jangcom/enrimo


text:
---
layout: post
title: New low volume "announce" mailing list
author: Tomaz Muraus
tags:
  - news
---

In addition to our existing users (**users@libcloud.apache.org**), developers
<EMAIL_ADDRESS>and commits<EMAIL_ADDRESS>mailing list, we now also have a new very low volume announce mailing list -
<EMAIL_ADDRESS>
The mailing list is moderated and will only be used for distributing important
project announcements such as information about new releases and other
important project updates.

You can subscribe to it by sending an email to
<EMAIL_ADDRESS>
[1]<EMAIL_ADDRESS>


text:
# Yandex

Yandex (Russian: Яндекс) is a Russian Internet company
which operates the largest search engine in Russia with
about 60% market share in that country.

The Yandex home page has been rated as the most popular website in Russia.

## Examples

### Python & CLI

**Simple Geocoding**

```python
>>> import geocoder
>>> g = geocoder.yandex('Moscow Russia')
>>> g.json
...
```

```bash
$ geocode 'Moscow Russia' --provider yandex
```

**Reverse Geocoding**

```python
>>> import geocoder
>>> g = geocoder.yandex([45.15, -75.14], method='reverse')
>>> g.json
...
```

```bash
$ geocode '45.15, -75.14' --provider yandex --method reverse
```

## Parameters

- `location`: Your search location you want geocoded.
- `lang`: Chose the following language:
    - **ru-RU** — Russian (by default)
    - **uk-UA** — Ukrainian
    - **be-BY** — Belarusian
    - **en-US** — American English
    - **en-BR** — British English
    - **tr-TR** — Turkish (only for maps of Turkey)
- `kind`: Type of toponym (only for reverse geocoding):
    - **house** — house or building
    - **street** — street
    - **metro** — subway station
    - **district** — city district
    - **locality** — locality (city, town, village, etc.)

## References

- [API Reference](http://api.yandex.com/maps/doc/geocoder/desc/concepts/input_params.xml)

gha_language: Python


text:
# Changelog

## [0.2.2] 2020-01-14

### Fixed

- Fix `Asn1RawDer` behind Application/Context tags issue [#14](https://github.com/Devolutions/picky-rs/issues/14).

## [0.2.1] 2020-01-10

### Added

- `Asn1RawDer` wrapper for user-provided raw DER.

## [0.2.0] 2019-12-23

### Added

- Add `from_reader_with_max_len` deserialization function to limit how many bytes can be read at most.

### Changed

- `from_reader` function has a default limit of 10240 bytes before returning a truncated data error.
    Uses `from_reader_with_max_len` to change the limit.

### Fixed

- Fix various crash found by fuzzing.

repository: ionut-arm/picky-rs

gha_license_id: NOASSERTION

repo_name: ionut-arm/picky-rs


text:
---
layout: project
type: project
image: images/project1.jpg
title: Kawaii Kon
permalink: projects/kawaiikon
date: 2016
labels:
  - Volunteering
  - Cosplay Cafe
summary: I volunteered at the 2016 Kawaii Kon event for the Cosplay Cafe.
---
Kawaii Kon is an event that helps spread Japanese culture, specifically the otaku culture. The word otaku is used to describe someone with an obsession and it normally has a negative meaning to it. However, as the years went by, the word otaku for us has come to mean someone who loves anime, manga, and other things from Japanese culture. The otaku culture is a culture that focuses on the geekier side of Japanese culture.

Kawaii Kon is a three day event that consists of cafes, video game rooms, concerts, voice actor visits, table-top games, fan-made artwork, and many more other booths and panels. It is located in Hawaii at the convention center. People from all around the world come here to experience a weekend where they can socialize with other people just like them.

For the Kawaii Kon of  2016, I was volunteering at the Cosplay Cafe. This cafe was open for as long as the Kawaii Kon was open. In the cafe we would seat guests and serve snacks and drinks. These consisted of brownies, coffee,tea, and milk. We also had video games and other non-digital games for the guests to play with. If the guests wanted, the servers would join them in playing games or just socializing with them.

My role in the Cosplay Cafe was a server. I took the guests' orders and delivered the snacks and drinks to their table. I also helped in prepping and cleaning the tables. I had to communicate to a variety of different guests and I spent time playing games with them as well. It was a nice experience and it helped me improve my social communicating skills. I also got to meet a lot of different people from all over the world. I will continue volunteering at this event to improve my skills even more.

You can learn more at the [Kawaii Kon Website](https://kawaiikon.com/).


text:
# Unity Learning Environment
--------------------------------

Unity Learning Environment (ULE) is a framework for Reinforcement Learning for Unity3D and Python,
inspired by [openai gym](https://github.com/openai/gym/) and [Arcade Learning Environment](https://github.com/mgbellemare/Arcade-Learning-Environment).
The software is under development and should in its current state be considered Alpha quality at best.

![alt tag](https://raw.githubusercontent.com/badgeir/ule/master/doc/pong.png)

### Prerequisites
ULE requires an installation of Unity 5 and a scientific Python distribution in order to run.
It has been tested to work with Anaconda python 2.7 and 3.5 64 bit versions.
Other versions might work with none to minimal changes to the source.

### Setting up ULE

Clone or download the repository.

Open a command prompt in the repository root, and run

	python setup.py install

## Usage
----------------
### Running an example scene
Open up the example scene *pong.unity*, and press play.
Open up an interactive python shell and import ule:

	>python
	>>>import ule

To connect to the running scene in Unity, write

	>>>env = ule.Env(connect_to_running=True)

This will connect to the server running in Unity, and get the environment information for the running scene.
The main components of the ule interface are *sensors* and *motors*. Every available sensor and motor in the
Unity scene are available through the ule environment's lists of sensors and motors:

	>>>env.sensors
	[Ball: Vector3 Sensor, Camera: Image(84L, 84L, 3L) Sensor]
	>>>env.motors
	[Paddle: Discrete(3) Motor]

This scene holds two sensors, an Image sensor with the name 'Camera' and a Vector sensor called 'Ball'. It also holds a motor named 'Paddle'.
For those familiar with openai gym, sensors and motors are in fact abstractions of gym's *spaces*, that define the valid actions and observations
for the motors and sensors. The Vector space defines a float vector of length N (where N = 3 for the Ball sensor), and the Image space is really a
renamed version of gym's Box. In ULE, the intention is not to work directly on those spaces, but rather through the sensor and motor abstractions. Each sensor and motor holds a name and a value, available through getter and setter methods.

	>>> env.sensors[0].name()
	'Ball'
	>>>ball = env.sensors[0]
	>>>ball.value()
	array([ 0.,  0.,  0.  ])
	>>>
	>>>paddle = env.motors[0]
	>>>paddle.value()
	0
	>>>paddle.set_value(1)
	>>>paddle.value()
	1

The motor class also wraps the spaces *contains* method, which checks if the value is valid in the given motor space. The Paddle motors Discrete(3) space has a valid range of the integers 0 - 2.

	>>>paddle.contains(2)
	True
	>>>paddle.contains(3)
	False

In order to send motor output and receive sensor feedback from the Unity scene,
*env.step()* is used, much like in openai gym. In contrast to gym, the step() function takes no input, but rather
sends the member motor values when sending to Unity.

	>>>reward, done, info = env.step()
	>>>ball.value()
	array([ 0.01,  0.01,  0.  ])

Here, the motor value of '1' was sent to the Paddle motor in the Unity scene, and the Ball sensor has been updated one timestep with the new Ball sensor value.

The Image sensor, like the Vector sensor, holds a numpy array. To view the image from the Camera sensor, one can use pyplot:

	>>>camera = env.sensors[1]
	>>>from matplotlib import pyplot as plt
	>>>plt.imshow(camera.value())
	>>>plt.show()

![alt tag](https://raw.githubusercontent.com/badgeir/ule/master/doc/imshow.png)

Finally, to close a connection to the environment:

	>>>env.close()

### An example agent

The following script plays five consecutive games, and outputs a random motor value at each step:

	import numpy as np
	import ule

	def main():
	    env = ule.Env(connect_to_running=True)

	    for game in range(5):
	        done = 0
	        total_reward = 0
	        while done == 0:
	            for motor in env.motors:
	                motor.randomize()

	            reward, done, info = env.step()

	            total_reward += reward

	        print('game %d, total reward: %f\n'%(game, total_reward))

	        env.reset()

	    env.close()

	if __name__ == '__main__':
	    main()

### An example DQN agent using OpenAI Baselines

See examples/baselines_dqn.py for a demo of using OpenAIs baselines DQN agent.
(Installation of [baselines](https://github.com/openai/baselines) is required.)

## Setting up a new scene

In this section, we will build up a new scene from scratch. Basic knowledge of the Unity game engine is assumed.

We will make a very simple scene where we control a cube with a discrete motor which controls three available actions:
stand still, move up and move down.
A vector sensor will read back it's current height. We will add a reward every time the height reaches above
a multiple of 1, and the game ends either when the height reaches a lower threshold -10 (losing condition),
or a high threshold 10 (victory condition).

In Unity, create a new scene and make sure you have the unityproj/Assets/ULE directory imported in your project, either by opening the example project (unityproj),
or by copying it into the Assets folder in your project.

Create a new Cube shape. The cube will have a Vector Sensor and a Discrete Motor attached to it. In the Inspector menu, with the Cube selected, add a new C# script, and name it HeightSensor.

In the folder ULE/Sensor/Templates you will find a template script, *VectorSensorTemplate.cs*. Copy the contents of this script to HeightSensor.cs, and rename the class to HeightSensor. HeightSensor.cs should now look like this:

	using UnityEngine;
	using System.Collections;
	using ULE;

	public class HeightSensor : VectorSensor
	{

		void Start()
		{
			mName = "Name";
			mLength = 3;
			mMinVal = -100;
			mMaxVal = 100;

			//remember to initialize base class
			base.Init();
		}

		protected override void Sample()
		{
			mVector[0] = transform.position.x;
			mVector[1] = transform.position.y;
			mVector[2] = transform.position.z;
		}
	}

We only need one value to describe the height, so change the length of the vector to 1. Also, change the
name to "Height". The min and max values are there so that it is simpler to normalize the input during training.
We can let those stay at the current values. The Start() function should now look like this:

	void Start()
	{
		mName = "Height";
		mLength = 1;
		mMinVal = -100;
		mMaxVal = 100;

		//remember to initialize base class
		base.Init();
	}

The Sample function is called each time we make a step() from python. In here, we set the sensor values which will be sent back to the python sensor.
We will set the value of the first (and only) vector element so that it contains the height of the cube.
Change the Sample function to the following:

	protected override void Sample()
	{
		mVector[0] = transform.position.y;
	}

That's it for the Height sensor. Let's move on to the motor.

Add a new Script, 'HeightMotor' to the cube.
This time, copy the content from ULE/Sensor/Templates/DiscreteMotorTemplate.cs (and remember to change the class name). We need three actions, so mNumActions should be set to 3.

In the Act() method, an integer is given each time we update the motors from python using step().
Here, we edit the switch statement for out purposes (Do nothing, move up and move down).

The HeighMotor.cs script should look like this when finished:

	using UnityEngine;
	using System.Collections;
	using ULE;

	public class HeightMotor : DiscreteActionMotor
	{

		void Start()
		{
			mName = "HeightMotor";
			mNumActions = 3;

			// remember to init base class
			base.Init();
		}

		// Called when new action is received
		protected override void Act(int action)
		{
			switch (action)
			{
				case 0: break; // do nothing
				case 1: transform.Translate(0, 0.1f, 0); break; // move up
				case 2: transform.Translate(0, -0.1f, 0); break; // move down
				default: break;
			}
		}
	}

Our sensors and motors are now done. We now have to add another script for taking care of the
communication with python. Add an empty object and name it 'Agent' (The name is important, as the sensors and motors uses the name to automatically attach themselves to the Agents list of sensors and motors. Attach the *ReinforcementAgent* script to Agent. The ReinforcementAgent runs a TCP server, and takes care of the communication between the Unity scene and out python environment. All sensors and motors in the scene are automatically kept track of by the ReinforcementAgent. The hierarchy should now look like the following,
where 'Cube' has the HeighSensor and HeightMotor scripts attached, and 'Agent' has the ReinforcementAgent attached.

![alt tag](https://raw.githubusercontent.com/badgeir/ule/master/doc/hierarchy.png)

Let's take a look in python to make sure that the sensors and motors show up. Press play in the Unity editor
to start the scene. Then open up a python console, and start a ule environment:

	>python
	>>>import ule
	>>>env = ule.Env(connect_to_running=True)
	>>>env.sensors
	[Height: Vector1 Sensor]
	>>>env.motors
	[HeightMotor: Discrete(3) Motor]

Allright, all good so far. Let's set our motor output to 1, and make a single step, to make sure our sensor
updates with the height measurement:

	>>>env.sensors[0].value()
	array([ 0.])
	>>>env.motors[0].set_value(1)
	>>>env.step()
	>>>env.sensors[0].value()
	array([ 0.1])

Good.

TODO: to be continued

repository: badgeir/ule

repo_name: badgeir/ule


text:
![Unofficial Logo](https://github.com/soft9000/AboutTime/blob/master/GitAboutTime.png)
# AboutTime - Web
Having trouble remembering what you did last week? Do you need to create a status report? Surely consultants need to assure clients that they have been earning their pay.

It is amazing how many tasks one can do, yet omit: AboutTime allows us to create meaningful, task-based status reports.

AboutTime also supports troubleshooting & problem detection. By allowing us prioritize, filter, and share log entries, AboutTime can also support "tiger team" troubleshooting operations.

No time to write things down? Relax: AboutTime also has a simple voice-note recording feature. Now we can keep track of what we saw and did, as well as when we first noticed. All real-time data-captured for thoughtful review / annotation later-on.

After awhile, using AboutTime encourages us to do more each day. By encouraging us to do more, AboutTime also allows us to become a lot more productive. Over time, most discover that using AboutTime will help us stand head-and-shoulders above the competition.

Features:

* Document Time Spent on Tasks & Projects
* (more as time [ahem] permits!)

We've also a [new video](https://www.youtube.com/watch?v=ohJfGX-EjoU), as well as a [group on Facebook](https://www.facebook.com/groups/abouttime9000)

## zSupport?
If you want to support the effort, I seek no donations. Instead, simply feel free to purchase one of [my educational](https://www.udemy.com/user/randallnagy2/) or [printed](https://www.amazon.com/Randall-Nagy/e/B08ZJLH1VN?ref=sr_ntt_srch_lnk_1&qid=1660050704&sr=8-1) productions?


text:
---
title: "Bearer/Token Auth"
date: 2018-08-06T16:44:49+01:00
anchor: "bearer-token-auth"
weight: 9
draft: false
---

If all of the following options are provided, bearer auth will protect all routes:
- `--bearer-auth` - enables bearer auth
- `--auth-realm=<realm>` - authorization server url
- `--auth-service=<service>` - authorization server service name
- `--auth-cert-path=<path>` - path to authorization server public pem file
- `--auth-actions-search-path=<JMESPath>` - (optional) JMESPath to find allowed actions in a jwt token

Using options above, *ChartMuseum* is configured with a public key, and will accept RS256 JWT tokens signed by the associated private key, passed in the `Authorization` header. You can use the [chartmuseum/auth](https://github.com/chartmuseum/auth) Go library to generate valid JWT tokens.

### JWT Token without a custom JMESPath to find actions

In order to gain access to a specific resource, the JWT token must contain an `access` section in the claims. This section indicates which resources the user is able to access. Here is an example token payload:

```json
{
  "exp":<PHONE_NUMBER>,
  "iat":<PHONE_NUMBER>,
  "access": [
    {
      "type": "artifact-repository",
      "name": "org1/repo1",
      "actions": [
        "pull"
      ]
    }
  ]
}
```

The `type` is always "artifact-repository", the `name` is the namespace/tenant (just use the string "repo" if using single-tenant server), and `actions` is an array of actions the user can perform ("pull" and/or "push).

If your JWT token structure is different, you can configure a [JMESPath string](https://jmespath.org/). So you can define the way to find the allowed actions yourself.

For the `type` and the the `name` you can use following placeholder

* name: `$NAMESPACE`
* type: `$ACCESS_ENTRY_TYPE`

E.g.: If you want to represent the default configuration, the JMESPath looks like: `access[?name=='$NAMESPACE' && type=='$ACCESS_ENTRY_TYPE'].actions[]`.

For more information about how this works, please see [chartmuseum/auth-server-example](https://github.com/chartmuseum/auth-server-example).

repository: chartmuseum/www

gha_language: HTML

repo_name: chartmuseum/www


text:
# `import {jQuery} from 'Shopify'`

This guide provides a few guidelines on writing sensible jQuery.

## Table of contents

1. [Rules](#rules)
1. [Resources](#resources)

## Rules

- When starting a new project, make sure you really need jQuery before including it. DOM APIs have improved significantly, and most jQuery operations have [easy-to-use equivalents](http://youmightnotneedjquery.com) that avoid the need for a large library.

- Prefix all jQuery references with a `$`.

  ESLint rule: [`jquery-dollar-sign-reference`](packages/eslint-plugin-shopify/docs/rules/jquery-dollar-sign-reference.md)

  > Why? This allows another developer to easily identify a jQuery variable (in particular, to differentiate such an object from a vanilla DOM node).

  ```js
  // bad
  let sidebar = $('.sidebar');
  this.node = $(node);

  // good
  let $sidebar = $('.sidebar');
  this.$node = $(node);
  ```

- Cache jQuery lookups whenever you will use more than once. If possible, use jQuery’s excellent support for chaining to avoid having to store any local references.

  ```js
  // bad
  $('.sidebar').attr('aria-hidden', true);
  $('.sidebar').css({opacity: 0});

  // better
  let $sidebar = $('.sidebar');
  $sidebar.attr('aria-hidden', true);
  $sidebar.css({opacity: 0});

  // best
  $('.sidebar')
    .attr('aria-hidden', true)
    .css({opacity: 0});
  ```

- All CSS updates that do not have to be calculated dynamically should be applied by a CSS selector that is toggled by JavaScript (as opposed to manually setting the style in JavaScript).

  > Why? This allows all styling information to live in a single place (CSS), and simplifies testing. It also makes it easier to reverse styles, as you do not need to store the original values and re-apply them.

  ```js
  // bad
  $('.ui-banner').css({color: 'rgba(0, 0, 0, 0.8)', backgroundColor: 'orange'});

  // good
  $('.ui-banner').addClass('ui-banner--warning');
  ```

- Do not treat `$(document).ready()` (or, equivalently, passing a function to `$()`) as a dumping ground for your entire application. The ready block should be used to initialize your application, with all initialization happening in small, testable, dedicated functions.

- Use `on` for binding events rather than using its aliases.

  ```js
  // bad
  $('#BadButton').click(() => {});

  // good
  $('#GoodButton').on('click', () => {});
  ```

- When binding multiple callbacks to a jQuery object, use chaining.

  ```js
  // bad
  let $document = $(document);
  $document.on('ready', () => {});
  $document.on('click', () => {});

  // still bad
  $(document).on({
    ready() {},
    click() {},
  });

  // good
  $(document)
    .on('ready', () => {})
    .on('click', () => {});
  ```

[↑ scrollTo('#table-of-contents')](#table-of-contents)

## Resources

- [How JavaScript event delegation works](https://davidwalsh.name/event-delegate)

[↑ scrollTo('#table-of-contents')](#table-of-contents)

repository: chilucdiep/javascript

repo_name: chilucdiep/javascript


text:
# CR Conditions and Readiness Probe
Conditions are..
	   _the latest available observations of an object's state. They are
	   an extension mechanism intended to be used when the details of an
	   observation are not a priori known or would not apply to all
	   instances of a given Kind._

Kubernetes conditions [documentation](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status).

The HCO's CR is a representation of the all the underlying component operators'
state.  In theory, if the HCO's CR exists, then all component CRs _should_
exist, and all applications _should_ exist.  If the object doesn't exist, then
all component CRs _should not_ exist, and all applications _should not_ exist.
However, the CR existence can only can tell us if the application should exist and
doesn't help us observe the application's health. This is where the HCO and
component operators will use conditions on their CRs to reflect the health of
the underlying application.  Component operators store conditions that are
watched by the HCO and the HCO will store conditions that reflect the
[worst state](https://github.com/kubevirt/hyperconverged-cluster-operator/blob/main/docs/conditions.md#hco-conditions) of all component operator conditions.

## Outlook Model
There's a long-running [discussion](https://github.com/kubernetes/kubernetes/issues/7856) in the Kubernetes
community about the use of Phases, Conditions, and using controllers as
state machines that hasn't been resolved.  This design document follows the
"outlook" approach described in this [comment](https://github.com/kubernetes/kubernetes/issues/7856#issuecomment-99667941), which
we'll use until the Kubernetes community has a resolution we can adopt.

## Condition Struct
We can use some of the CVO's [conditions](https://github.com/openshift/api/blob/b1bcdbc/config/v1/types_cluster_operator.go#L123-L134) to standardize across components.

Here's how the Condition struct will look...

```go
type ApplicationStatusCondition struct {
   // type specifies the state of the operator's reconciliation functionality,
   // which reflects the state of the application
   Type ConditionType `json:"type"`

   // status of the condition, one either True or False.
   Status ConditionStatus `json:"status"`

   // lastTransitionTime is the time of the last update to the current status object.
   LastTransitionTime metav1.Time `json:"lastTransitionTime"`

   // reason is the reason for the condition's last transition.  Reasons are CamelCase
   Reason string `json:"reason,omitempty"`

   // message provides additional information about the current condition.
   // This is only to be consumed by humans.
   Message string `json:"message,omitempty"`
}
```

## Library
We're going to use a shared library to provide the condition types to operators.
This will ensure the code is not specific to any operator and it will allow
products outside of CNV to also consume it.

https://github.com/openshift/custom-resource-status

## ConditionType
`ConditionType` _specifies the state of the operator's reconciliation functionality,
which reflects the state of the application_. `ConditionType`s use `ConditionStatus`
to report state.  The `ConditionStatus`es we will use are either `True` or `False`.
The `ConditionStatus` object can also be `Unknown`, but only the HCO will use
`Unknown` because it's not clear what `Unknown` means in terms of an application's
lifecycle.  The HCO can assume `Unknown` for conditions, while operators are starting up.

#### ApplicationAvailable
```
	ApplicationAvailable ClusterStatusConditionType = "Available"
```
ApplicationAvailable indicates that the binary maintained by the operator
(eg: openshift-apiserver for the openshift-apiserver-operator), is functional
and available in the cluster.

#### OperatorProgressing
```
	OperatorProgressing ClusterStatusConditionType = "Progressing"
```
Progressing indicates that the operator is actively making changes to the binary
maintained by the operator (eg: openshift-apiserver for the
openshift-apiserver-operator).

#### ApplicationDegraded
```
	ApplicationDegraded ClusterStatusConditionType = "Degraded"
```
Degraded indicates that the application is not functioning completely.
An example of a degraded state would be if there should be 5 copies of the
component running but only 4 are running. It may still be available, but it is
degraded.

#### Condition Matrix

| Condition        | Status           | Status  | Status  |
| :------------- |:-------------:|:-----:|:-----:|
| ApplicationAvailable | True | True | True |
| OperatorProgressing | False | True | True |
| ApplicationDegraded | False | False | True |
| Meaning | Application is 100% healthy and the Operator is idle | Application is functional but, either upgrading or healing | Application is functioning below capacity and an upgrade or heal is in progress |

| Condition        | Status           | Status  |
| :------------- |:-------------:|:-----:|
| ApplicationAvailable | False | False |
| OperatorProgressing | False | True |
| ApplicationDegraded | True | True |
| Meaning | Application and/or operator are in a failed state that requires human intervention.  Failed upgrade or failed heal | Application is in a failed state and an operator is healing |

| Condition        | Status           |
| :------------- |:-------------:|
| ApplicationAvailable | False |
| OperatorProgressing | True |
| ApplicationDegraded | False |
| Meaning | Operator is deploying the application |

## Readiness Probe
With a standardized set of conditions, the HCO should report the health of the
overall application back to OLM and the user.  This will be critical for sensitive
operations like upgrade, because OLM needs to know it shouldn't replace an
operator when it is in the middle of important work.

See this [issue](https://github.com/operator-framework/operator-lifecycle-manager/issues/922) for why we only want to report a readiness probe on the HCO
instead of on all component operators.

## Reason
`Reason` is _a one-word CamelCase reason for the condition's last transition_.

Components will be responsible for reporting `Reason`, which will explain their
condition.

## Message
`Message` is a _human-readable message indicating details about last transition_.

Explain why your CR has `Reason`.

## HCO conditions
It's important to point out that the `ConditionTypes` on the HCO don't represent
the condition the HCO is in, rather the condition of the component CRs.

The HCO will use the same `ConditionType`s and `Reason`s, but it will be the
only operator to use `Unknown` for `Status`.  If the HCO notices that a component
CR is missing condition fields, the HCO will assume the status of
`ApplicationAvailable = false`, `OperatorProgressing = unknown` and
`ApplicationDegraded = unknown`.  If the HCO also detects there is no `Reason` value
too, then it will assume `Reason = "InstallInvalid"`.

The HCO's `ConditionType`s will always represent the _worst_ `Status` and the
corresponding `Reason`.

The _worst_ `Status` for each `ConditionType`:

| Condition   | Status  |
| :------------- |:-------------:|
| ApplicationAvailable | False |
| OperatorProgressing | True |
| ApplicationDegraded | True |

gha_language: Go


text:
# Cool Story Bro

Compilation of actually cool stories I find.

- [I learned to code, build a web app and launch it on Product Hunt in 2 months](https://medium.com/@AndreyAzimov/i-learned-to-code-and-build-a-web-app-in-2-months-da8f2932c139)
- [How to build a State-of-the-Art Conversational AI with Transfer Learning](https://medium.com/huggingface/how-to-build-a-state-of-the-art-conversational-ai-with-transfer-learning-2d818ac26313)

- [One Data Science Job Doesn’t Fit All](https://www.linkedin.com/pulse/one-data-science-job-doesnt-fit-all-elena-grewal/)

- [
Demystifying the Natural Logarithm (ln)](https://betterexplained.com/articles/demystifying-the-natural-logarithm-ln/)


text:
# Guides

Follow on of the guides to learn more about how to use the Ververica Platform Operator:

* [Deployment](deployment.md)
  This guide walks through deploying the Ververica Platform and the Operator.


text:
# Axiom Schema of Specification

https://en.wikipedia.org/wiki/Axiom_schema_of_specification

aka:
- Axiom Schema of Specification
- Axiom Schema of Separation
- Subset Axiom Scheme
- Axiom Schema of Restricted Comprehension
- Axiom Schema Of Comprehension (some mathematicians call it this although others use that term for unrestricted comprehension)

Axiom Schema of Specification:

`∀(w₁ … wₙ) ∀a (∃b (∀x (x ∈ b -> (x ∈ a ⋀ φ(x, w₁, …, wₙ, a)))))`

In many popular versions of axiomatic set theory the Axiom Schema of Specification is an axiom schema.

> Axiom Schema of Specification essentially says that any definable subclass of a set is a set.

Since restricting comprehension solved Russell's paradox, several mathematicians including Zermelo, Fraenkel and Gödel considered it the most important axiom of set theory.

One instance of the schema is included for each formula `ϕ` in the language of set theory with free variables among $$x,w_1,\dots,w_n,A$$. So $$B$$ is not free in $$\phi$$. In the formal language of set theory, the axiom schema is:

∀w₁, …, wₙ ∀A ∃B ∀x (x ∈ B -> (x \in A ∧ φ(x, w₁, …, wₙ, A)))

$$
\forall w_1,\ldots,w_n\ \\
\forall A\
\exists B\ \\
\forall x\
(x \in B \Leftrightarrow [x \in A \land \varphi(x, w_1, \ldots, w_n , A)])
$$

given any set $$A$$,
there exists a set $$B$$
such that,
  given any set $$x$$
  $$x$$ is a member of $$B$$
  iff $$x$$ is a member of $$A$$
  and $$\phi$$ holds for $$x$$.

Because this is an axiom schema so there is one axiom for every such predicate $$\phi$$.

> Since the set B must be a subset of A, the axiom schema really says that: given a set A and a predicate P, we can find a subset B of the set A whose members are the elements of A that satisfy the predicate P.

By the axiom of extensionality this set is unique.

We can denote this set using set-builder notation:
$$\{C \in A : P(C)\}$$

> The essence of the axiom is that every subclass of a set that is defined by a predicate is itself a set.

The axiom schema of specification is characteristic of systems of axiomatic set theory related to the usual set theory ZFC, but does not usually appear in radically different systems of alternative set theory. For example, New Foundations and positive set theory use different restrictions of the axiom of comprehension of naive set theory. The Alternative Set Theory of Vopenka makes a specific point of allowing proper subclasses of sets, called semisets. Even in systems related to ZFC, this scheme is sometimes restricted to formulas with bounded quantifiers, as in Kripke–Platek set theory with urelements.

---

Subsets are commonly constructed using set builder notation.

For example, the even integers can be constructed as the subset of the integers $$\mathbb{Z}$$ satisfying the congruence modulo predicate $$x \equiv 0 \pmod 2$$:

$$x \in \mathbb{Z} : x \equiv 0 \pmod 2$$.

In general, the subset of a set $$z$$ obeying a formula $$\phi (x)$$ with one free variable $$x$$ may be written as:

$$x\in z:\phi (x)$$

The axiom schema of specification states that this subset always exists (it is an axiom schema because there is one axiom for each $$\phi$$).

Formally, let $$\phi$$ be any formula in the language of ZFC with all free variables among $$x, z, w_{1}, \ldots, w_n$$ ($$y$$ is not free in $$\phi$$)

Then:

$$
\forall z
\forall w_{1}
\forall w_{2}
\ldots
\forall w_{n}
\exists y
\forall x[
  x \in y \Leftrightarrow (x \in z \land \phi)
]
$$

Note that the axiom schema of specification can only construct subsets, and does not allow the construction of sets of the more general form:

\{x:\phi (x)\}.
This restriction is necessary to avoid Russell's paradox and its variants that accompany naive set theory with unrestricted comprehension.

In some other axiomatizations of ZF, this axiom is redundant in that it follows from the axiom schema of replacement and the axiom of the empty set.

On the other hand, the axiom of specification can be used to prove the existence of the empty set, denoted \varnothing , once at least one set is known to exist (see above). One way to do this is to use a property \phi  which no set has. For example, if w is any existing set, the empty set can be constructed as

\varnothing =\{u\in w\mid (u\in u)\land \lnot (u\in u)\}.
Thus the axiom of the empty set is implied by the nine axioms presented here. The axiom of extensionality implies the empty set is unique (does not depend on w). It is common to make a definitional extension that adds the symbol \varnothing  to the language of ZFC.

license: Unlicense


text:
# [Gioc](https://github.com/vlorc/gioc)

[简体中文](https://github.com/vlorc/gioc/blob/master/README_CN.md)

[![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![codebeat badge](https://codebeat.co/badges/c41b426c-4121-4dc8-99c2-f1b60574be64)](https://codebeat.co/projects/github-com-vlorc-gioc-master)
[![Go Report Card](https://goreportcard.com/badge/github.com/vlorc/gioc)](https://goreportcard.com/report/github.com/vlorc/gioc)
[![GoDoc](https://godoc.org/github.com/vlorc/gioc?status.svg)](https://godoc.org/github.com/vlorc/gioc)
[![Build Status](https://travis-ci.org/vlorc/gioc.svg?branch=dev)](https://travis-ci.org/vlorc/gioc?branch=dev)
[![Coverage Status](https://coveralls.io/repos/github/vlorc/gioc/badge.svg?branch=dev)](https://coveralls.io/github/vlorc/gioc?branch=dev)

gioc is a lightweight Ioc framework,it provides register and factory and depend solution

## Features

* Dependency Resolve
* Dependency Inject
* Singleton/Transient Support
* Custom Tag
* Invoker Support
* [Lazy](https://github.com/vlorc/gioc/blob/master/examples/lazy/main.go) Load
* [Struct](https://github.com/vlorc/gioc/blob/master/examples/depend/main.go) Extends Support
* [Module](https://github.com/vlorc/gioc/blob/master/examples/module/main.go) Support

## Installing
	go get github.com/vlorc/gioc

## Quick Start

* Create Root Container
```golang
container := gioc.NewRootContainer()
```

* Register Instance
```golang
err := container.AsRegister().RegisterInstance(1,"age")
```

* Resolve Instance
```golang
instance,err := container.AsProvider().Resolve((*int)(nil), "age"))
```

## Examples

* Basic Factory
```golang
import (
    "fmt"
    "github.com/vlorc/gioc"
    "github.com/vlorc/gioc/factory"
    "github.com/vlorc/gioc/types"
)

func main() {
    container := gioc.NewRootContainer()
    age := 17

    // register an int type value factory,this is similar to RegisterInstance
    container.AsRegister().RegisterFactory(factory.NewValueFactory(age),(*int)(nil),"age")
    // create a custom func factory
    inc := factory.NewFuncFactory(func(types.Provider) (interface{}, error) {
        age++
        return age, nil
    })

    // register an int type
    container.AsRegister().RegisterFactory(inc,&age,"inc")
    // convert custom factory into singleton mode factory
    container.AsRegister().RegisterFactory(factory.NewSingleFactory(inc),&age,"once")
    // get an instance type int and name age
    fmt.Println(container.Resolve((*int)(nil), "age"))
    // same as above,this value add 1 every times
    fmt.Println(container.Resolve((*int)(nil), "inc"))
    // same as above,but only once
    fmt.Println(container.Resolve((*int)(nil), "once"))
}
```

* Basic Module
```golang
import (
    "fmt"
    . "github.com/vlorc/gioc"
    . "github.com/vlorc/gioc/module/operation"
)

func main() {
    NewRootModule(
        Import(),//import module
        Declare(
            Instance(1), Id("id"),//declare instance
        ),
        Bootstrap(func(param struct{ id int64 }) {
            fmt.Println("id:", param.id)
        }),
    )
}
```

## License

This project is under the apache License. See the LICENSE file for the full license text.

## Interface

+ Provider
	+ provides Factory discovery
+ Factory
	+ responsible for generating Instance
	+ the basic plant has a value factory, method factory, agent factory, single factory, type factory
+ Mapper
	+ get the Factory by id
+ Binder
	+ the Factory is bound by id
	+ can be converted to read-only Mapper
+ Register
	+ as a connection to Factory and Selector
	+ provides the registration method, which eventually matches the Type to the Factory
	+ register custom Binder, Mapper, Factory
+ Dependency
	+ for target type dependency analysis, collection integration
	+ converted to an Injector by an instance
+ Injector
	+ and obtain the Instance padding based on the Dependency retrieval Provider
+ Builder
	+ is also a Factory
	+ use the Factory to get the instance and Injector to solve the Dependency
+ Container
	+ provides Register and Provider, and the parent container makes up traversal
	+ convert to read-only Provider
	+ convert to seal Container
+ Selector
	+ use type and id index Factory
	+ auto create Binder and Mapper
	+ index mode isolation
+ Module
    + import module
    + export factory
    + declare factory

# Roadmap
For details on planned features and future direction please refer to [roadmap](https://github.com/vlorc/gioc/blob/master/ROADMAP.md)

# Keyword

**dependency injection, inversion of control**

# Reference

repository: Aiicy/gioc

repo_name: Aiicy/gioc


text:
# Force.com test coverage tooling

[![npm version](https://img.shields.io/npm/v/force-coverage.svg)](https://www.npmjs.com/package/force-coverage)
[![Coverage Status](https://coveralls.io/repos/github/jdcrensh/node-force-coverage/badge.svg?branch=master)](https://coveralls.io/github/jdcrensh/node-force-coverage?branch=master)
[![Build Status](https://travis-ci.org/jdcrensh/node-force-coverage.svg?branch=master)](https://travis-ci.org/jdcrensh/node-force-coverage)

## Installation

    npm install -g force-coverage

## Coverage Auto-Inflation

*Disclaimer: Inflated coverage goes against Salesforce development best practices and should be avoided 99% of the time.*

    force-inflate -u <username> -p <password><security token> -l <login url>

Run org tests and calculates the remaining lines that must otherwise be covered to reach target % overall coverage. `CoverageInflation` is generated to contain the calculated amount of inflation, which is then deployed. The class is compiled against API v27.0 so that it may contain its own test method.

Inflation formula:

    (linesCovered - totalLines * targetPercentage) / (targetPercentage - 1) = inflatedLines

Re-run as needed (i.e. when **actual** coverage increases) to decrease/eliminate the inflation.

When overall coverage exceeds the target % without inflation, `CoverageInflation` is removed from the org.

### Target coverage %

    force-inflate ... --target 0.8

Default: `0.76`

repository: jdcrensh/node-force-coverage

gha_language: CoffeeScript

repo_name: jdcrensh/node-force-coverage


text:
NAME
====

Date::Calendar::Hijri - Arithmetic variant of the Hijri calendar

SYNOPSIS
========

Converting a Gregorian date (e.g. 7th February 2021) into Hijri

```raku
use Date::Calendar::Hijri;
my Date $dt-greg;
my Date::Calendar::Hijri $dt-hijri;

$dt-greg  .= new(2021, 2, 7);
$dt-hijri .= new-from-date($dt-greg);

say $dt-hijri;
# --> 1442-06-24
say $dt-hijri.strftime("%A %d %B %Y");
# --> Yaum al-Ahad 24 Jumaada al-Thaani 1442
```

Converting a Hijri date (e.g. 1 Muharram 1443) into Gregorian

```raku
use Date::Calendar::Hijri;
my Date::Calendar::Hijri $dt-hijri;
my Date $dt-greg;

$dt-hijri .= new(year => 1443, month => 1, day => 1);
$dt-greg   = $dt-hijri.to-date;

say $dt-greg;
# --> 2021-08-10
```

DESCRIPTION
===========

The real Hijri calendar is  an observational calendar. That means that
calendar events, such as switching from a month to the next, depend of
the observation  of some  astronomical events,  such as  observing the
moon crescent after a new moon.  But there is an unofficial arithmetic
variant, which differs from the real one by one or two days.

Date::Calendar::Hijri is a class  representing dates in the arithmetic
variant of the  Hijri calendar. It allows you to  convert a Hijri date
into Gregorian (or possibly other) calendar and the other way.

INSTALLATION
============

```shell
zef install Date::Calendar::Hijri
```

or

```shell
git clone https://github.com/jforget/raku-Date-Calendar-Hijri.git
cd raku-Date-Calendar-Hijri
zef install .
```

AUTHOR
======

Jean Forget<EMAIL_ADDRESS>
COPYRIGHT AND LICENSE
=====================

Copyright (c) 2021 Jean Forget, all rights reserved.

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

repository: jforget/raku-Date-Calendar-Hijri

repo_name: jforget/raku-Date-Calendar-Hijri


text:
---

title: Quartz.NET 1.x Tutorial
prev: false
next: false
---

## Choose a lesson

* [Lesson 1: Using Quartz](using-quartz.md)
* [Lesson 2: Jobs And Triggers](jobs-and-triggers.md)
* [Lesson 3: More About Jobs & JobDetails](more-about-jobs.md)
* [Lesson 4: More About Triggers](more-about-triggers.md)
* [Lesson 5: SimpleTriggers](simpletriggers.md)
* [Lesson 6: CronTriggers](crontriggers.md)
* [Lesson 7: TriggerListeners & JobListeners](trigger-and-job-listeners.md)
* [Lesson 8: SchedulerListeners](scheduler-listeners.md)
* [Lesson 9: JobStores](job-stores.md)
* [Lesson 10: Configuration, Resource Usage and SchedulerFactory](configuration-resource-usage-and-scheduler-factory.md)
* [Lesson 11: Advanced (Enterprise) Features](advanced-enterprise-features.md)
* [Lesson 12: Miscellaneous Features](miscellaneous-features.md)

repository: quartznet/quartznet

gha_language: C#

repo_name: quartznet/quartznet


text:
---
layout: default
---

# 1996-05-02 - Re: Nazis on the Net

## Header Data

From<EMAIL_ADDRESS>(tallpaul)

To<EMAIL_ADDRESS>Message Hash: f3790676f0c5119c17b17a27dc10757c9c44b458bc07b3e88409e69cf8d1d669

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-05-02 00:47:52 UTC

Raw Date: Thu, 2 May 1996 08:47:52 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(tallpaul)
Date: Thu, 2 May 1996 08:47:52 +0800
To<EMAIL_ADDRESS>Subject: Re: Nazis on the Net
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

I stand behind my original post and the analysis in it.

I am amused at the tremendous attempts by people with certain political
affinities to bail out Weaver by a series of arguments based either on
profound ignorance of political realities or with their own private
dictionaries.

The whole argument of racism vs. white separatism vs. white suppremicist
seems more to come from people who argue whether someone is a Baptist or a
Christian or a Southern Baptist or a Protestant. (In mathematical set
theory one would trace the fallacy in thinking to the false idea that any
given element of a set cannot be the element of more than one set. Thus, if
(X is a member of Y) it cannot also be a member of Z.)

I understand that James D. is not accusing me of being a "child molester"
but merely using it as a reductio ad adsurdem argument.

Let me continue in this vein.

The issue of  child molestation was dragged in and had no relevance on the
immediate political isues of Weaver et al.

But imagine people are arguing about the deep fundamental differnces
between someone who is a "child molester" vs. a "pedophile" vs. a "boy
lover."

--tallpaul

On Apr 22, 1996 22:26:41<EMAIL_ADDRESS>wrote:

>Content-Length: 2008
>
>"E. ALLEN SMITH"<EMAIL_ADDRESS>wrote:
>> > Randy Weaver was neither a neo-Nazi nor a racist.     I have no more reason
>to believe that tallpaul rapes little children than tallpaul
>has to believe that Randy Weaver was a white supremacist or
>tallpaul has to believe that Allen Smith is a Nazi sympathizer.)
>---------------------------------------------------------------------
>				|
>We have the right to defend ourselves	|   http://www.jim.com/jamesd/
>and our property, because of the kind	|
>of animals that we are. True law	|   James A. Donald
>derives from this right, not from the	|
>arbitrary power of the state.		|<EMAIL_ADDRESS>>
>

{% endraw %}
```

## Thread

+ Return to [May 1996](/archive/1996/05)

+ Return to<EMAIL_ADDRESS>(tallpaul)](/authors/tallpaul_at_pipeline_com_tallpaul_)"

+ 1996-05-02 (Thu, 2 May 1996 08:47:52 +0800) - Re: Nazis on the Net -<EMAIL_ADDRESS>(tallpaul)_


text:
# Scrabble Scorer

#### A program that takes a word and returns the Scrabble score for that word

#### By **Tessa Sullivan and **

## Description

When the user enters a word, the program will return the score for that word based on the following values:
* A, E, I, O, U, L, N, R, S, T       1
* D, G                               2
* B, C, M, P                         3
* F, H, V, W, Y                      4
* K                                  5
* J, X                               8
* Q, Z                               10

### Specs
| Spec | Input | Output |
| :-------------     | :------------- | :------------- |
| Welcome message displayed| User starts the program | Output: Welcome message and prompt to enter word|
| User enters nothing|Input: enter|Output: User prompted to enter a word|
| User enters string with non-alphabet character| Input: 5| Output: Error message and user prompted to enter a word|
| User enters string with non-alphabet character| Input: A5| Output: Error message and user prompted to enter a word|
| User enters string with special character| Input: '| Output: Error message and user prompted to enter a word|
| User enters single letter word| Input: A| Output: 1|
| User enters word which contains some of the above letters| Input: the | Output: 6|
| User enters word which contains some of the above letters| Input: quick | Output: 21|
| User enters word which contains some of the above letters| Input: brown | Output: 10|
| User enters word which contains some of the above letters| Input: fox | Output: 13|
| User enters word which contains some of the above letters| Input: jumps | Output: 16|
| User enters word which contains some of the above letters| Input: over | Output: 7|
| User enters word which contains some of the above letters| Input: lazy | Output: 16|
| User enters word which contains some of the above letters| Input: dog | Output: 5|
| User enters word which is longer than the limit 16| Input: supercalifragistic | Output: Error message and user prompted to enter a new word|

## Setup/Installation Requirements

Currently does not include Program.cs so it cannot be run directly from the command line.  Tests can be run by doing the following:
1. Install .Net 2.2
    * Go to https://dotnet.microsoft.com/download/dotnet-core/2.2 and download the appropriate installer for your OS.
2. cd to repo directory
3. On the command line, run:
    * dotnet test LeetSpeak.Tests

## Known Issues
* No known issues

## Technologies Used

* C#

## Support and contact details

_Contact Tessa Sullivan<EMAIL_ADDRESS>
### License

*{This software is licensed under the MIT license}*

Copyright (c) 2019 **_Tessa Sullivan and Kevin Garvey_**

repository: tessasullivan/ScrabbleScoreCS

repo_name: tessasullivan/ScrabbleScoreCS


text:
# norm

Docs: [GoDoc](https://pkg.go.dev/github.com/emer/etable/norm)

`norm` provides normalization and norm metric computations, e.g., L2 = sqrt of sum of squares of a vector.  The basic functions operate on either `[]float32` or `[]float64` data, but Tensor versions are available too.

* DivNorm does divisive normalization of elements
* SubNorm does subtractive normalization of elements
* ZScore subtracts the mean and divides by the standard deviation
* Abs performs absolute-value on all elements (e.g., use prior to tsragg to produce Mean of Abs vals etc).

repository: emer/etable

repo_name: emer/etable


text:
# Summary
**Time: 30 min**
**Serves: 1, if you can eat 30+ cookies**

# Ingredients
- 2 1/2 cups all-purpose flour
- 1 teaspoon baking powder
- 1 teaspoon baking soda
- 2 teaspoons ground cinnamon
- 1/2 teaspoon ground nutmeg
- 1/2 teaspoon ground cloves
- 1/2 teaspoon salt
- 1/2 cup butter, softened
- 1 1/2 cups white sugar
- 1 cup canned pumpkin puree
- 1 egg
- 1 teaspoon vanilla extract
- 1/2 cup softened butter
- 1/2 cup softened cream cheese
- 2-3 cups powdered sugar
- 1 tsp. vanilla extract

# Directions
For the Cookies:
Preheat oven to 350 degrees F (175 degrees C). Combine flour, baking powder, baking soda, cinnamon, nutmeg, ground cloves, and salt; set aside.
In a medium bowl, cream together the ½ cup of butter and white sugar. Add pumpkin, egg, and 1 teaspoon vanilla to butter mixture, and beat until well combined. Slowly mix in dry ingredients. Drop on cookie sheet by tablespoonfuls; flatten slightly with floured fingers (dough will be sticky.)
Bake for 13-15 minutes or until the edges are set and just turning golden.

For the Frosting:
Cream butter and cream cheese together. Slowly add powdered sugar and mix with an electric mixer until thick and creamy. Add vanilla and mix on high.
When cookies are cooled- spread frosting on top with an offset spatula.


text:
## UDAP - Power a Tokenized Life

Year 2018 is the year of tokenizing everything movement. Everything we have, everything we use will be digitized and uniquely secured and identified by a crypto-token, such that the personal assets becomes smart assets that can interact with the rest of the world, which has been impossible until now.

### Assets to be tokenized

- Personal identifications, such our passport, identification card, our social insurance card
- Critical personal information, such as medical records, educational achievements (degree or diploma, training certificates)
- Tangible assets, such as Our houses, our cars, antiques, collectables, Jewelry.
- Consumption records: checks, utility bills and receipts.
- Human capital: personal influence, promise, fan clubs.
- Concert tickets, coupons, membership cards.
- Intellectual properties: such as articles, songs and photos, even creative ideas.
- people can issue their own personal tokens representing anything from a Promise to deliver some goods or services to your Family, your friends, or customers.
- Essentially people can use blockchain technologies to create crypto currencies of their own brand to start a personal token economy.

In one short statement, we are starting to see our life being tokenized, thanks to the blockchain technologies.

### Tokenizing everything is hard

* Difficult programming interface.
* Scalability: none of the public chains currently offer sufficient throughput.
* Confidentiality is hard to implement
* Crypto-Identity system is lacking
* User interface is miserable: even though you can tokenize everything, and there is no single place to contain those tokens, to show those asset to our customers.

### Welcome to UDAP

This is why we have created UDAP platform, an integrated solution for all the critical block chain technologies and data storage cloud.

**For programmers**
- UDAP provides a simplified asset oriented programming interface, so that they can easily migrate their own vertical applications to a block chain based architecture.
- UDAP also provides programmable asset wallet framework - the universal asset Wallet to save them from creating an mobile app of there own.
- Each application will have its own configurable blockchain.

![](media/image1.png)

**For consumers**
- The universal asset wallet provides the single streamlined unified user interfaces for all the assets that are being managed by all the applications.
- we can browse,  organize, transfer, even creating our own crypto assets directly from the Wallet, or in simple terms, we can print money in the wallet.

![](media/wallet.png)

### Technically
- UDAP uses cosmos framework for a horizontally scalable architecture, which offers 4000TPS per zone.
- UDAP has a innovative account model to deal with asset natively on the Block chain.
- We create a vertical scalability solution called virtual private chains (Or VPC in abbreviation), to concurrently process all the transactions from All the applications.
- The above multi-zone and the multi-chain architecture will be able to handle hundreds of thousands of transactions per second.
- UDAP separates user accounts and asset accounts, and obfuscates the relationship between users and their assets, to achieve asset confidentiality.
-  In the meantime we use Proxy Re-encryption to to enable secure asset sharing at a massive scale.

### To summarize

UDAP aspires to become the top player in the tokenizing everything movement by bringing Application developers and users together with a simple SDK and programmable unified asset wallet.


text:
# Rundeck JIRA Plugin

This project provides integration between Rundeck and JIRA. By using this workflowstep plugin
Rundeck will automatically add the execution link to a given JIRA Issue.

## Requirements

These plugins require the jira python library to be installed on the rundeck server.
For example, you can install it using `pip3 install jira`.

Further information here: [https://github.com/pycontribs/jira](https://github.com/pycontribs/jira).

## Install

Download the zipped version you like to install from [https://github.com/geraldhansen/rundeck-jira-plugin/tree/master/build/libs](https://github.com/geraldhansen/rundeck-jira-plugin/tree/master/build/libs)
Use the Upload Plugin function from Rundeck and choose the downloaded zip file -> Install

## Job Configuration and Setup

This Plugin will use the rundeck key storage for the jira credentials.
If no JIRA issue is given nothing will happend, it depends on the job options to set the JIRA issue as
required or not.

## Build

Run `gradle build` to build the zip file. Then, copy the zip file to the `$RDECK_BASE\libext` folder.
Easy build without installing gradle and java by using the gradle docker container
`docker run --rm -u gradle -v "$PWD":/home/gradle/project -w /home/gradle/project gradle:4.10-jre8-alpine gradle build`
If you build and there is a tag on the commit like "0.0.2" gradle will use this as version and you will find
in `build/libs/jira-plugin-0.0.2.zip` your version. If you build on a commit without tag the version number will
be increased and a suffix -SNAPSHOT will be appended.

repository: geraldhansen/rundeck-jira-plugin

repo_name: geraldhansen/rundeck-jira-plugin