text:
# Architecture

The principle characteristics of crosvm are:

-   A process per virtual device, made using fork
-   Each process is sandboxed using [minijail]
-   Takes full advantage of KVM and low-level Linux syscalls, and so only runs
    on Linux
-   Written in Rust for security and safety

A typical session of crosvm starts in `main.rs` where command line parsing is
done to build up a `Config` structure. The `Config` is used by `run_config` in
`linux.rs` to setup and execute a VM. Broken down into rough steps:

1.  Load the linux kernel from an ELF file.
1.  Create a handful of control sockets used by the virtual devices.
1.  Invoke the architecture specific VM builder `Arch::build_vm` (located in
    `x86_64/src/lib.rs` or `aarch64/src/lib.rs`).
1.  `Arch::build_vm` will itself invoke the provided `create_devices` function
    from `linux.rs`
1.  `create_devices` creates every PCI device, including the virtio devices,
    that were configured in `Config`, along with matching [minijail] configs for
    each.
1.  `Arch::generate_pci_root`, using a list of every PCI device with optional
    `Minijail`, will finally jail the PCI devices and construct a `PciRoot` that
    communicates with them.
1.  Once the VM has been built, it's contained within a `RunnableLinuxVm` object
    that is used by the VCPUs and control loop to service requests until
    shutdown.

## Forking

During the device creation routine, each device will be created and then wrapped
in a `ProxyDevice` which will internally `fork` (but not `exec`) and [minijail]
the device, while dropping it for the main process. The only interaction that
the device is capable of having with the main process is via the proxied trait
methods of `BusDevice`, shared memory mappings such as the guest memory, and
file descriptors that were specifically allowed by that device's security
policy. This can lead to some surprising behavior to be aware of such as why
some file descriptors which were once valid are now invalid.

## Sandboxing Policy

Every sandbox is made with [minijail] and starts with `create_base_minijail` in
`linux.rs` which set some very restrictive settings. Linux namespaces and
seccomp filters are used extensively. Each seccomp policy can be found under
`seccomp/{arch}/{device}.policy` and should start by `@include`-ing the
`common_device.policy`. With the exception of architecture specific devices
(such as `Pl030` on ARM or `I8042` on x86_64), every device will need a
different policy for each supported architecture.

## The VM Control Sockets

For the operations that devices need to perform on the global VM state, such as
mapping into guest memory address space, there are the vm control sockets. There
are a few kinds, split by the type of request and response that the socket will
process. This also proves basic security privilege separation in case a device
becomes compromised by a malicious guest. For example, a rogue device that is
able to allocate MSI routes would not be able to use the same socket to
(de)register guest memory. During the device initialization stage, each device
that requires some aspect of VM control will have a constructor that requires
the corresponding control socket. The control socket will get preserved when the
device is sandboxed and and the other side of the socket will be waited on in
the main process's control loop.

The socket exposed by crosvm with the `--socket` command line argument is
another form of the VM control socket. Because the protocol of the control
socket is internal and unstable, the only supported way of using that resulting
named unix domain socket is via crosvm command line subcommands such as `crosvm
stop`.

## GuestMemory

`GuestMemory` and its friends `VolatileMemory`, `VolatileSlice`,
`MemoryMapping`, and `SharedMemory`, are common types used throughout crosvm to
interact with guest memory. Know which one to use in what place using some
guidelines

-   `GuestMemory` is for sending around references to all of the guest memory.
    It can be cloned freely, but the underlying guest memory is always the same.
    Internally, it's implemented using `MemoryMapping` and `SharedMemory`. Note
    that `GuestMemory` is mapped into the host address space, but it is
    non-contiguous. Device memory, such as mapped DMA-Bufs, are not present in
    `GuestMemory`.
-   `SharedMemory` wraps a `memfd` and can be mapped using `MemoryMapping` to
    access its data. `SharedMemory` can't be cloned.
-   `VolatileMemory` is a trait that exposes generic access to non-contiguous
    memory. `GuestMemory` implements this trait. Use this trait for functions
    that operate on a memory space but don't necessarily need it to be guest
    memory.
-   `VolatileSlice` is analogous to a Rust slice, but unlike those, a
    `VolatileSlice` has data that changes asynchronously by all those that
    reference it. Exclusive mutability and data synchronization are not
    available when it comes to a `VolatileSlice`. This type is useful for
    functions that operate on contiguous shared memory, such as a single entry
    from a scatter gather table, or for safe wrappers around functions which
    operate on pointers, such as a `read` or `write` syscall.
-   `MemoryMapping` is a safe wrapper around anonymous and file
    mappings. Provides RAII and does munmap after use. Access via Rust
    references is forbidden, but indirect reading and writing is available via
    `VolatileSlice` and several convenience functions. This type is most useful
    for mapping memory unrelated to `GuestMemory`.

### Device Model

### `Bus`/`BusDevice`

The root of the crosvm device model is the `Bus` structure and its friend the
`BusDevice` trait. The `Bus` structure is a virtual computer bus used to emulate
the memory-mapped I/O bus and also I/O ports for x86 VMs. On a read or write to
an address on a VM's bus, the corresponding `Bus` object is queried for a
`BusDevice` that occupies that address. `Bus` will then forward the read/write
to the `BusDevice`. Because of this behavior, only one `BusDevice` may exist at
any given address. However, a `BusDevice` may be placed at more than one address
range. Depending on how a `BusDevice` was inserted into the `Bus`, the forwarded
read/write will be relative to 0 or to the start of the address range that the
`BusDevice` occupies (which would be ambiguous if the `BusDevice` occupied more
than one range).

Only the base address of a multi-byte read/write is used to search for a device,
so a device implementation should be aware that the last address of a single
read/write may be outside its address range. For example, if a `BusDevice` was
inserted at base address 0x1000 with a length of 0x40, a 4-byte read by a VCPU
at 0x39 would be forwarded to that `BusDevice`.

Each `BusDevice` is reference counted and wrapped in a mutex, so implementations
of `BusDevice` need not worry about synchronizing their access across multiple
VCPUs and threads. Each VCPU will get a complete copy of the `Bus`, so there is
no contention for querying the `Bus` about an address. Once the `BusDevice` is
found, the `Bus` will acquire an exclusive lock to the device and forward the
VCPU's read/write. The implementation of the `BusDevice` will block execution of
the VCPU that invoked it, as well as any other VCPU attempting access, until it
returns from its method.

Most devices in crosvm do not implement `BusDevice` directly, but some are
examples are `i8042` and `Serial`. With the exception of PCI devices, all
devices are inserted by architecture specific code (which may call into the
architecture-neutral `arch` crate). A `BusDevice` can be proxied to a sandboxed
process using `ProxyDevice`, which will create the second process using a fork,
with no exec.

### `PciConfigIo`/`PciConfigMmio`

In order to use the more complex PCI bus, there are a couple adapters that
implement `BusDevice` and call into a `PciRoot` with higher level calls to
`config_space_read`/`config_space_write`. The `PciConfigMmio` is a `BusDevice`
for insertion into the MMIO `Bus` for ARM devices. For x86_64, `PciConfigIo` is
inserted into the I/O port `Bus`. There is only one implementation of `PciRoot`
that is used by either of the `PciConfig*` structures. Because these devices are
very simple, they have very little code or state. They aren't sandboxed and are
run as part of the main process.

### `PciRoot`/`PciDevice`/`VirtioPciDevice`

The `PciRoot`, analogous to `BusDevice` for `Bus`s, contains all the `PciDevice`
trait objects. Because of a shortcut (or hack), the `ProxyDevice` only supports
jailing `BusDevice` traits. Therefore, `PciRoot` only contains `BusDevice`s,
even though they also implement `PciDevice`. In fact, every `PciDevice` also
implements `BusDevice` because of a blanket implementation (`impl<T: PciDevice>
BusDevice for T { … }`). There are a few PCI related methods in `BusDevice` to
allow the `PciRoot` to still communicate with the underlying `PciDevice` (yes,
this abstraction is very leaky). Most devices will not implement `PciDevice`
directly, instead using the `VirtioPciDevice` implementation for virtio devices,
but the xHCI (USB) controller is an example that implements `PciDevice`
directly. The `VirtioPciDevice` is an implementation of `PciDevice` that wraps a
`VirtioDevice`, which is how the virtio specified PCI transport is adapted to a
transport agnostic `VirtioDevice` implementation.

### `VirtioDevice`

The `VirtioDevice` is the most widely implemented trait among the device traits.
Each of the different virtio devices (block, rng, net, etc.) implement this
trait directly and they follow a similar pattern. Most of the trait methods are
easily filled in with basic information about the specific device, but
`activate` will be the heart of the implementation. It's called by the virtio
transport after the guest's driver has indicated the device has been configured
and is ready to run. The virtio device implementation will receive the run time
related resources (`GuestMemory`, `Interrupt`, etc.) for processing virtio
queues and associated interrupts via the arguments to `activate`, but `activate`
can't spend its time actually processing the queues. A VCPU will be blocked as
long as `activate` is running. Every device uses `activate` to launch a worker
thread that takes ownership of run time resources to do the actual processing.
There is some subtlety in dealing with virtio queues, so the smart thing to do
is copy a simpler device and adapt it, such as the rng device (`rng.rs`).

## Communication Framework

Because of the multi-process nature of crosvm, communication is done over
several IPC primitives. The common ones are shared memory pages, unix sockets,
anonymous pipes, and various other file descriptor variants (DMA-buf, eventfd,
etc.). Standard methods (`read`/`write`) of using these primitives may be used,
but crosvm has developed some helpers which should be used where applicable.

### `PollContext`/`EpollContext`

Most threads in crosvm will have a wait loop using a `PollContext`, which is a
wrapper around Linux's `epoll` primitive for selecting over file descriptors.
`EpollContext` is very similar but has slightly fewer features, but is usable by
multiple threads at once. In either case, each FD is added to the context along
with an associated token, whose type is the type parameter of `PollContext`.
This token must be convertible to and from a `u64`, which is a limitation
imposed by how `epoll` works. There is a custom derive `#[derive(PollToken)]`
which can be applied to an `enum` declaration that makes it easy to use your own
enum in a `PollContext`.

Note that the limitations of `PollContext` are the same as the limitations of
`epoll`. The same FD can not be inserted more than once, and the FD will be
automatically removed if the process runs out of references to that FD. A
`dup`/`fork` call will increment that reference count, so closing the original
FD will not actually remove it from the `PollContext`. It is possible to receive
tokens from `PollContext` for an FD that was closed because of a race condition
in which an event was registered in the background before the `close` happened.
Best practice is to remove an FD before closing it so that events associated
with it can be reliably eliminated.

### `serde` with Descriptors.

Using raw sockets and pipes to communicate is very inconvenient for rich data
types. To help make this easier and less error prone, crosvm uses the `serde`
crate. To allow transmitting types with embedded descriptors (FDs on Linux or
HANDLEs on Windows), a module is provided for sending and receiving descriptors
alongside the plain old bytes that serde consumes.

[minijail]: https://android.googlesource.com/platform/external/minijail

## Code Map

Source code is organized into crates, each with their own unit tests.

-   `./src/` - The top-level binary front-end for using crosvm.
-   `aarch64` - Support code specific to 64 bit ARM architectures.
-   `base` - Safe wrappers for small system facilities which provides
    cross-platform-compatible interfaces. For Linux, this is basically a thin
    wrapper of `sys_util`.
-   `bin` - Scripts for code health such as wrappers of `rustfmt` and `clippy`.
-   `ci` - Scripts for continuous integration.
-   `cros_async` - Runtime for async/await programming. This crate provides a
    `Future` executor based on `io_uring` and one based on `epoll`.
-   `devices` - Virtual devices exposed to the guest OS.
-   `disk` - Library to create and manipulate several types of disks such as raw
    disk, [qcow], etc.
-   `hypervisor` - Abstract layer to interact with hypervisors. For Linux, this
    crate is a wrapper of `kvm`.
-   `integration_tests` - End-to-end tests that run a crosvm VM.
-   `kernel_loader` - Loads elf64 kernel files to a slice of memory.
-   `kvm_sys` - Low-level (mostly) auto-generated structures and constants for
    using KVM.
-   `kvm` - Unsafe, low-level wrapper code for using `kvm_sys`.
-   `libvda` - Safe wrapper of [libvda], a Chrome OS HW-accelerated video
    decoding/encoding library.
-   `net_sys` - Low-level (mostly) auto-generated structures and constants for
    creating TUN/TAP devices.
-   `net_util` - Wrapper for creating TUN/TAP devices.
-   `qcow_util` - A library and a binary to manipulate [qcow] disks.
-   `seccomp` - Contains minijail seccomp policy files for each sandboxed
    device. Because some syscalls vary by architecture, the seccomp policies are
    split by architecture.
-   `sync` - Our version of `std::sync::Mutex` and `std::sync::Condvar`.
-   `sys_util` - Mostly safe wrappers for small system facilities such as
    `eventfd` or `syslog`.
-   `third_party` - Third-party libraries which we are maintaining on the Chrome
    OS tree or the AOSP tree.
-   `vfio_sys` - Low-level (mostly) auto-generated structures, constants and
    ioctls for [VFIO].
-   `vhost` - Wrappers for creating vhost based devices.
-   `virtio_sys` - Low-level (mostly) auto-generated structures and constants
    for interfacing with kernel vhost support.
-   `vm_control` - IPC for the VM.
-   `vm_memory` - Vm-specific memory objects.
-   `x86_64` - Support code specific to 64 bit intel machines.

[qcow]: https://en.wikipedia.org/wiki/Qcow
[libvda]: https://chromium.googlesource.com/chromiumos/platform2/+/refs/heads/main/arc/vm/libvda/
[VFIO]: https://www.kernel.org/doc/html/latest/driver-api/vfio.html

repository: dgreid/crosvm

repo_name: dgreid/crosvm


text:
## About

An implementation of a Django model that returns tickets, as described
by the [Flickr blog post][flickr].

## Installation

I uploaded it to [PyPi][pypi], so you can grab it there if you'd like with

```
pip install django-ticketing
```

or install with pip the git address:

```
pip install git+git@github.com:streeter/django-ticketing.git
```

You're choice. Then add `ticketing` to your `INSTALLED_APPS`.

## Usage

To use this, you can either use the model interface, or just the shortcut
function defined in `ticketing.models`. That usage looks like the following:

```python
# Import the function
from ticketing.models import get_ticket
# Go get yourself a ticket
ticket = get_ticket()
# Boom. That just happened
```

This assumes you've had the single table that needs to be created in the DB,
in other words, run `syncdb` or migrated with [South][south].

### Multiple Sequences

`django-ticketing` also supports multiple sequences, which allows one to have
sequences of tickets that are independent. This means you could have a sequence
for users, a sequence for posts and a sequence for widgets. This is configured
through your Django settings configuration.

Simply define a setting called `TICKETING_SEQUENCES` with a tuple of sequence
names that can be valid table names. This defaults to the tuple `('default',)`.
In addition, you can define the default sequence new tickets are taken from with
the setting `TICKETING_DEFAULT_SEQUENCE`, which defaults to `'default'`.

Note that `TICKETING_DEFAULT_SEQUENCE` must a sequence name that is defined
inside of `TICKETING_SEQUENCES`, otherwise an exception will be raised at
during setup.

So to have sequences for the above example, put the following lines in your
`settings.py`:

``` python
TICKETING_DEFAULT_SEQUENCE = 'users'
TICKETING_SEQUENCES = ('users', 'posts', 'widgets', )
```

Then, to get a ticket from a specific sequence, pass in the sequence name to
`get_ticket()`:

``` python
# Get yourself a user ticket
user_ticket = get_ticket('users')
# Get yourself another user ticket
user_ticket = get_ticket()
# Get yourself a posts ticket
post_ticket = get_ticket('posts')
```

Notice that the default sequence for `get_ticket()` is the value of the
`TICKETING_DEFAULT_SEQUENCE` configuration variable.

Also, after you change the value of `TICKETING_SEQUENCES`, be sure to re-run
`syncdb` to make sure the new tables are created (or whatever DB table creation
you have in your environment).

### Other Configuration Options

`TICKETING_APP_LABEL`: This is used to specify the prefix for all the DB
tablenames. The default value is `'ticketing'`. Be sure you know what you are
doing when you change this.

## Testing

There are some tests included. To run those tests, simply execute `runtests.py`:

``` bash
[streeter] $ python runtests.py
----------------------------------------------------------------------
Ran 6 tests in 0.213s

OK
[streeter] $
```

The test suite can run on all DB backends supported by Django. By default
it runs using sqlite3. To run on MySQL, uncomment the section in `runtests.py`
and then create a DB that Django can connect to, and give the Django user
permissions to create a new testing DB, run the following commands:

``` bash
mysql -u root -e "DROP DATABASE ticketing_test";
mysql -u root -e "CREATE DATABASE ticketing_test";
mysql -u root -e "GRANT ALL ON ticketing_test.* TO 'ticketing_test'@'localhost' IDENTIFIED BY ''"
```

Of course, you may need to change the host of the DB and user that connects, but
you should get the idea.

[flickr]: http://code.flickr.com/blog/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/
[pypi]: http://pypi.python.org/pypi/django-ticketing/
[south]: http://south.aeracode.org/

repository: blueyed/django-ticketing

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: blueyed/django-ticketing


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [@remirror/extension-drop-cursor](./extension-drop-cursor.md) > [DropCursorState](./extension-drop-cursor.dropcursorstate.md) > [drop](./extension-drop-cursor.dropcursorstate.drop.md)

## DropCursorState.drop property

Called when the element is dropped.

? Sometimes this event doesn't fire, is there a way to prevent this.

<b>Signature:</b>

```typescript
drop: () => void;
```

license: MIT

repository: tomas-c/remirror

gha_license_id: MIT

repo_name: tomas-c/remirror


text:
ng-sortable
==============

Angular Library for Drag and Drop, supports Sortable and Draggable. No JQuery UI used. Supports Touch devices.

If you use this module you can give it a thumbs up at [http://ngmodules.org/modules/ng-sortable](http://ngmodules.org/modules/ng-sortable).

#### Release:

Latest release verision 1.1.0

#### Demo Page:

[Demo Site] (http://a5hik.github.io/ng-sortable/)

Demo Includes:

- Drag between adjacent Lists.
- Controll Drag on Specific Destinations.

#### Features:

- Drag both Horizontally and Vertically.
- Drag and Drop items within a column.
- Drag and Drop items across columns.
- Can do Ranking by Sorting and Change Status by Moving.
- Hooks provided to invoke API's after a particular action.
- Preventing/Allowing Drop Zone can be determined at run time.
- Drag Boundary can be defined.

#### Implementation Details:

- Uses angular/native JS for sortable and draggable. no JQueryUI used.
- Provides callbacks for drag/drop events.
- Implementation follows Prototypical scope inheritance.

#### Directives structure:

The directives are structured like below.

    sortable                     --> Items list
      sortable-item              --> Item to sort/drag
        sortable-item-handle     --> Drag Handle

#### Design details:

- ng-model is used to bind the sortable list items with the sortable element.
- sortable can be added to the root element.
- sortable-item can be added in item element, and follows ng-repeat.
- sortable-item-handle can be added to the drag handle in item element.
- All sortable, ng-model, sortable-item and sortable-item-handle are required.
- the no-drag attribute can be added to avoid dragging an element inside item-handle.
- Added a Jquery like 'containment' option to the sortable to prevent the drag outside specified bounds.

#### Callbacks:

Following callbacks are defined, and should be overridden to perform custom logic.

- callbacks.accept = function (sourceItemHandleScope, destSortableScope) {}; //used to determine drag zone is allowed are not.

###### Parameters:
     sourceItemScope - the scope of the item being dragged.
     destScope - the sortable destination scope, the list.

- callbacks.orderChanged = function({type: Object}) // triggered when item order is changed with in the same column.
- callbacks.itemMoved = function({type: Object}) // triggered when an item is moved accross columns.
- callbacks.dragStart = function({type: Object}) // triggered on drag start.
- callbacks.dragEnd = function({type: Object}) // triggered on drag end.

###### Parameters:
    Object (event) - structure
             source:
                  index: original index before move.
                  itemScope: original item scope before move.
                  sortableScope: original sortable list scope.
             dest: index
                  index: index after move.
                  sortableScope: destination sortable scope.

##### Some Notable Fixes:

- Touch is allowed on only one Item at a time. Multiple Finger touch is prevented as like JQueryUI Touch Punch.
- Pressing 'Esc' key will Cancel the Drag Event, and moves back the Item to it's Original location.
- Right Click on mouse is prevented on draggable Item.
- A child element inside a draggable Item can be made as non draggable.

##### Usage:

Get the binaries of ng-sortable with any of the following ways.

```sh
bower install ng-sortable
```
Or for yeoman with bower automatic include:
```
bower install ng-sortable -save
```
Or bower.json
```
{
  "dependencies": [..., "ng-sortable: "latest_version eg - "1.1.0" ", ...],
}
```
Make sure to load the scripts in your html.
```html
<script type="text/javascript" src="dist/ng-sortable.min.js"></script>
    <link rel="stylesheet" type="text/css" href="dist/ng-sortable.min.css">
```

And Inject the sortable module as dependency.

```
angular.module('xyzApp', ['ui.sortable', '....']);
```

###### Html Structure:

Invoke the Directives using below html structure.

Define your callbacks in the invoking controller.

    $scope.dragControlListeners = function() {
        accept: function (sourceItemHandleScope, destSortableScope) {return boolean}//override to determine drag is allowed or not. default is true.
        itemMoved: function (event) {//Do what you want},
        orderChanged: function(event) {//Do what you want},
        containment: '#board'//optional param.
    };

That's what all you have to do.

###### Restrict Moving between Columns:

Define the accept callback. and the implementation is your choice.
The itemHandleScope(dragged Item) and sortableScope(destination list) is exposed.
Compare the scope Objects there like below., If you have to exactly restrict moving between columns.

    accept: function (sourceItemHandleScope, descSortableScope) {
      return sourceItemHandleScope.itemScope.sortableScope.$id === destSortableScope.$id;
    }

If you want to restrict only to certain columns say you have 5 columns and you want
the drag to be allowed in only 3 columns, then you need to implement your custom logic there.,
and that too becomes straight forward as you have your scope Objects in hand.

And reversing the condition, allows you to Drag accross Columns but not within same Column.

##### Testing:

- Tested on FireFox, IE 9 and Greater, Chrome and Safari.
- Ipad, Iphone and Android devices.

##### Development Environment setup:

Clone the master
    $ git clone https://github.com/a5hik/ng-sortable.git

or Download from [Source Master](https://github.com/a5hik/ng-sortable/archive/master.zip)

##### Installation:

##### Development Dependencies (Grunt and Bower):

Install Grunt and Bower.
    $ sudo npm install -g grunt-cli bower

##### Install Project dependencies:
Run the following commands from the project root directory.

    $ npm install
    $ bower install

##### Commands to run:
    $ grunt build - builds the source and generates the min files in dist.
    $ grunt server - runs a local web server on node.js
    $ grunt test - runs the tests (WIP).
    $ grunt test:continuous - end to end test (WIP).

To access the local server, enter the following URL into your web browser:

    http://localhost:9009/demo/

##### NG Modules Link:

If you use this module you can give it a thumbs up at [http://ngmodules.org/modules/ng-sortable](http://ngmodules.org/modules/ng-sortable).

Let [me](https://github.com/a5hik) know if you have any questions.

For Bug report, and feature request File an Issue here: [issue](https://github.com/a5hik/ng-sortable/issues).

##### License

MIT, see [LICENSE.md](./LICENSE.md).

repository: karamelchef/karamel

gha_language: Java

repo_name: karamelchef/karamel


text:
# Dodge The Log
> Stick hero-inspired HTML5 Canvas, CSS, Vanilla JS game

---

## Table of contents
* [General info](#general-info)
* [Installation](#installation)
* [Technologies](#technologies)
* [License](#license)

---

## General info
* Modern and stylish game
* Bug free [hopefully]
* Infinite gameplay
* Optimized for all browsers

---

## Installation
1. Open HTML file in your web browser

---

## Technologies
* HTML5
* CSS3
* JavaScript ES6

---

## License
[MIT](https://choosealicense.com/licenses/mit/)

repository: NichkeCoder/Bridge-Builder

repo_name: NichkeCoder/Bridge-Builder


text:
# Welcome to Datlizer!
---

>**Datlizer** is a database visualisation tool by which anyone can connect to their database and select data to be visualised.

[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)

## Table of content

- [Introduction](#introduction)
  - [Technologies](#technologies)
- [Setup](#setup-instructions)
  - [Backend](#backend)
  - [Frontend](#frontend)
- [Contributions](#contributions)
- [License](#license)

## Introduction
---
[(Back to top)](#list-of-contents)

**Datlizer** is a database visualisation tool by which anyone can connect to their database and select data to be visualised and we will provide you with different types of visualisation which can obtained from your data. We even have included Machine Learning which can be used to predict future results or classify the current state of the data and much more.

### Technologies:
- `Python 3.6`
- `django`

## Setup instructions
---
[(Back to top)](#list-of-contents)

## Backend
NOTE : make sure you have postgres installed in your system and enter your database details in env file.
* run `git clone https://github.com/Datlizer/Backend.git`
*  open the cloned folder in terminal
*  `virtualenv venv`
*  `source venv/bin/activate `
*  `pip install -r requirements `
* `python manage.py migrate `
*  `python manage.py runserver localhost:8001`

## Frontend
 * run `git clone https://github.com/Datlizer/Frontend.git`
 * open the cloned folder in terminal
 *  `yarn install`
 *  `yarn start`
 *  Open http://localhost:3000 in your browser

## Contributions
---
Everyone is open to make any type of contributions to this project. If you find any bugs or need any features to be added you are free to create an issue and if you are able to solve the issue we'll be happy else we will be solving it.

## License
---
[(Back to top)](#list-of-contents)

The code in this project is licensed under the MIT License 2018.

repository: NJACKWinterOfCode/Backend

gha_language: Python

repo_name: NJACKWinterOfCode/Backend


text:
single_user_rvm
===============

Install and manage [RVM](https://rvm.io/) and Ruby installations in [Single-User](https://rvm.io/rvm/install#explained)
mode.

Install RVM
-----------

    single_user_rvm::install { 'username': }

More info in [install.pp](manifests/install.pp)

The user should exists on the system, but is not managed by this module.

Install a couple of Rubies
--------------------------

    single_user_rvm::install_ruby { 'ruby-1.9.3-p392': user => 'username' }
    single_user_rvm::install_ruby { 'ruby-2.0.0-p247': user => 'username' }

More info in [install_ruby.pp](manifests/install_ruby.pp)

License
-------

Apache License, Version 2.0

Contact
-------

Eric Cohen<EMAIL_ADDRESS>
Support
-------

Please log tickets and issues at our [Github issues page](https://github.com/eirc/puppet-single_user_rvm/issues)

gha_language: Ruby


text:
<!-- README.md is generated from README.Rmd. Please edit that file -->
aurelius
========

[![Build Status](https://travis-ci.org/opendatagroup/hadrian.svg?branch=master)](https://travis-ci.org/opendatagroup/hadrian) [![Coverage Status](https://img.shields.io/codecov/c/github/opendatagroup/hadrian/master.svg)](https://codecov.io/github/opendatagroup/hadrian?branch=master)

**aurelius** is a toolkit for translating models and analytics from the R programming language into the Portal Format for Analytics (PFA). There are functions for importing, exporting and converting common R classes of models into PFA. There are also functions for converting variable assignment, control structures, and other elements of the R syntax into PFA.

Getting Started
---------------

### Install and Load aurelius Library

``` r
devtools::install_github('opendatagroup/hadrian', subdir='aurelius')
library("aurelius")
```

### Build a Model and Save as PFA

The main purpose of the package is to create PFA documents based on logic created in R. This example shows how to build a simple linear regression model and save as PFA. PFA is a plain-text JSON format.

``` r
# build a model
lm_model <- lm(mpg ~ hp, data = mtcars)

# convert the lm object to a list of lists PFA representation
lm_model_as_pfa <- pfa(lm_model)
```

The model can be saved as PFA JSON and used in other systems.

``` r
# save as plain-text JSON
write_pfa(lm_model_as_pfa, file = "my-model.pfa")
```

Just as models can be written as a PFA file, they can be read.

``` r
my_model <- read_pfa("my-model.pfa")
```

Supported Models
----------------

The `pfa()` function in this package supports direct conversion to PFA for objects created by the following functions:

| Model                                            | Function                             | Prediction                           | Libraries           |
|:-------------------------------------------------|:-------------------------------------|:-------------------------------------|:--------------------|
| Autoregressive Integrated Moving Average (ARIMA) | `arima()`, `Arima()`, `auto.arima()` | Time Series                          | `stats`, `forecast` |
| Classification and Regression Trees (CART)       | `rpart()`                            | Classification, Regression, Survival | `rpart`             |
| Exponential Smoothing State Space                | `ets()`, `ses()`, `hw()`, `holt()`   | Time Series                          | `forecast`          |
| Generalized Boosted Regression Models            | `gbm()`                              | Classification, Regression, Survival | `gbm`               |
| Generalized Linear Model                         | `glm()`                              | Classification, Regression           | `stats`             |
| Holt-Winters Filtering                           | `HoltWinters()`                      | Time Series                          | `stats`, `forecast` |
| K-Centroids Clustering                           | `kcca()`                             | Clustering                           | `flexclust`         |
| K-Means Clustering                               | `kmeans()`                           | Clustering                           | `stats`             |
| k-Nearest Neighbour                              | `knn3()`, `knnreg()`, `ipredknn()`   | Classification, Regression           | `caret`, `ipred`    |
| Linear Discriminant Analysis                     | `lda()`                              | Classification                       | `MASS`              |
| Linear Model                                     | `lm()`                               | Regression                           | `stats`             |
| Naive Bayes Classifier                           | `naiveBayes()`                       | Classification                       | `e1071`             |
| Random Forest                                    | `randomForest()`                     | Classification, Regression           | `randomForest`      |
| Regularized Generalized Linear Models            | `glmnet()`, `cv.glmnet()`            | Classification, Regression, Survival | `glmnet`            |

License
-------

The **aurelius** package is licensed under the [Apache License 2.0](http://choosealicense.com/licenses/apache-2.0/).

repository: mafpimentel/hadrian

repo_name: mafpimentel/hadrian


text:
# AI for Medicine
[AI for Medicine](https://www.coursera.org/specializations/ai-for-medicine) is a specialization created by the [deeplearning.ai](https://www.deeplearning.ai/)  team. The specialization has 3 courses: [AI for Medical Diagnosis](https://www.coursera.org/learn/ai-for-medical-diagnosis), [AI for Medical Prognosis](https://www.coursera.org/learn/ai-for-medical-prognosis),  and [AI for Medical Treatment](https://www.coursera.org/learn/ai-for-medical-treatment) focus on practical experience in applying machine learning to concrete problems in medicine.

## [AI for Medical Diagnosis](https://www.coursera.org/learn/ai-for-medical-diagnosis)
* Week 1
  * Chest X-Ray Medical Diagnosis with Deep Learning
* Week 2
  * Evaluation of Diagnostic Models
* Week 3
  * Brain Tumor Auto-Segmentation for Magnetic Resonance Imaging (MRI)
## [AI for Medical Prognosis](https://www.coursera.org/learn/ai-for-medical-prognosis)
* Week 1
  * Build and Evaluate a Linear Risk model
* Week 2
  * Risk Models Using Tree-based Models
* Week 3
  * Survival Estimates that Vary with Time
* Week 4
  * Cox Proportional Hazards and Random Survival Forests
## [AI for Medical Treatment](https://www.coursera.org/learn/ai-for-medical-treatment)
* Week 1
  * Estimating Treatment Effect Using Machine Learning
* Week 2
  * Natural Language Entity Extraction
* Week 3
  * Model Interpretation Methods

repository: theminegreiros/AI-For-Medicine

branch_name: refs/heads/main

repo_name: theminegreiros/AI-For-Medicine


text:
#### Based heavily on work done by [Anthony N](https://github.com/neoterix/nyc-mta-arrival-notify)

This script is a work in progress.

# MTA Notifications

This is a python library/script which takes an MTA API key, a train, and a station as input, and will return the arrival times for
said platform.

This comes from the MTA GTFS-realtime data, which is not always super accurate. Still figuring out how
to interpret vehicle updates as well as trip updates.

> TODO
short examples of script output

repository: sneecat/mtaNotify

repo_name: sneecat/mtaNotify


text:
## pg-entity tutorial

In this tutorial, you will learn the

### Setting up our data-types
First, import the following modules:

```haskell
import Data.Time (UTCTime)
import Data.UUID (UUID)
import Database.PostgreSQL.Entity (insert)
import Database.PostgreSQL.Simple.FromField (FromField)
import Database.PostgreSQL.Simple.FromRow (FromRow)
import Database.PostgreSQL.Simple.ToField (ToField)
import Database.PostgreSQL.Simple.ToRow (ToRow)
import Database.PostgreSQL.Transact (DBT)
```

And let's write down our initial data models for a blog. `Author`, and `BlogPost`.

```haskell
newtype AuthorId
  = AuthorId { getAuthorId :: UUID }
  deriving newtype (Eq, Show, FromField, ToField)

data Author
  = Author { authorId  :: AuthorId
           , name      :: Text
           , createdAt :: UTCTime
           }
  deriving stock (Eq, Generic, Show)
  deriving anyclass (FromRow, ToRow)
```

and

```haskell
newtype BlogPostId
  = BlogPostId { getBlogPostId :: UUID }
  deriving newtype (Eq, FromField, Show, ToField)

data BlogPost
  = BlogPost { -- | Primary key
               blogPostId :: BlogPostId
               -- | Foreign key
             , authorId   :: AuthorId
             , title      :: Text
             , content    :: Text
             , createdAt  :: UTCTime
             }
  deriving stock (Eq, Generic, Show)
  deriving anyclass (FromRow, ToRow)
```

Thankfully, the instances for `FromRow` and `ToRow` were easy enough that they could be automatically derived.
Let us write the `Entity` instances now:

```Haskell
instance Entity Author where
tableName  = "authors"
primaryKey = "author_id"
fields     = [ "author_id"
             , "name"
             , "created_at"
             ]
```

The above instance declaration reads as:
> My table's name is _authors_, its primary key is _author\_id_, and the fields are _author_id_, _name_, and _created_at_.

The order matters for the declarations, so make sure that each field is at the correct position.

Let's do the same for `BlogPost`:

```Haskell
instance Entity BlogPost where
  tableName  = "blogposts"
  primaryKey = "blogpost_id"
  fields = [ "blogpost_id"
           , "author_id"
           , "title"
           , "content"
           , "created_at"
           ]
```

And these instances will give you access to the Entity functions to query your tables.

### Using Generics

But all these manual instances are a tad tedious. Fortunately, there is a derivation mechanism available that allows you
to skip the manual parts that can be infered. This mechanism, called `DerivingVia`, allows you to use a wrapper, called
`GenericEntity`, and a list of options at the type-level, to specify the desired instance.

```haskell

data Author
  = Author { authorId  :: AuthorId
           , name      :: Text
           , createdAt :: UTCTime
           }
  deriving stock (Eq, Generic, Show)
  deriving anyclass (FromRow, ToRow)
  deriving (Entity)
    via (GenericEntity '[ TableName "authors"
                        , PrimaryKey "author_id"
                        ] Author)
```

Those two options, `TableName` and `PrimaryKey` are optional, and the library will adopt the following defaults:

* `tableName` will be the snake\_case version of the record's name. No pluralisation will be done.
* `primaryKey` will be the snake\_case version of the first field of the record.
* `field` names will be the snake\_case version of the record fields.

### Writing the SQL migrations

In a separate file, we will translate our Haskell data models into SQL migrations.

```sql
create table authors (
    author_id uuid primary key,
    name text not null,
    created_at timestamptz not null
    );

create table blogposts (
    blogpost_id uuid primary key,
    author_id uuid not null,
    title text not null,
    content text not null,
    created_at timestamptz not null,
    constraint fk_author
      foreign key(author_id)
        references authors(author_id)
    );
```

### Making queries

By implementing the `Entity` Typeclass, your data-type has access to a variety of functions, combinators and helpers that serve the one true purpose of
this library:

> Provide a safe mechanism to expand the fields of a table while writing a query.

Let us define our insertion function for the Author model:

```haskell
insertAuthor :: Author -> DBT IO ()
insertAuthor = insert
```

<!--
TODO: Link to runDB in Hackage when the library is published
-->
The result of this function, which is called a “DBT action”, is then passed to `Database.PostgreSQL.Entity.DBT.runDB`

```haskell
runDB :: (MonadCatch m, MonadBaseControl IO m)
      => ConnectionPool         -- The connection pool,
                                -- ideally taken from an environment ReaderT
      -> DBT m a                -- The DB action, like `insert`
      -> m (Either DBError a)   -- The return value
```

You can then build a higher-level API endpoint or route controller like that:

```haskell
addAuthor :: ConnectionPool -> AuthorInfo -> IO ()
addAuthor pool info = do
  newAuthor <- mkAuthor info -- This functions is left to you
  result <- runDB pool $ insertAuthor newAuthor
  case result of
    Left err -> error "Could not insert author! Error " <> show err
    Right _ -> putTextLn "Author " <> (name newAuthor) <> " added!"
```

And if you want to later select an `Author` based on its `AuthorId`:

```haskell
getAuthor :: ConnectionPool -> AuthorId -> IO (Either DBError Author)
getAuthor pool authorId = runDB pool $ selectOneById (Only authorId)
```

This is the end of this tutorial. There are many more functions to discover that will help you write your queries.
While you shouldn't have to explore the source code to gain understanding of how to use the library, feel free to
navigate it to see how the underlying mechanisms work. :)

repository: silky/pg-entity

repo_name: silky/pg-entity


text:
# HelloFlexi

To run the application

* Clone it to your local machine and cd into the directory
* Run `bundle install`
* In `config/` update the filename of `database.yml.example` to `database.yml`
* Update the filename of `example.env` to `.yml` at the root of the application
* Run `bundle exec rake db:create`
* Run `bundle exec rake db:setup`
* Run `rails s`

For deploying to Heroku with Stripe
* `heroku create`
* `heroku config:set PUBLISHABLE_KEY=<pk_test_your_publishable_key> SECRET_KEY=<sk_test_your_publishable_key>`
* `git push heroku master`
* `heroku open`

For testing stripe payments
* Use these credit cards in test mode: [Credit Card Samples](https://stripe.com/docs/testing#cards)

### TODO items

* Implement find or create method for rake file
* Implement full integration for the Stripe coupon management system: https://stripe.com/docs/api/ruby#create_coupon
* Devise integration: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
* Implement sign in for the user into the MB API

repository: tgrrr/helloflexi

repo_name: tgrrr/helloflexi


text:
---
layout: default
---

# 1996-09-20 - ** 9/24 Ca. Dig. Sig. Working Group Meeting **

## Header Data

From: Kaye Caldwell<EMAIL_ADDRESS>(by way of<EMAIL_ADDRESS>(BillFrantz))

To<EMAIL_ADDRESS>Message Hash: dde7b7db86b00e0605e1482795386b440e35f6f77a00b633a7b477f8d40f678a

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-09-20 07:47:30 UTC

Raw Date: Fri, 20 Sep 1996 15:47:30 +0800

## Raw message

```
{% raw  %}From: Kaye Caldwell<EMAIL_ADDRESS>(by way of<EMAIL_ADDRESS>(BillFrantz))
Date: Fri, 20 Sep 1996 15:47:30 +0800
To<EMAIL_ADDRESS>Subject: ** 9/24 Ca. Dig. Sig. Working Group Meeting **
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Reposted from spki.  -  Bill

--------
Apologies for duplicates - some of you I'm sure are on multiple notice lists
for this.

California Digital Signature Regulations Working Group
sponsored by the Software Industry Coalition and CommerceNet

THIS MEETING IS OPEN TO ANYONE WHO WISHES TO ATTEND
However, please let me know if you will be attending via e-mail to:
<EMAIL_ADDRESS>
WHEN: Tuesday September 24, 1-4 PM
WHERE: Sun Microsystems, 901 San Antonio Rd, (Building PAL-1)
              (corner of  S. A. & Charleston, just off 101), Palo Alto
              Cancun Conference Room, 2nd Floor

AGENDA

I. Report on status of Secretary of State's Task Force
     - request for demos of technology in Sacramento
II. Review of draft of our principle 1, suggestions for additional principles
III. Review of current draft of outline of regulations
IV. Review of draft Digital Signature Acceptance Procedures background paper
V. Draft language for additional technologies

For more information, e-mail Kaye Caldwell at<EMAIL_ADDRESS>or call
408-479-8743.

Kaye Caldwell
Software Industry Coalition Policy Director
CommerceNet Adovocacy and Public Policy Committee Chair
-------------------------------

{% endraw %}
```

## Thread

+ Return to [September 1996](/archive/1996/09)

+ Return to "[Kaye Caldwell<EMAIL_ADDRESS>(by way of<EMAIL_ADDRESS>(BillFrantz))](/authors/kaye_caldwell_kaye_at_ix_netcom_com_by_way_of_frantz_at_netcom_com_billfrantz_)"

+ 1996-09-20 (Fri, 20 Sep 1996 15:47:30 +0800) - ** 9/24 Ca. Dig. Sig. Working Group Meeting ** - _Kaye Caldwell<EMAIL_ADDRESS>(by way of<EMAIL_ADDRESS>(BillFrantz))_


text:
# gridtext 0.1.5

- Transition to curl package and drop RCurl dependency
- Fix fontface not being processed and words spaced properly in R 4.2.0
- Maintainer changes to Brenton Wiernik
- Removed LazyData from package DESCRIPTION to fix CRAN NOTE

# gridtext 0.1.4

- Make sure tests don't fail if vdiffr is missing.

# gridtext 0.1.3

- Remove unneeded systemfonts dependency.

# gridtext 0.1.2

- Fix build for testthat 3.0.

# gridtext 0.1.1

- `richtext_grob()` and `textbox_grob()` now gracefully handle empty strings
  and NAs.

# gridtext 0.1.0

First public release. Provides the two grobs `richtext_grob()` and `textbox_grob()` for formatted text rendering without and with word wrapping, respectively.

repository: wilkelab/gridtext

gha_language: R

gha_license_id: NOASSERTION

repo_name: wilkelab/gridtext


text:
# Effective-Python-Penetration-Testing
By Packt Publishing

This is the code repository for [Effective Python Penetration Testing](https://www.packtpub.com/networking-and-servers/effective-python-penetration-testing?utm_source=github&utm_medium=repository), published by [Packt Publishing](https://www.packtpub.com/). It contains all the required files to run the code.

This book is ideal for those who are comfortable with Python or a similar language and need no help with basic programming concepts but want to understand the basics of penetration testing and the problems pentesters face.

Related Books

*[Advanced Penetration Testing for Highly-Secured Environments: The Ultimate Security Guide](https://www.packtpub.com/networking-and-servers/advanced-penetration-testing-highly-secured-environments-ultimate-security-gu?utm_source=GitHub&utm_medium=repo&utm_campaign=9781849517744)

*[Python Testing: Beginner's Guide](https://www.packtpub.com/application-development/python-testing-beginners-guide?utm_source=GitHub&utm_medium=repo&utm_campaign=9781847198846)

*[Python Web Penetration Testing Cookbook](https://www.packtpub.com/networking-and-servers/python-web-penetration-testing-cookbook?utm_source=GitHub&utm_medium=repo&utm_campaign=9781784392932)
### Download a free PDF

 If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

 https://packt.link/free-ebook/9781785280696


text:
# Step 2: Create new RedHat OpenShift Cluster

![Overview](images/overview02.jpg "Overview")

1. Access **https://cloud.ibm.com** with your IBM ID

2. Select the account under which to create the new RedHat OpenShift Cluster

3. In the top-left corner, click on the **Navigation Menu** icon

   ![Navigation Menu](images/navigationMenu.jpg "Navigation Menu")

4. In the Navigation Menu select **OpenShift -> Clusters**

   ![Clusters](images/requestNewRoksCluster01.jpg "Clusters")

5. Click **Create cluster**

6. Select the appropriate **OpenShift Version**, e.g. 4.6.28 (IBM Automation Elite SWAT team tested with version 4.6.x)

7. As OCP entitlement, select **Apply my Cloud Pak OCP entitlement to this worker pool** (as this will reduce the costs for the cluster)

   ![OpenShift Version and entitlement](images/requestNewRoksCluster02.jpg "OpenShift Version and entitlement")

8. Select the **Infrastructure**, e.g., Classic

9. Select the **Geography** where you want to run your cluster, e.g., Europe

10. Set the **Availabilty** to **Single zone** (Multizone is only required for disaster recovery)

11. Select the **Worker zone** (datacenter) where the cluster should be created, e.g., Frankfurt 04

    ![Location](images/requestNewRoksCluster03.jpg "Location")

12. Select the **worker pool flavor**, the **amount of workers** needed and deselect **Encrypt local disk**

    - Select a worker pool flavor that fulfills the OCP Cluster sizing requirements of the previously selected CP4BA template (see **[Step 0: Select the CP4BA template for deployment](00selectTemplate.md)**)
    - Select the amount of workers that fulfills the OCP Cluster sizing requirements of the previously selected CP4BA template. If you plan to scale up the deployment (deploy with a pod replica size of 2 or 3 for High Availabilty) more workers/resources are needed. Optionally you can start with a replica size of 1 first and then scale up when needed - first add more workers and then increase the pod replica size, see also **[Step 9: Optional: Scale up the deployment](09scaleUp.md)**
    - Local disk encryption is not needed as we only work with sample / test data

    **Notes:** To save costs, you also can select Virtual - shared nodes, this is sufficient for running the Client Onboarding Demo with one or only a few users in parallel for demo purposes. Same is true for the amount of workers, when you plan to run the Demo only with one user, usually no HA is needed. If you plan to use this OpenShift cluster for higher workloads / multiple users, means you require High Availability and better/best performance, you might want to select Virtual - dedicated or even Bare metal machines and also select an higher amount of workers / a flavor that gives you more resources per worker.

    ![Select flavor](images/requestNewRoksCluster04.jpg "Select flavor")

    ![Select amount of workers](images/requestNewRoksCluster05.jpg "Select amount of workers")

13. Make sure the permissions checker reports no errors and provide the **Cluster name**

    ![Cluster name](images/requestNewRoksCluster06.jpg "Cluster name")

14. Review the Summary on the right hand side and click **Create**

15. Monitor the creation of your new ROKS cluster, it usually will take up to one hour to fully provision it (if you selected Bare metal, it also can take longer, dependant on the HW availability in the selected data center)

16. As you by default will be running DB2 containerized on the OpenShift cluster, you need one worker node with more memory - once the first worker nodes are up and running, navigate to your cluster, in the Navigation Menu select **OpenShift -> Clusters**

    ![Clusters](images/requestNewRoksCluster07.jpg "Clusters")

17. Select the cluster, e.g., tech-jam-emea, and open the **Worker pools**

    ![Worker pools](images/requestNewRoksCluster08.jpg "Worker pools")

18. Click **Add**

19. Provide the **Worker pool name**, e.g., db2worker, and select the same **Worker zone** as selected before, e.g., Frankfurt 04

    ![Worker pool name and zone](images/requestNewRoksCluster09.jpg "Worker pool name and zone")

20. Select a **woker pool flavor** that provides you the amount of memory needed for DB2 according to the selected CP4BA template

    ![Worker pool flavor for DB2](images/requestNewRoksCluster10.jpg "Worker pool flavor for DB2")

21. Set the **amount of workers** to **1**, deselect **Encrypt local disk**, select **Apply my Cloud Pak OCP entitlement to this worker pool** and make sure the permissions checker reports no errors

    ![Worker amount](images/requestNewRoksCluster11.jpg "Worker amount")

22. Review the Summary on the right hand side and click **Create**

23. Monitor the creation of your additional worker

## What to do next

Once the ROKS cluster is created, you can proceed with the next step: **[Step 3: Create new VM for LDAP & install IBM SDS & import ldif file with users and groups](03createVMForLDAP.md)**

**[Here](Readme.md)** you can get back to the overview page

Issues or questions? IBMers can use this IBM internal Slack channel: **#dba-swat-asset-qna** (**https://ibm-cloud.slack.com/archives/C026TD1SGCA**)

Everyone else can open a new issue in this github.


text:
## Build Configuration
* X64 + IL2CPP + .NET4
## Dependencies
* [ValveSoftware/GameNetworkingSockets-1.0.0](https://github.com/ValveSoftware/GameNetworkingSockets/releases)
  * prebuilt (64bit/release) dll included in the plugin folder.
  * follow this [guide](https://github.com/ValveSoftware/GameNetworkingSockets/blob/master/BUILDING.md) to build it yourself. good luck and have fun if you're on windows ( ͡° ͜ʖ ͡°)
* [nxrighthere/ValveSockets-CSharp](https://github.com/nxrighthere/ValveSockets-CSharp)
  * this guy is cool, check him out.


text:
# Power-Boy
2D shooter-platformer with an endlessly generating world

![image](screenshot100.png?raw=true)
![image](screenshot101.png?raw=true)

# Goal of the Game
Score as many points as possible by destroying enemies

# Control
* WASD - Moving
* Left Mouse Button - Shot
* 1 - Pistol
* 2 - Shotgun
* 3 - Automatic Gun
* 4 - Flamethrower
* F1 - Help
* F4 - Switch Fullscreen / Windowed mode
* F9 - Screenshot (saved next to the game file)
* ESC - Exit from Help / Exit from game


text:
---
layout: post
title: "Powershell: Operational Validation Framework"
date: 2016-10-25
tags: [PowerShell,Pester,DSC,Modules,Operational Validation]
---

If you know me, then you know I have been a fan of [Pester](https://github.com/pester/Pester/wiki) for a long time. I found it to be a great tool and found novel uses for it. I put together a talk on [Pester in Action](https://github.com/KevinMarquette/PesterInAction) a year ago to show how I used it in my environment. The big thing I wanted to get across to people was that it was amazing at verifying system configuration and validating a system before you release it. I have seen a lot of community efforts along these same lines in the last year. One of these tools deserves a closer look.<!--more-->

## The [Operational Validation Framework](https://github.com/PowerShell/Operation-Validation-Framework)

It took me a long time to wrap my head around this project at first. I'll admit that I looked at it a few times without really seeing the value of it. At face value, all I saw was a few commands that would find Pester tests and run them. `Invoke-Pester` already does that if you execute it from the root of your tests folder. I went and did my own thing without digging into it.

Recently, I saw a post about [Continuously Testing your Infrastructure with OVF and Microsoft Operations Management Suite](https://dscottraynsford.wordpress.com/2016/10/23/continuously-testing-your-infrastructure-with-ovf-and-microsoft-operations-management-suite/) that did a very nice walk-through using OVF. I was able to see it in action and that was a good thing.

## The Operational Validation Framework explained

This is a very light framework that executes Pester tests that are intended to validate the system. You package your tests into modules for OVF to find them. OVF allows for simple and comprehensive diagnostic tests. You can package both types into the same module. This feels like a good standard that you will see many in the community use for managing operational validation.

Ideally you could run the simple tests on a schedule and feed that into your alerting system. Then save the diagnostic tests for troubleshooting. This is the approach that the post above was highlighting.

Other things to mention before I move on is that OVF produces output that is easier to consume by other systems (but the Pester output is still there if you want it). It also has functions to enumerate all the tests without having to run them.

## Put my tests in a module?

This is where the OVF starts to show its hidden potential. Powershell now has a module based packaged management system that is very easy to set up and use. I want to build on the example in [this post](https://dscottraynsford.wordpress.com/2016/10/23/continuously-testing-your-infrastructure-with-ovf-and-microsoft-operations-management-suite/) that creates a `ValidateDNS` module. I now want to distribute that module (and others).

I need to ceate a repository and publish my `ValidateDNS` module to it.

    $path = '\\server\share\PSRepository'
    $repository = @{
        Name               = 'MyModules'
        SourceLocation     = $path
        PublishLocation    = $path
        InstallationPolicy = 'Trusted'
    }
    Register-PSRepository @repository

    Publish-Module -Name validateDNS -Repository MyModules

You never knew it was that easy to create your own repository and publish a module did you. I know I was surprised the first time I discovered that. You will also need to run the `Register-PSRepository` command on your target system. Once you have that, Install the module.

    Install-Module -Name ValidateDNS -Repository MyModules

Now you have a very easy way to distribute your tests to your systems. As an added bonus, this makes it very easy to update a central location and update those tests on your servers.

## What about DSC?

The comparison to DSC often comes up when talking about using Pester for operational validation. DSC already tests all the settings that get configured, right? First, it is good to have something other than the configuration system validating what it is configuring. But there is a bigger point to make here.

DSC tests and validates that things are configured like you expect. But it does not really do a good job of checking the state of the system. Is IIS accepting connections on port 80? Does the system disk have 20% free space? Are these specific errors in the eventlog? Are any of the certs expired? Can I reach the database server? Pester can step in to go the last mile and let DSC do what it does best.

## Pester, OVF and DSC. Better Together

This is where things start to get really good and the whole reason I wrote this post.  Let that sink in for just a moment.

The module based approach and structure that OVF is looking for compliments the structure of a DSC resource module. You can combine them so your system validation tests for custom DSC resources get distributed automatically with the resource from the DSC pull server.

I just thought it was really clever how all of this ties together. This last little trick only works if you are creating custom DSC resource and not everyone is doing that. It may be an opportunity for some community projects to build in some additional functionality more than anything.

## Wrapping things up

I have a new found appreciation of this project and the potential it offers. It solved one of the largest problems I had with my current approach of distributing tests and keeping them updated across systems. I already started moving over to this new approach.


text:
# SpaceX Software

![SpaceX-Img](/image/SpaceX-Img.jpg)

    I developed software to scrape data on SpaceX:

    Capsules, Rockets, Cores, Roadsters, SpaceX Info

    to use the software you need Python as well as PIP to install the modules.

## How to run this project
1. Install Python3.9. [Click here](https://www.python.org/downloads/)
1. Clone this repository: `git clone https://github.com/MaxenceR26/SpaceX`
1. Install virtualenv package: `pip install virtualenv`
1. Create the virtual environment:
    1. Windows: `C:\>c:\Python39\python -m venv c:\path\to\myenv`. The "path\to\myenv" must be the projects folder
    1. Linux, inside the projects folder: `python3.9 -m venv env`
1. Start the virtual environment:
    1. Windows: `C:\>venv\Scripts\activate.bat`
    1. Linux: `source env/bin/activate`
1. Install the dependencies: `pip install -r requirements.txt`

## Install Pip with Curl :

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

### If you not PIP :

python -m pip install YOUR MODULE

### If you have PIP :

pip install YOUR MODULE

![SpaceX-Img](/image/SpaceX-R.png)

#### By Kijusu#9602 <3


text:
# linter-python-pep8 package

This **linter-python-pep8** plugin for [Linter](https://github.com/AtomLinter/Linter)
provides an interface to [pep8](https://pypi.python.org/pypi/pep8). It will
be used with files that have the Python syntax.

## Requirements
*Linter* package must be installed in order to use this plugin. If *Linter* is not
installed, please follow the instructions [here](https://github.com/AtomLinter/Linter).

### Installation
Before using this plugin, you should make sure that `pep8` is installed on your
system. You can follow following instructions to install `pep8`:

1. Install [python](https://www.python.org/).

2. Install [pep8](https://pypi.python.org/pypi/pep8) by typing the following
in a terminal:
   ```
   pip install pep8
   ```

Now you can proceed to install the **linter-python-pep8** plugin.

### Plugin installation
```
$ apm install linter-python-pep8
```

## Settings
You can configure *linter-python-pep8* by editing *~/.atom/config.cson* (choose *Open Your Config*
in *Atom* menu). You'll need to add the directory where your **pep8** executable
resides. Also, it's possible to indicate which errors you want to be ignored through
the *ignoreErrorCodes* configuration option:

Example:
```
'linter-python-pep8':
  'pep8DirToExecutable': '/usr/local/bin/'
  'ignoreErrorCodes': 'E501, W292'
```


text:
---
layout: default
title: clone
parent: Control util
nav_order: 203
---
# upload

From `0.3.2`

Download, unpack and setup local copy of lambda.

Automatically creates file `.cgictl.json` and adds it to `.cgiignore` (if not presented).

```
Usage:
  cgi-ctl [OPTIONS] clone [clone-OPTIONS]

Help Options:
  -h, --help             Show this help message

[clone command options]
      -l, --login=       Login name (default: admin) [$LOGIN]
      -p, --password=    Password (default: admin) [$PASSWORD]
      -P, --ask-pass     Get password from stdin [$ASK_PASS]
      -u, --url=         Trusted-CGI endpoint (default: http://<IP_ADDRESS>:3434/) [$URL]
          --ghost        Disable save credentials to user config dir [$GHOST]
          --independent  Disable read credentials from user config dir [$INDEPENDENT]
      -U, --uid=         Lambda UID [$UID]
      -o, --output=      Output directory (empty - same as UID) [$OUTPUT]
```

**Example** (from the remote instance, lambda `e0ed902f-4a9c-4c29-870d-f343f330b6ab`):

```
cgi-ctl clone -i e0ed902f-4a9c-4c29-870d-f343f330b6ab --url https://example.com/ -P
```

will ask password for `admin` user and then download and unpack an archive to `e0ed902f-4a9c-4c29-870d-f343f330b6ab` dir

When you decide to upload changes, change dir to cloned lambda and invoke

```
cgi-ctl upload
```

repository: vforks/trusted-cgi

repo_name: vforks/trusted-cgi


text:
---
id: 726
title:
  - Basic docker usage for a PaaS activity
date: 2014-06-17T22:18:24+00:00
author: Keirua
layout: post
guid: http://blog.keiruaprod.fr/?p=726
permalink: /2014/06/17/basic-docker-usage-for-a-paas-activity/
description:
  - 'An introduction to docker through the basic setup of a PaaS for executing  sandboxed php.'
robotsmeta:
  - index,follow
categories:
  - Astuce
lang: fr
archived: true
---
I wrote this article a while ago. Instead of letting it sink on my hard drive, the [release of docker 1.0](http://blog.docker.com/2014/06/its-here-docker-1-0/ "Docker 1.0 release") is a good opportunity to let people know how easy getting started is. There might be some better solutions for many things, since stuff have evolved a lot in the last months, but you can see this article as an introduction to what docker is and how it works.

A few months ago, I talked about how to use Vagrant in order to deploy virtual machines on DigitalOcean. More recently, I’ve been playing with [Docker](https://www.docker.io/ "Docker"), which is a kind of git for virtual machines.

With this tool, one can create virtual machines. The philosophy is not to ease machine creation (stuff that you would find with Vagrant + Puppet or Chef). The magic idea is that after every modification on the system (setup, file creation, script execution…), it is possible to save the state of the machine. This is so similar to ‘git commit’ that the command is… ‘docker commit’.
With such a philosophy, it is possible to navigate between the states, publish a machine like you would publish a repository on github, update a set of already-running machines efficiently, and so on.

I’ll get through the first steps to create a small machine that can be used in order to execute sandboxed php code : the php code will run inside the machine, and we’ll get the result. This could be used for a PaaS (Platform as a Service), like jsbin or codepen, but for languages whose functionnalities could pose security threats if it was executed on the main machine (php, python, ruby…).

## Installing docker

I won’t get much into the details about how to install docker actually, everything you need is up to date in the documentation. There are some requirements about the version of your kernel, so if you can’t install, a solution is to run it inside a vagrant virtual machine. The source code contains a Vagrantfile already setup, so nothing could be easier :

Now that we have our new toy, we can start creating an image.

Open a terminal and start an instance using the base image :

<br />
sudo docker run -i -t base /bin/bash<br />

This will launch you into a shell inside the machine. We can now start customizing the image. We won’t do much in this tutorial, we will simply install php, but of course you can do everything you would do with any virtual machine.

## Installing php

Inside the shell, run :

<br />
apt-get update<br />
apt-get install php5<br />

## Saving of a machine

Now that we have a machine with PHP installed, we want to save it, in order to be able to reuse it afterwards. We have made modifications on the system but if we exit the shell right now, since they have not been saved, we’ll have to install php again the next time we run our image.

Leave the current terminal open, and open another terminal. In order to save our image we need its identifier, so run :

 sudo docker ps<br />

It will show the ID of the running container in the other terminal. We can save our image with the name ‘clem/php’ by running the commit command :

<br />
sudo docker commit clem/php<br />

The name looks like the conventions on github (user/repository). Even though here there are no obligations, it’s good to keep good habits.

If all went well, your images ‘clem/php’ will appear in the list of available images :

<br />
sudo docker images<br />

Images are similar to git branches of the base image. The next time you want to create a machine, if you want to install php and mysql, you can :

  * run the base image, install php and mysql
  * run the clem/php, and install mysql

## Our basic jsbin like for PHP

Remember, we want to do something similar to jsbin, but for executing php in a sandbox. Our image clem/php will be the sandbox, because we don’t want to restrict the functionnalities of the language, what if someone executed some shell code from PHP in order to erase the whole system. We can use docker to start a machine, execute any phpcode, return us the result, and quit. Since we won’t save the machine, every execution will provide us with a brand new machine. If someone destroys it in anyway, we couldn’t care less.

We need to create a file on the host, that will be executed in docker. Create test.php, and write something like :

<br />
<?php echo 'Hello World !'.PHP_EOL;
<br />
Run some code inside your new sandbox<br />
The first idea I came up with was this one :</p>
<p><code lang="bash"><br />
cat test.php | sudo docker run -i clem/php /bin/bash -c "cat > test.php; php test.php"<br />

Basically, to manually copy the content of the file thanks to cat inside docker. Then we run it thanks to bash, with a 2 command script : "cat > test.php; php test.php", or 'dump the content to test.php then run test.php'.

There is a better solution : using a mounting point. We can share a folder on the host machine to docker.
/home/vagrant/test.php will be the file on the host machine
/home/docker.php is the file we want to have on the docker machine.
the '-v' option tells docker to create a mounting point between the two files.
This time, instead of running bash, we can directly run PHP.

<br />
docker run -v /home/vagrant/test.php:/home/docker.php php /home/docker.php<br />

Awesome, huh ?

license: Unlicense


text:
## Different distances

* Euclidean
  * EuclideanDistance(x, xi) = `sqrt( sum( (xj – xij)^2 ) )`
  * Usually used when type of input variables are same (width, height for eg)
  * Is invariant to any rotation. It'll remain same in all directions.

* Manhattan
  * Manhattan (x,xi) = `sum( abs(xj - xij) )`
  * Used more often when different input variables to manhattan distance are of different types (age, gender, etc). This is because if different inputs have very different ranges (and you're not normalising), then euclidean would dominate the ones having bigger ranges of values. Manhattan will at least reduce that effect!
  * Actually, to be honest, this is not used much. Mostly prefer euclidean only, unless above case.

* Minkowski
  * This is generalised version of Euclidean and Manhattan. In Euclidean, n = 2, In Manhattan, n = 1.

* Hamming
  * For strings it is how many characters have mismatch in total. In binary numbers, the number of bits where mismatch is there.
  * This is generally only used for finding distances between two points whose features are categorical in nature!
  * **simple matching coefficient** : this is basically now -- number of attributes/features that are same divided by number of total attributes
    * Example : If rows are users, and features are gender, race and country of origin. Then if i1 and i2's gender and race match, then it would be 2/3.

* Jaccard
  * The simple matching coefficient introduces a big problem.
    * Example : If rows are users, features are each movie if they've watched it (binary variable).
    * Now, if you calculate SMC, and there are 10000 movies, then only say 4 movies might be commonly watched and say 9950 of them both haven't seen and rest seen by either people, so SMC would be (9950+4)/10000
    * The problem here is that it's not good measure. Because users are not actually similar because they haven't watched so many movies.
    * This is where Jaccard comes in!
  * Jaccard in above case would be --- `( num of movies both have watched / (num_movies_1_watched + num_movies_2_watched - num_movies_both_watched) )`
  * Jaccard is basically intersection / overlap.

* Cosine
  * dot product of two vectors divided by product of their magnitudes
  * In case of text / NLP stuff, we use this because we're concerned with word existence just as much we're concerned with word counts.

### Notes

**Why/When to use cosine over euclidean?**
OR, why is cosine used in document similarity instead of euclidean?

See, vectors = magnitude + direction. Cosine is direction related similarity. Euclidean is distance releated similarity.

Direction is the "preference" / "style" / "sentiment" / "latent variable" of the vector, while the magnitude is how strong it is towards that direction.

When classifying documents we'd like to categorize them by their overall sentiment, so we use the angular distance.

Euclidean distance is susceptible to documents being clustered by their L2-norm (magnitude, in the 2 dimensional case) instead of direction. I.e. vectors with quite different directions would be clustered because their distances from origin are similar.

**When mix of categorical and numerical features**

distance final = α.distance numeric + (1- α).distance categorical

We decide alpha on our own.


text:
# module::tools [![status](https://github.com/Wandalen/wtools_/workflows/Test/badge.svg)](https://github.com/Wandalen/wtools_/actions?query=workflow%3ATest) [![unstable](https://img.shields.io/badge/stability-unstable-yellow.svg)](https://github.com/emersion/stability-badges#unstable)

Collection of general purpose tools for solving problems. Aggregates module Tools. Fundamentally extend JavaScript without spoiling namespace, so may be used solely or in conjunction with another module of such kind. Tools contain hundreds of routines to operate effectively with Array, SortedArray, Map, RegExp, Buffer, Time, String, Number, Routine, Error and other fundamental types. The module provides advanced tools for diagnostics and errors handling. Use it to have a stronger foundation for the application.

### Try out from the repository

```
git clone https://github.com/Wandalen/wtools
cd wtools
will .npm.install
node sample/trivial/Sample.s
```

Make sure you have utility `willbe` installed. To install willbe: `npm i -g willbe@stable`. Willbe is required to build of the module.

### To add to your project

```
npm add 'wtools@stable'
```

`Willbe` is not required to use the module in your project as submodule.

## Credits

Special thanks to [wtklbm](https://github.com/wtklbm).

gha_language: JavaScript


text:
title: SOL
title_long: SOL - Deep Learning GPU Cluster
finished: false
picture: sol-logo.jpg
template: project-single
groups: rse, diag
people: Paul Konstantin Gerke, Sil van de Leemput, Thomas de Bel, Erdi Calli, Matin Hosseinzadeh, Xie Weiyi, Patrick Brand
description: DIAG's deep learning cluster for training and applying automated image analysis tools.
bibkeys:

## Background

The Diagnostic Image Analysis Group's goal is to improve image analysis tools
for clinicians. Since 2015, deep learning has become an essential tool for
artificial intelligence, substatially improving the acurracy and generalizability
on classical image classification techniques. In order to create high quality
deep learning based algorithms for clinical practice, DIAG's AI researchers
need to make use of high-power general purpose graphic processing units (GPGPUs).

SOL is DIAG's deep learning infrastructure. It offers researches access to
a centralized pool of GPGPUs. It is used to create state-of-the-art tools
for detecting and classifying illnesses and quantify extent, and possible
treatment options.

## Capacity/Activity

| Resource               | Value                         |
| ---------------------- | ----------------------------- |
| Compute nodes          | 30                            |
| GPUs                   | 80                            |
| CPUs                   | 788                           |
| Total memory           | 3.5TB                         |
| Active users/month     | 40                            |
| Jobs run/month         | 7000                          |

## Architecture

SOL uses offers consists of a compute cluster of 80 GPUs (mainly NVIDIA GTX1080Ti
and RTX2080Ti cards), a dedicated 500 TB storage server for serving data to
deep learning compute nodes via 20 GBit networking, and a Prometheus/Grafana
based monitoring solution to monitor the activity and health of the cluster.

![sol-cluster-architecture]({filename}/images/projects/sol-architecture.png "SOL's architecture overview")

Users log in to job nodes directly to either schedule an experiment or to
interactively interact with a scheduled experiment. We use slurm as an automated
job queue. Experiments are encapsialted in docker containers to isolate their
software stacks from the system software stack. This allows researchers to try
out new libraries and software without the need to install new software on the
base systems.

## Future

The SOL compute cluster runs reliably for 1.5 years now. The cluster was
steadily growing over that period and it will reach its maximum design capacity
of 100 GPUs this year. After this, we will consolidate and upgrade old hardware
and to remove non-stardard components and compute nodes from the cluster.

In addition to this, the compute cluster will be rolled out as a service to
other departments of the hospital and we will start offering compute capabilites
built around SOL to other departments of Radboud University in 2019.

repository: pkcakeout/website-content

repo_name: pkcakeout/website-content


text:
# Converting your React Native project to Typescript

Splitting up your conversion into three main steps.

1.) Loose
- Adding TS to package.json
- Create `tsconfig.json`
- Allow implicit `anys`
- Change files to .js to .tx/.tsx
Use `js-to-ts-converter` to help

2.) Medium
- No implicit `anys`
- Common Types
- 3rd party Types

3.) Strict
- Strict mode: true
- Removing null propagation
- Making safe jS code

repository: vinnyhoward/til

repo_name: vinnyhoward/til


text:
# Project name
## Password-locker

## Description
- This is a project that helps users to do diffrent activities in their account

## link
https://winniemwikali.github.io/passwordLocker/

## BDD
* c creates new account

* s is to sign in

* e to exit

* ap to add your password

* gp generate random password

* vp view password

* cp copy password

* l log out
## setup Insructions

* clone this repository

* Have pythone3.6 on your device

* Run application in your terminal using ./run.py

* Test application using $ python3.6 password_test.py

* Once you run the application follow the instruction on the terminal

## Technologies used
Python

## Contact
- Tel:0742214094
-<EMAIL_ADDRESS>
## License
[MIT] Copyright(Winnie Mwikali)

repository: winniemwikali/passwordLocker

repo_name: winniemwikali/passwordLocker


text:
# tsmonads

[![Build Status](https://travis-ci.org/hbel/tsmonads.svg?branch=master)](https://travis-ci.org/hbel/tsmonads)
[![Dependencies](https://david-dm.org/hbel/tsmonads.svg)](https://david-dm.org/hbel/tsmonads.svg)
[![codecov](https://codecov.io/gh/hbel/tsmonads/branch/master/graph/badge.svg)](https://codecov.io/gh/hbel/tsmonads)

### Monads in TypeScript

_tsmonads_ provides some basic, strictly typed monadic data types for use with TypeScript, namely MayBe, Try and Either monads. It's API is heavily inspired by the according types in the Scala lanaguge API. It has **no** dependencies and can even be used (although without most of it's benefits) in JavaScript.

# Install

NPM: `npm install tsmonads`

Yarn: `yarn add tsmonads`

# Usage

Simply `import` the needed functions and classes from `"tsmonad`.

# Breaking changes in 3.x

-   We improved statical type analysis in 3.0. This might lead to incompatibilities when using the library without checking the return values correctly.
-   Global functions (map, flatMap) now return the correct type inferred from the incoming monad's type and the mapping function
-   `unsafeLift()` was removed from all monads to ensure type safety
-   Where default types are set for `Either::Left`, `Error` is now used instead of `string`

## Maybe

A Maybe either contains _just_ a value or _nothing_. You can easily create new Maybe instances using the _maybe_ factory function:

```
import {maybe} from "tsmonads";

const five = maybe(5); // Type of Maybe is infereed to be "number"
const n?: number;
[...]
const maybeANumber = maybe(n); // maybeANumber will be a Maybe<number>. Wether it contains a value depends on n being a number or undefined.
const nothingAtAll = maybe<number>(null); // nothingAtAll is Nothing. The generic type has to given explicitly because it cannot be inferred from the argument.
```

You can use _map()_ and _forEach()_ to transform the Maybe into another contained type or to perform side-effects on it's value. If the maybe is nothing, this is
a no-op.

```
import {maybe} from "tsmonads";
const m = maybe(5);
const seven = m.map(x => x + 2);
const show = m.forEach(x => console.log(x));
```

You can extract the value from a maybe safely by supplying a default to its _orElse()_-function. If you need more control, you can use _match()_ and suppy functions to handle the value and nothing case explicitly:

```
import {maybe} from "tsmonads";
const m: Maybe<number>;
[...]
const extractedValueOrZero = m.orElse(0);
const doSomethingWithTheValue = m.match(x => 2*x, () => -1);
```

## Try

Use _Try_ to safely encapsulate a function call that may throw an exception. Try will either be a _Success_ wrapping the return value of the function or a _Failure_. Use try via the _call_ factory function.

```
import {call} from "tsmonads";
const retVal = call(() => 2+5); // retVal is Success<number>(7)
const fail = call(() => throw "Error"); // retVal is Failure("Error");
```

Like a Maybe, you can use map() and forEach() on a Try. For more control, supply functions to its _onSuccess()_ and _onFailure()_ handlers:

```
import {call} from "tsmonads";
const retVal = call(() => 2+5);
retVal.onSuccess(s => console.log(s)).onFailure(e => console.log("An error occured"));
```

If the Error encapsulated by the Failure doesn't matter to you, you can also convert the Try into a Maybe using its _toMaybe()_ method.

## Either

An Either holds either a left or a right value. Usually, the left value denotes an error an the right value represents a successful result. Construct
it using the _left()_ and _right()_ factory functions.

## Further utility functions

Besides the above functions, we also provide some utilities you can use when working with arrays of Monads. The `clean()` function will extract all values
from the monads, throw away any non-values (Nothing, Failure, Left) and return an array of the extracted values. The `flatten()` function will turn an `Array<Monad<T>>` into a `Monad<Array<T>>`. Note that you will receive a "negatively typed" array if even single value in the original array is Nothing/Failure/Left. Otherwise, you'll get a `Just<Array<T>>`, `Success<Array<T>>` or `Right<Array<T>>`. All monad types provide a typed wrapper
of flatten as a static method so you don't need to type-cast any results of the flatten method.

repository: hbel/tsmonads

gha_language: TypeScript

repo_name: hbel/tsmonads


text:
## IDPCastable

IDPCastable is a chainable casting type used to avoid excessive iflets and guards, whe you are working with multiple unrelated types expected under a single variable.

You can read more about casting and how it helps you simplify the code in blogposts:
[Type Inference](http://blog.idapgroup.com/type-inference/)
[Chainable Casting](http://blog.idapgroup.com/chainable-casting/)

A perfect example is a UITableView presenting different cells without common protocol.
Code, in the way it's usually written:
```swift
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let identifier = (indexPath.row % 2) == 0 ? "GrayCell" : "PinkCell"

    let cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath)
    if let pinkCell = cell as? PinkCell {
        pinkCell.fill(withModel: indexPath.row)
    }

    if let grayCell = cell as? GrayCell {
        grayCell.fill(withModel: "row = \(indexPath.row), column = \(indexPath.section)")
    }

    return cell
}
```

Code using IDPCastable:
```swift
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let identifier = (indexPath.row % 2) == 0 ? "GrayCell" : "PinkCell"

        let cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath)

        return castable(cell) { (c: PinkCell) in
                c.fill(withModel: indexPath.row)
            }
            .match { (c: GrayCell) in
                c.fill(withModel: "row = \(indexPath.row), column = \(indexPath.section)")
            }
            .extract()
    }
```

## Example

To run the example project, clone the repo, and run `pod install` from the Tests/iOS directory first.

## Requirements

Swift 3.0

## Installation

IDPCastable is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "IDPCastable"
```

## Author

Oleksa 'trimm' Korin<EMAIL_ADDRESS>
## License

IDPCastable is available under the New BSD license. See the LICENSE file for more info.

repository: trimmurrti/IDPCastable

repo_name: trimmurrti/IDPCastable


text:
# How to Use These Files
Steps:
1. Exercise 12
   ### **Objective:**
   - Identify queries that will be needed by your users.
   - Create select, insert, update and delete queries for your tables.
   - Backup your database.

   ### **Requirements:**
   - For each category of users that you identified in Exercise 11, identify and write 5 queries that they would need to use on a regular basis. You should have 15 queries, including the following:
   - At least 2 queries that join tables.
   - At least 1 insert query, 1 update query and 1 delete query.
   - At least 1 query that uses a view.
   - At least 1 query that includes a calculation or an aggregate function.
   - Save your queries in a .sql file.
   - Perform a full backup of your database using the Export function in the workbench.
   - The end result should be the .sql query file and the backup file.
2. View my files to see how I met the requirements of the exercise:
   - `exercise12.sql`: holds the sql statements used to complete the requirements of exercise 12. It has 15 queries and the answers to them.


text:
# son-class-converter

[![npm](https://img.shields.io/npm/v/json-class-converter.svg)](https://npmjs.org/package/json-class-converter)

The package is utility to help serialize/deserialize JSON objects into/from specific JS/TS classes.

## Installation

    npm i --save json-class-converter

## Configurations

### Imporing

Add to the imports section

    import { JsonClassConverter } from 'json-class-converter';

or

    const { JsonClassConverter } = require('json-class-converter');

### Creation

    const converter = new JsonClassConverter( jsonConverterConfig );

Where jsonConverterConfig is an object ( implemnting JsonConverterConfigurationInterface )
containing :

    const jsonConverterConfig : JsonConverterConfigurationInterface = {
      conversionSchema: <Conversion Schema object>,
      classesMapArray: <Map of classes>,
      conversionFunctionsMapArray: <Map of functions >
    };

#### Conversion Schema object

An object that implements an array of ClassConversionSchemaInterface.
Each item in the array represent a class.

Each conversion receipt consists of:

    {    "className": <Name of class>,
          ["propertyConversionArray": <Array of conversions>]
    }

propertyConversionArray is optional. If doesn't exist the module will iterate the members of the
input JSON and will try to find matching fields in the class.

Each element in "Array of conversions" is constructed of

    {   "propertyName": <Name of class property>",
        ["propertyNameInJson": <Name of JSON property>],
        ["conversionFunctionName": <Conversion function name>],
        ["conversionFunctionToJsonName": <Conversion function name>],
        ["type": <Class name>],
    }

Apart from propertyName, all other properties are optional:

- propertyName - Class name to be used for convering to/from. The class name must be mentioned in "classesMapArray"
- propertyNameInJson - is the name as it appears in the JSON file. Use it if different form "propertyName".
- conversionFunctionName - If needed a special conversion from the value in the JSON to the class property's value.
- conversionFunctionToJsonName - If needed a special conversion from the class property's value to the JSON (when serialize to JSON) .
- type - Class name to be used for convering the value (or values, in case it is an array of values).
The class name must be mentioned in "classesMapArray".

#### Map of classes

This will hold all the classes needed for serialization/deserialization.

Is an array of objects in the structure ( implementing ClassMapEntry ):

    {className: '<Name of Class>', clazz: <Class>}

Example :

    classesMapArray =  [
      {className: 'Foo', clazz: Foo},
      {className: 'Area', clazz: Area},
    ]

#### Map of functions

This will hold all the functions that are needed for special conversion
( If no function is specified, value will be copied as is)

Is an array of objects in the structure ( implementing MethodMapEntry ):

    {methodName: '<Name of Method>', method: <Method>}

Example :

    functionsMapArray =  [
      {methodName: 'bar', method: bar},
      {methodName: 'dateConversion', method: dateConversion},
    ]

## Using

When need to convert to class (one or array of objects) use :

    const exampleJsonObj = {
      firstProperty : 'foo',
      secondProperty : 'bar',
    };
    const convertedNewClassesArray : MyClass[] = this.converter.convert<MyClass>(exampleJsonObj, 'MyClass');

If needed only one object, use :

    const convertedNewClass : MyClass = this.converter.convertOneObject<MyClass>(exampleJsonObj, 'MyClass');

If needed to convert to json, use (myClassInstance can be an object or array of objects):

    const jsonObject = this.converter.convertToJson(myClassInstance);

These examples are in TS but can easily be used in JS way - just get rid of the typings:

    const convertedNewClassesArray = this.converter.convert(exampleJsonObj, 'MyClass');
    const convertedNewClass = this.converter.convertOneObject(exampleJsonObj, 'MyClass');

## Further help
It was developed for my own needs .
I made it, because haven't found something similar.
I will see with time goes ,if there is interest and requests regarding this module, I will enhance this module
accordingly.
Feel free to open bugs and suggestions. You are also welcome to join and contribute.
I have intentions to export the core functionality so other frameworks will be able to use it as well.

repository: doron-mil/json-class-converter

repo_name: doron-mil/json-class-converter


text:
# randomx-rs
Rust bindings to the RandomX proof-of-work (Pow) system

## Build Dependencies
### Mac
Install [XCode](https://apps.apple.com/za/app/xcode/id497799835?mt=12) and then the XCode Command Line Tools with the following command
```
xcode-select --install
```
For macOS Mojave additional headers need to be installed, run
```
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
```
and follow the prompts

Install Brew
```
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
Run the following to install needed bottles
```
brew install git
brew install cmake
```

### Linux
Run the following to install dependencies
```
apt-get install git cmake libc++-dev libc++abi-dev
```

### Windows

Install [Git](https://git-scm.com/download/win)

Install [CMake](https://cmake.org/download/)

Install [Build Tools for Visual Studio 2019](
https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16)

repository: Krakaw/randomx-rs

branch_name: refs/heads/development

repo_name: Krakaw/randomx-rs


text:
# Changelog
All notable changes to this project will be documented in this file.

## [1.5.0] - 2021-03-28
### Changed
- A permission denied error from last.fm only temporarily suspends scrobbling
  instead of resetting authorization. This may help with intermittent errors
  on last.fm's side. (#27)

## [1.4.0] - 2020-11-22
### Fixed
- If authorization with last.fm is rejected, the unauthorized state is now
  immediately visible in the settings dialog, and the session key is discarded.
- The preferences page now correctly handles re-authorization (#17).

### Changed
- Updated foobar2000 SDK to 2020-07-28
- Updated cpprestsdk
- Internal cleanup

## [1.3.1] - 2018-08-18
### Fixed
- Disabling Now Playing notifications is now correctly honored.

## [1.3.0] - 2018-07-29
### Fixed
- Automatic proxy usage on Windows 8.1 and later would fail with
  "Setting proxy options: 12011: The option value cannot be set"

## [1.2.0] - 2018-07-21
### Changed
- Improved error reporting
- Uses foobar2000 SDK 2018-03-06
- Session key revocation properly suspends scrobbling

## [1.1.0] - 2017-11-21
### Added
- Scrobble command in the playback menu
- Submissions can be skipped based on a titleformat script
- Log when and why a track is skipped

### Fixed
- Drop invalid requests instead of attempting to submit them again.

## [1.0.0] - 2017-11-19

Initial release.


text:
# What We're Going Over:
- MICS
- FUA
- Byte-le Royale
- Bank Account
- White Board (Debt)
- Reimbursements
- SIGs
- Listserv Plans
- CS Breakfast
- FAST Talk
- Elections

# What We Went Over:

- CS Department Breakfast
- Facilities Use Agreement
	- Form has been signed and completed
- FAST Corporate Talk
	- Tuesday, February 11, at 6:00pm
	- Pizza will have to be ordered
	- Room will have to be reserved
- Listserv
	- postponed maintenance until next meeting
- Whiteboard
	- Check with facilities to make sure we can check the selected wall with a studfinder
- Reimbursements
	- Nick is planning to talk to Student Gov next Wednesday
	- Nick is planning to fill out a form and talk to Guy Hokanson about getting the couch reimbursements
- Elections
	- March 24th, 6:00pm
- SIGs
	- Study: Wyly, 10-11AM MWF
	- Arcade: Spencer
	- GDdev: Sander
	- Git: Eric/Spencer
	- Linux: Eric/Spencer
	- Dev: possibility
- Bytele Royale Prize Adjustment
	- 3rd place prize has been removed due to financial considerations. 1st place and 2nd place prizes has been adjusted to be split 60/40. We'll return to the original arrangement if we get $300 of funds.
- MICS
	- event is planned for April 3-4
	- Registration is required by March 3rd
	- Sign-up sheet up on the whiteboard

- Bank Account - $468.23

# To Accomplish By Next Meeting:
- Host Bytele
- Discuss SIG times
- Get Reimbursements
- Bytele Funding
- Reserve FAST room and get pizza

# Next Meeting:
- Listserv
- Bytele

gha_language: HTML


text:
## Overview

Brief description of what this PR does, why it is needed what feature does it
add or bug that it fixes.

Include anything that helps understand it. e.g.: Screenshots, gifs,
step by steps, etc.

### Checklist

- [ ] PR has a name that won't get you publicly shamed for vagueness
- [ ] PR has a description that explains it
- [ ] PR includes information for people to test it [e.g.: run `npm install`]
- [ ] PR is not 2k commits long... please. :pray:

repository: Vizzuality/csn-tool

repo_name: Vizzuality/csn-tool


text:
# TourismVR

A VR tour of Gdansk, Poland.

## Motivation

I wanted to explore Virtual Reality using React.

## Tech/Framework Used

Build with:
* React-360

## Features

* information buttons that provide info about city
* 360 view of city

## Installation

1.Fork and clone

`git clone https://github.com/BrandedNomad/house-tour-VR.git`

2.Install dependencies

`npm install`

3.(For Widows Users) Manually update the regular expression in node_modules/metro/src/blacklist.js, otherwise you will get an error when you try to start the development server.

from:

`
var sharedBlacklist = [
/node_modules[/\\]react[/\\]dist[/\\].*/,
/website\/node_modules\/.*/,
/heapCapture\/bundle\.js/,
/.*\/__tests__\/.*/];
`

To:

`
var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];
`

3.Start development server

`npm start`

4.Navigate to browser, using the link provided in the console

## How To Use It

Click on the button below the flag, click and drag your mouse within the browser to get a 360 view of the city and hover mouse over information buttons to see info. (No need for VR headset)

## Credits

This is part of a Udemy tutorial on React-360 called: [Creating VR Experiences with React 360](https://www.udemy.com/course/creating-vr-experiences-with-react-360/).

## License

MIT License

Copyright (c) 2021 Charl Swart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: BrandedNomad/Tourism-VR

repo_name: BrandedNomad/Tourism-VR