text:
# Online-Offline-Budget-Trackers
## Author
  Santiago Hincapie

  ![gitHub License](https://img.shields.io/badge/License-MIT-blue)

---

  ## Description

  This application track withdrawals and deposits with or without a data/internet connection.

  Live link: https://hidden-cove-32062.herokuapp.com/
---

  ## Table of Contents
  * [Installation](#installation)
  * [Usage Information](#Usage-Information)
  * [Contribution Guidelines](#Contribution-Guidelines)
  * [Test Instructions](#Test-Instructions)
  * [Questions](#Questions)

---

  ## Installation
  This application requires Node.js. It utilizes a nodes modules called mongoose, express, and mongoDB, which can be installed using node package manager.

---

  ## Usage-Information

 NA

---

  ## Contribution-Guidelines
  Feel free to contact me about contributions

---

  ## Test-Instructions
 NA

---

  ## Questions
  Feel free to contact me about any questions.
  * GibHub user name: SantiagoHR2020
  * GibHub link: https://github.com/SantiagoHR2020
  * E-mail: santiagohr81@hotmail.com


text:
Epinova.CRMFramework
====================

Epinova.CRMFramework allows developers to create, read, update and delete Microsoft Dynamics CRM entities from any .NET application. It supports operations on all standard and custom CRM entities and attributes, and retrieving one-to-one and one-to-many CRM entity relationships.

How does it work?
=================

Check out the [Epinova.CRMFramework 2.0 Overview](https://github.com/karolikl/Epinova.CRMFramework/wiki/Epinova.CRMFramework-2.0-Overview) page to see what the framework can do.

Looking for a framework compatible with Microsoft Dynamics CRM 2013?
====================================================================
Epinova.CRMFramwork 2.0 is compatible with Microsoft Dynamics CRM 2013, the only thing you have to do is replace the Microsoft.Xrm.Sdk assemblies with the updated 2013 assemblies found on Nuget.
There will be created a separate branch in this project compatible with Microsoft Dynamics CRM 2013 shortly.

Looking for a framework compatible with Microsoft Dynamics CRM 4.0?
===================================================================
Epinova.CRMFramework 1.0 is compatible with Microsoft Dynamics CRM 4.0, but it is still on [Codeplex](http://crmframework.codeplex.com/). It will be moved here shortly.

Contact
=======
Contact me on [Twitter](http://www.twitter.com/karolikl) if you have any questions or comments.

Credits
=======
A huge thanks to:
Jamie Miley, for offering his assistance and blogging about my framework
Harald Schult Ulriksen, for listening to me complain and not being there

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: "sidebarright"
title: "FME Platform - Inspire Helsinki 2019 Data Challenge"
description: "Set of professional spatial data processing tools provided by Safe Software"
page: "tools-fme"
sidebar:
  content: "
"
---

# FME Platform

One central goal of INSPIRE is to promote data sharing in order to better manage the natural environment, spatial planning and impacts related to human safety and quality of life. The Helsinki Data challenges involve integrating INSPIRE themes with other data sources. As a leading spatial data integration platform, FME makes it easy to combine INSPIRE data with whatever other data sources might be needed to address your chosen challenge - whether it be open standards related, event driven, crowd sourced or proprietary.

[Safe Software](https://www.safe.com/) provides free access to our full range of FME tools for the duration of the INSPIRE Helsinki 2019 Data Challenge to all interested teams. This includes [FME Desktop](https://www.safe.com/fme/fme-desktop/) and [FME Server](https://www.safe.com/fme/fme-server/) licenses and [FME Cloud](https://www.safe.com/fme/fme-cloud/) access. Con terra is also providing free licensing for the INSPIRE Solution Pack for FME.

To install FME, first download the appropriate installer, and then request an FME license using the Helsinki Challenge web form link below.

## FME Desktop and Server
For FME Desktop and Server downloads, please download the appropriate installer from [the FME Downloads page](https://www.safe.com/support/support-resources/fme-downloads/). We recommend using FME 2019.1 (expected release date July 10).

For Desktop and Server licenses submit your request using the special Inspire Helsinki 2019 Data Challenge [FME License Request form](http://go.safe.com/l/702933/2019-06-25/9fcq)

## FME Cloud
For access to FME cloud you can either set up your own instance or contact us to get a login to a shared instance set up for specifically for the data challenge.

* To create an account on the shared instance, contact<EMAIL_ADDRESS>* To set up your own instance with 250 hours of credit, see the [FME Cloud page](https://www.safe.com/fme/fme-cloud/)

## Con terra INSPIRE Solution Pack for FME
con terra’s [INSPIRE Solution Pack (ISP) for FME](https://con-terra.com/portfolio/inspire-solution-pack-fme) simplifies the INSPIRE data generation process considerably, so please contact them for more information and for theme specific examples.

For a trial license please mention ‘INSPIRE Helsinki Challenge’ and contact:
Email<EMAIL_ADDRESS>
## Learning FME and INSPIRE
We also provide a full range of resources related to learning FME and implementing INSPIRE Solutions.

* [General Documentation](https://knowledge.safe.com/page/documentation/index.html)
* [Online training](https://www.safe.com/training/recorded/)

### Overview
* [Integrate INSPIRE GML Using FME](https://www.safe.com/integrate/inspire-gml/)
* [FME Solutions for INSPIRE](https://cdn.safe.com/resources/spotlights/FME-Solutions-for-INSPIRE.pdf) (pdf)
* [INSPIRE Success Stories with FME](https://www.safe.com/webinars/inspire-success-stories-with-fme/)

### Technical
* [Tutorial: EU INSPIRE Initiative](https://knowledge.safe.com/articles/1321/eu-inspire-initiative-tutorial.html)
* [INSPIRE Directive: 5 Tips for Providing Data to Europe’s SDI](https://www.safe.com/blog/2014/08/inspire-directive-europe-sdi/)
* [Efficiently Implementing INSPIRE & Creating INSPIRE Mashups with FME](https://www.safe.com/webinars/efficiently-implementing-inspire-creating-inspire-mashups-with-fme/)
* [FME Server demo: INSPIRE GML Validator](http://demos.fmeserver.com/fmepedia-inspire/)

### Conterra ISP for FME
* [INSPIRE in Practice: INSPIRE Solution Pack for FME](https://inspire-reference.jrc.ec.europa.eu/tools/inspire-solution-pack-fme)
* INSPIRE Solution Pack (ISP) for FME [In English](https://con-terra.com/portfolio/inspire-solution-pack-fme) or [In German](https://conterra.de/portfolio/fme/inspire-solution-pack-fme)

## Support
Participants will benefit from free support during the month of the challenge in order to support their use of the relevant INSPIRE themes, other relevant datasets from non-INSPIRE sources, and real time data feeds. Those using the FME platform will have access to FME templates of related workflows.

gha_license_id: MIT


text:
![Cryb OSS](.github/api-icon.png "@cryb/api Logo")

**@cryb/api** - _Core services_

[![GitHub contributors](https://img.shields.io/github/contributors/crybapp/api)](https://github.com/crybapp/api/graphs/contributors) [![License](https://img.shields.io/github/license/crybapp/api)](https://github.com/crybapp/api/blob/master/LICENSE) [![Patreon Donate](https://img.shields.io/badge/donate-Patreon-red.svg)](https://patreon.com/cryb) [![Chat on Discord](https://discord.com/api/guilds/594942455749672983/widget.png)](https://discord.gg/xdhEgD5)

## Docs

* [Info](#info)
  * [Status](#status)
* [Codebase](#codebase)
  * [Folder Structure](#folder-structure)
  * [Code Style](#code-style)
  * [First time setup](#first-time-setup)
    * [Installation](#installation)
  * [Running the app locally](#running-the-app-locally)
    * [Background services](#background-services)
    * [Starting @cryb/api](#starting-@cryb/api)
* [Questions / Issues](#questions--issues)

## Info

`@cryb/api` is the core service used to handle requests from clients over REST and WebSocket.

Events such as Room creation, user authentication and requests to `@cryb/portals` to create VM instances are sent from `@cryb/api`.

### Status

`@cryb/api` has been actively developed internally since August 2019, and is now open source as of October 2019.

## Codebase

The codebase for `@cryb/api` is written in JavaScript, utilising TypeScript and Node.js. Express.js is used for our REST API, while the WebSocket API uses the `ws` module.

MongoDB is used as the primary database, while Redis is used for cache and PUB/SUB.

### Code Style

We ask that you follow our [code style guidelines](https://github.com/crybapp/library/blob/master/code-style/STYLE.md) when contributing to this repository.

We use ESLint in order to lint our code. Run `yarn lint` before committing any code to ensure it's clean.

*Note: while we have most rules covered in our `.eslintrc.js` config, it's good practice to familarise yourself with our code style guidelines.*

### Folder Structure

```
cryb/api/
└──┐ src # The core source code
   ├── config # Config files for Redis, Passport, etc
   ├── controllers # Our REST route controller files
   ├── drivers # Methods used to talk to other microservices, such as @cryb/portals
   ├── models # Models for our a data types, such as users and rooms
   ├── schemas # Mongoose schema files
   ├── server # Our Express.js setup
   ├── services # Abstractions for Oauth2, etc
   └── utils # Helper methods
```

### First time setup

First, clone the `@cryb/api` repository locally:

```
git clone https://github.com/crybapp/api.git
```

#### Installation

The following services need to be installed for `@cryb/api` to function:

* MongoDB
* Redis

We recommend that you run the following services alongside `@cryb/api`, but it's not required.

* `@cryb/portals`
* `@cryb/aperture`

You also need to install the required dependencies by running `yarn`.

Ensure that `.env.example` is either copied and renamed to `.env`, or is simply renamed to `.env`.

In this file, you'll need some values. Documentation is available in the `.env.example` file.

### Running the app locally

#### Background Services

Make sure that you have installed MongoDB and Redis, and they are both running locally on port 27017 and 6379 respectively.

The command to start MongoDB is `mongod`, and the command to start Redis is `redis-server`.
Most Linux distributions will have those packaged, and will start automatically with your system.

If you're developing a feature that requires the VM infrastructure, then make sure `@cryb/portals` and `@cryb/aperture` are running.

#### Starting @cryb/api

To run `@cryb/api` in development mode, run `yarn dev`.

It is recommended that in production you run `yarn build`, then `yarn start`.

## Questions / Issues

If you have an issues with `@cryb/api`, please either open a GitHub issue, contact a maintainer or join the [Cryb Discord Server](https://discord.gg/xdhEgD5) and ask in `#tech-support`.

## License

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcrybapp%2Fapi.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcrybapp%2Fapi?ref=badge_large)

repository: crybapp/api

gha_language: TypeScript

repo_name: crybapp/api


text:
# CS208
Data Structures and Algorithm in C - Coursework
Assignments for CS208

**Completed Assignments: 12/12**

### Assignment 1

- [Linear Search](https://github.com/rakshitraj/CS208/blob/master/assignment1/linearSearch.c)

### Assignment 2

Inserting element in an Array

- [Insert at the End of Array](https://github.com/rakshitraj/CS208/blob/master/assignment2/insertAtEnd.c)
- [Insert at the Beginning of Array](https://github.com/rakshitraj/CS208/blob/master/assignment2/insertAtHead.c)
- [Insert at a specified Position](https://github.com/rakshitraj/CS208/blob/master/assignment2/insertAtPos.c)
- [Insert element at its sorted position in the array](https://github.com/rakshitraj/CS208/blob/master/assignment2/insertAtSorted.c)

### Assignment 3

Deleting elements from an Array

- [Delete Element from HEAD](https://github.com/rakshitraj/CS208/blob/master/assignment3/deleteFromHead.c)
- [Delete Element from TAIL](https://github.com/rakshitraj/CS208/blob/master/assignment3/deleteFromTail.c)
- [Delete Element from position p](https://github.com/rakshitraj/CS208/blob/master/assignment3/deleteFromPos.c)
- [Delete from any position in the array](https://github.com/rakshitraj/CS208/blob/master/assignment3/deleteElement.c)

### Assignment 4

- [Sort an array](https://github.com/rakshitraj/CS208/blob/master/assignment4/selectionSort.c)
- [Concatenate Sorted Arrays](https://github.com/rakshitraj/CS208/blob/master/assignment4/concatenateArray.c)
- [Merge Sorted Arrays](https://github.com/rakshitraj/CS208/blob/master/assignment4/mergeSortedArray.c)

### Assignment 5

- [Create linked list with "N" nodes](https://github.com/rakshitraj/CS208/blob/master/assignment5/linkedListNodesN.c)

### Assignment 6

- [Insert Elements in a Linked List](https://github.com/rakshitraj/CS208/blob/master/assignment6/linkedListInsert.c)

### Assignment 7

Stacks; Lecture 8

- [Stack operation and Implementation](https://github.com/rakshitraj/CS208/blob/master/assignment7/stack.c)

### Assignment 8

- [Infix to postfix](https://github.com/rakshitraj/CS208/blob/master/assignment8/Assignment%208.pdf)

### Assignment 9

Queue and Circular Queue - Creation, Insertion, Deletion, Updation

- [Queue Operations](https://github.com/rakshitraj/CS208/blob/master/assignment9/queueOperation.c)

- [Circular Queue Operation](https://github.com/rakshitraj/CS208/blob/master/assignment9/circularQueueOperation_output.txt)

### Assignment 10

Implementing a Binary tree

- [Binary tree using array, C++](https://github.com/rakshitraj/CS208/blob/master/assignment10/binarytree_arr.cpp)

- [Binary tree using Linked List, C++](https://github.com/rakshitraj/CS208/blob/master/assignment10/binarytree_linkedlist.cpp)

### Assignment 11

Generate Binary Tree using its Infix and Prefix Expression

- [Generate Binary tree from Infix and Prefix expression](https://github.com/rakshitraj/CS208/blob/master/assignment11/assignment_11.pdf)

### Assignment 12

Compartive study of structure and Complexities of Sorting Algorithms

- [Sorting Algorithms](https://github.com/rakshitraj/CS208/blob/master/assignment12/sorting_algos.md)

Author: [@rakshitraj](https://github.com/rakshitraj)

gha_language: C


text:
This directory is used to store the release documents for each release

directory structure

```
/releases
  |-- latest
  |-- 0.5
  |-- ...
```

For each release, please run command "docs/build_doc.sh" under Gearpump repository
and copy the whole `docs/_site` directory under release and rename `_site` directory to corresponding version number.

gha_language: HTML


text:
# Scan & OCR scripts

This is a very productive scanning and OCR setup, intended to speed up the scanning process and produce a CBZ file and an archive of extracted text as fast as possible. Just follow these steps:

1. install the [required packages](#required-packages)
2. plug in your scanner
3. edit `config.sh` according to your needs (see [Configuration](#configuration))
4. run `./1-scan.sh`
5. do any necessary renaming and extra scanning (see [Naming convention](#naming-convention))
6. run `./2-ocr.sh`
7. run `./3-bundle.sh`

This setup was inspired by [How to scan and OCR like a pro with open source tools](https://www.linux.com/learn/how-scan-and-ocr-pro-open-source-tools). The article also explains a few things not included in these scripts, like how to remove page numbers and unnecessary line feeds. Add these parts in if you need to.

## Required packages

In Debian:

`sudo apt install sane sane-utils imagemagick unpaper tesseract-ocr`

Also, install the Tesseract language package(s) you need. Select from:

* `apt search tesseract-ocr-`
* https://packages.debian.org/search?keywords=tesseract-ocr-

If you have an old version of Debian, install the newer Tesseract language package(s) from [backports](https://backports.debian.org/Instructions/). Example (for Debian 9): add `deb https://deb.debian.org/debian stretch-backports main` to `/etc/apt/sources.list`, then run:

`sudo apt -t stretch-backports install tesseract-ocr-eng`

## Configuration

Before using the scripts, you must edit `config.sh` according to your needs. You need to change at least the following options:

1. `device`: run `scanimage -L` to find the device id. Ex: `device='genesys:libusb:001:004'`.
2. `width` and `height`: measure the pages' width and height in millimeters. Images will be cropped to this size automatically.
3. `first_page` and `last_page`. `first_page` can be a negative number, if needed (see below).

Other important options are:

4. `language`: the language setting for OCR must correspond to the document's language. Ex: `'eng'` for English, `'ron'` for Romanian.
5. `rotate`: angle for clockwise auto-rotation of every page. Possible values are 0, 90, 180 and 270.
6. `resolution` in DPI, defaults to 300.

## Naming convention

For clarity, we want file names to match page numbers: `001.pnm` for page 1, etc. As for the unnumbered pages (covers, inserts, folds, etc), we must name them in a way that preserves page order. This is especially important when generating CBZ files, in which page order is determined by file names. We have two main situations:

1. The cover and first few pages might not be numbered. In this case, set `first_page` to a negative number. Before reaching page 1, files will be named `000_1.pnm`, `000_2.pnm`, etc.
2. In case of other unnumbered pages (inserts, folds, etc), skip them on the first run and scan them separately, using the command `./1-scan.sh filename_without_extension`. For ordering to be consistent, name the files as in the following examples:
    - If there is an insert between pages 45 and 46, use this convention: `045_0.pnm, 045_1.pnm, 045_2.pnm, 046.pnm`. So after the first run, rename `045.pnm` to `045_0.pnm`, then scan the insert by running `./1-scan.sh 045_1` and `./1-scan.sh 045_2`.
    - If leaf 45/46 is folded and actually contains 4 pages, use this convention: `045_1.pnm, 045_2.pnm, 046_1.pnm, 046_2.pnm`. So after the first run, rename `045.pnm` to `045_1.pnm` and `046.pnm` to `046_1.pnm`, then scan the extra pages in the fold by running `./1-scan.sh 045_2` and `./1-scan.sh 046_2`.
    - If leaf -1/0 (the front cover) is folded and actually contains 4 pages, use this convention: `000_1_1.pnm, 000_1_2.pnm, 000_2_1.pnm, 000_2_2.pnm`. So after the first run, rename `000_1.pnm` to `000_1_1.pnm` and `000_2.pnm` to `000_2_1.pnm`, then scan the extra pages in the fold by running `./1-scan.sh 000_1_2` and `./1-scan.sh 000_2_2`.

**Important**: you must do all renaming before running `./2-ocr.sh`!

repository: adakaleh/scan-scripts

repo_name: adakaleh/scan-scripts


text:
# KCCScrollViewContext

KCCScrollViewContext provides additional UIScrollView state and expands upon UIScrollViewDelegate. It’s simple to add and works with existing messaging from UIScrollViewDelegate and its extended protocols. It features:

* accessors like isScrolling, isAnimating, and current scrolling direction (UIRectEdge)

* accessors to contentOffset values during scrolling events (scrollingBeganOffset , expectedScrollingEndOffset, scrollingEndedOffset)

* additional delegate callbacks with content offsets for ‘will scroll’ (calculated)  and ‘did scroll’ (actual),

* additional delegate callbacks for ‘will scroll’ and ‘did scroll’ events with content edge detection (UIRectEdge) and scrollview bounce events.

* completion block handlers for UIScrollView’s built in animated methods (setContentOffset:animated: / scrollRectToVisible:animated:)

* additional zooming callbacks when the user initiates zooming at and past the minimum or maximum zoom scale.

* UIScrollViewDelegate and its extended protocols (UITableViewDelegate and so on) methods are forwarded to the original delegate (such as UITableViewController).

How to use:

```
- (void)viewDidLoad {
    [super viewDidLoad];
    self.scrollContext = [[KCCScrollViewContext alloc]initWithScrollView:self.tableView andDelegate:self];
}
```

Respond to events:

```
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  // handle row selection as usual
}

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
  // handle UIScrollView messages as usual
}

- (void)scrollViewWillScroll:(KCCScrollViewContext *)context toOffset:(CGPoint)offset {
  // do something
}

- (void)scrollViewDidBounce:(KCCScrollViewContext *)context fromEdge:(UIRectEdge)edge {
  // do something
}
```

Brief explanation at : http://00steveng.github.io/KCCScrollViewContext


text:
# mscluster_node collector

The MSCluster_Node class is a dynamic WMI class that represents a cluster node.

|||
-|-
Metric name prefix  | `mscluster_node`
Classes             | `MSCluster_Node`
Enabled by default? | No

## Flags

None

## Metrics

Name | Description | Type | Labels
-----|-------------|------|-------
`BuildNumber` | Provides access to the node's BuildNumber property. | gauge | `name`
`Characteristics` | Provides access to the characteristics set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-characteristics). | gauge | `name`
`DetectedCloudPlatform` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | gauge | `name`
`DynamicWeight` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | gauge | `name`
`Flags` | Provides access to the flags set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-flags). | gauge | `name`
`MajorVersion` | Provides access to the node's MajorVersion property, which specifies the major portion of the Windows version installed. | gauge | `name`
`MinorVersion` | Provides access to the node's MinorVersion property, which specifies the minor portion of the Windows version installed. | gauge | `name`
`NeedsPreventQuorum` | Whether the cluster service on that node should be started with prevent quorum flag. | gauge | `name`
`NodeDrainStatus` | The current node drain status of a node. 0: Not Initiated; 1: In Progress; 2: Completed; 3: Failed | gauge | `name`
`NodeHighestVersion` | Provides access to the node's NodeHighestVersion property, which specifies the highest possible version of the cluster service with which the node can join or communicate. | gauge | `name`
`NodeLowestVersion` | Provides access to the node's NodeLowestVersion property, which specifies the lowest possible version of the cluster service with which the node can join or communicate. | gauge | `name`
`NodeWeight` | The vote weight of the node. | gauge | `name`
`State` | Returns the current state of a node. -1: Unknown; 0: Up; 1: Down; 2: Paused; 3: Joining | gauge | `name`
`StatusInformation` | The isolation or quarantine status of the node. | gauge | `name`

### Example metric
_This collector does not yet have explained examples, we would appreciate your help adding them!_

## Useful queries
_This collector does not yet have any useful queries added, we would appreciate your help adding them!_

## Alerting examples
_This collector does not yet have alerting examples, we would appreciate your help adding them!_

gha_language: Go


text:
---
layout: default_no_logo
---

## Interactive 2D editor for vector graphics

An interactive application that allows to add, edit, delete, and rasterize triangles. Transforms like translation, rotation, and scale could be applied to selected primitives and view
transformation options available. Animations can be generated through interpolations between key frames.
<iframe width="560" height="315"
src="https://www.youtube.com/embed/a4BqrkHZ_Yw"
frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>


text:
---
layout: post
title: All the universe in one plot
author: CarlosGrohmann
date: 2010-01-11
categories:
tags: science astronomy logplot
permalink: /blog/all-the-universe-in-one-plot/
published: true
---

Really nice. Astronomers at Princeton compile in one single plot all that we can see in the universe. Everything. The plot is in logarithm scale, of course. Click on the image to see a full-sized version. And while you are at it, go to [xkcd](http://xkcd.com/482/) and check what they did, way before the Princeton team.

[![](/img/logmapuniverse.gif)](https://www.astro.princeton.edu/universe/)

The tip goes, as usual to [BadAstronomy](http://blogs.discovermagazine.com/badastronomy/2010/01/11/from-here-to-infinity-logarithmically/)

branch_name: refs/heads/main


text:
## cybr accounts list

List all accounts

### Synopsis

List all accounts the logged on user can read from PAS REST API.

	Example Usage:
	$ cybr accounts list

```
cybr accounts list [flags]
```

### Options

```
  -f, --filter string        Search for accounts filtered by safeName or modificationTime
  -h, --help                 help for list
  -l, --limit int            Maximum number of returned accounts. If not specified, the default value is 50. The maximum number that can be specified is 1000 (default 50)
  -o, --offset int           Offset of the first account that is returned in the collection of results
  -s, --search string        List of keywords to search for in accounts, separated by a space
  -t, --search-type string   Get accounts that either contain or start with the value specified in the Search parameter. Valid values: contains (default) or startswith
  -r, --sort string          Property or properties by which to sort returned accounts, followed by asc (default) or desc to control sort direction. Separate multiple properties with commas, up to a maximum of three properties
```

### Options inherited from parent commands

```
      --verbose   To enable verbose logging
```

### SEE ALSO

* [cybr accounts](cybr_accounts.md)	 - Account actions for PAS REST API

###### Auto generated by spf13/cobra on 19-Feb-2021

repository: quincycheng/cybr-cli

repo_name: quincycheng/cybr-cli


text:
# virtc

`virtc` is a simple command-line tool that serves to demonstrate typical usage of the `virt` API.
This is example software; unlike other projects like runc, runv, or rkt, `virt` is not a full container runtime.

## Virtc example

Here we explain how to use the pod API from __virtc__ command line.

You can dowload the following tested [image](https://download.clearlinux.org/releases/11130/clear/clear-11130-containers.img.xz), or any version more recent.

```
$ wget https://download.clearlinux.org/releases/11130/clear/clear-11130-containers.img.xz
$ unxz clear-11130-containers.img.xz
$ sudo cp clear-11130-containers.img /usr/share/clear-containers/clear-containers.img
```

#### Get virtc

_Download virtc_
```
$ go get github.com/sameo/virtcontainers
```

_Build virtc_
```
$ cd $GOPATH/src/github.com/sameo/virtcontainers
$ cd virtc && go build
```

### Run virtc

All following commands needs to be run as root. Currently, __virtc__ only starts single container pods.

_Create your container bundle_

As an example we will create a busybox bundle:

```
$ mkdir -p /tmp/bundles/busybox/
$ docker pull busybox
$ cd /tmp/bundles/busybox/
$ mkdir rootfs
$ docker export $(docker create busybox) | tar -C rootfs -xvf -
$ echo -e '#!/bin/sh\ncd "\"\n"sh"' > rootfs/.containerexec
$ echo -e 'HOME=/root\nPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\nTERM=xterm' > rootfs/.containerenv
```

#### Run a new pod (Create + Start)
```
./virtc pod run --bundle="/tmp/bundles/busybox/rootfs" --agent="hyperstart" --init-cmd="/bin/sh"
```
#### Create a new pod
```
./virtc pod create --bundle="/tmp/bundles/busybox/rootfs" --agent="hyperstart" --init-cmd="/bin/sh"
```
This should generate that kind of output
```
Created pod 306ecdcf-0a6f-4a06-a03e-86a7b868ffc8
```

#### Start an existing pod
```
./virtc pod start --id=306ecdcf-0a6f-4a06-a03e-86a7b868ffc8
```

#### Stop an existing pod
```
./virtc pod stop --id=306ecdcf-0a6f-4a06-a03e-86a7b868ffc8
```

#### Get the status of an existing pod and its containers
```
./virtc pod status --id=306ecdcf-0a6f-4a06-a03e-86a7b868ffc8
```
This should generate the following output:
```
POD ID                                  STATE   HYPERVISOR      AGENT
306ecdcf-0a6f-4a06-a03e-86a7b868ffc8    running qemu            hyperstart

CONTAINER ID    STATE
1               ready
```

#### Delete an existing pod
```
./virtc pod delete --id=306ecdcf-0a6f-4a06-a03e-86a7b868ffc8
```

#### List all existing pods
```
./virtc pod list
```
This should generate that kind of output
```
POD ID                                  STATE   HYPERVISOR      AGENT
306ecdcf-0a6f-4a06-a03e-86a7b868ffc8    running qemu            hyperstart
92d73f74-4514-4a0d-81df-db1cc4c59100    running qemu            hyperstart
7088148c-049b-4be7-b1be-89b3ae3c551c    ready   qemu            hyperstart
6d57654e-4804-4a91-b72d-b5fe375ed3e1    ready   qemu            hyperstart
```

repository: sameo/virtcontainers

repo_name: sameo/virtcontainers


text:
# OTransaction - getDatabase()

Retrieves the database on which the transaction is running.

## Getting Databases

Transactions run on particular databases, or more specifically within an [`ODatabaseDocument`](../ODatabaseDocument.md) instance.  In the event that you need to operate on the database currently running the transaction, you can use this method to retrieve it.

### Syntax

```
ODatabaseDocument OTransaction().getDatabase()
```

#### Return Value

This method returns an [`ODatabaseDocument`](../ODatabaseDocument.md) instance, which represents the database on which the transaction is running.

repository: orientechnologies/orientdb-docs

gha_language: CSS

repo_name: orientechnologies/orientdb-docs


text:
# Node.js Foundation Badges 2018-04-05

## Links

* **Recording**: No Recording
* **GitHub Issue**: https://github.com/nodejs/badges/issues/16
* **Minutes Google Doc**: https://docs.google.com/document/d/1jpeSk5Z2htzStsD-89GP3bBnTzO8HDw5Qz7-rGPCIZU/edit

## Present

* [@amiller-gh](https://github.com/amiller-gh) - (Adam Miller) – Community Committee Champion
* [@maddhruv](https://github.com/maddhruv) - (Dhruv Jain)
* [@ryzokuken](https://github.com/ryzokuken) (Ujjwal Sharma)

## Agenda

 * Set Up a Badge Issuer Account #3
 * V1 Badges List #8
 * Badge / Pathway RFC process and template #4
 * Node.js Badges Illustration Style Guide #7
 * Github + Badger API Integration for Automated Awarding #9
 * Future Meetings

## Discussion

### Set Up a Badge Issuer Account #3
Adam: Talk about Badgr
Dhruv: Been through a number of OSS options. Badgr seems to be the best option. No limit to number of badges. Others aren’t as collaborative. Badgr would be a great.
Ujjwal: Has a great API. Good for automation.

**Action Item**: Close issue and add it to the README. Add badges team to account managers. @amiller-gh

### V1 Badges List #8
Dhruv: Its for both active contributors and for people engaging with the community?
Adam/Ujjwal: Want to focus on the system and empower people to make their own if needed, a la node school.
Ujjwal: Maybe a design review process for new badges as well – include other designers.
Dhruv/Adam: There are a lot of working groups. Would be good to have. Lets pick the number of badges for v1 and once we have the style guide. Working group awards would be easy to make, there are no pathways or award criteria. We need to limit our first round.
Ujjwal: We should make sure that we have more badges proposed. We should focus on new user engagement / motivation. Previous member of foundation won’t be hurt if we take a little more time deving badges for them vs new people.

 - Member of TSC
 - Member of CommComm
 - First Contributor Badge
 - Collaborator Anniversary Badges
 - Member of WGs

Ujjwal: Show steam badges. Ideas: Commits counts, Years of Service, Community Leader, Event Badges.

### Badge / Pathway RFC process and template #4

Adam: What deserves to be RFCd?
Ujjwal: Anyone can make badges, but if the badge is managed by the Node.js foundation they should be RFCd and in the repo.

**Action Item**: Ujjwal, make RFC template and PR.

### Node.js Badges Illustration Style Guide #7

Dhruv: Decide the principles. Color palettes. Color per working group / sticker? Node.js foundation logo / title around edges. Should reflect the main concept in the badge. This should be the iconic theme for the badges we’re issuing. Include some of the Node.js graphic designers for this task.

Dhruv: Engage CommComm about design contracting and or choose to keep open source.

Ujjwal: Tool for making badges? For community to make their own badges from a template.

Adam: Tool would be for quick, rapid iteration badges, want to make sure we have an escape hatch

**Action Item**: Sync w/ Tierney about who we can pull in from the graphic design.
**Action Item**: Open issue in CommComm about design needs and OSS contrib vs design contractor.

### Github + Badger API Integration for Automated Awarding #9

Ujjwal: Been looking into API integrations past couple weeks and the Github bot. Org hooks may be an issue but we can work through it. Potential problem: not a lot of activity on Github bot right now – may be a bottleneck.

Adam: Pro of Github bot – already in production and has

### Future Meetings

Two week meeting frequency is good, maybe another day?

**Action Item** @amiller-gh, send out updated Dribble poll.

## Upcoming Meetings

 * **Node.js Foundation Calendar**: https://nodejs.org/calendar

Click `+GoogleCalendar` at the bottom right to add to your own Google calendar.


text:
# directivity-utils

A script to create a directivity sonogram based on measurements dumped out of [REW] (http://www.roomeqwizard.com/) (and until such time as http://www.hometheatershack.com/forums/rew-forum/111090-feature-request-polar-response-plots.html is implemented).

# What is a polar map?

See [this article] (http://www.acousticfrontiers.com/20131129controlled-directivity-speakers-open-up-your-acoustic-treatment-options/) for a summary. The approach, I believe, originates from Geddes and has been subsequently implemented in [ARTA] (http://www.artalabs.hr/). This implementation uses the same colour scheme (the matlab jet colourmap) for consistency.

# What do I need to get started?

* a set of measurements containing appropriately measured data of a loudspeaker taken at various angles
* either
    * a linux box
    * a windows box with cygwin - install from [here](https://www.cygwin.com/)
* gnuplot
* awk

# How do I generate a sonogram?

NB: these instructions assume you are using REW, other software probably works as they all seem to stick to the same space delimited [FRD] (http://www.cross-spectrum.com/weblog/2010/03/05) format.

## Prepare the Input Data

* take measurements in your usual fashion at various degrees off axis
* create a directory to store the exported data
* export each measurement to a text file in space delimited FRD format named `<degrees>.dat` (select measurement, file/export/measurement as text, enter file name)

NB: see the [sample] dir in this repo for an example of the exported data

## Generate the Plot

NB: assumes generate.sh from this repo is on your path and is executable

* open a shell in the directory containing the data

    generate.sh

* look for some png files in the output dir

if you want to know what the cmd line options are then just run generate.sh -v

    generate.sh -d -l 100 -h 22000 -m -x 1920 -y 1080 -p foo -z 30
        -d force delete of existing generated files
	-l sets the lo frequency for the data generated, if unset default to the minimum value in the input data (NB: actually 200 for now)
        -h sets the hi frequency for the data generated, if unset default to the maximum value in the input data (NB: actually 24000 for now)
        -m mirror mode
        -x width of image in pixels, default 1920
        -y height of image in pixels, default 1080
        -p file name prefix
        -z z axis range, defaults to 30dB

The generated plot will always have a black line indicating the -6dB contour.

# How do I change the reference SPL?

The reference SPL is set using the -r option, if the supplied value is greater than the detected max spl then this is used instead. The reference spl is the point from which the -6dB contour is calculated.

# My FRDs use a different file extension, how do I override it?

Use the -e option

# TODO

## Formatting

* label the contours as -3, -6, -9 etc


text:
# Message

```.jsx
<Message>
  Hello
</Message>
```

Extends: [Flex](/components/Flex)

prop | default | theme key | style type
---|---|---|---
m |  | space | responsive
mt |  | space | responsive
mr |  | space | responsive
mb |  | space | responsive
ml |  | space | responsive
mx |  | space | responsive
my |  | space | responsive
p |  | space | responsive
pt |  | space | responsive
pr |  | space | responsive
pb |  | space | responsive
pl |  | space | responsive
px | 3 | space | responsive
py | 2 | space | responsive
fontWeight | bold | fontWeights | default
color | white | colors | responsive
bg | blue | colors | responsive
alignItems |  | N/A | responsive
minHeight | 48px | minHeights | responsive

repository: corygibbons/rebass

repo_name: corygibbons/rebass


text:
# DirectoryServiceDefStatusResources

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AdminGroupList** | [**[]UserGroup**](user_group.md) | List of distinguished names of the admin group in the directory service.  | [optional] [default to null]
**AdminUserReferenceList** | [**[]UserReference**](user_reference.md) | The list of admin users available in the directory service.  | [optional] [default to null]
**ConfiguredFeatureList** | **[]string** | List of features configured with directory service. | [optional] [default to null]
**DirectoryType** | **string** | Type of the directory service. | [default to null]
**DomainName** | **string** | The domain name of the directory service. | [default to null]
**ServiceAccount** | [**ServiceAccount**](service_account.md) | Validates and connects to the directory service with the given credentials.  | [optional] [default to null]
**Url** | **string** | URL of the directory. | [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
---
layout: default
---

# 1994-06-10 - Re: New Yorker First Flame Author on TotN

## Header Data

From<EMAIL_ADDRESS>(Sidney Markowitz)

To<EMAIL_ADDRESS>Message Hash: af2d451b46eee622b935e5786621b3712a07ad768523a8d3cc846668d7b4d3ec

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1994-06-10 20:44:16 UTC

Raw Date: Fri, 10 Jun 94 13:44:16 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Sidney Markowitz)
Date: Fri, 10 Jun 94 13:44:16 PDT
To<EMAIL_ADDRESS>Subject: Re: New Yorker First Flame Author on TotN
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

He was interviewed by Terry Gross on "Fresh Air", also a nationally
syndicated public radio show, though not with call in, earlier this week, I
think Wednesday. He came across as a very naive, "sensitive" guy, who was
enamored over the possibility of an electronic academic utopian community
and was rudely shocked when he first discovered the phenomenum of flaming
there in his mailbox. The interview was focused on his feelings during his
introduction to cyberspace and to flaming, what the world of e-mail and
bulletin boards is like for technological newbies, and did not at all get
into issues of pornography, anonymity, encryption, etc. He did not seem as
if he would be competent to talk about those issues and he did not try to.

 -- sidney markowitz<EMAIL_ADDRESS>    SK8board Punk Rocket Scientist      [not speaking for Apple!]
    Advanced Technology Group           voice:<PHONE_NUMBER>
    Apple Computer, Inc., M/S 301-3D    fax:<PHONE_NUMBER>
    1 Infinite Loop                     AppleLink: SIDNEY
    Cupertino, CA 95014                 Internet<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

+ Return to [June 1994](/archive/1994/06)

+ Return to<EMAIL_ADDRESS>(Sidney Markowitz)](/authors/sidney_at_taurus_apple_com_sidney_markowitz_)"

+ 1994-06-10 (Fri, 10 Jun 94 13:44:16 PDT) - Re: New Yorker First Flame Author on TotN -<EMAIL_ADDRESS>(Sidney Markowitz)_


text:
# Emacs Puppet Module for Boxen

Install [GNU Emacs](http://www.gnu.org/software/emacs), an operating
system desperately searching for a decent editor.

## Usage

```puppet
include emacs
```

## Required Puppet Modules

* `boxen`

## Development

Write code. Run `script/cibuild` to test it. Check the `script`
directory for other useful tools.

repository: jwalsh/puppet-emacs

gha_language: Ruby

repo_name: jwalsh/puppet-emacs


text:
SATO_Label_Generator_Service
==============

NEW: SATO Label Printer Emulator https://trehoffman.github.io/SATO_Label_Generator_Service/

C# .NET classes and Javascript/JQuery/AJAX working together to generate Non-Standard labels for SATO Label Printers.

Type the printer's shared path or a file path into the input to generate the sample label to that location.

Clarifications:

1.  The location must be on the server that is serving the site or read/write accessible to it.
2.  You can specify a filename at the end of the printer string (i.e. \\MACHINE_NAME\LABEL_PRINTER_SHARE\LABEL.TXT)
3.  If you do not specify a filename at the end of the printer string (i.e. \\MACHINE_NAME\LABEL_PRINTER_SHARE\) it will generate a random filename
4.  The funky looking yellow label displayed after you successfully print a label is supposed to be a rough estimation of how the physical label should look when printed.  I planned to have a "label creation" page where you could customize labels via GUI, but I ended up not having a need for it so it was never finished.


text:
---
id: 20220205
draft: false
title: Assets from Unreal in WebXR
date: 2022-02-05T20:00:00+00:00
author: Sorskoot
layout: post
share: true
comments: true
guid: https://www.timmykokke.com/?p=20220205
permalink: /2022/02/Exporting-Assets-Unreal-WebXR
categories:
  - WebXR
  - Content
tags:
  - WebXR

---

## Intro
Although it's not possible to export from Unreal to WebXR, there are a lot of very nice assets available in the Unreal Marketplace that could be useful for your WebXR game. The license allows you to use these assets in your game, except for products that [have been created by Epic Games](https://marketplacehelp.epicgames.com/s/article/Can-I-use-these-products-in-other-gaming-engines-like-Source-or-Unity?language=en_US) themselves. But, since Unreal Engine uses its own format for assets it's not straightforward.

## Assets
There are a lot of great free assets in the Unreal Marketplace. But, they can even get better. Every first Tuesday of the month, there's a new set of assets available for free that would normally cost money: [Free for the month](https://www.unrealengine.com/marketplace/en-US/assets?tag=4910). Even if you don't need the assets right now, they might become handy at a later moment. If you've bought them for free they stay yours after the month is over and they return back to their normal price.
{{< img-link "/images/2022/02/UnrealMarketplace01.png" "Unreal Marketplace Free for the month" >}}

## Unreal Engine
I'm going to assume you never have really used Unreal Engine before, otherwise, you probably won't have ended up here. It could be a little bit of work to get everything to work, especially if the textures are in TGA format. But, it's worth it. My Christmas-themed game [Santa's Workshop](https://constructarcade.com/game/santas-workshop/) is built using an Unreal asset. I took the gamble to buy it and it worked out great.

First of all, you need to have the Unreal Engine installed on your computer. You can download it from [here](https://www.unrealengine.com/en-US/download).

##### New Project
Now that you have the engine installed it's time to launch it through the Epic Games Launcher and create a new project. As options, I just select `Games`, the `Blank Template`, and `Blueprint`. I don't think it matters since we're not using anything of Unreal except the exporter. I usually name the project after the asset I'm going to export.
{{< img-link "/images/2022/02/UnrealNewProject.png" "New Unreal Project" >}}

##### Add Asset
To add the asset we want in a WebXR project, we need to go back to the Epic Games Launcher and look it up in the marketplace, or the library if you have already bought it. After you've found it you just click `Add to Project` and select the project you want to add the asset to. If you haven't used the asset before it will be downloaded.
{{< img-link "/images/2022/02/UnrealAddAssetToProject.png" "Add asset to project" >}}

##### Export Models
Now that the assets are in the project you need to open it again and look for them in the content browser, usually at the bottom of the screen. Once you've found the folder containing the models or meshes, you need to select them all. This can be done by hitting `CTRL+A`. Then you `Right Click` and from the context menu select `Asset Actions` -> `Bulk Export`. You need to select a folder you want to export the assets to. Keep in mind that you can only export one folder at a time. You need to repeat the process for every folder.
There are a few options you need to disable in the export. You don't need `Level of Detail`, `Collision` and `Preview Mesh` as these will add geometry you probably don't need.
{{< img-link "/images/2022/02/UnrealBulkExportModels.png" "Bulk export models" >}}

##### Export Textures
The textures are not inside the models, therefore you need to export them separately. The process is the same as the models. The folder structure is the same as the folder structure in the asset pack. If you place the textures in the same place as you did with the models they end up following the correct structure.
{{< img-link "/images/2022/02/UnrealBulkExportTextures.png" "Buld export textures" >}}

##### Convert .tga to .png
There's a big chance the textures you've exported in the previous step are in .tga (Targa) format. The tool you are going to use the models with is probably not going to support .tga files. If you're going to build a level in Blender and bake your lighting it's not necessary to convert the textures, because Blender supports TGA and in the export of the bake you can select to use .png.

For converting the textures I use a free tool called XnConvert, which can be downloaded [here](https://www.xnview.com/en/xnconvert). In that tool, you can select a folder and it will recursively search for all the .tga files and convert them to .png.

After selecting the folders you can go to the `output` tab, change the format to .png
{{< img-link "/images/2022/02/UnrealXnConvert.png" "XnConvert" >}}

##### Use the assets
Now that you have the assets you can use them in your game. Keep in mind that the materials on the models are broken since they're converted to .png. You need to fix them manually in the game engine you're using.

{{< img-link "/images/2022/02/UnrealToWonderland.png" "Assets in Wonderland Engine" >}}

repository: sorskoot/sorskoot-website

gha_language: SCSS

repo_name: sorskoot/sorskoot-website


text:
## Build & Run

Run `DEBUG=0 OPT=1 make run`, this implementation requires GCC 7 or higher. (configure/export `CXX` if your default GCC is lower than 7)
Note that it's highly unoptimized (in contrast to highly optimized like tensorflow), profiling shows that the difference between ADAM and ADAS takes less than 20% of the total compute.

repository: SHikumo/AdasOptimizer

repo_name: SHikumo/AdasOptimizer


text:
# Large Scale Imaging software in MATLAB

## BigDataIntro
Software tools for Big Data related issues.

## WoodAnatomy
Protopytical software for the wood anatomy classificaiton usecase.

## Detectors
The MSER and SMSSR salient region detectors. The DMSR and MSSR detectors are to be found in the [MATLAB salient regions repo](https://github.com/NLeSC/SalientDetector-matlab)

## Testing
Various prototypical research test scripts for the different detectors (also MSSR and DMSR).

repository: NLeSC/LargeScaleImaging

repo_name: NLeSC/LargeScaleImaging


text:
---
layout: page
title: About
permalink: "/about/"

---
The OTT Video Streaming industry is growing in leaps and bounds every single day with innovations and products being launched at a breath-taking speed.

Take a look around and you can see innovations in 4K, 8K, VR, AR, Ad Insertion, Monitoring, Recommendations, Codecs (AV1, VVC), Packaging, Players, Streaming services, and so much more.

It's a fantastic industry to be in, but, it has a pretty steep learning curve with niches that can take years to understand fully. And, the crazy part is that, by the time you think you've understood something fully, the industry has moved on to something different! Oh boy!

## A little about me

I have spent close to 12 years in this industry in different roles - I've done fundamental research on certain topics that form the backbone of the OTT industry, done my fair share of coding when I was an engineer, done customer support, pre & post-sales, and spent years in product and project management.

This has given me a unique perspective into what happens in the industry and I'd like to share that with you. My goal is to write about the technological under-pinnings (both fundamental and state-of-the-art), current and upcoming trends, and share industry news on this site (betaott.com). And, I think that the world lives in beta - hence the name of this site.

## Contact Me

If you want to contact me for anything technical, research, analysis, etc., please use my email ID: **ottbeta \[at\] gmail \[dot\] com** and I will get back to you as soon as I can.

Take care and keep visiting!

PS: I am not fond of publicity, hence the anonymity. Perhaps, we've already met at a mixer or a convention ;)

![](/uploads/ott_video_streaming.jpg)


text:
[< Previous](../form-largest-integer-with-digits-that-add-up-to-target "Form Largest Integer With Digits That Add up to Target")

[Next >](../rearrange-words-in-a-sentence "Rearrange Words in a Sentence")

## [1450. Number of Students Doing Homework at a Given Time (Easy)](https://leetcode.com/problems/number-of-students-doing-homework-at-a-given-time "在既定时间做作业的学生人数")

Given two integer arrays startTime and endTime and given an integer queryTime.

The ith student started doing their homework at the time startTime[i] and finished it at time endTime[i].

Return the number of students doing their homework at time queryTime. More formally, return the number of students where queryTime lays in the interval [startTime[i], endTime[i]] inclusive.

Example 1:

Input: startTime = [1,2,3], endTime = [3,2,7], queryTime = 4
Output: 1
Explanation: We have 3 students where:
The first student started doing homework at time 1 and finished at time 3 and wasn't doing anything at time 4.
The second student started doing homework at time 2 and finished at time 2 and also wasn't doing anything at time 4.
The third student started doing homework at time 3 and finished at time 7 and was the only student doing homework at time 4.

Example 2:

Input: startTime = [4], endTime = [4], queryTime = 4
Output: 1
Explanation: The only student was doing their homework at the queryTime.

Example 3:

Input: startTime = [4], endTime = [4], queryTime = 5
Output: 0

Example 4:

Input: startTime = [1,1,1,1], endTime = [1,3,2,4], queryTime = 7
Output: 0

Example 5:

Input: startTime = [9,8,7,6,5,4,3,2,1], endTime = [10,10,10,10,10,10,10,10,10], queryTime = 5
Output: 5

Constraints:

startTime.length == endTime.length

1 <= startTime.length <= 100

1 <= startTime[i] <= endTime[i] <= 1000

1 <= queryTime <= 1000

### Related Topics
  [[Array](../../tag/array/README.md)]

### Hints

Hint 1
Imagine that startTime[i] and endTime[i] form an interval (i.e. [startTime[i], endTime[i]]).

Hint 2
The answer is how many times the queryTime laid in those mentioned intervals.

repository: rohini-raja/leetcode

repo_name: rohini-raja/leetcode


text:
# First-Thought
I intend for this site to become a peaceful way to just explore the first thought that comes into your mind.

Initially words would be produced from a word bank, but after 10 or so responses I would like to reintroduce the user's own words back into the mix and track how each word develops.
e.g.
say that on my first round I enter 5 words, CAT, BOAT, CHOCOLATE.

after about 10 questions the script shows me BOAT and I answer WATER, a couple of words later I'm shown CHOCOLATE and I respond with MILK.

The word collection would look like this:

1. CAT
2. BOAT -> WATER
3. CHOCOLATE -> MILK

fast forward to 50 words later the results would be looking something like this

1. CAT -> DOG -> BONE -> MEAT -> BEEF
2. BOAT -> WATER -> SHOWER -> CLEAN -> SOAP
3. CHOCOLATE -> MILK -> CEREAL -> GRAINS -> FARMS -> SHEEP -> WOOL

These Association trails can then be shown back to the user on completing a session.

repository: notmatteblack/First-Thought

repo_name: notmatteblack/First-Thought


text:
[![RetailOps SDK](http://cdn2.hubspot.net/hubfs/530512/Image/logo.png)](http://retailops.com)

### RetailOps SDK

Using the RetailOps SDK, you can create, test, and certify custom integrations for use with RetailOps.

- [Channel Integrations](#channel-integrations)
- [Shipper Integrations (coming soon)](#shipper-integrations)

## Channel Integrations

A channel is a source of orders.
RetailOps, serves as the system-of-record for catalog/product data.
It pushes this catalog data out to "Channels" (Storefronts, marketplaces, etc) which in turn take customer orders for said products.
RetailOps then pulls this order information, fulfills said orders, and pushes status / edit information back to the channel in question.

### Channel Interactions:

- catalog_get_config - Configuration information about Catalog Push
- catalog_push - New product information and product updates
- inventory_push - Inventory updates
- order_pull - Fetch new orders from the channel which are ready
- order_acknowledge - Mark specific fetched orders has having been picked up
- order_update - Update channel order information to reflect order items which have been updated, added, or removed in RetailOps
- order_cancel - Mark an order as canceled in the channel
- order_shipment_submit - Convey shipping status and tracking information to the channel
- order_complete - Mark an order as fully completed in the channel
- order_settle_payment - Cause the channel to collect/capture payment, or otherwise verify payment has been collected
- order_returned - Notify the channel that a return has been processed against the order

## Shipper Integrations

*Coming soon*

repository: dnorman/retailops-sdk

repo_name: dnorman/retailops-sdk


text:
**Falling双手简谱** 和五线谱完全对应。

_Falling_ 是美国另类男声Trevor Daniel演唱的歌曲。收录在其首张EP Homesick中。Trevor
Daniel曾在社交平台感谢霉霉Taylor Swift 对自己的影响。而其单曲“Falling”在美国流媒体平台Spotify爆红，受到大家的青睐。

歌词下方是 _Falling钢琴谱_ ，大家可以免费下载学习。

### Falling歌词：

My last made me feel like I would never try again
最后一次恋情让我对爱情万念俱灭
But when I saw you, I felt something I never felt
于你惊鸿一瞥 我感到未曾有过的心动
Come closer, I'll give you all my love
靠近点吧 我会予你全心全意
If you treat me right, baby, I'll give you everything
若是你真心待我 宝贝 我会有求必应
My last made me feel like I would never try again
最后一次恋情让我对爱情万念俱灭
But when I saw you, I felt something I never felt
于你惊鸿一瞥 我感到未曾有过的心动
Come closer, I'll give you all my love
靠近点吧 我会予你全心全意
If you treat me right, baby, I'll give you everything
若是你真心待我 宝贝 我会有求必应
Talk to me, I need to hear you need me like I need ya
与我谈谈吧 我想听到你说 你如我渴望你般深陷于我
Fall for me, I wanna know you feel how I feel for you, love
为我沦陷吧 我想知道你已感到我对你的深情 宝贝
Before you, baby, I was numb, drown the pain by pouring up
遇见你之前 宝贝 我深陷痛苦之中如同行尸走肉
Speeding fast on the run, never want to get caught up
我曾摒弃爱情 夺命狂奔 只为不与人相爱
Now you the one that I'm calling
如今 你是我所期盼呼唤的真爱
Swore that I'd never forget, don't think I'm just talking
我曾发誓永不忘记 我不觉得自己只是说说而已
I think I might go all in, no exceptions, girl, I need ya
我想我会全力以赴 没有托词借口 女孩 我需要你呀
Feeling like I'm out of my mind, cause I can't get enough
感觉就像我已失去理智 因为我总是欲求不满
Only one that I give my time, 'cause I got this for ya
只有你 能让我目不他望 全心全意
Might make an exception for ya, 'cause I been feeling ya
为了你 我可以破例 因为你牵动着我的心神
Think I might be out of my mind, I think that you're the one
感觉就像我已失去理智 我想你就是我的命中注定
My last made me feel like I would never try again
最后一次恋情让我对爱情万念俱灭
But when I saw you, I felt something I never felt
于你惊鸿一瞥 我感到未曾有过的心动
Come closer, I'll give you all my love
靠近点吧 我会予你全心全意
If you treat me right, baby, I'll give you everything
若是你真心待我 宝贝 我会有求必应
My last made me feel like I would never try again
最后一次恋情让我对爱情万念俱灭
But when I saw you, I felt something I never felt
于你惊鸿一瞥 我感到未曾有过的心动
Come closer, I'll give you all my love
靠近点吧 我会予你全心全意
If you treat me right, baby, I'll give you everything
若是你真心待我 宝贝 我会有求必应
I'll never give my all again
我永不会再对谁毫无保留了
'Cause I'm sick of falling down
因为我已对爱情心生厌倦
When I open up and give my trust
当我再次打开心门 托付信任
They find a way to break it down
薄情之人总会摧毁我的深情
Tear me up inside, and you break me down
让我心神俱灭 而你让我失望崩溃

path: /流行/Falling-Trevor Daniel/README.md


text:
---
title: AWESOME Doco
date: "2021-07-28 18:00:00"
description: "Awesome documentation from an IPN service"
cover: "./cao-ni-ma.jpg"
---

# An very awesome experience of integrating a IPN service

## Intro

Have you ever felt that only raising two middle finger and swearing the **F** words isn't really enough to express the calm and peace in your heart?

## TL;DR

Enjoy:

![Not Version](./notversion.PNG)

![Doulbe Custom](./double-custom.PNG)

![Good Date](./good-date.PNG)

> I have to say, never seen a documents are beautifully composed, accurate and consistent.

---

## What Happened

Lately, I've been tasked to work on an Instant Payment Notification with a service that my company is using. Having read through their document, the first thing I do is to map all the properties in their payload.

I thought the implementation should be smooth and nice given that I got 99% of the information from the doco. However, the nightmare only begins from me uploading the endpoint to their IPN listener entry.

At first, it starts giving me an Invalid error of my URL, which I tested it is healthy. ![Invalid url](./invalid.PNG)

I scratched my head of not knowing what goes wrong. Therefore I contacted their support. Funny thing is, even the support guy doesn't know what goes wrong and I kept giving him a hint whether their ```Upload``` method has some sort of check. After pulling another colleague of his to confirm there's a dummy test to my endpoint.

Brilliant!!! Such a good idea. Ok, fine. So I went back to see what goes wrong for my endpoint. Upon checking on logs, realize all my properties are ```null```. So, what did I do wrong? Kept digging around my code to find out what went wrong. Local **Postman** to call and debug couldn't find out what goes wrong.

Then I decided to pull out a Http Request Logging middleware, checking the incoming raw request.

Ha, found out that there's a hidden property not listed in the document called ```test_ipn_connection``` which sent with the dummy test call. No wonder all my properties are null.

Then, the rest are just good find over the lengthy log checking and digging. I have to say, never seen a documents are beautifully composed, accurate and consistent.

branch_name: refs/heads/source

gha_language: JavaScript


text:
# twig.d
The flexible, fast, and secure template engine for Vibe.d based on [twig](http://twig.sensiolabs.org/) 2.2

### Similar projects
- [temple](https://github.com/dymk/temple)
- [mustache-d](https://github.com/repeatedly/mustache-d)
- [embd](https://github.com/carlor/embd)
- [vayne](https://github.com/eBookingServices/vayne)
- [diet-ng](https://github.com/rejectedsoftware/diet-ng)
- [jax](https://github.com/eBookingServices/jax)
- [hunt](https://github.com/huntlabs/hunt/tree/master/source/hunt/view)

gha_language: D


text:
# Yet Another Typesafe Router - Yatro

It's a prototype of a typesafe router. Basically, it's a combination of several ideas:

- Everything is typesafe as much as possible
- Use [Template Literal Types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html) and recursive types we can extract parameters from express-like path syntax
- Use [`io-ts`](https://github.com/gcanti/io-ts) for describing the expected types of path and querystring parameters
- Allow to iteratively build endpoints

## Usage

### Basics

You can create typesafe endpoints like this:

```ts
import {Endpoint} from "yatro";

const postCommentsEndpoint = Endpoint.build("/posts/:postName/comments", {
  page: "number",
  perPage: "number",
});
```

That will create an endpoint with type: `Endpoint<{postName: "string", page: "number", "perPage: "number"}>`. Note that it even extracts `postName` from the path string - all thanks to the TS 4.1 Template Literal Types feature!

The endpoint has 2 main methods - `match` and `toUrl`. `match` allows to match a path with the endpoint, and it will return the extracted parameters if successful, or `undefined` if it doesn't match:

```ts
postCommentsEndpoint.match("/foo/bar");
// => undefined
postCommentsEndpoint.match("/posts/cool-post/comments?page=3&perPage=blah");
// => undefined, because perPage should be a number
postCommentsEndpoint.match("/posts/cool-post/comments?page=3&perPage=8&foo=bar");
// => {params: {postName: "cool-post", page: 3, perPage: 8}, rest: {foo: "bar"}}
```

We can also create string URLs from the endpoint param using `toUrl` method:

```ts
postCommentsEndpoint.toUrl({postName: "cool-post", page: 3, perPage: 8});
// => "/posts/cool-post/comments?page=3&perPage=8"
postCommentsEndpoint.toUrl({postName: 32, page: 3});
// Results in a type error because it expects `postName` to be a string, and also missing `perPage` param.
```

Now, we can add those `Endpoint`s instances to a `Router`:

```ts
import {Endpoint, Router} from "yatro";

const postCommentsEndpoint = Endpoint.build("/posts/:postName/comments", {
  author: "string",
  page: "number",
  perPage: "number",
});
const addComment = Endpoint.build("/posts/:postName/comments");

const router = new Router({})
  .get(postCommentsEndpoint, (args) => {
    // args.match.params here will be of type {postName: string; page: number; perPage: number, author: string}
  })
  .post(addComment, () => {
    // handle post here
  });
```

To handle an incoming request in a router, you need to pass the HTTP method and the path to it:

```ts
await router.route("GET", "/posts/cool-post/comments?page=3&perPage=8&author=john");
```

That will delegate handling to the first route that matches this method and path.

There's also short syntax for adding routes, without explicit creating of endpoint instances:

```ts
// prettier-ignore
const router = new Router()
  .get("/posts/:postName/comments", {page: "number"}, (args) => {
    // args.match.params here will be of type {postName: string; page: number}
  });
```

You can also initialize `Router` with any object, and it will be passed into the routes (and will be typesafe too!)

```ts
const router = new Router({foo: "bar"}).get("/posts/:postName", {}, (args) => {
  console.log(args.payload);
  // {foo: "bar"}
});
```

You can also specify the desired request and response types when creating a router, then it will be enforced in route handlers. You could use it to pass e.g. the request object into the route handlers. All of that together could look like this:

```ts
interface IRequest {
  path: string;
  method: string;
  headers: Partial<Record<string, string>>
}

interface IResponse {
  body: string;
  statusCode: number;
}

const router = new Router<IRequest, IResponse>(request)
  .get("/posts/:postName", {}, (args) => {
    return { statusCode: 200, body: `Post ${args.match.params.postName}` };
  });

const result = await router.route(request.method, request.path);
if (result.success) {
  const response = result.data;
  // handle response somehow
} else
  // handle 404 somehow
}
```

### Advanced

By default, if you specify a path param like: `/posts/:postName/comments`, it will be a type of string.
If you want to make it a number, you could add `|i` to the param name, like: `/posts/:id|i/comments`.
It will get `{id: number}` type.

```ts
const postCommentsEndpoint = Endpoint.build("/posts/:id|i/comments", {
  page: "number",
  perPage: "number",
});
// Endpoint<"postComments", {id: "number", page: "number", "perPage: "number"}>
```

We support two built-in types - `"string"` and `"number"`, and if you want them to be optional, you can add `?` to the end, like: `"string?"` and `"number?"`. You also can express any type with [`io-ts`](https://github.com/gcanti/io-ts) type builder.
For example, let's say we want to add `categoryIds` to our `postComments` endpoint, which is an array of numbers.
It'll look like this:

```ts
import * as t from "io-ts";

const postCommentsEndpoint = Endpoint.build("/posts/:postName/comments", {
  page: "number?",
  perPage: "number?",
  categoryIds: t.array(t.number),
});
```

It will match a route like this:

```ts
postCommentsEndpoint.match("/posts/cool-post/comments?page=3&perPage=8&categoryIds=[1,2,3]");
// {params: {postName: "cool-post", page: 3, perPage: 8, categoryIds: [1, 2, 3]}, rest: {}}
```

and aldo will match a route without `page` or `perPage` since they are optional:

```ts
postCommentsEndpoint.match("/posts/cool-post/comments?categoryIds=[1,2,3]");
// {params: {postName: "cool-post", page: undefined, perPage: undefined, categoryIds: [1, 2, 3]}, rest: {}}
```

There's also another way of building endpoints - iteratively, by the `.p()` method:

```ts
const endpoint = new Endpoint()
  .p("posts")
  .p(":postName", "string"),
  .p("comments")
  .p({
    page: "number?",
    perPage: "number?",
    categoryIds: t.array(t.number),
  })
});
```

This way, you can also specify any `io-ts` type for the `postName` path param, not only `"string"` or `"number"`.

### Web server example

You could use it together with e.g. Node's `http` library like this:

```ts
import http from "http";
import {Endpoint, Router, Method, RouteHandler} from ".";

interface IRequest {
  req: http.IncomingMessage;
  res: http.ServerResponse;
}

const addCommentEndpoint = Endpoint.build("/posts/:postName/comment/create");
const handleAddComment: RouteHandler<IRequest, void, typeof addCommentEndpoint> = (args) => {
  // ---
  // Add comment to the database somehow here
  // ---
  const {req, res} = args.payload;
  const {params} = args.match;
  res.statusCode = 302;
  const location = postCommentsEndpoint.toUrl(
    {postName: params.postName, page: 1, perPage: 8},
    "http://localhost:3000"
  );
  res.setHeader("Location", location);
  res.end("");
};

const postCommentsEndpoint = Endpoint.build("/posts/:postName/comments", {
  page: "number",
  perPage: "number",
});
const handlePostComments: RouteHandler<IRequest, void, typeof postCommentsEndpoint> = (args) => {
  // ---
  // Fetch comments from the database somehow here
  // ---
  const {req, res} = args.payload;
  res.statusCode = 200;
  res.setHeader("Content-Type", "text/html");
  res.end("Comments");
};

const server = http.createServer(async (req, res) => {
  try {
    const url = new URL(req.url!, "http://localhost:3000");

    const router = new Router({req, res})
      .get(postCommentsEndpoint, handlePostComments)
      .get(addCommentEndpoint, handleAddComment);

    const result = await router.route(req.method as Method, url.pathname + url.search);
    if (!result.success) {
      res.statusCode = 404;
      res.end("Not Found");
    }
  } catch (e) {
    res.statusCode = 500;
    res.setHeader("Content-Type", "application/json");
    res.end(JSON.stringify({name: e.name, error: e.message, stack: e.stack}));
  }
});
server.listen(3000, "localhost", () => {
  console.log(`--------- Server is running ----------`);
});
```

repository: astashov/yatro

repo_name: astashov/yatro


text:
Birst_Command
====================
[![Gem Version](https://badge.fury.io/rb/Birst_Command.svg)](http://badge.fury.io/rb/Birst_Command)

Birst Command is a Ruby gem that allows you to build Ruby scripts that
interface with the Birst Web API.  It also comes with a simple command line
tool that can be used to execute simple API requests from the command line.

Note: this is not an officially-sanctioned Birst project.  I'm just a
Birst user that needed to set up a very basic Ruby interface.

# Installation & Setup

**SPECIAL NOTE:** Many changes since version 0.5.0.  Read the
  [Changelog](CHANGELOG.md).

Prerequisites: Ruby > 2.0 and rubygems.

Install the gem using `gem install Birst_Command` or using rvm or
rbenv/bundler as you prefer.

After installing, you'll need to create a Birst Command config file
that contains the credentials you'll use to connect to Birst.  This
is a yaml file that should look something like

````yaml
---
session:
  wsdl: "https://app2101.bws.birst.com/CommandWebService.asmx?WSDL"
  endpoint: "https://app2101.bws.birst.com/CommandWebService.asmx"
  username: "BirstUsername"
  password: "EncryptedPassword"
  soap_log: true
  soap_log_level: :debug
````
Save it to `$HOME/.birstcl`.  Most users should only need to modify
the username and password. (**Note**: do not use `login.bws.birst.com`
since it does not use an updated WSDL; a specific app server must be
specified).  Since I have a strong aversion to storing passwords in
plaintext, the password in the config file needs to use and encrypted
password.  Birst Command comes bundled with a password encryptor
called [Envcrypt](https://github.com/gnilrets/envcrypt) that can be
executed via

````bash
$ envcrypt -s mypassword
````

which should give an output similar to
````
Encrypted Secret: 2KwUMeJIqsjPWWF9Fw0I+w==
ENVCRYPT_KEY='V/V919RKnz8l2M002336bg==$ARoQfp/9pfv5kVN/ysRuStLuTWJFZhQF1f49xkHbcwQ=$YAjVhHOXlcagmZoFYgPWdQ=='
WARNING: It is critical that the key and encryption password be stored separately!
````

Copy and paste the encrypted password (aka "secret') into the
`$HOME/.birstcl` config file.  You will also need to ensure that the
`ENVCRYPT_KEY` environment variable is set as indicated above.  If you're
running in a development environment, you can include these in your
bash `~/.profile` file.

Also note that the YAML config file is pre-processed with ERB.  So if
you also want to keep your encrypted password in an environment
variable, you could replace the `password` line above with
````yaml
  ...
  password: "<%= ENV['MY_ENCRYPTED_PASSWORD'] %>"
  ...
````

# Usage - Birst command line tool

Birst Command also installs a rudimentary command line tool for interacting
with the Birst web API.  It's still very simple.  If you want more functionality,
please drop me a line in the github repository.

To use the command line tool, put the config file created above in
$HOME/.birstcl.  Then run Birst commands using `birstcl`.  You'll have to refer
to the [Birst Documentation](https://app2102.bws.birst.com/CommandWebService.asmx)
for a full list of commands.  All birst commands should be submitted using snake_case
and arguments using the exact camelCase specified in the Birst documentation.  See
below for an explanation of this bizarre requirement.  Here are some examples:

List spaces

    birstcl -c list_spaces

Get list of sources for a space

    birstcl -c get_sources_list -a '{ spaceID: "383nf0d7-3875-3829-3hff-faba8936180a" }'

Copy space with options

    birstcl -c copy_space -a '{ spFromID: "9ab9865c-37a8-0586-e856-ddd3856a0371", spToID: "3957a9b7-38c1-175v-3985-1957f1836a93", mode: "replicate", options: "data;repository;settings-basic" }'

## Cookies

Many Birst web API commands return a job token that can be used to check up
on the status of a job as it progresses.  The job tokens are tied to a specific
server, and the only way to direct your login to a specific server is to use
cookies.  So, if you wanted to copy a space with one command and then
check whether the job is complete with another, you need to do something
like the following.

Copy a space and write a cookie file

    birstcl -c copy_space -a '{ spFromID: "f9cb64fe-58a1-1db6-a7a8-9f091b4ea96f", spToID: "12913e53-3eac-4f98-91ab-2fqf345e22e5", mode: "replicate", options: "data;datastore;repository;useunloadfeature" }' -w ./cookie

Note the job token returned as result and then run another command to
check whether the job is complete by reading the cookie file

    birstcl -c is_job_complete -a '{ jobToken: "9f636262f4c73d7503bf240ea08de040" }' -r ./cookie

# Usage - As Ruby library

In your Ruby program, include the Birst Command gem and load the config file via

````ruby
require 'rubygems'
require 'bundler/setup'
require 'birst_command'

Birst_Command.load_settings_from_file(file)

# Or you can forego the settings file and set them explicitly in code via
Birst_Command::Settings.session.username = "George"

````

Birst commands are submitted in session blocks, which automatically
perform the process of logging in, tracking the login token, and
logging out.  For example, to list all spaces that you have rights to,
you can submit the following code

````ruby
Birst_Command::Session.new do |bc|
  spaces = bc.list_spaces
  puts "#{JSON.pretty_generate spaces}"
end
````

Which would return something like

````ruby
{
  "user_space": [
    {
      "name": "MyGreatSpace",
      "owner"<EMAIL_ADDRESS>      "id": "b413207d-3fe2-4309-1b4a-ac8e961daad2"
    },
    {
      "name": "MyOtherGreatSpace",
      "owner"<EMAIL_ADDRESS>      "id": "a113207d-3fe2-4310-1b4a-b58e961da123"
    }
  ]
}
````

The `spaces` variable is a Ruby hash parsed from the SOAP response.
The structure of the returned hash follows the structure that Birst
returns.

## Command arguments

Some Birst API commands require arguments.  All arguments are supplied
as an argument hash.  All arguments are mandatory even if they're blank/null
(Birst web API requirement).  For example, to create a new space,

````ruby
Birst_Command::Session.new do |bc|
  new_space_id = bc.create_new_space :spaceName => "myNewSpace", :comments => "Just testing",:automatic => "false"
end
````

## Cookies

The start session block can also accept an argument named `use_cookie` to
pass a cookie to be used during startup.  For example, suppose we start
a copy job and save the `session_cookie` and `job_token` in variables.

````ruby
session_cookie = nil
job_token = nil
Bist_Command::Session.new do |bc|
  job_token = bc.copy_space :spFromID => @from_id, :spToID => @to_id, :mode => "replicate", :options => "data;datastore;useunloadfeature"
  session_cookie = bc.auth_cookie
end
````
In a subsequent session we can use the `session_cookie` on login via

````ruby
is_job_complete = false
Birst_Command::Session.new auth_cookie: session_cookie do |bc|
  is_job_complete = bc.is_job_complete :jobToken => job_token
end
puts "COMPLETE? #{is_job_complete}"
````

## Helper methods

I find some of the Birst API responses to be rather cumbersome.  For
example, why do I need hash with a single `user_space` key when I
run the `list_spaces` command?  I'd
rather have an array of hashes here.  To that end I find it convenient
to define helper methods that extend the Session class to simplify
some of this.  To override the return value of the native
`list_spaces` command, you can do the following

````ruby
class Birst_Command::Session
  def list_spaces(*args)
    result = command __method__, *args
    [result[:user_space]].flatten
  end
end
````

You can then execute the same `list_spaces` command above, but you get
an array of hashes rather than hash with a key that points to an array
of hashes.

I have not included any of these helper methods in the Birst Command
gem because what I find helpful, you may not.  Birst Command just
provides the basic interface.

## camelCase/snake_case issues

Birst Command uses [Savon](http://savonrb.com/version2/client.html) as
the underlying framework used to communicate with the Birst SOAP API.
Savon expects commands in snake_case format and converts them into
camelCase when submitted to the Birst API (e.g., `list_spaces` is
converted to `listSpaces`).  This behavior is *not* configurable.
Savon also has options for converting the arguments of parameters from
snake_case into camelCase.  Unfortunately, the Birst Web API is not
entirely consistent in its use of camelCase for arguments (e.g.,
`spaceId` is used in `deleteSpace` but `spaceID` is used in
`listUsersInSpace`).  This inconsistency requires us to **submit
commands as snake_case and arguments as the camelCase that Birst
uses.**


text:
[![Build Status](https://secure.travis-ci.org/papabricole/EggDuino.png)](http://travis-ci.org/papabricole/EggDuino)

Eggduino
========

Arduino Firmware for Eggbot / Spherebot with Inkscape-Integration

Forked and heavily modified from https://github.com/cocktailyogi/EggDuino.

The aim of this fork is to allow hackers to easily add their own hardware/tweaks.

# Build the firmware

## Using Arduino IDE

    - Click the github 'Clone or Download' button, then 'Download ZIP'
    - Extract the ZIP
    - Rename the extracted folder into 'EggDuino'
    - Open 'EggDuino.ino' using the Arduino IDE
    - Install the 'VarSpeedServo' library
    - Build & upload firmware

## Using Platformio

    - Click the github 'Clone or Download' button, then 'Download ZIP'
    - Extract the ZIP
    - Build: 'platformio run'
    - Upload firmware: 'platformio run --target upload'

# Default Implementation

The default implementation 'EBBHardware' is designed for:

    - arduino nano + cnc shield or similar
    - optional: autoreset disabled (See Troubleshooting section)
    - 2x A4988, 1/16 microstepping stepper motor driver
    - 2x nema 17 stepper motors for the rotation and pen axes
    - 1x standard rc micro servo for the pen up/down
    - 3x optional buttons (abort, toggle pen up/down, enable motors)

If your hardware is based on similar specs, you just need to edit 'config.h' and check
the Arduino pin assignments.

# Setup the Inkscape plugin

    - Install Inkscape 0.91 (0.92 has no cancel buttons)
    - Install the Eggbot extension:

      http://wiki.evilmadscientist.com/Installing_software

    - The Eggduino cannot be detected by default, but we can fix it on our own:
        - Go to your Inkscape-Installationfolder and navigate to subfolder .\App\Inkscape\share\extensions
        - Open File "ebb_serial.py" in a texteditor
        - In the 'findPort()' function, search the line:

            "if port[2].startswith("USB VID:PID=04D8:FD92"):"

        - Replace "04D8:FD92" by your arduino VID:PID usb identifier (e.g arduino nano clone "USB VID:PID=1A86:7523")
        - In the 'testPort()' function, search the line:

            serialPort = serial.Serial( comPort, timeout=1.0 ) # 1 second timeout!

        - Replace "timeout=1.0" by "timeout=2.0"
        - Save the file.

# Software Overview

The main file is EBBParser: it's a c++ interface responsible for parsing the 'EBB EggBot' protocol and
dispatch the work to different functions. Alone, it does nothing and should not need any modification.

The real work is done in the derived class EBBHardware: it implement the necessary functions declared
in EBBParser. The list of functions you need to implement are declared in 'EBBParser.h'.
The one ending with '= 0' (virtual pure) are mandatory and generates compilation errors if not implemented, the
one without are optional, depends only on what features you are interested in.

MyEggDuino.h: This minimal implementation does nothing.

    #include "EBBParser.h"

    class MyEggDuino : public EBBParser {
    public:
        MyEggDuino(Stream& stream);

        virtual void enableMotor(int axis, bool state)
        {
        }

        virtual void stepperMove(int duration, int numPenSteps, int numRotSteps)
        {
        }

        virtual void setPenState(bool up, short delayMs)
        {
        }

        virtual bool getPenState()
        {
            return true;
        }

        virtual void setPenUpPos(int percent)
        {
        }

        virtual void setPenDownPos(int percent)
        {
        }

        virtual void setServoRateUp(int percentPerSecond)
        {
        }

        virtual void setServoRateDown(int percentPerSecond)
        {
        }

        virtual bool getPrgButtonState()
        {
            return false;
        }

        virtual void setPinOutput(char port, int pin, int value)
        {
        }

        virtual void setEngraverState(bool state, int power)
        {
        }
    };

EggDuino.ino

    #include "MyEggDuino.h"

    MyEggDuino ebb(Serial);

    void setup()
    {
        Serial.begin(9600);
        ebb.init();
    }

    void loop()
    {
        ebb.processEvents();
    }

# Troubleshooting

The arduino is auto reset when a serial communication is initialized. This is an
Arduino feature for automatic firmware upload.
This is a problem since the EggBot inkscape plugin sometime re-initialize the serial communication,
breaking the current paint job.
To prevent this autoreset, you need to solder a 10uF capacitor between RST and GND pin of the arduino,
or google 'Disabling Auto Reset On Serial Connection' for alternatives.

repository: papabricole/EggDuino

repo_name: papabricole/EggDuino


text:
---
author: christeplovs
comments: true
date: 2013-05-04 03:13:46+00:00
layout: post
link: https://christeplovs.wordpress.com/2013/05/03/educational-technology-in-industry-and-academia-an-nserc-sponsored-workshop/
slug: educational-technology-in-industry-and-academia-an-nserc-sponsored-workshop
title: 'Educational Technology in Industry and Academia: an NSERC-sponsored workshop'
wordpress_id: 420
categories:
- Work
tags:
- acadmia
- edtech
- industry
---

I was recently invited to attend a workshop sponsored by the Natural Sciences and Engineering Research Council (NSERC), the Canadian federal agency that is responsible for funding most of the “hard science” projects in Canadian post-secondary institutions (the other Canadian funding agencies at the federal level are the Social Sciences and Humanities Research Council (SSHRC) and the Canadian Institute for Health Research (CIHR)).  In all, about 25 experts in educational technology from academia and industry were invited to attend the workshop, whose goal was to try to make an initial foray into understanding what academia needs from industry and what industry needs from academia.  The agenda included some show-and-tell segments from academics, a lightning round from the industry participants, and time to work in groups of about 6 people to answer the guiding questions.

I think the day was a success.  We made some initial forays into understanding what the two camps needed from each other.  Yes, there is a disconnect, but it may be more superficial than we think. No, the attendees were not a representative sample from all of those involved in educational technology in Canada.  No, we didn’t make tremendous gains.  Yes, we started networking with each other.  In the end, I think we agreed that we would pursue a grass-roots approach and see how things evolve rather than trying the top-down policy-changing approach that often fizzles.  We’ll see what happens, but I think something good will come of this initiative.

extension: markdown


text:
# Kubernetes Security with kops

[kops](https://github.com/kubernetes/kops) is an installer which helps you create, destroy, upgrade and maintain production-grade, highly available, Kubernetes clusters on a cloud provider.
Supported providers at the time are AWS, GKE (beta support) and VMware vSphere (in alpha). Because
currently only AWS is officialy supported, this guide will refer to AWS as your cloud provider.

**kops Version 1.8.1 (git-94ef202)**

## Setup a secure cluster

### Create cluster

```sh
kops create cluster\
    --cloud aws\
    --authorization rbac\
    --topology private\
    --networking canal\
    --bastion\
    --image ami-74e6b80d\
    --master-count 3\
    --node-count 2\
    --zones eu-west-1a,eu-west-1b,eu-west-1c\
    --ssh-public-key ~/.ssh/mykey.pub\
    --state s3://k8s-mycluster-domain-tld\
    mycluster.domain.tld
```

The important bits:

* `--authorization rbac` Will set the authorization mode to RBAC *(default: AlwaysAllow)*
* `--topology private` Will use a private VPC subnet for all cluster nodes *(default: public)*
* `--networking canal` In a private topology the default networking provider `kubenet` can't be used, also we want to support network policies *(default: kubenet)*
* `--bastion` Provides an external facing host to entry the private network instances *(default: No bastion)*

**Warning: Don't apply/deploy the cluster just yet!**

### API config changes

#### Insecure Port :cloud:

It's recommended to disable the insecure (non TLS, non auth, non authz) port for the API. At the time (kops 1.8.1) the insecure port can't be closed
because of the API health check ([Issue 43784](https://github.com/kubernetes/kubernetes/issues/43784)). The port will not be exposed in the network by default and the API ELB is targeting the secure port, so it's considered OKish. From Kubernetes v1.10 the `--insecure-port` option will be deprecated.

#### Disable Profiling :cloud:

Profiling should be disabled (see: [General: API settings -> AdmissionController](README.md#api-settings)) but can't be configured through the `kubeAPIServer` setting currently. [Issue 4688](https://github.com/kubernetes/kops/issues/4688)

#### Admission Controller Config :fire:

Refer to [General: API settings -> AdmissionController](README.md#api-settings).

```yaml
spec:
  kubeAPIServer:
    admissionControl:
    - Initializers
    - NamespaceLifecycle
    - LimitRanger
    - ServiceAccount
    - PersistentVolumeLabel
    - DefaultStorageClass
    - DefaultTolerationSeconds
    - NodeRestriction
    - Priority
    - ResourceQuota
    - AlwaysPullImages
    - DenyEscalatingExec
```

### Deploy cluster

Apply/deploy and validated the cluster setup ...

```sh
kops update cluster $NAME --yes
kops validate cluster $NAME
```

### Add and enable PodSecurityPolicy

*Work in progress*

### Apply OS security updates :fire:

After your cluster is up, you should SSH in to the Bastion host and check each deployed EC2 instance for
security updates. Official AMIs like for example the Ubuntu AMI are relatively up to date
but AMIs in general should be considered out of date after creation. If you manage your
own AMI you should update the AMI and provide the new ID through `kops cluster edit` and reapply
the cluster, so that all instances will be recreated with the updated AMI.

## Bastion host in pre-existing cluster :cloud:

```sh
kops create instancegroup bastions --role Bastion --subnet $SUBNET
```

See: [Bastion in Kops](https://github.com/kubernetes/kops/blob/master/docs/bastion.md)

## Changing Topology of the API server :partly_sunny:

If you want to completely shutdown any public access to cluster services follow the steps for [changing the Topology of the API server](https://github.com/kubernetes/kops/blob/master/docs/topology.md#changing-topology-of-the-api-server).

**Warning:** Before changing the API to private you need some kind of VPN or similar to still be able to access the K8s API.

## Chaning DNS zone to private :partly_sunny:

By default the Route53 hosted zone managed by Kubernetes is public. This has the advantage that even with a private topology DNS records (eg. the Bastion host) can still be resolved publicly. The zone can be changed to private by passing the `--dns private` argument to `kops create cluster` or by editing the cluster after creation.

**Warning:** You need some kind of VPN or similar to still be able to resolve DNS records for your cluster zone.

## AWS specific security measures :boom:

See: [Kubernetes Security on AWS](AWS.md)