text:
[#]: subject: "Linux Mint 21.2 Introducing Tooltips Based on Accent Colour"
[#]: via: "https://debugpointnews.com/linux-mint-21-2-tooltip/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

Linux Mint 21.2 Introducing Tooltips Based on Accent Colour
======

**A few more changes are coming up in the upcoming Linux Mint 21.2 “Victoria” release.**

The Linux Mint team recently provided an update on tooltips for its upcoming point release Linux Mint 21.2 “Victoria”. In the April 2023 update, the team announced that the new tooltips would use the accent colour, which is a significant design change from the traditional yellow colour.

_“We had been planning on redesigning our tooltips for a while,_” the team stated. _“The main reason was that they lacked consistency and looked slightly different depending on where they came from (GTK2, GTK3, Cinnamon). They also featured a grey border which didn’t look clean around their yellow background.”_

After examining other operating systems, Linux themes, and web designs, the team discovered that almost nobody used the traditional yellow colour for tooltips anymore. The team tried a few things and eventually settled on using the accent colour instead of yellow, black, or grey tooltips.

![Sample Linux Mint tooltip][1]

The team fixed the consistency issues across various GTK versions and Cinnamon, inspired by Adwaita, and made the tooltips bigger, rounder, and with larger margins. Additionally, they added space between the applets and their tooltips in Cinnamon so they wouldn’t be stuck to the panel.

Cinnamon notifications will also be using the accent colour, and they will prefer symbolic icons whenever possible. Although these small changes make the desktop look and feel cleaner and more modern.

On another note, I don’t think any other Linux distro changes the tooltip colour based on accent-colour; unless it is themed. For example, Ubuntu recently featured (22.04 LTS onwards) an accent colour with the GNOME desktop, but the tooltip colour remains white-on-black.

![Ubuntu today default tooltip colour with custom accent colour in GNOME][2]

Other noteworthy features in 21.2 include re-basing of this version with Ubuntu 22.04.2, mainline LTS Kernel 5.15 and Xfce 4.18 desktop variant. You can check out my [older article][3] for a few more updates.

The team is planning three releases for the summer, as per the announcement. Linux Mint 21.2, an EDGE ISO release with kernel 5.19 and LMDE 6, based on the upcoming [Debian 12][4] (set for release in June). To ensure that all releases get the 21.2 changes, they should come out in that order, with up to a month separating the Mint 21.2 and the LMDE 6 releases.

Overall, these design changes represent another step forward for Linux Mint, which continues to prioritize consistency and modernity in its operating system. This release is expected around June 2023.

_Via [Linux Mint blog][5]_

[_Using Mastodon? Follow us at floss.social/@debugpoint_][6]

--------------------------------------------------------------------------------

via: https://debugpointnews.com/linux-mint-21-2-tooltip/

作者：[arindam][a]
选题：[lkxed][b]
译者：[译者ID](https://github.com/译者ID)
校对：[校对者ID](https://github.com/校对者ID)

本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出

[a]: https://debugpointnews.com/author/dpicubegmail-com/
[b]: https://github.com/lkxed/
[1]: https://debugpointnews.com/wp-content/uploads/2023/05/mint-21-2-tooltip-sample.jpg
[2]: https://debugpointnews.com/wp-content/uploads/2023/05/Ubuntu-today-default-tooltip-colour-with-custom-accent-colour-in-GNOME.jpg
[3]: https://debugpointnews.com/linux-mint-21-2-announcement/
[4]: https://debugpointnews.com/debian-12-freeze/
[5]: https://blog.linuxmint.com/?p=4513
[6]: https://floss.social/@debugpoint

url: https://raw.githubusercontent.com/lixinyuxx/TranslateProject/baaca3531389c145f856beae840d7bf7729dfa2f/sources/news/20230503.0 ⭐ Linux Mint 21.2 Introducing Tooltips Based on Accent Colour.md

repository: lixinyuxx/TranslateProject

gha_language: Shell

repo_name: lixinyuxx/TranslateProject


text:
---
page_type: sample
languages:
- csharp
- hcl
products:
- azure
- dotnet
- azure-application-insights
- azure-event-grid
- azure-functions
- azure-key-vault
- azure-logic-apps
---

# Handling KeyVault secret rotation changes utilized by an Azure Function

This sample showcases one way to handle when a KeyVault secret used by your Azure Function is "rolled" or updated as part of normal security operations in your organizations.

Typically, organizations require that any secrets, keys, etc are stored in KeyVault and rotated either on-demand (in event of a breach) or as part of routine policy.

In these cases, your Azure Function may also be using these KeyVault secrets, in particular via App Setting KeyVault References. In this scenario, the Azure Function must be told to "re-fetch" the value of the KeyVault secret to get the updated value. In this sample you'll learn how this can be done using a combination of Event Grid and Logic Apps.

## The approach

- When a KeyVault secret is updated, it emits a `NewSecretVersion` event to subscribers of the Key Vault's Event Grid messages.
- To field these messages, Logic Apps can be connected as a subscriber to the KeyVault instance, and even filter for this message type.
- Azure Functions' REST API allows for a `soft-restart` command which forces Configuration Values to be reloaded; this causes the KeyVault reference to be re-evaluated and the new value of the secret to be reflected in the Function's runtime.

## The Implementation

In this sample, we deploy two different Application Insights instances. The first instance's Instrumentation Key is put into a KeyVault secret and the Azure Function uses a KeyVault reference to it as the `APPINSIGHTS_INSTRUMENTATIONKEY` application setting. The Azure Function's binding is a Timer Trigger which executes every ~5 seconds and simply posts a message with the current UTC time to the Application Insights instance to which it's talking.

When we change the value of the KeyVault secret to the second Application Insights instance's Instrumentation Key, you'll see the event get fired to the Logic App, and the Logic App will issue the soft-restart request to the Azure Function. By having the Live Stream tab for both Application Insights instances open at the same time, you can see one cease to receive message while the other begins to receive them. This completes the sequence of events triggered by simply changing the secret value in KeyVault.

## Deploying the sample

The deployment of this sample utilizes Terraform, and comes ready-made with a Visual Studio Code DevContainer to ensure you have everything you need to do the deployment. If this is your first time utilizing a Dev Container, be sure to walk through the installation steps to ensure you have everything you need.

### 1. Clone the repo

Clone this repo, or your own fork of it, to your local machine.

### 2. Open the workspace in its container

When prompted by Visual Studio Code, Reopen the workspace in its Dev Container. This may take a few minutes to install all of the container layers and get you to a bash prompt. Make sure you have Docker running ;)

### 3. Login to the Azure CLI

In the bash terminal of VS Code, issue the `az login` command and `az account set --subscription <your subscription id>` commands to log in to Azure and target the subscription into which you wish to deploy the sample.

### 4. Create a Service Principal

To make deployment of the Logic App completely hands-off, and enable it to authenticate with Event Grid without an OAuth flow, you'll create a service principal on your Azure Subscription by issuing the `az ad sp create-for-rbac` command. When this completes, you'll get output that looks like this:

```json
{
    "appId": "...",
    "displayName": "...",
    "name": "...",
    "password": "...",
    "tenant": "..."
}
```

Save the `appId` and `password` fields of this output for the next step

### 5. Deploy via Terraform

In the terminal window of VSCode issue the following commands:

```sh
cd terraform
terraform apply -var prefix=<a unique prefix for you> -var sp_client_id=<appId from above> -var sp_client_secret=<password from above>
```

This will first output all the changes that will be made to your Azure Subscription as part of Terraform's deployment, and wait for you to type 'yes' for the application to take place. For this sample, the following resources are deployed:

- A new Resource Group named `serverless-sample-<prefix>' containing:
- Logic Apps API Connection to Event Grid
- 2 Application Insights Instances
- Key Vault
- Consumption App Service plan
- Azure Function
- Logic App
- Log Analytics Workspace
- Storage Account

Type 'yes' and Terraform will work its magic.

### 6. Add the App Setting for the Application Insights KeyVault secret to the Function App

An output from the Terraform is a deployment script you must run in order to populate the Function App's application setting for Application Insights as well as actually deploy the Function code. In your VSCode bash terminal window, simply run

```bash
./deploy_app.sh
```

> Note: You may need to refresh the files in the Explorer Panel in VS Code to see the generated `deploy_app.sh` file under `terraform` folder.

from the `terraform/` directory you're in after running `terraform apply`.

> Note: We can't set the APPINSIGHTS_INSTRUMENTATIONKEY value via Terraform (yet) because it will erase all other App Settings if we deploy via ARM template, and there's a race condition between the Function App and they KeyVault if we try to embed it as part of the Function App's deployment. In a production scenario this would be done as part of the DevOps pipeline being used to execute the Terraform plan. Likewise, the DevOps pipeline would build & deploy the Function App.

### 7. Observe the outcome

#### The Azure Function

In your portal, go to the newly-created Azure Function. Its name will be the `<prefix>-serverless-functionapp` value you put in during the Terraform deployment.

There are a few things to notice:

- The Function app has one Function: `Timer5sec` \
![Screenshot of Functions list in Azure Portal](doc/functioncontent.png)
- Under `Configuration` you'll find the Application Setting KeyVault reference for `APPINSIGHTS_INSTRUMENTATIONKEY` \
![Location/appearance of 'Configuration' option in Azure Portal](doc/configuration.png) \
![Screenshot of adding an Application Insights setting to an Azure Function](doc/appinsightssetting.png) \

> Note: It's important to note the **lack** of a secret version specifier in the URL. By using this method, we always retrieve the latest version of the secret, enabling the behavior we want. Alternatively, you could create a process that *updates* the `APPINSIGHTS_INSTRUMENTATIONKEY` app setting with the URL which comes through as part of the Event Grid event for `NewSecretVersion`.

> Notice the `Status` marker on the reference; this tells you the connection between the Function App and KeyVault is all good, and it's able to pull the value from KeyVault as intended

- In the IAM (Access Control) area of the Function App, under Role Assignments, you'll find an entry for the Logic App.

![Location of IAM option on an Azure Function app](doc/iamlink.png)

![Setting up the Logic App with Website Contributor role](doc/lawebsitecontrib.png)

This exists to give the Logic App necessary permissions to issue the soft-reset request to the Function App. Without it, the Azure REST API request made by the Logic App receives a `403 FORBIDDEN` response.

The link between the Logic App and the Azure Function is made by this part in [main.tf](terraform/main.tf):

```hcl
##################################################################################
# Role Assignment
##################################################################################
resource "azurerm_role_assignment" "laToFunction" {
  scope                = azurerm_function_app.fxn.id
  role_definition_name = "Website Contributor"
  principal_id         = azurerm_template_deployment.logicapp.outputs["logicAppServicePrincipalId"]
}
```

and the fact that the Logic App was created with a Managed Service Identity assigned to it as part of its ARM template deployment:

```json
"identity": {
    "type": "SystemAssigned"
},
```

- The Function App itself has a Managed Service Identity:

![Location of 'Identity' option for an Azure Function](doc/identityconfiglabel.png)

![Identity area of an Azure Function with Managed Identity enabled](doc/fxnidentity.png)

This is part of setting up the Azure Function to use KeyVault references, and enables KeyVault to restrict access to keys, secrets, and other things to only certain identities. This access is applied by this part of our Terraform deployment:

```hcl
  # access policy for azure function
  access_policy {
    object_id = azurerm_function_app.fxn.identity[0].principal_id
    tenant_id = data.azurerm_client_config.current.tenant_id

    secret_permissions = [
      "get",
    ]
  }
```

which ensures that even if somebody were to submit Function code that attempted to change a value in the KeyVault, it would not be allowed; the Function has only "Get Secret" permissions, which is all it needs.

#### The Logic App

In your portal, go to the newly-created Logic App. Its name will be `<prefix>-serverless-la` where `<prefix>` is the value you put in during the Terraform deployment.

##### Execution Logic

Click `Logic App Designer` in the left-hand portion of the blade so you can see the design surface for the Logic App.

Clicking on the titlebar of each block in the Logic App will expand out its contents to look like this:

![Logic app which rotates the keys upon the Event Grid event](doc/logicapp.png)

Let's examine each block of Logic.

1. This block wires up the *trigger* of the Logic App. When we create this via the ARM Template Deployment in Terraform, it automatically requests an Event Grid subscription from the resource denoted in `Resource Name` and listens for the event type denoted in `Event Type Item - 1`. The Logic App trigger takes care of the Event Grid Subscription Validation event so everything is able to communicate without issue.

2. As part of our Terraform, we populate the value of this Logic App variable with the secret names we put in to KeyVault.

3. We use this 'if' statement (aka Condition block) to say "if the subject of the event we got (which corresponds to the name of the secret that fired the `NewSecretVersion` event) is in our `keysToWatch` array variable" so we can ignore changes to other secrets in the same vault.

4. Here we use the Azure REST API to invoke the `softRestart` of the Function App we created.

5. The authentication of the previous request comes from the Managed Identity we've assigned the Logic App, and the User Access role pointed out earlier which has `Website Contributor` access to the Function App. If that User Access Role is missing, this block of the Logic App will fail.

##### Configuration

The important part of the Logic App's configuration is that our Terraform deployment assigned it a Managed Identity. You can see this in the `Identity` area of the Logic App:

![Logic App's configuration with Managed Identity enabled](doc/laidentity.png)

#### Key Vault

In your portal, go to the newly-created Key Vault. Its name will be the `<prefix>-serverless-kv` value you put in during the Terraform deployment.

The important bits of the Key Vault for this sample are the `Events` and `Access Policies` area

##### Events configuration

Earlier, you saw the Logic App Event Grid trigger configured to receive events from the Key Vault resource. When Logic App is deployed with this connector in place, it automatically creates the Event Grid subscription from the Key Vault instance. Click the `Events` area of your KeyVault and notice the `Subscriptions` area near the bottom:

![Keyvault Event Grid events area](doc/kveventsubs.png)

Here you see the Logic App registered itself as a webhook receiver for events from the KeyVault.

##### Access Policies

In order for the Function App to be able to read the values of Key Vault secrets, you remember, our Terraform granted it this permission in the configuration of the KeyVault. You can see this in the Access Policies area:

![Defined KeyVault access policies](doc/kvaccesspolicies.png)

## Bringing it all together

If you open the Live Stream for the first Application Insights instance (with the `-first` suffix) you'll see the Function happily logging messages every 5 seconds or so:

![Active Application Insights instance](doc/appinsightslivestream1.png)

Moving over to the secondary Application Insights (with the `-second` suffix), you'll probably see a screen like this:

![Newly-inactive Application Insights instance](doc/appinsights2dead.png)

But if you take the Instrumentation Key from the secondary instance and update the KeyVault secret `appinsights-instrumentationkey` with it, you'll see that behavior flip as the event propagates through the system and the Function App is soft-reset to pick up the new value from KeyVault!

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
# Temple of the Deep

## Inscription
We have sealed the powers of darkness for now, but future heroes of Light must dispel it forever.

## Waves
1. 3 groups of 6 Mynocks (A&A 128)
2. 3 Nexu (A&A 130)
3. 3 Stalking Acklay (A&A 139)
4. Saber Gundark w/minions

## Dark Side Artifact
[Artifact of the Deep](../../gear/artifact_of_the_deep.md)

## Saber Gundark
* Adversary 3
* Double-Bladed Lightsaber (Damage 6, Critical 2, Breach 1, Sunder, -Linked 1-)
* Wound Threshold 8, Strain Threshold: 0
* Parry 5 (when struck w/melee, 3 strain to reduce by 7)
* Reflect 5 (when struck w/ranged, 3 strain to reduce by 7)
* 3 Crit (no free maneuvers, increased difficulty all skill checks by 1, bleeding out (1/1 each turn))
* Prone

Gundarks - 2/2
3/3
3/2
2/1/1

(Team)
(Team)
(Gundark)
(Team)

G2 (1 crit) - 9


text:
[Home](./index) > [graph-builder](./graph-builder.md) > [ValueGraph](./graph-builder.valuegraph.md) > [edgeValue](./graph-builder.valuegraph.edgevalue.md)

# ValueGraph.edgeValue method

Returns the value of the edge that connects `nodeU` to `nodeV` (in the order, if any, specified by `endpoints`<!-- -->), if one is present; otherwise, returns undefined.

Throws if `nodeU` or `nodeV` is not an element of this graph.

**Signature:**
```javascript
edgeValue(nodeU: N, nodeV: N): V | undefined;
```
**Returns:** `V | undefined`

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  `nodeU` | `N` |  |
|  `nodeV` | `N` |  |

repository: sorohan/graph-builder

branch_name: refs/heads/master

repo_name: sorohan/graph-builder


text:
[You are now in a GitHub source code view - click this link to view Read Me file as a web page]( https://sps-pelicans.github.io/#links-of-interest.md "View file as a web page." )

# Links of interest

# SPS

* https://sps.edu
* https://www.spshorae.com/

## SPS Community

* https://www.instagram.com/blackatsps/
* https://www.instagram.com/sps2020society/
* https://www.instagram.com/spssurvivors/
* https://www.bipocatsps.org/
* https://groups.io/g/pelicans/wiki/23278

## Boarding schools

* https://www.instagram.com/boardingwhileblack/
* https://www.instagram.com/blackatandover/
* https://www.instagram.com/bipocatcate/
* https://www.instagram.com/blackatchoateofficial/
* https://www.instagram.com/blackatgroton/
* https://www.instagram.com/blackatexeter/
* https://www.instagram.com/blackhotchkiss/
* https://www.instagram.com/blackatmiddlesex/
* https://www.instagram.com/blackatmiltonacad/
* https://www.instagram.com/blackatgeorgeschool/
* https://www.instagram.com/blackatsm/
* https://www.instagram.com/blackattaft/
* https://www.instagram.com/bipocatthacher/

## People

* https://www.instagram.com/lacycrawford/

***


text:
# Unpointed maps between pointed types

```agda
module structured-types.unpointed-maps where
```

<details><summary>Imports</summary>

```agda
open import foundation.dependent-pair-types
open import foundation.universe-levels

open import structured-types.pointed-types
```

</details>

## Idea

The type of unpointed maps between pointed types is a pointed type, pointed at
the constant function.

## Definition

```agda
unpointed-map-Pointed-Type :
  {l1 l2 : Level} → Pointed-Type l1 → Pointed-Type l2 → Pointed-Type (l1 ⊔ l2)
pr1 (unpointed-map-Pointed-Type A B) = type-Pointed-Type A → type-Pointed-Type B
pr2 (unpointed-map-Pointed-Type A B) x = point-Pointed-Type B
```

repository: UniMath/agda-unimath

gha_language: Agda

gha_license_id: MIT

repo_name: UniMath/agda-unimath


text:
## Experiments

### Space Invaders (VPG)
./scripts/glearn train space_invaders

### Space Invaders (CNN)
./scripts/glearn train space_invaders_cnn

### MNIST (CNN)
./scripts/glearn train mnist

### MNIST (VAE)
./scripts/glearn train mnist_vae

### MNIST (Conditional VAE)
./scripts/glearn train mnist_cvae

### MNIST (GAN)
./scripts/glearn train mnist_gan

### MNIST (VAE-GAN)
./scripts/glearn train mnist_vae_gan

### MNIST (DCGAN)
./scripts/glearn train mnist_dcgan

### CIFAR-10 (CNN)
./scripts/glearn train cifar10

### Digit Repeat (RNN)
./scripts/glearn train digit_repeat

### PTB (RNN)
./scripts/glearn train ptb

### Mountain Car (DQN)
./scripts/glearn train mountain_car_dqn

### Mountain Car (A2C)
./scripts/glearn train mountain_car_a2c

### Mountain Car (SAC)
./scripts/glearn train mountain_car_sac

## Rendering

Rendering is disabled during training by default, and enabled by default during evaluation.
You can enable rendering with:
./scripts/glearn train ... --render

## Debugging

You can enable debugging information with:
./scripts/glearn train ... --debug

There are also various debug options that can be enabled in the experiment config.
The `_base.yaml` file has most of these listed, which can be imported into another config.

This environment variable can be used to log TF memory info:
`TF_CPP_MIN_VLOG_LEVEL`=3

## Versions

./scripts/glearn train ... --version=VERSION
VERSION is which params to load.  It can be an int or string.  If int, then autosaves to same VERSION.

## Profiling

./scripts/glearn train ... --profile
 OR
python utils/profile.py --path=/path/to/profile_100

repository: glennpow/glearn

gha_language: Python

repo_name: glennpow/glearn


text:
# Javascript-keyword-with-
This project shows the use of keyword "with" with the help of a simple sentence generator.
For more information please visit the wiki for this project:
https://github.com/Incrementis/Javascript-keyword-with-/wiki


text:
# Polkadot Standards Proposals (PSPs)

A Polkadot Standards Proposal (PSP) describes standards for the Polkadot ecosystem. The Polkadot Standards Proposal GitHub is a community-based initiative.
PSP process is not supposed to be a substitute for Polkadot Governance process and is meant to focus only on commonly agreed usage patterns rather than protocol adjustments.

> __Disclaimer__: The Polkadot network is relatively young and many ecosystem
projects are just getting started. While the interoperability aspect of
Polkadot, parachains and community tools are still being actively developed,
participants of the ecosystem can create proposals for certain mechanisms for
the wider community to use. As of now, we loosely accept proposals that we might
not actively endorse, do not expect to be implemented or might fall outside the
scope of the PSP. We think many standards will be adopted organically (with some
coordination) and change with time. We expect that a more firm process for
standardization will evolve as adoption takes place. Certain proposals might be
modified, replaced or deprecated.

---

- [Polkadot Standards Proposals (PSPs)](#polkadot-standards-proposals-psps)
  - [:clipboard: Process](#clipboard-process)
  - [:pencil: Contributing](#pencil-contributing)
  - [:bulb: Help](#bulb-help)

## :clipboard: Process

Below is the workflow of a successful PSP:
```
1. Draft -> 2. Call for Feedback -> 3. Published -> 4. Integrated
```
1. **Draft:** A valid draft, which is merged into into the [draft
   subfolder](./PSPs/drafts) and actively improved together with the community.
2. **Call for Feedback:** The PSP will be shared on different public channels for
   additional feedback for at least 2 weeks. The result of this step is either
   an acceptance of the standard (->Published) or the rejection (->Draft).
3. **Published:** Any further changes are unlikely, and developers can start
   integrating the PSP.
4. **Integrated:** The PSP is actively used and a reference implementation
   exists.

In order to be **merged or accepted** for the different stages, reviewers need to approve a PR. Reviewers should be known experts in the topic covered by the PSP.

## :pencil: Contributing

Before you start writing a formal PSP, you should discuss an idea in the various community public channels (see the [Polkadot community website](https://polkadot.network/community/)). A PSP should provide the motivation as well as a technical specification for the feature.

1. Fork this repository.
2. In the newly created fork, create a copy of the template.
3. Fill out the [template](./PSPs/psp-template.md) with the details of your PSP. If your PSP requires images, the images should be integrated in a subdirectory of the src folder, which has your PSP number as the name.
4. Once you have completed the application, click on "create new pull request".
5. Rename the file with "psp-number_of_your_pr.md".
6. Update the pull request.

## :bulb: Help

* [GitHub Discussions](https://github.com/w3f/PSPs/discussions)
* [PSP Channel on Element](https://app.element.io/#/room/#psp:web3.foundation)


text:
This folder contains the different versions of switched capacitor filter circuits (and some associated circuits) that have been tried on the tool

The versions are named chronologically (YYYY_MM_DD) and are described below

switched_capacitor_filter_2018_10_09  : Contains the files (eg. modified netlist (bookshelf format), constraints) of a preliminary first order SC Filter structure that hasn't been sized

switched_capacitor_filter_2018_11_01  : Contains the files (eg. modified netlist (verilog), constraints) of a preliminary first order SC Filter structure that hasn't been sized

switched_capacitor_filter_2018_11_10  : Contains the files (eg. modified netlist (verilog), constraints, LEF) of a preliminary first order SC Filter structure that hasn't been sized

switched_capacitor_filter_2018_11_20  : Contains the files (eg. modified netlist (verilog), constraints, LEF) of a preliminary first order SC Filter structure that hasn't been sized

switched_capacitor_filter_2018_12_06  : Contains the files (eg. modified netlist (verilog), constraints, LEF) of a preliminary first order SC Filter structure that has been sized

switched_capacitor_filter_2018_12_10  : Contains the files (eg. modified netlist (verilog), constraints, LEF) of a preliminary first order SC Filter structure that has been sized and has additional hierarchy introduced

common_centroid_capacitor_array_2019_01_31 : Contains the files (eg. modified netlist (verilog), constraints, LEF) of the capacitor array in the filter circuit that needs to be placed in common centroid configuration

path: /Design Database/Testcases/Switched Capacitor Filter/README.md


text:
The modern web app for The Luminosity Lab at Arizona State University.

[![Build Status](https://travis-ci.com/luminositylab/luminosity-frontend.svg?branch=master)](https://travis-ci.com/luminositylab/luminosity-frontend)
![David](https://img.shields.io/david/luminositylab/luminosity-frontend.svg)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)

The Luminosity Lab website is a progressive web app created using Gatsby with React, featuring offline support using a service worker and advanced image optimization.
The site uses videos from [Pexels](https://www.pexels.com) and images from [Unsplash](https://unsplash.com). It is based upon [Forty by HTML5 Up](https://html5up.net/forty).

Feel free to use the code as you wish!

## Usage

This project uses Yarn for dependency management. To install dependencies and start, run:

```
yarn install
yarn start
```

This will start the server locally at http://localhost:8000.

### Building and Deploying

In order to compile the code, run:

```
yarn build
```

The `public` folder will contain the compiled code and assets.

To deploy, run:

```
yarn deploy
```

This will automatically build the code and then deploy to the `luminosity-lab` Firebase project and changes will be reflected at https://theluminositylab.com!

## License

The Luminosity web app code is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

repository: luminositylab/luminosity-frontend

gha_language: JavaScript

repo_name: luminositylab/luminosity-frontend


text:
# Valve's Source engine .cfg highlighting
Adds support for .cfg files from Valve's source engine in Atom.
The most popular of these games being Counter Strike: Global Offensive, Team Fortress 2, and Left 4 Dead 2, probably.

# Installation
`apm install language-source-cfg`

... or install through the Atom GUI.

# License
MIT. See the `LICENSE` file.

repository: A-gent/language-source-cfg

repo_name: A-gent/language-source-cfg


text:
---
layout: page
title: Lean Prover Zulip Chat Archive
permalink: archive/116395maths/39703quotienttopology.html
---

## [maths](index.html)
### [quotient topology](39703quotienttopology.html)

#### [Patrick Massot (Jul 16 2018 at 16:13)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/quotient%20topology/near/129751965):
Do we have a lemma about `closure (quotient.mk '' s)` somwhere?

#### [Patrick Massot (Jul 16 2018 at 16:14)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/quotient%20topology/near/129752031):
More specifically I have a dense subset `s` and I want `quotient '' s` to be dense


text:
# Change Log

All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).

# v0.2.4
## (2021-09-02)

* update webstreams polyfill [Zane Hitchcox]

## 0.2.3 - 2020-02-13

* Handle web stream read errors as node error events [Tim Perry]
* Bump web-streams-polyfill to 1.3.2 [Tim Perry]

## 0.2.2 - 2016-09-27

* Tolerate version mis-matches for ReadableStream library; v0.2.2 [Gabriel Wicke]

repository: balena-io-modules/node-web-streams

repo_name: balena-io-modules/node-web-streams


text:
---
author: Lixin Wang
date: 2014-10-02 17:54:44
excerpt: 'Wang, L., S. P. Good, and K. K. Caylor (2014), Global synthesis of vegetation control on evapotranspiration partitioning, Geophysical Research Letters, 41, doi:10.1002/ 2014GL061439.'
header:
  teaser: assets/images/publications/Wang2014_4189.png
id: 4189
doi: 10.1002/2014GL061439
portfolio-item-category:
- publications
portfolio-item-tag:
- '2014'
- GRL
title: Global synthesis of vegetation control on evapotranspiration partitioning
year: '2014'
author-tags:
    - Lixin Wang
    - Stephen Good
    - Kelly Caylor
---

![first page]( {{"assets/images/publications/Wang2014_4189.png" | absolute_url}} ){:class="img-responsive" width="50%" .align-right}

> Wang, L., S. P. Good, and K. K. Caylor (2014), Global synthesis of vegetation control on evapotranspiration partitioning, Geophysical Research Letters, 41, doi:10.1002/2014GL061439.

Evapotranspiration (ET) is an important component of the global hydrological cycle. However, to what extent transpiration ratios (T/ET) are controlled by vegetation and the mechanisms of global-scale T/ET variations are not clear. We synthesized all the published papers that measured at least two of the three components (E, T, and ET) and leaf area index (LAI) simultaneously. Nonlinear relationships between T/ET and LAI were identified for both the overall data set and agricultural or natural data subsets. Large variations in T/ET occurred across all LAI ranges with wider variability at lower LAI. For a given LAI, higher T/ET was observed during later vegetation growing stage within a season. We developed a function relating T/ET to the growing stage relative to the timing of peak LAI. LAI and growing stage collectively explained 43% of the variations in the global T/ET data set, providing a new way to interpret and model global T/ET variability.

[Go to the Article](http://onlinelibrary.wiley.com/enhanced/doi/10.1002/2014GL061439/){: .btn .btn--success}


text:
---
layout: post
title:      "Function Declaration, Arrow Functions, Birds of a feather?"
date:       2021-07-17 21:36:27 -0400
permalink:  function_declaration_arrow_functions_birds_of_a_feather
---

![](https://upload.wikimedia.org/wikipedia/en/0/0a/Flappy_Bird_icon.png)
# === ?
![](https://store-images.s-microsoft.com/image/apps.64975.13564424126320075.f39b613e-67f4-4c85-8d4f-ad9a47ecfa42.8390d401-ed7c-4be6-879c-4b27f89a7d44?mode=scale&q=90&h=270&w=270&background=%230078D7)

Ah, the humble arrow function. Unlike its predecessor, the regular function declaration, the arrow function is a lighter, more concise way of accomplishing some of the same uses. They are both functions after all. Having evolved to it's more arrow-ey form in ES6, there are some differences that are best observed in a natural setting.

##
While these two declarations work similarly, we can see first that the presentation of the syntax is quite different. Peer through your binoculars and see these two in action:
```
function birdNamer (name) {
    return `${name} want a code snippet?`
}

Result:
birdNamer("Regular bird")
"Regular bird want a code snippet?"
```
*A traditional function declaration*

Now observe the awesome power of evolution...

```
const birdNamer = (name) => {
     return `${name} want a code snippet?`
}

Result:
birdNamer("Awesome Arrow-ey bird")
"Awesome Arrow-ey bird want a code snippet?"
```
*The same function in it's arrow form*

There are some differences in terms of how **this** is handled by regular function declarations as opposed to arrow functions. While the usage, contexts and applications of **this** are exhaustive, we'll just focus on the contrast between these two functions from a less birds-eye view.

MDN states:
> In most cases, the value of this is determined by how a function is called (runtime binding). It can't be set by assignment during execution, and it may be different each time the function is called

and...

> ES2015 introduced arrow functions which don't provide their own this binding (it retains the this value of the enclosing lexical context).

There's this great way of explaining lexical scope in the "natural" bird world:

```
const mommaBirdFunction = () => {
     let eggsValue = 2;
     console.log(eggsValue);

     const eggLayerFunction = () => {
          console.log(eggsValue += 1);
     }

     eggLayerFunction();
}

mommaBirdFunction();

2
3
```
*Ah, the wonder of life. This mother arrow function has nested within her, an egg layer function. When the time is right, the mommaBirdFunction is called, thus returning the value of the two eggs, and the newly laid egg*

To take the analogy way further, let's peer into bird social dynamics. Let's say a young blue jay is happily eating grubs along side it's mother, when a robin comes along to eat as well. The young blue jay introduces its mother "tweet tweet" (translation: *this* is my mother) *this* represents the young blue jays mother in the current sentence. Javascript treats *this* the same way. Let's try it in code:

```
const mommaBird = {
    momma_jay_name: "Blue Bell",
    momma_jay: function () {
        return `${this.momma_jay_name} is my mother`;
    },
};
console.log(mommaBird.momma_jay());

Blue Bell is my mother
```
*In the above example we used **this** to refer to mommaBird, the parent object. So we are referring to the context within which *this* was called, inside the anonymous function. Let's see this same social interaction take place near the nest of the arrow function:

```
const mommaBird = {
    momma_jay_name: "Blue Bell",
    momma_jay: () => {
        return `${this.momma_jay_name} is my mother`;
    },
};
console.log(mommaBird.momma_jay());

undefined is my mother
```
The result here is *undefined*. Arrow functions behave differently in that they don't have their own *this* context. They inherit from the parent scope whenever *this* is called. In a regular function, *this* refers to the context of the function being called, in an arrow function, it refers to the scope *where* the enclosed function is located...Hence, undefined.

### Arrow functions, and a birds eye view on Hoisting:

For a brief explanation, let's look at this example of hoisting in the following code snippet using a regular function declaration:
```
birdName("Illest");

function birdName(name) {
  console.log("My bird's name is " + name);
}
/*
Result: "My bird's name is Illest"
*/
```
Wait wha? Yep! Because of hoisting, even though we declared the birds name before the function declaration, the function still works because of *context execution*.

```
eggCounter(1 ,2)

const eggCounter = (a, b) => {
  return a + b
}

Result: Uncaught ReferenceError: Cannot access 'eggCounter' before initialization
    at <anonymous>:1:1
```

Javascript does hoist variables declared using *let*, but it does not initialize them, an important distinction between the majestic function declaration, and the mighty arrow function.

#### *A note on return values:

Per MDN:
> Arrow functions can have either a "concise body" or the usual "block body". In a concise body, only an expression is specified, which becomes the implicit return value. In a block body, you must use an explicit return statement.
>
```
var func = x => x * x;
// concise body syntax, implied "return"

var func = (x, y) => { return x + y; };
// with block body, explicit "return" needed
```

In a regular function, the return statement returns the result of the function. If there is no return statement or expression after the return, then *undefined* is implicitly returned. With an arrow function, if there is only a single expression and the curly braces are left out, then the expression is returned implicitly.

```
function emptyNestFunction() {
  42;
}

function emptyNestFunction2() {
  42;
  return;
}

emptyNestFunction()
Returns: undefined

emptyNestFunction2()
Returns: undefined
```

Similar to the previous example we see the arrow function differs here:

```
const eggCounter = (num) => num + 1;

eggCounter(11)

Returns: 12
```
### Fly on...

extension: markdown


text:
# Algorithms & Data Structures

[![Build Status](https://travis-ci.com/matthewfaller/algorithm-practice.svg?branch=develop)](https://travis-ci.com/matthewfaller/algorithm-practice)

[![docs](https://img.shields.io/badge/read_the-docs-2196f3.svg)](https://matthewfaller.github.io/algorithm-practice/)

Programming practice implemented in Swift

## Running The Project

```bash
git clone https://github.com/matthewfaller/algorithm-practice
```

```bash
cd algorithm-practice/
```

```bash
swift test
```

### Linked List

A simple implementation of a classic structure

```swift
let list = LinkedList<String>()
list.append("Hello")
list.append("World!")
```

Conforms to the `Sequence` Protocol

```swift
let numbers: LinkedList = [1, 2, 3, 4]

let factorial = numbers.reduce(1, *)

print(factorial)

24
```

Uses generics

```swift
struct User: Codable, Hashable {
    let id: String
    let name: String
}

let users: LinkedList = [
    User(id: "1", name: "Emily Blunt"),
    User(id: "2", name: "John Krasinski")
]

users.filter(isActor).forEach(updateUser)
```

repository: matthewfaller/algorithm-practice

branch_name: refs/heads/develop

gha_language: Swift

repo_name: matthewfaller/algorithm-practice


text:
fingerfood - A library of data structures derived from Finger Trees
===================================================================

Author: Anthony Burzillo

******

This library is based heavily on [Ralf Hinze](http://www.cs.ox.ac.uk/ralf.hinze/)
and [Ross Patterson's](http://www.soi.city.ac.uk/~ross/)
2006 paper [Finger trees: a simple general−purpose data structure](
http://www.soi.city.ac.uk/~ross/papers/FingerTree.pdf).

repository: burz/Fingerfood

repo_name: burz/Fingerfood


text:
---
hrs_structure:
  division: '5'
  volume: '14'
  title: '38'
  chapter: '806'
  section: 806-61
type: hrs_section
tags:
  - Crime
  - Criminal Proceeding
menu:
  hrs:
    identifier: HRS_0806-0061
    parent: HRS0806
    name: 806-61 Waiver of jury
weight: 37200
title: Waiver of jury
full_title: 806-61 Waiver of jury
---
**§806-61 Waiver of jury.** The defendant in any criminal case may, with the consent of the court, waive the right to a trial by jury either by written consent filed in court or by oral consent in open court entered on the minutes. Any case in which a trial by jury is waived may be tried by the court without a jury both as to the facts and the law, and when the trial has been had there shall be no further trial upon the facts, except upon the granting of a new trial according to law. [L 1903, c 9, §1; RL 1925, §4028; am L 1931, c 36, §1; RL 1935, §5524; RL 1945, §10825; RL 1955, §258-35; am L 1957, c 282, §10; [HRS §711-61](/title-37/chapter-711/section-711-61/); ren L 1972, c 9, pt of §1]

Rules of Court

Waiver of trial by jury, see HRPP rule 23(a).

Case Notes

Facts insufficient to constitute waiver. 38 H. 178 (1948).

Method of waiver exclusive and requires substantial compliance. 39 H. 613 (1952).

Referred to in holding that court has summary jurisdiction over "petty" offenses not constitutionally required to be tried by jury. 51 H. 612, 466 P.2d 422 (1970).

Cited: 82 F. Supp. 65, 83 (1948), 20 H. 71, 95 (1910); 33 H. 113, 125 (1934).

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# Lua Integration

## Introduction

script languague can make development faster than doing it in pure c++. main reasons are:

- zero build overhead for 80 % of script work
- more developers include game designers to some degree

There are other problems introduced by adding scripting into pure c++ dev. Major cons are:

- debugging two different languages and runtime
- definitely slower than c++ even with Jit
  - tendency to use more dynamic features like GC, json or some others
  - call overhead between two languages even with lua

The major goals of  this research are:

- make it easy to develop scripting with lua
  - bug free, easy and fast binding with c++
    - no memory leak
      - memory debugging
  - lua debugger enabled on request while lax runs
    - remote debugging
    - gui debugger
  - debugging lua functions from c++
  - database support with json protocol
  - coroutines instead of callback
    - database
    - continuation with message(s)
- increase performance
  - script parsing and loading
  - lua <--> c++ function calls
- IDE
  - use atom
  - use lua extension
  - remote debugging
    - per VM debugging

## Binding

### Sol

https://github.com/ThePhD/sol2

It claims the fastest lua binding. If it is easy to bind c++ class, then it seems to be perfect.

### Test

## Debugger

https://github.com/slembcke/debugger.lua

 ## Distraction

Other languages. How about C#?  Multiple C# runtime communicating with C++ core.

How about using Python?  Hmm....

https://pybind11.readthedocs.io

http://yizhang82.me/hosting-coreclr

how about changing language completely? go? rust?

 No scripting, but data scripting / DSL per domain.


text:
## English to Katakana Transcription GraphQL App

This repository is a ReactJS GraphQL App for an Engish to Katakana Transcription, which is
developed in another repository, [https://github.com/yokolet/transcript](https://github.com/yokolet/transcript).
The [transcript](https://github.com/yokolet/transcript) repository is a place for the main logic of transcription.
The GraphQL endpoint is developed in [https://github.com/yokolet/transcript-web](https://github.com/yokolet/transcript-web)
repository. This ReactJS app is making a GraphQL request to [transcript-web](https://github.com/yokolet/transcript-web) endpoint.

The ReactJS App is live at [https://morning-lowlands-77742.herokuapp.com/](https://morning-lowlands-77742.herokuapp.com/).

### How to Use

Input English words, space, comma or newline separated or mixture of those in the left field.
Click the `Transcript` button, then the transcription(s) will show up on the right side.

If the word doesn't exist in the dictionary, `E_DIC` error code will be returned.
If the word caused a trouble to transcript, `E_KEY` error will be returned.

The dictionary has multiple pronunciations for some words. In such a case, multiple transcriptions will be returned.
It happens the same katakana transcripts show up for a single English word. A couple of reasons are there.
The dictionary may have the same IPA phonetics for the word just the difference of accent. Japanese sound doesn't have
an accent, so the accent symbol was removed in the pre-processing. The dictionary may have acutually different IPA phonetics. However, while processing vowels and consonants, those may have become the same.
Lastly, the dictionary may have had exactly the same IPA phonetics for the word.

The transcription logic is explained in the repository, [https://github.com/yokolet/transcript](https://github.com/yokolet/transcript). Please visit for the details of transcription.

## Develpment

### Installation

```bash
$ yarn install

or

$ npm install
```

### GraphQL Endpoint

The GraphQL endpoint should be set as environment variable, `REACT_APP_ENDPOINT`.
Set the parameter before running the app.

```bash
[bash example]

export REACT_APP_ENDPOINT=http://localhost:5000
```

### Start the node server

```bash
$ yarn start

or

$ npm start
```

The command above starts the app in the development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

## URL

The app is live at:

- [https://morning-lowlands-77742.herokuapp.com/](https://morning-lowlands-77742.herokuapp.com/)

## Credits

Yoko Harada (@yokolet)

## License

The MIT License (MIT)

Copyright (c) 2019 Yoko Harada

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

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

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

repository: yokolet/transcript-app

repo_name: yokolet/transcript-app


text:
---
id: 292
title: squidclient -p 3128 -h squid_ip_address
date: 2009-04-24T01:03:26+00:00
author: edyliu
layout: post
guid: http://www.enlamp.cn/?p=292
permalink: /2009-04-squidclient-p-3128-h-squid_ip_address/
bttc_cache:
  -<PHONE_NUMBER>:0
  -<PHONE_NUMBER>:0
categories:
  - Linux_D
tags:
  - squid
---
squidclient -p 3128 -h squid\_ip\_address mgr:info@PASSWORD

get the squid manager infomation from it.

we should enable the client access cache manager

edit /etc/squid/{squid.conf, cachemgr.conf}

add your ip address to access. default manager can only access by localhost.

use a different port for cache manager

http\_port 80 defaultsite=want\_to\_access\_ip_address/hostname :80

http_port 8001 # this is for cache manager

gha_language: HTML


text:
# Attentive-Statistics-Pooling-for-Deep-Speaker-Embedding
This repo contains the implementation of the paper "Attentive Statistics Pooling for Deep Speaker Embedding" in Pytorch
The paper is published in Interspeech 2018
Paper: https://www.isca-speech.org/archive/Interspeech_2018/pdfs/0993.pdf

## Installation

I suggest you to install Anaconda3 in your system. First download Anancoda3 from https://docs.anaconda.com/anaconda/install/hashes/lin-3-64/
```bash
bash Anaconda2-2019.03-Linux-x86_64.sh
```
## Clone the repo
```bash
https://github.com/KrishnaDN/x-vector-pytorch.git
```
Once you install anaconda3 successfully, install required packges using requirements.txt
```bash
pip iinstall -r requirements.txt
```

## Data preperation
This step creates training and testing files. Currently we support TIMIT dataset and we plan to add other datasets in future.

```
python datasets.py --processed_data  /media/newhd/TIMIT --meta_store_path meta/
```
If you want to add your dataset, take a look at datasets.py code and modify the code accordingly

## Training
This steps starts training the X-vector model with Statistics attenive pooling.
```
python training_xvector_SAP.py --training_filepath meta/training.txt --evaluation_path meta/evaluation.txt
                             --input_dim 257 --num_classes 462 --batch_size 64 --use_gpu True --num_epochs 100

```

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
For any queries contact<EMAIL_ADDRESS>## License
[MIT](https://choosealicense.com/licenses/mit/)


text:
# sunnylog-http
Download production data from SMA Sunny Boy using the HTTP interface

Set the environment variables `SMA_BASEURL` e.g. `http://<IP_ADDRESS>` and `SMA_PASSWORD` to the password for `User` before running this program.

repository: linefeedse/sunnylog-http

repo_name: linefeedse/sunnylog-http


text:
Proposal for an app using a graph database of CommonAccord materials.

CommonAccord is a simple data model for legal text and transactions.  It is based on files of plain-text key/values.

It would be useful to have a more robust application.  This memo lays out some goals for a graph database app and some context.  First the context.

CommonAccord, combined with an access control mechanism such as UMA, and payment systems such as blockchain, can provide a broad solution to transacting, from routine payments to complex operations.  This can be interfaced to transaction systems that provide interfaces and additional functionality, such as Effacts's deal logic.

Currently, CommonAccord materials are kept as files of plain-text key/values.  These are managed using git, file management tools and editors.  Currently we treat this as the canonical version, and may continue to do so.

Objects are made by references from one file to another, by the name of the other file (the files are ordinarily local and have a common root, but references can also be made to a URL).  The principal function of the system is to allow transacting by referencing objects for persons, properties and a form of documentation. These render into a custom document, completed with appropriate information, based on a parser.  The current parser is was written rapidly, over a year ago, in perl, by Primavera De Filippi.

Files obviously have limitations for management of high volumes of transactions.  The object model of CommonAccord can be expressed as a graph and the rendering function can be, we think, done as a fixed query with parsing of the result.

Goals:

1. Import of Cmacc files, retaining all the properties and functionality of the key/values.  Perhaps also retaining loose text in them (TBD).

2. Export to Cmacc files.

3.  Rendering of Cmacc documents.  Using the paradigm of the current parser, with full compatibility.  Starting with a specified list, expand any variables in the value of a specified key, recursively.  Include in the list any referenced lists (expand the list). Must be lazy or at least semi-lazy.

We presume this requires two modules i) a query that returns the first occurrence of a key in an expanded list, and ii) a parser that substitutes the value associated with that key for the variable.  The parser should ideally be written as a module that can also be used in other apps, and could become _the_ standard for Cmacc rendering.

Some error-handling - notably - a list (file) is not found, or references of key/values/variables are circular.

Presentation in the current "views" of Doc and Print, and also in an Xray view. (For Xray, a video and precedent code are available, it is similar to the Doc view but requires care in keeping track of which list a key/value came from.)  The Xray view should be customizable by, for instance different presentation (CSS) of values from a particular list or from a particular time period, author, etc.

4. Edit with a number of functions - i) override a key/value by creating a new one and saving the result as a new list that references the existing one ii) include a new list, iii) comment or curate lists and key/values, iv) radio buttons of a collection of possible key/values (from search) saving the result as a key/value in a new list (the goal is that _all_ elements that result in a view are persisted as new lists of key/values).

5.  Search and reporting functions.  The result of queries for, e.g.: 1) from a list, provide a listing of includable keys, with filtering by various criteria, 2) from a specified list, all lists which reference the specified list (and recursively lists which reference those lists) with possibility of filtering, 3) a list of all the key/values that are actually used in document (this "flattening" of the list-inclusions can be useful for a counterparty to easily propose modifications and to maintain confidentiality of the object model when dealing with a partner).

6. Sharing parts of the database by access, and possibility of export of parts.

Link(s):

http://neo4j.com/graphgist/github-HazardJ%2Fgists%2F%2FDoc_Source_Graph.adoc/

repository: CommonAccord/Cmacc-Org

gha_language: CSS

repo_name: CommonAccord/Cmacc-Org


text:
# Node System Idle Time

A native node addon for obtaining system idle time in seconds.

## Install

To install it in your project run:

```bash
npm install --save @paulcbetts/system-idle-time
```

Or if you are using [`yarn`](https://yarnpkg.com/en/), then run:

```bash
yarn add @paulcbetts/system-idle-time
```

## Usage

* In your Node JS application import it as:

```js
var systemIdleTime = require('@paulcbetts/system-idle-time');
```

* Then you can use it calling:

```js
systemIdleTime.getIdleTime();
```

* The method `getIdleTime` will return the system idle time in milliseconds.

* For example, to print to the console the idle time every second you could do this:

```js
setInterval(function () {
  console.log('Idle time: ' + systemIdleTime.getIdleTime());
}, 1000);
```

## Usage in Electron

If you are building an Electron application you need to re-build the addon using Electron's version of Node.js.

If you are using [`electron-builder`](https://github.com/electron-userland/electron-builder) to build your app, it comes with `install-app-deps`. You can re-build the module with:

```bash
./node_modules/.bin/install-app-deps
```

If you are not using `electron-builder` you can install [`electron-rebuild`](https://github.com/electron/electron-rebuild):

```bash
npm install --save-dev electron-rebuild
```

And then re-build the addon with:

```bash
./node_modules/.bin/electron-rebuild
```

## References

OS implementations derived from the following resources:

* http://www.danandcheryl.com/2010/06/how-to-check-the-system-idle-time-using-cocoa
* https://github.com/jojobyte/idlerun
* https://github.com/rosedu/Pidgin/blob/master/pidgin/gtkidle.c

repository: dreisel/node-system-idle-time

repo_name: dreisel/node-system-idle-time


text:
# OpenXC Message Format Specification

Version: v0.6.0

This specification is a part of the [OpenXC platform][OpenXC].

An OpenXC vehicle interface sends generic vehicle data over one or more output
interfaces (e.g. USB or Bluetooth) as JSON or Protocol Buffers (protobuf).

## JSON

The JSON format is the most flexible and easiest to use. The format is fully
specified in the [JSON.mkd](JSON.mkd) file in this repository.
a more flexible option than binary, but is less compact and
therefore takes more bandwidth and processing power.

The JSON format is best for most developers, as it is fairly efficient and very
flexible.

## Binary (Protocol Buffers)

The binary format is encoded using [Google Protocol
Buffers](https://code.google.com/p/protobuf/). The format is specified in the
file [openxc.proto](openxc.proto). The descriptions of the messages can be foud
in the JSON specs - the binary format mirrors this.

The binary messages are published by the VI using the standard length-delimited
method (any protobuf library should support this).

The binary format is best if you need to maximize the amount of data that can be
sent from the VI, trading off flexibility for efficiency.

## Message Pack
MessagePack is an efficient binary serialization format. It lets you exchange data
among multiple languages like JSON, but it's faster and smaller. Small integers are
encoded into a single byte, and typical short strings require only one extra byte
in addition to the strings themselves

For protocol specification visit:
https://github.com/msgpack/msgpack/blob/master/spec.md

We are using the following lib:
https://github.com/camgunz/cmp

MessagePack provides a binary alternative to ProtoBuf. There are pros & cons to each
so you can decide what works best for your project.

## Trace File Format

An OpenXC vehicle trace file is a plaintext file that contains JSON objects,
separated by newlines (which may be either `\r\n` or `\n`, depending on the
platform the trace file was recorded).

The first line may be a metadata object, although this is optional:

```
{"metadata": {
    "version": "v3.0",
    "vehicle_interface_id": "7ABF",
    "vehicle": {
        "make": "Ford",
        "model": "Mustang",
        "trim": "V6 Premium",
        "year": 2013
    },
    "description": "highway drive to work",
    "driver_name": "TJ Giuli",
    "vehicle_id": "17N1039247929"
}
```

The following lines are OpenXC messages with a `timestamp` field added, e.g.:

    {"timestamp":<PHONE_NUMBER>.285525, "name": "steering_wheel_angle", "value": 45}

The timestamp is in [UNIX time](http://en.wikipedia.org/wiki/Unix_time)
(i.e. seconds since the UNIX epoch, 00:00:00 UTC, 1/1/1970).

## Official Signals

These signal names are a part of the OpenXC specification, although some
manufacturers may support custom message names.

* steering_wheel_angle
    * numerical, -600 to +600 degrees
    * 10Hz
* torque_at_transmission
    * numerical, -500 to 1500 Nm
    * 10Hz
* engine_speed
    * numerical, 0 to 16382 RPM
    * 10Hz
* vehicle_speed
    * numerical, 0 to 655 km/h (this will be positive even if going in reverse
      as it's not a velocity, although you can use the gear status to figure out
      direction)
    * 10Hz
* accelerator_pedal_position
    * percentage
    * 10Hz
* parking_brake_status
    * boolean, (true == brake engaged)
    * 1Hz, but sent immediately on change
* brake_pedal_status
    * boolean (True == pedal pressed)
    * 1Hz, but sent immediately on change
* transmission_gear_position
    * states: first, second, third, fourth, fifth, sixth, seventh, eighth,
      ninth, tenth, reverse, neutral
    * 1Hz, but sent immediately on change
* gear_lever_position
    * states: neutral, park, reverse, drive, sport, low, first, second, third,
      fourth, fifth, sixth, seventh, eighth, ninth, tenth
    * 1Hz, but sent immediately on change
* odometer
    * Numerical, km
        0 to 16777214.000 km, with about .2m resolution
    * 10Hz
* ignition_status
    * states: off, accessory, run, start
    * 1Hz, but sent immediately on change
* fuel_level
    * percentage
    * 2Hz
* fuel_consumed_since_restart
    * numerical, 0 -<PHONE_NUMBER>.0 L (this goes to 0 every time the vehicle
      restarts, like a trip meter)
    * 10Hz
* door_status
    * Value is State: driver, passenger, rear_left, rear_right.
    * Event is boolean: true == ajar
    * 1Hz, but sent immediately on change
* headlamp_status
    * boolean, true is on
    * 1Hz, but sent immediately on change
* high_beam_status
    * boolean, true is on
    * 1Hz, but sent immediately on change
* windshield_wiper_status
    * boolean, true is on
    * 1Hz, but sent immediately on change
* latitude
    * numerical, -89.0 to 89.0 degrees with standard GPS accuracy
    * 1Hz
* longitude
    * numerical, -179.0 to 179.0 degrees with standard GPS accuracy
    * 1Hz

## Signals from Diagnostic Messages

This set of signals is often retreived from OBD-II requests. The units can be
found in the [OBD-II standard](http://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_01).

* engine_load
* engine_coolant_temperature
* barometric_pressure
* commanded_throttle_position
* throttle_position
* fuel_level
* intake_air_temperature
* intake_manifold_pressure
* running_time
* fuel_pressure
* mass_airflow
* accelerator_pedal_position
* ethanol_fuel_percentage
* engine_oil_temperature
* engine_torque

License
=======

Copyright (c) 2012-2014 Ford Motor Company

Licensed under the BSD license.

[OpenXC]: http://openxcplatform.com

repository: bedarkarshantanu/agl-services

repo_name: bedarkarshantanu/agl-services


text:
---
layout:     post
title:      "Homework 1"
date:       2016-09-17 6:00:00
author:     "Java Course Staff"
header-img: "img/post1.jpg"
header-mask: 0.3
catalog:    true
---

## Homework 1
Topic: Multithread Programming & Debugging

**Due: (GMT+8) 2016-10-09 09:00 SUN**

-----------

## Java Debug Hacks

#### Material
First, please read the tutorial of debug hacks. Link: [Java Debug Hacks (CHN)](https://iss-java.github.io/2016/09/16/Java-Debug-Hacks/)

And **clone** the code to practice with: [code repo](https://github.com/iss-java/DebugHack.git)

#### Objectives
**Objective A**

> Practice _adding watchpoint_, _modifying variable_, _conditional breakpoint_, _switching threads_. Note that if you are debugging the multithreaded version of code, you should combine conditional breakpoint and thread switching together. This will help you get an experience of thread execution.

**Objective B**

> Answer: in function `quickMultiply`, what does a `CyclicBarrier` serve for? Why the barrier value is 5 instead of 4? What's the consequence of changing it into 4?

#### Submission

For Objective A, you are expected to make a screenshot for each debug hack, and give a short explanation of **your** purpose for each one.

For both objectives, you can write them into a single document or two(doc, docx, pdf, markdown). **Append** your document(s) to your "Doubly-linked list" homework.

## Doubly Linked List

#### Materials

The material you need is the source code of a uni-threaded linked list. [code repo](https://github.com/iss-java/DoublyLinkedList.git).

#### Readings

You are expected to read about how the following things are done in Java.
- create a thread
- start a thread
- protect critical data

At least, you have to master the usage of `Mutex`. If you apply an advanced synchronization mechanism, such as
a `reader-writer lock`, to improve the degree of concurrency - you will get extra credits.

建议阅读《Java编程思想》第四版中Concurrency（并发）那一章。我们也推出了多线程编程的入门教程，[传送门](https://iss-java.github.io/2016/09/27/Thread-Tutorial/)。

#### Requirements

**Requirement A**

_ Updated at 2016-09-29 >\>\> _

> Write a test case in `Main_A.main()` which starts multiple threads to read/write the same node. **不需要再给getter或setter单独上锁。** Ensure that the `data` field of a `Node` will not be corrupted if read/written by multiple threads.

写代码的时候，单独的get/set往往不是一个完整的业务，一个完整的业务是get-compute-set。上锁要上给一个完整的业务，因此给get或set单独上锁是没有意义的。

_ Updated at 2016-09-29 <\<\< _

Hint for Requirement A: You can create multiple threads to increase/decrease the value of `data`. If the final result of `data` is mathematically correct, then your program must be correct.

**Requirement B**

> Refactor `MyList` with a locking mechanism you like. Ensure that the data structure of the doubly-linked list will not be corrupted if some nodes are inserted/removed simultaneously by multiple threads. Also, write a test case in `Main_B.main()` which starts multiple threads to insert into / remove from the same list.

Hint for Requirement B: Traverse and back-traverse your list to check whether or not your list is broken.

_ Updated at 2016-10-03 >\>\> _

如果大家想以**细化锁粒度**的方式来提高并发度，可以放宽锁的限制，任何代码段都可以上锁。

_ Updated at 2016-10-03 <\<\< _

**Requirement C**

> Refactor `Node` and `MyList` to ensure that insertion and removal can only be applied to nodes that belongs to the caller linked list.

#### Submission

Push your improved version to **your own** Git repo. This repo should be **private** and enroll us TAs as **collaborators**. Read the comments in the code carefully, and don't modify the original directory structure and the class structures. However, you can rename the project root folder and add your own functions, packages, classes and data files as you like.


text:
---
title: "reload_operating_system.rb"
description: "reload_operating_system.rb"
date: "2017-11-23"
classes:
    - "SoftLayer_Virtual_Guest"
    - "SoftLayer_Container_Hardware_Server_Configuration"
tags:
    - "virtualservers"
---

```
# Reloads current operating system configuration.
#
# This service has a confirmation protocol for proceeding with the reload. To proceed with the reload
# without confirmation, simply pass in 'FORCE' as the token parameter. To proceed with the reload with confirmation,
# simply call the service with no parameter. A token string will be returned by this service.
# The token will remain active for 10 minutes. Use this token as the parameter
# to confirm that a reload is to be performed for the server.
# As a precaution, we strongly recommend backing up all data before reloading the operating system.
# The reload will format the primary disk and will reconfigure the computing instance
# to the current specifications on record.
# If reloading from an image template, we recommend first getting the list
# of valid private block device template groups, by calling the getOperatingSystemReloadImages method.
#
# Important manual pages:
# http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/reloadOperatingSystem
# http://sldn.softlayer.com/reference/datatypes/SoftLayer_Container_Hardware_Server_Configuration
#
# License: http://sldn.softlayer.com/article/License
# Author: SoftLayer Technologies, Inc<EMAIL_ADDRESS>
require 'rubygems'
require 'softlayer_api'
require 'awesome_print'

virtual_guest_id = 6032256

SL_API_USERNAME = 'set me'
SL_API_KEY = 'set me'

client = SoftLayer::Client.new(username: SL_API_USERNAME,
                               api_key: SL_API_KEY)

virtual_guest_service = client['SoftLayer_Virtual_Guest']

begin

  result = virtual_guest_service.object_with_id(virtual_guest_id)
                                .reloadOperatingSystem
  ap result
rescue StandardError => e
  p 'Error when executing the script...'
  $stdout.print(e.inspect)
end

```

gha_license_id: NOASSERTION


text:
# Lighthouse plugin

This plugin adds commands to manage [Lighthouse](https://lighthouseapp.com/).

To use it, add `lighthouse` to the plugins array in your zshrc file:

```zsh
plugins=(... lighthouse)
```

## Commands

* `open_lighthouse_ticket <issue>` (alias: `lho`):

  Opens the URL to the issue passed as an argument. To use it, add a `.lighthouse-url`
  file in your directory with the URL to the individual project.

  Example:

  ```console
  $ cat .lighthouse-url
  https://rails.lighthouseapp.com/projects/8994

  $ lho 23
  Opening ticket #23
  # The browser goes to https://rails.lighthouseapp.com/projects/8994/tickets/23
  ```

See a demo: http://screencast.com/t/ZDgwNDUwNT

repository: ohmyzsh/ohmyzsh

repo_name: ohmyzsh/ohmyzsh


text:
---
layout: default
---
# cqrs_ICommandHandlerResolver interface

: Resolver Handler for a Command

**Author:** : Bill Anderson
---
## Methods
### `resolve(cqrs_ICommand command)` → `cqrs_ICommandHandler`
---

gha_language: Apex


text:
# Disk Exclusion

Disk Exclusion allows the user to exclude data volumes from the backups Polaris creates when protecting Azure VMs. Once enabled for a specific volume, future snapshote of that VM will not contain the excluded volume unless the exclusion is removed.

{% hint style="info" %}
**Trail Map:**

Disk exclusion can prevent customers from incurring unnecessary costs when protecting certain types of VMs. As an example, imagine an application deployed to a VM that is backed up indepent of the VM itself. You still want to protect the application server, but capturing the data volumes housing the application data itself would be a waste of resources. Disk Exclusion allows you to achieve your objective in this scenario.
{% endhint %}

## Configuring Disk Exclusion

Open the ellipsis (`...`) menu next to the **Manage Protection** button. Select the **Exclude Disk**` menu item. The Exclude managed disks window appears.

Here you can select managed disks to be excluded from any snapshotes created for this VM. If you hover over the **OS Disk** on this VM you will see that OS Disks cannot be excluded from VM level backups, only Data Disks can be excluded.

Click the `X` in the top right corner of the Exclude managed disks window to close it.

repository: trinity-team/camp-rubrik-cnp-microsoft

repo_name: trinity-team/camp-rubrik-cnp-microsoft


text:
# DELPH-IN formats in RDF

DELPHIN-RDF is a plugin for [pydelphin](https://github.com/delph-in/pydelphin/) for representing textual based semantics as RDF graphs. Here we discuss how DELPH-IN formats can be represented in RDF.  This can be considered a continuation of some discussion started [here](http://moin.delph-in.net/WeSearch/Rdf).

The [pydelphin](https://pypi.org/project/PyDelphin/) and [rdflib](https://pypi.org/project/rdflib/) libraries are required.

## Features

DELPHIN-RDF presents the following dependencies:
- `delphin.rdf`: the main module responsible for mrs/eds/dmrs parsing to RDF.
- `delphin.cli`: pydelphin standard cli path. Here are modules describing the delphin subcommand. See [delphin.cli](https://pydelphin.readthedocs.io/en/latest/api/delphin.cli.html)

Besides that, in `tests` there are use examples. In `doc` there are some references. In `vocabularies` there is the modelling of the semantic representations in RDF.

## Command Line Interface

All the modules in this package can be imported and used as a Python module, but DELPHIN-RDF declares `profile-to-rdf`, a delphin subcommand of the PyDelphin CLI.
This subcommand requires the path to the profile to serialize as argument. There are optional arguments, such as the format of the output (`-f`), the representation to serialize (`--to`), the prefix of the URIs in the RDF (`-p`) and the name of the output file (`-o`).

## Python module

To use the function of the transformation as a Python module, it's only needed to import `delphin.rdf`, which exports three main functions: `mrs_to_rdf`, `dmrs_to_rdf` and `eds_to_rdf`. They operate on a [ConjunctiveGraph](https://rdflib.readthedocs.io/en/stable/apidocs/rdflib.html#rdflib.graph.ConjunctiveGraph) RDFLib object, creating named graphs for each instance in the context of this conjunctive graph, which is the graph that has all quads of a specific store. For example, to serialize a profile to DMRS-RDF, we can do
```python
import delphin.rdf as drdf
from delphin import itsdb, tsql
from delphin.dmrs import from_mrs as dmrs_from_mrs
from delphin.codecs.simpledmrs import decode
from rdflib.graph import Graph, ConjunctiveGraph
from rdflib import URIRef, Namespace, Literal RDF, RDFS

path_to_profile = "./erg/trunk/tsdb/gold/mrs"
ts = itsdb.TestSuite(path_to_profile)
defaultGraph = ConjunctiveGraph()
ERG = Namespace("http://www.delph-in.net/schema/erg#")
DELPH = Namespace("http://www.delph-in.net/schema/")
POS = Namespace("http://www.delph-in.net/schema/pos#")
DMRS = Namespace("http://www.delph-in.net/schema/dmrs#")
defaultGraph.bind("erg", ERG)
defaultGraph.bind("delph", DELPH)
defaultGraph.bind("pos", POS)
defaultGraph.bind("dmrs", DMRS)
prefix = "http://example.com"
PROFILE = URIRef(prefix)
defaultGraph.add((PROFILE, RDF.type, DELPH.Profile))

for (parse_id, result_id, text, mrs_string) in tsql.select('parse-id result-id i-input mrs', ts):
  obj = dmrs_from_mrs(decode(mrs_string))
  ITEM = URIRef(f"{prefix}/{parse_id}")
  RESULT = URIRef(f"{prefix}/{parse_id}/{result_id}")
  DMRSI = URIRef(f"{prefix}/{parse_id}/{result_id}/dmrs")

  defaultGraph.add((ITEM, RDF.type, DELPH.Item))
  defaultGraph.add((RESULT, RDF.type, DELPH.Result))
  defaultGraph.add((MRSI, RDF.type, DMRS.DMRS))

  defaultGraph.add((ITEM, DELPH.hasText, Literal(text)))

  defaultGraph.add((PROFILE, DELPH.hasItem, ITEM))
  defaultGraph.add((ITEM, DELPH.hasResult, RESULT))
  defaultGraph.add((RESULT, DELPH.hasDMRS, DMRSI))

  drdf.dmrs_to_rdf(dmrs_from_mrs(simplemrs.decode(mrs_string)),
                   DMRSI,
                   defaultGraph) #inplace, change defaultGraph

defaultGraph.serialize("./dmrs-erg-gold.nq", format="nquads")
```

## Development

One may be able to install delphin-rdf in developer mode cloning this repo and running
```bash
$ pip install -e /path/to/delphin-rdf
```
You're able to remove the package simply by running
```bash
$ pip uninstall delphin-rdf
```
It's advised to install it using a python virtual environment.

repository: own-pt/delphin-rdf

repo_name: own-pt/delphin-rdf


text:
The demon’s spellcasting ability is Charisma
(spell save DC 15, +7 to hit with spell attacks). The demon can innately
cast the following spells, requiring no material components:

* At will: darkness, detect evil and good, shatter

* 3/day each: confusion, hold person

***Magic Resistance.*** The demon has advantage on saving throws against
spells and other magical effects.

***Magic Weapons.*** The demon’s weapon attacks are magical.

### Actions

***Multiattack.*** The demon makes three attacks: one with its bite and two
with its ranseur. It can attack with its tongue instead of making a bite attack.

***Bite.*** Melee Weapon Attack: +10 to hit, reach 5 ft., one target. Hit: 17 (2d10 + 6) piercing damage.

***Ranseur.*** Melee Weapon Attack: +10 to hit, reach 10 ft., one target. Hit: 20 (4d6 + 6) piercing damage.

***Tongue.*** Melee Weapon Attack: +10 to hit, reach 10 ft., one target. Hit: 15 (2d8 + 6) slashing damage, and the target is grappled (escape DC 16).
Until this grapple ends, the target is restrained, and the demon cannot
attack with its tongue.

***Combustible Spittle (Recharge 5–6).*** The demon spits a line of acid in a
30-foot line that is 5 feet wide. Each creature in that line must make a DC
17 Dexterity saving throw, taking 27 (6d8) acid damage on a failed save,
or half as much on a successful one. At the start of the demon’s next turn,
the acid ignites and any targets hit by it burst into flames, taking 10 (3d6)
fire damage per round until extinguished.


text:
## Resubmission
This is a resubmission. In this version I have:

* Removed 2 invalid URLs and changed 1 invalid URL to its canonical form.
* Description changed to reflect that the steps refer to steps from the recipes package and listing the methods included.
* Replaced dontrun{} with donttest{}
* Package names put in single quotes in Title and Description.

## Test environments
* local OS X install, R 3.5.0
* ubuntu 14.04 (on travis-ci), R 3.5.0
* win-builder (devel and release)

## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.

repository: kant/textrecipes

repo_name: kant/textrecipes


text:
# Data Nexus

Data Nexus is a Node JS API server that hosts open source datasets.

## Usage

Run the application with docker
```sh
docker-compose up
```

To check if the instance is running
```sh
curl http://localhost:5000
```

#### Upload data
POST <http://localhost:5000/api/v1/datasets>
```json
{
  "name": "land-elevation",
  "description": "A Land Elevation CSV Format",
  "created_at": "2019-10-15T03:35:53.147Z",
  "updated_at": "2019-10-15T03:35:53.148Z",
  "collection_type": "terrain",
  "data": [
    {
      "index": "6",
      "value": "57",
      "geometry": "POLYGON ((121.0744642194859 14.62328312054317,<PHONE_NUMBER>194859 14.62418244090689,<PHONE_NUMBER>236556 14.62418244090689,<PHONE_NUMBER>236556 14.62328312054317,<PHONE_NUMBER>194859 14.62328312054317))"
    },
    {
      "index": "7",
      "value": "55",
      "geometry": "POLYGON ((121.0744642194859 14.62418244090689,<PHONE_NUMBER>194859 14.62508176127062,<PHONE_NUMBER>236556 14.62508176127062,<PHONE_NUMBER>236556 14.62418244090689,<PHONE_NUMBER>194859 14.62418244090689))"
      },
  ]
}
```

#### Get all dataset endpoints

GET <http://localhost:5000/api/v1/datasets>
```json
{
  "collection_endpoints": [
    "/api/v1/terrain",
    "/api/v1/water"
  ]
}
```

#### Get datasets per collection type

GET <http://localhost:5000/api/v1/:collection_type>
```json
{
  "datasets": [
    {
      "name": "land-elevation",
      "endpoint": "/api/v1/terrain/land-elevation",
      "created_at": "2019-10-15T03:29:33.950Z",
      "updated_at": "2019-10-15T03:29:33.982Z"
    },
    {
      "name": "land-contour",
      "endpoint": "/api/v1/terrain/contour",
      "created_at": "2019-10-15T03:35:53.147Z",
      "updated_at": "2019-10-15T03:35:53.148Z"
    }
  ]
}
```

#### Get dataset specific dataset from collection type

GET <http://localhost:5000/api/v1/:collection_type/:name>
```json
{
  "name": "land-elevation",
  "description": "A Land Elevation CSV Format",
  "created_at": "2019-10-15T03:35:53.147Z",
  "updated_at": "2019-10-15T03:35:53.148Z",
  "collection_type": "terrain",
  "data": [
    {
      "index": "6",
      "value": "57",
      "geometry": "POLYGON ((121.0744642194859 14.62328312054317,<PHONE_NUMBER>194859 14.62418244090689,<PHONE_NUMBER>236556 14.62418244090689,<PHONE_NUMBER>236556 14.62328312054317,<PHONE_NUMBER>194859 14.62328312054317))"
    },
    {
      "index": "7",
      "value": "55",
      "geometry": "POLYGON ((121.0744642194859 14.62418244090689,<PHONE_NUMBER>194859 14.62508176127062,<PHONE_NUMBER>236556 14.62508176127062,<PHONE_NUMBER>236556 14.62418244090689,<PHONE_NUMBER>194859 14.62418244090689))"
      },
  ]
}
```

Check out how the endpoints work through postman!

[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/20df48838651506d535f)

###

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

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

repository: Giologic/data-nexus

repo_name: Giologic/data-nexus


text:
# luaunbound

This is a binding to [libunbound](https://unbound.net/) for
[Lua](https://www.lua.org/).

## Downloading

Source can be downloaded with Mercurial from
<https://code.zash.se/luaunbound/>.

Signed releases can be found at <https://code.zash.se/dl/luaunbound/>.

It is also available from [luarocks](https://luarocks.org/) and can be
installed by

    luarocks install luaunbound

## Building

    make

## API

### Creating a new context

The lunbound module has a single function, `new()` for creating a new
context. It takes a table with configuration as single optional
argument. If no argument is given the `config` table on the module will
be used.

### Config options

`async`
:   Uses threads if `true` or forks a process if `false`.

`hoststxt`
:   Path to `hosts.txt` file. If set to `true` then the default system
    `hosts.txt` file.

`resolvconf`
:   Path to resolver configuration. If set to `true` then the default
    system resolvers are used. Otherwise root hints are used.

`forward`
:   IP address of an upstream resolver(s) to use, a string or array of
    strings.

`trusted`
:   DNSSEC root trust anchors, a string or array of strings.

`trustfile`
:   Path to a file containing DNSSEC root trust anchors. Can be
    specified at compile-time (recommended for distributors).

`options`
:   Table allowing arbitrary settings from `unbound.conf`.

The built-in defaults are as follows:

``` lua
local resolver = require"luaunbound".new({
    async = true;
    hoststxt = true;
    resolvconf = true;
});
```

### Context methods

`ctx:resolve(name, type, class)`
:   Resolves name and returns a table with results.

`ctx:resolve_async(callback, name, type, class)`
:   Starts a query in async mode. Results are passed to the callback
    when the query is completed.

`ctx:fd()`
:   Returns a file descriptor that will appear readable when there are
    results available.

`ctx:process()`
:   Calls callbacks for all completed queries.

`ctx:wait()`
:   Blocks until all outstanding queries are completed and then calls
    callbacks for all completed queries.

`ctx:poll()`
:   Returns `true` if new results are available.

### Result table

The result table closely resembles libunbounds result struct.

`qname`, `qtype` and `qclass`
:   Same as arguments to resolve methods.

`canonname`
:   The canonical name if the queried name was a CNAME. Note that full
    CNAME chasing is done by libunbound.

`rcode`, `havedata` and `nxdomain`
:   The DNS status code and flags indicating if any data is available.

`secure` and `bogus`

:   Indicates DNSSEC validation status. There are three possible
    combinations:

    -   Results are signed and validation succeeded, `secure` will be
        `true`.
    -   Results are signed but validation failed, `secure` will be
        `false` and `bogus` will be a string with an error message.
    -   The results were not signed. `secure` will be `false` and
        `bogus` will be `nil`.

The actual result data will be in the array part of the result table, in
the form of binary strings. It is your job to parse these into whatever
form you want.

repository: Zash/lua-unbound

gha_language: C

repo_name: Zash/lua-unbound


text:
---
layout: post
title:  "Input Devices"
date:   2017-04-26 09:25:21 -0500
categories: jekyll update
---

For Sarah and I's input device, we used Eagle to design and trace a circuit that connects to our Satshakit (Arduino Uno Clone) to read a temperature sensor, which is a variable resistor that works as a voltage divider in order to send varying voltages to the Arduino serial monitor.  These varying voltages are read as temperature levels which you can change the range of voltages on.

**Components Needed:**

>Arduino Clone (Satshakit) Board

>Breadboard

>7 Male Pin Headers

>X3 499Ω Resistors

>X3 LEDs (Red, Orange, & Blue)

>Temperature Sensor (LM35)

**Designing the Traces:**

>HEADER PIN 1 - Pin one (the pin on the left) of the temperature sensor goes to 5v

>HEADER PIN 2 - Pin two (the pin in the middle) of the temperature sensor goes to analog pin A2

>HEADER PIN 3 - Pin three (the pin on the right) of the temperature sensor goes to ground

>HEADER PIN 4 - Red LED through one of the resistors, and ground

>HEADER PIN 5 - Orange LED though a resistor, and ground

>HEADER PIN 6 - Blue LED through a resistor, and ground

>HEADER PIN 7 - GROUND (For LEDs/Resistors)

**Coding**

The basic understanding when making the code was first assigning all of the individual arduino pins to the LEDS/Temp Sensor, and then having a series HIGHS/LOWS listed to light up the specific LED per range of temperatures, along with a quick message stating cold, fine, and hot.

I was researching for good resources to start on a temperature-reading program. I found an excellent page to start me in the right direction when it came to making the SMD schematic along with the program itself, which I had to alter slightly. See source here: [Arduino LED Temperature Indicator] [tempsense]

[tempsense]: http://www.instructables.com/id/Arduino-LED-Temperature-Indicator/

The program is set so that a **BLUE LED** will turn on when temperature is below **75 degrees**, an **ORANGE LED** turn on when it's **73-80 degrees**, and  a **RED LED** turn on when it's above **80 degrees**. Below are the connections Sarah and I made, followed by the program we used to run the input device using Arduino IDE and it's built in serial monitor:

**Problems Encountered:**

This was actually my second attempt on a Temp sensor circuit. The original one was using a SMD temperature sensor with 1 indicator light displaying with certain brightness. I decided to make it simplier with a more common (through-hole) Temp sensor that I can assign individual LEDs to for easier programming.

# **Finished Product:**

# **Digital Files:**

Temperature Sensor.sch

Temperature Sensor.brd

Temperature Sensor Code.ino


text:
# openartbrowser

# Table of contents

- [Overview](#overview)
- [Frontend](#frontend)

## Overview

openArtBrowser invites you to browse through the world of arts, enjoy beautiful artworks and learn interesting things. We provide paintings, drawings and sculptures all over the world and from many periods.

This project contains:

- Scripts to crawl relevant data about artworks, artists, genres, locations, materials, motifs and movements from Wikidata

- Scripts to preprocess the crawled data

- Angular frontent

## Frontend

To start the frontend:

- download and install Node.js.
- open a terminal and install Angular CLI globally: `npm install -g @angular/cli`

- for development mode: `ng serve` from artbrowser/app folder, app will be available in a browser on localhost:4200

- for deployment: `ng build --prod` on server and copy files to target directory

Frontend configuration:

- default elasticSearch url is 'http://openartbrowser.org/api/_search'

- To change elasticSearch url to another server, change the above url in ‚app/src/app/core/services/data.service.ts‘

repository: waldenn/openartbrowser

repo_name: waldenn/openartbrowser


text:
# 🤰 How Far Along ?

[![MIT License](https://img.shields.io/github/license/franky47/how-far-along.svg?color=blue)](https://github.com/franky47/how-far-along/blob/next/LICENSE)
[![Continuous Integration](https://github.com/franky47/how-far-along/workflows/Continuous%20Integration/badge.svg?branch=next)](https://github.com/franky47/how-far-along/actions)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=franky47/how-far-along)](https://dependabot.com)

Pregnancy progress tracker, made with Next.js and ChakraUI.

Privacy policy: The due date is kept in the hash portion of the URL,
allowing you to share it or bookmark it without the server ever seeing this
personal information.

## License

[MIT](https://github.com/franky47/how-far-along/blob/next/LICENSE) - Made with ❤ by [François Best](https://francoisbest.com).

branch_name: refs/heads/next

gha_language: TypeScript


text:
# Dotfiles

Dotfiles I have been grooming for quite a while. It has gone through several iterations due to changes in how I manage them.

Currently, I am using [`rcm`](https://github.com/thoughtbot/rcm).

# Install

**Prerequisites**

* Homebrew
* git

**Actions**

    $ cd ~
    $ git clone https://github.com/mattdbridges/dotfiles.git
    $ brew tap thoughtbot/formulae
    $ brew install rcm
    $ rcup -d dotfiles -x README.md -x LICENSE -x Brewfile -x com.googlecode.iterm2.plist


text:
---
description: Essentials on OAuth integration.
---

# Using OAuth

{% hint style="info" %}
See [Identity.Server.Sample.Dotnet](https://github.com/EG-BRS/Identity.Server.Sample.Dotnet/tree/master/) for a sample project.
{% endhint %}

Please refer to the github repository for the code in its entirety. This sample is written in C\# .NET core 2 and can be run via Docker.

First off we need to add the OpenId middleware to authentication configuration in `startup.cs`:

{% code title="startup.cs" %}
```csharp
 .AddOpenIdConnect(AuthenticationConstants.XenaOidcAuthenticationScheme, options =>
    {
        options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
        options.ResponseType = AuthenticationConstants.OidcResponseType;

        options.SignedOutRedirectUri = "/Home/LogoutRedirect";

        options.Authority = authConfiguration.Authority;
        options.ClientId = authConfiguration.ClientId;
        options.ClientSecret = authConfiguration.ClientSecret;

        options.SaveTokens = true;
        options.RequireHttpsMetadata = false;
        options.GetClaimsFromUserInfoEndpoint = true;

        options.Scope.Add("profile");
        options.Scope.Add("testapi");
        options.Scope.Add("offline_access");

        options.ClaimActions.MapJsonKey(JwtClaimTypes.PreferredUserName, JwtClaimTypes.PreferredUserName);
    }
```
{% endcode %}

All the configuration is set in `appsettings.Development.json`

When user hit any method/controller with `[Authorize]` attribute he will be forced to authenticate. In our examples default challenge scheme is Xena. The user will be transfered to login page and after correct login will return to your app with tokens.

To communicate with the Xena API you will need to send access\_token with each call in headers.

Application `access_token` lifetime is set to 60 minutes but cookie for your app can be different. For better user experience the app can use `refresh_token` to get new `access_tokens`.

In the sample we use automatic silent renew middleware that checks and refreshes the token if needed with each call.

## API call

In sample in `XenaService.cs` we show three API calls. The user can get data about his fiscal, Xena membership and apps that he is subscribed to.

{% code title="XenaService.cs" %}
```csharp
[Authorize]
public async Task<IActionResult> ApiExample()
{
    HttpClient client = await SetupClientWithToken();
    var result = await client.GetStringAsync($"{_apiEndpoints.Xena}/User/FiscalSetup?forceNoPaging=true");
    return result;
}
```
{% endcode %}

repository: EG-BRS/DevSite

repo_name: EG-BRS/DevSite


text:
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
For example a piece of code that can be pasted into a micropython console.

**Details (please complete the following information):**
 - Device board: [e.g. ESP32]
 - Micropython version: [e.g. 1.12, name or URL fork]
 - Library version [e.g. 0.1]


text:
---
layout: post
permalink: /storing-data-in-the-browser-with-the-html5-local-storage-api/
title: Storing data in the browser with the HTML5 localStorage API
path: 2013-03-14-storing-data-in-the-browser-with-the-html5-local-storage-api.md
tags:
- LocalStorage
- Chrome
- HTML5
- Performance
---

HTML5 localStorage is an HTML5 API that allows us to save string data in the browser. localStorage is part of the web storage specification, it also has a sister called sessionStorage which is slightly different - but very similar. localStorage stores the data and has no expiration - it's persistent, whereas sessionStorage is limited to the session only, meaning when you close your browser - it's gone. In this tutorial we're going to create a small localStorage app that autosaves your data in the browser.

  Demo
  Download

### JavaScript detection
Before doing anything, it's probably wise to detect whether the browser supports localStorage (this even includes sessionStorage):

{% highlight javascript %}
// localStorage detection
function supportsLocalStorage() {
  return typeof(Storage)!== 'undefined';
}

// Run the support check
if (!supportsLocalStorage()) {
  // No HTML5 localStorage Support
} else {
  // HTML5 localStorage Support
}
{% endhighlight %}

### Setting, getting and clearing
localStorage comes with a few different JavaScript methods, let's look at some:

For setting data, we need to do the following:

{% highlight javascript %}
localStorage.setItem('dataName', 'somevalue');
{% endhighlight %}

For getting our data:

{% highlight javascript %}
localStorage.getItem('dataName');
{% endhighlight %}

For removing the data:

{% highlight javascript %}
localStorage.removeItem('dataName');
{% endhighlight %}

And for clearing the entire localStorage (not just the individual item):

{% highlight javascript %}
localStorage.clear();
{% endhighlight %}

### HTML
Let's create some HTML for testing localStorage:

{% highlight html %}
<textarea class="localstorage"></textarea>
<button class="clear">Clear localStorage</button>
<button class="empty">Empty localStorage</button>
{% endhighlight %}

We then need to hook into our textarea to start saving the data:

{% highlight javascript %}
var demo = document.querySelector('.localstorage');
{% endhighlight %}

We can then start saving data with it by hooking into the textarea's value:

{% highlight javascript %}
localStorage.setItem('autosave', demo.value);
{% endhighlight %}

The above sets an item called 'autosave' which then uses the value of the textarea. But this won't work or update itself, so what we need to do is set an interval to update it every second (1000). This can be done like so:

{% highlight javascript %}
setInterval(function() {
  localStorage.setItem('autosave', demo.value);
}, 1000);
{% endhighlight %}

### Catching errors
localStorage has a quota in which you can hit and no longer store further data, so we need to clear it. I'm not sure on the exact figure, but I've read it's around 5MB of data storage for Chrome, FireFox, Opera, and 10MB for Internet Explorer, which beats a Cookie handsdown at just 4KB quota. To catch any errors and alert the user, we need to use the 'try' and 'catch' methods:

{% highlight javascript %}
try {
  setInterval(function() {
    localStorage.setItem('autosave', demo.value);
  }, 1000);
} catch (e) {
  if (e == QUOTA_EXCEEDED_ERR) {
    alert('Quota exceeded!');
  }
}
{% endhighlight %}

You can see I've added the 'setInterval' inside the 'try' section, which it will keep updating the data every second until it hits the quota limit. It would be good practice when developing to clear the localStorage data after the required actions are completed (such as storing form data).

### Clearing localStorage
There are two ways we can rid the browser of localStorage, using the aforementioned 'setItem' and 'getItem' methods:

{% highlight javascript %}
localStorage.removeItem('autosave'); // Remove the autosave
localStorage.clear(); // Clear all data
{% endhighlight %}

### Running a localStorage script
Putting the above together, we can create a really simple localStorage app that we can type into, it saves our data periodically (once a second) and also the option to wipe the data altogether, or just remove the item itself. Let's go through it, comments are coded inline:

{% highlight javascript %}
(function() {

  // Grab the textarea
  var demo = document.querySelector('.localstorage');

  // localStorage feature detect
  function supportsLocalStorage() {
    return typeof(Storage)!== 'undefined';
  }

  // Run the detection with inverted expression
  if (!supportsLocalStorage()) {

    // Change the value to inform the user of no support
    demo.value = 'No HTML5 localStorage support, soz.';

  } else {

    // Try this
    try {

      // Set the interval and autosave every second
      setInterval(function() {
        localStorage.setItem('autosave', demo.value);
      }, 1000);

    } catch (e) {

      // If any errors, catch and alert the user
      if (e == QUOTA_EXCEEDED_ERR) {
        alert('Quota exceeded!');
      }
    }

    // If there is data available
    if (localStorage.getItem('autosave')) {

      // Retrieve the item
      demo.value = localStorage.getItem('autosave');
    }

    // Clear button, onclick handler
    document.querySelector('.clear').onclick = function() {
      demo.value = '';
      localStorage.removeItem('autosave');
    };

    // Empty button, onclick handler
    document.querySelector('.empty').onclick = function() {
      demo.value = '';
      localStorage.clear();
    };

  }

})();
{% endhighlight %}

The above function is a really simple usage of the localStorage API, but you can see it's potential. If you visit the demo, type anything you want and providing your browser supports HTML5 localStorage, you can refresh the page as much as you want, close the browser and come back to it - and it'll still be there. If your browser doesn't support it, you'll get a note saying so.

### Browser support
The web storage API was implemented a few years back now, and as such was integrated into IE8 (and obviously IE9). This makes it even better when working with it, as we can all start to move away from supporting IE7. IE8 is actually a blessing on a few levels compared to IE7, it's still a massively popular browser world-wide, but it supports things like querySelector, localStorage, and also CSS such as box-sizing:border-box - all things modern development thrives upon. It's not all doom and gloom, see the silver linings.

### Impressive localStorage
Those times you've filled out forms, the internet dies, or you accidentally refreshed, gone back, an error occurred and wiped the form - gone! What's even better is that you can even turn off your computer, disconnect from the internet - everything - and it'll still be there when you come back. Try it on the demo, type anything you want, refresh, reboot, have a play - and download should you feel you can use it in any of your projects.

  Demo
  Download


text:
# `ocrspace`

> A Python wrapper for using the [ocr.space API](https://ocr.space/ocrapi).

## Installation
Simply install from `pip`:
```sh
pip install ocrspace
```

## Use
First you'll need to import and instantiate the API wrapper:
```py
import ocrspace
api = ocrspace.API()
# Or if you have a custom API host, API key or desired language, pass those:
api = ocrspace.API(endpoint='https://example.host', api_key='Insert key here', language=ocrspace.Language.Croatian)
```
To perform recognition on an image hosted at some URL:
```py
api.ocr_url('URL of image goes here')
```
Or, if you have an image locally upon which to perform recognition:
```py
api.ocr_file('image.jpg')
# or:
api.ocr_file(open('image.jpg', 'rb'))  # or any other file pointer
```
That's it! Look at [`example.py`](example.py) for a demonstration.

## Authorship
This package was created by [Ali Najafi](https://github.com/a4fr) and is maintained by [Erik Boesen](https://github.com/ErikBoesen).

## License
[MIT](LICENSE)

repository: alexdali/ocrspace

repo_name: alexdali/ocrspace