text:
---
layout: post
title:  "Listening Quiz for ESL Students (Minimal Pairs)"
author: rhys
categories: [ language, education ]
image: "https://raw.githubusercontent.com/rhysmcg/Minimal-Pair-Quiz/master/minimalpairs.jpg"
---

This project is designed to help learners distinguish words that may sound similar. For example: "right" and "light", "walk" and "woke"

While in Japan, I wanted to help students understand listening to distinguish sounds before trying to make them. If the learner is able to hear and distinguish 100% of the words in each set, the next step would be to work on pronouncing the differences. That may be a future project to work on!

It was fun to use in class and I'm happy to share it here 😁

Try it here: https://github.com/rhysmcg/Minimal-Pair-Quiz


text:
---
title: "Custom permissions"
source_url: 'https://github.com/SenseNet/sensenet.github.io/blob/master/_docs/custom-permissions.md'
category: Development
version: v7.0
tags: [permission, security, api, custom]
description: "In case developers want to extend the list of built-in permissions there is a possibility to add custom permissions (for example Print) to the system."
---

# Custom permissions

sensenet comes with a built-in [permission system](permission-system) with the most common permission types. The predefined permission type set is adequate in most cases, but there might be some situations when it is desired to define custom permissions on content - for example if you want to control whether a specific user is allowed to print a certain document or not. This setting would be much more than a simple global role, since the setting could vary for different content and for different users at the same time.

Besides the built-in permission types (*See*, *Open*, etc.) sensenet defines 14 custom permission types (*Custom01*, *Custom02*, etc.) that can be used for custom permission settings. A common example would be to allow a user to print a document (or deny it): for this builders/developers could assign the permission type Custom1 and use it consistently in the system to check permissions and allow or disallow printing.

### Showing custom permissions in permission editor [legacy]
By default the permission editor will only show the 18 built-in permission types. To show custom permissions in the list of permission types do the following:

Edit the following control:

```
/Root/System/SystemPlugins/Controls/PermissionEditor.ascx
```

At the top of the layout you will find a script running on server side overriding the *OnInit* function:

```csharp
protected override void OnInit(EventArgs e)
{
    ((SenseNet.Portal.UI.Controls.PermissionEditor)this).VisiblePermissionCount = 18;
    base.OnInit(e);
}
```

Increase the value of the *VisiblePermissionCount* property from 18 to the desired amount (eg.: 19 if you want to display *Custom01*, or 32 if you want to display all permission types).

After saving the file you will see the custom permissions appear in set permission dialogs.

![Custom permissions in permission editor](img/custom-permissions/CustomPermissions1.png "Custom permissions in permission editor")

### Setting display name of custom permissions
Permission type names are internationalized which means that names come from string resources. You can find string resources of permission type names in the following resource file at keys starting with "Permission_".

```
/Root/Localization/PortalResources.xml
```

After editing the custom names you should see something like the following in the permission editor.

![Customized permission type names](img/custom-permissions/CustomPermissions4.png "Customized permission type names")

### Showing custom permissions in required permissions
[Applications](application) can ask for required permissions on content whenever a user tries to open the content with the specific application. For example if you have an application that deletes the content you can set the 'Delete' permission at the required permissions list of your app (it is a field on the application content) and thus the user will not be able to click on your action link if the user is not allowed to delete the content.

Custom permissions can also be used with this feature. To show custom permissions in the required permissions field do the following:

Edit the CTD of the *Application* type:

```
/Root/System/Schema/ContentTypes/GenericContent/Application
```

At the definition of the *RequiredPermissions* field set the *VisiblePermissionCount* to the number of permissions you want to display.

```xml
<Field name="RequiredPermissions" type="Choice">
  ...
  <Configuration handler="SenseNet.ContentRepository.Fields.PermissionChoiceFieldSetting">
    ...
    <VisiblePermissionCount>18</VisiblePermissionCount>
  </Configuration>
</Field>
```

### Checking if a user has a custom permission on a content
You can use the usual techniques to check for permissions. Simply use Custom01 - Custom17 permission types:

```csharp
var node = Node.LoadNode(path);
if (node.Security.HasPermission(PermissionType.Custom01))
{
   // ...
}
```

If you want to use named properties, simply create an alias in your code base:

```csharp
public PermissionType PrintPermission
{
   get
   {
      return PermissionType.Custom01;
   }
}
```

After that you can use it the usual way:

```csharp
if (node.Security.HasPermission(PrintPermission))
{
   // ...
}
```

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: HTML

gha_license_id: MIT

license_type: permissive


text:
---
layout: default
---

# 1993-10-13 - TIS testimony

## Header Data

From: Stanton McCandlish<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: b7387c1af35a73288e0415579f5abd3848b26bff479e52ef971ff13af39dc222

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-10-13 00:51:53 UTC

Raw Date: Tue, 12 Oct 93 17:51:53 PDT

## Raw message

```
{% raw  %}From: Stanton McCandlish<EMAIL_ADDRESS>Date: Tue, 12 Oct 93 17:51:53 PDT
To<EMAIL_ADDRESS>Subject: TIS testimony
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Just in...got "Testimony by Stephen T. Walker, President, Trusted
Information Systems, Inc., for Subcommittee on Economic Policy, Trade and
Environment, Committee on Foreign Affairs, U.S. House of Representatives,
October 12, 1993".  This is about a 75k document, and is to be found via
FTP as:

 ftp.eff.org: /pub/eff/temp/testimon.tis

It begins thusly:

"I am pleased to testify today about the negative impact that U.S. export
control regulations on cryptography are having on one of the few
industries where the U.S.  remains dominant worldwide:  the information
system software industry.  The major point of my testimony are that U.S.
export controls do not prevent the international availability of good
quality cryptography but do penalized the U.S. software industry and U.S.
business in general."

I'd post it, but it's 1500+ lines.

--

-=><EMAIL_ADDRESS><=-
Stanton McCandlish     Electronic Frontier Foundation Online Activist & SysOp
NitV-DC BBS<PHONE_NUMBER>, Fido 1:109/? IndraNet 369:111/1, 14.4V32b 16.8ZyX

{% endraw %}
```

## Thread

+ Return to [October 1993](/archive/1993/10)

+ Return to "[Stanton McCandlish <mech@eff.org>](/authors/stanton_mccandlish_mech_at_eff_org_)"

+ 1993-10-13 (Tue, 12 Oct 93 17:51:53 PDT) - TIS testimony - _Stanton McCandlish<EMAIL_ADDRESS>


text:
1.  Verify tests pass.

2.  Tag the commit

        git tag 1.2.3

3.  Push new version bump commit and tag to github

        git push trunk --tags

4.  Build source and wheel packages

        make dist

6.  Upload packages to PyPI

        make release

repository: bmabey/provenance

branch_name: refs/heads/trunk

gha_language: Python

gha_license_id: NOASSERTION

repo_name: bmabey/provenance


text:
+++
title = "Transpose a matrix with perl nested map"
date = 2011-07-07T09:33:37+00:00
tags = ["commandline", "one-liner", "perl"]
+++

Here's the matrix that we'll be using:

```bash
$ paste <(seq 1 5) <(seq 12 16)
1	12
2	13
3	14
4	15
5	16
```

Now, let's use a perl one-liner with nested maps to transpose the matrix:

```bash
$ paste <(seq 1 5) <(seq 12 16) | perl -ane 'push @matrix,[@F]; END { print join "\n",map {$row=$_; join"\t",map { $matrix[$_][$row]} 0 .. $#matrix } 0 .. $#{$matrix[0]}; print "\n" }'
1	2	3	4	5
12	13	14	15	16
```

I got the idea from this [blog post](http://www.hidemail.de/blog/perl_tutor.shtml#map_transpose_matrix), but I slightly modified it so that you don't need to make a copy of the transposed array (to save memory)

repository: alperyilmaz/blogdown

repo_name: alperyilmaz/blogdown


text:
# @superdev-official/pineaple

> Tool for generate Markdown documentation and cucumber tests based on Feathers-js's api structure

## Installation

```
npm i -g @superdev-official/pineaple
```

## License

Copyright (c) 2018

Licensed under the [MIT license](LICENSE).
)

repository: superdevofficial/pineapple

gha_language: JavaScript

repo_name: superdevofficial/pineapple


text:
---
title: Space65 CyberVoyager - Dark
date: 2020-11-17T02:18:39.354Z
uuid: c5d07da3-2386-4e40-9040-aa79aaec7bce
keywords: Mechanical Keyboard, Gray Studios, Space65, Cybervoyager
image: /assets/images/keyboards/space65-cybervoyager/1.jpeg
build:
  case: Space65 CyberVoyager
  stabs: Durock V2
  plate: Carbon Fiber
  keycaps: GMK Dark
  switches: Creamsicles lubed with 205g0, Deskey films, and 73g Thic Thock MP springs
  mount: Top
---

The Space65 CyberVoyager is the follow up to GrayStudio's popular Space65.

Here are my early impressions of this build (not just the Space65)

## Pros

- For $299, you are getting quite a bit of keyboard.
- The Space65 has an elongated design that, in some ways, feels like a large iPhone. However, it is a welcome change to the world of 65% keyboards.
- The variety of accent colors provides a lot of options to customize the board. I bought the Black Gold colorway. However, I also bought white accents and will eventually go with more of a Panda look.
- GMK Dark is much better in person than in photos. The contrast + light is not a tremendous photographic match.
- The creamsciles (Tangy housing + NK Cream stem) has a great sound and feel.
- The LED on the left is an interesting alternative to underglow. I could do without the second LED on top (unless you can use it as a layer indicator). I was playing around with a Knight Rider (KIT) look for the first build.

## Cons

- The IC lists a 5% typing angle. I measuring 4% via my phone. The difference of 1% is not that big of a deal, but overall I find it a bit flat.
- The badge (top color accent) is connected with a small magnet. So far, I have had to re-glue all three that I have used. I would have preferred this been connected via an internal screw (see more below)
- The badge is not entirely flush with the case. This makes it easy to remove to change, but also very easy to bump off. I would have it rather been completely flush, even if that made changing it more difficult.
- One of the design knocks on the original Space65 was the screw holes are covered by the case feet. This has not changed and is a miss. Most people do not open their cases often, but considering you can still see two of the screws, I am not sure why the other two needed to be covered.


text:
# Suggeted setup

## Install Bash-it

Clone locally and enable

```
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
~/.bash_it/install.sh
```

## Run local installation

and hope for the best

```
sudo apt update
sudo apt install -y ansible
./__init.sh
```

#### References

Bash safe script template: https://betterdev.blog/minimal-safe-bash-script-template/

license: Unlicense

repository: jeangougou/dotfiles

branch_name: refs/heads/main

repo_name: jeangougou/dotfiles


text:
##git commands
List of github commands you might need for this project. These are the commands after you have pulled from the __cleandata__ repository online to your local branch.

####Switching between branches
This is when you want to checkout the __master__ branch

    git checkout master

###Merging a branch
To merge the __develop__ branch into the ___master___

    git merge develop

###Finding log # for the commits made
Whenever you want to see the list of logs with the commit message and the commit number

    git log --oneline

###Finding the difference between two commits
This is good when you want to upload code between two commits. You will need to refer to the __git log --oneline__ here.

    git archive --output=upload.zip HEAD $(git diff --name-only 75b2e27 fe0e041|sed -e "s/ /\\\/g")

The above command will archive the files into an output in the same git directory with the name __upload.zip__

repository: CleanData/data-network

repo_name: CleanData/data-network


text:
---
hrs_structure:
  division: '1'
  volume: '3'
  title: '11'
  chapter: '141'
  section: 141-2.6
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0141-0002_0006
    parent: HRS0141
    name: 141-2.6 Fees for aquaculture services
weight: 33020
title: Fees for aquaculture services
full_title: 141-2.6 Fees for aquaculture services
---
**[§141-2.6] Fees for aquaculture services.** The department of agriculture may establish and assess fees pursuant to chapter 91 for:

(1) Aquatic animal and plant health diagnostic services; and

(2) Any items or expert services purchased from the department related to aquaculture planning, disease management, and the marketing of seafood products;

provided that the assessment of these fees does not violate any other provision of this chapter. [L 2000, c 193, pt of §1]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# PopOver

#### Use PopOver for giving extra context AND to make visual cues accessible

Popover is a non-modal dialog that floats around its disclosure. It's
commonly used for displaying additional rich content on top of something.

### Try them out

```.jsx
function () {
  const content = (<>
    <Button icon="facebookSquare" appearance="link" css="color: #4267b2" size="large" />
    <Button icon="twitterSquare" appearance="link" css="color: #1da1f2" size="large" />
    <Button icon="whatsappSquare" appearance="link" css="color: #4dc247" size="large" />
    <Button icon="messengerSquare" appearance="link" css="color: #288ef8" size="large" />
    <Button icon="linkedin" appearance="link" css="color: #0077b5" size="large" />
    <Button icon="envelopeSquare" appearance="link" css="color: #00b6ed" size="large" />
  </>);

  return (
    <>
      <PopOver overlay={content}>
        <Button icon="share" appearance="secondary">Share top</Button>
      </PopOver>
      <PopOver position="bottom" overlay={content}>
        <Button icon="share" appearance="secondary">Share bottom</Button>
      </PopOver>
      <PopOver position="left" overlay={content}>
        <Button icon="share" appearance="link" css={`color: #ec008c;`}>Share left</Button>
      </PopOver>
      <PopOver position="right" overlay={content}>
        <Button icon="share" appearance="link" css={`color: #ec008c;`}>Share right</Button>
      </PopOver>
    </>
  );
}
```

## Props

| Name | Type | Options | Default | Description |
| :- | :- | :-: | :- | :- |
| position | String | "top" "bottom" "left" "right" | "top" | Where to place the popover |
| overlay | String/React node | | | Content to show in the popover |

## Usage

Elements with the disabled attribute aren’t interactive, meaning users cannot
hover or click them to trigger a popover (or tooltip). As a workaround, you’ll
want to trigger the overlay from a wrapper ```<div>``` or ```<span>``` and override the
pointer-events on the disabled element.

repository: PeteLindsell/gatsby-payments

repo_name: PeteLindsell/gatsby-payments


text:
CKAD Notes

# H1 References:
https://nbtechsolutions.wordpress.com/2020/04/30/ckad-experience/
https://medium.com/@ikaboubi/my-feedback-about-cka-and-ckad-e82a35585fe9
https://codeburst.io/kubernetes-ckad-weekly-challenges-overview-and-tips-7282b36a2681
https://techbeacon.com/enterprise-it/47-advanced-tutorials-mastering-kubernetes

Introduction:
CNCF Certification References:
Certified Kubernetes Application Developer: https://www.cncf.io/certification/ckad/

Candidate Handbook: https://www.cncf.io/certification/candidate-handbook

Exam Tips: https://www2.thelinuxfoundation.org/ckad-tips
Course Deck

How K8 Works.

Exam - 2 hours
Performance Knowledge.
Kubernetes Documentation.

Keep the code - DEVOPS15 - handy while registering for the CKA or CKAD exams at Linux Foundation to get a 15% discount.

#H2 Tips:
1> k8.io Documentation
2> Understand Concepts in Exam Curriculum (Link the Curriculum)
3> Be Good at YAML - Take course in LA
4> Time Management:
   > nano editor - Document and Practice ShortCuts
   > kubectl alias
   > Set Context and Namespaces (kubectl config set-context <cluster-name> --namespace=myns)
   > Explain (kubectl explain cronjob.spec.jobTenplate --recursive)
   > Know your Kubectl Commands - https:/ /kubernetes.io/docs/reference/generated/kubectl/kubectl-commands
   > --restart (YAML generators)
   		> kubectl run nginx --image=nginx (deployment)
   		> kubectl run nginx --image=nginx --restart=Never (pod)
   		> kubectl run nginx --image=nginx --restart=OnFailure (job)
   		> kubectl run nginx --image=nginx --restart=OnFailure --schedule="****" (cronJob)

   > --dry-run command
   > UNIX Bash
   	> https://www.youtube.com/watch?v=rnemKrveZks&feature=youtu.be
   	  > 21 mts TIme Line
   > Grep
   > GO thru all Questions ?

=============================================================
 Section 2: Core Concepts:
 Kubernetes Architecture
 Installing Kube gives you the following:
  - API Server
  - etcd
  - Kubelet - Agent on Worker Nodes
  - Container RunTime
  - Controller - main Orchestrater
  - Scheduler

==============================================================
Where does the master live in a multi Node Cluster Architecture. ?
What if Node containing master goes down.
Container Engine:
 - Docker
 - rkt
 - CRI-O

kubectl run hello-minikube # deploy a configuration or cluster
kubctl cluster-info
kubectl get nodes

Pods:
==========================================================
> Containers are encapsulated into Pod(Kubernetes Object)
> Pod :: smallest object in Kubernetes

Pod can have one or more containers of a different kind.
Helper Container in the same pod ?

Concept of Corrpution of Shared VOlume or rogue Pod ?

How To Deploy Pod:
kubctl run nginx --image nginx
kubectl get pods
--------------------------------------------------------
YAML :
Pod Defnition
kind:
 Pod
 Service
 ReplicaSet
 Deployment

----
apiVersion:
kind:
metadata:

spec:
----
Child label should be to right of parent.
metadata:
  name: myapp-pod
  labels:
    app: myapp
    type: front-end

spec: //is a dictionary
  containers:  // Is a List or Array
    - name: nginx-container //Dictionary
      image: nginx

 =========================
 Deployments:

 kubectl run nginx --image=nginx --restart=Never --dry-run -o yaml
 kubectl create deployment --image=nginx nginx --dry-run -o yaml

 kubectl create deployment does not have a --replicas option. You could first create it and then scale it using the kubectl scale command

 Generate Deployment YAML file (-o yaml). Don't create it(--dry-run)::
 kubectl create deployment --image=nginx nginx --dry-run -o yaml > nginx-deployment.yaml
 You can then update the YAML file with the replicas or any other field before creating the deployment

 Service:

 CLUSTERIP:
 Create a Service named redis-service of type ClusterIP to expose pod redis on port 6379
 kubectl expose pod redis --port=6379 --name redis-service --dry-run -o yaml
 // This will automatically use the pod's labels as selectors
 OR
 B>
 kubectl create service clusterip redis --tcp=6379:6379 --dry-run -o yaml
 //(This will not use the pods labels as selectors, instead it will assume selectors as app=redis. You cannot pass in selectors as an option. So it does not work very well if your pod has a different label set. So generate the file and modify the selectors before creating the service)

 ===========
 NODEPORT
 Create a Service named nginx of type NodePort to expose pod nginx's port 80 on port 30080 on the nodes:

 kubectl expose pod nginx --port=80 --name nginx-service --dry-run -o yaml

 (This will automatically use the pod's labels as selectors, but you cannot specify the node port. You have to generate a definition file and then add the node port in manually before creating the service with the pod.)

  Or

 kubectl create service nodeport nginx --tcp=80:80 --node-port=30080 --dry-run -o yaml

 (This will not use the pods labels as selectors)

 Both the above commands have their own challenges. While one of it cannot accept a selector the other cannot accept a node port. I would recommend going with the `kubectl expose` command. If you need to specify a node port, generate a definition file using the same command and manually input the nodeport before creating the service.

====================
FORMATTING:

kubectl [command] [TYPE] [NAME] -o <output_format>

Here are some of the commonly used formats:

-o jsonOutput a JSON formatted API object.

-o namePrint only the resource name and nothing else.

-o wideOutput in the plain-text format with any additional information.

-o yamlOutput a YAML formatted API object.

=======================

Namespace:

default
kube-system
kube-public
> for prod purposes create your own namespace.
- dev
- prod
Each namespace has it own Policy ?
Namespace Resource Limit.

Each Service has a DNS Entry

Example of DNS:
mysql.connect("db-service.dev.svc.cluster.local")
db-service    :: Service Name
dev           :: NameSpace
svc           :: Service
cluster.local :: domain
------
kubectl get pods
kubectl get pods --namepsace=kube-system

you can move namespace tag into pod-definition.yml file to ensure resource would get created always in the same namespace.

Create NameSpace Options:
namespace-dev.yml

apiVersion: v1
kind: Namespace
metadata:
  name: dev

> kubectl create -f namespace-dev.yml

OR
> kubectl create namespace dev

Change to a Namespace permanently:
kubectl config set-context $(kubectl config current-context) --namespace=dev
> kubectl get pods // for dev

# List Pods across all namespaces:
kubectl get pods --all-namespaces

contexts are used to manage clusters

How To Limit Resources in a NameSpace:
Use ResourceQuota

compute-quota.yaml
----------------------
apiVersion: v1
kind: ResourceQuota
metadata:
	name: compute-quota
	namespace: dev
spec:
	hard:
	    pods: "10"
	    requests.cpu: "4"
	    requests.memory: 5Gi
	    limits.cpu: "10"
	    limits.memory: 10Gi
--------------------------
===========

CONFIGURATION:

Commands and Arguments in Docker
docker run ubuntu
docker ps => the container is exited.
Container Exists if the Process within Docker stops.

CMD vs ENTRYPOINT

---
FROM Ubuntu
CMD  sleep 5.  #container will goto sleep
---
FROM Ubuntu
ENTRYPOINT ["sleep"]
-------
for above entrypoint:
docker run ubuntu-sleeper 10
--

FROM Ubuntu
ENTRYPOINT ["sleep"]
CMD ["5"]

> docker run ubuntu-sleeper
> docker run ubuntu-sleeper 10

Change Entrypoint:
docker run --entrypoint sleep2.0 ubuntu-sleeper 10

Kubernetes - Commands and Arguments:

pod-definiton.yml
```
apiVersion: v1
kind: Pod
metadata:
  name: ubuntu-sleeper-pod
spec:
  containers:
  - name: ubuntu-sleeper
  image: ubuntu-sleeper
  command: ["sleep2.0"].  <=== ENTRYPOINT
  arg: ["10"]             <=== CMD
```
kubectl create -f pod-definition.yml

======
Editing Pods and Deployment:

kubectl edit pod <pod name>
kubectl delete pod webapp ==> this will trigger a new pod to be spun up
---
vi my-new-pod.yaml

Then delete the existing pod

kubectl delete pod webapp

Then create a new pod with the edited file

kubectl create -f my-new-pod.yaml
---

kubectl edit deployment <deployment name>
=====================

ConfigMaps:

Imperative:
----------
kubectl create configmap
   <config-name> --from-literal=<key>=<value>

kubectl create configmap
   app-config --from-literal=APP_COLOR=blue \
 			  --from-literal=APP_MOD=prod

kubectl create configmap
   <config-name> --from-file=<path-to-file>

----------------
Declarative:
--------

Config Map Definition

config-map.yaml
```
apiVersion: v1
kind: ConfigMap
metadata:
  name: app-config
data:
  APP_COLOR: blue
  APP_MODE: prod
```
kubectl create -f config-map.yaml
----------------

kubectl get configmaps
kubectl describe configmaps
-------------------------------

Pod Injection for a ConfigMap:
config-map.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: app-config
data:
  APP_COLOR: blue
  APP_MODE: prod

------------------
pod-definiton.yaml
```
apiVersion: v1
kind: Pod
metadata:
  name: simple-webapp-color
  labels:
    name: simple-webapp-color
spec:
  containers:
  - name: simple-webapp-color
    image: simple-webapp-color
    ports:
      - containerPort: 8080
    envFrom:
      - configMapRef:
          name: app-config
```
kubectl create -f pod-definition.yaml

ConfigMap in Pods:
3 ways:

envFrom:
  - configMapRef:
      name: app-config

env:
  - name: APP_COLOR
    valueFrom:
      configMapKeyRef:
        name: app-config
        key: APP_COLOR

volumes:
- name: app-config-volume
  configMap:
    name: app-config

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

Secrets:

Secret:
DB_Host:  mysql
DB_User:  root
DB_Password:  paswrd

Secrets are stored in an Encrypted/Encoded Manner

Imperative:
> kubectl create secret generic
       <secret-name> --from-literal=<key>=<value> \
       <secret-name> --from-literal=<key>=<value>

> kubectl create secret generic
       <secret-name> --from-file=<path-to-file>

Declarative:
> kubectl create -f <file-name>

secret-data.yml
---------------
aoiVersion: v1
kind: Secret
metadata:
  name: app-secret
data:
  DB_Host:  mysql
  DB_User:  root
  DB_Password:  paswrd

THE ABOVE DATA SHOULD BE IN ENCODED FORMAT
How to convert data to encoded : use base64 conversion

echo -n 'mysql' | base64 <=== Encoding

----
> kubectl get secrets
> kubectl describe secrets
> kubectl get secret app-secret -o yaml

How to decode secret values:
echo -n 'bXlzcWw=' | base64 <== Decode

------
Inject ENV Variable into Pod , Secret here:

pod-definiton.yaml
```
apiVersion: v1
kind: Pod
metadata:
  name: simple-webapp-color
  labels:
    name: simple-webapp-color
spec:
  containers:
  - name: simple-webapp-color
    image: simple-webapp-color
    ports:
      - containerPort: 8080
    envFrom:
      - secretRef:
          name: app-config
```
Note: If Creating Secrets in Pods as Volume
Each File is Created for a Secret
cat /opt/app-secret-volumes/DB_Passwrd

FollowUp:
- Do not check in secret object definition files to source code
- Enabling Encryption at Rest for Secrets so they are stored Encrypted in ETCD

------
Also the way kubernetes handles secrets. Such as:

- A secret is only sent to a node if a pod on that node requires it.
- Kubelet stores the secret into a tmpfs so that the secret is not written to disk storage.
- Once the Pod that depends on the secret is deleted, kubelet will delete its local copy of the secret data as well.
------------
Practice Test:
```
kubectl create secret generic \
       db-secret --from-literal=DB_Host=sql01 \
       --from-literal=DB_User=root --from-literal=DB_Password=password123
```
======

Docker Security:

Docker runs on its own namespace while on a Host.
Namespace also leads to process isolation.
Docker runs processes with limited number of capabilities.
example to enable privilege:
docker run --cap-add MAC_ADMIN ubuntu
docker run --previliged ubuntu

===================================
Security Context:

Pod Definition: where Security Context is in scope of Pod
```
apiVersion: v1
kind: Pod
metadata:
  name: web-pod
spec:
  securityContext:
    runAsUser: 1000

  containers:
    - name: ubuntu
      image: ubuntu
      command: ["sleep", "3600"]
```
--------
Pod Definition: where Security Context is in scope of Container
```
apiVersion: v1
kind: Pod
metadata:
  name: web-pod
spec:
  containers:
    - name: ubuntu
      image: ubuntu
      command: ["sleep", "3600"]
      securityContext:
        runAsUser: 1000
        capabilities:
          add: ["MAC_ADMIN"]
```
Note: Capabilties are only supported at the container level and not at the Pod Level
----------------------
Service Accounts:
================

Two Types of Services in K8:
USER Account    - By USERS
SERVICE Account - By MACHINES like Jenkins or Prometheus

> kubectl create serviceaccount dashboard-sa
> kubectl get serviceaccount
> kubectl describe serviceaccount dashboard-sa
  -- lists a Token which gets generated and used by an Application to authenticate with Kube API
> kubectl describe secret dashboard-sa-token-kbbdm

Service Account Token living within a Secret Object can be mounted as a volume within
a Kubernetes Cluster hence simpliyfing the process of exporting a token for a service
like Prometheus.

**Labs:**
Permissions added for newly created dashboard-sa account using RBAC:
master $ cat /var/rbac/dashboard-sa-role-binding.yaml
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: read-pods
  namespace: default
subjects:
- kind: ServiceAccount
  name: dashboard-sa # Name is case sensitive
  namespace: default
roleRef:
  kind: Role #this must be Role or ClusterRole
  name: pod-reader # this must match the name of the Role or ClusterRole you wish to bind to
  apiGroup: rbac.authorization.k8s.io

------------------------------------
pod-reader-role.yaml

master $ cat /var/rbac/pod-reader-role.yaml
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  namespace: default
  name: pod-reader
rules:
- apiGroups:
  - ''
  resources:
  - pods
  verbs:
  - get
  - watch
  - list

=====================================
Resource Requirements for Pods:
- CPU
- Memory
- Disk

pod-definiton.yaml
```
apiVersion: v1
kind: Pod
metadata:
  name: simple-webapp-color
  labels:
    name: simple-webapp-color
spec:
  containers:
  - name: simple-webapp-color
    image: simple-webapp-color
    ports:
      - containerPort: 8080
    resources:
      requests:
        memory: "1Gi"
        cpu: 1
      limits:
        memory: "2Gi"
        cpu: 2
```
CPU => Throttling happens
Memory ==> Termination of Container
--------------------
LimitRange in that Namespace:
MEMORY
```
apiVersion: v1
kind: LimitRange
metadata:
  name: mem-limit-range
spec:
  limits:
  - default:
      memory: 512Mi
    defaultRequest:
      memory: 256Mi
    type: Container
```

----------
CPU:
```
apiVersion: v1
kind: LimitRange
metadata:
  name: cpu-limit-range
spec:
  limits:
  - default:
      cpu: 1
    defaultRequest:
      cpu: 0.5
    type: Container
```
-----------------------

Taints and Tolerations:

path: /CKAD Notes.md

filename: CKAD Notes.md


text:
In Redis Cluster, each node keeps track of which master is serving
a particular hash slot.

The `CLUSTER DELSLOTS` command asks a particular Redis Cluster node to
forget which master is serving the hash slots specified as arguments.

In the context of a node that has received a `CLUSTER DELSLOTS` command and
has consequently removed the associations for the passed hash slots,
we say those hash slots are *unbound*. Note that the existence of
unbound hash slots occurs naturally when a node has not been
configured to handle them (something that can be done with the
`CLUSTER ADDSLOTS` command) and if it has not received any information about
who owns those hash slots (something that it can learn from heartbeat
or update messages).

If a node with unbound hash slots receives a heartbeat packet from
another node that claims to be the owner of some of those hash
slots, the association is established instantly. Moreover, if a
heartbeat or update message is received with a configuration epoch
greater than the node's own, the association is re-established.

However, note that:

1. The command only works if all the specified slots are already
associated with some node.
2. The command fails if the same slot is specified multiple times.
3. As a side effect of the command execution, the node may go into
*down* state because not all hash slots are covered.

## Example

The following command removes the association for slots 5000 and
5001 from the node receiving the command:

    > CLUSTER DELSLOTS 5000 5001
    OK

## Usage in Redis Cluster

This command only works in cluster mode and may be useful for
debugging and in order to manually orchestrate a cluster configuration
when a new cluster is created. It is currently not used by `redis-cli`,
and mainly exists for API completeness.

@return

@simple-string-reply: `OK` if the command was successful. Otherwise
an error is returned.

repository: laixintao/iredis

repo_name: laixintao/iredis


text:
**Question Set**

You can add question sets to your lesson to help a child practice the concept.

---

***Shuffle Question***

You can select a bunch of questions and shuffle them. Every time the lesson is played, questions will appear in shuffled order.

***Show feedback***

You can keep this ON to show an immediate feedback to the child whether the answer was correct or incorrect. This will help the child learn while practising.

You can turn this OFF and the child will move forward to the next question in the question set without getting any feedback on the answer submitted. This is useful for tests and assessments.

***Pro tip***

We suggest you select a large number of questions, set the question set to show a subset of those questions in shuffled order. This will help you create a practice quiz.

Please don't add any other drawing on the stage, where you are adding Quiz.

You can add a background image or shape, if you want to set a background for quiz.

***Are you a developer?***

To get started visit EkStep Developer Community

repository: rahulshukla/sunbird-content-player

repo_name: rahulshukla/sunbird-content-player


text:
# WebForAll: Making the Web Accessible for All

![](/WebForAll.png)

## Usage

1. Download this repository as a zip file.

2. Open `chrome://extensions` within your Chrome browser.

3. Enable Development Mode.

4. Click on `Load unpacked` and select the cloned repository.

5. Click on the extensions button next to your browser address bar and pin Someity.


text:
# Notes App based on Node.js
A Node.js app to Add, Remove, Read, & List Notes.
***
## Project Status :

__`Complete`__ :fire:

## Environments Required :
* [Nodejs](https://nodejs.org/en/download/)
* [Npm](https://www.npmjs.com/package/download)
* [Git](https://git-scm.com/downloads)
## Check for proper Installation :

    $ node -v
    $ npm -v
    $ git --version

## Developer Dependencies :
* `chalk` [:link:](https://www.npmjs.com/package/chalk)
* `yargs` [:link:](https://www.npmjs.com/package/yargs)

## Install Clients/Dependencies :

        $ npm install

***
## *Project Description* :

This is a Notes App. The Notes consist of Title and Body(description). The arguments `title` and `body` are passed as `node arguments`.

For Example :

    $ node app.js add --title="Note Title" --body="Note Body"

You can get help on arguments using `--help` command (which is also passed as a node argument). This app is completely based on `CLI` and it can Add, Remove, List & Read Notes.

Examples :

* For Adding a Note :

      $ node app.js add --title="title" --body="body"

* For Removing a Note :

      $ node app.js remove --title="title"

* For Listing all Notes :

      $ node app.js list

* For Reading a Note :

      $ node app.js read --title="title"

***

   ## *Contact Me*

:phone:   +91-89288-85199

:e-mail<EMAIL_ADDRESS>
:octocat:  [notsonoobie](https://github.com/notsonoobie)

***

© Rahul Gupta ([notsonoobie](https://github.com/notsonoobie)) -- Thank You! :nerd_face:

repository: notsonoobie/Notes-app

repo_name: notsonoobie/Notes-app


text:
# renduIIM-coursOpenSource
Rendu IIM

# Scrapper

With this package, you can scrap a few manga titles from the website : https://mangatx.com/manga/

## Installation

## Local Development

```bash
composer install
```

```bash
php vendor/bin/phpstan analyze src --level=max
```

```bash
php vendor/bin/phpunit tests
```


text:
This is a starter kit for those building an Iot device and or devices. It is a simple Node/Express + MongoDB starter kit designed to give you a headstart storing sensor data and more.

## Installing
Run via your command line ``npm install`` to install of the dependencies.


text:
# _PingponG_

#### _Arrays & Looping project for Epicodus, June 24, 2017_

#### By _**Michael A. Brooks
  *and the countless generous souls who've looked at my work and helped along the way**_

## Description

_My Website has been written for personal purposes only and is not for profit. Use of simple HTML, CSS, Bootstrap, JQuery and Javascript have been used to create a web game with simple input -> return loop.  The user inputs a number and PingponG returns a count of number up to the number the user input.  However, it replaces every divisible of 3, 5 and 15 with ping, pong or pingpong._

## Just follow this link to view website or developer's info

https://mikealphabravo.github.io/ArraysandLooping/

Bootstrap and JQuery codes are included in the file structure and refered to in the HTML but make sure latest versions are in place.

## Specifications

* It can count up to the user input number
  * Example Input: 2
  * Example Output: [1,2]
  * Example Input: 3
  * Example Output: [1,2,ping]
  * Example Input: 4
  * Example Output: [1,2,ping,4]
  * Example Input: 5
  * Example Output: [1,2,ping,4,pong]...
  * Example Input: 15
  * Example Output: [1,2,ping,4,pong,ping,7,8,ping,pong,11,ping,13,ping,PINGPONG!]
  * Example Input: NaN
  * Example Output: error message indicating to input a number
  * Example Input: 0 or less than 0
  * Example Output: error message indicating to enter a positive number

## Known Bugs

_This code does not deal with high value inputs, am still working out a way around this.  Please submit a request if you have any input._

## Support and contact details

_If you find any bugs or problems with the website please don't hesitate to let me know in the contacts link or here at<EMAIL_ADDRESS>
## Technologies Used

  * Github.com
  * HTML, CSS, Javascript in Atom
  * Bootstrap via link
  * JQuery via link

### License

_This software is licensed under the MIT license._

Copyright (c) 2017 _**Michael Allen Brooks**_

repository: MikeAlphaBravo/ArraysandLooping

repo_name: MikeAlphaBravo/ArraysandLooping


text:
# LegalDoc

Team Leader Slack: __Maria De Bon__

## About

In Switzerland there are approximately 1 million references per year. Article 330a OR states tthe obligation of an employer to draw up a certificate of employment at any time at the employee's request. Employers are obliged to comment not only on the nature and duration of the employment but also on the service rendered and the conduct. The projects objective is to avoid legal proceedings, to offer reliable and quick help to the customer

## Development

### Requirements

Application developed for this project require NodeJS and NPM for building and running.

#### Front-end

Front-end application written in Angular is placed inside __frontend__ directory. It serves a website where you can input the reference letter and get a visual analysis result.

#### Back-end

Server which is responsible for the document analysis (placed inside __doc-parser__ directory) is developed in NodeJS using Express library to set up a simple HTTP Server. With the addition of __Cloud Natural Language__ by Google.
A set of analysis is done in order to score the document and return data to the front-end.
You have to [set-up](https://cloud.google.com/natural-language/docs/quickstart) Google Cloud Account and create credentials to be able to communicate with Google Cloud.

#### APIs, libraries...

This project uses a couple of external libraries (more are listed in projects package config file):

 - Angular
 - Express
 - natural (NLP library for NodeJS)
 - Google Cloud Natural Language API

made with ♥ by RLC Team

repository: SwissLegalTech/legal-doc

repo_name: SwissLegalTech/legal-doc


text:
# telemetria-barco
The codes of a competition boat

Using a TTGO T-Beam Esp 32 with LoRa communication, WiFi, Bluetooth and GPS capabilities.

This repository contains the codes of a project in progress

The Arduino LoRa library utilized is the sandeepmistry arduino LoRa at: https://github.com/sandeepmistry/arduino-LoRa
The ESP32 Arduino library utilized is the espressif arduino-esp32 at: https://github.com/espressif/arduino-esp32 with a guide on how to run it here: https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md

gha_license_id: Unlicense


text:
# PHP-Dbase-Tables
quick and dirty PHP function to create formatted HTML tables from a database

Exactly what it says on the tin, this just creates a formatted sortable HTML table from a SQL query.
jscript for sorting the table comes from https://github.com/HubSpot/sortable/
It works with Ajax (once you work out that you have to call initialising the table sort in the correct place)

repository: paulewoodhouse/PHP-Dbase-Tables

repo_name: paulewoodhouse/PHP-Dbase-Tables


text:
---
published: true
layout: post
title: 'Favorite Visual Studio Extensions'
categories: ['productivity', 'visual studio']
date: 2015-08-11 06:00
series: developer-productivity
excerpt: In the Visual Studio Extension Gallery there are hundreds of extensions that are available. The extensions add additional functionality to Visual Studio. Here are the extensions that I typically have installed.

---

In the Visual Studio Extension Gallery there are hundreds of extensions that are available.  The extensions add additional functionality to Visual Studio.  Below are the extensions that I typically have installed.

## Web Essentials

Big pile of awesome for web developers.  If you are doing web development you need to have this installed.

[http://vswebessentials.com/](http://vswebessentials.com/)

Features:

* Enhanced browser link
* Markdown Editor/Preview
* Minification of javascript files
* JSHint / CSSHint integration
* TypeScript preview of compiled ts file
* Plus much much more

## GhostDoc

Auto generate Xml doc comments based on your method/parameter names, exceptions through and return types.

[http://tinyurl.com/ghostdoc](http://tinyurl.com/ghostdoc)

Default shortcut: ctrl+shift+d

## I Hate Regions

Regions is one of those features that you either love or hate.  If you are not a fan of regions then this extension is for you.  No longer will you even care that a file has a region in it.

[http://tinyurl.com/regionssuck](http://tinyurl.com/regionssuck)

Features:

* Auto expand regions when file opens
* Make the region text smaller and blend more into background so that it stays out of the way
* Can be configure to not allow shrinking of the regions

## Productiviy Power Tools

This extension is written by Microsoft adds a lot of productivity enhancements to Visual Studio that you just wish came out of the box.

[http://tinyurl.com/vsprodpower](http://tinyurl.com/vsprodpower)

Features:

* Collapse projects to folders
* Copy and paste references between projects
* Copy and paste project as a reference
* Fix mixed tabs and spaces
* Peek definition
* Open containing folder for project
* Open command line
* Solution error visualizer
* Sort using statements
* Remove unused using statements

## VS Commands

Another productivity tool for Visual Studio.  Unfortunately, there is not yet a Visual Studio 2015 version.

[http://tinyurl.com/vscommands13](http://tinyurl.com/vscommands13)

Features:

 * Cancel build on first error
 * Keep documents open when reloading project
 * Start new instance without debugging
 * Start new instance with debugging
 * Sync zoom levels between pages

## Switch Startup Project

Easily configure different startup project configurations and be able to switch between them or a select single project to start up.

[http://tinyurl.com/vsswitchstart](http://tinyurl.com/vsswitchstart)

## Layout O Rama

Store Visual Studio windows layout and be able to quickly change to a new layout.  This is really useful when moving to different monitor setups/resolution.

**Note:** In Visual Studio 2015 this is backed into Visual Studio.  You can save layouts under the Windows menu in Visual Studio and quickly apply those saved layouts with a shortcut key or under the Windows -> Apply Layout menu.

[http://tinyurl.com/vslayout](http://tinyurl.com/vslayout)

## Task Runner Explorer

Run Grunt or Gulp task directly in Visual Studio.

Can hook Grunt/Gulp task up to the Visual Studio build system (before/after build, on clean or solution open)

**Note:** In Visual Studio 2015, this is included out of the box.

[http://tinyurl.com/vstaskrunner](http://tinyurl.com/vstaskrunner)

## File Nesting

Easily group files by name and be able to collapse the group.

[http://tinyurl.com/vsfilenest](http://tinyurl.com/vsfilenest)

## Add New File

Fast and easy way to add new files to any project including files that start with a dart.

[https://visualstudiogallery.msdn.microsoft.com/3f820e99-6c0d-41db-aa74-a18d9623b1f3](https://visualstudiogallery.msdn.microsoft.com/3f820e99-6c0d-41db-aa74-a18d9623b1f3)

## Package Intellisense

NPM and Bower package intellisense directly in the Visual Studio JSON editor.

[https://visualstudiogallery.msdn.microsoft.com/65748cdb-4087-497e-a394-2e3449c8e61e](https://visualstudiogallery.msdn.microsoft.com/65748cdb-4087-497e-a394-2e3449c8e61e)

## Bundler & Minifier

Bundle and minify JS, CSSS, and Html files. Can be wired into the build system in Visual Studio.

[https://visualstudiogallery.msdn.microsoft.com/9ec27da7-e24b-4d56-8064-fd7e88ac1c40](https://visualstudiogallery.msdn.microsoft.com/9ec27da7-e24b-4d56-8064-fd7e88ac1c40)

## Open Command Line

Open a command line at the root of the project.  Supports all consoles: CMD, Powershell, Bash, etc.

**Note:** A similar feature is also available as part of the Productivity Power Tools.

[https://visualstudiogallery.msdn.microsoft.com/4e84e2cf-2d6b-472a-b1e2-b84932511379](https://visualstudiogallery.msdn.microsoft.com/4e84e2cf-2d6b-472a-b1e2-b84932511379)

## Stop on First build Error

Stops a solution build immediately after a project has a failed to build error.

[https://visualstudiogallery.msdn.microsoft.com/91aaa139-5d3c-43a7-b39f-369196a84fa5](https://visualstudiogallery.msdn.microsoft.com/91aaa139-5d3c-43a7-b39f-369196a84fa5)

## Resharper

This is the one extension that I cannot live without.  It makes Visual Studio a much better IDE.  Once you start using it, you will wonder how you ever lived without it.  I could easily do several blog post on the features of Resharper.  Below I picked out some of my favorite features.

[http://jetbrains.com/resharper](http://jetbrains.com/resharper)

## Features:

**Navigation**

* Go to Everything / Type - quick navigation to all possible destinations (types, symbols or files).
* Go to file - quickly navigate to any file within your solution.
* Go to File member - quickly navigate to a particular method or field in the current file.

Docs:  [https://www.jetbrains.com/resharper/features/navigation_search.html](https://www.jetbrains.com/resharper/features/navigation_search.html)

**Code Generation**

* Create from usage
* Generate Type members
* Implement/Override Methods
* Generate formatting or equality members

Docs: [https://www.jetbrains.com/resharper/features/code_generation.html](https://www.jetbrains.com/resharper/features/code_generation.html)

**Code Analysis / Refactoring / Code Templates**

* Continuous code quality analysis
* Detect errors and code smells
* Quick fixes
* Code Templates (snippets, surround with, and file)
* Lots of refactoring options:  [https://www.jetbrains.com/resharper/features/code_refactoring.html](https://www.jetbrains.com/resharper/features/code_refactoring.html)

**Code Cleanup**

* Code formatting
* Optimize namespace declarations
* Remove code redundancies
* File and type layout
* Code style configuration and sharing

**Camelhumps**

This is not so much a feature but an option that you can turn on.  I like it so much though that I consider it a feature.

When turned on it allows you to auto filter intellisense and any search dialogs by typing the first letter of each capitalized word in what you are looking for.  For example, if you have a class called MyClassExample you would search for it by typing MCE.

Warning: Camelhumps changes the behavior of Ctrl+Backspace to now  only delete the previous word instead of the whole declaration.  For example, MyClassExample would only delete Example and leave MyClass.

**Unit Test Runner**

* Run and debug test
* Can run multiple unit test sessions simultaneously and independently of each other
* Docs: [https://www.jetbrains.com/resharper/features/unit_testing.html](https://www.jetbrains.com/resharper/features/unit_testing.html)

Complete feature list at [https://www.jetbrains.com/resharper/features/](https://www.jetbrains.com/resharper/features/)


text:
## Path Ranking with Attention to Type Hierarchies
This repo contains code for AAAI 2020 paper ***Path Ranking with Attention to Type Hierarchies***, in which we introduce ***Attentive Path Ranking (APR)***, a novel path pattern representation that leverages type hierarchies of entities to both avoid ambiguity and maintain generalization.

<img src="figure/figure1.png" alt="drawing" width="600"/>

## Resources
1. Code for baseline models in the paper can be found [here](https://github.com/matt-gardner/pra) (PRA and SFE) and
[here](https://github.com/rajarshd/ChainsofReasoning) (Path-RNN).
2. We provide tokenized data for WN18RR and FB15k-237. Our data format follows
[*ChainsofReasoning*](https://github.com/rajarshd/ChainsofReasoning). Vocabularies used for tokenizing data are also
provided for reference.
3. Raw data for WN18RR and FB15k-237 can be found
[here](https://github.com/TimDettmers/ConvE). Types for WN18RR entities can be obtained from Wordnet. Types for
FB15k-237 entities can be found [here](https://github.com/thunlp/TKRL).

## Tested platform
* Hardware: 64GB RAM, 12GB GPU memory
* Software: ubuntu 16.04, python 3.5, cuda 8

## Setup
1. Install cuda
2. (Optional) Set up python virtual environment by running `virtualenv -p python3 .`
3. (Optional) Activate virtual environment by running `source bin/activate`
3. Install pytorch with cuda
4. Install requirements by running `pip3 install -r requirements.txt`

## Quick Start for Attentive Path Ranking (APR) model
To help you quickly train and test the model, we have prepared data that are already vectorized.

### Data
1. Vectorized data file can be downloaded from [dropbox](https://www.dropbox.com/s/0a4o2jljg4imuux/data.zip?dl=0).
2. Unzip the file in the root directory of this repo.

### Run the model
1. Use [`run.py`](run.py) to train and test the model on WN18RR or FB15k-237.
2. Use [`main/playground/model2/CompositionalVectorSpaceAlgorithm.py`](main/playground/model2/CompositionalVectorSpaceAlgorithm.py) to modify the training settings and hyperparamters.
3. Use [`main/playground/model2/CompositionalVectorSpaceModel.py`](main/playground/model2/CompositionalVectorSpaceAlgorithm.py) to modify the network design. Different attention methods for
types and paths can be selected here.
4. Training progress can be monitored using tensorboardX by running `tensorboard --logdir runs`. Tutorials and Details can be found [here](https://github.com/lanpa/tensorboardX).

## Running the Complete Knowledge Graph Completion Pipeline
You can also use the code to build knowledge graphs from relation data, sample negative examples, create splits,
extract paths, vectorize path data, run baselines, and run APR model.

### Data
1. Raw data, including relation data, type information, and word embeddings, for WN18RR, FB15k-237 can be downloaded
from [dropbox](https://www.dropbox.com/s/vqq2jfo9xi3gwnz/APR_raw_data.zip?dl=0).
2. Unzip the file in the root directory of this repo.

### Install Dependencies
1. Clone our [PRA repo](https://github.com/wliu88/pra_scala) and install necessary dependencies. For more details, check
out readme in that repo.
2. (Optional) Clone our [CVSM repo](https://github.com/wliu88/ChainsofReasoning) only if you want to run CVSM baselines.

### Run
1. Use [`demo_wn18rr.py`](demo_wn18rr.py) or [`demo_fb15k237.py`](demo_fb15k237.py) to go through the whole pipeline for the respective dataset.
2.  We also use `sphinx` to automatically generate API documentation from docstrings.

### Viewing the documentation

1. Make sure you have the necessary `pip` dependencies of `sphinx` installed.
1. Navigate to [`docs`](docs/) and build the documentation: `make html`
1. Navigate to [`docs/_build/html`](docs/_build/html) (this folder will be generated by the previous command) and
start a simple server: `python -m SimpleHTTPServer`.
1. Navigate to [`http://localhost:8000`](http://localhost:8000) in your browser.

## Citation
Please cite the following work if you find the data/code useful.
```text
@inproceedings{liu2019path,
  title = {Path Ranking with Attention to Type Hierarchies},
  author = {Weiyu Liu and Daruna, Angel and Kira, Zsolt and Chernova, Sonia},
  booktitle = {Thirty-Fourth AAAI Conference on Artificial Intelligence (AAAI)},
  year = {2020}
}
```


text:
# 2-IMMERSE Bandwidth Orchestration Enabled Dash.JS Player

In order to be able to do bandwidth management between multiple clients,
there's a need for the clients to send bandwidth usage statistics to the cloud collector.

The [MPEG DASH SAND](http://dashif.org/wp-content/uploads/2017/01/SAND-Whitepaper-Dec13-final.pdf)
standard aims to enable **"Server and Network Assisted DASH"** by defining message formats and usage
cases for such management to help take better advantage of multi-client knowledge and network elements
to improve DASH performance. SAND defines all the metrics as optional and allows for custom metrics as
well.

As it is, the standard [dash.js](https://github.com/Dash-Industry-Forum/dash.js|dash.js) player
is not yet fully compliant with SAND and doesn't include SAND reporting capabilities. It does, however,
collect some metrics defined by the SAND standard.

Our new **SANDPlayer** object (in the *lib* folder) wraps the standard dash.js player and adds the
ability to monitor its bandwidth usage in several ways, and send the data to a given collector. As it
is designed to wrap 2-Immerse DMApp video player components, it passes its instance ID as the SAND
SenderID, and includes the DMApp ID as well. It sends a collection of metrics:

* Average Throughput (as measured by the dash.js player itself)
* Bandwidth (SANDPlayer calculates that by keeping track of the player's fragment requests)
  * Current video, audio and combined bandwidth usage
  * Average video, audio and combined bandwidth
  * Bandwidth history (customizable history period)
* Bitrate
  * Currently playing bitrate
  * Scheduled bitrate (as decided by the player's ABR logic)

### Limitations:

* There is no way to actually monitor a component's or a page's bandwidth usage within a browser
without using a special extension, the only thing we can do is try to track the segment download
requests that the dash.js allows us to see. We try to track the "bytes downloaded" value on a
timeline and sum up the value for all the concurrent downloads for each time usint. This method is
not accurate at best!

* Since there is no way to tell whether XHR requests (used by dash.js to download fragments)
are being fetched from the actual remote server or from the browser's cache, the bandwidth monitoring
data might not be the actual network usage of the player...

## Example

The included sample client shows a simple use case of the player. It uses SANDPlayer to play a given
DASH manifest, and displays the calculated bandwidth usage data in a graph below the video.

The **player.html** file loads the requires JavaScript libs, including the SANDPlayer lib, it defines a
**\<video\>** tag for the player to use and a **\
** tag to render the bandwidth
usage graph in. It then loads the **player.js** script that contains the client code.

The client starts by retrieving some optional query parameters from the client's URL:
* collector - The collector service's url (http://<IP_ADDRESS>:3000/collect)
* id - The component's instance ID (by default, a random UUID is generated locally)
* dmapp - The DMApp ID (by default, a random UUID is generated locally)
* manifest - A URL to the dash manifest that should be played (by default, we use http://www.bok.net/dash/tears_of_steel/cleartext/stream.mpd)

It then creates the SANDPlayer object and defines a callback for stats update so it can update the
bandwidth graph.

Finally, it initializes the player and tells it to start playing when ready.

## Licence and Authors

All code and documentation is licensed by the original author and contributors under the Apache License v2.0:

* Cisco an/or its affiliates

This project was originally developed as part of the 2-IMMERSE project, co-funded by the European Commission’s Horizon 2020 Research Programme

See AUTHORS file for a full list of individuals and organisations that have
contributed to this code.


text:
# awful-drawful

A clone of [Drawful](https://www.jackboxgames.com/drawful/) using express, socket.io and Vue.js.

## Getting started

```sh
npm install
npm run client:dev   # watches and builds UI app and serves on port 3001
npm run server:dev   # watches and rebuilds app server and proxies UI requests to UI server
```

Open http://localhost:3000.

## Running in production

```sh
npm run build
npm start
```

## Development

Set runtime environment variables for development by creating a `.env` file in the root of the
project. E.g.

```sh
DEBUG=app*
DEFAULT_COUNTDOWN=5
```

A game for testing is always created with the id `ABCD`. Unlike other rooms, won't be destroyed
when there are no players left.

## Unit tests

To run unit tests:

```sh
npm run test
```

## Integration tests

Tests are located in `cypress/integration`.

To run integration tests:

```sh
npm run test:integration
```

repository: saffron-lockdown/awful-drawful

repo_name: saffron-lockdown/awful-drawful


text:
---
layout: blogpost
title:  "5.2.5 Release Announcement"
section_id: blog
date:   2019-01-24 12:00:00
author: Open GEE Development Team
---

Hi Open GEE Community!

We are happy to announce the official release of Open GEE 5.2.5!  This release updates Open GEE with minor enhancements and bug fixes for GEE Fusion and Server.

Enhancements include:

**GEE servers can respond to server definition queries with proper JSON.** A new parameter has been added to the query string to specify whether to return data in the original format or in JSON.

**New command line publishing options.** Users can now enable POI search, enhanced search, and WMS when publishing a database from the command line.

**Packets can now be dumped from portable globes.** The command line utility geglxinfo can now extract packets from 3D portable globes in order to explore their contents.

**New cutter advanced option: Continue past empty levels.** When cutting from a 2D map, the “Continue past empty levels” option forces the cutter to continue building the portable map within the polygon region down to the region level, even if the GEE server thinks there is no intermediate imagery to display.

**Installation scripts can no longer be run when the GEE packages are installed.** The install and uninstall scripts will now check if Open GEE has been installed with a package manager before continuing, and will not make any changes if the packages are already installed.

To download this release see the [release page](https://github.com/google/earthenterprise/releases/tag/5.2.5-714.41). The full release notes can also be found [here](https://www.opengee.org/geedocs/5.2.5/answer/7160006.html).

Our thanks go out to all of the contributors who helped make this release possible! The next release, Open GEE 5.3.0, is already underway!

Would you like to be part of the project? Please join us on [Slack](http://slack.opengee.org/) and visit [the project’s Github repository](https://github.com/google/earthenterprise). We would love to see you there!

–Open GEE Development Team

repository: tst-ccamp/earthenterprise

repo_name: tst-ccamp/earthenterprise


text:
# Template Transformations

Boilerplate code doesn't stop at builders. There is often need for `Factory`, `Manager`, `Handler`, `Wrapper` and so on, that needs to be created per object of a specific domain.
Wouldn't it be great if you could instead create a template and have the boilerplate get automatically generated for you?

There are tons of template engines out there, but they require a couple of things:

- A way to hook them into the build.
- A way to model your classes and feed them to the template.

This is complicates things enough to make writing boilerplate code seem more appealing!

Simplifying the process described above is the goal of this module....

## Usage
This module introduces `@TemplateTrasnformation` which accepts the path of a template and can be used to annotate any type.
Upon compilation the annotated class will be passed to the Template Context using the key `model`. Then the template will be rendered
and the output will be stored inside a new source file. The path of the source file will be determined by the fully qualified name of the generated class and the standard generated source location.

To get access to the `@TemplateTransformation` you need the following dependency:

```xml
    <dependency>
        <groupId>io.sundr</groupId>
        <artifactId>transform-annotations</artifactId>
        <version>${sundrio.version}</version>
    </dependency>
```

At the moment the supported template engines are:

- Apache Velocity
- String Template

However, an api/spi is provided that allows easily connecting any other kind of template engines.

### Example

As an example let's generate a Singleton.

The first thing we need is a template:

    package ${model.packageName};

    public class ${model.name}Singleton {

       private static ${model.name} instance;

       public static synchronized ${model.name} getInstance() {
          if (instance == null) {
              instance = new ${model.name}();
          }
          return instance;
       }
    }

We can now use the `@TemplateTransformation` to annotate any type:

    @TemplateTransformation("transformation.vm")
    public class SomeClass {
       //some code
    }

This will result in the generation of a new class called `SomeClassSingleton` in the same package.

Note: The name and the package are determined by the output class.

### Template Engines

#### Velocity

To use Apache Velocity as the template engine, you need to add:

```xml
    <dependency>
        <groupId>io.sundr</groupId>
        <artifactId>sundr-codegen-velocity</artifactId>
        <version>${sundrio.version}</version>
    </dependency>
```

If you prefer to have velocity and its transitive dependencies shaded into the artifact (to avoid dependency management headaches) you can use instead:

```xml
    <dependency>
        <groupId>io.sundr</groupId>
        <artifactId>sundr-codegen-velocity-nodeps</artifactId>
        <version>${sundrio.version}</version>
    </dependency>
```

#### String Template

To use String Template 4 as the template engine, you need to add:

```xml
    <dependency>
        <groupId>io.sundr</groupId>
        <artifactId>sundr-codegen-st4</artifactId>
        <version>${sundrio.version}</version>
    </dependency>
```

If you prefer to have String Template 4 and its transitive dependencies shaded into the artifact (to avoid dependency management headaches) you can use instead:

```xml
    <dependency>
        <groupId>io.sundr</groupId>
        <artifactId>sundr-codegen-st4-nodeps</artifactId>
        <version>${sundrio.version}</version>
    </dependency>
```

### Template placement

There are three ways to pass your templates to the annotation:

- as local resources
- as local resources relative to the package
- as classpath resources

#### Local resources

In this setup, you just need to put the templates under `src/main/resources` and reference them as `/my-template.vm`.

    package your.package.here;

    @TemplateTransformation("/my-template.vm")
    public class MyClass {
        //some code
    }

**Note:** The leading `/` is indicates that we want to try and read the template from the local root (a.k.a `target/classes`). The name and the suffix of the template can be anything you choose.

#### Local resource relative to the path.

In this setup, you just need to put the template under `src/main/resources/<your>/<package>/<here>`. Then you can reference it realtively to your package. For example:

    package your.package.here;

    @TemplateTransformation("my-template.vm")
    public class MyClass {
       //some code
    }

#### As classpath resource

It can work in the same manner as described above in the `local` setups. The only real difference is that the template lives in an other artifact that is present in the classpath.

## Using multiple transformations per class.

In the case were we want more than one transformation per class, we can wrap them inside `@TemplateTransformations`. For example:

    package your.package.here;

    @TemplateTransformations({
        @TemplateTransformation("factory.vm"),
        @TemplateTransformation("manager.vm")
    })
    public class MyClass {
       //some code
    }

repository: ssullivan/sundrio

repo_name: ssullivan/sundrio


text:
# Button count over GAP

This application shows how to use GAP to transmit a simple value to a disconnected peer listening for advertisement every time that a value is updated:

1. The value is a count of how many times a button on the device was pressed (the code actually monitors the button's releases, not press downs).

1. We transmit the value in the SERVICE_DATA field of the advertising payload.

# Running the application

## Requirements

The sample application can be seen on any BLE scanner on a smartphone. If you don't have a scanner on your phone, please install :

- [nRF Master Control Panel](https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp) for Android.

- [LightBlue](https://itunes.apple.com/gb/app/lightblue-bluetooth-low-energy/id557428110?mt=8) for iPhone.

Hardware requirements are in the [main readme](https://github.com/ARMmbed/mbed-os-example-ble/blob/master/README.md).

### Porting this example on new boards

This example requires a board with at least 1 button to work. While the pin name of the button is defined for the `NRF51_DK`, `NRF52_DK`, `K64F` and `NUCLEO_F401RE`, it is not specified for other boards.

It is easy to add the button configuration for your board:
* Open the file named `mbed_app.json` at the root of this example.
* In the section `target_overides` add a new object named after your target if it doesn't exist. This object contain overridden parameters for your target.
* Override the property `ble_button_pin_name` in your target object. The value of the property should be equal to the pin name to use as a button.

As an example, this is the JSON bit which has to be added in the `target_overrides` section of `mbed_app.json` for a `NUCLEO_F411RE` board.

```json
        "NUCLEO_F411RE": {
            "ble_button_pin_name": "USER_BUTTON"
        }
```

 **Note:** You can get more informations about the configuration system in the [documentation](https://github.com/ARMmbed/mbed-os/blob/master/docs/config_system.md)

 **Important:** If your target use an ST BLE shield, other parameters have to be overridden for your target. More information are available in the global [README](https://github.com/ARMmbed/mbed-os-example-ble/blob/master/README.md#targets-for-ble)

## Building instructions

Building instructions for all samples are in the [main readme](https://github.com/ARMmbed/mbed-os-example-ble/blob/master/README.md).

## Checking for success

**Note:** Screens captures depicted below show what is expected from this example if the scanner used is *nRF Master Control Panel* version 4.0.5. If you encounter any difficulties consider trying another scanner or another version of nRF Master Control Panel. Alternative scanners may require reference to their manuals.

1. Build the application and install it on your board as explained in the building instructions.

1. Open the BLE scanner on your phone.

1. Start a scan.

    ![](img/start_scan.png)

    **figure 1** How to start scan using nRF Master Control Panel 4.0.5.

1. Find your device; it should be named `GAPButton`; and look at the advertisement broadcasted by your device (there is no need to connect to your device).

    ![](img/discovery.png)

    **figure 2** Scan results using nRF Master Control Panel 4.0.5.

1. The Service Data field of the advertisement packet broadcasted by your device reflects the button press count. The starting value is 0.

    ![](img/initial_state.png)

    **figure 3** Initial state of the button using nRF Master Control Panel 4.0.5.

1. Press the button on the device.

    ![](img/first_press.png)

    **figure 3** State after 1 button press using nRF Master Control Panel 4.0.5.

1. The Service Data field value of the advertisement packet should change every time you press the button.

    ![](img/result.png)

    **figure 3** State after 6 button press using nRF Master Control Panel 4.0.5.

## Note

Since broadcasting is not reliable and your phone may scan intermittently, it is possible that your phone will miss button updates.


text:
# xbionic
Restart the native runtime of bionic libc

## Based on Android Platform Logging (android/platform/system/logging)
https://android.googlesource.com/platform/system/logging/+/refs/tags/android-platform-12.0.0_r1

## Based on Android Platform Bionic (android/platform/bionic)
https://android.googlesource.com/platform/bionic/+/refs/tags/android-vts-12.0_r2

## Code Modification

* ~~Added sources~~
  ~~platform_bionic-android-vts-12.0_r2/libc/include/stddef.h~~
  ~~platform_bionic-android-vts-12.0_r2/libc/include/stdarg.h~~


text:
+++
Talk_date = ""
Talk_start_time = ""
Talk_end_time = ""
Title = "Failure and the Third Way"
Type = "talk"
Speakers = ["aaron-blythe"]
+++

The Third Way is about creating a culture that fosters two things: continual experimentation, taking risks and learning from failure; and understanding that repetition and practice is the prerequisite to mastery. In operations we often focus on “keeping the lights on”.

We all have Technical Debt. Technical Debt has to be paid down. But which projects should we focus on? We have to start by identifying our constraints. By focusing on our constraints we can prioritize not only the work that we release, but also the technical debt projects that should be worked. These projects are a great place to introduce the idea of a safe place to fail and iterating based on whether the desired outcome is met.

repository: devopsvictoria/devopsdays-web

repo_name: devopsvictoria/devopsdays-web


text:
---
title:  exp2()
description: Learn how to use the exp2() function to return the base-2 exponential value of x.
ms.reviewer: alexans
ms.topic: reference
ms.date: 12/11/2022
---
# exp2()

The base-2 exponential function of x, which is 2 raised to the power x: 2^x.

## Syntax

`exp2(`*x*`)`

## Parameters

| Name | Type | Required | Description |
|--|--|--|--|
| *x* | real | ✓| The value of the exponent. |

## Returns

The exponential value of x.

## See also

* For natural (base-2) logarithms, see [log2()](log2-function.md).
* For exponential functions of base-e and base-10 logarithms, see [exp()](exp-function.md), [exp10()](exp10-function.md).

repository: microsoft/Kusto-Query-Language

gha_language: C#

repo_name: microsoft/Kusto-Query-Language


text:
## CHANGELOG AptoUISDK

# 2021-09-15 Version 2.14.0
- improvement: improved In-App Provisioning
- improvement: allowed load funds to transfer cents

# 2021-07-09 Version 2.13.0
- feature: add alpha version of In App Card Provisioning. Add a card to Apple Wallet.
- improvement: added Load Funds Disclosure screen
- fix: improved load funds screen for smaller devices
- fix: error copies in add card screen

# 2021-05-26 Version 2.12.0
- improvement: validated SSN field format
- improvement: updated AlamoFire dependency to the 5.4.3 version.
- fix: resolved issue making the OTP alert dialog not showing up.
- improvement: removed wrong error messages on user logout.
- fix: added the card logo on the main card screen

# 2021-04-26 Version 2.11.0
- feature: added new `Exchange rates` disclaimer agreement on Card Settings, if available.
- fix: removes `Monthly Statements` from Account settings.

repository: Rhegedus/apto-ui-sdk-ios

repo_name: Rhegedus/apto-ui-sdk-ios