text:
# Objective-C Coding Standards
## 1. Best Practices
1. Avoid using Primitive datatypes.
2. Always use 'YES' or 'NO' for BOOL and not string literals. 'Use YES/NO' rather than 'true/false'.
3. Avoid multiple return statements.
4. Never modify loop's index while it is running as it will hard for reviewer to review and most importantly it is not good
practice.
5. try catch finally:
  Never do any work on catch block other than error handling. Always have finally block.
6. Avoid 'performselector' and use completion blocks.
7. User-facing strings should be in a resource file, not hard-coded in a view controller.
8. Don't handle view related actions in class which are not based on view controller, go for delegates or notifications for
posting instead.
9. enums :
  Use enumeration wherever possible and always ensure the enum name is followed as per Apple's standard.
  Use enumerations for groups of related constants that have integer values.
10. Unimplemented code blocks, which are added by Xcode can be removed, especially when you are not overriding them.
  e.g: didReceiveMemoryWarning
11. Notification :
  Limit using Notifications. If the same can be handled using delegates,use delegates.
  Notifications should be declared in header files of the classes that publish the notification as extern NSString * const notificationName.
  e.g: ABC<className><NotificationName>Notification , where ABC is the prefix denoting the company.
12. Registering for a notification should follow by unregistering for the same.
13. Don’t include any constant strings or magic Numbers. Always declare a constant at the top of file and use.
  e.g:  NSString * const kInvalidData = @"";
14. Variable Scope:
  If a value is used several times in a method, it should be promoted to a variable or constant within the method.
  If a value is used several different places in a code file, it should be promoted to a class-level constant in the implementation file.
  If a value is used in several different code files it should be promoted to a constants file.
15. iVars (instance variables): Choose between ivars and properties wisely.
  ivars can be used in some cases like if we don’t want to change the value from some other classes.
  Never use '_' as a prefix for ivar since it is reserved for Apple's use.
16. Reusability : Always check for reusable code.
  If the same lines of code are written at multiple places, then include those lines under a function and use so that number of
  lines can be reduced.
17. Methods that just call super class methods don't need to exist
18. Properties with types that have mutable subtypes (NSArray, NSString, NSDictionary, etc) should always be declared as
    copy. This prevents unwanted object mutation.
19. Always update the UI from the UI thread

## 2. Naming Standards

1. Use camelCasing for naming Functions
2. Never abbreviate variable names, function names etc.
  If you are forced to follow the existing abbreviation, check the possibility of taking ownership for revising it.
3. Method name should self-explain the purpose. Variable names should have self describing , readable and meaningful names.
4. For methods that represent actions an object takes, start the name with a verb.
5. Method name should state what will happen and not pre or post conditions/expectations.
6. Objects decorated with __weak should have that as part of their name-- weakRequest, weakSelf, etc.
7. Use modal verbs (verbs preceded by 'can', 'should', 'will', and so on) to clarify meaning, but don't use 'do' or 'does'.
8. Don't use the underscore character as a prefix for your private methods. Apple reserves this convention.
9. Use class names in enum declarations. This will prevent naming collisions in the future.
10. Use k<class name><constant name> to name constants and defines
11. Constants:
  Use enumerations for groups of related constants that have integer values. Use const to create constants for floating point values.
  You can use const to create an integer constant if the constant is unrelated to other constants; otherwise, use enumeration.
  In general, don’t use the #define preprocessor command to create constants.
  For integer constants, use enumerations, and for floating point constants use the const qualifier.

## 3. Code Asthetics

1. Line spacing should divide code into meaningful blocks.
2. Ensure adequate space is left and make sure that line spacing count is not more than one line, at any case.
3. Ensure enough space between control statements, make sure it is more readable.
4. Avoid adding blank spaces and new lines between codes. Avoid unwanted tab spaces.
5. Limit, line's character length within 100 characters.
6. No function should be more than 40 lines. Make sub-functions.
  Complete function should be visible in single screen without scrolling.
7. Avoid commented lines being pushed.
8. Include proper comments. Code should be commented and formatted properly.
9. Use Control + I for auto formatting. Intent multi-line statements properly
10. We shall have the FIXME , TODO comments of X-Code to hint the places where there are workarounds for API issue.
  That will be very evident when the review is done and the reviewer can skip the code block when they review.
  // FIXME: Work around for API Issue
  // TODO: Remove the workaround starts here ...
  // TODO: Work around Code ends here
11. Use Pragma-- marks for each function for better structuring and reordering

## 4. Source Version Control

1. Before commit, do spell check for the new or modified function names, and other strings. Especially the user facing ones.
  No spelling mistakes should be there anywhere in the code. In comments, variable names and anywhere else.
2. Be clear and elaborate on commit messages.
3. Fix all Warnings and Static Analyzer leaks before commit
4. Make sure the new changes does not impact the memory utilization of the application
5. Ensure that NSLogs are removed before pushing the code. Use DDLog only if it is necessary.
6. Run the existing unit test cases to make sure nothing has broken.
  Do one round of regression testing to make sure all the features are working properly.
7. Keep the standard while naming the GIT branches. It should be either all small or pascal case, but not the mix of all three.
  Rememeber, GIT is case sensitive.

#### Reference
Suggested Link
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html
https://en.wikipedia.org/wiki/Code_smell
https://en.wikipedia.org/wiki/Don%27t_repeat_yourself
http://blog.codinghorror.com/the-broken-window-theory/

repository: nishabe/objcodingstandards

repo_name: nishabe/objcodingstandards


text:
Install django, panel and channels (pip only) and run:

```sh
./manage.py runserver <IP_ADDRESS>:8000
```

then navigate to <http://<IP_ADDRESS>:8000/shape_viewer>, <http://<IP_ADDRESS>:8000/sea_surface>, or <http://<IP_ADDRESS>:8000/sea_surface_with_template>.

repository: swshadle/bokeh

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: swshadle/bokeh


text:
# General usage

**INFO: The keyboard shortcuts mentioned in this document refer to the default shortcuts of the EMU-webApp. As it is
possible to overwrite these, please contact the person hosting your database for information about deviations from this
default behaviour.**

## Annotating levels containing time information

### Boundaries / Event marker

The EMU-webApp has slightly different labeling mechanics to other annotation software. Compared to the usual
click & drag of segment boundaries and event markers the web application continuously tracks the movement of the
mouse in levels of the type `SEGMENT` or `EVENT`, highlighting the boundary/event marker that is closest to it by
coloring it blue:

![Alt text](manual/GeneralUsage/pics/preSelBoundary.gif)

The user can perform various actions with these preselected boundaries/event markers. He/she can for example grab a
preselected boundary/event marker by holding down the shift key and moving it to the desired position:

![Alt text](manual/GeneralUsage/pics/moveBoundary.gif)

Or delete the current boundary/event marker by hitting the backspace key:

![Alt text](manual/GeneralUsage/pics/deleteBoundary.gif)

Other actions that can be performed on preselected boundaries include:

- snap to closest boundary/event marker in level above (Keyboard Shortcut `t`)
- snap to closest boundary/event marker in level below (Keyboard Shortcut `b`)
- snap to nearest zero crossing (Keyboard Shortcut `x`)

To add a new boundary/event marker one has to first select the desired level one wishes to add it to by using the ↑ up and
↓ down cursor keys (or by clicking the desired level with the mouse):

![Alt text](manual/GeneralUsage/pics/selectLevel.gif)

The EMU-webApp indicates the currently selected level by coloring it a darker shade of grey. To add a boundary to the
currently selected level one first has to select a point in time either in the Spectrogram or the Oscillogram by single-left-clicking
on the desired location. Hitting the ⏎ Return Key adds a new boundary/event maker to the selected level at the selected time point:

![Alt text](manual/GeneralUsage/pics/addBoundary.gif)

### SEGMENTs & EVENTs

The EMU-webApp also allows for preselecting `SEGMENT`s and `EVENT`s by single-left-clicking the desired item:

![Alt text](manual/GeneralUsage/pics/preSelSeg.gif)

The web application colors the preselected `SEGMENT`s and `EVENT`s yellow. As with preselected boundaries/event
markers the user can now perform multiple actions with these preselected items. He/she can for example edit the item’s label
by hitting the ⏎ Return Key:

![Alt text](manual/GeneralUsage/pics/editLabel.gif)

Other actions that can be performed on preselected items include:

- select next item in level (Keyboard Shortcut `Tab`)
- select previous item in level (Keyboard Shortcut `Shift + Tab`)
- add time to selected item(s) (Keyboard Shortcut `+`)
- move selected item(s) (hold down `Alt` Key and drag to desired position)

**NOTE:** *by right-clicking adjacent items it is possible to select multiple items at once*

## The level hierarchy

With the EMU-webApp it is possible to define and view a hierarchical relation between items on different levels.

Which levels are parent to which is defined via the database configuration. This cannot currently be configured through the web application.

### Viewing the hierarchy

Press the `show Hierarchy` button (keyboard shortcut `h`) to open the hierarchy view. You can close it by hitting the `close` button (keyboard shortcut `esc`).

Per default, the hierarchy is shown sideways with the top of the hierarchy on the left and the time information level on the right. You can change this to a vertical view by hitting the `rotate by 90°` button (keyboard shortcut `r`).

![Rotating the hierarchy](manual/GeneralUsage/pics/rotateHierarchy.gif)

The hierarchy view can be zoomed in and out by using the mouse wheel (or a pinch gesture on a touchscreen device).

![Zooming the hierarchy](manual/GeneralUsage/pics/zoomHierarchy.gif)

When you are not seeing the entire hierarchy on the screen, you can move to a different part of it by holding down the left mouse button and moving the mouse around (just move your finger around the hierarchy on a touchscreen device).

![Panning the hierarchy](manual/GeneralUsage/pics/panHierarchy.gif)

### Selecting a path through the hierarchy

In some databases, there may be different levels with time information and/or different paths through the hierarchy of levels. For instance, there may be a level indicating phoneme boundaries (a SEGMENT level) and another level indicating tonal events (an EVENT level).

The drop-down menu above the hierarchy graph shows all possible paths in the current database. Changing it will re-draw the graph to show the selected path.

### Selecting labels

On each level there may be parallel labels. A phoneme level might carry an IPA label and a SAMPA label, for instance. You can select which labels to see beneath the items by using the drop-down menus at the very top of the hierarchy view.

### Moving portions of the hierarchy out of sight (a.k.a. collapsing a sub-tree)

You can move parts of the hierarchy out of sight by selecting the root node of that part and collapsing it.

Identify the root item of the sub-tree that you want to collapse. Clicking it will open a context menu. That context menu has a small arrow pointing in either of two directions. Clicking the arrow will collapse or decollapse the item’s children and flip the arrow’s direction. As long as the children are collapsed, the node will have a red outline.

![Collapsing a sub-tree](manual/GeneralUsage/pics/collapseSubtree.gif)

### Adding a new item

To add a new item on a level, you have two choices. Either press the blue and white plus button next to the level’s name. An item will be appended to the end of the level. As long as the level contains no items, this is your only choice. Once there are other items, you can pre-select one of them (by moving your mouse there) and then hit either the `n` or `m` key to insert a new item before or after the pre-selected one, respectively.

![Adding a new item](manual/GeneralUsage/pics/addItem.gif)

### Modifying a label

Open an item’s context menu by single left-clicking it. You can then type a new label. The background of the text input turns red or green, indicating whether the label you have typed is legal. When done, hit Return.

Which labels are legal is defined in the database configuration. By default, all labels are legal. If you type an illegal label, you cannot save it.

![Modifying a label](manual/GeneralUsage/pics/modifyLabel.gif)

### Adding a new link

To add a new link between two items, move the mouse over one of the two. It will then turn blue, indicating it is pre-selected. Then hold down the `Shift` key and move the mouse to the other item. While you are moving, a straight line appears to connect the pre-selected item and the mouse pointer. Once you reach the second item, a dashed line will appear between both items. The color’s line (green or red) indicates whether the link is acceptable. By releasing the `Shift` key, you actually add the link, replacing the dashed, green line by a solid, grey line. If the dashed line was red (indicating an illegal link), it will just disappear when the `Shift` key is released.

![Adding a new link](manual/GeneralUsage/pics/addLink.gif)

### Deleting an item or a link

To delete an item or a link, first pre-select it by moving the mouse pointer to it. The pre-selection is indicated in blue for items and in yellow for links. Remove the pre-selected link by hitting `Backspace` or the pre-selected item by hitting the `y` key. Deleting an item will also delete all links leading to or from it.

![Deleting an item or a link](manual/GeneralUsage/pics/deleteItemOrLink.gif)

license: MIT

repository: SBRitter/EMU-webApp

gha_license_id: MIT

repo_name: SBRitter/EMU-webApp


text:
# Azure Kubernetes Services (AKS) Demo

In this tutorial, you will learn how to deploy a Kubernetes Cluster utilizing Azure Kubernetes Services (AKS). The following steps will help you to accomplish the following:

* Configure AKS via Azure CLI
* Deploy a Managed Kubernetes cluster
* Configure persistent volume on AKS
* Deploy a multi-tier Open Source app
* Validate access to the Application

The multi-tier app is based on the [MEAN stack](http://mean.io/). Additional information about it can be obtained in the ["app"](https://github.com/prwitt/azure-demos/tree/master/kubernetes/app) folder from the same git repository. The following diagram shows how the app looks like:

![topology](media/mean-k8s-az.png)

## Before you begin

* Make sure you have access to an [Azure Account](https://azure.microsoft.com/en-us/free/).
* The tutorial is wholly based on [Azure Cloud Shell](https://azure.microsoft.com/en-us/features/cloud-shell/) and the Azure Portal and does not require additional software installation on the client side.

## Azure Kubernetes Services Configuration

From Azure Cloud Shell on Azure Portal, perform the following steps:

![AzureCloudShell](media/azurecloudshell.png)

* Create a [Resource Group](https://azure.microsoft.com/en-us/updates/resource-groups-in-azure-preview-portal/). Make sure you deploy it in a supported region for the Azure resource type 'Microsoft.ContainerService/managedClusters'. Using this command, ```az provider list --query "[?namespace=='Microsoft.ContainerService'].resourceTypes[]|[?contains(resourceType,'managedClusters')]"```, you can get more information on the regions that are currently supported.

```console
$ az group create --name myK8sRG --location centralus
```

Output:
```console
{
  "id": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/myK8sRG",
  "location": "centralus",
  "managedBy": null,
  "name": "myK8sRG",
  "properties": {
    "provisioningState": "Succeeded"
  },
  "tags": null
}
```

**Note:** The example above creates a resource group in Central US. As of mid May/2018, AKS is available on the following regions: East US (eastus), West Europe (westeurope), Central US (centralus), Canada Central (canadacentral), Canada East (canadaeast). Other regions will be available during GA.

* Before creating the AKS Cluster on the Resource Group created on the previous step, in case it is the first time you use this service on your Azure Subscription, you need to make sure the [Resource Provider](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services) is registered. The following command shows the status of your resource provider:

```console
az provider show --name "Microsoft.ContainerService" --query "{registrationState:registrationState}"
```

Output in case it is registered:
```console
{
  "registrationState": "Registered"
}
```

In case it is ot registered, the "registrationState" object will show as "NotRegistered", and you should register it with the following command before proceeding:

```console
az provider register --namespace Microsoft.ContainerService --wait
```

Repeat the command to verify the registration status, and if it shows as "Registered", we are good to proceed.

* Deploy a Managed Kubernetes Cluster on [AKS](https://azure.microsoft.com/en-us/services/container-service/). This process will take 5 minutes approximately.

```console
$ az aks create --resource-group myK8sRG --name myK8sCluster --node-count 1 --generate-ssh-keys
```

Output:
```console
{
  "additionalProperties": {},
  "agentPoolProfiles": [
    {
      "additionalProperties": {},
      "count": 1,
      "dnsPrefix": null,
      "fqdn": null,
      "name": "nodepool1",
      "osDiskSizeGb": null,
      "osType": "Linux",
      "ports": null,
      "storageProfile": "ManagedDisks",
      "vmSize": "Standard_DS1_v2",
      "vnetSubnetId": null
    }
  ],
  "dnsPrefix": "myK8sClust-myK8sRG-30ec95",
  "fqdn": "myk8sclust-myk8srg-30ec95-407988ed.hcp.centralus.azmk8s.io",
  "id": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourcegroups/myK8sRG/providers/Microsoft.ContainerService/managedClusters/myK8sCluster",
  "kubernetesVersion": "1.9.6",
  "linuxProfile": {
    "additionalProperties": {},
    "adminUsername": "azureuser",
    "ssh": {
      "additionalProperties": {},
      "publicKeys": [
        {
          "additionalProperties": {},
          "keyData": "ssh-rsa XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXfkmmlWld7JKNdc7GwbxWbTFDu/4/Qe8X67+PBWNfPK3ywYpBNTYLjWzQx2BO/N97JwLW6HNfk/TpSFC3wASTcZnPIE4gbQ2bCHyPpyPSB+kv/RIwnwfohNrvoj5j8qRayRcHQuJe2rv+lRIpM0UEcaL7wOjOt50Pa0+oncvgOqxXLh67XpEf4sGhaBkE1AftJ/X/vjSXJB3YmZUMA7/Z4UtJv0+jXozOE3iw8U6nu2CTSDagXnf7/339w5MG/RtPlvLlF0NpBkvusaAutgPo74EkX"
        }
      ]
    }
  },
  "location": "centralus",
  "name": "myK8sCluster",
  "provisioningState": "Succeeded",
  "resourceGroup": "myK8sRG",
...
}
```

* Get credential

``` console
$ az aks get-credentials --resource-group myK8sRG --name myK8sCluster

```

Output:
```console
Merged "myK8sCluster" as current context in /home/<your-home-dir>/.kube/config
```

* Make sure you can access your cluster, and the STATUS is Ready

```console
$ kubectl get nodes

```

Output:
```console
NAME                       STATUS    ROLES     AGE       VERSION
aks-nodepool1-84578568-0   Ready     agent     8m        v1.9.6
```

Note that at the time this tutorial was written, the default version for the AKS cluster is v1.9.6. One of the benefits of managed K8s on Azure, is that you can upgrade it easily. We don't need to do it at this time.

## Application Deployment

* From Azure Cloud Shell, run the following command to download the YAML files we'll use to create our application:

```console
$ for i in `echo db-controller.yaml db-service.yaml pvc-azuredisk.yaml web-controller.yaml web-service.yaml`
do
wget https://raw.githubusercontent.com/prwitt/azure-demos/master/kubernetes/$i
done
```

### Creating the Database Service

The following components will be deployed to support the Database::

* Persistent Volume to store the data (pods are ephemeral, so we shouldn't save data locally)
* Replication Controller running MongoDB
* Service mapping to that Replication Controller

To create the disk, run the following command:

```console
From the directory where you have pvc-azuredisk.yaml:

$ kubectl create -f pvc-azuredisk.yaml
```

Output:
```console
persistentvolumeclaim "pvc-azuredisk" created
```

Let's see the private volume creation status:

```console
$ watch kubectl describe pvc
```

Output:
```console
Name:          pvc-azuredisk
Namespace:     default
StorageClass:  default
Status:        Bound
Volume:        pvc-b5939d88-d80a-11e7-851c-0a58ac1f0520
Labels:        <none>
Annotations:   pv.kubernetes.io/bind-completed=yes
               pv.kubernetes.io/bound-by-controller=yes
               volume.beta.kubernetes.io/storage-class=default
               volume.beta.kubernetes.io/storage-provisioner=kubernetes.io/azure-disk
Capacity:      1Gi
Access Modes:  RWO
Events:
  Type    Reason                 Age   From                         Message
  ----    ------                 ----  ----                         -------
  Normal  ProvisioningSucceeded  20s   persistentvolume-controller  Successfully provisioned volume pvc-b5939d88-d80a-11e7-851c-0a58ac1f0520 using kubernetes.io/azu
re-disk
```

**Note:** Wait until the PVC creation is successfull before moving to the next step.

Now, let's create the Replication controller that will run the database. The Replication Controller will ensure to restart the DB automatically if needed.

``` console
From the directory where you have the file db-controller.yaml:

$ kubectl create -f db-controller.yaml
```

Let's monitor the creation status is **Running**:
```console
$ watch kubectl get pods

NAME                     READY     STATUS    RESTARTS   AGE
mongo-controller-bmz15   1/1       Running   0          2m

```

* Now, let's create the Service that will expose the access to the Database:

```console
From the directory where you have the file db-service.yaml:

$ kubectl create -f db-service.yaml
```

Output:
```console
service "mongo" created

```

* Let's see what we created so far:

```console
$ kubectl get rc
NAME               DESIRED   CURRENT   READY     AGE
mongo-controller   1         1         1         4m

$ kubectl get pods
NAME                     READY     STATUS    RESTARTS   AGE
mongo-controller-bmz15   1/1       Running   0          4m

$ kubectl get svc
NAME         TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)     AGE
kubernetes   ClusterIP   <IP_ADDRESS>      <none>        443/TCP     1h
mongo        ClusterIP   <IP_ADDRESS>   <none>        27017/TCP   1m
```

### Web Server Deployment

The Web and App tiers are comprised by the following components: a Web Replication Controller that will ensure the Web Pods are running (they restart automatically), and the Service that will expose your Pod to the Internet.

* To deploy the Web Replication Controller:

``` console
From the directory where you have the file web-controller.yaml:

$ kubectl create -f web-controller.yaml
```

Output:
```console
replicationcontroller "web-controller" created
```

**Note:** The Web Replication Controller utilizes a docker image called prenato/myjsapp that is available in my public repository on [Docker Hub](https://hub.docker.com/r/prenato/myjsapp/).

* And finally, the Web Service that will expose external access to the web service:

``` console
From the directory where you have the file web-service.yaml:

$ kubectl create -f web-service.yaml
```

* Let's monitor the creation of the Web Service until it gets a public IP Address, as follow:

``` console

$ watch kubectl get svc

NAME         TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
kubernetes   ClusterIP      <IP_ADDRESS>       <none>        443/TCP        1h
mongo        ClusterIP      <IP_ADDRESS>    <none>        27017/TCP      4m
web          LoadBalancer   <IP_ADDRESS>   <IP_ADDRESS> 80:30780/TCP   1m
```

* Now, let's review again what we have created in this tutorial:

``` console

# A Persistent Volume to be used by the MongoDB

$ kubectl get pvc
NAME            STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
pvc-azuredisk   Bound     pvc-b5939d88-d80a-11e7-851c-0a58ac1f0520   1Gi        RWO            default        12m

# Replication Controllers to ensure MongoDB has at least one Pod running, and Web has at least two Pods running.

$ kubectl get rc
NAME               DESIRED   CURRENT   READY     AGE
mongo-controller   1         1         1         9m
web-controller     2         2         2         3m

# The Pods were created by the Replication Controllers

$ kubectl get pods
NAME                     READY     STATUS    RESTARTS   AGE
mongo-controller-bmz15   1/1       Running   0          10m
web-controller-7mwlw     1/1       Running   0          3m
web-controller-wjhnv     1/1       Running   0          3m

# Services to expose 1) Access to MongoDB and 2) External Access to the Web App.

$ kubectl get svc
NAME         TYPE           CLUSTER-IP     EXTERNAL-IP     PORT(S)        AGE
kubernetes   ClusterIP      <IP_ADDRESS>       <none>          443/TCP        1h
mongo        ClusterIP      <IP_ADDRESS>    <none>          27017/TCP      7m
web          LoadBalancer   <IP_ADDRESS>   <IP_ADDRESS>         80:30780/TCP   3m

```

## Accessing the Application

Now that the Kubernetes Cluster was created, and the respective containers were deployed, let's find out what is the IP address to access our application:

```console

$ kubectl get svc

NAME         TYPE           CLUSTER-IP     EXTERNAL-IP     PORT(S)        AGE
kubernetes   ClusterIP      <IP_ADDRESS>       <none>          443/TCP        1h
mongo        ClusterIP      <IP_ADDRESS>    <none>          27017/TCP      7m
web          LoadBalancer   <IP_ADDRESS>   <IP_ADDRESS>         80:30780/TCP   3m

In the example above, our App Public IP Address is: <IP_ADDRESS>

```

In the example above, the IP Address is: <IP_ADDRESS>

If all the steps above were performed successfully, we should get a web application with access to a MongoDB, where you can insert/delete Employee information, as follow:

![app-page](media/app-page.png)

## Clean Up

To delete the resources that were created, you can run the following command:

```console
$ az group delete --name myK8sRG
```

For questions or suggestions about this tutorial, you can reach out to [Paulo Renato](https://www.linkedin.com/in/paulorenato/).

## Bonus Labs

If you finished this lab and want to play more with Containers on Azure, I recommend for you to try out the following labs:

* [ACI Demo](https://github.com/rbitia/aci-demos)
* [Jenkins Integration with Azure Container Service and Kubernetes](https://docs.microsoft.com/en-us/azure/container-service/kubernetes/container-service-kubernetes-jenkins)

repository: prwitt/azure-demos

gha_language: JavaScript

repo_name: prwitt/azure-demos


text:
---
layout: default
---

# 1993-03-22 - Re: HIDE: embedded msgs in grphics & snd

## Header Data

From: George A. Gleason<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: e68c6f07e8850afbfcddf9eb06c4e938cc3819a3a77043c9cba1398f1adc0a8f

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-03-22 12:19:59 UTC

Raw Date: Mon, 22 Mar 93 04:19:59 PST

## Raw message

```
{% raw  %}From: George A. Gleason<EMAIL_ADDRESS>Date: Mon, 22 Mar 93 04:19:59 PST
To<EMAIL_ADDRESS>Subject: Re: HIDE: embedded msgs in grphics & snd
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

"once data encryption becomes illegal, searching for LSBs will become
standard procedure for datacops."

Aha, but if we can establish artistic protection for cyphertext, that will
be one more brick in the wall that keeps the censors out.  The point is to
prevent it becoming illegal in the first place.  Now so far we have one
great strategy: making crypto ubiquitous, so there is no way to get the
horses back into the barn.  I think we can benefit from additional
strategies, such as expanding into all the various areas of constitutional
protection that might be available.

-gg

{% endraw %}
```

## Thread

+ Return to [March 1993](/archive/1993/03)

+ Return to "[George A. Gleason <gg@well.sf.ca.us>](/authors/george_a_gleason_gg_at_well_sf_ca_us_)"

+ 1993-03-22 (Mon, 22 Mar 93 04:19:59 PST) - Re: HIDE: embedded msgs in grphics & snd - _George A. Gleason<EMAIL_ADDRESS>


text:
# TextMagic
[![Build Status](https://img.shields.io/travis/benjaminsnorris/TextMagic.svg)](https://travis-ci.org/benjaminsnorris/TextMagic)
[![codecov](https://img.shields.io/codecov/c/github/benjaminsnorris/TextMagic.svg)](https://codecov.io/gh/benjaminsnorris/TextMagic)
[![Latest release](http://img.shields.io/github/release/benjaminsnorris/TextMagic.svg)](https://github.com/benjaminsnorris/TextMagic/releases)
[![GitHub license](https://img.shields.io/github/license/benjaminsnorris/TextMagic.svg)](/LICENSE)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg)](https://github.com/Carthage/Carthage)
[![Swift Package Manager compatible](https://img.shields.io/badge/Swift_Package_Manager-compatible-brightgreen.svg)](https://swift.org/package-manager)

A simple library to make working with text in iOS easier. Currently, the library offers support for updating text in `UITextView` or `UITextField` without losing cursor position and text selection.

1. [Requirements](#requirements)
2. [Usage](#usage)
  - [Text updating](#text-updating)
3. [Plans](#plans)
4. [Integration](#integration)
  - [Carthage](#carthage)
  - [Swift Package Manager](#swift-package-manager)
  - [Git Submodules](#git-submodules)

## Requirements
- iOS 9.0+
- Xcode 7
- [Diff](https://github.com/soffes/diff)

## Usage
Import the module into any file where you need to update text
```swift
import TextMagic

var textMagicService = TextMagicService()
```

### Updating text
If you need to update text in a `UITextView` or `UITextField` while preserving cursor position and text selection, use `updateText(in:newString:)`. You provide the text input and changed text, and the rest happens magically for you.

## Plans
- [ ] Adding tests for `UITextField`
- [x] Adding code coverage metrics
- [x] Adding automated build

## Integration
### Carthage

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with [Homebrew](http://brew.sh/) using the following command:

```bash
$ brew update
$ brew install carthage
```

To integrate TextMagic into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "benjaminsnorris/TextMagic" ~> 1.0
```

Run `carthage update` to build the framework and drag the built `TextMagic.framework` into your Xcode project.

### Swift Package Manager

You can use [The Swift Package Manager](https://swift.org/package-manager) to install `TextMagic` by adding the proper description to your `Package.swift` file:

```swift
import PackageDescription

let package = Package(
    name: "YOUR_PACKAGE_NAME",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/benjaminsnorris/TextMagic.git", majorVersion: 1)
    ]
)
```

Note that the [Swift Package Manager](https://swift.org/package-manager) is still in early design and development. For more information check out its [GitHub Page](https://github.com/apple/swift-package-manager)

### Git Submodules

- If you don't already have a `.xcworkspace` for your project, create one. ([Here's how](https://developer.apple.com/library/ios/recipes/xcode_help-structure_navigator/articles/Adding_an_Existing_Project_to_a_Workspace.html))

- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository:

```bash
$ git init
```

- Add TextMagic as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command:

```bash
$ git submodule add https://github.com/benjaminsnorris/TextMagic.git Vendor/TextMagic
```

- Open the new `TextMagic` folder, and drag the `TextMagic.xcodeproj` into the Project Navigator of your application's Xcode workspace.

    > It should not be nested underneath your application's blue project icon. Whether it is above or below your application's project does not matter.

- Select `TextMagic.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target.
- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar.
- In the tab bar at the top of that window, open the "General" panel.
- Click on the `+` button under the "Linked Frameworks and Libraries" section.
- Select `TextMagic.framework` inside the `Workspace` folder.
- Click on the `+` button under the "Embedded Binaries" section.
- Select `TextMagic.framework` nested inside your project.
- An extra copy of `TextMagic.framework` will show up in "Linked Frameworks and Libraries". Delete one of them (it doesn't matter which one).
- And that's it!

repository: benjaminsnorris/TextMagic

gha_language: Swift

repo_name: benjaminsnorris/TextMagic


text:
---
# Documentation: https://sourcethemes.com/academic/docs/managing-content/

title: "Pattern-Guided Integrated Gradients"
authors: [Robert Schwarzenberg, Steffen Castle]
date: 2020-07-29T00:00:00+00:00
doi: ""

# Schedule page publish date (NOT publication's date).
publishDate: 2020-08-26T14:09:16+02:00

# Publication type.
# Legend: 0 = Uncategorized; 1 = Conference paper; 2 = Journal article;
# 3 = Preprint / Working Paper; 4 = Report; 5 = Book; 6 = Book section;
# 7 = Thesis; 8 = Patent
publication_types: ["1"]

# Publication name and optional abbreviated publication name.
publication: "ICML 2020 Workshop on Human Interpretability in Machine Learning"
publication_short: "ICML 2020 WHI"

abstract:

# Summary. An optional shortened abstract.
summary: "Integrated Gradients (IG) and PatternAttribution (PA) are two established explainability methods for neural networks. Both methods are theoretically well-founded. However, they were designed to overcome different challenges. In this work, we combine the two methods into a new method, Pattern-Guided Integrated Gradients (PGIG). PGIG inherits important properties from both parent methods and passes stress tests that the originals fail. In addition, we benchmark PGIG against nine alternative explainability approaches (including its parent methods) in a large-scale image degradation experiment and find that it outperforms all of them."

tags: []
categories: []
featured: true

# Custom links (optional).
#   Uncomment and edit lines below to show custom links.
# links:
# - name: Follow
#   url: https://twitter.com
#   icon_pack: fab
#   icon: twitter

url_pdf: "https://arxiv.org/abs/2007.10685"
url_code: "https://github.com/DFKI-NLP/pgig"
url_dataset:
url_poster:
url_project:
url_slides:
url_source:
url_video:

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ""
  focal_point: ""
  preview_only: false

# Associated Projects (optional).
#   Associate this publication with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `internal-project` references `content/project/internal-project/index.md`.
#   Otherwise, set `projects: []`.
projects: []

# Slides (optional).
#   Associate this publication with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides: "example"` references `content/slides/example/index.md`.
#   Otherwise, set `slides: ""`.
slides: ""
---

branch_name: refs/heads/src

gha_language: TeX


text:
## Creating _bitwise-challenge_ project

### Practicing bitwise operations:

We define `S` to be a sequence of distinct sequential integers from 1 to `n`; in other words, `{1,2,3,...,n}`.
We want to know the maximum bitwise AND value of any two integers, `a` and `a` (where `a < b` ), in sequence `S`
that is also less than a given integer, `k`.

Complete the function so that given `n` and `k`, it returns the maximum `a & b < k`.

#### Constraints:

- 1 <= `q` <= 103
- 2 <= `n` <= 103
- 2 <= `k` <= `n`

---

#### Sample input:

```
3
5 2
8 5
2 2
```

---

#### Sample output:

```
1
4
0
```

---

gha_language: CSS


text:
---
id: deploy-jupyterhub
title: JupyterHub
---

JupyterHub is ideal to enable multiple users easily start predefined workspaces in the same project.

:::warning Experimental

🧪 Deploying JupyterHub is still experimental, and it can be a bit tricky to configure. Feel free to [submit a ticket](https://servicedesk.icts.maastrichtuniversity.nl/tas/public/ssp/content/serviceflow?unid=1ffa93e9ecd94d938ad46e3cb24c2392) to ask for help.

:::

## 🧊 Install kfctl

You will need to have the usual `oc` tool installed, and to install `kfctl` on your machine, a tool to deploy Kubeflow applications, download the [latest version for your OS 📥](https://github.com/kubeflow/kfctl/releases)

You can then install it by downloading the binary and putting it in your path, for example on Linux:

```bash
wget https://github.com/kubeflow/kfctl/releases/download/v1.2.0/kfctl_v1.2.0-0-gbc038f9_linux.tar.gz
tar -xzf kfctl_v1.2.0-0-gbc038f9_linux.tar.gz
sudo mv kfctl /usr/local/bin/
```

Clone the repository with the DSRI custom images and deployments for the OpenDataHub platform, and go to the `kfdef` folder:

```bash
git clone https://github.com/MaastrichtU-IDS/odh-manifests
cd odh-manifests/kfdef
```

## 🪐 Deploy JupyterHub

:::info Go the the kfdef folder

All scripts need to be run from the `kfdef` folder 📂

:::

You can deploy JupyterHub with 2 different authentications system, use the `KfDef` file corresponding to your need:

* For the default DSRI authentication based on UM login, use the `kfctl_openshift_dsri.yaml` file

* For GitHub authentication, use `kfctl_openshift_github.yaml`

  * You will need to create a new GitHub OAuth app: https://github.com/settings/developers

  * And provide the GitHub client ID and secret through environment variable before running the start script:

    ```bash
    export GITHUB_CLIENT_ID=YOUR_CLIENT_ID
    export GITHUB_CLIENT_SECRET=YOUR_CLIENT_SECRET
    ```

We recommend you to copy the `KfDef` file of your choice and use this copy to define your JupyterHub deployment.

In the `KfDef` file, you will need to change the `namespace:` to the DSRI project where you want to deploy JupyterHub.

Then you can deploy the JupyterHub described in your `KfDef` file using our script (which uses `kfctl` under the hood):

```bash
./start_odh.sh kfctl_openshift_dsri.yaml
```

🗄 Persistent volumes are automatically created for each instance started in JupyterHub to insure persistence of the data even JupyterHub is stopped. You can find the persistent volumes in the DSRI web UI, go to the **Administrator** view > **Storage** > **Persistent Volume Claims**.

:::success Configure JupyterHub

You can further configure your JupyterHub deployment by editing the overlays defined in your `KfDef` file. Overlays can be found in the `odh-manifests` repository in the `jupyterhub/jupyterhub/overlays` folder. Feel free to [submit a ticket](https://servicedesk.icts.maastrichtuniversity.nl/tas/public/ssp/content/serviceflow?unid=1ffa93e9ecd94d938ad46e3cb24c2392) to ask for help configuring your JupyterHub.

:::

<!--

:::warning Restricted user

The users will be able to install new `pip` packages in their JupyterLab instance, but they will not have `sudo` privileges (so they cannot install `apt` or `yum` packages for example). This can be changed by editing the KubeSpawner python script in the ConfigMap to use `serviceAccountName: anyuid`

::: -->

repository: MaastrichtU-IDS/dsri-documentation

gha_language: TypeScript

repo_name: MaastrichtU-IDS/dsri-documentation


text:
---
language: ["ru", "en"]
tags:
- russian
- fill-mask
- pretraining
- embeddings
- masked-lm
- tiny
- feature-extraction
- sentence-similarity
license: mit
widget:
- text: "Миниатюрная модель для [MASK] разных задач."
---
This is a very small distilled version of the [bert-base-multilingual-cased](https://huggingface.co/bert-base-multilingual-cased) model for Russian and English (45 MB, 12M parameters). There is also an **updated version of this model**, [rubert-tiny2](https://huggingface.co/cointegrated/rubert-tiny2), with a larger vocabulary and better quality on practically all Russian NLU tasks.

This model is useful if you want to fine-tune it for a relatively simple Russian task (e.g. NER or sentiment classification), and you care more about speed and size than about accuracy. It is approximately x10 smaller and faster than a base-sized BERT. Its `[CLS]` embeddings can be used as a sentence representation aligned between Russian and English.

It was trained on the [Yandex Translate corpus](https://translate.yandex.ru/corpus), [OPUS-100](https://huggingface.co/datasets/opus100) and [Tatoeba](https://huggingface.co/datasets/tatoeba), using MLM loss (distilled from [bert-base-multilingual-cased](https://huggingface.co/bert-base-multilingual-cased)), translation ranking loss, and `[CLS]` embeddings distilled from [LaBSE](https://huggingface.co/sentence-transformers/LaBSE), [rubert-base-cased-sentence](https://huggingface.co/DeepPavlov/rubert-base-cased-sentence), Laser and USE.

There is a more detailed [description in Russian](https://habr.com/ru/post/562064/).

Sentence embeddings can be produced as follows:

```python
# pip install transformers sentencepiece
import torch
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("cointegrated/rubert-tiny")
model = AutoModel.from_pretrained("cointegrated/rubert-tiny")
# model.cuda()  # uncomment it if you have a GPU

def embed_bert_cls(text, model, tokenizer):
    t = tokenizer(text, padding=True, truncation=True, return_tensors='pt')
    with torch.no_grad():
        model_output = model(**{k: v.to(model.device) for k, v in t.items()})
    embeddings = model_output.last_hidden_state[:, 0, :]
    embeddings = torch.nn.functional.normalize(embeddings)
    return embeddings[0].cpu().numpy()

print(embed_bert_cls('привет мир', model, tokenizer).shape)
# (312,)
```

repository: akzholba/examples

repo_name: akzholba/examples


text:
# playground_stripe
A sandbox for testing stripe functionalities with Django

## Getting started
* Copy .env.example to .env
* Put your stripe secret key in front of  `STRIPE_SECRET_KEY=` without any quotation in `.env` file.
* Add a new secret key for your django usage in front of `SECRET_KEY=` or remove the line in `.env` file.
* Now you are ready to go.

gha_language: Python


text:
# Notetaking App Example

This example shows how an ordinary React-Redux application can be transformed with `sync3k-client`.

## Run

Install and build packages in the following order:

```bash
~/sync3k-client$ npm install
~/sync3k-client$ npm run-script build

~/sync3k-client$ cd examples/notetaking-app
~/sync3k-client/examples/notetaking-app$ npm install
~/sync3k-client/examples/notetaking-app$ npm start
```


text:
# Key Whisper (short: kWhisper)

<img src="https://github.com/cpz/kWhisper/blob/main/images/extension-logo.png" width="200" height="200">

[kWhisper](https://marketplace.visualstudio.com/items?itemName=cpz.kWhisper "kWhisper on Visual Studio Marketplace") is extension for Azure DevOps Pipelines which gives you possibility to send messages about your build/release process or custom mesages to Keybase.io.

## Getting started

Only three steps to start receiving your notifications:

1. Create a bot
2. Create paper key for bot
3. Customize bot message

**Creating bot**: we just need to register account as default account. (e.g. kbot is just account used as bot)

## Customize your message

There are some basic predefined features both for build and release tasks.

**General**

- **Task Status** - Adds information about task status (e.g Failed, Succeeded)
- **Project** - Adds project URL (e.g <https://yourteam.visualstudio.com/>).
- **Release** - Adds release name to message.
- **Reason** - Adds information about event that caused the build to run to message.
- **Build Number** - Adds build number to message.
- **Queued by** - Adds info about who queued the build to message.
- **Message Text** - Adds custom message text to message.

**Misc**

- **Status React** - Adds task status react to message.
- **Custom React** - Adds your own react to mesage (e.g. :thinking_face:)

## Example

![example of message](https://raw.githubusercontent.com/cpz/kWhisper/master/images/example.png)

## License

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

### Copyright

Key Whisper not affiliated with Keybase.io and Keybase Logo rights belongs to them.

![kWhisper logo small](https://raw.githubusercontent.com/cpz/kWhisper/main/images/extension-logo-small.png)

repository: cpz/kWhisper

branch_name: refs/heads/main

repo_name: cpz/kWhisper


text:
# Structure Racoon

# Overall structure

Racoon is composed of multiple mostly-independant blockchains each maintaining a state and processing transactions. These blockchains are structured as a tree, each blockchain having between 0 and multiple children and 1 parent (except the root of the tree having no parent). The root chain is called the **beacon chain** and all others are called **shard chains**.
The beacon chain is responsible of validators stakes and rewards, while shard chains are responsible of smart contracts and users (validator or not) transactions with these contracts.

##
# Data structures
## `Validator`
- `sig_type` (4 bytes) : identifier of the signature scheme used by this validator. Allow to add new signature schemes in the future in a backward-compatible way.
- `pubkey_hash` (32 bytes) : hash of the public key of the validator. Hashing the key allow to have a fixed-size registered data regardless of the signature scheme. When verifying a validator signature, the public key is extracted from it and hashed to verify if it matches `pubkey_hash`. *secp256k1* (Bitcoin, Ethereum) signatures allow to recover the public key from the signature. Schemes without key recovery will have the complete public key appended to the signature to check against `pubkey_hash`.

The hash of this structure is called the **validator address**.

## `EpochValidator`
- `address` (32 bytes) : validator address (see `[Validator](#Validator)`).
- `power` (32 bytes) : percentage of the stake of this validator in the whole validator pool as a floating-point value between 0 and 1.

## `Epoch`
- `seed` (32 bytes) : value used as a seed in the deterministic pseudo-random number generator used to compute validators weights.
- `validators` (32 bytes) : Merkle root of a tree containing the list of `[EpochValidator](#EpochValidator)` (one for each validator) which will be used for this epoch calculations.

## `BeaconBlockHeader`
- `previous` (32 bytes) : hash the previous `BeaconBlockHeader` in the chain.
- `height` (8 bytes) : height of the block.
- `validator_index` (8 bytes) : index of this block validator in the current `[Epoch](#Epoch)``.validators`.
- `body` (32 bytes) : hash of `BeaconBlockBody`
- `finalized_headers` (32 bytes) : Merkle root of a tree containing the list of all neighbor last finalized `ShardBlockHeader` hashes on the beacon chain.
- `epoch_0` (32 bytes) : hash of `Epoch` for even epochs.
- `epoch_1` (32 bytes) : hash of `Epoch` for odd epochs.
- `world` (32 bytes) : hash of `[BeaconWorld](#BeaconWorld)`.

We will alias `epoch_0` as `epoch_current` in even epochs and `epoch_next` in odd epochs, and `epoch_1` as `epoch_current` in odd epochs and `epoch_next` in even epochs.
`epoch_current` will be used for current epoch consensus calculations, while `epoch_next` will be updated so it can be used in the next epoch.

Having 2 fields is necessary for all chains to use the same `Epoch` as the same time. If only one field were used, shards would lag behind the beacon until the beacon block with the new `Epoch` is finalized on the shard. By having 2 fields, `epoch_next` can be updated and reach all shards before the next epoch, allowing all chains to switch to the same `Epoch` at the same time.

## `BeaconWorld`
- `events_mmr` (32 bytes) : Root of a Merkle Mountain Range of all events emitted on the beacon chain since the genesis.
- `events_cmt` (32 bytes) : Root of a Comb Merkle Tree of all events emitted on the beacon chain since the genesis.
- `used_shards_events` (32 bytes) : Root of a Sparse Merkle Tree associating shard events to a boolean telling if it was used on the beacon shard before. Used to prevent replays of transfers of *kits* from shards to the beacon.
- `state` (32 bytes) : hash of `[BeaconState](#BeaconState)`.

## `BeaconState`
- `balances` (32 bytes) : Root of a Sparse Merkle Tree associating a validator address to its `[StakeBalances](#StakeBalances)`.
- `joining` (32 bytes) : Root of a Merkle Tree of stacking `[StakeChange](#StakeChange)`.
- `leaving` (32 bytes) : Root of a Merkle Tree of unstacking `[StakeChange](#StakeChange)`.

## `StakeBalances`
- `available` (32 bytes) : Amount of *kits* freely available for transactions.
- `staked` (32 bytes) : Amount of *kits* staked and not available for transactions.

## `StakeChange`
- `address` (32 bytes) : Address of the validator changing its stake.
- `amount` (32 bytes) : Amount of *kits* being staked/unstaked.
- `height` (32 bytes) : At which height this change was requested. Will determine at which height this change is performed on the validator `[StakeBalances](#StakeBalances)` and removed from the `joining` /`leaving` list.

repository: auctionity/racoon

repo_name: auctionity/racoon


text:
Hanyu Shuiping Kaoshi flashcard
===============================================

The Hànyǔ Shuǐpíng Kǎoshì (HSK) is China's only standardised test of Standard Chinese language proficiency for non-native speakers.

The test is administered by Hanban, an agency of the Ministry of Education of the People's Republic of China.

This flashcard application is meant for exercising to the test.

## Syntax and example

To start, write

    $ python3 main.py hsk_level

in your terminal, where `hsk_level` is an integer between 1 and 6. A window will appear, as shown below.

![](img/s1.png)

First, the program displays the 汉字, while you have to input the Pinyin. The program uses numbers for writing tones, as shown in

*Description * | First tone | Second Tone | Third Tone | Forth Tone | Neutral
--- | --- | --- | --- | --- | ---
Pinyin Example | mā | má | mǎ | mà | ma
Program Example | ma1 | ma2 | ma3 | ma4 | ma5

The correct answer for the figure below is

![](img/s2.png)

The program also checks that you have gotten the correct meaning of the word.

![](img/s3.png)

If using MacOS, the built-in system voice for Chinese can be used to practice pronunciation.

repository: kulia/hsk-python

repo_name: kulia/hsk-python


text:
# Installing Skopeo

## Distribution Packages
`skopeo` may already be packaged in your distribution. This document lists the
installation steps for many distros, along with their information and support links.

### Fedora

```sh
sudo dnf -y install skopeo
```

[Package Info](https://src.fedoraproject.org/rpms/skopeo) and
[Bugzilla](https://bugzilla.redhat.com/buglist.cgi?bug_status=__open__&classification=Fedora&component=skopeo&product=Fedora)

Fedora bugs can be reported on the Skopeo GitHub [Issues](https://github.com/containers/skopeo/issues) page.

### RHEL / CentOS Stream ≥ 8

```sh
sudo dnf -y install skopeo
```

If you are a RHEL customer, please reach out through the official RHEL support
channels for any issues.

CentOS Stream 9: [Package Info](https://gitlab.com/redhat/centos-stream/rpms/skopeo/-/tree/c9s) and
[Bugzilla](https://bugzilla.redhat.com/buglist.cgi?bug_status=__open__&classification=Red%20Hat&component=skopeo&product=Red%20Hat%20Enterprise%20Linux%209&version=CentOS%20Stream)

CentOS Stream 8: [Package Info](https://git.centos.org/rpms/skopeo/tree/c8s-stream-rhel8) and
[Bugzilla](https://bugzilla.redhat.com/buglist.cgi?bug_status=__open__&classification=Red%20Hat&component=skopeo&product=Red%20Hat%20Enterprise%20Linux%208&version=CentOS%20Stream)

### RHEL/CentOS ≤ 7.x

```sh
sudo yum -y install skopeo
```

CentOS 7: [Package Repo](https://git.centos.org/rpms/skopeo/tree/c7-extras)

### openSUSE

```sh
sudo zypper install skopeo
```

[Package Info](https://software.opensuse.org/package/skopeo)

### Alpine

```sh
sudo apk add skopeo
```

[Package Info](https://pkgs.alpinelinux.org/packages?name=skopeo)

### macOS

```sh
brew install skopeo
```

### Nix / NixOS
```sh
$ nix-env -i skopeo
```

[Package Info](https://search.nixos.org/packages?&show=skopeo&query=skopeo)

### Debian

The skopeo package is available on [Bullseye](https://packages.debian.org/bullseye/skopeo),
and Debian Testing and Unstable.

```bash
# Debian Bullseye, Testing or Unstable/Sid
sudo apt-get update
sudo apt-get -y install skopeo
```

[Package Info](https://packages.debian.org/stable/skopeo)

### Raspberry Pi OS arm64 (beta)

Raspberry Pi OS uses the standard Debian's repositories,
so it is fully compatible with Debian's arm64 repository.
You can simply follow the [steps for Debian](#debian) to install Skopeo.

### Ubuntu

The skopeo package is available in the official repositories for Ubuntu 20.10
and newer.

```bash
# Ubuntu 20.10 and newer
sudo apt-get -y update
sudo apt-get -y install skopeo
```

[Package Info](https://packages.ubuntu.com/jammy/skopeo)

### Windows
Skopeo has not yet been packaged for Windows. There is an [open feature
request](https://github.com/containers/skopeo/issues/715) and contributions are
always welcome.

## Container Images

Skopeo container images are available at `quay.io/skopeo/stable:latest`.
For example,

```bash
podman run docker://quay.io/skopeo/stable:latest copy --help
```

[Read more](./contrib/skopeoimage/README.md).

## Building from Source

Otherwise, read on for building and installing it from source:

To build the `skopeo` binary you need at least Go 1.19.

There are two ways to build skopeo: in a container, or locally without a
container. Choose the one which better matches your needs and environment.

### Building without a container

Building without a container requires a bit more manual work and setup in your
environment, but it is more flexible:

- It should work in more environments (e.g. for native macOS builds)
- It does not require root privileges (after dependencies are installed)
- It is faster, therefore more convenient for developing `skopeo`.

Install the necessary dependencies:

```bash
# Fedora:
sudo dnf install gpgme-devel libassuan-devel btrfs-progs-devel device-mapper-devel
```

```bash
# Ubuntu (`libbtrfs-dev` requires Ubuntu 18.10 and above):
sudo apt install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config
```

```bash
# macOS:
brew install gpgme
```

```bash
# openSUSE:
sudo zypper install libgpgme-devel device-mapper-devel libbtrfs-devel glib2-devel
```

Make sure to clone this repository in your `GOPATH` - otherwise compilation fails.

```bash
git clone https://github.com/containers/skopeo $GOPATH/src/github.com/containers/skopeo
cd $GOPATH/src/github.com/containers/skopeo && make bin/skopeo
```

By default the `make` command (make all) will build bin/skopeo and the documentation locally.

Building of documentation requires `go-md2man`. On systems that do not have this tool, the
document generation can be skipped by passing `DISABLE_DOCS=1`:
```
DISABLE_DOCS=1 make
```

### Cross-compilation

For cross-building skopeo, use the command `make bin/skopeo.OS.ARCH`, where OS represents
the target operating system and ARCH stands for the desired architecture. For instance,
to build skopeo for RISC-V 64-bit Linux, execute:

```bash
make bin/skopeo.linux.riscv64
```

### Building documentation

To build the manual you will need go-md2man.

```bash
# Debian:
sudo apt-get install go-md2man
```

```
# Fedora:
sudo dnf install go-md2man
```

```
# MacOS:
brew install go-md2man
```

Then

```bash
make docs
```

### Building in a container

Building in a container is simpler, but more restrictive:

- It requires the `podman` command and the ability to run Linux containers.
- The created executable is a Linux executable, and depends on dynamic libraries
  which may only be available only in a container of a similar Linux
  distribution.

```bash
$ make binary
```

### Shell completion scripts

Skopeo has shell completion scripts for bash, zsh, fish and powershell. They are installed as part of `make install`.
You may have to restart your shell in order for them to take effect.

For instructions to manually generate and load the scripts please see `skopeo completion --help`.

### Installation

Finally, after the binary and documentation is built:

```bash
sudo make install
```

### Building a static binary

There have been efforts in the past to produce and maintain static builds, but the maintainers prefer to run Skopeo using distro packages or within containers. This is because static builds of Skopeo tend to be unreliable and functionally restricted. Specifically:
- Some features of Skopeo depend on non-Go libraries like `libgpgme` and `libdevmapper`.
- Generating static Go binaries uses native Go libraries, which don't support e.g. `.local` or LDAP-based name resolution.

That being said, if you would like to build Skopeo statically, you might be able to do it by combining all the following steps.
- Export environment variable `CGO_ENABLED=0` (disabling CGO causes Go to prefer native libraries when possible, instead of dynamically linking against system libraries).
- Set the `BUILDTAGS=containers_image_openpgp` Make variable (this removes the dependency on `libgpgme` and its companion libraries).
- Clear the `GO_DYN_FLAGS` Make variable if even a dependency on the ELF interpreter is undesirable.

Keep in mind that the resulting binary is unsupported and might crash randomly. Only use if you know what you're doing!

For more information, history, and context about static builds, check the following issues:

- [#391] - Consider distributing statically built binaries as part of release
- [#669] - Static build fails with segmentation violation
- [#670] - Fixing static binary build using container
- [#755] - Remove static and in-container targets from Makefile
- [#932] - Add nix derivation for static builds
- [#1336] - Unable to run skopeo on Fedora 30 (due to dyn lib dependency)
- [#1478] - Publish binary releases to GitHub (request+discussion)

[#391]: https://github.com/containers/skopeo/issues/391
[#669]: https://github.com/containers/skopeo/issues/669
[#670]: https://github.com/containers/skopeo/issues/670
[#755]: https://github.com/containers/skopeo/issues/755
[#932]: https://github.com/containers/skopeo/issues/932
[#1336]: https://github.com/containers/skopeo/issues/1336
[#1478]: https://github.com/containers/skopeo/issues/1478

repository: containers/skopeo

gha_language: Go

repo_name: containers/skopeo


text:
---
name: The Preacher
rarity: 4
series: ds9
memory_alpha:
bigbook_tier: 9
events: 6
in_portal:
date: 22/03/2023
obtained: Event
mega: false
published: true
---

“Oh, that my words were now written. Oh, that they were printed in a BigBook. Write those words, Brother BB. Let them see the glory of what lies ahead.”

Finally leaping from the hallucinations of a grieving and conflicted Captain Sisko and into Star Trek Timelines is everyone’s favourite unnamed 20th Century Preacher played by Brock Peters! Sadly, the wait has not been worth it, as he’s a largely DOA Super Rare Skillet. No Voyage, no Gauntlet, no Ship Battle viability…no point dwelling on it.

Don’t despair, for younger accounts (or Purple Only alts) can find use in his DIP base for daily shuttle work or perhaps when the odd trait triggers for a Faction Event. Speaking of traits, he does have a place in two Stat-Boosting Collections with a chance at three more (also, seriously WRG, Far Beyond the Stars when?!?!), so he could grab some nice retroactive value down the line. Go now and write the truth that's in your heart. The truth that shall set them free! Praise be the word of the BigBook. Praise to the word of the BB Authors.

repository: joshurtree/datacore-website

repo_name: joshurtree/datacore-website


text:
---
layout: post
title:  "Web Animation Using GSAP"
date:   2017-03-19 22:30:00 +0800
categories: blog
id: 23
---
*GSAP* stands for *GreenSock Animation Platform*. It is a very efficient and high performance HTML5 animation library, lightweight and fast. It is the best JavaScript animation library that I have used. :link:[GSAP][GSAP].

*GSAP* is also very easy to use. All you need to do is incorporating the library to your HTML file and starting using the APIs. Don't worry if you see a lot of JavaScript files from the downloaded zip file from the *GSAP* website. Just use *TweenMax.min.js* will be a safe to go. The following code shows a red ball circulating around the center of the box. It can be regarded as a simple replica of the one I did for the canvas game in the post of March 15th 2017. For brevity, the HTML and CSS codes are ommited and *jQuery* is being used by default.

{% highlight javascript %}
var ball = $("#ball");
var tl = new TimelineMax(); //Create a TimelineMax object
tl.to(ball, 4, {
    bezier: { //define the curve for the ball to follow
        type: "thru",
        curviness: 2,
        autoRotate: 45,
        values: [
            {left: 450, top: 300},
            {left: 300, top: 450},
            {left: 150, top: 300},
            {left: 300, top: 150},
            {left: 450, top: 300}
        ]
    },
    repeat: -1, //repeate infinitely
    ease: Linear.easeNone
    });
$(".btn-pause").click(function() { //click to pause the animation
    tl.pause();
});
$(".btn-resume").click(function() { //click to resume the animation
    tl.play();
});
$(".btn-reverse").click(function() { //click to reverse the animation
    tl.reverse();
});
{% endhighlight %}

There are indeed not much to say about the code above. Because it explains all by itself. You can do so much animation by using the free version of the *GSAP*. If you want to do more and for your business use, you can pay to get the paid bonus to get more features for animation. However, I do think it is worth the price.

To recap:

* :bell:*GSAP* libraries contains: `TimelineLite`, `TimelineMax`, `TweenLite` and `TweenMax`. `Lite` is just a lightweight version compared with `Max`
* :bell:*GSAP* also has plugins for extended features such as animating CSS rules
* :bell:*GSAP* has more features such as *physics* in paid bonus versions

[GSAP]: https://greensock.com/

extension: markdown


text:
# rebase

You can see it like an alternative to **Merge** when they are complex.
**For advance users only,** usefull to fix conplex merge issue because it will replay historic on the right order and then reduce conflicts. But at the same time it will create new commits and if it's on a public repos, you wil cause issues for all the others developpers.


text:
# Simulating a Self Driving Car

![Demo](https://github.com/Aniruddha-Tapas/Simulating-a-Self-Driving-Car/blob/master/screencast/output.gif)

Overview
============
A project that trains a virtual car to move an object around a screen (drive itself) without running into obstacles using a type of reinforcement learning called Q-Learning. More information can be found on the writeup about this project in [part 1](https://medium.com/@harvitronix/using-reinforcement-learning-in-python-to-teach-a-virtual-car-to-avoid-obstacles-6e782cc7d4c6), [part 2](https://medium.com/@harvitronix/reinforcement-learning-in-python-to-teach-a-virtual-car-to-avoid-obstacles-part-2-93e614fcd238#.vbakopk4o), and [part 3](https://medium.com/@harvitronix/reinforcement-learning-in-python-to-teach-an-rc-car-to-avoid-obstacles-part-3-a1d063ac962f).

Dependencies
============

* Numpy (http://www.numpy.org/)
* Pygame. I used these instructions: http://askubuntu.com/questions/401342/how-to-download-pygame-in-python3-3 but with ```pip3 install hg+http://bitbucket.org/pygame/pygame``` after I installed the dependencies
* Pymunk. Use Pymunk 4. Using version 5 will not work as it was a major refactor. V4 is [here](https://github.com/viblo/pymunk/releases/tag/pymunk-4.0.0)
* Keras ```pip3 install keras```
* Theanos ```pip3 install git+git://github.com/Theano/Theano.git --upgrade --no-deps```
* h5py ```pip3 install h5py```

Basic Usage
===========

1. Update pymunk to python3 by CDing into its directory and running  ```2to3 -w *.py```. Then copy and replace the sub-folder "pymunk" from this directory with your installed "pymunk" sub-folder.

2. First, you need to train a model. This will save weights to the `saved-models` folder. You can train the model by running `python3 learning.py` It can take anywhere from an hour to 36 hours to train a model, depending on the complexity of the network and the size of your sample. However, it will output weights every 25,000 frames, so you can move on to the next step in much less time.

3. Edit the `nn.py` file to change the path name for the model you want to load. I've uploaded my own trained models, you can directly use them as a demo, or go ahead to train the system yourself.

4. Then finally, watch the car drive itself around the obstacles! Run `python3 playing.py`

Credits
===========
This project is inspired and built with the help of this [blog](https://medium.com/@harvitronix/using-reinforcement-learning-in-python-to-teach-a-virtual-car-to-avoid-obstacles-6e782cc7d4c6) at [medium.com](https://medium.com/). Hence, credit for the majority of code here goes to [Harvitronix](https://github.com/harvitronix/reinforcement-learning-car). Below are a few references he cited.

- Playing Atari with Deep Reinforcement Learning - http://arxiv.org/pdf/1312.5602.pdf
- Deep learning to play Atari games: https://github.com/spragunr/deep_q_rl
- Another deep learning project for video games: https://github.com/asrivat1/DeepLearningVideoGames
- A great tutorial on reinforcement learning that a lot of my project is based on: http://outlace.com/Reinforcement-Learning-Part-3/


text:
# trower-base64

C implementation of base64 encode/decode.

[![Build Status](https://travis-ci.org/Comcast/trower-base64.svg?branch=master)](https://travis-ci.org/Comcast/trower-base64) [![codecov.io](http://codecov.io/github/Comcast/trower-base64/coverage.svg?branch=master)](http://codecov.io/github/Comcast/trower-base64?branch=master)
[![coverity](https://img.shields.io/coverity/scan/17585.svg)](https://scan.coverity.com/projects/trower-base64)
[![GitHub release](https://img.shields.io/github/release/Comcast/trower-base64.svg)](CHANGELOG.md)

This is a fork of the implementation Bob Trower produced and released in 2001.
You can find the original here: http://base64.sourceforge.net/

# Why fork?

As we started using the library we found it was hugely handy, but had a few bugs
and not as many tests as we wanted.  As the upstream project seems to have lost
steam, we decided to fork, improve, release and ship.

# Building and Testing Instructions

```
mkdir build
cd build
cmake ..
make
make test
make coverage
firefox index.html


text:
# Go GraphQL ToDo example

An example that consists of basic core GraphQL queries and mutations.

To run the example navigate to the example directory by using your shell of choice.

```
cd examples/todo
```

Run the example, it will spawn a GraphQL HTTP endpoint

```
go run main.go
```

Execute queries via shell.

```
// To get single ToDo item by ID
curl -g 'http://localhost:8080/graphql?query={todo(id:"b"){id,text,done}}'

// To create a ToDo item
curl -g 'http://localhost:8080/graphql?query=mutation+_{createTodo(text:"My+new+todo"){id,text,done}}'

// To get a list of ToDo items
curl -g 'http://localhost:8080/graphql?query={todoList{id,text,done}}'

// To update a ToDo
curl -g 'http://localhost:8080/graphql?query=mutation+_{updateTodo(id:"b",text:"My+new+todo+updated",done:true){id,text,done}}'
```

## Web App

Access the web app at `http://localhost:8080/`. It is work in progress and currently is simply loading todos by using jQuery ajax call.

repository: graphql-go/graphql

repo_name: graphql-go/graphql


text:
# Delani Studio
#### By **Peris Oduol**
## Description

 This is the link to my [live site]( perisoduol618.github.io/delani-studio/)

 When you work with us,you are part of a team of commited collaborators.All aspects of our software development process are intergrated,interactive and agile.
 Our approach unfiles design, development and product management to create exceptional products
## Setup/Installation Requirements
* Under the repository name, click Clone or download.
* In the Clone with HTTPs section, click  to copy the clone URL for the repository.
* Open the terminal.
* Change the current working directory to the location where you want the cloned directory to be made.
* Type git clone, and then paste the URL you copied.
* Press Enter. Your local clone will be created.
## Known Bugs
* There are no known bugs at the moment.
## Technologies Used
* HTML
* CSS
* JavaScript
* Bootsrap
## Support and contact details
Incase you come across errors, have questions, ideas ,concerns, or want to contribute to the page, feel free to reach me at<EMAIL_ADDRESS>
## License
*MIT License*

Copyright (c) 2020 Peris Oduol

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.


text:
+++
title = "In The Beginning"
draft = false
date = "2016-10-31T22:49:58Z"
tags = ["development"]
+++

Why did I bother writing +F? There are already plenty of fully-featured, freely-available Spectrum emulators for
more or less any platform you care to think of. Indeed, I remember using a perfectly playable one on the Commodore
Amiga as far back as 1994 or 1995 (ZXAM by Antonio J. Pomar Roselló), so it's hardly a novel idea.

I did have a little twist which I wanted to add, which at the time I started writing didn't appear to be available
in any other emulator, namely the ability to play games across the Internet. (It turns out that [RealSpec](http://zxm.speccy.cz/realspec/)
claims to do this and more, but I haven't tried it.)

More than just that, though, it was probably inevitable I would end up trying this sooner or later. Much like
mountaineers are reputed to climb mountains "because they're there", or lovelorn teenage boys write dreadful and
embarrassing poetry, the chances of a programming geek with a fondness for 80s gaming writing an emulator are
rather high. (Given I'd already written a
[Chrome plugin that uses CSS to emulate Spectrum loading borders](https://chrome.google.com/webstore/detail/speccy-loading-borders/jakeajfeddddpglibndhjhdmlinejihf),
it's safe to say that I've got form.)

*So Mr. Nerdy-Nerdy has a warm, fuzzy feeling about his pet project*, you may be thinking. *Very good, move along.*

And to a certain extent, you're right. There's nothing novel about +F and I certainly wasn't planning to blog about
it. Indeed, if I was just a programming geek by night, I probably wouldn't have, but I've actually also been a programming
geek by profession for the best part of two decades. When you do anything for that length of time, you run the risk of
it becoming an overlearned skill, something you don't necessarily need to devote much conscious thought to.
You learn all manner of techniques and best practices from the people you work with, you learn your own lessons, pick
your favourites, and you'll also probably tend to adopt and fit in with the way that your team works.

Combine that with time pressures and shifting requirements, and it can be easy to go through the motions and forget *why*
you do things the way you do them. Best practices only become so because they have been shown to provide benefits,
but it's easy to forget this and slip into something of a ritualistic mentality about the way you build software. *If our
code coverage metrics hit the magic number, we make sure the digits of our release number don't add up to thirteen, and
we sacrifice a chicken, the software gods will smile upon us and our release will be successful.*

With +F being a personal hobby project, and me being answerable to nobody but myself for its success or otherwise, I
wasn't subject to the formalities of software development which I've become used to in my day job. I could completely
freely choose which ones to follow and which ones to ignore. It's fair to say that there was a fair amount of unwarranted
bravado about the choices I made, an air of *it can't be that complicated* (wrong), *I do more difficult things than
this every day* (wrong again) and *I'm old enough to know what I'm doing* (even more wrong) about my approach.

The result is the catalogue of gaffes, goofs and prat-falls you're going to read about in this blog. I will, of course,
make the odd diversion into the simultaneously mundane and fascinating details of emulation, but what I really want to
get across as I write is that there really *are* good reasons why we do things the way we do, and if we lose sight of that
then we are bound to repeat the mistakes of the past.

That does sound rather heavy and fatalistic, but the flip-side is to realise that yourself and others have already done
the hard work of figuring out how to do software well, and it's that note of encouragement I hope you take away with you.

I hope you find my writing enjoyable.


text:
---
layout: post
title: "Additional Baseline Metrics for the paper 'Extended YouTube Faces: a Dataset for Heterogeneous Open-Set Face Identification'"
date: 2019-02-11 10:26:21
categories: arXiv_CV
tags: arXiv_CV Face Recognition
author: Claudio Ferrari, Stefano Berretti, Alberto Del Bimbo
mathjax: true
---

* content
{:toc}

##### Abstract
In this report, we provide additional and corrected results for the paper "Extended YouTube Faces: a Dataset for Heterogeneous Open-Set Face Identification". After further investigations, we discovered and corrected wrongly labeled images and incorrect identities. This forced us to re-generate the evaluation protocol for the new data; in doing so, we also reproduced and extended the experimental results with other standard metrics and measures used in the literature. The reader can refer to the original paper for additional details regarding the data collection procedure and recognition pipeline.

##### Abstract (translated by Google)

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

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


text:
## Welcome! Final Project!

### Live URL of the project.

Live URL: http://task-manager.gopagoda.com

### Description of the project (2-3+ sentences).

This is my final project, which is a simple task manager that creates users and assigns them to various tasks they create which can be kept track by Complete, Incomplete, All tasks tables (really just a  SQL quesry in the case of my program). The user can also edit and change these tasks.

While I think it looks simplistic in nature, there was a surprising amount of debugging needed. Most of my efforts spent were on trying to understand how PHP and Laravel can work with a project, so I made sure that this project has an MVC type framework. If you have any comments to me on how I can take this project further, I would really appreciate it!

### Any details the instructor or TA needs to know, for example, test credentials.

I wanted to bring attention to some of the bugs I've been having. For starters, I'm having a lot of problems debugging my Edit Tasks because I can't get the Complete Boxes to generate and autofill what they were previously. Also, to this same application, my validation is not working! I assumed that Edit would have the same validation as Create Task, but that doesn't seem to be the case.

Finally, and this is something I would be interested in learning, I would like to have better visual quality. While my Front End skills aren't beautiful, can you recommend anything for this. Please feel free to make suggestions on added functionalities and maybe applications!

Some suggestions from classmates:
- Warning when deadline is approaching
- Export as table or PDF?
- Better visual effects
- Mobile Application?

### Laravel PHP Framework

[![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework)
[![Total Downloads](https://poser.pugx.org/laravel/framework/downloads.svg)](https://packagist.org/packages/laravel/framework)
[![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework)
[![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework)
[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework)

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

Laravel aims to make the development process a pleasing one for the developer without sacrificing application functionality. Happy developers make the best code. To this end, we've attempted to combine the very best of what we have seen in other web frameworks, including frameworks implemented in other languages, such as Ruby on Rails, ASP.NET MVC, and Sinatra.

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

## Official Documentation

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

### Contributing To Laravel

**All issues and pull requests should be filed on the [laravel/framework](http://github.com/laravel/framework) repository.**

### License

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


text:
Other resources:

[Eric Neilsen summary / sims_seeingModel issue](https://github.com/lsst/sims_seeingModel/issues/2)

[SDSS PSF analysis (Bo Xin)](https://arxiv.org/abs/1805.02845)


text:
# .NET-Core-Exercise
## How to use?
### OSX (maybe also in linux)
* Build the webserver

```
$ cd HttpServer
$ dotnet restore
  Restoring packages for /Users/yunseong/git/dotnet-core-exercise/HttpServer/HttpServer/HttpServer.csproj...
  Lock file has not changed. Skipping lock file write. Path: /Users/yunseong/git/dotnet-core-exercise/HttpServer/HttpServer/obj/project.assets.json
  Restore completed in 521.07 ms for /Users/yunseong/git/dotnet-core-exercise/HttpServer/HttpServer/HttpServer.csproj.

  NuGet Config files used:
      /Users/yunseong/.nuget/NuGet/NuGet.Config

  Feeds used:
      https://api.nuget.org/v3/index.json
```

* Run the webserver

```
$ cd HttpServer
$ dotnet run
Hosting environment: Production
Content root path: /Users/yunseong/git/dotnet-core-exercise/HttpServer/HttpServer/bin/Debug/netcoreapp1.1
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
```

* Go to the browser and open `localhost:5000`, then you will see the response from the server.

```
Hello World. The Time is: 10:31:52 PM
```

### Windows (TODO)
Maybe we can build & run this application in VisualStudio

repository: yunseong/DotNet-Core-Exercise

gha_language: C#

repo_name: yunseong/DotNet-Core-Exercise


text:
---
title: VMware ESXi
---

## Misc commands
(to be used with SSH--see below for enabling SSH)

#### Test connectivity (telnet isn't available)
[http://kb.vmware.com/kb/2020669%E2%80%8E](http://kb.vmware.com/kb/2020669%E2%80%8E)
```
nc-z IP PORT
```

Ex:
```
nc -z <IP_ADDRESS> 3260
```

#### List VMs (get vmIds):
```
vim-cmd vmsvc/getallvms
```

#### VM status:
```
vim-cmd vmsvc/power.getstate VMID
```

#### Power on/off a VM:
```
vim-cmd vmsvc/power.[on/off] VMID
```

#### Get the IP address of a VM:
```
vim-cmd vmsvc/get.summary VMID | grep ipAddress
```

#### To list available commands:
```
vim-cmd help
vim-cmd vmsvc
```

#### Standard VM operations:
```
vim-cmd vmsvc/power.getstate VMID
vim-cmd vmsvc/power.on VMID
vim-cmd vmsvc/power.off VMID
vim-cmd vmsvc/power.suspend VMID
vim-cmd vmsvc/power.reset VMID
vim-cmd vmsvc/power.shutdown VMID
vim-cmd vmsvc/power.reboot VMID
vim-cmd vmsvc/power.hibernate VMID
vim-cmd vmsvc/snapshot.create VMID SNAPSHOTNAME SNAPSHOTDESCRIPTION INCLUDEMEMORY
```

Ex:
```
vim-cmd "vmsvc/snapshot.create XXXX FIRST_SNAPSHOT MY_FIRST_SNAPSHOT_1"
vim-cmd vmsvc/snapshot.revert VMID SNAPSHOTLEVEL SNAPSHOTINDEX
```

```
vim-cmd "vmsvc/snapshot.revert XXXX 1"
vim-cmd vmsvc/snapshot.removeall VMID
vim-cmd vmsvc/snapshot.remove VMID REMOVECHILDREN SNAPSHOTLEVEL SNAPSHOTINDEX
vim-cmd vmsvc/snapshot.get VMID
```

#### Remove a VM:
```
vim-cmd vmsvc/unregister VMID
```
Then delete the vm directory from the datastore (/vmfs/...)

#### Maintenance mode for ESX host:
**Note:** unfortunately this command will not evacuate/VMotion your VMs to rest of the cluster
```
vim-cmd hostsvc/maintenance_mode_enter
vim-cmd hostsvc/maintenance_mode_exit
```

#### Show the DCUI (direct console user interface)
(Thanks [Josh](http://bmaupin.wordpress.com/about/#comment-81))
```
dcui
```

Ctrl-C to exit

## Installation

#### Installation Problems
If you get an error stating you need to Disable the CPUID value or enable legacy OS support:
1. At the initial bootloader screen (when booting from the ISO), press TAB to edit the boot options
1. Hold down the left-arrow key to move the cursor back to the beginning of the boot options, and add "nocheckCPUIDLimit" right after "vmkernel.gz", so that the first part of the boot options BEFORE the first "---" reads: "mboot.c32 vmkernel.gz nocheckCPUIDLimit ---"
    1. In the new ESXi 4.0 bootloader, more modules have been added to the list, including a vmkboot.gz, which now loads before the vmkernel.gz module.
        This means the correct loader syntax would actually read: mboot.c32 vmkboot.gz nocheckCPUIDLimit — vmkernel.gz — [etc].
1. Press ENTER.
1. If you were able to get the install to work with the nocheckCPUIDlimit, during the boot, hit shift o, and a screen will appear with advanced options at the bottom. Enter the nocheckCPUIDlimit and press enter, the system will boot to 3i. After boot, connect to the server using the VI client, select the host, go to the Configuration tab, Software, choose Advanced Settings, expand Vmkernel, select Boot, and uncheck Vmkernel.Boot.checkCPUIDlimit. Click OK and the server will boot without intervention.

#### Enter the license
Select the host > Configuration > Software >
Licensed Features > ESX Server License Type > Edit... >
Assign a new license key to this host > Enter Key... > (enter key) > OK

#### To get to a terminal
1. At main ESXi screen, press Alt-F1
1. Type "unsupported"
1. Type in root password

#### Enable SSH (from terminal)
1. Edit /etc/inetd.conf
    ```
    vi /etc/inetd.conf
    ```
1. Uncomment ssh line (remove # from line that starts with #ssh)
1. Save the file (:wq)
1. Restart inetd
    ```
    kill -HUP `ps | grep inetd`
    ```

#### Add non-root user as an admin
1. Log in to infrastructure client
1. Select the host icon
1. In the right side of the screen, click on the "Users & Groups" tab
1. Right-click in the window, click Add...
1. Type in a login (and optionally user name)
1. Type a password
1. Type "root" into the Group box and click Add
1. Type "localadmin" into the Group box and click Add
1. Click OK
1. Click on the Permissions tab
1. Right-click in the window, click Add Permission...
1. In the left side of the screen, click Add
1. Select username, click Add, OK
1. In the dropdown box on the right, choose Administrator, then click OK

#### Set up SSH for non-root users
1. Log in to the console
1. Edit the inetd.conf
    ```
    vi /etc/inetd.conf
    ```
1. Search for the following line (type: "/ssh") (This is the line you uncommented to enable SSH in the first place.)
    ```
    ssh stream tcp nowait root /sbin/dropbearmulti dropbear ++min=0,swap,group=shell -i
    ```
1. Add -w to the end of this line: (type: "i" for insert mode):
    ```
    ssh stream tcp nowait root /sbin/dropbearmulti dropbear ++min=0,swap,group=shell -i -w
    ```
1. Exit and save the file (press escape, type ": x")
1. Edit the file /etc/passwd:
    1. Change the home directory from /home/[user] to /
    1. Change the login from /bin/false or /bin/nologin to /bin/ash
    1. Save the file
1. Restart the network:
    ```
    kill -HUP `ps | grep inetd`
    ```
Now you can log in with SSH using your new unprivileged user
Use `su -` to change to the root user.

#### Set up useful scripts
(Thanks [Josh](http://bmaupin.wordpress.com/about/#comment-81) for the improvements)

vi /opt/get-ips.sh

```
#!/bin/ash
for item in $(vim-cmd vmsvc/getallvms | egrep ^[0-9]+ | awk '{print $1}');do
    echo -en "${item} $(vim-cmd vmsvc/get.summary ${item} | grep ipAddress) \n"
done
```

vi /opt/get-power.sh

```
#!/bin/ash
for item in `vim-cmd vmsvc/getallvms | awk '{print $1}' | egrep -v Vmid`; do echo "${item}"; vim-cmd vmsvc/power.getstate "${item}"; done
```

chmod 744 /opt/get*.sh

#### Set up ESXi to do DHCP with a hostname
**Warning:** use caution when following these instructions so you don't accidentally duplicate an IP
1. Log in to infrastructure client, click on host, click configuration tab
1. Click networking, and then for virtual switch: vSwith0 click Properties...
1. Select Management Network, Edit
1. Click Use the following IP settings, click OK
1. Select Management Network and click Edit again
1. By VMkernel Default Gateway click Edit...
1. Click the DNS configuration tab, and type the hostname in Name, example.com in Domain and in the last box (look for hosts in the following domains) then do the steps below to "set up esxi to send dhcp hostname"

#### Set up ESXi to send DHCP hostname
1. SSH to the machine
1.
    ```
    mkdir /tmp/oem/
    ```
1.
    ```
    tar xzf /bootbank/oem.tgz -C /tmp/oem
    ```
1.
    ```
    mkdir -p /tmp/oem/etc/rc.local.d
    ```
1.
    ```
    vi /tmp/oem/etc/rc.local.d/send-hostname
    ```
    ```
    #! /bin/ash
    if [ -r /var/run/dhcp-vmk0.pid ]; then
        kill $(cat /var/run/dhcp-vmk0.pid)
        /bin/busybox udhcpc -i vmk0 -p /var/run/dhcp-vmk0.pid --retries=20 -H $(hostname | cut -d . -f 1)
    fi
    ```
1.
    ```
    chmod +x /tmp/oem/etc/rc.local.d/send-hostname
    ```
1.
    ```
    cd /tmp/oem
    ```
1.
    ```
    tar cvzf /bootbank/oem.tgz *
    ```
1.
    ```
    cp /tmp/oem/etc/rc.local.d/send-hostname /etc/rc.local.d/ /etc/rc.local.d/send-hostname
    ```

#### Create scratch folders
Example for adding folders named vmware-01 through -32:
1. Enable SSH on the ESXi host
1. SSH to the ESXi host
1.
    ```
    cd /vmfs/volumes/scratch-datstore
    for n in $(seq -w 1 32); do mkdir vmware-$n; done
    ```

repository: bmaupin/wiki

repo_name: bmaupin/wiki


text:
# UdemyDownloader
A utility to archivate your udemy courses for offline purposes.

## Requirements

- .NET Core 2.0

## Installation

At the moment I don't provide any automated installation process, so you've to compile this application by yourself.
This utility is based on .NET Core 2.0, so you've to download the .NET Core SDK 2.0. This you can download here - https://www.microsoft.com/net/download/windows

### How to compile

Go to `src\UdemyDownloader\` and run the following commands using a terminal:
```
> dotnet restore
> dotnet build -c Release UdemyDownloader.csproj
 ```

### How to execute
You've compiled *UdemyDownloader* successfully! Now you can navigate to `src\UdemyDownloader\bin\Release\netcoreapp2.0\` and run it using the following command:
```
> dotnet UdemyDownloader.dll
```

## Usage

### Basic usage

### Advanced command line arguments

## Configuration

repository: steskalja/UdemyDownloader

repo_name: steskalja/UdemyDownloader


text:
# HiddenWasp

## Description

### MITRE Description

> [HiddenWasp](https://attack.mitre.org/software/S0394) is a Linux-based Trojan used to target systems for remote control. It comes in the form of a statistically linked ELF binary with stdlibc++.(Citation: Intezer HiddenWasp Map 2019)

## Aliases

```
HiddenWasp
```

## Platforms

```
['Linux']
``

# Techniques

* [.bash_profile and .bashrc](../techniques/.bash_profile-and-.bashrc.md)

* [Deobfuscate/Decode Files or Information](../techniques/Deobfuscate-Decode-Files-or-Information.md)

* [Obfuscated Files or Information](../techniques/Obfuscated-Files-or-Information.md)

* [Scripting](../techniques/Scripting.md)

* [Standard Non-Application Layer Protocol](../techniques/Standard-Non-Application-Layer-Protocol.md)

* [Create Account](../techniques/Create-Account.md)

* [Uncommonly Used Port](../techniques/Uncommonly-Used-Port.md)

* [Remote File Copy](../techniques/Remote-File-Copy.md)

* [Process Injection](../techniques/Process-Injection.md)

* [Rootkit](../techniques/Rootkit.md)

* [Custom Cryptographic Protocol](../techniques/Custom-Cryptographic-Protocol.md)

# Actors

None


text:
# Competitive Programming - Simple

#### Below are all the questions that are covered as part of these repositories. Start solving them and if you get stuck, then do refer to the solution.

### HAPPY LEARNING!!

1. [Two Number Sum](#Question-1)
2. [Validate Subsequence](#Question-2)
3. [Sorted Squared Array](#Question-3)
4. [Tournament Winner](#Question-4)
5. [Non-Constructible change](#Question-5)
6. [Closest Value in BST](#Question-6)
6. [Branch Sum of a Binary Tree](#Question-7)

---

##### Question 1
###### TWO NUMBER SUM (Refer blog [Two Number Sum](https://codewrestling.medium.com/two-number-sum-competitive-programming-question-with-time-and-space-complexity-24d60b0015f8) or Refer [Video](https://youtu.be/CGsOBDat3RU))

---

Write a function that takes in a non-empty array of distinct integers and an integer representing a target sum. If any two numbers in the input array sum up to the target sum, the function should return them in an array, in any order. If no two numbers sum up to the target sum, the function should return an empty array.

Note that the target sum has to be obtained by summing two different integers in the array; you can't add a single integer to itself in order to obtain the target sum.

###### Sample Test
array = [3, 5, -4, 8, 11, 1, -1, 6]

targetSum = 10

###### Sample Output
[-1,11]

---

##### Question 2
###### Validate Subsequence (Refer Blog [Validate Subsequence](https://codewrestling.medium.com/validate-subsequence-with-time-and-space-complexity-competitive-programming-6571f3575cc2)

---

Given two non-empty arrays of integers, write a function that determines whether the second array is a subsequence of the first one. A subsequence of an array is a set of numbers that aren’t necessarily adjacent in the array but that are in the same order as they appear in the array.

For instance, the numbers [1, 3, 4] form a subsequence of the array [1, 2, 3, 4], and so do the numbers [2, 4]. Note that a single number in an array and the array itself are both valid subsequences of the array.

###### Sample Test
array = [5, 1, 22, 25, 6, -1, 8, 10]

sequence = [1, 6, -1, 10]

###### Sample Output
true

---

##### Question 3
###### Sorted Squared Array (Refer Blog [Sorted Squared Array](https://codewrestling.medium.com/sorted-squared-array-with-time-and-space-complexity-competitive-programming-3956201d8a4b)

---

Write a function that takes in a non-empty array of integers that are sorted in ascending order and returns a new array of the same length with the squares of the original integers also sorted in ascending order.

###### Sample Test
array = [1, 2, 3, 5, 6, 8, 9]

###### Sample Output
[1, 4, 9, 25, 36, 64, 81]

---

##### Question 4
###### Tournament Winner (Refer Blog [Tournament Winner](https://codewrestling.medium.com/tournament-winner-with-time-and-space-complexity-competitive-programming-e9840ea36ffd)

---

There's an algorithms tournament taking place in which teams of programmers compete against each other to solve algorithmic problems as fast as possible. Teams compete in a round robin, where each team faces off against all other teams. Only two teams compete against each other at a time, and for each competition, one team is designated the home team, while the other team is the away team. In each competition there's always one winner and one loser; there are no ties. A team receives 3 points if it wins and 0 points if it loses. The winner of the tournament is the team that receives the most amount of points.

Given an array of pairs representing the teams that have competed against each other and an array containing the results of each competition, write a function that returns the winner of the tournament. The input arrays are named competitions and results, respectively.The competitions array has elements in the form of [homeTeam, awayTeam], where each team is a string of at most 30 characters representing the name of the team.The results array contains information about the winner of each corresponding competition in the competitions array.Specifically, results[i] denotes the winner of competitions[i], where a 1 in the results array means that the home team in the corresponding competition won and a 0 means that the away team won.

It's guaranteed that exactly one team will win the tournament and that each team will compete against all other teams exactly once.It's also guaranteed that the tournament will always have at least two teams.

###### Sample Test
competitions = [
	["HTML", "C#"],
	["C#", "Python"],
	["Python", "HTML"],
]

results = [0, 0, 1]

###### Sample Output
"Python"

- C# beats HTML, Python Beats C#, and Python Beats HTML.
- HTML - 0 points
- C# -  3 points
- Python -  6 points

---

##### Question 5
###### Non-Constructible change (Refer Blog [Non-Constructible change](https://codewrestling.medium.com/tournament-winner-with-time-and-space-complexity-competitive-programming-e9840ea36ffd)

---

Given an array of positive integers representing the values of coins in your possession, write a function that returns the minimum amount of change (the minimum sum of money) that you cannot create. The given coins can have any positive integer value and aren't necessarily unique (i.e., you can have multiple coins of the same value).

For example, if you're givencoins = [1, 2, 5], the minimum amount of change that you can't create is 4. If you're given no coins, the minimum amount of change that you can't create is 1.

###### Sample Test
coins = [5, 7, 1, 1, 2, 3, 22]

###### Sample Output
20

---
##### Question 6
###### Closest Value in BST ([Refer Blog](https://codewrestling.medium.com/closest-value-in-bst-competitive-programming-with-time-and-space-complexity-7d785a8b48b2))

Write a function that takes in a Binary Search Tree (BST) and a target integer value and returns the closest value to that target value contained in the BST. You can assume that there will only be one closest value.

 A node is said to be a valid BST node if and only if it satisfies the BST property: its value is strictly greater than the values of every node to its left; its value is less than or equal to the values of every node to its right; and its children nodes are either valid BST nodes themselves or None / null.

###### Sample Input

tree:

```

          10
       /     \
      5      15
    /   \   /   \
   2     5 13   22
 /           \
1             14
```

target = 12

###### Sample Output
13

---
##### Question 7
###### Branch Sum of Binary Tree ([Refer Blog](https://codewrestling.medium.com/branch-sums-in-binary-tree-competitive-programming-with-time-and-space-complexity-4e066d36ce43))

Write a function that takes in a Binary Tree and returns a list of its branch sums ordered from leftmost branch sum to rightmost branch sum. A branch sum is the sum of all values in a Binary Tree branch. A Binary Tree branch is a path of nodes in a tree that starts at the root node and ends at any leaf node.  Children nodes can either be BinaryTree nodes themselves or None / null.

###### Sample Input

tree:
```
			 1
		  /     \
		 2       3
	   /   \    /  \
	  4     5  6    7
	/   \  /
	8    9 10
```

###### Sample Output
[15, 16, 18, 10, 11]

// 15 == 1 + 2 + 4 + 8
// 16 == 1 + 2 + 4 + 9
// 18 == 1 + 2 + 5 + 10
// 10 == 1 + 3 + 6
// 11 == 1 + 3 + 7

---

repository: codewrestling/CompetitiveProgramming

repo_name: codewrestling/CompetitiveProgramming