text:
Convert this router into a [`MakeService`], that will store `C`'s
associated `ConnectInfo` in a request extension such that [`ConnectInfo`]
can extract it.

This enables extracting things like the client's remote address.

Extracting [`std::net::SocketAddr`] is supported out of the box:

```rust
use axum::{
    extract::ConnectInfo,
    routing::get,
    Router,
};
use std::net::SocketAddr;

let app = Router::new().route("/", get(handler));

async fn handler(ConnectInfo(addr): ConnectInfo<SocketAddr>) -> String {
    format!("Hello {}", addr)
}

# async {
let listener = tokio::net::TcpListener::bind("<IP_ADDRESS>:3000").await.unwrap();
axum::serve(listener, app.into_make_service_with_connect_info::<SocketAddr>()).await.unwrap();
# };
```

You can implement custom a [`Connected`] like so:

```rust
use axum::{
    extract::connect_info::{ConnectInfo, Connected},
    routing::get,
    serve::IncomingStream,
    Router,
};

let app = Router::new().route("/", get(handler));

async fn handler(
    ConnectInfo(my_connect_info): ConnectInfo<MyConnectInfo>,
) -> String {
    format!("Hello {:?}", my_connect_info)
}

#[derive(Clone, Debug)]
struct MyConnectInfo {
    // ...
}

impl Connected<IncomingStream<'_>> for MyConnectInfo {
    fn connect_info(target: IncomingStream<'_>) -> Self {
        MyConnectInfo {
            // ...
        }
    }
}

# async {
let listener = tokio::net::TcpListener::bind("<IP_ADDRESS>:3000").await.unwrap();
axum::serve(listener, app.into_make_service_with_connect_info::<MyConnectInfo>()).await.unwrap();
# };
```

See the [unix domain socket example][uds] for an example of how to use
this to collect UDS connection info.

[`MakeService`]: tower::make::MakeService
[`Connected`]: crate::extract::connect_info::Connected
[`ConnectInfo`]: crate::extract::connect_info::ConnectInfo
[uds]: https://github.com/tokio-rs/axum/blob/main/examples/unix-domain-socket/src/main.rs

repository: tokio-rs/axum

gha_language: Rust

repo_name: tokio-rs/axum


text:
# time-ago-lite

_A liteweight library to generate time ago string from a date_

## Installation

    $ yarn add time-ago-lite

or

    $ npm add time-ago-lite

## Usage

### English (default)

    import { relativeTimeEn } from 'time-ago-lite';

    const yourRelativeTimeString = relativeTimeEn(yourDate);

### Other languages

    import { relativeTime, wordsFn } from 'time-ago-lite';

    /**
     * Words function based on your language rules
     * It needs to conform to the wordsFn interface
     */
    const yourLangWords: wordsFn = (number = 1, unitKey = 'now', isInPast = true) => {
        // Your implementation here, see the `enWords` in the `index.ts`
        // or `srWords` in the `index.spec.ts`
    };

    const relativeTimeYourLang = relativeTime(yourLangWords);

    const yourRelativeTimeStringInYourLang = relativeTimeYourLang(yourDate)

license: MIT

repository: markomarkovic/time-ago-lite

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: markomarkovic/time-ago-lite


text:
PHPMyBackup - A PHP MySQL differential backup script
====================================================

A PHP MySQL differential backup script
--------------------------------------

PHPMyBackup is a PHP script designed for backing up an entire MySQL
server on the commandline. What makes it unique is it only uses use
**differential** methods to dump only the changes as it keeps a local
copy of all the synced databases & tables.

Software features
-----------------

-   Only download changed/altered tables (checksum)
-   Allows skipping of specified databases from backups (supports wildcard)
-   Allows skipping of specified tables or table-data (supports wildcard)
-   Integrates with \`mysqldump\` client for individual sql dumps
-   Backup rotation

Limitations
-----------

-   No database locking during backup. because a separate \`mysqldump\`
    is called for every table download, only table locking is used.
-   Tables with no data (either empty or manually specified) do not
    contain a checksum, so a new backups of table structure is always
    made (extremely small).
-   This has been tested in several environments, but your own full
    testing is always advised!

Requirements
------------

-   A MySQL user on the server with ‘SELECT’ & ‘LOCK TABLES’ permissions
-   \`tar\` with bzip2 support (used for compressing backups)
-   PHP CLI on backup host with MySQL support
-   \`mysqldump\` (used for actual table dumping)

Usage
-----

    require('/path/to/phpmybackup.php');
    $db = new MYSQL_DUMP;
    $db->dbhost = 'server.com';
    $db->dbuser = 'backup-user';
    $db->dbpwd = 'backup-password';
    $db->backupsToKeep = 30;
    $db->showDebug = false;
    $db->backupDir = '/mnt/backups/mysql/';
    $db->ignoreList = array('test','unimportant_db');
    $db->emptyList = array('largedb.large_table1','largedb.cachetable');
    $db->dumpDatabases();

-   The above command will dump all databases except for ‘test’ and
    ‘unimportant\_db’ from server.com
-   The data from two tables, large\_table1 & cachetable, (found in
    database largedb) will be ignored, however the table structure will
    be backed up. This is especially handy if you have temporary tables
    or large tables which contain unimportant / cached data.
-   A total of 30-days of backups will be kept. **Note**: Backups are
    named by date (yyyy-mm-dd.tar.bz2), so a maximum of 1 backup per day
    can be kept. If the script is re-run on the same day, the repository
    is synced and the existing daily backup overwritten.


text:
#  AWS Budget Notifier

Setup AWS Budget notifications using AWS CDK.
By default notifications are sent to all subscribers via e-mail.

## Configuration options

- Budget
  - `limit`: The budget limit, e.g. 10.
  - `unit`: The unit of measurement for the limit, e.g. USD.
- Cost Filters<br/>

  | Key  | Description |
  |---	|---	|
  | `application`	|  If specified the application (name) is added as tag filter. |
  | `availabilityZones` | If specified the availability zones (e.g. `eu-central-1`) is added as tag filter. |
  | `costcenter` 	| If specified the cost center is added as tag filter. |
  | `service`  	| If specified the service (e.g. Lambda, EC2) is added as tag filter. |

- Notification
  - `recipients`: Notifications are sent to this e-mail addresses
  - `threshold`:  Notifications are triggered if `threshold` percent of the budget are exceeded.

### Example usage

```javascript
import * as cdk from "@aws-cdk/core";

import { CfnBudget } from "@aws-cdk/aws-budgets";
import { StackProps } from "@aws-cdk/core";
import { BudgetNotifier } from "./budget_notifier";

export class BudgetNotifierStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    new BudgetNotifier(this, "test", {
      recipients<EMAIL_ADDRESS>      availabilityZones: ["eu-central-1", "eu-west-1"],
      application: "HelloWorld",
      costCenter: "myCostCenter",
      limit: 10,
      unit: "USD",
      threshold: 75,
    });
  }
}
```

## Links

- [AWS Cloud Development Kit (CDK)](https://github.com/aws/aws-cdk)
- [Cost Explorer filters](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ce-filtering.html)

repository: peteawood/cdk-budget-notifier

repo_name: peteawood/cdk-budget-notifier


text:
:ambulance: Green Route :hospital:

[![](https://img.shields.io/badge/Made_with-Flutter-red?style=for-the-badge&logo=flutter)](https://flutter.dev/)
[![](https://img.shields.io/badge/Made_with-Google%20Maps%20Platform-red?style=for-the-badge&logo=google-maps)](https://developers.google.com/maps/documentation)
[![](https://img.shields.io/badge/Made_with-Firebase-red?style=for-the-badge&logo=firebase)](https://firebase.google.com/)
[![](https://img.shields.io/badge/Made_with-dart-red?style=for-the-badge&logo=dart)](https://dart.dev/)
[![](https://img.shields.io/badge/Made_with-Node.js-red?style=for-the-badge&logo=node.js)](https://nodejs.org/en/)

---

Submission for Electrothon Hackathon 2021.

About:

Green Route is an App that works on the mechanism of signalling all Google Map users on the shortest route in a 1 Km radius of an Ambulance approach and partnerning with the Traffic Control to alter traffic restrictions in that route to create a temporary Green Corridor making an emergency reponse lightning.

Problem it solves:

According to the World Economic Forum, 150,000 people die each day in India. A Recent Study has showed that around 86,000 people die due to untimely healthcare which accounts for 57% of the deaths. One of the prime causes for this  baneful situation is the traffic. For a country like India, where the population is humungous, commute is a major hassle. Emergency responses are slowed down in traffic and several lives are lost due to this untimely response.

Our product puts Google maps in a never-used-before manner through our ambulance guidance and vehicle signalling system. The Partnership and Integration with the Traffic Control System enables a local green corridor that allows critical services to reach the site of required response in good time.

We also partner with Google Ventures and Google Capital to access their data base and reach as an extended plugin to the maps.

### Features:
  * [x] Green Route is App that allows speedy route for Ambulance.
  * [x] It has a User Authentication using ID Card that verifies user using OCR & Firebase ML Vison so that only Medical Professionals get access to Green Corridor addition features.
  * [x] Route from Source to Destination is shown using Polylines.
  * [x] Sends personalized sound Notification to users saying "Ambulance is on the way" as drivers can check phone during driving.
  * [x] Can be used on both iOS & Android.

Green Route as an Application:

---

### Tech Stack of this Project:

* Flutter
* Google Maps Platform
* Firebase
* Node.js
* Firebase ML Vison
* Libraries: Available in [requirements.txt](https://github.com/dishant26/Green-Route/blob/main/requirements.txt)

Link to the Demo Video:
[Green Route](https://www.youtube.com/watch?v=1pJLQXllHSw&ab_channel=AnishPawar)

---

Developed by Team Glasses

branch_name: refs/heads/main


text:
---
title: Lua Modules
menu:
  docs:
    parent: lua-reference
    identifier: lua-modules
weight: 6260
aliases:
  - /docs/latest/Automation/Lua/Modules/
---

A number of Lua modules are included with Aegisub.
Some of these, such as [`karaskel.lua`]({{< relref "karaskel.lua.md" >}}) implement subtitle-specific functionality, while others such as [re]({{< relref "re" >}}) fill holes in the Lua standard library.

## Using modules

Simply write `modulename = require 'aegisub.modulename'` at the top level of a script.
For example, to include the [re]({{< relref "re" >}}) modules, `re = require 'aegisub.re'`.

Note that if you look at older scripts you will probably see several other methods for including modules, such as `include`.
These have been deprecated in favor of following the modern lua module style introduced with Lua 5.2.

To use modules in [Karaoke Templater]({{< relref "../Karaoke_Templater" >}}), place the require statement in a [code once]({{< relref "../Karaoke_Templater/Code_lines_and_blocks#classesofcodelines" >}}) line.
Note that `karaskel.lua`, `utils.lua` and `unicode.lua` do not have to be `require`d in [Karaoke Templater]({{< relref "../Karaoke_Templater" >}}), as they are automatically imported.

## Modules reference

[util]({{< relref "Modules/util" >}})
: An assorted collection of various utility functions which don't fit into any coherent categories, especially for handling colours.

[`karaskel.lua`]({{< relref "Modules/karaskel.lua.md" >}})
: The karaoke skeleton is a collection of functions mainly intended to do
  text layout of timed karaoke for creating advanced karaoke effects, as well
  as a number of other helper functions.

[unicode]({{< relref "Modules/unicode" >}})
: All data passed in and out of Aegisub through the Automation 4 Lua interface are encoded in UTF-8, but Lua doesn't natively provide support for this.
  Several helper functions are provided here.

[`cleantags.lua`]({{< relref "Modules/cleantags" >}})
: A function to clean up ASS tags in a line.

[clipboard]({{< relref "Modules/clipboard" >}})
: Functions for copying and pasting text.

[re]({{< relref "Modules/re" >}})
: Bindings for ICU regular expressions via [boost.regex](http://www.boost.org/doc/libs/1_53_0/libs/regex/doc/html/index.html), which has full Unicode support and more features than Lua's built in regular expression.

[lpeg](http://www.inf.puc-rio.br/~roberto/lpeg/)
: PEG library for writing parsers.

[luabins](https://github.com/agladysh/luabins)
: A serialization library for saving tables to extradata or config files

[lfs](http://keplerproject.github.io/luafilesystem/)
: Some assorted filesystem functionality not supported by the Lua standard library.

repository: Aegisub/aegisite

gha_language: HTML

gha_license_id: MIT

repo_name: Aegisub/aegisite


text:
# Independent Project: Modern JS - GitHub User Lookup

#### A website where names and descriptions of a person's public repository can be displayed. , May 27, 2016

#### By _Inthrayuth Mahaphol_

## Description

A website where the user can enter a GitHub username into a form. The website will display names and descriptions of that username's public repositories. The app incorporates API to retrieve GitHub information.

## Setup/Installation Requirements

* Link to repository: https://github.com/inthra/w1Fri-UserLookup.git
* Clone or download this repository to your Github account
* Create a project directory on your computer
* Have Node.js installed on your computer
* In your terminal run **npm install, bower install, gulp build, and gulp serve**
* A local web server should automatically open in your browser with the website loaded if you have a browser open

## Setup API Requirements

* You need to get your own the GitHub API key. Without the key, you can retrieve GitHub information only 60 requests per hour. However, you can access 5,000 requests per hour if you have the key. GitHub refers to these keys as "Personal Access Tokens". You can get the key by generating it via your GitHub account.

* You will need to store the key in a local file with the same filename and location.

* You must name your API key variable _exports.apiKey_ in your .env file (hidden file) and store it in the root of the project directory.

* Create a file in the top level of your project directory called .env file to hold our API key. This is a common file extension for a configuration file used to set up environmental variables. Paste your API key in your .env file that you just created and store it in an exported property named apiKey.

* _API key .env (hidden file) file example:_
**exports.apiKey = "YOUR-API-KEY-GOES-HERE";**

* _In your .js file (JavaScript file) that gets access to the API key, add the following requirement:_
**var apiKey = require('./../.env').apiKey;**

## Known Bugs

If a bug is found, please let me know via Github.

## Support and contact details

Feel free to contact me with questions or suggestions and contribute to the code.

## Technologies Used

* Git
* Github
* Atom text editor
* JavaScript
* Node.js - including npm and bower

### License

_This software is licensed under the MIT license_

Copyright (c) 2016 Inthrayuth M.


text:
# [Cloud Cards](http://alexa.amazon.com/#skills/amzn1.ask.skill.b34be065-b7f0-4dc5-87f2-14f98787f63c)
![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png) 0

To use the Cloud Cards skill, try saying...

* *Alexa, Open Cloud Cards*

* *Alexa, launch Cloud Cards and new game*

* *Alexa, launch Cloud Cards and start game*

Cloud flashcards allows you to get quizzed on questions about using cloud services. The responses are in a user friendly fashion that doesn't make you feel that you got an answer right or wrong, but states the correct answer to the question. For instance, 'The answer is three, a security group'.

***

### Skill Details

* **Invocation Name:** cloud cards
* **Category:** null
* **ID:** amzn1.ask.skill.b34be065-b7f0-4dc5-87f2-14f98787f63c
* **ASIN:** B01L0ZU4P4
* **Author:** DRath
* **Release Date:** August 30, 2016 @ 07:34:21
* **In-App Purchasing:** No


text:
---
name: Bug report
about: Report a bug to help us improve Istio
---
(NOTE: This is used to report product bugs:
  To report a security vulnerability, please visit <https://istio.io/about/security-vulnerabilities/>
  To ask questions about how to use Istio, please visit <https://discuss.istio.io>
)

**Bug description**

**Affected product area (please put an X in all that apply)**

[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience

**Expected behavior**

**Steps to reproduce the bug**

**Version (include the output of `istioctl version --remote` and `kubectl version`)**

**How was Istio installed?**

**Environment where bug was observed (cloud vendor, OS, etc)**

Additionally, please consider attaching a [cluster state archive](http://istio.io/help/bugs/#generating-a-cluster-state-archive) by attaching
the dump file to this issue.

repository: istio/api

gha_language: Shell

repo_name: istio/api


text:
Scratchbling
============

A simple RESTful interface that will provide an API to the "Scatchbling" company’s database.

This app uses Ruby 2.0 and Rails 4.0.3

To run this app you'll need to install:

* Ruby 2.0
* Rails 4.0.3
* Bundler

And then the default actions in the command line (app root directory):
* bundle install
* rails s

This app includes a test suite using Rspec, to run it just write this in the command line:

* rspec

You can find the tests in the spec/requests/v1/scratchers_controller_spec.rb file.


text:
# extract bookmarks from raindrop.io

the api documentation is declared as [`soon`](https://raindrop.io/pages/dev) since they launched and apperantly they [want to charge](https://raindrop.io/static/love) now for backing up your content.

I respect that they want to cover their costs with such a model and not mine out their users data but I don't want to pay to get my data back. So I hacked this together, you mainly just have to do 2 requests to get the list of collection ids. you can do so with curl as well.

## Requests

The system is build with express and uses JSON for everything

### Login
`https://raindrop.io/api/auth/login`

Body:
```
{
"email": "...",
"password": "..."
}
```

### Collections and Bookmarks
`https://raindrop.io/api/collections` for the List of IDs of collections

See [types.go](https://github.com/cryptix/gombrella/blob/master/types.go) for a description of the fields in the response.

## Usage
```
gumbrealla <email>
```

## Installation

if you have go installed you can just run:

`go get github.com/cryptix/gombrella`

Pre-build binaries are hosted at [bintray.com](https://bintray.com/cryptix/golang/gombrella)

repository: cryptix/gombrella

repo_name: cryptix/gombrella


text:
# Botkit and Glip

Botkit is designed to ease the process of designing and running useful, creative bots that live inside [Glip](https://glip.com).

Built in to [Botkit](https://howdy.ai/botkit/) are a comprehensive set of features and tools to deal with [Glip](https://botframework.com), allowing developers to build interactive bots and applications that send and receive messages
just like real humans.

This document covers the glip implementation details only. [Start here](readme.md) if you want to learn about to develop with Botkit.

Table of Contents

* [Getting Started](#getting-started)
* [Bot Framework Specific Events](#bot-framework-specific-events)
* [Working with the Bot Framework](#working-with-the-bot-framework)

## Getting Started

1) Install Botkit [more info here](readme.md#installation)

2) Register for a free developer account with RingCentral [Developer Portal](https://developers.ringcentral.com/login.html#/) and follow [this guide](https://developers.ringcentral.com/library/getting-started.html) to create your first bot application.

3) Create a .env file with the attributes below and update account information
  ```
    GLIP_SERVER=https://platform.devtest.ringcentral.com
    GLIP_APPKEY= sandbox app key
    GLIP_APPSECRET= sandbox app secret
    GLIP_USERNAME= sandbox phonenumber
    GLIP_PASSWORD= sandbox password
    GLIP_EXTENSION=
    GLIP_PORT=4000
  ```

4) Run the example bot using the parameters mentioned above.

```
node glip_bot.js
```

5) Now create another RingCentral free developer account by following #2. This account will be used to invoke the bot.

6) Go to **glip.devtest.ringcentral.com** and signin with the newly created RingCentral account.

6) Enter the **username**, **password** and **extension** to login to glip.

7) Invite the bot using the email address.

8) Your bot should now be online now!

Try the following commands:
  * uptime
  * pizzatime

## Glip Specific Events

Once connected to the Bot Framework, bots receive a constant stream of events.

Normal messages will be sent to your bot using the `message_received` event.  In addition, several other events may fire, depending on the channel your bot is configured to support.

| Event | Description
|--- |---
| message_received | A message was received by the bot.

All incoming events will contain the fields `user` and `channel`, both of which represent the glip user's ID, and a `groupid` field.

`message_received` events will also contain either a `text` field or an `attachment` field.

## Working with Glip

Botkit receives messages from the glip adapters using pubnub subscriptions, and posts messages to glip using APIs. This means that your bot application must present a web server that is publicly addressable. Everything you need to get started is already included in Botkit.

To connect your bot to Glip follow the step by step guide outlined in [Getting Started](#getting-started).

Here is the complete code for a basic Glip bot:

```javascript
var Botkit = require('./lib/Botkit.js');
var os = require('os');
var http = require('http');
var request = require('request');

var controller = Botkit.glipbot({
    debug: false,
});

var bot = controller.spawn({
    server: process.env.GLIP_SERVER,
    appKey: process.env.GLIP_APPKEY,
    appSecret: process.env.GLIP_APPSECRET,
    appName: 'GlipDemo',
    appVersion: '1.0.0',
    username: process.env.GLIP_USERNAME,
    password: process.env.GLIP_PASSWORD,
    extension: process.env.GLIP_EXTENSION,
}).startRTM();

// if you are already using Express, you can use your own server instance...
// see "Use BotKit with an Express web server"
controller.setupWebserver(process.env.port || 3000, function(err, webserver){
    webserver.get('/', function (req ,res) {
        res.send(':)');
    });
    controller.createWebhookEndpoints(webserver, bot);
});

// Usage: uptime
controller.hears(['uptime'],'message_received',function(bot, message) {
    var hostname = os.hostname();
    var uptime = formatUptime(process.uptime());
    bot.reply(message,'I am a bot! I have been running for ' + uptime + ' on ' + hostname + '.');
});

//usage: pizzatime
controller.hears(['pizzatime'],'message_received',function(bot,message) {
    bot.startConversation(message, askFlavor);
});

var askFlavor = function(response, convo) {
    convo.ask("What flavor of pizza do you want?", function(response, convo) {
        convo.say("Awesome.");
        askSize(response, convo);
        convo.next();
    });
}
var askSize = function(response, convo) {
    convo.ask("What size do you want?", function(response, convo) {
        convo.say("Ok.")
        askWhereDeliver(response, convo);
        convo.next();
    });
}
var askWhereDeliver = function(response, convo) {
    convo.ask("So where do you want it delivered?", function(response, convo) {
        var message = null;
        message = "Ordered large pizza by pawan"
        message += "\n"
        message += "\n[Ticket ##1001](www.dominos.com) - ordered large pizza"
        message += "\n"
        message += "\n**Description**"
        message += "\nOrdered large cheese pizza & should delivered at home"
        message += "\n"
        message += "\n**Priority**"
        message += "\nasap"
        convo.say(message);
        convo.next();
    });
}
```
#### Botkit.glipbot()
| Argument | Description
|---  |---
| settings | Options used to configure the bot.

Creates a new instance of the bots controller.  The controller will create a new instance of the GlipConnector. so any options needed to configure the glip should be passed in via the `settings` argument.

#### controller.setupWebserver()
| Argument | Description
|---  |---
| port | port for webserver
| callback | callback function

Setup an [Express webserver](http://expressjs.com/en/index.html) for
use with `createWebhookEndpoints()`

If you need more than a simple webserver to receive webhooks,
you should by all means create your own Express webserver! Here is a [boilerplate demo](https://github.com/mvaragnat/botkit-messenger-express-demo).

The callback function receives the Express object as a parameter,
which may be used to add further web server routes.

#### controller.createWebhookEndpoints()

This function configures the route `https://_your_server_/glip/receive`
to receive webhooks from glip.


text:
# YCG Logistics
General logistics system web client

## Installation

* Git clone repository
* Run `npm install` to get dependencies
* Run `composer install` to get dependencies
* Ask the administrator for the `.env` file

## Sync Code with Server

* Ask the administrator for the `gulpfile.js` file
* Run `gulp` in the project folder to sync with the server

## Laravel PHP Framework

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching.

Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.

### Official Documentation

Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs).

### Security Vulnerabilities

### License

The YCG Logistics is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

repository: derekwenjun/ycg-logistics

repo_name: derekwenjun/ycg-logistics


text:
# Wizard's Castle (40th Anniversary C# Edition)
> A remake of the 1980 Exidy Sorcerer game written by JOSEPH R. POWER
> The instructions are included with the game.
> I stayed mostly true to the original, but added some additional functionality.

## Table of contents
* [General info](#general-info)
* [Screenshots](#screenshots)
* [YouTube Videos](#youtube-videos)
* [Technologies](#technologies)
* [Setup](#setup)
* [Features](#features)
* [To-do-list](To-do-list)
* [Status](#status)
* [Inspiration](#inspiration)
* [Contact](#contact)

## General info
A full C# remake of the 1980 classic, the Wizard's Castle.
In addition I have added some new elements to the game.
I deeply enjoyed this game growing up and wanted to make it for a modern programming language.
This project has been the dedication of many of my evenings, nights and weekends.
Exidy Sorcerer game code originally published in the July 1980 edition of Recreational Computing:
* https://archive.org/details/1980-07-recreational-computing

## Screenshots
![ScreenShot1 screenshot](./images/ScreenShot1.jpg)
![ScreenShot2 screenshot](./images/ScreenShot2.jpg)

## YouTube Videos
* https://www.youtube.com/watch?v=wMHVUTNWXXc&list=PLd5LdvEbbj5SdOHW24EfNK57g9FkS9E_l

## Technologies
* C# Console Application
* .NET Framework 4.8
* .NET Core 3.1
* Microsoft Visual Studio Community 2019

## Setup
* Clone the repository:
git clone "https://github.com/yourwishismine/Wizards-Castle-40th-Anniversary-CSharp-Edition.git"
* open Visual Studio 2019 and build it, or you can download the .NET Core 3.1 SDK:
https://dotnet.microsoft.com/download
* Compile with the .NET Core 3.1 SDK:
dotnet publish --runtime win-x64 --configuration Release /p:PublishSingleFile=true /p:PublishTrimmed=true
* Compile with the .NET Core 3.1 SDK on Linux:
Comment (put a // in front of them) the following 3 lines in the Program.cs file
> Console.SetWindowPosition(0, 0);
> System.Console.WindowHeight = System.Console.LargestWindowHeight - 25;
> System.Console.WindowWidth = System.Console.LargestWindowWidth - 50;
Then run:
> dotnet publish --runtime linux-x64 --configuration Release /p:PublishSingleFile=true /p:PublishTrimmed=true
I tested it on a Acer Chromebook Spin 13 which runs Debian 10 (buster) in its Linux (Beta) environment

## Features
Game is fully playable.
* Added support for Random maps
* Added additional game messages
* Added non-interactive elements to empty rooms

## To-do-list
* Fix Orb gaze doesn't always give correct location of some items (Note: Orb of Zot location isn't always supposed to be correct)
* Fix any other bugs that become known
* Add addtional monsters, spells and curses
* Other possibilities...

## Status
Project is: _finished_

## Inspiration
Project based on the 1980 Exidy Sorcerer game written by JOSEPH R. POWER

## Contact
Created by Daniel Kill [@yourwishismine](https://twitter.com/yourwishismine)


text:
# ThinginessSwift
A while back I started working on an idea for a game, in Ruby. I built two little libraries to give me the functionality I needed. One was [Thinginess](https://github.com/boffinism/thinginess).

It turned out trying to build the whole game in Ruby wasn't perhaps the best choice. Swift might be better. So as part of my quest to learn Swift, re-implementing Thinginess in Swift seemed like a reasonable thing to try. Here we go...

## License

ThinginessSwift is available under the MIT license. See the LICENSE file for more info.


text:
# Laravel Country Flags

[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-tests]][link-actions]
[![Total Downloads][ico-downloads]][link-downloads]

A Laravel wrapper for the [stidges/country-flags](https://github.com/stidges/country-flags) package.

## Installation

You can install the package via Composer:

``` bash
$ composer require stidges/laravel-country-flags
```

The Laravel facade and service provider are registered through auto-discovery, so you can start using it out of the box!

## Usage

This package publishes a Laravel facade for easier usage:

``` php
use CountryFlag;

echo CountryFlag::get('NL'); // "🇳🇱"
```

It also comes with a helper function that you can use!

``` php
echo country_flag('NL'); // "🇳🇱"
```

## Aliasing

If you would like to make country codes available under a custom aliases, you can update the configuration file. First you should publish it:

``` bash
$ php artisan vendor:publish --provider="Stidges\LaravelCountryFlags\CountryFlagsServiceProvider"
```

This will make the configuration file available under `config/country-flags.php`. You can update the `'aliases'` section to add your custom aliases:

``` php
return [
    'aliases' => [
        'AA' => 'NL',
    ],
];
```

And it will be available for you to access:

``` php
echo country_flag('AA'); // "🇳🇱"
```

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Security

If you discover any security related issues, please email<EMAIL_ADDRESS>instead of using the issue tracker.

## Credits

- [Stidges][link-author]
- [All Contributors][link-contributors]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[ico-version]: https://img.shields.io/packagist/v/stidges/laravel-country-flags.svg
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg
[ico-tests]: https://github.com/stidges/laravel-country-flags/workflows/Tests/badge.svg
[ico-downloads]: https://img.shields.io/packagist/dt/stidges/laravel-country-flags.svg

[link-packagist]: https://packagist.org/packages/stidges/laravel-country-flags
[link-actions]: https://github.com/stidges/laravel-country-flags/actions
[link-downloads]: https://packagist.org/packages/stidges/laravel-country-flags
[link-author]: https://github.com/stidges
[link-contributors]: ../../contributors

repository: stidges/laravel-country-flags

gha_language: PHP

repo_name: stidges/laravel-country-flags


text:
# Topic

> 【歷史小學堂】看魔法般的電影如何影響全世界 (Movies are Magic: Crash Course Film History #1)

> It's a universal language that lets us tell stories about our collective hopes and fears, to make sense of the world and the people around us.

> 這個共通性的語言讓我們可以用說故事的方式傳達共同的希望或恐懼，藉此理解這個世界和我們周遭的人。

[![Image](https://cdn.voicetube.com/assets/thumbnails/vsnB4iBb78o.jpg)](https://www.youtube.com/embed/vsnB4iBb78o?rel=0&showinfo=0&cc_load_policy=0&controls=1&autoplay=1&iv_load_policy=3&playsinline=1&wmode=transparent&start=8&end=15&enablejsapi=1&origin=https://tw.voicetube.com&widgetid=1)

Host: Eric

Today issue: 同學大家好，歡迎來到我們的口說挑戰! 來試聽Eric老師的心智圖詞彙課吧: ericvocab.com

[Host record](https://cdn.voicetube.com/tmp/everyday_records/yangec/3317.mp3)

## learning points
1. _
	* mass communication [] (n.) 大眾傳播
		- such as a television or the internet that can send a message story and communicate to a large number of people at the same time
		- The first time in history technology allows two-way mass communication.
			+ 歷史上第一次技術允許雙向大規模通信。

2. _
	* universal [͵junəˋvɝs!] (adj.) 普遍的；全體的；共同的
		- it means existing everywhere or involving everyone
		- universal truth => 共同的事實
		- The new reforms have not met with universal approval within the party.
			+ 新的改革沒有得到黨內的普遍贊同。

3. _
	* medium [ˋmidɪəm] (n.) 媒介；方法；手段
		- it's a method or way of expressing something
		- the broadcasting or print media.
		- The whole story through the medium of dance.
			+ 整個故事通過舞蹈的媒介。

4. _
	* illusion [ɪˋljuʒən] (n.) 幻覺；幻想
		- it's an idea or belief that is not true
		- He had no illusions about his talents as a singer. (illusions about)
			+ 他並不幻想自己作為歌手。
		- My boss is laboring under the illusion that the project will be completed on time.
			+ 我的老闆還存在著項目將按時完成的幻想。

5. _
	* entertainment [͵ɛntɚˋtenmənt] (n.) 娛樂；娛樂節目；娛樂表演
		- it means shows films television or other performances or activities that entertain people that make people happy that people enjoy
		- There's not much in the way of entertainment this town just the cinema in a couple of pubs.
			+ 這個小鎮的娛樂方式並不多，只有幾家酒吧的電影院。


text:
# leapfrog-triejoin
High-performance (C++) implementation of the leapfrog-triejoin algorithm by Todd Veldhuizen (http://arxiv.org/abs/1210.0481)

The leapfrog-triejoin algorihm is a worst-case optimal conjunctive join algorithm, that has since then found widespread usage in industry.

This code was written as central part of the "Database Systems and Implementation" final course exam part of the MSc Computer Science degree at the University of Oxford, UK. It received a First.

Copyright 2012 by Christian Schroeder de Witt, University of Oxford, UK

repository: zahidabasher/leapfrog-triejoin

repo_name: zahidabasher/leapfrog-triejoin


text:
---
layout: default
permalink: /:title
---

Word2Vec
========

### How to parse text and generate samples?

![text parsing process](http://mccormickml.com/assets/word2vec/training_data.png)

image from this [blog](http://mccormickml.com/2016/04/19/word2vec-tutorial-the-skip-gram-model/)

(the, quick) is a training sample with **'the'** the input vector and **'quick'** the output vector(label).

### Skipgram

At beginning, you have a table storing the word vectors that have been initialized randomly. Note here that we distinguish center words with context words, this looks like wield, but the result shows it's better anyway.

![word vectors](http://oz3wz2jgr.bkt.clouddn.com/wordvectors.png)

Say we have a words window ['b', 'a', 'c'], this gives two samples ('a', 'c') and ('a', 'b') where 'a' is the center word and 'c', 'b' are the context word. First ('a', 'c') according to the table, the input vector $v_c$ will be $[0.01, 0.03
]$, and the label vector $u_o$ will be $[0.03, 0.04]$. We feed this into  skipgram, the algorithm will return a cost and gradients.

#### cost
**${\hat{y}}$**

$$\hat{y}=\frac{exp^{u_o v_c}}{\sum_{k}{exp^{u_k v_c}}}$$

**${y}$**
The ground truth $y$ (the word 'c') that can be represented by one hot format as $[0,0,1,0,0]$

loss function
cross entropy

#### gradients
We have two formulas, one for center word, the other for context words:

$$\frac{\partial{J(v_c, U)}}{v_c}=U(\hat{y}-y)$$

$$\frac{\partial{J(v_c, U)}}{U}=v_c(\hat{y}-y)^T$$the returned gradients table should look like something below:

![gradients for word vectors](http://oz3wz2jgr.bkt.clouddn.com/grads_wordvectors.png)

For center words part, only word 'a' gets new grads, the rest's grads are all zero, for context words part, all words will have new grads.

After we obtain the cost and grads for sample ('a', 'c'), we do the exact same thing for ('a', 'b'), and the grads accumulates

This is just one words window within a batch, we have many of them, all of them are randomly chosen in the context. Outside the batch, we have iterations, in each iteration, we have one batch, and the word vectors table gets updated at the end of each iteration.

### CBOW
CBOW is very similar to skipgram, the difference is that it uses the average of all the context words as input vector and the center word as the label vector.

### Negative Sampling
In short, we only select a handful of words for calculating cost, as the result, the computation of the denominator of softmax is dramatically reduced, yet the overall accuracy stays unchanged.

### Reference
[http://mccormickml.com/2016/04/19/word2vec-tutorial-the-skip-gram-model](http://mccormickml.com/2016/04/19/word2vec-tutorial-the-skip-gram-model)
[http://web.stanford.edu/class/cs224n/assignment1/assignment1_soln.pdf](http://web.stanford.edu/class/cs224n/assignment1/assignment1_soln.pdf)


text:
# Dovecot Graveyard

Repository for unsupported features removed from Dovecot

## What is this?

This is a repository where we put code we remove from Dovecot that we no longer want to maintain.
If you want to start maintaining the code, please copy it to a new repository (or fork this repository).

## Can I contribute?

As a rule, no. This is a one-way repository, and if you want to update/maintain something you should fork your own.

## I need help with the code!

You can send mail to<EMAIL_ADDRESS>but this code is unsupported, so we will not promise anything.

repository: dovecot/graveyard

repo_name: dovecot/graveyard


text:
# qaqc\_tools

A suite of tools addressing common yet critical data curating tasks aimed at the particular needs of the LTER research and Information Managers community, and that also that applies to the QA/QC needs of the broader research community. These tools are designed to automated quality control of sensor data, but may also be useful for non-sensor data sets.

## List of functions
qaqc_TimeDate_functions: Functions for working with timestamps and dates and times in
environmental data. Contains functions for ingesting, formatting, and detecting/manipulating time zones given different kinds of supplied timestamps

gap_checker: includes gap_checker function that checks for gaps in time sequences which excede a user-defined threshold for data gaps

numeric_functions: includes numeric_range_checker function that applies range limit tests to data frame, and includes skeletons for numeric_slope_checker, numeric_step_checker functions.

### qaqc_TimeDate_functions

  Provides user with warnings and messages: check for precision input, check for TZ input, check for format input

  Where possible, tries to detect precision, TZ, and date-time format without being too liberal in its assumptions. If cannot be reliably determined, stops and provides user with message as to why it failed.

  Several date-time formats are supported including ISO8601, AM/PM

  #### Description:
  1. Determine input format
  2. Determine precision for output format based on input information
  3. If data isn't a valid format output why to user for gathering correct information
  4. Allow users to specify a specific precision, e.g. hour and minutes, or just date that is expected/required. Require year, month, and day at a minimum
  5. Require unambiguous input timezone (requires legwork to determine, likely not automatable, but may be consistent over time for a site or type of data)
  ** Provide feedback to user informing them which TZ was recognized & applied
      Additional dataframe with timezones by station/site
      Timezone in input dateTimes
      Single TZ value if all of the data is coming in in the same TZ and is known
      Potentially detect timezone based off of lat/lon? Prefer to get info from data provider/source before this step
  6. Clean input times to be in ISO format
      YYYY-MM-DDTHH:MM:SS.SSSZ
  7. Convert to R dateTime object (POSIXct or POSIXlt?)
  8. Output dataframe with columns appended for input TZ and input precision (maybe check is they're all the same and output another way? Separate table?)
      TZ is a string value
      Precision options: day, minute, second, milliSecond

```
date_ingest_checker <- function(x, precision, TZ) {

    # x: some input string we believe to be a time stamp
    # optional arguments: precision, TZ (will be detected automatically if present in the data)
```

```R
timestamp_output_formatter <- function(x, precision, suppOutput) {

    # x: properly formatted ISO 8601 string (in UTC) which we receive as output from date_ingest_checker()
    # precision is a required argument for this function; may be automatically detected or specified when date_ingest_checker() is called, but either way we should have value(s) for precison before calling timestamp_output_formatter()
    # suppOutput ("supplemental output"): optional argument allowing user to request timestamp output in "local" or other time zone in addition to UTC; no localities allowed

  # Description:
      1. Additional QA/QC or timestamps updates based on some sort of input/tracking log (see Celeste's code snippet for incidents)
      2. Format date for output in ISO 8601 UTC as text string and user specified "local" or other time with appropriate level of precision from input
      3. Remove extra columns from dataframe for input timezone and precision and create an output similar to the ingest provenance output

  (fail or fix?).

}
```

Outstanding/unresolved issues for the date-time working group:
    1. What does format of provenance information look like? Harmonize with whatever format the ingest group is coming up with?
    2. Provide summary feedback to user: timestamp minimum/maximum in UTC and in TZ of input data, if TZ was given in input data
    3. Plot review of frequency distribution of times to the user to check that the dates/times are reasonable (descTools?)

```R
sorted_by_timestamp <- function(x) {

  # Description: Check that data are sorted by timestamp

  # Returns

  # Team members: John

}
```

###(Other) dataframe formatting issues

```R
spaces_checker <- function(x) {

  # Description: Check character data for inadvertant spaces

  # Returns:

  # Team members: Kristin

}
```

```R
complete_cases_checker <- function(x) {

  # Description: row by row check that all value columns

  # Returns:

  # Team members: Patrick, Amanda

}
```

```R
col_type_checker <- function(x) {

  # Description:

  # Returns:

  # Team members: Patrick, Amanda

}
```

```R
fuzzy_duplicate_checker <- function(x) {

  # Description: checks for near duplicate rows: 1) rows with the same keys but

  different values, 2) rows with the same values but (slightly) different keys, 3)

  other cases TBD

  # Returns:

  # Team members: Patrick, Amanda, Jamie

}
```

### consistent coding

```R
encoding_standard_checker <- function(x) {

  # Description:

  # Returns:

  # Team members:

}
```

Flagging & checks
NEON example R code for looking at the flags
  outTarn2 <- def.plau(data = data.frame(PARdataUpTarn5$new.data), RngMin = -10, RngMax = 3000, DiffStepMax = 500, NumGap = 4, DiffPersMin = rep.int(0.0001,length(data)),TestNull = T, Vrbs = T)
  str(outTarn2)
  unique(outTarn2$PARdataUpTarn5.new.data$qfRng)
  unique(outTarn2$PARdataUpTarn5.new.data$qfStep)
  unique(outTarn2$PARdataUpTarn5.new.data$qfGap)
  unique(outTarn2$PARdataUpTarn5.new.data$qfNull)
  unique(outTarn2$PARdataUpTarn5.new.data$qfPers)

```R
gap_checker <- function(x) {

  # Description:

  # Returns:

  # Team members: Celeste, stevan

}
```

```R
numberic_step_checker()
  # Description: Flags time series (e.g., sensor data) for unexpected
  # jumps (increase or decrease) in a single time step.

  # Methods:
  #  "simpleThreshold": manually set a threshold step value to flag observations
  # that exceed the limit
  #  "movingAverageDeviants": take the diffs based moving average and flag
  # 'large' changes
  #  "movingMedianDeviants": take the diffs based moving medians and flag
  # 'large' changes

  # Dependencies:

  # Inputs: datetime and value

  # Returns: original dataframe as

  # Tests:

  # Examples:

  # Team members:
```

```R
numeric_range_checker <- function(x) {

  # Description:

  # Returns:

  # Team members: Celeste

}
```

```R
acceptable_string_checker <- function(x) {

  # Description:

  # Returns:

  # Team members:

}
```

```R
numeric_spike_checker <- function(x) {

  # Description:

  # Returns:

  # Team members: Patrick, kaelin

}
```

```R
numeric_slope_checker <- function(x) {

  # Description:

  # Returns:

  # Team members: Celeste Patrick

}
```

```R
check_timeseries_anomalies <- function(x) {

  # Description:

  # Returns:

  # Team members: Patrick

}
```

```R
check_number_bensford <- function(x) {

  # Description: For numeric values that span multiple orders of magnitude, Benfords Law predicts a distribution rich in low values with few high values for the first digit.  The result applies to an entire series of data values, not to any particular data value.

  # Returns: T - fits Benford distribution, F - does not fit, NA - data not suitable (not >2 orders of magnitude)

  # Team members: John

}
```

```R
anomaly_outlier_vis_tool <- function(args) {

  # Description:

  # Inputs:

  # Returns:

  # Tests:

 # Examples:

  # Team members: Patrick

}
```


text:
---
layout: post
title: Balancing the Dataset
---

More images of each genre were retrieved to see if this would positively affect the classification results. As well, the same number of images for each genre was retrieved in order to create a balanced dataset:

* Country (2,000 images, 86 artists)
* R&B/Hip-hop (2,000 images, 69 artists)
* Rock (2,000 images, 60 artists)
* K-pop (2,000 images, 143 artists)

The same classifiers were run, producing the following results:

### Naive Bayes
Parameters: None
* accuracy: 0.3665
* precision_macro: 0.41612945426404774
* recall_macro: 0.3662461439273913
* f1_macro: 0.3453081120705497

### SVM
Parameters: penalty='l2', loss='squared_hinge', dual=False, C=40, max_iter=1000
* accuracy: 0.415625
* precision_macro: 0.4194762225283147
* recall_macro: 0.41595862064206857
* f1_macro: 0.41514156941272445

### Decision Tree
Parameters: criterion='entropy', max_depth=180, min_samples_split=120
* accuracy: 0.394375
* precision_macro: 0.395510021357171
* recall_macro: 0.39381256227398065
* f1_macro: 0.39351326650741103

Comparing F1 scores with the previous results, naive bayes and decision tree performance increased by a few percent. However, SVM performance only increased by 1 percent, which was disappointing, as this classifier produced the best results. While creating a larger dataset helped, it did not improve performance as much as expected!

filename: 2019-02-26-Balancing the Dataset.md


text:
<!---

    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/plugins/vue/readme.template.md` instead.

    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/plugins/vue/readme.template.md` instead.

    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/plugins/vue/readme.template.md` instead.

    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/plugins/vue/readme.template.md` instead.

    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/plugins/vue/readme.template.md` instead.

-->

Reframe + Vue = :heart:

# `@reframe/vue`

Use Reframe with Vue.

### Usage

Add `@reframe/vue` to your `reframe.config.js`:

~~~js
module.exports = {
    $plugins: [
        require('@reframe/react-kit'),
        require('@reframe/vue') // npm install @reframe/vue
    ],
};
~~~

### Example

~~~js
// /plugins/vue/example/reframe.config.js

module.exports = {
    $plugins: [
        require('@reframe/react-kit'),
        require('@reframe/vue') // npm install @reframe/vue
    ],
};
~~~

~~~js
// /plugins/vue/example/pages/vue-welcome.config.js

import Vue from 'vue';

const app = new Vue({
    render: createElement => createElement('div', 'Hello from Vue'),
});

export default {
    route: '/',
    view: app,
};
~~~

<!---

    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/plugins/vue/readme.template.md` instead.

    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/plugins/vue/readme.template.md` instead.

    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/plugins/vue/readme.template.md` instead.

    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/plugins/vue/readme.template.md` instead.

    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/plugins/vue/readme.template.md` instead.

-->

gha_language: JavaScript


text:
---
layout: post
title: "OsLUGL"
description: ""
category: genes
tags: [auxin, development, floral, transcriptional regulator]
---

* **Information**
    + Symbol: OsLUGL
    + MSU: [LOC_Os01g42260](http://rice.uga.edu/cgi-bin/ORF_infopage.cgi?orf=LOC_Os01g42260)
    + RAPdb: [Os01g0607400](https://rapdb.dna.affrc.go.jp/locus/?name=Os01g0607400)

* **Publication**
    + [OsLUGL is involved in the regulating auxin level and OsARFs expression in rice Oryza sativa L..](http://www.ncbi.nlm.nih.gov/pubmed?term=OsLUGL is involved in the regulating auxin level and OsARFs expression in rice Oryza sativa L..%5BTitle%5D), 2019, Plant Sci.

* **Genbank accession number**

* **Key message**
    + OsLUGL is involved in the regulating auxin level and OsARFs expression in rice (Oryza sativa L.).
    + These findings provide a valuable insight into the molecular functions of OsLUGL in rice floral development
    + KKX encodes a putative LEUNIG-like (LUGL) transcriptional regulator OsLUGL

* **Connection**

[//]: # * **Key figures**


text:
# Cicognara

An application for indexing and displaying IIIF Manifests from multiple partners
in an effort to create a high quality digital version of Count Leopoldo Cicognara's private
book collection.

[![CircleCI](https://circleci.com/gh/pulibrary/cicognara-rails.svg?style=svg)](https://circleci.com/gh/pulibrary/cicognara-rails)
[![Coverage Status](https://coveralls.io/repos/pulibrary/cicognara-rails/badge.svg?branch=main&service=github)](https://coveralls.io/github/pulibrary/cicognara-rails?branch=main)

## Initial Setup

```sh
git clone https://github.com/pulibrary/cicognara-rails.git
cd cicognara-rails
bundle install
lando start
bundle exec rake db:setup
```

Remember you'll need to run `bundle install` on an ongoing basis as dependencies are updated.

## Run tests

1. `lando start`
1. `RAILS_ENV=test bundle exec rake db:setup`
3. In a separate terminal: `bundle exec rspec`

## Development setup

### Running development services together

Install Lando:

* [Lando on GitHub](https://github.com/lando/lando/releases)

1. `lando start`
2. `bundle exec rake cico:development:clean_and_seed`
3. `bin/rails s`

### Create a development admin user

`bin/rails c`
`> u = User.new`
`> u.email =<EMAIL_ADDRESS>`> u.role = "admin"`

Look at `app/controllers/application_controller.rb` to see how this user is
always logged in on a development site. You can comment out the `current_user`
method there if you want to see a non-admin view.

## Index/Generate Partials for full Catalogo:

1. Ensure development solr is running
2. `cd tmp`
3. `git clone git@github.com:pulibrary/cicognara-catalogo.git`
4. `cd ..`
5. `TEIPATH=tmp/cicognara-catalogo/catalogo.tei.xml MARCPATH=tmp/cicognara-catalogo/cicognara.mrx.xml bundle exec rake tei:index`
6. `TEIPATH=tmp/cicognara-catalogo/catalogo.tei.xml bundle exec rake tei:partials`

## Indexing Full Manifests from Getty

1. Ensure full Catalogo is indexed (see above)
2. `bundle exec rake getty:import`

## Tagging a Release

To create a tagged release use the [steps in the RDSS handbook](https://github.com/pulibrary/rdss-handbook/blob/main/release_process.md)

## Deploying:
When deploying, make sure the desired cicognara-catalogo (MARC and TEI) release is specified:
```
# config/deploy.rb`
set :default_env,
    'MARCPATH' => 'public/cicognara.mrx.xml',
    'TEIPATH' => 'public/catalogo.tei.xml',
    'CATALOGO_VERSION' => 'v2.1'
```

After deploying, please invoke the following in order to reindex from the latest release of the Catalogo, and rebuild the partials:
```
cap [STAGE] deploy:reindex
```

## Manually reindexing
Another way to reindex after a deployment is to SSH to the machine and execute the following rake tasks. This is what we did in March/2022. Notice that we had to manually get the Getty files via cURL before running `getty:import` because download process fails intermittently (however, once the files are on disk the rake task will use them and complete successfully).

```
cd /opt/cicognara/current

# Get latest source data files
TEIPATH=public/cicognara.tei.xml MARCPATH=public/cicognara.mrx.xml bundle exec rake tei:catalogo:update

# Run TEI Index (about 5 minutes)
TEIPATH=public/cicognara.tei.xml MARCPATH=public/cicognara.mrx.xml bundle exec rake tei:index

# Regenerate the partials
TEIPATH=public/cicognara.tei.xml MARCPATH=public/cicognara.mrx.xml bundle exec rake tei:partials

# (optional) Get the Getty files via cURL when the site is acting up and requires retries.
# Find the latest set at http://portal.getty.edu/resources/json_data/resourcedump.xml
cd tmp
curl -OL http://portal.getty.edu/resources/json_data/resourcedump_2022-10-31-part1.zip
curl -OL http://portal.getty.edu/resources/json_data/resourcedump_2022-10-31-part2.zip
curl -OL http://portal.getty.edu/resources/json_data/resourcedump_2022-10-31-part3.zip
curl -OL http://portal.getty.edu/resources/json_data/resourcedump_2022-10-31-part4.zip
cd ..

# Run the Getty import (1 hr)
TEIPATH=public/cicognara.tei.xml MARCPATH=public/cicognara.mrx.xml bundle exec rake getty:import

# Re-index the TEI
TEIPATH=public/cicognara.tei.xml MARCPATH=public/cicognara.mrx.xml bundle exec rake tei:index
```

### Create a production admin user

If you need to make someone an admin on a production box, ensure they've logged in once, then run the `set_admin_role` task for their email address:

<EMAIL_ADDRESS>bundle exec rake set_admin_role`

### Updating Solr in production
To make changes to the Solr in production/staging you need to update the files in the [pul_solr](https://github.com/pulibrary/pul_solr) repository and deploy them. The basic steps are:

1. Update the [configuration file for Cicognara](https://github.com/pulibrary/pul_solr/tree/main/solr_configs/cicognara)
2. Deploy the changes, e.g. `cap solr8-staging deploy`.

You can see the list of Capistrano environments [here](https://github.com/pulibrary/pul_solr/tree/main/config/deploy)

The deploy will update the configuration for all Solr collections in the given environment, but it does not cause downtime. If you need to manually reload a configuration for a given Solr collection you can do it via the Solr Admin UI.

## Google OAuth integration
The environment values used for integration with Google Authentication (`GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`) are defined via the `console.cloud.google.com`. You can use this [page](https://console.cloud.google.com/apis/credentials/oauthclient/639448642333-klf2kb6d7ka0dl4ph1vp9prblulp9l7a.apps.googleusercontent.com?project=pulibrary-figgy-storage-1&supportedpurview=project) to reset the `Client ID` and `Client secret` values. If you don't have access to this page please contact Esmé.

## Data Sources

There are three main sources of information for this project:
1. Data from TEI files (~4700 records)
2. Data from MARC files (~4700 records)
3. Data from the Getty (~9600 records)

The process to index TEI and MARC files (i.e. `rake tei:index`) ingests the data into a single Solr collection, but it creates
separate documents for each source. For example there are two Solr documents for `alt_id:"dcl:nvx"`, one of these documents
(the one with `format:marc`) has the MARC data whereas the other one has the TEI data. Records from TEI (i.e. `-format:marc`)
are what is searched for when a user submits a search.

This part of the import process also creates records in the `Books` and `Entries` tables to represent some of this data.

There is another process that fetches and processes the data from the Getty (i.e. `rake getty:import`). This process downloads
files from Getty, unzips them into about 50,000 JSON files, and finds records that are associated with the "Cicognara Collection".
There are about 9,600 records that meet this criteria. For each one of them it process the `manifest_urls` indicated in the Getty
record and creates a `Version` record to store the metadata for each different manifest.

This part of the process is slow-ish since, for each record, it contacts each different institution indicated in the `manifest_url`
to fetch the data ([example 1](https://figgy.princeton.edu/concern/scanned_resources/b9aba758-ce0e-47ef-a2f0-8c1273c60829/manifest)
and [example 2](https://digi.ub.uni-heidelberg.de/diglit/iiif/passeri1770/manifest.json)). This data is saved in the `Version` table.
Notice that the data stored in the `Version` table is displayed to the user but it is not indexed in Solr.

Check out the following documents for additional information on the data and how it is modeled:
* [Cicognara Project Notes](https://docs.google.com/document/d/1uyH_RPJcpYwYPOC6wnH888YkTCz-VJiLg30HYhblOUs/edit#).
* [Cicognara use cases / architecture discussion](https://docs.google.com/document/d/1hpMqtwGgwhK-VwJHNXuklObNPwBfo_OzveUxhELIydU/edit)
* [Catalogo Cicognara Edge Cases](https://github.com/pulibrary/cicognara-rails/wiki#catalogo-cicognara-edge-cases)

repository: pulibrary/cicognara-rails

gha_license_id: NOASSERTION

repo_name: pulibrary/cicognara-rails


text:
# Rcollectors - external collectors for [bosun/scollector](https://github.com/bosun-monitor/bosun/tree/master/cmd/scollector)
----
## Usage
1. Put [config.yml](https://github.com/onetwotrip/rcollectors/blob/master/config.yml) to /etc/scollector/collectors/config.yml
2. Put .rb files to your /path/for/scollectors/external-collectors/<interval>/
3. Check that you have new metrics in OpenTSDB.

## Available collectors
1. redis.rb

## Authors
[ptqa] (https://github.com/ptqa)

repository: onetwotrip/rcollectors

repo_name: onetwotrip/rcollectors


text:
# updatemailer
Simple email application that sends updates to clients
Nothing too fancy, but serves it's purpose.

The main purpose of this application is to create a consistent way to email clients updates about daily events.

# Database Setup

Xampp was used for local web server to send mail through localhost, you need an active email address.
To send mail, modify the sendmail.ini and php.ini file with your email credentials and email server details.

Modify config.ini file with your database credentials to connect to a database.
Database is not necessary for the application to function.

repository: abejordan/updatemailer

repo_name: abejordan/updatemailer


text:
QuCAT stands for Quantum Circuit Analyzer Tool. This open source python library provides standard analysis tools for superconducting electronic circuits, built around Josephson junctions.

QuCAT features an intuitive graphical or programmatical interface to create circuits, the ability to compute their Hamiltonian, and a set of complimentary functionalities such as calculating dissipation rates or visualizing current flows in the circuit. QuCAT currently supports quantization in the basis of normal modes.

See https://qucat.org/ for installation, documentation, tutorials and more.

If you find QuCAT useful, please consider citing it in your publications, see: https://qucat.org/citing.html.

repository: steelelab-delft/qucat

repo_name: steelelab-delft/qucat


text:
---
layout: post
title: "SkeletonNet: Shape Pixel to Skeleton Pixel"
date: 2019-07-02 23:44:05
categories: arXiv_CV
tags: arXiv_CV GAN CNN Deep_Learning
author: Sabari Nathan, Priya Kansal
mathjax: true
---

* content
{:toc}

##### Abstract
Deep Learning for Geometric Shape Understating has organized a challenge for extracting different kinds of skeletons from the images of different objects. This competition is organized in association with CVPR 2019. There are three different tracks of this competition. The present manuscript describes the method used to train the model for the dataset provided in the first track. The first track aims to extract skeleton pixels from the shape pixels of 89 different objects. For the purpose of extracting the skeleton, a U-net model which is comprised of an encoder-decoder structure has been used. In our proposed architecture, unlike the plain decoder in the traditional Unet, we have designed the decoder in the format of HED architecture, wherein we have introduced 4 side layers and fused them to one dilation convolutional layer to connect the broken links of the skeleton. Our proposed architecture achieved the F1 score of 0.77 on test data.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1907.01683](http://arxiv.org/abs/1907.01683)

##### PDF
[http://arxiv.org/pdf/1907.01683](http://arxiv.org/pdf/1907.01683)


text:
# 06 MoveBackToStateless

In example 05 we learned how to remove state from a child control just to have clear governance of state.

It's time to make some cleanup, let's simplify _nameEdit_ component and move it as a stateless component.

We will take a startup point sample _05 MoveBacktOStateless_.

Summary steps:

- Update _nameEdit.jsx_, port it to stateless component and add the methods inline.

## Prerequisites

Install [Node.js and npm](https://nodejs.org/en/) (v6.6.0 or newer) if they are not already installed on your computer.

> Verify that you are running at least node v6.x.x and npm 3.x.x by running `node -v` and `npm -v` in a terminal/console window. Older versions may produce errors.

## Steps to build it

- Copy the content from _05 Refactor_ and execute `npm install`.

- Update _nameEdit.jsx_, port it to stateless component and add the methods inline. It should look like:

  ```jsx
  import React from 'react';

  export const NameEditComponent = (props) => {
    return (
      <div>
        <label>Update Name:</label>
        <input value={props.editingUserName}
          onChange={(e) => props.onEditingNameUpdated(e.target.value)} />
        <input type="submit" value="Change" className="btn btn-default"
          onClick={props.onNameUpdateRequest} />
      </div>
    );
  }

  NameEditComponent.propTypes = {
    editingUserName: React.PropTypes.string.isRequired,
    onEditingNameUpdated: React.PropTypes.func.isRequired,
    onNameUpdateRequest: React.PropTypes.func.isRequired
  };

  ```

path: /06 MoveBackToStateless/readme.md


text:
# ARG SPEC File

To run tests on Firebase Test Lab, the `gcloud firebase test android run` command requires arguments to specify what and how to run the following tests. For example, to run instrumentation tests, the following command will need to be executed:

```
gcloud firebase test android run \
  --type instrumentation \
  --app app-debug-unaligned.apk \
  --test app-debug-test-unaligned.apk \
  --device model=Nexus6,version=21,locale=en,orientation=portrait  \
  --device model=Nexus7,version=19,locale=fr,orientation=landscape
```

The configuration of these tests can get long and complex. Instead, the GitHub Action will instead the ARG SPEC file as an input which has the predefined configurations of the corresponding tests. Developers will need to create a YAML file specify how they would like to run the tests and make a reference to that file during the execution of the GitHub Action.

## Example ARG SPEC file
As an example, the configuration for the test are saved in the tests.yml file. A high-level arg-group is specified as `android-pixel-4` to specify that this is an Android test running on Pixel 4 device. However, the file name and arg-group can be named anything.

```
android-pixel-4:
  type: instrumentation
  app: app-debug.apk
  test: app-debug-test.apk
  device:
    - model: flame
      version: 29
      locale: 'en'
      orientation: portrait
```

In the GitHub Actions workflow, you must specify the `arg-spec` containing the path of this file along with the arg group.

## Arguments Reference
The following arguments used above are defined here. To see the full list of arguments, please check out the reference links below.
```
<arg-group>:
  type: <robo-or-instrumentation>
  app: <path-to-source-apk>
  test: <path-to-test-apk>
  device:
    - model: <model-id>
      version: <version>
      locale: <local>
      orientation: <portrait-landscape-default>
```

## Reference
- [Firebase Test Lab](https://firebase.google.com/docs/test-lab/android/command-line)
- [gcloud topic arg-file](https://cloud.google.com/sdk/gcloud/reference/topic/arg-files)
- [gcloud firebase test android run](https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run)

repository: adireed/Firebase-Test-Lab-Action

repo_name: adireed/Firebase-Test-Lab-Action


text:
# Vscode Google Translate

[![Licence](https://img.shields.io/github/license/funkyremi/vscode-google-translate.svg)](https://github.com/funkyremi/vscode-google-translate)
![VS Code Marketplace](https://vsmarketplacebadge.apphb.com/version-short/funkyremi.vscode-google-translate.svg) ![Rating](https://vsmarketplacebadge.apphb.com/rating-short/funkyremi.vscode-google-translate.svg)

Quickly translate text right in your code 🚀

![Demo](demo.gif)

## Usage

### Translate selected text

1. Select some text to translate
1. Press `ALT+SHIFT+T`
1. Select the output languages you want and enjoy 👍

### Translate a line under cursor

This feature inserts a newline under the current one with translation

1. Set cursor/cursors on line(s) to translate
1. Select menu 'Translate line(s) under the cursor'
1. Select the output languages you want and enjoy

## Preferred language settings

Want to quickly translate into a specific language?
Run Command 'Set Preferred Language' or Set it in VSCode extension settings

## Tooltip Hover Translation

By default when you hover over comments and code, you will get a translation into
your preferred language hovering above the element. If you want to turn this off
go into extension settings and un-check HoverTranslations then restart VSCode.

## Proxy Support

You can use a proxy to translate text with the following settings:

```js
"vscodeGoogleTranslate.host": "<IP_ADDRESS>"       // Proxy disabled if empty
"vscodeGoogleTranslate.port": "8080"            // Proxy port
"vscodeGoogleTranslate.username": "admin"       // Proxy auth disabled if empty
"vscodeGoogleTranslate.password": "password"    // Proxy password
```

## Pull request

Pull request are welcome. Fork the project, clone it, install dependencies `npm i` and start coding :-).

If you want to make changes to the code hovering translations. Please run "npm run compile" from the root in order to compile the typescript
part of the codebase.

Many thanks to the people who participate for making it awesome!
## Show your support

**Give five stars 🤩**

If you like it, [rate it](https://marketplace.visualstudio.com/items?itemName=funkyremi.vscode-google-translate&ssr=false#review-details)

repository: funkyremi/vscode-google-translate

gha_language: TypeScript

repo_name: funkyremi/vscode-google-translate


text:
A port of the Ruby gem [twitter-text-rb](https://github.com/twitter/twitter-text-rb) to Python.

[![Build Status](https://travis-ci.org/dryan/twitter-text-py.png?branch=master)](https://travis-ci.org/dryan/twitter-text-py)

# Changes in 2.0

See the [pull request](https://github.com/dryan/twitter-text-py/pull/17) for details.

# Usage

You can either call a new TwitterText object with the text of the tweet you want to process `TwitterText('twitter-text-py is #awesome')` or use any of the submodule objects directly (Autolink, Extractor, HitHighlighter or Validation), passing in the tweet text as an argument.

The library also contains a Django template filter that applies the auto_link method to the passed in text. It can also optionally apply the hit_highlight method. Example:

    {% load twitterize %}

    {{ obj.body|twitter_text }}
    {{ obj.body|twitter_text:"my term" }}

You can test that the library is working correctly by running `python tests.py` inside the `twitter_text` directory.

## TwitterText(text)

### Properties:

* text:             the original text you passed in, or the modified version if you've called any functions on the object.
* original_text:    the original text you passed in; never modified. Useful for a fallback or to do comparisons.
* has_been_linked:  boolean denoting if any of the Autolink functions have been called. (Mostly for internal use.)
* tweet_length:     the value returned by `validation.tweet_length` or None if that function has not yet been called.
* tweet_is_valid:   boolean returned by `validation.tweet_invalid` or None if that function has not yet been called.
* validation_error: the validation error string returned by `validation.tweet_invalid` or None if that function has not yet been called.
* autolink:         property pointing to an Autolink object initialized with `text`
* extractor:        property pointing to an Extractor object initialized with `text`
* highlighter:      property pointing to a HitHighlighter object initialized with `text`
* validation:       property pointing to a Validation object initialized with `text`

## Autolink(text)

This object modifies the text passed to it (and the parent TwitterText.text if present).

### Defaults

These may be overridden by kwargs on a particular method.

* url_class         =   'tweet-url'
* list_class        =   'list-slug'
* username_class    =   'username'
* hashtag_class     =   'hashtag'

### Methods:

__auto_link(self, **kwargs)__

Add `<a></a>` tags around the usernames, lists, hashtags and URLs in the provided text. The `<a>` tags can be controlled with the following kwargs:

* url_class:            class to add to all `<a>` tags
* list_class:           class to add to list `<a>` tags
* username_class:       class to add to username `<a>` tags
* hashtag_class:        class to add to hashtag `<a>` tags
* username_url_base:    the value for href attribute on username links. The @username (minus the @) will be appended at the end of this.
* list_url_base:        the value for href attribute on list links. The @username/list (minus the @) will be appended at the end of this.
* hashtag_url_base:     the value for href attribute on hashtag links. The #hashtag (minus the #) will be appended at the end of this.
* suppress_lists:       disable auto-linking to lists
* suppress_no_follow:   do not add rel="nofollow" to auto-linked items
* html_attrs:           a dictionary of HTML attributes to add to non-Twitter links

__auto_link_usernames_or_lists(self, **kwargs)__

Add `<a></a>` tags around the usernames and lists in the provided text. The `<a>` tags can be controlled with the following kwargs:

* url_class:            class to add to all `<a>` tags
* list_class:           class to add to list `<a>` tags
* username_class:       class to add to username `<a>` tags
* username_url_base:    the value for href attribute on username links. The @username (minus the @) will be appended at the end of this.
* list_url_base:        the value for href attribute on list links. The @username/list (minus the @) will be appended at the end of this.
* suppress_lists:       disable auto-linking to lists
* suppress_no_follow:   do not add rel="nofollow" to auto-linked items

__auto_link_hashtags(self, **kwargs)__

Add `<a></a>` tags around the hashtags in the provided text. The `<a>` tags can be controlled with the following kwargs:

* url_class:            class to add to all `<a>` tags
* hashtag_class:        class to add to hashtag `<a>` tags
* hashtag_url_base:     the value for href attribute. The hashtag text (minus the #) will be appended at the end of this.
* suppress_no_follow:   do not add rel="nofollow" to auto-linked items

__auto_link_urls_custom(self, **kwargs)__

Add `<a></a>` tags around the URLs in the provided text. Any elements in kwargs (except @supress_no_follow@) will be converted to HTML attributes and place in the `<a>` tag. Unless kwargs contains @suppress_no_follow@ the rel="nofollow" attribute will be added.

## Extractor

This object does not modify the text passed to it (or the parent TwitterText.text if present).

### Methods

__extract_mentioned_screen_names__

Extracts a list of all usernames mentioned in the Tweet text. If the text contains no username mentions an empty list will be returned.

If a transform is given, then it will be called with each username.

__extract_mentioned_screen_names_with_indices__

Extracts a list of all usernames mentioned in the Tweet text along with the indices for where the mention occurred in the format:

    {
        'screen_name': username_string,
        'indicies': ( start_postion, end_position )
    }

If the text contains no username mentions, an empty list will be returned.

If a transform is given, then it will be called with each username, the start index, and the end index in the text.

__extract_reply_screen_name__

Extracts the first username replied to in the Tweet text. If the text does not contain a reply None will be returned.

If a transform is given then it will be called with the username replied to (if any).

__extract_urls__

Extracts a list of all URLs included in the Tweet text. If the text contains no URLs an empty list will be returned.

If a transform is given then it will be called for each URL.

__extract_urls_with_indices__

Extracts a list of all URLs included in the Tweet text along with the indices in the format:

    {
        'url': url_string,
        'indices': ( start_postion, end_position )
    }

If the text contains no URLs an empty list will be returned.

If a transform is given then it will be called for each URL, the start index, and the end index in the text.

__extract_hashtags__

Extracts a list of all hashtags included in the Tweet text. If the text contains no hashtags an empty list will be returned. The list returned will not include the leading # character.

If a transform is given then it will be called for each hashtag.

__extract_hashtags_with_indices__

Extracts a list of all hashtags included in the Tweet text along with the indices in the format:

    {
        'hashtag': hashtag_text,
        'indices': ( start_postion, end_position )
    }

If the text contains no hashtags an empty list will be returned. The list returned will not include the leading # character.

If a transform is given then it will be called for each hashtag.

## HitHighlighter

### Defaults

These may be overridden by kwargs on a particular method.

* highlight_tag = 'em'
* highlight_class = 'search-hit'

### Methods

__hit_highlight(self, query, **kwargs)__

Add `<em></em>` tags around occurrences of query provided in the text except for occurrences inside hashtags.

The `<em></em>` tags or css class can be overridden using the highlight_tag and/or highlight_class kwarg. For example:

    python> HitHighlighter.hit_highlight('test hit here').hit_highlight('hit', highlight_tag = 'strong', highlight_class = 'search-term')
            =\> "test hit here"

## Validation

### Methods

__tweet_length__

Returns the length of the string as it would be displayed. This is equivilent to the length of the Unicode NFC (See: http://www.unicode.org/reports/tr15). This is needed in order to consistently calculate the length of a string no matter which actual form was transmitted. For example:

    U+0065 Latin Small Letter E
    + U+0301 Combining Acute Accent
    ----------
    = 2 bytes, 2 characters, displayed as é (1 visual glyph)

The NFC of {U+0065, U+0301} is {U+00E9}, which is a single character and a display length of 1

The string could also contain U+00E9 already, in which case the canonicalization will not change the value.

__tweet_invalid__

Check the text for any reason that it may not be valid as a Tweet. This is meant as a pre-validation before posting to api.twitter.com. There are several server-side reasons for Tweets to fail but this pre-validation will allow quicker feedback.

Returns false if this text is valid. Otherwise one of the following Symbols will be returned:

* "Too long": if the text is too long
* "Empty text": if the text is empty
* "Invalid characters": if the text contains non-Unicode or any of the disallowed Unicode characters

repository: amrael/twitter-text-py

gha_language: Python

repo_name: amrael/twitter-text-py


text:
# bitset
Go Integer Bitset Generator

Generator for bit sets stored in integers as custom types.

This will generate helper functions that will make it possible for you to handle bit sets easily in integers.

See the [Example godoc](https://godoc.org/github.com/klauspost/bitset/example) for typical output.

Package home: https://github.com/klauspost/bitset

# alpha warning

This software is very rough, and meant for a "generate once" scenario.

If there are things that needs adjusment in the generated code, you are encouraged to do so.

# usage

```
go get github.com/klauspost/bitset
cd %GOPATH%/src/github.com/klauspost/bitset
go run bitset.go MySet MyType example int >example/myset.go
```

* `MySet` is the name of the type you want to generate.
* `MyType` is the type name of your existing type.
* `example` is the name of the package.
* `int` is the underlying type of `MyType`. Must be convertible to uint64.

repository: klauspost/bitset

repo_name: klauspost/bitset


text:
---
layout: layout.pug
navigationTitle:  dcos license renew
title: dcos license renew
menuWeight: 3
excerpt: Renewing a cluster license
render: mustache
model: /mesosphere/dcos/2.2/data.yml
enterprise: true
---

# Description
The `dcos license renew` command associates a new DC/OS license with the cluster and makes it active. This command uses the license at the given `PATH`.

Running the `dcos license renew` command doesn't require a restart of any running services or affect any current payload.

# Usage

```bash
dcos license renew [OPTIONS] PATH
```

# Options

| Name |  Description |
|---------|-------------|
| `--help`   |  Show this message and exit. |

## Positional arguments

| Name |  Description |
|--------|-------------|
| `PATH` | Specify the path to the file containing the license you want to renew. |

# Examples
For examples, see [Licenses](/mesosphere/dcos/2.2/administering-clusters/licenses/).

# Parent command

| Command | Description |
|---------|-------------|
| [dcos license](../../dcos-license/) | Manage DC/OS cluster licenses. |

repository: mesosphere/dcos-docs-site

gha_language: SCSS

repo_name: mesosphere/dcos-docs-site


text:
---
description: Internal architecture of the project.
---

# Internal architecture

## Trackers

A tracker is a process that gets data from an HTTP API or a Blockchain smart contract.

The structure of this `indexes.json` file is as follow:

```javascript
{
    "ALGO/USD": [
        {
            "URL": "https://api.binance.com/api/v1/klines?symbol=ALGOUSDT&interval=1d&limit=1",
            "param": "$[0][4]",
            "interval": 7200,
        }
    ],
    ...
    "AMPL/ETH": [
        {
          "URL": "Mainnet:0xc5be99a02c6857f9eac67bbce58df5572498f40c,Rinkeby:0x7e62a502232f1feB77Adf8b8ca023cc9fB133418",
          "type": "ethereum",
          "parser": "Uniswap"
        }
    ],
    ...
}
```

There is three types of index trackers: `http`, `ethereum`, `file`.

### HTTP trackers

If not set the default type of an index tracker is `http` type. also, the default parser for an index tracker is a `jsonpath` parser that parses data from a JSON payload. also, `param` is an additional parameter for the parser. for the `jsonpath` parser, it is the jsonpath param on how to parse the output. see [here](http://goessner.net/articles/JsonPath/) for more info

### On-chain trackers

If the index tracker type was set to `ethereum` then it's an on-chain tracker that fetches data using on-chain calls on an Ethereum blockchain network.

Currently supported on-chain parsers are `Uniswap` and `Balancer` parsers.

#### Balancer parser

`Balancer` is a parser that fetches tracker info from a [Balancer pool](https://docs.balancer.finance/getting-started/faq#balancer-pools). Balancer pools are liquidity pools for pair of ERC20 tokens. a Balancer pool could exist on both Ethereum mainnet and testnets. for Balancer smart contract addresses see [here](https://docs.balancer.finance/smart-contracts/addresses).

There is an `on-chain registry` smart contract for Balancer that could be queried to get the best pools for an input pair of ERC20 tokens:

```javascript
getBestPools(address fromToken, address destToken)
```

This method will retrieve an array of pool addresses for a token pair that is ordered by liquidity value.

Sometimes there is no deployed testnet Balancer pool to use in the On-chain index tracker. Here are some steps to deploy a Balancer pool on the Rinkeby testnet and add some liquidity to it based on [this](https://docs.balancer.finance/guides/testing-on-kovan) Balancer doc.

**1- Deploy ERC20 tokens as required**

[Here](https://github.com/hhio618/simple-erc20-example) is a simple JavaScript project that could be used to deploy an ERC20 token on the Rinkeby testnet.

**2- Install and configure the seth client**

Install and configure `seth` client using [this Github repository](https://github.com/dapphub/dapptools#installation) guides.

**3- Pool creation**

Set address variables:

```javascript
export BFACTORY=0x9C84391B443ea3a48788079a5f98e2EaD55c9309
export TOKEN1=<token#1-address-from-the-first-step>
export TOKEN2=<token#2-address-from-the-first-step>
```

Create a new pool:

```text
seth send --gas 5000000 $BFACTORY "newBPool()"
```

Set `BPOOL` variable:

```text
export BPOOL=0x... (address returned from the previous command)
```

Approve ERC20 tokens on the BPool smart contract:

```text
amount=$(seth --to-uint256 $(seth --to-wei 1000000 ether))
seth send $TOKEN1 "approve(address,uint256)" $BPOOL $amount
seth send $TOKEN2 "approve(address,uint256)" $BPOOL $amount
```

Wait for confirmations. after that bind tokens using the `bind` method. for example:

```text
# Bind 1000000 TOKEN1 with a denormalized weight of 5
amount=$(seth --to-uint256 $(seth --to-wei 1000000 ether))
weight=$(seth --to-uint256 $(seth --to-wei 5 ether))
seth send $BPOOL "bind(address, uint256, uint256)" $TOKEN1 $amount $weight
```

Let's confirm that all the tokens were added by using some query method:

```text
seth call $BPOOL "getNumTokens()"
```

Set a swap fee and finalize:

```text
fee=$(seth --to-uint256 $(seth --to-wei 0.003 ether))
seth send $BPOOL "setSwapFee(uint256)" $fee
seth send $BPOOL "finalize()"
```

All done. Let's confirm that we received BPTs by calling `balanceOf` directly on the pool address \(since the pools themselves are ERC20 tokens\):

```text
seth --from-wei $(seth --to-dec $(seth call $BPOOL "balanceOf(address)" $ETH_FROM))
```

#### Uniswap parser

`Uniswap` is a parser that fetches tracker info from a [UniswapV2 pair](https://uniswap.org/docs/v2/smart-contracts/pair/). the easiest way to add UniswapV2 testnet pair is to call the [addLiquidity](https://uniswap.org/docs/v2/smart-contracts/router02/#addliquidity) contract method on Uniswap RouterV2 smart contract on different Ethereum networks. see [addresses](https://uniswap.org/docs/v2/smart-contracts/router02/#addresshttps://uniswap.org/docs/v2/smart-contracts/router02/#address). the method is as follow:

```javascript
function addLiquidity(
  address tokenA,
  address tokenB,
  uint amountADesired,
  uint amountBDesired,
  uint amountAMin,
  uint amountBMin,
  address to,
  uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
```

This required to deploy some ERC20 token beforehand and will create a Uniswap V2 pair if already not exists for the provided pair. there is a factory method that could be used to get the pair address [here](https://uniswap.org/docs/v2/smart-contracts/factory/#getpair).

repository: TheRocketCat/telliot

gha_language: Go

repo_name: TheRocketCat/telliot


text:
# Running Tests

To run the tests in this package, you will first need to install the [software prerequisites](./software-prerequisites.md).

# Running the tests in Vagrant

The tests in this package are intended to be run on a machine which has the GPII autopersonalisation system installed
and configured.  The preferred way to do this is to run the tests in a standard VM container.

To launch the virtual machine:

1. Navigate to the working directory in which you have checked out this repository.
2. Run the command `vagrant up` to create the virtual machine.

Assuming the above completes successfully, you can run the tests in the VM using the command `vagrant ci test`.

## Running the tests locally

If your machine is running the autopersonalisation system, you can run the tests in this package using the command
`npm test`.

Please note, testing changes locally is not sufficient to prepare for a pull request.  Your work will
ultimately be tested in our Continous Integration environment using the Vagrant plugin mentioned above.  You will save
your reviewer time by testing with Vagrant at least once before submitting your pull request.

# So, what do the tests, you know, *test*?

The tests in this package will verify that:

# All [options files](./options-files) are valid.
# The GPII will start and stop and operate as expected with the updated data.

repository: the-t-in-rtf/gpii-live-registries

repo_name: the-t-in-rtf/gpii-live-registries


text:
# HORNET Changelog

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

## [1.0.5] - 02.09.2021

### Added
    - Add faucet plugin
    - Add faucet website
    - Add database migration tool
    - Add io utils to read/write a TOML file
    - Add private tangle scripts to deb/rpm files
    - New public keys applicable for milestone ranges between 1333460-4443860

### Changed
    - Move p2p identity private key to PEM file
    - Run autopeering entry node in standalone mode
    - Merge peerstore and autopeering db path in config
    - Expose autopeering port in dockerfile
    - Add detailed reason for snapshot download failure
    - Print bech32 address in toolset
    - Use kvstore for libp2p peerstore and autopeering database
    - Use internal bech32 HRP instead of additional config parameter
    - Update go version in workflows and dockerfile
    - Update github workflow actions
    - Update go modules
    - Update libp2p
    - Autopeering entry nodes for mainnet
    - Snapshot download sources for mainnet/comnet

### Fixed
    - Fix data size units according to SI units and IEC 60027
    - Fix possible jwt token vulnerabilities
    - Fix nil pointer exception in optimalSnapshotType
    - Set missing config default values for mainnet
    - Do not disable plugins for the entry nodes in the integration tests
    - Fix dependency injection of global config pars if pluggables are disabled by adding a InitConfigPars stage
    - Do not panic in MilestoneRetrieverFromStorage
    - Fix logger init in test cases

### Removed
    - Remove support for boltdb

### Cleanups
    - Refactor node/pluggable logger interface
    - Check returned error at the initialization of new background workers
    - Fixed return values order of StreamSnapshotDataTo
    - Do not use unbuffered channels for signal.Notify
    - Change some variable names according to linter suggestions
    - Remove duplicate imports
    - Remove dead code
    - Cleanup toolset listTools func
    - Replace deprecated prometheus functions
    - Fix comments
    - Remove 'Get' from getter function names
    - Add error return value to SetConfirmedMilestoneIndex
    - Add error return value to SetSnapshotMilestone
    - Add error return value to database health functions
    - Add error return value to loadSnaphotInfo
    - Replace http.Get with client.Do and a context
    - Add missing checks for returned errors
    - Add linter ignore rules
    - Cleanup unused parameters and return values
    - Fix some printouts and move hornet logo to startup
    - Return error if database init fails
    - Reduce dependencies between plugins/core modules
    - Replace deprecated libp2p crypto Bytes function
    - Add error return value to loadSolidEntryPoints
    - Rename util files to utils
    - Move database events to package
    - Move graceful shutdown logic to package
    - Move autopeering local to pkg
    - Add error return value to authorization init functions

### Config file changes

`config.json`
```diff
  "snapshots": {
    "downloadURLs": [
      {
-        "full": "https://mainnet.tanglebay.com/ls/full_snapshot.bin",
+        "full": "https://cdn.tanglebay.com/snapshots/mainnet/full_snapshot.bin",
-        "delta": "https://mainnet.tanglebay.com/ls/delta_snapshot.bin"
+        "delta": "https://cdn.tanglebay.com/snapshots/mainnet/delta_snapshot.bin"
      }
    ]
  },
  "protocol": {
    "publicKeyRanges": [
      {
        "key": "ba6d07d1a1aea969e7e435f9f7d1b736ea9e0fcb8de400bf855dba7f2a57e947",
        "start": 552960,
        "end": 2108160
-      }
+      },
+      {
+        "key": "760d88e112c0fd210cf16a3dce3443ecf7e18c456c2fb9646cabb2e13e367569",
+        "start": 1333460,
+        "end": 2888660
+      },
+      {
+        "key": "7bac2209b576ea2235539358c7df8ca4d2f2fc35a663c760449e65eba9f8a6e7",
+        "start": 2111060,
+        "end": 3666260
+      },
+      {
+        "key": "edd9c639a719325e465346b84133bf94740b7d476dd87fc949c0e8df516f9954",
+        "start": 2888660,
+        "end": 4443860
+      }
    ]
  },
  "p2p": {
-    "identityPrivateKey": "",
-    "peerStore": {
-      "path": "./p2pstore"
-    }
+    "db": {
+      "path": "p2pstore"
+    },
    "autopeering": {
-      "db": {
-        "path": "./p2pstore"
-      },
      "entryNodes": [
-        "/dns/lucamoser.ch/udp/14926/autopeering/4H6WV54tB29u8xCcEaMGQMn37LFvM1ynNpp27TTXaqNM",
+        "/dns/lucamoser.ch/udp/14826/autopeering/4H6WV54tB29u8xCcEaMGQMn37LFvM1ynNpp27TTXaqNM",
+        "/dns/entry-hornet-0.h.chrysalis-mainnet.iotaledger.net/udp/14626/autopeering/iotaPHdAn7eueBnXtikZMwhfPXaeGJGXDt4RBuLuGgb",
+        "/dns/entry-hornet-1.h.chrysalis-mainnet.iotaledger.net/udp/14626/autopeering/iotaJJqMd5CQvv1A61coSQCYW9PNT1QKPs7xh2Qg5K2",
         "/dns/entry-mainnet.tanglebay.com/udp/14626/autopeering/iot4By1FD4pFLrGJ6AAe7YEeSu9RbW9xnPUmxMdQenC"
      ],
    }
  },
+  "faucet": {
+    "amount": 10000000,
+    "smallAmount": 1000000,
+    "maxAddressBalance": 20000000,
+    "maxOutputCount": 127,
+    "indexationMessage": "HORNET FAUCET",
+    "batchTimeout": "2s",
+    "powWorkerCount": 0,
+    "website": {
+      "bindAddress": "localhost:8091",
+      "enabled": true
+    },
  }
```

## [1.0.4] - 04.08.2021

### Added
    - Autopeering with two default entry nodes (disabled by default)
    - Default config for community network

### Changed
    - Reduces the default WarpSync advancement range back to 150 as the previous value was only a workaround.
    - Cleaned up parameter names and values in all config files
    - Rate limit for dashboard login changed from 1 request every 5 minutes to 5 requests every minute

### Config file changes

`config.json`
```diff
  "receipts": {
    "backup": {
-      "folder": "receipts"
+      "path": "receipts"
    },
  }
  "p2p": {
    "bindMultiAddresses": [
      "/ip4/<IP_ADDRESS>/tcp/15600",
+      "/ip6/::/tcp/15600"
    ],
-    "gossipUnknownPeersLimit": 4,
+    "gossip": {
+      "unknownPeersLimit": 4,
+      "streamReadTimeout": "1m0s",
+      "streamWriteTimeout": "10s"
+    },
  "autopeering": {
-    "dirPath": "./p2pstore"
+    "db": {
+      "path": "./p2pstore"
+    },
  }
  "warpsync": {
-    "advancementRange": 10000
+    "advancementRange": 150
  },
  "spammer": {
-    "mpsRateLimit": 5.0,
+    "mpsRateLimit": 0.0,
  },
```

## [1.0.3] - 02.06.2021

### Added
    - A new public key applicable for milestone ranges between<PHONE_NUMBER>160

### Changed
    - Increases the WarpSync advancement range to 10k which allows nodes to resync even if
      they already stored the milestone for which they lacked the applicable public key beforehand.

## [1.0.2] - 28.05.2021

### Added
    - p2pidentity-extract tool (#1090)
    - tool to generate JWT token for REST API (#1085)
    - Add database pruning based on database size (#1115)

### Changed
    - Improved documentation (#1060 + #1083 + #1087 + #1090)
    - Build Dockerfile with rocksdb (#1077)
    - Default DB engine changed to rocksdb (#1078)
    - Renamed alphanet scripts to private_tangle (#1078)
    - Updated rocksdb (#1080)
    - Updated go modules, containers and dashboard (#1103)
    - Check if files exist in the p2pstore directory (needed for docker) (#1084)
    - Disabled MQTT http port (#1094)
    - Download the latest snapshots from the given targets (#1097)
    - Adds "ledgerIndex" field to some REST HTTP and MQTT API responses (#1106)
    - Add delta snapshots to control endpoint (#1039)
    - Changed node control endpoints to use POST (#1039)
    - Expose MQTT port. Remove no longer needed ports (#1105)
    - Re-add private Tangle doc (#1113)

### Fixed
    - Added workdir to docker/Dockerfile. (#1068)
    - JWT subject verification (#1076)
    - Send on closed channel in coo quorum (#1082)
    - Database revalidation (#1096)
    - Mask sensitive config parameters in log (#1100)
    - Fix ulimits and dependencies at node startup (#1107)
    - Do not print API JWT auth tokens to the log (unsafe) (#1039)
    - Check if node is busy before accepting snapshot commands via API (#1039)

### Config file changes

`config.json`
```diff
  "pruning": {
-    "enabled": true,
-    "delay": 60480,
+    "milestones": {
+      "enabled": false,
+      "maxMilestonesToKeep": 60480
+    },
+    "size": {
+      "enabled": true,
+      "targetSize": "30GB",
+      "thresholdPercentage": 10.0,
+      "cooldownTime": "5m"
+    },
    "pruneReceipts": false
  },
```

## [1.0.1] - 28.04.2021

### Fixed

    - Receipt validation deadlock
    - Docker Image Build Tags for RocksDB

## [1.0.0] - 28.04.2021

### Changed

    - IOTA: A new dawn.


text:
# palidate-node
A nodejs library to test your PayPal Rest Integration.

Install the module and use the starting code below. (Use --save-dev if you want to use as a DEV dependency)

``` bash
npm install palidate --save

```

```javascript

var options = {
  env: 'sandbox',
  clientId: 'Your Client ID',
  clientSecret: 'Your Client Secret'
}

palidate(options, function(err, res){
  if(err){
    console.log(err)
  } else {
    console.log(res)
  }
})

```

The code above tests your credentials and will return a status variable that is either "pass" or "fail".
If your credentials "pass" then you will receive your access token back in your result to make your PayPal API calls.
Great to test out your PayPal Rest credentials, or use the resulting access token to further develop.

https://www.npmjs.com/package/palidate

This module is NOT officially linked to or apart of PayPal.com and is not directly supported by PayPal.


text:
# gatsby-starter-deck

[![deploys by netlify](https://img.shields.io/badge/deploys%20by-netlify-00c7b7.svg)](https://www.netlify.com)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

Create presentations using Gatsby, React & Markdown. Inspired by Guillermo Rauch’s [deck on Next.js](https://deck.now.sh/) and [mdx-deck](https://github.com/jxnblk/mdx-deck).

* [Demo](//gatsby-deck.netlify.com)

## Usage

    $ gatsby new my-slides https://github.com/fabe/gatsby-starter-deck
    $ cd my-slides
    $ gatsby develop

Then edit and extend your slides inside the `src/slides.md` file. Navigate with the arrow keys.

## Example

###### [src/slides.md](src/slides.md)

```md
# This is the first slide

---

## This is the second slide

![Monkey](//i.imgur.com/PnbINJ6.gif)
```

## Author

* Fabian Schultz ([@fschultz\_](https://twitter.com/fschultz_))

repository: avinashsivaraman/gatsby-starter-deck

repo_name: avinashsivaraman/gatsby-starter-deck


text:
# GraphQL TodoMVC API

This is a simple GraphQL API to serve as a backend for a TodoMVC app.

## Installation

Install all dependencies via yarn (or npm).

```shell
yarn
```

Then build the application with gulp.

```shell
gulp build
```

Finally the API server can be run through the built _dist/app.js_ file, or using the yarn/npm shortcut command.

```shell
yarn start

# Equivalent to:
# npm start

# Or longhand:
# node dist/app.js
```

## Usage

By default the API runs on _localhost:4000_.

There is a [GraphiQL](https://github.com/graphql/graphiql) server running on _localhost:4000/graphiql_ for query exploration & debugging.

repository: jall/graphql-todo-backend

repo_name: jall/graphql-todo-backend


text:
# android.toolchain.cmake
cmake CMAKE_TOOLCHAIN_FILE example for C++ porting to Android with NDK

1) Cross-compiling for Android with the NDK
2) With boost setting example

Usage:
```cmake -DCMAKE_TOOLCHAIN_FILE=/home/maester/android.toolchain.cmake/android.toolchain.cmake```


text:
# Metrofy [![Build Status](https://travis-ci.org/phanan/koel.svg?branch=master)](https://travis-ci.org/phanan/koel) [![OpenCollective](https://opencollective.com/koel/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/koel/sponsors/badge.svg)](#sponsors)

![Showcase](http://koel.phanan.net/dist/img/showcase.png?2)

## Intro

**Metrofy** (also stylized as **metrofy**, with a lowercase k) is a simple web-based personal audio streaming service written in [Vue](http://vuejs.org/) on the client side and [Laravel](http://laravel.com/) on the server side. Targeting web developers, Metrofy embraces some of the more modern web technologies – flexbox, audio, and drag-and-drop API to name a few – to do its job.

## Install and Upgrade Guide

## Native App