text:
## 0.19.2 (29 May 2021)
- Fix wrapping long lines in output panel.

## 0.19.1 (6 April 2021)
- Fix streaming error output.

## 0.19.0 (4 April 2021)
- Apply patterns before sanitizing output.
- Add `terminal` as an output target.
- Add ability to create terminal tabs.

## v0.18.2 (29 March 2021)
- Show panel when a command is configured to auto show its output.

## v0.18.1 (28 March 2021)
- Configure scheduler for etch.

## v0.18.0 (28 March 2021)
- Convert project to Javascript.
- Replace space-pen with etch.
- Add tabs for running processes.
- Change input dialog to prompt for all variables at once.
- Move editor buttons into a title bar.
- Add more example commands.

## v0.17.0 (22 July 2018)
- Added `token` variable which contains the token under the cursor.
- Run command only after all editors finish saving.

## v0.16.1 (3 February 2018)
- Fix bug when help view got destroyed.
- Fix auto enabling and disabling of scroll lock.

## v0.16.0 (21 November 2017)
- Group commands per project and make it collapsible.
- Added a `lineNo` variable which contains the line number of the cursor (@angeldeejay)

## v0.15.2 (4 November 2017)
- Various UI improvements.

## v0.15.1 (10 October 2017)
- Moved panel to the dock.

## v0.14.1 (19 August 2017)
- Added hooks for running custom JavaScript.

## v0.14.0 (23 July 2017)
- Added 'Run With' context menu to tree view.

## v0.13.0 (14 July 2017)
- Added a `text` variable which contains the full text of the editor (@adrianmalacoda)
- Added ability to supply stdin for the process (@adrianmalacoda)
- Prevent commands that depend on file variables from executing if there isn't an active editor.

## v0.12.1 (8 May 2017)
- Added optional notification when starting process.

## v0.12.0 (25 February 2017)
- Added ability to put commands in menus.

## v0.10.2 (18 February 2017)
- Prevent panel from showing when list of projects change.

## v0.10.1 (15 January 2017)
- Implemented auto add and remove of project configs.
- Added settings for command and output target visibility in panel.
- Automatically kill processes when its associated project is removed.
- Changed configuration of new commands to stream to panel by default.
- Added a button to the panel to open the settings with.
- Lazy-load some dependencies for increased loading time.

## v0.10.0 (22 December 2016)
- Added ability to edit command directly in panel.
- Added ability to open config editor with specific command from panel.

## v0.9.1 (18 October 2016)
- Added ability to globally specify shell.
- Changed code and example to use proper formatting for actions.

## v0.9.0 (26 August 2016)
- Added `word` and `line` variables.
- Added `selectProjectPath` variable.
- Added `trim` transform.

## v0.8.3 (15 July 2016)
- Added prompt for saving if files are modified.

## v0.8.2 (24 June 2016)
- Added entry to command palette to rerun last command.
- Added ability to convert paths between platforms.
- Changed command text field to a multi-line editor.

## v0.8.1 (6 April 2016)
- Added button to editor to toggle panel.
- Fixed layout issue in editor that caused center panel to expand.

## v0.8.0 (5 April 2016)
- Added ability to run only one instance at a time.
- Added divider and reload button to editor.
- Added prompt when unsaved changes are detected.
- Apply open configurations when reloading.
- Added removing of key bindings when reloading configuration.

## v0.7.1 (31 March 2016)
- Added buttons for inserting variables.

## v0.7.0 (7 March 2016)
- Added graphical editor for configuration files.

## v0.6.0 (2 January 2016)
- Added user input dialogs for variables. `@toi333`
- Allow `filePath` to be acquired from non-editor panes. `@nalcorso`
- Fixed output of formatted text when a file path is detected.

## v0.5.5 (26 December 2015)
- Changed output colors to white on black.
- Added separate commands for showing and hiding panel.
- Added ability to detect paths and open files from output.

## v0.5.3 (20 November 2015)
- Escape HTML and convert ANSI escape sequences. `@toddmazierski`

## v0.5.2 (21 October 2015)
- Added `autoHideOutput` property.

## v0.5.1 (20 September 2015)
- Added `scrollLockEnabled` property.
- Changed white space format in output panel.

## v0.5.0 (11 September 2015)
- Added `file` output target for writing output to a new file.
- Added support for running multiple instances of a process.
- Added `autoShowOutput` property for automatically showing the output panel.
- Added `maxCompleted` property to limit number of completed processes.
- Made warning notification dismissible.
- Changed output processing to buffer output even when streaming.
- Added `outputBufferSize` property to set maximum size of output buffer.
- Changed the default value of `errorOutput` to include `{stdout}`.

## v0.4.12 (28 August 2015)
- Added ability to resize panel.
- Added panel size and visibility to package state.
- Added ability to clear output.
- Added scroll lock behavior to output panel.
- Changed output panel's font to mono spaced.

## v0.4.11 (26 August 2015)
- Added option to stream output.

## v0.4.10 (23 August 2015)
- Added ability to configure additional environment variables.
- Replaced BufferedProcess with shelljs to run commands with.

## v0.4.9 (10 August 2015)
- Changed the way the projectPath field is determined. fileProjectPath is now used to refer to the project path of the currently open file, whereas projectPath refers to the first project or the process-palette.json folder if no projects are open.

## v0.4.6 (9 August 2015)
- Updated readme with instructions to use new help panel.

repository: morassman/process-palette

repo_name: morassman/process-palette


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.0] 2023-08-24

### Fixed

- License files are now correctly included in the published package
- Creds and key spec constants
- Credssp password and smartcard structs

### Changed

- Update dependencies

## [0.7.1]

### Changed

- Update dependencies

## [0.7.0]

### Improvement

- Pretty string representation and description for error codes

## [0.6.0] 2023-02-14

### Added

- Add Kerberos error codes([#199](https://github.com/Devolutions/picky-rs/pull/199))
- Fix ToString impl for KrbErrorInner ([#194](https://github.com/Devolutions/picky-rs/pull/194))

## [0.5.0] 2022-11-07

### Added

- Useful features for PKU2U support in sspi-rs ([#186](https://github.com/Devolutions/picky-rs/pull/186))

## [0.4.0] 2022-09-01

### Added

-  Kerberos crypto algorithms([#173](https://github.com/Devolutions/picky-rs/pull/173))

## [0.3.1] 2022-07-28

### Added

- Add constants related to SECBUFFER_CHANNEL_BINDINGS([#163](https://github.com/Devolutions/picky-rs/pull/163))

## [0.3.0] 2022-07-18

### Added

- Kerberos "Change password" protocol ([#155](https://github.com/Devolutions/picky-rs/pull/155))

## [0.2.0] 2022-05-27

### Added

- Missing Kerberos name type constants ([#150](https://github.com/Devolutions/picky-rs/pull/150))

## [0.1.0] 2022-05-19

Initial version

repository: Devolutions/picky-rs

branch_name: refs/heads/master

extension: md

gha_language: Rust

license_type: permissive

repo_name: Devolutions/picky-rs


text:
# Hero MotoCorp board clears Rs 450-cr investment in Hero FinCorp Ltd

Published at: **2019-11-05T15:30:00+00:00**

Author: **Press Trust of India**

Original: [Business-Standard](https://www.business-standard.com/article/pti-stories/hero-motocorp-board-approves-to-invest-rs-450-cr-in-hfcl-119110501681_1.html)

The country's largest two-wheeler maker Hero Moto Corp on Tuesday said its board has approved an investment of up to Rs 450 crore in its associate company Hero FinCorp Ltd (HFCL).
The company's board has considered and approved an investment of up to Rs 450 crore in HFCL by subscribing to the issue of shares by way of private placement in one or more tranches, Hero MotoCorp said in a regulatory filing.

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
# Theming
Theming is the ability of our components to change their appearance according to the user's request for example - dark, light theme are pretty common but there are more advanced themes such as two tone and or color blind themes.

### Key Guidelines for supporting themes
1. When styling a component you should be theme agnostic - you should not be aware of the current theme.
2. You should not import colors by their name (snow_white, basic_blue...), you should import colors by their theme name - (primaryHoverColor, primaryTextColor...)
3. Use the `theme-prop` helper mixin to use a theme. (theme-prop is our mixing for supporting ie11)

### How we implemented themes
Our theme mechanism is based on [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties), CSS variables are a very powerful tool to create dynamic css variables (it is not supported on ie11 - we have a fallback for it).
We define our initial styling at the body/root element level - doing so we are exposing our css variables (colors) to all child elements. When we want to apply a specific theme we simply add the theme class to a common ancestor (body for example) and all the components should change their appearance.

#### Creating a theme.
We extracted our css variables to a different repo (@mondaydotcomorg/monday-ui-style)
In order to create a new theme you need to override all of the keys (the list of keys can be found in the monday-ui-style repo)

#### Adding a new variable to a theme
Adding a key should be done in the @mondaydotcomorg/monday-ui-style repo

### IE11 support
As IE 11 is at it's final breath we don't want to invest too much time to support it but we do have around 3% usage in ie so in order to do so we will show the default theme when using ie 11. In order to achive that please use the `theme-prop`

### Theme example:
```css

body {
  --primary-text-color: var(--color-mud_black);
  --positive-color: var(--color-success);
  --negative-color: var(--color-error);
  --primary-border-color: var(--color-explosive);
  --placeholder-color: var(--color-explosive);
  --icon-color: var(--color-explosive);
  --icon-color-hover: var(--color-blackish);
  --primary-active-color: var(--color-basic_blue);
}

.compass-color-blind0theme {
  --primary-text-color: white;
  --positive-color: green;
  --negative-color: red;
  --primary-border-color: black;
  --placeholder-color: black;
  --icon-color: black;
  --icon-color-hover: grey;
  --primary-active-color: blue;
}

```

license: MIT

repository: DorShakedMonday/monday-ui-react-core

gha_language: JavaScript

gha_license_id: MIT

repo_name: DorShakedMonday/monday-ui-react-core


text:
# Certificates

In this chapter, we discuss the configuration of the certificates that are **required** for a working Quinn connection.

As QUIC uses TLS 1.3 for authentication of connections, the server needs to provide the client with a certificate confirming its identity, and the client must be configured to trust the certificates it receives from the server.

## Insecure Connection

For our example use case, the easiest way to allow the client to trust our server is to disable certificate verification (don't do this in production!).
When the [rustls][3] `dangerous_configuration` feature flag is enabled, a client can be configured to trust any server.

Start by adding a [rustls][3] dependency with the `dangerous_configuration` feature flag to your `Cargo.toml` file.

```toml
quinn = "*"
rustls = { version = "*", features = ["dangerous_configuration", "quic"] }
```

Then, allow the client to skip the certificate validation by implementing [ServerCertVerifier][ServerCertVerifier] and letting it assert verification for any server.

```rust
// Implementation of `ServerCertVerifier` that verifies everything as trustworthy.
struct SkipServerVerification;

impl SkipServerVerification {
    fn new() -> Arc<Self> {
        Arc::new(Self)
    }
}

impl rustls::client::ServerCertVerifier for SkipServerVerification {
    fn verify_server_cert(
        &self,
        _end_entity: &rustls::Certificate,
        _intermediates: &[rustls::Certificate],
        _server_name: &rustls::ServerName,
        _scts: &mut dyn Iterator<Item = &[u8]>,
        _ocsp_response: &[u8],
        _now: std::time::SystemTime,
    ) -> Result<rustls::client::ServerCertVerified, rustls::Error> {
        Ok(rustls::client::ServerCertVerified::assertion())
    }
}
```

After that, modify the [ClientConfig][ClientConfig] to use this [ServerCertVerifier][ServerCertVerifier] implementation.

```rust
fn configure_client() -> ClientConfig {
    let crypto = rustls::ClientConfig::builder()
        .with_safe_defaults()
        .with_custom_certificate_verifier(SkipServerVerification::new())
        .with_no_client_auth();

    ClientConfig::new(Arc::new(crypto))
}
```

Finally, if you plug this [ClientConfig][ClientConfig] into the [Endpoint::set_default_client_config()][set_default_client_config] your client endpoint should verify all connections as trustworthy.

## Using Certificates

In this section, we look at certifying an endpoint with a certificate.
The certificate can be signed with its key, or with a certificate authority's key.

### Self Signed Certificates

Relying on [self-signed][5] certificates means that clients allow servers to sign their certificates.
This is simpler because no third party is involved in signing the server's certificate.
However, self-signed certificates do not protect users from person-in-the-middle attacks, because an interceptor can trivially replace the certificate with one that it has signed. Self-signed certificates, among other options, can be created using the [rcgen][4] crate or the openssl binary.
This example uses [rcgen][4] to generate a certificate.

Let's look at an example:

```rust
fn generate_self_signed_cert() -> Result<(rustls::Certificate, rustls::PrivateKey), Box<dyn Error>>
{
    let cert = rcgen::generate_simple_self_signed(vec!["localhost".to_string()])?;
    let key = rustls::PrivateKey(cert.serialize_private_key_der());
    Ok((rustls::Certificate(cert.serialize_der()?), key))
}
```

*Note that [generate_simple_self_signed][generate_simple_self_signed] returns a [Certificate][2] that can be serialized to both `.der` and `.pem` formats.*

### Non-self-signed Certificates

For this example, we use [Let's Encrypt][6], a well-known Certificate Authority ([CA][1]) (certificate issuer) which distributes certificates for free.

**Generate Certificate**

[certbot][7] can be used with Let's Encrypt to generate certificates; its website comes with clear instructions.
Because we're generating a certificate for an internal test server, the process used will be slightly different compared to what you would do when generating certificates for an existing (public) website.

On the certbot website, select that you do not have a public web server and follow the given installation instructions.
certbot must answer a cryptographic challenge of the Let's Encrypt API to prove that you control the domain.
It needs to listen on port 80 (HTTP) or 443 (HTTPS) to achieve this. Open the appropriate port in your firewall and router.

If certbot is installed, run `certbot certonly --standalone`, this command will start a web server in the background and start the challenge.
certbot asks for the required data and writes the certificates to `fullchain.pem` and the private key to `privkey.pem`.
These files can then be referenced in code.

```rust
use std::{error::Error, fs::File, io::BufReader};

pub fn read_certs_from_file(
) -> Result<(Vec<rustls::Certificate>, rustls::PrivateKey), Box<dyn Error>> {
    let mut cert_chain_reader = BufReader::new(File::open("./fullchain.pem")?);
    let certs = rustls_pemfile::certs(&mut cert_chain_reader)?
        .into_iter()
        .map(rustls::Certificate)
        .collect();

    let mut key_reader = BufReader::new(File::open("./privkey.pem")?);
    // if the file starts with "BEGIN RSA PRIVATE KEY"
    // let mut keys = rustls_pemfile::rsa_private_keys(&mut key_reader)?;
    // if the file starts with "BEGIN PRIVATE KEY"
    let mut keys = rustls_pemfile::pkcs8_private_keys(&mut key_reader)?;

    assert_eq!(keys.len(), 1);
    let key = rustls::PrivateKey(keys.remove(0));

    Ok((certs, key))
}
```

### Configuring Certificates

Now that you have a valid certificate, the client and server need to be configured to use it.
After configuring plug the configuration into the `Endpoint`.

**Configure Server**

```rust
let server_config = ServerConfig::with_single_cert(certs, key)?;
```

This is the only thing you need to do for your server to be secured.

**Configure Client**

```rust
let client_config = ClientConfig::with_native_roots();
```

This is the only thing you need to do for your client to trust a server certificate signed by a conventional certificate authority.

[Next](set-up-connection.md), let's have a look at how to set up a connection.

[1]: https://en.wikipedia.org/wiki/Certificate_authority
[2]: https://en.wikipedia.org/wiki/Public_key_certificate
[3]: https://github.com/ctz/rustls
[4]: https://github.com/est31/rcgen
[5]: https://en.wikipedia.org/wiki/Self-signed_certificate#:~:text=In%20cryptography%20and%20computer%20security,a%20CA%20aim%20to%20provide.
[6]: https://letsencrypt.org/getting-started/
[7]: https://certbot.eff.org/instructions

[ClientConfig]: https://docs.rs/quinn/latest/quinn/struct.ClientConfig.html
[ServerCertVerifier]: https://docs.rs/rustls/latest/rustls/client/trait.ServerCertVerifier.html
[set_default_client_config]: https://docs.rs/quinn/latest/quinn/struct.Endpoint.html#method.set_default_client_config
[generate_simple_self_signed]: https://docs.rs/rcgen/latest/rcgen/fn.generate_simple_self_signed.html
[Certificate]: https://docs.rs/rcgen/latest/rcgen/struct.Certificate.html

repository: quinn-rs/quinn

branch_name: refs/heads/main

repo_name: quinn-rs/quinn


text:
# Some theory

How signals are sent ?

Here is some trick.

Few constants are defined both on server and cleint side:
- server port base (10000 by default)
- bandwidth per port (1M by default)
- name of tag value for sample rate ('rx_rate')
In such case to "send" signal on 400M it will be sent via port:

= 10000 + ( 400M / 1M ) = 10400

and in sent stream periodically will be inserted tag value "rx_rate" with sample rate value (due to actually data sent via Internet with different from sample rate speed)

GNU Radio has special ZeroMQ blocks to deal with such streams.

But creators of official ctf-tools created special **RF Over IP Source** block which installed during make command.

rx_to_fifo uses this block - it is very simple if you wish create your own graphs - just check rx_to_fifo.grc graph.

Or if you wish use directly ZeroMQ blocks - check my rx_simple.grc / rx_file.grc ( https://github.com/BlackVS/cts-utils/ ) - I played with ZeroMQ a little to understand better it.

repository: zen-wistaria/CTFs

repo_name: zen-wistaria/CTFs


text:
---
description: Install Docker Trusted Registry on this Docker Engine
keywords: docker, dtr, cli, install
title: docker/dtr install
---

Install Docker Trusted Registry on this Docker Engine

## Usage

```bash
docker run -it --rm docker/dtr \
    install [command options]
```

## Description

This command installs DTR on the Docker Engine that runs the command.
After installing DTR, you can add more nodes to a DTR cluster with
the 'join' command.

## Options

| Option                    | Description                |
|:--------------------------|:---------------------------|
|`--ucp-url`|Specify the UCP controller URL including domain and port|
|`--ucp-username`|Specify the UCP admin username|
|`--ucp-password`|Specify the UCP admin password|
|`--debug`|Enable debug mode, provides additional logging|
|`--hub-username`|Specify the Docker Hub username for pulling images|
|`--hub-password`|Specify the Docker Hub password for pulling images|
|`--http-proxy`|Set the HTTP proxy for outgoing requests|
|`--https-proxy`|Set the HTTPS proxy for outgoing requests|
|`--no-proxy`|Set the list of domains to not proxy to|
|`--replica-http-port`|Specify the public HTTP port for the DTR replica; 0 means unchanged/default|
|`--replica-https-port`|Specify the public HTTPS port for the DTR replica; 0 means unchanged/default|
|`--log-protocol`|The protocol for sending container logs: tcp, tcp+tls, udp or internal. Default: internal|
|`--log-host`|Endpoint to send logs to, required if --log-protocol is tcp or udp|
|`--log-level`|Log level for container logs. Default: INFO|
|`--log-tls-ca-cert`|PEM-encoded TLS CA cert for DTR logging driver. This option is ignored if the address protocol is not tcp+tls.|
|`--log-tls-cert`|PEM-encoded TLS cert for DTR logging driver. This option is ignored if the address protocol is not tcp+tls.|
|`--log-tls-key`|PEM-encoded TLS key for DTR logging driver. This option is ignored if the address protocol is not tcp+tls.|
|`--log-tls-skip-verify`|Configures DTR logging driver's TLS verification. This verification is enabled by default, but it can be overrided by setting this option to true. This option is ignored if the address protocol is not tcp+tls.|
|`--dtr-external-url`|Specify the external domain name and port for DTR. If using a load balancer, use its external URL instead.|
|`--enable-pprof`|Enables pprof profiling of the server|
|`--etcd-heartbeat-interval`|Set etcd's frequency (ms) that its leader will notify followers that it is still the leader.|
|`--etcd-election-timeout`|Set etcd's timeout (ms) for how long a follower node will go without hearing a heartbeat before attempting to become leader itself.|
|`--etcd-snapshot-count`|Set etcd's number of changes before creating a snapshot.|
|`--ucp-insecure-tls`|Disable TLS verification for UCP|
|`--ucp-ca`|Use a PEM-encoded TLS CA certificate for UCP|
|`--nfs-storage-url`|URL (with IP address or hostname) of the NFS mount if using NFS. For example, `nfs://<ip address>/<mount point>`|
|`--ucp-node`|Specify the host to install Docker Trusted Registry|
|`--replica-id`|Specify the replica ID. Must be unique per replica, leave blank for random|
|`--unsafe`|Enable this flag to skip safety checks when installing or joining|
|`--extra-envs`|List of extra environment variables to use for deploying the DTR containers for the replica. This can be used to specify swarm constraints. Separate the environment variables with ampersands (&). You can escape actual ampersands with backslashes (\). Can't be used in combination with --ucp-node|


text:
**Author** : Soro Kolotioloma

**Overview** : This is a package that I created to help with some analysis that you might want to do with a Gaussian and a Binomial
distribution

This is what the package can handle:
	*compute the mean
    *compute standart deviation
    *compute the probability density
    *sum dristributions
    *ploting the df and some other basic visualizations

**Files in the repo** :
	*Binomialdistribution.py
    *Gaussiandistribution.py
    *Generaldistribution.py
    *__int__.py
    *setup.cfg
    *README.md
    *license.md

**Licence** : This project is licensed under the MIT License - see the LICENSE.md file for details

**Acknowledgments** : Udacity Inspiration

repository: sorokolo/dsnd-probabilities

repo_name: sorokolo/dsnd-probabilities


text:
# CommitAnalysis

Makes analysis of git commits easier

Fork of: https://github.com/SSE-LinuxAnalysis/ComAn

## Overview

The [Com]mit [Ex]traction process (realized as ComEx.sh script) creates a "diff file" for each commit of the repository and writes the changes introduced by the respective commit (the "git diff information") to that file. The [Com]mit [An]alysis process (realized as ComAn.py Python script) analyzes these changes for each commit based on given criteria to identify a subset of relevant commits. A detailed description of the tools realizing these processes can be found below. The current versions of these two core tools support:

- ComEx: any git-based software repository
- ComAn: any git-based software repository

Technical Requirements:

- We suggest to use Ubuntu as operating system; we used Ubuntu 14.04.3 LTS
- For executing the ComEx.sh git has to be installed; we used git version 1.9.1

## [Com]mit [Ex]traction

The ComEx.sh script creates a "diff file" for each commit available in a git repository (the set of commits to be extracted can be further restricted by a commit list file; see "-l" option below). Such a "diff file" is named by the committer date (in Unix timestamp format) and the commit hash of the extracted commit. It contains the committer date in the first line and all changes introduced by the commit in the following lines. These changes are obtained by calling the "git show" command with some additional options to retrieve the entire content of each file changed by the respective commit.

```
Usage: bash ComEx.sh [-i DIR] [-o DIR]

    -i <git_dir>       Specify the directory of the git repository
    -o <output_dir>    Specify the directory to save the "diff files" to
    -l <commit_list>   Specify a file containing the commits (SHA) to extract
                       [optional]. Each line of this file has to contain a
                       single commit SHA without leading or trailing
                       whitespaces.
```

## [Com]mit [An]alysis

The ComAn.py Python script analyzes each "diff file" in the given input directory (see option below) to identify commits based on certain relevancy criteria. Currently, the script isolates commits
  1. Changing specific test files in the /Tests directory
  2. Containing only additions in \*.c and \*.h files in the /RelevantChanges directory

```
Usage: python3 ComAn.py [DIR]

    -<input_dir>       Optional: specify the directory of the input directory containing the diffs to be analyzed.
                       Default is /Commits.

```

repository: LPhD/CommitAnalysis

repo_name: LPhD/CommitAnalysis


text:
---
title: Don't look for a sponsor right away
date: 2020-01-02T13:37:27.459Z
tags:
  - investors
  - sponsors
  - gamers
draft: true
---
Before you decide to go for money to investors for new equipment, a new mouse and a new keyboard for players, you have to think carefully about whether this is the right time. Think about your further vision and strategy for developing yourself as a player and whether you really want to let the investor into your virtual game world and compete for money with the best.

Above all, however, you need to think about why you have decided to do this at all. Yes, most of us (players) don't have any money of our own and they would definitely need a cash injection. Sometimes I even have the impression that for some people, winning an investor becomes an end in itself. However, you have to remember about the long-term consequences. First of all, you will divorce your life The sooner you let other people in or enter the gaming huse, the less work you give yourself.

Secondly, you get an accomplice who is not emotionally attached to your passion. This is neither his passion nor the work on which his life and well-being depend. Remember, for him, a company is just one of many portfolio companies. And for you a huge part of your life and not only your personal finances may depend on it.

repository: tumitem/OnlineMacizle

gha_language: HTML

repo_name: tumitem/OnlineMacizle


text:
build-artifact-uploader
=======================

Uploads Build Artifacts from a CI Server (such as Travis).

See [PHP Code Coverage with Travis CI](http://jmsyst.com/automated-code-reviews/docs/guides/php_code_coverage_with_travis_ci)

repository: schmittjoh/build-artifact-uploader

repo_name: schmittjoh/build-artifact-uploader


text:
---
title: Accessing Data Programmatically
permalink: /docs/programmatic-access/
---

For more sophisticated users, who may need to perform complex data retrieval or searches for using FaceBase open-access data for analysis, pipelines, etc, there is a Python interface available called **deriva-py**.

However, you will need to understand about how the data is modeled in the underlying [DERIVA system](https://docs.derivacloud.org). Please reach out to the FaceBase Hub at **[help@facebase.org](mailto:help@facebase.org)**, let us know what you need and we can provide guidance to get you started.

You can find more general information about the Python interface at the following links:

- [DataPath documentation](https://docs.derivacloud.org/deriva-py/README.html)
- [GitHub repo for deriva-py](https://github.com/informatics-isi-edu/deriva-py).

Note that there is also an R wrapper available for this code.

repository: informatics-isi-edu/facebase-curation

repo_name: informatics-isi-edu/facebase-curation


text:
---
author: Arun Manivannan
date: '2007-03-17 01:28:53'
layout: post
comments: true
slug: linux-needs-windows-to-run-what-is-this-guy-talking
status: publish
title: Linux needs Windows to run ;-) (What is this guy talking?)
wordpress_id: '175'
? ''
: - fun
  - linux
  - windows
---

"I hope you realise that windows is more than just Office ? Its a whole system
that runs the computer from start to finish, and that is a very difficult
thing to acheive. A lot of people dont realise this."

"Microsoft just spent $9 billion and many years to create Vista, so it does
not sound reasonable that some new alternative could just snap into existence
overnight like that. It would take billions of dollars and a massive effort to
achieve. IBM tried, and spent a huge amount of money developing OS/2 but could
never keep up with Windows."

"Apple tried to create their own system for years, but finally gave up
recently and moved to Intel and Microsoft."

Confused whose quotes are these?

This is the comment given by [this][1] guy on [this][2] article.

And he talked this on [this][3] page.

"It wont be long until Windows XP is no longer supported, and when that
happens, what is Linux going to do ?

Linux will have to find a way to work under Vista from here on, since it wont
be able to rely on XP being readily available anymore.

Linux may seem like a good alternative to Office, but all that is happening in
linux is that the windows interface is cleverly hidden away. It still needs
the drivers and software services in order to run, and in most cases - that
happens WITHOUT a valid windows licence.

This is just plain piracy."

If you wanted to roll the floor laughing, then just read [digger's comments on
his "quotes"][4]

   [1]: http://talkback.zdnet.com/5208-12355-0.html?forumID=1&threadID=31199&m
essageID=579806&start=43

   [2]: http://education.zdnet.com/?p=908

   [3]: http://talkback.zdnet.com/5208-12355-0.html?forumID=1&threadID=31199&m
essageID=579073&start=43

   [4]: http://digg.com/linux_unix/Linux_Needs_Windows_To_Run

repository: arunma/blog

extension: markdown

repo_name: arunma/blog


text:
# Socket Model
- - -
A small unix socket framework to support inter-process communications.

[![NPM version](https://badge.fury.io/js/socket-model.svg)](http://badge.fury.io/js/socket-model)
[![Build Status](https://travis-ci.org/darrylwest/socket-model.svg?branch=master)](https://travis-ci.org/darrylwest/socket-model)
[![Dependency Status](https://david-dm.org/darrylwest/socket-model.svg)](https://david-dm.org/darrylwest/socket-model)

## Overview

Socket Model is a set of server/client reader/writer objects that provide a framework for inter-process communications based on unix sockets.  Communications exchange JSON messages delimited by CR (\n).  Messages can be read and written from either client or server using send() and read() where the message is either a string or a complex object.  Servers have the ability to broadcast messages to all active clients.

Each message is wrapped in an object with the message id (mid), time stamp (ts) and the message.  Messages are parsed by the receiver (either client or server).  Message helpers include MessageWriter and MessageReader.  These classes may be swapped out or extended to provide additional capabilities.  They are injected to SocketServer and SocketClient when invoked through SocketModel's create methods.

For most applications using the server and client provide all thats required to exchange messages.  But, since the reader and writer are separate objects injected into the server and client, these objects my be swapped or overriden to provide extra processing including authentication, message digest, priority, etc.

## Installation

	npm install socket-model --save

## Use

// server process

    const SocketModel = require('socket-model');

    const server = SocketModel.createServer( { socketFile:'/tmp/test.sock' } );

    server.onMessage(function(obj) {
    	console.log(' <<< Client Message: ', obj.message);
    	server.broadcast('echo: ', obj.message);
    });

    server.start();

// cleient process

    const SocketModel = require('socket-model');

    const client = SocketModel.createClient( { socketFile:'/tmp/test.sock' } );

	client.onMessage(function(obj) {
		console.log(' <<< Server Message: ', obj.message);
	});

    client.start();
    client.send('hello socket model!');

    // send more messages, then end the connection with an optional message..
    client.stop('bye');

## Examples

See the examples folder for server and client message examples.

## API

### SocketModel

The socket model object contains two factory methods to create server and client objects.  They can be invoked with preset options to set socket file, reader, writer, and other options.  The client must be created with a specified socket file (see examples).

- SocketModel.createServer(options)
- SocketModel.createClient(options)

### SocketServer

Once the socket server has be created it can be started to listen for client connections.  The broadcast method is used to send a wrapped, stringified JSON message to all clients in the list.  If the list is null, then the message is sent to all clients.

Incoming messages can be listened to by assigning a callback to onMessage().  Incoming JSON strings are parsed by the reader then sent as objects to handlers.  Message objects have a message id, timestamp, and message payload.

- server.start()
- server.broadcast( obj, clientList )
- server.onMessage( messageHandler )
- server.getClients()
- server.onClientConnection( clientConnectionHandler )
- event: client - fired when a new client connects

### SocketClient

One a socket client is created it may be started to attempt connection to the server.  If the server is unavailable, the client will continue to attempt to connect (set by options).  If a server connection drops, the client will again attempt to connect.

- client.start()
- client.send(obj)
- client.onMessage(callback)
- client.stop()

### MessageWriter

The message writer is responsible for wrapping outgoing messages with a message id, timestamp and the message.  The wrapped object is then stringified and sent to the specified client.

- writer.send(obj, socket)
- writer.wrapMessage()

### MessageReader

The message reader is responsible for parsing the incoming message and firing a 'message' event with the parsed object.

- reader.lineHandler(callback)
- event: message - fired when a new messages is received

- - -
_<small>Copyright © 2014-2016, rain city software | Version 00.92.10</small>_

repository: andy-zhangief/binance-bot

repo_name: andy-zhangief/binance-bot


text:
Personal-Blog
===================

- - - -
Author: [Nicholas Muchiri](https://github.com/Nicholas-muchiri)
## Description
[Flask-Blog](https://github.com/Nicholas-muchiri/Personal-Blog) a personal blogging website where you can create and share your opinions and other users can read and comment on them.
------------------------------------------------------------------------

## User Requirements

1. As a user I would like to view the blog posts submitted
2. As a user I would like to comment on blog posts
3. As a user I would like to view the most recent posts
4. As a user I would like to alerted when a new post is made by joining a subscription.

## Writer Requirements

1. As a writer I would like to sign in to the blog.
2. As a writer I would also like to create blog from the application.
3. As a writer I would like to delete comments that I find insulting or degrading.
4. As a writer I would like to update or delete blogs i have created.

## Specifications
[Specifications file](https://github.com/Nicholas-muchiri/Personal-Blog/specs.md)

## Setup

### Requirements
This project was created on a debian linux platform but should work on other unix based[not limited to] sytems.
* Tested on Debian Linux
* Python 3.6

### Cloning the repository
```bash
git clone https://github.com/Nicholas-muchiri/Personal-Blog.git && cd Personal-Blog
```

### Creating a virtual environment

```bash
python3.6 -m virtualenv virtual-blog
source virtual-blog/bin/activate
```
### Installing dependencies
```bash
pip3 install -r requirements
```

### Prepare environmet variables
```bash
 export MAIL_USERNAME=YOUR EMAIL
 export MAIL_PASSWORD=EMAIL PASSWORD
 export ADMIN_MAIL_USERNAME=ADMIN ACCOUNT EMAIL
 export DATABASE_URL=POSTGRESQL DATABASE PATH WITH DRIVER
```

### Database migrations

```bash
# first initialize the database if the migrations folder does not exist
python manage.py db init
# create  a migration
python manage.py db migrate -m "initial migration"
# upgrade
python manage.py db upgrade
# insert initial data
python manage.py insert_initial_data
```

### Running Tests

```python
#add this to manage.py
@manager.command
def test():
    """Run the unit tests."""
    import unittest
    tests = unittest.TestLoader().discover('tests')
    unittest.TextTestRunner(verbosity=2).run(tests)
```
```bash
python manage.py test
```

### Running the server
#### Development mode
The following are enabled in development mode
```python
class DevConfig(Config):
    DEBUG = True
    TESTING = True

```

Run server
```bash
# starting server by defaut will run it in development mode
python manage.py server
```
#### production mode
```python
class ProdConfig(Config):
    DEBUG = False
    TESTING = False
    DEBUG_TB_INTERCEPT_REDIRECTS = False
```

make the following change to the config.py script
'''python
config=ProdConfig()
'''

Run server
```bash
/.start.sh
```
### Deploying to heroku
Set the configuration to production mode
```bash
heroku create appname
heroku heroku addons:create heroku-postgresql
git push heroku master
heroku run python3.6 manage.py db upgrade
```

## Live Demo

The web app can be accessed from the following link
(https://blogger10.herokuapp.com/)

## Technology used

* [Python3.6](https://www.python.org/)
* [Flask](http://flask.pocoo.org/)
* [Heroku](https://heroku.com)

## Contributing

- Git clone (https://github.com/Nicholas-muchiri/Personal-Blog.git)
- Make the changes.
- Write your tests on `tests/`
- If everything is OK. push your changes and make a pull request.

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

This project is licensed under the MIT Open Source license, (c) [Nicholas Muchiri](https://github.com/Nicholas-muchiri)

repository: Nicholas-muchiri/Personal-Blog

repo_name: Nicholas-muchiri/Personal-Blog


text:
Cat vs. Dog classification

Is it a cat or a dog?

The goal of this project is to classify whether an image contains a dog or a cat.

# Model architecture

For classification, Convolutional Neural Network is used with with Max Pooling.

The model is trained in Kaggle using GPU.

> Further details about the model is documented inside the notebook Cat_vs_Dog.ipynb

> Dataset source: Dogs vs. Cats(Kaggle)

# Examples of some predictions made by the model on unseen images

path: /Notebooks/Cat vs Dog/README.md


text:
# BlokusHacker

> AI for Blokus

***Still updating...***

[Blokus](http://www.mattelgames.com/en-us/blokus/index.html) is an abstract strategy board game for two to four players, invented by [Bernard Tavitian](https://en.wikipedia.org/wiki/Blokus#cite_note-2) and first released in 2000 by Sekkoïa, a French company. It has won several awards, including the Mensa Select award and the 2004 Teacher's Choice Award.

![Blokus](BLOKUS.jpg)
*Image from http://www.mattelgames.com*

This project is for a competition of [USTC](ustc.edu). We hope students can develop various AIs for this wonderful game.

We'll provide a platform for AIs to fight with each other.

## Rules

The game is played on a square board divided into 20 rows and 20 columns, for a total of 400 squares. There are a total of 84 game tiles, organized into 21 shapes in each of four colors: blue, yellow, red and green. The 21 shapes are based on free polyominoes of from one to five squares (one monomino, one domino, two trominoes/triominoes, five tetrominoes, and 12 pentominoes).

![Tiles](Tiles.png)

The standard rules of play for all variations of the game are as follows:

* Order of play is either clockwise or counter-clockwise.
* The first piece played of each color is placed in one of the board's four corners. Each new piece played must be placed so that it touches at least one piece of the same color, with only corner-to-corner contact allowed—edges cannot touch. However, edge-to-edge contact is allowed when two pieces of different color are involved.
* When a player cannot place a piece, he or she passes, and play continues as normal. The game ends when no one can place a piece.
* When a game ends, the score is based on the number of squares in each player's pieces on the board (e.g. a tetromino is worth 4 points). If a player played all of his or her pieces, he or she gets a bonus score of +20 points if the last piece played was a monomino, +15 points otherwise.

## Restrictions

To be fair, we only concern about the 2-player version:

* 14\*14 board, 1 color per player, first step must cover a special location.

![SmallBoard](SmallBoard.png)

* 20\*20 board, 2 colors per player (player1 takes red & blue, while player2 takes yellow & green), first step must cover a corner.

![BigBoard](BigBoard.png)

**Indexing of the board:**

![GridIndexing](GridIndexing.png)

**Here's some markable standard for winners (optional):**

* Get the highest score while provided with enough time for thinking. (For example, 30sec/step)
* Get the highest score while provided with little time for thinking. (For example, 1sec/step)
* Without pre-training or pre-searching
* Scalable (Brute-force search will fail it)
* Uncommon or surprising methods
* Mining some tricks form AI
* *Other targets will be added later*

Your are honorable if matching any of these requests.


text:
# Two-Cubes-Calendar
Тask for model and behavior of a calendar consisting of two cubes.

Each cube have 6 digits and four rotation directions.
The idea is to set the date of the month by rotating or swapping the two cubes.

![Two cube calendar](https://images-na.ssl-images-amazon.com/images/I/81Q-DVUVzpL._SL1500_.jpg)

repository: bobazzia/Two-Cubes-Calendar

repo_name: bobazzia/Two-Cubes-Calendar


text:
## Entities, components and systems

Entity–component–system (ECS) is an architectural patter that follows the composition over inheritance principle that allows greater flexibility in defining entities
where every object in a world.

Every entity consists of one or more components which contains data or state. Therefore, the behavior of an entity can be changed at runtime by systems that add, remove or mutate components.

This eliminates the ambiguity problems of deep and wide inheritance hierarchies that are difficult to understand, maintain and extend.

Common ECS approaches are highly compatible and often combined with data-oriented design techniques.

For a more in deep read on this topic I could recommend [this article](https://medium.com/ingeniouslysimple/entities-components-and-systems-89c31464240d){target=_blank}.

## Data-oriented Design

A data oriented design is a design in which the logic of the application is built up of data sets, instead of procedural algorithms,
they are highly optimized, specially because how computer organize data.

For a more in deep read on this topic I could recommend [this article](http://gamesfromwithin.com/data-oriented-design){target=_blank}.

## Understanding Data-oriented design for ECS
On [GDC](https://gdconf.com/){target=_blank} 2019 [Unity](https://unity.com/){target=_blank} make a fascinating video about data-oriented design and ECS,
and how this has a huge impact on performance, I strongly recommend watching this video.

repository: juan-medina/kecs

repo_name: juan-medina/kecs


text:
Execute module for [Rock Framework](https://github.com/romeOz/rock)
=================

[![Build Status](https://travis-ci.org/romeOz/rock-execute.svg?branch=master)](https://travis-ci.org/romeOz/rock-execute)
[![HHVM Status](http://hhvm.h4cc.de/badge/romeoz/rock-execute.svg)](http://hhvm.h4cc.de/package/romeoz/rock-execute)
[![Coverage Status](https://coveralls.io/repos/romeOz/rock-execute/badge.svg?branch=master)](https://coveralls.io/r/romeOz/rock-execute?branch=master)
[![License](https://poser.pugx.org/romeOz/rock-execute/license.svg)](https://packagist.org/packages/romeOz/rock-execute)

Requirements
-------------------
 * **PHP 5.4+**

License
-------------------

Execute module for [Rock Framework](https://github.com/romeOz/rock) is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

repository: romeOz/rock-execute

repo_name: romeOz/rock-execute


text:
# lowrank-gru
Gated Recurrent Unit with Low-rank matrix factorization

Paper: http://arxiv.org/abs/1603.03116

A reparametrization of the Gated Recurrent Unit (Cho et al. 2014, http://arxiv.org/abs/1406.1078) where the recurrent matrices are constrained to be low-rank. Reduces data complexity and memory usage.

This code is based on the code for the Unitary Evolution Recurrent Neural Networks (Arjovsky et al. 2015 http://arxiv.org/abs/1511.06464) in order to facilitate a direct comparison. Original repository is https://github.com/amarshah/complex_RNN .

Our model performs comparably or better than Unitary Evolution Recurrent Neural Networks on all the tasks we tested (memory, addition and randomly-permuted sequential MNIST) for similar number of parameters.

Notes:

Requires Theano: http://www.deeplearning.net/software/theano/

File fftconv.py is derived from Theano and is therefore under Theano licence. This file is needed only for the baseline uRNN model and not for out Low-rank GRU and Low-rank plus diagonal GRU models.

repository: Avmb/lowrank-gru

repo_name: Avmb/lowrank-gru


text:
---
layout: post
title:  The Cornell Daily Sun App
subtitle: News on Mobile
date:   2020-10-20 16:04:00 +0300
image:  daily-sun/header-img.png
tags:   product-design

client: The Cornell Daily Sun
involvement: I was one of two product designers for this project.  I helped lead our user research initiatives, including recruitment, survey design, interviews, and later, testing. I worked on the information architecture and navigation of the app, as well as the notification and onboarding features. We worked with a team of 4-6 developers
tools: Sketch, Invision, Zeplin, Abstract, Google Suite, Dropbox

challenge: I aimed to design and prototype a mobile app for The Cornell Daily Sun that would engage current and new audiences.

outcome: We worked with an agile team that iterated on design and development simultaneously over one and a half years. We worked closely with stakeholders at The Sun to create an app that would fit within The Sun’s brand and model, from design decisions to marketing. The iOS app is available now on the app store!

description:
---

### About The Sun
The Cornell Daily Sun is Cornell’s oldest and only independent, student-run newspaper. It reports on events at Cornell, in Ithaca, or related to Cornellians. The goal of this project was to create an iOS app for The Cornell Daily Sun that would retain and engage current and prospective readers of The Sun. We believed a mobile application was a necessary and progressive extension of The Sun’s current print and web platforms, as it provides a much more direct access to The Sun’s news content.

## Discovery Phase

During the first phase of our design process, we wanted to get to know our users, the readers of The Sun, as well as the stakeholders- the paper’s Editorial Board.

### Our Users: Readers of The Sun

In the first round of interviews, we sought to understand the behaviors of the readers of The Sun. We asked them what platforms they used, how often they read, how they browse, in what contexts and settings they read, and what were their motivations for reading. We also wanted to find out why people do not read The Sun and how an app might influence how people read.

In addition to contextual interviews, we created a **survey using** **Google forms** in order to gather qualitative and quantitative data on a larger group.

We recruited participants for this survey by:

1. Advertising in the email newsletter sent to the digital subscribers of The Sun
2. Posting in various Cornell Class and Alumni groups on Facebook

### Stakeholders: The Editorial Board

We met with various members of the Editorial Board, including the Managing Editor, Design Editor, and Web Editor. We wanted to ensure that their needs and expectations of the app were met. We also wanted to get a better understanding of how the app would fit within the larger context of The Sun.

Throughout the whole design and development process, we continued to meet with Editorial Board members. Our discussions included topics such as:

*   Generating revenue from in-app advertisements
*   Best practices for pulling articles from their Wordpress website
*   Access to their readership for future user research and testing
*   Maintaining visual brand through the app’s design
*   Marketing the app

## Decide

### From Findings to Features

One goal of the first round of research was to identify the product features that would meet user needs. From our research, we identified the following features:

*   Main Feed - View the latest news stories
*   Section Feed - View stories by section
*   Search - Use keywords to search through all stories
*   Trending Topics - See a list of popular topics in news
*   Bookmarks - Save a story for later
*   Notifications - Receive a push notification for certain sections or types of stories
*   Settings - Display, About The Sun, and all other information

## Process

1. [Navigation: Building the app’s structure](#Navigation:-Building-the-app’s-structure)
2. [Onboarding: Getting users started](#Onboarding:-Getting-users-started)
3. [Visual Design System: Crafting a cross-platform experience](#Visual-Design-System:-Crafting-a-cross-platform-experience)

### Navigation: Building the app’s structure

My goal was to explore how a user can navigate the app. I wanted all of our features to be seamlessly accessible, while taking into consideration hierarchy of user actions, based on user tests. Prioritizing simplicity and intuition, I asked:

*   What is the relationship between these features?
*   How should these features be organized in a way that matches the user's conceptual model?

I looked to both **news apps** and **social media** apps for inspiration. News apps would have similar content and features to the Daily Sun app, and thus would provide a good starting point. Social media apps are widely used among our potential users, and could provide unique inspiration to the traditional newspaper model.

![]({{site.baseurl}}/images/daily-sun/nav-explo-0.png)
*Navigation exploration on news and social media apps*

As I explored different methods of navigation, I saw most apps used either a _side menu _or a _bottom navigation bar_ or a combination of both. I created a pros and cons table to consider which would best fit our needs.

I also realized three of the features we defined earlier needed more clarity:

1. Trending Topics- What does it mean for news to be “popular” or “trending”? When would users be interested in this information?
2. Search- In what situations do users search? How often do they search? (And subsequently, how much hierarchy should the Search feature have?)
3. Notifications- How should notifications be accessed? Could it be a setting of a personalized news feed? Or an item in the Settings menu? Could notifications be accessed in multiple locations?

In order to explore both the methods of navigation as well as the three features, I created **four low-fidelity prototypes** on Invision to test on users.

My objectives for this round of user testing were

1. To identify priority features (from Main Feed, Section Feed, Search, Trending, Bookmarks, Notifications, Settings) based on how user’s read news on apps
2. To understand how and to what degree users want to control notifications on news apps
3. To understand why users would use a search function

**For an indepth look at the testing system I used, see [this document.](https://docs.google.com/document/d/1WZl-hBzpHc7E3EqnoCcz2KIqEXcSWEYDYm6nY5Vr7SA/edit#)**

A summary of my user research is presented below:

1. Navigation: A majority of users liked the **bottom navigation bar** so that they could see all the features that could be accessed. We also saw many tech/social media apps have this navigation method, and thought it would be “on trend” with other apps.
2. **The Main Feed is the most important feature of the app**. Users wanted to read what The Sun was reporting on, rather than specific interests or topics.
3. Search: Many users don’t normally search for news, and if they hear of something that’s been talked about a lot lately, they just look to the home/main feed. Nevertheless, it’s a standardized feature, and something users don’t think about when they don’t need it, but when they need, it should be there.
4. Notifications: I learned that notifications don’t_ need to be as easily accessible_ as we originally thought. Nearly all users would navigate to Settings in order to set Notifications. Setting up notifications only needs to be set up once and wouldn’t be frequently returned to.
5. Trending/Popular: Users did not like a personalized news feed based on interests. Perhaps the scope of stories on The Sun is not wide enough that this feature would be necessary. Seeing what is “trending” would be interesting, but perhaps unnecessary.

After deciding on the bottom navigation bar as the method of navigating the app, we could layout the structure and the relationship between the app’s features. Clarifying users behaviors around Search, Notifications, and Trending/Popular News early on helped us refine these features later on.

![]({{site.baseurl}}/images/daily-sun/nav-earlyPrototype.png)
*Mockup of Navigation Prototype: Final bottom bar navigation with five menu items: Main Feed, Sections, Bookmarks, Search, Settings.*

### Onboarding: Getting users started

Goal: Determine whether to implement onboarding, what should be onboarded, whether to require login in onboarding, whether to require login for certain app features (bookmarks) or at all.

I was rather excited to tackle this design challenge, as I personally dislike most onboarding procedures that I have experienced. I decided to research the purpose and function of Onboarding from a user experience and usability perspective.

#### Research & Inspirations

##### To log in or not to login?

We met with our development team to get a better understanding of the process of logging in from the developer side. I learned that while saving articles and user preferences can be done without a login (via “anonymous tokens”), it is much better to be done _with_ a login, so that data can sync across multiple devices or so that data is saved in the event that the device is lost.

From my research, I learned that logins are typically required for e-commerce (ex. Amazon) or subscription based products/services (ex. The NY Times). Users cannot fully access and use these services without first creating an account and logging in. The Nielsen Norman Group refers to this as the _Login Wall_ and according to their usability heuristics,  ["sites should use them only if users will benefit significantly from the presence of these walls"](https://www.nngroup.com/articles/login-walls/). For e-commerce sites, users cannot purchase anything without creating an account. These sites also provide the ability to save user data (previous purchases, bookmarked articles.)

The Cornell Daily Sun App does not require a subscription for reading. Personalized data would mean integration with one’s existing subscription and the desktop site, which doesn’t currently require a login. **I decided against having a login** for the Daily Sun App.

##### The Why and How on Onboarding

In general, the purpose of user onboarding is to show the user how this product will[ satisfy the user’s desire](https://www.appcues.com/blog/the-5-best-user-onboarding-experiences/). The key is understanding who the user is, as well as their desire: why are they interested in this product, what are their motivations or pains? The app’s opening screen and onboarding process is the first step, and therefore the most crucial, in maintaining the user’s interest and retention.

I liked this piece of advice from [Upland Localytics](https://uplandsoftware.com/localytics/resources/blog/app-onboarding-101-7-tips-for-creating-engaged-informed-users/):

**Do→Show→Tell**

Engage the user instead of simply informing them and show (images/illustrations are better than text) them the value of the product. “People don’t care about features - they care about what they can do with those features” And this makes users feel as though onboarding is not a waste of time.

I also looked at a collection of Onboarding flows on [User On Board](http://www.useronboard.com/onboarding-teardowns/) for research and inspiration.

![]({{site.baseurl}}/images/daily-sun/onboarding-inspo1.png)
*Onboarding Inspiration*

#### Design Explorations

![]({{site.baseurl}}/images/daily-sun/onboarding-explo-0.png)
*Onboarding Exploration*

In addition to exploring the UI and user flow, I asked what **content** is most effective in getting users to start the onboarding flow? A table of my explorations are shown below:

   1. Customize Notifications/News

    Instruction: What are you interested in? What are your interests?
Change later
Action: Done, Next

   2. Set up Notifications

    Action: Send me Updates, Turn on notifications, make sure you don’t miss important news

   3. Skip

    Action: Maybe later, No thanks, Not now, Nah, Skip for now

#### Design Iterations and Decisions

I recalled from my **research** **earlier** that the overwhelming majority of users are more interested in headline news than specific sections. Thus I decided to give the user the option to opt in to “Breaking News” in the onboarding, and allow them to explore turning on notifications for specific sections later on in the Settings menu. The flow for the Onboarding would be:

   Load Screen

    →

   Value Proposition

    →
   Confirm/Deny Breaking News Notifications
    →
   First screen of App (Main Feed)

In addition to making the onboarding useful and functional, I wanted it to be a fun and delightful experience for the user. It should be something that greeted the user and gave the app character. I played with the idea of having illustrations and images that would connect users to the Cornell campus, and give a sense of belonging to the Cornell community. I chose to illustrate Klarman Hall, as it is one of the main meeting locations for the Editorial Board of The Daily Sun. The second illustration is of the Cornell Clocktower and Uris Library, which is not only an icon of Cornell’s campus, but also the view from the window of the room where our app team would meet.

![]({{site.baseurl}}/images/daily-sun/onboarding-illustration0.png)
*Digital notebook illustration of Klarman Hall*

![]({{site.baseurl}}/images/daily-sun/Klarman.jpg)
*Klarman Hall. image credit: For Build Welliver from [https://www.buildwelliver.com/projects/cornell-university-klarman-hall-humanities-building](https://www.buildwelliver.com/projects/cornell-university-klarman-hall-humanities-building)/*

![]({{site.baseurl}}/images/daily-sun/onboarding-illustration1.png)
*Digital notebook illustration of the Cornell Clocktower*

![]({{site.baseurl}}/images/daily-sun/ClocktowerUrisLibrary.jpg)
*Cornell University Clock Tower. image credit: By Cornell010 at the English language Wikipedia, CC BY-SA 3.0, [https://commons.wikimedia.org/w/index.php?curid=16963761](https://commons.wikimedia.org/w/index.php?curid=16963761).*

My last iterations explored the interaction of the user flow: how would users go to the next screen? I designed various buttons and arrows to explore this interaction.

![]({{site.baseurl}}/images/daily-sun/onboarding-explo-3.png)
*Iteraction exploration*

#### Final Design

Although I was skeptical at first about Onboarding for The Daily Sun App, I believe the outcome is simple and effective for new users. It accomplishes two main goals: introducing the value proposition of the app and offering Breaking News Notifications, while also connecting to users to a sense of place.

![]({{site.baseurl}}/images/daily-sun/onboarding-finalflow.png)
*Final onboarding flow*

### Visual Design System: Crafting a cross-platform experience

We stitched all of our screens and features together by creating a cohesive visual design system that referenced The Sun’s existing design. In addition to the print newspaper, The Daily Sun has a website and email newsletter.

When we began high-fidelity iterations, we met with the Managing Editor and Design Editor of The Sun so they could share with us the design elements. I also expressed interest in creating icons for their newspaper’s sections in order to visually communicate what those sections would be about.

![]({{site.baseurl}}/images/daily-sun/designsystem-styleguide.png)
*Style guide*

![]({{site.baseurl}}/images/daily-sun/designsystem-sectionicons.png)
*Section icons*

![]({{site.baseurl}}/images/daily-sun/designsystem-sketchsymbols.png)
*Headers and navigation icons*


text:
# English to Bengali Flash Card App

Learn english word with bengali word meaning with a beautiful interface. It has more than 1700 frequently used words
in English.

## Feature
* Random English Word
* Show Bengali word meaning of that English word

### Word list repo
Please contribute to this word list and help to grow. 😊

[word list repo](https://github.com/kmhmubin/frequency-words-in-english-to-bangla-list)

### App Demo
![app demo](https://github.com/kmhmubin/Flash-Card/blob/main/word-card-demo.gif)

## Installation
* Download the project file
* create a new python environment using either **venv** or **conda**
* install **pandas** modules
  ```bash
  pip install pandas
  or
  conda install pandas
  ```
* run the app from terminal using following command
    ```bash
        python main.py
    ```


text:
# Ardutils
A simple lightweight utility library intended for use with Arduino and Arduboy projects.

**_Work In Progress_**
(i.e. Please don't complain if a change breaks your code)

## About

This library provides highly generic utilities to that should be suitable for all kinds of programs.
Most of the classes and functions provided are templated so that they're only instantiated as required.
Many classes are also designed to favour size over speed as they are designed for embedded environments.

## Aims

- Code should feature primarily general purpose utilities rather than domain-specific utilities.
- Compiled code should be as small as possible so that the library is lightweight.
- Code should be templated to provide flexibility and genericity.
- All code should be const correct.

## Planned Features

- [ ] WrappedValue.h
- [ ] StaticWrappedValue.h
- [x] TypeTraits.h
- [ ] CStdDef.h
- [ ] Possibly Rename Vector2 to Vector
- [ ] Possibly Rename Point2 to Point
- [x] Rectangle.h
- [ ] Circle.h
- [ ] Dequeue

## To Do

- [ ] Fix Rectangle's Offset function for unsigned numbers.

***

# Features

## Point2 & Vector2

Simple point and vector classes.
To use these properly, remember that a point represents a point in space and a vector represents a direction,
therefore it only makes sense to add a vector to a point, and it does not make sense to add a point to a vector.

## List, Stack, Queue

Simple fixed-capacity, variable content collection classes.
Lists are add-to end, remove anywhere, resize on removal.
Stacks are first-in last-out.
Queues are first-in first-out.

## Clamped Values

Used for numeric types where the acceptable range of values must be clamped between a minimum and a maximum.
Available in two forms, one where min and max can vary and one where min and max are defined at compile time in the template itself.

## Range

A simple means of expressing a range of integer values.

## Rectangle

Represents a rectangle with its origin at the top left corner.

## Type Traits

A minimal implementation of some of the traits normally available via the C++ stdlib (which Arduino doesn't have).
These are mainly used for compile time assertions, optimisations and other advanced techniques.

***

# Notices

## Ardutils/Details

Please do not touch the things in the Details folder.
These are implementation details that are both unfinished and are very likely to change so they will probably break your code.

## Ardutils/TypeTraits

It is also considered bad to try to include anything from the TypeTraits folder in your own code.
It probably won't break in most cases, but it has the potential to break in the future due to changing dependencies.

repository: spacebruce/sFTL

repo_name: spacebruce/sFTL


text:
# graphql-subscriptions-anysocket
Simple PubSub that can receive a socket at creation and manages subscribe and unsubscribe

To be attached to any already created socket.

`import {AnySocketPubSub} from 'graphql-subscriptions-anysocket';`

`const pubsub = new AnySocketPubSub(socket);`

In fact works with anything that supports `on` and `off`

repository: polst/graphql-subscriptions-anysocket

repo_name: polst/graphql-subscriptions-anysocket


text:
---
layout: page
title: About

# The About page
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2017-2019 Cotes Chung
# MIT License
---

404: PAGE NOT FOUND

Sorry, we might have misplaced that URL or it's pointing to something that doesn't exist.

Head back Home to try finding it again, or search for it on the Archives page.


text:
# scGNN

## About:

__scGNN__ (**s**ingle **c**ell **g**raph **n**eural **n**etworks) provides a hypothesis-free deep learning framework for scRNA-Seq analyses. This framework formulates and aggregates cell-cell relationships with graph neural networks and models heterogeneous gene expression patterns using a left-truncated mixture Gaussian model. scGNN integrates three iterative multi-modal autoencoders and outperforms existing tools for gene imputation and cell clustering on four benchmark scRNA-Seq datasets.

This repository contains the source code for the paper **scGNN is a novel graph neural network framework for single-cell RNA-Seq analyses**. Juexin Wang*, Anjun Ma*, Yuzhou Chang, Jianting Gong, Yuexu Jiang, Hongjun Fu, Cankun Wang, Ren Qi, Qin Ma*, Dong Xu*. Nat Commun 12, 1882 (2021). <https://www.nature.com/articles/s41467-021-22197-x>

**BibTeX**

```latex
@article{Wang_2021_scGNN,
	author = {Juexin Wang, Anjun Ma, Yuzhou Chang, Jianting Gong, Yuexu Jiang, Hongjun Fu, Cankun Wang, Ren Qi, Qin Ma, Dong Xu},
	title = {cGNN is a novel graph neural network framework for single-cell RNA-Seq analyses},
	year = {2021},
	doi = {10.1038/s41467-021-22197-x},
	publisher = {Springer Nature},
	journal = {Nature Communications}
}
```
--------------------------------------------------------------------------------

## Installation:

Installation Tested on Ubuntu 16.04, CentOS 7, MacOS catalina with Python 3.6.8 on one NVIDIA RTX 2080Ti GPU.

### From Source:

Start by grabbing this source codes:

```bash
git clone https://github.com/juexinwang/scGNN.git
cd scGNN
```

### Option 1 : (Recommended) Use python virutal environment with conda（<https://anaconda.org/>）

```shell
conda create -n scgnnEnv python=3.6.8 pip
conda activate scgnnEnv
pip install -r requirements.txt
```

If want to use LTMG (**Recommended** but Optional, will takes extra time in data preprocessing):
```shell
conda install r-devtools
conda install -c cyz931123 r-scgnnltmg
```

### Option 2 : Direct install individually

Need to install R packages first, tested on R >=3.6.1:

In R command line:

```R
install.packages("devtools")
library(devtools)
install_github("BMEngineeR/scGNNLTMG")
```

Then install all python packages in bash.

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

### Option 3: Use Docker (Temporarily not available)

Download and install [docker](https://www.docker.com/products/docker-desktop).

Pull docker image **gongjt057/scgnn** from the [dockerhub](https://hub.docker.com/). Please beware that this image is huge for it includes all the environments. To get this docker image as base image type the command as shown in the below:

```bash
docker pull gongjt057/scgnn:code
```

Type `docker images` to see the list of images you have downloaded on your machine. If **gongjt057/scgnn** in the list, download it successfully.

Run a container from the image.

```bash
docker run -it gongjt057/scgnn:code /bin/bash
cd /scGNN/scGNN
```

Then you can proceed to the next step.

## Quick Start

scGNN accepts scRNA-seq data format: CSV and 10X

### 1. Prepare datasets

#### CSV format

Take an example of Alzheimer’s disease datasets ([GSE138852](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE138852)) analyzed in the manuscript.

```shell
mkdir GSE138852
wget -P GSE138852/ https://ftp.ncbi.nlm.nih.gov/geo/series/GSE138nnn/GSE138852/suppl/GSE138852_counts.csv.gz
```

#### 10X format

Take an example of [liver cellular landscape study](https://data.humancellatlas.org/explore/projects/4d6f6c96-2a83-43d8-8fe1-0f53bffd4674/expression-matrices?catalog=dcp1) from human cell atlas(<https://data.humancellatlas.org/>). Click the download link of 'homo_sapiens.mtx.zip' in the page, and get 4d6f6c96-2a83-43d8-8fe1-0f53bffd4674.homo_sapiens.mtx.zip. (It looks like they does not provide direct download link anymore)

```shell
mkdir liver
cd liver
mv ~/Download/4d6f6c96-2a83-43d8-8fe1-0f53bffd4674.homo_sapiens.mtx.zip .
unzip 4d6f6c96-2a83-43d8-8fe1-0f53bffd4674.homo_sapiens.mtx.zip
cd ..
```

### 2. Preprocess input files

This step generates Use_expression.csv (preprocessed file) and gets discretized regulatory signals as ltmg.csv from Left-Trunctruncated-Mixed-Gaussian(LTMG) model (Optional but recommended).

In preprocessing, parameters are used:

- **filetype** defines file type (CSV or 10X(default))
- **geneSelectnum** selects a number of most variant genes. The default gene number is 2000
- **inferLTMGTag** (Optional) add --inferLTMGTag to infer LTMG in preprocessing. Need to install r-scgnnltmg. The running time of inferring LTMG is depended on the cell number and gene number selected, i.e. ~10 minutes in GSE138852 and extra ~13 minutes in data liver.

#### CSV format

Cell/Gene filtering without inferring LTMG:
```shell
python -W ignore PreprocessingscGNN.py --datasetName GSE138852_counts.csv.gz --datasetDir GSE138852/ --LTMGDir GSE138852/ --filetype CSV --geneSelectnum 2000
```

(Optional) Cell/Gene filtering and inferring LTMG:
```shell
python -W ignore PreprocessingscGNN.py --datasetName GSE138852_counts.csv.gz --datasetDir GSE138852/ --LTMGDir GSE138852/ --filetype CSV --geneSelectnum 2000 --inferLTMGTag
```

#### 10X format

Cell/Gene filtering without inferring LTMG:
```shell
python -W ignore PreprocessingscGNN.py --datasetName 481193cb-c021-4e04-b477-0b7cfef4614b.mtx --datasetDir liver/ --LTMGDir liver/ --geneSelectnum 2000 sparseOut
```

(Optional) Cell/Gene filtering and inferring LTMG:
```shell
python -W ignore PreprocessingscGNN.py --datasetName 481193cb-c021-4e04-b477-0b7cfef4614b.mtx --datasetDir liver/ --LTMGDir liver/ --geneSelectnum 2000 --inferLTMGTag
```

### 3. Run scGNN

We take an example of an analysis in GSE138852. Here we use parameters to demo purposes:

- **batch-size** defines batch-size of the cells for training
- **EM-iteration** defines the number of iteration, default is 10, here we set as 2.
- **quickmode** for bypassing cluster autoencoder.
- **Regu-epochs** defines epochs in feature autoencoder, default is 500, here we set as 50.
- **EM-epochs** defines epochs in feature autoencoder in the iteration, default is 200, here we set as 20.
- **no-cuda** defines devices in usage. Default is using GPU, add --no-cuda in command line if you only have CPU.
- **regulized-type** (Optional) defines types of regulization, default is noregu for not using LTMG as regulization. User can add --regulized-type LTMG to enable LTMG.

If you want to reproduce results in the manuscript, please use default parameters.

#### CSV format

For CSV format, we need add **--nonsparseMode**

Without LTMG:
```bash
python -W ignore scGNN.py --datasetName GSE138852 --datasetDir ./  --outputDir outputdir/ --EM-iteration 2 --Regu-epochs 50 --EM-epochs 20 --quickmode --nonsparseMode
```

(Optional) Using LTMG:
```bash
python -W ignore scGNN.py --datasetName GSE138852 --datasetDir ./ --LTMGDir ./ --outputDir outputdir/ --EM-iteration 2 --Regu-epochs 50 --EM-epochs 20 --quickmode --nonsparseMode --regulized-type LTMG
```

#### 10X format

Without LTMG:
```bash
python -W ignore scGNN.py --datasetName 481193cb-c021-4e04-b477-0b7cfef4614b.mtx --datasetDir liver/ --outputDir outputdir/ --EM-iteration 2 --Regu-epochs 50 --EM-epochs 20 --quickmode
```

(Optional) Using LTMG:
```bash
python -W ignore scGNN.py --datasetName 481193cb-c021-4e04-b477-0b7cfef4614b.mtx --LTMGDir liver/ --datasetDir liver/ --outputDir outputdir/ --EM-iteration 2 --Regu-epochs 50 --EM-epochs 20 --quickmode --regulized-type LTMG
```

On these demo dataset using single cpu, the running time of demo codes is ~33min/26min. User should get exact same results as paper shown with full running time on single cpu for ~6 hours. If user wants to use multiple CPUs, parameter **--coresUsage** can be set as **all** or any number of cores the machine has.

### 4. Check Results

In outputdir now, we have four output files.

- ***_recon.csv**:        Imputed gene expression matrix. Row as gene, col as cell. First row as gene name, First col as the cell name.

- ***_embedding.csv**:    Learned embedding (features) for clustering. Row as cell, col as embeddings. First row as the embedding names (no means). First col as the cell name.

- ***_graph.csv**:        Learned graph edges of the cell graph in tuples: nodeA,nodeB,weights. First row as the name.

- ***_results.txt**:      Identified cell types. First row as the name.

For a complete list of options provided by scGNN:

```bash
python scGNN.py --help
```

More information can be checked at the [tutorial](https://github.com/juexinwang/scGNN/tree/master/tutorial).

Another repository for reviewers is located at [here](https://github.com/scgnn/scGNN/).

### Notes:
We recommend users to infer LTMG from their datasets. LTMG can improve performance on our benchmarks despite it consumes extra time in data preprocessing. We also provide supports without LTMG to save running time.

## History:
- 2021-11-10: Fix a bug causing cluster autoencoder and iteration problems.

## Reference:

1. VAE <https://github.com/pytorch/examples/tree/master/vae>
2. GAE <https://github.com/tkipf/gae/tree/master/gae>
3. scVI-reproducibility <https://github.com/romain-lopez/scVI-reproducibility>
4. LTMG <https://academic.oup.com/nar/article/47/18/e111/5542876>

## Contact:

Juexin Wang<EMAIL_ADDRESS>
Anjun Ma<EMAIL_ADDRESS>
Qin Ma<EMAIL_ADDRESS>
Dong Xu<EMAIL_ADDRESS>

repository: juexinwang/scGNN

gha_language: Python

repo_name: juexinwang/scGNN


text:
# Piggy Monitor

No we're not monitoring a piglet's growth.

We're monitoring our piggybank!

This will be an educational experiment for me to learn Ruby and at the same time do some household management.

So expect to see lots of fyi/reference-type comments for educational knowledge.

## What's involved

This is a ruby API service using Sinatra as the base.

Connected to Google Drive through [goodle-drive-ruby](https://github.com/gimite/google-drive-ruby).

Using rake to build my test.

## Starting the endpoint service

Sinatra just sits on top of rack. So why not utilize its simple startup process; thus the use of config.ru.

`rackup`

<small>fyi about rack: If you don't specify an environment, development is used by default. Specify then environment by including parameter `-E <ENV_NAME>`. If you specify an environment that you don't configure, no configuration block will match.</small>

### Run as development

Using [Guard](https://github.com/guard/guard) for in-process automated re-launching of rack.
`bundle exec guard`

## Run spec test

`rake test`

## The Database

The database is a spreadsheet on google docs, formatted by preference of my SO.
So that's the limitation I have to work with but that's fine with me.

If this ever kicks off well with her, the spreadsheet can be changed to something more of a database structure.

Note: the amounts should be in pure numeric text.

This is the, strict, spreadsheet layout

![](spreadsheet_example_for_readme.png)

repository: jonyeezs/PiggyBanker

gha_language: Ruby

repo_name: jonyeezs/PiggyBanker


text:
# Notes About Data Structures and Algorithms

## Queue
An ordered collect of items, like a line, where the first element in is the first one out. **FIFO**. Picture this like a line at a store: first person in line is the first one who is called to the counter.

### Interview Questions

1. Implement this as a JS Class
2. "Weave" together to queues by alternating the first from each queue
3. Implement a Queue using stacks (poping items from one stack to another reverses it, effectively making it a queue. Go from there.)

## Stack

An ordered collection of items, like a pile, where the first element in is the last element out. **FILO**. Picture this is a stack of records. The last on put on is the first one picked up off the pile.

### Interview Questions

1. Implement a queue using two stacks. See above.
   **Solution:** Moving a stack onto another stack reverses the stack essentially making it a queue

## Linked List

A list of nodes where each node contains some data and directions to the next node. The first item in the list is called the *head node* and the last is called the *tail node*. The refernce in the tail node is null.

### Interview Questions

1. Determine if a linked-list is circular (if the is no node pointing to `null`)
   **Solution:** Use two variables, fast and slow to move through the linked list at different rates (+1 and +2). If they ever point to the same node then the list is circular
2. Find the midpoint of a linked list
   **Solution:** Use two variables, fast and slow to move through the linked list at different rates (+1 and +2). When fast gets to the end, slow is at the midpoint
3. Find the *n*th from the last node.
   **Solution:** Use two variables, ahead and behind to move through the linked list. Start `ahead` *n* indexes ahead of behind. When `ahead` reaches the end, `behind` is at the correct index

## Tree

Each location on the tree is called a **node**. Each node contains data and a list of the nodes children (not recursively). "Parent, child" is used to describe this relationship. Nodes with the same parent are called siblings. Trees have a `root` node which is the top / highest level of the tree. It's the equivalent to a `head` in a linked list

Unlike linked lists, the `add()` and `remove()` methods live on the `Node` not on `Tree`. Imagine if you tried to call `add()` on the tree, how would you know where to add the new node. Because the structure is more varied, we modify the nodes more directly.

**Tree Traversal** is iterating through every element in the tree. This can be done **depth-first** or **breadth-first**.

**Breadth-first:** Iterate level by level

**Depth-first:** Go into the children of each node when we encounter them before moving to the sibling.

**Binary Tree** - Each node has, at-most, 2 children.

**Binary Search Tree** - Each node can have up-to 2-children. They are called the left-node and the right-node. The data in a node is also restricted: the left-node is always less than the data and the right-node is greater than the data. The left- and right-nodes are usually assigned to properties instead of as an array. The data is usually called value or key.

### Interview Questions

1. Implement a depth-first search and a breadth-first search of a tree.
   **Solution:** Have a placeholder array into which go the children of each node you encounter. For a breadth first tree, the children go in at the end (FILO) and for a depth first tree, the children go in at the start (FIFO)
2. Determine the width of each level of a tree
   **Solution:** Very similar to above. Start with array for the children like above, but have it be filled with `[0, null]` where `null` is a marker between levels of the tree. When you reach `null` have your width counter/tracker move to the next level.
3. Validate a binary search tree (confirm that the left node is always less than the right node)
   **Solution:** Recursively call a validator function on each node with two additional parameters `min` and `max`. Whenever you are about to move to a left child, set the max to the current node's data, since that is the max value the left child can be. When you move right, set the min. Call this recursively, returning true all the way up or returning false if anything is out of place.

## Sorting Algorithms

When solving a problem, you can assume that, at worst, sorting will be O(n*log(n))

### Bubble Sort

O(n^2) at the worst case. Inefficient with large collections of data (or unknown sizes).

Iterate through array, comparing each element with the one after it. If they are out of order, swap them. After the first pass through the array, the largest element is guaranteed to be at the end. Repeat, but only up to the second to last element. Now the last two are the largest two in the correct order. Repeat until done.

### Selection Sort

O(n^2) at the worst case. Inefficient with large collections of data (or unknown sizes).

Selects the minimum value in the array and places in the front, then looks through the rest of the array (starting at index 1) and finds the min of that subarray, putting the result at index 1. Repeats with the subsubarray...

### Merge Sort

O(n*log(n))

Recursively splits arrays in half until array's length is 1. Then uses a helper function to merge (or weave) the functions back together in the appropriate order.

repository: TylerAuer/cheat-sheets-and-tutorials

repo_name: TylerAuer/cheat-sheets-and-tutorials


text:
# Habitat Documentation

## Current Status

SPARC installs as a single habitat package.

All of the habitat stuff is in the `habitat/sparc-request-base` folder.

[Puma](http://puma.io) is used as the webserver and [delayed_job](https://github.com/collectiveidea/delayed_job)
is used for background processing.

Habitat starts the [eye](https://github.com/kostya/eye) process monitor which starts puma and delayed_job.

The rails application code will be installed to the `/hab/pkgs/....` directory with symlinks for `log`, `tmp`,
and `public/system` (file uploads) created pointing to `/hab/svc/sparc-request`

| app path | real path |
| ---------|-----------|
| log | /hab/svc/sparc-request/var/log |
| tmp | /hab/svc/sparc-request/var/tmp |
| public/system | /hab/svc/sparc-request/data |

The `application.yml`, `ldap.yml`, `epic.yaml`, and `database.yml` files are symlinked to point to `/hab/svc/sparc-request/config`

Eye runtime data is stored in `/hab/svc/sparc-request/var/.eye`
Puma output is logged to `/hab/svc/sparc-request/var/log/puma.log`
Delayed Job output is logged to `/hab/svc/sparc-request/var/log/dj-N.log`

## Commands

### OPS

- Install SPARC: `hab pkg install sparc-request/sparc-request`
- Start SPARC: `hab start sparc-request/sparc-request`
- Cause migrations & database tasks to run the next time the package is started: `mkdir -p /hab/svc/sparc-request/data/migrate && touch /hab/svc/sparc-request/data/migrate`
- Follow the web process log: `less -R +F /hab/svc/sparc-request/var/log/puma.log`
- Follow the delayed_job log: `less -R +F /hab/svc/sparc-request/var/log/dj-1.log`
- To customize configuration `mkdir -p /hab/user/sparc-request/config && cp $(hab pkg path sparc-request/sparc-request)/default.toml /hab/user/sparc-request/config/user.toml` . Now you make your changes in `user.toml` and they override `default.toml` **requires habitat version > 0.52**

In order to run `eye` or `rails` commands you need to source the environment.

`. /hab/svc/sparc-request/config/dotenv`

- Get info of running services: `leye info`
- Rails console: `cd $RAILS_ROOT && bin/rails c`

### Development

*eye is not part of the bundle, `gem install eye` to use it*

- Test eye config: `eye load habitat/sparc-request-base/config/sparc.eye -f`

## Changes

### 2017-11-17
The architecture of the habitat packages changed from three packages to one package in order to simplify the update process.

The habitat supervisor detects when a new version of a package is available and will download and update it locally, _but_
because of how we were structured we could get into race conditions and updates being downloaded but not applied because
the update process does no cooridination with dependent services.

The deployment process also changed from copying all of the rails code down to the `/hab/svc/sparc-request` directory so that
start up time is much faster.

## Known Issues

### 2017-11-17

In habitat version 38 (possibly others) running a studio inside a linux vm is broken. So be cautious about using the
vagrant box for package development. I have been building packages in the docker habitat studio on my mac and then
installing them inside the vagrant VM to test. The primary reason to install inside the VM at this point is because
it is simpler to have the `MySql` server running as a service than a habitat package inside the studio. -- CO-UIOWA

## FAQ

**Q.** Why are you using a process monitor?

**A.**

delayed_job and puma both need to operate on the same set of ruby files **and** have the same configuration. Because we
are letting habitat control some of this configuration (that's the `habitat/config/**` file copies) those files won't
have their variables replaced until a service is **started**. The config files in `/hab/pkgs/***` are templates and they
need variables expanded. When that happens the config files go to `/hab/svc/**`

Either the delayed_job service and web service have to have their own copies of all of the files   **or** they have to
have a common set that they share.

I do not think you can have the delayed_job service _depend on_ the web service you'll have a race condition or you might
as well have them be in a single because you could never run the delayed_job service on another server without also running
the web service on that server which seems like it would be the main reason to separate them anyway.

So your other option is what we did before which was to have a common _base_ package that handles all the files. But this
has the problem of you still need that base to _run_ so your config files get generated but it doesn't do anything and
is why the old way I did it was to have the run hook `sleep infinity`. But now you have the race condition on updates where
you need the init hook of the base package to run and after it's done then the other services get restarted but habitat
doesn't work that way.

**Q.** Why use `eye` and not `god`, `bluepill`, `foreman`, `monit`?

**A.**

Of all of those choices, `eye` was the only one that has a mode that shuts down all the processes when
the eye process stops. This is the behavior we want because it is consistent with what the habitat
supervisor does where if you kill the supervisor everything else stops too.

**Q.** What about habitat composite packages?

**A.**

They don't (as of 2017-11-17) address update coordination

**Q.** What sort of stuff should I test with my deployment

1. Do file uploads work and can the files be downloaded? There's lot's of places that permissions could get missed along this path

repository: sparc-request/sparc-request

repo_name: sparc-request/sparc-request


text:
# Pre-work - *PandaKeeper*

**PandaKeeper** is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item.

Submitted by: **Rahul Pandey**

Time spent: **12** hours spent in total

## User Stories

The following **required** functionality is completed:

* [x] User can **successfully add and remove items** from the todo list
* [x] User can **tap a todo item in the list and bring up an edit screen for the todo item** and then have any changes to the text reflected in the todo list.
* [x] User can **persist todo items** and retrieve them properly on app restart

The following **optional** features are implemented:

* [x] Persist the todo items [into SQLite](http://guides.codepath.com/android/Persisting-Data-to-the-Device#sqlite) instead of a text file
* [x] Improve style of the todo items in the list [using a custom adapter](http://guides.codepath.com/android/Using-an-ArrayAdapter-with-ListView)
* [x] Add support for completion due dates for todo items (and display within listview item)
* [ ] Use a [DialogFragment](http://guides.codepath.com/android/Using-DialogFragment) instead of new Activity for editing items
* [x] Add support for selecting the color label of each todo item (and display in listview item)
* [x] Tweak the style improving the UI / UX, play with colors, images or backgrounds

The following **additional** features are implemented:

* [x] Used a viewpager so user can swipe between tasks on the detail view.
* [x] Each task object has a title, additional details, color (can be used for prioritization), and due date.
* [x] Tasks in list view are ordered by due date.

## Video Walkthrough

Here's a walkthrough of implemented user stories:

<img src='http://i.imgur.com/8TKqrnA.gif' title='Video Walkthrough' width='' alt='Video Walkthrough' />

GIF created with [LiceCap](http://www.cockos.com/licecap/).

## Notes

Passing the task object between fragments caused me some confusion, and there's likely a cleaner way to do it. I'm also querying the SQLite database in each on click handler, so I'm wondering if there's a better way to do that without repeating code.

I also would like to better communicate between different parts of the app. For example, when one button of the color grid is tapped (for selecting a task's color label), I'd like to de-select the other buttons. I know it is possible to pass events using EventBus, so a larger app could certainly use that to streamline communication.

Another library which would have made my code much cleaner would have been Butterknife.

## License

    Copyright 2015, Rahul Pandey

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

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.