text:
# Manage User Roles

WSO2 Identity Server supports the role-based authentication model where
privileges of a user are based on roles attached.

A user is associated with one or more roles (generally specified upon
user creation), and each role is associated with zero or more
permissions (also generally specified upon role creation). Therefore,
the set of permissions owned by a user is determined by the roles
assigned to that user. If a user has several assigned roles, their
permissions are added together.

This section guides you through the operations that can be carried out on user roles.

- [Add User Roles]({{base_path}}/guides/identity-lifecycles/add-user-roles)

- [Edit/Delete Roles]({{base_path}}/guides/identity-lifecycles/edit-delete-roles)

- [Role-based Permissions]({{base_path}}/guides/identity-lifecycles/role-based-permissions)

!!! note "Before you begin"

    The following items are things to note before you begin.

    -   Only system administrators can add, modify and remove users and
        roles. To set up administrators, see [Configuring the System
        Administrator]({{base_path}}/deploy/configure-the-system-administrator).

    -   Your product has a primary user store where the users/roles that you
        create using the management console are stored by default. It's
        default `            RegEx           ` configurations are as
        follows. `            RegEx           ` configurations ensure that
        parameters like the length of a user name/password meet the
        requirements of the user store.

        ``` java
        PasswordJavaRegEx------------ ^[\S]{5,30}$
        PasswordJavaScriptRegEx-----  ^[\S]{5,30}$
        UsernameJavaRegEx------------ [a-zA-Z0-9._-|//]{3,30}$
        UsernameJavaScriptRegEx-----  ^[\S]{3,30}$
        RolenameJavaRegEx------------  [a-zA-Z0-9._-|//]{3,30}$
        RolenameJavaScriptRegEx-----  ^[\S]{3,30}$
        ```

        When creating users/roles, if you enter a username, password etc.
        that does not conform to the `            RegEx           `
        configurations, the system throws an exception. You can either
        change the `            RegEx           ` configuration or enter
        values that conform to the `            RegEx           ` . If you
        [change the default user
        store]({{base_path}}/deploy/configure-the-primary-user-store) or [set up a secondary
        user store]({{base_path}}/deploy/configure-secondary-user-stores), configure the
        `            RegEx           ` accordingly under the user store
        manager configurations in the
        `            <IS_HOME>/repository/conf/deployment.toml          `
        file.

    -   The permission model of WSO2 Identity Server is hierarchical.
        Permissions can be assigned to a role in a fine-grained or a
        coarse-grained manner.

        **Coarse-grained permissions** define large sub components such as
        'Application Management'. Using coarse-grained permissions you can
        assign permissions to roles based on these large sub components.

        **Fine-grained permissions** control access to smaller sub
        components or sub tasks of the component such as 'create
        application', 'delete application' etc.

        WSO2 Carbon maintains roles and permissions in the Carbon database,
        but it can also read users/roles from the configured User Store.

gha_language: CSS


text:
# Godot Game Template
A simple game template for making Godot games

![The main menu of the Godot game template](Docs/MainMenu.png)

## What is this?

This is a simple template for a game with menus enabled to allow the following:

1. Exiting the Game
2. Showing Credits
3. Modifying Settings
4. Pausing the Game

## Who is this for?

Three main types of people:

1. Anyone learning Godot
2. Anyone taking part in a Gam Jam and wanting to focus on the game and not menus
3. Anyone lazy who doesn't want to write code (me me me!)

## What settings are there?

Basic settings that most games need:

![The sound option menu](Docs/Sound.png)

### Sound

1. Music Volume
2. Effects Volume
3. Dialog Volume

NB: The template includes audio buses for these 3 common audio types, you can easily add or remove buses as needed

### Graphics

1. Fullscreen Toggle
2. MSAA setting

These are just to get you started, you can add more

### Controls

1. Remap keybindings for up, down, left and right

NB: This is based off a [YouTube tutorial](https://youtu.be/I_Kzb-d-SvM) by Gonkee. It is extensible and you can easily add you own key mappings

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
Min.dexedDB is a very tiny lightweight wrapper for IndexedDB (well, parts of it). It simply allows you to connect to a database, and to `put()` and `get()`. It uses Promises to make that a bit easier.

It does not, and is not designed to, allow for any complex IndexedDB functionality (even versions currently!). I simply wanted to easily add and fetch things, and wanted the code to be absolutely minimal. The minified version is in under 1kb un-gzipped, and only ~450 bytes gzipped.

This has not been widely tested, as of yet, but should work with most modern browsers other than IE11 (about 4.5% of my users).

Usage:

```javascript
// You can supply an object with {objectStore: keyPath}...
mdb = new MindexedDB("testDB", {testStore: "name"});
mdb.connect().then(function() {
    mdb.put("testStore", {name: "Ralf", species: "Dog"});
    mdb.put("testStore", {name: "Fred", species: "Cat", numbers: [1,2,3]});
    mdb.get("testStore", "Fred").then(function(animal){console.log(animal)});
    mdb.close();
});

// Or an array if you want multiple objectStores:
mdb2 = new MindexedDB("anotherTestDB", [{testStore: "name"}, {extraStore: "name"}]);
mdb2.connect().then(function() {
    mdb2.put("testStore", {name: "Ralf", species: "Dog"});
    mdb2.put("extraStore", {name: "Fred", species: "Cat", numbers: [1,2,3]});
    mdb2.get("extraStore", "Fred").then(function(animal){console.log(animal)});
    mdb2.close();
});
```

## Todo

- Allow put() to take an array of objects to add?
- IE11 fallback, given it has no Promise?


text:
<!--
Copyright (c) 2017 Dell Inc., or its subsidiaries. All Rights Reserved.

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

    http://www.apache.org/licenses/LICENSE-2.0
-->
# Streaming Connector

The Flink Connector library for Pravega provides a data source and data sink
for use with the Flink Streaming API. See the below sections for details.

## Table of Contents
- [FlinkPravegaReader](#flinkpravegareader)
  - [Parameters](#parameters)
  - [Input Stream(s)](#input-streams)
  - [Reader Parallelism](#reader-parallelism)
  - [Checkpointing](#checkpointing)
  - [Timestamp Extraction (Watermark Emission)](#timestamp-extraction-watermark-emission)
  - [Stream Cuts](#streamcuts)
  - [Historical Stream Processing](#historical-stream-processing)
- [FlinkPravegaWriter](#flinkpravegawriter)
  - [Parameters](#parameters-1)
  - [Writer Parallelism](#writer-parallelism)
  - [Event Routing](#event-routing)
  - [Event Time Ordering](#event-time-ordering)
  - [Watermark](#watermark)
  - [Writer Modes](#writer-modes)
- [Metrics](#metrics)
- [Data Serialization](#serialization)

## FlinkPravegaReader

A Pravega Stream may be used as a data source within a Flink streaming program using an instance of   `io.pravega.connectors.flink.FlinkPravegaReader`. The reader reads a given Pravega Stream (or multiple streams) as a [`DataStream`](https://ci.apache.org/projects/flink/flink-docs-stable/api/java/org/apache/flink/streaming/api/datastream/DataStream.html) (the basic abstraction of the Flink Streaming API).

Open a Pravega Stream as a DataStream using the method [`StreamExecutionEnvironment::addSource`](https://ci.apache.org/projects/flink/flink-docs-stable/api/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.html#addSource-org.apache.flink.streaming.api.functions.source.SourceFunction-).

#### Example
```java
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

// Define the Pravega configuration
PravegaConfig config = PravegaConfig.fromParams(params);

// Define the event deserializer
DeserializationSchema<MyClass> deserializer = ...

// Define the data stream
FlinkPravegaReader<MyClass> pravegaSource = FlinkPravegaReader.<MyClass>builder()
    .forStream(...)
    .withPravegaConfig(config)
    .withDeserializationSchema(deserializer)
    .build();
DataStream<MyClass> stream = env.addSource(pravegaSource);
```
### Parameters

A builder API is provided to construct an instance of `FlinkPravegaReader`. See the table below for a summary of builder properties.  Note that, the builder accepts an instance of `PravegaConfig` for common configuration properties.  See the [configurations](configurations.md) page for more information.

|Method                |Description|
|----------------------|-----------------------------------------------------------------------|
|`withPravegaConfig`|The Pravega client configuration, which includes connection info, security info, and a default scope.|
|`forStream`|The stream to be read from, with optional start and/or end position.  May be called repeatedly to read numerous streams in parallel.|
|`uid`|The uid to identify the checkpoint state of this source.|
|`withReaderGroupScope`|The scope to store the Reader Group synchronization stream into.|
|`withReaderGroupName`|The Reader Group name for display purposes.|
|`withReaderGroupRefreshTime`|The interval for synchronizing the Reader Group state across parallel source instances.|
|`withCheckpointInitiateTimeout`|The timeout for executing a checkpoint of the Reader Group state.|
|`withDeserializationSchema`|The deserialization schema which describes how to turn byte messages into events.|
|`withTimestampAssigner`|The `AssignerWithTimeWindows` implementation which describes the event timestamp and Pravega watermark strategy in event time semantics.|
|`enableMetrics`|true or false to enable/disable reporting Pravega metrics. Metrics is enabled by default.|

### Input Stream(s)
Each stream in Pravega is contained by a scope.  A scope acts as a namespace for one or more streams.  The `FlinkPravegaReader` is able to read from numerous streams in parallel, even across scopes.  The builder API accepts both **qualified** and **unqualified** stream names.

  - In qualified, the scope is explicitly specified, e.g. `my-scope/my-stream`.
  - In Unqualified stream names are assumed to refer to the default scope as set in the `PravegaConfig`.

A stream may be specified in one of three ways:

 1. As a string containing a qualified name, in the form `scope/stream`.
 2. As a string containing an unqualified name, in the form `stream`. Such streams are resolved to the default scope.
 3. As an instance of `io.pravega.client.stream.Stream`, e.g. `Stream.of("my-scope", "my-stream")`.

### Reader Parallelism

The `FlinkPravegaReader` supports parallelization. Use the `setParallelism` method to of `Datastream` to configure the number of parallel instances to execute.  The parallel instances consume the stream in a coordinated manner, each consuming one or more stream segments.

**Note:** Coordination is achieved with the use of a Pravega Reader Group, which is based on a [State Synchronizer](http://pravega.io/docs/latest/pravega-concepts/#state-synchronizers). The Synchronizer creates a backing stream that may be manually deleted after the completion of the job.

### Checkpointing

In order to make state fault tolerant, Flink needs to **checkpoint** the state. Checkpoints allow Flink to recover state and positions in the streams to give the application the same semantics as a failure-free execution. The reader is compatible with Flink checkpoints and savepoints. The reader automatically recovers from failure by rewinding to the checkpointed position in the stream.

A **savepoint** is self-contained; it contains all information needed to resume from the correct position.

The checkpoint mechanism works as a two-step process:

   - The [master hook](https://ci.apache.org/projects/flink/flink-docs-stable/api/java/org/apache/flink/runtime/checkpoint/MasterTriggerRestoreHook.html) handler from the job manager initiates the [`triggerCheckpoint`](https://ci.apache.org/projects/flink/flink-docs-stable/api/java/org/apache/flink/runtime/checkpoint/MasterTriggerRestoreHook.html#triggerCheckpoint-long-long-java.util.concurrent.Executor-) request to  the `ReaderCheckpointHook` that was registered with the Job Manager during `FlinkPravegaReader` source initialization. The `ReaderCheckpointHook` handler notifies Pravega to checkpoint the current reader state. This is a non-blocking call which returns a `future` once Pravega readers are done with the checkpointing.
   - A `CheckPoint` event will be sent by Pravega as part of the data stream flow and on receiving the event, the `FlinkPravegaReader` will initiate [`triggerCheckpoint`](https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/checkpoint/ExternallyInducedSource.java#L73) request to effectively let Flink continue and complete the checkpoint process.

### Timestamp Extraction (Watermark Emission)

Flink requires the events’ timestamps (each element in the stream needs to have its event timestamp assigned). This is achieved by accessing/extracting the timestamp from some field in the element. These are used to tell the system about progress in event time.

Since Pravega 0.6, Pravega has proposed a new [watermarking API](https://github.com/pravega/pravega/wiki/PDP-33:-Watermarking) to  enable the writer to provide time information.
On the reader side, a new concept [`TimeWindow`](https://github.com/pravega/pravega/wiki/PDP-33:-Watermarking#event-reader-api-changes) is proposed to represent a time window for the events which are currently being read by a reader.

It is possible to use event time semantics with either pravega watermark (after 0.6) or normal watermark.

To use Pravega watermark, an interface called `AssignerWithTimeWindows` should be implemented in the application via an application-specific timestamp assigner and a watermark generator with `TimeWindow`. Different applications can choose to be more or less conservative with the given `TimeWindow`.
`LowerBoundAssigner` is provided as a default implementation of the most conservative watermark. `LowerBoundAssigner` periodically emits the watermark which equals the lower bound of TimeWindow.  You can set the period of watermark emission like below.

```java
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.getConfig().setAutoWatermarkInterval(AUTO_WATERMARK_INTERVAL_MS);
```

To use normal watermark, you can follow [Flink documentation](https://ci.apache.org/projects/flink/flink-docs-stable/dev/event_timestamps_watermarks.html#timestamp-assigners--watermark-generators). Simply, specify an `AssignerWithPeriodicWatermarks` or `AssignerWithPunctuatedWatermarks` on the `DataStream` as normal.

Each parallel instance of the source processes one or more stream segments in parallel. Each watermark generator instance will receive events multiplexed from numerous segments. Be aware that segments are processed in parallel, and that no effort is made to order the events across segments in terms of their event time.  Also, a given segment may be reassigned to another parallel instance at any time, preserving exactly-once behavior but causing further spread in observed event times.

### StreamCuts
A `StreamCut` represents a specific position in a Pravega Stream, which may be obtained from various API interactions with the Pravega client. The `FlinkPravegaReader` accepts a `StreamCut` as the start and/or end position of a given stream. For further reading on
StreamCuts, please refer to documentation on [StreamCut](http://pravega.io/docs/latest/streamcuts/) and [sample code](https://github.com/pravega/pravega-samples/tree/master/pravega-client-examples/src/main/java/io/pravega/example/streamcuts).

Many Readers will be reading Events from the tail of the Stream. Tail reads corresponding to recently written Events are immediately delivered to Readers.

Here is an example for a Flink application to perform tail-read.

```java
StreamManager streamManager = StreamManager.create(pravegaConfig.getClientConfig());
StreamCut tailStreamCut = streamManager.getStreamInfo("scope", "stream").getTailStreamCut();

FlinkPravegaReader<MyClass> pravegaSource = FlinkPravegaReader.<MyClass>builder()
    .forStream(streamName, tailStreamCut)
    .withPravegaConfig(config)
    .withDeserializationSchema(deserializer)
    .build();
DataStream<MyClass> stream = env.addSource(pravegaSource);

```

#### Historical Stream Processing

Historical processing refers to processing stream data from a specific position in the stream rather than from the stream's tail.  The builder API provides an overloaded method `forStream` that accepts a `StreamCut` parameter for this purpose.

One such example is re-processing a stream, where we may have to process the data from the beginning (or from a certain point in the stream) to re-derive the output. For instance, in situations where the computation logic has been changed to address new additional criteria, or we fixed a bug or doing a typical A/B testing etc., where the ability to consume historical data as a stream is critical.

## FlinkPravegaWriter
A Pravega Stream may be used as a data sink within a Flink program using an instance of `io.pravega.connectors.flink.FlinkPravegaWriter`. Add an instance of the writer to the dataflow program using the method [`DataStream::addSink`](https://ci.apache.org/projects/flink/flink-docs-stable/api/java/org/apache/flink/streaming/api/datastream/DataStream.html#addSink-org.apache.flink.streaming.api.functions.sink.SinkFunction-).

### Example
```Java
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

// Define the Pravega configuration
PravegaConfig config = PravegaConfig.fromParams(params);

// Define the event serializer
SerializationSchema<MyClass> serializer = ...

// Define the event router for selecting the Routing Key
PravegaEventRouter<MyClass> router = ...

// Define the sink function
FlinkPravegaWriter<MyClass> pravegaSink = FlinkPravegaWriter.<MyClass>builder()
   .forStream(...)
   .withPravegaConfig(config)
   .withSerializationSchema(serializer)
   .withEventRouter(router)
   .withWriterMode(PravegaWriterMode.EXACTLY_ONCE)
   .build();

DataStream<MyClass> stream = ...
stream.addSink(pravegaSink);
```
### Parameters

A builder API is provided to construct an instance of `FlinkPravegaWriter`. See the table below for a summary of builder properties.  Note that the builder accepts an instance of `PravegaConfig` for common configuration properties.  See the [configurations](configurations.md) page for more information.

|Method                |Description|
|----------------------|-----------------------------------------------------------------------|
|`withPravegaConfig`|The Pravega client configuration, which includes connection info, security info, and a default scope.|
|`forStream`|The stream to be written to.|
|`withWriterMode`|The writer mode to provide _Best-effort_, _At-least-once_, or _Exactly-once_ guarantees.|
|`withTxnLeaseRenewalPeriod`|The Transaction lease renewal period that supports the _Exactly-once_ writer mode.|
|`withSerializationSchema`|The serialization schema which describes how to turn events into byte messages.|
|`withEventRouter`|The router function which determines the Routing Key for a given event.|
|`enableWatermark`|true or false to enable/disable emitting Flink watermark in event-time semantics to Pravega streams.|
|`enableMetrics`|true or false to enable/disable reporting Pravega metrics. Metrics is enabled by default.|

### Writer Parallelism
`FlinkPravegaWriter` supports parallelization. Use the `setParallelism` method to configure the number of parallel instances to execute.

### Event Routing
Every event written to a Pravega Stream has an associated Routing Key.  The Routing Key is the basis for event ordering.  See the [Pravega Concepts](http://pravega.io/docs/latest/pravega-concepts/#events) for details.

When constructing the `FlinkPravegaWriter`, please provide an implementation of `io.pravega.connectors.flink.PravegaEventRouter` which will guarantee the event ordering. In Pravega, events are guaranteed to be ordered at the segment level.

For example, to guarantee write order specific to sensor id, you could provide a router implementation like below.
```java
private static class SensorEventRouter<SensorEvent> implements PravegaEventRouter<SensorEvent> {
        @Override
        public String getRoutingKey(SensorEvent event) {
            return event.getId();
        }
    }

```

### Event Time Ordering

For programs that use Flink's event time semantics, the connector library supports writing events in event time order. In combination with a Routing Key, this establishes a well-understood ordering for each key in the output stream.

Use the method `FlinkPravegaUtils::writeToPravegaInEventTimeOrder` to write a given `DataStream` to a Pravega Stream such that events are automatically ordered by event time (on a per-key basis). Refer [here](https://github.com/pravega/flink-connectors/blob/7971206038b51b3cf0e317e194c552c4646e5c20/src/test/java/io/pravega/connectors/flink/FlinkPravegaWriterITCase.java#L93) for sample code.

### Watermark
Flink applications in event time semantics are carrying watermarks within each operator.

Both Pravega transactional and non-transactional writers provide [watermark API](https://github.com/pravega/pravega/wiki/PDP-33:-Watermarking#event-writer-api-changes) to indicate the event-time watermark for a stream.
With `enableWatermark(true)`, each watermark in Flink will be emitted into a Pravega stream.

### Writer Modes
Writer modes relate to guarantees about the persistence of events emitted by the sink to a Pravega Stream.  The writer supports three writer modes:

1. **Best-effort** - Any write failures will be ignored hence there could be data loss.
2. **At-least-once** - All events are persisted in Pravega. Duplicate events
are possible, due to retries or in case of failure and subsequent recovery.
3. **Exactly-once** - All events are persisted in Pravega using a transactional approach integrated with the Flink checkpointing feature.

By default, the _At-least-once_ option is enabled and use `.withWriterMode(...)` option to override the value.

See the [Pravega documentation](http://pravega.io/docs/latest/pravega-concepts/#transactions) for details on transactional behavior.

# Metrics
Metrics are reported by default unless it is explicitly disabled using `enableMetrics(false)` option.
See [Metrics](metrics.md) page for more details on type of metrics that are reported.

# Serialization
See the [serialization](serialization.md) page for more information on how to use the _serializer_ and _deserializer_.

repository: CharlieLChen/flink-connectors

repo_name: CharlieLChen/flink-connectors


text:
# gc95
Tiger Game.com homebrew application to generate a Windows 95 CD Key

**TODO:**
- Properly document the code; most Game.com syscalls are publicly unknown—it took me a ton of reverse engineering effort to figure out what they do.
- Document the build process; explain how to build the ROM and patch it to pass Game.com's security checks.


text:
**You're viewing a file in the SMAPI mod dump, which contains a copy of every open-source SMAPI mod
for queries and analysis.**

**This is _not_ the original file, and not necessarily the latest version.**
**Source repository: https://github.com/ImJustMatt/StardewMods**

----

# Release Notes

## 2.1.0
- Updated from Expanded Storage (Legacy) to XSLite+XSPlus

## 2.0.1
- Allow adding Garbage Cans using "Garbage": "ID" tile property
- Update to SMAPI 3.12

## 2.0.0
- Preliminary 64-bit support
- Simplified map integrations

## 1.0.3
- Added config option to hide Garbage Cans from Chests Anywhere

## 1.0.2

- Added Console Commands
- Added Open when Farmer Nearby
- Added color based on items
- Fixed MacOS support

## 1.0.1

- Added Content Pack Format
- Added API

## 1.0.0

- Initial Release

repository: cuteoreo/smapi-mod-dump

branch_name: refs/heads/main

repo_name: cuteoreo/smapi-mod-dump


text:
# [The Question](https://www.codechef.com/SNCKQL16/problems/KTTABLE/)
There are N students living in the dormitory of Berland State University. Each of them sometimes wants to use the kitchen, so the head of the dormitory came up with a timetable for kitchen's usage in order to avoid the conflicts:

* The first student starts to use the kitchen at the time 0 and should finish the cooking not later than at the time A1.
* The second student starts to use the kitchen at the time A1 and should finish the cooking not later than at the time A2.
* And so on.
* The N-th student starts to use the kitchen at the time AN-1 and should finish the cooking not later than at the time AN

The holidays in Berland are approaching, so today each of these N students wants to cook some pancakes. The i-th student needs Bi units of time to cook.

The students have understood that probably not all of them will be able to cook everything they want. How many students will be able to cook without violating the schedule?

# Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.

The first line of each test case contains a single integer N denoting the number of students.

The second line contains N space-separated integers A1, A2, ..., AN denoting the moments of time by when the corresponding student should finish cooking.

The third line contains N space-separated integers B1, B2, ..., BN denoting the time required for each of the students to cook.

# Output
For each test case, output a single line containing the number of students that will be able to finish the cooking.

# Constraints
Should contain all the constraints on the input data that you may have. Format it like:

1 ≤ T ≤ 10
1 ≤ N ≤ 10^4
0 < A1 < A2 < ... < AN < 10^9
1 ≤ Bi ≤ 10^9

# Example

### Input:
2
3
1 10 15
1 10 3
3
10 20 30
15 5 20

### Output:
2
1

# Explanation
**Example case 1:** The first student has 1 unit of time - the moment 0. It will be enough for her to cook. The second student has 9 units of time, but wants to cook for 10 units of time, and won't fit in time. The third student has 5 units of time and will fit in time, because needs to cook only for 3 units of time.

**Example case 2:** Each of students has 10 units of time, but only the second one will be able to fit in time.


text:
# Example using the OpenSpiel wrapper

This is an example of using AlphaZero.jl with OpenSpiel.

To run this example, open a Julia session and execute:

```julia
using AlphaZero
import OpenSpiel # load additional features through Requires.jl

ospiel_experiment = Examples.experiments["ospiel_ttt"]
session = Session(ospiel_experiment, dir="sessions/ospiel_ttt")

resume!(session)
```

Or more simply:

```sh
julia --project -e 'using AlphaZero; import OpenSpiel; Scripts.train("ospiel_ttt")'
```

Note that you may need to install `cmake` and `clang++` in order to
successfully install and build `OpenSpiel.jl`.

Also, the OpenSpiel wrapper hasn't been extensively tested yet so you
might experience some rough edges when using it with different games.

gha_language: Julia

gha_license_id: MIT


text:
# Quickstart
## About The Project
The IGS Webapp is used to communicate between diffrent IGS in Germany.
Authenticated users can share documents and post articles while strangers get
information about the system IGS.

### Built With
-   [ts-node](https://www.npmjs.com/package/ts-node) and [Express](https://www.npmjs.com/package/express) backend
-   [Angular](https://angular.io/) frontend
-   [MySql](https://www.mysql.com) database
-   [Docker](https://www.docker.com/) and [Jenkins](https://www.jenkins.io) for continuous deployment

## Getting Started
### Purpose of this API
This API is used to store files, articles and users.
To get a local copy up and running follow these simple steps.

### Develop Backend

To develop the backend you can run a dev server:

```sh
git clone https://github.com/NoxelS/igs-webapp.git
cd backend
npm run dev
```
### Develop Frontend

To develop the frontend you can use the angular cli:

```sh
git clone https://github.com/NoxelS/igs-webapp.git
cd frontend
ng serve
```

### Building
#### Backend
1. Set up node

```sh
git clone https://github.com/NoxelS/igs-webapp.git
cd backend
npm install
npm run lint
npm run build
mkdir -p ./dist/keys
NODE_ENV=production node generateKeyPairs.js
```

2. Create the container

```sh
docker build . -t <image-name>
docker run -v <volume-for-files>:/usr/src/app/files <image-name>
```

!> **Important** Make sure to add all environment variables based on the [env template](https://github.com/NoxelS/igs-webapp/blob/master/backend/.env-template).
_If no reverse proxy is used you have to add port mapping to the containers._

#### Frontend
1. Set up node

```sh
git clone https://github.com/NoxelS/igs-webapp.git
cd frontend
npm install
npm run lint
node preBuild.js
npm run build
```

2. Create the container

```sh
docker build . -t <image-name>
docker run <image-name>
```

!> **Important** If no reverse proxy is used you have to add port mapping to the containers.

# Endpoints

## Authentication 🔐
The authentication is based on [JWT](https://jwt.io/).
### How to authenticate
__Endpoint:__

> POST ```/auth/login```

__Expected payload:__
```json
{
  "username": "<string>",
  "password": "<string>"
}
```
__Response:__
_[LoginResponse](#LoginResponse)_

### Create new user
__Endpoint:__

> POST ```/auth/create_user``` 🔐

__Expected payload:__
[``` User ```](#User)

__Response:__
_[SuccessResponse](#SuccessResponse)_

### Send password recovery email
If the user forgot his password he can recover it.
The api will send a recovery key to the given email address.

?> **Tip** Note that a recovery key expires in **1d** and can only be used once.

__Endpoint:__

> POST ```/auth/recovery```

__Expected payload:__
```json
{
  "email": "<string>"
}
```

__Response:__
_[SuccessResponse](#SuccessResponse)_

### Recover password
__Endpoint:__

> POST ```/auth/recover_password```

__Expected payload:__
```json
{
  "password": "<string>",
  "recoveryKey": "<string>",
}
```

__Response:__
_[SuccessResponse](#SuccessResponse)_

## Articles 📔
### Listing all articles
__Endpoint:__

This endpoint is used to fetch all articles.

> GET ```/articles/list```

__Response:__
_[IgsResponse<Article[]>](#IgsResponse)_
```json
{
  "success": true,
  "data": [
    {
      "id": "<string>",
      "title": "<string>",
      "views": "<number>",
      "creationDate": "<number>",
      "imageUrl": "<string>",
      "content": "<string>",
      "description": "<string>"
    },
    {
      "id": "<string>",
      "title": "<string>",
      "views": "<number>",
      "creationDate": "<number>",
      "imageUrl": "<string>",
      "content": "<string>",
      "description": "<string>"
    }
  ],
  "responseType": "IgsResponse<Article[]>",
  "dataType": "Article"
}
```

### Creating an article
__Endpoint:__

> POST ```/articles/create``` 🔐

__Expected payload:__
[``` Article ```](#Article)

```json
{
  "id": "<string>",
  "title": "<string>",
  "views": "<number>",
  "creationDate": "<number>",
  "imageUrl": "<string>",
  "content": "<string>",
  "description": "<string>"
}
```
__Response:__
_[SuccessResponse](#SuccessResponse)_

### Removing an article
__Endpoint:__

?> **Tip** Note that only the field **id** is used, but you can still send a whole article.

> POST ```/articles/remove``` 🔐

__Expected payload:__
[``` Article ```](#Article)

```json
{
  "id": "<string>",
  "title": "<string>",
  "views": "<number>",
  "creationDate": "<number>",
  "imageUrl": "<string>",
  "content": "<string>"
}
```
__Response:__
_[SuccessResponse](#SuccessResponse)_

### Editing an article
__Endpoint:__

> POST ```/articles/edit``` 🔐

__Expected payload:__
[``` Article ```](#Article)

```json
{
  "id": "<string>",
  "title": "<string>",
  "views": "<number>",
  "creationDate": "<number>",
  "imageUrl": "<string>",
  "content": "<string>"
}
```
__Response:__
_[SuccessResponse](#SuccessResponse)_

## Files 📁
### Listing all files
__Endpoint:__

This endpoint is used to fetch all files as [ShortFiles](#ShortFile).

> GET ```/files/list``` 🔐

__Response:__
_[ShortFileListResponse](#ShortFileListResponse)_
```json
{
  "success": true,
  "data": [
    {
      "name": "<string>",
      "id": "<number>",
      "authorId": "<number>",
      "mimetype": "<string>",
      "creationDate": "<number>",
      "description": "<string>"
    }
  ],
  "responseType": "ShortFileListResponse",
  "dataType": "ShortFile"
}
```
### Creating a file
__Endpoint:__

> POST ```/files/create``` 🔐

__Expected payload:__

```json
{
  "file": "<File>",
  "description": "<string>"
}
```

__Response:__
_[SuccessResponse](#SuccessResponse)_
### Deleting a file

__Endpoint:__

?> **Tip** Note that only the field **id** is used, but you can still send a whole ShortFile.

> POST ```/files/remove``` 🔐

__Expected payload:__
[``` ShortFile ```](#ShortFile)

__Response:__
_[SuccessResponse](#SuccessResponse)_

### Downloading a specific file
__Endpoint:__

> GET ```/files/get/:id``` 🔐

__Response:__
_[Blob](https://developer.mozilla.org/de/docs/Web/API/Blob)_

## Utils ⚒
### User information

__Endpoint:__

> GET ```/info/user``` 🔐

__Response:__
_[IgsResponse\<User>](#IgsResponse)_

### User id
__Endpoint:__

> GET ```/info/userid``` 🔐

__Response:__
_[IgsResponse\<string>](#IgsResponse)_

<!-- ### Server information -->

# Models
A short description of models used to send the GUI information.

## Article
Base class for every article.
```typescript
export class Article {
  public id: string;
  public title: string;
  public views: number;
  public creationDate: number;
  public imageUrl: string;
  public content: string;
  public description: string;
}
```
## User
Basic representation of an user.
```typescript
export class User {
    constructor(public username: string, public email: string, public id: string) {}
}
```
## ShortFile
GUI Representation of a file. Does not contain the real file.
```typescript
export class ShortFile {
  public id: number,
  public name: string,
  public authorId: number,
  public mimetype: string,
  public creationDate: number,
  public description: string
}
```

## Response
### IgsResponse
The generic response the API will use as a respond.
If the field _successful_ is not true, then there will be an errorMessage.

?> **Tip** Note that other responses are always inheriting the [IgsResponse](#IgsResponse).

```typescript
export class IgsResponse<T> {
    successful: boolean = true;
    data: T;
    errorMessage: string;
    responseType: string;
    dataType: string;
}
```
The field responseType will equal the name of the response and the name of the datatype T in <> brackets.
For example:
```typescript
new IgsResponse<User>().responseType === "IgsResponse<User> // is true"
```

### SuccessResponse
Is equal to a [IgsResponse](#IgsResponse) where ```T = null```

?> **Tip** Note that this will be the default response for all post actions. If an error occures, an [ErrorResponse](#ErrorResponse) will be sent instead.

```typescript
export class SuccessResponse extends IgsResponse<null> {
    constructor() {
        super(null);
    }
}
```
### ShortFileListResponse
Is equal to a [IgsResponse](#IgsResponse) where ```T = ShortFile[]```. The response is used when sending file information to the GUI.

```typescript
export class ShortFileListResponse extends IgsResponse<ShortFile[]> {
    constructor(id: ShortFile[]) {
        super(id);
    }
}
```
### ErrorResponse
Is equal to a [IgsResponse](#IgsResponse) where ```T = null && successful = false```. The response is used when the backend encounters an error. The field ```errorMessage``` fill contain an error message.

```typescript
export class ErrorResponse extends IgsResponse<null> {
    constructor(err: string) {
        super(null, err);
    }
}
```
### LoginResponse
Is equal to a [IgsResponse](#IgsResponse) where ```T = User```. The response is used when getting a new jwt token.

```typescript
export class LoginResponse extends IgsResponse<User> {
    token: string;
    expiresIn: string;
    signedToken: string,
    expiresIn: string,
}
```

repository: NoxelS/igs-webapp

repo_name: NoxelS/igs-webapp


text:
# Gest 2.0
A gulp-based boilerplate for rapidly deploying front-end scaffold
---
# Getting Started

## Requirement
* Node.js
* Gulp

##Setting up

1. Install Node.js
> Recommend use [nvm](https://github.com/creationix/nvm)

2. Install Gulp **Globally**
```
(sudo)npm install gulp -g
```

3. Install Gest
```
git clone https://github.com/alivelee/gest
```
4. Install Dependency
```
npm install
```
---
5. Start the Server

```
gulp serve
```

#Changelog

## [2.0] - 2017-1-06

- change to gulp 3.9 based
- use ES6 version of gulpfile

repository: alivelee/gest

repo_name: alivelee/gest


text:
Migrating to new host
=====================

## Prepare salt configuration for migration

1.  Ensure that salt-master, loadbalancer, and host in question can be brought up with vagrant locally, and that their health check for the relevant service is failing in haproxy after the host is fully up

- `laptop:psf-salt user$ vagrant up salt-master`
- `laptop:psf-salt user$ vagrant up loadbalancer`
- `laptop:psf-salt user$ vagrant up host`

To view haproxy status:

- vagrant up the salt-master, loadbalancer, and host in question (`vagrant up`)
- Prepare an ssh configuration file to access the host with native ssh commands: `vagrant ssh-config salt-master loadbalancer >> vagrant-ssh`
- Open an ssh session with port forwarding to the haproxy status page: `ssh -L 4646:<IP_ADDRESS>:4646 -F vagrant-ssh loadbalancer`
- view the haproxy status page in your browser `http://localhost:4646/haproxy?stats`

2.  Edit pillar data for roles.sls to include both old and new hostnames (ex. hostname*)
```
diff --git a/pillar/prod/roles.sls b/pillar/prod/roles.sls
index 68387c9..7a8ace1 100644
--- a/pillar/prod/roles.sls
+++ b/pillar/prod/roles.sls
@@ -35,7 +35,7 @@ roles:
     purpose:  "Builds and serves CPython's documentation"
     contact:  "mdk"
   downloads:
-    pattern:  "downloads.nyc1.psf.io"
+    pattern:  "downloads*.nyc1.psf.io"
     purpose:  "Serves python.org downloads"
     contact:  "CPython Release Managers"
   hg:
```

## Migrate the host

### Update Salt Master with latest config including prep from above

1.  ssh into the salt-master server `ssh salt.nyc1.psf.io`

2.  Navigate to srv/psf-salt `user@salt:~$ cd /srv/psf-salt`

3.  Run `user@salt:/srv/psf-salt$ sudo git pull`

4.  Run highstate to update the roles settings to reflect the new matchng pattern, as well as additional changes to support migration: `user@salt:/srv/psf-salt$ sudo salt-call state.highstate`

### Ensure new configuration doesn't impact host being migrated

1.  ssh into the old-host `laptop:psf-salt user$ ssh old-host`

2.  Run `user@old-host:~$ sudo salt-call state.highstate`

### Create new host
1.  Start a new droplet  in digital ocean, and check resources being used on old host to see if we are over or under spending on resources

2.  Create a new droplet with new version of ubuntu, appropriate resources,  and name it according to hostname + 2004

### Provision new host for migration

1. ssh into new-host via the IP address provided by DigitalOcean`ssh<EMAIL_ADDRESS>
2.  Add Salt repositories for our current target version (add the apt-repo and install salt-minion package)

-   `user@new-host:~$ wget --quiet -O /usr/share/keyrings/salt-archive-keyring.gpg https://repo.saltproject.io/py3/ubuntu/20.04/$(dpkg --print-architecture)/3004/salt-archive-keyring.gpg`
-  `user@new-host:~$ echo "deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=$(dpkg --print-architecture)] https://repo.saltproject.io/py3/ubuntu/20.04/$(dpkg --print-architecture)/3004 focal main" > /etc/apt/sources.list.d/salt.list`

3.  Install and configure the salt-minion. On new-host, run the command

- `user@new-host:~$ apt-get update -y && apt-get install -y --no-install-recommends salt-minion`
- On the old-host, look through `/etc/salt/minion.d*` to set up salt-minion configuration files to match on new-host:
  - run `user@old-host:~$ for file in /etc/salt/minion.d/*; do echo -e "cat > $file <<EOF"; sudo cat $file; echo "EOF"; done` to generate bash that will create these files

4. Restart the salt-minion service on the new host to pickup the configuration and register with salt-master: `user@new-host:~$ sudo salt-call service.restart`

5. On salt-master, accept the key for the new-host: `user@new-host:~$ sudo salt-key -a new-host`

6. On the new-host, run highstate `sudo salt-call sate.highstate`

7. Log out of root session

8. Ensure that the new host is not passing health checks in the loadbalancer: `ssh -L 4646:<IP_ADDRESS>:4646 lb-a.nyc1.psf.io` then open http://localhost:4646/haproxy?stats in your browser.

9.  Run hightstate on the salt-master to create a public dns record for the new-host `user@salt:/srv/psf-salt$ sudo salt-call state.highstate`

### Begin data migration

1.  `laptop:psf-salt user$ ssh -A new-host` into new host to enable forwarding of ssh-agent

2.  Stop cron jobs `user@new-host:~$ sudo service cron stop`

3.  Stop public-facing services, like nginx, or the service the health check is looking for. Use this command as an example:  `user@new-host:~$ sudo service nginx stop`

4.  Ensure that any additional volumes are mounted and in the correct location:
- Check what disks are currently mounted and where: `df`
- Determine where any additional disks should be mounted (based on salt configuration of services, for example `docs` and `downloads` roles need a big `/srv` for their data storage
- Ensure mounting of any external disks are in the right location using `mount` command with appropriate arguments
- Ensure that the volumes will be remounted on startup by configuring them in `/etc/fstab`

5.  Run rsync once to move bulk of data and as necessary to watch for changes `user@new-host:~$ sudo -E -s rsync -av --rsync-path="sudo rsync" username@old-host:/pathname/ /pathname/`

- The `/pathname/` can be determined by looking at the pillar data for backups, `pillar/prod/backup` using the source_directory path for the given host (example: the downloads host uses `/srv/`)

### Stop services on old host

1.  ssh into old-host ( `laptop:psf-salt user$ ssh old-host` )

2.  Stop cron jobs `user@old-host:~$ sudo service cron stop`

3.  Stop public-facing services, like nginx, or the service the health check is looking for ex)  `user@old-host:~$ sudo service nginx stop`

### Finish data migration and restart cron/public-facing services

1. Run rsync once more to finalize data migration `user@new-host:~$ sudo -E -s rsync -av --rsync-path="sudo rsync" username@hostname: /pathname/ /pathname/`

2.  Start cron jobs `user@new-host:~$ sudo service cron start`

3.  Start public-facing services involved with healthcheck, like nginx, `user@new-host:~$ sudo service nginx start`

4.  Ensure that the new-host is live and serving traffic by viewing loadbalancer page:
- view the haproxy status page in your browser `http://localhost:4646/haproxy?stats`

5.  Check if users have any files on old-host and transfer accordingly:
- `user@new-host:~$ for user in /home/psf-users/*; do sudo -E -s rsync --delete -av --progress --rsync-path="sudo rsync" user@old-host:$user/ $user/migrated-from-ubuntu-1804-lts-host/; done`

### Shutdown and reclaim hostname

1.  On old-host, stop the old-host by running, `user@old-host:~$ sudo shutdown -h now`

2.  Destroy the old-host in DigitalOcean

3.  Change the new-host name in DigitalOcean by removing the suffix or similar that was used to differentiate it from the old-host.

4.  Run `user@salt:~$ sudo salt-key -L` to list out and `user@salt:~$ sudo salt-key -d old-host` to remove old keys

5.  On new-host, run `user@new-host:~$ sudo hostname new-host` to rename

6.  Update new-host name in `/etc/hostname`,  `/etc/salt/minion_id`, and `/etc/hosts`

7.  Restart the salt minion `user@new-host:~$ sudo salt-call service.restart`

8.  Restart datadog `user@new-host:~$ sudo service datadog-agent restart`

9.  Run `user@salt:~$ sudo salt-key -a new-host` to accept new keys

10.  Run highstate `user@salt:~$ sudo salt-call state.highstate` on salt-master to update domain name as well as known_hosts file

repository: python/psf-salt

gha_language: SaltStack

repo_name: python/psf-salt


text:
### [CVE-2009-1792](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1792)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

The system.openURL function in StoneTrip Ston3D StandalonePlayer (aka S3DPlayer StandAlone) <IP_ADDRESS> and <IP_ADDRESS> and WebPlayer (aka S3DPlayer Web) <IP_ADDRESS> allows remote attackers to execute arbitrary commands via shell metacharacters in the first argument (the sURL argument).

### POC

#### Reference
- http://www.coresecurity.com/content/StoneTrip-S3DPlayers

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# NewsSum

A neural news summarization tool. Collect google news topics, crawl related news articles, generate summaries.
Including the following units:
1. BasicSum: traditional freq-based news-summary generator.
2. LSTM-Attetion: Neural network model that summarizes news.
3. WikiNews Dataset: A list of news articles crawled from WikiNews, every element(event) of the list contains at least three articles from mainstream website talking about the event.

## Run
python3 main.py

## Demo

http://news.qin.ee

## Pretrained Model Download

https://drive.google.com/file/d/0BwzJqD-PyhaoTVhZZVR2UTN6TU0/view?usp=sharing

## Data

https://docs.google.com/uc?id=0B0Obe9L1qtsnSXZEd0JCenIyejg&export=download

## Dependency

NLTK

numpy

Tensorflow

Newspaper

## Acknowledgement

[GNP](https://github.com/mPAND/gnp)

[NeuralSum](https://github.com/cheng6076/NeuralSum)
For their dataset and dataset reader and LSTM architecture.

## License
MIT

repository: qinenergy/NewsSum

repo_name: qinenergy/NewsSum


text:
---
title: Coffeescript
image_width: 49
image_height: 40
image: /assets/images/coffeescript.png
url: http://coffeescript.org/
source: https://github.com/jashkenas/coffee-script/
tags:
  - apps
  - web
  - mobile
  - server
  - javascript
description: >
  Coffeescript is a Javascript *dialect*
  designed to ease Javascript programming.

---
Coffeescript can be considered as a feasible Javascript replacement
for any environment.
Although Coffescript is different to Javascript,
it has a translator that transforms any Coffeescript into a Javascript,
so it can be used in any place that have Javascript
(web, mobile, server, ...)
In addition it has the same functionalities (including libraries),
and also adds some utilities to object oriented programming.

```coffeescript
helloer = (name) ->
  capitalize = (string) ->
    string.charAt(0).toUpperCase() + string.slice(1)
  name = capitalize name
  () -> console.log "Hello #{name}"

hello = helloer "World"
hello()
```

gha_language: JavaScript


text:
# Set up project

```sh
cd myproject
virtualenv env
source ./env/bin/activate
./setup.sh
```

# Run server

```sh
./run.sh
```
* http://localhost:8000/admin/
* username: admin
* password: password

# Jupyter notebook

```sh
./notebook.sh
```

gha_language: Jupyter Notebook


text:
# ReTest

[![Tests Status](https://github.com/JuliaTesting/ReTest.jl/workflows/CI/badge.svg)](https://github.com/JuliaTesting/ReTest.jl/actions?query=workflow%3ACI)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaTesting.github.io/ReTest.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaTesting.github.io/ReTest.jl/dev)

`ReTest` is a testing framework for Julia allowing:

1. Defining tests in source files, whose execution is deferred and triggered
   on demand.

   This is useful when one likes to have definitions of methods and
   corresponding tests close to each other. This is also useful for code which
   is not (yet) organized as a package, and where one doesn't want to maintain
   a separate set of files for tests.

2. Filtering run testsets with a `Regex`, which is matched against the
   descriptions of testsets.

   This is useful for running only part of the test suite of a package. For
   example, if you made a change related to addition, and included "addition"
   in the description of the corresponding testsets, you can easily run only
   these tests.

   Note that a [pull request](https://github.com/JuliaLang/julia/pull/33672)
   exists in the Julia repository to implement regex-filtering for
   `Test.@testset`.

A couple more features are also enabled, like shuffling the order in which
the testsets are run, or running testsets in parallel (via `Distributed`).

`ReTest` is mostly backward-compatible with `Test`, i.e. minimal change to
test files is necessary in order to switch to `ReTest`; it's often even
possible to use `ReTest` features without changing a line, e.g. on Julia's
`Base`/stdlib tests.

gha_license_id: NOASSERTION


text:
## What's Next

Now that you have gotten a `user_api_token` linked to your customer, you can

- Pass this `user_api_token` as params when [creating a charge](/#creating-a-charge) to bypass authentication for your customer
- Pass this `user_api_token` as params when adding and charging credit cards cards
- Pass this `user_api_token` as params when [creating a payout](/#creating-a-payout) in place of the recipient field
- Use the header `"X-XFERS-USER-API-KEY": "the user_api_token"` (instead of `"X-XFERS-USER-API-KEY": "your own token"`) to modify [user details] (/#user-account) and [bank accounts](/#bank-account) on behalf of your user

repository: Xfers/docs

repo_name: Xfers/docs


text:
# Geometric Test Library
Solves 2D and 3D math problems, including, `closest point`, `intersection`, `line of sight` and `reflection vector`.

## OVERVIEW

This project aims to teach 3D math. Everything can be found in the header file `GeometricTestLibrary.h`.
Since these tests are commonly used in video games, this repository includes the Unreal Engine 4 project `GeometricTests.uproject`.
These tests are designed to be used with any `C++` application or game engine, however. The project is released under the Apache 2.0 License.

**Examples:**
- 1. Closest Point in AABB
- 2. Closest Point on a Ray
- 3. Closest Point on a Plane
- 4. Closest Point on a Sphere
- 5. Intersection AABB-Plane
- 6. Intersection of Two Lines in 2D
- 7. Intersection Ray-AABB
- 8. Intersection Ray-Plane
- 9. Intersection Ray-Triangle
- 10. Intersection of Two Rays in 3D
- 11. Dynamic Intersection Sphere-Plane
- 12. Static Intersection Sphere-Plane
- 13. Dynamic Intersection of Two Spheres
- 14. Static Intersection of Two Spheres
- 15. Intersection of Three Planes
- 16. Intersection of Two AABBs
- 17. Reflection Vector
- 18. Barycentric Coordinates of Triangle in 3D

## FILES AND FOLDERS

| Files and Folders	| Description						|
| --------------------- |:-----------------------------------------------------:|
| `Config`		| UE4 project configuration files	|
| `Content`		| UE4 project files	|
| `Source`			| Project source						|
| `CHANGELOG`		| Log to track changes in respository			|
| `LICENSE`		| Apache 2.0 License			|
| `GeometricTests.uproject`		| UE4 project			|
| `README`		| This file						|

### Config

| Files	| Description						|
| ----------------------------- |:-----------------------------------------------------:|
| `DefaultEditor.ini`		| UE4 Config File				|
| `DefaultEngine.ini`			| UE4 Config File				|
| `DefaultGame.ini`			| UE4 Config File					|

### Content/Maps

| Files	| Description						|
| ----------------------------- |:-----------------------------------------------------:|
| `EmptyLevel.umap`		| UE4 Level				|

### Source

| Files and Folders		| Description						|
| ----------------------------- |:-----------------------------------------------------:|
| `GeometricTests`		| Geometric Tests Source				|
| `GeometricTests.Target.cs`			| UE4 Build System				|
| `GeometricTestsEditor.Target.cs`			| UE4 Build System					|

### Source/GeometricTests

| Files	and Folders		| Description						|
| ----------------------------- |:-----------------------------------------------------:|
| `Math`		| Math Directory			|
| `Primitives`		| Geometric Primitives Directory			|
| `GeometricTestLibrary.h`			| Geometric Test Library						|
| `GeometricTest.Build.cs`			| UE4 Build System							|
| `GeometricTests.h`			| Header: Module implementation for UE4 Project			|
| `GeometricTests.cpp`			| Source: Module implementation for UE4 Project			|
| `GeometricTestsGameModeBase.h`			| Header: UE4 Game Mode Base		|
| `GeometricTestsGameModeBase.cpp`			| Source: UE4 Game Mode Base				|

### Source/GeometricTests/Math/LinearAlgebra

| Files		| Description						|
| ------------- |:-----------------------------------------------------:|
| `Quaternion.h`	| Templated struct that handles quaternions						|
| `Vector.h`	| Templated struct that handles vector math						|

### Source/GeometricTests/Math/Operations

| Files		| Description						|
| ------------- |:-----------------------------------------------------:|
| `MathOperations.h`	| Common math functions					|

### Source/GeometricTests/Primitives

| Files		| Description						|
| ------------- |:-----------------------------------------------------:|
| `AABB.h`	| Axis-Aligned Bounding Box Data				|
| `Circle.h`	| Circle Data				|
| `Plane.h`	| Plane Data				|
| `Ray.h`	| Ray Data				|
| `Triangle.h`	| Triangle Data				|

## LICENSE

> Apache 2.0 License
>
> Copyright (c) 2018-2019 Robert Slattery
>
> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
>
> http://www.apache.org/licenses/LICENSE-2.0
>
> Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License.

repository: whu-lyh/GeometricTestLibrary

repo_name: whu-lyh/GeometricTestLibrary


text:
# AwsSnowballEdge

```text
aws-20210131/Architecture/Storage/AwsSnowballEdge
```

```text
include('aws-20210131/Architecture/Storage/AwsSnowballEdge')
```

| Illustration | AwsSnowballEdge | AwsSnowballEdgeCard | AwsSnowballEdgeGroup |
| :---: | :---: | :---: | :---: |
| ![illustration for Illustration](../../../aws-20210131/Architecture/Storage/AwsSnowballEdge.png) | ![illustration for AwsSnowballEdge](../../../aws-20210131/Architecture/Storage/AwsSnowballEdge.Local.png) | ![illustration for AwsSnowballEdgeCard](../../../aws-20210131/Architecture/Storage/AwsSnowballEdgeCard.Local.png) | ![illustration for AwsSnowballEdgeGroup](../../../aws-20210131/Architecture/Storage/AwsSnowballEdgeGroup.Local.png) |

## AwsSnowballEdge

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsSnowballEdge
include('aws-20210131/Architecture/Storage/AwsSnowballEdge')

' renders the element
AwsSnowballEdge('AwsSnowballEdge', 'Aws Snowball Edge', 'an optional tech label')
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsSnowballEdge
include('aws-20210131/Architecture/Storage/AwsSnowballEdge')

' renders the element
AwsSnowballEdge('AwsSnowballEdge', 'Aws Snowball Edge', 'an optional tech label')
@enduml
```

## AwsSnowballEdgeCard

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsSnowballEdgeCard
include('aws-20210131/Architecture/Storage/AwsSnowballEdge')

' renders the element
AwsSnowballEdgeCard('AwsSnowballEdgeCard', 'Aws Snowball Edge Card', 'an optional description')
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsSnowballEdgeCard
include('aws-20210131/Architecture/Storage/AwsSnowballEdge')

' renders the element
AwsSnowballEdgeCard('AwsSnowballEdgeCard', 'Aws Snowball Edge Card', 'an optional description')
@enduml
```

## AwsSnowballEdgeGroup

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsSnowballEdgeGroup
include('aws-20210131/Architecture/Storage/AwsSnowballEdge')

' renders the element
AwsSnowballEdgeGroup('AwsSnowballEdgeGroup', 'Aws Snowball Edge Group', 'an optional tech label') {
    note as note
        the content of the group
    end note
}
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210131/bootstrap')

' loads the Item which embeds the element AwsSnowballEdgeGroup
include('aws-20210131/Architecture/Storage/AwsSnowballEdge')

' renders the element
AwsSnowballEdgeGroup('AwsSnowballEdgeGroup', 'Aws Snowball Edge Group', 'an optional tech label') {
    note as note
        the content of the group
    end note
}
@enduml
```

repository: VinayaSathyanarayana/plantuml-libs

repo_name: VinayaSathyanarayana/plantuml-libs


text:
# RFPDF Template Plugin

A template plugin allowing the inclusion of ERB-enabled RFPDF template files.

##
##
## TCPDF Version (The New or UTF8 Version)
##
##

* Use UTF-8 encoding.
* RTL (Right-To-Left) languages support.
* HTML tag support.
* CSS minimum support.
* Image
 - 8bit PNG image support without RMagick liblary.
 - PNG/JPEG/GIF image support. (use RMagick liblary)

##
## Installing RFPDF
##

RFPDF is distributed via RubyGems, and can be installed the usual way that you install gems: by simply typing `gem install rfpdf` on the command line.

==

If you are using HTML, it is recommended you install:
```
gem install htmlentities
```

If you are using image file, it is recommended you install:
```
gem install rmagick
```

TCPDF Example of simple use in .html.erb:

```
<%
  @pdf = TCPDF.new()
  @pdf.set_margins(15, 27, 15)
  @pdf.set_font('FreeSans','', 8)
  @pdf.add_page()
  @pdf.write(5, "text\n", '')
%><%==@pdf.output()%>
```

TCPDF Japanese Example of simple use in .html.erb:
```
<%
  @pdf = TCPDF.new()
  @pdf.set_margins(15, 27, 15)
  @pdf.set_font('kozminproregular','', 8)
  @pdf.add_page()
  @pdf.write(5, "UTF-8 Japanese text.\n", '')
%><%==@pdf.output()%>
```

See the following files for sample of useage:

test_unicode.rfpdf
utf8test.txt
logo_example.png

ENJOY!

repository: naitoh/rfpdf

repo_name: naitoh/rfpdf


text:
# End-to-End Tests

## Background

Gloo Edge is built to integrate with a user's environment. By enabling users to select their preferred tools for scheduling, persistence, and security, we must ensure that we have end-to-end tests to validate these scenarios.

We support the following types of end-to-end tests:
- [In Memory end-to-end](./e2e#in-memory-end-to-end-tests)
- [Kubernetes end-to-end](./kube2e#kubernetes-end-to-end-tests)
- [Consul/Vault end-to-end](./consulvaulte2e)

## CI
Each test suite may run on different infrastructure. Refer to the README of each test suite for more information.

## Performance tests

Our tests include some performance tests which variably guard against regressions in performance or validate decisions made to choose one algorithm over others.

These are located next to the code that they test and are denoted with the `Performance` label and are executed as part of our nightly tests rather than in CI.

To find the results of these, navigate to the "Actions" tab in the Github UI, click on the ["Nightly" workflow](https://github.com/solo-io/gloo/actions/workflows/nightly-tests.yaml), and select the latest run.
It may be useful to search for the name of the particular test you're investigating in order to quickly find the results.

Note that the `helpers` package's `Measure` and `MeasureIgnore0s` functions have different implementations for Mac and Linux machines.
The Linux implementation leverages the go-utils `benchmarking` package and gets more reliable measurements.
Compiling and running on Mac can be useful to ensure that tests using these functions behave as intended, but targets should be based on performance in the Nightly GHA, which uses a Linux runner.
When developing performance tests it will likely be helpful to manually trigger runs of the Nightly job from the development branch to determine/validate performance targets.

repository: solo-io/gloo

gha_language: Go

repo_name: solo-io/gloo


text:
# ExportPDF

This application was originally written for a friend to use by her employees for scraping pdf documents produced from an electronic medical records.
It was written off-the-cuff and without a Java IDE as an idea to improve my simplified understanding of Java Swing and Java in general.

### Prerequisites
* Java 1.5 or better
* EMR pdf patient records

### To Run
```java -jar ExportPDF.jar```

### License

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

repository: schmidty/ExportPDF

repo_name: schmidty/ExportPDF


text:
# Compose Lint Rules

![CI](https://github.com/ReactiveCircus/compose-lint-rules/workflows/CI/badge.svg)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Android Lint rules for **Jetpack Compose**.

## Download

Dependencies are hosted on [Maven Central][maven-central].

```groovy
implementation "io.github.reactivecircus.composelint:composelint:0.1.0"
```

Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].

## Lint Rules

- **InvalidComposableFunctionName** - A non-returning function marked with a `@Composable` annotation should start with a capital letter. It is a convention to emphasize the mental model that a `@Composable` function is a **noun** rather than a **verb**.

[maven-central]: https://search.maven.org/search?q=g:io.github.reactivecircus.composelint
[snap]: https://oss.sonatype.org/content/repositories/snapshots/

repository: ReactiveCircus/compose-lint-rules

gha_language: Kotlin

repo_name: ReactiveCircus/compose-lint-rules


text:
# GeoFence

This sample demonstrates how to take create a GeoFence to alert when a location has entered a specified area.

![](geofence_screenshot.png)

## How it works
- A `QGeoPositionInfoSource` is created for obtaining the device's location. An NMEA simulation file is specified for purposes of demonstration.
- The `LocationDisplay` is started on the `MapView`, which takes the information from `QGeoPositionInfoSource`, and displays it on a map
- A Polygon is created and displayed as a Graphic. This is the alert zone where we want to be alerted when the current position enters or leaves.
- Whenever the current position updates, the `GeometryEngine::intersects` function is called to see if the current position intersects with the polygon
- If this returns true, a message alert is displayed to the user


text:
# Mastodon on GKE

This will set up Mastodon on GKE. It uses Contour as a load balancer / frontend, and Cloud SQL Postgres for a database.

## Dependencies

The following prerequesties are necessary to set up Mastodon

### Google Cloud APIs

You need the following Google Cloud APIs enabled:

* [Cloud SQL][sql]
* [ IAM Identity and Account Management][iam]
* [Cloud Resource Manager][resource]

[sql]: https://console.developers.google.com/apis/api/sqladmin.googleapis.com/overview
[iam]:https://console.developers.google.com/apis/api/iam.googleapis.com/overview
[resource]: https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com/overview

### Google Cloud credentials

Create a new [service account][acct] for Terraform. Give it the Project Owner role. Check "furnish a new private key," and select json. Save the resulting file as "account.json" in the gke-mastodon directory.

[acct]: https://console.cloud.google.com/iam-admin/serviceaccounts

### Google Kubernetes Engine

The template does not set up the cluster itself, as there's too many options to template. Create a cluster by the name `mastodon-prod`, or provide an alternate cluster name as a terraform variable.

You will need to set up local credentials as well.

```
gcloud auth application-default login
gcloud container clusters get-credentials mastodon-prod
```

### Terraform

First, [Install Terraform][install]

To get started with Terraform:

```
terraform init
```

You will need to provide several [variables][vars].
These can be either provided as arguments (`-var`) or as a `terraform.tfvars`, in the form of:

```
letsencrypt_email = "<email>"
project_name = "<project>"
domain = "<domain>"

```

[install]: https://www.terraform.io/downloads.html
[vars]: https://www.terraform.io/docs/configuration/variables.html

### Contour

To install contour, you'll need an admin clusterrolebind

```
kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user <your google email address>
```

Then install Contour itself:

```
kubectl apply -f vendor/contour.yaml
```

You'll need the IP address Contour assigned to its load balancer.

```
kubectl get -n heptio-contour service contour -o wide
```

The IP address you want is listed under `external ip`.

Set it as `contour_ip` in the terraform variables.

### cert-manager

```
kubectl apply -f vendor/certmanager.yaml
```

### SMTP

An [attempt was made][mgb] to automate this with terraform, but a [bug][bug] stymied that attempt.
Instead, set up an account (Mastodon recommends [Mailgun][mg] or [SparkPost][sp]). and set the `smtp_server`, `smtp_login`, and `smtp_password` terraform variables.

[mgb]: https://github.com/stillinbeta/gke-mastodon/pull/1
[bug]: https://github.com/terraform-providers/terraform-provider-mailgun/issues/16
[mg]: https://www.mailgun.com/
[sp]: https://www.sparkpost.com/

## Set Up

### Terraform

```
terraform plan -out terraform.plan
```

If all goes well, Terraform will tell you a bunch of resources that will be created.

To actually create them, run:

```
terraform apply terraform.plan
```

This may take a while, especially creating the database instance.

### Google Cloud DNS

After the zone is created (after running Terraform), you'll need to point your name servers at it.
You can do retrieve them with:

```
gcloud dns managed-zones describe mastodon
```

### Kubernetes

Next, install Mastodon into the cluster:

```
kubectl apply -f mastodon.yaml
```

And set up the router. This file should've been created by Terraform.
```
kubectl apply -f serve.yaml
```

### Run the database migrations

Before Mastodon is up and running, you'll need to apply some database migrations.

First, get the IP address of a mastodon node:

```
kubectl get pods -n mastodon
```

look for something like `web-686d9b865b-kzqpw`. The numbers will be different, but that's okay.

Run the migrations:

```
kubectl exec -n mastodon web-686d9b865b-kzqpw bundle exec rake db:migrate:setup
```

That may take a few minutes, but once it's done:

## Conclusion

At this point you should be good to go!
Take a look at the [Mastodon administration guide][admin] for more ideas on how to proceed!

[admin]: https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Administration-guide.md

repository: stillinbeta/gke-mastodon

gha_language: HCL

repo_name: stillinbeta/gke-mastodon


text:
# udacity-nanodegree-data-science-p4
Capstone project - recognition of dog breeds

**Introduction**

This is an educational project where I use Convolutional Neural Networks to detect dog breeds on pictures. Besides its educational purpost it is also entertaning, because you can also fill in pictures of humans and it will return the dog breed the person looks like.

**Main Questions**

The main question (or better task) of this project was to understand how Convolutional Neural Networks can be implemented in python, how keras as libary can be used and if it is possible to detect dog breeds with relatively small time consumption.

**Used Libaries**

The following libaries are used in the project:
- sklearn
- keras
- numpy
- glob
- random
- cv2
- matplotlib
- tqdm
- PIL
- extract_bottleneck_features

**Architecture**

The project is in a JupiterNotebook but within this notebook it is split in 8 steps:

- Step 0: Import Datasets
- Step 1: Detect Humans
- Step 2: Detect Dogs
- Step 3: Create a CNN to Classify Dog Breeds (from Scratch)
- Step 4: Use a CNN to Classify Dog Breeds (using Transfer Learning)
- Step 5: Create a CNN to Classify Dog Breeds (using Transfer Learning)
- Step 6: Write your Algorithm
- Step 7: Test Your Algorithm

Besides the jupiter notebook, there are several other data structures used which are explained in the Installation Instruktions below.

**Results**

The result is a model that is able to classify pictures by dog breeds.  I tested the output with some pictures from picabay.com (free to use) and the results are quite good.

**Challenges and Learnings**

In this project I had to learn CNN from zero. I did not have any knowledge about neuronal networks but by reading articles on Wikipedia, Readme's from keras and some blogposts about the topic. I gained some knowledge and were able to generate a CNN that classifies dogs to its breeds.

**Installation Instructions**

1. Clone the repository and navigate to the downloaded folder.
```
git clone https://github.com/udacity/dog-project.git
cd dog-project
```

2. Download the [dog dataset](https://s3-us-west-1.amazonaws.com/udacity-aind/dog-project/dogImages.zip).  Unzip the folder and place it in the repo, at location `path/to/dog-project/dogImages`.

3. Download the [human dataset](https://s3-us-west-1.amazonaws.com/udacity-aind/dog-project/lfw.zip).  Unzip the folder and place it in the repo, at location `path/to/dog-project/lfw`.  If you are using a Windows machine, you are encouraged to use [7zip](http://www.7-zip.org/) to extract the folder.

4. Download the [VGG-16 bottleneck features](https://s3-us-west-1.amazonaws.com/udacity-aind/dog-project/DogVGG16Data.npz) for the dog dataset.  Place it in the repo, at location `path/to/dog-project/bottleneck_features`.

5. (Optional) __If you plan to install TensorFlow with GPU support on your local machine__, follow [the guide](https://www.tensorflow.org/install/) to install the necessary NVIDIA software on your system.  If you are using an EC2 GPU instance, you can skip this step.

6. (Optional) **If you are running the project on your local machine (and not using AWS)**, create (and activate) a new environment.

	- __Linux__ (to install with __GPU support__, change `requirements/dog-linux.yml` to `requirements/dog-linux-gpu.yml`):
	```
	conda env create -f requirements/dog-linux.yml
	source activate dog-project
	```
	- __Mac__ (to install with __GPU support__, change `requirements/dog-mac.yml` to `requirements/dog-mac-gpu.yml`):
	```
	conda env create -f requirements/dog-mac.yml
	source activate dog-project
	```
	**NOTE:** Some Mac users may need to install a different version of OpenCV
	```
	conda install --channel https://conda.anaconda.org/menpo opencv3
	```
	- __Windows__ (to install with __GPU support__, change `requirements/dog-windows.yml` to `requirements/dog-windows-gpu.yml`):
	```
	conda env create -f requirements/dog-windows.yml
	activate dog-project
	```

7. (Optional) **If you are running the project on your local machine (and not using AWS)** and Step 6 throws errors, try this __alternative__ step to create your environment.

	- __Linux__ or __Mac__ (to install with __GPU support__, change `requirements/requirements.txt` to `requirements/requirements-gpu.txt`):
	```
	conda create --name dog-project python=3.5
	source activate dog-project
	pip install -r requirements/requirements.txt
	```
	**NOTE:** Some Mac users may need to install a different version of OpenCV
	```
	conda install --channel https://conda.anaconda.org/menpo opencv3
	```
	- __Windows__ (to install with __GPU support__, change `requirements/requirements.txt` to `requirements/requirements-gpu.txt`):
	```
	conda create --name dog-project python=3.5
	activate dog-project
	pip install -r requirements/requirements.txt
	```

8. (Optional) **If you are using AWS**, install Tensorflow.
```
sudo python3 -m pip install -r requirements/requirements-gpu.txt
```

9. Switch [Keras backend](https://keras.io/backend/) to TensorFlow.
	- __Linux__ or __Mac__:
		```
		KERAS_BACKEND=tensorflow python -c "from keras import backend"
		```
	- __Windows__:
		```
		set KERAS_BACKEND=tensorflow
		python -c "from keras import backend"
		```

10. (Optional) **If you are running the project on your local machine (and not using AWS)**, create an [IPython kernel](http://ipython.readthedocs.io/en/stable/install/kernel_install.html) for the `dog-project` environment.
```
python -m ipykernel install --user --name dog-project --display-name "dog-project"
```

11. Open the notebook.
```
jupyter notebook dog_app.ipynb
```

12. (Optional) **If you are running the project on your local machine (and not using AWS)**, before running code, change the kernel to match the dog-project environment by using the drop-down menu (**Kernel > Change kernel > dog-project**). Then, follow the instructions in the notebook.

__NOTE:__ While some code has already been implemented to get you started, you will need to implement additional functionality to successfully answer all of the questions included in the notebook. __Unless requested, do not modify code that has already been included.__


text:
# Nbvcxz - Password strength estimator - [![Build Status](https://travis-ci.org/GoSimpleLLC/nbvcxz.svg?branch=master)]
`nbvcxz` is java library (and standalone console program) which is heavily inspired by the work in [zxcvbn](https://github.com/dropbox/zxcvbn).

Password strength estimation is a bit of an art and science.  Strength estimation is accomplished by running
a password through different algorithms looking for matches in any part of the password on: `word lists` (with fuzzy matching),
`common dates`, `common years`, `spacial patterns`, `repeating characters`, `repeating sets of characters`,
and `alphabetic sequences`.

Each of these represent ways an attacker may try to crack a password.  To be vigilant, we must adapt to
new methods in password cracking and implement new methods to identify passwords susceptible to
each new method.

# Table of Contents
  * [Maven Central](#maven-central)
  * [Compile](#compile)
  * [Differentiating Features](#differentiating-features)
  * [Compatibility](#compatibility)
  * [A Rant On Arbitrary Password Policies](#a-rant-on-arbitrary-password-policies)
  * [How to use](#how-to-use)
    + [Standalone](#standalone)
    + [Library](#library)
        * [Configure and create object](#configure-and-create-object)
          + [All defaults](#all-defaults)
          + [Localization](#localization)
          + [Custom configuration](#custom-configuration)
        * [Estimate password strength](#estimate-password-strength)
          + [Simple](#simple)
          + [Feedback](#feedback)
        * [Generate passphrase/password](#generate-passphrasepassword)
          + [Passphrase](#passphrase)
          + [Password](#password)
  * [Bugs and Feedback](#bugs-and-feedback)
  * [License](#license)
  * [Requires Java](#requires-java)
  * [Application using this library](#application-using-this-library)

## Maven Central
```xml
<dependency>
    <groupId>me.gosimple</groupId>
    <artifactId>nbvcxz</artifactId>
    <version>1.5.1</version>
</dependency>
```

## Compile

### Debian based
```sh
apt-get install git
apt-get install openjdk-8-jdk
apt-get install maven
git clone https://github.com/GoSimpleLLC/nbvcxz.git
cd nbvcxz
mvn package
```

The project will be built, and the jar file will be placed in the target sub-directory.

## Differentiating Features
* Internationalization support for all text output by the library (for feedback, console output, etc).
    * Currently supported languages
        - **English (default)**
        - Afrikaans (af)
        - Dutch (nl)
        - Finnish (fi)
        - French (fr)
        - German (de)
        - Hungarian (hu)
        - Italian (it)
        - Portuguese (pt)
        - Russian (ru)
        - Spanish (es)
        - Swedish (sv)
        - Telugu (te)
        - Ukrainian (uk)
        - Chinese (zh)
* Better match generation algorithm which will find the absolute lowest entropy combination of the matches.
* Support for ranked and un-ranked dictionaries.
* Dictionary matching has the ability to use Levenshtein Distance (LD) calculations to match passwords which are non-exact matches to a dictionary entry.
    * LD calculations happen on full passwords only, and have a `threshold` of 1/4th the length of the password.
* Dictionaries can be customized, and custom dictionaries can be added very easily.
    * Exclusion dictionaries can also be built and tailored per-user to prevent obvious issues like using their own email or name as their password
* Default dictionaries have excluded single character words due to many false positives
* Additional PasswordMatchers and Matches can be implemented and configured to run without re-compiling.
* Easy to configure how this library works through the ConfigurationBuilder.
    * You can set minimum entropy scores, locale, year patterns, custom leet tables, custom adjacency graphs, custom dictionaries, and custom password matchers.
* Support for generating passwords and passphrases.
    * Available in the console application as well as the library.
    * One use case is for generating a "forgot password" temporary pass

## Compatibility
Strict compatibility between nbvcxz and zxcvbn has not been a goal of this project. The additional features in nbvcxz
which have improved accuracy are the main causes for differences with zxcvbn. There are some ways to configure nbvcxz for
better compatibility though, so we will go over those configuration parameters here.

1. Disable the Levenshtein Distance (LD) calculation. This feature was very helpful in my analysis on helping identify
passwords which were only slightly different than dictionary words but were not caught with the original implementation.
This feature will be sure to cause nbvcxz to produce different results than zxcvbn for a large number of passwords.
Use ConfigurationBuilder setDistanceCalc(Boolean distanceCalc)

2. Make sure both implementations are using the same dictionaries. There are additional leaked passwords in the
nbvcxz dictionary compared to zxcvbn. There are also additional dictionaries included in nbvcxz that are not in zxcvbn and
vice versa. Simply different choices on what lists were important to include by default. With nbvcxz you can easily
change which dictionaries are used though, so it's easy to make the different implementations use the same dictionaries.
Use ConfigurationBuilder setDictionaries(List<Dictionary> dictionaries)

3. Disable separator match types. This is a new match type which zxcvbn has no equivalent. It helps with passphrase
detection and accurately scoring them, but if we are going for compatibility we need to disable it.
Use ConfigurationBuilder setPasswordMatchers(List<PasswordMatcher> passwordMatchers)

4. The algorithm to find the best matches is different between nbvcxz and zxcvbn, that is likely to produce slightly
different results in cases where zxcvbn is unable to find the best combination of matches due to the algorithm used.
There were quite a few instances I noted that brought about the change to the algorithm used by nbvcxz where there were
obviously "wrong" results for entropy based on the combination of matches because it got stuck in a local minimum. This
is no longer an issue with nbvcxz, but will inherently produce different results for some passwords compared to the
original algorithm used by zxcvbn. In the majority of cases both algorithms are able to figure out what the lowest
entropy combination of matches on the password are, so I don't see this being too big of an issue.

## A Rant On Arbitrary Password Policies
Lets think up an example scenario which I expect some of you may have run into way too often.
We are a company `NewStartup!` and we are creating the next big web application. We
want to ensure our users don't choose an easily guessable password, so we implement an arbitrary
policy which says a password must have:
  an __eight character minimum__ and contain __upper case__, __lower case__, __numbers__, and __special characters__

Now lets see how that policy applies to two passwords which are at opposite ends of the spectrum.

  Password #1: `Passw0rd!` - This password was chosen to get around an arbitrary policy

  Password #2: `5fa83b7e1r39xfa8hmiz0` - This was randomly generated using lowercase alphanumeric

  Password #1 meets all of the rules in the policy and passes with flying colors.
  Password #2 does not contain __upper case__, or __special characters__, and thus the policy fails this password.

Was password #1 actually more secure than password #2 by any metric?  That would be a hard argument to make.

In fact, password #1 is likely to be cracked quite quickly. `password` is one of the top passwords in all password
lists an attacker is likely to try using a rule based dictionary attack.  If the attacker knows that our policy requires:
__eight character minimum__, __upper case__, __lower case__, __numbers__, and __special characters__
they will then use rules like `toggle case`, `l33t substitution`, and `suffix/prefix special characters`
to augment their dictionary list for the attack.

It's quite likely password #1 would fall to an attacker even in a rate limited online attack.

Password #2, while not allowed by our policy, is only susceptible to a brute force attack (if a secure hashing algorithm is used).

## How to use
`nbvcxz` can be used as a stand-alone console program, or import it as a library.

### Standalone
To use as a stand-alone program, just compile, and run it by calling:
`java -jar nbvcxz-1.5.1.jar`
![alt text](http://i.imgur.com/9c070FX.png)

### Library
`nbvcxz` can also be used as a library for password validation in java back-ends.
Below is a full example of the pieces you'd need to implement within your own application.
##### Configure and create object

###### All defaults
```java
// With all defaults...
Nbvcxz nbvcxz = new Nbvcxz();
```

###### Localization
Here we're creating a custom configuration which localizes all text to French
```java
// Create our configuration object and set the locale
Configuration configuration = new ConfigurationBuilder()
        .setLocale(Locale.forLanguageTag("fr"))
        .createConfiguration();

// Create our Nbvcxz object with the configuration we built
Nbvcxz nbvcxz = new Nbvcxz(configuration);
```

###### Custom configuration
Here we're creating a custom configuration with a custom exclusion dictionary and minimum entropy
```java
// Create a map of excluded words on a per-user basis using a hypothetical "User" object that contains this info
List<Dictionary> dictionaryList = ConfigurationBuilder.getDefaultDictionaries();
dictionaryList.add(new DictionaryBuilder()
        .setDictionaryName("exclude")
        .setExclusion(true)
        .addWord(user.getFirstName(), 0)
        .addWord(user.getLastName(), 0)
        .addWord(user.getEmail(), 0)
        .createDictionary());

// Create our configuration object and set our custom minimum
// entropy, and custom dictionary list
Configuration configuration = new ConfigurationBuilder()
        .setMinimumEntropy(40d)
        .setDictionaries(dictionaryList)
        .createConfiguration();

// Create our Nbvcxz object with the configuration we built
Nbvcxz nbvcxz = new Nbvcxz(configuration);
```

##### Estimate password strength

###### Simple
```java
// Estimate password
Result result = nbvcxz.estimate(password);

return result.isMinimumEntropyMet();
```

###### Feedback
This part will need to be integrated into your specific front end, and really depends on your needs.
Here are some of the possibilities:
```java

// Get formatted values for time to crack based on the values we
// input in our configuration (we used default values in this example)
String timeToCrackOff = TimeEstimate.getTimeToCrackFormatted(result, "OFFLINE_BCRYPT_12");
String timeToCrackOn = TimeEstimate.getTimeToCrackFormatted(result, "ONLINE_THROTTLED");

// Check if the password met the minimum set within the configuration
if(result.isMinimumEntropyMet())
{
    // Start building success message
    StringBuilder successMessage = new StringBuilder();
    successMessage.append("Password has met the minimum strength requirements.");
    successMessage.append("<br>Time to crack - online: ").append(timeToCrackOn);
    successMessage.append("<br>Time to crack - offline: ").append(timeToCrackOff);

    // Example "success message" that would be displayed to the user
    // This is obviously just a contrived example and would have to
    // be tailored to each front-end
    setSuccessMessage(successMessage.toString());
    return true;
}
else
{
    // Get the feedback for the result
    // This contains hints for the user on how to improve their password
    // It is localized based on locale set in configuration
    Feedback feedback = result.getFeedback();

    // Start building error message
    StringBuilder errorMessage = new StringBuilder();
    errorMessage.append("Password does not meet the minimum strength requirements.");
    errorMessage.append("<br>Time to crack - online: ").append(timeToCrackOn);
    errorMessage.append("<br>Time to crack - offline: ").append(timeToCrackOff);

    if(feedback != null)
    {
        if (feedback.getWarning() != null)
            errorMessage.append("<br>Warning: ").append(feedback.getWarning());
        for (String suggestion : feedback.getSuggestion())
        {
            errorMessage.append("<br>Suggestion: ").append(suggestion);
        }
    }
    // Example "error message" that would be displayed to the user
    // This is obviously just a contrived example and would have to
    // be tailored to each front-end
    setErrorMessage(errorMessage.toString());
    return false;
}
```

##### Generate passphrase/password
We have a passphrase/password generator as part of `nbvcxz` which very easy to use.

###### Passphrase
```java
// Generate a passphrase from the standard (eff_large) dictionary with 5 words with a "-" between the words
String pass1 = Generator.generatePassphrase("-", 5);

// Generate a passphrase from a custom dictionary with 5 words with a "-" between the words
String pass2 = Generator.generatePassphrase(new Dictionary(...), "-", 5);
```

###### Password
```java
// Generate a random password with alphanumeric characters that is 15 characters long
String pass = Generator.generateRandomPassword(Generator.CharacterTypes.ALPHANUMERIC, 15);
```

## Bugs and Feedback

For bugs, questions and discussions please use the [Github Issues](https://github.com/GoSimpleLLC/nbvcxz/issues).

## License

MIT License

* http://www.opensource.org/licenses/mit-license.php

## Requires Java

* Java 1.7+

## Application using this library

- [Blacksmith TPM](https://blacksmithapplications.com/) - Formerly GoSimple TPM
- [Pazzword - Intelligent Password Evaluator](https://github.com/cyb3rko/pazzword)
- [KeePassDX - Open source password manager for Android](https://www.keepassdx.com/)

Anyone else using the library in their application, i'd love to hear and put a link up here.

gha_language: Java


text:
# goracle #
*goracle/oracle* is a package is a translated version of
cx_Oracle (by Anthony Tuininga) converted from C (Python module) to Go.

*goracle/godrv* is a package which is a database/sql/driver.Driver
compliant wrapper for goracle/oracle - passes github.com/bradfitz/go-sql-test (as github.com/tgulacsi/go-sql-test).

## There ##
CHAR, VARCHAR2, NUMBER, DATETIME simple AND array bind/define.

## Not working ##
INTERVAL

## Not working ATM ##
CURSOR

## Not tested (yet) ##
LONG, LONG RAW, LOB datatypes.

# Debug #
You can build the test executable (for debugging with gdb, for example) with
go test -c

You can build a tracing version with the "trace" build tag
(go build -tags=trace) that will print out everything before calling OCI
C functions.

repository: antrophy/goracle

repo_name: antrophy/goracle


text:
# Ruby

## Links

* [Ruby is nice, but what makes great?](https://www.reddit.com/r/ruby/comments/8ysh41/ruby_is_nice_but_what_makes_great/)
* [Clean code ruby](https://github.com/uohzxela/clean-code-ruby#readme) - Clean Code concepts adapted for Ruby.
* [Using Ruby in 2019](https://jasoncharnes.com/using-ruby-in-2019/)

repository: woodrowpearson/gitbook-public

repo_name: woodrowpearson/gitbook-public


text:
# Installation:

```bash
pip install lm_dataloader
```

# Design Philosophy

- A library to unify lm dataloading at large scale
- Simple interface, any tokenizer can be integrated
- Minimal changes needed from small -> large scale (many multiple GPU nodes)

- follows fairseq / megatron's 'mmap' dataformat, but with improvements. Those being:
    - [x] Easily combine multiple datasets
    - [x] Easily split a dataset into train / val / test splits
    - [x] Easily build a weighted dataset out of a list of existing ones along with weights.
    - [x] unified into a single 'file' (which is actually a directory containing a .bin / .idx file)
    - [x] index files that are built on the fly are hidden files, leaving less mess in the directory.
    - [ ] More straightforward interface, better documentation.
    - [x] Inspectable with a command line tool
    - [x] Can load from urls
    - [x] Can load from S3 buckets
    - [ ] Can load from GCS buckets
    - [ ] Can tokenize *on the fly* instead of preprocessing
    - [x] Option to set mpu globally (for distributed dataloading)

# Example usage

To tokenize a dataset contained in a .jsonl file (where the text to be tokenized can be accessed under the 'text' key):

```python
import lm_dataloader as lmdl
from transformers import GPT2TokenizerFast

jsonl_path = "test.jsonl"
output = "my_dataset.lmd"
tokenizer = GPT2TokenizerFast.from_pretrained('gpt2')

lmdl.encode(
    jsonl_path,
    output_prefix=output,
    tokenize_fn=tokenizer.encode,
    tokenizer_vocab_size=len(tokenizer),
    eod_token=tokenizer.eos_token_id,
)
```

This will create a dataset at "my_dataset.lmd" which can be loaded as an indexed torch dataset like so:

```python
from lm_dataloader import LMDataset
from transformers import GPT2TokenizerFast

tokenizer = GPT2TokenizerFast.from_pretrained('gpt2')
seq_length = tokenizer.model_max_length # or whatever the sequence length of your model is

dataset = LMDataset("my_dataset.lmd", seq_length=seq_length)

# peek at 0th index
print(dataset[0])
```

# Command line utilities

There are also command line utilities provided to inspect / merge datasets, e.g:

```bash
lm-dataloader inspect my_dataset.lmd
```

Launches an interactive terminal to inspect the data in my_dataset.lmd

And:

```bash
lm-dataloader merge my_dataset.lmd,my_dataset_2.lmd new_dataset.lmd
```

Merges the datasets at "my_dataset.lmd" and "my_dataset_2.lmd" into a new file at "new_dataset.lmd".